/* * (C) 1999-2007 Jack Lloyd * 2007 Yves Jerschow * * Botan is released under the Simplified BSD License (see license.txt) */ #ifndef BOTAN_X509_ALT_NAME_H_ #define BOTAN_X509_ALT_NAME_H_ #include #include #include #include #include namespace Botan { /** * Alternative Name */ class BOTAN_PUBLIC_API(2,0) AlternativeName final : public ASN1_Object { public: void encode_into(class DER_Encoder&) const override; void decode_from(class BER_Decoder&) override; std::multimap contents() const; bool has_field(const std::string& attr) const; std::vector get_attribute(const std::string& attr) const; std::string get_first_attribute(const std::string& attr) const; void add_attribute(const std::string& type, const std::string& value); void add_othername(const OID& oid, const std::string& value, ASN1_Tag type); const std::multimap& get_attributes() const { return m_alt_info; } const std::multimap& get_othernames() const { return m_othernames; } X509_DN dn() const; bool has_items() const; AlternativeName(const std::string& email_addr = "", const std::string& uri = "", const std::string& dns = "", const std::string& ip_address = ""); private: std::multimap m_alt_info; std::multimap m_othernames; }; } #endif