pub struct IdCsrInner<S: Signature, P: PublicKey<S>> {
pub version: PkcsVersion,
pub subject: PolyprotoDistinguishedName,
pub subject_public_key: P,
pub capabilities: Capabilities,
/* private fields */
}Expand description
In the context of PKCS #10, this is a CertificationRequestInfo:
CertificationRequestInfo ::= SEQUENCE {
version INTEGER { v1(0) } (v1,...),
subject Name,
subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
attributes [0] Attributes{{ CRIAttributes }}
}Fields§
§version: PkcsVersionPKCS#10 version. Default: 0 for PKCS#10 v1
subject: PolyprotoDistinguishedNameInformation about the subject (actor).
subject_public_key: PThe subjects’ public key: PublicKey.
capabilities: CapabilitiesCapabilities requested by the subject.
Implementations§
Source§impl<S: Signature, P: PublicKey<S>> IdCsrInner<S, P>
impl<S: Signature, P: PublicKey<S>> IdCsrInner<S, P>
Sourcepub fn new(
subject: &PolyprotoDistinguishedName,
public_key: &P,
capabilities: &Capabilities,
) -> Result<IdCsrInner<S, P>, CertificateConversionError>
pub fn new( subject: &PolyprotoDistinguishedName, public_key: &P, capabilities: &Capabilities, ) -> Result<IdCsrInner<S, P>, CertificateConversionError>
Creates a new IdCsrInner.
§Errors
This method returns an error if the resulting IdCsrInner does not pass
validation.
Sourcepub fn from_der_unchecked(
bytes: &[u8],
) -> Result<Self, CertificateConversionError>
pub fn from_der_unchecked( bytes: &[u8], ) -> Result<Self, CertificateConversionError>
Create an unchecked IdCsrInner from a byte slice containing a DER encoded PKCS #10 CSR.
§Errors
This method returns an error if:
- The byte slice does not contain a valid DER encoded X.509 certification request info.
- The certification request info cannot be converted to a polyproto
IdCsrInner.
Trait Implementations§
Source§impl<S: Clone + Signature, P: Clone + PublicKey<S>> Clone for IdCsrInner<S, P>
impl<S: Clone + Signature, P: Clone + PublicKey<S>> Clone for IdCsrInner<S, P>
Source§fn clone(&self) -> IdCsrInner<S, P>
fn clone(&self) -> IdCsrInner<S, P>
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 moreimpl<S: Eq + Signature, P: Eq + PublicKey<S>> Eq for IdCsrInner<S, P>
Source§impl<S: Signature, P: PublicKey<S>> From<IdCsrInnerActor<S, P>> for IdCsrInner<S, P>
impl<S: Signature, P: PublicKey<S>> From<IdCsrInnerActor<S, P>> for IdCsrInner<S, P>
Source§fn from(v: IdCsrInnerActor<S, P>) -> Self
fn from(v: IdCsrInnerActor<S, P>) -> Self
Converts to this type from the input type.
Source§impl<S: Signature, P: PublicKey<S>> From<IdCsrInnerHs<S, P>> for IdCsrInner<S, P>
impl<S: Signature, P: PublicKey<S>> From<IdCsrInnerHs<S, P>> for IdCsrInner<S, P>
Source§fn from(v: IdCsrInnerHs<S, P>) -> Self
fn from(v: IdCsrInnerHs<S, P>) -> Self
Converts to this type from the input type.
Source§impl<S: PartialEq + Signature, P: PartialEq + PublicKey<S>> PartialEq for IdCsrInner<S, P>
impl<S: PartialEq + Signature, P: PartialEq + PublicKey<S>> PartialEq for IdCsrInner<S, P>
Source§fn eq(&self, other: &IdCsrInner<S, P>) -> bool
fn eq(&self, other: &IdCsrInner<S, P>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<S: PartialEq + Signature, P: PartialEq + PublicKey<S>> StructuralPartialEq for IdCsrInner<S, P>
Source§impl<S: Signature, P: PublicKey<S>> TryFrom<CertReqInfo> for IdCsrInner<S, P>
impl<S: Signature, P: PublicKey<S>> TryFrom<CertReqInfo> for IdCsrInner<S, P>
Source§type Error = CertificateConversionError
type Error = CertificateConversionError
The type returned in the event of a conversion error.
Source§impl<S: Signature, P: PublicKey<S>> TryFrom<IdCsrInner<S, P>> for IdCsrInnerActor<S, P>
impl<S: Signature, P: PublicKey<S>> TryFrom<IdCsrInner<S, P>> for IdCsrInnerActor<S, P>
Source§type Error = InvalidInput
type Error = InvalidInput
The type returned in the event of a conversion error.
Source§impl<S: Signature, P: PublicKey<S>> TryFrom<IdCsrInner<S, P>> for IdCsrInnerHs<S, P>
impl<S: Signature, P: PublicKey<S>> TryFrom<IdCsrInner<S, P>> for IdCsrInnerHs<S, P>
Source§type Error = InvalidInput
type Error = InvalidInput
The type returned in the event of a conversion error.
Source§impl<S: Signature, P: PublicKey<S>> TryFrom<IdCsrInner<S, P>> for CertReqInfo
impl<S: Signature, P: PublicKey<S>> TryFrom<IdCsrInner<S, P>> for CertReqInfo
Source§type Error = CertificateConversionError
type Error = CertificateConversionError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl<S, P> Freeze for IdCsrInner<S, P>where
P: Freeze,
impl<S, P> RefUnwindSafe for IdCsrInner<S, P>where
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, P> Send for IdCsrInner<S, P>
impl<S, P> Sync for IdCsrInner<S, P>
impl<S, P> Unpin for IdCsrInner<S, P>
impl<S, P> UnsafeUnpin for IdCsrInner<S, P>where
P: UnsafeUnpin,
impl<S, P> UnwindSafe for IdCsrInner<S, P>where
P: UnwindSafe,
S: UnwindSafe,
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