Botan 1.10.17

x509_dn.h
Go to the documentation of this file.
1 /*
2 * X.509 Distinguished Name
3 * (C) 1999-2010 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_X509_DN_H__
9 #define BOTAN_X509_DN_H__
10
11 #include <botan/asn1_int.h>
12 #include <botan/asn1_oid.h>
13 #include <botan/asn1_str.h>
14 #include <map>
15
16 namespace Botan {
17
18 /**
19 * Distinguished Name
20 */
21 class BOTAN_DLL X509_DN : public ASN1_Object
22 {
23 public:
24 void encode_into(class DER_Encoder&) const;
25 void decode_from(class BER_Decoder&);
26
27 std::multimap<OID, std::string> get_attributes() const;
28 std::vector<std::string> get_attribute(const std::string&) const;
29
30 std::multimap<std::string, std::string> contents() const;
31
32 void add_attribute(const std::string&, const std::string&);
33 void add_attribute(const OID&, const std::string&);
34
35 static std::string deref_info_field(const std::string&);
36
37 MemoryVector<byte> get_bits() const;
38
39 X509_DN();
40 X509_DN(const std::multimap<OID, std::string>&);
41 X509_DN(const std::multimap<std::string, std::string>&);
42 private:
43 std::multimap<OID, ASN1_String> dn_info;
44 MemoryVector<byte> dn_bits;
45 };
46
47 bool BOTAN_DLL operator==(const X509_DN&, const X509_DN&);
48 bool BOTAN_DLL operator!=(const X509_DN&, const X509_DN&);
49 bool BOTAN_DLL operator<(const X509_DN&, const X509_DN&);
50
51 }
52
53 #endif
Botan::operator!=
bool operator!=(const OctetString &s1, const OctetString &s2)
Definition: symkey.cpp:106
Botan::ASN1_Object
Definition: asn1_int.h:56
Botan::operator==
bool operator==(const OctetString &s1, const OctetString &s2)
Definition: symkey.cpp:98
Botan::DER_Encoder
Definition: der_enc.h:22
Botan::X509_DN
Definition: x509_dn.h:21
Botan
Definition: algo_base.h:14
Botan::MemoryVector< byte >
Botan::operator<
bool BOTAN_DLL operator<(const X509_Time &, const X509_Time &)
Definition: asn1_tm.cpp:286
Botan::OID
Definition: asn1_oid.h:20
Botan::BER_Decoder
Definition: ber_dec.h:19