NetBurner 3.5.0
PDF Version
 
SSL/TLS Client

SSL/TLS Client Example

This example demonstrates how SSL/TLS Client connections can be made. It will attempt to connect to the specified SSL Server and keep track of the number successful and failed attempts. Status messages will be sent to both the SSL/TLS Server, and to the serial debug port on the NetBurner device.

You must modify the SSL_SERVER_NAME to match your SSL Server device.

Testing: One method of testing a SSL/TLS client is to use openssl s_client. A typical command to start the server at the time of this writing is: openssl s_server -accept 4433 -cert Server.crt -key Server.key

Where you supply the .crt and .key files created by the NetBurner tools, OpenSSL, or through a Certificate Authority. For more information please refer to the openssl s_server documentation online.

Certificate checking is disabled by default. To enable certificate checking you must:

  1. Include a CA certificate list in your project
  2. Uncomment #define NB_SSL_CLIENT_CERTIFICATE_CHECKING_ENABLED in sslclient.cpp
  3. Rebuild the system libraries