You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by sc...@apache.org on 2017/12/05 22:07:37 UTC
svn commit: r1817243 - in /santuario/xml-security-cpp/trunk/xsec: ./
samples/ tools/xklient/ xkms/ xkms/impl/
Author: scantor
Date: Tue Dec 5 22:07:36 2017
New Revision: 1817243
URL: http://svn.apache.org/viewvc?rev=1817243&view=rev
Log:
Fix up code after removal of old methods.
Modified:
santuario/xml-security-cpp/trunk/xsec/Makefile.am
santuario/xml-security-cpp/trunk/xsec/samples/simpleEncrypt.cpp
santuario/xml-security-cpp/trunk/xsec/samples/simpleHMAC.cpp
santuario/xml-security-cpp/trunk/xsec/tools/xklient/xklient.cpp
santuario/xml-security-cpp/trunk/xsec/xkms/XKMSAuthentication.hpp
santuario/xml-security-cpp/trunk/xsec/xkms/XKMSMessageAbstractType.hpp
santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRecoverResult.hpp
santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRegisterRequest.hpp
santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRegisterResult.hpp
santuario/xml-security-cpp/trunk/xsec/xkms/XKMSReissueRequest.hpp
santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSAuthenticationImpl.cpp
santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSAuthenticationImpl.hpp
santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSMessageAbstractTypeImpl.cpp
santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSMessageAbstractTypeImpl.hpp
santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.cpp
santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.hpp
santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterRequestImpl.cpp
santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterRequestImpl.hpp
santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterResultImpl.cpp
santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterResultImpl.hpp
santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSReissueRequestImpl.cpp
santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSReissueRequestImpl.hpp
Modified: santuario/xml-security-cpp/trunk/xsec/Makefile.am
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/Makefile.am?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/Makefile.am (original)
+++ santuario/xml-security-cpp/trunk/xsec/Makefile.am Tue Dec 5 22:07:36 2017
@@ -258,7 +258,6 @@ transformersinclude_HEADERS = \
transformers/TXFMBase64.hpp
utilsinclude_HEADERS = \
- utils/XSECAutoPtr.hpp \
utils/XSECSafeBuffer.hpp \
utils/XSECSOAPRequestor.hpp \
utils/XSECTXFMInputSource.hpp \
Modified: santuario/xml-security-cpp/trunk/xsec/samples/simpleEncrypt.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/samples/simpleEncrypt.cpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/samples/simpleEncrypt.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/samples/simpleEncrypt.cpp Tue Dec 5 22:07:36 2017
@@ -177,7 +177,7 @@ int main (int argc, char **argv) {
cipher->setKey(key);
/* Encrypt the element that needs to be hidden */
- cipher->encryptElement(g_toEncrypt, ENCRYPT_3DES_CBC);
+ cipher->encryptElement(g_toEncrypt, DSIGConstants::s_unicodeStrURI3DES_CBC);
/* Now lets create an EncryptedKey element to hold the generated key */
@@ -192,7 +192,7 @@ int main (int argc, char **argv) {
/* Now do the encrypt, using RSA with PKCS 1.5 padding */
XENCEncryptedKey * encryptedKey =
- cipher->encryptKey(keyBuf, 24, ENCRYPT_RSA_15);
+ cipher->encryptKey(keyBuf, 24, DSIGConstants::s_unicodeStrURIRSA_1_5);
/*
* Add the encrypted Key to the previously created EncryptedData, which
Modified: santuario/xml-security-cpp/trunk/xsec/samples/simpleHMAC.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/samples/simpleHMAC.cpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/samples/simpleHMAC.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/samples/simpleHMAC.cpp Tue Dec 5 22:07:36 2017
@@ -128,7 +128,9 @@ int main (int argc, char **argv) {
// Use it to create a blank signature DOM structure from the doc
- sigNode = sig->createBlankSignature(doc, CANON_C14N_COM, SIGNATURE_HMAC, HASH_SHA1);
+ sigNode = sig->createBlankSignature(doc,
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIHMAC_SHA1);
// Inser the signature DOM nodes into the doc
@@ -137,7 +139,7 @@ int main (int argc, char **argv) {
rootElem->appendChild(doc->createTextNode(MAKE_UNICODE_STRING("\n")));
// Create an envelope reference for the text to be signed
- DSIGReference * ref = sig->createReference(MAKE_UNICODE_STRING(""));
+ DSIGReference * ref = sig->createReference(MAKE_UNICODE_STRING(""), DSIGConstants::s_unicodeStrURISHA1);
ref->appendEnvelopedSignatureTransform();
// Set the HMAC Key to be the string "secret"
Modified: santuario/xml-security-cpp/trunk/xsec/tools/xklient/xklient.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/tools/xklient/xklient.cpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/tools/xklient/xklient.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/tools/xklient/xklient.cpp Tue Dec 5 22:07:36 2017
@@ -599,7 +599,10 @@ XKMSMessageAbstractType * createLocateRe
return NULL;
}
- sig = lr->addSignature(CANON_C14N_NOC, SIGNATURE_DSA, HASH_SHA1);
+ sig = lr->addSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIDSA_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
// Create the XSEC OpenSSL interface
key = new OpenSSLCryptoKeyDSA(pkey);
@@ -624,7 +627,10 @@ XKMSMessageAbstractType * createLocateRe
cerr << "RSA Key requested, but OpenSSL loaded something else\n";
exit (1);
}
- sig = lr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1);
+ sig = lr->addSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIRSA_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
key = new OpenSSLCryptoKeyRSA(pkey);
const BIGNUM *n=NULL, *e=NULL, *d=NULL;
@@ -879,7 +885,10 @@ XKMSMessageAbstractType * createValidate
return NULL;
}
- sig = vr->addSignature(CANON_C14N_NOC, SIGNATURE_DSA, HASH_SHA1);
+ sig = vr->addSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIDSA_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
// Create the XSEC OpenSSL interface
key = new OpenSSLCryptoKeyDSA(pkey);
@@ -904,7 +913,10 @@ XKMSMessageAbstractType * createValidate
cerr << "RSA Key requested, but OpenSSL loaded something else\n";
exit (1);
}
- sig = vr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1);
+ sig = vr->addSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIRSA_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
key = new OpenSSLCryptoKeyRSA(pkey);
const BIGNUM *n=NULL, *e=NULL, *d=NULL;
@@ -1013,7 +1025,7 @@ void printRegisterRequestUsage(void) {
XKMSMessageAbstractType * createRegisterRequest(XSECProvider &prov, DOMDocument **doc, int argc, char ** argv, int ¶mCount, XKMSCompoundRequest * cr = NULL) {
XSECCryptoKey *proofOfPossessionKey = NULL;
- signatureMethod proofOfPossessionSm = SIGNATURE_DSA;
+ const XMLCh* proofOfPossessionSm = NULL;
if (paramCount >= argc ||
(_stricmp(argv[paramCount], "--help") == 0) ||
@@ -1178,7 +1190,10 @@ XKMSMessageAbstractType * createRegister
// Set key and validate
XKMSAuthentication * a = rr->addAuthentication();
- DSIGSignature * sig = a->addKeyBindingAuthenticationSignature();
+ DSIGSignature * sig = a->addKeyBindingAuthenticationSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIHMAC_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
sig->setSigningKey(k);
sig->sign();
@@ -1238,7 +1253,10 @@ XKMSMessageAbstractType * createRegister
return NULL;
}
- sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_DSA, HASH_SHA1);
+ sig = rr->addSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIDSA_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
// Create the XSEC OpenSSL interface
key = new OpenSSLCryptoKeyDSA(pkey);
@@ -1263,7 +1281,10 @@ XKMSMessageAbstractType * createRegister
cerr << "RSA Key requested, but OpenSSL loaded something else\n";
exit (1);
}
- sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1);
+ sig = rr->addSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIRSA_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
key = new OpenSSLCryptoKeyRSA(pkey);
const BIGNUM *n=NULL, *e=NULL, *d=NULL;
@@ -1344,7 +1365,7 @@ XKMSMessageAbstractType * createRegister
}
proofOfPossessionKey = new OpenSSLCryptoKeyDSA(pkey);
- proofOfPossessionSm = SIGNATURE_DSA;
+ proofOfPossessionSm = DSIGConstants::s_unicodeStrURIDSA_SHA1;
const BIGNUM *otherP = NULL, *otherQ = NULL, *otherG = NULL;
DSA_get0_pqg(EVP_PKEY_get0_DSA(pkey), &otherP, &otherQ, &otherG);
@@ -1369,7 +1390,7 @@ XKMSMessageAbstractType * createRegister
}
proofOfPossessionKey = new OpenSSLCryptoKeyRSA(pkey);
- proofOfPossessionSm = SIGNATURE_RSA;
+ proofOfPossessionSm = DSIGConstants::s_unicodeStrURIRSA_SHA1;
const BIGNUM *n=NULL, *e=NULL, *d=NULL;
RSA_get0_key(EVP_PKEY_get0_RSA(pkey), &n, &e, &d);
@@ -1404,7 +1425,10 @@ XKMSMessageAbstractType * createRegister
// Set up the proof of possession
DSIGSignature * s =
- rr->addProofOfPossessionSignature(CANON_C14NE_NOC, proofOfPossessionSm);
+ rr->addProofOfPossessionSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ proofOfPossessionSm,
+ DSIGConstants::s_unicodeStrURISHA1);
s->setSigningKey(proofOfPossessionKey);
s->sign();
@@ -1587,7 +1611,10 @@ XKMSMessageAbstractType * createRevokeRe
// Set key and validate
XKMSAuthentication * a = rr->addAuthentication();
- DSIGSignature * sig = a->addKeyBindingAuthenticationSignature();
+ DSIGSignature * sig = a->addKeyBindingAuthenticationSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIHMAC_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
sig->setSigningKey(k);
sig->sign();
@@ -1647,7 +1674,10 @@ XKMSMessageAbstractType * createRevokeRe
return NULL;
}
- sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_DSA, HASH_SHA1);
+ sig = rr->addSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIDSA_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
// Create the XSEC OpenSSL interface
key = new OpenSSLCryptoKeyDSA(pkey);
@@ -1672,7 +1702,10 @@ XKMSMessageAbstractType * createRevokeRe
cerr << "RSA Key requested, but OpenSSL loaded something else\n";
exit (1);
}
- sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1);
+ sig = rr->addSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIRSA_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
key = new OpenSSLCryptoKeyRSA(pkey);
const BIGNUM *n=NULL, *e=NULL, *d=NULL;
@@ -1840,7 +1873,7 @@ void printReissueRequestUsage(void) {
XKMSMessageAbstractType * createReissueRequest(XSECProvider &prov, DOMDocument **doc, int argc, char ** argv, int ¶mCount, XKMSCompoundRequest * cr = NULL) {
XSECCryptoKey *proofOfPossessionKey = NULL;
- signatureMethod proofOfPossessionSm = SIGNATURE_DSA;
+ const XMLCh* proofOfPossessionSm = NULL;
if (paramCount >= argc ||
(_stricmp(argv[paramCount], "--help") == 0) ||
@@ -1958,7 +1991,10 @@ XKMSMessageAbstractType * createReissueR
// Set key and validate
XKMSAuthentication * a = rr->addAuthentication();
- DSIGSignature * sig = a->addKeyBindingAuthenticationSignature();
+ DSIGSignature * sig = a->addKeyBindingAuthenticationSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIHMAC_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
sig->setSigningKey(k);
sig->sign();
@@ -2018,7 +2054,10 @@ XKMSMessageAbstractType * createReissueR
return NULL;
}
- sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_DSA, HASH_SHA1);
+ sig = rr->addSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIDSA_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
// Create the XSEC OpenSSL interface
key = new OpenSSLCryptoKeyDSA(pkey);
@@ -2043,7 +2082,10 @@ XKMSMessageAbstractType * createReissueR
cerr << "RSA Key requested, but OpenSSL loaded something else\n";
exit (1);
}
- sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1);
+ sig = rr->addSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIRSA_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
key = new OpenSSLCryptoKeyRSA(pkey);
const BIGNUM *n=NULL, *e=NULL, *d=NULL;
@@ -2124,7 +2166,7 @@ XKMSMessageAbstractType * createReissueR
}
proofOfPossessionKey = new OpenSSLCryptoKeyDSA(pkey);
- proofOfPossessionSm = SIGNATURE_DSA;
+ proofOfPossessionSm = DSIGConstants::s_unicodeStrURIDSA_SHA1;
const BIGNUM *otherP = NULL, *otherQ = NULL, *otherG = NULL;
DSA_get0_pqg(EVP_PKEY_get0_DSA(pkey), &otherP, &otherQ, &otherG);
@@ -2149,7 +2191,7 @@ XKMSMessageAbstractType * createReissueR
}
proofOfPossessionKey = new OpenSSLCryptoKeyRSA(pkey);
- proofOfPossessionSm = SIGNATURE_RSA;
+ proofOfPossessionSm = DSIGConstants::s_unicodeStrURIRSA_SHA1;
const BIGNUM *n=NULL, *e=NULL, *d=NULL;
RSA_get0_key(EVP_PKEY_get0_RSA(pkey), &n, &e, &d);
@@ -2184,7 +2226,10 @@ XKMSMessageAbstractType * createReissueR
// Set up the proof of possession
DSIGSignature * s =
- rr->addProofOfPossessionSignature(CANON_C14NE_NOC, proofOfPossessionSm);
+ rr->addProofOfPossessionSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ proofOfPossessionSm,
+ DSIGConstants::s_unicodeStrURISHA1);
s->setSigningKey(proofOfPossessionKey);
s->sign();
@@ -2368,7 +2413,10 @@ XKMSMessageAbstractType * createRecoverR
// Set key and validate
XKMSAuthentication * a = rr->addAuthentication();
- DSIGSignature * sig = a->addKeyBindingAuthenticationSignature();
+ DSIGSignature * sig = a->addKeyBindingAuthenticationSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIHMAC_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
sig->setSigningKey(k);
sig->sign();
@@ -2428,7 +2476,10 @@ XKMSMessageAbstractType * createRecoverR
return NULL;
}
- sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_DSA, HASH_SHA1);
+ sig = rr->addSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIDSA_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
// Create the XSEC OpenSSL interface
key = new OpenSSLCryptoKeyDSA(pkey);
@@ -2453,7 +2504,10 @@ XKMSMessageAbstractType * createRecoverR
cerr << "RSA Key requested, but OpenSSL loaded something else\n";
exit (1);
}
- sig = rr->addSignature(CANON_C14N_NOC, SIGNATURE_RSA, HASH_SHA1);
+ sig = rr->addSignature(
+ DSIGConstants::s_unicodeStrURIC14N_NOC,
+ DSIGConstants::s_unicodeStrURIRSA_SHA1,
+ DSIGConstants::s_unicodeStrURISHA1);
key = new OpenSSLCryptoKeyRSA(pkey);
const BIGNUM *n=NULL, *e=NULL, *d=NULL;
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/XKMSAuthentication.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/XKMSAuthentication.hpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/XKMSAuthentication.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/XKMSAuthentication.hpp Tue Dec 5 22:07:36 2017
@@ -129,9 +129,9 @@ public:
*/
virtual DSIGSignature * addKeyBindingAuthenticationSignature(
- canonicalizationMethod cm = CANON_C14NE_NOC,
- signatureMethod sm = SIGNATURE_HMAC,
- hashMethod hm = HASH_SHA1) = 0;
+ const XMLCh* c14nAlgorithm,
+ const XMLCh* signatureAlgorithm,
+ const XMLCh* hashAlgorithm) = 0;
/**
* \brief Set the NotBoundAuthentication value
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/XKMSMessageAbstractType.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/XKMSMessageAbstractType.hpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/XKMSMessageAbstractType.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/XKMSMessageAbstractType.hpp Tue Dec 5 22:07:36 2017
@@ -256,9 +256,9 @@ public:
*/
virtual DSIGSignature * addSignature(
- canonicalizationMethod cm = CANON_C14N_NOC,
- signatureMethod sm = SIGNATURE_DSA,
- hashMethod hm = HASH_SHA1) = 0;
+ const XMLCh* c14nAlgorithm,
+ const XMLCh* signatureAlgorithm,
+ const XMLCh* hashAlgorithm) = 0;
//@}
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRecoverResult.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRecoverResult.hpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRecoverResult.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRecoverResult.hpp Tue Dec 5 22:07:36 2017
@@ -15,197 +15,191 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- */
-
-/*
- * XSEC
- *
- * XKMSRecoverResult := Interface for RecoverResult Messages
- *
- * $Id$
- *
- */
-
-#ifndef XKMSRECOVERRESULT_INCLUDE
-#define XKMSRECOVERRESULT_INCLUDE
-
-// XSEC Includes
-
-#include <xsec/framework/XSECDefs.hpp>
-#include <xsec/xkms/XKMSResultType.hpp>
-#include <xsec/xkms/XKMSStatus.hpp>
+ */
+
+/*
+ * XSEC
+ *
+ * XKMSRecoverResult := Interface for RecoverResult Messages
+ *
+ * $Id$
+ *
+ */
+
+#ifndef XKMSRECOVERRESULT_INCLUDE
+#define XKMSRECOVERRESULT_INCLUDE
+
+// XSEC Includes
+
+#include <xsec/framework/XSECDefs.hpp>
+#include <xsec/xkms/XKMSResultType.hpp>
+#include <xsec/xkms/XKMSStatus.hpp>
#ifdef XSEC_XKMS_ENABLED
-
-class XKMSKeyBinding;
-class XKMSUnverifiedKeyBinding;
-class XKMSRSAKeyPair;
-class XENCCipherData;
-
-/**
- * @ingroup xkms
- */
-
-/**
- * @brief Interface definition for the RecoverResult elements
- *
- * The \<RecoverResult\> is used by the X-KRSS service to response to
- * a user request to Recover a new key with the service.
- *
- * The schema definition for RecoverResult is as follows :
- *
- * \verbatim
- <!-- RecoverResult -->
- <element name="RecoverResult" type="xkms:RecoverResultType"/>
- <complexType name="RecoverResultType">
- <complexContent>
- <extension base="xkms:ResultType">
- <sequence>
- <element ref="xkms:KeyBinding" minOccurs="0"
- maxOccurs="unbounded"/>
- <element ref="xkms:PrivateKey" minOccurs="0"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
- <!-- /RecoverResult -->
-\endverbatim
- */
-
-class XKMSRecoverResult : public XKMSResultType {
-
- /** @name Constructors and Destructors */
- //@{
-
-protected:
-
- XKMSRecoverResult() {};
-
-public:
-
- virtual ~XKMSRecoverResult() {};
-
- /** @name Getter Interface Methods */
- //@{
-
- /**
- * \brief Return the element at the base of the message
- */
-
- virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) const = 0;
-
- //@}
-
- /** @name KeyBinding handling */
- //@{
-
- /**
- * \brief Find number of KeyBinding elements
- *
- * @returns the number of KeyBinding items within the RecoverResult
- */
-
- virtual int getKeyBindingSize(void) const = 0;
-
- /*
- * \brief Obtain an KeyBinding item
- *
- * @param item Index of the item to return (0 = first element)
- * @returns the KeyBinding referenced by "item"
- */
-
- virtual XKMSKeyBinding * getKeyBindingItem(int item) const = 0;
-
- /*
- * \brief Append a new KeyBinding element
- *
- * Allows callers to append a new KeyBinding item.
- * The item is initially empty of KeyInfo elements - these must be added
- * by the caller.
- *
- * @param status The status (Valid, Invalid or Indeterminate) of this
- * key
- * @returns the newly created KeyBinding object (already inserted
- * in the RecoverResult
- */
-
- virtual XKMSKeyBinding * appendKeyBindingItem(XKMSStatus::StatusValue status) = 0;
-
- //@}
-
- /** @name PrivateKey handling */
- //@{
-
- /**
- * \brief Return the RSAKeyPair
- *
- * This call requires the passphrase used to encrypt the private key.
- * The implementation decrypts the PrivateKey element in the
- * RecoverResult and returns the resulting RSAKeyPair.
- *
- * @note The decryption is performed *inside* the RecoverResult, so
- * this actually modified the contents of the XML. It should never
- * be called twice!
- *
- * @param passPhrase The local code page version of the pass phrase
- * @returns the number of KeyBinding items within the RecoverResult
- */
-
- virtual XKMSRSAKeyPair * getRSAKeyPair(const char * passPhrase) = 0;
-
- /**
- * \brief Add the RSAKeyPair in an encrypted PrivateKey
- *
- * This call requires the passphrase to encrypt the private key.
- * The implementation encrypts the RSAKeyPair and adds the result
- * to the resulting RSAKey Pair. It returns the CipherData element
- * to the caller (not a structure for the PrivateKey)
- *
- * @note The encryption is performed *inside* the RecoverResult, so
- * this actually modified the contents of the XML. It should never
- * be called twice!
- *
- * @param passPhrase The local code page version of the pass phrase
- * @param Modulus Base64 encoded string with the modulus
- * @param Exponent Base64 encoded string with the exponent
- * @param P Base64 encoded string with p
- * @param Q Base64 encoded string with q
- * @param DP Base64 encoded string with dp
- * @param DQ Base64 encoded string with dq
- * @param InverseQ Base64 encoded string with inverseq
- * @param D Base64 encoded string with d
- * @param em The encryptionMethod to use for this encryption. Use
- * ENCRYPT_NONE if a user defined type is required.
- * @param algorithmURI If ENCRYPT_NONE is passed in, this will be
- * used to set the algorithm URI. If this is also NULL - no
- * EncryptionMethod will be set. <b>NULL Value Unsupported if em not
- * set! It's use could cause problems!</b>
- * @returns The encrypted result of adding the info
- */
-
- virtual XENCEncryptedData * setRSAKeyPair(const char * passPhrase,
- XMLCh * Modulus,
- XMLCh * Exponent,
- XMLCh * P,
- XMLCh * Q,
- XMLCh * DP,
- XMLCh * DQ,
- XMLCh * InverseQ,
- XMLCh * D,
- encryptionMethod em,
- const XMLCh * algorithmURI = NULL) = 0;
-
- //@}
-
-
-private:
-
- // Unimplemented
- XKMSRecoverResult(const XKMSRecoverResult &);
- XKMSRecoverResult & operator = (const XKMSRecoverResult &);
-
-};
+
+class XKMSKeyBinding;
+class XKMSUnverifiedKeyBinding;
+class XKMSRSAKeyPair;
+class XENCCipherData;
+
+/**
+ * @ingroup xkms
+ */
+
+/**
+ * @brief Interface definition for the RecoverResult elements
+ *
+ * The \<RecoverResult\> is used by the X-KRSS service to response to
+ * a user request to Recover a new key with the service.
+ *
+ * The schema definition for RecoverResult is as follows :
+ *
+ * \verbatim
+ <!-- RecoverResult -->
+ <element name="RecoverResult" type="xkms:RecoverResultType"/>
+ <complexType name="RecoverResultType">
+ <complexContent>
+ <extension base="xkms:ResultType">
+ <sequence>
+ <element ref="xkms:KeyBinding" minOccurs="0"
+ maxOccurs="unbounded"/>
+ <element ref="xkms:PrivateKey" minOccurs="0"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <!-- /RecoverResult -->
+\endverbatim
+ */
+
+class XKMSRecoverResult : public XKMSResultType {
+
+ /** @name Constructors and Destructors */
+ //@{
+
+protected:
+
+ XKMSRecoverResult() {};
+
+public:
+
+ virtual ~XKMSRecoverResult() {};
+
+ /** @name Getter Interface Methods */
+ //@{
+
+ /**
+ * \brief Return the element at the base of the message
+ */
+
+ virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) const = 0;
+
+ //@}
+
+ /** @name KeyBinding handling */
+ //@{
+
+ /**
+ * \brief Find number of KeyBinding elements
+ *
+ * @returns the number of KeyBinding items within the RecoverResult
+ */
+
+ virtual int getKeyBindingSize(void) const = 0;
+
+ /*
+ * \brief Obtain an KeyBinding item
+ *
+ * @param item Index of the item to return (0 = first element)
+ * @returns the KeyBinding referenced by "item"
+ */
+
+ virtual XKMSKeyBinding * getKeyBindingItem(int item) const = 0;
+
+ /*
+ * \brief Append a new KeyBinding element
+ *
+ * Allows callers to append a new KeyBinding item.
+ * The item is initially empty of KeyInfo elements - these must be added
+ * by the caller.
+ *
+ * @param status The status (Valid, Invalid or Indeterminate) of this
+ * key
+ * @returns the newly created KeyBinding object (already inserted
+ * in the RecoverResult
+ */
+
+ virtual XKMSKeyBinding * appendKeyBindingItem(XKMSStatus::StatusValue status) = 0;
+
+ //@}
+
+ /** @name PrivateKey handling */
+ //@{
+
+ /**
+ * \brief Return the RSAKeyPair
+ *
+ * This call requires the passphrase used to encrypt the private key.
+ * The implementation decrypts the PrivateKey element in the
+ * RecoverResult and returns the resulting RSAKeyPair.
+ *
+ * @note The decryption is performed *inside* the RecoverResult, so
+ * this actually modified the contents of the XML. It should never
+ * be called twice!
+ *
+ * @param passPhrase The local code page version of the pass phrase
+ * @returns the number of KeyBinding items within the RecoverResult
+ */
+
+ virtual XKMSRSAKeyPair * getRSAKeyPair(const char * passPhrase) = 0;
+
+ /**
+ * \brief Add the RSAKeyPair in an encrypted PrivateKey
+ *
+ * This call requires the passphrase to encrypt the private key.
+ * The implementation encrypts the RSAKeyPair and adds the result
+ * to the resulting RSAKey Pair. It returns the CipherData element
+ * to the caller (not a structure for the PrivateKey)
+ *
+ * @note The encryption is performed *inside* the RecoverResult, so
+ * this actually modified the contents of the XML. It should never
+ * be called twice!
+ *
+ * @param passPhrase The local code page version of the pass phrase
+ * @param Modulus Base64 encoded string with the modulus
+ * @param Exponent Base64 encoded string with the exponent
+ * @param P Base64 encoded string with p
+ * @param Q Base64 encoded string with q
+ * @param DP Base64 encoded string with dp
+ * @param DQ Base64 encoded string with dq
+ * @param InverseQ Base64 encoded string with inverseq
+ * @param D Base64 encoded string with d
+ * @param algorithmURI algorithm URI
+ * @returns The encrypted result of adding the info
+ */
+
+ virtual XENCEncryptedData * setRSAKeyPair(const char * passPhrase,
+ XMLCh * Modulus,
+ XMLCh * Exponent,
+ XMLCh * P,
+ XMLCh * Q,
+ XMLCh * DP,
+ XMLCh * DQ,
+ XMLCh * InverseQ,
+ XMLCh * D,
+ const XMLCh * algorithmURI) = 0;
+
+ //@}
+
+
+private:
+
+ // Unimplemented
+ XKMSRecoverResult(const XKMSRecoverResult &);
+ XKMSRecoverResult & operator = (const XKMSRecoverResult &);
+
+};
#endif /* XSEC_XKMS_ENABLED */
-
-#endif /* XKMSRECOVERRESULT_INCLUDE */
+
+#endif /* XKMSRECOVERRESULT_INCLUDE */
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRegisterRequest.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRegisterRequest.hpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRegisterRequest.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRegisterRequest.hpp Tue Dec 5 22:07:36 2017
@@ -170,9 +170,9 @@ public:
*/
virtual DSIGSignature * addProofOfPossessionSignature(
- canonicalizationMethod cm = CANON_C14N_NOC,
- signatureMethod sm = SIGNATURE_DSA,
- hashMethod hm = HASH_SHA1) = 0;
+ const XMLCh* c14nAlgorithm,
+ const XMLCh* signatureAlgorithm,
+ const XMLCh* hashAlgorithm) = 0;
//@}
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRegisterResult.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRegisterResult.hpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRegisterResult.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/XKMSRegisterResult.hpp Tue Dec 5 22:07:36 2017
@@ -174,12 +174,7 @@ public:
* @param DQ Base64 encoded string with dq
* @param InverseQ Base64 encoded string with inverseq
* @param D Base64 encoded string with d
- * @param em The encryptionMethod to use for this encryption. Use
- * ENCRYPT_NONE if a user defined type is required.
- * @param algorithmURI If ENCRYPT_NONE is passed in, this will be
- * used to set the algorithm URI. If this is also NULL - no
- * EncryptionMethod will be set. <b>NULL Value Unsupported if em not
- * set! It's use could cause problems!</b>
+ * @param algorithmURI algorithm URI
* @returns The encrypted result of adding the info
*/
@@ -192,8 +187,7 @@ public:
XMLCh * DQ,
XMLCh * InverseQ,
XMLCh * D,
- encryptionMethod em,
- const XMLCh * algorithmURI = NULL) = 0;
+ const XMLCh * algorithmURI) = 0;
//@}
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/XKMSReissueRequest.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/XKMSReissueRequest.hpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/XKMSReissueRequest.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/XKMSReissueRequest.hpp Tue Dec 5 22:07:36 2017
@@ -15,179 +15,179 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- */
-
-/*
- * XSEC
- *
- * XKMSReissueRequest := Interface for RegisterRequest Messages
- *
- * $Id$
- *
- */
-
-#ifndef XKMSREISSUEREQUEST_INCLUDE
-#define XKMSREISSUEREQUEST_INCLUDE
-
-// XSEC Includes
-
-#include <xsec/framework/XSECDefs.hpp>
-#include <xsec/xkms/XKMSRequestAbstractType.hpp>
-#include <xsec/xkms/XKMSStatus.hpp>
+ */
+
+/*
+ * XSEC
+ *
+ * XKMSReissueRequest := Interface for RegisterRequest Messages
+ *
+ * $Id$
+ *
+ */
+
+#ifndef XKMSREISSUEREQUEST_INCLUDE
+#define XKMSREISSUEREQUEST_INCLUDE
+
+// XSEC Includes
+
+#include <xsec/framework/XSECDefs.hpp>
+#include <xsec/xkms/XKMSRequestAbstractType.hpp>
+#include <xsec/xkms/XKMSStatus.hpp>
#ifdef XSEC_XKMS_ENABLED
-
-class DSIGSignature;
-class XKMSAuthentication;
-class XKMSReissueKeyBinding;
-
-/**
- * @ingroup xkms
- */
-
-/**
- * @brief Interface definition for the ReissueRequest elements
- *
- * The \<ReissueRequest\> is one of the message types of
- * the X-KRMS service. It is used when a client wishes to request
- * the service reissue a key binding (e.g. a cert).
- *
- * The schema definition for ReissueRequest is as follows :
- *
- * \verbatim
- <!-- ReissueRequest -->
- <element name="ReissueRequest" type="xkms:ReissueRequestType"/>
- <complexType name="ReissueRequestType">
- <complexContent>
- <extension base="xkms:RequestAbstractType">
- <sequence>
- <element ref="xkms:ReissueKeyBinding"/>
- <element ref="xkms:Authentication"/>
- <element ref="xkms:ProofOfPossession" minOccurs="0"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
- <element name="ReissueKeyBinding" type="xkms:KeyBindingType"/>
- <!-- /ReissueRequest -->
-\endverbatim
- */
-
-class XKMSReissueRequest : public XKMSRequestAbstractType {
-
- /** @name Constructors and Destructors */
- //@{
-
-protected:
-
- XKMSReissueRequest() {};
-
-public:
-
- virtual ~XKMSReissueRequest() {};
-
- /** @name Getter Interface Methods */
- //@{
-
- /**
- * \brief Return the element at the base of the message
- */
-
- virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) const = 0;
-
- /**
- * \brief Obtain the ReissueKeyBinding element
- *
- * The ReissueKeyBinding element is the core of the ReissueRequest message, and
- * defines the key information that a Reissue is required for.
- *
- * @returns A pointer to the XKMSPrototypeKeyBinding element
- */
-
- virtual XKMSReissueKeyBinding * getReissueKeyBinding(void) const = 0;
-
- /**
- * \brief Get the Authentication element
- *
- * The Authentication element of the ReissueRequest is used by the client to
- * authenticate the request to the server.
- *
- * @return A pointer to the Authentication structure
- */
-
- virtual XKMSAuthentication * getAuthentication (void) const = 0;
-
- /**
- * \brief Get the signature used to prove possession of the private key
- *
- * When the client presents a request for a key generated by them, this element
- * is used to show that the client is authorised to make this request using this
- * key.
- *
- * @return A pointer to the proof of possession Signature object (or NULL if none
- * was defined
- */
-
- virtual DSIGSignature * getProofOfPossessionSignature(void) const = 0;
-
- //@}
-
- /** @name Setter Interface Methods */
- //@{
-
- /** \brief Add a ReissueKeyBinding element
- *
- * Set a ReissueKeyBinding element in the Request message. The returned
- * object can be manipulated to add KeyInfo elements to the Request.
- *
- * @param status The status value to add into the ReissueKeyBinding structure
- * @returns A pointer to the newly created ReissueKeyBinding object, or
- * the pointer to extant object if one already existed.
- */
-
- virtual XKMSReissueKeyBinding * addReissueKeyBinding(XKMSStatus::StatusValue status) = 0;
-
- /** \brief Add an Authentication element
- *
- * Set a Authentication element in the Request message. The returned
- * object can be manipulated to add Authentication information to the request.
- *
- * @returns A pointer to the newly created Authenticaton object, or
- * the pointer to extant object if one already existed.
- */
-
- virtual XKMSAuthentication * addAuthentication(void) = 0;
-
-
- /**
- * \brief Add a ProofOfPossession signature to the message
- *
- * Allows the application to add a new ProofOfPossession signature into a
- * ReissueRequest element
- *
- * @note the client application will need to set the key and sign the
- * message - however the appropriate reference (to the ReissueKeyBinding
- * element) will be set. This implies that the ReissueKeyBinding *must*
- * be added prior to the call to this method.
- *
- * @returns the new Signature structure
- */
-
- virtual DSIGSignature * addProofOfPossessionSignature(
- canonicalizationMethod cm = CANON_C14N_NOC,
- signatureMethod sm = SIGNATURE_DSA,
- hashMethod hm = HASH_SHA1) = 0;
-
- //@}
-
-private:
-
- // Unimplemented
- XKMSReissueRequest(const XKMSReissueRequest &);
- XKMSReissueRequest & operator = (const XKMSReissueRequest &);
-
-};
+
+class DSIGSignature;
+class XKMSAuthentication;
+class XKMSReissueKeyBinding;
+
+/**
+ * @ingroup xkms
+ */
+
+/**
+ * @brief Interface definition for the ReissueRequest elements
+ *
+ * The \<ReissueRequest\> is one of the message types of
+ * the X-KRMS service. It is used when a client wishes to request
+ * the service reissue a key binding (e.g. a cert).
+ *
+ * The schema definition for ReissueRequest is as follows :
+ *
+ * \verbatim
+ <!-- ReissueRequest -->
+ <element name="ReissueRequest" type="xkms:ReissueRequestType"/>
+ <complexType name="ReissueRequestType">
+ <complexContent>
+ <extension base="xkms:RequestAbstractType">
+ <sequence>
+ <element ref="xkms:ReissueKeyBinding"/>
+ <element ref="xkms:Authentication"/>
+ <element ref="xkms:ProofOfPossession" minOccurs="0"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="ReissueKeyBinding" type="xkms:KeyBindingType"/>
+ <!-- /ReissueRequest -->
+\endverbatim
+ */
+
+class XKMSReissueRequest : public XKMSRequestAbstractType {
+
+ /** @name Constructors and Destructors */
+ //@{
+
+protected:
+
+ XKMSReissueRequest() {};
+
+public:
+
+ virtual ~XKMSReissueRequest() {};
+
+ /** @name Getter Interface Methods */
+ //@{
+
+ /**
+ * \brief Return the element at the base of the message
+ */
+
+ virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) const = 0;
+
+ /**
+ * \brief Obtain the ReissueKeyBinding element
+ *
+ * The ReissueKeyBinding element is the core of the ReissueRequest message, and
+ * defines the key information that a Reissue is required for.
+ *
+ * @returns A pointer to the XKMSPrototypeKeyBinding element
+ */
+
+ virtual XKMSReissueKeyBinding * getReissueKeyBinding(void) const = 0;
+
+ /**
+ * \brief Get the Authentication element
+ *
+ * The Authentication element of the ReissueRequest is used by the client to
+ * authenticate the request to the server.
+ *
+ * @return A pointer to the Authentication structure
+ */
+
+ virtual XKMSAuthentication * getAuthentication (void) const = 0;
+
+ /**
+ * \brief Get the signature used to prove possession of the private key
+ *
+ * When the client presents a request for a key generated by them, this element
+ * is used to show that the client is authorised to make this request using this
+ * key.
+ *
+ * @return A pointer to the proof of possession Signature object (or NULL if none
+ * was defined
+ */
+
+ virtual DSIGSignature * getProofOfPossessionSignature(void) const = 0;
+
+ //@}
+
+ /** @name Setter Interface Methods */
+ //@{
+
+ /** \brief Add a ReissueKeyBinding element
+ *
+ * Set a ReissueKeyBinding element in the Request message. The returned
+ * object can be manipulated to add KeyInfo elements to the Request.
+ *
+ * @param status The status value to add into the ReissueKeyBinding structure
+ * @returns A pointer to the newly created ReissueKeyBinding object, or
+ * the pointer to extant object if one already existed.
+ */
+
+ virtual XKMSReissueKeyBinding * addReissueKeyBinding(XKMSStatus::StatusValue status) = 0;
+
+ /** \brief Add an Authentication element
+ *
+ * Set a Authentication element in the Request message. The returned
+ * object can be manipulated to add Authentication information to the request.
+ *
+ * @returns A pointer to the newly created Authenticaton object, or
+ * the pointer to extant object if one already existed.
+ */
+
+ virtual XKMSAuthentication * addAuthentication(void) = 0;
+
+
+ /**
+ * \brief Add a ProofOfPossession signature to the message
+ *
+ * Allows the application to add a new ProofOfPossession signature into a
+ * ReissueRequest element
+ *
+ * @note the client application will need to set the key and sign the
+ * message - however the appropriate reference (to the ReissueKeyBinding
+ * element) will be set. This implies that the ReissueKeyBinding *must*
+ * be added prior to the call to this method.
+ *
+ * @returns the new Signature structure
+ */
+
+ virtual DSIGSignature * addProofOfPossessionSignature(
+ const XMLCh* c14nAlgorithm,
+ const XMLCh* signatureAlgorithm,
+ const XMLCh* hashAlgorithm) = 0;
+
+ //@}
+
+private:
+
+ // Unimplemented
+ XKMSReissueRequest(const XKMSReissueRequest &);
+ XKMSReissueRequest & operator = (const XKMSReissueRequest &);
+
+};
#endif /* XSEC_XKMS_ENABLED */
-
-#endif /* XKMSREISSUEREQUEST_INCLUDE */
+
+#endif /* XKMSREISSUEREQUEST_INCLUDE */
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSAuthenticationImpl.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSAuthenticationImpl.cpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSAuthenticationImpl.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSAuthenticationImpl.cpp Tue Dec 5 22:07:36 2017
@@ -194,9 +194,9 @@ XKMSNotBoundAuthentication * XKMSAuthent
// --------------------------------------------------------------------------------
DSIGSignature * XKMSAuthenticationImpl::addKeyBindingAuthenticationSignature(
- canonicalizationMethod cm,
- signatureMethod sm,
- hashMethod hm) {
+ const XMLCh* c14nAlgorithm,
+ const XMLCh* signatureAlgorithm,
+ const XMLCh* hashAlgorithm) {
if (mp_keyBindingId == NULL) {
throw XSECException(XSECException::XKMSError,
@@ -204,7 +204,7 @@ DSIGSignature * XKMSAuthenticationImpl::
}
DSIGSignature * ret = m_prov.newSignature();
- DOMElement * elt = ret->createBlankSignature(mp_env->getParentDocument(), cm, sm, hm);
+ DOMElement * elt = ret->createBlankSignature(mp_env->getParentDocument(), c14nAlgorithm, signatureAlgorithm);
/* Create the enveloping reference */
safeBuffer sb;
@@ -212,7 +212,7 @@ DSIGSignature * XKMSAuthenticationImpl::
sb.sbXMLChAppendCh(chPound);
sb.sbXMLChCat(mp_keyBindingId);
- DSIGReference *ref = ret->createReference(sb.rawXMLChBuffer());
+ DSIGReference *ref = ret->createReference(sb.rawXMLChBuffer(), hashAlgorithm);
ref->appendCanonicalizationTransform(CANON_C14NE_COM);
/* Embed the signature in the document inside a KeyBindingAuthentication element */
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSAuthenticationImpl.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSAuthenticationImpl.hpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSAuthenticationImpl.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSAuthenticationImpl.hpp Tue Dec 5 22:07:36 2017
@@ -77,9 +77,9 @@ public:
// Interface Set methods
virtual DSIGSignature * addKeyBindingAuthenticationSignature(
- canonicalizationMethod cm = CANON_C14NE_NOC,
- signatureMethod sm = SIGNATURE_HMAC,
- hashMethod hm = HASH_SHA1);
+ const XMLCh* c14nAlgorithm,
+ const XMLCh* signatureAlgorithm,
+ const XMLCh* hashAlgorithm);
virtual void setNotBoundAuthentication(const XMLCh * uri, const XMLCh * value);
private:
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSMessageAbstractTypeImpl.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSMessageAbstractTypeImpl.cpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSMessageAbstractTypeImpl.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSMessageAbstractTypeImpl.cpp Tue Dec 5 22:07:36 2017
@@ -332,12 +332,12 @@ void XKMSMessageAbstractTypeImpl::setNon
}
DSIGSignature * XKMSMessageAbstractTypeImpl::addSignature(
- canonicalizationMethod cm,
- signatureMethod sm,
- hashMethod hm) {
+ const XMLCh* c14nAlgorithm,
+ const XMLCh* signatureAlgorithm,
+ const XMLCh* hashAlgorithm) {
DSIGSignature * ret = m_prov.newSignature();
- DOMElement * elt = ret->createBlankSignature(mp_env->getParentDocument(), cm, sm, hm);
+ DOMElement * elt = ret->createBlankSignature(mp_env->getParentDocument(), c14nAlgorithm, signatureAlgorithm);
/* Create the enveloping reference */
safeBuffer sb;
@@ -345,7 +345,7 @@ DSIGSignature * XKMSMessageAbstractTypeI
sb.sbXMLChAppendCh(chPound);
sb.sbXMLChCat(getId());
- DSIGReference *ref = ret->createReference(sb.rawXMLChBuffer());
+ DSIGReference *ref = ret->createReference(sb.rawXMLChBuffer(), hashAlgorithm);
ref->appendEnvelopedSignatureTransform();
ref->appendCanonicalizationTransform(CANON_C14NE_COM);
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSMessageAbstractTypeImpl.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSMessageAbstractTypeImpl.hpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSMessageAbstractTypeImpl.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSMessageAbstractTypeImpl.hpp Tue Dec 5 22:07:36 2017
@@ -89,9 +89,9 @@ public:
virtual void setService(const XMLCh * service);
virtual void setNonce(const XMLCh * uri);
virtual DSIGSignature * addSignature(
- canonicalizationMethod cm = CANON_C14N_NOC,
- signatureMethod sm = SIGNATURE_DSA,
- hashMethod hm = HASH_SHA1);
+ const XMLCh* c14nAlgorithm,
+ const XMLCh* signatureAlgorithm,
+ const XMLCh* hashAlgorithm);
/* Opaque Client Data interface */
virtual int getOpaqueClientDataSize(void);
@@ -151,10 +151,10 @@ private:
virtual void setNonce(const XMLCh * uri) \
{m_msg.setNonce(uri);} \
virtual DSIGSignature * addSignature( \
- canonicalizationMethod cm = CANON_C14N_NOC, \
- signatureMethod sm = SIGNATURE_DSA, \
- hashMethod hm = HASH_SHA1) \
- {return m_msg.addSignature(cm,sm,hm);} \
+ const XMLCh* c14nAlgorithm, \
+ const XMLCh* signatureAlgorithm, \
+ const XMLCh* hashAlgorithm) \
+ {return m_msg.addSignature(c14nAlgorithm,signatureAlgorithm,hashAlgorithm);} \
virtual int getOpaqueClientDataSize(void) \
{return m_msg.getOpaqueClientDataSize();} \
virtual const XMLCh * getOpaqueClientDataItemStr(int item) \
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.cpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.cpp Tue Dec 5 22:07:36 2017
@@ -308,29 +308,14 @@ XENCEncryptedData * XKMSRecoverResultImp
XMLCh * DQ,
XMLCh * InverseQ,
XMLCh * D,
- encryptionMethod em,
const XMLCh * algorithmURI) {
// Try to set up the key first - if this fails, don't want to have added the
// XML
- const XMLCh * uri;
- safeBuffer algorithmSB;
-
- if (em != ENCRYPT_NONE) {
- if (encryptionMethod2URI(algorithmSB, em) != true) {
- throw XSECException(XSECException::XKMSError,
- "XKMSRecoverResult::setRSAKeyPair - Unknown encryption method");
- }
- uri = algorithmSB.sbStrToXMLCh();
- }
- else {
- uri = algorithmURI;
- }
-
// Find if we can get an algorithm for this URI
XSECAlgorithmHandler *handler =
- XSECPlatformUtils::g_algorithmMapper->mapURIToHandler(uri);
+ XSECPlatformUtils::g_algorithmMapper->mapURIToHandler(algorithmURI);
if (handler == NULL) {
throw XSECException(XSECException::XKMSError,
@@ -346,7 +331,7 @@ XENCEncryptedData * XKMSRecoverResultImp
}
XSECCryptoKey * sk = handler->createKeyForURI(
- uri,
+ algorithmURI,
(XMLByte *) kbuf,
len);
@@ -383,7 +368,7 @@ XENCEncryptedData * XKMSRecoverResultImp
// Encrypt all of this for future use
XENCCipher * cipher = m_prov.newCipher(m_msg.mp_env->getParentDocument());
cipher->setKey(sk);
- cipher->encryptElementContent(pk, ENCRYPT_NONE, uri);
+ cipher->encryptElementContent(pk, algorithmURI);
// Now load the encrypted data back in
return cipher->loadEncryptedData(findFirstElementChild(pk));
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.hpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRecoverResultImpl.hpp Tue Dec 5 22:07:36 2017
@@ -15,113 +15,112 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- */
-
-/*
- * XSEC
- *
- * XKMSRecoverResultImpl := Implementation of RecoverResult Messages
- *
- * $Id$
- *
- */
-
-#ifndef XKMSRECOVERRESULTIMPL_INCLUDE
-#define XKMSRECOVERRESULTIMPL_INCLUDE
-
-// XSEC Includes
-
-#include <xsec/framework/XSECDefs.hpp>
-#include <xsec/xkms/XKMSRecoverResult.hpp>
-#include <xsec/framework/XSECProvider.hpp>
-
-#include "XKMSResultTypeImpl.hpp"
-
-#include <vector>
-
-class XKMSKeyBindingImpl;
-class XKMSRSAKeyPairImpl;
-class XENCCipherImpl;
-
-class XKMSRecoverResultImpl : public XKMSRecoverResult {
-
-public:
- XKMSResultTypeImpl m_result;
- XKMSMessageAbstractTypeImpl &m_msg;
-public:
-
- XKMSRecoverResultImpl(
- const XSECEnv * env
- );
-
- XKMSRecoverResultImpl(
- const XSECEnv * env,
- XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * node
- );
-
- virtual ~XKMSRecoverResultImpl();
-
- // Load elements
- void load();
-
- // Creation
- XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *
- createBlankRecoverResult(
- const XMLCh * service,
- const XMLCh * id,
- ResultMajor rmaj,
- ResultMinor rmin);
-
- // Interface methods
- virtual int getKeyBindingSize(void) const;
- virtual XKMSKeyBinding * getKeyBindingItem(int item) const;
- virtual XKMSKeyBinding * appendKeyBindingItem(XKMSStatus::StatusValue status);
- virtual XKMSRSAKeyPair * getRSAKeyPair(const char * passPhrase);
- virtual XENCEncryptedData * setRSAKeyPair(const char * passPhrase,
- XMLCh * Modulus,
- XMLCh * Exponent,
- XMLCh * P,
- XMLCh * Q,
- XMLCh * DP,
- XMLCh * DQ,
- XMLCh * InverseQ,
- XMLCh * D,
- encryptionMethod em,
- const XMLCh * algorithmURI = NULL);
-
-
-
- /* Implemented from MessageAbstractType */
- virtual messageType getMessageType(void);
-
- /* Forced inheritance from XKMSMessageAbstractTypeImpl */
- XKMS_MESSAGEABSTRACTYPE_IMPL_METHODS
-
- /* Forced inheritance from XKMSResultTypeImpl */
- XKMS_RESULTTYPE_IMPL_METHODS
-
-private:
-
-#if defined(XSEC_NO_NAMESPACES)
- typedef vector<XKMSKeyBindingImpl *> KeyBindingVectorType;
-#else
- typedef std::vector<XKMSKeyBindingImpl *> KeyBindingVectorType;
-#endif
-
- KeyBindingVectorType m_keyBindingList;
- XKMSRSAKeyPairImpl * mp_RSAKeyPair;
-
- XERCES_CPP_NAMESPACE_QUALIFIER DOMElement
- * mp_privateKeyElement;
-
- // To handle the cipher
- XSECProvider m_prov;
-
- // Unimplemented
- XKMSRecoverResultImpl(void);
- XKMSRecoverResultImpl(const XKMSRecoverResultImpl &);
- XKMSRecoverResultImpl & operator = (const XKMSRecoverResultImpl &);
-
-};
-
-#endif /* XKMSRECOVERRESULTIMPL_INCLUDE */
+ */
+
+/*
+ * XSEC
+ *
+ * XKMSRecoverResultImpl := Implementation of RecoverResult Messages
+ *
+ * $Id$
+ *
+ */
+
+#ifndef XKMSRECOVERRESULTIMPL_INCLUDE
+#define XKMSRECOVERRESULTIMPL_INCLUDE
+
+// XSEC Includes
+
+#include <xsec/framework/XSECDefs.hpp>
+#include <xsec/xkms/XKMSRecoverResult.hpp>
+#include <xsec/framework/XSECProvider.hpp>
+
+#include "XKMSResultTypeImpl.hpp"
+
+#include <vector>
+
+class XKMSKeyBindingImpl;
+class XKMSRSAKeyPairImpl;
+class XENCCipherImpl;
+
+class XKMSRecoverResultImpl : public XKMSRecoverResult {
+
+public:
+ XKMSResultTypeImpl m_result;
+ XKMSMessageAbstractTypeImpl &m_msg;
+public:
+
+ XKMSRecoverResultImpl(
+ const XSECEnv * env
+ );
+
+ XKMSRecoverResultImpl(
+ const XSECEnv * env,
+ XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * node
+ );
+
+ virtual ~XKMSRecoverResultImpl();
+
+ // Load elements
+ void load();
+
+ // Creation
+ XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *
+ createBlankRecoverResult(
+ const XMLCh * service,
+ const XMLCh * id,
+ ResultMajor rmaj,
+ ResultMinor rmin);
+
+ // Interface methods
+ virtual int getKeyBindingSize(void) const;
+ virtual XKMSKeyBinding * getKeyBindingItem(int item) const;
+ virtual XKMSKeyBinding * appendKeyBindingItem(XKMSStatus::StatusValue status);
+ virtual XKMSRSAKeyPair * getRSAKeyPair(const char * passPhrase);
+ virtual XENCEncryptedData * setRSAKeyPair(const char * passPhrase,
+ XMLCh * Modulus,
+ XMLCh * Exponent,
+ XMLCh * P,
+ XMLCh * Q,
+ XMLCh * DP,
+ XMLCh * DQ,
+ XMLCh * InverseQ,
+ XMLCh * D,
+ const XMLCh * algorithmURI);
+
+
+
+ /* Implemented from MessageAbstractType */
+ virtual messageType getMessageType(void);
+
+ /* Forced inheritance from XKMSMessageAbstractTypeImpl */
+ XKMS_MESSAGEABSTRACTYPE_IMPL_METHODS
+
+ /* Forced inheritance from XKMSResultTypeImpl */
+ XKMS_RESULTTYPE_IMPL_METHODS
+
+private:
+
+#if defined(XSEC_NO_NAMESPACES)
+ typedef vector<XKMSKeyBindingImpl *> KeyBindingVectorType;
+#else
+ typedef std::vector<XKMSKeyBindingImpl *> KeyBindingVectorType;
+#endif
+
+ KeyBindingVectorType m_keyBindingList;
+ XKMSRSAKeyPairImpl * mp_RSAKeyPair;
+
+ XERCES_CPP_NAMESPACE_QUALIFIER DOMElement
+ * mp_privateKeyElement;
+
+ // To handle the cipher
+ XSECProvider m_prov;
+
+ // Unimplemented
+ XKMSRecoverResultImpl(void);
+ XKMSRecoverResultImpl(const XKMSRecoverResultImpl &);
+ XKMSRecoverResultImpl & operator = (const XKMSRecoverResultImpl &);
+
+};
+
+#endif /* XKMSRECOVERRESULTIMPL_INCLUDE */
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterRequestImpl.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterRequestImpl.cpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterRequestImpl.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterRequestImpl.cpp Tue Dec 5 22:07:36 2017
@@ -307,12 +307,12 @@ XKMSAuthentication * XKMSRegisterRequest
}
DSIGSignature * XKMSRegisterRequestImpl::addProofOfPossessionSignature(
- canonicalizationMethod cm,
- signatureMethod sm,
- hashMethod hm) {
+ const XMLCh* c14nAlgorithm,
+ const XMLCh* signatureAlgorithm,
+ const XMLCh* hashAlgorithm) {
DSIGSignature * ret = m_prov.newSignature();
- DOMElement * elt = ret->createBlankSignature(m_msg.mp_env->getParentDocument(), cm, sm, hm);
+ DOMElement * elt = ret->createBlankSignature(m_msg.mp_env->getParentDocument(), c14nAlgorithm, signatureAlgorithm);
/* Create the enveloping reference */
safeBuffer sb;
@@ -320,7 +320,7 @@ DSIGSignature * XKMSRegisterRequestImpl:
sb.sbXMLChAppendCh(chPound);
sb.sbXMLChCat(mp_prototypeKeyBinding->getId());
- DSIGReference *ref = ret->createReference(sb.rawXMLChBuffer());
+ DSIGReference *ref = ret->createReference(sb.rawXMLChBuffer(), hashAlgorithm);
ref->appendCanonicalizationTransform(CANON_C14NE_COM);
/* Embed the signature in the document inside a KeyBindingAuthentication element */
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterRequestImpl.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterRequestImpl.hpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterRequestImpl.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterRequestImpl.hpp Tue Dec 5 22:07:36 2017
@@ -77,9 +77,9 @@ public:
virtual XKMSPrototypeKeyBinding * addPrototypeKeyBinding(void);
virtual XKMSAuthentication * addAuthentication(void);
virtual DSIGSignature * addProofOfPossessionSignature(
- canonicalizationMethod cm = CANON_C14N_NOC,
- signatureMethod sm = SIGNATURE_DSA,
- hashMethod hm = HASH_SHA1);
+ const XMLCh* c14nAlgorithm,
+ const XMLCh* signatureAlgorithm,
+ const XMLCh* hashAlgorithm);
/* Implemented from MessageAbstractType */
virtual messageType getMessageType(void);
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterResultImpl.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterResultImpl.cpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterResultImpl.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterResultImpl.cpp Tue Dec 5 22:07:36 2017
@@ -308,31 +308,15 @@ XENCEncryptedData * XKMSRegisterResultIm
XMLCh * DQ,
XMLCh * InverseQ,
XMLCh * D,
- encryptionMethod em,
const XMLCh * algorithmURI) {
// Try to set up the key first - if this fails, don't want to have added the
// XML
- const XMLCh * uri;
- safeBuffer algorithmSB;
-
- if (em != ENCRYPT_NONE) {
- if (encryptionMethod2URI(algorithmSB, em) != true) {
- throw XSECException(XSECException::XKMSError,
- "XKMSRegisterResult::setRSAKeyPair - Unknown encryption method");
- }
- uri = algorithmSB.sbStrToXMLCh();
- }
- else
- uri = algorithmURI;
-
// Find if we can get an algorithm for this URI
- XSECAlgorithmHandler *handler;
-
- handler =
+ XSECAlgorithmHandler *handler =
XSECPlatformUtils::g_algorithmMapper->mapURIToHandler(
- uri);
+ algorithmURI);
if (handler == NULL) {
throw XSECException(XSECException::XKMSError,
@@ -349,7 +333,7 @@ XENCEncryptedData * XKMSRegisterResultIm
XSECCryptoKey * sk = handler->createKeyForURI(
- uri,
+ algorithmURI,
(XMLByte *) kbuf,
len);
@@ -386,7 +370,7 @@ XENCEncryptedData * XKMSRegisterResultIm
// Encrypt all of this for future use
XENCCipher * cipher = m_prov.newCipher(m_msg.mp_env->getParentDocument());
cipher->setKey(sk);
- cipher->encryptElementContent(pk, ENCRYPT_NONE, uri);
+ cipher->encryptElementContent(pk, algorithmURI);
// Now load the encrypted data back in
return cipher->loadEncryptedData(findFirstElementChild(pk));
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterResultImpl.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterResultImpl.hpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterResultImpl.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSRegisterResultImpl.hpp Tue Dec 5 22:07:36 2017
@@ -86,7 +86,6 @@ public:
XMLCh * DQ,
XMLCh * InverseQ,
XMLCh * D,
- encryptionMethod em,
const XMLCh * algorithmURI = NULL);
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSReissueRequestImpl.cpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSReissueRequestImpl.cpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSReissueRequestImpl.cpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSReissueRequestImpl.cpp Tue Dec 5 22:07:36 2017
@@ -15,334 +15,334 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- */
-
-/*
- * XSEC
- *
- * XKMSReissueRequestImpl := Implementation for ReissueRequest Messages
- *
- * $Id: XKMSReissueRequestImpl.cpp 351366 2005-06-04 11:44:55Z blautenb $
- *
- */
-
-// XSEC Includes
-
-#include <xsec/framework/XSECDefs.hpp>
-
-#include <xsec/dsig/DSIGReference.hpp>
-#include <xsec/framework/XSECEnv.hpp>
-#include <xsec/framework/XSECError.hpp>
-#include <xsec/utils/XSECDOMUtils.hpp>
-#include <xsec/xkms/XKMSConstants.hpp>
-
-#include "XKMSReissueRequestImpl.hpp"
-#include "XKMSAuthenticationImpl.hpp"
-#include "XKMSReissueKeyBindingImpl.hpp"
-
-#include <xercesc/dom/DOM.hpp>
-#include <xercesc/util/XMLUniDefs.hpp>
-
-XERCES_CPP_NAMESPACE_USE
-
-// --------------------------------------------------------------------------------
-// Construct/Destruct
-// --------------------------------------------------------------------------------
-
-XKMSReissueRequestImpl::XKMSReissueRequestImpl(const XSECEnv * env) :
-m_request(env),
-m_msg(m_request.m_msg),
-mp_authentication(NULL),
-mp_reissueKeyBinding(NULL),
-mp_proofOfPossessionSignature(NULL) {
-}
-
-XKMSReissueRequestImpl::XKMSReissueRequestImpl(const XSECEnv * env, DOMElement * node) :
-m_request(env, node),
-m_msg(m_request.m_msg),
-mp_authentication(NULL),
-mp_reissueKeyBinding(NULL),
-mp_proofOfPossessionSignature(NULL) {
-}
-
-XKMSReissueRequestImpl::~XKMSReissueRequestImpl() {
-
- if (mp_authentication != NULL)
- delete mp_authentication;
- if (mp_reissueKeyBinding != NULL)
- delete mp_reissueKeyBinding;
- // Provider will take care of the proofOfPossession signature
-
-}
-
-// --------------------------------------------------------------------------------
-// Load
-// --------------------------------------------------------------------------------
-
-void XKMSReissueRequestImpl::load(void) {
-
- if (m_msg.mp_messageAbstractTypeElement == NULL) {
-
- // Attempt to load an empty element
- throw XSECException(XSECException::XKMSError,
- "XKMSReissueRequest::load - called on empty DOM");
-
- }
-
- if (!strEquals(getXKMSLocalName(m_msg.mp_messageAbstractTypeElement),
- XKMSConstants::s_tagReissueRequest)) {
-
- throw XSECException(XSECException::XKMSError,
- "XKMSReissueRequest::load - called on incorrect node");
-
- }
-
- // Load the base message
- m_request.load();
-
- // Now check for any ReissueKeyBinding elements
- DOMElement * tmpElt = findFirstElementChild(m_msg.mp_messageAbstractTypeElement);
- while (tmpElt != NULL && !strEquals(getXKMSLocalName(tmpElt), XKMSConstants::s_tagReissueKeyBinding)) {
- tmpElt = findNextElementChild(tmpElt);
- }
-
- if (tmpElt != NULL) {
-
- XSECnew(mp_reissueKeyBinding, XKMSReissueKeyBindingImpl(m_msg.mp_env, tmpElt));
- mp_reissueKeyBinding->load();
-
- tmpElt = findNextElementChild(tmpElt);
-
- }
- else {
-
- throw XSECException(XSECException::ExpectedXKMSChildNotFound,
- "XKMSReissueRequest::load - Expected ReissueKeyBinding node");
-
- }
-
- // Authentication Element
-
- if (tmpElt != NULL && strEquals(getXKMSLocalName(tmpElt), XKMSConstants::s_tagAuthentication)) {
-
- XSECnew(mp_authentication, XKMSAuthenticationImpl(m_msg.mp_env, tmpElt));
- mp_authentication->load(mp_reissueKeyBinding->getId());
-
- tmpElt = findNextElementChild(tmpElt);
-
- }
- else {
-
- throw XSECException(XSECException::ExpectedXKMSChildNotFound,
- "XKMSReissueRequest::load - Expected Authentication node");
-
- }
-
- if (tmpElt != NULL && strEquals(getXKMSLocalName(tmpElt), XKMSConstants::s_tagProofOfPossession)) {
-
- // Find the signature
-
- DOMElement * sigElt = (DOMElement *) findFirstElementChild(tmpElt);
-
- if (sigElt == NULL || !strEquals(getDSIGLocalName(sigElt),
- XKMSConstants::s_tagSignature)) {
- throw XSECException(XSECException::ExpectedXKMSChildNotFound,
- "XKMSReissueRequest::load - Expected Signature child of ProofOfPossession");
-
- }
-
- // The provider will take care of cleaning this up later.
-
- mp_proofOfPossessionSignature = m_prov.newSignatureFromDOM(m_msg.mp_env->getParentDocument(),
- sigElt);
- mp_proofOfPossessionSignature->load();
-
- // Check the signature is across the correct input
-
- DSIGReferenceList * rl =
- mp_proofOfPossessionSignature->getReferenceList();
-
- if (rl->getSize() != 1) {
- throw XSECException(XSECException::XKMSError,
- "XKMSReissueRequestImpl::load - ProofOfPossession Signature with incorrect number of references found (should be 1)");
- }
-
- safeBuffer sb;
- sb.sbXMLChIn(DSIGConstants::s_unicodeStrEmpty);
- sb.sbXMLChAppendCh(chPound);
- sb.sbXMLChCat(mp_reissueKeyBinding->getId());
-
- if (!strEquals(rl->item(0)->getURI(), sb.rawXMLChBuffer())) {
- throw XSECException(XSECException::XKMSError,
- "XKMSReissueRequestImpl::load - ProofOfPossession Signature refers to incorrect Id (should be for ReissueKeyBinding)");
- }
-
- // We don't actually check the signature as we have no key material to do so!
- }
-}
-
-
-// --------------------------------------------------------------------------------
-// Create
-// --------------------------------------------------------------------------------
-
-DOMElement * XKMSReissueRequestImpl::
- createBlankReissueRequest(const XMLCh * service, const XMLCh * id) {
-
- return m_request.createBlankRequestAbstractType(
- XKMSConstants::s_tagReissueRequest, service, id);
-
-}
-
-// --------------------------------------------------------------------------------
-// MessageType
-// --------------------------------------------------------------------------------
-
-XKMSMessageAbstractType::messageType XKMSReissueRequestImpl::getMessageType(void) {
-
- return XKMSMessageAbstractTypeImpl::ReissueRequest;
-
-}
-
-// --------------------------------------------------------------------------------
-// Get Methods
-// --------------------------------------------------------------------------------
-
-XKMSReissueKeyBinding * XKMSReissueRequestImpl::getReissueKeyBinding(void) const {
-
- return mp_reissueKeyBinding;
-
-}
-
-XKMSAuthentication * XKMSReissueRequestImpl::getAuthentication (void) const {
-
- return mp_authentication;
-
-}
-
-DSIGSignature * XKMSReissueRequestImpl::getProofOfPossessionSignature(void) const {
-
- return mp_proofOfPossessionSignature;
-
-}
-
-// --------------------------------------------------------------------------------
-// Set Methods
-// --------------------------------------------------------------------------------
-
-XKMSReissueKeyBinding * XKMSReissueRequestImpl::addReissueKeyBinding(XKMSStatus::StatusValue status) {
-
- if (mp_reissueKeyBinding != NULL)
- return mp_reissueKeyBinding;
-
-
- // OK - Nothing exists, so we need to create from scratch
-
- XSECnew(mp_reissueKeyBinding, XKMSReissueKeyBindingImpl(m_msg.mp_env));
- DOMElement * elt = mp_reissueKeyBinding->createBlankReissueKeyBinding(status);
-
- // Insert
-
- DOMElement * be = findFirstElementChild(m_msg.mp_messageAbstractTypeElement);
-
- while (be != NULL &&
- !strEquals(getXKMSLocalName(be), XKMSConstants::s_tagAuthentication) &&
- !strEquals(getXKMSLocalName(be), XKMSConstants::s_tagProofOfPossession)) {
- be = findNextElementChild(be);
- }
-
- if (be == NULL) {
- m_msg.mp_env->doPrettyPrint(m_msg.mp_messageAbstractTypeElement);
- m_msg.mp_messageAbstractTypeElement->appendChild(elt);
- m_msg.mp_env->doPrettyPrint(m_msg.mp_messageAbstractTypeElement);
- return mp_reissueKeyBinding;
- }
-
- m_msg.mp_messageAbstractTypeElement->insertBefore(elt, be);
- if (m_msg.mp_env->getPrettyPrintFlag() == true) {
- m_msg.mp_messageAbstractTypeElement->insertBefore(
- m_msg.mp_env->getParentDocument()->createTextNode(DSIGConstants::s_unicodeStrNL),
- be);
- }
-
- return mp_reissueKeyBinding;
-
-}
-
-XKMSAuthentication * XKMSReissueRequestImpl::addAuthentication(void) {
-
- if (mp_authentication != NULL)
- return mp_authentication;
-
- if (mp_reissueKeyBinding == NULL) {
- throw XSECException(XSECException::XKMSError,
- "XKMSReissueRequestImpl::addAuthentication - called prior to key infos being added");
- }
-
- XSECnew(mp_authentication, XKMSAuthenticationImpl(m_msg.mp_env));
- DOMElement * e =
- mp_authentication->createBlankAuthentication(mp_reissueKeyBinding->getId());
-
- DOMElement * be = findFirstElementChild(m_msg.mp_messageAbstractTypeElement);
-
- while (be != NULL && !strEquals(getXKMSLocalName(be), XKMSConstants::s_tagProofOfPossession))
- be = findNextElementChild(be);
-
- if (be == NULL) {
- m_msg.mp_env->doPrettyPrint(m_msg.mp_messageAbstractTypeElement);
- m_msg.mp_messageAbstractTypeElement->appendChild(e);
- m_msg.mp_env->doPrettyPrint(m_msg.mp_messageAbstractTypeElement);
- return mp_authentication;
- }
-
- m_msg.mp_messageAbstractTypeElement->insertBefore(e, be);
- if (m_msg.mp_env->getPrettyPrintFlag() == true) {
- m_msg.mp_messageAbstractTypeElement->insertBefore(
- m_msg.mp_env->getParentDocument()->createTextNode(DSIGConstants::s_unicodeStrNL),
- be);
- }
-
- return mp_authentication;
-
-}
-
-DSIGSignature * XKMSReissueRequestImpl::addProofOfPossessionSignature(
- canonicalizationMethod cm,
- signatureMethod sm,
- hashMethod hm) {
-
- DSIGSignature * ret = m_prov.newSignature();
- DOMElement * elt = ret->createBlankSignature(m_msg.mp_env->getParentDocument(), cm, sm, hm);
-
- /* Create the enveloping reference */
- safeBuffer sb;
- sb.sbXMLChIn(DSIGConstants::s_unicodeStrEmpty);
- sb.sbXMLChAppendCh(chPound);
- sb.sbXMLChCat(mp_reissueKeyBinding->getId());
-
- DSIGReference *ref = ret->createReference(sb.rawXMLChBuffer());
- ref->appendCanonicalizationTransform(CANON_C14NE_COM);
-
- /* Embed the signature in the document inside a KeyBindingAuthentication element */
- safeBuffer str;
- DOMDocument *doc = m_msg.mp_env->getParentDocument();
- const XMLCh * prefix = m_msg.mp_env->getXKMSNSPrefix();
-
- makeQName(str, prefix, XKMSConstants::s_tagProofOfPossession);
-
- DOMElement * t = doc->createElementNS(XKMSConstants::s_unicodeStrURIXKMS,
- str.rawXMLChBuffer());
-
- m_msg.mp_env->doPrettyPrint(t);
- t->appendChild(elt);
- m_msg.mp_env->doPrettyPrint(t);
-
- // Now append into the ReissueRequest
- m_msg.mp_messageAbstractTypeElement->appendChild(t);
- m_msg.mp_env->doPrettyPrint(m_msg.mp_messageAbstractTypeElement);
-
- return ret;
-}
-
-
-
+ */
+
+/*
+ * XSEC
+ *
+ * XKMSReissueRequestImpl := Implementation for ReissueRequest Messages
+ *
+ * $Id: XKMSReissueRequestImpl.cpp 351366 2005-06-04 11:44:55Z blautenb $
+ *
+ */
+
+// XSEC Includes
+
+#include <xsec/framework/XSECDefs.hpp>
+
+#include <xsec/dsig/DSIGReference.hpp>
+#include <xsec/framework/XSECEnv.hpp>
+#include <xsec/framework/XSECError.hpp>
+#include <xsec/utils/XSECDOMUtils.hpp>
+#include <xsec/xkms/XKMSConstants.hpp>
+
+#include "XKMSReissueRequestImpl.hpp"
+#include "XKMSAuthenticationImpl.hpp"
+#include "XKMSReissueKeyBindingImpl.hpp"
+
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/XMLUniDefs.hpp>
+
+XERCES_CPP_NAMESPACE_USE
+
+// --------------------------------------------------------------------------------
+// Construct/Destruct
+// --------------------------------------------------------------------------------
+
+XKMSReissueRequestImpl::XKMSReissueRequestImpl(const XSECEnv * env) :
+m_request(env),
+m_msg(m_request.m_msg),
+mp_authentication(NULL),
+mp_reissueKeyBinding(NULL),
+mp_proofOfPossessionSignature(NULL) {
+}
+
+XKMSReissueRequestImpl::XKMSReissueRequestImpl(const XSECEnv * env, DOMElement * node) :
+m_request(env, node),
+m_msg(m_request.m_msg),
+mp_authentication(NULL),
+mp_reissueKeyBinding(NULL),
+mp_proofOfPossessionSignature(NULL) {
+}
+
+XKMSReissueRequestImpl::~XKMSReissueRequestImpl() {
+
+ if (mp_authentication != NULL)
+ delete mp_authentication;
+ if (mp_reissueKeyBinding != NULL)
+ delete mp_reissueKeyBinding;
+ // Provider will take care of the proofOfPossession signature
+
+}
+
+// --------------------------------------------------------------------------------
+// Load
+// --------------------------------------------------------------------------------
+
+void XKMSReissueRequestImpl::load(void) {
+
+ if (m_msg.mp_messageAbstractTypeElement == NULL) {
+
+ // Attempt to load an empty element
+ throw XSECException(XSECException::XKMSError,
+ "XKMSReissueRequest::load - called on empty DOM");
+
+ }
+
+ if (!strEquals(getXKMSLocalName(m_msg.mp_messageAbstractTypeElement),
+ XKMSConstants::s_tagReissueRequest)) {
+
+ throw XSECException(XSECException::XKMSError,
+ "XKMSReissueRequest::load - called on incorrect node");
+
+ }
+
+ // Load the base message
+ m_request.load();
+
+ // Now check for any ReissueKeyBinding elements
+ DOMElement * tmpElt = findFirstElementChild(m_msg.mp_messageAbstractTypeElement);
+ while (tmpElt != NULL && !strEquals(getXKMSLocalName(tmpElt), XKMSConstants::s_tagReissueKeyBinding)) {
+ tmpElt = findNextElementChild(tmpElt);
+ }
+
+ if (tmpElt != NULL) {
+
+ XSECnew(mp_reissueKeyBinding, XKMSReissueKeyBindingImpl(m_msg.mp_env, tmpElt));
+ mp_reissueKeyBinding->load();
+
+ tmpElt = findNextElementChild(tmpElt);
+
+ }
+ else {
+
+ throw XSECException(XSECException::ExpectedXKMSChildNotFound,
+ "XKMSReissueRequest::load - Expected ReissueKeyBinding node");
+
+ }
+
+ // Authentication Element
+
+ if (tmpElt != NULL && strEquals(getXKMSLocalName(tmpElt), XKMSConstants::s_tagAuthentication)) {
+
+ XSECnew(mp_authentication, XKMSAuthenticationImpl(m_msg.mp_env, tmpElt));
+ mp_authentication->load(mp_reissueKeyBinding->getId());
+
+ tmpElt = findNextElementChild(tmpElt);
+
+ }
+ else {
+
+ throw XSECException(XSECException::ExpectedXKMSChildNotFound,
+ "XKMSReissueRequest::load - Expected Authentication node");
+
+ }
+
+ if (tmpElt != NULL && strEquals(getXKMSLocalName(tmpElt), XKMSConstants::s_tagProofOfPossession)) {
+
+ // Find the signature
+
+ DOMElement * sigElt = (DOMElement *) findFirstElementChild(tmpElt);
+
+ if (sigElt == NULL || !strEquals(getDSIGLocalName(sigElt),
+ XKMSConstants::s_tagSignature)) {
+ throw XSECException(XSECException::ExpectedXKMSChildNotFound,
+ "XKMSReissueRequest::load - Expected Signature child of ProofOfPossession");
+
+ }
+
+ // The provider will take care of cleaning this up later.
+
+ mp_proofOfPossessionSignature = m_prov.newSignatureFromDOM(m_msg.mp_env->getParentDocument(),
+ sigElt);
+ mp_proofOfPossessionSignature->load();
+
+ // Check the signature is across the correct input
+
+ DSIGReferenceList * rl =
+ mp_proofOfPossessionSignature->getReferenceList();
+
+ if (rl->getSize() != 1) {
+ throw XSECException(XSECException::XKMSError,
+ "XKMSReissueRequestImpl::load - ProofOfPossession Signature with incorrect number of references found (should be 1)");
+ }
+
+ safeBuffer sb;
+ sb.sbXMLChIn(DSIGConstants::s_unicodeStrEmpty);
+ sb.sbXMLChAppendCh(chPound);
+ sb.sbXMLChCat(mp_reissueKeyBinding->getId());
+
+ if (!strEquals(rl->item(0)->getURI(), sb.rawXMLChBuffer())) {
+ throw XSECException(XSECException::XKMSError,
+ "XKMSReissueRequestImpl::load - ProofOfPossession Signature refers to incorrect Id (should be for ReissueKeyBinding)");
+ }
+
+ // We don't actually check the signature as we have no key material to do so!
+ }
+}
+
+
+// --------------------------------------------------------------------------------
+// Create
+// --------------------------------------------------------------------------------
+
+DOMElement * XKMSReissueRequestImpl::
+ createBlankReissueRequest(const XMLCh * service, const XMLCh * id) {
+
+ return m_request.createBlankRequestAbstractType(
+ XKMSConstants::s_tagReissueRequest, service, id);
+
+}
+
+// --------------------------------------------------------------------------------
+// MessageType
+// --------------------------------------------------------------------------------
+
+XKMSMessageAbstractType::messageType XKMSReissueRequestImpl::getMessageType(void) {
+
+ return XKMSMessageAbstractTypeImpl::ReissueRequest;
+
+}
+
+// --------------------------------------------------------------------------------
+// Get Methods
+// --------------------------------------------------------------------------------
+
+XKMSReissueKeyBinding * XKMSReissueRequestImpl::getReissueKeyBinding(void) const {
+
+ return mp_reissueKeyBinding;
+
+}
+
+XKMSAuthentication * XKMSReissueRequestImpl::getAuthentication (void) const {
+
+ return mp_authentication;
+
+}
+
+DSIGSignature * XKMSReissueRequestImpl::getProofOfPossessionSignature(void) const {
+
+ return mp_proofOfPossessionSignature;
+
+}
+
+// --------------------------------------------------------------------------------
+// Set Methods
+// --------------------------------------------------------------------------------
+
+XKMSReissueKeyBinding * XKMSReissueRequestImpl::addReissueKeyBinding(XKMSStatus::StatusValue status) {
+
+ if (mp_reissueKeyBinding != NULL)
+ return mp_reissueKeyBinding;
+
+
+ // OK - Nothing exists, so we need to create from scratch
+
+ XSECnew(mp_reissueKeyBinding, XKMSReissueKeyBindingImpl(m_msg.mp_env));
+ DOMElement * elt = mp_reissueKeyBinding->createBlankReissueKeyBinding(status);
+
+ // Insert
+
+ DOMElement * be = findFirstElementChild(m_msg.mp_messageAbstractTypeElement);
+
+ while (be != NULL &&
+ !strEquals(getXKMSLocalName(be), XKMSConstants::s_tagAuthentication) &&
+ !strEquals(getXKMSLocalName(be), XKMSConstants::s_tagProofOfPossession)) {
+ be = findNextElementChild(be);
+ }
+
+ if (be == NULL) {
+ m_msg.mp_env->doPrettyPrint(m_msg.mp_messageAbstractTypeElement);
+ m_msg.mp_messageAbstractTypeElement->appendChild(elt);
+ m_msg.mp_env->doPrettyPrint(m_msg.mp_messageAbstractTypeElement);
+ return mp_reissueKeyBinding;
+ }
+
+ m_msg.mp_messageAbstractTypeElement->insertBefore(elt, be);
+ if (m_msg.mp_env->getPrettyPrintFlag() == true) {
+ m_msg.mp_messageAbstractTypeElement->insertBefore(
+ m_msg.mp_env->getParentDocument()->createTextNode(DSIGConstants::s_unicodeStrNL),
+ be);
+ }
+
+ return mp_reissueKeyBinding;
+
+}
+
+XKMSAuthentication * XKMSReissueRequestImpl::addAuthentication(void) {
+
+ if (mp_authentication != NULL)
+ return mp_authentication;
+
+ if (mp_reissueKeyBinding == NULL) {
+ throw XSECException(XSECException::XKMSError,
+ "XKMSReissueRequestImpl::addAuthentication - called prior to key infos being added");
+ }
+
+ XSECnew(mp_authentication, XKMSAuthenticationImpl(m_msg.mp_env));
+ DOMElement * e =
+ mp_authentication->createBlankAuthentication(mp_reissueKeyBinding->getId());
+
+ DOMElement * be = findFirstElementChild(m_msg.mp_messageAbstractTypeElement);
+
+ while (be != NULL && !strEquals(getXKMSLocalName(be), XKMSConstants::s_tagProofOfPossession))
+ be = findNextElementChild(be);
+
+ if (be == NULL) {
+ m_msg.mp_env->doPrettyPrint(m_msg.mp_messageAbstractTypeElement);
+ m_msg.mp_messageAbstractTypeElement->appendChild(e);
+ m_msg.mp_env->doPrettyPrint(m_msg.mp_messageAbstractTypeElement);
+ return mp_authentication;
+ }
+
+ m_msg.mp_messageAbstractTypeElement->insertBefore(e, be);
+ if (m_msg.mp_env->getPrettyPrintFlag() == true) {
+ m_msg.mp_messageAbstractTypeElement->insertBefore(
+ m_msg.mp_env->getParentDocument()->createTextNode(DSIGConstants::s_unicodeStrNL),
+ be);
+ }
+
+ return mp_authentication;
+
+}
+
+DSIGSignature * XKMSReissueRequestImpl::addProofOfPossessionSignature(
+ const XMLCh* c14nAlgorithm,
+ const XMLCh* signatureAlgorithm,
+ const XMLCh* hashAlgorithm) {
+
+ DSIGSignature * ret = m_prov.newSignature();
+ DOMElement * elt = ret->createBlankSignature(m_msg.mp_env->getParentDocument(), c14nAlgorithm, signatureAlgorithm);
+
+ /* Create the enveloping reference */
+ safeBuffer sb;
+ sb.sbXMLChIn(DSIGConstants::s_unicodeStrEmpty);
+ sb.sbXMLChAppendCh(chPound);
+ sb.sbXMLChCat(mp_reissueKeyBinding->getId());
+
+ DSIGReference *ref = ret->createReference(sb.rawXMLChBuffer(), hashAlgorithm);
+ ref->appendCanonicalizationTransform(CANON_C14NE_COM);
+
+ /* Embed the signature in the document inside a KeyBindingAuthentication element */
+ safeBuffer str;
+ DOMDocument *doc = m_msg.mp_env->getParentDocument();
+ const XMLCh * prefix = m_msg.mp_env->getXKMSNSPrefix();
+
+ makeQName(str, prefix, XKMSConstants::s_tagProofOfPossession);
+
+ DOMElement * t = doc->createElementNS(XKMSConstants::s_unicodeStrURIXKMS,
+ str.rawXMLChBuffer());
+
+ m_msg.mp_env->doPrettyPrint(t);
+ t->appendChild(elt);
+ m_msg.mp_env->doPrettyPrint(t);
+
+ // Now append into the ReissueRequest
+ m_msg.mp_messageAbstractTypeElement->appendChild(t);
+ m_msg.mp_env->doPrettyPrint(m_msg.mp_messageAbstractTypeElement);
+
+ return ret;
+}
+
+
+
Modified: santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSReissueRequestImpl.hpp
URL: http://svn.apache.org/viewvc/santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSReissueRequestImpl.hpp?rev=1817243&r1=1817242&r2=1817243&view=diff
==============================================================================
--- santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSReissueRequestImpl.hpp (original)
+++ santuario/xml-security-cpp/trunk/xsec/xkms/impl/XKMSReissueRequestImpl.hpp Tue Dec 5 22:07:36 2017
@@ -15,95 +15,95 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- */
-
-/*
- * XSEC
- *
- * XKMSReissueRequestImpl := Implementation for ReissueRequest Messages
- *
- * $Id$
- *
- */
-
-#ifndef XKMSREISSUEREQUESTIMPL_INCLUDE
-#define XKMSREISSUEREQUESTIMPL_INCLUDE
-
-// XSEC Includes
-
-#include <xsec/framework/XSECDefs.hpp>
-#include <xsec/xkms/XKMSReissueRequest.hpp>
-#include "XKMSRequestAbstractTypeImpl.hpp"
-
-class XKMSAuthenticationImpl;
-class XKMSReissueKeyBindingImpl;
-class DSIGSignature;
-
-class XKMSReissueRequestImpl : public XKMSReissueRequest {
-
-public:
- XKMSRequestAbstractTypeImpl m_request;
- XKMSMessageAbstractTypeImpl &m_msg;
-public:
-
- XKMSReissueRequestImpl(
- const XSECEnv * env
- );
-
- XKMSReissueRequestImpl(
- const XSECEnv * env,
- XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * node
- );
-
- virtual ~XKMSReissueRequestImpl();
-
- // Load elements
- void load();
-
- // Creation
- XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *
- createBlankReissueRequest(
- const XMLCh * service,
- const XMLCh * id = NULL);
-
-
- /* Getter Interface Methods */
- virtual XKMSReissueKeyBinding * getReissueKeyBinding(void) const;
- virtual XKMSAuthentication * getAuthentication (void) const;
- virtual DSIGSignature * getProofOfPossessionSignature(void) const;
-
- /* Setter Interface Methods */
-
- virtual XKMSReissueKeyBinding * addReissueKeyBinding(XKMSStatus::StatusValue status);
- virtual XKMSAuthentication * addAuthentication(void);
- virtual DSIGSignature * addProofOfPossessionSignature(
- canonicalizationMethod cm = CANON_C14N_NOC,
- signatureMethod sm = SIGNATURE_DSA,
- hashMethod hm = HASH_SHA1);
-
- /* Implemented from MessageAbstractType */
- virtual messageType getMessageType(void);
-
- /* Forced inheritance from XKMSMessageAbstractTypeImpl */
- XKMS_MESSAGEABSTRACTYPE_IMPL_METHODS
-
- /* Forced inheritance from RequestAbstractType */
- XKMS_REQUESTABSTRACTYPE_IMPL_METHODS
-
-
-private:
-
- XKMSAuthenticationImpl * mp_authentication;
- XKMSReissueKeyBindingImpl * mp_reissueKeyBinding;
- DSIGSignature * mp_proofOfPossessionSignature;
-
- XSECProvider m_prov; // For creating the signature
-
- // Unimplemented
- XKMSReissueRequestImpl(void);
- XKMSReissueRequestImpl(const XKMSReissueRequestImpl &);
- XKMSReissueRequestImpl & operator = (const XKMSReissueRequestImpl &);
-
-};
-
-#endif /* XKMSREISSUEREQUESTIMPL_INCLUDE */
+ */
+
+/*
+ * XSEC
+ *
+ * XKMSReissueRequestImpl := Implementation for ReissueRequest Messages
+ *
+ * $Id$
+ *
+ */
+
+#ifndef XKMSREISSUEREQUESTIMPL_INCLUDE
+#define XKMSREISSUEREQUESTIMPL_INCLUDE
+
+// XSEC Includes
+
+#include <xsec/framework/XSECDefs.hpp>
+#include <xsec/xkms/XKMSReissueRequest.hpp>
+#include "XKMSRequestAbstractTypeImpl.hpp"
+
+class XKMSAuthenticationImpl;
+class XKMSReissueKeyBindingImpl;
+class DSIGSignature;
+
+class XKMSReissueRequestImpl : public XKMSReissueRequest {
+
+public:
+ XKMSRequestAbstractTypeImpl m_request;
+ XKMSMessageAbstractTypeImpl &m_msg;
+public:
+
+ XKMSReissueRequestImpl(
+ const XSECEnv * env
+ );
+
+ XKMSReissueRequestImpl(
+ const XSECEnv * env,
+ XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * node
+ );
+
+ virtual ~XKMSReissueRequestImpl();
+
+ // Load elements
+ void load();
+
+ // Creation
+ XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *
+ createBlankReissueRequest(
+ const XMLCh * service,
+ const XMLCh * id = NULL);
+
+
+ /* Getter Interface Methods */
+ virtual XKMSReissueKeyBinding * getReissueKeyBinding(void) const;
+ virtual XKMSAuthentication * getAuthentication (void) const;
+ virtual DSIGSignature * getProofOfPossessionSignature(void) const;
+
+ /* Setter Interface Methods */
+
+ virtual XKMSReissueKeyBinding * addReissueKeyBinding(XKMSStatus::StatusValue status);
+ virtual XKMSAuthentication * addAuthentication(void);
+ virtual DSIGSignature * addProofOfPossessionSignature(
+ const XMLCh* c14nAlgorithm,
+ const XMLCh* signatureAlgorithm,
+ const XMLCh* hashAlgorithm);
+
+ /* Implemented from MessageAbstractType */
+ virtual messageType getMessageType(void);
+
+ /* Forced inheritance from XKMSMessageAbstractTypeImpl */
+ XKMS_MESSAGEABSTRACTYPE_IMPL_METHODS
+
+ /* Forced inheritance from RequestAbstractType */
+ XKMS_REQUESTABSTRACTYPE_IMPL_METHODS
+
+
+private:
+
+ XKMSAuthenticationImpl * mp_authentication;
+ XKMSReissueKeyBindingImpl * mp_reissueKeyBinding;
+ DSIGSignature * mp_proofOfPossessionSignature;
+
+ XSECProvider m_prov; // For creating the signature
+
+ // Unimplemented
+ XKMSReissueRequestImpl(void);
+ XKMSReissueRequestImpl(const XKMSReissueRequestImpl &);
+ XKMSReissueRequestImpl & operator = (const XKMSReissueRequestImpl &);
+
+};
+
+#endif /* XKMSREISSUEREQUESTIMPL_INCLUDE */