/* * X.509 Distinguished Name * (C) 1999-2010 Jack Lloyd * * Distributed under the terms of the Botan license */ #ifndef BOTAN_X509_DN_H__ #define BOTAN_X509_DN_H__ #include #include #include #include #include namespace Botan { /** * Distinguished Name */ class BOTAN_DLL X509_DN : public ASN1_Object { public: void encode_into(class DER_Encoder&) const; void decode_from(class BER_Decoder&); std::multimap get_attributes() const; std::vector get_attribute(const std::string&) const; std::multimap contents() const; void add_attribute(const std::string&, const std::string&); void add_attribute(const OID&, const std::string&); static std::string deref_info_field(const std::string&); MemoryVector get_bits() const; X509_DN(); X509_DN(const std::multimap&); X509_DN(const std::multimap&); private: std::multimap dn_info; MemoryVector dn_bits; }; bool BOTAN_DLL operator==(const X509_DN&, const X509_DN&); bool BOTAN_DLL operator!=(const X509_DN&, const X509_DN&); bool BOTAN_DLL operator<(const X509_DN&, const X509_DN&); BOTAN_DLL std::ostream& operator<<(std::ostream& out, const X509_DN& dn); } #endif