mirror of
https://github.com/openssl/openssl.git
synced 2025-04-12 20:30:52 +08:00
Force ssl/tls protocol flags to use stream sockets
Prior to this patch doing something like openssl s_client -dtls1 -tls1 ... could cause s_client to speak TLS on a UDP socket which does not normally make much sense. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12266)
This commit is contained in:
parent
64fdea12be
commit
2c9ba46c90
@ -1319,22 +1319,42 @@ int s_client_main(int argc, char **argv)
|
||||
case OPT_SSL3:
|
||||
min_version = SSL3_VERSION;
|
||||
max_version = SSL3_VERSION;
|
||||
socket_type = SOCK_STREAM;
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
isdtls = 0;
|
||||
#endif
|
||||
break;
|
||||
case OPT_TLS1_3:
|
||||
min_version = TLS1_3_VERSION;
|
||||
max_version = TLS1_3_VERSION;
|
||||
socket_type = SOCK_STREAM;
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
isdtls = 0;
|
||||
#endif
|
||||
break;
|
||||
case OPT_TLS1_2:
|
||||
min_version = TLS1_2_VERSION;
|
||||
max_version = TLS1_2_VERSION;
|
||||
socket_type = SOCK_STREAM;
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
isdtls = 0;
|
||||
#endif
|
||||
break;
|
||||
case OPT_TLS1_1:
|
||||
min_version = TLS1_1_VERSION;
|
||||
max_version = TLS1_1_VERSION;
|
||||
socket_type = SOCK_STREAM;
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
isdtls = 0;
|
||||
#endif
|
||||
break;
|
||||
case OPT_TLS1:
|
||||
min_version = TLS1_VERSION;
|
||||
max_version = TLS1_VERSION;
|
||||
socket_type = SOCK_STREAM;
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
isdtls = 0;
|
||||
#endif
|
||||
break;
|
||||
case OPT_DTLS:
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
|
Loading…
x
Reference in New Issue
Block a user