Skip to content

Commit 32a6f2b

Browse files
committed
pkey_ctx: add set dsa paramgen bits
1 parent 01651dd commit 32a6f2b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

openssl/src/pkey_ctx.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,22 @@ impl<T> PkeyCtxRef<T> {
447447
Ok(())
448448
}
449449

450+
/// Sets the DSA paramgen bits.
451+
///
452+
/// This is only useful for DSA keys.
453+
#[corresponds(EVP_PKEY_CTX_set_dsa_paramgen_bits)]
454+
#[inline]
455+
pub fn set_dsa_paramgen_bits(&mut self, bits: u32) -> Result<(), ErrorStack> {
456+
unsafe {
457+
cvt(ffi::EVP_PKEY_CTX_set_dsa_paramgen_bits(
458+
self.as_ptr(),
459+
bits as i32,
460+
))?;
461+
}
462+
463+
Ok(())
464+
}
465+
450466
/// Returns the RSA padding mode in use.
451467
///
452468
/// This is only useful for RSA keys.

0 commit comments

Comments
 (0)