pub struct SigningKey {
pub private_key: RsaPrivateKey,
pub certificate_der: Vec<u8>,
pub issuer_name_der: Vec<u8>,
pub serial_number: Vec<u8>,
}Expand description
A cryptographic signing key and associated X.509 certificate.
Fields§
§private_key: RsaPrivateKey§certificate_der: Vec<u8>§issuer_name_der: Vec<u8>§serial_number: Vec<u8>Implementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn generate_self_signed(common_name: &str) -> PdfResult<Self>
pub fn generate_self_signed(common_name: &str) -> PdfResult<Self>
Generates an in-memory RSA key pair and a self-signed X.509 certificate for rapid signing.
Sourcepub fn generate_self_signed_with_bits(
common_name: &str,
bits: usize,
) -> PdfResult<Self>
pub fn generate_self_signed_with_bits( common_name: &str, bits: usize, ) -> PdfResult<Self>
Generates a self-signed certificate with specified RSA key bits (e.g. 2048, 3072, 4096).
Sourcepub fn from_rsa_and_cert(private_key: RsaPrivateKey, cert_der: Vec<u8>) -> Self
pub fn from_rsa_and_cert(private_key: RsaPrivateKey, cert_der: Vec<u8>) -> Self
Creates a SigningKey from existing RSA private key and DER-encoded X.509 certificate.
Trait Implementations§
Source§impl Clone for SigningKey
impl Clone for SigningKey
Source§fn clone(&self) -> SigningKey
fn clone(&self) -> SigningKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SigningKey
impl RefUnwindSafe for SigningKey
impl Send for SigningKey
impl Sync for SigningKey
impl Unpin for SigningKey
impl UnsafeUnpin for SigningKey
impl UnwindSafe for SigningKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more