6664612: debug output leaked
authorweijun
Wed, 05 Mar 2008 22:16:06 +0800
changeset 77 41259df8c6e4
parent 76 87bd6df367b8
child 78 65353d0d0e31
6664612: debug output leaked Reviewed-by: valeriep
jdk/src/share/classes/sun/security/krb5/internal/ccache/CCacheInputStream.java
jdk/src/share/classes/sun/security/krb5/internal/crypto/dk/AesDkCrypto.java
jdk/src/share/classes/sun/security/krb5/internal/crypto/dk/ArcFourCrypto.java
--- a/jdk/src/share/classes/sun/security/krb5/internal/ccache/CCacheInputStream.java	Wed Mar 05 22:15:45 2008 +0800
+++ b/jdk/src/share/classes/sun/security/krb5/internal/ccache/CCacheInputStream.java	Wed Mar 05 22:16:06 2008 +0800
@@ -215,7 +215,9 @@
                 addrType = read(2);
                 addrLength = read(4);
                 if (!(addrLength == 4 || addrLength == 16)) {
-                    System.out.println("Incorrect address format.");
+                    if (DEBUG) {
+                        System.out.println("Incorrect address format.");
+                    }
                     return null;
                 }
                 byte[] result = new byte[addrLength];
--- a/jdk/src/share/classes/sun/security/krb5/internal/crypto/dk/AesDkCrypto.java	Wed Mar 05 22:15:45 2008 +0800
+++ b/jdk/src/share/classes/sun/security/krb5/internal/crypto/dk/AesDkCrypto.java	Wed Mar 05 22:16:06 2008 +0800
@@ -440,7 +440,9 @@
                 for (int i = 0; i < hashSize; i++) {
                     if (calculatedHmac[i] != ciphertext[hmacOffset+i]) {
                         cksumFailed = true;
-                        System.err.println("Checksum failed !");
+                        if (debug) {
+                            System.err.println("Checksum failed !");
+                        }
                         break;
                     }
                 }
--- a/jdk/src/share/classes/sun/security/krb5/internal/crypto/dk/ArcFourCrypto.java	Wed Mar 05 22:15:45 2008 +0800
+++ b/jdk/src/share/classes/sun/security/krb5/internal/crypto/dk/ArcFourCrypto.java	Wed Mar 05 22:16:06 2008 +0800
@@ -397,7 +397,9 @@
             for (int i = 0; i < hashSize; i++) {
                 if (calculatedHmac[i] != ciphertext[i]) {
                     cksumFailed = true;
-                    System.err.println("Checksum failed !");
+                    if (debug) {
+                        System.err.println("Checksum failed !");
+                    }
                     break;
                 }
             }