[webkit-changes] [276998] trunk

2021-05-04 Thread jiewen_tan
Title: [276998] trunk








Revision 276998
Author jiewen_...@apple.com
Date 2021-05-04 17:42:15 -0700 (Tue, 04 May 2021)


Log Message
PCM: Find a way to validate source_secret_token and source_secret_token_signature
https://bugs.webkit.org/show_bug.cgi?id=224321


Reviewed by John Wilander.

Source/WebKit:

Covered by exisiting tests.

* NetworkProcess/PrivateClickMeasurementManager.cpp:
(WebKit::PrivateClickMeasurementManager::getTokenPublicKey):
(WebKit::PrivateClickMeasurementManager::getSignedUnlinkableToken):
Reverts r236878.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
Uses RSA-PSS with SHA-384 to verify the signature.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (276997 => 276998)

--- trunk/Source/WebKit/ChangeLog	2021-05-05 00:00:14 UTC (rev 276997)
+++ trunk/Source/WebKit/ChangeLog	2021-05-05 00:42:15 UTC (rev 276998)
@@ -1,3 +1,18 @@
+2021-05-04  Jiewen Tan  
+
+PCM: Find a way to validate source_secret_token and source_secret_token_signature
+https://bugs.webkit.org/show_bug.cgi?id=224321
+
+
+Reviewed by John Wilander.
+
+Covered by exisiting tests.
+
+* NetworkProcess/PrivateClickMeasurementManager.cpp:
+(WebKit::PrivateClickMeasurementManager::getTokenPublicKey):
+(WebKit::PrivateClickMeasurementManager::getSignedUnlinkableToken):
+Reverts r236878.
+
 2021-05-04  Jer Noble  
 
 [Media in GPU Process] Move AudioSessionRoutingArbitratorProxy to the GPU process


Modified: trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp (276997 => 276998)

--- trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp	2021-05-05 00:00:14 UTC (rev 276997)
+++ trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp	2021-05-05 00:42:15 UTC (rev 276998)
@@ -145,6 +145,8 @@
 if (attributionReportEndpoint == PrivateClickMeasurement::AttributionReportEndpoint::Destination)
 return;
 tokenPublicKeyURL = *m_tokenPublicKeyURLForTesting;
+// FIXME(225364)
+pcmDataCarried = PrivateClickMeasurement::PcmDataCarried::NonPersonallyIdentifiable;
 }
 
 if (tokenPublicKeyURL.isEmpty() || !tokenPublicKeyURL.isValid())
@@ -182,8 +184,11 @@
 // This is guaranteed to be close in time to the navigational click which makes it likely to be personally identifiable.
 auto pcmDataCarried = PrivateClickMeasurement::PcmDataCarried::PersonallyIdentifiable;
 auto tokenSignatureURL = attribution.tokenSignatureURL();
-if (m_tokenSignatureURLForTesting)
+if (m_tokenSignatureURLForTesting) {
 tokenSignatureURL = *m_tokenSignatureURLForTesting;
+// FIXME(225364)
+pcmDataCarried = PrivateClickMeasurement::PcmDataCarried::NonPersonallyIdentifiable;
+}
 
 if (tokenSignatureURL.isEmpty() || !tokenSignatureURL.isValid())
 return;


Modified: trunk/Tools/ChangeLog (276997 => 276998)

--- trunk/Tools/ChangeLog	2021-05-05 00:00:14 UTC (rev 276997)
+++ trunk/Tools/ChangeLog	2021-05-05 00:42:15 UTC (rev 276998)
@@ -1,3 +1,15 @@
+2021-05-04  Jiewen Tan  
+
+PCM: Find a way to validate source_secret_token and source_secret_token_signature
+https://bugs.webkit.org/show_bug.cgi?id=224321
+
+
+Reviewed by John Wilander.
+
+* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
+(TestWebKitAPI::TEST):
+Uses RSA-PSS with SHA-384 to verify the signature.
+
 2021-05-04  Jonathan Bedard  
 
 [webkitscmpy] Scope classes used in TaskPool to object


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm (276997 => 276998)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm	2021-05-05 00:00:14 UTC (rev 276997)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm	2021-05-05 00:42:15 UTC (rev 276998)
@@ -162,10 +162,10 @@
 auto keyData = WTF::base64URLEncode(nsSpkiData.bytes, nsSpkiData.length);
 
 // The server.
