From a7fb08c286f0181a3bb725b88a7da8c651202be0 Mon Sep 17 00:00:00 2001 From: Zdenek Zambersky Date: Tue, 14 Mar 2023 18:32:07 +0000 Subject: [PATCH] 8293815: P11PSSSignature.engineUpdate should not print debug messages during normal operation Backport-of: 80615a6f39bf8929908804ce3f9f5c6d4b3f2864 --- .../classes/sun/security/pkcs11/P11PSSSignature.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jdk/src/share/classes/sun/security/pkcs11/P11PSSSignature.java b/jdk/src/share/classes/sun/security/pkcs11/P11PSSSignature.java index 4391adfc737..191f417ed2b 100644 --- a/jdk/src/share/classes/sun/security/pkcs11/P11PSSSignature.java +++ b/jdk/src/share/classes/sun/security/pkcs11/P11PSSSignature.java @@ -501,10 +501,10 @@ protected void engineUpdate(byte[] b, int ofs, int len) case T_UPDATE: try { if (mode == M_SIGN) { - System.out.println(this + ": Calling C_SignUpdate"); + if (DEBUG) System.out.println(this + ": Calling C_SignUpdate"); token.p11.C_SignUpdate(session.id(), 0, b, ofs, len); } else { - System.out.println(this + ": Calling C_VerfifyUpdate"); + if (DEBUG) System.out.println(this + ": Calling C_VerfifyUpdate"); token.p11.C_VerifyUpdate(session.id(), 0, b, ofs, len); } bytesProcessed += len; @@ -550,11 +550,11 @@ protected void engineUpdate(ByteBuffer byteBuffer) { int ofs = byteBuffer.position(); try { if (mode == M_SIGN) { - System.out.println(this + ": Calling C_SignUpdate"); + if (DEBUG) System.out.println(this + ": Calling C_SignUpdate"); token.p11.C_SignUpdate (session.id(), addr + ofs, null, 0, len); } else { - System.out.println(this + ": Calling C_VerifyUpdate"); + if (DEBUG) System.out.println(this + ": Calling C_VerifyUpdate"); token.p11.C_VerifyUpdate (session.id(), addr + ofs, null, 0, len); }