Path: blob/main/contrib/bearssl/samples/README.txt
39536 views
This directory contains sample code for using BearSSL.12client_basic.c34A sample client code, that connects to a server, performs a SSL5handshake, sends a basic HTTP GET request, and dumps the complete6answer on stdout.78Compile it against BearSSL headers (in the ../inc directory) and9library (libbearssl.a). This code will validate the server10certificate against two hardcoded trust anchors.1112server_basic.c1314A sample SSL server, that serves one client at a time. It reads a15single HTTP request (that it does not really parse; it just waits for16the two successive line endings that mark the end of the request),17and pushes a basic response.1819Compile it against BearSSL headers (in the ../inc directory) and20library (libbearssl.a). Depending on compilation options (see the21code), it will use one of several certificate chains, that exercise22various combinations of RSA and EC keys and signatures. These23certificate chains link to the trust anchors that are hardcoded24in client_basic.c, so the sample client and the sample server can25be tested against each other.2627custom_profile.c2829A sample C source file that shows how to write your own client or30server profiles (selections of cipher suites and algorithms).313233The .pem files are certificate and keys corresponding to the chains34and anchors used by the sample client and server. They are provided35for reference only; these files are not used by the examples.363738