Skip to content

Commit

Permalink
fix building cable docs
Browse files Browse the repository at this point in the history
  • Loading branch information
micolous committed Mar 29, 2023
1 parent fcbaeab commit 98eca71
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ cable-tunnel-server-common = { path = "./cable-tunnel-server/common" }
clap = { version = "^3.2", features = ["derive", "env"] }
futures = "^0.3.25"
hex = { version = "0.4.3" }
http = "^0.2.9"
http-body = "=1.0.0-rc.2"
http-body-util = "=0.1.0-rc.2"
hyper = { version = "=1.0.0-rc.3", default-features = false, features = ["http1"] }
Expand Down
3 changes: 1 addition & 2 deletions webauthn-authenticator-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bluetooth = ["btleplug"]

# caBLE / hybrid authenticator
cable-localhost-tunnel = []
cable = ["bluetooth", "hex", "http", "tokio", "tokio-tungstenite", "qrcode"]
cable = ["bluetooth", "hex", "tokio", "tokio-tungstenite", "qrcode"]
nfc = ["pcsc"]
usb = ["hidapi"]
win10 = ["windows"]
Expand Down Expand Up @@ -57,7 +57,6 @@ num-traits = "0.2"
num-derive = "0.3"
async-trait = "0.1.58"
futures.workspace = true
http = { workspace = true, optional = true }

qrcode = { version = "^0.12.0", optional = true }
# btleplug pinned due to https://github.com/deviceplug/btleplug/issues/289
Expand Down
3 changes: 1 addition & 2 deletions webauthn-authenticator-rs/src/cable/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#[cfg(doc)]
use crate::stubs::*;

use http::uri::Builder;
use num_traits::ToPrimitive;
use openssl::{
ec::EcKey,
Expand All @@ -12,7 +11,7 @@ use openssl::{
sign::Signer,
};
use std::mem::size_of;
use tokio_tungstenite::tungstenite::http::Uri;
use tokio_tungstenite::tungstenite::http::{uri::Builder, Uri};

use crate::{
cable::{btle::*, handshake::*, tunnel::get_domain, CableRequestType, Psk},
Expand Down
6 changes: 4 additions & 2 deletions webauthn-authenticator-rs/src/cable/tunnel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use std::fmt::Debug;

use async_trait::async_trait;
use futures::{SinkExt, StreamExt};
use http::{uri::Builder, Uri};
use openssl::{
ec::EcKeyRef,
pkey::{Private, Public},
Expand All @@ -20,7 +19,10 @@ use tokio_tungstenite::{
connect_async,
tungstenite::{client::IntoClientRequest, http::HeaderValue, Message},
};
use tokio_tungstenite::{MaybeTlsStream, WebSocketStream};
use tokio_tungstenite::{
tungstenite::http::{uri::Builder, Uri},
MaybeTlsStream, WebSocketStream,
};
use webauthn_rs_proto::AuthenticatorTransport;

use crate::{
Expand Down
3 changes: 3 additions & 0 deletions webauthn-authenticator-rs/src/stubs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ pub mod tokio_tungstenite {
pub mod tungstenite {
pub mod http {
pub struct Uri {}
pub mod uri {
pub struct Builder {}
}
}
}
pub struct MaybeTlsStream<T> {}
Expand Down

0 comments on commit 98eca71

Please sign in to comment.