limal-ca-mgm
BasicConstraintsExtension.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: BasicConstraintsExtension.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_BASIC_CONSTRAINTS_EXTENSION_HPP
23 #define LIMAL_CA_MGM_BASIC_CONSTRAINTS_EXTENSION_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 BasicConstraintsExtImpl;
37 
45  {
46  public:
48  BasicConstraintsExt(CAConfig* caConfig, Type type);
49  BasicConstraintsExt(bool isCa, blocxx::Int32 pathLength=-1);
50  BasicConstraintsExt(const BasicConstraintsExt& extension);
51  virtual ~BasicConstraintsExt();
52 
53 #ifndef SWIG
54 
55  BasicConstraintsExt& operator=(const BasicConstraintsExt& extension);
56 
57 #endif
58 
66  void setBasicConstraints(bool isCa, blocxx::Int32 pathLength=-1);
67 
71  bool isCA() const;
72 
76  blocxx::Int32 getPathLength() const;
77 
84  virtual void commit2Config(CA& ca, Type type) const;
85 
91  virtual bool valid() const;
92 
100  virtual blocxx::StringArray verify() const;
101 
105  virtual blocxx::StringArray dump() const;
106 
107  private:
108  blocxx::COWIntrusiveReference<BasicConstraintsExtImpl> m_impl;
109 
110  };
111 
112 }
113 }
114 
115 #endif // LIMAL_CA_MGM_BASIC_CONSTRAINTS_EXTENSION_HPP