EVP_PKEY_add1_attr_by_OBJ

Append an attribute identified by OID to an EVP_PKEY's attribute set.

Synopsis

Declared in <openssl/x509.h>

int
EVP_PKEY_add1_attr_by_OBJ(
    EVP_PKEY* key,
    ASN1_OBJECT const* obj,
    int type,
    unsigned char const* bytes,
    int len);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
keyKey whose attributes are extended.
objAttribute type OID.
typeASN.1 string/type code for bytes (for example V_ASN1_UTF8STRING).
bytesAttribute value bytes interpreted according to type.
lenLength of bytes in bytes.