public static SSLHandlerFactory createRestClientSSLEngineFactory(final Configuration config)
            throws Exception {
        ClientAuth clientAuth =
                SecurityOptions.isRestSSLAuthenticationEnabled(config)
                        ? ClientAuth.REQUIRE
                        : ClientAuth.NONE;
        SslContext sslContext = createRestNettySSLContext(config, true, clientAuth);
        if (sslContext == null) {
            throw new IllegalConfigurationException("SSL is not enabled for REST endpoints.");
        }

        return new SSLHandlerFactory(sslContext, -1, -1);
    }
@Test
    void testRESTClientSSLMissingPassword() {
        Configuration config = new Configuration();
        config.set(SecurityOptions.SSL_REST_ENABLED, true);
        config.set(SecurityOptions.SSL_REST_TRUSTSTORE, TRUST_STORE_PATH);

        assertThatThrownBy(() -> SSLUtils.createRestClientSSLEngineFactory(config))
                .isInstanceOf(IllegalConfigurationException.class);
    }