Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rfc8659] CAA RR Change references to RFC 6844 to 8659. #1798

Merged
merged 2 commits into from
Oct 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions crates/proto/src/rr/rdata/caa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//! allows a DNS domain name holder to specify one or more Certification
//! Authorities (CAs) authorized to issue certificates for that domain.
//!
//! [RFC 6844, DNS Certification Authority Authorization, January 2013](https://tools.ietf.org/html/rfc6844)
//! [RFC 8659, DNS Certification Authority Authorization, November 2019](https://www.rfc-editor.org/rfc/rfc8659)
//!
//! ```text
//! The Certification Authority Authorization (CAA) DNS Resource Record
Expand All @@ -34,7 +34,7 @@ use url::Url;

/// The CAA RR Type
///
/// [RFC 6844, DNS Certification Authority Authorization, January 2013](https://tools.ietf.org/html/rfc6844#section-3)
/// [RFC 8659, DNS Certification Authority Authorization, November 2019](https://www.rfc-editor.org/rfc/rfc8659)
///
/// ```text
/// 3. The CAA RR Type
Expand Down Expand Up @@ -239,7 +239,7 @@ pub enum Property {
/// Certification Practices or Certificate Policy, or that a
/// Certificate Evaluator may use to report observation of a possible
/// policy violation. The Incident Object Description Exchange Format
/// (IODEF) format is used [RFC5070](https://tools.ietf.org/html/rfc5070).
/// (IODEF) format is used [RFC7970](https://www.rfc-editor.org/rfc/rfc7970).
Iodef,
/// Unknown format to Trust-DNS
Unknown(String),
Expand Down Expand Up @@ -279,8 +279,8 @@ impl Property {

impl From<String> for Property {
fn from(tag: String) -> Self {
// RFC6488 section 5.1 states that "Matching of tag values is case
// insensitive."
// [RFC 8659 section 4.1-11](https://www.rfc-editor.org/rfc/rfc8659#section-4.1-11)
// states that "Matching of tag values is case insensitive."
let lower = tag.to_ascii_lowercase();
match &lower as &str {
"issue" => return Self::Issue,
Expand Down Expand Up @@ -400,7 +400,7 @@ enum ParseNameKeyPairState {

/// Reads the issuer field according to the spec
///
/// [RFC 6844, DNS Certification Authority Authorization, January 2013](https://tools.ietf.org/html/rfc6844#section-5.2)
/// [RFC 8659, DNS Certification Authority Authorization, November 2019](https://www.rfc-editor.org/rfc/rfc8659)
///
/// ```text
/// 5.2. CAA issue Property
Expand Down Expand Up @@ -469,8 +469,7 @@ enum ParseNameKeyPairState {
///
/// Updated parsing rules:
///
/// [RFC 6844bis, CAA Resource Record, May 2018](https://tools.ietf.org/html/draft-ietf-lamps-rfc6844bis-00)
/// [RFC 6844, CAA Record Extensions, May 2018](https://tools.ietf.org/html/draft-ietf-acme-caa-04)
/// [RFC8659] Canonical presentation form and ABNF](https://www.rfc-editor.org/rfc/rfc8659#name-canonical-presentation-form)
///
/// This explicitly allows `-` in key names, diverging from the original RFC. To support this, key names will
/// allow `-` as non-starting characters. Additionally, this significantly relaxes the characters allowed in the value
Expand Down Expand Up @@ -595,7 +594,7 @@ pub fn read_issuer(bytes: &[u8]) -> ProtoResult<(Option<Name>, Vec<KeyValue>)> {

/// Incident Object Description Exchange Format
///
/// [RFC 6844, DNS Certification Authority Authorization, January 2013](https://tools.ietf.org/html/rfc6844#section-5.4)
/// [RFC 8659, DNS Certification Authority Authorization, November 2019](https://www.rfc-editor.org/rfc/rfc8659#section-4.4)
///
/// ```text
/// 5.4. CAA iodef Property
Expand All @@ -605,7 +604,7 @@ pub fn read_issuer(bytes: &[u8]) -> ProtoResult<(Option<Name>, Vec<KeyValue>)> {
/// that violate the security policy of the issuer or the domain name
/// holder.
///
/// The Incident Object Description Exchange Format (IODEF) [RFC5070] is
/// The Incident Object Description Exchange Format (IODEF) [RFC7970](https://www.rfc-editor.org/info/rfc7970) is
/// used to present the incident report in machine-readable form.
///
/// The iodef property takes a URL as its parameter. The URL scheme type
Expand All @@ -628,7 +627,7 @@ pub fn read_iodef(url: &[u8]) -> ProtoResult<Url> {

/// Issuer key and value pairs.
///
/// See [RFC 6844, DNS Certification Authority Authorization, January 2013](https://tools.ietf.org/html/rfc6844#section-5.2)
/// [RFC 8659, DNS Certification Authority Authorization, November 2019](https://www.rfc-editor.org/rfc/rfc8659#section-4.2)
/// for more explanation.
#[cfg_attr(feature = "serde-config", derive(Deserialize, Serialize))]
#[derive(Debug, PartialEq, Eq, Hash, Clone)]
Expand Down Expand Up @@ -659,7 +658,7 @@ impl KeyValue {

/// Read the binary CAA format
///
/// [RFC 6844, DNS Certification Authority Authorization, January 2013](https://tools.ietf.org/html/rfc6844#section-5.1)
/// [RFC 8659, DNS Certification Authority Authorization, November 2019](https://www.rfc-editor.org/rfc/rfc8659#section-4.1)
///
/// ```text
/// 5.1. Syntax
Expand Down Expand Up @@ -838,7 +837,7 @@ impl fmt::Display for Property {
}

impl fmt::Display for Value {
// https://datatracker.ietf.org/doc/html/rfc6844#section-5.1.1
// https://www.rfc-editor.org/rfc/rfc8659#section-4.1.1
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
f.write_str("\"")?;

Expand Down