X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=apps%2Fs_server.c;h=e7c794c2a5ea5816c65faee5cc935ed7661f3f27;hb=36ac7bc8a9c856bcdff6eecdaca128ccc5430a1e;hp=6bd0257a7a7142fa690ec6b968fe540abf694882;hpb=9c3bcfa027cb32421ed20ab77553860b922b82fc;p=openssl.git diff --git a/apps/s_server.c b/apps/s_server.c index 6bd0257a7a..e7c794c2a5 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -139,7 +139,6 @@ * OTHERWISE. */ -#include #include #include #include @@ -950,7 +949,7 @@ OPTIONS s_server_options[] = { "Set the advertised protocols for the NPN extension (comma-separated list)"}, #endif #ifndef OPENSSL_NO_SRTP - {"use_srtp", OPT_SRTP_PROFILES, '<', + {"use_srtp", OPT_SRTP_PROFILES, 's', "Offer SRTP key management with a colon-separated profile list"}, {"alpn", OPT_ALPN, 's', "Set the advertised protocols for the ALPN extension (comma-separated list)"}, @@ -1872,6 +1871,14 @@ int s_server_main(int argc, char *argv[]) if (ctx2) SSL_CTX_set_client_CA_list(ctx2, SSL_load_client_CA_file(CAfile)); } + if (s_tlsextstatus) { + SSL_CTX_set_tlsext_status_cb(ctx, cert_status_cb); + SSL_CTX_set_tlsext_status_arg(ctx, &tlscstatp); + if (ctx2) { + SSL_CTX_set_tlsext_status_cb(ctx2, cert_status_cb); + SSL_CTX_set_tlsext_status_arg(ctx2, &tlscstatp); + } + } BIO_printf(bio_s_out, "ACCEPT\n"); (void)BIO_flush(bio_s_out); @@ -1990,10 +1997,6 @@ static int sv_body(char *hostname, int s, int stype, unsigned char *context) SSL_set_tlsext_debug_callback(con, tlsext_cb); SSL_set_tlsext_debug_arg(con, bio_s_out); } - if (s_tlsextstatus) { - SSL_CTX_set_tlsext_status_cb(ctx, cert_status_cb); - SSL_CTX_set_tlsext_status_arg(ctx, &tlscstatp); - } if (context && !SSL_set_session_id_context(con, @@ -2376,8 +2379,8 @@ static int init_ssl_connection(SSL *con) { while (i <= 0 && SSL_get_error(con, i) == SSL_ERROR_WANT_X509_LOOKUP && SSL_state(con) == SSL3_ST_SR_CLNT_HELLO_C) { - fprintf(stderr, - "LOOKUP from certificate callback during accept\n"); + BIO_printf(bio_err, + "LOOKUP from certificate callback during accept\n"); i = SSL_accept(con); } } @@ -2462,9 +2465,6 @@ static int init_ssl_connection(SSL *con) #endif if (SSL_cache_hit(con)) BIO_printf(bio_s_out, "Reused session-id\n"); - if (SSL_ctrl(con, SSL_CTRL_GET_FLAGS, 0, NULL) & - TLS1_FLAGS_TLS_PADDING_BUG) - BIO_printf(bio_s_out, "Peer has incorrect TLSv1 block padding\n"); BIO_printf(bio_s_out, "Secure Renegotiation IS%s supported\n", SSL_get_secure_renegotiation_support(con) ? "" : " NOT"); if (keymatexportlabel != NULL) { @@ -2811,10 +2811,10 @@ static int www_body(char *hostname, int s, int stype, unsigned char *context) #ifdef RENEG total_bytes += i; - fprintf(stderr, "%d\n", i); + BIO_printf(bio_err, "%d\n", i); if (total_bytes > 3 * 1024) { total_bytes = 0; - fprintf(stderr, "RENEGOTIATE\n"); + BIO_printf(bio_err, "RENEGOTIATE\n"); SSL_renegotiate(con); } #endif