v12.2.4
·
50 commits
to master
since this release
- Added new entries to
EMessageDigestAlgorithmfor the message digest algorithms guaranteed to be available on every Java 17+ runtime via the SUN provider:SHA_512_224(SHA-512/224),SHA_512_256(SHA-512/256),SHA3_224(SHA3-224),SHA3_256(SHA3-256),SHA3_384(SHA3-384) andSHA3_512(SHA3-512). - Hardened the CRL download path used by
AbstractRevocationCheckBuilder:IURLDownloader.createDefault()now sets a connect timeout of 10 seconds and a read timeout of 60 seconds. Previously no timeouts were configured, so a slow or unreachable CRL distribution point could block revocation checks indefinitely.- Added
IURLDownloader.createDefault(int nConnectTimeoutMS, int nReadTimeoutMS)to override the defaults, plus the new constantsDEFAULT_CONNECT_TIMEOUT_MSandDEFAULT_READ_TIMEOUT_MS. - Added new class
CRLAllowListwith case-insensitive prefix matching to restrict which CRL distribution point URLs may be downloaded. Mitigates SSRF and unbounded-download risk against attacker-controlled certificates. An empty allow list keeps the legacy behavior of allowing every HTTP(S) URL. CRLDownloadernow exposesallowList()and consults it before each download. Refused URLs are logged with a warning. Non-HTTP/HTTPS URLs are now also logged with a warning instead of being dropped silently.
AbstractRevocationCheckBuilder.build()no longer returnsERevoked.REVOKEDwhen CRL retrieval fails. Previously a missing CRL (e.g. unreachable distribution point) was indistinguishable from a real revocation, which could wrongly block valid certificates during a CRL endpoint outage. The check now returns the newERevoked.UNKNOWNvalue instead. The detection covers both directly observable CRL download failures (every distribution point of the certificate returnednull) and the JDK-levelCertPathValidatorExceptionwith reasonUNDETERMINED_REVOCATION_STATUS.- Added new enum value
ERevoked.UNKNOWNwithisRevoked()returningfalse(so existing callers do not start treating unverified certificates as revoked) and a newisUnknown()accessor. - Added default methods
IRevokedIndicator.isUnknown()andIRevokedIndicator.isKnown()so callers can distinguish "verified not revoked" from "could not be verified". - Propagated the
UNKNOWNrevocation state through the higher-level certificate check API. Previously a CRL download failure would silently surface asECertificateCheckResult.VALIDwhen revocation caching was enabled, because the cache only exposed aboolean isRevokedview.- Added new enum value
ECertificateCheckResult.REVOCATION_STATUS_UNKNOWNwithisValid()returningfalse. - Added new method
RevocationCheckResultCache.getRevocationStatus(X509Certificate)returning the fullERevokedstatus. The existingisRevoked(X509Certificate)is preserved and now delegates to it. CertificateHelper.checkCertificateandTrustedCAChecker.checkCertificatenow returnREVOCATION_STATUS_UNKNOWNwhenever the underlying revocation check could not determine the certificate status.
- Added new enum value
Full Changelog: ph-commons-parent-pom-12.2.3...ph-commons-parent-pom-12.2.4