From: Philippe Wooding Date: Fri, 20 May 2016 09:42:32 +0000 (+0200) Subject: Only set stable cb is staple is enabled X-Git-Tag: branch_3_1_x~352 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fb15e0f7cc6f4321be495bee166360d21525caf;p=thirdparty%2Ffreeradius-server.git Only set stable cb is staple is enabled --- diff --git a/src/main/tls/ctx.c b/src/main/tls/ctx.c index 7e35ec25b0c..be6f0390e25 100644 --- a/src/main/tls/ctx.c +++ b/src/main/tls/ctx.c @@ -420,15 +420,17 @@ post_ca: /* * Configure OCSP stapling for the server cert */ - SSL_CTX_set_tlsext_status_cb(ctx, tls_ocsp_staple_cb); + if (conf->staple->enable) { + SSL_CTX_set_tlsext_status_cb(ctx, tls_ocsp_staple_cb); - { - fr_tls_ocsp_conf_t const *staple_conf = &(conf->staple); /* Need to assign offset first */ - fr_tls_ocsp_conf_t *tmp; + { + fr_tls_ocsp_conf_t const *staple_conf = &(conf->staple); /* Need to assign offset first */ + fr_tls_ocsp_conf_t *tmp; - memcpy(&tmp, &staple_conf, sizeof(tmp)); + memcpy(&tmp, &staple_conf, sizeof(tmp)); - SSL_CTX_set_tlsext_status_arg(ctx, tmp); + SSL_CTX_set_tlsext_status_arg(ctx, tmp); + } } /*