summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/pkcs12/p12_kiss.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_kiss.c b/src/lib/libcrypto/pkcs12/p12_kiss.c
index f6f09ff2de..4324201598 100644
--- a/src/lib/libcrypto/pkcs12/p12_kiss.c
+++ b/src/lib/libcrypto/pkcs12/p12_kiss.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_kiss.c,v 1.29 2025/05/10 05:54:38 tb Exp $ */ 1/* $OpenBSD: p12_kiss.c,v 1.30 2026/01/27 14:14:20 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 */
@@ -231,11 +231,17 @@ parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, EVP_PKEY **pkey,
231 ASN1_BMPSTRING *fname = NULL; 231 ASN1_BMPSTRING *fname = NULL;
232 ASN1_OCTET_STRING *lkid = NULL; 232 ASN1_OCTET_STRING *lkid = NULL;
233 233
234 if ((attrib = PKCS12_SAFEBAG_get0_attr(bag, NID_friendlyName))) 234 if ((attrib = PKCS12_SAFEBAG_get0_attr(bag, NID_friendlyName))) {
235 if (attrib->type != V_ASN1_BMPSTRING)
236 return 0;
235 fname = attrib->value.bmpstring; 237 fname = attrib->value.bmpstring;
238 }
236 239
237 if ((attrib = PKCS12_SAFEBAG_get0_attr(bag, NID_localKeyID))) 240 if ((attrib = PKCS12_SAFEBAG_get0_attr(bag, NID_localKeyID))) {
241 if (attrib->type != V_ASN1_OCTET_STRING)
242 return 0;
238 lkid = attrib->value.octet_string; 243 lkid = attrib->value.octet_string;
244 }
239 245
240 switch (OBJ_obj2nid(bag->type)) { 246 switch (OBJ_obj2nid(bag->type)) {
241 case NID_keyBag: 247 case NID_keyBag: