diff options
Diffstat (limited to 'src/lib/libcrypto/pkcs12/p12_npas.c')
-rw-r--r-- | src/lib/libcrypto/pkcs12/p12_npas.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_npas.c b/src/lib/libcrypto/pkcs12/p12_npas.c index 7803721a26..63b3df17ad 100644 --- a/src/lib/libcrypto/pkcs12/p12_npas.c +++ b/src/lib/libcrypto/pkcs12/p12_npas.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p12_npas.c,v 1.11 2016/12/30 15:08:22 jsing Exp $ */ | 1 | /* $OpenBSD: p12_npas.c,v 1.12 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 | */ |
@@ -81,20 +81,19 @@ PKCS12_newpass(PKCS12 *p12, char *oldpass, char *newpass) | |||
81 | /* Check for NULL PKCS12 structure */ | 81 | /* Check for NULL PKCS12 structure */ |
82 | 82 | ||
83 | if (!p12) { | 83 | if (!p12) { |
84 | PKCS12err(PKCS12_F_PKCS12_NEWPASS, | 84 | PKCS12error(PKCS12_R_INVALID_NULL_PKCS12_POINTER); |
85 | PKCS12_R_INVALID_NULL_PKCS12_POINTER); | ||
86 | return 0; | 85 | return 0; |
87 | } | 86 | } |
88 | 87 | ||
89 | /* Check the mac */ | 88 | /* Check the mac */ |
90 | 89 | ||
91 | if (!PKCS12_verify_mac(p12, oldpass, -1)) { | 90 | if (!PKCS12_verify_mac(p12, oldpass, -1)) { |
92 | PKCS12err(PKCS12_F_PKCS12_NEWPASS, PKCS12_R_MAC_VERIFY_FAILURE); | 91 | PKCS12error(PKCS12_R_MAC_VERIFY_FAILURE); |
93 | return 0; | 92 | return 0; |
94 | } | 93 | } |
95 | 94 | ||
96 | if (!newpass_p12(p12, oldpass, newpass)) { | 95 | if (!newpass_p12(p12, oldpass, newpass)) { |
97 | PKCS12err(PKCS12_F_PKCS12_NEWPASS, PKCS12_R_PARSE_ERROR); | 96 | PKCS12error(PKCS12_R_PARSE_ERROR); |
98 | return 0; | 97 | return 0; |
99 | } | 98 | } |
100 | 99 | ||