Skip to content

Commit

Permalink
Adding documentation where needed. Made changes to code to assure fil…
Browse files Browse the repository at this point in the history
…es build and implement good coding practices
  • Loading branch information
lealem47 committed Jun 29, 2021
1 parent 64841d3 commit be264f0
Show file tree
Hide file tree
Showing 40 changed files with 885 additions and 450 deletions.
255 changes: 223 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,69 @@ contains a Makefile as well as a simple tutorial on the given topic.

## Current Examples

#### utasker (uTasker wolfSSL Example Tasks)

This directory contains example uTasker client and server tasks that
demonstrate using wolfSSL with the uTasker stack. These have been tested on
the uTasker Simulator.

Please see the [utasker/README.md](utasker/README.md) for further usage and details.

#### android (Android NDK Examples)

This directory contains examples that demonstrate using wolfSSL and wolfSSLJNI
on the Android platform, using the Android NDK toolchain.

Please see the [android/README.md](android/README.md) for further usage and details.
Please see the [android/README.md](android/README.md) for further usage and
details.


#### BTLE

This directory contains examples for securing a Bluetooth Low Energy Link (BTLE).
BTLE packets are small and throughput is low, so these examples demonstrate a
way to exchange data securely without BTLE pairing.

Please see the [btle/README.md](btle/README.md) for further usage and details.


#### certfields (X509 field extraction)

This directory contains an example that demonstrate using the wolfSSL
This directory contains an example that demonstrate using wolfSSL
to read a DER encoded certificate and extract the public key and
subject name information.

Please see the [certfields/README.md](certfields/README.md) for further usage and details.
Please see the [certfields/README.md](certfields/README.md) for further usage
and details.


#### certgen (wolfSSL Certificate Generation)

This directory contains examples that demonstrate using wolfSSL to
generate and sign certificates.

Please see the [certgen/README.md](certgen/README.md) for further usage and
details.


#### certmanager (wolfSSL CertManager)

This directory contains examples that demonstrate using the wolfSSL
This directory contains examples that demonstrate using
CertManager (Certificate Manager) functionality.

Please see the [certmanager/README.md](certmanager/README.md) for further usage and details.
Please see the [certmanager/README.md](certmanager/README.md) for further usage
and details.

#### wolfCLU (wolfSSL Command Line Utility)

This is a tool to provide command line access to wolfcrypt cryptographic
libraries. wolfSSL command line utility will allow users to encrypt or decrypt
a user specified file to any file name and extension.
#### crypto (wolfCrypt Examples)

Please see the [clu/README.md](clu/README.md) for further usage and details.
This directory contains examples that demonstrate using the wolfCrypt functionality
to encrypt files with different algorithms (aes, 3des, etc.)

Please see the [crypto/README.md](crypto/README.md) for further usage and details.


#### custom-io-callbacks (wolfSSL Custom IO Callbacks)

This directory contains examples that demonstrate how the custom IO callbacks
can be used to 4 facilitate a TLS connection using any medium.

Please see the [custom-io-callbacks/README.md](custom-io-callbacks/README.md)
for further usage and details.

###### Unique feature to wolfSSL CLU
The decision to allow for unique file extensions was prompted by automated
tools available for brute forcing files. It will not provide extra security
cryptographically however it will force attackers to check the header
information on every single brute force attempt. This will provide further
frustration and an extra step in any attempt to brute force a file encrypted
with our utility.

#### DTLS (Datagram TLS)

Expand All @@ -77,11 +95,102 @@ cd ./dtls
make
```

Please see the [dtls/README.md](dtls/README.md) for further usage and details.


#### ecc (Elliptic Curve Cryptography)

This directory contains examples that demonstrate the various use-cases of
wolfcrypt ECC.

Please see the [ecc/README.md](ecc/README.md) for further usage and details.


#### embedded (Embedded Systems)

This directory contains examples that demonstrate TLS client/servers communicating
through buffers and using sockets.

Please see the [embedded/README.md](embedded/README.md) for further usage and
details.


#### hash (wolfCrypt Hash Examples)

This directory contains examples that demonstrate how to hash an input file using
wolfCrypt.

Please see the [hash/README.md](hash/README.md) for further usage and details.


#### java (wolfJSSE Examples)

This directory contains examples that demonstrate HTTPS URL use with wolfJSSE
and example keystores.

Please see the [java/README.md](java/README.md) for further usage and details.


#### mynewt (Apache Mynewt Examples)

This directory contains examples that demonstrate using wolfSSL with Apache
Mynewt OS.

Please see the [mynewt/README.md](mynewt/README.md) for further usage and
details.


#### picotcp (picoTCP Examples)

This directory contains a TLS server created by using picoTCP via wolfSSL
custom callbacks.

Please see the [picotcp/README.md](picotcp/README.md) for further usage and
details.


#### picotcp (picoTCP Examples)

This directory contains a TLS server created by using picoTCP via wolfSSL
custom callbacks.

Please see the [picotcp/README.md](picotcp/README.md) for further usage and
details.


#### pk (Public-Key)

This directory contains examples that demonstrate various wolfCrypt public-key
functionality (storing and loading keys after generation, extracting public key
from private key, etc.).

Please see the [pk/README.md](pk/README.md) for further usage and details.


#### pkcs11 (PKCS #11)

This directory contains examples of using wolfSSL's PKCS #11 feature and a TLS
server example using a PKCS 11 based key.

Please see the [pkcs11/README.md](pkcs11/README.md) for further usage and details.


#### pkcs7 (PKCS #7)

This directory contains example applications that demonstrate usage of the
wolfCrypt PKCS#7/CMS API, included in the [wolfSSL embedded SSL/TLS library].

It includes examples of several different content types (EncryptedData, SignedData,
EnvelopedData, CompressedData), and demonstrates both signing/encrypting and
verifying/decrypting operations.

Please see the [pkcs7/README.md](pkcs7/README.md) for further usage and details.


#### PSK (Pre-Shared Keys)

This directory contains examples of using PSK, with client and server examples
demonstrating TCP/IP, PSK, non-blocking, session resumption, and
multi-threading.
This directory contains examples of using PSK, with client and server examples
demonstrating TCP/IP, PSK, non-blocking, session resumption, and multi-threading.

When compiling wolfSSL for use with these examples, wolfSSL will need to be
compiled with PSK support:
Expand All @@ -98,7 +207,65 @@ cd ./psk
make
```

