1
1
Wez Furlong 7a26697ede
wincng: use newer DH API for Windows 8.1+
Since Windows 1903 the approach used to perform DH kex with the CNG
API has been failing.

This commit switches to using the `DH` algorithm provider to perform
generation of the key pair and derivation of the shared secret.

It uses a feature of CNG that is not yet documented.  The sources of
information that I've found on this are:

* https://stackoverflow.com/a/56378698/149111
* 5d39011e63/mini/crypto/cng/dh.inl (L355)

With this change I am able to successfully connect from Windows 10 to my
ubuntu system.

Refs: https://github.com/alexcrichton/ssh2-rs/issues/122
Fixes: https://github.com/libssh2/libssh2/issues/388
Closes: https://github.com/libssh2/libssh2/pull/397
2020-07-06 20:46:48 +02:00
..
2009-06-04 18:20:29 +02:00
2019-07-01 10:00:09 -07:00
2019-03-20 14:21:38 +01:00
2010-12-30 00:09:53 +01:00
2019-03-20 14:21:38 +01:00
2018-03-12 11:08:21 +00:00
2015-03-12 22:48:38 +00:00
2018-03-12 11:08:21 +00:00
2019-07-01 10:00:09 -07:00
2013-10-16 23:23:26 +02:00
2019-03-20 14:21:38 +01:00
2019-03-20 14:21:38 +01:00
2019-07-01 10:00:09 -07:00