Loading openssl/src/pkey_ctx.rs +17 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ let cmac_key = ctx.keygen().unwrap(); use crate::cipher::CipherRef; use crate::error::ErrorStack; use crate::md::MdRef; use crate::nid::Nid; use crate::pkey::{HasPrivate, HasPublic, Id, PKey, PKeyRef, Params, Private}; use crate::rsa::Padding; use crate::sign::RsaPssSaltlen; Loading Loading @@ -463,6 +464,22 @@ impl<T> PkeyCtxRef<T> { Ok(()) } /// Sets the EC paramgen curve NID. /// /// This is only useful for EC keys. #[corresponds(EVP_PKEY_CTX_set_ec_paramgen_curve_nid)] #[inline] pub fn set_ec_paramgen_curve_nid(&mut self, nid: Nid) -> Result<(), ErrorStack> { unsafe { cvt(ffi::EVP_PKEY_CTX_set_ec_paramgen_curve_nid( self.as_ptr(), nid.as_raw(), ))?; } Ok(()) } /// Returns the RSA padding mode in use. /// /// This is only useful for RSA keys. Loading Loading
openssl/src/pkey_ctx.rs +17 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ let cmac_key = ctx.keygen().unwrap(); use crate::cipher::CipherRef; use crate::error::ErrorStack; use crate::md::MdRef; use crate::nid::Nid; use crate::pkey::{HasPrivate, HasPublic, Id, PKey, PKeyRef, Params, Private}; use crate::rsa::Padding; use crate::sign::RsaPssSaltlen; Loading Loading @@ -463,6 +464,22 @@ impl<T> PkeyCtxRef<T> { Ok(()) } /// Sets the EC paramgen curve NID. /// /// This is only useful for EC keys. #[corresponds(EVP_PKEY_CTX_set_ec_paramgen_curve_nid)] #[inline] pub fn set_ec_paramgen_curve_nid(&mut self, nid: Nid) -> Result<(), ErrorStack> { unsafe { cvt(ffi::EVP_PKEY_CTX_set_ec_paramgen_curve_nid( self.as_ptr(), nid.as_raw(), ))?; } Ok(()) } /// Returns the RSA padding mode in use. /// /// This is only useful for RSA keys. Loading