File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -822,6 +822,7 @@ impl<T> PkeyCtxRef<T> {
822
822
823
823
#[ cfg( test) ]
824
824
mod test {
825
+ use cfg_if:: cfg_if;
825
826
use super :: * ;
826
827
#[ cfg( not( any( boringssl, awslc) ) ) ]
827
828
use crate :: cipher:: Cipher ;
@@ -958,6 +959,28 @@ mod test {
958
959
ctx. keygen ( ) . unwrap ( ) ;
959
960
}
960
961
962
+ #[ test]
963
+ #[ cfg( not( boringssl) ) ]
964
+ fn dsa_paramgen ( ) {
965
+ let mut ctx = PkeyCtx :: new_id ( Id :: DSA ) . unwrap ( ) ;
966
+ ctx. paramgen_init ( ) . unwrap ( ) ;
967
+ ctx. set_dsa_paramgen_bits ( 2048 ) . unwrap ( ) ;
968
+ let params = ctx. paramgen ( ) . unwrap ( ) ;
969
+
970
+ let size = {
971
+ cfg_if ! {
972
+ if #[ cfg( awslc) ] {
973
+ 72
974
+ } else if #[ cfg( libressl) ] {
975
+ 48
976
+ } else {
977
+ 64
978
+ }
979
+ }
980
+ } ;
981
+ assert_eq ! ( params. size( ) , size) ;
982
+ }
983
+
961
984
#[ test]
962
985
#[ cfg( any( ossl110, boringssl, libressl360, awslc) ) ]
963
986
fn hkdf ( ) {
You can’t perform that action at this time.
0 commit comments