From b7d135b353953bf40a58b49d145df5376a8af209 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 10 Jun 1999 17:32:52 +0000 Subject: 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. --- crypto/pkcs12/p12_crpt.c | 2 +- crypto/pkcs12/pkcs12.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto/pkcs12') diff --git a/crypto/pkcs12/p12_crpt.c b/crypto/pkcs12/p12_crpt.c index d94265403a..6de6f8128f 100644 --- a/crypto/pkcs12/p12_crpt.c +++ b/crypto/pkcs12/p12_crpt.c @@ -92,7 +92,7 @@ int PKCS12_PBE_keyivgen (EVP_CIPHER_CTX *ctx, const char *pass, int passlen, /* Extract useful info from parameter */ pbuf = param->value.sequence->data; - if (!param || (param->type = V_ASN1_SEQUENCE) || + if (!param || (param->type != V_ASN1_SEQUENCE) || !(pbe = d2i_PBEPARAM (NULL, &pbuf, param->value.sequence->length))) { EVPerr(PKCS12_F_PKCS12_PBE_KEYIVGEN,EVP_R_DECODE_ERROR); return 0; diff --git a/crypto/pkcs12/pkcs12.h b/crypto/pkcs12/pkcs12.h index 5f3b1148fa..4cfba5e6c6 100644 --- a/crypto/pkcs12/pkcs12.h +++ b/crypto/pkcs12/pkcs12.h @@ -72,7 +72,7 @@ extern "C" { /* Default iteration count */ #ifndef PKCS12_DEFAULT_ITER -#define PKCS12_DEFAULT_ITER 2048 +#define PKCS12_DEFAULT_ITER PKCS5_DEFAULT_ITER #endif #define PKCS12_MAC_KEY_LENGTH 20 -- cgit v1.2.3