changeset 4662:b171b8610400 3.0.5

Support OpenSSL 1.1.0 taken-from: pkgsrc (Ryo ONODERA) submitted-by: Jun Ebihara <jun@soum.co.jp>
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Fri, 06 Apr 2018 09:34:31 +0200
parents ede97d37c909
children
files dpi/https.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dpi/https.c	Tue Jun 30 15:37:28 2015 +0000
+++ b/dpi/https.c	Fri Apr 06 09:34:31 2018 +0200
@@ -476,7 +476,11 @@
       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;