changeset 12565:70c58495bbad

8187985: Broken certificate number in debug output Reviewed-by: weijun
author igerasim
date Tue, 02 Jan 2018 18:05:01 -0800
parents 39225a867e2b
children a0932d9f577d
files src/share/classes/sun/security/tools/keytool/Main.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/tools/keytool/Main.java	Tue Jan 02 08:53:48 2018 +0000
+++ b/src/share/classes/sun/security/tools/keytool/Main.java	Tue Jan 02 18:05:01 2018 -0800
@@ -2637,12 +2637,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();