cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1521807 - in /cxf/trunk/services/xkms: xkms-client/ xkms-client/src/main/java/org/apache/cxf/xkms/crypto/impl/ xkms-common/src/main/java/org/apache/cxf/xkms/crypto/
Date Wed, 11 Sep 2013 11:33:16 GMT
Author: cschneider
Date: Wed Sep 11 11:33:15 2013
New Revision: 1521807

URL: http://svn.apache.org/r1521807
Log:
CXF-5259 Adding two factory methods and exporting impl package again

Modified:
    cxf/trunk/services/xkms/xkms-client/pom.xml
    cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/impl/XkmsCryptoProvider.java
    cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/impl/XkmsCryptoProviderFactory.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/crypto/CryptoProviderFactory.java

Modified: cxf/trunk/services/xkms/xkms-client/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-client/pom.xml?rev=1521807&r1=1521806&r2=1521807&view=diff
==============================================================================
--- cxf/trunk/services/xkms/xkms-client/pom.xml (original)
+++ cxf/trunk/services/xkms/xkms-client/pom.xml Wed Sep 11 11:33:15 2013
@@ -61,7 +61,12 @@
                             *
                         </Import-Package>
                         <Export-Package>
-                            !*
+                        	org.apache.cxf.xkms.crypto.impl,
+                        	org.apache.cxf.xkms.cache,
+                        	org.apache.cxf.xkms.client
+                        	<!-- To avoid problems with existing users.
+                        		 We should try to remove the exports again in the future.
+                        	 -->
                         </Export-Package>
                     </instructions>
                 </configuration>

Modified: cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/impl/XkmsCryptoProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/impl/XkmsCryptoProvider.java?rev=1521807&r1=1521806&r2=1521807&view=diff
==============================================================================
--- cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/impl/XkmsCryptoProvider.java
(original)
+++ cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/impl/XkmsCryptoProvider.java
Wed Sep 11 11:33:15 2013
@@ -41,7 +41,7 @@ import org.apache.wss4j.common.crypto.Cr
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.w3._2002._03.xkms_wsdl.XKMSPortType;
 
-class XkmsCryptoProvider extends CryptoBase {
+public class XkmsCryptoProvider extends CryptoBase {
 
     private static final Logger LOG = LogUtils.getL7dLogger(XkmsCryptoProvider.class);
 

Modified: cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/impl/XkmsCryptoProviderFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/impl/XkmsCryptoProviderFactory.java?rev=1521807&r1=1521806&r2=1521807&view=diff
==============================================================================
--- cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/impl/XkmsCryptoProviderFactory.java
(original)
+++ cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/impl/XkmsCryptoProviderFactory.java
Wed Sep 11 11:33:15 2013
@@ -42,6 +42,7 @@ public class XkmsCryptoProviderFactory i
         this.xkmsConsumer = xkmsConsumer;
     }
 
+    @Override
     public Crypto create(Message message) {
         Properties keystoreProps = CryptoProviderUtils
             .loadKeystoreProperties(message,
@@ -55,7 +56,18 @@ public class XkmsCryptoProviderFactory i
         }
     }
 
+    @Override
     public Crypto create() {
         return new XkmsCryptoProvider(xkmsConsumer);
     }
+
+    @Override
+    public Crypto create(Crypto fallbackCrypto) {
+        return new XkmsCryptoProvider(xkmsConsumer, fallbackCrypto);
+    }
+
+    @Override
+    public Crypto create(XKMSPortType xkmsClient, Crypto fallbackCrypto) {
+        return new XkmsCryptoProvider(xkmsClient, fallbackCrypto);
+    }
 }

Modified: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/crypto/CryptoProviderFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/crypto/CryptoProviderFactory.java?rev=1521807&r1=1521806&r2=1521807&view=diff
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/crypto/CryptoProviderFactory.java
(original)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/crypto/CryptoProviderFactory.java
Wed Sep 11 11:33:15 2013
@@ -21,6 +21,7 @@ package org.apache.cxf.xkms.crypto;
 
 import org.apache.cxf.message.Message;
 import org.apache.wss4j.common.crypto.Crypto;
+import org.w3._2002._03.xkms_wsdl.XKMSPortType;
 
 public interface CryptoProviderFactory {
 
@@ -38,4 +39,21 @@ public interface CryptoProviderFactory {
      * @return xkms crypto
      */
     Crypto create();
+    
+    /**
+     * Create with fallback crypto
+     * 
+     * @param fallbackCrypto
+     * @return
+     */
+    Crypto create(Crypto fallbackCrypto);
+    
+    /**
+     * Create with overridden XKMSPortType and fallbackCrypto
+     * 
+     * @param xkmsClient
+     * @param fallbackCrypto
+     * @return
+     */
+    Crypto create(XKMSPortType xkmsClient, Crypto fallbackCrypto);
 }



Mime
View raw message