diff options
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/p8_pkey.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/asn1/p8_pkey.c b/crypto/asn1/p8_pkey.c index c55353ae11..77e64a9ac1 100644 --- a/crypto/asn1/p8_pkey.c +++ b/crypto/asn1/p8_pkey.c @@ -78,3 +78,14 @@ int PKCS8_pkey_add1_attr_by_NID(PKCS8_PRIV_KEY_INFO *p8, int nid, int type, return 1; return 0; } + +int PKCS8_pkey_add1_attr_by_OBJ(PKCS8_PRIV_KEY_INFO *p8, const ASN1_OBJECT *obj, int type, + const unsigned char *bytes, int len) +{ + return (X509at_add1_attr_by_OBJ(&p8->attributes, obj, type, bytes, len) != NULL); +} + +int PKCS8_pkey_add1_attr(PKCS8_PRIV_KEY_INFO *p8, X509_ATTRIBUTE *attr) +{ + return (X509at_add1_attr(&p8->attributes, attr) != NULL); +} |