]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/NetworkDefines.dsc.inc
NetworkPkg: Add NETWORK_HTTP_ENABLE macro
[mirror_edk2.git] / NetworkPkg / NetworkDefines.dsc.inc
index 18921d81f63b368951747234001db9f1e37e7943..54deb6342aaa89830292b65eedec067c07bf8343 100644 (file)
 #   DEFINE NETWORK_IP4_ENABLE             = TRUE\r
 #   DEFINE NETWORK_IP6_ENABLE             = TRUE\r
 #   DEFINE NETWORK_TLS_ENABLE             = TRUE\r
+#   DEFINE NETWORK_HTTP_ENABLE            = FALSE\r
 #   DEFINE NETWORK_HTTP_BOOT_ENABLE       = TRUE\r
 #   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE\r
 #   DEFINE NETWORK_ISCSI_ENABLE           = FALSE\r
 #   DEFINE NETWORK_VLAN_ENABLE            = TRUE\r
 #\r
 # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
+# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>\r
 #\r
 #    SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
   DEFINE NETWORK_TLS_ENABLE = TRUE\r
 !endif\r
 \r
+!ifndef NETWORK_HTTP_ENABLE\r
+  #\r
+  # This flag is to enable or disable HTTP(S) feature.\r
+  # The default is set to FALSE to not affecting the existing\r
+  # platforms.\r
+  # NETWORK_HTTP_ENABLE set to FALSE is not affecting NETWORK_HTTP_BOOT_ENABLE\r
+  # when NETWORK_HTTP_BOOT_ENABLE is TRUE.\r
+  DEFINE NETWORK_HTTP_ENABLE = FALSE\r
+!endif\r
+\r
 !ifndef NETWORK_HTTP_BOOT_ENABLE\r
   #\r
   # This flag is to enable or disable HTTP(S) boot feature.\r
   #\r
+  #\r
   DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE\r
 !endif\r
 \r
     !error "Must enable at least IP4 or IP6 stack if NETWORK_ENABLE is set to TRUE!"\r
   !endif\r
 \r
-  !if ($(NETWORK_HTTP_BOOT_ENABLE) == TRUE) AND ($(NETWORK_TLS_ENABLE) == FALSE) AND ($(NETWORK_ALLOW_HTTP_CONNECTIONS) == FALSE)\r
-    !error "Must enable TLS to support HTTPS, or allow unsecured HTTP connection, if NETWORK_HTTP_BOOT_ENABLE is set to TRUE!"\r
+  !if ($(NETWORK_HTTP_BOOT_ENABLE) == TRUE) OR ($(NETWORK_HTTP_ENABLE) == TRUE)\r
+    !if ($(NETWORK_TLS_ENABLE) == FALSE) AND ($(NETWORK_ALLOW_HTTP_CONNECTIONS) == FALSE)\r
+      !error "Must enable TLS to support HTTPS, or allow unsecured HTTP connection, if NETWORK_HTTP_BOOT_ENABLE or NETWORK_HTTP_ENABLE is set to TRUE!"\r
+    !endif\r
   !endif\r
 !endif\r