pub struct CaaValue {
pub flags: u8,
pub tag: String,
pub value: String,
}Expand description
One CAA property: RFC 8659’s flags, tag and value.
A CAA record set is a statement about which certificate authority may
issue for a name and everything under it. It is not a defence against
whoever holds this zone’s credential — that holder can rewrite this record
as easily as any other. What it does is narrow issuance to one authority
and one account at that authority, so a certificate for a name in this
zone cannot be obtained through any other path that does not first change
this record; and changing it is a second, separately visible act.
Only issue and iodef are constructed here. issuewild is deliberately
absent: RFC 8659 says a wildcard request falls back to issue when no
issuewild is present, and this deployment’s certificate covers a zone
and its wildcard from one order through one account, so a second property
could only ever say the same thing or disagree with it.
Fields§
§flags: u8RFC 8659 flags octet. 0 for every property this crate writes: the
critical bit tells a certificate authority to refuse issuance rather
than ignore a property it does not understand, and issue and iodef
are understood everywhere.
tag: StringThe property tag: issue or iodef.
value: StringThe property value, unquoted.
Implementations§
Source§impl CaaValue
impl CaaValue
Sourcepub fn issue(issuer: impl Into<String>) -> Self
pub fn issue(issuer: impl Into<String>) -> Self
issue, authorising issuer — a domain name such as
letsencrypt.org — and no one else.
Sourcepub fn issue_for_account(
issuer: impl AsRef<str>,
account_uri: impl AsRef<str>,
) -> Self
pub fn issue_for_account( issuer: impl AsRef<str>, account_uri: impl AsRef<str>, ) -> Self
issue with RFC 8657’s accounturi parameter, authorising issuer
only when the request comes from the ACME account at account_uri.
This is the half that matters. issue "letsencrypt.org" alone
authorises anyone who can create an account at that authority, which
is anyone; naming the account narrows it to the one this deployment
holds the key for. An authority that does not implement RFC 8657
ignores the parameter and enforces the issuer name only, which is
what makes publishing it safe against an authority that has not
caught up.
Sourcepub fn iodef(target: impl Into<String>) -> Self
pub fn iodef(target: impl Into<String>) -> Self
iodef, naming where a certificate authority should report a request
this record made it refuse.
A refused issuance is the signal that someone tried to obtain a certificate for this zone through an account that is not ours, and it arrives from the authority rather than from this host — which is the point, since a host holding the zone credential cannot be trusted to report on its own misuse.
Trait Implementations§
Source§impl Ord for CaaValue
impl Ord for CaaValue
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for CaaValue
impl PartialOrd for CaaValue
impl Eq for CaaValue
impl StructuralPartialEq for CaaValue
Auto Trait Implementations§
impl Freeze for CaaValue
impl RefUnwindSafe for CaaValue
impl Send for CaaValue
impl Sync for CaaValue
impl Unpin for CaaValue
impl UnsafeUnpin for CaaValue
impl UnwindSafe for CaaValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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
§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.