limal-ca-mgm
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 LIMAL_CA_MGM_EXTENDED_KEY_USAGE_EXT_HPP
23 #define LIMAL_CA_MGM_EXTENDED_KEY_USAGE_EXT_HPP
24 
25 #include <limal/ca-mgm/config.h>
28 #include <blocxx/COWIntrusiveReference.hpp>
29 
30 namespace LIMAL_NAMESPACE {
31 
32 namespace CA_MGM_NAMESPACE {
33 
34  class CA;
35  class CAConfig;
36  class ExtendedKeyUsageExtImpl;
37 
45  public:
47  ExtendedKeyUsageExt(CAConfig* caConfig, Type type);
48 
53  ExtendedKeyUsageExt(const StringList& extKeyUsages);
54 
55  ExtendedKeyUsageExt(const ExtendedKeyUsageExt& extension);
56 
57  virtual ~ExtendedKeyUsageExt();
58 
59 #ifndef SWIG
60 
62  operator=(const ExtendedKeyUsageExt& extension);
63 
64 #endif
65 
85  void
86  setExtendedKeyUsage(const StringList& usageList);
87 
88 
93  getExtendedKeyUsage() const;
94 
98  bool
99  isEnabledFor(const String& extKeyUsage) const;
100 
101 
108  virtual void
109  commit2Config(CA& ca, Type type) const;
110 
116  virtual bool
117  valid() const;
118 
126  virtual blocxx::StringArray
127  verify() const;
128 
132  virtual blocxx::StringArray
133  dump() const;
134 
135  private:
136  blocxx::COWIntrusiveReference<ExtendedKeyUsageExtImpl> m_impl;
137 
138  bool
139  checkValue(const String& value) const;
140 
141  };
142 
143 }
144 }
145 
146 #endif //LIMAL_CA_MGM_EXTENDED_KEY_USAGE_EXT_HPP