diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-06-06 18:41:52 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-06-06 18:41:52 +0000 |
commit | 2bd83ca1c95405fe03b33cdc98e6fa43e7258246 (patch) | |
tree | 77db8e8be62a27adf992fa4d36d7f66b7a39a207 /crypto/evp/evp_pbe.c | |
parent | 69cbf468119d6a85289e4720d609c38d4329de23 (diff) |
Change PBE handling a bit more: now the key and iv generator does calls
EVP_CipherInit() this because the IV wont be easily available when doing
PKCS#5 v2.0
Diffstat (limited to 'crypto/evp/evp_pbe.c')
-rw-r--r-- | crypto/evp/evp_pbe.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/evp/evp_pbe.c b/crypto/evp/evp_pbe.c index abc4d0683c..353c3ad667 100644 --- a/crypto/evp/evp_pbe.c +++ b/crypto/evp/evp_pbe.c @@ -79,7 +79,6 @@ int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen, { EVP_PBE_CTL *pbetmp, pbelu; - unsigned char key[EVP_MAX_KEY_LENGTH], iv[EVP_MAX_IV_LENGTH]; int i; pbelu.pbe_nid = OBJ_obj2nid(pbe_obj); if (pbelu.pbe_nid != NID_undef) i = sk_find(pbe_algs, (char *)&pbelu); @@ -95,13 +94,12 @@ int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen, } if (passlen == -1) passlen = strlen(pass); pbetmp = (EVP_PBE_CTL *)sk_value (pbe_algs, i); - i = (*pbetmp->keygen)(pass, passlen, param, pbetmp->cipher, - pbetmp->md, key, iv); + i = (*pbetmp->keygen)(ctx, pass, passlen, param, pbetmp->cipher, + pbetmp->md, en_de); if (!i) { EVPerr(EVP_F_EVP_PBE_CIPHERINIT,EVP_R_KEYGEN_FAILURE); return 0; } - EVP_CipherInit (ctx, pbetmp->cipher, key, iv, en_de); return 1; } |