-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quic ddd demos: update makefile and demo sources
Update makefile and fix some signedness issues in the demo sources. Drop stray "\n" in the host-port format string that prevented ddd-01 from working (this was also noticed by Neil H). Also, determine the length of the message we are sending and send that many bytes (rather than send sizeof the buffer storing the message). These changes are part of openssl/project#253 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from #22542)
- Loading branch information
Showing
8 changed files
with
63 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,43 @@ | ||
# | ||
# To run the demos when linked with a shared library (default): | ||
# To run the demos when linked with a shared library (default) ensure that | ||
# libcrypto and libssl are on the library path. For example to run the | ||
# ddd-01-conn-blocking-tls demo: | ||
# | ||
# LD_LIBRARY_PATH=../.. make test | ||
# LD_LIBRARY_PATH=../../.. ./ddd-01-conn-blocking-tls | ||
# | ||
# Building ddd-06-mem-uv-tls and ddd-06-mem-uv-quic requires the | ||
# library libuv and header file. On Ubuntu, they are provided by the | ||
# package "libuv1-dev". | ||
|
||
TESTS_BASE = ddd-01-conn-blocking \ | ||
ddd-02-conn-nonblocking \ | ||
ddd-02-conn-nonblocking-threads \ | ||
ddd-03-fd-blocking \ | ||
ddd-04-fd-nonblocking \ | ||
ddd-05-mem-nonblocking \ | ||
ddd-06-mem-uv | ||
|
||
TESTS_BASE=ddd-01-conn-blocking ddd-02-conn-nonblocking ddd-02-conn-nonblocking-threads \ | ||
ddd-03-fd-blocking ddd-04-fd-nonblocking ddd-05-mem-nonblocking ddd-06-mem-uv | ||
TESTS=$(foreach x,$(TESTS_BASE),$(x)-tls $(x)-quic) | ||
TESTS = $(foreach x,$(TESTS_BASE),$(x)-tls $(x)-quic) | ||
|
||
CFLAGS = -I../../../include -O3 -g -Wall | ||
CFLAGS = -I../../../include -g -Wall -Wsign-compare | ||
LDFLAGS = -L../../.. | ||
LDLIBS = -lcrypto -lssl | ||
LDLIBS = -lcrypto -lssl | ||
|
||
CC_CMD = $(CC) $(CFLAGS) $(LDFLAGS) -o "$@" "$<" $(LDLIBS) | ||
|
||
all: $(TESTS) | ||
|
||
clean: | ||
rm -f $(TESTS) *.o | ||
|
||
ddd-06-mem-uv-tls: ddd-06-mem-uv.c | ||
$(CC) $(CFLAGS) $(LDFLAGS) -o "$@" "$<" $(LDLIBS) -luv | ||
|
||
ddd-06-mem-uv-quic: ddd-06-mem-uv.c | ||
$(CC) $(CFLAGS) $(LDFLAGS) -DUSE_QUIC -o "$@" "$<" $(LDLIBS) -luv | ||
ddd-%-tls: ddd-%.c | ||
$(CC_CMD) | ||
|
||
ddd-%-quic: ddd-%.c | ||
$(CC) $(CFLAGS) $(LDFLAGS) -DUSE_QUIC -o "$@" "$<" $(LDLIBS) | ||
$(CC_CMD) -DUSE_QUIC | ||
|
||
ddd-%-tls: ddd-%.c | ||
$(CC) $(CFLAGS) $(LDFLAGS) -o "$@" "$<" $(LDLIBS) | ||
ddd-%-uv-tls: ddd-%-uv.c | ||
$(CC_CMD) -luv | ||
|
||
ddd-%-uv-quic: ddd-%-uv.c | ||
$(CC_CMD) -luv -DUSE_QUIC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters