Skip to content

Commit

Permalink
provide RSA public key when making request
Browse files Browse the repository at this point in the history
fix "Signature type is not supported" error (char#1)
  • Loading branch information
twassman authored Oct 15, 2024
1 parent 608ba4c commit cd2b0a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use openssl::rsa::Rsa;
use reqwest::{blocking::Client, header::USER_AGENT};
use serde_json::Value;

Expand Down Expand Up @@ -49,6 +50,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(
&Rsa::generate(2048).unwrap().public_key_to_pem().unwrap()
).unwrap()),
])
.build()
.unwrap();
Expand Down

0 comments on commit cd2b0a7

Please sign in to comment.