|
22 | 22 | /* This example showcases the usage of the TLS 1.3 certificate_authorities |
23 | 23 | * extension in the ClientHello message, to indicate to the server which |
24 | 24 | * certificate authorities the client supports, guiding certificate selection. |
| 25 | + * |
| 26 | + * Example wolfSSL config for this example: ./configure --enable-opensslall |
25 | 27 | */ |
26 | 28 |
|
27 | 29 | /* the usual suspects */ |
|
54 | 56 | #define KEY_FILE "../certs/server-key.pem" |
55 | 57 | #define CA_FILE "../certs/client-cert.pem" |
56 | 58 |
|
| 59 | +#if !defined(NO_WOLFSSL_CLIENT) && !defined(NO_WOLFSSL_SERVER) && \ |
| 60 | + !defined(WOLFSSL_NO_CA_NAMES) && !defined(NO_CERTS) && \ |
| 61 | + defined(WOLFSSL_TLS13) && (defined(OPENSSL_EXTRA) || \ |
| 62 | + defined(OPENSSL_EXTRA_X509_SMALL)) && (defined(OPENSSL_ALL) || \ |
| 63 | + defined(WOLFSSL_NGINX) || defined(HAVE_LIGHTY)) && \ |
| 64 | + LIBWOLFSSL_VERSION_HEX > 0x05008002 |
57 | 65 |
|
58 | 66 | static int mSockfd = SOCKET_INVALID; |
59 | 67 | static int mConnd = SOCKET_INVALID; |
@@ -138,11 +146,18 @@ static int cert_setup_callback(WOLFSSL *ssl, void *_arg) { |
138 | 146 | } |
139 | 147 | return 1; |
140 | 148 | } |
| 149 | +#endif |
141 | 150 |
|
142 | 151 | int main(int argc, char** argv) |
143 | 152 | { |
144 | 153 | int ret = 0; |
145 | | -#ifdef WOLFSSL_TLS13 |
| 154 | +#if !defined(NO_WOLFSSL_CLIENT) && !defined(NO_WOLFSSL_SERVER) && \ |
| 155 | + !defined(WOLFSSL_NO_CA_NAMES) && !defined(NO_CERTS) && \ |
| 156 | + defined(WOLFSSL_TLS13) && (defined(OPENSSL_EXTRA) || \ |
| 157 | + defined(OPENSSL_EXTRA_X509_SMALL)) && (defined(OPENSSL_ALL) || \ |
| 158 | + defined(WOLFSSL_NGINX) || defined(HAVE_LIGHTY)) && \ |
| 159 | + LIBWOLFSSL_VERSION_HEX > 0x05008002 |
| 160 | + |
146 | 161 | struct sockaddr_in servAddr; |
147 | 162 | struct sockaddr_in clientAddr; |
148 | 163 | socklen_t size = sizeof(clientAddr); |
@@ -319,7 +334,7 @@ int main(int argc, char** argv) |
319 | 334 | wolfSSL_Cleanup(); /* Cleanup the wolfSSL environment */ |
320 | 335 |
|
321 | 336 | #else |
322 | | - printf("Example requires TLS v1.3\n"); |
| 337 | + printf("Example requires specific wolfSSL features\n"); |
323 | 338 | #endif /* WOLFSSL_TLS13 */ |
324 | 339 |
|
325 | 340 | (void)argc; |
|
0 commit comments