mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-21 14:00:51 +03:00
wincng: do not disable key validation that can be enabled
The modular exponentiation also works with key validation enabled.
This commit is contained in:
@@ -1982,9 +1982,7 @@ _libssh2_wincng_bignum_mod_exp(_libssh2_bn *r,
|
|||||||
memcpy(key + offset, m->bignum, m->length);
|
memcpy(key + offset, m->bignum, m->length);
|
||||||
|
|
||||||
ret = BCryptImportKeyPair(_libssh2_wincng.hAlgRSA, NULL,
|
ret = BCryptImportKeyPair(_libssh2_wincng.hAlgRSA, NULL,
|
||||||
BCRYPT_RSAPUBLIC_BLOB, &hKey, key, keylen,
|
BCRYPT_RSAPUBLIC_BLOB, &hKey, key, keylen, 0);
|
||||||
BCRYPT_NO_KEY_VALIDATION);
|
|
||||||
|
|
||||||
if(BCRYPT_SUCCESS(ret)) {
|
if(BCRYPT_SUCCESS(ret)) {
|
||||||
ret = BCryptEncrypt(hKey, a->bignum, a->length, NULL, NULL, 0,
|
ret = BCryptEncrypt(hKey, a->bignum, a->length, NULL, NULL, 0,
|
||||||
NULL, 0, &length, BCRYPT_PAD_NONE);
|
NULL, 0, &length, BCRYPT_PAD_NONE);
|
||||||
|
|||||||
Reference in New Issue
Block a user