Append an attribute identified by NID nid to a PKCS#8 private key info.
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);
1 on success, or 0 on failure.
| Name | Description |
|---|---|
| p8 | PKCS#8 structure receiving the attribute. |
| nid | Attribute type NID. |
| type | ASN.1 type of the attribute data. |
| bytes | Attribute value bytes. |
| len | Length of bytes. |