00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | _ _ _ _ __ _ | 00004 | | | | | | \_/ | / \ | | | 00005 | | | | | | |_| | / /\ \ | | | 00006 | | |__ | | | | | | / ____ \ | |__ | 00007 | |____||_| |_| |_|/ / \ \|____| | 00008 | | 00009 | ca-mgm library | 00010 | | 00011 | (C) SUSE Linux Products GmbH | 00012 \----------------------------------------------------------------------/ 00013 00014 File: AuthorityKeyIdentifierGenerateExtension.hpp 00015 00016 Author: <Michael Calmer> <mc@suse.de> 00017 Maintainer: <Michael Calmer> <mc@suse.de> 00018 00019 Purpose: 00020 00021 /-*/ 00022 #ifndef LIMAL_CA_MGM_AUTHORITY_KEY_IDENTIFIER_GENERATE_EXTENSION_HPP 00023 #define LIMAL_CA_MGM_AUTHORITY_KEY_IDENTIFIER_GENERATE_EXTENSION_HPP 00024 00025 #include <limal/ca-mgm/config.h> 00026 #include <limal/ca-mgm/CommonData.hpp> 00027 #include <limal/ca-mgm/ExtensionBase.hpp> 00028 #include <blocxx/COWIntrusiveReference.hpp> 00029 00030 namespace LIMAL_NAMESPACE { 00031 00032 namespace CA_MGM_NAMESPACE { 00033 00034 class CA; 00035 class CAConfig; 00036 class AuthorityKeyIdentifierGenerateExtImpl; 00037 00044 class AuthorityKeyIdentifierGenerateExt : public ExtensionBase { 00045 public: 00046 00047 enum KeyID { 00048 KeyID_none, 00049 KeyID_normal, 00050 KeyID_always 00051 }; 00052 00053 enum Issuer { 00054 Issuer_none, 00055 Issuer_normal, 00056 Issuer_always 00057 }; 00058 00059 AuthorityKeyIdentifierGenerateExt(); 00060 AuthorityKeyIdentifierGenerateExt(CAConfig* caConfig, Type type); 00061 00065 AuthorityKeyIdentifierGenerateExt(KeyID kid, Issuer iss); 00066 AuthorityKeyIdentifierGenerateExt(const AuthorityKeyIdentifierGenerateExt& extension); 00067 virtual ~AuthorityKeyIdentifierGenerateExt(); 00068 00069 #ifndef SWIG 00070 00071 AuthorityKeyIdentifierGenerateExt& 00072 operator=(const AuthorityKeyIdentifierGenerateExt& extension); 00073 00074 #endif 00075 00079 void 00080 setKeyID(KeyID kid); 00081 00085 KeyID 00086 getKeyID() const; 00087 00091 void 00092 setIssuer(Issuer iss); 00093 00097 Issuer 00098 getIssuer() const; 00099 00106 virtual void 00107 commit2Config(CA& ca, Type type) const; 00108 00114 virtual bool 00115 valid() const; 00116 00124 virtual blocxx::StringArray 00125 verify() const; 00126 00130 virtual blocxx::StringArray 00131 dump() const; 00132 00133 private: 00134 blocxx::COWIntrusiveReference<AuthorityKeyIdentifierGenerateExtImpl> m_impl; 00135 00136 }; 00137 00138 } 00139 } 00140 00141 #endif // LIMAL_CA_MGM_AUTHORITY_KEY_IDENTIFIER_GENERATE_EXTENSION_HPP