limal-ca-mgm
SubjectKeyIdentifierExtension.hpp
Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                     _     _   _   _     __     _                     |
00004 |                    | |   | | | \_/ |   /  \   | |                    |
00005 |                    | |   | | | |_| |  / /\ \  | |                    |
00006 |                    | |__ | | | | | | / ____ \ | |__                  |
00007 |                    |____||_| |_| |_|/ /    \ \|____|                 |
00008 |                                                                      |
00009 |                             ca-mgm library                           |
00010 |                                                                      |
00011 |                                         (C) SUSE Linux Products GmbH |
00012 \----------------------------------------------------------------------/
00013 
00014   File:       SubjectKeyIdentifierExtension.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_SUBJECT_KEY_IDENTIFIER_EXTENSION_HPP
00023 #define    LIMAL_CA_MGM_SUBJECT_KEY_IDENTIFIER_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 SubjectKeyIdentifierExtImpl;
00037         
00038         class SubjectKeyIdentifierExt : public ExtensionBase {
00039         public:
00040                 SubjectKeyIdentifierExt();
00041                 SubjectKeyIdentifierExt(CAConfig* caConfig, Type type);
00042                 SubjectKeyIdentifierExt(bool autoDetect, const String& keyid = String());
00043                 SubjectKeyIdentifierExt(const SubjectKeyIdentifierExt& extension);
00044                 virtual ~SubjectKeyIdentifierExt();
00045 
00046 #ifndef SWIG
00047 
00048                 SubjectKeyIdentifierExt&
00049                 operator=(const SubjectKeyIdentifierExt& extension);
00050 
00051 #endif
00052                 
00053                 void
00054                 setSubjectKeyIdentifier(bool autoDetect, const String& keyId = String());
00055 
00056                 bool
00057                 isAutoDetectionEnabled() const;
00058 
00064                 String
00065                 getKeyID() const;
00066 
00067                 virtual void
00068                 commit2Config(CA& ca, Type type) const;
00069 
00070                 virtual bool
00071                 valid() const;
00072         
00073                 virtual blocxx::StringArray
00074                 verify() const;
00075 
00076                 virtual blocxx::StringArray
00077                 dump() const;
00078 
00079         private:
00080                 blocxx::COWIntrusiveReference<SubjectKeyIdentifierExtImpl> m_impl;
00081         };
00082 
00083 }
00084 }
00085 
00086 #endif // LIMAL_CA_MGM_SUBJECT_KEY_IDENTIFIER_EXTENSION_HPP