Add getCoseKeyType - missing function in secure payment confirmation. [chromium/src : main]

0 views
Skip to first unread message

Slobodan Pejic (Gerrit)

unread,
Jan 9, 2026, 1:56:32 PM (2 days ago) Jan 9
to chromium...@chromium.org, blink-...@chromium.org, blink-revie...@chromium.org

Slobodan Pejic has uploaded the change for review

Commit message

Add getCoseKeyType - missing function in secure payment confirmation.
Bug: 474614620
Change-Id: I7d1cb5bbefbeb63958434f3ff8147b7c67743aa4

Change diff

diff --git a/third_party/blink/web_tests/external/wpt/secure-payment-confirmation/utils-bbk.js b/third_party/blink/web_tests/external/wpt/secure-payment-confirmation/utils-bbk.js
index 45f7db1..aaf5774 100644
--- a/third_party/blink/web_tests/external/wpt/secure-payment-confirmation/utils-bbk.js
+++ b/third_party/blink/web_tests/external/wpt/secure-payment-confirmation/utils-bbk.js
@@ -9,6 +9,16 @@
return Uint8Array.from(base64urlDecode(encoded), c => c.charCodeAt(0));
}

+// Given the Uint8Array of the encoded CoseKey return the key type. Key types
+// are enumerated in https://www.iana.org/assignments/cose/cose.xhtml#key-type
+function getCoseKeyType(encodedCoseKey) {
+ const parsed = new Cbor(encodedCoseKey);
+ const cbor = parsed.getCBOR();
+ // The index 1 represents the key type, see
+ // https://www.iana.org/assignments/cose/cose.xhtml#key-common-parameters
+ return cbor[1];
+}
+
// The result of a browser bound key verification.
const BrowserBoundKeyVerificationResult = Object.freeze({
// No browser bound key was included.

Change information

Files:
  • M third_party/blink/web_tests/external/wpt/secure-payment-confirmation/utils-bbk.js
Change size: S
Delta: 1 file changed, 10 insertions(+), 0 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I7d1cb5bbefbeb63958434f3ff8147b7c67743aa4
Gerrit-Change-Number: 7418545
Gerrit-PatchSet: 1
Gerrit-Owner: Slobodan Pejic <slob...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages