PKCS8_pkey_add1_attr_by_NID

Append an attribute identified by NID nid to a PKCS#8 private key info.

Synopsis

Declared in <openssl/x509.h>

int
PKCS8_pkey_add1_attr_by_NID(
    PKCS8_PRIV_KEY_INFO* p8,
    int nid,
    int type,
    unsigned char const* bytes,
    int len);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
p8PKCS#8 structure receiving the attribute.
nidAttribute type NID.
typeASN.1 type of the attribute data.
bytesAttribute value bytes.
lenLength of bytes.