PKCS8_pkey_get0

Extract algorithm and private-key octets from a PKCS#8 PrivateKeyInfo.

Synopsis

Declared in <openssl/x509.h>

int
PKCS8_pkey_get0(
    ASN1_OBJECT const** ppkalg,
    unsigned char const** pk,
    int* ppklen,
    X509_ALGOR const** pa,
    PKCS8_PRIV_KEY_INFO const* p8);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ppkalgReceives the algorithm OID, or NULL to skip.
pkReceives a pointer to the private-key bit string octets, or NULL to skip.
ppklenReceives the length of *pk, or NULL to skip.
paReceives the AlgorithmIdentifier, or NULL to skip.
p8PKCS#8 structure to query.