• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..10-Feb-2022-

client/H10-Feb-2022-357271

server/H10-Feb-2022-336225

shared/H10-Feb-2022-6249

wolfcrypt_test/H10-Feb-2022-102101

README.mdH A D10-Feb-20225.2 KiB146101

include.amH A D10-Feb-2022898 2018

user_settings.hH A D10-Feb-20221.6 KiB7153

wolfssl.slnH A D10-Feb-20222.8 KiB5351

wolfssl.vcxprojH A D10-Feb-20227.6 KiB137136

README.md

1wolfSSL for Microsoft Azure Sphere Devices
2==========================================
3
4## Description
5This directory contains the Visual Studio projects targeted for Azure Sphere.
6The example projects include a client, server and wolfCrypt Library Test.
7Each of these projects relies on the wolfSSL static library project.
8Each project uses `user_settings.h` for to enable and disable features.
9
10
11### Set Up Steps
120. Setup your Azure Sphere device.
13   [Install Azure Sphere](https://docs.microsoft.com/en-us/azure-sphere/install/install)
14   [Set up an account](https://docs.microsoft.com/en-us/azure-sphere/install/azure-directory-account)
15   [Claim your device](https://docs.microsoft.com/en-us/azure-sphere/install/claim-device)
16   [Configure networking](https://docs.microsoft.com/en-us/azure-sphere/install/configure-wifi)
17
181. Open the wolfssl Microsoft Visual Studio Solution
19
202. Build All the Projects
21    + Right Click: `Solution 'wolfssl' (4 of 4 projects)`
22    + Click: `Build Solution`
23
243. Connect your Azure Sphere MT3620 Development Board using USB.
25
264. Run the wolfCrypt Library Test
27    + Right Click: `wolfcrypt_test (Azure Sphere)`
28    + Click: `Debug->'Start new instance'.`
29
305. Wait for the wolfCrypt Library Test to finish.
31
326. Test the client.
33    + Run client(Azure Sphere) using: `Debug->'Start new instance'`
34
35It's OK if the HTTP GET request returns an error.
36The TLS connection was successful.
37
387. Test the server.
39    + Run server(Azure Sphere) using: `Debug->'Start new instance'`
40    + Run the following wolfSSL example client command inside wolfssl directory.
41
42```
43./examples/client/client -h "Server IP Address" -p 11111 -A ./certs/ca-cert.pem
44```
45
46### Client
47The client project has defines in `user_settings.h` for:
48`SERVER_IP`, `CERT`, `SIZEOF_CERT`, `DEFAULT_PORT` and `msg`.
49These are set by default to connect to `www.wolfssl.com`.
50
51If `CUSTOM_SERVER_CONNECTION` is defined then the client would be ready to connect
52to a example server at an IP address of `192.168.1.200`.
53The example server could be started with the following command:
54
55```
56./examples/server/server -b -d -p 11111 -c ./certs/server-cert.pem -k ./certs/server-key.pem
57```
58
59Server Options Explanation:
60`    -b          Bind to any interface instead of localhost only`
61`    -c <file>   Certificate file, default ./certs/server-cert.pem`
62`    -d          Disable client cert check`
63`    -k <file>   Key file, default ./certs/server-key.pem`
64`    -p <num>    Port to listen on, not 0, default 11111`
65`    -? <num>    Help, print this usage`
66
67
68This command assumes that you're in the base directory of 'wolfssl' and it has
69been configured and compiled on a computer with an IP address of `192.168.1.200`.
70Change `SERVER_IP` under `CUSTOM_SERVER_CONNECTION` in `user_settings.h`
71accordingly.
72
73If you would like to connect to a website on the internet other then
74`www.wolfssl.com` then you would need to put it's corresponding CA certificate
75in `client.h` similarly to `wolfssl_website_root_ca`.
76
77The `CERT` and `SIZEOF_CERT` array could be created using the `dertoc.pl`
78script under `wolfssl/scripts/dertoc.pl`.
79
80Usage Example:
81
82```
83./scripts/dertoc.pl ./certs/server-cert.der server_cert_der_2048 dertoc.c
84```
85
86You would then copy the generated output from `dertoc.c` into `client.h` and set
87CERT and `SIZEOF_CERT` accordingly inside `user_settings.h`.
88The IP address of the server to connect to also needs to be added to the client's
89`app_manifest.json` under 'AllowedConnections'.  There are IP addresses in the
90default `app_manifest.json` for testing purposes and can be removed if not needed.
91
92
93### Server
94The Server application will wait for any incoming client connections once built
95and uploaded to the MT3620 Development board.
96
97The following wolfSSL example client can connect to a server on the MT3620 board:
98
99```
100./examples/client/client -h "Server IP Address" -p 11111 -A ./certs/ca-cert.pem
101```
102
103Client Options Explanation:
104`    -A <file>   Certificate Authority file, default ./certs/ca-cert.pem`
105`    -h <host>   Host to connect to, default 127.0.0.1`
106`    -p <num>    Port to listen on, not 0, default 11111`
107`    -? <num>    Help, print this usage`
108
109
110### wolfCrypt Test
111This tests the wolfCrypt Library.
112This is a good test to run if you change the options in `user_settings.h`.
113
114
115### Troubleshooting
116* Ensure your Azure Sphere MT3620 Development Board was set up using the
117  instructions using the Azure Sphere Documentation (See Link Below).
118  This includes claiming your device, updating device, setting up networking,
119  and prepping for debug.
120
121* The commands for the example client/server assumes it is being run from the
122  base directory of wolfssl.
123
124[Azure Sphere Documentation](https://docs.microsoft.com/en-us/azure-sphere/)
125
126[Support Forum](https://www.wolfssl.com/forums/)
127
128[Support Email](support@wolfssl.com)
129
130
131### Resources
132
133[wolfSSL Website](https://www.wolfssl.com/)
134
135[wolfSSL Wiki](https://github.com/wolfSSL/wolfssl/wiki)
136
137[wolfSSL Manual](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-toc.html)
138
139[wolfSSL API Reference]
140(https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html)
141
142[wolfCrypt API Reference]
143(https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-wolfcrypt-api-reference.html)
144
145[TLS 1.3](https://www.wolfssl.com/docs/tls13/)
146