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

DSIGKeyInfo.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2002-2004 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  * imitations 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.10 2004/02/08 10:20:51 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 
00061 class DSIG_EXPORT DSIGKeyInfo {
00062 
00063 public:
00064 
00074     enum keyInfoType {
00075 
00076         KEYINFO_NOTSET          = 1,            // Empty key type
00077         KEYINFO_X509            = 2,            // X509 Certificate (with embedded key)
00078         KEYINFO_VALUE_DSA       = 3,            // DSA Key
00079         KEYINFO_VALUE_RSA       = 4,
00080         KEYINFO_NAME            = 5,            // A name of a key (application dependant)
00081         KEYINFO_PGPDATA         = 6,            // A PGP key
00082         KEYINFO_SPKIDATA        = 7,
00083         KEYINFO_MGMTDATA        = 8,            // Management data
00084         KEYINFO_ENCRYPTEDKEY    = 9             // XML Encryption - Encrypted Key
00085 
00086     };
00087 
00088 public:
00089 
00092 
00101     DSIGKeyInfo(const XSECEnv * env) {mp_keyInfoDOMNode = NULL; mp_env = env;}
00102 
00107     virtual ~DSIGKeyInfo() {};
00108 
00110 
00113 
00120     virtual keyInfoType getKeyInfoType(void) = 0;
00121 
00126     virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *getKeyInfoDOMNode() 
00127         {return mp_keyInfoDOMNode;}
00128 
00138     virtual const XMLCh * getKeyName(void) = 0;
00139 
00141 
00144 
00152     virtual void load() = 0;
00153 
00155 
00156 protected:
00157 
00158     XERCES_CPP_NAMESPACE_QUALIFIER DOMNode          * mp_keyInfoDOMNode;
00159     const XSECEnv                                   * mp_env;
00160 
00161 private:
00162     DSIGKeyInfo();
00163 
00164 };
00165 
00166 
00167 
00168 
00169 #endif /* #define XSECKEYINFO_INCLUDE */

Generated on Sun Mar 14 21:35:25 2004 for XML-Security-C by doxygen 1.3.2