Signed-off-by: Łukasz Stelmach <stlman@poczta.fm>
flag = {
name = strict-tofu;
- descrip = "Fail to connect if a known certificate has changed";
+ descrip = "Fail to connect if a certificate is unknown or a known certificate has changed";
disabled;
disable = "no";
- doc = "This option will perform authentication as with option --tofu; however, while --tofu asks whether to trust a changed public key, this option will fail in case of public key changes.";
+ doc = "This option will perform authentication as with option --tofu; however, no questions shall be asked whatsoever, neither to accept an unknown certificate nor a changed one.";
+
};
flag = {
"Its certificate is valid for %s.\n",
hostname);
+ if (strictssh)
+ return -1;
+
rc = read_yesno
("Are you sure you want to trust it? (y/N): ");
if (rc == 0)
"Its certificate is valid for %s.\n",
hostname);
- if (strictssh == 0) {
- rc = read_yesno
- ("Do you trust the received key? (y/N): ");
- if (rc == 0)
- return -1;
- } else return -1;
+ if (strictssh)
+ return -1;
+ rc = read_yesno
+ ("Do you trust the received key? (y/N): ");
+ if (rc == 0)
+ return -1;
} else if (rc < 0) {
fprintf(stderr,
"gnutls_verify_stored_pubkey: %s\n",