diff --git a/src/cfg.c b/src/cfg.c index 563428e0..36582f7b 100644 --- a/src/cfg.c +++ b/src/cfg.c @@ -152,7 +152,9 @@ int get_tls_protocol_number(char *protocol){ { "TLSv1", TLS1_VERSION }, { "TLSv1.1", TLS1_1_VERSION }, { "TLSv1.2", TLS1_2_VERSION }, + #if OPENSSL_VERSION_NUMBER >= 0x10100000L { "TLSv1.3", TLS1_3_VERSION }, + #endif }; for(unsigned int i=0; inet.ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1|SSL_OP_NO_TLSv1_1); +#else if(SSL_CTX_set_min_proto_version(session->net.ctx, session->cfg->tls_min_version_number) == 0){ syslog(LOG_PRIORITY, "failed SSL_CTX_set_min_proto_version() to %s/%d", session->cfg->tls_min_version, session->cfg->tls_min_version_number); return 0; } +#endif if(SSL_CTX_set_cipher_list(session->net.ctx, session->cfg->cipher_list) == 0){ syslog(LOG_PRIORITY, "failed to set cipher list: '%s'", session->cfg->cipher_list);