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 * DSIGKeyInfoSPKIData := SPKI Information 00021 * 00022 * Author(s): Berin Lautenbach 00023 * 00024 * $Id: DSIGKeyInfoSPKIData.hpp,v 1.10 2005/06/04 11:30:25 blautenb Exp $ 00025 * 00026 */ 00027 00028 #ifndef DSIGKEYINFOSPKIDATA_INCLUDE 00029 #define DSIGKEYINFOSPKIDATA_INCLUDE 00030 00031 #include <xsec/dsig/DSIGKeyInfo.hpp> 00032 #include <xsec/utils/XSECPlatformUtils.hpp> 00033 00034 XSEC_DECLARE_XERCES_CLASS(DOMElement); 00035 00036 #include <vector> 00037 00052 class DSIG_EXPORT DSIGKeyInfoSPKIData : public DSIGKeyInfo { 00053 00054 public: 00055 00058 00069 DSIGKeyInfoSPKIData(const XSECEnv * env, 00070 XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *nameNode); 00071 00082 DSIGKeyInfoSPKIData(const XSECEnv * env); 00083 00088 virtual ~DSIGKeyInfoSPKIData(); 00089 00091 00094 00099 void load(void); 00100 00109 unsigned int getSexpSize(void); 00110 00121 virtual const XMLCh * getSexp(unsigned int index); 00122 00127 virtual const XMLCh * getKeyName(void) {return NULL;} 00128 00130 00133 00134 00145 XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * 00146 createBlankSPKIData(const XMLCh * Sexp); 00147 00157 void appendSexp(const XMLCh * Sexp); 00158 00160 00163 00168 virtual keyInfoType getKeyInfoType(void) {return DSIGKeyInfo::KEYINFO_SPKIDATA;} 00169 00171 00172 private: 00173 00174 DSIGKeyInfoSPKIData(); // Non-implemented constructor 00175 00176 struct SexpNode { 00177 const XMLCh * mp_expr; 00178 XERCES_CPP_NAMESPACE_QUALIFIER DOMNode 00179 * mp_exprTextNode; 00180 }; 00181 00182 typedef std::vector<SexpNode *> sexpVectorType; 00183 00184 sexpVectorType m_sexpList; 00185 00186 }; 00187 00188 00189 00190 #endif /* #define DSIGKEYSPKIDATA_INCLUDE */