0003-Support-OpenSSL-1.1.0.patch 1.1 KB

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