| | |
| | | lastRefusedChain = chain; |
| | | lastRefusedAuthType = authType; |
| | | lastRefusedCause = Cause.NOT_TRUSTED; |
| | | throw ce; |
| | | OpendsCertificationException e = new OpendsCertificationException( |
| | | chain); |
| | | e.initCause(ce); |
| | | throw e; |
| | | } |
| | | |
| | | if (!explicitlyAccepted) |
| | |
| | | lastRefusedChain = chain; |
| | | lastRefusedAuthType = authType; |
| | | lastRefusedCause = Cause.HOST_NAME_MISMATCH; |
| | | throw ce; |
| | | OpendsCertificationException e = new OpendsCertificationException( |
| | | chain); |
| | | e.initCause(ce); |
| | | throw e; |
| | | } |
| | | } |
| | | } |
| | |
| | | lastRefusedChain = chain; |
| | | lastRefusedAuthType = authType; |
| | | lastRefusedCause = Cause.NOT_TRUSTED; |
| | | throw ce; |
| | | OpendsCertificationException e = new OpendsCertificationException(chain); |
| | | e.initCause(ce); |
| | | throw e; |
| | | } |
| | | |
| | | if (!explicitlyAccepted) |
| | |
| | | lastRefusedChain = chain; |
| | | lastRefusedAuthType = authType; |
| | | lastRefusedCause = Cause.HOST_NAME_MISMATCH; |
| | | throw ce; |
| | | OpendsCertificationException e = new OpendsCertificationException( |
| | | chain); |
| | | e.initCause(ce); |
| | | throw e; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | if (!found) |
| | | { |
| | | throw new CertificateException( |
| | | "Certificate not in list of accepted certificates"); |
| | | throw new OpendsCertificationException( |
| | | "Certificate not in list of accepted certificates", chain); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (!matches) |
| | | { |
| | | throw new CertificateException("Hostname mismatch between host name "+ |
| | | host+" and subject DN: "+chain[0].getSubjectX500Principal()); |
| | | throw new OpendsCertificationException( |
| | | "Hostname mismatch between host name " + host |
| | | + " and subject DN: " + chain[0].getSubjectX500Principal(), |
| | | chain); |
| | | } |
| | | } |
| | | } |