From b907828f097c436326fe889c55a9476b5af842af Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Wed, 13 Feb 2002 17:24:24 +0000 Subject: * [w3m-dev 03053] Re: SSL indicator * main.c (dump_extra): Output SSL certificate. From: Hironori Sakamoto --- main.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'main.c') 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 @@ -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 -- cgit v1.2.3