mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-12 07:58:43 +00:00
6915939: Exception should be thrown if OCSP SingleResponses contain unresolved critical extensions
Reviewed-by: xuelei
This commit is contained in:
parent
74703b4493
commit
60fa841f74
@ -574,10 +574,18 @@ public final class OCSPResponse {
|
||||
(singleExtDer.length);
|
||||
for (int i = 0; i < singleExtDer.length; i++) {
|
||||
Extension ext = new Extension(singleExtDer[i]);
|
||||
singleExtensions.put(ext.getId(), ext);
|
||||
if (DEBUG != null) {
|
||||
DEBUG.println("OCSP single extension: " + ext);
|
||||
}
|
||||
// We don't support any extensions yet. Therefore, if it
|
||||
// is critical we must throw an exception because we
|
||||
// don't know how to process it.
|
||||
if (ext.isCritical()) {
|
||||
throw new IOException(
|
||||
"Unsupported OCSP critical extension: " +
|
||||
ext.getExtensionId());
|
||||
}
|
||||
singleExtensions.put(ext.getId(), ext);
|
||||
}
|
||||
} else {
|
||||
singleExtensions = Collections.emptyMap();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user