cgmnlm

colorful gemini line mode browser
git clone https://git.clttr.info/cgmnlm.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit 4a04bdc01c9a1036865b6a171a696069e754b336
parent def47c8b04aacc2074e6f65d3b7ebeb65dee927c
Author: René Wagner <rwa@clttr.info>
Date:   Sun, 27 Aug 2023 13:08:16 +0200

only show untrusted cert message when -j is not set to trust

Diffstat:
Msrc/gmni.c | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/gmni.c b/src/gmni.c @@ -83,11 +83,13 @@ tofu_callback(enum tofu_error error, const char *fingerprint, } break; case TOFU_UNTRUSTED_CERT: - fprintf(stderr, - "The certificate offered by this server is of unknown trust. " - "Its fingerprint is: \n" - "%s\n\n" - "Use '-j once' to trust temporarily, or '-j always' to add to the trust store.\n", fingerprint); + if (action != TOFU_TRUST_ONCE && action != TOFU_TRUST_ALWAYS) { + fprintf(stderr, + "The certificate offered by this server is of unknown trust. " + "Its fingerprint is: \n" + "%s\n\n" + "Use '-j once' to trust temporarily, or '-j always' to add to the trust store.\n", fingerprint); + } break; case TOFU_FINGERPRINT_MISMATCH: fprintf(stderr,