summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/p5_pbe.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_pbe.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_pbe.c')
-rw-r--r--crypto/asn1/p5_pbe.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asn1/p5_pbe.c b/crypto/asn1/p5_pbe.c
index 5145c6349e..30b9049a45 100644
--- a/crypto/asn1/p5_pbe.c
+++ b/crypto/asn1/p5_pbe.c
@@ -119,6 +119,7 @@ X509_ALGOR *PKCS5_pbe_set(int alg, int iter, unsigned char *salt,
ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE);
return NULL;
}
+ if(iter <= 0) iter = PKCS5_DEFAULT_ITER;
ASN1_INTEGER_set (pbe->iter, iter);
if (!saltlen) saltlen = PKCS5_SALT_LEN;
if (!(pbe->salt->data = Malloc (saltlen))) {