summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pkcs12/p12_init.c
diff options
context:
space:
mode:
authorbeck <>2017-01-29 17:49:23 +0000
committerbeck <>2017-01-29 17:49:23 +0000
commit957b11334a7afb14537322f0e4795b2e368b3f59 (patch)
tree1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/pkcs12/p12_init.c
parentdf96e020e729c6c37a8c7fe311fdd1fe6a8718c5 (diff)
downloadopenbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.gz
openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.bz2
openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.zip
Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
Diffstat (limited to 'src/lib/libcrypto/pkcs12/p12_init.c')
-rw-r--r--src/lib/libcrypto/pkcs12/p12_init.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_init.c b/src/lib/libcrypto/pkcs12/p12_init.c
index cd01196b6f..637c430bf4 100644
--- a/src/lib/libcrypto/pkcs12/p12_init.c
+++ b/src/lib/libcrypto/pkcs12/p12_init.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_init.c,v 1.10 2015/09/30 18:41:06 jsing Exp $ */ 1/* $OpenBSD: p12_init.c,v 1.11 2017/01/29 17:49:23 beck 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 */
@@ -69,7 +69,7 @@ PKCS12_init(int mode)
69 PKCS12 *pkcs12; 69 PKCS12 *pkcs12;
70 70
71 if (!(pkcs12 = PKCS12_new())) { 71 if (!(pkcs12 = PKCS12_new())) {
72 PKCS12err(PKCS12_F_PKCS12_INIT, ERR_R_MALLOC_FAILURE); 72 PKCS12error(ERR_R_MALLOC_FAILURE);
73 return NULL; 73 return NULL;
74 } 74 }
75 ASN1_INTEGER_set(pkcs12->version, 3); 75 ASN1_INTEGER_set(pkcs12->version, 3);
@@ -78,13 +78,12 @@ PKCS12_init(int mode)
78 case NID_pkcs7_data: 78 case NID_pkcs7_data:
79 if (!(pkcs12->authsafes->d.data = 79 if (!(pkcs12->authsafes->d.data =
80 ASN1_OCTET_STRING_new())) { 80 ASN1_OCTET_STRING_new())) {
81 PKCS12err(PKCS12_F_PKCS12_INIT, ERR_R_MALLOC_FAILURE); 81 PKCS12error(ERR_R_MALLOC_FAILURE);
82 goto err; 82 goto err;
83 } 83 }
84 break; 84 break;
85 default: 85 default:
86 PKCS12err(PKCS12_F_PKCS12_INIT, 86 PKCS12error(PKCS12_R_UNSUPPORTED_PKCS12_MODE);
87 PKCS12_R_UNSUPPORTED_PKCS12_MODE);
88 goto err; 87 goto err;
89 } 88 }
90 89