mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Remove "catch (FooException e); throwIfInstanceOf(e, FooException.class)" and just let the FooException propagate naturally.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=124847480
This commit is contained in:
parent
c70d167a99
commit
cc01035fe8
1 changed files with 1 additions and 7 deletions
|
@ -33,7 +33,6 @@ import java.security.GeneralSecurityException;
|
|||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.cert.CRLException;
|
||||
import java.security.cert.CertificateEncodingException;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.CertificateFactory;
|
||||
import java.security.cert.CertificateParsingException;
|
||||
|
@ -140,12 +139,7 @@ public final class X509Utils {
|
|||
X509Certificate rootCert, X509CRL crl, @Tainted X509Certificate cert, Date now)
|
||||
throws GeneralSecurityException {
|
||||
cert.checkValidity(checkNotNull(now, "now"));
|
||||
try {
|
||||
cert.verify(rootCert.getPublicKey());
|
||||
} catch (CertificateException e) {
|
||||
propagateIfInstanceOf(e, CertificateException.class);
|
||||
throw new CertificateEncodingException(e); // Coercion by specification.
|
||||
}
|
||||
cert.verify(rootCert.getPublicKey());
|
||||
if (crl.isRevoked(cert)) {
|
||||
X509CRLEntry entry = crl.getRevokedCertificate(cert);
|
||||
throw new CertificateRevokedException(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue