1*e7be843bSPierre ProncheryHTTP/3 Demo using OpenSSL QUIC and nghttp3 2*e7be843bSPierre Pronchery========================================== 3*e7be843bSPierre Pronchery 4*e7be843bSPierre ProncheryThis is a simple demo of how to use HTTP/3 with OpenSSL QUIC using the HTTP/3 5*e7be843bSPierre Proncherylibrary “[nghttp3](https://github.com/ngtcp2/nghttp3)”. 6*e7be843bSPierre Pronchery 7*e7be843bSPierre ProncheryThe demo is structured into two parts: 8*e7be843bSPierre Pronchery 9*e7be843bSPierre Pronchery- an adaptation layer which binds nghttp3 to OpenSSL's QUIC implementation 10*e7be843bSPierre Pronchery (`ossl-nghttp3.c`); 11*e7be843bSPierre Pronchery- a simple application which makes an HTTP/3 request using this adaptation 12*e7be843bSPierre Pronchery layer (`ossl-nghttp3-demo.c`). 13*e7be843bSPierre Pronchery 14*e7be843bSPierre ProncheryThe Makefile in this directory can be used to build the demo on \*nix-style 15*e7be843bSPierre Proncherysystems. You will need the `nghttp3` library and header file. On 16*e7be843bSPierre ProncheryUbuntu, these can be obtained by installing the package `libnghttp3-dev`. 17*e7be843bSPierre Pronchery 18*e7be843bSPierre ProncheryRunning the Demo 19*e7be843bSPierre Pronchery---------------- 20*e7be843bSPierre Pronchery 21*e7be843bSPierre ProncheryDepending on your system configuration it may be necessary to set the 22*e7be843bSPierre Pronchery`SSL_CERT_FILE` or `SSL_CERT_DIR` environment variables to a location where 23*e7be843bSPierre Proncherytrusted root CA certificates can be found. 24*e7be843bSPierre Pronchery 25*e7be843bSPierre ProncheryAfter building by running `make`, run `./ossl-nghttp3-demo` with a hostname and 26*e7be843bSPierre Proncheryport as the sole argument: 27*e7be843bSPierre Pronchery 28*e7be843bSPierre Pronchery```shell 29*e7be843bSPierre Pronchery$ make 30*e7be843bSPierre Pronchery$ LD_LIBRARY_PATH=../.. ./ossl-nghttp3-demo www.google.com:443 31*e7be843bSPierre Pronchery``` 32*e7be843bSPierre Pronchery 33*e7be843bSPierre ProncheryThe demo produces the HTTP response headers in textual form as output followed 34*e7be843bSPierre Proncheryby the response body. 35*e7be843bSPierre Pronchery 36*e7be843bSPierre ProncherySee Also 37*e7be843bSPierre Pronchery-------- 38*e7be843bSPierre Pronchery 39*e7be843bSPierre Pronchery- [nghttp3](https://github.com/ngtcp2/nghttp3) 40