diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/device/fido/win/webauthn_api.cc | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/device/fido/win/webauthn_api.cc')
-rw-r--r-- | chromium/device/fido/win/webauthn_api.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/chromium/device/fido/win/webauthn_api.cc b/chromium/device/fido/win/webauthn_api.cc index 5f17312cde0..4706be4ec8c 100644 --- a/chromium/device/fido/win/webauthn_api.cc +++ b/chromium/device/fido/win/webauthn_api.cc @@ -295,13 +295,6 @@ AuthenticatorMakeCredentialBlocking(WinWebAuthnApi* webauthn_api, }; WEBAUTHN_CREDENTIAL_ATTESTATION* credential_attestation = nullptr; - std::unique_ptr<WEBAUTHN_CREDENTIAL_ATTESTATION, - std::function<void(PWEBAUTHN_CREDENTIAL_ATTESTATION)>> - credential_attestation_deleter( - credential_attestation, - [webauthn_api](PWEBAUTHN_CREDENTIAL_ATTESTATION ptr) { - webauthn_api->FreeCredentialAttestation(ptr); - }); FIDO_LOG(DEBUG) << "WebAuthNAuthenticatorMakeCredential(" << "rp=" << rp_info << ", user=" << user_info @@ -312,6 +305,14 @@ AuthenticatorMakeCredentialBlocking(WinWebAuthnApi* webauthn_api, HRESULT hresult = webauthn_api->AuthenticatorMakeCredential( h_wnd, &rp_info, &user_info, &cose_credential_parameters, &client_data, &options, &credential_attestation); + std::unique_ptr<WEBAUTHN_CREDENTIAL_ATTESTATION, + std::function<void(PWEBAUTHN_CREDENTIAL_ATTESTATION)>> + credential_attestation_deleter( + credential_attestation, + [webauthn_api](PWEBAUTHN_CREDENTIAL_ATTESTATION ptr) { + webauthn_api->FreeCredentialAttestation(ptr); + }); + if (hresult != S_OK) { FIDO_LOG(DEBUG) << "WebAuthNAuthenticatorMakeCredential()=" << webauthn_api->GetErrorName(hresult); @@ -403,16 +404,17 @@ AuthenticatorGetAssertionBlocking(WinWebAuthnApi* webauthn_api, }; WEBAUTHN_ASSERTION* assertion = nullptr; - std::unique_ptr<WEBAUTHN_ASSERTION, std::function<void(PWEBAUTHN_ASSERTION)>> - assertion_deleter(assertion, [webauthn_api](PWEBAUTHN_ASSERTION ptr) { - webauthn_api->FreeAssertion(ptr); - }); FIDO_LOG(DEBUG) << "WebAuthNAuthenticatorGetAssertion(" << "rp_id=\"" << rp_id16 << "\", client_data=" << client_data << ", options=" << options << ")"; HRESULT hresult = webauthn_api->AuthenticatorGetAssertion( h_wnd, base::as_wcstr(rp_id16), &client_data, &options, &assertion); + std::unique_ptr<WEBAUTHN_ASSERTION, std::function<void(PWEBAUTHN_ASSERTION)>> + assertion_deleter(assertion, [webauthn_api](PWEBAUTHN_ASSERTION ptr) { + webauthn_api->FreeAssertion(ptr); + }); + if (hresult != S_OK) { FIDO_LOG(DEBUG) << "WebAuthNAuthenticatorGetAssertion()=" << webauthn_api->GetErrorName(hresult); |