monotone

monotone Mtn Source Tree

Root/botan/x509cert.h

1/*************************************************
2* X.509 Certificates Header File *
3* (C) 1999-2006 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/datastor.h>
12#include <botan/enums.h>
13#include <map>
14
15namespace Botan {
16
17/*************************************************
18* X.509 Certificate *
19*************************************************/
20class X509_Certificate : public X509_Object
21 {
22 public:
23 Public_Key* subject_public_key() const;
24
25 X509_DN issuer_dn() const;
26 X509_DN subject_dn() const;
27 std::vector<std::string> subject_info(const std::string&) const;
28 std::vector<std::string> issuer_info(const std::string&) const;
29
30 std::string start_time() const;
31 std::string end_time() const;
32
33 u32bit x509_version() const;
34 MemoryVector<byte> serial_number() const;
35
36 MemoryVector<byte> authority_key_id() const;
37 MemoryVector<byte> subject_key_id() const;
38 bool is_self_signed() const { return self_signed; }
39 bool is_CA_cert() const;
40
41 u32bit path_limit() const;
42 Key_Constraints constraints() const;
43 std::vector<std::string> ex_constraints() const;
44 std::vector<std::string> policies() const;
45
46 bool operator==(const X509_Certificate&) const;
47
48 X509_Certificate(DataSource&);
49 X509_Certificate(const std::string&);
50 private:
51 void force_decode();
52 friend class X509_CA;
53 X509_Certificate() {}
54
55 Data_Store subject, issuer;
56 bool self_signed;
57 };
58
59/*************************************************
60* X.509 Certificate Comparison *
61*************************************************/
62bool operator!=(const X509_Certificate&, const X509_Certificate&);
63
64/*************************************************
65* Data Store Extraction Operations *
66*************************************************/
67X509_DN create_dn(const Data_Store&);
68AlternativeName create_alt_name(const Data_Store&);
69
70}
71
72#endif

Archive Download this file

Branches

Tags

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