summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-03-17 09:13:39 +0000
committerNick White <git@njw.name>2020-03-17 09:13:39 +0000
commitf89fb6e4cd9b33fb27bd50b90d160b7644fdd480 (patch)
tree9e1ada75d4d4d550ac071f669602c6b6ba24a14c
parent6e989a0f7491290ca3b24c39e3b65aecdd082721 (diff)
Update libssl usage to avoid using deprecated TLSv1_2_client_method
-rw-r--r--util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/util.c b/util.c
index d672c9e..b7b7693 100644
--- a/util.c
+++ b/util.c
@@ -58,7 +58,10 @@ conn *dial(char *host, char *port, int ssl)
if(ssl) {
SSL_load_error_strings();
SSL_library_init();
- if((sslcontext = SSL_CTX_new(TLSv1_2_client_method())) == NULL) {
+ if((sslcontext = SSL_CTX_new(TLS_client_method())) == NULL) {
+ ERR_print_errors_fp(stderr);
+ }
+ if(SSL_CTX_set_min_proto_version(sslcontext, TLS1_2_VERSION) != 1) {
ERR_print_errors_fp(stderr);
}
if((c->sslhandle = SSL_new(sslcontext)) == NULL) {