diff options
author | Jeremy Henty <onepoint@starurchin.org> | 2012-12-10 02:00:04 +0000 |
---|---|---|
committer | Jeremy Henty <onepoint@starurchin.org> | 2012-12-10 02:00:04 +0000 |
commit | 9beee9d57a90c27444889e76f85205499694263c (patch) | |
tree | bae7955b19e106caea4feea63d3e7b7429bcc357 /dpi/https.c | |
parent | 6675d229bcee77341ef46ec3c2252f2dee52ac66 (diff) |
Use titles with dpip dialogs.
Diffstat (limited to 'dpi/https.c')
-rw-r--r-- | dpi/https.c | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/dpi/https.c b/dpi/https.c index c2becdae..389c608d 100644 --- a/dpi/https.c +++ b/dpi/https.c @@ -434,8 +434,9 @@ static int handle_certificate_problem(SSL * ssl_connection) if (remote_cert == NULL){ /*Inform user that remote system cannot be trusted*/ d_cmd = a_Dpip_build_cmd( - "cmd=%s msg=%s alt1=%s alt2=%s", + "cmd=%s title=%s msg=%s alt1=%s alt2=%s", "dialog", + "Dillo HTTPS: No certificate!", "The remote system is NOT presenting a certificate.\n" "This site CAN NOT be trusted. Sending data is NOT SAFE.\n" "What do I do?", @@ -477,8 +478,10 @@ static int handle_certificate_problem(SSL * ssl_connection) msg = dStrconcat("The remote certificate is self-signed and " "untrusted.\nFor address: ", buf, NULL); d_cmd = a_Dpip_build_cmd( - "cmd=%s msg=%s alt1=%s alt2=%s alt3=%s", - "dialog", msg, "Continue", "Cancel", "Save Certificate"); + "cmd=%s title=%s msg=%s alt1=%s alt2=%s alt3=%s", + "dialog", + "Dillo HTTPS: Untrusted certificate!", msg, + "Continue", "Cancel", "Save Certificate"); a_Dpip_dsh_write_str(sh, 1, d_cmd); dFree(d_cmd); dFree(msg); @@ -504,8 +507,9 @@ static int handle_certificate_problem(SSL * ssl_connection) case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: case X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: d_cmd = a_Dpip_build_cmd( - "cmd=%s msg=%s alt1=%s alt2=%s", + "cmd=%s title=%s msg=%s alt1=%s alt2=%s", "dialog", + "Dillo HTTPS: Missing certificate issuer!", "The issuer for the remote certificate cannot be found\n" "The authenticity of the remote certificate cannot be trusted", "Continue", "Cancel"); @@ -523,8 +527,9 @@ static int handle_certificate_problem(SSL * ssl_connection) case X509_V_ERR_CERT_SIGNATURE_FAILURE: case X509_V_ERR_CRL_SIGNATURE_FAILURE: d_cmd = a_Dpip_build_cmd( - "cmd=%s msg=%s alt1=%s alt2=%s", + "cmd=%s title=%s msg=%s alt1=%s alt2=%s", "dialog", + "Dillo HTTPS: Invalid certificate!", "The remote certificate signature could not be read\n" "or is invalid and should not be trusted", "Continue", "Cancel"); @@ -539,8 +544,9 @@ static int handle_certificate_problem(SSL * ssl_connection) case X509_V_ERR_CERT_NOT_YET_VALID: case X509_V_ERR_CRL_NOT_YET_VALID: d_cmd = a_Dpip_build_cmd( - "cmd=%s msg=%s alt1=%s alt2=%s", + "cmd=%s title=%s msg=%s alt1=%s alt2=%s", "dialog", + "Dillo HTTPS: Certificate not yet valid!", "Part of the remote certificate is not yet valid\n" "Certificates usually have a range of dates over which\n" "they are to be considered valid, and the certificate\n" @@ -558,8 +564,9 @@ static int handle_certificate_problem(SSL * ssl_connection) case X509_V_ERR_CERT_HAS_EXPIRED: case X509_V_ERR_CRL_HAS_EXPIRED: d_cmd = a_Dpip_build_cmd( - "cmd=%s msg=%s alt1=%s alt2=%s", + "cmd=%s title=%s msg=%s alt1=%s alt2=%s", "dialog", + "Dillo HTTPS: Expired certificate!", "The remote certificate has expired. The certificate\n" "wasn't designed to last this long. You should avoid \n" "this site.", @@ -576,8 +583,9 @@ static int handle_certificate_problem(SSL * ssl_connection) case X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: case X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: d_cmd = a_Dpip_build_cmd( - "cmd=%s msg=%s alt1=%s alt2=%s", + "cmd=%s title=%s msg=%s alt1=%s alt2=%s", "dialog", + "Dillo HTTPS: Certificate error!", "There was an error in the certificate presented.\n" "Some of the certificate data was improperly formatted\n" "making it impossible to determine if the certificate\n" @@ -596,8 +604,9 @@ static int handle_certificate_problem(SSL * ssl_connection) case X509_V_ERR_CERT_REJECTED: case X509_V_ERR_KEYUSAGE_NO_CERTSIGN: d_cmd = a_Dpip_build_cmd( - "cmd=%s msg=%s alt1=%s alt2=%s", + "cmd=%s title=%s msg=%s alt1=%s alt2=%s", "dialog", + "Dillo HTTPS: Certificate chain error!", "One of the certificates in the chain is being used\n" "incorrectly (possibly due to configuration problems\n" "with the remote system. The connection should not\n" @@ -614,8 +623,9 @@ static int handle_certificate_problem(SSL * ssl_connection) case X509_V_ERR_AKID_SKID_MISMATCH: case X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: d_cmd = a_Dpip_build_cmd( - "cmd=%s msg=%s alt1=%s alt2=%s", + "cmd=%s title=%s msg=%s alt1=%s alt2=%s", "dialog", + "Dillo HTTPS: Certificate mismatch!", "Some of the information presented by the remote system\n" "does not match other information presented\n" "This may be an attempt to eavesdrop on communications", @@ -629,8 +639,9 @@ static int handle_certificate_problem(SSL * ssl_connection) break; case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: d_cmd = a_Dpip_build_cmd( - "cmd=%s msg=%s alt1=%s alt2=%s", + "cmd=%s title=%s msg=%s alt1=%s alt2=%s", "dialog", + "Dillo HTTPS: Self signed certificate!", "Self signed certificate in certificate chain. The certificate " "chain could be built up using the untrusted certificates but the " "root could not be found locally.", @@ -644,8 +655,9 @@ static int handle_certificate_problem(SSL * ssl_connection) break; case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: d_cmd = a_Dpip_build_cmd( - "cmd=%s msg=%s alt1=%s alt2=%s", + "cmd=%s title=%s msg=%s alt1=%s alt2=%s", "dialog", + "Dillo HTTPS: Missing issuer certificate!", "Unable to get local issuer certificate. The issuer certificate " "of an untrusted certificate cannot be found.", "Continue", "Cancel"); @@ -660,8 +672,10 @@ static int handle_certificate_problem(SSL * ssl_connection) snprintf(buf, 80, "The remote certificate cannot be verified (code %ld)", st); d_cmd = a_Dpip_build_cmd( - "cmd=%s msg=%s alt1=%s alt2=%s", - "dialog", buf, "Continue", "Cancel"); + "cmd=%s title=%s msg=%s alt1=%s alt2=%s", + "dialog", + "Dillo HTTPS: Unverifiable certificate!", buf, + "Continue", "Cancel"); a_Dpip_dsh_write_str(sh, 1, d_cmd); dFree(d_cmd); response_number = dialog_get_answer_number(); |