tls-socket: Allow configuring both minimum and maximum TLS versions

This commit is contained in:
Tobias Brunner
2021-02-12 11:45:44 +01:00
parent c4576a1f57
commit a7f2818832
7 changed files with 18 additions and 14 deletions
+3 -2
View File
@@ -106,7 +106,7 @@ static int run_client(host_t *host, identification_t *server,
close(fd);
return 1;
}
tls = tls_socket_create(FALSE, server, client, fd, cache,
tls = tls_socket_create(FALSE, server, client, fd, cache, TLS_1_0,
TLS_1_3, TRUE);
if (!tls)
{
@@ -164,7 +164,8 @@ static int serve(host_t *host, identification_t *server,
}
DBG1(DBG_TLS, "%#H connected", host);
tls = tls_socket_create(TRUE, server, NULL, cfd, cache, TLS_1_2, TRUE);
tls = tls_socket_create(TRUE, server, NULL, cfd, cache, TLS_1_0,
TLS_1_2, TRUE);
if (!tls)
{
close(fd);