summaryrefslogtreecommitdiffstats
path: root/crypto/pkcs12
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-10-16 01:24:29 +0000
committerDr. Stephen Henson <steve@openssl.org>2001-10-16 01:24:29 +0000
commit20d2186c87dabec56c6da48961a779843724a019 (patch)
tree4c5c2ba2e12a851c48726b6e5cc83a006f8291f1 /crypto/pkcs12
parent9ba3ec91766e559f96248fe10c77551a4e017ec3 (diff)
Retain compatibility of EVP_DigestInit() and EVP_DigestFinal()
with existing code. Modify library to use digest *_ex() functions.
Diffstat (limited to 'crypto/pkcs12')
-rw-r--r--crypto/pkcs12/p12_key.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/pkcs12/p12_key.c b/crypto/pkcs12/p12_key.c
index 2defeda518..1a405676f8 100644
--- a/crypto/pkcs12/p12_key.c
+++ b/crypto/pkcs12/p12_key.c
@@ -148,14 +148,14 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt,
for (i = 0; i < Slen; i++) *p++ = salt[i % saltlen];
for (i = 0; i < Plen; i++) *p++ = pass[i % passlen];
for (;;) {
- EVP_DigestInit (&ctx, md_type);
- EVP_DigestUpdate (&ctx, D, v);
- EVP_DigestUpdate (&ctx, I, Ilen);
- EVP_DigestFinal (&ctx, Ai, NULL);
+ EVP_DigestInit_ex(&ctx, md_type, NULL);
+ EVP_DigestUpdate(&ctx, D, v);
+ EVP_DigestUpdate(&ctx, I, Ilen);
+ EVP_DigestFinal_ex(&ctx, Ai, NULL);
for (j = 1; j < iter; j++) {
- EVP_DigestInit (&ctx, md_type);
- EVP_DigestUpdate (&ctx, Ai, u);
- EVP_DigestFinal (&ctx, Ai, NULL);
+ EVP_DigestInit_ex(&ctx, md_type, NULL);
+ EVP_DigestUpdate(&ctx, Ai, u);
+ EVP_DigestFinal_ex(&ctx, Ai, NULL);
}
memcpy (out, Ai, min (n, u));
if (u >= n) {