You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Chad DeBauch <cd...@gmail.com> on 2007/05/29 18:20:29 UTC

SignatureProcessor checkValidity exception wrapping issue

The following section of code in the verifyXMLSignature method of the
SignatureProcessor that checks the validity of the certificate by calling
checkValidity(), I believe should wrap the exceptions differently rather
then having the same exception be thrown in cases that you want to handle
CertificateExpiredException different then CertificateNotYetValidException.

if (certs != null) {
            try {
                certs[0].checkValidity();
            } catch (CertificateExpiredException e) {
                throw new WSSecurityException(
WSSecurityException.FAILED_CHECK,
                        "invalidCert");
            } catch (CertificateNotYetValidException e) {
                throw new WSSecurityException(
WSSecurityException.FAILED_CHECK,
                        "invalidCert");
            }
        }

Thanks,

Chad