Loading apps/s_client.c +0 −10 Original line number Diff line number Diff line Loading @@ -1872,17 +1872,7 @@ int MAIN(int argc, char **argv) } } #endif #if 1 k = SSL_read(con, sbuf, 1024 /* BUFSIZZ */ ); #else /* Demo for pending and peek :-) */ k = SSL_read(con, sbuf, 16); { char zbuf[10240]; printf("read=%d pending=%d peek=%d\n", k, SSL_pending(con), SSL_peek(con, zbuf, 10240)); } #endif switch (SSL_get_error(con, k)) { case SSL_ERROR_NONE: Loading apps/s_server.c +0 −38 Original line number Diff line number Diff line Loading @@ -1878,7 +1878,6 @@ int MAIN(int argc, char *argv[]) goto end; } #ifndef OPENSSL_NO_RSA # if 1 if (!no_tmp_rsa) { SSL_CTX_set_tmp_rsa_callback(ctx, tmp_rsa_cb); # ifndef OPENSSL_NO_TLSEXT Loading @@ -1886,31 +1885,6 @@ int MAIN(int argc, char *argv[]) SSL_CTX_set_tmp_rsa_callback(ctx2, tmp_rsa_cb); # endif } # else if (!no_tmp_rsa && SSL_CTX_need_tmp_RSA(ctx)) { RSA *rsa; BIO_printf(bio_s_out, "Generating temp (512 bit) RSA key..."); BIO_flush(bio_s_out); rsa = RSA_generate_key(512, RSA_F4, NULL); if (!SSL_CTX_set_tmp_rsa(ctx, rsa)) { ERR_print_errors(bio_err); goto end; } # ifndef OPENSSL_NO_TLSEXT if (ctx2) { if (!SSL_CTX_set_tmp_rsa(ctx2, rsa)) { ERR_print_errors(bio_err); goto end; } } # endif RSA_free(rsa); BIO_printf(bio_s_out, "\n"); } # endif #endif if (no_resume_ephemeral) { Loading Loading @@ -2488,11 +2462,7 @@ static int sv_body(char *hostname, int s, int stype, unsigned char *context) err: if (con != NULL) { BIO_printf(bio_s_out, "shutting down SSL\n"); #if 1 SSL_set_shutdown(con, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); #else SSL_shutdown(con); #endif SSL_free(con); } BIO_printf(bio_s_out, "CONNECTION CLOSED\n"); Loading Loading @@ -3051,16 +3021,8 @@ static int www_body(char *hostname, int s, int stype, unsigned char *context) break; } end: #if 1 /* make sure we re-use sessions */ SSL_set_shutdown(con, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); #else /* This kills performance */ /* * SSL_shutdown(con); A shutdown gets sent in the BIO_free_all(io) * procession */ #endif err: Loading apps/speed.c +1 −4 Original line number Diff line number Diff line Loading @@ -2028,7 +2028,6 @@ int MAIN(int argc, char **argv) rsa_count = count; } # if 1 ret = RSA_verify(NID_md5_sha1, buf, 36, buf2, rsa_num, rsa_key[j]); if (ret <= 0) { BIO_printf(bio_err, Loading Loading @@ -2056,7 +2055,6 @@ int MAIN(int argc, char **argv) count, rsa_bits[j], d); rsa_results[j][1] = d / (double)count; } # endif if (rsa_count <= 1) { /* if longer than 10s, don't do any more */ Loading Loading @@ -2162,9 +2160,8 @@ int MAIN(int argc, char **argv) ERR_print_errors(bio_err); rsa_count = 1; } else { # if 1 EC_KEY_precompute_mult(ecdsa[j], NULL); # endif /* Perform ECDSA signature test */ EC_KEY_generate_key(ecdsa[j]); ret = ECDSA_sign(0, buf, 20, ecdsasig, &ecdsasiglen, ecdsa[j]); Loading apps/x509.c +0 −7 Original line number Diff line number Diff line Loading @@ -469,13 +469,6 @@ int MAIN(int argc, char **argv) CA_createserial = ++num; else if (strcmp(*argv, "-clrext") == 0) clrext = 1; #if 1 /* stay backwards-compatible with 0.9.5; this * should go away soon */ else if (strcmp(*argv, "-crlext") == 0) { BIO_printf(bio_err, "use -clrext instead of -crlext\n"); clrext = 1; } #endif else if (strcmp(*argv, "-ocspid") == 0) ocspid = ++num; else if (strcmp(*argv, "-badsig") == 0) Loading crypto/bio/bf_nbio.c +2 −10 Original line number Diff line number Diff line Loading @@ -127,10 +127,8 @@ static int nbiof_free(BIO *a) static int nbiof_read(BIO *b, char *out, int outl) { int ret = 0; #if 1 int num; unsigned char n; #endif if (out == NULL) return (0); Loading @@ -138,7 +136,6 @@ static int nbiof_read(BIO *b, char *out, int outl) return (0); BIO_clear_retry_flags(b); #if 1 RAND_pseudo_bytes(&n, 1); num = (n & 0x07); Loading @@ -148,9 +145,7 @@ static int nbiof_read(BIO *b, char *out, int outl) if (num == 0) { ret = -1; BIO_set_retry_read(b); } else #endif { } else { ret = BIO_read(b->next_bio, out, outl); if (ret < 0) BIO_copy_next_retry(b); Loading @@ -173,7 +168,6 @@ static int nbiof_write(BIO *b, const char *in, int inl) BIO_clear_retry_flags(b); #if 1 if (nt->lwn > 0) { num = nt->lwn; nt->lwn = 0; Loading @@ -188,9 +182,7 @@ static int nbiof_write(BIO *b, const char *in, int inl) if (num == 0) { ret = -1; BIO_set_retry_write(b); } else #endif { } else { ret = BIO_write(b->next_bio, in, inl); if (ret < 0) { BIO_copy_next_retry(b); Loading Loading
apps/s_client.c +0 −10 Original line number Diff line number Diff line Loading @@ -1872,17 +1872,7 @@ int MAIN(int argc, char **argv) } } #endif #if 1 k = SSL_read(con, sbuf, 1024 /* BUFSIZZ */ ); #else /* Demo for pending and peek :-) */ k = SSL_read(con, sbuf, 16); { char zbuf[10240]; printf("read=%d pending=%d peek=%d\n", k, SSL_pending(con), SSL_peek(con, zbuf, 10240)); } #endif switch (SSL_get_error(con, k)) { case SSL_ERROR_NONE: Loading
apps/s_server.c +0 −38 Original line number Diff line number Diff line Loading @@ -1878,7 +1878,6 @@ int MAIN(int argc, char *argv[]) goto end; } #ifndef OPENSSL_NO_RSA # if 1 if (!no_tmp_rsa) { SSL_CTX_set_tmp_rsa_callback(ctx, tmp_rsa_cb); # ifndef OPENSSL_NO_TLSEXT Loading @@ -1886,31 +1885,6 @@ int MAIN(int argc, char *argv[]) SSL_CTX_set_tmp_rsa_callback(ctx2, tmp_rsa_cb); # endif } # else if (!no_tmp_rsa && SSL_CTX_need_tmp_RSA(ctx)) { RSA *rsa; BIO_printf(bio_s_out, "Generating temp (512 bit) RSA key..."); BIO_flush(bio_s_out); rsa = RSA_generate_key(512, RSA_F4, NULL); if (!SSL_CTX_set_tmp_rsa(ctx, rsa)) { ERR_print_errors(bio_err); goto end; } # ifndef OPENSSL_NO_TLSEXT if (ctx2) { if (!SSL_CTX_set_tmp_rsa(ctx2, rsa)) { ERR_print_errors(bio_err); goto end; } } # endif RSA_free(rsa); BIO_printf(bio_s_out, "\n"); } # endif #endif if (no_resume_ephemeral) { Loading Loading @@ -2488,11 +2462,7 @@ static int sv_body(char *hostname, int s, int stype, unsigned char *context) err: if (con != NULL) { BIO_printf(bio_s_out, "shutting down SSL\n"); #if 1 SSL_set_shutdown(con, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); #else SSL_shutdown(con); #endif SSL_free(con); } BIO_printf(bio_s_out, "CONNECTION CLOSED\n"); Loading Loading @@ -3051,16 +3021,8 @@ static int www_body(char *hostname, int s, int stype, unsigned char *context) break; } end: #if 1 /* make sure we re-use sessions */ SSL_set_shutdown(con, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); #else /* This kills performance */ /* * SSL_shutdown(con); A shutdown gets sent in the BIO_free_all(io) * procession */ #endif err: Loading
apps/speed.c +1 −4 Original line number Diff line number Diff line Loading @@ -2028,7 +2028,6 @@ int MAIN(int argc, char **argv) rsa_count = count; } # if 1 ret = RSA_verify(NID_md5_sha1, buf, 36, buf2, rsa_num, rsa_key[j]); if (ret <= 0) { BIO_printf(bio_err, Loading Loading @@ -2056,7 +2055,6 @@ int MAIN(int argc, char **argv) count, rsa_bits[j], d); rsa_results[j][1] = d / (double)count; } # endif if (rsa_count <= 1) { /* if longer than 10s, don't do any more */ Loading Loading @@ -2162,9 +2160,8 @@ int MAIN(int argc, char **argv) ERR_print_errors(bio_err); rsa_count = 1; } else { # if 1 EC_KEY_precompute_mult(ecdsa[j], NULL); # endif /* Perform ECDSA signature test */ EC_KEY_generate_key(ecdsa[j]); ret = ECDSA_sign(0, buf, 20, ecdsasig, &ecdsasiglen, ecdsa[j]); Loading
apps/x509.c +0 −7 Original line number Diff line number Diff line Loading @@ -469,13 +469,6 @@ int MAIN(int argc, char **argv) CA_createserial = ++num; else if (strcmp(*argv, "-clrext") == 0) clrext = 1; #if 1 /* stay backwards-compatible with 0.9.5; this * should go away soon */ else if (strcmp(*argv, "-crlext") == 0) { BIO_printf(bio_err, "use -clrext instead of -crlext\n"); clrext = 1; } #endif else if (strcmp(*argv, "-ocspid") == 0) ocspid = ++num; else if (strcmp(*argv, "-badsig") == 0) Loading
crypto/bio/bf_nbio.c +2 −10 Original line number Diff line number Diff line Loading @@ -127,10 +127,8 @@ static int nbiof_free(BIO *a) static int nbiof_read(BIO *b, char *out, int outl) { int ret = 0; #if 1 int num; unsigned char n; #endif if (out == NULL) return (0); Loading @@ -138,7 +136,6 @@ static int nbiof_read(BIO *b, char *out, int outl) return (0); BIO_clear_retry_flags(b); #if 1 RAND_pseudo_bytes(&n, 1); num = (n & 0x07); Loading @@ -148,9 +145,7 @@ static int nbiof_read(BIO *b, char *out, int outl) if (num == 0) { ret = -1; BIO_set_retry_read(b); } else #endif { } else { ret = BIO_read(b->next_bio, out, outl); if (ret < 0) BIO_copy_next_retry(b); Loading @@ -173,7 +168,6 @@ static int nbiof_write(BIO *b, const char *in, int inl) BIO_clear_retry_flags(b); #if 1 if (nt->lwn > 0) { num = nt->lwn; nt->lwn = 0; Loading @@ -188,9 +182,7 @@ static int nbiof_write(BIO *b, const char *in, int inl) if (num == 0) { ret = -1; BIO_set_retry_write(b); } else #endif { } else { ret = BIO_write(b->next_bio, in, inl); if (ret < 0) { BIO_copy_next_retry(b); Loading