Skip to content

Commit

Permalink
test: Add test-case for ecdsa
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernauer committed Apr 8, 2024
1 parent 985c11d commit 6066293
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions crates/stackable-certs/src/ca/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,14 +477,16 @@ mod test {
use super::*;

#[tokio::test]
async fn test() {
async fn test_rsa_key_generation() {
let mut ca = CertificateAuthority::new_rsa().unwrap();
ca.generate_leaf_certificate(
rsa::SigningKey::new().unwrap(),
"Airflow",
"pod",
Duration::from_secs(3600),
)
.unwrap();
ca.generate_rsa_leaf_certificate("Airflow", "pod", Duration::from_secs(3600))
.unwrap();
}

#[tokio::test]
async fn test_ecdsa_key_generation() {
let mut ca = CertificateAuthority::new_ecdsa().unwrap();
ca.generate_ecdsa_leaf_certificate("Airflow", "pod", Duration::from_secs(3600))
.unwrap();
}
}

0 comments on commit 6066293

Please sign in to comment.