зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1724659 - Correctly return none attestation when none is requested on Windows r=dveditz
Differential Revision: https://phabricator.services.mozilla.com/D135911
This commit is contained in:
Родитель
14118d2896
Коммит
d938d5666b
|
@ -402,11 +402,6 @@ void WinWebAuthnManager::Register(
|
|||
mCancellationIds.erase(aTransactionId);
|
||||
|
||||
if (hr == S_OK) {
|
||||
nsTArray<uint8_t> attObject;
|
||||
attObject.AppendElements(
|
||||
pWebAuthNCredentialAttestation->pbAttestationObject,
|
||||
pWebAuthNCredentialAttestation->cbAttestationObject);
|
||||
|
||||
nsTArray<uint8_t> credentialId;
|
||||
credentialId.AppendElements(pWebAuthNCredentialAttestation->pbCredentialId,
|
||||
pWebAuthNCredentialAttestation->cbCredentialId);
|
||||
|
@ -457,6 +452,23 @@ void WinWebAuthnManager::Register(
|
|||
attestation->cbSignature);
|
||||
}
|
||||
|
||||
nsTArray<uint8_t> attObject;
|
||||
if (winAttestation == WEBAUTHN_ATTESTATION_CONVEYANCE_PREFERENCE_NONE) {
|
||||
// Zero AAGuid
|
||||
authenticatorData.ReplaceElementsAt(32 + 1 + 4 /*AAGuid offset*/, 16,
|
||||
0x0);
|
||||
|
||||
CryptoBuffer authData;
|
||||
authData.Assign(authenticatorData);
|
||||
CryptoBuffer noneAttObj;
|
||||
CBOREncodeNoneAttestationObj(authData, noneAttObj);
|
||||
attObject.AppendElements(noneAttObj);
|
||||
} else {
|
||||
attObject.AppendElements(
|
||||
pWebAuthNCredentialAttestation->pbAttestationObject,
|
||||
pWebAuthNCredentialAttestation->cbAttestationObject);
|
||||
}
|
||||
|
||||
nsTArray<WebAuthnExtensionResult> extensions;
|
||||
|
||||
if (pWebAuthNCredentialAttestation->dwVersion >=
|
||||
|
|
Загрузка…
Ссылка в новой задаче