Encrypt PKCS#8 private key info using a pre-built PBE algorithm.
Declared in <openssl/pkcs12.h>
X509_SIG*
PKCS8_set0_pbe_ex(
char const* pass,
int passlen,
PKCS8_PRIV_KEY_INFO* p8inf,
X509_ALGOR* pbe,
OSSL_LIB_CTX* ctx,
char const* propq);
Encrypted key in an X509_SIG, or NULL on error.
| 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. |
| ctx | Library context for algorithm fetching, or NULL for default. |
| propq | Property query for algorithm fetching, or NULL. |