1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-21 20:04:02 +00:00

Address feedback

This commit is contained in:
Isaiah Inuwa
2026-02-20 08:18:27 -06:00
parent e93c9e2542
commit fffa343f2f
4 changed files with 7 additions and 6 deletions

View File

@@ -239,7 +239,7 @@ impl IPluginAuthenticator_Impl for PluginAuthenticatorComObject_Impl {
std::thread::current().id()
);
if lock_status.is_null() {
return HRESULT(-2147024809); // E_INVALIDARG
return E_INVALIDARG;
}
match self.handler.lock_status() {

View File

@@ -691,7 +691,6 @@ mod tests {
.to_vec();
public_key_bytes.extend_from_slice(x);
public_key_bytes.extend_from_slice(y);
println!("{:?}", public_key_bytes);
let verify_key = VerifyingKey {
cbPublicKey: public_key_bytes.len() as u32,
pbPublicKey: NonNull::new(public_key_bytes.as_mut_ptr().cast()).unwrap(),

View File

@@ -20,7 +20,7 @@ use super::{ErrorKind, WinWebAuthnError};
use crate::{
plugin::{
com::{ComBuffer, ComBufferExt},
crypto::{RequestHash, Signature, VerifyingKey},
crypto::{RequestHash, Signature},
},
util::WindowsString,
};
@@ -272,8 +272,8 @@ impl WebAuthnPlugin {
// buffers here.
let mut win_credentials = Vec::new();
for (i, cred) in credentials.iter().enumerate() {
tracing::debug!("[SYNC_TO_WIN] Converting credential {}: RP ID: {}, User: {}, Credential ID: {:?} ({} bytes), User ID: {:?} ({} bytes)",
i + 1, cred.rp_id, cred.user_name, &cred.credential_id, cred.credential_id.len(), &cred.user_id, cred.user_id.len());
tracing::debug!("[SYNC_TO_WIN] Converting credential {}: RP ID: {}, Credential ID: {:?} ({} bytes), User ID: **** ({} bytes)",
i + 1, cred.rp_id, &cred.credential_id, cred.credential_id.len(), cred.user_id.len());
// Allocate credential_id bytes with COM
let credential_id_buf = cred.credential_id.as_ref().to_com_buffer();

View File

@@ -616,7 +616,7 @@ impl PluginMakeCredentialRequest {
.map_err(|err| {
WinWebAuthnError::with_cause(
ErrorKind::WindowsInternal,
"Failed to decode get assertion request",
"Failed to decode make credential request",
err,
)
})?;
@@ -916,6 +916,7 @@ fn webauthn_encode_make_credential_response(
// GetAssertion types
#[repr(C)]
pub(super) struct WEBAUTHN_CTAPCBOR_ECC_PUBLIC_KEY {
/// Version of this structure, to allow for modifications in the future.
pub _dwVersion: u32,
@@ -942,6 +943,7 @@ pub(super) struct WEBAUTHN_CTAPCBOR_ECC_PUBLIC_KEY {
pub _pbY: *const u8,
}
#[repr(C)]
pub(super) struct WEBAUTHN_CTAPCBOR_HMAC_SALT_EXTENSION {
/// Version of this structure, to allow for modifications in the future.
pub _dwVersion: u32,