Title: [239348] trunk/Source/WebKit
Revision
239348
Author
[email protected]
Date
2018-12-18 12:59:53 -0800 (Tue, 18 Dec 2018)

Log Message

HTTPS Upgrade: Scripts / preprocessing necessary to create new database in future
https://bugs.webkit.org/show_bug.cgi?id=192612
<rdar://problem/46651207>

Patch by Vivek Seth <[email protected]> on 2018-12-18
Reviewed by Andy Estes.

* Configurations/WebKit.xcconfig:
* DerivedSources.make:
* Scripts/generate-https-upgrade-database.sh: Added.
* WebKit.xcodeproj/project.pbxproj:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (239347 => 239348)


--- trunk/Source/WebKit/ChangeLog	2018-12-18 20:09:32 UTC (rev 239347)
+++ trunk/Source/WebKit/ChangeLog	2018-12-18 20:59:53 UTC (rev 239348)
@@ -1,3 +1,16 @@
+2018-12-18  Vivek Seth  <[email protected]>
+
+        HTTPS Upgrade: Scripts / preprocessing necessary to create new database in future
+        https://bugs.webkit.org/show_bug.cgi?id=192612
+        <rdar://problem/46651207>
+
+        Reviewed by Andy Estes.
+
+        * Configurations/WebKit.xcconfig:
+        * DerivedSources.make:
+        * Scripts/generate-https-upgrade-database.sh: Added.
+        * WebKit.xcodeproj/project.pbxproj:
+
 2018-12-18  Wenson Hsieh  <[email protected]>
 
         Unreviewed, fix the 32-bit watchOS build after r239314

Modified: trunk/Source/WebKit/Configurations/WebKit.xcconfig (239347 => 239348)


--- trunk/Source/WebKit/Configurations/WebKit.xcconfig	2018-12-18 20:09:32 UTC (rev 239347)
+++ trunk/Source/WebKit/Configurations/WebKit.xcconfig	2018-12-18 20:59:53 UTC (rev 239348)
@@ -151,9 +151,12 @@
 SECTORDER_FLAGS_Production[sdk=iphoneos*] = -Wl,-order_file,$(SDKROOT)/AppleInternal/OrderFiles/WebKit.order;
 SECTORDER_FLAGS_Production[sdk=macosx*] = -Wl,-order_file,mac/WebKit2.order;
 
-EXCLUDED_SOURCE_FILE_NAMES = Resources/ios/*;
-EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = PluginProcessShim.dylib SecItemShim.dylib WebProcessShim.dylib *.pdf Resources/mac/* com.apple.WebKit.NetworkProcess.sb com.apple.WebProcess.sb com.apple.WebKit.plugin-common.sb PlugInSandboxProfiles/*.sb;
+WK_EXCLUDED_HTTPS_UPGRADE_FILE = $(WK_EXCLUDED_HTTPS_UPGRADE_FILE_$(ENABLE_HTTPS_UPGRADE));
+WK_EXCLUDED_HTTPS_UPGRADE_FILE_ = HTTPSUpgradeList.db;
 
+EXCLUDED_SOURCE_FILE_NAMES = Resources/ios/* $(WK_EXCLUDED_HTTPS_UPGRADE_FILE);
+EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = PluginProcessShim.dylib SecItemShim.dylib WebProcessShim.dylib *.pdf Resources/mac/* com.apple.WebKit.NetworkProcess.sb com.apple.WebProcess.sb com.apple.WebKit.plugin-common.sb PlugInSandboxProfiles/*.sb $(WK_EXCLUDED_HTTPS_UPGRADE_FILE);
+
 INSTALLHDRS_SCRIPT_PHASE = YES;
 
 WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED[sdk=macosx*] = $(WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED$(WK_MACOS_1014));

Modified: trunk/Source/WebKit/DerivedSources.make (239347 => 239348)


--- trunk/Source/WebKit/DerivedSources.make	2018-12-18 20:09:32 UTC (rev 239347)
+++ trunk/Source/WebKit/DerivedSources.make	2018-12-18 20:59:53 UTC (rev 239348)
@@ -315,3 +315,9 @@
 
 $(WEB_PREFERENCES_PATTERNS) : $(WebKit2)/Scripts/GeneratePreferences.rb $(WEB_PREFERENCES_TEMPLATES) $(WEB_PREFERENCES_COMBINED_INPUT_FILE)
 	$(RUBY) $< --input $(WEB_PREFERENCES_COMBINED_INPUT_FILE)
+
+ifeq ($(ENABLE_HTTPS_UPGRADE),ENABLE_HTTPS_UPGRADE)
+all : HTTPSUpgradeList.db
+HTTPSUpgradeList.db : HTTPSUpgradeList.txt $(WebKit2)/Scripts/generate-https-upgrade-database.sh
+	sh $(WebKit2)/Scripts/generate-https-upgrade-database.sh $< $@
+endif # ENABLE_HTTPS_UPGRADE

Added: trunk/Source/WebKit/Scripts/generate-https-upgrade-database.sh (0 => 239348)


--- trunk/Source/WebKit/Scripts/generate-https-upgrade-database.sh	                        (rev 0)
+++ trunk/Source/WebKit/Scripts/generate-https-upgrade-database.sh	2018-12-18 20:59:53 UTC (rev 239348)
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# Copyright (C) 2018 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
+
+# This script requires that HTTPSUpgradeList.txt has the following format:
+#   1. It must be a plain text file with domains delimited by new lines ("\n").
+#   2. The file must not contain duplicate domains.
+#   3. All domains must be lowercase.
+#   4. All domains must be IDNA encoded.
+#
+# Usage:
+# $ sh ./generate-https-upgrade-database.sh <path to input list> <path to output database>
+
+set -e
+
+INPUT_FILE_PATH="${1}"
+OUTPUT_FILE_PATH="${2}"
+
+DB_VERSION="1";
+DB_SCHEMA="CREATE TABLE hosts (host TEXT PRIMARY KEY);"
+
+if [[ ! -f "${INPUT_FILE_PATH}" ]]; then
+    echo "Invalid input file" 1>&2;
+    exit 1
+fi
+
+if [[ -f "${OUTPUT_FILE_PATH}" ]]; then
+    rm "${OUTPUT_FILE_PATH}"
+fi
+
+sqlite3 "${OUTPUT_FILE_PATH}" "PRAGMA user_version=${DB_VERSION}" "${DB_SCHEMA}" ".import ${INPUT_FILE_PATH} hosts" ".exit"

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (239347 => 239348)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2018-12-18 20:09:32 UTC (rev 239347)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2018-12-18 20:59:53 UTC (rev 239348)
@@ -1037,6 +1037,7 @@
 		57DCEDC3214F114C0016B847 /* MockLocalService.h in Headers */ = {isa = PBXBuildFile; fileRef = 57DCEDC1214F114C0016B847 /* MockLocalService.h */; };
 		57DCEDC7214F18300016B847 /* MockLocalConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 57DCEDC5214F18300016B847 /* MockLocalConnection.h */; };
 		57DCEDCB214F4E420016B847 /* MockAuthenticatorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 57DCEDC9214F4E420016B847 /* MockAuthenticatorManager.h */; };
