MINOR: quic: add QUIC support when no client_hello_cb

Add QUIC support to the ssl_sock_switchctx_cbk() variant used only when
no client_hello_cb is available.

This could be used with libreSSL implementation of QUIC for example.
It also works with quictls when HAVE_SSL_CLIENT_HELLO_CB is removed from
openss-compat.h
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index 6567bb9..84e03d3 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -2951,9 +2951,37 @@
 	const char *wildp = NULL;
 	struct ebmb_node *node, *n;
 	struct bind_conf *s = priv;
+#ifdef USE_QUIC
+	const uint8_t *extension_data;
+	size_t extension_len;
+	struct quic_conn *qc = SSL_get_ex_data(ssl, ssl_qc_app_data_index);
+#endif /* USE_QUIC */
 	int i;
 	(void)al; /* shut gcc stupid warning */
 
+#ifdef USE_QUIC
+	if (qc) {
+
+		/* Look for the QUIC transport parameters. */
+		SSL_get_peer_quic_transport_params(ssl, &extension_data, &extension_len);
+		if (extension_len == 0) {
+			/* This is not redundant. It we only return 0 without setting
+			 * <*al>, this has as side effect to generate another TLS alert
+			 * which would be set after calling quic_set_tls_alert().
+			 */
+			*al = SSL_AD_MISSING_EXTENSION;
+			quic_set_tls_alert(qc, SSL_AD_MISSING_EXTENSION);
+			return SSL_TLSEXT_ERR_NOACK;
+		}
+
+		if (!quic_transport_params_store(qc, 0, extension_data,
+		                                 extension_data + extension_len) ||
+		    !qc_conn_finalize(qc, 0)) {
+			return SSL_TLSEXT_ERR_NOACK;
+		}
+	}
+#endif /* USE_QUIC */
+
 	servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
 	if (!servername) {
 #if (!defined SSL_NO_GENERATE_CERTIFICATES)