diff --git a/tuic-quinn/Cargo.toml b/tuic-quinn/Cargo.toml index c430129..9362786 100644 --- a/tuic-quinn/Cargo.toml +++ b/tuic-quinn/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tuic-quinn" -version = "0.1.0-pre-alpha1" +version = "0.1.0-pre-alpha2" authors = ["EAimTY "] description = "A thin layer on top of quinn to provide functions for TUIC" categories = ["network-programming"] @@ -16,5 +16,5 @@ bytes = { version = "1.4.0", default-features = false, features = ["std"] } futures-util = { version = "0.3.26", default-features = false, features = ["io", "std"] } quinn = { version = "0.9.3", default-features = false, features = ["futures-io"] } thiserror = { version = "1.0.38", default-features = false } -tuic = { version = "5.0.0-pre-alpha5", default-features = false, features = ["async_marshal", "marshal", "model"] } +tuic = { version = "5.0.0-pre-alpha6", default-features = false, features = ["async_marshal", "marshal", "model"] } uuid = { version = "1.3.0", default-features = false, features = ["std"] } diff --git a/tuic-quinn/src/lib.rs b/tuic-quinn/src/lib.rs index d3fab8b..2fcfc09 100644 --- a/tuic-quinn/src/lib.rs +++ b/tuic-quinn/src/lib.rs @@ -128,7 +128,7 @@ impl Connection { pub async fn authenticate(&self, uuid: Uuid, password: impl AsRef<[u8]>) -> Result<(), Error> { let model = self .model - .send_authenticate(uuid, password, self.keying_material_exporter()); + .send_authenticate(uuid, password, &self.keying_material_exporter()); let mut send = self.conn.open_uni().await?; model.header().async_marshal(&mut send).await?; @@ -380,8 +380,8 @@ impl Authenticate { } /// Validates if the given password is matching the hashed token. - pub fn validate(self, password: impl AsRef<[u8]>) -> bool { - self.model.is_valid(password, self.exporter) + pub fn validate(&self, password: impl AsRef<[u8]>) -> bool { + self.model.is_valid(password, &self.exporter) } }