monotone

monotone Mtn Source Tree

Root/botan/x509cert.h

1/*************************************************
2* X.509 Certificates Header File *
3* (C) 1999-2005 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_X509_CERTS_H__
7#define BOTAN_X509_CERTS_H__
8
9#include <botan/x509_obj.h>
10#include <botan/x509_key.h>
11#include <botan/pkcs8.h>
12#include <map>
13
14namespace Botan {
15
16static const u32bit NO_CERT_PATH_LIMIT = 0xFFFFFFFF;
17
18/*************************************************
19* X.509 Certificate *
20*************************************************/
21class X509_Certificate : public X509_Object
22 {
23 public:
24 u32bit x509_version() const;
25
26 std::string start_time() const;
27 std::string end_time() const;
28
29 std::string subject_info(const std::string&) const;
30 std::string issuer_info(const std::string&) const;
31 X509_DN issuer_dn() const;
32 X509_DN subject_dn() const;
33
34 MemoryVector<byte> serial_number() const;
35 BigInt serial_number_bn() const;
36 X509_PublicKey* subject_public_key() const;
37 bool self_signed() const;
38 bool has_SKID() const;
39
40 bool is_CA_cert() const;
41 u32bit path_limit() const;
42 Key_Constraints constraints() const;
43 std::vector<OID> ex_constraints() const;
44 std::vector<OID> policies() const;
45
46 MemoryVector<byte> authority_key_id() const;
47 MemoryVector<byte> subject_key_id() const;
48
49 bool operator==(const X509_Certificate&) const;
50
51 void force_decode();
52
53 X509_Certificate(DataSource&);
54 X509_Certificate(const std::string&);
55 private:
56 friend class X509_CA;
57 X509_Certificate() {}
58 void handle_v3_extension(const Extension&);
59
60 std::multimap<std::string, std::string> subject, issuer;
61 MemoryVector<byte> v3_issuer_key_id, v3_subject_key_id;
62 MemoryVector<byte> v2_issuer_key_id, v2_subject_key_id;
63 MemoryVector<byte> pub_key;
64 std::vector<OID> ex_constraints_list, policies_list;
65 BigInt serial;
66 X509_Time start, end;
67 Key_Constraints constraints_value;
68 u32bit version, max_path_len;
69 bool is_ca;
70 };
71
72/*************************************************
73* X.509 Certificate Comparison *
74*************************************************/
75bool operator!=(const X509_Certificate&, const X509_Certificate&);
76
77}
78
79#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status