limal-ca-mgm
CRLData.hpp
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | |
3 | _ _ _ _ __ _ |
4 | | | | | | \_/ | / \ | | |
5 | | | | | | |_| | / /\ \ | | |
6 | | |__ | | | | | | / ____ \ | |__ |
7 | |____||_| |_| |_|/ / \ \|____| |
8 | |
9 | ca-mgm library |
10 | |
11 | (C) SUSE Linux Products GmbH |
12 \----------------------------------------------------------------------/
13 
14  File: CRLData.hpp
15 
16  Author: <Michael Calmer> <mc@suse.de>
17  Maintainer: <Michael Calmer> <mc@suse.de>
18 
19  Purpose:
20 
21 /-*/
22 #ifndef LIMAL_CA_MGM_CRL_DATA_HPP
23 #define LIMAL_CA_MGM_CRL_DATA_HPP
24 
25 #include <limal/ca-mgm/config.h>
30 #include <limal/ByteBuffer.hpp>
31 #include <blocxx/COWIntrusiveReference.hpp>
32 
33 namespace LIMAL_NAMESPACE {
34 
35 namespace CA_MGM_NAMESPACE {
36 
37  class RevocationEntryImpl;
38  class CRLDataImpl;
39 
41  public:
43  RevocationEntry(const RevocationEntry& entry);
44  virtual ~RevocationEntry();
45 
46 #ifndef SWIG
47 
49  operator=(const RevocationEntry& entry);
50 
51 #endif
52 
53  String
54  getSerial() const;
55 
56  time_t
57  getRevocationDate() const;
58 
59  CRLReason
60  getReason() const;
61 
62  virtual bool
63  valid() const;
64 
65  virtual blocxx::StringArray
66  verify() const;
67 
68  virtual blocxx::StringArray
69  dump() const;
70 
71  protected:
72  blocxx::COWIntrusiveReference<RevocationEntryImpl> m_impl;
73 
74  };
75 
81  class CRLData {
82  public:
83  CRLData(const CRLData& data);
84  virtual ~CRLData();
85 
86 #ifndef SWIG
87 
88  CRLData&
89  operator=(const CRLData& data);
90 
91 #endif
92 
93  blocxx::Int32
94  getVersion() const;
95 
96  String
97  getFingerprint() const;
98 
99  time_t
100  getLastUpdateDate() const;
101 
102  time_t
103  getNextUpdateDate() const;
104 
105  DNObject
106  getIssuerDN() const;
107 
108  SigAlg
109  getSignatureAlgorithm() const;
110 
111  String
112  getSignatureAlgorithmAsString() const;
113 
115  getSignature() const;
116 
118  getExtensions() const;
119 
120  blocxx::Map<String, RevocationEntry>
121  getRevocationData() const;
122 
124  getRevocationEntry(const String& oid);
125 
130  String
131  getCRLAsText() const;
132 
137  String
138  getExtensionsAsText() const;
139 
140  virtual bool
141  valid() const;
142 
143  virtual blocxx::StringArray
144  verify() const;
145 
146  virtual blocxx::StringArray
147  dump() const;
148 
149  protected:
150  blocxx::COWIntrusiveReference<CRLDataImpl> m_impl;
151 
152  CRLData();
153 
154  blocxx::StringArray
155  checkRevocationData(const blocxx::Map<String, RevocationEntry>& rd) const;
156 
157  };
158 
159 }
160 }
161 
162 #endif // LIMAL_CA_MGM_CRL_DATA_HPP