Skip to content

Commit

Permalink
KeyPair to RsaKeyPair
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Jan 25, 2024
1 parent 89b9160 commit 67bfbe7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aws-lc-rs/tests/rsa_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,11 @@ macro_rules! generate_fips_encode_decode {
#[cfg(feature = "fips")]
#[test]
fn $name() {
let private_key = KeyPair::generate_fips($size).expect("generation");
let private_key = RsaKeyPair::generate_fips($size).expect("generation");

let pkcs8v1 = private_key.as_der().expect("encoded");

let private_key = KeyPair::from_pkcs8(pkcs8v1.as_ref()).expect("decoded");
let private_key = RsaKeyPair::from_pkcs8(pkcs8v1.as_ref()).expect("decoded");

let public_key = crate::signature::KeyPair::public_key(&private_key);

Expand All @@ -322,7 +322,7 @@ macro_rules! generate_fips_encode_decode {
#[cfg(feature = "fips")]
#[test]
fn $name() {
let _ = KeyPair::generate_fips($size).expect_err("should fail for key size");
let _ = RsaKeyPair::generate_fips($size).expect_err("should fail for key size");
}
};
}
Expand Down

0 comments on commit 67bfbe7

Please sign in to comment.