Daniel Pouzzner a3fb5029f8 clean up trailing whitespace and misplaced CRLFs, add missing final newlines, remove stray UTF8 nonprintables (BOMs) and ASCIIfy stray homoglyphs (spaces and apostrophes), guided by expanded coverage in wolfssl-multi-test check-source-text. | 3 mesiacov pred | |
---|---|---|
.. | ||
client | 3 mesiacov pred | |
server | 3 mesiacov pred | |
shared | 5 rokov pred | |
wolfcrypt_test | 5 rokov pred | |
README.md | 5 rokov pred | |
include.am | 4 rokov pred | |
user_settings.h | 4 mesiacov pred | |
wolfssl.sln | 5 rokov pred | |
wolfssl.vcxproj | 2 rokov pred |
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.
Setup your Azure Sphere device. Install Azure Sphere Set up an account Claim your device Configure networking
Open the wolfssl Microsoft Visual Studio Solution
Build All the Projects
Solution 'wolfssl' (4 of 4 projects)
Build Solution
Connect your Azure Sphere MT3620 Development Board using USB.
Run the wolfCrypt Library Test
wolfcrypt_test (Azure Sphere)
Debug->'Start new instance'.
Wait for the wolfCrypt Library Test to finish.
Test the client.
Debug->'Start new instance'
It's OK if the HTTP GET request returns an error. The TLS connection was successful.
Test the server.
Debug->'Start new instance'
Run the following wolfSSL example client command inside wolfssl directory.
./examples/client/client -h "Server IP Address" -p 11111 -A ./certs/ca-cert.pem
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:
./examples/server/server -b -d -p 11111 -c ./certs/server-cert.pem -k ./certs/server-key.pem
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:
./scripts/dertoc.pl ./certs/server-cert.der server_cert_der_2048 dertoc.c
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:
./examples/client/client -h "Server IP Address" -p 11111 -A ./certs/ca-cert.pem
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
.
Ensure your Azure Sphere MT3620 Development Board was set up using the instructions using the Azure Sphere Documentation (See Link Below). This includes claiming your device, updating device, setting up networking, and prepping for debug.
The commands for the example client/server assumes it is being run from the base directory of wolfssl.