Skip to content

Commit 72a39e2

Browse files
committed
Add info in readme, remove wolfSSL version check
1 parent 7719ffc commit 72a39e2

4 files changed

Lines changed: 36 additions & 10 deletions

File tree

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ android/wolfssljni-ndk-sample/proguard-project.txt
115115
/tls/server-tls-uart
116116
/tls/server-tls-verifycallback
117117
/tls/server-tls-writedup
118-
/tls/client-tls13-certauth-c2s
119-
/tls/server-tls13-certauth-c2s
118+
/tls/client-tls13-certauth-clienthello
119+
/tls/server-tls13-certauth-clienthello
120120
/tls/client-ech
121121
/tls/client-ech-local
122122
/tls/server-ech-local

tls/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,35 @@ Execute them like so:
14131413
./server-tls-posthsauth 127.0.0.1
14141414
```
14151415

1416+
## TLS Example with certificate_authorities extension in ClientHello message
1417+
1418+
See `client-tls13-certauth-clienthello.c` and `server-tls13-certauth-clienthello.c`. These applications show how to use the TLS 1.3 [certificate_authorities](https://datatracker.ietf.org/doc/html/rfc8446#section-4.2.4) extension to let the client send the names of its supported certificate authorities inside the ClientHello message, so that the server can perform certificate selection based on them. This can be useful in scenarios where the server has multiple certificates issued by separate CAs.
1419+
1420+
To use this example, you must enable full OpenSSL compatibility. Build and install wolfSSL like so:
1421+
1422+
```
1423+
$ ./autogen.sh
1424+
$ ./configure --enable-opensslall
1425+
$ make
1426+
$ sudo make install
1427+
```
1428+
1429+
Then build the examples as follows:
1430+
1431+
```
1432+
make client-tls13-certauth-clienthello server-tls13-certauth-clienthello
1433+
```
1434+
1435+
Execute them like so:
1436+
1437+
```
1438+
./server-tls13-certauth-clienthello
1439+
```
1440+
1441+
```
1442+
./client-tls13-certauth-clienthello 127.0.0.1
1443+
```
1444+
14161445
## Support
14171446

14181447
Please contact wolfSSL at support@wolfssl.com with any questions, bug fixes,
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* client-tls13-certauth-c2s.c
1+
/* client-tls13-certauth-clienthello.c
22
*
33
* Copyright (C) 2006-2025 wolfSSL Inc.
44
*
@@ -58,8 +58,7 @@ int main(int argc, char** argv)
5858
!defined(WOLFSSL_NO_CA_NAMES) && !defined(NO_CERTS) && \
5959
defined(WOLFSSL_TLS13) && (defined(OPENSSL_EXTRA) || \
6060
defined(OPENSSL_EXTRA_X509_SMALL)) && (defined(OPENSSL_ALL) || \
61-
defined(WOLFSSL_NGINX) || defined(HAVE_LIGHTY)) && \
62-
LIBWOLFSSL_VERSION_HEX > 0x05008002
61+
defined(WOLFSSL_NGINX) || defined(HAVE_LIGHTY))
6362

6463
int sockfd = SOCKET_INVALID;
6564
struct sockaddr_in servAddr;
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* server-tls13-certauth-c2s.c
1+
/* server-tls13-certauth-clienthello.c
22
*
33
* Copyright (C) 2006-2025 wolfSSL Inc.
44
*
@@ -60,8 +60,7 @@
6060
!defined(WOLFSSL_NO_CA_NAMES) && !defined(NO_CERTS) && \
6161
defined(WOLFSSL_TLS13) && (defined(OPENSSL_EXTRA) || \
6262
defined(OPENSSL_EXTRA_X509_SMALL)) && (defined(OPENSSL_ALL) || \
63-
defined(WOLFSSL_NGINX) || defined(HAVE_LIGHTY)) && \
64-
LIBWOLFSSL_VERSION_HEX > 0x05008002
63+
defined(WOLFSSL_NGINX) || defined(HAVE_LIGHTY))
6564

6665
static int mSockfd = SOCKET_INVALID;
6766
static int mConnd = SOCKET_INVALID;
@@ -155,8 +154,7 @@ int main(int argc, char** argv)
155154
!defined(WOLFSSL_NO_CA_NAMES) && !defined(NO_CERTS) && \
156155
defined(WOLFSSL_TLS13) && (defined(OPENSSL_EXTRA) || \
157156
defined(OPENSSL_EXTRA_X509_SMALL)) && (defined(OPENSSL_ALL) || \
158-
defined(WOLFSSL_NGINX) || defined(HAVE_LIGHTY)) && \
159-
LIBWOLFSSL_VERSION_HEX > 0x05008002
157+
defined(WOLFSSL_NGINX) || defined(HAVE_LIGHTY))
160158

161159
struct sockaddr_in servAddr;
162160
struct sockaddr_in clientAddr;

0 commit comments

Comments
 (0)