X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fxmltooling.git;a=blobdiff_plain;f=xmltoolingtest%2FSignatureTest.h;h=62bd6a3cfdc6d4739572962ff56539d5f711961e;hp=62009ed03c1d66c57d841d891d08a4243814ca9c;hb=3ed05d2c0299f4ee642ad1ef7e3e629a97d0e74f;hpb=362ea424fdf35327c0bfaf1b540da372c01db624 diff --git a/xmltoolingtest/SignatureTest.h b/xmltoolingtest/SignatureTest.h index 62009ed..62bd6a3 100644 --- a/xmltoolingtest/SignatureTest.h +++ b/xmltoolingtest/SignatureTest.h @@ -24,7 +24,7 @@ #include #include -class TestContext : public SigningContext, public VerifyingContext +class TestContext : public SigningContext, public VerifyingContext, CredentialResolver { XSECCryptoKey* m_key; vector m_certs; @@ -65,10 +65,11 @@ public: XMLString::release(&m_uri); } - void createSignature(DSIGSignature* sig) const { + bool createSignature(DSIGSignature* sig) { DSIGReference* ref=sig->createReference(m_uri); ref->appendEnvelopedSignatureTransform(); ref->appendCanonicalizationTransform(CANON_C14NE_NOC); + return false; } void verifySignature(DSIGSignature* sig) const { @@ -79,9 +80,14 @@ public: sig->verify(); } - const std::vector* getX509Certificates() const { return &m_certs; } - KeyInfo* getKeyInfo() const { return NULL; } - XSECCryptoKey* getSigningKey() const { return m_key->clone(); } + KeyInfo* getKeyInfo() { return NULL; } + CredentialResolver& getCredentialResolver() { return *this; } + const char* getId() const { return "test"; } + const std::vector* getX509Certificates() { return &m_certs; } + XSECCryptoKey* getPublicKey() { return m_key; } + XSECCryptoKey* getPrivateKey() { return m_key; } + Lockable& lock() { return *this; } + void unlock() {} }; class SignatureTest : public CxxTest::TestSuite {