1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-28 01:41:49 +03:00

Use LIBSSH2_HOSTKEY_HASH_SHA1 instead of _MD5 in examples and tests

MD5 support is optional and may not always be available, while SHA1 is both
required and recommended.
This commit is contained in:
Peter Stuge
2010-01-29 23:06:31 +01:00
parent 3ddac8ac66
commit 6df87e64b7
17 changed files with 34 additions and 34 deletions

View File

@ -161,9 +161,9 @@ int main(int argc, char *argv[])
* may have it hard coded, may go to a file, may present it to the
* user, that's your call
*/
fingerprint = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_MD5);
fingerprint = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_SHA1);
fprintf(stderr, "Fingerprint: ");
for(i = 0; i < 16; i++) {
for(i = 0; i < 20; i++) {
fprintf(stderr, "%02X ", (unsigned char)fingerprint[i]);
}
fprintf(stderr, "\n");