From: Dr. Stephen Henson Date: Tue, 6 Jul 2004 17:25:11 +0000 (+0000) Subject: Ooops, missed part of PKCS#8 patch. X-Git-Tag: OpenSSL_0_9_7e~65 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=531b538df5e6c9261883e5d2dc75ef5c42fcfb30;p=openssl Ooops, missed part of PKCS#8 patch. --- diff --git a/crypto/asn1/p5_pbev2.c b/crypto/asn1/p5_pbev2.c index 8412d89ddd..e0dc0ec4ee 100644 --- a/crypto/asn1/p5_pbev2.c +++ b/crypto/asn1/p5_pbev2.c @@ -113,7 +113,8 @@ X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, if(!(scheme->parameter = ASN1_TYPE_new())) goto merr; /* Create random IV */ - if (RAND_pseudo_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0) + if (EVP_CIPHER_iv_length(cipher) && + RAND_pseudo_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0) goto err; EVP_CIPHER_CTX_init(&ctx);