@ -360,6 +360,7 @@ static void sc_usage(void)
# if !defined(OPENSSL_NO_NEXTPROTONEG)
# if !defined(OPENSSL_NO_NEXTPROTONEG)
BIO_printf ( bio_err , " -nextprotoneg arg - enable NPN extension, considering named protocols supported (comma-separated list) \n " ) ;
BIO_printf ( bio_err , " -nextprotoneg arg - enable NPN extension, considering named protocols supported (comma-separated list) \n " ) ;
# endif
# endif
BIO_printf ( bio_err , " -cutthrough - enable 1-RTT full-handshake for strong ciphers \n " ) ;
# endif
# endif
BIO_printf ( bio_err , " -legacy_renegotiation - enable use of legacy renegotiation (dangerous) \n " ) ;
BIO_printf ( bio_err , " -legacy_renegotiation - enable use of legacy renegotiation (dangerous) \n " ) ;
BIO_printf ( bio_err , " -use_srtp profiles - Offer SRTP key management with a colon-separated profile list \n " ) ;
BIO_printf ( bio_err , " -use_srtp profiles - Offer SRTP key management with a colon-separated profile list \n " ) ;
@ -573,6 +574,7 @@ int MAIN(int argc, char **argv)
EVP_PKEY * key = NULL ;
EVP_PKEY * key = NULL ;
char * CApath = NULL , * CAfile = NULL , * cipher = NULL ;
char * CApath = NULL , * CAfile = NULL , * cipher = NULL ;
int reconnect = 0 , badop = 0 , verify = SSL_VERIFY_NONE , bugs = 0 ;
int reconnect = 0 , badop = 0 , verify = SSL_VERIFY_NONE , bugs = 0 ;
int cutthrough = 0 ;
int crlf = 0 ;
int crlf = 0 ;
int write_tty , read_tty , write_ssl , read_ssl , tty_on , ssl_pending ;
int write_tty , read_tty , write_ssl , read_ssl , tty_on , ssl_pending ;
SSL_CTX * ctx = NULL ;
SSL_CTX * ctx = NULL ;
@ -879,6 +881,8 @@ int MAIN(int argc, char **argv)
}
}
# endif
# endif
# endif
# endif
else if ( strcmp ( * argv , " -cutthrough " ) = = 0 )
cutthrough = 1 ;
else if ( strcmp ( * argv , " -serverpref " ) = = 0 )
else if ( strcmp ( * argv , " -serverpref " ) = = 0 )
off | = SSL_OP_CIPHER_SERVER_PREFERENCE ;
off | = SSL_OP_CIPHER_SERVER_PREFERENCE ;
else if ( strcmp ( * argv , " -legacy_renegotiation " ) = = 0 )
else if ( strcmp ( * argv , " -legacy_renegotiation " ) = = 0 )
@ -1145,6 +1149,15 @@ bad:
*/
*/
if ( socket_type = = SOCK_DGRAM ) SSL_CTX_set_read_ahead ( ctx , 1 ) ;
if ( socket_type = = SOCK_DGRAM ) SSL_CTX_set_read_ahead ( ctx , 1 ) ;
/* Enable handshake cutthrough for client connections using
* strong ciphers . */
if ( cutthrough )
{
int ssl_mode = SSL_CTX_get_mode ( ctx ) ;
ssl_mode | = SSL_MODE_HANDSHAKE_CUTTHROUGH ;
SSL_CTX_set_mode ( ctx , ssl_mode ) ;
}
# if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
# if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
if ( next_proto . data )
if ( next_proto . data )
SSL_CTX_set_next_proto_select_cb ( ctx , next_proto_cb , & next_proto ) ;
SSL_CTX_set_next_proto_select_cb ( ctx , next_proto_cb , & next_proto ) ;