This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-wss4j.git


The following commit(s) were added to refs/heads/master by this push:
     new f3fe1526d IBM JRE > 8 doesn't have IBM JGSS anymore (#741)
f3fe1526d is described below

commit f3fe1526d5fb2f097d2dd56142a8931da949ae2c
Author: Andreas Martens <[email protected]>
AuthorDate: Thu Oct 8 10:24:38 2026 +0100

    IBM JRE > 8 doesn't have IBM JGSS anymore (#741)
    
    * Fix Kerberos exception actions for IBM Semeru runtimes
    
    * Run the Kerberos tests on IBM JVMs
    
    * Run all tests on IBM JVMs
    
    * remove support for IBM JGSS only exists in Java 8
    
    * resolve review comments
    
    ---------
    
    Co-authored-by: William Marlow <[email protected]>
---
 .../integration/test/kerberos/KerberosTest.java    | 81 ----------------------
 .../kerberos/KerberosClientExceptionAction.java    | 14 +---
 .../kerberos/KerberosServiceExceptionAction.java   | 17 ++---
 .../wss4j/common/crypto/NameConstraintsTest.java   | 31 ---------
 .../apache/wss4j/dom/message/AttachmentTest.java   |  5 --
 .../dom/message/EncryptedKeyLengthOracleTest.java  |  8 ---
 .../wss4j/dom/message/EncryptionGCMTest.java       |  9 ---
 .../org/apache/wss4j/stax/test/AttachmentTest.java |  5 --
 .../apache/wss4j/stax/test/EncDecryptionTest.java  | 11 ---
 9 files changed, 7 insertions(+), 174 deletions(-)

diff --git 
a/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java
 
