summaryrefslogtreecommitdiffstats
path: root/dom/webauthn/WebAuthnResult.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/webauthn/WebAuthnResult.cpp')
-rw-r--r--dom/webauthn/WebAuthnResult.cpp22
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