Remove OPENSSL_NO_SHA guards
[openssl.git] / ssl / t1_ext.c
index eb7d8a74b20f41c0b063029c0aaff910f55e4a53..3bbe1fd82697560e96c76286f996ae4d87951ce0 100644 (file)
@@ -54,9 +54,7 @@
 
 /* Custom extension utility functions */
 
-#ifndef OPENSSL_NO_CT
-# include <openssl/ct.h>
-#endif
+#include <openssl/ct.h>
 #include "ssl_locl.h"
 
 
@@ -262,12 +260,6 @@ int SSL_CTX_add_client_custom_ext(SSL_CTX *ctx, unsigned int ext_type,
                                   custom_ext_parse_cb parse_cb,
                                   void *parse_arg)
 {
-    int ret = custom_ext_meth_add(&ctx->cert->cli_ext, ext_type, add_cb,
-                                  free_cb, add_arg, parse_cb, parse_arg);
-
-    if (ret != 1)
-        goto end;
-
 #ifndef OPENSSL_NO_CT
     /*
      * We don't want applications registering callbacks for SCT extensions
@@ -275,12 +267,11 @@ int SSL_CTX_add_client_custom_ext(SSL_CTX *ctx, unsigned int ext_type,
      * these two things may not play well together.
      */
     if (ext_type == TLSEXT_TYPE_signed_certificate_timestamp &&
-        SSL_CTX_get_ct_validation_callback(ctx) != NULL) {
-        ret = 0;
-    }
+        SSL_CTX_ct_is_enabled(ctx))
+        return 0;
 #endif
-end:
-    return ret;
+    return custom_ext_meth_add(&ctx->cert->cli_ext, ext_type, add_cb,
+                               free_cb, add_arg, parse_cb, parse_arg);
 }
 
 int SSL_CTX_add_server_custom_ext(SSL_CTX *ctx, unsigned int ext_type,
@@ -302,7 +293,9 @@ int SSL_extension_supported(unsigned int ext_type)
     case TLSEXT_TYPE_ec_point_formats:
     case TLSEXT_TYPE_elliptic_curves:
     case TLSEXT_TYPE_heartbeat:
+#ifndef OPENSSL_NO_NEXTPROTONEG
     case TLSEXT_TYPE_next_proto_neg:
+#endif
     case TLSEXT_TYPE_padding:
     case TLSEXT_TYPE_renegotiate:
     case TLSEXT_TYPE_server_name: