diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-08-09 17:46:33 +0100 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-09-01 10:45:35 +0100 |
commit | 43f4b8a80ead05900a3a23196c3c4bbb3ed045b1 (patch) | |
tree | 2ddec04bc00741012ab8a7d38e38ef05b47a6ac9 | |
parent | f3792076597a8e9003f61333e5e9a84818f12529 (diff) |
QUIC DDD: ddd-03-fd-blocking: Planned changes
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21715)
-rw-r--r-- | doc/designs/ddd/ddd-03-fd-blocking.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/designs/ddd/ddd-03-fd-blocking.c b/doc/designs/ddd/ddd-03-fd-blocking.c index 6d9f8e87eb..0a890d6abe 100644 --- a/doc/designs/ddd/ddd-03-fd-blocking.c +++ b/doc/designs/ddd/ddd-03-fd-blocking.c @@ -21,7 +21,11 @@ SSL_CTX *create_ssl_ctx(void) { 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; @@ -152,7 +156,11 @@ int main(int argc, char **argv) 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; |