Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions libwebauthn/src/ops/u2f.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ use crate::proto::ctap1::{Ctap1RegisterRequest, Ctap1SignRequest};
use crate::proto::ctap1::{Ctap1RegisterResponse, Ctap1SignResponse};
use crate::proto::ctap2::cbor;
use crate::proto::ctap2::{
Ctap2AttestationStatement, Ctap2COSEAlgorithmIdentifier, Ctap2GetAssertionResponse,
Ctap2MakeCredentialResponse, Ctap2PublicKeyCredentialDescriptor, Ctap2PublicKeyCredentialType,
FidoU2fAttestationStmt,
Ctap2AttestationStatement, Ctap2GetAssertionResponse, Ctap2MakeCredentialResponse,
Ctap2PublicKeyCredentialDescriptor, Ctap2PublicKeyCredentialType, FidoU2fAttestationStmt,
};
use crate::webauthn::{CtapError, Error};

Expand Down Expand Up @@ -132,9 +131,8 @@ impl UpgradableResponse<MakeCredentialResponse, MakeCredentialRequest> for Regis
// Note: An ASN.1-encoded ECDSA signature value ranges over 8–72 bytes in length. [U2FRawMsgs] incorrectly
// states a different length range.
let attestation_statement = Ctap2AttestationStatement::FidoU2F(FidoU2fAttestationStmt {
algorithm: Ctap2COSEAlgorithmIdentifier::ES256,
signature: ByteBuf::from(self.signature.clone()),
certificates: vec![ByteBuf::from(self.attestation.clone())],
certificate: ByteBuf::from(self.attestation.clone()),
});

// Let attestationObject be a CBOR map (see "attObj" in Generating an Attestation Object [WebAuthn]) with the
Expand Down
5 changes: 1 addition & 4 deletions libwebauthn/src/proto/ctap2/model/get_assertion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,11 @@ pub struct PackedAttestationStmt {

#[derive(Debug, Clone, Deserialize)]
pub struct FidoU2fAttestationStmt {
#[serde(rename = "alg")]
pub algorithm: Ctap2COSEAlgorithmIdentifier,

#[serde(rename = "sig")]
pub signature: ByteBuf,

#[serde(rename = "x5c")]
pub certificates: Vec<ByteBuf>,
pub certificate: ByteBuf,
}

#[derive(Debug, Clone, Deserialize)]
Expand Down
Loading