summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pkcs12/p12_decr.c
diff options
context:
space:
mode:
authordjm <>2012-10-13 21:23:50 +0000
committerdjm <>2012-10-13 21:23:50 +0000
commit228cae30b117c2493f69ad3c195341cd6ec8d430 (patch)
tree29ff00b10d52c0978077c4fd83c33b065bade73e /src/lib/libcrypto/pkcs12/p12_decr.c
parent731838c66b52c0ae5888333005b74115a620aa96 (diff)
downloadopenbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.tar.gz
openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.tar.bz2
openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.zip
import OpenSSL-1.0.1c
Diffstat (limited to 'src/lib/libcrypto/pkcs12/p12_decr.c')
-rw-r--r--src/lib/libcrypto/pkcs12/p12_decr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_decr.c b/src/lib/libcrypto/pkcs12/p12_decr.c
index ba77dbbe32..9d3557e8d7 100644
--- a/src/lib/libcrypto/pkcs12/p12_decr.c
+++ b/src/lib/libcrypto/pkcs12/p12_decr.c
@@ -89,7 +89,14 @@ unsigned char * PKCS12_pbe_crypt(X509_ALGOR *algor, const char *pass,
89 goto err; 89 goto err;
90 } 90 }
91 91
92 EVP_CipherUpdate(&ctx, out, &i, in, inlen); 92 if (!EVP_CipherUpdate(&ctx, out, &i, in, inlen))
93 {
94 OPENSSL_free(out);
95 out = NULL;
96 PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,ERR_R_EVP_LIB);
97 goto err;
98 }
99
93 outlen = i; 100 outlen = i;
94 if(!EVP_CipherFinal_ex(&ctx, out + i, &i)) { 101 if(!EVP_CipherFinal_ex(&ctx, out + i, &i)) {
95 OPENSSL_free(out); 102 OPENSSL_free(out);