Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

DSIGKeyInfo.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2002-2005 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /*
00018  * XSEC
00019  *
00020  * DSIGKeyInfo := Base (virtual) class that defines an XSEC KeyInfo node
00021  *
00022  * Author(s): Berin Lautenbach
00023  *
00024  * $Id: DSIGKeyInfo.hpp,v 1.13 2005/06/04 11:30:25 blautenb Exp $
00025  *
00026  */
00027 
00028 #ifndef DSIGKEYINFO_INCLUDE
00029 #define DSIGKEYINFO_INCLUDE
00030 
00031 // XSEC Includes
00032 
00033 #include <xsec/utils/XSECDOMUtils.hpp>
00034 #include <xsec/utils/XSECSafeBufferFormatter.hpp>
00035 #include <xsec/enc/XSECCryptoKey.hpp>
00036 
00037 #include <xercesc/dom/DOM.hpp>
00038 
00039 class DSIGSignature;
00040 class XSECEnv;
00041 
00060 class DSIG_EXPORT DSIGKeyInfo {
00061 
00062 public:
00063 
00073     enum keyInfoType {
00074 
00075         KEYINFO_NOTSET          = 1,            // Empty key type
00076         KEYINFO_X509            = 2,            // X509 Certificate (with embedded key)
00077         KEYINFO_VALUE_DSA       = 3,            // DSA Key
00078         KEYINFO_VALUE_RSA       = 4,
00079         KEYINFO_NAME            = 5,            // A name of a key (application dependant)
00080         KEYINFO_PGPDATA         = 6,            // A PGP key
00081         KEYINFO_SPKIDATA        = 7,
00082         KEYINFO_MGMTDATA        = 8,            // Management data
00083         KEYINFO_ENCRYPTEDKEY    = 9             // XML Encryption - Encrypted Key
00084 
00085     };
00086 
00087 public:
00088 
00091 
00100     DSIGKeyInfo(const XSECEnv * env) {mp_keyInfoDOMNode = NULL; mp_env = env;}
00101 
00106     virtual ~DSIGKeyInfo() {};
00107 
00109 
00112 
00119     virtual keyInfoType getKeyInfoType(void) = 0;
00120 
00125     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *getKeyInfoDOMNode() 
00126         {return mp_keyInfoDOMNode;}
00127 
00137     virtual const XMLCh * getKeyName(void) = 0;
00138 
00140 
00143 
00151     virtual void load() = 0;
00152 
00154 
00155 protected:
00156 
00157     XERCES_CPP_NAMESPACE_QUALIFIER DOMNode          * mp_keyInfoDOMNode;
00158     const XSECEnv                                   * mp_env;
00159 
00160 private:
00161     DSIGKeyInfo();
00162 
00163 };
00164 
00165 
00166 
00167 
00168 #endif /* #define XSECKEYINFO_INCLUDE */

Generated on Sun Jul 3 17:37:25 2005 for XML-Security-C by  doxygen 1.4.2