comparison dpi/https.c @ 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 9a3cdb75e816
children
comparison
equal deleted inserted replaced
4208:ede97d37c909 4662:b171b8610400
474 ret = 0; 474 ret = 0;
475 break; 475 break;
476 case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: 476 case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
477 /*Either self signed and untrusted*/ 477 /*Either self signed and untrusted*/
478 /*Extract CN from certificate name information*/ 478 /*Extract CN from certificate name information*/
479 #if OPENSSL_VERSION_NUMBER < 0x10100000L
479 if ((cn = strstr(remote_cert->name, "/CN=")) == NULL) { 480 if ((cn = strstr(remote_cert->name, "/CN=")) == NULL) {
481 #else
482 if ((cn = strstr(X509_get_subject_name(remote_cert), "/CN=")) == NULL) {
483 #endif
480 strcpy(buf, "(no CN given)"); 484 strcpy(buf, "(no CN given)");
481 } else { 485 } else {
482 char *cn_end; 486 char *cn_end;
483 487
484 cn += 4; 488 cn += 4;