use der::{asn1::OctetString, Choice};
use x509_cert::name::Name;
#[derive(Clone, Debug, Eq, PartialEq, Choice)]
#[allow(missing_docs)]
pub enum ResponderId {
#[asn1(context_specific = "1", tag_mode = "EXPLICIT", constructed = "true")]
ByName(Name),
#[asn1(context_specific = "2", tag_mode = "EXPLICIT", constructed = "true")]
ByKey(KeyHash),
}
impl From<Name> for ResponderId {
fn from(other: Name) -> Self {
Self::ByName(other)
}
}
impl From<KeyHash> for ResponderId {
fn from(other: KeyHash) -> Self {
Self::ByKey(other)
}
}
pub type KeyHash = OctetString;