[WebAuthN] Import a JS CBOR coder
https://bugs.webkit.org/show_bug.cgi?id=189877
<rdar://problem/
44701124>
Reviewed by Chris Dumez.
Source/WebKit:
Update MockWebAuthenticationConfiguration to have userCertificateBase64 and intermediateCACertificateBase64
as Local's memeber such that tests can pass those certificates to MockLocalConnection instead of letting it
holds some static ones.
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreSetWebAuthenticationMockConfiguration):
* UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
(WebKit::MockLocalConnection::getAttestation const):
* UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h:
Tools:
Add logic to only process privateKeyBase64, userCertificateBase64 and intermediateCACertificateBase64
only if acceptAttestation is true.
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setWebAuthenticationMockConfiguration):
LayoutTests:
This patch import a 3rd party JS CBOR coder from https://github.com/paroga/cbor-js.
The library is MIT licensed, which should be fine to use within WebKit.
As a benefit from the library, tests are updated to check CBOR binaries.
* http/wpt/credential-management/credentialscontainer-store-basics.https.html:
* http/wpt/webauthn/idl.https.html:
* http/wpt/webauthn/public-key-credential-create-failure-local.https.html:
* http/wpt/webauthn/public-key-credential-create-success-local.https.html:
* http/wpt/webauthn/public-key-credential-get-failure-local.https.html:
* http/wpt/webauthn/public-key-credential-get-success-local.https.html:
* http/wpt/webauthn/resources/cbor.js: Added.
* http/wpt/webauthn/resources/util.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236686
268f45cc-cd09-0410-ab3c-
d52691b4dbfc