Skip to content

Commit e522dc4

Browse files
committed
pkey_ctx: dh params generation test
1 parent 8adc97e commit e522dc4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

openssl/src/pkey_ctx.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,15 @@ mod test {
990990
ctx.keygen().unwrap();
991991
}
992992

993+
#[test]
994+
fn dh_paramgen() {
995+
let mut ctx = PkeyCtx::new_id(Id::DH).unwrap();
996+
ctx.paramgen_init().unwrap();
997+
ctx.set_dh_paramgen_prime_len(512).unwrap();
998+
ctx.set_dh_paramgen_generator(2).unwrap();
999+
ctx.paramgen().unwrap();
1000+
}
1001+
9931002
#[test]
9941003
#[cfg(not(boringssl))]
9951004
fn dsa_paramgen() {

0 commit comments

Comments
 (0)