2
* (C) 1999-2007 Jack Lloyd
5
* Botan is released under the Simplified BSD License (see license.txt)
8
#ifndef BOTAN_X509_ALT_NAME_H_
9
#define BOTAN_X509_ALT_NAME_H_
11
#include <botan/asn1_obj.h>
12
#include <botan/asn1_str.h>
13
#include <botan/asn1_oid.h>
21
class BOTAN_PUBLIC_API(2,0) AlternativeName final : public ASN1_Object
24
void encode_into(class DER_Encoder&) const override;
25
void decode_from(class BER_Decoder&) override;
27
std::multimap<std::string, std::string> contents() const;
29
bool has_field(const std::string& attr) const;
30
std::vector<std::string> get_attribute(const std::string& attr) const;
32
std::string get_first_attribute(const std::string& attr) const;
34
void add_attribute(const std::string& type, const std::string& value);
35
void add_othername(const OID& oid, const std::string& value, ASN1_Tag type);
37
const std::multimap<std::string, std::string>& get_attributes() const
42
const std::multimap<OID, ASN1_String>& get_othernames() const
47
bool has_items() const;
49
AlternativeName(const std::string& email_addr = "",
50
const std::string& uri = "",
51
const std::string& dns = "",
52
const std::string& ip_address = "");
54
std::multimap<std::string, std::string> m_alt_info;
55
std::multimap<OID, ASN1_String> m_othernames;