From cc00ece962b691bf56a13ddafb2a6edd4414c11c Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Sun, 14 Jun 2020 19:34:18 +0200 Subject: [PATCH] wincng: do not disable key validation that can be enabled The modular exponentiation also works with key validation enabled. --- src/wincng.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wincng.c b/src/wincng.c index 4af9a58..079fbbc 100755 --- a/src/wincng.c +++ b/src/wincng.c @@ -1982,9 +1982,7 @@ _libssh2_wincng_bignum_mod_exp(_libssh2_bn *r, memcpy(key + offset, m->bignum, m->length); ret = BCryptImportKeyPair(_libssh2_wincng.hAlgRSA, NULL, - BCRYPT_RSAPUBLIC_BLOB, &hKey, key, keylen, - BCRYPT_NO_KEY_VALIDATION); - + BCRYPT_RSAPUBLIC_BLOB, &hKey, key, keylen, 0); if(BCRYPT_SUCCESS(ret)) { ret = BCryptEncrypt(hKey, a->bignum, a->length, NULL, NULL, 0, NULL, 0, &length, BCRYPT_PAD_NONE);