From 013a6da63d092377a62d46e001dadaa7d3c856f1 Mon Sep 17 00:00:00 2001 From: tim-weller-wolfssl Date: Wed, 15 Mar 2023 11:18:30 -0500 Subject: [PATCH] Phase 1 updates to wolfSSL examples based on testing with wolfSSL release v5.5.4-stable. Changes include minor build fixes and README updates. --- SE050/README.md | 2 +- certgen/certgen_ca_example.c | 4 +- certmanager/README.md | 1 + crypto/3des/README.md | 2 +- crypto/aes/README.md | 2 +- crypto/camellia/README.md | 2 +- custom-io-callbacks/README.md | 22 ++++++-- dtls/client-dtls.c | 2 +- ecc/README.md | 4 +- ocsp/ocsp_nonblock/README.md | 8 ++- ocsp/ocsp_nonblock/google.pem | 54 +++++++++---------- ocsp/ocsp_nonblock/ocsp_nonblock_async.c | 4 +- picotcp/README.md | 4 +- pk/rsa-kg/rsa-kg-sv.c | 8 +-- pkcs7/README.md | 8 +-- psk/README.md | 67 +++++++++++++++--------- psk/server-psk-nonblocking.c | 1 + psk/server-psk-threaded.c | 2 + psk/server-psk-tls13-multi-id.c | 1 + psk/server-psk.c | 1 + signature/rsa_buffer/README.md | 33 +++++++----- signature/rsa_vfy_only/Makefile | 4 +- signature/rsa_vfy_only/README.md | 28 ++++++---- signature/sigtest/README.md | 2 + tls/README.md | 35 ++++++++++++- tls/server-tls-callback.c | 1 + tls/server-tls-ecdhe.c | 1 + tls/server-tls-nonblocking.c | 1 + tls/server-tls-pkcallback.c | 1 + tls/server-tls-threaded.c | 2 + tls/server-tls-verifycallback.c | 3 +- tls/server-tls-writedup.c | 2 +- tls/server-tls.c | 1 + 33 files changed, 209 insertions(+), 104 deletions(-) diff --git a/SE050/README.md b/SE050/README.md index d979069c..874a0cd0 100644 --- a/SE050/README.md +++ b/SE050/README.md @@ -8,7 +8,7 @@ written for and tested on a Raspberry Pi with NXP SE050 EdgeLock development kit. For complete details on wolfSSL's support for NXP SE050, see -[README_SE050.md](https://www.github.com/wolfssl/wolfssl/wolfcrypt/src/port/nxp/README_SE050.md). +[README_SE050.md](https://www.github.com/wolfssl/wolfssl/tree/master/wolfcrypt/src/port/nxp/README_SE050.md). That document also describes how to download, build, and compile the SE05x Middleware. It should be followed first before moving on to installing and running these examples. diff --git a/certgen/certgen_ca_example.c b/certgen/certgen_ca_example.c index 534a2e87..df2e9564 100644 --- a/certgen/certgen_ca_example.c +++ b/certgen/certgen_ca_example.c @@ -30,6 +30,9 @@ #ifdef WOLFSSL_CAAM #include + static int devId = WOLFSSL_CAAM_DEVID; +#else + static int devId = INVALID_DEVID; #endif #if defined(WOLFSSL_CERT_REQ) && defined(WOLFSSL_CERT_GEN) && \ @@ -37,7 +40,6 @@ #define HEAP_HINT NULL #define LARGE_TEMP_SZ 4096 -static int devId = WOLFSSL_CAAM_DEVID; static int do_cagen(int argc, char** argv) { diff --git a/certmanager/README.md b/certmanager/README.md index 281fa10f..e927f60e 100644 --- a/certmanager/README.md +++ b/certmanager/README.md @@ -8,6 +8,7 @@ in a standalone manner, separate from an SSL/TLS connection. ## Compiling and Running the Example ``` +$ ./configure --enable-opensslextra $ make $ ./certverify ``` diff --git a/crypto/3des/README.md b/crypto/3des/README.md index 862bba6b..9a494869 100644 --- a/crypto/3des/README.md +++ b/crypto/3des/README.md @@ -5,7 +5,7 @@ How to use 3des-file-encrypt.c b. In the crypto/3des directory run the Makefile by typing 'make'. 2) Make a file to encode. Can be any file (ex. .txt .in .out .file etc.) 3) run the executable, for help run with -h flag. Basic command is as follows: - ./3des-file-encrypt <-option> + ./3des-file-encrypt <-option> -i -o KeySize examples: 56, 112, or 168 diff --git a/crypto/aes/README.md b/crypto/aes/README.md index 4c5360f5..5a11da32 100644 --- a/crypto/aes/README.md +++ b/crypto/aes/README.md @@ -6,7 +6,7 @@ How to use aes-file-encrypt.c 2) Make a file to encode. Can be any file (ex. .txt .in .out .file etc.) 3) run the executable, for help run with -h flag. Basic command is as follows: - ./aes-file-encrypt <-option> + ./aes-file-encrypt <-option> -i -o KeySize (in bits) allowed values: 128, 192, 256 diff --git a/crypto/camellia/README.md b/crypto/camellia/README.md index 7e675ef1..e201acb9 100644 --- a/crypto/camellia/README.md +++ b/crypto/camellia/README.md @@ -6,7 +6,7 @@ How to use camellia-encrypt.c 2) Make a file to encode. Can be any file (ex. .txt .in .out .file etc.) 3) run the executable, for help run with -h flag. Basic command is as follows: - ./camellia-encrypt <-option> + ./camellia-encrypt