Encrypt a PKCS#8 private key info structure.
Synopsis
Declared in <openssl/pkcs12.h>
X509_SIG*
PKCS8_encrypt_ex(
int pbe_nid,
EVP_CIPHER const* cipher,
char const* pass,
int passlen,
unsigned char* salt,
int saltlen,
int iter,
PKCS8_PRIV_KEY_INFO* p8,
OSSL_LIB_CTX* ctx,
char const* propq);
Return Value
Encrypted key in an X509_SIG, or NULL on error.
Parameters
Name |
Description |
pbe_nid |
PBE algorithm NID. |
cipher |
Cipher for PBES2, or NULL when |
pass |
Passphrase for encryption. |
passlen |
Length of |
salt |
Salt for key derivation. |
saltlen |
Length of |
iter |
Iteration count for key derivation. |
p8 |
Private key info to encrypt. |
ctx |
Library context for algorithm fetching, or NULL for default. |
propq |
Property query for algorithm fetching, or NULL. |
Created with MrDocs