Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wolfCLU/src/Intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion wolfCLU/src/bench.md
Original file line number Diff line number Diff line change
@@ -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".
8 changes: 4 additions & 4 deletions wolfCLU/src/build.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions wolfCLU/src/crl.md
Original file line number Diff line number Diff line change
@@ -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] <ca file name>
- [-inform] pem or der in format
Expand All @@ -12,4 +12,4 @@ Example:

```
wolfssl crl -CAfile ./certs/ca-cert.pem -in ./certs/crl.der -inform DER -noout
```
```
1 change: 1 addition & 0 deletions wolfCLU/src/dhparam.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ Example:

```
wolfssl dhparam -check -out dh.params 1024
```
1 change: 1 addition & 0 deletions wolfCLU/src/dsaparam.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ Example:

```
wolfssl dsaparam -out dsa.params 1024

wolfssl dsaparam -in dsa.params -genkey
```
4 changes: 2 additions & 2 deletions wolfCLU/src/enc.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down Expand Up @@ -35,4 +35,4 @@ Example:

```
wolfssl enc -aes-128-cbc -k Thi$i$myPa$$w0rd -in somefile.txt
```
```
24 changes: 21 additions & 3 deletions wolfCLU/src/md5.md
Original file line number Diff line number Diff line change
@@ -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
```
```
4 changes: 2 additions & 2 deletions wolfCLU/src/pkcs12.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
```
2 changes: 1 addition & 1 deletion wolfCLU/src/rand.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions wolfCLU/src/req.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
6 changes: 5 additions & 1 deletion wolfCLU/src/sha.md
Original file line number Diff line number Diff line change
@@ -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 <some file>
wolfssl -sha384 file.txt

echo "hi" | wolfssl -sha384
```