Skip to content

Commit 0aac176

Browse files
committed
Updated ecdh code to fix error
1 parent aca8c3e commit 0aac176

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

cli/src/helper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub fn write_device_state(
129129
.map_err(CLIError::SerdeJSON)
130130
}
131131
pub fn tokio_runtime() -> tokio::runtime::Runtime {
132-
tokio::runtime::Builder::new_multi_thread()
132+
tokio::runtime::Builder::new_current_thread()
133133
.enable_all()
134134
.build()
135135
.expect("can't make async runtime")

src/crypto/ecdh.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::convert::TryInto;
55
pub enum Error {
66
KeyGenerationProblem,
77
EarlyPublicKeyAgreementKey,
8+
Unspecfied,
89
}
910

1011
#[derive(Clone)]
@@ -63,8 +64,7 @@ impl PrivateKey {
6364
ring::agreement::agree_ephemeral(
6465
self.key,
6566
&ring::agreement::UnparsedPublicKey::new(&ring::agreement::ECDH_P256, p_key.as_ref()),
66-
Error::EarlyPublicKeyAgreementKey,
67-
|b| Ok(kdf(b)),
68-
)
67+
kdf
68+
).map_err(|_| Error::EarlyPublicKeyAgreementKey)
6969
}
7070
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//!
88
// No STD disabled until https://github.com/rust-lang/rust/pull/69033 goes stable/nightly.
99
//#![no_std]
10-
#![deny(broken_intra_doc_links)]
10+
#![deny(rustdoc::broken_intra_doc_links)]
1111
//Might re-enable clippy::restriction later.
1212
#![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo)]
1313
#![allow(

src/net.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ impl<'a> PrivateHeader<'a> {
571571
ivi: IVI,
572572
nid: NID,
573573
deobfuscated_header: &'a DeobfuscatedHeader,
574-
) -> PrivateHeader {
574+
) -> PrivateHeader<'a> {
575575
PrivateHeader {
576576
ivi,
577577
nid,

0 commit comments

Comments
 (0)