summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {