org.apache.ws.security.str.SignatureSTRParser throws 
ArrayIndexOutOfBoundsException: 0 when crypto returns zero-length array of 
certificates
--------------------------------------------------------------------------------------------------------------------------------------------

                 Key: WSS-324
                 URL: https://issues.apache.org/jira/browse/WSS-324
             Project: WSS4J
          Issue Type: Bug
          Components: WSS4J Handlers
    Affects Versions: 1.6.3
            Reporter: Marek Cyzio
            Assignee: Colm O hEigeartaigh
            Priority: Trivial


Line 191 and below:

            X509Certificate[] foundCerts = secRef.getX509IssuerSerial(crypto);
            if (foundCerts != null) {
                certs = new X509Certificate[]{foundCerts[0]};
            }

Should be:
            X509Certificate[] foundCerts = secRef.getX509IssuerSerial(crypto);
            if (foundCerts != null && foundCerts.length > 0) {
                certs = new X509Certificate[]{foundCerts[0]};
            }


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ws.apache.org
For additional commands, e-mail: dev-h...@ws.apache.org

Reply via email to