b/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java
index 21ad6d548..709123e71 100644
--- 
a/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java
+++ 
b/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java
@@ -97,8 +97,6 @@ public class KerberosTest {
     private static final TransformerFactory TRANSFORMER_FACTORY = 
SecureTransformerFactory.newInstance();
     private static DocumentBuilderFactory dbf;
 
-    private static boolean runTests = true;
-
     private static SimpleKdcServer kerbyServer;
 
     @BeforeAll
@@ -134,10 +132,6 @@ public class KerberosTest {
 
         kerbyServer.start();
 
-        if ("IBM Corporation".equals(System.getProperty("java.vendor"))) {
-            runTests = false;
-        }
-
         dbf = SecureDocumentBuilderFactory.newNSInstance();
         dbf.setIgnoringComments(false);
         dbf.setCoalescing(false);
@@ -164,11 +158,6 @@ public class KerberosTest {
      */
     @Test
     public void testKerberosCreationAndProcessing() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
 
         WSSecHeader secHeader = new WSSecHeader(doc);
@@ -222,11 +211,6 @@ public class KerberosTest {
      */
     @Test
     public void testSpnego() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
 
         WSSecHeader secHeader = new WSSecHeader(doc);
@@ -259,11 +243,6 @@ public class KerberosTest {
      */
     @Test
     public void testKerberosClient() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
 
         CallbackHandler callbackHandler = new CallbackHandler() {
@@ -303,11 +282,6 @@ public class KerberosTest {
      */
     @Test
     public void testKerberosSignature() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
 
         WSSecHeader secHeader = new WSSecHeader(doc);
@@ -377,11 +351,6 @@ public class KerberosTest {
      */
     @Test
     public void testKerberosSignatureKI() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
 
         WSSecHeader secHeader = new WSSecHeader(doc);
@@ -454,11 +423,6 @@ public class KerberosTest {
      */
     @Test
     public void testKerberosEncryption() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
 
         WSSecHeader secHeader = new WSSecHeader(doc);
@@ -525,11 +489,6 @@ public class KerberosTest {
      */
     @Test
     public void testKerberosEncryptionBSTFirst() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
 
         WSSecHeader secHeader = new WSSecHeader(doc);
@@ -597,11 +556,6 @@ public class KerberosTest {
      */
     @Test
     public void testKerberosEncryptionKI() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
 
         WSSecHeader secHeader = new WSSecHeader(doc);
@@ -670,11 +624,6 @@ public class KerberosTest {
     //
     @Test
     public void testKerberosSignatureOutbound() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         Document document;
         {
             WSSSecurityProperties securityProperties = new 
WSSSecurityProperties();
@@ -750,11 +699,6 @@ public class KerberosTest {
 
     @Test
     public void testKerberosSignatureInbound() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         {
             Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
@@ -843,11 +787,6 @@ public class KerberosTest {
 
     @Test
     public void testKerberosSignatureKIInbound() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         {
             Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
@@ -936,11 +875,6 @@ public class KerberosTest {
 
     @Test
     public void testKerberosEncryptionOutbound() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         Document document;
         {
             WSSSecurityProperties securityProperties = new 
WSSSecurityProperties();
@@ -1016,11 +950,6 @@ public class KerberosTest {
 
     @Test
     public void testKerberosEncryptionOutboundDeprecatedTag() throws Exception 
{
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         Document document;
         {
             WSSSecurityProperties securityProperties = new 
WSSSecurityProperties();
@@ -1096,11 +1025,6 @@ public class KerberosTest {
 
     @Test
     public void testKerberosEncryptionInbound() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         {
             Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
@@ -1187,11 +1111,6 @@ public class KerberosTest {
 
     @Test
     public void testKerberosEncryptionKIInbound() throws Exception {
-        if (!runTests) {
-            System.out.println("Skipping test because kerberos server could 
not be started");
-            return;
-        }
-
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         {
             Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
diff --git 
a/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosClientExceptionAction.java
 
b/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosClientExceptionAction.java
index 8b7bd2a4f..021af7813 100644
--- 
a/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosClientExceptionAction.java
+++ 
b/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosClientExceptionAction.java
@@ -19,7 +19,6 @@
 
 package org.apache.wss4j.common.kerberos;
 
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.security.Key;
 import java.security.Principal;
@@ -39,14 +38,10 @@ import org.ietf.jgss.Oid;
  * Key Distribution Center.
  */
 public class KerberosClientExceptionAction implements 
PrivilegedExceptionAction<KerberosContext> {
-    private static final boolean IS_IBM_VENDOR = 
System.getProperty("java.vendor").startsWith("IBM");
 
     private static final String SUN_JGSS_INQUIRE_TYPE_CLASS = 
"com.sun.security.jgss.InquireType";
     private static final String SUN_JGSS_EXT_GSSCTX_CLASS = 
"com.sun.security.jgss.ExtendedGSSContext";
 
-    private static final String IBM_JGSS_INQUIRE_TYPE_CLASS = 
"com.ibm.security.jgss.InquireType";
-    private static final String IBM_JGSS_EXT_GSSCTX_CLASS = 
"com.ibm.security.jgss.ExtendedGSSContext";
-
     private static final String JGSS_KERBEROS_TICKET_OID = 
"1.2.840.113554.1.2.2";
     private static final String JGSS_SPNEGO_TICKET_OID = "1.3.6.1.5.5.2";
 
@@ -115,12 +110,10 @@ public class KerberosClientExceptionAction implements 
PrivilegedExceptionAction<
 
         try {
             @SuppressWarnings("rawtypes")
-            Class inquireType = Class.forName(IS_IBM_VENDOR ? 
IBM_JGSS_INQUIRE_TYPE_CLASS
-                : SUN_JGSS_INQUIRE_TYPE_CLASS);
+            Class inquireType = Class.forName(SUN_JGSS_INQUIRE_TYPE_CLASS);
 
             @SuppressWarnings("rawtypes")
-            Class extendedGSSContext = Class.forName(IS_IBM_VENDOR ? 
IBM_JGSS_EXT_GSSCTX_CLASS
-                : SUN_JGSS_EXT_GSSCTX_CLASS);
+            Class extendedGSSContext = 
Class.forName(SUN_JGSS_EXT_GSSCTX_CLASS);
 
             @SuppressWarnings("unchecked")
             Method inquireSecContext = 
extendedGSSContext.getMethod("inquireSecContext", inquireType);
@@ -129,8 +122,7 @@ public class KerberosClientExceptionAction implements 
PrivilegedExceptionAction<
             Key key = (Key) inquireSecContext.invoke(secContext, 
Enum.valueOf(inquireType, "KRB5_GET_SESSION_KEY"));
 
             krbCtx.setSecretKey(key);
-        } catch (ClassNotFoundException | NoSuchMethodException | 
IllegalAccessException
-            | InvocationTargetException e) {
+        } catch (ReflectiveOperationException e) {
             throw new WSSecurityException(
                 ErrorCode.FAILURE, e, "kerberosServiceTicketError"
             );
diff --git 
a/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosServiceExceptionAction.java
 
b/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosServiceExceptionAction.java
index f306694a6..44e0c4b27 100644
--- 
a/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosServiceExceptionAction.java
+++ 
b/ws-security-common/src/main/java/org/apache/wss4j/common/kerberos/KerberosServiceExceptionAction.java
@@ -18,7 +18,6 @@
  */
 package org.apache.wss4j.common.kerberos;
 
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.security.Key;
 import java.security.PrivilegedExceptionAction;
@@ -37,14 +36,9 @@ import org.ietf.jgss.Oid;
 
 public class KerberosServiceExceptionAction implements 
PrivilegedExceptionAction<KerberosServiceContext> {
 
-    private static final boolean IS_IBM_VENDOR = 
System.getProperty("java.vendor").startsWith("IBM");
-
     private static final String SUN_JGSS_INQUIRE_TYPE_CLASS = 
"com.sun.security.jgss.InquireType";
     private static final String SUN_JGSS_EXT_GSSCTX_CLASS = 
"com.sun.security.jgss.ExtendedGSSContext";
 
-    private static final String IBM_JGSS_INQUIRE_TYPE_CLASS = 
"com.ibm.security.jgss.InquireType";
-    private static final String IBM_JGSS_EXT_GSSCTX_CLASS = 
"com.ibm.security.jgss.ExtendedGSSContext";
-
     private static final String 
EXTENDED_JGSS_CONTEXT_INQUIRE_SEC_CONTEXT_METHOD_NAME = "inquireSecContext";
     private static final String 
EXTENDED_JGSS_CONTEXT_INQUIRE_TYPE_KRB5_GET_SESSION_KEY = 
"KRB5_GET_SESSION_KEY";
 
@@ -107,24 +101,21 @@ public class KerberosServiceExceptionAction implements 
PrivilegedExceptionAction
 
             try {
                 @SuppressWarnings("rawtypes")
-                Class inquireType = Class.forName(IS_IBM_VENDOR ? 
IBM_JGSS_INQUIRE_TYPE_CLASS
-                    : SUN_JGSS_INQUIRE_TYPE_CLASS);
+                Class inquireType = Class.forName(SUN_JGSS_INQUIRE_TYPE_CLASS);
 
                 @SuppressWarnings("rawtypes")
-                Class extendedGSSContext = Class.forName(IS_IBM_VENDOR ? 
IBM_JGSS_EXT_GSSCTX_CLASS
-                    : SUN_JGSS_EXT_GSSCTX_CLASS);
+                Class extendedGSSContext = 
Class.forName(SUN_JGSS_EXT_GSSCTX_CLASS);
 
                 @SuppressWarnings("unchecked")
                 Method inquireSecContext =
-                
extendedGSSContext.getMethod(EXTENDED_JGSS_CONTEXT_INQUIRE_SEC_CONTEXT_METHOD_NAME,
 inquireType);
+                    
extendedGSSContext.getMethod(EXTENDED_JGSS_CONTEXT_INQUIRE_SEC_CONTEXT_METHOD_NAME,
 inquireType);
 
                 @SuppressWarnings("unchecked")
                 Object obj = Enum.valueOf(inquireType, 
EXTENDED_JGSS_CONTEXT_INQUIRE_TYPE_KRB5_GET_SESSION_KEY);
                 Key key = (Key) inquireSecContext.invoke(secContext, obj);
 
                 krbServiceCtx.setSessionKey(key);
-            } catch (ClassNotFoundException | NoSuchMethodException | 
IllegalAccessException
-                | InvocationTargetException e) {
+            } catch (ReflectiveOperationException e) {
                 throw new WSSecurityException(
                     ErrorCode.FAILURE, e, 
KERBEROS_TICKET_VALIDATION_ERROR_MSG_ID
                 );
diff --git 
a/ws-security-common/src/test/java/org/apache/wss4j/common/crypto/NameConstraintsTest.java
 
b/ws-security-common/src/test/java/org/apache/wss4j/common/crypto/NameConstraintsTest.java
index ed7132145..1ea9873d8 100644
--- 
a/ws-security-common/src/test/java/org/apache/wss4j/common/crypto/NameConstraintsTest.java
+++ 
b/ws-security-common/src/test/java/org/apache/wss4j/common/crypto/NameConstraintsTest.java
@@ -47,7 +47,6 @@ import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
 
 /**
  * Tests the handling of {@code NameConstraint}s with {@code TrustAnchor}s in 
the
@@ -78,8 +77,6 @@ public class NameConstraintsTest {
 
     private static final Pattern SUBJ_PATTERN = 
Pattern.compile(".*OU=wss4j,O=apache");
 
-    private boolean isIBMJdK = 
System.getProperty("java.vendor").contains("IBM");
-
     @BeforeEach
     public void setup() throws Exception {
         WSProviderConfig.init();
@@ -126,8 +123,6 @@ public class NameConstraintsTest {
 
     @Test
     public void testNameConstraints() throws Exception {
-        assumeFalse(isIBMJdK);
-
         Merlin merlin = new Merlin();
         X509Certificate[] certificates = 
getTestCertificateChain(INTERMEDIATE_SIGNED);
 
@@ -146,8 +141,6 @@ public class NameConstraintsTest {
 
     @Test
     public void testNameConstraintsWithKeyStoreUsingMerlin() throws Exception {
-        assumeFalse(isIBMJdK);
-
         withKeyStoreUsingMerlin(getSelfKeyStore(),
                 getTestCertificateChain(SELF_SIGNED),
                 new Merlin());
@@ -161,8 +154,6 @@ public class NameConstraintsTest {
 
     @Test
     public void testNameConstraintsWithTrustStoreUsingMerlin() throws 
Exception {
-        assumeFalse(isIBMJdK);
-
         withTrustStoreUsingMerlin(getSelfKeyStore(),
                 getTestCertificateChain(SELF_SIGNED),
                 new Merlin());
@@ -176,8 +167,6 @@ public class NameConstraintsTest {
 
     @Test
     public void testNameConstraintsWithKeyStoreUsingMerlinAki() throws 
Exception {
-        assumeFalse(isIBMJdK);
-
         withKeyStoreUsingMerlinAKI(getSelfKeyStore(),
                 getTestCertificateChain(SELF_SIGNED),
                 new MerlinAKI());
@@ -191,8 +180,6 @@ public class NameConstraintsTest {
 
     @Test
     public void testNameConstraintsWithTrustStoreUsingMerlinAki() throws 
Exception {
-        assumeFalse(isIBMJdK);
-
         withTrustStoreUsingMerlinAKI(getSelfKeyStore(),
                 getTestCertificateChain(SELF_SIGNED),
                 new MerlinAKI());
@@ -206,8 +193,6 @@ public class NameConstraintsTest {
 
     @Test
     public void testNameConstraintsWithKeyStoreUsingMerlinBc() throws 
Exception {
-        assumeFalse(isIBMJdK);
-
         withKeyStoreUsingMerlin(getSelfKeyStore(),
                 getTestCertificateChain(SELF_SIGNED),
                 getMerlinBc());
@@ -221,8 +206,6 @@ public class NameConstraintsTest {
 
     @Test
     public void testNameConstraintsWithTrustStoreUsingMerlinBc() throws 
Exception {
-        assumeFalse(isIBMJdK);
-
         withTrustStoreUsingMerlin(getSelfKeyStore(),
                 getTestCertificateChain(SELF_SIGNED),
                 getMerlinBc());
@@ -236,8 +219,6 @@ public class NameConstraintsTest {
 
     @Test
     public void testNameConstraintsWithKeyStoreUsingMerlinAkiBc() throws 
Exception {
-        assumeFalse(isIBMJdK);
-
         withKeyStoreUsingMerlinAKI(getSelfKeyStore(),
                 getTestCertificateChain(SELF_SIGNED),
                 getMerlinAkiBc());
@@ -251,8 +232,6 @@ public class NameConstraintsTest {
 
     @Test
     public void testNameConstraintsWithTrustStoreUsingMerlinAkiBc() throws 
Exception {
-        assumeFalse(isIBMJdK);
-
         withTrustStoreUsingMerlinAKI(getSelfKeyStore(),
                 getTestCertificateChain(SELF_SIGNED),
                 getMerlinAkiBc());
@@ -272,8 +251,6 @@ public class NameConstraintsTest {
      */
     @Test
     public void testTrustAnchorsForCertificatesWithoutNameConstraints() throws 
Exception {
-        assumeFalse(isIBMJdK);
-
         Merlin merlin = merlinHandlingNameConstraints();
         Set<TrustAnchor> anchors = new HashSet<>();
 
@@ -288,8 +265,6 @@ public class NameConstraintsTest {
      */
     @Test
     public void testTrustAnchorsRetainNameConstraints() throws Exception {
-        assumeFalse(isIBMJdK);
-
         Merlin merlin = merlinHandlingNameConstraints();
         Set<TrustAnchor> anchors = new HashSet<>();
 
@@ -310,8 +285,6 @@ public class NameConstraintsTest {
 
     @Test
     public void testNameConstraintsWithKeyStoreUsingMerlinBreaking() throws 
Exception {
-        assumeFalse(isIBMJdK);
-
         Properties properties = new Properties();
         
properties.setProperty("org.apache.wss4j.crypto.merlin.cert.provider.nameconstraints",
                 "true");
@@ -328,8 +301,6 @@ public class NameConstraintsTest {
 
     @Test
     public void testNameConstraintsWithKeyStoreUsingMerlinAkiBreaking() throws 
Exception {
-        assumeFalse(isIBMJdK);
-
         Properties properties = new Properties();
         
properties.setProperty("org.apache.wss4j.crypto.merlin.cert.provider.nameconstraints",
                 "true");
@@ -346,8 +317,6 @@ public class NameConstraintsTest {
 
     @Test
     public void testNameConstraintsUsingCertificateStore() throws Exception {
-        assumeFalse(isIBMJdK);
-
         usingCertificateStore(getSelfKeyStore(), 
getTestCertificateChain(SELF_SIGNED));
         usingCertificateStore(getRootKeyStore(), 
getTestCertificateChain(ROOT_SIGNED));
         usingCertificateStore(getRootKeyStore(), 
getTestCertificateChain(INTERMEDIATE_SIGNED));
diff --git 
a/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/AttachmentTest.java
 
b/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/AttachmentTest.java
index dbb404709..5e4a1fba4 100644
--- 
a/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/AttachmentTest.java
+++ 
b/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/AttachmentTest.java
@@ -67,7 +67,6 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
 
 public class AttachmentTest {
 
@@ -77,8 +76,6 @@ public class AttachmentTest {
     private WSSecurityEngine secEngine = new WSSecurityEngine();
     private Crypto crypto;
 
-    private boolean isIBMJdK = 
System.getProperty("java.vendor").contains("IBM");
-
     public AttachmentTest() throws Exception {
         WSSConfig.init();
         crypto = CryptoFactory.getInstance();
@@ -488,8 +485,6 @@ public class AttachmentTest {
 
     @Test
     public void testXMLAttachmentContentEncryptionGCM() throws Exception {
-        assumeFalse(isIBMJdK);
-
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
diff --git 
a/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptedKeyLengthOracleTest.java
 
b/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptedKeyLengthOracleTest.java
index 5ad82d8e1..fb980590a 100644
--- 
a/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptedKeyLengthOracleTest.java
+++ 
b/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptedKeyLengthOracleTest.java
@@ -49,7 +49,6 @@ import org.w3c.dom.Element;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
 
 /**
  * The receiver must not reveal whether the private key operation on an 
EncryptedKey produced a
@@ -76,7 +75,6 @@ public class EncryptedKeyLengthOracleTest {
 
     private final Crypto crypto;
     private final CallbackHandler callbackHandler = new 
KeystoreCallbackHandler();
-    private final boolean isIBMJdK = 
System.getProperty("java.vendor").contains("IBM");
 
     public EncryptedKeyLengthOracleTest() throws Exception {
         WSSConfig.init();
@@ -85,8 +83,6 @@ public class EncryptedKeyLengthOracleTest {
 
     @Test
     public void 
testWrongLengthPlaintextIsIndistinguishableFromFailedDecryption() throws 
Exception {
-        assumeFalse(isIBMJdK);
-
         // A ciphertext that does not decrypt to a well formed plaintext at 
all: the block type
         // is 0x03 where PKCS#1 v1.5 encryption requires 0x02, so the 
unpadding rejects it.
         WSSecurityException failedDecryption =
@@ -111,8 +107,6 @@ public class EncryptedKeyLengthOracleTest {
      */
     @Test
     public void testOverlongPlaintextIsIndistinguishableFromFailedDecryption() 
throws Exception {
-        assumeFalse(isIBMJdK);
-
         WSSecurityException failedDecryption =
             decryptWithCipherValue(forgeCiphertext(NON_CONFORMING_BLOCK_TYPE, 
16));
 
@@ -132,8 +126,6 @@ public class EncryptedKeyLengthOracleTest {
      */
     @Test
     public void 
testWrongLengthPlaintextIsIndistinguishableForAnEmbeddedEncryptedKey() throws 
Exception {
-        assumeFalse(isIBMJdK);
-
         WSSecurityException failedDecryption =
             
decryptWithEmbeddedEncryptedKey(forgeCiphertext(NON_CONFORMING_BLOCK_TYPE, 16));
 
diff --git 
a/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionGCMTest.java
 
b/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionGCMTest.java
index 40c210f04..8f9166d12 100644
--- 
a/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionGCMTest.java
+++ 
b/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionGCMTest.java
@@ -51,7 +51,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
 
 /**
  * A set of test-cases for encrypting and decrypting SOAP requests using GCM. 
See:
@@ -70,8 +69,6 @@ public class EncryptionGCMTest {
     private CallbackHandler keystoreCallbackHandler = new 
KeystoreCallbackHandler();
     private Crypto crypto;
 
-    private boolean isIBMJdK = 
System.getProperty("java.vendor").contains("IBM");
-
     public EncryptionGCMTest() throws Exception {
         crypto = CryptoFactory.getInstance("wss40.properties");
     }
@@ -88,8 +85,6 @@ public class EncryptionGCMTest {
 
     @Test
     public void testAES128GCM() throws Exception {
-        assumeFalse(isIBMJdK);
-
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
@@ -115,8 +110,6 @@ public class EncryptionGCMTest {
 
     @Test
     public void testAES256GCM() throws Exception {
-        assumeFalse(isIBMJdK);
-
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
@@ -142,8 +135,6 @@ public class EncryptionGCMTest {
 
     @Test
     public void testAES192GCM_RSAOAEP_SHA256_MGFSHA256() throws Exception {
-        assumeFalse(isIBMJdK);
-
         Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
         WSSecHeader secHeader = new WSSecHeader(doc);
         secHeader.insertSecurityHeader();
diff --git 
a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentTest.java 
b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentTest.java
index 99eb15f4c..677c80988 100644
--- 
a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentTest.java
+++ 
b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AttachmentTest.java
@@ -76,12 +76,9 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
 
 public class AttachmentTest extends AbstractTestBase {
 
-    private boolean isIBMJdK = 
System.getProperty("java.vendor").contains("IBM");
-
     public AttachmentTest() throws Exception {
     }
 
@@ -493,8 +490,6 @@ public class AttachmentTest extends AbstractTestBase {
 
     @Test
     public void testXMLAttachmentContentEncryptionGCM() throws Exception {
-        assumeFalse(isIBMJdK);
-
         final String attachmentId = UUID.randomUUID().toString();
         final Attachment attachment = new Attachment();
         attachment.setMimeType("text/xml");
diff --git 
a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java
 
b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java
index abbc8a021..47b5b679a 100644
--- 
a/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java
+++ 
b/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java
@@ -92,12 +92,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
 
 public class EncDecryptionTest extends AbstractTestBase {
 
-    private boolean isIBMJdK = 
System.getProperty("java.vendor").contains("IBM");
-
     @Test
     public void testEncDecryptionDefaultConfigurationOutbound() throws 
Exception {
 
@@ -1836,7 +1833,6 @@ public class EncDecryptionTest extends AbstractTestBase {
      */
     @Test
     public void testKeyWrappingRSAOAEPMGF1AESGCM128Outbound() throws Exception 
{
-        assumeFalse(isIBMJdK);
         try {
             Security.addProvider(new BouncyCastleProvider());
             ByteArrayOutputStream baos;
@@ -1897,7 +1893,6 @@ public class EncDecryptionTest extends AbstractTestBase {
 
     @Test
     public void testKeyWrappingRSAOAEPMGF1AESGCM128Inbound() throws Exception {
-        assumeFalse(isIBMJdK);
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         {
             InputStream sourceDocument = 
this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
@@ -1943,7 +1938,6 @@ public class EncDecryptionTest extends AbstractTestBase {
     */
     @Test
     public void testKeyWrappingRSAOAEPAESGCM192SHA256Outbound() throws 
Exception {
-        assumeFalse(isIBMJdK);
         try {
             Security.addProvider(new BouncyCastleProvider());
             ByteArrayOutputStream baos;
@@ -2008,7 +2002,6 @@ public class EncDecryptionTest extends AbstractTestBase {
 
     @Test
     public void testKeyWrappingRSAOAEPAESGCM192SHA256Inbound() throws 
Exception {
-        assumeFalse(isIBMJdK);
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         {
             InputStream sourceDocument = 
this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
@@ -2060,7 +2053,6 @@ public class EncDecryptionTest extends AbstractTestBase {
      */
     @Test
     public void testKeyWrappingRSAOAEPAES192GCMSHA384MGF1sha384Outbound() 
throws Exception {
-        assumeFalse(isIBMJdK);
         try {
             Security.addProvider(new BouncyCastleProvider());
 
@@ -2132,7 +2124,6 @@ public class EncDecryptionTest extends AbstractTestBase {
     @Test
     public void testKeyWrappingRSAOAEPAES192GCMSHA384MGF1sha1Inbound() throws 
Exception {
 
-        assumeFalse(isIBMJdK);
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         {
             InputStream sourceDocument = 
this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
@@ -2188,7 +2179,6 @@ public class EncDecryptionTest extends AbstractTestBase {
 
     @Test
     public void 
testKeyWrappingRSAOAEPAESGCM192SHA384MGF1SHA384PSourceOutbound() throws 
Exception {
-        assumeFalse(isIBMJdK);
         try {
             Security.addProvider(new BouncyCastleProvider());
             ByteArrayOutputStream baos;
@@ -2264,7 +2254,6 @@ public class EncDecryptionTest extends AbstractTestBase {
     @Test
     @org.junit.jupiter.api.Disabled //WSS4J does not support OAEPParams atm
     public void 
testKeyWrappingRSAOAEPAESGCM192SHA384MGF1SHA384PSourceInbound() throws 
Exception {
-        assumeFalse(isIBMJdK);
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         {

Reply via email to