Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21715)
{
SSL_CTX *ctx;
+#ifdef USE_QUIC
+ ctx = SSL_CTX_new(QUIC_client_method());
+#else
ctx = SSL_CTX_new(TLS_client_method());
+#endif
if (ctx == NULL)
return NULL;
signal(SIGPIPE, SIG_IGN);
+#ifdef USE_QUIC
+ fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+#else
fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+#endif
if (fd < 0) {
fprintf(stderr, "cannot create socket\n");
goto fail;