diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2004-11-24 02:21:03 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2004-11-24 02:21:03 +0100 |
commit | 9d2996b82fa59f478251c9fec85c5e2df2a43958 (patch) | |
tree | 49369292a0413567ba4eaf60945798dbe743f9a5 /crypto/pkcs12/p12_crpt.c | |
parent | Typo. (diff) | |
download | openssl-9d2996b82fa59f478251c9fec85c5e2df2a43958.tar.xz openssl-9d2996b82fa59f478251c9fec85c5e2df2a43958.zip |
Check return code of EVP_CipherInit() in PKCS#12 code.
Diffstat (limited to 'crypto/pkcs12/p12_crpt.c')
-rw-r--r-- | crypto/pkcs12/p12_crpt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/pkcs12/p12_crpt.c b/crypto/pkcs12/p12_crpt.c index 654d15c82b..d407be39ca 100644 --- a/crypto/pkcs12/p12_crpt.c +++ b/crypto/pkcs12/p12_crpt.c @@ -88,7 +88,7 @@ int PKCS12_PBE_keyivgen (EVP_CIPHER_CTX *ctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de) { PBEPARAM *pbe; - int saltlen, iter; + int saltlen, iter, ret; unsigned char *salt; const unsigned char *pbuf; unsigned char key[EVP_MAX_KEY_LENGTH], iv[EVP_MAX_IV_LENGTH]; @@ -118,8 +118,8 @@ int PKCS12_PBE_keyivgen (EVP_CIPHER_CTX *ctx, const char *pass, int passlen, return 0; } PBEPARAM_free(pbe); - EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, en_de); + ret = EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, en_de); OPENSSL_cleanse(key, EVP_MAX_KEY_LENGTH); OPENSSL_cleanse(iv, EVP_MAX_IV_LENGTH); - return 1; + return ret; } |