[][src]Struct rpki::cert::TbsCert

pub struct TbsCert { /* fields omitted */ }

The data of a resource certificate.

Methods

impl TbsCert[src]

pub fn new(
    serial_number: Serial,
    issuer: Name,
    validity: Validity,
    subject: Option<Name>,
    subject_public_key_info: PublicKey,
    key_usage: KeyUsage,
    overclaim: Overclaim
) -> Self
[src]

Creates a new value from the necessary data.

pub fn into_cert<S: Signer>(
    self,
    signer: &S,
    key: &S::KeyId
) -> Result<Cert, SigningError<S::Error>>
[src]

Converts the value into a signed certificate.

impl TbsCert[src]

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

Returns the serial number of the certificate.

pub fn set_serial_number<S: Into<Serial>>(&mut self, serial: S)[src]

Set the serial number of the certificate.

pub fn issuer(&self) -> &Name[src]

Returns a reference to the issuer.

pub fn set_issuer(&mut self, name: Name)[src]

Sets the issuer.

pub fn validity(&self) -> Validity[src]

Returns a reference to the validity.

pub fn set_validity(&mut self, validity: Validity)[src]

Sets the validity.

pub fn subject(&self) -> &Name[src]

Returns a reference to the subject.

pub fn set_subject(&mut self, subject: Name)[src]

Sets the subject.

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

Returns a reference to the public key.

pub fn set_subject_public_key(&mut self, key: PublicKey)[src]

Sets the public key.

This sets both the value of the subject_public_key_info field to the public key itself as well as the subject_public_key_identifier to the identifier of that key.

pub fn basic_ca(&self) -> Option<bool>[src]

Returns the cA field of the basic constraints extension if present.

pub fn set_basic_ca(&mut self, value: Option<bool>)[src]

Sets the basic constraints extension.

If value is None, the extension will be absent. If it is some value, the boolean is the value of the cA field of the extension.

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

Returns a reference to the subject key identifier.

There is no method to set this extension as this happens automatically when the subject public key is set via set_subject_public_key.

pub fn authority_key_identifier(&self) -> Option<KeyIdentifier>[src]

Returns a reference to the authority key identifier if present.

pub fn set_authority_key_identifier(&mut self, id: Option<KeyIdentifier>)[src]

Sets the authority key identifier extension.

pub fn key_usage(&self) -> KeyUsage[src]

Returns the key usage of the certificate.

pub fn set_key_usage(&mut self, key_usage: KeyUsage)[src]

Sets the key usage of the certificate.

pub fn extended_key_usage(&self) -> Option<&Captured>[src]

Returns a reference to the extended key usage if present.

Since this field isn’t allowed in any certificate used for RPKI objects directly, we do not currently support setting this field.

pub fn crl_uri(&self) -> Option<&Rsync>[src]

Returns a reference to the certificate’s CRL distribution point.

pub fn set_crl_uri(&mut self, uri: Option<Rsync>)[src]

Sets the CRL distribution point.

pub fn ca_issuer(&self) -> Option<&Rsync>[src]

Returns a reference to caIssuer AIA rsync URI if present.

pub fn set_ca_issuer(&mut self, uri: Option<Rsync>)[src]

Sets the caIssuer AIA rsync URI.

pub fn ca_repository(&self) -> Option<&Rsync>[src]

Returns a reference to the caRepository SIA rsync URI if present.

pub fn set_ca_repository(&mut self, uri: Option<Rsync>)[src]

Sets the caRepository SIA rsync URI.

pub fn rpki_manifest(&self) -> Option<&Rsync>[src]

Returns a reference to the rpkiManifest SIA rsync URI if present.

pub fn set_rpki_manifest(&mut self, uri: Option<Rsync>)[src]

Sets the rpkiManifest SIA rsync URI.

pub fn signed_object(&self) -> Option<&Rsync>[src]

Returns a reference to the signedObject SIA rsync URI if present.

pub fn set_signed_object(&mut self, uri: Option<Rsync>)[src]

Sets the signedObject SIA rsync URI.

pub fn rpki_notify(&self) -> Option<&Https>[src]

Returns a reference to the rpkiNotify SIA HTTPS URI if present.

pub fn set_rpki_notify(&mut self, uri: Option<Https>)[src]

Sets the rpkiNotify SIA HTTPS URI.

pub fn overclaim(&self) -> Overclaim[src]

Returns the overclaim mode of the certificate.

pub fn set_overclaim(&mut self, overclaim: Overclaim)[src]

Sets the overclaim mode of the certificate.

pub fn v4_resources(&self) -> Option<&IpResources>[src]

Returns a reference to the IPv4 address resources if present.

pub fn set_v4_resources(&mut self, resources: Option<IpResources>)[src]

Set the IPv4 address resources.

pub fn set_v4_resources_inherit(&mut self)[src]

Sets the IPv4 address resources to inherit.

pub fn build_v4_resource_blocks<F>(&mut self, op: F) where
    F: FnOnce(&mut IpBlocksBuilder), 
[src]

Builds the blocks IPv4 address resources.

pub fn v4_resources_from_iter<I>(&mut self, iter: I) where
    I: IntoIterator<Item = IpBlock>, 
[src]

Builds the IPv4 address resources from an iterator over blocks.

pub fn v6_resources(&self) -> Option<&IpResources>[src]

Returns a reference to the IPv6 address resources if present.

pub fn set_v6_resources(&mut self, resources: Option<IpResources>)[src]

Set the IPv6 address resources.

pub fn set_v6_resources_inherit(&mut self)[src]

Sets the IPv6 address resources to inherit.

pub fn build_v6_resource_blocks<F>(&mut self, op: F) where
    F: FnOnce(&mut IpBlocksBuilder), 
[src]

Builds the blocks IPv6 address resources.

pub fn v6_resources_from_iter<I>(&mut self, iter: I) where
    I: IntoIterator<Item = IpBlock>, 
[src]

Builds the IPv6 address resources from an iterator over blocks

pub fn has_ip_resources(&self) -> bool[src]

Returns whether the certificate has any IP resources at all.

pub fn as_resources(&self) -> Option<&AsResources>[src]

Returns a reference to the AS resources if present.

pub fn set_as_resources(&mut self, resources: Option<AsResources>)[src]

Set the AS resources.

pub fn set_as_resources_inherit(&mut self)[src]

Sets the AS resources to inherit.

pub fn build_as_resource_blocks<F>(&mut self, op: F) where
    F: FnOnce(&mut AsBlocksBuilder), 
[src]

Builds the blocks AS resources.

pub fn as_resources_from_iter<I>(&mut self, iter: I) where
    I: IntoIterator<Item = AsBlock>, 
[src]

Builds the AS resources from an iterator over blocks.

impl TbsCert[src]

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_ref<'a>(&'a self) -> impl Values + 'a[src]

Returns an encoder for the value.

Trait Implementations

impl AsRef<TbsCert> for Cert[src]

impl AsRef<TbsCert> for ResourceCert[src]

impl Clone for TbsCert[src]

impl Debug for TbsCert[src]

impl Borrow<TbsCert> for Cert[src]

Auto Trait Implementations

impl Send for TbsCert

impl Sync for TbsCert

impl Unpin for TbsCert

impl UnwindSafe for TbsCert

impl RefUnwindSafe for TbsCert

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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