X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=crypto%2Fasn1%2Fp5_pbev2.c;h=91e1c8987d3504c6ce6feac8444573325c2df56a;hb=8845420f4e030092f89261510e8b65043d692cce;hp=43dfe09479f2a63d6b6d363bb89c3ddfdeacbd85;hpb=581f1c84940d77451c2592e9fa470893f6c3c3eb;p=openssl.git diff --git a/crypto/asn1/p5_pbev2.c b/crypto/asn1/p5_pbev2.c index 43dfe09479..91e1c8987d 100644 --- a/crypto/asn1/p5_pbev2.c +++ b/crypto/asn1/p5_pbev2.c @@ -116,6 +116,8 @@ X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, if (RAND_pseudo_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0) goto err; + EVP_CIPHER_CTX_init(&ctx); + /* Dummy cipherinit to just setup the IV */ EVP_CipherInit_ex(&ctx, cipher, NULL, NULL, iv, 0); if(EVP_CIPHER_param_to_asn1(&ctx, scheme->parameter) < 0) {