jdk/src/share/classes/sun/security/tools/KeyTool.java
changeset 2179 e172c13ca87a
parent 2067 6f9db5f305cd
child 2289 99207c64bf80
--- a/jdk/src/share/classes/sun/security/tools/KeyTool.java	Wed Mar 04 09:26:41 2009 -0800
+++ b/jdk/src/share/classes/sun/security/tools/KeyTool.java	Thu Mar 05 14:49:55 2009 +0800
@@ -1910,7 +1910,9 @@
             ObjectIdentifier oid = attr.getAttributeId();
             if (oid.equals(PKCS9Attribute.EXTENSION_REQUEST_OID)) {
                 CertificateExtensions exts = (CertificateExtensions)attr.getAttributeValue();
-                printExtensions(rb.getString("Extension Request:"), exts, out);
+                if (exts != null) {
+                    printExtensions(rb.getString("Extension Request:"), exts, out);
+                }
             } else {
                 out.println(attr.getAttributeId());
                 out.println(attr.getAttributeValue());
@@ -2495,7 +2497,9 @@
                                                            X509CertImpl.INFO);
             CertificateExtensions exts = (CertificateExtensions)
                     certInfo.get(X509CertInfo.EXTENSIONS);
-            printExtensions(rb.getString("Extensions: "), exts, out);
+            if (exts != null) {
+                printExtensions(rb.getString("Extensions: "), exts, out);
+            }
         }
     }