diff --git a/Cargo.lock b/Cargo.lock index 5c4de43..1d03546 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -247,6 +247,7 @@ dependencies = [ "clap", "image 0.22.5", "qrcode", + "openssl", "reqwest", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 4ee1313..b3dbf46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ base32 = "0.4.0" base64 = "0.13.0" clap = "2.33.3" image = "0.22" +openssl = "0.10" qrcode = "0.12.0" reqwest = { version = "0.11.3", features = ["blocking"] } serde = "1.0.126" diff --git a/src/main.rs b/src/main.rs index d15b7ee..cd070cf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -49,6 +49,10 @@ fn fetch_api_details(authority: &str, code: &str, counter: u32) -> String { ("language", "en"), ("model", "Pixel 3a"), ("security_patch_level", "2021-02-01"), + ("pkpush", "rsa-sha512"), + ("pubkey", std::str::from_utf8( + &openssl::rsa::Rsa::generate(2048).unwrap().public_key_to_pem().unwrap() + ).unwrap()), ]) .build() .unwrap();