[#PKCS8_pkey_set0] = PKCS8_pkey_set0 :mrdocs: Set the algorithm, version, parameters, and encoded private key on a PKCS#8 PrivateKeyInfo. == Synopsis Declared in `<openssl/x509.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int PKCS8_pkey_set0( xref:PKCS8_PRIV_KEY_INFO.adoc[PKCS8_PRIV_KEY_INFO]* priv, xref:ASN1_OBJECT.adoc[ASN1_OBJECT]* aobj, int version, int ptype, void* pval, unsigned char* penc, int penclen); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#