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

Name

Description

key

Key whose attributes are extended.

obj

Attribute type OID.

type

ASN.1 string/type code for bytes (for example V_ASN1_UTF8STRING).

bytes

Attribute value bytes interpreted according to type.

len

Length of bytes in bytes.

Created with MrDocs