Append an X509_ATTRIBUTE named by attrname to an EVP_PKEY attribute list.

Synopsis

Declared in <openssl/x509.h>

int
EVP_PKEY_add1_attr_by_txt(
    EVP_PKEY* key,
    char const* attrname,
    int type,
    unsigned char const* bytes,
    int len);

Return Value

1 on success, or 0 on failure (including duplicate attributes).

Parameters

Name

Description

key

Key whose attribute stack is updated.

attrname

Short or long attribute name (see obj_mac.h SN_* / LN_*).

type

ASN.1 value type for the attribute data (V_ASN1_*).

bytes

Attribute value bytes.

len

Length of bytes, or ‐1 if bytes is a NUL‐terminated string when applicable.

Created with MrDocs