We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65e76d5 commit 1942db4Copy full SHA for 1942db4
openssl/src/pkey_ctx.rs
@@ -994,6 +994,28 @@ mod test {
994
ctx.keygen().unwrap();
995
}
996
997
+ #[test]
998
+ #[cfg(not(boringssl))]
999
+ fn dh_paramgen() {
1000
+ let mut ctx = PkeyCtx::new_id(Id::DH).unwrap();
1001
+ ctx.paramgen_init().unwrap();
1002
+ ctx.set_dh_paramgen_prime_len(512).unwrap();
1003
+ ctx.set_dh_paramgen_generator(2).unwrap();
1004
+ let params = ctx.paramgen().unwrap();
1005
+
1006
+ let size = {
1007
+ cfg_if! {
1008
+ if #[cfg(any(libressl, all(ossl101, not(ossl102))))] {
1009
+ // LibreSSL and OpenSSL 1.0.1 and earlier
1010
+ 48
1011
+ } else {
1012
+ 64
1013
+ }
1014
1015
+ };
1016
+ assert_eq!(params.size(), size);
1017
1018
1019
#[test]
1020
#[cfg(not(boringssl))]
1021
fn dsa_paramgen() {
0 commit comments