From da4c7e7ed675c3bf405668739c3012d140856109 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:42 +0200 Subject: Adding upstream version 126.0. Signed-off-by: Daniel Baumann --- dom/webauthn/WebAuthnResult.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'dom/webauthn/WebAuthnResult.cpp') diff --git a/dom/webauthn/WebAuthnResult.cpp b/dom/webauthn/WebAuthnResult.cpp index 268dd62f20..6fd446ffa0 100644 --- a/dom/webauthn/WebAuthnResult.cpp +++ b/dom/webauthn/WebAuthnResult.cpp @@ -102,7 +102,27 @@ WebAuthnRegisterResult::GetAuthenticatorAttachment( return NS_ERROR_NOT_AVAILABLE; } -nsresult WebAuthnRegisterResult::Anonymize() { +NS_IMETHODIMP +WebAuthnRegisterResult::HasIdentifyingAttestation( + bool* aHasIdentifyingAttestation) { + // Assume the attestation statement is identifying in case the constructor or + // the getter below fail. + bool isIdentifying = true; + + nsCOMPtr attObj; + nsresult rv = authrs_webauthn_att_obj_constructor(mAttestationObject, + /* anonymize */ false, + getter_AddRefs(attObj)); + if (NS_SUCCEEDED(rv)) { + Unused << attObj->IsIdentifying(&isIdentifying); + } + + *aHasIdentifyingAttestation = isIdentifying; + return NS_OK; +} + +NS_IMETHODIMP +WebAuthnRegisterResult::Anonymize() { // The anonymize flag in the nsIWebAuthnAttObj constructor causes the // attestation statement to be removed during deserialization. It also // causes the AAGUID to be zeroed out. If we can't deserialize the -- cgit v1.2.3