aboutsummaryrefslogtreecommitdiffstats
path: root/istream.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-01-30 15:08:48 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-01-30 15:08:48 +0000
commit05af6d32e67e92f4bcc21c337acf66c7eb05a3cd (patch)
tree2859704dfe87fb59093590dab50bc2cc24a1dfee /istream.c
parent[w3m-dev 02931] use POST in multipart.cgi (diff)
downloadw3m-05af6d32e67e92f4bcc21c337acf66c7eb05a3cd.tar.gz
w3m-05af6d32e67e92f4bcc21c337acf66c7eb05a3cd.zip
[w3m-dev 02933] segmentation fault when w3m -dump https:
* file.c (readHeader): use inputAnswer() * file.c (getAuthCookie): remove term_cbreak() * file.c (checkOverWrite): use inputAnswer() * file.c (inputAnswer): added * istream.c (ssl_get_certificate): use inputAnswer() * main.c (qquitfm): change prompt * proto.h (inputAnswer): added From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r--istream.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/istream.c b/istream.c
index 7f92b57..0239b5a 100644
--- a/istream.c
+++ b/istream.c
@@ -1,4 +1,4 @@
-/* $Id: istream.c,v 1.11 2002/01/12 13:33:47 ukai Exp $ */
+/* $Id: istream.c,v 1.12 2002/01/30 15:08:48 ukai Exp $ */
#include "fm.h"
#include "istream.h"
#include <signal.h>
@@ -476,11 +476,10 @@ ssl_get_certificate(InputStream stream, char *hostname)
&& strcasecmp(accept_this_site->ptr, hostname) == 0)
ans = "y";
else {
- emsg = Strnew_charp("No SSL peer certificate: accept (y/n)?");
- term_raw();
- ans = inputChar(emsg->ptr);
+ emsg = Strnew_charp("No SSL peer certificate: accept? (y/n)");
+ ans = inputAnswer(emsg->ptr);
}
- if (tolower(*ans) == 'y')
+ if (ans && tolower(*ans) == 'y')
amsg = Strnew_charp
("Accept SSL session without any peer certificate");
else {
@@ -510,11 +509,10 @@ ssl_get_certificate(InputStream stream, char *hostname)
&& strcasecmp(accept_this_site->ptr, hostname) == 0)
ans = "y";
else {
- emsg = Sprintf("%s: accept (y/n)?", em);
- term_raw();
- ans = inputChar(emsg->ptr);
+ emsg = Sprintf("%s: accept? (y/n)", em);
+ ans = inputAnswer(emsg->ptr);
}
- if (tolower(*ans) == 'y') {
+ if (ans && tolower(*ans) == 'y') {
amsg = Sprintf("Accept unsecure SSL session: "
"unverified: %s", em);
}
@@ -537,11 +535,10 @@ ssl_get_certificate(InputStream stream, char *hostname)
Str ep = Strdup(emsg);
if (ep->length > COLS - 16)
Strshrink(ep, ep->length - (COLS - 16));
- term_raw();
- Strcat_charp(ep, ": accept(y/n)?");
- ans = inputChar(ep->ptr);
+ Strcat_charp(ep, ": accept? (y/n)");
+ ans = inputAnswer(ep->ptr);
}
- if (tolower(*ans) == 'y') {
+ if (ans && tolower(*ans) == 'y') {
amsg = Strnew_charp("Accept unsecure SSL session:");
Strcat(amsg, emsg);
}