From 79ed1bc601d20c14d4b514abecdebcf454baf322 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 26 Aug 2011 23:13:57 +0200 Subject: pki: Handle hash correctly. Looks like only DSA in grypt needs a leading zero to mark the has as positive. See http://lists.gnupg.org/pipermail/gcrypt-devel/2005-February/000754.html --- include/libssh/pki_priv.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/libssh/pki_priv.h b/include/libssh/pki_priv.h index b6d312b9..f90d7c86 100644 --- a/include/libssh/pki_priv.h +++ b/include/libssh/pki_priv.h @@ -59,12 +59,13 @@ int pki_signature_verify(ssh_session session, const ssh_signature sig, const ssh_key key, const unsigned char *hash, - size_t len); + size_t hlen); /* SSH Signing Functions */ ssh_signature pki_do_sign(const ssh_key privkey, const unsigned char *hash, size_t hlen); ssh_signature pki_do_sign_sessionid(const ssh_key key, - const unsigned char *hash); + const unsigned char *hash, + size_t hlen); #endif /* PKI_PRIV_H_ */ -- cgit