ソースを参照

Test ECDH keyPair before success

Him188 6 年 前
コミット
606879cba1

+ 1 - 0
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/utils/cryptor/ECDHJvm.kt

@@ -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
             }