mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-20 02:42:09 +03:00
kex: do not ignore failure of libssh2_sha1_init()
Based upon 43b730ce56.
Fixes ticket 290. Thanks for the suggestion, mstrsn.
This commit is contained in:
@@ -107,6 +107,8 @@
|
||||
#define _libssh2_random(buf, len) RAND_bytes ((buf), (len))
|
||||
|
||||
#define libssh2_sha1_ctx EVP_MD_CTX
|
||||
|
||||
/* returns 0 in case of failure */
|
||||
int libssh2_sha1_init(libssh2_sha1_ctx *ctx);
|
||||
#define libssh2_sha1_update(ctx, data, len) EVP_DigestUpdate(&(ctx), data, len)
|
||||
#define libssh2_sha1_final(ctx, out) EVP_DigestFinal(&(ctx), out, NULL)
|
||||
|
||||
Reference in New Issue
Block a user