aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-02-13 17:24:24 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-02-13 17:24:24 +0000
commitb907828f097c436326fe889c55a9476b5af842af (patch)
tree47a90f6e48f0aec3ff097015453cd746bb8f05f7 /main.c
parent* [w3m-dev 03038] LDFLAGS (diff)
downloadw3m-b907828f097c436326fe889c55a9476b5af842af.tar.gz
w3m-b907828f097c436326fe889c55a9476b5af842af.zip
* [w3m-dev 03053] Re: SSL indicator
* main.c (dump_extra): Output SSL certificate. From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'main.c')
-rw-r--r--main.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/main.c b/main.c
index 6bc837d..c88c9e0 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.81 2002/02/08 11:37:09 ukai Exp $ */
+/* $Id: main.c,v 1.82 2002/02/13 17:24:24 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -1078,6 +1078,23 @@ dump_extra(Buffer *buf)
#ifdef JP_CHARSET
printf("W3m-document-charset: %s\n", code_to_str(buf->document_code));
#endif
+#ifdef USE_SSL
+ if (buf->ssl_certificate) {
+ Str tmp = Strnew();
+ char *p;
+ for (p = buf->ssl_certificate; *p; p++) {
+ Strcat_char(tmp, *p);
+ if (*p == '\n') {
+ for (; *(p + 1) == '\n'; p++) ;
+ if (*(p + 1))
+ Strcat_char(tmp, '\t');
+ }
+ }
+ if (Strlastchar(tmp) != '\n')
+ Strcat_char(tmp, '\n');
+ printf("W3m-ssl-certificate: %s", tmp->ptr);
+ }
+#endif
}
void