From 607300e550bd06e32875030797829977904d5a78 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 22 Dec 2019 00:39:05 +0100 Subject: badwolf.c: Improve TLS Error messages --- badwolf.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/badwolf.c b/badwolf.c index 2467ce4..1c94da4 100644 --- a/badwolf.c +++ b/badwolf.c @@ -330,26 +330,28 @@ detail_tls_certificate_flags(GTlsCertificateFlags tls_errors) { GString *errors = g_string_new(NULL); + g_string_append_printf(errors, _("Couldn't verify the TLS certificate to ensure a better security of the connection. You might want to verify your machine and network.\n\n")); + if(tls_errors & G_TLS_CERTIFICATE_UNKNOWN_CA) - g_string_append_printf(errors, _("The Certificate Authority is unknown.\n")); + g_string_append_printf(errors, _("Error: The X509 Certificate Authority is unknown.\n")); if(tls_errors & G_TLS_CERTIFICATE_BAD_IDENTITY) - g_string_append(errors, _("The given identity doesn't match the expected one.\n")); + g_string_append(errors, _("Error: The given identity doesn't match the expected one.\n")); if(tls_errors & G_TLS_CERTIFICATE_NOT_ACTIVATED) - g_string_append(errors, _("The certificate isn't valid yet.\n")); + g_string_append(errors, _("Error: The certificate isn't valid yet. Check your system's clock.\n")); if(tls_errors & G_TLS_CERTIFICATE_EXPIRED) - g_string_append(errors, _("The certificate has expired.\n")); + g_string_append(errors, _("Error: The certificate has expired. Check your system's clock.\n")); if(tls_errors & G_TLS_CERTIFICATE_REVOKED) - g_string_append(errors, _("The certificate has been revoked.\n")); + g_string_append(errors, _("Error: The certificate has been revoked.\n")); if(tls_errors & G_TLS_CERTIFICATE_INSECURE) - g_string_append(errors, _("The certificate is considered to be insecure.\n")); + g_string_append(errors, _("Error: The certificate is considered to be insecure.\n")); if(tls_errors & G_TLS_CERTIFICATE_GENERIC_ERROR) - g_string_append(errors, _("Some unknown error occurred validating the certificate\n")); + g_string_append(errors, _("Error: Some unknown error occurred validating the certificate.\n")); return g_string_free(errors, FALSE); } @@ -375,7 +377,7 @@ WebViewCb_load_failed_with_tls_errors(WebKitWebView *web_view, GTK_BUTTONS_NONE, _("TLS Error for %s."), failing_text); - gtk_dialog_add_buttons(GTK_DIALOG(dialog), _("Add Exception"), 1, _("Ignore"), 0, NULL); + gtk_dialog_add_buttons(GTK_DIALOG(dialog), _("Temporarly Add Exception"), 1, _("Continue"), 0, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), 0); gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s\n", error_details); -- cgit v1.3.1-26-gb76a