Fix breakage in WinCNG backend caused by introducing libssh2_hmac_ctx_init.
The macro was defined to nothing for the libgcrypt backend, but not for WinCNG. This brings the latter into line with the former.
Этот коммит содержится в:
родитель
41d22ccf26
Коммит
aa7f9a85f7
@ -417,9 +417,9 @@ knownhost_check(LIBSSH2_KNOWNHOSTS *hosts,
|
|||||||
plain input to produce a hash to compare with the
|
plain input to produce a hash to compare with the
|
||||||
stored hash.
|
stored hash.
|
||||||
*/
|
*/
|
||||||
|
unsigned char hash[SHA_DIGEST_LENGTH];
|
||||||
libssh2_hmac_ctx ctx;
|
libssh2_hmac_ctx ctx;
|
||||||
libssh2_hmac_ctx_init(ctx);
|
libssh2_hmac_ctx_init(ctx);
|
||||||
unsigned char hash[SHA_DIGEST_LENGTH];
|
|
||||||
|
|
||||||
if(SHA_DIGEST_LENGTH != node->name_len) {
|
if(SHA_DIGEST_LENGTH != node->name_len) {
|
||||||
/* the name hash length must be the sha1 size or
|
/* the name hash length must be the sha1 size or
|
||||||
|
@ -149,6 +149,7 @@ typedef struct __libssh2_wincng_hash_ctx {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define libssh2_hmac_ctx _libssh2_wincng_hash_ctx
|
#define libssh2_hmac_ctx _libssh2_wincng_hash_ctx
|
||||||
|
#define libssh2_hmac_ctx_init(ctx)
|
||||||
#define libssh2_hmac_sha1_init(ctx, key, keylen) \
|
#define libssh2_hmac_sha1_init(ctx, key, keylen) \
|
||||||
_libssh2_wincng_hash_init(ctx, _libssh2_wincng.hAlgHmacSHA1, \
|
_libssh2_wincng_hash_init(ctx, _libssh2_wincng.hAlgHmacSHA1, \
|
||||||
SHA_DIGEST_LENGTH, key, keylen)
|
SHA_DIGEST_LENGTH, key, keylen)
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user