Add build.info for QUIC server demo
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/26544)
This commit is contained in:
parent
1f23dbb62d
commit
1ed2ef07b3
5 changed files with 30 additions and 8 deletions
|
@ -7,6 +7,10 @@ IF[{- !$disabled{"h3demo"} -}]
|
||||||
ENDIF
|
ENDIF
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF[{- !$disabled{"quic"} -}]
|
||||||
|
SUBDIRS=quic
|
||||||
|
ENDIF
|
||||||
|
|
||||||
IF[{- !$disabled{"cms"} -}]
|
IF[{- !$disabled{"cms"} -}]
|
||||||
IF[{- !$disabled{"deprecated"} -}]
|
IF[{- !$disabled{"deprecated"} -}]
|
||||||
SUBDIRS=cms
|
SUBDIRS=cms
|
||||||
|
|
1
demos/quic/build.info
Normal file
1
demos/quic/build.info
Normal file
|
@ -0,0 +1 @@
|
||||||
|
SUBDIRS=server
|
|
@ -2,11 +2,9 @@
|
||||||
# To run the demo when linked with a shared library (default) ensure that
|
# To run the demo when linked with a shared library (default) ensure that
|
||||||
# libcrypto and libssl are on the library path. For example:
|
# libcrypto and libssl are on the library path. For example:
|
||||||
#
|
#
|
||||||
# LD_LIBRARY_PATH=../.. ./server 4444 \
|
# LD_LIBRARY_PATH=../../.. ./server 4444 \
|
||||||
# ../../test/certs/servercert.pem \
|
# ../../../test/certs/servercert.pem \
|
||||||
# ../../test/certs/serverkey.pem
|
# ../../../test/certs/serverkey.pem
|
||||||
#
|
|
||||||
# TODO(QUIC SERVER): Add build.info.
|
|
||||||
#
|
#
|
||||||
CFLAGS += -I../../../include -g -Wall -Wsign-compare
|
CFLAGS += -I../../../include -g -Wall -Wsign-compare
|
||||||
LDFLAGS += -L../../..
|
LDFLAGS += -L../../..
|
||||||
|
|
14
demos/quic/server/build.info
Normal file
14
demos/quic/server/build.info
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#
|
||||||
|
# To run the demo when linked with a shared library (default) ensure that
|
||||||
|
# libcrypto and libssl are on the library path. For example:
|
||||||
|
#
|
||||||
|
# LD_LIBRARY_PATH=../../.. ./server 4444 \
|
||||||
|
# ../../../test/certs/servercert.pem \
|
||||||
|
# ../../../test/certs/serverkey.pem
|
||||||
|
|
||||||
|
|
||||||
|
PROGRAMS{noinst} = server
|
||||||
|
|
||||||
|
INCLUDE[server]=../../../include
|
||||||
|
SOURCE[server]=server.c
|
||||||
|
DEPEND[server]=../../../libcrypto ../../../libssl
|
|
@ -9,8 +9,12 @@
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
#include <openssl/quic.h>
|
#include <openssl/quic.h>
|
||||||
#include <netinet/in.h>
|
#ifdef _WIN32 /* Windows */
|
||||||
#include <unistd.h>
|
# include <winsock2.h>
|
||||||
|
#else /* Linux/Unix */
|
||||||
|
# include <netinet/in.h>
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -155,7 +159,8 @@ static int run_quic_server(SSL_CTX *ctx, int fd)
|
||||||
* so the below call is not actually necessary. The configured behaviour is
|
* so the below call is not actually necessary. The configured behaviour is
|
||||||
* inherited by child objects.
|
* inherited by child objects.
|
||||||
*/
|
*/
|
||||||
SSL_set_blocking_mode(listener, 1);
|
if (!SSL_set_blocking_mode(listener, 1))
|
||||||
|
goto err;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
/* Blocking wait for an incoming connection, similar to accept(2). */
|
/* Blocking wait for an incoming connection, similar to accept(2). */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue