diff options
-rw-r--r-- | util.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) { |