Write a private key to a BIO as PEM with an explicit library context.
Synopsis
Declared in <openssl/pem.h>
int
PEM_write_bio_PrivateKey_ex(
BIO* bp,
EVP_PKEY const* x,
EVP_CIPHER const* enc,
unsigned char const* kstr,
int klen,
pem_password_cb* cb,
void* u,
OSSL_LIB_CTX* libctx,
char const* propq);
Return Value
1 on success, or 0 on failure.
Parameters
Name |
Description |
bp |
BIO to write to. |
x |
Private key to encode. |
enc |
Cipher for PKCS#8 encryption, or NULL for unencrypted PrivateKeyInfo. |
kstr |
Optional passphrase bytes; if NULL and |
klen |
Length of |
cb |
Password callback when a passphrase is needed, or NULL. |
u |
Application data passed to |
libctx |
Library context used for provider‐backed encoding, or NULL for the default. |
propq |
Property query for algorithm fetches, or NULL. |
Created with MrDocs