@@ -84,13 +84,105 @@ $ sudo make install
8484
8585Note: A custom install location can be specified using: ` ./configure --prefix=/opt/local `
8686
87- ## Running ETSI Example
87+ ## Key Manager and ETSI Client Command Line Help
8888
89+ Help using ` -? ` :
90+
91+ ``` sh
92+ $ ./src/wolfkeymgr -?
93+ wolfKeyManager 0.3
94+ -? Help, print this usage
95+ -i Don' t chdir / in daemon mode
96+ -b Daemon mode, run in background
97+ -p <str> Pid File name, default ./wolfkeymgr.pid
98+ -l <num> Log Level (1=Error to 4=Debug), default 4
99+ -f <str> Log file name, default None
100+ -o <num> Max open files, default 1024
101+ -s <num> Seconds to timeout, default 60
102+ -t <num> Thread pool size, default 48
103+ -d TLS Disable Mutual Authentication
104+ -k <pem> TLS Server TLS Key, default ./certs/server-key.pem
105+ -w <pass> TLS Server Key Password, default wolfssl
106+ -c <pem> TLS Server Certificate, default ./certs/server-cert.pem
107+ -c <pem> TLS CA Certificate, default ./certs/ca-cert.pem
89108```
90- $ ./src/wolfkeymgr
91- $ ./examples/etsi_client/etsi_client
109+
110+ ```sh
111+ $ ./examples/etsi_client/etsi_client -?
112+ etsi_client 0.3
113+ -? Help, print this usage
114+ -e Error mode, force error response
115+ -h <str> Host to connect to, default localhost
116+ -p <num> Port to connect to, default 8119
117+ -t <num> Thread pool size (stress test), default 0
118+ -l <num> Log Level (1=Error to 4=Debug), default 4
119+ -r <num> Requests per thread, default 100
120+ -f <file> <file> to store ETSI response
121+ -g Use HTTP GET (default is Push with HTTP PUT)
122+ -s <sec> Timeout seconds (default 10)
123+ -k <pem> TLS Client TLS Key, default certs/client-key.pem
124+ -w <pass> TLS Client Key Password, default wolfssl
125+ -c <pem> TLS Client Certificate, default certs/client-cert.pem
126+ -A <pem> TLS CA Certificate, default ./certs/ca-cert.pem
127+
92128```
93129
130+ ## Running the Key Manager and ETSI client
131+
132+ ```sh
133+ # Start Key Manager with Log Level 3 (Info) and two worker threads
134+ $ ./src/wolfkeymgr -l 3 -t 2
135+ Feb 24 16:24:04 2021: [INFO] Starting Key Manager
136+ Feb 24 16:24:04 2021: [INFO] Binding listener :::8119
137+ Feb 24 16:24:04 2021: [WARNING] Generating new ECC key (index 0)
138+ Feb 24 16:24:04 2021: [INFO] loaded CA certificate file ./certs/ca-cert.pem
139+ Feb 24 16:24:04 2021: [INFO] loaded key file ./certs/server-key.pem
140+ Feb 24 16:24:04 2021: [INFO] loaded certificate file ./certs/server-cert.pem
141+ Feb 24 16:24:04 2021: [INFO] Setting up new ETSI conn item pool
142+ Feb 24 16:24:04 2021: [INFO] Growing ETSI service conn pool
143+ Feb 24 16:24:04 2021: [INFO] Growing ETSI service conn pool
144+ Feb 24 16:24:11 2021: [INFO] Accepted a connection, sent to thread 0
145+ Feb 24 16:24:11 2021: [INFO] New ETSI service conn
146+ Feb 24 16:24:11 2021: [INFO] Got ETSI Request (103 bytes)
147+ Feb 24 16:24:11 2021: [INFO] Creating connection context
148+ Feb 24 16:24:11 2021: [INFO] Sent ETSI Response (194 bytes)
149+ Feb 24 16:24:11 2021: [INFO] EventCb what = 17
150+ Feb 24 16:24:11 2021: [INFO] Peer ended connection, closing
151+
152+ ^C
153+ Feb 24 16:24:15 2021: [INFO] SIGINT handled.
154+ Feb 24 16:24:15 2021: [INFO] Ending main thread loop
155+ Feb 24 16:24:15 2021: [INFO] Sending cancel to threads
156+ Feb 24 16:24:15 2021: [INFO] Joining threads
157+ Feb 24 16:24:15 2021: [INFO] Worker thread exiting, tid = 140694064588352
158+ Feb 24 16:24:15 2021: [INFO] Worker thread exiting, tid = 140694056195648
159+ Feb 24 16:24:15 2021: [INFO] Done with main thread dispatching
160+ Feb 24 16:24:15 2021: [ERROR] Current stats:
161+ total connections = 1
162+ completed = 1
163+ timeouts = 0
164+ current connections = 0
165+ max concurrent = 1
166+ uptime in seconds = 11
167+ average response(ms) = 0.046
168+ Feb 24 16:24:15 2021: [INFO] Exit Key Manager (ret 0)
169+
170+
171+ # Start ETSI client with single GET request
172+ $ ./examples/etsi_client/etsi_client -l 3 -g
173+ Feb 24 16:24:11 2021: [INFO] Starting client
174+ Feb 24 16:24:11 2021: [INFO] Connected to ETSI service
175+ Feb 24 16:24:11 2021: [INFO] Sent single get request (103 bytes)
176+ Feb 24 16:24:11 2021: [INFO] Got ETSI response (121 bytes)
177+ Feb 24 16:24:11 2021: [INFO] Pub X: 4958C92FCF1D0C51A1969370B2CB2E846F25A3FBB5B9621020B338E7CCA8C53F
178+ Feb 24 16:24:11 2021: [INFO] Pub Y: 3EE0E7AF506A86380D11450A39BF3561917824F3A8BEC44AEF3B83C25F058DF9
179+ ```
180+
181+ ## Stress Testing ETSI Server / Client
182+
183+ * Use the thread pool "-t" to spin up more threads.
184+ * Use the ETSI client "-r" to make additional requests per thread.
185+
94186
95187## ETSI (Enterprise Transport Security)
96188
@@ -149,8 +241,7 @@ See Recommendation ITU-T X.509 (10/2016) | ISO/IEC 9594-8: "Information technolo
149241
150242## Outstanding Features
151243
152- 1 ) Add TLS mutual authentication to ETSI example.
153- 2 ) Add example for HTTP server "VisibilityInformation" extension.
244+ 1) Add example for HTTP server "VisibilityInformation" extension.
154245
155246## Support
156247
0 commit comments