diff options
Diffstat (limited to 'src/crl.rs')
-rw-r--r-- | src/crl.rs | 29 |
1 files changed, 15 insertions, 14 deletions
@@ -2,14 +2,15 @@ use crate::ext::Extensions; use crate::name::Name; +use crate::serial_number::SerialNumber; use crate::time::Time; use crate::Version; use alloc::vec::Vec; -use der::asn1::{BitStringRef, UIntRef}; +use der::asn1::BitString; use der::{Sequence, ValueOrd}; -use spki::AlgorithmIdentifier; +use spki::AlgorithmIdentifierOwned; /// `CertificateList` as defined in [RFC 5280 Section 5.1]. /// @@ -24,10 +25,10 @@ use spki::AlgorithmIdentifier; /// [RFC 5280 Section 5.1]: https://datatracker.ietf.org/doc/html/rfc5280#section-5.1 #[derive(Clone, Debug, Eq, PartialEq, Sequence, ValueOrd)] #[allow(missing_docs)] -pub struct CertificateList<'a> { - pub tbs_cert_list: TbsCertList<'a>, - pub signature_algorithm: AlgorithmIdentifier<'a>, - pub signature: BitStringRef<'a>, +pub struct CertificateList { + pub tbs_cert_list: TbsCertList, + pub signature_algorithm: AlgorithmIdentifierOwned, + pub signature: BitString, } /// Implicit intermediate structure from the ASN.1 definition of `TBSCertList`. @@ -46,10 +47,10 @@ pub struct CertificateList<'a> { /// [RFC 5280 Section 5.1]: https://datatracker.ietf.org/doc/html/rfc5280#section-5.1 #[derive(Clone, Debug, Eq, PartialEq, Sequence, ValueOrd)] #[allow(missing_docs)] -pub struct RevokedCert<'a> { - pub serial_number: UIntRef<'a>, +pub struct RevokedCert { + pub serial_number: SerialNumber, pub revocation_date: Time, - pub crl_entry_extensions: Option<Extensions<'a>>, + pub crl_entry_extensions: Option<Extensions>, } /// `TbsCertList` as defined in [RFC 5280 Section 5.1]. @@ -73,14 +74,14 @@ pub struct RevokedCert<'a> { /// [RFC 5280 Section 5.1]: https://datatracker.ietf.org/doc/html/rfc5280#section-5.1 #[derive(Clone, Debug, Eq, PartialEq, Sequence, ValueOrd)] #[allow(missing_docs)] -pub struct TbsCertList<'a> { +pub struct TbsCertList { pub version: Version, - pub signature: AlgorithmIdentifier<'a>, - pub issuer: Name<'a>, + pub signature: AlgorithmIdentifierOwned, + pub issuer: Name, pub this_update: Time, pub next_update: Option<Time>, - pub revoked_certificates: Option<Vec<RevokedCert<'a>>>, + pub revoked_certificates: Option<Vec<RevokedCert>>, #[asn1(context_specific = "0", tag_mode = "EXPLICIT", optional = "true")] - pub crl_extensions: Option<Extensions<'a>>, + pub crl_extensions: Option<Extensions>, } |