limal-ca-mgm
CRLReason.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: CRLReason.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_REASON_HPP
23 #define LIMAL_CA_MGM_CRL_REASON_HPP
24 
25 #include <limal/ca-mgm/config.h>
27 #include <blocxx/COWIntrusiveReference.hpp>
28 
29 namespace LIMAL_NAMESPACE {
30 
31 namespace CA_MGM_NAMESPACE {
32 
33  class CRLReasonImpl;
34 
35  class CRLReason {
36  public:
37 
38  CRLReason();
39 
47  CRLReason(const String& reason);
48  CRLReason(const CRLReason& reason);
49  virtual ~CRLReason();
50 
51 #ifndef SWIG
52 
53  CRLReason&
54  operator=(const CRLReason& reason);
55 
56 #endif
57 
65  void
66  setReason(const String& reason);
67 
71  String
72  getReason() const;
73 
80  void
81  setHoldInstruction(const String& holdInstruction);
82 
83  String
84  getHoldInstruction() const;
85 
91  void
92  setKeyCompromiseDate(time_t compromiseDate);
93 
94  time_t
95  getKeyCompromiseDate() const;
96 
97  String
98  getKeyCompromiseDateAsString() const;
99 
105  void
106  setCACompromiseDate(time_t compromiseDate);
107 
108  time_t
109  getCACompromiseDate() const;
110 
111  String
112  getCACompromiseDateAsString() const;
113 
114  virtual bool
115  valid() const;
116 
117  virtual blocxx::StringArray
118  verify() const;
119 
120  virtual blocxx::StringArray
121  dump() const;
122 
123  private:
124  blocxx::COWIntrusiveReference<CRLReasonImpl> m_impl;
125 
127  checkHoldInstruction(const String& hi) const;
128 
129  bool
130  checkReason(const String& reason) const;
131 
132  };
133 
134 }
135 }
136 
137 #endif // LIMAL_CA_MGM_CRL_REASON_HPP