diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /dom/webauthn/WebAuthnResult.cpp | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/webauthn/WebAuthnResult.cpp')
-rw-r--r-- | dom/webauthn/WebAuthnResult.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
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<nsIWebAuthnAttObj> 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 |