[][src]Struct krill::commons::remote::id::IdCert

pub struct IdCert { /* fields omitted */ }

An Identity Certificate.

Identity Certificates are used in the provisioning and publication protocol. Initially the parent and child CAs and/or the publishing CA and publication server exchange self-signed Identity Certificates, wrapped in XML messages defined in the 'rfc8181' module.

The private keys corresponding to the subject public keys in these certificates are then used to sign identity EE certificates used to sign CMS messages in support of the provisioning and publication protocols.

NOTE: For the moment only V3 certificates are supported, because we insist that a TA certificate is self-signed and has the CA bit set, and that an EE certificate does not have this bit set, but does have an AKI that matches the issuer's SKI. Maybe we should take this out... and just care that things are validly signed, or only check AKI/SKI if it's version 3, but skip this for lower versions.

Implementations

impl IdCert[src]

pub fn public_key(&self) -> &[u8][src]

Returns a reference to the certificate’s public key.

pub fn subject_key_identifier(&self) -> &OctetString[src]

Returns a reference to the subject key identifier.

pub fn ski_hex(&self) -> String[src]

Returns the hex encoded SKI

pub fn subject_public_key_info(&self) -> &PublicKey[src]

Returns a reference to the entire public key information structure.

pub fn serial_number(&self) -> &Unsigned[src]

Returns a reference to the certificate’s serial number.

impl IdCert[src]

pub fn decode<S: Source>(source: S) -> Result<Self, S::Err>[src]

Decodes a source as a certificate.

pub fn take_from<S: Source>(cons: &mut Constructed<S>) -> Result<Self, S::Err>[src]

Takes an encoded certificate from the beginning of a value.

pub fn from_constructed<S: Source>(
    cons: &mut Constructed<S>
) -> Result<Self, S::Err>
[src]

Parses the content of a Certificate sequence.

pub fn encode<'a>(&'a self) -> impl Values + 'a[src]

pub fn to_bytes(&self) -> Bytes[src]

impl IdCert[src]

pub fn validate_ta(&self) -> Result<(), ValidationError>[src]

Validates the certificate as a trust anchor.

This validates that the certificate “is a current, self-signed RPKI CA certificate that conforms to the profile as specified in RFC6487” (RFC7730, section 3, step 2).

pub fn validate_ta_at(&self, now: Time) -> Result<(), ValidationError>[src]

pub fn validate_ee(&self, issuer: &IdCert) -> Result<(), ValidationError>[src]

Validates the certificate as an EE certificate.

For validation to succeed, the certificate needs to have been signed by the provided issuer certificate.

Note that this does not check the CRL.

pub fn validate_ee_at(
    &self,
    issuer: &IdCert,
    now: Time
) -> Result<(), ValidationError>
[src]

Trait Implementations

impl AsRef<IdCert> for IdCert[src]

impl Clone for IdCert[src]

impl Debug for IdCert[src]

impl<'de> Deserialize<'de> for IdCert[src]

impl Eq for IdCert[src]

impl<'_> From<&'_ IdCert> for IdCertPem[src]

impl Into<IdCert> for PublisherRequest[src]

impl PartialEq<IdCert> for IdCert[src]

impl Serialize for IdCert[src]

Auto Trait Implementations

impl RefUnwindSafe for IdCert

impl Send for IdCert

impl Sync for IdCert

impl Unpin for IdCert

impl UnwindSafe for IdCert

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.