Struct CertificateSigningRequestParams
pub struct CertificateSigningRequestParams {
pub params: CertificateParams,
pub public_key: PublicKey,
}rustls or boring or acme) and crate feature rustls only.Expand description
Parameters for a certificate signing request
Fields§
§params: CertificateParamsParameters for the certificate to be signed.
public_key: PublicKeyPublic key to include in the certificate signing request.
Implementations§
§impl CertificateSigningRequestParams
impl CertificateSigningRequestParams
pub fn from_pem(pem_str: &str) -> Result<CertificateSigningRequestParams, Error>
Available on crate features pem and x509-parser only.
pub fn from_pem(pem_str: &str) -> Result<CertificateSigningRequestParams, Error>
pem and x509-parser only.Parse and verify a certificate signing request from the ASCII PEM format
See from_der for more details.
pub fn from_der(
csr: &CertificateSigningRequestDer<'_>,
) -> Result<CertificateSigningRequestParams, Error>
Available on crate feature x509-parser only.
pub fn from_der( csr: &CertificateSigningRequestDer<'_>, ) -> Result<CertificateSigningRequestParams, Error>
x509-parser only.Parse and verify a certificate signing request from DER-encoded bytes
Currently, this supports the following extensions:
Subject Alternative Name(seeSanType)Key Usage(seeKeyUsagePurpose)Extended Key Usage(seeExtendedKeyUsagePurpose)
On encountering other extensions, this function will return Error::UnsupportedExtension.
If the request’s signature is invalid, it will return
Error::InvalidCertificationRequestSignature.
The PemObject trait is often used to obtain a CertificateSigningRequestDer from
PEM input. If you already have a byte slice containing DER, it can trivially be converted
into CertificateSigningRequestDer using the Into trait.
pub fn signed_by(
&self,
issuer: &Issuer<'_, impl SigningKey>,
) -> Result<Certificate, Error>
pub fn signed_by( &self, issuer: &Issuer<'_, impl SigningKey>, ) -> Result<Certificate, Error>
Generate a new certificate based on the requested parameters, signed by the provided issuer.
The returned certificate will have its issuer field set to the subject of the provided
issuer, and the authority key identifier extension will be populated using the subject
public key of issuer. It will be signed by issuer_key.
Note that no validation of the issuer certificate is performed. Rcgen will not require
the certificate to be a CA certificate, or have key usage extensions that allow signing.
The returned Certificate may be serialized using Certificate::der and
Certificate::pem.
Trait Implementations§
§impl Clone for CertificateSigningRequestParams
impl Clone for CertificateSigningRequestParams
§fn clone(&self) -> CertificateSigningRequestParams
fn clone(&self) -> CertificateSigningRequestParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for CertificateSigningRequestParams
impl Debug for CertificateSigningRequestParams
impl Eq for CertificateSigningRequestParams
impl StructuralPartialEq for CertificateSigningRequestParams
Auto Trait Implementations§
impl Freeze for CertificateSigningRequestParams
impl !RefUnwindSafe for CertificateSigningRequestParams
impl Send for CertificateSigningRequestParams
impl Sync for CertificateSigningRequestParams
impl Unpin for CertificateSigningRequestParams
impl !UnwindSafe for CertificateSigningRequestParams
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more