diff --git a/getxbook/util.c b/getxbook/util.c index d672c9e..5fbb77d 100644 --- getxbook/util.c +++ getxbook/util.c @@ -58,7 +58,12 @@ 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 (OPENSSL_VERSION_NUMBER < 0x10100000L) + sslcontext = SSL_CTX_new(TLSv1_2_client_method()); +#else + sslcontext = SSL_CTX_new(TLS_client_method()); +#endif + if(sslcontext == NULL) { ERR_print_errors_fp(stderr); } if((c->sslhandle = SSL_new(sslcontext)) == NULL) {