@@ -341,6 +341,7 @@ static void sc_usage(void)
341341 BIO_printf (bio_err ," -tls1_1 - just use TLSv1.1\n" );
342342 BIO_printf (bio_err ," -tls1 - just use TLSv1\n" );
343343 BIO_printf (bio_err ," -dtls1 - just use DTLSv1\n" );
344+ BIO_printf (bio_err ," -fallback_scsv - send TLS_FALLBACK_SCSV\n" );
344345 BIO_printf (bio_err ," -mtu - set the link layer MTU\n" );
345346 BIO_printf (bio_err ," -no_tls1_2/-no_tls1_1/-no_tls1/-no_ssl3/-no_ssl2 - turn off that protocol\n" );
346347 BIO_printf (bio_err ," -bugs - Switch on all SSL implementation bug workarounds\n" );
@@ -650,6 +651,7 @@ int MAIN(int argc, char **argv)
650651 char * sess_out = NULL ;
651652 struct sockaddr peer ;
652653 int peerlen = sizeof (peer );
654+ int fallback_scsv = 0 ;
653655 int enable_timeouts = 0 ;
654656 long socket_mtu = 0 ;
655657#ifndef OPENSSL_NO_JPAKE
@@ -940,6 +942,10 @@ static char *jpake_secret = NULL;
940942 meth = DTLSv1_2_client_method ();
941943 socket_type = SOCK_DGRAM ;
942944 }
945+ else if (strcmp (* argv ,"- fallback_scsv ") == 0 )
946+ {
947+ fallback_scsv = 1 ;
948+ }
943949 else if (strcmp (* argv ,"- timeout ") == 0 )
944950 enable_timeouts = 1 ;
945951 else if (strcmp (* argv ,"- mtu ") == 0 )
@@ -1439,6 +1445,10 @@ static char *jpake_secret = NULL;
14391445 SSL_set_session (con , sess );
14401446 SSL_SESSION_free (sess );
14411447 }
1448+
1449+ if (fallback_scsv )
1450+ SSL_set_mode (con , SSL_MODE_SEND_FALLBACK_SCSV );
1451+
14421452#ifndef OPENSSL_NO_TLSEXT
14431453 if (servername != NULL )
14441454 {
0 commit comments