OSSL_ENCODER_CTX_set_passphrase

Set a passphrase used when the encoder encrypts private-key output.

Synopsis

Declared in <openssl/encoder.h>

int
OSSL_ENCODER_CTX_set_passphrase(
    OSSL_ENCODER_CTX* ctx,
    unsigned char const* kstr,
    size_t klen);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxEncoder context to configure.
kstrPassphrase bytes (not necessarily NUL-terminated).
klenLength of kstr in bytes.