diff -ur dillo-3.0.5.orig/configure.ac dillo-3.0.5/configure.ac
--- dillo-3.0.5.orig/configure.ac 2015-06-30 16:07:06.000000000 +0200
+++ dillo-3.0.5/configure.ac 2017-09-11 15:51:57.910529543 +0200
@@ -286,7 +286,7 @@
if test "x$ssl_ok" = "xyes"; then
old_libs="$LIBS"
- AC_CHECK_LIB(ssl, SSL_library_init, ssl_ok=yes, ssl_ok=no, -lcrypto)
+ AC_CHECK_LIB(ssl, SSL_write, ssl_ok=yes, ssl_ok=no, -lcrypto)
LIBS="$old_libs"
fi
diff -ur dillo-3.0.5.orig/dpi/https.c dillo-3.0.5/dpi/https.c
--- dillo-3.0.5.orig/dpi/https.c 2015-06-30 16:06:08.000000000 +0200
+++ dillo-3.0.5/dpi/https.c 2017-09-11 16:03:39.862924064 +0200
@@ -443,6 +443,7 @@
char buf[4096], *d_cmd, *msg;
X509 * remote_cert;
+ char * remote_cert_name;
remote_cert = SSL_get_peer_certificate(ssl_connection);
if (remote_cert == NULL){
@@ -476,7 +477,9 @@
case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
/*Either self signed and untrusted*/
/*Extract CN from certificate name information*/
- if ((cn = strstr(remote_cert->name, "/CN=")) == NULL) {
+ remote_cert_name =
+ X509_NAME_oneline(X509_get_subject_name(remote_cert), NULL, 0);
+ if ((cn = strstr(remote_cert_name, "/CN=")) == NULL) {
strcpy(buf, "(no CN given)");
} else {
char *cn_end;
@@ -489,6 +492,7 @@
strncpy(buf, cn, (size_t) (cn_end - cn));
buf[cn_end - cn] = '\0';
}
+ OPENSSL_free(remote_cert_name);
msg = dStrconcat("The remote certificate is self-signed and "
"untrusted.\nFor address: ", buf, NULL);
d_cmd = a_Dpip_build_cmd(