/************************************************* * X.509 Certificates Header File * * (C) 1999-2006 The Botan Project * *************************************************/ #ifndef BOTAN_X509_CERTS_H__ #define BOTAN_X509_CERTS_H__ #include #include #include #include namespace Botan { static const u32bit NO_CERT_PATH_LIMIT = 0xFFFFFFF0; /************************************************* * X.509 Certificate * *************************************************/ class X509_Certificate : public X509_Object { public: X509_PublicKey* subject_public_key() const; X509_DN issuer_dn() const; X509_DN subject_dn() const; std::vector subject_info(const std::string&) const; std::vector issuer_info(const std::string&) const; std::string start_time() const; std::string end_time() const; u32bit x509_version() const; MemoryVector serial_number() const; MemoryVector authority_key_id() const; MemoryVector subject_key_id() const; bool is_self_signed() const { return self_signed; } bool is_CA_cert() const; u32bit path_limit() const; Key_Constraints constraints() const; std::vector ex_constraints() const; std::vector policies() const; bool operator==(const X509_Certificate&) const; X509_Certificate(DataSource&); X509_Certificate(const std::string&); private: void force_decode(); friend class X509_CA; X509_Certificate() {} Data_Store subject, issuer; bool self_signed; }; /************************************************* * X.509 Certificate Comparison * *************************************************/ bool operator!=(const X509_Certificate&, const X509_Certificate&); /************************************************* * Data Store Extraction Operations * *************************************************/ X509_DN create_dn(const Data_Store&); AlternativeName create_alt_name(const Data_Store&); } #endif