summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/p5_pbev2.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>1999-06-10 17:32:52 +0000
committerDr. Stephen Henson <steve@openssl.org>1999-06-10 17:32:52 +0000
commitb7d135b353953bf40a58b49d145df5376a8af209 (patch)
tree13d52048866ecf20b4ab22366c467c0871a14ce1 /crypto/asn1/p5_pbev2.c
parentd58d092bc9f0a541ce5f0b265ee819f7ab086560 (diff)
Two new functions to write out PKCS#8 private keys. Also fixes for some of
the the PBE code and a new constant PKCS5_DEFAULT_ITER for the default iteration count if it is passed as zero.
Diffstat (limited to 'crypto/asn1/p5_pbev2.c')
-rw-r--r--crypto/asn1/p5_pbev2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asn1/p5_pbev2.c b/crypto/asn1/p5_pbev2.c
index 10364a0561..0fc8df16d0 100644
--- a/crypto/asn1/p5_pbev2.c
+++ b/crypto/asn1/p5_pbev2.c
@@ -206,6 +206,7 @@ X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
if (salt) memcpy (osalt->data, salt, saltlen);
else RAND_bytes (osalt->data, saltlen);
+ if(iter <= 0) iter = PKCS5_DEFAULT_ITER;
if(!ASN1_INTEGER_set(kdf->iter, iter)) goto merr;
/* Now include salt in kdf structure */