This is really just a prerequisite for building against BoringSSL,
which doesn't provide either of those features.
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
static char *
ngx_openssl_engine(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{
+#ifndef OPENSSL_NO_ENGINE
+
ngx_openssl_conf_t *oscf = conf;
ENGINE *engine;
ENGINE_free(engine);
return NGX_CONF_OK;
+
+#else
+
+ return "is not supported";
+
+#endif
}
ngx_openssl_exit(ngx_cycle_t *cycle)
{
EVP_cleanup();
+#ifndef OPENSSL_NO_ENGINE
ENGINE_cleanup();
+#endif
}
#include <openssl/conf.h>
#include <openssl/crypto.h>
#include <openssl/dh.h>
+#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
+#endif
#include <openssl/evp.h>
+#ifndef OPENSSL_NO_OCSP
#include <openssl/ocsp.h>
+#endif
#include <openssl/rand.h>
#include <openssl/rsa.h>
#include <openssl/x509.h>
#include <ngx_event_connect.h>
-#ifdef SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB
+#if (!defined OPENSSL_NO_OCSP && defined SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB)
typedef struct {