forked from wolfSSL/wolfssl
Fixes from review and added REAMEs and setup.sh
Add README.md and setup.sh. Add READMEs with license information.
This commit is contained in:
41
IDE/zephyr/README.md
Normal file
41
IDE/zephyr/README.md
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
Zephyr Project Port
|
||||||
|
===================
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This port is for Zephyr Project available [here](https://www.zephyrproject.org/).
|
||||||
|
|
||||||
|
It provides the following zephyr code.
|
||||||
|
|
||||||
|
- zephyr/ext/lib/crypto/wolfssl
|
||||||
|
- wolfssl library
|
||||||
|
- zephyr/samples/crypto/wolfssl_test
|
||||||
|
- wolfcrypt unit test application
|
||||||
|
- zephyr/samples/crypto/wolfssl_tls_sock
|
||||||
|
- socket based sample of TLS
|
||||||
|
- zephyr/samples/crypto/wolfssl_tls_thread
|
||||||
|
- socket based sample of TLS using threads
|
||||||
|
|
||||||
|
## How to setup
|
||||||
|
|
||||||
|
### delopy wolfssl source to mynewt project
|
||||||
|
Specify the path of the mynewt project and execute `wolfssl/IDE/mynewt/setup.sh`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./IDE/zephyr/setup.sh /path/to/zephyrproject
|
||||||
|
```
|
||||||
|
|
||||||
|
This script will deploy wolfssl's library code and samples as described in the Overview to the zephyr project.
|
||||||
|
|
||||||
|
## build & test
|
||||||
|
|
||||||
|
build and execute wolfssl_test
|
||||||
|
|
||||||
|
```
|
||||||
|
cd [zephyrproject]/zephyr/samples/crypto/wolfssl_test
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake -GNinja -DBOARD=qemu_x86 ..
|
||||||
|
ninja
|
||||||
|
ninja run
|
||||||
|
```
|
||||||
|
|
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
wolfSSL (formerly known as CyaSSL) and wolfCrypt are either licensed for use
|
||||||
|
under the GPLv2 or a standard commercial license. For our users who cannot use
|
||||||
|
wolfSSL under GPLv2, a commercial license to wolfSSL and wolfCrypt is available.
|
||||||
|
Please contact wolfSSL Inc. directly at:
|
||||||
|
|
||||||
|
Email: licensing@wolfssl.com
|
||||||
|
Phone: +1 425 245-8247
|
||||||
|
|
||||||
|
More information can be found on the wolfSSL website at www.wolfssl.com.
|
||||||
|
|
||||||
|
|
||||||
|
22
IDE/zephyr/setup.sh
Executable file
22
IDE/zephyr/setup.sh
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Check for zephyr directory on command line
|
||||||
|
if [ $# -ne 1 ]; then
|
||||||
|
echo "Usage: $0 'zephyr project root directory path'" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ZEPHYR_DIR=$1
|
||||||
|
|
||||||
|
# Check zephyr directory exists
|
||||||
|
if [ ! -d $ZEPHR_DIR ]; then
|
||||||
|
echo "Zephyr project directory does not exist: $ZEPHYR_DIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd `dirname $0`
|
||||||
|
|
||||||
|
(cd lib; ./install_lib.sh $ZEPHYR_DIR)
|
||||||
|
(cd wolfssl_test; ./install_test.sh $ZEPHYR_DIR)
|
||||||
|
(cd wolfssl_tls_sock; ./install_sample.sh $ZEPHYR_DIR)
|
||||||
|
(cd wolfssl_tls_thread; ./install_sample.sh $ZEPHYR_DIR)
|
||||||
|
|
12
IDE/zephyr/wolfssl_test/README
Normal file
12
IDE/zephyr/wolfssl_test/README
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
wolfSSL (formerly known as CyaSSL) and wolfCrypt are either licensed for use
|
||||||
|
under the GPLv2 or a standard commercial license. For our users who cannot use
|
||||||
|
wolfSSL under GPLv2, a commercial license to wolfSSL and wolfCrypt is available.
|
||||||
|
Please contact wolfSSL Inc. directly at:
|
||||||
|
|
||||||
|
Email: licensing@wolfssl.com
|
||||||
|
Phone: +1 425 245-8247
|
||||||
|
|
||||||
|
More information can be found on the wolfSSL website at www.wolfssl.com.
|
||||||
|
|
||||||
|
|
12
IDE/zephyr/wolfssl_tls_sock/README
Normal file
12
IDE/zephyr/wolfssl_tls_sock/README
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
wolfSSL (formerly known as CyaSSL) and wolfCrypt are either licensed for use
|
||||||
|
under the GPLv2 or a standard commercial license. For our users who cannot use
|
||||||
|
wolfSSL under GPLv2, a commercial license to wolfSSL and wolfCrypt is available.
|
||||||
|
Please contact wolfSSL Inc. directly at:
|
||||||
|
|
||||||
|
Email: licensing@wolfssl.com
|
||||||
|
Phone: +1 425 245-8247
|
||||||
|
|
||||||
|
More information can be found on the wolfSSL website at www.wolfssl.com.
|
||||||
|
|
||||||
|
|
12
IDE/zephyr/wolfssl_tls_thread/README
Normal file
12
IDE/zephyr/wolfssl_tls_thread/README
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
wolfSSL (formerly known as CyaSSL) and wolfCrypt are either licensed for use
|
||||||
|
under the GPLv2 or a standard commercial license. For our users who cannot use
|
||||||
|
wolfSSL under GPLv2, a commercial license to wolfSSL and wolfCrypt is available.
|
||||||
|
Please contact wolfSSL Inc. directly at:
|
||||||
|
|
||||||
|
Email: licensing@wolfssl.com
|
||||||
|
Phone: +1 425 245-8247
|
||||||
|
|
||||||
|
More information can be found on the wolfSSL website at www.wolfssl.com.
|
||||||
|
|
||||||
|
|
@@ -238,9 +238,9 @@ int EmbedSend(WOLFSSL* ssl, char *buf, int sz, void *ctx)
|
|||||||
int sd = *(int*)ctx;
|
int sd = *(int*)ctx;
|
||||||
int sent;
|
int sent;
|
||||||
|
|
||||||
#ifdef MAX_SEND_SZ
|
#ifdef WOLFSSL_MAX_SEND_SZ
|
||||||
if (sz > MAX_SEND_SZ)
|
if (sz > WOLFSSL_MAX_SEND_SZ)
|
||||||
sz = MAX_SEND_SZ;
|
sz = WOLFSSL_MAX_SEND_SZ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sent = wolfIO_Send(sd, buf, sz, ssl->wflags);
|
sent = wolfIO_Send(sd, buf, sz, ssl->wflags);
|
||||||
|
@@ -489,7 +489,7 @@ XFILE z_fs_open(const char* filename, const char* perm)
|
|||||||
{
|
{
|
||||||
XFILE file;
|
XFILE file;
|
||||||
|
|
||||||
file = XMALLOC(sizeof(file), NULL, DYNAMIC_TYPE_FILE);
|
file = XMALLOC(sizeof(*file), NULL, DYNAMIC_TYPE_FILE);
|
||||||
if (file != NULL) {
|
if (file != NULL) {
|
||||||
if (fs_open(file, filename) != 0) {
|
if (fs_open(file, filename) != 0) {
|
||||||
XFREE(file);
|
XFREE(file);
|
||||||
|
@@ -260,7 +260,9 @@
|
|||||||
#define SEND_FUNCTION NU_Send
|
#define SEND_FUNCTION NU_Send
|
||||||
#define RECV_FUNCTION NU_Recv
|
#define RECV_FUNCTION NU_Recv
|
||||||
#elif defined(WOLFSSL_ZEPHYR)
|
#elif defined(WOLFSSL_ZEPHYR)
|
||||||
#define MAX_SEND_SZ 256
|
#ifndef WOLFSSL_MAX_SEND_SZ
|
||||||
|
#define WOLFSSL_MAX_SEND_SZ 256
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SEND_FUNCTION send
|
#define SEND_FUNCTION send
|
||||||
#define RECV_FUNCTION recv
|
#define RECV_FUNCTION recv
|
||||||
|
Reference in New Issue
Block a user