-HTTPServer server([, connectionCount = 0, , , , ] (Connection connection) mutable {
+HTTPServer server([, connectionCount = 0, , , , , ] (Connection connection) mutable {
 switch (++connectionCount) {
 case 1:
-connection.receiveHTTPRequest([connection, , , , , ] (Vector&& request1) {
+connection.receiveHTTPRequest([connection, , , , , , ] (Vector&& request1) {
 EXPECT_TRUE(strnstr(request1.data(), "GET / HTTP/1.1\r\n", request1.size()));
 
 // Example response: { "token_public_key": "ABCD" }. "ABCD" should be Base64URL encoded.
@@ -173,8 +173,8 @@
 "Content-Type: application/json\r\n"
 "Content-Length: ", 24 + keyData.length(), "\r\n\r\n"
 

[webkit-changes] [276972] trunk/Source/WebKit

2021-05-04 Thread jiewen_tan
Title: [276972] trunk/Source/WebKit








Revision 276972
Author jiewen_...@apple.com
Date 2021-05-04 11:34:56 -0700 (Tue, 04 May 2021)


Log Message
REGRESSION: [ iOS ] 11 http/wpt/webauthn/ tests are crashing
https://bugs.webkit.org/show_bug.cgi?id=225225
rdar://77074618

Reviewed by Brent Fulgham.

Covered by exisiting tests.

* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManager::runPresenter):
(WebKit::AuthenticatorManager::runPresenterInternal):
* UIProcess/WebAuthentication/AuthenticatorManager.h:
* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.h:
Disables the modern UI in the mock testing environment.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp
trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.h
trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.h




Diff

Modified: trunk/Source/WebKit/ChangeLog (276971 => 276972)

--- trunk/Source/WebKit/ChangeLog	2021-05-04 18:19:43 UTC (rev 276971)
+++ trunk/Source/WebKit/ChangeLog	2021-05-04 18:34:56 UTC (rev 276972)
@@ -1,3 +1,20 @@
+2021-05-04  Jiewen Tan  
+
+REGRESSION: [ iOS ] 11 http/wpt/webauthn/ tests are crashing
+https://bugs.webkit.org/show_bug.cgi?id=225225
+rdar://77074618
+
+Reviewed by Brent Fulgham.
+
+Covered by exisiting tests.
+
+* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
+(WebKit::AuthenticatorManager::runPresenter):
+(WebKit::AuthenticatorManager::runPresenterInternal):
+* UIProcess/WebAuthentication/AuthenticatorManager.h:
+* UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.h:
+Disables the modern UI in the mock testing environment.
+
 2021-05-04  Chris Dumez  
 
 [iOS] Use async API to take RunningBoard assertions


Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp (276971 => 276972)

--- trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp	2021-05-04 18:19:43 UTC (rev 276971)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp	2021-05-04 18:34:56 UTC (rev 276972)
@@ -486,6 +486,11 @@
 if (m_mode == Mode::Native)
 return;
 
+runPresenterInternal(transports);
+}
+
+void AuthenticatorManager::runPresenterInternal(const TransportSet& transports)
+{
 auto& options = m_pendingRequestData.options;
 m_presenter = makeUnique(*this, getRpId(options), transports, getClientDataType(options), getUserName(options));
 }


Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.h (276971 => 276972)

--- trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.h	2021-05-04 18:19:43 UTC (rev 276971)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.h	2021-05-04 18:34:56 UTC (rev 276972)
@@ -105,6 +105,7 @@
 // Overriden to return every exception for tests to confirm.
 virtual void respondReceivedInternal(Respond&&) { }
 virtual void filterTransports(TransportSet&) const;
+virtual void runPresenterInternal(const TransportSet&);
 
 void startDiscovery(const TransportSet&);
 void initTimeOutTimer();


Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.h (276971 => 276972)

--- trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.h	2021-05-04 18:19:43 UTC (rev 276971)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.h	2021-05-04 18:34:56 UTC (rev 276972)
@@ -43,6 +43,7 @@
 UniqueRef createService(WebCore::AuthenticatorTransport, AuthenticatorTransportService::Observer&) const final;
 void respondReceivedInternal(Respond&&) final;
 void filterTransports(TransportSet&) const;
+void runPresenterInternal(const TransportSet&) final { }
 
 WebCore::MockWebAuthenticationConfiguration m_testConfiguration;
 };






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [276851] trunk/Source/WebKit

2021-04-30 Thread jiewen_tan
Title: [276851] trunk/Source/WebKit








Revision 276851
Author jiewen_...@apple.com
Date 2021-04-30 13:17:02 -0700 (Fri, 30 Apr 2021)


Log Message
_WKWebAuthenticationPanelDelegate registration and assertion SPI doesn't work without an LAContext
https://bugs.webkit.org/show_bug.cgi?id=225218


Reviewed by Brent Fulgham.

Covered by manual tests.

* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
(WebKit::LocalConnection::verifyUser):
Adds a case for nil LAContext.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (276850 => 276851)

--- trunk/Source/WebKit/ChangeLog	2021-04-30 19:51:37 UTC (rev 276850)
+++ trunk/Source/WebKit/ChangeLog	2021-04-30 20:17:02 UTC (rev 276851)
@@ -1,3 +1,17 @@
+2021-04-30  Jiewen Tan  
+
+_WKWebAuthenticationPanelDelegate registration and assertion SPI doesn't work without an LAContext 
+https://bugs.webkit.org/show_bug.cgi?id=225218
+
+
+Reviewed by Brent Fulgham.
+
+Covered by manual tests.
+
+* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
+(WebKit::LocalConnection::verifyUser):
+Adds a case for nil LAContext.
+
 2021-04-30  Ryan Haddad  
 
 Unreviewed, reverting r276838.


Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm (276850 => 276851)

--- trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm	2021-04-30 19:51:37 UTC (rev 276850)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm	2021-04-30 20:17:02 UTC (rev 276851)
@@ -129,7 +129,7 @@
 auto options = adoptNS([[NSMutableDictionary alloc] init]);
 [options setObject:@YES forKey:@(LAOptionNotInteractive)];
 
-auto reply = makeBlockPtr([completionHandler = WTFMove(completionHandler)] (NSDictionary *, NSError *error) mutable {
+auto reply = makeBlockPtr([completionHandler = WTFMove(completionHandler)] (NSDictionary *information, NSError *error) mutable {
 UserVerification verification = UserVerification::Yes;
 if (error) {
 LOG_ERROR("Couldn't authenticate with biometrics: %@", error);
@@ -137,6 +137,8 @@
 if (error.code == LAErrorUserCancel)
 verification = UserVerification::Cancel;
 }
+if (information[@"UserPresence"])
+verification = UserVerification::Presence;
 
 // This block can be executed in another thread.
 RunLoop::main().dispatch([completionHandler = WTFMove(completionHandler), verification] () mutable {
@@ -144,6 +146,14 @@
 });
 });
 
+#if USE(APPLE_INTERNAL_SDK)
+// Depending on certain internal requirements, context might be nil. In that case, just check user presence.
+if (shouldUseAlternateAttributes() && !context) {
+reply(@{ @"UserPresence": @YES }, nullptr);
+return;
+}
+#endif
+
 [context evaluateAccessControl:accessControl operation:LAAccessControlOperationUseKeySign options:options.get() reply:reply.get()];
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [276320] trunk/Source/WebKit

2021-04-20 Thread jiewen_tan
Title: [276320] trunk/Source/WebKit








Revision 276320
Author jiewen_...@apple.com
Date 2021-04-20 15:13:28 -0700 (Tue, 20 Apr 2021)


Log Message
Platform Key registration does not prompt for user password when in biometric lockout
https://bugs.webkit.org/show_bug.cgi?id=224828


Reviewed by Brent Fulgham.

Covered by manul tests.

* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
(WebKit::LocalConnection::verifyUser):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (276319 => 276320)

--- trunk/Source/WebKit/ChangeLog	2021-04-20 22:06:17 UTC (rev 276319)
+++ trunk/Source/WebKit/ChangeLog	2021-04-20 22:13:28 UTC (rev 276320)
@@ -1,3 +1,16 @@
+2021-04-20  Jiewen Tan  
+
+Platform Key registration does not prompt for user password when in biometric lockout
+https://bugs.webkit.org/show_bug.cgi?id=224828
+
+
+Reviewed by Brent Fulgham.
+
+Covered by manul tests.
+
+* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
+(WebKit::LocalConnection::verifyUser):
+
 2021-04-20  Don Olmstead  
 
 [CMake] Don't use FORWARDING_HEADERS_DIR for JSC GLib headers


Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm (276319 => 276320)

--- trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm	2021-04-20 22:06:17 UTC (rev 276319)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm	2021-04-20 22:13:28 UTC (rev 276320)
@@ -106,7 +106,12 @@
 // Depending on certain internal requirements, accessControl might not require user verifications.
 // Hence, here introduces a quirk to force the compatible mode to require user verifications if necessary.
 if (shouldUseAlternateAttributes()) {
-if (uv == UserVerificationRequirement::Required || [m_context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:nil]) {
+NSError *error = nil;
+auto canEvaluatePolicy = [m_context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:];
+if (error.code == LAErrorBiometryLockout)
+canEvaluatePolicy = true;
+
+if (uv == UserVerificationRequirement::Required || canEvaluatePolicy) {
 [m_context evaluatePolicy:LAPolicyDeviceOwnerAuthentication options:options.get() reply:reply.get()];
 return;
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [276184] trunk

2021-04-16 Thread jiewen_tan
Title: [276184] trunk








Revision 276184
Author jiewen_...@apple.com
Date 2021-04-16 17:14:03 -0700 (Fri, 16 Apr 2021)


Log Message
Pass credential name to the WebAuthn UI during registration
https://bugs.webkit.org/show_bug.cgi?id=224697


Reviewed by Brent Fulgham.

Source/WebKit:

Covered by new test contents within existing test files.

* Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
Paperwork for the new SPI.

* UIProcess/API/APIWebAuthenticationPanel.cpp:
(API::WebAuthenticationPanel::create):
(API::WebAuthenticationPanel::WebAuthenticationPanel):
* UIProcess/API/APIWebAuthenticationPanel.h:
* UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
* UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:
(-[_WKWebAuthenticationPanel userName]):
Adds a new userName property.

* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::WebCore::getUserName):
(WebKit::AuthenticatorManager::runPanel):
(WebKit::AuthenticatorManager::runPresenter):
Passes the userName to the UI.

* UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.h:
* UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.mm:
Paperwork for the new SPI.

* UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.h:
* UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm:
(WebKit::AuthenticatorPresenterCoordinator::AuthenticatorPresenterCoordinator):
Passes the userName to the new SPI.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:
(TestWebKitAPI::TEST):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h
trunk/Source/WebKit/UIProcess/API/APIWebAuthenticationPanel.cpp
trunk/Source/WebKit/UIProcess/API/APIWebAuthenticationPanel.h
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm
trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.h
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.mm
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.h
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (276183 => 276184)

--- trunk/Source/WebKit/ChangeLog	2021-04-16 23:55:21 UTC (rev 276183)
+++ trunk/Source/WebKit/ChangeLog	2021-04-17 00:14:03 UTC (rev 276184)
@@ -1,3 +1,40 @@
+2021-04-16  Jiewen Tan  
+
+Pass credential name to the WebAuthn UI during registration
+https://bugs.webkit.org/show_bug.cgi?id=224697
+
+
+Reviewed by Brent Fulgham.
+
+Covered by new test contents within existing test files.
+
+* Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
+Paperwork for the new SPI.
+
+* UIProcess/API/APIWebAuthenticationPanel.cpp:
+(API::WebAuthenticationPanel::create):
+(API::WebAuthenticationPanel::WebAuthenticationPanel):
+* UIProcess/API/APIWebAuthenticationPanel.h:
+* UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
+* UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:
+(-[_WKWebAuthenticationPanel userName]):
+Adds a new userName property.
+
+* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
+(WebKit::WebCore::getUserName):
+(WebKit::AuthenticatorManager::runPanel):
+(WebKit::AuthenticatorManager::runPresenter):
+Passes the userName to the UI.
+
+* UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.h:
+* UIProcess/WebAuthentication/Cocoa/AuthenticationServicesCoreSoftLink.mm:
+Paperwork for the new SPI.
+
+* UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.h:
+* UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm:
+(WebKit::AuthenticatorPresenterCoordinator::AuthenticatorPresenterCoordinator):
+Passes the userName to the new SPI.
+
 2021-04-16  Cameron McCormack  
 
 Place vertical scrollbars at (inline/block)-end edge in all writing modes.


Modified: trunk/Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h (276183 => 276184)

--- trunk/Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h	2021-04-16 23:55:21 UTC (rev 276183)
+++ trunk/Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h	2021-04-17 00:14:03 UTC (rev 276184)
@@ -114,9 +114,22 @@
 ASCSecurityKeyPublicKeyCredentialLoginChoiceKindAssertionPlaceholder,
 };
 
+@interface ASCPublicKeyCredentialCreationOptions : NSObject 
+
+@property (nonatomic, copy) NSData *challenge;
+@property (nonatomic, copy) NSString *relyingPartyIdentifier;
+@property (nonatomic, copy) 

[webkit-changes] [276180] trunk

2021-04-16 Thread jiewen_tan
Title: [276180] trunk








Revision 276180
Author jiewen_...@apple.com
Date 2021-04-16 16:52:30 -0700 (Fri, 16 Apr 2021)


Log Message
Allow using the platform authenticator on non-Touch ID Macs according to Internal requirements
https://bugs.webkit.org/show_bug.cgi?id=224639


Reviewed by Daniel Bates.

Source/WebCore:

Covered by new tests within existing test files.

* testing/MockWebAuthenticationConfiguration.h:
* testing/MockWebAuthenticationConfiguration.idl:
Mock testing support.

Source/WebKit:

* UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
(WebKit::LocalAuthenticator::continueMakeCredentialAfterDecidePolicy):
(WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification):
(WebKit::LocalAuthenticator::continueGetAssertionAfterResponseSelected):
(WebKit::LocalAuthenticator::continueGetAssertionAfterUserVerification):
Don't set the UserVerification bit if UserVerification is not done.

* UIProcess/WebAuthentication/Cocoa/LocalConnection.h:
* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
(WebKit::LocalConnection::verifyUser):
Only check UserPresence on non-Touch ID Macs.

* UIProcess/WebAuthentication/Cocoa/LocalService.mm:
(WebKit::LocalService::isAvailable):
Make the platform authenticator available according to Internal requirements.

* UIProcess/WebAuthentication/Mock/MockLocalConnection.h:
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
(WebKit::MockLocalConnection::verifyUser):
Mock testing support.

* UIProcess/WebAuthentication/WebAuthenticationRequestData.cpp:
(WebKit::getUserVerificationRequirement):
* UIProcess/WebAuthentication/WebAuthenticationRequestData.h:
Add a helper for extracting the UserVerification input.

LayoutTests:

* http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt:
* http/wpt/webauthn/public-key-credential-create-success-local.https.html:
* http/wpt/webauthn/public-key-credential-get-success-local.https-expected.txt:
* http/wpt/webauthn/public-key-credential-get-success-local.https.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt
trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-local.https.html
trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-local.https-expected.txt
trunk/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-local.https.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/testing/MockWebAuthenticationConfiguration.h
trunk/Source/WebCore/testing/MockWebAuthenticationConfiguration.idl
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.h
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalService.mm
trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.h
trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.mm
trunk/Source/WebKit/UIProcess/WebAuthentication/WebAuthenticationRequestData.cpp
trunk/Source/WebKit/UIProcess/WebAuthentication/WebAuthenticationRequestData.h




Diff

Modified: trunk/LayoutTests/ChangeLog (276179 => 276180)

--- trunk/LayoutTests/ChangeLog	2021-04-16 23:32:49 UTC (rev 276179)
+++ trunk/LayoutTests/ChangeLog	2021-04-16 23:52:30 UTC (rev 276180)
@@ -1,3 +1,16 @@
+2021-04-16  Jiewen Tan  
+
+Allow using the platform authenticator on non-Touch ID Macs according to Internal requirements
+https://bugs.webkit.org/show_bug.cgi?id=224639
+
+
+Reviewed by Daniel Bates.
+
+* http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt:
+* http/wpt/webauthn/public-key-credential-create-success-local.https.html:
+* http/wpt/webauthn/public-key-credential-get-success-local.https-expected.txt:
+* http/wpt/webauthn/public-key-credential-get-success-local.https.html:
+
 2021-04-16  Robert Jenner  
 
 [ macOS Wk2 ] media/media-fragments/TC0051.html is flakey crashing


Modified: trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt (276179 => 276180)

--- trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt	2021-04-16 23:32:49 UTC (rev 276179)
+++ trunk/LayoutTests/http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt	2021-04-16 23:52:30 UTC (rev 276180)
@@ -6,6 +6,7 @@
 CONSOLE MESSAGE: User gesture is not detected. To use the WebAuthn API, call 'navigator.credentials.create' within user activated events.
 CONSOLE MESSAGE: User gesture is not detected. To use the WebAuthn API, call 'navigator.credentials.create' within user activated events.
 CONSOLE MESSAGE: User gesture is not detected. To use the WebAuthn API, call 'navigator.credentials.create' within user activated events.

[webkit-changes] [275990] trunk/Source/WebKit

2021-04-14 Thread jiewen_tan
Title: [275990] trunk/Source/WebKit








Revision 275990
Author jiewen_...@apple.com
Date 2021-04-14 19:11:43 -0700 (Wed, 14 Apr 2021)


Log Message
6 http/wpt/webauthn layout-tests are constantly timing out
https://bugs.webkit.org/show_bug.cgi?id=224531


Reviewed by Brent Fulgham.

Covered by existing tests.

* UIProcess/WebAuthentication/Mock/MockLocalService.mm:
(WebKit::MockLocalService::MockLocalService):
Needs to deal with the mock testing infrastructure according to internal requirements.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (275989 => 275990)

--- trunk/Source/WebKit/ChangeLog	2021-04-15 02:11:07 UTC (rev 275989)
+++ trunk/Source/WebKit/ChangeLog	2021-04-15 02:11:43 UTC (rev 275990)
@@ -1,3 +1,17 @@
+2021-04-14  Jiewen Tan  
+
+6 http/wpt/webauthn layout-tests are constantly timing out
+https://bugs.webkit.org/show_bug.cgi?id=224531
+
+
+Reviewed by Brent Fulgham.
+
+Covered by existing tests.
+
+* UIProcess/WebAuthentication/Mock/MockLocalService.mm:
+(WebKit::MockLocalService::MockLocalService):
+Needs to deal with the mock testing infrastructure according to internal requirements.
+
 2021-04-14  Wenson Hsieh  
 
 [macOS] Make image extraction interactions work for elements inside links


Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.mm (275989 => 275990)

--- trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.mm	2021-04-15 02:11:07 UTC (rev 275989)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalService.mm	2021-04-15 02:11:43 UTC (rev 275990)
@@ -31,6 +31,12 @@
 #import "MockLocalConnection.h"
 #import 
 
+#if USE(APPLE_INTERNAL_SDK)
+#import 
+#else
+#define MOCK_LOCAL_SERVICE_ADDITIONS
+#endif
+
 namespace WebKit {
 
 MockLocalService::MockLocalService(Observer& observer, const WebCore::MockWebAuthenticationConfiguration& configuration)
@@ -37,6 +43,7 @@
 : LocalService(observer)
 , m_configuration(configuration)
 {
+MOCK_LOCAL_SERVICE_ADDITIONS
 }
 
 bool MockLocalService::platformStartDiscovery() const






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [275966] trunk/Source/WebKit

2021-04-14 Thread jiewen_tan
Title: [275966] trunk/Source/WebKit








Revision 275966
Author jiewen_...@apple.com
Date 2021-04-14 14:35:49 -0700 (Wed, 14 Apr 2021)


Log Message
Unreviewed, a comment fix after r275847

* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
(WebKit::LocalConnection::verifyUser):
Explains why instead of what.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (275965 => 275966)

--- trunk/Source/WebKit/ChangeLog	2021-04-14 20:32:19 UTC (rev 275965)
+++ trunk/Source/WebKit/ChangeLog	2021-04-14 21:35:49 UTC (rev 275966)
@@ -1,3 +1,11 @@
+2021-04-14  Jiewen Tan  
+
+Unreviewed, a comment fix after r275847
+
+* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
+(WebKit::LocalConnection::verifyUser):
+Explains why instead of what.
+
 2021-04-14  Alex Christensen  
 
 Temporarily fix more terminate_with_reason-related crashes


Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm (275965 => 275966)

--- trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm	2021-04-14 20:32:19 UTC (rev 275965)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm	2021-04-14 21:35:49 UTC (rev 275966)
@@ -100,7 +100,8 @@
 });
 
 #if USE(APPLE_INTERNAL_SDK)
-// A quirk to force the compatible mode to always show UI.
+// Depending on certain internal requirements, accessControl might not require user verifications.
+// Hence, here introduces a quirk to force the compatible mode to always require user verifications.
 if (shouldUseAlternateAttributes()) {
 [m_context evaluatePolicy:LAPolicyDeviceOwnerAuthentication options:options.get() reply:reply.get()];
 return;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [275847] trunk/Source/WebKit

2021-04-12 Thread jiewen_tan
Title: [275847] trunk/Source/WebKit








Revision 275847
Author jiewen_...@apple.com
Date 2021-04-12 16:54:00 -0700 (Mon, 12 Apr 2021)


Log Message
Force the WebAuthn compatible mode to always show UI
https://bugs.webkit.org/show_bug.cgi?id=224402


Reviewed by Brent Fulgham.

Covered by manual tests.

* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
(WebKit::LocalConnection::verifyUser):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (275846 => 275847)

--- trunk/Source/WebKit/ChangeLog	2021-04-12 23:43:49 UTC (rev 275846)
+++ trunk/Source/WebKit/ChangeLog	2021-04-12 23:54:00 UTC (rev 275847)
@@ -1,3 +1,16 @@
+2021-04-12  Jiewen Tan  
+
+Force the WebAuthn compatible mode to always show UI
+https://bugs.webkit.org/show_bug.cgi?id=224402
+
+
+Reviewed by Brent Fulgham.
+
+Covered by manual tests.
+
+* UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:
+(WebKit::LocalConnection::verifyUser):
+
 2021-04-12  Sihui Liu  
 
 Create WebIDBServer only when it is needed


Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm (275846 => 275847)

--- trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm	2021-04-12 23:43:49 UTC (rev 275846)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm	2021-04-12 23:54:00 UTC (rev 275847)
@@ -99,6 +99,14 @@
 });
 });
 
+#if USE(APPLE_INTERNAL_SDK)
+// A quirk to force the compatible mode to always show UI.
+if (shouldUseAlternateAttributes()) {
+[m_context evaluatePolicy:LAPolicyDeviceOwnerAuthentication options:options.get() reply:reply.get()];
+return;
+}
+#endif
+
 [m_context evaluateAccessControl:accessControl operation:LAAccessControlOperationUseKeySign options:options.get() reply:reply.get()];
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [275748] trunk

2021-04-08 Thread jiewen_tan
Title: [275748] trunk








Revision 275748
Author jiewen_...@apple.com
Date 2021-04-08 21:06:39 -0700 (Thu, 08 Apr 2021)


Log Message
PCM: Write more blinded secret tests
https://bugs.webkit.org/show_bug.cgi?id=222018


Reviewed by John Wilander.

Source/WebKit:

Covered by new tests.

* NetworkProcess/PrivateClickMeasurementManager.cpp:
(WebKit::PrivateClickMeasurementManager::fireConversionRequest):
The KeyID is no longer truncated.

* UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
* UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _setPrivateClickMeasurementAttributionTokenPublicKeyURLForTesting:completionHandler:]):
(-[WKWebView _setPrivateClickMeasurementAttributionTokenSignatureURLForTesting:completionHandler:]):
* UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
* UIProcess/API/ios/WKWebViewTestingIOS.mm:
(-[WKWebView _setUIEventAttributionForTesting:withNonce:]):
Adds SPI for testing.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::TEST):
Adds the new test.

LayoutTests:

* http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce.html
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurementManager.cpp
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm
trunk/Source/WebKit/UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h
trunk/Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm




Diff

Modified: trunk/LayoutTests/ChangeLog (275747 => 275748)

--- trunk/LayoutTests/ChangeLog	2021-04-09 03:49:56 UTC (rev 275747)
+++ trunk/LayoutTests/ChangeLog	2021-04-09 04:06:39 UTC (rev 275748)
@@ -1,3 +1,13 @@
+2021-04-08  Jiewen Tan  
+
+PCM: Write more blinded secret tests
+https://bugs.webkit.org/show_bug.cgi?id=222018
+
+
+Reviewed by John Wilander.
+
+* http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce.html:
+
 2021-04-08  Kate Cheney  
 
 Add test infrastructure for app bound request context string


Modified: trunk/LayoutTests/http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce.html (275747 => 275748)

--- trunk/LayoutTests/http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce.html	2021-04-09 03:49:56 UTC (rev 275747)
+++ trunk/LayoutTests/http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce.html	2021-04-09 04:06:39 UTC (rev 275748)
@@ -55,7 +55,7 @@
 testRunner.setPrivateClickMeasurementTokenSignatureURLForTesting("http://127.0.0.1:8000/privateClickMeasurement/resources/fraudPreventionTestURL.py?dummy=" + dummy);
 testRunner.setPrivateClickMeasurementAttributionReportURLsForTesting("http://127.0.0.1:8000/privateClickMeasurement/resources/fraudPreventionTestURL.py?dummy=" + dummy + "=true", "http://localhost:8000/privateClickMeasurement/resources/fraudPreventionTestURL.py?dummy=" + dummy + "=true");
 testRunner.setPrivateClickMeasurementOverrideTimerForTesting(true);
-testRunner.setPrivateClickMeasurementFraudPreventionValuesForTesting("unlinkableToken", "secretToken", "signature", "WF3Ugg");
+testRunner.setPrivateClickMeasurementFraudPreventionValuesForTesting("unlinkableToken", "secretToken", "signature", "WF3Ugpz3gk9dsYZUMvr2ct4v7403lDJtD_b-e5NiCEY");
 
 targetLink.href = "" + dummy;
 activateElement("targetLink");


Modified: trunk/Source/WebKit/ChangeLog (275747 => 275748)

--- trunk/Source/WebKit/ChangeLog	2021-04-09 03:49:56 UTC (rev 275747)
+++ trunk/Source/WebKit/ChangeLog	2021-04-09 04:06:39 UTC (rev 275748)
@@ -1,3 +1,26 @@
+2021-04-08  Jiewen Tan  
+
+PCM: Write more blinded secret tests
+https://bugs.webkit.org/show_bug.cgi?id=222018
+
+
+Reviewed by John Wilander.
+
+Covered by new tests.
+
+* NetworkProcess/PrivateClickMeasurementManager.cpp:
+(WebKit::PrivateClickMeasurementManager::fireConversionRequest):
+The KeyID is no longer truncated.
+
+* UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
+* UIProcess/API/Cocoa/WKWebViewTesting.mm:
+(-[WKWebView _setPrivateClickMeasurementAttributionTokenPublicKeyURLForTesting:completionHandler:]):
+(-[WKWebView _setPrivateClickMeasurementAttributionTokenSignatureURLForTesting:completionHandler:]):
+* UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
+* UIProcess/API/ios/WKWebViewTestingIOS.mm:
+(-[WKWebView _setUIEventAttributionForTesting:withNonce:]):
+Adds SPI for testing.
+
 2021-04-08  Alex Christensen  
 

[webkit-changes] [275678] trunk/Source/WebCore

2021-04-08 Thread jiewen_tan
Title: [275678] trunk/Source/WebCore








Revision 275678
Author jiewen_...@apple.com
Date 2021-04-08 14:30:02 -0700 (Thu, 08 Apr 2021)


Log Message
Unreviewed, a comment fix

* crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
(WebCore::encryptAES_GCM):
(WebCore::decyptAES_GCM):
Removes unnecessary comments.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (275677 => 275678)

--- trunk/Source/WebCore/ChangeLog	2021-04-08 21:27:43 UTC (rev 275677)
+++ trunk/Source/WebCore/ChangeLog	2021-04-08 21:30:02 UTC (rev 275678)
@@ -1,3 +1,12 @@
+2021-04-08  Jiewen Tan  
+
+Unreviewed, a comment fix
+
+* crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
+(WebCore::encryptAES_GCM):
+(WebCore::decyptAES_GCM):
+Removes unnecessary comments.
+
 2021-04-08  Rob Buis  
 
 Remove virtual from RenderBox::availableLogicalWidth


Modified: trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp (275677 => 275678)

--- trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp	2021-04-08 21:27:43 UTC (rev 275677)
+++ trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp	2021-04-08 21:30:02 UTC (rev 275678)
@@ -37,7 +37,6 @@
 
 static ExceptionOr> encryptAES_GCM(const Vector& iv, const Vector& key, const Vector& plainText, const Vector& additionalData, size_t desiredTagLengthInBytes)
 {
-// This is a wordaround for rdar://75093377. Force the buffer to be a non null pointer.
 Vector cipherText(plainText.size() + desiredTagLengthInBytes); // Per section 5.2.1.2: http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
 Vector tag(desiredTagLengthInBytes);
 // tagLength is actual an input 
@@ -54,7 +53,6 @@
 
 static ExceptionOr> decyptAES_GCM(const Vector& iv, const Vector& key, const Vector& cipherText, const Vector& additionalData, size_t desiredTagLengthInBytes)
 {
-// This is a wordaround for rdar://75093377. Force the buffer to be a non null pointer.
 Vector plainText(cipherText.size()); // Per section 5.2.1.2: http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
 Vector tag(desiredTagLengthInBytes);
 size_t offset = cipherText.size() - desiredTagLengthInBytes;
@@ -69,7 +67,6 @@
 if (constantTimeMemcmp(tag.data(), cipherText.data() + offset, desiredTagLengthInBytes))
 return Exception { OperationError };
 
-// This is a wordaround for rdar://75093377. Force the buffer to be a non null pointer.
 plainText.shrink(offset);
 return WTFMove(plainText);
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [275535] trunk

2021-04-06 Thread jiewen_tan
Title: [275535] trunk








Revision 275535
Author jiewen_...@apple.com
Date 2021-04-06 11:10:31 -0700 (Tue, 06 Apr 2021)


Log Message
WebCrypto in Safari will not AES-GCM encrypt 0 bytes
https://bugs.webkit.org/show_bug.cgi?id=224083


Reviewed by Youenn Fablet.

Source/WebCore:

CommonCrypto will bail out both the encryption and decryption process if the dataOut is a null pointer.
To workaround the issue, this patch forces the dataOut to be a non-null pointer.

Test: crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text.html

* crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
(WebCore::encryptAES_GCM):
(WebCore::decyptAES_GCM):

LayoutTests:

* crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text-expected.txt: Added.
* crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp


Added Paths

trunk/LayoutTests/crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text-expected.txt
trunk/LayoutTests/crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text.html




Diff

Modified: trunk/LayoutTests/ChangeLog (275534 => 275535)

--- trunk/LayoutTests/ChangeLog	2021-04-06 18:02:25 UTC (rev 275534)
+++ trunk/LayoutTests/ChangeLog	2021-04-06 18:10:31 UTC (rev 275535)
@@ -1,3 +1,14 @@
+2021-04-06  Jiewen Tan  
+
+WebCrypto in Safari will not AES-GCM encrypt 0 bytes
+https://bugs.webkit.org/show_bug.cgi?id=224083
+
+
+Reviewed by Youenn Fablet.
+
+* crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text-expected.txt: Added.
+* crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text.html: Added.
+
 2021-04-06  Chris Gambrell  
 
 [LayoutTests] Convert http/tests/loading convert PHP to Python


Added: trunk/LayoutTests/crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text-expected.txt (0 => 275535)

--- trunk/LayoutTests/crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text-expected.txt	(rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text-expected.txt	2021-04-06 18:10:31 UTC (rev 275535)
@@ -0,0 +1,14 @@
+Test encrypting using AES-GCM algorithm with a generated 256bit key
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Generating a key...
+Encrypting...
+PASS bytesToASCIIString(cipherText) is not ""
+Decrypting...
+PASS bytesToASCIIString(decryptedText) is plainText
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text.html (0 => 275535)

--- trunk/LayoutTests/crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text.html	(rev 0)
+++ trunk/LayoutTests/crypto/subtle/aes-gcm-generate-key-encrypt-decrypt-null-plain-text.html	2021-04-06 18:10:31 UTC (rev 275535)
@@ -0,0 +1,42 @@
+
+
+
+
+
+

+
+ +