diff --git a/wolfCLU/src/Intro.md b/wolfCLU/src/Intro.md index d7e3369e..7950f239 100644 --- a/wolfCLU/src/Intro.md +++ b/wolfCLU/src/Intro.md @@ -6,4 +6,4 @@ Nov, 24, 2021 ## Intro -wolfCLU was created to handle some common cryptographic operations to make it easier/quicker then writing an application from scratch. An example of some of the operations handled are certificate parsing and key generation. +wolfCLU was created to handle some common cryptographic operations to make it easier/quicker than writing an application from scratch. An example of some of the operations handled are certificate parsing and key generation. diff --git a/wolfCLU/src/bench.md b/wolfCLU/src/bench.md index a1f0a516..efc0d692 100644 --- a/wolfCLU/src/bench.md +++ b/wolfCLU/src/bench.md @@ -1,2 +1,2 @@ ### BENCH Command -Command in progress for benchmarking algorithms. Current use to run all algorithms would be "wolfssl bench -all". +Command in progress for benchmarking algorithms. To benchmark all algorithms run "wolfssl bench -all". diff --git a/wolfCLU/src/build.md b/wolfCLU/src/build.md index bbc54c34..c90bfd4c 100644 --- a/wolfCLU/src/build.md +++ b/wolfCLU/src/build.md @@ -1,7 +1,7 @@ ## Building wolfCLU ### Building on *NIX -To build wolfCLU first build wolfSSL with the --enable-wolfclu flag. An example of this would be: +To build wolfCLU, start by building wolfSSL with the --enable-wolfclu flag. An example of this would be: ``` cd wolfssl @@ -34,11 +34,11 @@ Run `make check` to run unit tests. ## Building on Windows -wolfCLU can also be built with its Visual Studios solution, wolfclu.sln. The solution provides both Debug and Release builds of Dynamic 32- or 64-bit libraries. The file `user_settings.h` should be used in the wolfSSL build to configure it. +wolfCLU can also be built with the appropriate Visual Studio solution, wolfclu.sln. The solution provides both Debug and Release builds of Dynamic 32- or 64-bit libraries. The file `user_settings.h` should be used in the wolfSSL build to configure it. The file `wolfclu\ide\winvs\user_settings.h` contains the settings used to configure wolfSSL with the appropriate settings. This file must be copied from the directory `wolfclu\ide\winvs` to `wolfssl\IDE\WIN`. You can then build wolfSSL with support for wolfCLU. -Before building wolfCLU, Make sure you have the same architecture (Win32 or x64) selected as used in wolfSSL. +Before building wolfCLU, make sure you have the same architecture (Win32 or x64) selected as used in wolfSSL. This project assumes that the wolfSSH and wolfSSL source directories are installed side-by-side and do not have the version number in their @@ -49,7 +49,7 @@ names: wolfssl\ ``` -Building wolfCLU a release configuration will generate `wolfssl.exe` in the +Building a wolfCLU release configuration will generate `wolfssl.exe` in the `Release\Win32` or `Release\x64` directory. #### Running Unit Tests diff --git a/wolfCLU/src/crl.md b/wolfCLU/src/crl.md index 9bfe4df5..175e8e25 100644 --- a/wolfCLU/src/crl.md +++ b/wolfCLU/src/crl.md @@ -1,5 +1,5 @@ ### CRL Command -Used to verify a CRL file given a CA. Or to convert a CRL from one format [DER | PEM] to the other. The command will also print out the CRL to stdout if -out is not specified and -noout is not used. Prints out "OK" on successful verification. +Used to verify a CRL file given a CA, or to convert a CRL from one format [DER | PEM] to the other. The command will print out the CRL to stdout if -out is not specified and -noout is not used. Prints out "OK" on successful verification. - [-CAfile] - [-inform] pem or der in format @@ -12,4 +12,4 @@ Example: ``` wolfssl crl -CAfile ./certs/ca-cert.pem -in ./certs/crl.der -inform DER -noout -``` \ No newline at end of file +``` diff --git a/wolfCLU/src/dhparam.md b/wolfCLU/src/dhparam.md index f380575a..ffb87c26 100644 --- a/wolfCLU/src/dhparam.md +++ b/wolfCLU/src/dhparam.md @@ -14,3 +14,4 @@ Example: ``` wolfssl dhparam -check -out dh.params 1024 +``` diff --git a/wolfCLU/src/dsaparam.md b/wolfCLU/src/dsaparam.md index 27080cd8..865d1343 100644 --- a/wolfCLU/src/dsaparam.md +++ b/wolfCLU/src/dsaparam.md @@ -13,5 +13,6 @@ Example: ``` wolfssl dsaparam -out dsa.params 1024 + wolfssl dsaparam -in dsa.params -genkey ``` diff --git a/wolfCLU/src/enc.md b/wolfCLU/src/enc.md index 457ba6c4..bbc3001a 100644 --- a/wolfCLU/src/enc.md +++ b/wolfCLU/src/enc.md @@ -1,6 +1,6 @@ ### ENC Command -Used for encrypting an input and with (-d) can decrypt also. +Used for encrypting an input. Setting -d enables decryption. Available encryption and decryption algorithms are: @@ -35,4 +35,4 @@ Example: ``` wolfssl enc -aes-128-cbc -k Thi$i$myPa$$w0rd -in somefile.txt -``` \ No newline at end of file +``` diff --git a/wolfCLU/src/md5.md b/wolfCLU/src/md5.md index 24fde3cf..b88880e3 100644 --- a/wolfCLU/src/md5.md +++ b/wolfCLU/src/md5.md @@ -1,15 +1,33 @@ ### MD5 Command -Used to create a MD5 hash of input data. The last argument is the file to be hashed, if a file argument is not used then stdin is pulled for data to be hashed. +Used to create an MD5 hash of input data. The last argument is the file to be hashed, if a file argument is not provided then stdin is used. Note that when using stdin the input must be provided upon calling wolfssl. A correct usage and incorrect usage of stdin are shown below: +Incorrect : -Example : +``` +wolfssl md5 +> hi +> +``` +Correct : + +``` +echo "hi" | wolfssl md5 +``` + +The reason the incorrect version is wrong is because no output will be received. This input method is used because it mimics the usage of OpenSSL's CLI, thus it encourages portability when switching from OpenSSL to WolfSSL. + + +Examples : ``` wolfssl md5 configure.ac + 978425cba5277d73db2a76d72b523d48 + ``` ``` echo "hi" | wolfssl md5 + 764efa883dda1e11db47671c4a3bbd9e -``` \ No newline at end of file +``` diff --git a/wolfCLU/src/pkcs12.md b/wolfCLU/src/pkcs12.md index 1526c28c..b5b8c3e3 100644 --- a/wolfCLU/src/pkcs12.md +++ b/wolfCLU/src/pkcs12.md @@ -1,5 +1,5 @@ ### PKCS12 Command -Currently only PKCS12 parsing is supported and PKCS12 generation is not yet supported. By default the --enable-wolfclu option used when building wolfSSL has PKCS12 support also enabled but it does not enable RC2. If parsing PKCS12 bundles that have been encrypted using RC2 then --enable-rc2 should also be used when compiling wolfSSL. +Currently only PKCS12 parsing is supported and PKCS12 generation is not yet supported. By default the --enable-wolfclu option used when building wolfSSL has PKCS12 support enabled but it does not enable RC2. If parsing PKCS12 bundles that have been encrypted using RC2 then --enable-rc2 should also be used when compiling wolfSSL. - [-in] file input for pkcs12 bundle - [-out] file to output results to (default stdout) @@ -12,5 +12,5 @@ Currently only PKCS12 parsing is supported and PKCS12 generation is not yet supp Example: ``` -./wolfssl pkcs12 -nodes -passin pass:"wolfSSL test" -in ./certs/test-servercert.p12 +wolfssl pkcs12 -nodes -passin pass:"wolfSSL test" -in ./certs/test-servercert.p12 ``` diff --git a/wolfCLU/src/rand.md b/wolfCLU/src/rand.md index 1f514dce..1d86fbc9 100644 --- a/wolfCLU/src/rand.md +++ b/wolfCLU/src/rand.md @@ -1,5 +1,5 @@ ### RAND Command -Generates random bytes in raw or base64 form. By default it outputs the result to stdout but can be redirected with using the '-out' argument. The last argument passed in is the number of random bytes to generate. +Generates random bytes in raw or base64 form. By default it outputs the result to stdout but can be redirected with the '-out' argument. The last argument passed in is the number of random bytes to generate. - [-base64] base64 encode the resulting random bytes - [-out] ouput file to write results to diff --git a/wolfCLU/src/req.md b/wolfCLU/src/req.md index c31ea250..1a57ccde 100644 --- a/wolfCLU/src/req.md +++ b/wolfCLU/src/req.md @@ -16,6 +16,6 @@ Example: ``` wolfssl ecparam -genkey -out ecc.key -name secp384r1 -wolfssl req -new -x509 -days 3650 -config selfsigned.conf -key ecc.key -out ecc.cert \ --outform der -sha256 + +wolfssl req -new -x509 -days 3650 -config selfsigned.conf -key ecc.key -out ecc.cert -outform der -sha256 ``` diff --git a/wolfCLU/src/sha.md b/wolfCLU/src/sha.md index af40d7ad..6a79e6d5 100644 --- a/wolfCLU/src/sha.md +++ b/wolfCLU/src/sha.md @@ -1,6 +1,10 @@ ### sha256, sha384, and sha512 commands Each command can be used to create a hash of its type. sha256 generates a sha256 hash and so on. The commands accept input in the form of stdin or a specified input file. +Example : + ``` -wolfssl -sha384 +wolfssl -sha384 file.txt + +echo "hi" | wolfssl -sha384 ```