@@ -0,0 +1,160 @@
1+Fix build against 10.10 SDK
2+
3+The SecKey part perhaps could be fixed by implementing a revert to
4+https://chromium.googlesource.com/chromium/src.git/+/8418e098b9cbedf884878b61dcd3292c515845cf%5E%21/#F0
5+
6+--- a/src/3rdparty/chromium/content/browser/renderer_host/input/web_input_event_builders_mac.mm
7++++ b/src/3rdparty/chromium/content/browser/renderer_host/input/web_input_event_builders_mac.mm
8+@@ -1,3 +1,4 @@
9++#define NSEventTypeScrollWheel 22
10+ // Copyright 2015 The Chromium Authors. All rights reserved.
11+ // Use of this source code is governed by a BSD-style license that can be
12+ // found in the LICENSE file.
13+--- a/src/3rdparty/chromium/net/ssl/ssl_platform_key_mac.cc
14++++ b/src/3rdparty/chromium/net/ssl/ssl_platform_key_mac.cc
15+@@ -48,21 +48,6 @@ namespace net {
16+
17+ namespace {
18+
19+-// TODO(davidben): Remove this when we switch to building to the 10.13
20+-// SDK. https://crbug.com/780980
21+-#if !defined(MAC_OS_X_VERSION_10_13) || \
22+- MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13
23+-API_AVAILABLE(macosx(10.13))
24+-const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA256 =
25+- CFSTR("algid:sign:RSA:digest-PSS:SHA256:SHA256:32");
26+-API_AVAILABLE(macosx(10.13))
27+-const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA384 =
28+- CFSTR("algid:sign:RSA:digest-PSS:SHA384:SHA384:48");
29+-API_AVAILABLE(macosx(10.13))
30+-const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA512 =
31+- CFSTR("algid:sign:RSA:digest-PSS:SHA512:SHA512:64");
32+-#endif
33+-
34+ class ScopedCSSM_CC_HANDLE {
35+ public:
36+ ScopedCSSM_CC_HANDLE() : handle_(0) {}
37+@@ -187,109 +172,6 @@ class SSLPlatformKeyCSSM : public ThreadedSSLPrivateKey::Delegate {
38+ DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyCSSM);
39+ };
40+
41+-// Returns the corresponding SecKeyAlgorithm or nullptr if unrecognized.
42+-API_AVAILABLE(macosx(10.12))
43+-SecKeyAlgorithm GetSecKeyAlgorithm(uint16_t algorithm) {
44+- switch (algorithm) {
45+- case SSL_SIGN_RSA_PKCS1_SHA512:
46+- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA512;
47+- case SSL_SIGN_RSA_PKCS1_SHA384:
48+- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA384;
49+- case SSL_SIGN_RSA_PKCS1_SHA256:
50+- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA256;
51+- case SSL_SIGN_RSA_PKCS1_SHA1:
52+- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA1;
53+- case SSL_SIGN_RSA_PKCS1_MD5_SHA1:
54+- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15Raw;
55+- case SSL_SIGN_ECDSA_SECP521R1_SHA512:
56+- return kSecKeyAlgorithmECDSASignatureDigestX962SHA512;
57+- case SSL_SIGN_ECDSA_SECP384R1_SHA384:
58+- return kSecKeyAlgorithmECDSASignatureDigestX962SHA384;
59+- case SSL_SIGN_ECDSA_SECP256R1_SHA256:
60+- return kSecKeyAlgorithmECDSASignatureDigestX962SHA256;
61+- case SSL_SIGN_ECDSA_SHA1:
62+- return kSecKeyAlgorithmECDSASignatureDigestX962SHA1;
63+- }
64+-
65+- if (base::mac::IsAtLeastOS10_13()) {
66+- switch (algorithm) {
67+- case SSL_SIGN_RSA_PSS_SHA512:
68+- return kSecKeyAlgorithmRSASignatureDigestPSSSHA512;
69+- case SSL_SIGN_RSA_PSS_SHA384:
70+- return kSecKeyAlgorithmRSASignatureDigestPSSSHA384;
71+- case SSL_SIGN_RSA_PSS_SHA256:
72+- return kSecKeyAlgorithmRSASignatureDigestPSSSHA256;
73+- }
74+- }
75+-
76+- return nullptr;
77+-}
78+-
79+-class API_AVAILABLE(macosx(10.12)) SSLPlatformKeySecKey
80+- : public ThreadedSSLPrivateKey::Delegate {
81+- public:
82+- SSLPlatformKeySecKey(int type, size_t max_length, SecKeyRef key)
83+- : key_(key, base::scoped_policy::RETAIN) {
84+- // Determine the algorithms supported by the key.
85+- for (uint16_t algorithm : SSLPrivateKey::DefaultAlgorithmPreferences(
86+- type, true /* include PSS */)) {
87+- SecKeyAlgorithm sec_algorithm = GetSecKeyAlgorithm(algorithm);
88+- if (sec_algorithm &&
89+- SecKeyIsAlgorithmSupported(key_.get(), kSecKeyOperationTypeSign,
90+- sec_algorithm)) {
91+- preferences_.push_back(algorithm);
92+- }
93+- }
94+- }
95+-
96+- ~SSLPlatformKeySecKey() override {}
97+-
98+- std::vector<uint16_t> GetAlgorithmPreferences() override {
99+- return preferences_;
100+- }
101+-
102+- Error Sign(uint16_t algorithm,
103+- base::span<const uint8_t> input,
104+- std::vector<uint8_t>* signature) override {
105+- SecKeyAlgorithm sec_algorithm = GetSecKeyAlgorithm(algorithm);
106+- if (!sec_algorithm) {
107+- NOTREACHED();
108+- return ERR_FAILED;
109+- }
110+-
111+- const EVP_MD* md = SSL_get_signature_algorithm_digest(algorithm);
112+- uint8_t digest[EVP_MAX_MD_SIZE];
113+- unsigned digest_len;
114+- if (!md || !EVP_Digest(input.data(), input.size(), digest, &digest_len, md,
115+- nullptr)) {
116+- return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED;
117+- }
118+-
119+- base::ScopedCFTypeRef<CFDataRef> digest_ref(CFDataCreateWithBytesNoCopy(
120+- kCFAllocatorDefault, digest, base::checked_cast<CFIndex>(digest_len),
121+- kCFAllocatorNull));
122+-
123+- base::ScopedCFTypeRef<CFErrorRef> error;
124+- base::ScopedCFTypeRef<CFDataRef> signature_ref(SecKeyCreateSignature(
125+- key_, sec_algorithm, digest_ref, error.InitializeInto()));
126+- if (!signature_ref) {
127+- LOG(ERROR) << error;
128+- return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED;
129+- }
130+-
131+- signature->assign(
132+- CFDataGetBytePtr(signature_ref),
133+- CFDataGetBytePtr(signature_ref) + CFDataGetLength(signature_ref));
134+- return OK;
135+- }
136+-
137+- private:
138+- std::vector<uint16_t> preferences_;
139+- base::ScopedCFTypeRef<SecKeyRef> key_;
140+-
141+- DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeySecKey);
142+-};
143+-
144+ scoped_refptr<SSLPrivateKey> CreateSSLPrivateKeyForSecKey(
145+ const X509Certificate* certificate,
146+ SecKeyRef private_key) {
147+@@ -298,13 +180,6 @@ scoped_refptr<SSLPrivateKey> CreateSSLPrivateKeyForSecKey(
148+ if (!GetClientCertInfo(certificate, &key_type, &max_length))
149+ return nullptr;
150+
151+- if (base::mac::IsAtLeastOS10_12()) {
152+- return base::MakeRefCounted<ThreadedSSLPrivateKey>(
153+- std::make_unique<SSLPlatformKeySecKey>(key_type, max_length,
154+- private_key),
155+- GetSSLPlatformKeyTaskRunner());
156+- }
157+-
158+ const CSSM_KEY* cssm_key;
159+ OSStatus status = SecKeyGetCSSMKey(private_key, &cssm_key);
160+ if (status != noErr) {