Skip to content

Commit ccfd909

Browse files
Merge pull request #378 from tim-weller-wolfssl/example-updates
wolfSSL example updates based on testing with wolfSSL v5.5.4-stable
2 parents 9688f1b + 013a6da commit ccfd909

33 files changed

Lines changed: 207 additions & 102 deletions

SE050/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ written for and tested on a Raspberry Pi with NXP SE050 EdgeLock development
88
kit.
99

1010
For complete details on wolfSSL's support for NXP SE050, see
11-
[README_SE050.md](https://www.github.com/wolfssl/wolfssl/wolfcrypt/src/port/nxp/README_SE050.md).
11+
[README_SE050.md](https://www.github.com/wolfssl/wolfssl/tree/master/wolfcrypt/src/port/nxp/README_SE050.md).
1212
That document also describes how to download, build, and compile the SE05x
1313
Middleware. It should be followed first before moving on to installing and
1414
running these examples.

certgen/certgen_ca_example.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@
3030

3131
#ifdef WOLFSSL_CAAM
3232
#include <wolfssl/wolfcrypt/port/caam/wolfcaam.h>
33+
static int devId = WOLFSSL_CAAM_DEVID;
34+
#else
35+
static int devId = INVALID_DEVID;
3336
#endif
3437

3538
#if defined(WOLFSSL_CERT_REQ) && defined(WOLFSSL_CERT_GEN) && \
3639
defined(WOLFSSL_KEY_GEN) && defined(HAVE_ECC)
3740

3841
#define HEAP_HINT NULL
3942
#define LARGE_TEMP_SZ 4096
40-
static int devId = WOLFSSL_CAAM_DEVID;
4143

4244
static int do_cagen(int argc, char** argv)
4345
{

certmanager/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ in a standalone manner, separate from an SSL/TLS connection.
88
## Compiling and Running the Example
99

1010
```
11+
$ ./configure --enable-opensslextra
1112
$ make
1213
$ ./certverify
1314
```

crypto/3des/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ How to use 3des-file-encrypt.c
55
b. In the crypto/3des directory run the Makefile by typing 'make'.
66
2) Make a file to encode. Can be any file (ex. .txt .in .out .file etc.)
77
3) run the executable, for help run with -h flag. Basic command is as follows:
8-
./3des-file-encrypt <-option> <KeySize> <input.file> <output.file>
8+
./3des-file-encrypt <-option> <KeySize> -i <input.file> -o <output.file>
99

1010
KeySize examples: 56, 112, or 168
1111

crypto/aes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ How to use aes-file-encrypt.c
66
2) Make a file to encode. Can be any file (ex. .txt .in .out .file etc.)
77
3) run the executable, for help run with -h flag. Basic command is as follows:
88

9-
./aes-file-encrypt <-option> <KeySize> <input.file> <output.file>
9+
./aes-file-encrypt <-option> <KeySize> -i <input.file> -o <output.file>
1010

1111
KeySize (in bits) allowed values: 128, 192, 256
1212

crypto/camellia/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ How to use camellia-encrypt.c
66
2) Make a file to encode. Can be any file (ex. .txt .in .out .file etc.)
77
3) run the executable, for help run with -h flag. Basic command is as follows:
88

9-
./camellia-encrypt <-option> <input.file> <KeySize> <output.file>
9+
./camellia-encrypt <option> <KeySize> -i <input.file> -o <output.file>
1010

1111
KeySize examples: 128, 192, 256
1212

custom-io-callbacks/README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,26 @@ Other transports might be:
1313
These examples use the wolfSSL Custom IO Callbacks to read and write to the file
1414
system and perform a successful handshake.
1515

16-
The configuration used for these examples:
16+
Building the examples:
1717

18-
`./configure --enable-debug`
18+
From the wolfssl directory:
19+
```
20+
./configure --enable-debug
21+
sudo make install
22+
```
1923

20-
Debug was enabled in case a user wishes to use the verbose flag to see what is
21-
happening in real time:
24+
**NOTE:** Debug was enabled in case a user wishes to use the verbose flag to see
25+
what is happening in real time:
26+
27+
From the file-server directory:
28+
```
29+
make
30+
```
31+
32+
From the file-client directory:
33+
```
34+
make
35+
```
2236

2337
Usage examples:
2438

dtls/client-dtls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main (int argc, char** argv)
5656

5757
/* Program argument checking */
5858
if (argc != 2) {
59-
printf("usage: udpcli <IP address>\n");
59+
printf("usage: %s <IP address>\n", argv[0]);
6060
return 1;
6161
}
6262

ecc/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### Build and install wolfSSL
66

77
```
8-
./configure --enable-ecc --enable-ecccustcurves CFLAGS="-DWOLFSSL_TEST_CERT -DWOLFSSL_DER_TO_PEM -DHAVE_ECC_KOBLITZ" && make && sudo make install
8+
./configure --enable-ecc --enable-ecccustcurves CFLAGS="-DWOLFSSL_TEST_CERT -DWOLFSSL_DER_TO_PEM -DHAVE_ECC_KOBLITZ -DWOLFSSL_PUBLIC_MP" && make && sudo make install
99
```
1010

1111
### Build Example
@@ -119,7 +119,7 @@ This example demonstrates using a Koblitz (SECP256K1) curve.
119119
hash_firmware_verify: 0
120120
```
121121

122-
### `ecc-key-decode`
122+
### `ecc-key-export`
123123

124124
This example shows exporting an ECC private key and public key.
125125

ocsp/ocsp_nonblock/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,12 @@ Ret = 1: success
3535

3636
## OCSP non-blocking Async example
3737

38-
This uses your system certificate chain to demonstrate validating revocation status using an OCSP
39-
public server with wolfSSL's Asynchronous crypto.
38+
This uses your system certificate chain to demonstrate validating revocation status using an OCSP
39+
public server with wolfSSL's Asynchronous cryptography support. i
40+
41+
**NOTE:** Before building this example the asynchronous support must be obtained from
42+
(https://github.com/wolfSSL/wolfAsyncCrypt) and installed into wolfSSL by following the
43+
instructions in the *README* file contained in the wolfAsyncCrypt repository.
4044

4145
The example uses youtube.com as the public server.
4246

0 commit comments

Comments
 (0)