[#PKCS8_pkey_get0]
= PKCS8&lowbar;pkey&lowbar;get0
:mrdocs:

Extract algorithm and private&hyphen;key octets from a PKCS&num;8 PrivateKeyInfo&period;

== Synopsis

Declared in `&lt;openssl&sol;x509&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
PKCS8&lowbar;pkey&lowbar;get0(
    xref:ASN1_OBJECT.adoc[ASN1&lowbar;OBJECT] const** ppkalg,
    unsigned char const** pk,
    int* ppklen,
    xref:X509_ALGOR.adoc[X509&lowbar;ALGOR] const** pa,
    xref:PKCS8_PRIV_KEY_INFO.adoc[PKCS8&lowbar;PRIV&lowbar;KEY&lowbar;INFO] const* p8);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ppkalg*
| Receives the algorithm OID, or NULL to skip&period;
| *pk*
| Receives a pointer to the private&hyphen;key bit string octets, or NULL to skip&period;
| *ppklen*
| Receives the length of &ast;`pk,` or NULL to skip&period;
| *pa*
| Receives the AlgorithmIdentifier, or NULL to skip&period;
| *p8*
| PKCS&num;8 structure to query&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
