diff --git a/ant/jdk13.xml b/ant/jdk13.xml
index 74ad1e18b5..68fcd4af4c 100644
--- a/ant/jdk13.xml
+++ b/ant/jdk13.xml
@@ -111,8 +111,8 @@
-
+
@@ -246,6 +246,7 @@
+
diff --git a/ant/jdk14.xml b/ant/jdk14.xml
index 32916cc908..f0037ed388 100644
--- a/ant/jdk14.xml
+++ b/ant/jdk14.xml
@@ -70,7 +70,7 @@
-
+
@@ -175,6 +175,7 @@
+
diff --git a/build1-1 b/build1-1
index 1106236e2e..258b7d70cf 100644
--- a/build1-1
+++ b/build1-1
@@ -102,8 +102,9 @@ find $jdk11src -name "*.java" -exec scripts/useseccert.sh \{\} \;
rm -f org/bouncycastle/jce/provider/PKIXCertPathBuilderSpi_8.java
rm -f org/bouncycastle/jce/provider/WrappedRevocationChecker.java
rm -f org/bouncycastle/jce/provider/ProvRevocationChecker.java
- rm -f org/bouncycastle/jce/provider/OcspCache.java
rm -f org/bouncycastle/jce/provider/ProvOcspRevocationChecker.java
+ rm -f org/bouncycastle/jce/provider/OcspResponseManager.java
+ rm -f org/bouncycastle/jce/provider/test/OcspResponseManagerTest.java
rm -rf org/bouncycastle/i18n/filter/test
rm -rf org/bouncycastle/math/ec/test
rm -rf org/bouncycastle/jce/provider/test/ECEncodingTest.java
diff --git a/build1-2 b/build1-2
index 144b0d0a60..23b4705c9a 100644
--- a/build1-2
+++ b/build1-2
@@ -182,8 +182,9 @@ find $jdk12src -name "*.java" -exec scripts/usejcecert.sh \{\} \;
rm -f org/bouncycastle/jce/provider/PKIXCertPathBuilderSpi_8.java
rm -f org/bouncycastle/jce/provider/WrappedRevocationChecker.java
rm -f org/bouncycastle/jce/provider/ProvRevocationChecker.java
- rm -f org/bouncycastle/jce/provider/OcspCache.java
rm -f org/bouncycastle/jce/provider/ProvOcspRevocationChecker.java
+ rm -f org/bouncycastle/jce/provider/OcspResponseManager.java
+ rm -f org/bouncycastle/jce/provider/test/OcspResponseManagerTest.java
rm -rf org/bouncycastle/x509/PKIXAttrCert*.java
rm -rf org/bouncycastle/jce/provider/RFC3281*.java
rm -rf org/bouncycastle/jcajce/PKCS12StoreParameter.java
diff --git a/docs/releasenotes.html b/docs/releasenotes.html
index d3f60c7e14..aa6f4f018d 100644
--- a/docs/releasenotes.html
+++ b/docs/releasenotes.html
@@ -24,10 +24,13 @@ 2.0 Release History
2.1.2 Defects Fixed
- Leading zeroes were sometimes dropped from Ed25519 signatures leading to verification errors in the PGP API. This has been fixed.
+- Issue when getting BC ProvRevocationChecker (engineGetRevocationChecker), then adding it to the PKIXBuilderParams from the client, causing the ProvOcspRevocationChecker to have an old "parent" reference without ocspResponses added.
2.1.3 Additional Features and Functionality
- BCJSSE: Added support for security property "jdk.tls.server.defaultDHEParameters" (disabled in FIPS mode).
+- BCJSSE: Support has been added for server-side OCSP stapling (status_request and status_request_v2) for TLSv1.2 and TLSv1.3 during TLS handshake.
+- New property has been added (org.bouncycastle.prov.revocation.checker.no-fallback) to complement RevocationChecker's NO_FALLBACK option.
2.2.1 Version
@@ -100,6 +103,9 @@ 2.3.5 Security Advisories.
CVE-2024-30171 - Possible timing based leakage in RSA based handshakes due to exception processing eliminated.
CVE-2024-30172 - Crafted signature and public key can be used to trigger an infinite loop in the Ed25519 verification code.
CVE-2024-34447 - When endpoint identification is enabled in the BCJSSE and an SSL socket is not created with an explicit hostname (as happens with HttpsURLConnection), hostname verification could be performed against a DNS-resolved IP address. This has been fixed.
+BCJSSE: For OCSP server stapling to be enabled, the property jdk.tls.server.enableStatusRequestExtension must be
+set to true. Other properties that control stapling are also available: jdk.tls.server.[cacheSize | cacheLifetime
+| responseTimeout | responderURI | responderOverride | ignoreExtensions]
2.4.1 Version
diff --git a/prov/src/main/java/org/bouncycastle/jce/provider/OcspCache.java b/prov/src/main/java/org/bouncycastle/jce/provider/OcspCache.java
deleted file mode 100644
index 06817817d9..0000000000
--- a/prov/src/main/java/org/bouncycastle/jce/provider/OcspCache.java
+++ /dev/null
@@ -1,234 +0,0 @@
-package org.bouncycastle.jce.provider;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.lang.ref.WeakReference;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.security.cert.CertPathValidatorException;
-import java.security.cert.Extension;
-import java.security.cert.X509Certificate;
-import java.text.ParseException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-import org.bouncycastle.asn1.ASN1EncodableVector;
-import org.bouncycastle.asn1.ASN1GeneralizedTime;
-import org.bouncycastle.asn1.ASN1ObjectIdentifier;
-import org.bouncycastle.asn1.ASN1OctetString;
-import org.bouncycastle.asn1.ASN1Sequence;
-import org.bouncycastle.asn1.DERSequence;
-import org.bouncycastle.asn1.ocsp.BasicOCSPResponse;
-import org.bouncycastle.asn1.ocsp.CertID;
-import org.bouncycastle.asn1.ocsp.OCSPObjectIdentifiers;
-import org.bouncycastle.asn1.ocsp.OCSPRequest;
-import org.bouncycastle.asn1.ocsp.OCSPResponse;
-import org.bouncycastle.asn1.ocsp.OCSPResponseStatus;
-import org.bouncycastle.asn1.ocsp.Request;
-import org.bouncycastle.asn1.ocsp.ResponseBytes;
-import org.bouncycastle.asn1.ocsp.ResponseData;
-import org.bouncycastle.asn1.ocsp.SingleResponse;
-import org.bouncycastle.asn1.ocsp.TBSRequest;
-import org.bouncycastle.asn1.x509.Extensions;
-import org.bouncycastle.jcajce.PKIXCertRevocationCheckerParameters;
-import org.bouncycastle.jcajce.util.JcaJceHelper;
-import org.bouncycastle.util.io.Streams;
-
-class OcspCache
-{
- private static final int DEFAULT_TIMEOUT = 15000;
- private static final int DEFAULT_MAX_RESPONSE_SIZE = 32 * 1024;
-
- private static Map>> cache
- = Collections.synchronizedMap(new WeakHashMap>>());
-
- static OCSPResponse getOcspResponse(
- CertID certID, PKIXCertRevocationCheckerParameters parameters,
- URI ocspResponder, X509Certificate responderCert, List ocspExtensions,
- JcaJceHelper helper)
- throws CertPathValidatorException
- {
- Map responseMap = null;
-
- WeakReference