Encrypt PKCS#8 private key info using a pre‐built PBE algorithm.

Synopsis

Declared in <openssl/pkcs12.h>

X509_SIG*
PKCS8_set0_pbe(
    char const* pass,
    int passlen,
    PKCS8_PRIV_KEY_INFO* p8inf,
    X509_ALGOR* pbe);

Return Value

Encrypted key in an X509_SIG, or NULL on error.

Parameters

Name

Description

pass

Passphrase for encryption.

passlen

Length of pass, or ‐1 to use strlen().

p8inf

Private key info to encrypt.

pbe

PBE algorithm parameters.

Created with MrDocs