From 5ca6e8aa8ac2a7f79cfa93ef9a29f39abfc28d80 Mon Sep 17 00:00:00 2001 From: tedu <> Date: Wed, 9 Jul 2014 21:10:06 +0000 Subject: firebomb some MDEBUG leftovers --- src/lib/libssl/src/apps/pkcs12.c | 88 +--------------------------------------- 1 file changed, 1 insertion(+), 87 deletions(-) (limited to 'src') diff --git a/src/lib/libssl/src/apps/pkcs12.c b/src/lib/libssl/src/apps/pkcs12.c index cbe25edb20..0e4bfbd895 100644 --- a/src/lib/libssl/src/apps/pkcs12.c +++ b/src/lib/libssl/src/apps/pkcs12.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkcs12.c,v 1.35 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: pkcs12.c,v 1.36 2014/07/09 21:10:06 tedu Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -391,9 +391,6 @@ pkcs12_main(int argc, char **argv) ERR_load_crypto_strings(); -#ifdef CRYPTO_MDEBUG - CRYPTO_push_info("read files"); -#endif if (!infile) in = BIO_new_fp(stdin, BIO_NOCLOSE); @@ -405,10 +402,6 @@ pkcs12_main(int argc, char **argv) perror(infile); goto end; } -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); - CRYPTO_push_info("write files"); -#endif if (!outfile) { out = BIO_new_fp(stdout, BIO_NOCLOSE); @@ -421,16 +414,10 @@ pkcs12_main(int argc, char **argv) goto end; } if (twopass) { -#ifdef CRYPTO_MDEBUG - CRYPTO_push_info("read MAC password"); -#endif if (EVP_read_pw_string(macpass, sizeof macpass, "Enter MAC Password:", export_cert)) { BIO_printf(bio_err, "Can't read Password\n"); goto end; } -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); -#endif } if (export_cert) { EVP_PKEY *key = NULL; @@ -447,20 +434,12 @@ pkcs12_main(int argc, char **argv) if (options & NOCERTS) chain = 0; -#ifdef CRYPTO_MDEBUG - CRYPTO_push_info("process -export_cert"); - CRYPTO_push_info("reading private key"); -#endif if (!(options & NOKEYS)) { key = load_key(bio_err, keyname ? keyname : infile, FORMAT_PEM, 1, passin, e, "private key"); if (!key) goto export_end; } -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); - CRYPTO_push_info("reading certs from input"); -#endif /* Load in all certs in input file */ if (!(options & NOCERTS)) { @@ -489,10 +468,6 @@ pkcs12_main(int argc, char **argv) } } } -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); - CRYPTO_push_info("reading certs from input 2"); -#endif /* Add any more certificates asked for */ if (certfile) { @@ -505,15 +480,7 @@ pkcs12_main(int argc, char **argv) sk_X509_push(certs, sk_X509_shift(morecerts)); sk_X509_free(morecerts); } -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); - CRYPTO_push_info("reading certs from certfile"); -#endif -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); - CRYPTO_push_info("building chain"); -#endif /* If chaining get chain from user cert */ if (chain) { @@ -560,10 +527,6 @@ pkcs12_main(int argc, char **argv) if (add_lmk && key) EVP_PKEY_add1_attr_by_NID(key, NID_LocalKeySet, 0, NULL, -1); -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); - CRYPTO_push_info("reading password"); -#endif if (!noprompt && EVP_read_pw_string(pass, sizeof pass, "Enter Export Password:", 1)) { @@ -573,10 +536,6 @@ pkcs12_main(int argc, char **argv) if (!twopass) strlcpy(macpass, pass, sizeof macpass); -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); - CRYPTO_push_info("creating PKCS#12 structure"); -#endif p12 = PKCS12_create(cpass, name, key, ucert, certs, key_pbe, cert_pbe, iter, -1, keytype); @@ -595,21 +554,12 @@ pkcs12_main(int argc, char **argv) if (maciter != -1) PKCS12_set_mac(p12, mpass, -1, NULL, 0, maciter, macmd); -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); - CRYPTO_push_info("writing pkcs12"); -#endif i2d_PKCS12_bio(out, p12); ret = 0; export_end: -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); - CRYPTO_pop_info(); - CRYPTO_push_info("process -export_cert: freeing"); -#endif if (key) EVP_PKEY_free(key); @@ -618,9 +568,6 @@ export_end: if (ucert) X509_free(ucert); -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); -#endif goto end; } @@ -628,16 +575,10 @@ export_end: ERR_print_errors(bio_err); goto end; } -#ifdef CRYPTO_MDEBUG - CRYPTO_push_info("read import password"); -#endif if (!noprompt && EVP_read_pw_string(pass, sizeof pass, "Enter Import Password:", 0)) { BIO_printf(bio_err, "Can't read Password\n"); goto end; } -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); -#endif if (!twopass) strlcpy(macpass, pass, sizeof macpass); @@ -645,9 +586,6 @@ export_end: if ((options & INFO) && p12->mac) BIO_printf(bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get(p12->mac->iter) : 1); if (macver) { -#ifdef CRYPTO_MDEBUG - CRYPTO_push_info("verify MAC"); -#endif /* If we enter empty password try no password first */ if (!mpass[0] && PKCS12_verify_mac(p12, NULL, 0)) { /* If mac and crypto pass the same set it to NULL too */ @@ -659,28 +597,16 @@ export_end: goto end; } BIO_printf(bio_err, "MAC verified OK\n"); -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); -#endif } -#ifdef CRYPTO_MDEBUG - CRYPTO_push_info("output keys and certificates"); -#endif if (!dump_certs_keys_p12(out, p12, cpass, -1, options, passout)) { BIO_printf(bio_err, "Error outputting keys and certificates\n"); ERR_print_errors(bio_err); goto end; } -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); -#endif ret = 0; end: if (p12) PKCS12_free(p12); -#ifdef CRYPTO_MDEBUG - CRYPTO_remove_all_info(); -#endif BIO_free(in); BIO_free_all(out); if (canames) @@ -893,22 +819,10 @@ cert_load(BIO * in, STACK_OF(X509) * sk) int ret; X509 *cert; ret = 0; -#ifdef CRYPTO_MDEBUG - CRYPTO_push_info("cert_load(): reading one cert"); -#endif while ((cert = PEM_read_bio_X509(in, NULL, NULL, NULL))) { -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); -#endif ret = 1; sk_X509_push(sk, cert); -#ifdef CRYPTO_MDEBUG - CRYPTO_push_info("cert_load(): reading one cert"); -#endif } -#ifdef CRYPTO_MDEBUG - CRYPTO_pop_info(); -#endif if (ret) ERR_clear_error(); return ret; -- cgit v1.2.3-55-g6feb