Skip to content

Commit

Permalink
quic http3 demo: minor updates
Browse files Browse the repository at this point in the history
-update run command to include LD_LIBRARY_PATH
-suggest installing libnghttp3-dev on Ubuntu
-drop "-f" from clean recipe (it is already included in $(RM))

Part of openssl/project#253

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #22623)

(cherry picked from commit 22fa160)
  • Loading branch information
James Muir authored and paulidale committed Nov 8, 2023
1 parent 076d475 commit 0f96c6e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
12 changes: 9 additions & 3 deletions demos/http3/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
CFLAGS = -I../../include -g -Wall
#
# 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=../.. ./ossl-nghttp3-demo www.example.com:443

CFLAGS = -I../../include -g -Wall -Wsign-compare
LDFLAGS = -L../..
LDLIBS = -lcrypto -lssl -lnghttp3
LDLIBS = -lcrypto -lssl -lnghttp3

all: ossl-nghttp3-demo

clean:
$(RM) -f ossl-nghttp3-demo *.o
$(RM) ossl-nghttp3-demo *.o

ossl-nghttp3-demo: ossl-nghttp3-demo.o ossl-nghttp3.o
$(CC) $(CFLAGS) -o "$@" $^ $(LDFLAGS) $(LDLIBS)
Expand Down
5 changes: 3 additions & 2 deletions demos/http3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ The demo is structured into two parts:
layer (`ossl-nghttp3-demo.c`).

The Makefile in this directory can be used to build the demo on \*nix-style
systems. You will need to have the `nghttp3` library available.
systems. You will need the `nghttp3` library and header file. On
Ubuntu, these can be obtained by installing the package `libnghttp3-dev`.

Running the Demo
----------------
Expand All @@ -26,7 +27,7 @@ port as the sole argument:

```shell
$ make
$ ./ossl-nghttp3-demo www.google.com:443
$ LD_LIBRARY_PATH=../.. ./ossl-nghttp3-demo www.google.com:443
```

The demo produces the HTTP response headers in textual form as output followed
Expand Down

0 comments on commit 0f96c6e

Please sign in to comment.