diff options
| author | miod <> | 2015-02-14 15:45:21 +0000 |
|---|---|---|
| committer | miod <> | 2015-02-14 15:45:21 +0000 |
| commit | 2b58a2e1ecb2c9193af7cfb72d8b8691ff753122 (patch) | |
| tree | dbf3095206c7336bcfc6d32d176fe6e44e71a074 /src/lib/libc | |
| parent | 73e9d3d4b44b515f05a54ce8c92033bf556db941 (diff) | |
| download | openbsd-2b58a2e1ecb2c9193af7cfb72d8b8691ff753122.tar.gz openbsd-2b58a2e1ecb2c9193af7cfb72d8b8691ff753122.tar.bz2 openbsd-2b58a2e1ecb2c9193af7cfb72d8b8691ff753122.zip | |
Remove DEBUG_PKCS5V2 code.
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/evp/p5_crpt2.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/lib/libcrypto/evp/p5_crpt2.c b/src/lib/libcrypto/evp/p5_crpt2.c index c9eef8f49a..6fc88a0437 100644 --- a/src/lib/libcrypto/evp/p5_crpt2.c +++ b/src/lib/libcrypto/evp/p5_crpt2.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p5_crpt2.c,v 1.18 2015/02/10 09:52:35 miod Exp $ */ | 1 | /* $OpenBSD: p5_crpt2.c,v 1.19 2015/02/14 15:45:21 miod Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -71,13 +71,6 @@ | |||
| 71 | 71 | ||
| 72 | #include "evp_locl.h" | 72 | #include "evp_locl.h" |
| 73 | 73 | ||
| 74 | /* set this to print out info about the keygen algorithm */ | ||
| 75 | /* #define DEBUG_PKCS5V2 */ | ||
| 76 | |||
| 77 | #ifdef DEBUG_PKCS5V2 | ||
| 78 | static void h__dump (const unsigned char *p, int len); | ||
| 79 | #endif | ||
| 80 | |||
| 81 | /* This is an implementation of PKCS#5 v2.0 password based encryption key | 74 | /* This is an implementation of PKCS#5 v2.0 password based encryption key |
| 82 | * derivation function PBKDF2. | 75 | * derivation function PBKDF2. |
| 83 | * SHA1 version verified against test vectors posted by Peter Gutmann | 76 | * SHA1 version verified against test vectors posted by Peter Gutmann |
| @@ -153,15 +146,6 @@ PKCS5_PBKDF2_HMAC(const char *pass, int passlen, const unsigned char *salt, | |||
| 153 | p += cplen; | 146 | p += cplen; |
| 154 | } | 147 | } |
| 155 | HMAC_CTX_cleanup(&hctx_tpl); | 148 | HMAC_CTX_cleanup(&hctx_tpl); |
| 156 | #ifdef DEBUG_PKCS5V2 | ||
| 157 | fprintf(stderr, "Password:\n"); | ||
| 158 | h__dump (pass, passlen); | ||
| 159 | fprintf(stderr, "Salt:\n"); | ||
| 160 | h__dump (salt, saltlen); | ||
| 161 | fprintf(stderr, "Iteration count %d\n", iter); | ||
| 162 | fprintf(stderr, "Key:\n"); | ||
| 163 | h__dump (out, keylen); | ||
| 164 | #endif | ||
| 165 | return 1; | 149 | return 1; |
| 166 | } | 150 | } |
| 167 | 151 | ||
| @@ -323,12 +307,4 @@ err: | |||
| 323 | return rv; | 307 | return rv; |
| 324 | } | 308 | } |
| 325 | 309 | ||
| 326 | #ifdef DEBUG_PKCS5V2 | ||
| 327 | static void h__dump (const unsigned char *p, int len) | ||
| 328 | { | ||
| 329 | for (; len --; p++) | ||
| 330 | fprintf(stderr, "%02X ", *p); | ||
| 331 | fprintf(stderr, "\n"); | ||
| 332 | } | ||
| 333 | #endif | ||
| 334 | #endif | 310 | #endif |