+		587743A621C30BBE00AE9084 /* HTTPSUpgradeList.db in Resources */ = {isa = PBXBuildFile; fileRef = 587743A421C30AD800AE9084 /* HTTPSUpgradeList.db */; };
 		5C0B17781E7C880E00E9123C /* NetworkSocketStreamMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C0B17741E7C879C00E9123C /* NetworkSocketStreamMessageReceiver.cpp */; };
 		5C0B17791E7C882100E9123C /* WebSocketStreamMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C0B17761E7C879C00E9123C /* WebSocketStreamMessageReceiver.cpp */; };
 		5C1426ED1C23F80900D41183 /* NetworkProcessCreationParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1426E31C23F80500D41183 /* NetworkProcessCreationParameters.h */; };
@@ -3401,6 +3402,7 @@
 		57DCEDC6214F18300016B847 /* MockLocalConnection.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MockLocalConnection.mm; sourceTree = "<group>"; };
 		57DCEDC9214F4E420016B847 /* MockAuthenticatorManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MockAuthenticatorManager.h; sourceTree = "<group>"; };
 		57DCEDCD214F51680016B847 /* MockAuthenticatorManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockAuthenticatorManager.cpp; sourceTree = "<group>"; };
+		587743A421C30AD800AE9084 /* HTTPSUpgradeList.db */ = {isa = PBXFileReference; lastKnownFileType = file; name = HTTPSUpgradeList.db; path = DerivedSources/WebKit2/HTTPSUpgradeList.db; sourceTree = BUILT_PRODUCTS_DIR; };
 		5C0B17741E7C879C00E9123C /* NetworkSocketStreamMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkSocketStreamMessageReceiver.cpp; path = DerivedSources/WebKit2/NetworkSocketStreamMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
 		5C0B17751E7C879C00E9123C /* NetworkSocketStreamMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkSocketStreamMessages.h; path = DerivedSources/WebKit2/NetworkSocketStreamMessages.h; sourceTree = BUILT_PRODUCTS_DIR; };
 		5C0B17761E7C879C00E9123C /* WebSocketStreamMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebSocketStreamMessageReceiver.cpp; path = DerivedSources/WebKit2/WebSocketStreamMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -8346,6 +8348,7 @@
 				1A64230712DD09EB00CAAE2C /* DrawingAreaProxyMessages.h */,
 				1AA575FF1496B7C000A4EE06 /* EventDispatcherMessageReceiver.cpp */,
 				1AA576001496B7C000A4EE06 /* EventDispatcherMessages.h */,
+				587743A421C30AD800AE9084 /* HTTPSUpgradeList.db */,
 				2984F586164BA095004BC0C6 /* LegacyCustomProtocolManagerMessageReceiver.cpp */,
 				2984F587164BA095004BC0C6 /* LegacyCustomProtocolManagerMessages.h */,
 				2984F57A164B915F004BC0C6 /* LegacyCustomProtocolManagerProxyMessageReceiver.cpp */,
@@ -10153,6 +10156,7 @@
 				E11D35AE16B63D1B006D23D7 /* com.apple.WebProcess.sb in Resources */,
 				414DD37920BF43F5006959FB /* com.cisco.webex.plugin.gpc64.sb in Resources */,
 				6BE969C11E54D452008B7483 /* corePrediction_model in Resources */,
+				587743A621C30BBE00AE9084 /* HTTPSUpgradeList.db in Resources */,
 				8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
 				3FB08E431F60B240005E5312 /* iOS.xcassets in Resources */,
 				93A2A3461D246125002B59D3 /* mediaIcon.pdf in Resources */,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to