Author: ruchithf
Date: Thu Apr 17 07:51:31 2008
New Revision: 649134
URL: http://svn.apache.org/viewvc?rev=649134&view=rev
Log:
Fix for WSS-52
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandler.java
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandler.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandler.java?rev=649134&r1=649133&r2=649134&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandler.java
(original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandler.java
Thu Apr 17 07:51:31 2008
@@ -1036,6 +1036,19 @@
throw new WSSecurityException("WSHandler: Could not get
certificates for alias " + alias);
}
+ // Form a certificate chain from the transmitted certificate
+ // and the certificate(s) of the issuer from the keystore
+ // First, create new array
+ X509Certificate[] x509certs = new X509Certificate[certs.length +
1];
+ // Then add the first certificate ...
+ x509certs[0] = cert;
+ // ... and the other certificates
+ for (int j = 0; j < certs.length; j++) {
+ cert = certs[j];
+ x509certs[j + 1] = cert;
+ }
+ certs = x509certs;
+
// Use the validation method from the crypto to check whether the
subjects certificate was really signed by the issuer stated in the certificate
try {
if (reqData.getSigCrypto().validateCertPath(certs)) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]