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 * DSIGKeyInfoPGPData := Contains a key pointer to a PGP key 00021 * 00022 * Author(s): Berin Lautenbach 00023 * 00024 * $Id: DSIGKeyInfoPGPData.hpp,v 1.9 2005/06/04 11:30:25 blautenb Exp $ 00025 * 00026 */ 00027 00028 #ifndef DSIGKEYINFOPGPDATA_INCLUDE 00029 #define DSIGKEYINFOPGPDATA_INCLUDE 00030 00031 #include <xsec/utils/XSECSafeBuffer.hpp> 00032 #include <xsec/dsig/DSIGKeyInfo.hpp> 00033 #include <xsec/utils/XSECPlatformUtils.hpp> 00034 00035 XSEC_DECLARE_XERCES_CLASS(DOMElement); 00036 00051 class DSIG_EXPORT DSIGKeyInfoPGPData : public DSIGKeyInfo { 00052 00053 public: 00054 00057 00068 DSIGKeyInfoPGPData(const XSECEnv * env, 00069 XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *pgpDataNode); 00070 00081 DSIGKeyInfoPGPData(const XSECEnv * env); 00082 00087 virtual ~DSIGKeyInfoPGPData(); 00088 00090 00093 00098 virtual void load(void); 00099 00109 virtual const XMLCh * getKeyID(void) {return mp_keyID;} 00110 00120 virtual const XMLCh * getKeyPacket(void) {return mp_keyPacket;} 00121 00126 virtual const XMLCh * getKeyName(void) {return NULL;} 00127 00129 00132 00144 XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * 00145 createBlankPGPData(const XMLCh * id, const XMLCh * packet); 00146 00155 void setKeyID(const XMLCh * id); 00156 00165 void setKeyPacket(const XMLCh * packet); 00166 00168 00171 00176 virtual keyInfoType getKeyInfoType(void) {return DSIGKeyInfo::KEYINFO_PGPDATA;} 00177 00179 00180 private: 00181 00182 DSIGKeyInfoPGPData(); // Non-implemented constructor 00183 00184 const XMLCh * mp_keyID; // Key ID (from DOM) 00185 const XMLCh * mp_keyPacket; // key Packet (from DOM) 00186 XERCES_CPP_NAMESPACE_QUALIFIER DOMNode 00187 * mp_keyIDTextNode; // Text node containing the ID 00188 XERCES_CPP_NAMESPACE_QUALIFIER DOMNode 00189 * mp_keyPacketTextNode; // Text node contianing key packet 00190 }; 00191 00192 00193 00194 #endif /* #define DSIGKEYINFOPGPDATA_INCLUDE */