CMP app and app_http_tls_cb(): pick the right TLS hostname (also without port)
[openssl.git] / apps / cmp.c
index 6cd3d7e7c015e4e3371d559e4025c1ad0b0e086f..bfbfa9ce8ac0dcce36825dbc6fac1ccd5fd78492 100644 (file)
@@ -1952,7 +1952,7 @@ static int setup_client_ctx(OSSL_CMP_CTX *ctx, ENGINE *engine)
         if ((info = OPENSSL_zalloc(sizeof(*info))) == NULL)
             goto err;
         (void)OSSL_CMP_CTX_set_http_cb_arg(ctx, info);
-        info->server = opt_server;
+        info->server = host;
         info->port = server_port;
         /* workaround for callback design flaw, see #17088: */
         info->use_proxy = proxy_host != NULL;