summaryrefslogtreecommitdiffstats
path: root/crypto/pkcs12/p12_key.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-11-06 13:54:48 +0000
committerDr. Stephen Henson <steve@openssl.org>2001-11-06 13:54:48 +0000
commit3a3619b46a08eea15076944288ac351c35836ce5 (patch)
tree1d1d4fe281f882efad4819fa0ecf9b00daf8505e /crypto/pkcs12/p12_key.c
parentb83eddc578dc37967700dc8ca04aad6fe49edfb3 (diff)
PKCS#12 code fixes: initialize and cleanup digests and ciphers
properly.
Diffstat (limited to 'crypto/pkcs12/p12_key.c')
-rw-r--r--crypto/pkcs12/p12_key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/pkcs12/p12_key.c b/crypto/pkcs12/p12_key.c
index 1a405676f8..0d39ebde8c 100644
--- a/crypto/pkcs12/p12_key.c
+++ b/crypto/pkcs12/p12_key.c
@@ -165,6 +165,7 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt,
OPENSSL_free (I);
BN_free (Ij);
BN_free (Bpl1);
+ EVP_MD_CTX_cleanup(&ctx);
#ifdef DEBUG_KEYGEN
fprintf(stderr, "Output KEY (length %d)\n", tmpn);
h__dump(tmpout, tmpn);
@@ -195,7 +196,6 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt,
} else BN_bn2bin (Ij, I + j);
}
}
- EVP_MD_CTX_cleanup(&ctx);
}
#ifdef DEBUG_KEYGEN
void h__dump (unsigned char *p, int len)