aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/asn1_alt_name.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-01 21:20:55 +0000
committerlloyd <[email protected]>2014-01-01 21:20:55 +0000
commit197dc467dec28a04c3b2f30da7cef122dfbb13e9 (patch)
treecdbd3ddaec051c72f0a757db461973d90c37b97a /lib/asn1/asn1_alt_name.h
parent62faac373c07cfe10bc8c309e89ebdd30d8e5eaa (diff)
Shuffle things around. Add NIST X.509 test to build.
Diffstat (limited to 'lib/asn1/asn1_alt_name.h')
-rw-r--r--lib/asn1/asn1_alt_name.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/lib/asn1/asn1_alt_name.h b/lib/asn1/asn1_alt_name.h
new file mode 100644
index 000000000..f2c83ed2c
--- /dev/null
+++ b/lib/asn1/asn1_alt_name.h
@@ -0,0 +1,47 @@
+/*
+* Common ASN.1 Objects
+* (C) 1999-2007 Jack Lloyd
+* 2007 Yves Jerschow
+*
+* Distributed under the terms of the Botan license
+*/
+
+#ifndef BOTAN_ASN1_ALT_NAME_H__
+#define BOTAN_ASN1_ALT_NAME_H__
+
+#include <botan/asn1_obj.h>
+#include <botan/asn1_str.h>
+#include <botan/asn1_oid.h>
+#include <map>
+
+namespace Botan {
+
+/**
+* Alternative Name
+*/
+class BOTAN_DLL AlternativeName : public ASN1_Object
+ {
+ public:
+ void encode_into(class DER_Encoder&) const;
+ void decode_from(class BER_Decoder&);
+
+ std::multimap<std::string, std::string> contents() const;
+
+ void add_attribute(const std::string&, const std::string&);
+ std::multimap<std::string, std::string> get_attributes() const;
+
+ void add_othername(const OID&, const std::string&, ASN1_Tag);
+ std::multimap<OID, ASN1_String> get_othernames() const;
+
+ bool has_items() const;
+
+ AlternativeName(const std::string& = "", const std::string& = "",
+ const std::string& = "", const std::string& = "");
+ private:
+ std::multimap<std::string, std::string> alt_info;
+ std::multimap<OID, ASN1_String> othernames;
+ };
+
+}
+
+#endif