[xmlsectool] 01/02: Strip out old test exclusions for pre-Java-11 ECC providers
Ian Young
ian at iay.org.uk
Tue Sep 29 09:11:52 UTC 2020
This is an automated email from the git hooks/post-receive script.
iay pushed a commit to branch main
in repository xmlsectool.
View the commit online:
http://git.shibboleth.net/view/?p=xmlsectool.git;a=commit;h=b913d78e6eb76bba3660fe2b670c46e63152b6b4
commit b913d78e6eb76bba3660fe2b670c46e63152b6b4
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Tue Sep 29 09:54:17 2020 +0100
Strip out old test exclusions for pre-Java-11 ECC providers
---
.../net/shibboleth/tool/xmlsectool/BaseTest.java | 30 ----------------------
.../net/shibboleth/tool/xmlsectool/XSTJ51Test.java | 9 -------
2 files changed, 39 deletions(-)
diff --git a/src/test/java/net/shibboleth/tool/xmlsectool/BaseTest.java b/src/test/java/net/shibboleth/tool/xmlsectool/BaseTest.java
index 61134c8..fb60141 100644
--- a/src/test/java/net/shibboleth/tool/xmlsectool/BaseTest.java
+++ b/src/test/java/net/shibboleth/tool/xmlsectool/BaseTest.java
@@ -22,9 +22,7 @@ import java.io.InputStream;
import java.net.URISyntaxException;
import java.net.URL;
import java.security.KeyException;
-import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
-import java.security.Signature;
import java.security.cert.CertificateException;
import java.util.MissingResourceException;
@@ -32,7 +30,6 @@ import javax.annotation.Nonnull;
import javax.xml.transform.Source;
import org.opensaml.core.config.InitializationException;
-import org.opensaml.security.SecurityProviderTestSupport;
import org.opensaml.security.x509.X509Credential;
import org.opensaml.xmlsec.signature.support.SignatureConstants;
import org.testng.Assert;
@@ -49,7 +46,6 @@ import org.xmlunit.input.NormalizedSource;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
import net.shibboleth.utilities.java.support.logic.Constraint;
import net.shibboleth.utilities.java.support.primitive.StringSupport;
-import net.shibboleth.utilities.java.support.testing.TestSupport;
import net.shibboleth.utilities.java.support.xml.BasicParserPool;
import net.shibboleth.utilities.java.support.xml.ParserPool;
import net.shibboleth.utilities.java.support.xml.SerializeSupport;
@@ -300,33 +296,7 @@ public abstract class BaseTest {
protected void zapSignatureValues(@Nonnull final Document doc) {
zapSignatureValues(doc.getDocumentElement(), "zap");
}
-
- /**
- * Is it worth testing Elliptic Curve signatures?
- *
- * @return <code>true</code> if we can test Elliptic Curve signatures
- */
- protected boolean canTestECC() {
- final Signature ecsig;
- try {
- // look for an ECC provider
- ecsig = Signature.getInstance("SHA256withECDSA");
- } catch (NoSuchAlgorithmException e) {
- // if we don't have one at all, we can't test ECC
- return false;
- }
-
- // If we're using something claiming to be SunEC on OpenJDK 7, it may actually be broken
- // so don't bother with the tests.
- final SecurityProviderTestSupport sup = new SecurityProviderTestSupport();
- if (ecsig.getProvider().getName().equals(SecurityProviderTestSupport.SUNEC_PROVIDER_NAME) &&
- sup.isOpenJDK() && !TestSupport.isJavaV8OrLater()) {
- return false;
- }
- return true;
- }
-
// *********************************
// *** ***
// *** C R E D E N T I A L S ***
diff --git a/src/test/java/net/shibboleth/tool/xmlsectool/XSTJ51Test.java b/src/test/java/net/shibboleth/tool/xmlsectool/XSTJ51Test.java
index 00412a5..096abaf 100644
--- a/src/test/java/net/shibboleth/tool/xmlsectool/XSTJ51Test.java
+++ b/src/test/java/net/shibboleth/tool/xmlsectool/XSTJ51Test.java
@@ -26,8 +26,6 @@ import org.opensaml.security.x509.X509Credential;
import org.opensaml.xmlsec.signature.KeyInfo;
import org.opensaml.xmlsec.signature.KeyValue;
import org.testng.Assert;
-import org.testng.SkipException;
-import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -40,13 +38,6 @@ public class XSTJ51Test extends BaseTest {
XSTJ51Test() {
super(XSTJ51Test.class);
}
-
-// @BeforeMethod
-// protected void conditionalSkip() {
-// if (!canTestECC()) {
-// throw new SkipException("skipping because we don't have a working ECC provider");
-// }
-// }
@Test
public void xstj51_KeyInfo() throws Exception {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list