From 27316a860fc34c1da06de454a2dfe75bef5f77a5 Mon Sep 17 00:00:00 2001 From: John Jiang Date: Wed, 17 Apr 2024 11:13:18 +0800 Subject: [PATCH] TKSS-764: Backport JDK-8318340: Improve RSA key implementations --- .../kona/sun/security/rsa/RSAPrivateCrtKeyImpl.java | 8 -------- .../tencent/kona/sun/security/rsa/RSAPrivateKeyImpl.java | 8 -------- 2 files changed, 16 deletions(-) diff --git a/kona-crypto/src/main/java/com/tencent/kona/sun/security/rsa/RSAPrivateCrtKeyImpl.java b/kona-crypto/src/main/java/com/tencent/kona/sun/security/rsa/RSAPrivateCrtKeyImpl.java index 52f0654d..a4c999f3 100644 --- a/kona-crypto/src/main/java/com/tencent/kona/sun/security/rsa/RSAPrivateCrtKeyImpl.java +++ b/kona-crypto/src/main/java/com/tencent/kona/sun/security/rsa/RSAPrivateCrtKeyImpl.java @@ -299,14 +299,6 @@ public AlgorithmParameterSpec getParams() { return keyParams; } - // return a string representation of this key for debugging - @Override - public String toString() { - return "SunRsaSign " + type.keyAlgo + " private CRT key, " - + n.bitLength() + " bits" + "\n params: " + keyParams - + "\n modulus: " + n + "\n private exponent: " + d; - } - // utility method for parsing DER encoding of RSA private keys in PKCS#1 // format as defined in RFC 8017 Appendix A.1.2, i.e. SEQ of version, n, // e, d, p, q, pe, qe, and coeff, and return the parsed components. diff --git a/kona-crypto/src/main/java/com/tencent/kona/sun/security/rsa/RSAPrivateKeyImpl.java b/kona-crypto/src/main/java/com/tencent/kona/sun/security/rsa/RSAPrivateKeyImpl.java index ec96f311..988ba79d 100644 --- a/kona-crypto/src/main/java/com/tencent/kona/sun/security/rsa/RSAPrivateKeyImpl.java +++ b/kona-crypto/src/main/java/com/tencent/kona/sun/security/rsa/RSAPrivateKeyImpl.java @@ -137,14 +137,6 @@ public AlgorithmParameterSpec getParams() { return keyParams; } - // return a string representation of this key for debugging - @Override - public String toString() { - return "Sun " + type.keyAlgo + " private key, " + n.bitLength() - + " bits" + "\n params: " + keyParams + "\n modulus: " + n - + "\n private exponent: " + d; - } - /** * Restores the state of this object from the stream. *