Struct rcgen::CertificateSigningRequest
source · [−]pub struct CertificateSigningRequest {
pub params: CertificateParams,
pub public_key: PublicKey,
}
Expand description
Data for a certificate signing request
Fields
params: CertificateParams
public_key: PublicKey
Implementations
sourceimpl CertificateSigningRequest
impl CertificateSigningRequest
sourcepub fn from_pem(pem_str: &str) -> Result<Self, RcgenError>
pub fn from_pem(pem_str: &str) -> Result<Self, RcgenError>
Parse a certificate signing request from the ASCII PEM format
See from_der
for more details.
sourcepub fn from_der(csr: &[u8]) -> Result<Self, RcgenError>
pub fn from_der(csr: &[u8]) -> Result<Self, RcgenError>
Parse a certificate signing request from DER-encoded bytes
Currently, this only supports the Subject Alternative Name
extension.
On encountering other extensions, this function will return an error.
sourcepub fn serialize_der_with_signer(
&self,
ca: &Certificate
) -> Result<Vec<u8>, RcgenError>
pub fn serialize_der_with_signer(
&self,
ca: &Certificate
) -> Result<Vec<u8>, RcgenError>
Serializes the requested certificate, signed with another certificate’s key, in binary DER format
sourcepub fn serialize_pem_with_signer(
&self,
ca: &Certificate
) -> Result<String, RcgenError>
pub fn serialize_pem_with_signer(
&self,
ca: &Certificate
) -> Result<String, RcgenError>
Serializes the requested certificate, signed with another certificate’s key, to the ASCII PEM format
This function is only available if rcgen is built with the “pem” feature
Auto Trait Implementations
impl !RefUnwindSafe for CertificateSigningRequest
impl Send for CertificateSigningRequest
impl Sync for CertificateSigningRequest
impl Unpin for CertificateSigningRequest
impl !UnwindSafe for CertificateSigningRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more