summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/crypto/evp/p5_crpt2.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/openssl/openssl/crypto/evp/p5_crpt2.c')
-rw-r--r--deps/openssl/openssl/crypto/evp/p5_crpt2.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/deps/openssl/openssl/crypto/evp/p5_crpt2.c b/deps/openssl/openssl/crypto/evp/p5_crpt2.c
index 6d5f289b51..e819eb9b47 100644
--- a/deps/openssl/openssl/crypto/evp/p5_crpt2.c
+++ b/deps/openssl/openssl/crypto/evp/p5_crpt2.c
@@ -25,8 +25,7 @@ static void h__dump(const unsigned char *p, int len);
/*
* This is an implementation of PKCS#5 v2.0 password based encryption key
* derivation function PBKDF2. SHA1 version verified against test vectors
- * posted by Peter Gutmann <pgut001@cs.auckland.ac.nz> to the PKCS-TNG
- * <pkcs-tng@rsa.com> mailing list.
+ * posted by Peter Gutmann to the PKCS-TNG mailing list.
*/
int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
@@ -88,7 +87,6 @@ int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
HMAC_CTX_free(hctx_tpl);
return 0;
}
- HMAC_CTX_reset(hctx);
memcpy(p, digtmp, cplen);
for (j = 1; j < iter; j++) {
if (!HMAC_CTX_copy(hctx, hctx_tpl)) {
@@ -102,7 +100,6 @@ int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
HMAC_CTX_free(hctx_tpl);
return 0;
}
- HMAC_CTX_reset(hctx);
for (k = 0; k < cplen; k++)
p[k] ^= digtmp[k];
}
@@ -132,18 +129,6 @@ int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
keylen, out);
}
-# ifdef DO_TEST
-main()
-{
- unsigned char out[4];
- unsigned char salt[] = { 0x12, 0x34, 0x56, 0x78 };
- PKCS5_PBKDF2_HMAC_SHA1("password", -1, salt, 4, 5, 4, out);
- fprintf(stderr, "Out %02X %02X %02X %02X\n",
- out[0], out[1], out[2], out[3]);
-}
-
-# endif
-
/*
* Now the key derivation function itself. This is a bit evil because it has
* to check the ASN1 parameters are valid: and there are quite a few of