cmake: add a possibility to set library version
[project/ustream-ssl.git] / ustream-openssl.c
index 9b4ac6c8089449e63ded2cd1410c1cfef15616a7..894dddb5afb1de7183284f7018243a1aeea581f6 100644 (file)
@@ -247,8 +247,6 @@ static void ustream_ssl_error(struct ustream_ssl *us, int ret)
        uloop_timeout_set(&us->error_timer, 0);
 }
 
-#ifndef NO_X509_CHECK_HOST
-
 static bool ustream_ssl_verify_cn(struct ustream_ssl *us, X509 *cert)
 {
        int ret;
@@ -264,8 +262,6 @@ static bool ustream_ssl_verify_cn(struct ustream_ssl *us, X509 *cert)
        return ret == 1;
 }
 
-#endif
-
 static void ustream_ssl_verify_cert(struct ustream_ssl *us)
 {
        void *ssl = us->ssl;
@@ -284,9 +280,8 @@ static void ustream_ssl_verify_cert(struct ustream_ssl *us)
                return;
 
        us->valid_cert = true;
-#ifndef NO_X509_CHECK_HOST
        us->valid_cn = ustream_ssl_verify_cn(us, cert);
-#endif
+
        X509_free(cert);
 }
 
@@ -313,7 +308,9 @@ static bool handle_wolfssl_asn_error(struct ustream_ssl *us, int r)
        case ASN_SIG_HASH_E:
        case ASN_SIG_KEY_E:
        case ASN_DH_KEY_E:
+#if LIBWOLFSSL_VERSION_HEX < 0x05000000
        case ASN_NTRU_KEY_E:
+#endif
        case ASN_CRIT_EXT_E:
        case ASN_ALT_NAME_E:
        case ASN_NO_PEM_HEADER: