-       if (!ssl_sni)
+       if ((SSL_hosts && !SSL_hosts->sni_enabled) || !ssl_sni)
                (*openssl_tls_init_hook) (ctx, isServerStart);

together with

         *
         * If SNI is enabled, we set password callback based what was 
configured.
         */
-       if (!ssl_sni)
+       if ((SSL_hosts && !SSL_hosts->sni_enabled) || !ssl_sni)
                (*openssl_tls_init_hook) (ctx, isServerStart);
        else
        {

These block enabling sni with a config reload when using passphrases,
because it takes the global path and never installs the per-host
passphrase command. (Maybe the patch could pass another argument for
init_host_context instead?)


+# Reset configuration for the next test
+$node->append_conf(
+       'postgresql.conf', qq{
+ssl_sni = on
+ssl_cert_file = ''
+});
+$node->reload;
+$node->wait_for_log(qr/reloading configuration files/);

Isn't an offset missing from here?


Reply via email to