
|
My Project
|
This directory contains the Visual Studio projects targeted for Azure Sphere. The example projects include a client, server and wolfCrypt Library Test. Each of these projects relies on the wolfSSL static library project. Each project uses user_settings.h for to enable and disable features.
Click:Build Solution`wolfcrypt_test (Azure Sphere)It's OK if the HTTP GET request returns an error. The TLS connection was successful.
The client project has defines in user_settings.h for: SERVER_IP, CERT, SIZEOF_CERT, DEFAULT_PORT and msg. These are set by default to connect to www.wolfssl.com.
If CUSTOM_SERVER_CONNECTION is defined then the client would be ready to connect to a example server at an IP address of 192.168.1.200. The example server could be started with the following command:
Server Options Explanation: -b Bind to any interface instead of localhost only -c <file> Certificate file, default ./certs/server-cert.pem -d Disable client cert check -k <file> Key file, default ./certs/server-key.pem -p <num> Port to listen on, not 0, default 11111 -? <num> Help, print this usage
This command assumes that you're in the base directory of 'wolfssl' and it has been configured and compiled on a computer with an IP address of 192.168.1.200. Change SERVER_IP under CUSTOM_SERVER_CONNECTION in user_settings.h accordingly.
If you would like to connect to a website on the internet other then www.wolfssl.com then you would need to put it's corresponding CA certificate in client.h similarly to wolfssl_website_root_ca.
The CERT and SIZEOF_CERT array could be created using the dertoc.pl script under wolfssl/scripts/dertoc.pl.
Usage Example:
You would then copy the generated output from dertoc.c into client.h and set CERT and SIZEOF_CERT accordingly inside user_settings.h. The IP address of the server to connect to also needs to be added to the client's app_manifest.json under 'AllowedConnections'. There are IP addresses in the default app_manifest.json for testing purposes and can be removed if not needed.
The Server application will wait for any incoming client connections once built and uploaded to the MT3620 Development board.
The following wolfSSL example client can connect to a server on the MT3620 board:
Client Options Explanation: -A <file> Certificate Authority file, default ./certs/ca-cert.pem -h <host> Host to connect to, default 127.0.0.1 -p <num> Port to listen on, not 0, default 11111 -? <num> Help, print this usage
This tests the wolfCrypt Library. This is a good test to run if you change the options in user_settings.h.
[wolfSSL API Reference] (https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html)
[wolfCrypt API Reference] (https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-wolfcrypt-api-reference.html)