Browse Source

Merge pull request #11789 from neheb/h2oen

h2o: fix compilation without engine support
lilik-openwrt-22.03
Rosen Penev 4 years ago
committed by GitHub
parent
commit
84a2db01b4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 1 deletions
  1. +1
    -1
      libs/h2o/Makefile
  2. +28
    -0
      libs/h2o/patches/600-engine.patch

+ 1
- 1
libs/h2o/Makefile View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=h2o
PKG_VERSION:=2.2.6
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_SOURCE_URL:=https://codeload.github.com/h2o/h2o/tar.gz/v${PKG_VERSION}?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz


+ 28
- 0
libs/h2o/patches/600-engine.patch View File

@ -0,0 +1,28 @@
--- a/deps/neverbleed/neverbleed.c
+++ b/deps/neverbleed/neverbleed.c
@@ -1486,6 +1486,7 @@ int neverbleed_init(neverbleed_t *nb, char *errbuf)
close(pipe_fds[0]);
pipe_fds[0] = -1;
+#ifndef OPENSSL_NO_ENGINE
/* setup engine */
if ((nb->engine = ENGINE_new()) == NULL || !ENGINE_set_id(nb->engine, "neverbleed") ||
!ENGINE_set_name(nb->engine, "privilege separation software engine") || !ENGINE_set_RSA(nb->engine, rsa_method)
@@ -1497,6 +1498,7 @@ int neverbleed_init(neverbleed_t *nb, char *errbuf)
goto Fail;
}
ENGINE_add(nb->engine);
+#endif
/* setup thread key */
pthread_key_create(&nb->thread_key, dispose_thread_data);
@@ -1515,7 +1517,9 @@ Fail:
if (listen_fd != -1)
close(listen_fd);
if (nb->engine != NULL) {
+#ifndef OPENSSL_NO_ENGINE
ENGINE_free(nb->engine);
+#endif
nb->engine = NULL;
}
return -1;

Loading…
Cancel
Save