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