Displaying 1 result from an estimated 1 matches for "sshca_write".
2024 Oct 14
2
[RFC] Preferentially TOFU certificate authorities rather than host keys
...e_hash) {
if ((hashed_host = host_hash(lhost, NULL, 0)) == NULL) {
error_f("host_hash failed");
@@ -457,7 +460,9 @@ write_host_entry(FILE *f, const char *host, const char *ip,
}
free(hashed_host);
free(lhost);
- if ((r = sshkey_write(key, f)) == 0)
+ if ((cert && (r = sshca_write(key, f)) == 0))
+ success = 1;
+ else if ((r = sshkey_write(key, f) == 0))
success = 1;
else
error_fr(r, "sshkey_write");
diff --git a/sshconnect.c b/sshconnect.c
index 7cf6b6386..72bdc7d1f 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -964,7 +964,7 @@ check_host_key(char *host...