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

Synopsis

Declared in <openssl/x509.h>

int
PKCS8_pkey_add1_attr_by_OBJ(
    PKCS8_PRIV_KEY_INFO* p8,
    ASN1_OBJECT const* obj,
    int type,
    unsigned char const* bytes,
    int len);

Return Value

1 on success, or 0 on failure.

Parameters

Name

Description

p8

PKCS#8 structure receiving the attribute.

obj

Attribute type OID.

type

ASN.1 string/value type for bytes (V_ASN1_*).

bytes

Attribute value bytes.

len

Length of bytes, or ‐1 if bytes is NUL‐terminated where applicable.

Created with MrDocs