From 29930f9329edf2c69d0b17798bb5f74a429aca5b Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Mon, 10 Jan 2011 23:36:08 +0000 Subject: better feedback when handling certificates. --- xxxterm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xxxterm.c b/xxxterm.c index cd34856..3704f57 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -2438,8 +2438,13 @@ cert_cmd(struct tab *t, struct karg *args) frame = webkit_web_view_get_main_frame(t->wv); uri = (char *)webkit_web_frame_get_uri(frame); - if ((s = connect_socket_from_uri(uri, domain, sizeof domain)) == -1) + if (uri && strlen(uri) == 0) { + show_oops(t, "Invalid URI"); + } + if ((s = connect_socket_from_uri(uri, domain, sizeof domain)) == -1) { + show_oops(t, "Invalid certidicate URI: %s", uri); return (1); + } /* go ssl/tls */ if (start_tls(t, s, &gsession, &xcred)) { -- cgit 1.4.1-2-gfad0