Skip to main content

Module params

Module params 

Source
Expand description

OSSL_PARAM_BLD builder and Params<'a> wrapper.

ParamBuilder wraps OSSL_PARAM_BLD and provides typed push methods that map Rust types to OpenSSL parameter types. build() finalises the builder and returns an owned Params array.

§Lifetime

ParamBuilder<'a> carries a lifetime 'a that covers any borrowed byte slices passed via push_octet_ptr or push_utf8_ptr. Those calls store a pointer into the caller’s buffer; the buffer must outlive the Params returned by build(). Calls that copy (push_octet_slice, push_utf8_string) have no such constraint.

§Zero-copy decision table

MethodC functionCopies?
push_octet_sliceOSSL_PARAM_BLD_push_octet_stringYes
push_octet_ptrOSSL_PARAM_BLD_push_octet_ptrNo
push_utf8_stringOSSL_PARAM_BLD_push_utf8_stringYes
push_utf8_ptr(manual OSSL_PARAM_BLD extension)No

Structs§

ParamBuilder
Builder for OSSL_PARAM arrays.
Params
An owned, finalized OSSL_PARAM array.