diff --git a/apps/ca.c b/apps/ca.c index a9171123c2bb45f89e3b7198218c90d319349f19..bcb3f50d8aa150eb8388bf74d5388c56a6be4a55 100644 --- a/apps/ca.c +++ b/apps/ca.c @@ -2171,18 +2171,6 @@ static void write_new_certificate(BIO *bp, X509 *x, int output_der, (void)i2d_X509_bio(bp, x); return; } -#if 0 - /* ??? Not needed since X509_print prints all this stuff anyway */ - f = X509_NAME_oneline(X509_get_issuer_name(x), buf, 256); - BIO_printf(bp, "issuer :%s\n", f); - - f = X509_NAME_oneline(X509_get_subject_name(x), buf, 256); - BIO_printf(bp, "subject:%s\n", f); - - BIO_puts(bp, "serial :"); - i2a_ASN1_INTEGER(bp, x->cert_info->serialNumber); - BIO_puts(bp, "\n\n"); -#endif if (!notext) X509_print(bp, x); PEM_write_bio_X509(bp, x); diff --git a/apps/engine.c b/apps/engine.c index 275d5999ed1400555532bb3b22eb30dc9af7ed5e..8a1e746ab604a6316cf8fce1763d2819c0231f97 100644 --- a/apps/engine.c +++ b/apps/engine.c @@ -196,9 +196,6 @@ static int util_verbose(ENGINE *e, int verbose, BIO *bio_out, if (!ENGINE_ctrl(e, ENGINE_CTRL_HAS_CTRL_FUNCTION, 0, NULL, NULL) || ((num = ENGINE_ctrl(e, ENGINE_CTRL_GET_FIRST_CMD_TYPE, 0, NULL, NULL)) <= 0)) { -# if 0 - BIO_printf(bio_out, "%s\n", indent); -# endif return 1; } diff --git a/apps/openssl.c b/apps/openssl.c index b19628571b09011d204d1ac5941abe78952be5b7..50c8275a4e58ac5aa1da9177351cdc4fc9f44cb0 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -301,12 +301,7 @@ int main(int Argc, char *ARGV[]) } CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); -#if 0 - if (getenv("OPENSSL_DEBUG_LOCKING") != NULL) -#endif - { - CRYPTO_set_locking_callback(lock_dbg_cb); - } + CRYPTO_set_locking_callback(lock_dbg_cb); if (getenv("OPENSSL_FIPS")) { #ifdef OPENSSL_FIPS diff --git a/apps/s_cb.c b/apps/s_cb.c index eb8994952591be4470df9cbabd283cc0fdb9ade6..eef86cb77b46c04feb8c9484857e38e7bc8ed607 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -812,10 +812,6 @@ void msg_cb(int write_p, int version, int content_type, const void *buf, BIO_printf(bio, " "); num = len; -#if 0 - if (num > 16) - num = 16; -#endif for (i = 0; i < num; i++) { if (i % 16 == 0 && i > 0) BIO_printf(bio, "\n "); diff --git a/apps/s_client.c b/apps/s_client.c index 0fb4771108c2406d5501adfc1b97e395d2540908..325dbf11b39dcb55dc6f6f327e4a5e005ef4296d 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -1326,10 +1326,6 @@ int MAIN(int argc, char **argv) if (state) SSL_CTX_set_info_callback(ctx, apps_ssl_info_callback); -#if 0 - else - SSL_CTX_set_cipher_list(ctx, getenv("SSL_CIPHER")); -#endif SSL_CTX_set_verify(ctx, verify, verify_callback); @@ -1508,17 +1504,6 @@ int MAIN(int argc, char **argv) SSL_set_tlsext_status_type(con, TLSEXT_STATUSTYPE_ocsp); SSL_CTX_set_tlsext_status_cb(ctx, ocsp_resp_cb); SSL_CTX_set_tlsext_status_arg(ctx, bio_c_out); -# if 0 - { - STACK_OF(OCSP_RESPID) *ids = sk_OCSP_RESPID_new_null(); - OCSP_RESPID *id = OCSP_RESPID_new(); - id->value.byKey = ASN1_OCTET_STRING_new(); - id->type = V_OCSP_RESPID_KEY; - ASN1_STRING_set(id->value.byKey, "Hello World", -1); - sk_OCSP_RESPID_push(ids, id); - SSL_set_tlsext_status_ids(con, ids); - } -# endif } #endif #ifndef OPENSSL_NO_JPAKE @@ -1667,16 +1652,6 @@ int MAIN(int argc, char **argv) tty_on = 1; if (in_init) { in_init = 0; -#if 0 /* This test doesn't really work as intended - * (needs to be fixed) */ -# ifndef OPENSSL_NO_TLSEXT - if (servername != NULL && !SSL_session_reused(con)) { - BIO_printf(bio_c_out, - "Server did %sacknowledge servername extension.\n", - tlsextcbp.ack ? "" : "not "); - } -# endif -#endif if (sess_out) { BIO *stmp = BIO_new_file(sess_out, "w"); if (stmp) { diff --git a/apps/s_server.c b/apps/s_server.c index e6ea350baf6c6b86e486ebf4efea7e2e6ae910de..5537fdea0f73824d8b5a86a652b85e061698563e 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -838,12 +838,6 @@ static int cert_status_cb(SSL *s, void *arg) STACK_OF(X509_EXTENSION) *exts; int ret = SSL_TLSEXT_ERR_NOACK; int i; -# if 0 - STACK_OF(OCSP_RESPID) *ids; - SSL_get_tlsext_status_ids(s, &ids); - BIO_printf(err, "cert_status: received %d ids\n", - sk_OCSP_RESPID_num(ids)); -# endif if (srctx->verbose) BIO_puts(err, "cert_status: callback called\n"); /* Build up OCSP query from server certificate */ @@ -1735,19 +1729,6 @@ int MAIN(int argc, char *argv[]) SSL_CTX_set_tlsext_use_srtp(ctx, srtp_profiles); #endif -#if 0 - if (cipher == NULL) - cipher = getenv("SSL_CIPHER"); -#endif - -#if 0 - if (s_cert_file == NULL) { - BIO_printf(bio_err, - "You must specify a certificate file for the server to use\n"); - goto end; - } -#endif - if ((!SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) || (!SSL_CTX_set_default_verify_paths(ctx))) { /* BIO_printf(bio_err,"X509_load_verify_locations\n"); */ @@ -2691,27 +2672,6 @@ static DH *load_dh_param(const char *dhfile) } #endif -#if 0 -static int load_CA(SSL_CTX *ctx, char *file) -{ - FILE *in; - X509 *x = NULL; - - if ((in = fopen(file, "r")) == NULL) - return (0); - - for (;;) { - if (PEM_read_X509(in, &x, NULL) == NULL) - break; - SSL_CTX_add_client_CA(ctx, x); - } - if (x != NULL) - X509_free(x); - fclose(in); - return (1); -} -#endif - static int www_body(char *hostname, int s, int stype, unsigned char *context) { char *buf = NULL; @@ -3010,21 +2970,12 @@ static int www_body(char *hostname, int s, int stype, unsigned char *context) BIO_printf(io, "'%s' is an invalid path\r\n", p); break; } -#if 0 - /* append if a directory lookup */ - if (e[-1] == '/') - strcat(p, "index.html"); -#endif /* if a directory, do the index thang */ if (app_isdir(p) > 0) { -#if 0 /* must check buffer size */ - strcat(p, "/index.html"); -#else BIO_puts(io, text); BIO_printf(io, "'%s' is a directory\r\n", p); break; -#endif } if ((file = BIO_new_file(p, "r")) == NULL) { diff --git a/apps/s_time.c b/apps/s_time.c index 972dccff2cba288d30eb2a223dac918854a686ca..102ee7291bb969319ffe18c7156e36129c398dd8 100644 --- a/apps/s_time.c +++ b/apps/s_time.c @@ -217,17 +217,6 @@ static int parseArgs(int argc, char **argv) goto bad; host = *(++argv); } -#if 0 - else if (strcmp(*argv, "-host") == 0) { - if (--argc < 1) - goto bad; - host = *(++argv); - } else if (strcmp(*argv, "-port") == 0) { - if (--argc < 1) - goto bad; - port = *(++argv); - } -#endif else if (strcmp(*argv, "-reuse") == 0) perform = 2; else if (strcmp(*argv, "-new") == 0) @@ -582,11 +571,6 @@ static SSL *doConnection(SSL *scon) SSL_set_bio(serverCon, conn, conn); -#if 0 - if (scon != NULL) - SSL_set_session(serverCon, SSL_get_session(scon)); -#endif - /* ok, lets connect */ for (;;) { i = SSL_connect(serverCon); diff --git a/apps/smime.c b/apps/smime.c index 05321a9356c6b08ede89b3fb9cae616eaac2e4c6..5efe51f7d7ce91d69b658fdc934bfec9a374a84d 100644 --- a/apps/smime.c +++ b/apps/smime.c @@ -511,11 +511,6 @@ int MAIN(int argc, char **argv) while (*args) { if (!(cert = load_cert(bio_err, *args, FORMAT_PEM, NULL, e, "recipient certificate file"))) { -#if 0 /* An appropriate message is already printed */ - BIO_printf(bio_err, - "Can't read recipient certificate file %s\n", - *args); -#endif goto end; } sk_X509_push(encerts, cert); diff --git a/apps/speed.c b/apps/speed.c index 419dced8078ccd4aadbeeb24d31d140fbdb3cff1..8dc9de9ce62991657151ae74c43271b259828791 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -874,12 +874,6 @@ int MAIN(int argc, char **argv) else #endif #ifndef OPENSSL_NO_RSA -# if 0 /* was: #ifdef RSAref */ - if (strcmp(*argv, "rsaref") == 0) { - RSA_set_default_openssl_method(RSA_PKCS1_RSAref()); - j--; - } else -# endif # ifndef RSA_NULL if (strcmp(*argv, "openssl") == 0) { RSA_set_default_method(RSA_PKCS1_SSLeay()); @@ -1273,16 +1267,6 @@ int MAIN(int argc, char **argv) i); goto end; } -# if 0 - else { - BIO_printf(bio_err, - mr ? "+RK:%d:" - : "Loaded RSA key, %d bit modulus and e= 0x", - BN_num_bits(rsa_key[i]->n)); - BN_print(bio_err, rsa_key[i]->e); - BIO_printf(bio_err, "\n"); - } -# endif } #endif