summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pkcs12/p12_kiss.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/pkcs12/p12_kiss.c')
-rw-r--r--src/lib/libcrypto/pkcs12/p12_kiss.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_kiss.c b/src/lib/libcrypto/pkcs12/p12_kiss.c
index e0385393d7..54a8092609 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.20 2021/04/24 18:16:39 tb Exp $ */ 1/* $OpenBSD: p12_kiss.c,v 1.21 2021/07/09 14:08:00 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 */
@@ -125,7 +125,7 @@ PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
125 return 0; 125 return 0;
126 } 126 }
127 127
128 if (!parse_pk12 (p12, pass, -1, pkey, ocerts)) { 128 if (!parse_pk12(p12, pass, -1, pkey, ocerts)) {
129 PKCS12error(PKCS12_R_PARSE_ERROR); 129 PKCS12error(PKCS12_R_PARSE_ERROR);
130 goto err; 130 goto err;
131 } 131 }
@@ -179,11 +179,11 @@ parse_pk12(PKCS12 *p12, const char *pass, int passlen, EVP_PKEY **pkey,
179 int i, bagnid; 179 int i, bagnid;
180 PKCS7 *p7; 180 PKCS7 *p7;
181 181
182 if (!(asafes = PKCS12_unpack_authsafes (p12))) 182 if (!(asafes = PKCS12_unpack_authsafes(p12)))
183 return 0; 183 return 0;
184 for (i = 0; i < sk_PKCS7_num (asafes); i++) { 184 for (i = 0; i < sk_PKCS7_num(asafes); i++) {
185 p7 = sk_PKCS7_value (asafes, i); 185 p7 = sk_PKCS7_value(asafes, i);
186 bagnid = OBJ_obj2nid (p7->type); 186 bagnid = OBJ_obj2nid(p7->type);
187 if (bagnid == NID_pkcs7_data) { 187 if (bagnid == NID_pkcs7_data) {
188 bags = PKCS12_unpack_p7data(p7); 188 bags = PKCS12_unpack_p7data(p7);
189 } else if (bagnid == NID_pkcs7_encrypted) { 189 } else if (bagnid == NID_pkcs7_encrypted) {
@@ -229,10 +229,10 @@ parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, EVP_PKEY **pkey,
229 ASN1_BMPSTRING *fname = NULL; 229 ASN1_BMPSTRING *fname = NULL;
230 ASN1_OCTET_STRING *lkid = NULL; 230 ASN1_OCTET_STRING *lkid = NULL;
231 231
232 if ((attrib = PKCS12_get_attr (bag, NID_friendlyName))) 232 if ((attrib = PKCS12_get_attr(bag, NID_friendlyName)))
233 fname = attrib->value.bmpstring; 233 fname = attrib->value.bmpstring;
234 234
235 if ((attrib = PKCS12_get_attr (bag, NID_localKeyID))) 235 if ((attrib = PKCS12_get_attr(bag, NID_localKeyID)))
236 lkid = attrib->value.octet_string; 236 lkid = attrib->value.octet_string;
237 237
238 switch (OBJ_obj2nid(bag->type)) { 238 switch (OBJ_obj2nid(bag->type)) {