diff -r fd53d07dade6 -r b1993e334da1 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();