cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1521878 - /cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/impl/XkmsCryptoProvider.java
Date Wed, 11 Sep 2013 14:39:44 GMT
Author: coheigea
Date: Wed Sep 11 14:39:44 2013
New Revision: 1521878

URL: http://svn.apache.org/r1521878
Log:
Check local cache first for IssuerSerial

Modified:
    cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/impl/XkmsCryptoProvider.java

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=1521878&r1=1521877&r2=1521878&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 14:39:44 2013
@@ -156,8 +156,14 @@ public class XkmsCryptoProvider extends 
         } else if (type == TYPE.ALIAS) {
             return getX509CertificatesFromXKMS(cryptoType);
         } else if (type == TYPE.ISSUER_SERIAL) {
+            // Try local Crypto first
+            X509Certificate[] localCerts = getCertificateLocally(cryptoType);
+            if (localCerts != null) {
+                return localCerts;
+            }
+            
             String key = getKeyForIssuerSerial(cryptoType.getIssuer(), cryptoType.getSerial());
-            // Try local cache first
+            // Try local cache next
             if (xkmsClientCache != null) {
                 XKMSCacheToken cachedToken = xkmsClientCache.get(key);
                 if (cachedToken != null && cachedToken.getX509Certificate() != null)
{



Mime
View raw message