WIP: Auto-convert confid code
This commit is contained in:
parent
6f648b6556
commit
eb0a567405
5 changed files with 1619 additions and 2 deletions
22
Cargo.lock
generated
22
Cargo.lock
generated
|
@ -340,6 +340,26 @@ dependencies = [
|
|||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.40"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "1.0.40"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "umskt"
|
||||
version = "0.1.0"
|
||||
|
@ -347,8 +367,10 @@ dependencies = [
|
|||
"anyhow",
|
||||
"bitreader",
|
||||
"clap",
|
||||
"libc",
|
||||
"openssl",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -9,5 +9,7 @@ edition = "2021"
|
|||
anyhow = "1.0.71"
|
||||
bitreader = "0.3.7"
|
||||
clap = { version = "4.3.4", features = ["derive"] }
|
||||
libc = "0.2.146"
|
||||
openssl = { git = "https://github.com/anpage/rust-openssl.git" }
|
||||
serde_json = "1.0"
|
||||
thiserror = "1.0.40"
|
||||
|
|
|
@ -9,7 +9,7 @@ use openssl::{
|
|||
};
|
||||
use serde_json::{from_reader, from_str};
|
||||
|
||||
use crate::{bink1998, bink2002, crypto::initialize_elliptic_curve};
|
||||
use crate::{bink1998, bink2002, confid, crypto::initialize_elliptic_curve};
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Mode {
|
||||
|
@ -268,7 +268,11 @@ impl Cli {
|
|||
}
|
||||
|
||||
fn confirmation_id(&mut self) -> Result<()> {
|
||||
todo!()
|
||||
if let Some(instid) = &self.options.instid {
|
||||
let confirmation_id = confid::generate(instid)?;
|
||||
println!("Confirmation ID: {confirmation_id}");
|
||||
};
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn print_key(pk: &str) {
|
||||
|
|
1588
src/confid.rs
Normal file
1588
src/confid.rs
Normal file
File diff suppressed because it is too large
Load diff
|
@ -3,6 +3,7 @@ use anyhow::Result;
|
|||
mod bink1998;
|
||||
mod bink2002;
|
||||
mod cli;
|
||||
mod confid;
|
||||
mod crypto;
|
||||
mod key;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue