On-the-fly certificate forgery
This commit is contained in:
parent
191a05236f
commit
28d623fc3d
8 changed files with 920 additions and 447 deletions
17
src/main.rs
17
src/main.rs
|
|
@ -106,7 +106,14 @@ struct OptPrint {
|
|||
#[cfg(feature = "record")]
|
||||
#[derive(FromArgs)]
|
||||
#[argp(subcommand, name = "record")]
|
||||
struct OptRecord {}
|
||||
struct OptRecord {
|
||||
/// Path to the CAs directory
|
||||
#[argp(positional)]
|
||||
ca_dir: String,
|
||||
/// Path to the directory to store certificates
|
||||
#[argp(positional)]
|
||||
certs_dir: String,
|
||||
}
|
||||
|
||||
/// Record traffic
|
||||
#[derive(FromArgs)]
|
||||
|
|
@ -179,7 +186,13 @@ async fn main() {
|
|||
record::print_records(&records, subopt.number);
|
||||
}
|
||||
#[cfg(feature = "record")]
|
||||
Subcommand::Record(_subopt) => {
|
||||
Subcommand::Record(subopt) => {
|
||||
record::CERTIFICATES
|
||||
.set(record::LyingCertificateRegistry::new(
|
||||
&subopt.ca_dir,
|
||||
&subopt.certs_dir,
|
||||
))
|
||||
.unwrap();
|
||||
record::make_record(&opt.record_file);
|
||||
}
|
||||
Subcommand::Remove(subopt) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue