Welcome! Log In Create A New Profile

Advanced

[PATCH 1 of 2] SSL: fix build with OPENSSL_NO_ENGINE and/or OPENSSL_NO_OCSP

Piotr Sikora
July 28, 2014 07:06PM
# HG changeset patch
# User Piotr Sikora <piotr@cloudflare.com>
# Date 1406575677 25200
# Mon Jul 28 12:27:57 2014 -0700
# Node ID bb74dfefeec04aae5a3a86ace2df45d03f691ded
# Parent d1bde5c3c5d21368de04a59506a06c1174353a19
SSL: fix build with OPENSSL_NO_ENGINE and/or OPENSSL_NO_OCSP.

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>

diff -r d1bde5c3c5d2 -r bb74dfefeec0 src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c Mon Jul 28 18:30:19 2014 +0400
+++ b/src/event/ngx_event_openssl.c Mon Jul 28 12:27:57 2014 -0700
@@ -3279,6 +3279,8 @@ ngx_openssl_create_conf(ngx_cycle_t *cyc
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;
@@ -3313,6 +3315,12 @@ ngx_openssl_engine(ngx_conf_t *cf, ngx_c
ENGINE_free(engine);

return NGX_CONF_OK;
+
+#else
+
+ return "is not supported";
+
+#endif
}


@@ -3320,5 +3328,8 @@ static void
ngx_openssl_exit(ngx_cycle_t *cycle)
{
EVP_cleanup();
+
+#ifndef OPENSSL_NO_ENGINE
ENGINE_cleanup();
+#endif
}
diff -r d1bde5c3c5d2 -r bb74dfefeec0 src/event/ngx_event_openssl.h
--- a/src/event/ngx_event_openssl.h Mon Jul 28 18:30:19 2014 +0400
+++ b/src/event/ngx_event_openssl.h Mon Jul 28 12:27:57 2014 -0700
@@ -18,9 +18,13 @@
#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>
diff -r d1bde5c3c5d2 -r bb74dfefeec0 src/event/ngx_event_openssl_stapling.c
--- a/src/event/ngx_event_openssl_stapling.c Mon Jul 28 18:30:19 2014 +0400
+++ b/src/event/ngx_event_openssl_stapling.c Mon Jul 28 12:27:57 2014 -0700
@@ -11,7 +11,7 @@
#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 {

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 1 of 2] SSL: fix build with OPENSSL_NO_ENGINE and/or OPENSSL_NO_OCSP

Piotr Sikora 1125 July 28, 2014 07:06PM

[PATCH 2 of 2] SSL: let it build against BoringSSL

Piotr Sikora 368 July 28, 2014 07:06PM

Re: [PATCH 2 of 2] SSL: let it build against BoringSSL

Maxim Dounin 330 July 29, 2014 06:16PM

Re: [PATCH 2 of 2] SSL: let it build against BoringSSL

Piotr Sikora 295 July 29, 2014 07:20PM

Re: [PATCH 2 of 2] SSL: let it build against BoringSSL

Piotr Sikora 311 July 29, 2014 07:40PM

Re: [PATCH 2 of 2] SSL: let it build against BoringSSL

Maxim Dounin 328 July 30, 2014 12:22AM

Re: [PATCH 2 of 2] SSL: let it build against BoringSSL

Maxim Dounin 305 July 30, 2014 12:16AM

Re: [PATCH 2 of 2] SSL: let it build against BoringSSL

Piotr Sikora 313 July 30, 2014 12:58AM

Re: [PATCH 2 of 2] SSL: let it build against BoringSSL

Piotr Sikora 293 July 30, 2014 01:34AM

Re: [PATCH 2 of 2] SSL: let it build against BoringSSL

Maxim Dounin 380 July 30, 2014 08:24AM

Re: [PATCH 1 of 2] SSL: fix build with OPENSSL_NO_ENGINE and/or OPENSSL_NO_OCSP

Maxim Dounin 339 July 29, 2014 06:10PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 202
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready