[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 <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
This commit is contained in:
liangbowen 2023-05-18 08:54:39 +08:00
parent b8ee006ca4
commit dbcbeecb16

View File

@ -27,7 +27,7 @@ object SignUtils {
private lazy val ecKeyPairGenerator = { private lazy val ecKeyPairGenerator = {
val g = KeyPairGenerator.getInstance(KEYPAIR_ALGORITHM_EC) val g = KeyPairGenerator.getInstance(KEYPAIR_ALGORITHM_EC)
g.initialize(new ECGenParameterSpec("secp256k1"), new SecureRandom()) g.initialize(new ECGenParameterSpec("secp521r1"), new SecureRandom())
g g
} }