OSSL_PASSPHRASE_CALLBACK

Callback that obtains a passphrase, optionally guided by OSSL_PARAM descriptors.

Synopsis

Declared in <openssl/core.h>

typedef int OSSL_PASSPHRASE_CALLBACK(char*, size_t, size_t*, OSSL_PARAM const[], void*);

Return Value

1 on success, or 0 on failure / cancellation.

Parameters

NameDescription
passOutput buffer for the passphrase octets (not necessarily NUL-terminated).
pass_sizeCapacity of pass in bytes.
pass_lenReceives the number of bytes written to pass.
paramsOptional parameters describing UI prompts / verification, or NULL.
argCaller-supplied opaque pointer.