From dbcbeecb16d04c6ef704152a79546aba882a1a15 Mon Sep 17 00:00:00 2001 From: liangbowen Date: Thu, 18 May 2023 08:54:39 +0800 Subject: [PATCH] [KYUUBI #4850] Change default EC spec to secp521r1 for internal session variable signature ### _Why are the changes needed?_ - change the default EC spec from secp256k1 to secp521r1, as secp256k1 not supported on Java 17 ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4850 from bowenliang123/secp384r1. Closes #4850 73e0dad30 [liangbowen] change EC spec to secp521r1 5b9528ede [liangbowen] change EC spec to secp384r1 Authored-by: liangbowen Signed-off-by: liangbowen --- .../src/main/scala/org/apache/kyuubi/util/SignUtils.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/util/SignUtils.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/util/SignUtils.scala index 6f7ff18df..7fb4fde2e 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/util/SignUtils.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/util/SignUtils.scala @@ -27,7 +27,7 @@ object SignUtils { private lazy val ecKeyPairGenerator = { val g = KeyPairGenerator.getInstance(KEYPAIR_ALGORITHM_EC) - g.initialize(new ECGenParameterSpec("secp256k1"), new SecureRandom()) + g.initialize(new ECGenParameterSpec("secp521r1"), new SecureRandom()) g }