8 #include <botan/x509_crl.h>
9 #include <botan/x509_ext.h>
10 #include <botan/ber_dec.h>
11 #include <botan/parsing.h>
12 #include <botan/bigint.h>
13 #include <botan/oids.h>
21 X509_Object(in,
"X509 CRL/CRL"), throw_on_unknown_critical(touc)
30 X509_Object(in,
"CRL/X509 CRL"), throw_on_unknown_critical(touc)
38 void X509_CRL::force_decode()
45 if(version != 0 && version != 1)
46 throw X509_CRL_Error(
"Unknown X.509 CRL version " +
50 tbs_crl.decode(sig_algo_inner);
53 throw X509_CRL_Error(
"Algorithm identifier mismatch");
56 tbs_crl.decode(dn_issuer);
60 tbs_crl.decode(start).decode(end);
70 while(cert_list.more_items())
72 CRL_Entry entry(throw_on_unknown_critical);
73 cert_list.decode(entry);
74 revoked.push_back(entry);
76 next = tbs_crl.get_next_object();
82 BER_Decoder crl_options(next.
value);
84 Extensions extensions(throw_on_unknown_critical);
86 crl_options.decode(extensions).verify_end();
88 extensions.contents_to(info, info);
90 next = tbs_crl.get_next_object();
94 throw X509_CRL_Error(
"Unknown tag in CRL");
120 return info.
get1_memvec(
"X509v3.AuthorityKeyIdentifier");
136 return info.
get1(
"X509.CRL.start");
144 return info.
get1(
"X509.CRL.end");
u32bit crl_number() const
X509_Time this_update() const
MemoryVector< byte > tbs_bits
MemoryVector< byte > authority_key_id() const
X509_DN issuer_dn() const
std::string get1(const std::string &) const
AlgorithmIdentifier sig_algo
X509_Time next_update() const
X509_DN create_dn(const Data_Store &info)
X509_CRL(DataSource &source, bool throw_on_unknown_critical=false)
SecureVector< byte > value
std::vector< CRL_Entry > get_revoked() const
MemoryVector< byte > get1_memvec(const std::string &) const
u32bit get1_u32bit(const std::string &, u32bit=0) const
std::string to_string(u64bit n, size_t min_len)
std::string readable_string() const
std::multimap< std::string, std::string > contents() const
void add(const std::multimap< std::string, std::string > &)