diff --git a/src/gmnlm.c b/src/gmnlm.c
index 930ab19abe717b186070151a184b2a8e98542f77..1292bb6b8f526f923e9783ba8c0a014c2743af05 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -1106,7 +1106,7 @@ "=> ", host, fingerprint);
free(host);
break;
case TOFU_FINGERPRINT_MISMATCH:
- snprintf(prompt, sizeof(prompt),
+ fprintf(browser->tty,
"The certificate offered by this server DOES NOT MATCH the one we have on file.\n"
"/!\\ Someone may be eavesdropping on or manipulating this connection. /!\\\n"
"The unknown certificate's fingerprint is:\n"
diff --git a/src/tofu.c b/src/tofu.c
index ba5493352968b563ad76e0ecd25bab6370d2f6e5..48395c08cdbf68b31c5defd15b360f1eb2897a3f 100644
--- a/src/tofu.c
+++ b/src/tofu.c
@@ -188,6 +188,7 @@ if (!f) {
return;
}
n = 0;
+ int lineno = 1;
char *line = NULL;
while (getline(&line, &n, f) != -1) {
struct known_host *host = calloc(1, sizeof(struct known_host));
@@ -210,6 +211,8 @@
tok = strtok(NULL, " ");
assert(tok);
host->expires = strtoul(tok, NULL, 10);
+
+ host->lineno = lineno++;
host->next = tofu->known_hosts;
tofu->known_hosts = host;