aboutsummaryrefslogtreecommitdiffstats
path: root/istream.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-12-26 18:46:33 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-12-26 18:46:33 +0000
commit13eb03f6ba56b2cf159bfc302b81de192bc896ef (patch)
treecfbec0d3101cb90c6ddb8f652ef28875a13b8353 /istream.c
parent[w3m-dev 02749] cleanup code for editor,mailer,extbrowser (diff)
downloadw3m-13eb03f6ba56b2cf159bfc302b81de192bc896ef.tar.gz
w3m-13eb03f6ba56b2cf159bfc302b81de192bc896ef.zip
[w3m-dev 02750]
From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat (limited to 'istream.c')
-rw-r--r--istream.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/istream.c b/istream.c
index 988d818..086b826 100644
--- a/istream.c
+++ b/istream.c
@@ -1,4 +1,4 @@
-/* $Id: istream.c,v 1.8 2001/12/26 12:58:49 ukai Exp $ */
+/* $Id: istream.c,v 1.9 2001/12/26 18:46:33 ukai Exp $ */
#include "fm.h"
#include "istream.h"
#include <signal.h>
@@ -357,6 +357,14 @@ ISeos(InputStream stream)
}
#ifdef USE_SSL
+static Str ssl_certificate_validity;
+
+void
+ssl_set_certificate_validity(Str msg)
+{
+ ssl_certificate_validity = msg;
+}
+
Str
ssl_get_certificate(InputStream stream)
{
@@ -377,8 +385,12 @@ ssl_get_certificate(InputStream stream)
bp = BIO_new(BIO_s_mem());
X509_print(bp, x);
len = (int)BIO_ctrl(bp, BIO_CTRL_INFO, 0, (char *)&p);
- s = Strnew_charp_n(p, len);
+ s = ssl_certificate_validity ? Strdup(ssl_certificate_validity)
+ : Strnew_charp("valid certificate");
+ Strcat_charp(s, "\n");
+ Strcat_charp_n(s, p, len);
BIO_free_all(bp);
+ X509_free(x);
return s;
}