Skip to content

Commit

Permalink
Add enterprise attestation support to get_assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey committed Jun 27, 2024
1 parent fd403fd commit a62ef30
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add support for the `thirdPartyPayment` extension behind a `third-party-payment` feature (disabled by default)
- Add new fields to `get_info`
- Add unsigned extension outputs to `make_credential` and `get_assertion`
- Add enterprise attestation support to `get_assertion`

## [0.2.0] - 2024-06-21

Expand Down
2 changes: 2 additions & 0 deletions src/arbitrary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ impl<'a> Arbitrary<'a> for ctap2::get_assertion::Request<'a> {
None
};
let pin_protocol = u.arbitrary()?;
let enterprise_attestation = u.arbitrary()?;
Ok(Self {
rp_id,
client_data_hash,
Expand All @@ -145,6 +146,7 @@ impl<'a> Arbitrary<'a> for ctap2::get_assertion::Request<'a> {
options,
pin_auth,
pin_protocol,
enterprise_attestation,
})
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/ctap2/get_assertion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ pub struct Request<'a> {
pub pin_auth: Option<&'a serde_bytes::Bytes>,
#[serde(skip_serializing_if = "Option::is_none")]
pub pin_protocol: Option<u32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub enterprise_attestation: Option<u32>,
}

// NB: attn object definition / order at end of
Expand All @@ -125,6 +127,8 @@ pub struct Response {
pub large_blob_key: Option<ByteArray<32>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub unsigned_extension_outputs: Option<UnsignedExtensionOutputs>,
#[serde(skip_serializing_if = "Option::is_none")]
pub ep_att: Option<bool>,
}

#[derive(Debug)]
Expand All @@ -146,6 +150,7 @@ impl ResponseBuilder {
user_selected: None,
large_blob_key: None,
unsigned_extension_outputs: None,
ep_att: None,
}
}
}
Expand Down

0 comments on commit a62ef30

Please sign in to comment.