xref: /OK3568_Linux_fs/buildroot/package/dillo/0003-Support-OpenSSL-1.1.0.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From ff44d8b2d5211a502afdb3e612dae0e8133b5124 Mon Sep 17 00:00:00 2001
2From: Johannes Hofmann <Johannes.Hofmann@gmx.de>
3Date: Thu, 9 Jan 2020 22:07:15 +0100
4Subject: [PATCH] Support OpenSSL 1.1.0
5
6taken-from: pkgsrc (Ryo ONODERA)
7submitted-by: Jun Ebihara <jun@soum.co.jp>
8
9Upstream: https://hg.dillo.org/dillo/rev/b171b8610400
10Signed-off-by: Peter Seiderer <ps.report@gmx.net>
11---
12 dpi/https.c | 4 ++++
13 1 file changed, 4 insertions(+)
14
15diff --git a/dpi/https.c b/dpi/https.c
16index 766b3af..025cfc4 100644
17--- a/dpi/https.c
18+++ b/dpi/https.c
19@@ -476,7 +476,11 @@ static int handle_certificate_problem(SSL * ssl_connection)
20       case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
21          /*Either self signed and untrusted*/
22          /*Extract CN from certificate name information*/
23+#if OPENSSL_VERSION_NUMBER < 0x10100000L
24          if ((cn = strstr(remote_cert->name, "/CN=")) == NULL) {
25+#else
26+         if ((cn = strstr(X509_get_subject_name(remote_cert), "/CN=")) == NULL) {
27+#endif
28             strcpy(buf, "(no CN given)");
29          } else {
30             char *cn_end;
31--
322.24.1
33
34