summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pkcs12/p12_key.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/pkcs12/p12_key.c')
-rw-r--r--src/lib/libcrypto/pkcs12/p12_key.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_key.c b/src/lib/libcrypto/pkcs12/p12_key.c
index 25d8cdae57..02fdd20e2f 100644
--- a/src/lib/libcrypto/pkcs12/p12_key.c
+++ b/src/lib/libcrypto/pkcs12/p12_key.c
@@ -64,7 +64,7 @@
64/* Uncomment out this line to get debugging info about key generation */ 64/* Uncomment out this line to get debugging info about key generation */
65/*#define DEBUG_KEYGEN*/ 65/*#define DEBUG_KEYGEN*/
66#ifdef DEBUG_KEYGEN 66#ifdef DEBUG_KEYGEN
67#include <bio.h> 67#include <openssl/bio.h>
68extern BIO *bio_err; 68extern BIO *bio_err;
69void h__dump (unsigned char *p, int len); 69void h__dump (unsigned char *p, int len);
70#endif 70#endif
@@ -104,13 +104,12 @@ int PKCS12_key_gen_uni (unsigned char *pass, int passlen, unsigned char *salt,
104#ifdef DEBUG_KEYGEN 104#ifdef DEBUG_KEYGEN
105 unsigned char *tmpout = out; 105 unsigned char *tmpout = out;
106 int tmpn = n; 106 int tmpn = n;
107 BIO_printf (bio_err, "KEYGEN DEBUG\n"); 107 fprintf(stderr, "KEYGEN DEBUG\n");
108 BIO_printf (bio_err, "ID %d, ITER %d\n", id, iter); 108 fprintf(stderr, "ID %d, ITER %d\n", id, iter);
109 BIO_printf (bio_err, "Password (length %d):\n", passlen); 109 fprintf(stderr, "Password (length %d):\n", passlen);
110 h__dump (pass, passlen); 110 h__dump(pass, passlen);
111 BIO_printf (bio_err, "Salt (length %d):\n", saltlen); 111 fprintf(stderr, "Salt (length %d):\n", saltlen);
112 h__dump (salt, saltlen); 112 h__dump(salt, saltlen);
113 BIO_printf (bio_err, "ID %d, ITER %d\n\n", id, iter);
114#endif 113#endif
115 v = EVP_MD_block_size (md_type); 114 v = EVP_MD_block_size (md_type);
116 u = EVP_MD_size (md_type); 115 u = EVP_MD_size (md_type);
@@ -150,8 +149,8 @@ int PKCS12_key_gen_uni (unsigned char *pass, int passlen, unsigned char *salt,
150 BN_free (Ij); 149 BN_free (Ij);
151 BN_free (Bpl1); 150 BN_free (Bpl1);
152#ifdef DEBUG_KEYGEN 151#ifdef DEBUG_KEYGEN
153 BIO_printf (bio_err, "Output KEY (length %d)\n", tmpn); 152 fprintf(stderr, "Output KEY (length %d)\n", tmpn);
154 h__dump (tmpout, tmpn); 153 h__dump(tmpout, tmpn);
155#endif 154#endif
156 return 1; 155 return 1;
157 } 156 }
@@ -176,7 +175,7 @@ int PKCS12_key_gen_uni (unsigned char *pass, int passlen, unsigned char *salt,
176#ifdef DEBUG_KEYGEN 175#ifdef DEBUG_KEYGEN
177void h__dump (unsigned char *p, int len) 176void h__dump (unsigned char *p, int len)
178{ 177{
179 for (; len --; p++) BIO_printf (bio_err, "%02X", *p); 178 for (; len --; p++) fprintf(stderr, "%02X", *p);
180 BIO_printf (bio_err, "\n"); 179 fprintf(stderr, "\n");
181} 180}
182#endif 181#endif