summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authormiod <>2015-02-14 15:45:21 +0000
committermiod <>2015-02-14 15:45:21 +0000
commitcefb402a070b4f4ec2a7c90a7f271d2d2b4fedfd (patch)
treedbf3095206c7336bcfc6d32d176fe6e44e71a074 /src/lib
parent6e46962db9caab269ae620d85d526f896781a9c1 (diff)
downloadopenbsd-cefb402a070b4f4ec2a7c90a7f271d2d2b4fedfd.tar.gz
openbsd-cefb402a070b4f4ec2a7c90a7f271d2d2b4fedfd.tar.bz2
openbsd-cefb402a070b4f4ec2a7c90a7f271d2d2b4fedfd.zip
Remove DEBUG_PKCS5V2 code.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/evp/p5_crpt2.c26
-rw-r--r--src/lib/libssl/src/crypto/evp/p5_crpt2.c26
2 files changed, 2 insertions, 50 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
78static 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
327static 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
diff --git a/src/lib/libssl/src/crypto/evp/p5_crpt2.c b/src/lib/libssl/src/crypto/evp/p5_crpt2.c
index c9eef8f49a..6fc88a0437 100644
--- a/src/lib/libssl/src/crypto/evp/p5_crpt2.c
+++ b/src/lib/libssl/src/crypto/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
78static 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
327static 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