File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -447,6 +447,38 @@ impl<T> PkeyCtxRef<T> {
447
447
Ok ( ( ) )
448
448
}
449
449
450
+ /// Sets the DH paramgen prime length.
451
+ ///
452
+ /// This is only useful for DH keys.
453
+ #[ corresponds( EVP_PKEY_CTX_set_dh_paramgen_prime_len ) ]
454
+ #[ inline]
455
+ pub fn set_dh_paramgen_prime_len ( & mut self , bits : u32 ) -> Result < ( ) , ErrorStack > {
456
+ unsafe {
457
+ cvt ( ffi:: EVP_PKEY_CTX_set_dh_paramgen_prime_len (
458
+ self . as_ptr ( ) ,
459
+ bits as i32 ,
460
+ ) ) ?;
461
+ }
462
+
463
+ Ok ( ( ) )
464
+ }
465
+
466
+ /// Sets the DH paramgen generator.
467
+ ///
468
+ /// This is only useful for DH keys.
469
+ #[ corresponds( EVP_PKEY_CTX_set_dh_paramgen_generator ) ]
470
+ #[ inline]
471
+ pub fn set_dh_paramgen_generator ( & mut self , bits : u32 ) -> Result < ( ) , ErrorStack > {
472
+ unsafe {
473
+ cvt ( ffi:: EVP_PKEY_CTX_set_dh_paramgen_generator (
474
+ self . as_ptr ( ) ,
475
+ bits as i32 ,
476
+ ) ) ?;
477
+ }
478
+
479
+ Ok ( ( ) )
480
+ }
481
+
450
482
/// Sets the DSA paramgen bits.
451
483
///
452
484
/// This is only useful for DSA keys.
You can’t perform that action at this time.
0 commit comments