Author: asoldano
Date: 2014-08-29 12:09:49 -0400 (Fri, 29 Aug 2014)
New Revision: 18889
Removed:
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/SecurityProviderConfig.java
Modified:
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Loggers.java
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringBusFactory.java
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-client/main/module.xml
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/resources/src/main/resources/modules/wildfly900/org/jboss/ws/jaxws-client/main/module.xml
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java
Log:
[JBWS-3817] svn merge -r 18821:18820 .
Modified:
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Loggers.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Loggers.java 2014-08-29
16:00:46 UTC (rev 18888)
+++
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Loggers.java 2014-08-29
16:09:49 UTC (rev 18889)
@@ -228,8 +228,4 @@
@LogMessage(level = DEBUG)
@Message(id = 24102, value = "JASPI authentication isn't enabled, can not
find JASPI modules and classes")
void cannotFindJaspiClasses();
-
- @LogMessage(level = DEBUG)
- @Message(id = 24103, value = "Could not load BouncyCastle security provider;
either setup your classpath properly or prevent loading by using the '%s' system
property.")
- void cannotLoadBouncyCastleProvider(String property, @Cause Throwable cause);
}
Modified:
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java 2014-08-29
16:00:46 UTC (rev 18888)
+++
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/Constants.java 2014-08-29
16:09:49 UTC (rev 18889)
@@ -44,7 +44,6 @@
public static final String CXF_MANAGEMENT_INSTALL_RESPONSE_TIME_INTERCEPTORS =
"cxf.management.installResponseTimeInterceptors";
public static final String CXF_WS_DISCOVERY_ENABLED =
"cxf.ws-discovery.enabled";
public static final String JBWS_CXF_DISABLE_HANDLER_AUTH_CHECKS =
"org.jboss.ws.cxf.disableHandlerAuthChecks";
- public static final String JBWS_CXF_NO_LOCAL_BC =
"org.jboss.ws.cxf.noLocalBC";
public static final String JBWS_CXF_WSDL_URI_SCHEME =
"org.jboss.ws.cxf.wsdl.uriScheme";
public static final String JBWS_CXF_JAXWS_CLIENT_BUS_STRATEGY =
"org.jboss.ws.cxf.jaxws-client.bus.strategy";
Modified:
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java 2014-08-29
16:00:46 UTC (rev 18888)
+++
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSNonSpringBusFactory.java 2014-08-29
16:09:49 UTC (rev 18889)
@@ -66,6 +66,5 @@
super.initializeBus(bus);
final ResourceManager resourceManager = bus.getExtension(ResourceManager.class);
resourceManager.addResourceResolver(JBossWSResourceInjectionResolver.getInstance());
- SecurityProviderConfig.setup(bus);
}
}
Modified:
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringBusFactory.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringBusFactory.java 2014-08-29
16:00:46 UTC (rev 18888)
+++
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSSpringBusFactory.java 2014-08-29
16:09:49 UTC (rev 18889)
@@ -154,7 +154,6 @@
super.initializeBus(bus);
final ResourceManager resourceManager = bus.getExtension(ResourceManager.class);
resourceManager.addResourceResolver(JBossWSResourceInjectionResolver.getInstance());
- SecurityProviderConfig.setup(bus);
}
void registerAppContextLifeCycleListener(final Bus bus, final BusApplicationContext
bac)
Deleted:
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/SecurityProviderConfig.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/SecurityProviderConfig.java 2014-08-29
16:00:46 UTC (rev 18888)
+++
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/SecurityProviderConfig.java 2014-08-29
16:09:49 UTC (rev 18889)
@@ -1,117 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2014, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.stack.cxf.client.configuration;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.Provider;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.message.Exchange;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.AbstractPhaseInterceptor;
-import org.apache.cxf.phase.Phase;
-import org.jboss.wsf.stack.cxf.Loggers;
-import org.jboss.wsf.stack.cxf.client.Constants;
-
-
-/**
- * Convenient class for setting a BouncyCastle security provider
- * through CXF interceptors when not globally available.
- *
- * @author alessio.soldano(a)jboss.com
- * @since 28-Jul-2014
- */
-public class SecurityProviderConfig
-{
- public static final boolean BC_GLOBALLY_AVAILABLE =
java.security.Security.getProvider("BC") != null;
- static {
- if (BC_GLOBALLY_AVAILABLE) {
- useIvParameterSpec();
- }
- }
- private static final boolean NO_LOCAL_BC =
SecurityActions.getBoolean(Constants.JBWS_CXF_NO_LOCAL_BC);
-
- public static void setup(Bus bus) {
- if (!NO_LOCAL_BC && !BC_GLOBALLY_AVAILABLE) {
- if (Holder.provider != null) {
- bus.getInInterceptors().add(Holder.inInterceptor);
- bus.getOutInterceptors().add(Holder.outInterceptor);
- }
- }
- }
-
- private static class Holder {
- static final Provider provider = getBCProvider();
- static final Interceptor inInterceptor = new Interceptor(Phase.RECEIVE);
- static final Interceptor outInterceptor = new Interceptor(Phase.SETUP);
-
- private static Provider getBCProvider() {
- Provider provider = null;
- try {
- Class<?> clazz =
SecurityProviderConfig.class.getClassLoader().loadClass("org.bouncycastle.jce.provider.BouncyCastleProvider");
- provider = (Provider)clazz.newInstance();
- if (provider.getVersion() < 1.50) {
- useIvParameterSpec();
- }
- } catch (Throwable t) {
-
Loggers.ROOT_LOGGER.cannotLoadBouncyCastleProvider(Constants.JBWS_CXF_NO_LOCAL_BC, t);
- }
- return provider;
- }
- }
-
- private static class Interceptor extends AbstractPhaseInterceptor<Message> {
-
- public Interceptor(String phase)
- {
- super(phase);
- }
-
- @Override
- public void handleMessage(Message message) throws Fault
- {
- Exchange exchange = message.getExchange();
- exchange.put(Provider.class, Holder.provider);
- }
- }
-
- private static void useIvParameterSpec() {
- try {
- // Don't override if it was set explicitly
- AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
- public Boolean run() {
- String ivParameterSpec =
"org.apache.xml.security.cipher.gcm.useIvParameterSpec";
- if (System.getProperty(ivParameterSpec) == null) {
- System.setProperty(ivParameterSpec, "true");
- return false;
- }
- return true;
- }
- });
- } catch (Throwable t) {
- //ignore
- }
- }
-
-}
Modified:
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-client/main/module.xml
===================================================================
---
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-client/main/module.xml 2014-08-29
16:00:46 UTC (rev 18888)
+++
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-client/main/module.xml 2014-08-29
16:09:49 UTC (rev 18889)
@@ -73,6 +73,5 @@
</imports>
</module>
<module name="javax.wsdl4j.api" />
- <module name="org.bouncycastle" />
</dependencies>
</module>
Modified:
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/resources/src/main/resources/modules/wildfly900/org/jboss/ws/jaxws-client/main/module.xml
===================================================================
---
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/resources/src/main/resources/modules/wildfly900/org/jboss/ws/jaxws-client/main/module.xml 2014-08-29
16:00:46 UTC (rev 18888)
+++
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/resources/src/main/resources/modules/wildfly900/org/jboss/ws/jaxws-client/main/module.xml 2014-08-29
16:09:49 UTC (rev 18889)
@@ -73,6 +73,5 @@
</imports>
</module>
<module name="javax.wsdl4j.api" />
- <module name="org.bouncycastle" />
</dependencies>
</module>
Modified:
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java 2014-08-29
16:00:46 UTC (rev 18888)
+++
stack/cxf/branches/jbossws-cxf-5.0.0.Beta1/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java 2014-08-29
16:09:49 UTC (rev 18889)
@@ -26,7 +26,7 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
-import org.apache.wss4j.common.crypto.WSProviderConfig;
+import org.apache.wss4j.dom.WSSConfig;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.management.StackConfig;
import org.jboss.wsf.spi.management.StackConfigFactory;
@@ -48,6 +48,7 @@
class CXFStackConfig implements StackConfig
{
+
public CXFStackConfig()
{
final ClassLoader orig = getContextClassLoader();
@@ -57,7 +58,7 @@
try
{
setContextClassLoader(ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader());
- WSProviderConfig.init(true, false, true);
+ WSSConfig.init();
}
catch (Exception e)
{