cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1084450 - in /cxf/branches/2.3.x-fixes: ./ rt/ws/security/ rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Date Wed, 23 Mar 2011 01:30:19 GMT
Author: dkulp
Date: Wed Mar 23 01:30:19 2011
New Revision: 1084450

URL: http://svn.apache.org/viewvc?rev=1084450&view=rev
Log:
Merged revisions 1082698 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1082698 | dkulp | 2011-03-17 17:06:42 -0400 (Thu, 17 Mar 2011) | 1 line
  
  Add a NPE guard
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/   (props changed)
    cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java

Propchange: cxf/branches/2.3.x-fixes/
            ('svn:mergeinfo' removed)

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Propchange: cxf/branches/2.3.x-fixes/rt/ws/security/
            ('svn:mergeinfo' removed)

Modified: cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java?rev=1084450&r1=1084449&r2=1084450&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Wed Mar 23 01:30:19 2011
@@ -799,7 +799,12 @@ public class STSClient implements Config
                 throw new Fault("No alias specified for retrieving PublicKey", LOG);
             }
         }
-        return crypto.getCertificates(alias)[0];
+
+        X509Certificate certs[] = crypto.getX509Certificates(alias);
+        if (certs == null || certs.length == 0) {
+            throw new Fault("Could not get X509Certificate for alias " + alias, LOG);
+        }
+        return certs[0];
     }
 
     private void addLifetime(XMLStreamWriter writer) throws XMLStreamException {



Mime
View raw message