mirror of https://github.com/openssl/openssl.git
				
				
				
			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
					
				|  | @ -7,6 +7,10 @@ IF[{- !$disabled{"h3demo"} -}] | |||
|  ENDIF | ||||
| ENDIF | ||||
| 
 | ||||
| IF[{- !$disabled{"quic"} -}] | ||||
|      SUBDIRS=quic | ||||
| ENDIF | ||||
| 
 | ||||
| IF[{- !$disabled{"cms"} -}] | ||||
|  IF[{- !$disabled{"deprecated"} -}] | ||||
|     SUBDIRS=cms | ||||
|  |  | |||
|  | @ -0,0 +1 @@ | |||
| SUBDIRS=server | ||||
|  | @ -2,11 +2,9 @@ | |||
| # 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
 | ||||
| #
 | ||||
| # TODO(QUIC SERVER): Add build.info.
 | ||||
| #    LD_LIBRARY_PATH=../../.. ./server 4444 \
 | ||||
| #    	../../../test/certs/servercert.pem \
 | ||||
| #    	../../../test/certs/serverkey.pem
 | ||||
| #
 | ||||
| CFLAGS  += -I../../../include -g -Wall -Wsign-compare | ||||
| LDFLAGS += -L../../.. | ||||
|  |  | |||
|  | @ -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/ssl.h> | ||||
| #include <openssl/quic.h> | ||||
| #include <netinet/in.h> | ||||
| #include <unistd.h> | ||||
| #ifdef _WIN32 /* Windows */ | ||||
| # include <winsock2.h> | ||||
| #else /* Linux/Unix */ | ||||
| # include <netinet/in.h> | ||||
| # include <unistd.h> | ||||
| #endif | ||||
| #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 | ||||
|      * inherited by child objects. | ||||
|      */ | ||||
|     SSL_set_blocking_mode(listener, 1); | ||||
|     if (!SSL_set_blocking_mode(listener, 1)) | ||||
|         goto err; | ||||
| 
 | ||||
|     for (;;) { | ||||
|         /* Blocking wait for an incoming connection, similar to accept(2). */ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue