[cpp-xmltooling] 03/03: Proper handling of EC conditional macro.
Scott Cantor
cantor.2 at osu.edu
Wed May 2 11:12:42 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-xmltooling.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-xmltooling.git;a=commit;h=6450939eec40b531f21396e6094f9cd933229275
commit 6450939eec40b531f21396e6094f9cd933229275
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed May 2 11:12:30 2018 -0400
Proper handling of EC conditional macro.
---
xmltoolingtest/InlineKeyResolverTest.h | 8 ++------
xmltoolingtest/SignatureTest.h | 2 +-
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/xmltoolingtest/InlineKeyResolverTest.h b/xmltoolingtest/InlineKeyResolverTest.h
index a6fc990..c4fa64f 100644
--- a/xmltoolingtest/InlineKeyResolverTest.h
+++ b/xmltoolingtest/InlineKeyResolverTest.h
@@ -123,9 +123,8 @@ public:
}
-#ifdef XSEC_OPENSSL_HAVE_EC
void testOpenSSLEC() {
-
+#ifdef XSEC_OPENSSL_HAVE_EC
string path=data_path + "KeyInfoEC.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getValidatingParser().parse(fs);
@@ -138,8 +137,6 @@ public:
scoped_ptr<X509Credential> credFromKeyInfo(dynamic_cast<X509Credential*>(m_resolver->resolve(kiObject.get())));
const OpenSSLCryptoKeyEC* sslCredFromKeyInfo= dynamic_cast<const OpenSSLCryptoKeyEC*>(credFromKeyInfo->getPublicKey());
- const EC_KEY* keyInfoEC = dynamic_cast<const OpenSSLCryptoKeyEC*>(credFromKeyInfo->getPublicKey())->getOpenSSLEC();
-
path = data_path + "FileSystemCredentialResolver.xml";
ifstream in(path.c_str());
DOMDocument* cdoc=XMLToolingConfig::getConfig().getParser().parse(in);
@@ -152,7 +149,6 @@ public:
cc.setUsage(Credential::SIGNING_CREDENTIAL);
cc.setKeyAlgorithm("EC");
const OpenSSLCryptoKeyEC* fileResolverCryptoKeyEC = dynamic_cast<const OpenSSLCryptoKeyEC*>(cresolver->resolve(&cc)->getPublicKey());
- const EC_KEY* fileResolverEC= fileResolverCryptoKeyEC->getOpenSSLEC();
unsigned char toSign[] = "NibbleAHappyWartHog";
const int bufferSize = 1024;
@@ -161,8 +157,8 @@ public:
bool worked = sslCredFromKeyInfo->verifyBase64SignatureDSA(toSign, sizeof(toSign), &outSig[0], len);
TSM_ASSERT("EC Round Trip Signature via KeyInfo Failed", worked);
- }
#endif
+ }
void testOpenSSLRSA() {
string path=data_path + "KeyInfo1.xml";
diff --git a/xmltoolingtest/SignatureTest.h b/xmltoolingtest/SignatureTest.h
index 99c802d..dc72b2e 100644
--- a/xmltoolingtest/SignatureTest.h
+++ b/xmltoolingtest/SignatureTest.h
@@ -107,7 +107,7 @@ public:
}
void testOpenSSLEC() {
-#if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
+#ifdef XSEC_OPENSSL_HAVE_EC
CredentialCriteria cc;
cc.setUsage(Credential::SIGNING_CREDENTIAL);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list