libcamgm
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 CA_MGM_CRL_REASON_HPP
23 #define CA_MGM_CRL_REASON_HPP
24 
25 #include <ca-mgm/config.h>
26 #include <ca-mgm/CommonData.hpp>
27 #include <ca-mgm/PtrTypes.hpp>
28 
29 namespace CA_MGM_NAMESPACE {
30 
31  class CRLReasonImpl;
32 
33  class CRLReason {
34  public:
35 
36  CRLReason();
37 
45  CRLReason(const std::string& reason);
46  CRLReason(const CRLReason& reason);
47  virtual ~CRLReason();
48 
49 #ifndef SWIG
50 
51  CRLReason&
52  operator=(const CRLReason& reason);
53 
54 #endif
55 
63  void
64  setReason(const std::string& reason);
65 
69  std::string
70  getReason() const;
71 
78  void
79  setHoldInstruction(const std::string& holdInstruction);
80 
81  std::string
82  getHoldInstruction() const;
83 
89  void
90  setKeyCompromiseDate(time_t compromiseDate);
91 
92  time_t
93  getKeyCompromiseDate() const;
94 
95  std::string
96  getKeyCompromiseDateAsString() const;
97 
103  void
104  setCACompromiseDate(time_t compromiseDate);
105 
106  time_t
107  getCACompromiseDate() const;
108 
109  std::string
110  getCACompromiseDateAsString() const;
111 
112  virtual bool
113  valid() const;
114 
115  virtual std::vector<std::string>
116  verify() const;
117 
118  virtual std::vector<std::string>
119  dump() const;
120 
121  private:
123 
124  std::string
125  checkHoldInstruction(const std::string& hi) const;
126 
127  bool
128  checkReason(const std::string& reason) const;
129 
130  };
131 
132 }
133 
134 #endif // CA_MGM_CRL_REASON_HPP
Definition: CRLReason.hpp:33
ca_mgm::RWCOW_pointer< CRLReasonImpl > m_impl
Definition: CRLReason.hpp:122