Set the algorithm, version, parameters, and encoded private key on a PKCS#8 PrivateKeyInfo.
Declared in <openssl/x509.h>
int
PKCS8_pkey_set0(
PKCS8_PRIV_KEY_INFO* priv,
ASN1_OBJECT* aobj,
int version,
int ptype,
void* pval,
unsigned char* penc,
int penclen);
1 on success, or 0 on failure.
| Name | Description |
|---|---|
| priv | PKCS#8 structure to update. |
| aobj | Algorithm OID to assign (ownership transferred as implemented). |
| version | PKCS#8 version field value. |
| ptype | ASN.1 type of pval (V_ASN1_*). |
| pval | Algorithm parameters value matching ptype, or NULL. |
| penc | Encoded private-key octets; ownership transferred on success. |
| penclen | Length of penc in bytes. |