fix: use repaired version of jsonwebkey convert lib
This commit is contained in:
parent
fe5e2dcd97
commit
7a19b5a138
3 changed files with 16 additions and 15 deletions
|
|
@ -1,5 +1,7 @@
|
|||
use jsonwebkey_convert::RSAPublicKey;
|
||||
use jsonwebkey_convert::der::FromPem;
|
||||
use std::str::FromStr;
|
||||
|
||||
use jsonwebkey_convert_repaired::RSAPublicKey;
|
||||
use jsonwebkey_convert_repaired::der::FromPem;
|
||||
|
||||
use axum::{extract::State, response::IntoResponse, Json};
|
||||
use fully_pub::fully_pub;
|
||||
|
|
@ -33,12 +35,11 @@ pub async fn get_signing_public_keys(
|
|||
State(app_state): State<AppState>,
|
||||
) -> impl IntoResponse {
|
||||
let pem_data = app_state.secrets.signing_keypair.0;
|
||||
|
||||
|
||||
// extract modulus and exp number from ASN.1 encoded PCKS 1 package
|
||||
let rsa_jwk = RSAPublicKey::from_pem(pem_data)
|
||||
.expect("Expected to decode PEM public key");
|
||||
dbg!(&rsa_jwk);
|
||||
|
||||
.expect("Failed to extract RSA public key from PEM");
|
||||
|
||||
Json(JWKs {
|
||||
keys: vec![rsa_jwk]
|
||||
}).into_response()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue