Mercurial > dropbear
comparison signkey.c @ 1822:fa6ff07dcc77
signkey: remove !! from SHA1 digest (#130)
Remove the "!!" chars from message when printing the key-fingerprint, as it's
confusing users. They have been added when switching from MD5, but SHA1 can be
considered as standard today.
Signed-off-by: Sven Roederer <[email protected]>
author | Sven Roederer <devel-sven@geroedel.de> |
---|---|
date | Thu, 19 Aug 2021 17:39:31 +0200 |
parents | 064f5be2fc45 |
children | 35d504d59c05 |
comparison
equal
deleted
inserted
replaced
1821:df8d8ec1801c | 1822:fa6ff07dcc77 |
---|---|
566 | 566 |
567 /* "sha1!! hexfingerprinthere\0", each hex digit is "AB:" etc */ | 567 /* "sha1!! hexfingerprinthere\0", each hex digit is "AB:" etc */ |
568 buflen = 7 + 3*SHA1_HASH_SIZE; | 568 buflen = 7 + 3*SHA1_HASH_SIZE; |
569 ret = (char*)m_malloc(buflen); | 569 ret = (char*)m_malloc(buflen); |
570 | 570 |
571 strcpy(ret, "sha1!! "); | 571 strcpy(ret, "sha1 "); |
572 | 572 |
573 for (i = 0; i < SHA1_HASH_SIZE; i++) { | 573 for (i = 0; i < SHA1_HASH_SIZE; i++) { |
574 unsigned int pos = 7 + 3*i; | 574 unsigned int pos = 7 + 3*i; |
575 ret[pos] = hexdig(hash[i] >> 4); | 575 ret[pos] = hexdig(hash[i] >> 4); |
576 ret[pos+1] = hexdig(hash[i] & 0x0f); | 576 ret[pos+1] = hexdig(hash[i] & 0x0f); |