mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-14 07:10:09 +08:00
Test ECDH keyPair before success
This commit is contained in:
parent
8b24b08c3d
commit
606879cba1
@ -46,6 +46,7 @@ actual class ECDH actual constructor(actual val keyPair: ECDHKeyPair) {
|
||||
init {
|
||||
if (kotlin.runCatching {
|
||||
Security.addProvider(BouncyCastleProvider())
|
||||
generateKeyPair() // try if it is working
|
||||
}.exceptionOrNull() == null) {
|
||||
isECDHAvailable = true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user