Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make_credential: Make att_stmt optional in Response #50

Merged
merged 1 commit into from
Jun 21, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Use references where possible
- Put uncommon fields in `get_info` behind `get-info-full` feature flag and add fields for CTAP 2.1
- Use byte arrays instead of slices or Bytes<_> where possible
- Make `att_stmt` optional in `make_credential::Response`, preparing for CTAP 2.2

[#8]: https://github.com/trussed-dev/ctap-types/pull/8
[#9]: https://github.com/solokeys/ctap-types/issues/9
Expand Down
6 changes: 3 additions & 3 deletions src/ctap2/make_credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ impl<'a> super::SerializeAttestedCredentialData for AttestedCredentialData<'a> {
pub struct Response {
pub fmt: String<32>,
pub auth_data: super::SerializedAuthenticatorData,
pub att_stmt: AttestationStatement,
#[serde(skip_serializing_if = "Option::is_none")]
pub att_stmt: Option<AttestationStatement>,
#[serde(skip_serializing_if = "Option::is_none")]
pub ep_att: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
Expand All @@ -116,7 +117,6 @@ pub struct Response {
pub struct ResponseBuilder {
pub fmt: String<32>,
pub auth_data: super::SerializedAuthenticatorData,
pub att_stmt: AttestationStatement,
}

impl ResponseBuilder {
Expand All @@ -125,7 +125,7 @@ impl ResponseBuilder {
Response {
fmt: self.fmt,
auth_data: self.auth_data,
att_stmt: self.att_stmt,
att_stmt: None,
ep_att: None,
large_blob_key: None,
}
Expand Down
Loading