Merge
authormullan
Fri, 15 Jan 2010 09:58:48 -0500
changeset 4674 e842c85ac8f4
parent 4672 ca386fa28a62 (current diff)
parent 4673 1536565aebcc (diff)
child 4675 68f287672813
Merge
--- a/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java	Thu Jan 14 20:05:19 2010 -0800
+++ b/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java	Fri Jan 15 09:58:48 2010 -0500
@@ -574,10 +574,18 @@
                             (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();