0002-src-server-listener.cc-fix-libressl-build.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 656bff21c1d20b25058da9dbc27d28ad2ac7ae6e Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sat, 25 Feb 2023 18:09:39 +0100
  4. Subject: [PATCH] src/server/listener.cc: fix libressl build
  5. Fix the following libressl build failure:
  6. ../src/server/listener.cc: In member function 'void Pistache::Tcp::Listener::setupSSLAuth(const std::string&, const std::string&, int (*)(int, void*))':
  7. ../src/server/listener.cc:582:29: error: 'SSL_verify_cb' was not declared in this scope; did you mean 'RSA_verify'?
  8. 582 | (SSL_verify_cb)cb
  9. | ^~~~~~~~~~~~~
  10. | RSA_verify
  11. Fixes:
  12. - http://autobuild.buildroot.org/results/066fc078980e5216f38411eee455088e15fa1101
  13. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  14. [Upstream status: https://github.com/pistacheio/pistache/pull/1124]
  15. ---
  16. src/server/listener.cc | 2 +-
  17. 1 file changed, 1 insertion(+), 1 deletion(-)
  18. diff --git a/src/server/listener.cc b/src/server/listener.cc
  19. index 38d2661..c09cb36 100644
  20. --- a/src/server/listener.cc
  21. +++ b/src/server/listener.cc
  22. @@ -609,7 +609,7 @@ namespace Pistache::Tcp
  23. SSL_CTX_set_verify(GetSSLContext(ssl_ctx_),
  24. SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT | SSL_VERIFY_CLIENT_ONCE,
  25. /* Callback type did change in 1.0.1 */
  26. -#if OPENSSL_VERSION_NUMBER < 0x10100000L
  27. +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
  28. (int (*)(int, X509_STORE_CTX*))cb
  29. #else
  30. (SSL_verify_cb)cb
  31. --
  32. 2.39.1