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

Ref #54: Drop ctap-types fork & move to cosey crate (fork) #84

Merged
merged 2 commits into from
Feb 24, 2025
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
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "solo/src/ext"]
path = solo/src/ext
url = https://github.com/AlfioEmanueleFresta/solo.git
[submodule "ctap-types"]
path = ctap-types
url = https://github.com/AlfioEmanueleFresta/ctap-types.git
[submodule "cosey"]
path = cosey
url = https://github.com/AlfioEmanueleFresta/cosey.git
139 changes: 112 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cosey
Submodule cosey added at 3d30a0
1 change: 0 additions & 1 deletion ctap-types
Submodule ctap-types deleted from 295dca
5 changes: 3 additions & 2 deletions libwebauthn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ futures = "0.3.5"
tokio = { version = "1.1.1", features = ["full"] }
serde = "1.0.110"
serde_cbor = "0.11.1"
serde-indexed = "=0.1.0"
serde-indexed = "0.1.1"
serde_derive = "1.0.123"
serde_repr = "0.1.6"
serde_bytes = "0.11.5"
Expand All @@ -53,7 +53,6 @@ aes = "0.8.2"
hmac = "0.12.1"
cbc = { version = "0.1", features = ["alloc"] }
hkdf = "0.12"
ctap-types = { path = "../ctap-types", features = ["alloc"] }
solo = { path = "../solo", optional = true }
text_io = "0.1"
tungstenite = { version = "0.20.1" }
Expand All @@ -62,6 +61,8 @@ tokio-tungstenite = { version = "0.20.1", features = [
] }
tokio-stream = "0.1.4"
snow = { version = "0.10.0-alpha.1", features = ["use-p256"] }
cosey = { path = "../cosey" }
ctap-types = { version = "0.3.2" }

[dev-dependencies]
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
Expand Down
2 changes: 1 addition & 1 deletion libwebauthn/src/fido.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
use ctap_types::cose::PublicKey;
use cosey::PublicKey;
use serde::{
de::{DeserializeOwned, Error as DesError, Visitor},
ser::Error as SerError,
Expand Down
2 changes: 1 addition & 1 deletion libwebauthn/src/ops/u2f.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::time::Duration;

use ctap_types::cose;
use cosey as cose;
use serde_bytes::ByteBuf;
use serde_cbor::to_vec;
use sha2::{Digest, Sha256};
Expand Down
2 changes: 1 addition & 1 deletion libwebauthn/src/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use super::transport::error::Error;
use aes::cipher::{block_padding::NoPadding, BlockDecryptMut};
use async_trait::async_trait;
use cbc::cipher::{BlockEncryptMut, KeyIvInit};
use ctap_types::cose;
use cosey as cose;
use hkdf::Hkdf;
use hmac::Mac;
use p256::{
Expand Down
6 changes: 0 additions & 6 deletions libwebauthn/src/proto/ctap2/model/authenticator_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ pub struct Ctap2AuthenticatorConfigRequest {
pub subcommand: Ctap2AuthenticatorConfigCommand,

// subCommandParams (0x02)
#[serde(default)]
#[serde(skip_serializing_if = "Option::is_none")]
pub subcommand_params: Option<Ctap2AuthenticatorConfigParams>,

///pinUvAuthProtocol (0x03)
#[serde(default)]
#[serde(skip_serializing_if = "Option::is_none")]
pub protocol: Option<Ctap2PinUvAuthProtocol>,

/// pinUvAuthParam (0x04):
#[serde(default)]
#[serde(skip_serializing_if = "Option::is_none")]
pub uv_auth_param: Option<ByteBuf>,
}
Expand Down Expand Up @@ -112,17 +109,14 @@ pub enum Ctap2AuthenticatorConfigParams {
#[serde_indexed(offset = 1)]
pub struct Ctap2SetMinPINLengthParams {
// newMinPINLength (0x01)
#[serde(default)]
#[serde(skip_serializing_if = "Option::is_none")]
pub new_min_pin_length: Option<u64>,

// minPinLengthRPIDs (0x02)
#[serde(default)]
#[serde(skip_serializing_if = "Option::is_none")]
pub min_pin_length_rpids: Option<Vec<String>>,

// forceChangePin (0x03)
#[serde(default)]
#[serde(skip_serializing_if = "Option::is_none")]
pub force_change_pin: Option<bool>,
}
Loading
Loading