]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_ssl_ct: fix return values for custom extension callback
authorJacob Champion <jchampion@apache.org>
Wed, 19 Apr 2017 01:32:58 +0000 (01:32 +0000)
committerJacob Champion <jchampion@apache.org>
Wed, 19 Apr 2017 01:32:58 +0000 (01:32 +0000)
This is most likely a follow-up to r1628833.

At some point during the OpenSSL 1.0.2 beta, the contract for custom
extension callbacks changed from "returning -1 skips the extension" to
"returning -1 will issue a TLS fatal alert". This caused mod_ssl_ct to
abort TLS connections that it intended to ignore. Zero is the correct
return value for "do nothing" in 1.0.2.

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

modules/ssl/mod_ssl_ct.c

index 39ff1cc770b400a12225478963c9b38832760719..15fe288560d253cbf238af220b4936237aadd293 100644 (file)
@@ -2286,7 +2286,7 @@ static int server_extension_add_callback(SSL *ssl, unsigned ext_type,
         ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03032)
                       "server_extension_callback_2: client isn't CT-aware");
         /* Skip this extension for ServerHello */
-        return -1;
+        return 0;
     }
 
     /* need to reply with SCT */
@@ -2309,7 +2309,7 @@ static int server_extension_add_callback(SSL *ssl, unsigned ext_type,
     }
     else {
         /* Skip this extension for ServerHello */
-        return -1;
+        return 0;
     }
 
     return 1;