Make SHA1 optional, implement SHA256 fingerprints

SHA256 is always compiled and only enable SHA1 when needed. Fingerprints
are always SHA256: base64 format, md5 and sha1 are removed. dbrandom now
uses sha256 its hash function.
This commit is contained in:
Matt Johnston
2022-03-30 11:44:04 +08:00
parent 6dc029f2cb
commit 8b68eb55d9
8 changed files with 62 additions and 120 deletions

View File

@@ -341,7 +341,7 @@ static void printpubkey(sign_key * key, int keytype) {
err = base64_encode(buf_getptr(buf, len), len, base64key, &base64len);
if (err != CRYPT_OK) {
fprintf(stderr, "base64 failed");
dropbear_exit("base64 failed");
}
typestring = signkey_name_from_type(keytype, NULL);