diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_attr.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_attr.c b/src/lib/libcrypto/pkcs12/p12_attr.c index a35a148b11..01a7a3ea8c 100644 --- a/src/lib/libcrypto/pkcs12/p12_attr.c +++ b/src/lib/libcrypto/pkcs12/p12_attr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p12_attr.c,v 1.15 2022/05/09 19:19:33 jsing Exp $ */ | 1 | /* $OpenBSD: p12_attr.c,v 1.16 2022/08/03 20:16:06 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -138,12 +138,18 @@ PKCS12_get_attr_gen(const STACK_OF(X509_ATTRIBUTE) *attrs, int attr_nid) | |||
| 138 | char * | 138 | char * |
| 139 | PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag) | 139 | PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag) |
| 140 | { | 140 | { |
| 141 | ASN1_TYPE *atype; | 141 | const ASN1_TYPE *atype; |
| 142 | 142 | ||
| 143 | if (!(atype = PKCS12_get_attr(bag, NID_friendlyName))) | 143 | if (!(atype = PKCS12_SAFEBAG_get0_attr(bag, NID_friendlyName))) |
| 144 | return NULL; | 144 | return NULL; |
| 145 | if (atype->type != V_ASN1_BMPSTRING) | 145 | if (atype->type != V_ASN1_BMPSTRING) |
| 146 | return NULL; | 146 | return NULL; |
| 147 | return OPENSSL_uni2asc(atype->value.bmpstring->data, | 147 | return OPENSSL_uni2asc(atype->value.bmpstring->data, |
| 148 | atype->value.bmpstring->length); | 148 | atype->value.bmpstring->length); |
| 149 | } | 149 | } |
| 150 | |||
| 151 | const STACK_OF(X509_ATTRIBUTE) * | ||
| 152 | PKCS12_SAFEBAG_get0_attrs(const PKCS12_SAFEBAG *bag) | ||
| 153 | { | ||
| 154 | return bag->attrib; | ||
| 155 | } | ||
