Skip to main content

HeldCertificate

Struct HeldCertificate 

Source
#[non_exhaustive]
pub struct HeldCertificate { pub key_fingerprint: String, pub key_must_be_replaced: bool, pub name: String, pub not_after: Option<String>, pub profile: Option<String>, pub revoked: bool, pub usable: bool, }
Expand description

A certificate Canopy holds for the asking server, as the server needs to see it: enough to decide whether to renew, and nothing about anyone else.

JSON schema
{
 "description": "A certificate Canopy holds for the asking server, as the server needs to see\nit: enough to decide whether to renew, and nothing about anyone else.",
 "type": "object",
 "required": [
   "key_fingerprint",
   "key_must_be_replaced",
   "name",
   "revoked",
   "usable"
 ],
 "properties": {
   "key_fingerprint": {
     "description": "Hex SHA-256 of the certified key's subject public key info, so an agent\ncan tell whether this covers a key it still holds.",
     "type": "string"
   },
   "key_must_be_replaced": {
     "description": "Whether the key itself is condemned, not just the certificate — the key\npair has to be replaced before asking again.",
     "type": "boolean"
   },
   "name": {
     "description": "The name it covers.",
     "type": "string"
   },
   "not_after": {
     "description": "When it expires.",
     "type": [
       "string",
       "null"
     ]
   },
   "profile": {
     "description": "The profile it was issued under, if the authority named one.",
     "type": [
       "string",
       "null"
     ]
   },
   "revoked": {
     "description": "Whether an operator has revoked it. Stop serving it.",
     "type": "boolean"
   },
   "usable": {
     "description": "Whether it can still be served: not revoked, not expired. True even while\na renewal is under way, the chain in hand staying valid until the new one\nlands.",
     "type": "boolean"
   }
 }
}

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§key_fingerprint: String

Hex SHA-256 of the certified key’s subject public key info, so an agent can tell whether this covers a key it still holds.

§key_must_be_replaced: bool

Whether the key itself is condemned, not just the certificate — the key pair has to be replaced before asking again.

§name: String

The name it covers.

§not_after: Option<String>

When it expires.

§profile: Option<String>

The profile it was issued under, if the authority named one.

§revoked: bool

Whether an operator has revoked it. Stop serving it.

§usable: bool

Whether it can still be served: not revoked, not expired. True even while a renewal is under way, the chain in hand staying valid until the new one lands.

Implementations§

Source§

impl HeldCertificate

Source

pub fn builder() -> HeldCertificateBuilder

Create an instance of HeldCertificate using the builder syntax

Trait Implementations§

Source§

impl Clone for HeldCertificate

Source§

fn clone(&self) -> HeldCertificate

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HeldCertificate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for HeldCertificate

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for HeldCertificate

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.