diff options
author | djm <> | 2005-04-29 05:39:33 +0000 |
---|---|---|
committer | djm <> | 2005-04-29 05:39:33 +0000 |
commit | 68edd00d9258df93b1366c71ac124e0cadf7bc08 (patch) | |
tree | 3ce4ae2a9747bbc11aed1f95f9bbea92c41f8683 /src/lib/libcrypto/asn1/p5_pbev2.c | |
parent | f396ed0f5ce0af56bfde2e75e15cf1f52924c779 (diff) | |
download | openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.tar.gz openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.tar.bz2 openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.zip |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/asn1/p5_pbev2.c')
-rw-r--r-- | src/lib/libcrypto/asn1/p5_pbev2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/p5_pbev2.c b/src/lib/libcrypto/asn1/p5_pbev2.c index 91e1c8987d..e0dc0ec4ee 100644 --- a/src/lib/libcrypto/asn1/p5_pbev2.c +++ b/src/lib/libcrypto/asn1/p5_pbev2.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* p5_pbev2.c */ | 1 | /* p5_pbev2.c */ |
2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL |
3 | * project 1999. | 3 | * project 1999-2004. |
4 | */ | 4 | */ |
5 | /* ==================================================================== | 5 | /* ==================================================================== |
6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. |
@@ -113,7 +113,8 @@ X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, | |||
113 | if(!(scheme->parameter = ASN1_TYPE_new())) goto merr; | 113 | if(!(scheme->parameter = ASN1_TYPE_new())) goto merr; |
114 | 114 | ||
115 | /* Create random IV */ | 115 | /* Create random IV */ |
116 | if (RAND_pseudo_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0) | 116 | if (EVP_CIPHER_iv_length(cipher) && |
117 | RAND_pseudo_bytes(iv, EVP_CIPHER_iv_length(cipher)) < 0) | ||
117 | goto err; | 118 | goto err; |
118 | 119 | ||
119 | EVP_CIPHER_CTX_init(&ctx); | 120 | EVP_CIPHER_CTX_init(&ctx); |
@@ -123,6 +124,7 @@ X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, | |||
123 | if(EVP_CIPHER_param_to_asn1(&ctx, scheme->parameter) < 0) { | 124 | if(EVP_CIPHER_param_to_asn1(&ctx, scheme->parameter) < 0) { |
124 | ASN1err(ASN1_F_PKCS5_PBE2_SET, | 125 | ASN1err(ASN1_F_PKCS5_PBE2_SET, |
125 | ASN1_R_ERROR_SETTING_CIPHER_PARAMS); | 126 | ASN1_R_ERROR_SETTING_CIPHER_PARAMS); |
127 | EVP_CIPHER_CTX_cleanup(&ctx); | ||
126 | goto err; | 128 | goto err; |
127 | } | 129 | } |
128 | EVP_CIPHER_CTX_cleanup(&ctx); | 130 | EVP_CIPHER_CTX_cleanup(&ctx); |