pub struct AttributeCertificate {
pub ac_info: AttributeCertificateInfo,
pub signature_algorithm: AlgorithmIdentifier,
pub signature_value: BitString,
}Expand description
Attribute certificate.
AttributeCertificate ::= SEQUENCE {
acinfo AttributeCertificateInfo,
signatureAlgorithm AlgorithmIdentifier,
signatureValue BIT STRING
}
Fields§
§ac_info: AttributeCertificateInfo§signature_algorithm: AlgorithmIdentifier§signature_value: BitStringImplementations§
source§impl AttributeCertificate
impl AttributeCertificate
sourcepub fn take_from<S: Source>(
cons: &mut Constructed<'_, S>
) -> Result<Self, DecodeError<S::Error>>
pub fn take_from<S: Source>(
cons: &mut Constructed<'_, S>
) -> Result<Self, DecodeError<S::Error>>
Examples found in repository?
src/asn1/rfc5652.rs (line 1185)
1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199
pub fn take_opt_from<S: Source>(
cons: &mut Constructed<S>,
) -> Result<Option<Self>, DecodeError<S::Error>> {
cons.take_opt_constructed_if(Tag::CTX_0, |cons| -> Result<(), DecodeError<S::Error>> {
Err(cons.content_err("ExtendedCertificate parsing not implemented"))
})?;
cons.take_opt_constructed_if(Tag::CTX_1, |cons| -> Result<(), DecodeError<S::Error>> {
Err(cons.content_err("AttributeCertificateV1 parsing not implemented"))
})?;
// TODO these first 2 need methods that parse an already entered SEQUENCE.
if let Some(certificate) = cons
.take_opt_constructed_if(Tag::CTX_2, |cons| AttributeCertificateV2::take_from(cons))?
{
Ok(Some(Self::AttributeCertificateV2(Box::new(certificate))))
} else if let Some(certificate) = cons
.take_opt_constructed_if(Tag::CTX_3, |cons| OtherCertificateFormat::take_from(cons))?
{
Ok(Some(Self::Other(Box::new(certificate))))
} else if let Some(certificate) =
cons.take_opt_constructed(|_, cons| Certificate::from_sequence(cons))?
{
Ok(Some(Self::Certificate(Box::new(certificate))))
} else {
Ok(None)
}
}Trait Implementations§
source§impl Clone for AttributeCertificate
impl Clone for AttributeCertificate
source§fn clone(&self) -> AttributeCertificate
fn clone(&self) -> AttributeCertificate
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for AttributeCertificate
impl Debug for AttributeCertificate
source§impl PartialEq<AttributeCertificate> for AttributeCertificate
impl PartialEq<AttributeCertificate> for AttributeCertificate
source§fn eq(&self, other: &AttributeCertificate) -> bool
fn eq(&self, other: &AttributeCertificate) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for AttributeCertificate
impl StructuralEq for AttributeCertificate
impl StructuralPartialEq for AttributeCertificate
Auto Trait Implementations§
impl RefUnwindSafe for AttributeCertificate
impl Send for AttributeCertificate
impl Sync for AttributeCertificate
impl Unpin for AttributeCertificate
impl UnwindSafe for AttributeCertificate
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.