#### SSL/TLS
Please see the [psk/README.md](psk/README.md) for further usage and details.


#### riot-os-posix-lwip (RIOT-OS)

This directory contains examples that demonstrate how to use wolfSSL TLS sockets
over RIOT-OS POSIX sockets.

Please see the [riot-os-posix-lwip/README.md](riot-os-posix-lwip/README.md) for
further usage and details.


#### RT1060 (i.MX RT1060-EVK)

This directory contains a wolfCrypt benchmark test application for i.MX RT1060-EVK.

Please see the [RT1060/README.md](RT1060/README.md) for further usage and details.


#### SGX_Linux (Linux Enclave)

This directory contains an example application, written in C, which demonstrates
how to link the wolfSSL lightweight SSL/TLS library with a simple Enclave using
Linux. The example has been tested with Ubuntu 16.04.

Please see the [SGX_Linux/README.md](SGX_Linux/README.md) for further usage and
details.


#### SGX_Windows (Windows Enclave)

This directory contains an example application, written in C++, which demonstrates
how to link the wolfSSL lightweight SSL/TLS library with a simple Enclave using
Windows.

Please see the [SGX_Windows/README.md](SGX_Windows/README.md) for further usage
and details.


#### signature (Sign and Verify Examples)

This directory contains examples that demonstrate using wolfSSL to sign and
verify binary data (supports RSA and ECC for signing and MD2, MD4, MD5, SHA,
SHA224, SHA256, SHA384 and SHA512).

Please see the [signature/README.md](signature/README.md) for further usage and
details.


#### tirtos_ccs_examples (TI-RTOS)

This directory contains a client/server examples that demonstrates using wolfSSL
in a TI-RTOS ecosysytem.

Please see the [tirtos_ccs_examples/README.md](tirtos_ccs_examples/README.md) for
further usage and details.


#### TLS

This directory contains examples of using SSL/TLS, with client and server
examples demonstrating TCP/IP, SSL/TLS, non-blocking, session resumption, and
Expand All @@ -111,15 +278,39 @@ cd ./tls
make
```

#### BTLE
Please see the [tls/README.md](tls/README.md) for further usage and details.

This directory contains examples for securing a Bluetooth Low Energy Link (BTLE).
BTLE packets are small and throughput is low, so these examples demonstrate a way
to exchange data securely without BTLE pairing.

#### utasker (uTasker wolfSSL Example Tasks)

This directory contains example uTasker client and server tasks that
demonstrate using wolfSSL with the uTasker stack. These have been tested on
the uTasker Simulator.

Please see the [utasker/README.md](utasker/README.md) for further usage and
details.


#### wolfCLU (wolfSSL Command Line Utility)

This is a tool to provide command line access to wolfcrypt cryptographic
libraries. wolfSSL command line utility will allow users to encrypt or decrypt
a user specified file to any file name and extension.

Please see the [clu/README.md](clu/README.md) for further usage and details.

###### Unique feature to wolfSSL CLU
The decision to allow for unique file extensions was prompted by automated
tools available for brute forcing files. It will not provide extra security
cryptographically however it will force attackers to check the header
information on every single brute force attempt. This will provide further
frustration and an extra step in any attempt to brute force a file encrypted
with our utility.


## Notes


When necessary, examples will use the example certificates and keys located
in the ./certs directory. These certificates and keys have been pulled in from
the main wolfSSL repository.
Expand Down
2 changes: 1 addition & 1 deletion certgen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ certgen_with_altnames:certgen_with_altnames.o

clean:
rm -f *.o certgen_example csr_example csr_w_ed25519_example certgen_with_altnames
rm newCert.*
rm -f newCert.*
2 changes: 2 additions & 0 deletions certgen/csr_w_ed25519_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ int main(void)
}
printf("%s", pem);

(void)pemSz;

exit:
wc_ed25519_free(&key);
wc_FreeRng(&rng);
Expand Down
Loading

0 comments on commit be264f0

Please sign in to comment.