libcamgm
ExtendedKeyUsageExt.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: ExtendedKeyUsageExt.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_EXTENDED_KEY_USAGE_EXT_HPP
23 #define CA_MGM_EXTENDED_KEY_USAGE_EXT_HPP
24 
25 #include <ca-mgm/config.h>
26 #include <ca-mgm/CommonData.hpp>
27 #include <ca-mgm/ExtensionBase.hpp>
28 #include <ca-mgm/PtrTypes.hpp>
29 
30 namespace CA_MGM_NAMESPACE {
31 
32  class CA;
33  class CAConfig;
34  class ExtendedKeyUsageExtImpl;
35 
43  public:
45  ExtendedKeyUsageExt(CAConfig* caConfig, Type type);
46 
51  ExtendedKeyUsageExt(const StringList& extKeyUsages);
52 
53  ExtendedKeyUsageExt(const ExtendedKeyUsageExt& extension);
54 
55  virtual ~ExtendedKeyUsageExt();
56 
57 #ifndef SWIG
58 
60  operator=(const ExtendedKeyUsageExt& extension);
61 
62 #endif
63 
83  void
84  setExtendedKeyUsage(const StringList& usageList);
85 
86 
91  getExtendedKeyUsage() const;
92 
96  bool
97  isEnabledFor(const std::string& extKeyUsage) const;
98 
99 
106  virtual void
107  commit2Config(CA& ca, Type type) const;
108 
114  virtual bool
115  valid() const;
116 
124  virtual std::vector<std::string>
125  verify() const;
126 
130  virtual std::vector<std::string>
131  dump() const;
132 
133  private:
135 
136  bool
137  checkValue(const std::string& value) const;
138 
139  };
140 
141 }
142 
143 #endif //CA_MGM_EXTENDED_KEY_USAGE_EXT_HPP
Definition: ExtensionBase.hpp:34
Definition: ExtendedKeyUsageExt.hpp:42
Managing a CA repository.
Definition: CA.hpp:54
std::list< std::string > StringList
Definition: CommonData.hpp:37
Definition: CAConfig.hpp:43
Type
Definition: CommonData.hpp:39
ca_mgm::RWCOW_pointer< ExtendedKeyUsageExtImpl > m_impl
Definition: ExtendedKeyUsageExt.hpp:134
bool isEnabledFor(LogLevel level_r)