8187985: Broken certificate number in debug output
authorigerasim
Sun, 03 Dec 2017 01:47:23 -0800
changeset 48050 b1993e334da1
parent 48049 fd53d07dade6
child 48051 0b42613e35bf
8187985: Broken certificate number in debug output Reviewed-by: weijun
src/java.base/share/classes/sun/security/tools/keytool/Main.java
--- a/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Sat Dec 02 18:37:45 2017 -0800
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Sun Dec 03 01:47:23 2017 -0800
@@ -2746,12 +2746,12 @@
                     if (rfc) {
                         dumpCert(cert, out);
                     } else {
-                        out.println("Certificate #" + i++);
+                        out.println("Certificate #" + i);
                         out.println("====================================");
                         printX509Cert((X509Certificate)cert, out);
                         out.println();
                     }
-                    checkWeak(oneInMany(rb.getString("the.certificate"), i, chain.size()), cert);
+                    checkWeak(oneInMany(rb.getString("the.certificate"), i++, chain.size()), cert);
                 } catch (Exception e) {
                     if (debug) {
                         e.printStackTrace();