You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory contains a standalone example demonstrating OCSP stapling with dynamic certificate selection and verification. Both a client and a server are provided, along with the necessary certificates and a Makefile for building the example. The certificates are taken from the wolfSSL test suite.
4
+
5
+
## Directory Structure
6
+
7
+
-`ocsp-server.c` — Example TLS server with OCSP stapling support.
8
+
-`ocsp-client.c` — Example TLS client that verifies OCSP staples.
9
+
-`Makefile` — Build instructions for the example programs.
10
+
-`client-certs/` — CA and intermediate certificates for client verification.
11
+
-`server-certs/` — Server certificate and private key.
12
+
-`responder-certs/` — OCSP responder certificate, key, and index file.
13
+
14
+
## Prerequisites
15
+
16
+
- wolfSSL library installed (headers and libraries in `/usr/local` by default).
17
+
- OpenSSL (for running a local OCSP responder).
18
+
- GNU Make and GCC.
19
+
20
+
## Building
21
+
22
+
To build both the server and client, simply run:
23
+
24
+
```sh
25
+
make
26
+
```
27
+
28
+
This will produce two binaries: `ocsp-server` and `ocsp-client`.
29
+
30
+
## Running the Example
31
+
32
+
### 1. Start the OCSP Responder
33
+
34
+
From the `stapling` directory, run:
35
+
36
+
```sh
37
+
make responder
38
+
```
39
+
40
+
### 2. Start the Server
41
+
42
+
```sh
43
+
./ocsp-server
44
+
```
45
+
46
+
### 3. Run the Client
47
+
48
+
In a separate terminal, run either:
49
+
50
+
```sh
51
+
./ocsp-client --tls12
52
+
```
53
+
or
54
+
```sh
55
+
./ocsp-client --tls13
56
+
```
57
+
58
+
## Notes
59
+
60
+
- The server listens on `127.0.0.1:11111`.
61
+
- The OCSP responder listens on `127.0.0.1:22221`.
62
+
- Certificates are pre-generated for demonstration purposes.
63
+
- The client and server demonstrate both automatic and manual OCSP staple verification.
0 commit comments