Temporary workaround for Apple Internal builds
<rdar://problem/25992976>
For Apple Internal builds treat error code errSecCSGuestInvalid as if it were error code errSecCSUnsigned.
We will look to remove this workaround in the fix for <rdar://problem/26075714>.
* Shared/mac/CodeSigning.mm:
(WebKit::secCodeSigningIdentifier):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index e5490bc..8e4eac7 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,14 @@
+2016-05-03 Daniel Bates <dabates@apple.com>
+
+ Temporary workaround for Apple Internal builds
+ <rdar://problem/25992976>
+
+ For Apple Internal builds treat error code errSecCSGuestInvalid as if it were error code errSecCSUnsigned.
+ We will look to remove this workaround in the fix for <rdar://problem/26075714>.
+
+ * Shared/mac/CodeSigning.mm:
+ (WebKit::secCodeSigningIdentifier):
+
2016-05-03 Chris Dumez <cdumez@apple.com>
Unreviewed, rolling out r199259 and r200161.
diff --git a/Source/WebKit2/Shared/mac/CodeSigning.mm b/Source/WebKit2/Shared/mac/CodeSigning.mm
index 366ccf1..3fd4a01 100644
--- a/Source/WebKit2/Shared/mac/CodeSigning.mm
+++ b/Source/WebKit2/Shared/mac/CodeSigning.mm
@@ -79,6 +79,11 @@
OSStatus errorCode = SecCodeCheckValidity(code, kSecCSDefaultFlags, signingRequirement.get());
if (errorCode == errSecCSUnsigned || errorCode == errSecCSReqFailed)
return String(); // Unsigned or signed by a third-party
+#if USE(APPLE_INTERNAL_SDK)
+ // FIXME: Temporary workaround for <rdar://problem/25992976>. We need to fix <rdar://problem/25697779>.
+ if (errorCode == errSecCSGuestInvalid)
+ return String();
+#endif
RELEASE_ASSERT_WITH_MESSAGE(!errorCode, "SecCodeCheckValidity() failed with error: %ld", static_cast<long>(errorCode));
String codeSigningIdentifier;
RetainPtr<CFDictionaryRef> signingInfo = secCodeSigningInformation(code);