Displaying 1 result from an estimated 1 matches for "ssh_digest_md5".
2014 Jul 15
2
missing HAVE_EVP_RIPEMD160 breaks ssh client
...s that ssh_digest_by_alg() couldn't verify alg with an index bigger than 1 since
the line with SSH_DIGEST_RIPEMD160 wasn't compiled in and all indexes in the ssh_digest digests array
was lowered by one.
/* NB. Indexed directly by algorithm number */
const struct ssh_digest digests[] = {
{ SSH_DIGEST_MD5, "MD5", 16, EVP_md5 },
#ifdef HAVE_EVP_RIPEMD160 /* XXX replace with local if missing */
{ SSH_DIGEST_RIPEMD160, "RIPEMD160", 20, EVP_ripemd160 },
#endif
{ SSH_DIGEST_SHA1, "SHA1", 20, EVP_sha1 },
...
Would it be worth to use enum instead of defined constants f...