]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_ssl: follow up to r1876934: use OPENSSL_cleanse().
authorYann Ylavic <ylavic@apache.org>
Fri, 24 Apr 2020 21:29:42 +0000 (21:29 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 24 Apr 2020 21:29:42 +0000 (21:29 +0000)
memset() might be optimized away by the compiler since buf[] (on the stack)
is not used anymore.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876950 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_init.c

index 5fc25881c4ba2d3c89bb8cd13041aa5474a9d3db..ff9f1ad21a2110d186b0d3a41eb0e4c5ea017ed8 100644 (file)
@@ -1626,7 +1626,7 @@ static apr_status_t ssl_init_ticket_key(server_rec *s,
     res = SSL_CTX_set_tlsext_ticket_key_evp_cb(mctx->ssl_ctx,
                                                ssl_callback_SessionTicket);
 #endif
-    memset(buf, 0, sizeof(buf));
+    OPENSSL_cleanse(buf, sizeof(buf));
     if (!res) {
         ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01913)
                      "Unable to initialize TLS session ticket key callback "