File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
prov/src/main/java/org/bouncycastle/jce/provider Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -73,13 +73,15 @@ static OCSPResponse getOcspResponse(
7373 ResponseData responseData = ResponseData .getInstance (basicResp .getTbsResponseData ());
7474
7575 ASN1Sequence s = responseData .getResponses ();
76+ boolean matchFound = false ;
7677
7778 for (int i = 0 ; i != s .size (); i ++)
7879 {
7980 SingleResponse resp = SingleResponse .getInstance (s .getObjectAt (i ));
8081
8182 if (certID .equals (resp .getCertID ()))
8283 {
84+ matchFound = true ;
8385 ASN1GeneralizedTime nextUp = resp .getNextUpdate ();
8486 try
8587 {
@@ -97,9 +99,18 @@ static OCSPResponse getOcspResponse(
9799 }
98100 }
99101 }
100- if (response != null )
102+
103+ if (matchFound )
104+ {
105+ if (response != null )
106+ {
107+ return response ;
108+ }
109+ }
110+ else
101111 {
102- return response ;
112+ // this should also never happen, however...
113+ responseMap .remove (certID );
103114 }
104115 }
105116 }
You can’t perform that action at this time.
0 commit comments