Skip to content

Future proof the parsing of challenge types #51

Closed
@kellpossible

Description

@kellpossible

When testing this with pebble https://github.com/letsencrypt/pebble this library fails to parse some of the challenge types that it offers. It would be good to make this enum #[non_exhaustive] and perhaps have an option for parsing the list of challenges to either ignore unknown types, or alternatively we could add a new variant something like:

#[derive(Clone, Debug, Deserialize, Eq, PartialEq)]
#[allow(missing_docs)]
#[non_exhaustive] // It's likely more variants may be added in the future.
pub enum ChallengeType {
    #[serde(rename = "http-01")]
    Http01,
    #[serde(rename = "dns-01")]
    Dns01,
    #[serde(rename = "tls-alpn-01")]
    TlsAlpn01,
    Unknown(String),
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions