From d63a5e5e7d96f173e2bbf711e3f1f813bf0df05e Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Thu, 18 Feb 2016 11:33:21 -0500 Subject: Remove outdated DEBUG flags. Add -DBIO_DEBUG to --strict-warnings. Remove comments about outdated debugging ifdef guards. Remove md_rand ifdef guarding an assert; it doesn't seem used. Remove the conf guards in conf_api since we use OPENSSL_assert, not assert. For pkcs12 stuff put OPENSSL_ in front of the macro name. Merge TLS_DEBUG into SSL_DEBUG. Various things just turned on/off asserts, mainly for checking non-NULL arguments, which is now removed: camellia, bn_ctx, crypto/modes. Remove some old debug code, that basically just printed things to stderr: DEBUG_PRINT_UNKNOWN_CIPHERSUITES, DEBUG_ZLIB, OPENSSL_RI_DEBUG, RL_DEBUG, RSA_DEBUG, SCRYPT_DEBUG. Remove OPENSSL_SSL_DEBUG_BROKEN_PROTOCOL. Reviewed-by: Richard Levitte --- crypto/pkcs12/p12_decr.c | 4 ++-- crypto/pkcs12/p12_key.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'crypto/pkcs12') diff --git a/crypto/pkcs12/p12_decr.c b/crypto/pkcs12/p12_decr.c index 953d938..2a89a48 100644 --- a/crypto/pkcs12/p12_decr.c +++ b/crypto/pkcs12/p12_decr.c @@ -62,7 +62,7 @@ /* Define this to dump decrypted output to files called DERnnn */ /* - * #define DEBUG_DECRYPT + * #define OPENSSL_DEBUG_DECRYPT */ /* @@ -144,7 +144,7 @@ void *PKCS12_item_decrypt_d2i(X509_ALGOR *algor, const ASN1_ITEM *it, return NULL; } p = out; -#ifdef DEBUG_DECRYPT +#ifdef OPENSSL_DEBUG_DECRYPT { FILE *op; diff --git a/crypto/pkcs12/p12_key.c b/crypto/pkcs12/p12_key.c index 4256452..6a9a325 100644 --- a/crypto/pkcs12/p12_key.c +++ b/crypto/pkcs12/p12_key.c @@ -63,9 +63,9 @@ /* Uncomment out this line to get debugging info about key generation */ /* - * #define DEBUG_KEYGEN + * #define OPENSSL_DEBUG_KEYGEN */ -#ifdef DEBUG_KEYGEN +#ifdef OPENSSL_DEBUG_KEYGEN # include extern BIO *bio_err; void h__dump(unsigned char *p, int len); @@ -109,7 +109,7 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, int ret = 0; BIGNUM *Ij = NULL, *Bpl1 = NULL; /* These hold Ij and B + 1 */ EVP_MD_CTX *ctx = NULL; -#ifdef DEBUG_KEYGEN +#ifdef OPENSSL_DEBUG_KEYGEN unsigned char *tmpout = out; int tmpn = n; #endif @@ -118,7 +118,7 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, if (ctx == NULL) goto err; -#ifdef DEBUG_KEYGEN +#ifdef OPENSSL_DEBUG_KEYGEN fprintf(stderr, "KEYGEN DEBUG\n"); fprintf(stderr, "ID %d, ITER %d\n", id, iter); fprintf(stderr, "Password (length %d):\n", passlen); @@ -166,7 +166,7 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, } memcpy(out, Ai, min(n, u)); if (u >= n) { -#ifdef DEBUG_KEYGEN +#ifdef OPENSSL_DEBUG_KEYGEN fprintf(stderr, "Output KEY (length %d)\n", tmpn); h__dump(tmpout, tmpn); #endif @@ -221,7 +221,7 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, return ret; } -#ifdef DEBUG_KEYGEN +#ifdef OPENSSL_DEBUG_KEYGEN void h__dump(unsigned char *p, int len) { for (; len--; p++) -- cgit v1.1