summaryrefslogtreecommitdiff
path: root/main/openssl/apps
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-10-28 23:07:58 +0100
committerArne Schwabe <arne@rfc2549.org>2014-10-28 23:07:58 +0100
commit192f5b50e32ed14945317325a5465f40abfcc587 (patch)
treec58aa6ba75e3c0acaa4f9d91ab62efecf8d838bc /main/openssl/apps
parent22feeb602f32f1d58f4aa5168b5fc139e086e85d (diff)
Update Openssl to aosp/master (includes useless (for OpenVPN)) SSLv3 Fallback fix
--HG-- extra : rebase_source : 4ec3b7a7844aa1ca198c4538ecdf28f027ceb1b1
Diffstat (limited to 'main/openssl/apps')
-rw-r--r--main/openssl/apps/s_client.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/main/openssl/apps/s_client.c b/main/openssl/apps/s_client.c
index 0c705803..299facdc 100644
--- a/main/openssl/apps/s_client.c
+++ b/main/openssl/apps/s_client.c
@@ -335,6 +335,7 @@ static void sc_usage(void)
BIO_printf(bio_err," -tls1_1 - just use TLSv1.1\n");
BIO_printf(bio_err," -tls1 - just use TLSv1\n");
BIO_printf(bio_err," -dtls1 - just use DTLSv1\n");
+ BIO_printf(bio_err," -fallback_scsv - send TLS_FALLBACK_SCSV\n");
BIO_printf(bio_err," -mtu - set the link layer MTU\n");
BIO_printf(bio_err," -no_tls1_2/-no_tls1_1/-no_tls1/-no_ssl3/-no_ssl2 - turn off that protocol\n");
BIO_printf(bio_err," -bugs - Switch on all SSL implementation bug workarounds\n");
@@ -621,6 +622,7 @@ int MAIN(int argc, char **argv)
char *sess_out = NULL;
struct sockaddr peer;
int peerlen = sizeof(peer);
+ int fallback_scsv = 0;
int enable_timeouts = 0 ;
long socket_mtu = 0;
#ifndef OPENSSL_NO_JPAKE
@@ -827,6 +829,10 @@ int MAIN(int argc, char **argv)
meth=DTLSv1_client_method();
socket_type=SOCK_DGRAM;
}
+ else if (strcmp(*argv,"-fallback_scsv") == 0)
+ {
+ fallback_scsv = 1;
+ }
else if (strcmp(*argv,"-timeout") == 0)
enable_timeouts=1;
else if (strcmp(*argv,"-mtu") == 0)
@@ -1273,6 +1279,10 @@ bad:
SSL_set_session(con, sess);
SSL_SESSION_free(sess);
}
+
+ if (fallback_scsv)
+ SSL_set_mode(con, SSL_MODE_SEND_FALLBACK_SCSV);
+
#ifndef OPENSSL_NO_TLSEXT
if (servername != NULL)
{