clean up trailing whitespace and misplaced CRLFs, add missing final newlines, remove stray UTF8 nonprintables (BOMs) and ASCIIfy stray homoglyphs (spaces and apostrophes), guided by expanded coverage in wolfssl-multi-test check-source-text.
This commit is contained in:
parent
a3fea482db
commit
a3fb5029f8
2
.github/workflows/async.yml
vendored
2
.github/workflows/async.yml
vendored
@ -36,7 +36,7 @@ jobs:
|
||||
./configure ${{ matrix.config }}
|
||||
make check
|
||||
|
||||
- name: Print errors
|
||||
- name: Print errors
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
if [ -f test-suite.log ] ; then
|
||||
|
1
.github/workflows/disabled/haproxy.yml
vendored
1
.github/workflows/disabled/haproxy.yml
vendored
@ -57,4 +57,3 @@ jobs:
|
||||
- name: Test HaProxy
|
||||
working-directory: haproxy
|
||||
run: make reg-tests reg-tests/ssl VTEST_PROGRAM=$GITHUB_WORKSPACE/VTest/vtest
|
||||
|
||||
|
6
.github/workflows/disabled/hostap.yml
vendored
6
.github/workflows/disabled/hostap.yml
vendored
@ -181,7 +181,7 @@ jobs:
|
||||
- name: Checkout hostap
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: julek-wolfssl/hostap-mirror
|
||||
repository: julek-wolfssl/hostap-mirror
|
||||
path: hostap
|
||||
ref: ${{ matrix.config.hostap_ref }}
|
||||
# necessary for cherry pick step
|
||||
@ -210,7 +210,7 @@ jobs:
|
||||
done
|
||||
|
||||
- if: ${{ matrix.hostapd }}
|
||||
name: Setup hostapd config file
|
||||
name: Setup hostapd config file
|
||||
run: |
|
||||
cp wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/hostapd.config \
|
||||
hostap/hostapd/.config
|
||||
@ -220,7 +220,7 @@ jobs:
|
||||
EOF
|
||||
|
||||
- if: ${{ matrix.wpa_supplicant }}
|
||||
name: Setup wpa_supplicant config file
|
||||
name: Setup wpa_supplicant config file
|
||||
run: |
|
||||
cp wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/wpa_supplicant.config \
|
||||
hostap/wpa_supplicant/.config
|
||||
|
2
.github/workflows/hitch.yml
vendored
2
.github/workflows/hitch.yml
vendored
@ -105,4 +105,4 @@ jobs:
|
||||
working-directory: ./hitch
|
||||
run: |
|
||||
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib:$LD_LIBRARY_PATH
|
||||
make check
|
||||
make check
|
||||
|
10
.github/workflows/hostap-vm.yml
vendored
10
.github/workflows/hostap-vm.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
||||
wolf_extra_config: --disable-tls13
|
||||
- build_id: hostap-vm-build2
|
||||
wolf_extra_config: >-
|
||||
--enable-wpas-dpp --enable-brainpool --with-eccminsz=192
|
||||
--enable-wpas-dpp --enable-brainpool --with-eccminsz=192
|
||||
--enable-tlsv10 --enable-oldtls
|
||||
name: Build wolfSSL
|
||||
runs-on: ubuntu-latest
|
||||
@ -87,7 +87,7 @@ jobs:
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: torvalds/linux
|
||||
repository: torvalds/linux
|
||||
path: linux
|
||||
|
||||
- name: Compile linux
|
||||
@ -199,7 +199,7 @@ jobs:
|
||||
- name: Checkout hostap
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: julek-wolfssl/hostap-mirror
|
||||
repository: julek-wolfssl/hostap-mirror
|
||||
path: hostap
|
||||
ref: ${{ matrix.config.hostap_ref }}
|
||||
|
||||
@ -233,7 +233,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- if: ${{ matrix.hostapd }}
|
||||
name: Setup hostapd config file
|
||||
name: Setup hostapd config file
|
||||
run: |
|
||||
cp wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/hostapd.config \
|
||||
hostap/hostapd/.config
|
||||
@ -243,7 +243,7 @@ jobs:
|
||||
EOF
|
||||
|
||||
- if: ${{ matrix.wpa_supplicant }}
|
||||
name: Setup wpa_supplicant config file
|
||||
name: Setup wpa_supplicant config file
|
||||
run: |
|
||||
cp wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/wpa_supplicant.config \
|
||||
hostap/wpa_supplicant/.config
|
||||
|
1
.github/workflows/ipmitool.yml
vendored
1
.github/workflows/ipmitool.yml
vendored
@ -79,4 +79,3 @@ jobs:
|
||||
run: |
|
||||
ldd src/ipmitool | grep wolfssl
|
||||
ldd src/ipmievd | grep wolfssl
|
||||
|
196
.github/workflows/mosquitto.yml
vendored
196
.github/workflows/mosquitto.yml
vendored
@ -1,98 +1,98 @@
|
||||
name: mosquitto Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-latest
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-mosquitto CFLAGS="-DALLOW_INVALID_CERTSIGN"
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-mosquitto
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
mosquitto_check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ref: [ 2.0.18 ]
|
||||
name: ${{ matrix.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-mosquitto
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential libev-dev libssl-dev automake python3-docutils libcunit1 libcunit1-doc libcunit1-dev pkg-config make
|
||||
sudo pip install --upgrade psutil
|
||||
|
||||
- name: Checkout mosquitto
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: eclipse/mosquitto
|
||||
ref: v${{ matrix.ref }}
|
||||
path: mosquitto
|
||||
|
||||
- name: Configure and build mosquitto
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/mosquitto/
|
||||
patch -p1 < $GITHUB_WORKSPACE/osp/mosquitto/${{ matrix.ref }}.patch
|
||||
make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir
|
||||
|
||||
- name: Run mosquitto tests
|
||||
working-directory: ./mosquitto
|
||||
run: |
|
||||
# Retry up to five times
|
||||
for i in {1..5}; do
|
||||
TEST_RES=0
|
||||
make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir ptest || TEST_RES=$?
|
||||
if [ "$TEST_RES" -eq "0" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "$TEST_RES" -ne "0" ]; then
|
||||
exit $TEST_RES
|
||||
fi
|
||||
name: mosquitto Tests
|
||||
|
||||
# START OF COMMON SECTION
|
||||
on:
|
||||
push:
|
||||
branches: [ 'master', 'main', 'release/**' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
# END OF COMMON SECTION
|
||||
|
||||
jobs:
|
||||
build_wolfssl:
|
||||
name: Build wolfSSL
|
||||
# Just to keep it the same as the testing target
|
||||
runs-on: ubuntu-latest
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
steps:
|
||||
- name: Build wolfSSL
|
||||
uses: wolfSSL/actions-build-autotools-project@v1
|
||||
with:
|
||||
path: wolfssl
|
||||
configure: --enable-mosquitto CFLAGS="-DALLOW_INVALID_CERTSIGN"
|
||||
install: true
|
||||
|
||||
- name: tar build-dir
|
||||
run: tar -zcf build-dir.tgz build-dir
|
||||
|
||||
- name: Upload built lib
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wolf-install-mosquitto
|
||||
path: build-dir.tgz
|
||||
retention-days: 5
|
||||
|
||||
mosquitto_check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ref: [ 2.0.18 ]
|
||||
name: ${{ matrix.ref }}
|
||||
runs-on: ubuntu-latest
|
||||
# This should be a safe limit for the tests to run.
|
||||
timeout-minutes: 4
|
||||
needs: build_wolfssl
|
||||
steps:
|
||||
- name: Download lib
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: wolf-install-mosquitto
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wolfssl/osp
|
||||
path: osp
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential libev-dev libssl-dev automake python3-docutils libcunit1 libcunit1-doc libcunit1-dev pkg-config make
|
||||
sudo pip install --upgrade psutil
|
||||
|
||||
- name: Checkout mosquitto
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: eclipse/mosquitto
|
||||
ref: v${{ matrix.ref }}
|
||||
path: mosquitto
|
||||
|
||||
- name: Configure and build mosquitto
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/mosquitto/
|
||||
patch -p1 < $GITHUB_WORKSPACE/osp/mosquitto/${{ matrix.ref }}.patch
|
||||
make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir
|
||||
|
||||
- name: Run mosquitto tests
|
||||
working-directory: ./mosquitto
|
||||
run: |
|
||||
# Retry up to five times
|
||||
for i in {1..5}; do
|
||||
TEST_RES=0
|
||||
make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir ptest || TEST_RES=$?
|
||||
if [ "$TEST_RES" -eq "0" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "$TEST_RES" -ne "0" ]; then
|
||||
exit $TEST_RES
|
||||
fi
|
||||
|
2
.github/workflows/multi-arch.yml
vendored
2
.github/workflows/multi-arch.yml
vendored
@ -51,7 +51,7 @@ jobs:
|
||||
CFLAGS: ${{ matrix.CFLAGS }}
|
||||
QEMU_LD_PREFIX: /usr/${{ matrix.HOST }}
|
||||
run: ./autogen.sh && ./configure --host=${{ matrix.HOST }} --enable-all --disable-examples ${{ matrix.EXTRA_OPTS }} && make
|
||||
- name: Print errors
|
||||
- name: Print errors
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
if [ -f config.log ] ; then
|
||||
|
2
.github/workflows/net-snmp.yml
vendored
2
.github/workflows/net-snmp.yml
vendored
@ -58,7 +58,7 @@ jobs:
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
4
.github/workflows/nginx.yml
vendored
4
.github/workflows/nginx.yml
vendored
@ -96,7 +96,7 @@ jobs:
|
||||
stream_ssl_preread.t stream_ssl_realip.t stream_ssl_session_reuse.t stream_ssl.t
|
||||
stream_ssl_variables.t stream_ssl_verify_client.t stream_upstream_zone_ssl.t
|
||||
upstream_zone_ssl.t uwsgi_ssl_certificate.t uwsgi_ssl_certificate_vars.t
|
||||
uwsgi_ssl.t uwsgi_ssl_verify.t
|
||||
uwsgi_ssl.t uwsgi_ssl_verify.t
|
||||
# Following tests do not pass with sanitizer on (with OpenSSL too)
|
||||
sanitize-not-ok: >-
|
||||
grpc_ssl.t h2_proxy_request_buffering_ssl.t h2_proxy_ssl.t
|
||||
@ -221,4 +221,4 @@ jobs:
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib \
|
||||
TMPDIR=$GITHUB_WORKSPACE TEST_NGINX_BINARY=../nginx/objs/nginx \
|
||||
prove ${{ matrix.sanitize-ok }}
|
||||
|
||||
|
||||
|
2
.github/workflows/no-malloc.yml
vendored
2
.github/workflows/no-malloc.yml
vendored
@ -35,7 +35,7 @@ jobs:
|
||||
make
|
||||
./wolfcrypt/test/testwolfcrypt
|
||||
|
||||
- name: Print errors
|
||||
- name: Print errors
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
if [ -f test-suite.log ] ; then
|
||||
|
1
.github/workflows/ntp.yml
vendored
1
.github/workflows/ntp.yml
vendored
@ -89,4 +89,3 @@ jobs:
|
||||
./configure --with-wolfssl=$GITHUB_WORKSPACE/build-dir
|
||||
make -j
|
||||
make -j check
|
||||
|
2
.github/workflows/openssh.yml
vendored
2
.github/workflows/openssh.yml
vendored
@ -74,7 +74,7 @@ jobs:
|
||||
configure: --with-wolfssl=$GITHUB_WORKSPACE/build-dir --with-rpath=-Wl,-rpath=
|
||||
check: false
|
||||
|
||||
# make tests take >20 minutes. Consider limiting?
|
||||
# make tests take >20 minutes. Consider limiting?
|
||||
- name: Run tests
|
||||
working-directory: ./openssh
|
||||
run: |
|
||||
|
10
.github/workflows/os-check.yml
vendored
10
.github/workflows/os-check.yml
vendored
@ -25,18 +25,18 @@ jobs:
|
||||
'--enable-all --enable-asn=original',
|
||||
'--enable-harden-tls',
|
||||
'--enable-tls13 --enable-session-ticket --enable-dtls --enable-dtls13
|
||||
--enable-opensslextra --enable-sessioncerts
|
||||
CPPFLAGS=''-DWOLFSSL_DTLS_NO_HVR_ON_RESUME -DHAVE_EXT_CACHE
|
||||
--enable-opensslextra --enable-sessioncerts
|
||||
CPPFLAGS=''-DWOLFSSL_DTLS_NO_HVR_ON_RESUME -DHAVE_EXT_CACHE
|
||||
-DWOLFSSL_TICKET_HAVE_ID -DHAVE_EX_DATA -DSESSION_CACHE_DYNAMIC_MEM'' ',
|
||||
'--enable-all --enable-secure-renegotiation',
|
||||
'--enable-all --enable-haproxy --enable-quic',
|
||||
'--enable-dtls --enable-dtls13 --enable-earlydata
|
||||
--enable-session-ticket --enable-psk
|
||||
'--enable-dtls --enable-dtls13 --enable-earlydata
|
||||
--enable-session-ticket --enable-psk
|
||||
CPPFLAGS=''-DWOLFSSL_DTLS13_NO_HRR_ON_RESUME'' ',
|
||||
'--enable-experimental --enable-kyber --enable-dtls --enable-dtls13
|
||||
--enable-dtls-frag-ch',
|
||||
'--enable-all --enable-dtls13 --enable-dtls-frag-ch',
|
||||
'--enable-dtls --enable-dtls13 --enable-dtls-frag-ch
|
||||
'--enable-dtls --enable-dtls13 --enable-dtls-frag-ch
|
||||
--enable-dtls-mtu',
|
||||
]
|
||||
name: make check
|
||||
|
2
.github/workflows/rng-tools.yml
vendored
2
.github/workflows/rng-tools.yml
vendored
@ -64,7 +64,7 @@ jobs:
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
2
.github/workflows/sssd.yml
vendored
2
.github/workflows/sssd.yml
vendored
@ -91,7 +91,7 @@ jobs:
|
||||
path: sssd
|
||||
patch-file: $GITHUB_WORKSPACE/osp/sssd/${{ matrix.ref }}.patch
|
||||
configure: >-
|
||||
--without-samba --without-nfsv4-idmapd-plugin --with-oidc-child=no
|
||||
--without-samba --without-nfsv4-idmapd-plugin --with-oidc-child=no
|
||||
--without-manpages WOLFSSL_INSTALL_DIR=$GITHUB_WORKSPACE/build-dir
|
||||
check: true
|
||||
|
||||
|
2
.github/workflows/stunnel.yml
vendored
2
.github/workflows/stunnel.yml
vendored
@ -56,7 +56,7 @@ jobs:
|
||||
|
||||
- name: untar build-dir
|
||||
run: tar -xf build-dir.tgz
|
||||
|
||||
|
||||
- name: Checkout OSP
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
30
ChangeLog.md
30
ChangeLog.md
@ -874,9 +874,9 @@ Release 5.5.1 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
|
||||
## Enhancements
|
||||
* DTLSv1.3: Do HRR Cookie exchange by default
|
||||
* Add wolfSSL_EVP_PKEY_new_CMAC_key to OpenSSL compatible API
|
||||
* Update ide win10 build files to add missing sp source files
|
||||
* Improve Workbench docs
|
||||
* Add wolfSSL_EVP_PKEY_new_CMAC_key to OpenSSL compatible API
|
||||
* Update ide win10 build files to add missing sp source files
|
||||
* Improve Workbench docs
|
||||
* Improve EVP support for CHACHA20_POLY1305
|
||||
* Improve `wc_SetCustomExtension` documentation
|
||||
* RSA-PSS with OCSP and add simple OCSP response DER verify test case
|
||||
@ -884,23 +884,23 @@ Release 5.5.1 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
* Don't over-allocate memory for DTLS fragments
|
||||
* Add WOLFSSL_ATECC_TFLXTLS for Atmel port
|
||||
* SHA-3 performance improvements with x86_64 assembly
|
||||
* Add code to fallback to S/W if TSIP cannot handle
|
||||
* Add code to fallback to S/W if TSIP cannot handle
|
||||
* Improves entropy with VxWorks
|
||||
* Make time in milliseconds 64-bits for longer session ticket lives
|
||||
* Support for setting cipher list with bytes
|
||||
* wolfSSL_set1_curves_list(), wolfSSL_CTX_set1_curves_list() improvements
|
||||
* Add to RSAES-OAEP key parsing for pkcs7
|
||||
* Add missing DN nid to work with PrintName()
|
||||
* SP int: default to 16 bit word size when NO_64BIT defined
|
||||
* SP int: default to 16 bit word size when NO_64BIT defined
|
||||
* Limit the amount of fragments we store per a DTLS connection and error out when max limit is reached
|
||||
* Detect when certificate's RSA public key size is too big and fail on loading of certificate
|
||||
|
||||
## Fixes
|
||||
* Fix for async with OCSP non-blocking in `ProcessPeerCerts`
|
||||
* Fixes for building with 32-bit and socket size sign/unsigned mismatch
|
||||
* Fix Windows CMakeList compiler options
|
||||
* TLS 1.3 Middle-Box compat: fix missing brace
|
||||
* Configuration consistency fixes for RSA keys and way to force disable of private keys
|
||||
* Fix Windows CMakeList compiler options
|
||||
* TLS 1.3 Middle-Box compat: fix missing brace
|
||||
* Configuration consistency fixes for RSA keys and way to force disable of private keys
|
||||
* Fix for Aarch64 Mac M1 SP use
|
||||
* Fix build errors and warnings for MSVC with DTLS 1.3
|
||||
* Fix HMAC compat layer function for SHA-1
|
||||
@ -908,9 +908,9 @@ Release 5.5.1 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
* Check return from call to wc_Time
|
||||
* SP math: fix build configuration with opensslall
|
||||
* Fix for async session tickets
|
||||
* SP int mp_init_size fixes when SP_WORD_SIZE == 8
|
||||
* SP int mp_init_size fixes when SP_WORD_SIZE == 8
|
||||
* Ed. function to make public key now checks for if the private key flag is set
|
||||
* Fix HashRaw WC_SHA256_DIGEST_SIZE for wc_Sha256GetHash
|
||||
* Fix HashRaw WC_SHA256_DIGEST_SIZE for wc_Sha256GetHash
|
||||
* Fix for building with PSK only
|
||||
* Set correct types in wolfSSL_sk_*_new functions
|
||||
* Sanity check that size passed to mp_init_size() is no more than SP_INT_DIGITS
|
||||
@ -1024,7 +1024,7 @@ CVE-2020-12966 https://www.amd.com/en/corporate/product-security/bulletin/amd-sb
|
||||
* Update SP math all to not use sp_int_word when SQR_MUL_ASM is available
|
||||
### SP Math Fixes
|
||||
* Fixes for constant time with div function
|
||||
* Fix casting warnings for Windows builds and assembly changes to support XMM6-15 being non-volatile
|
||||
* Fix casting warnings for Windows builds and assembly changes to support XMM6-15 being non-volatile
|
||||
* Fix for div_word when not using div function
|
||||
* Fixes for user settings with SP ASM and ED/Curve25519 small
|
||||
* Additional Wycheproof tests ran and fixes
|
||||
@ -1204,7 +1204,7 @@ Release 5.3.0 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
### Math Library Fixes
|
||||
* Sanity check with SP math that ECC points ordinates are not greater than modulus length
|
||||
* Additional sanity checks that _sp_add_d does not error due to overflow
|
||||
* Wycheproof fixes, testing integration, and fixes for AVX / AArch64 ASM edge case tests
|
||||
* Wycheproof fixes, testing integration, and fixes for AVX / AArch64 ASM edge case tests
|
||||
* TFM fp_div_2_ct rework to avoid potential overflow
|
||||
|
||||
### Misc.
|
||||
@ -1445,7 +1445,7 @@ Release 5.1.0 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
###### PORT Fixes
|
||||
* Building with Android wpa_supplicant and KeyStore
|
||||
* Setting initial value of CA certificate with TSIP enabled
|
||||
* Cryptocell ECC build fix and fix with RSA disabled
|
||||
* Cryptocell ECC build fix and fix with RSA disabled
|
||||
* IoT-SAFE improvement for Key/File slot ID size, fix for C++ compile, and fixes for retrieving the public key after key generation
|
||||
|
||||
###### Math Library Fixes
|
||||
@ -1584,7 +1584,7 @@ Release 5.0.0 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
- SSL_SESSION_has_ticket()
|
||||
- SSL_SESSION_get_ticket_lifetime_hint()
|
||||
- DIST_POINT_new
|
||||
- DIST_POINT_free
|
||||
- DIST_POINT_free
|
||||
- DIST_POINTS_free
|
||||
- CRL_DIST_POINTS_free
|
||||
- sk_DIST_POINT_push
|
||||
@ -1747,7 +1747,7 @@ Release 4.8.0 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
|
||||
### Vulnerabilities
|
||||
* [Low] CVE-2021-37155: OCSP request/response verification issue. In the case that the serial number in the OCSP request differs from the serial number in the OCSP response the error from the comparison was not resulting in a failed verification. We recommend users that have wolfSSL version 4.6.0 and 4.7.0 with OCSP enabled update their version of wolfSSL. Version 4.5.0 and earlier are not affected by this report. Thanks to Rainer Mueller-Amersdorffer, Roee Yankelevsky, Barak Gutman, Hila Cohen and Shoshi Berko (from CYMOTIVE Technologies and CARIAD) for the report.
|
||||
* [Low] CVE-2021-24116: Side-Channel cache look up vulnerability in base64 PEM decoding for versions of wolfSSL 4.5.0 and earlier. Versions 4.6.0 and up contain a fix and do not need to be updated for this report. If decoding a PEM format private key using version 4.5.0 and older of wolfSSL then we recommend updating the version of wolfSSL used. Thanks to Florian Sieck, Jan Wichelmann, Sebastian Berndt and Thomas Eisenbarth for the report.
|
||||
* [Low] CVE-2021-24116: Side-Channel cache look up vulnerability in base64 PEM decoding for versions of wolfSSL 4.5.0 and earlier. Versions 4.6.0 and up contain a fix and do not need to be updated for this report. If decoding a PEM format private key using version 4.5.0 and older of wolfSSL then we recommend updating the version of wolfSSL used. Thanks to Florian Sieck, Jan Wichelmann, Sebastian Berndt and Thomas Eisenbarth for the report.
|
||||
|
||||
### New Feature Additions
|
||||
###### New Product
|
||||
|
@ -1,6 +1,6 @@
|
||||
This is a small container that has wolfCLU installed for quick access. To build your own run the following:
|
||||
```
|
||||
docker build --pull --build-arg DUMMY=$(date +%s) -t wolfclu .
|
||||
docker build --pull --build-arg DUMMY=$(date +%s) -t wolfclu .
|
||||
```
|
||||
|
||||
To run the container, you can use:
|
||||
|
@ -27,7 +27,7 @@ This option will allow wolfSSL to be installed directly using the native Arduino
|
||||
|
||||
## Manually Reformatting wolfSSL as a Compatible Arduino Library
|
||||
|
||||
Use [this](./wolfssl-arduino.sh) shell script that will re-organize the wolfSSL library to be
|
||||
Use [this](./wolfssl-arduino.sh) shell script that will re-organize the wolfSSL library to be
|
||||
compatible with [Arduino Library Specification](https://arduino.github.io/arduino-cli/0.35/library-specification/)
|
||||
for projects that use Arduino IDE 1.5.0 or newer.
|
||||
|
||||
@ -55,8 +55,8 @@ from within the `wolfssl/IDE/ARDUINO` directory:
|
||||
3. `./wolfssl-arduino.sh INSTALL /path/to/repository` (Used to update [arduino-wolfSSL](https://github.com/wolfSSL/arduino-wolfSSL))
|
||||
- Creates an Arduino Library in `wolfSSL` directory
|
||||
- Copies that directory contents to the specified `/path/to/repository`
|
||||
- Adds the [default](../../examples/configs/user_settings_arduino.h) as `user_settings.h`.
|
||||
|
||||
- Adds the [default](../../examples/configs/user_settings_arduino.h) as `user_settings.h`.
|
||||
|
||||
4. `./wolfssl-arduino.sh INSTALL /path/to/any/other/directory`
|
||||
- Creates an Arduino Library in `wolfSSL` directory
|
||||
- Copies that directory contents to the specified `/path/to/any/other/directory`
|
||||
|
@ -13,7 +13,7 @@ Additional examples can be found on [wolfSSL/wolfssl-examples](https://github.co
|
||||
|
||||
## Connect with an Arduino Sketch
|
||||
|
||||
See the companion [Arduino Sketch Client](../wolfssl_client/wolfssl_client.ino).
|
||||
See the companion [Arduino Sketch Client](../wolfssl_client/wolfssl_client.ino).
|
||||
|
||||
## Connect with Linux Client
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
# Reminder there's typically no $USER for GitHub actions, but:
|
||||
# ROOT_DIR="/mnt/c/Users/$USER/Documents/Arduino/libraries"
|
||||
#
|
||||
# The company name is "wolfSSL Inc."; There’s a space, no comma, and a period after "Inc."
|
||||
# The company name is "wolfSSL Inc."; There's a space, no comma, and a period after "Inc."
|
||||
# The Arduino library name is "wolfssl" (all lower case)
|
||||
# The Arduino library directory name is "wolfssl" (all lower case)
|
||||
# The Arduino library include file is "wolfssl.h" (all lower case)
|
||||
|
@ -63,7 +63,7 @@ int fputc(int ch, FILE *f)
|
||||
if (ch == (int)'\n') {
|
||||
int chcr = (int)'\r';
|
||||
count = 1;
|
||||
IfxAsclin_Asc_write(&g_asc, &chcr, &count, TIME_INFINITE);
|
||||
IfxAsclin_Asc_write(&g_asc, &chcr, &count, TIME_INFINITE);
|
||||
}
|
||||
count = 1;
|
||||
IfxAsclin_Asc_write(&g_asc, &ch, &count, TIME_INFINITE);
|
||||
|
@ -9,7 +9,7 @@ Tested Platform:
|
||||
|
||||
## Running wolfCrypt on TriCore
|
||||
|
||||
1) Add the wolfSSL source and headers to `Libraries/wolfssl`.
|
||||
1) Add the wolfSSL source and headers to `Libraries/wolfssl`.
|
||||
- Only the following folders are required: `src`, `wolfcrypt` and `wolfssl`.
|
||||
- See script to help with producing bundle here: https://github.com/wolfSSL/wolfssl/blob/master/scripts/makedistsmall.sh
|
||||
2) Add `WOLFSSL_USER_SETTINGS` to the Preprocessing symbols list. C/C++ Build -> Settings -> TASKING C/C++ Compiler -> Preprocessing.
|
||||
|
@ -18,8 +18,8 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfcrypt/test/test.h>
|
||||
#include <wolfcrypt/benchmark/benchmark.h>
|
||||
@ -63,4 +63,3 @@ int main(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
This folder has moved to `IDE/RISCV/SIFIVE-HIFIVE1`.
|
||||
This folder has moved to `IDE/RISCV/SIFIVE-HIFIVE1`.
|
||||
|
@ -1,6 +1,6 @@
|
||||
# ESP-IDF Port
|
||||
|
||||
These Espressif examples have been created and tested with the latest stable release branch of
|
||||
These Espressif examples have been created and tested with the latest stable release branch of
|
||||
[ESP-IDF V5.2](https://docs.espressif.com/projects/esp-idf/en/release-v5.2/esp32/get-started/index.html).
|
||||
The prior version 4.4 ESP-IDF is still supported, however version 5.2 or greater is recommended.
|
||||
Espressif has [a list of all ESP-IDF versions](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/versions.html).
|
||||
@ -140,7 +140,7 @@ See the specific examples for additional details.
|
||||
|
||||
This is an alternate method for installation. It is recommended to use the new `CMakeLists.txt` to point to wolfSSL source code.
|
||||
|
||||
1. Run `setup.sh` at _/path/to_`/wolfssl/IDE/Espressif/ESP-IDF/` to deploy files into ESP-IDF tree
|
||||
1. Run `setup.sh` at _/path/to_`/wolfssl/IDE/Espressif/ESP-IDF/` to deploy files into ESP-IDF tree
|
||||
2. Find Wolfssl files at _/path/to/esp_`/esp-idf/components/wolfssl/`
|
||||
3. Find [Example Programs](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples) under _/path/to/esp_`/esp-idf/examples/protocols/wolfssl_xxx` (where xxx is the project name)
|
||||
|
||||
@ -169,7 +169,7 @@ C:\SysGCC\esp32\esp-idf>git clone -b v5.0.2 --recursive https://github.com/espre
|
||||
|
||||
## Configuration
|
||||
|
||||
1. The `user_settings.h` can be found in `[project]/components/wolfssl/include/user_settings.h`.
|
||||
1. The `user_settings.h` can be found in `[project]/components/wolfssl/include/user_settings.h`.
|
||||
|
||||
## Configuration (Legacy IDF install)
|
||||
|
||||
@ -183,7 +183,7 @@ C:\SysGCC\esp32\esp-idf>git clone -b v5.0.2 --recursive https://github.com/espre
|
||||
|
||||
For question please email [support@wolfssl.com]
|
||||
|
||||
Note: This is tested with :
|
||||
Note: This is tested with :
|
||||
- OS: Ubuntu 20.04.3 LTS
|
||||
- Microsoft Windows 10 Pro 10.0.19041 / Windows 11 Pro 22H2 22621.2715
|
||||
- Visual Studio 2022 17.7.6 with VisualGDB 5.6R9 (build 4777)
|
||||
|
@ -12,7 +12,7 @@ These are the core examples for wolfSSL:
|
||||
|
||||
- [TLS Client](./wolfssl_client/README.md). See also [CLI Client](https://github.com/wolfSSL/wolfssl/tree/master/examples/client) and [more TLS examples](https://github.com/wolfSSL/wolfssl-examples/tree/master/tls).
|
||||
|
||||
- [TLS Server](./wolfssl_server/README.md). See also [CLI Server](https://github.com/wolfSSL/wolfssl/tree/master/examples/server)
|
||||
- [TLS Server](./wolfssl_server/README.md). See also [CLI Server](https://github.com/wolfSSL/wolfssl/tree/master/examples/server)
|
||||
|
||||
## Other Espressif wolfSSL Examples
|
||||
|
||||
@ -44,7 +44,7 @@ TLS1.3 Linux Client to Linux Server: `TLS_AES_128_GCM_SHA256` (default)
|
||||
./examples/client/client -v 4 -h 127.0.0.1 -p 11111 -A ./certs/ca-cert.pem
|
||||
```
|
||||
|
||||
TLS1.2 Linux Server
|
||||
TLS1.2 Linux Server
|
||||
```
|
||||
./examples/server/server -v 3 -b -d -p 11111 -c ./certs/server-cert.pem -k ./certs/server-key.pem
|
||||
```
|
||||
@ -71,11 +71,11 @@ There's an additional example that uses wolfSSL installed as a component to the
|
||||
|
||||
## Installing wolfSSL for Espressif projects
|
||||
|
||||
[Core examples](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples)
|
||||
have a local `components/wolfssl` directory with a special CMakeFile.txt that does not require
|
||||
[Core examples](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples)
|
||||
have a local `components/wolfssl` directory with a special CMakeFile.txt that does not require
|
||||
wolfSSL to be installed.
|
||||
|
||||
If you want to install wolfSSL, see the setup for [wolfSSL](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF#setup-for-linux)
|
||||
If you want to install wolfSSL, see the setup for [wolfSSL](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF#setup-for-linux)
|
||||
and [wolfSSH](https://github.com/wolfSSL/wolfssh/tree/master/ide/Espressif#setup-for-linux).
|
||||
|
||||
The [Espressif Managed Component for wolfSSL](https://components.espressif.com/components/wolfssl/wolfssl)
|
||||
|
@ -11,7 +11,7 @@ It is assumed the [ESP-IDF environment](https://docs.espressif.com/projects/esp-
|
||||
|
||||
### Files Included
|
||||
|
||||
- [main.c](./main/main.c) with a simple call to an Espressif library (`ESP_LOGI`) and a call to a wolfSSL library (`esp_ShowExtendedSystemInfo`) .
|
||||
- [main.c](./main/main.c) with a simple call to an Espressif library (`ESP_LOGI`) and a call to a wolfSSL library (`esp_ShowExtendedSystemInfo`) .
|
||||
|
||||
- See [components/wolfssl/include](./components/wolfssl/include/user_settings.h) directory to edit the wolfSSL `user_settings.h`.
|
||||
|
||||
|
@ -62,10 +62,10 @@ See the [feature request](https://sysprogs.com/w/forums/topic/feature-request-sh
|
||||
|
||||
## ESP-IDF Commandline
|
||||
|
||||
1. `idf.py menuconfig` to configure the program.
|
||||
1. `idf.py menuconfig` to configure the program.
|
||||
1-1. Example Configuration ->
|
||||
|
||||
BENCH_ARG : argument that you want to use. Default is "-lng 0"
|
||||
BENCH_ARG : argument that you want to use. Default is "-lng 0"
|
||||
The list of argument can be find in help.
|
||||
|
||||
When you want to run the benchmark program
|
||||
@ -110,9 +110,9 @@ idf.py build flash -p /dev/ttyS20 -b 115200 monitor
|
||||
|
||||
## Example Output
|
||||
|
||||
Note the default wolfSSL `user_settings.h` is configured by default to be the most
|
||||
Note the default wolfSSL `user_settings.h` is configured by default to be the most
|
||||
compatible across the widest ranges of targets. Contact wolfSSL at support@wolfssl.com
|
||||
for help in optimizing for your particular application, or see the
|
||||
for help in optimizing for your particular application, or see the
|
||||
[docs](https://www.wolfssl.com/documentation/manuals/wolfssl/index.html).
|
||||
|
||||
Compiled and flashed with `idf.py build flash -p /dev/ttyS7 -b 115200 monitor`:
|
||||
|
@ -19,7 +19,7 @@ if( EXISTS "${CMAKE_HOME_DIRECTORY}/components/wolfssl/" AND EXISTS "$ENV{IDF_PA
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS main.c
|
||||
INCLUDE_DIRS "."
|
||||
INCLUDE_DIRS "."
|
||||
"./include")
|
||||
|
||||
#
|
||||
|
@ -56,23 +56,23 @@ Difficulty flashing:
|
||||
|
||||
1. `idf.py menuconfig` to config the project
|
||||
|
||||
1-1. Example Configuration ->
|
||||
1-1. Example Configuration ->
|
||||
|
||||
Target host ip address : the host that you want to connect to.(default is 127.0.0.1)
|
||||
|
||||
1-2. Example Connection Configuration ->
|
||||
|
||||
WIFI SSID: your own WIFI, which is connected to the Internet.(default is "myssid")
|
||||
|
||||
WIFI SSID: your own WIFI, which is connected to the Internet.(default is "myssid")
|
||||
WIFI Password: WIFI password, and default is "mypassword"
|
||||
|
||||
|
||||
Note: the example program uses 11111 port. If you want to use different port
|
||||
|
||||
|
||||
Note: the example program uses 11111 port. If you want to use different port
|
||||
, you need to modify DEFAULT_PORT definition in the code.
|
||||
|
||||
When you want to test the wolfSSL client
|
||||
|
||||
1. `idf.py -p <PORT> flash` and then `idf.py monitor` to load the firmware and see the context
|
||||
2. You can use <wolfssl>/examples/server/server program for test.
|
||||
1. `idf.py -p <PORT> flash` and then `idf.py monitor` to load the firmware and see the context
|
||||
2. You can use <wolfssl>/examples/server/server program for test.
|
||||
|
||||
e.g. Launch ./examples/server/server -v 4 -b -i -d
|
||||
|
||||
@ -127,8 +127,8 @@ export IDF_PATH=~/esp/ESP8266_RTOS_SDK
|
||||
export PATH="$PATH:$HOME/esp/xtensa-lx106-elf/bin"
|
||||
|
||||
# copy and navigate to project directory
|
||||
mkdir -p /mnt/c/test/demo
|
||||
cp -r /mnt/c/workspace/wolfssl-master/IDE/Espressif/ESP-IDF/examples/wolfssl_client/* /mnt/c/test/demo
|
||||
mkdir -p /mnt/c/test/demo
|
||||
cp -r /mnt/c/workspace/wolfssl-master/IDE/Espressif/ESP-IDF/examples/wolfssl_client/* /mnt/c/test/demo
|
||||
cd /mnt/c/test/demo
|
||||
|
||||
# Clean
|
||||
|
@ -49,7 +49,7 @@ make clean && make
|
||||
### Others...
|
||||
|
||||
```
|
||||
# Success: Linux Client to ESP32 Server TLS1.2
|
||||
# Success: Linux Client to ESP32 Server TLS1.2
|
||||
./examples/client/client -h 192.168.1.113 -v 3 -l ECDHE-ECDSA-SM4-CBC-SM3 -c ./certs/sm2/client-sm2.pem -k ./certs/sm2/client-sm2-priv.pem -A ./certs/sm2/root-sm2.pem -C
|
||||
./examples/client/client -h 192.168.1.113 -v 3 -l ECDHE-ECDSA-SM4-GCM-SM3 -c ./certs/sm2/client-sm2.pem -k ./certs/sm2/client-sm2-priv.pem -A ./certs/sm2/root-sm2.pem -C
|
||||
./examples/client/client -h 192.168.1.113 -v 3 -l ECDHE-ECDSA-SM4-CCM-SM3 -c ./certs/sm2/client-sm2.pem -k ./certs/sm2/client-sm2-priv.pem -A ./certs/sm2/root-sm2.pem -C
|
||||
@ -81,7 +81,7 @@ be the same as the Linux server files.
|
||||
|
||||
| Usage | Certificate | Key | Certificate Authority file, default ./certs/client-cert.pem |
|
||||
| ----- | ---------------------------------- | ----------------------------------- | --------------------------------- |
|
||||
| server | -c ./certs/sm2/server-sm2.pem | -k ./certs/sm2/server-sm2-priv.pem | -A ./certs/sm2/client-sm2.pem -V |
|
||||
| server | -c ./certs/sm2/server-sm2.pem | -k ./certs/sm2/server-sm2-priv.pem | -A ./certs/sm2/client-sm2.pem -V |
|
||||
| client | -c ./certs/sm2/client-sm2.pem | -k ./certs/sm2/client-sm2-priv.pem | -A ./certs/sm2/root-sm2.pem -C |
|
||||
| emdedded:
|
||||
| server | wolfSSL_CTX_use_certificate_buffer<br/> server_sm2 | wolfSSL_CTX_use_PrivateKey_buffer<br/> server_sm2_priv | wolfSSL_CTX_load_verify_buffer<br/> client-sm2 |
|
||||
@ -156,7 +156,7 @@ I (622) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
|
||||
I (628) heap_init: At 40094DC8 len 0000B238 (44 KiB): IRAM
|
||||
I (636) spi_flash: detected chip: generic
|
||||
I (639) spi_flash: flash io: dio
|
||||
W (643) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the
|
||||
W (643) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the
|
||||
size in the binary image header.
|
||||
I (657) cpu_start: Starting scheduler on PRO CPU.
|
||||
I (0) cpu_start: Starting scheduler on APP CPU.
|
||||
@ -358,12 +358,12 @@ I (14715) internal.c: GrowOutputBuffer ok
|
||||
I (14715) wolfssl: wolfSSL Entering wolfSSL_get_options
|
||||
I (14725) wolfssl: Point Formats extension to write
|
||||
W (14735) wolfio: ssl->wflags = 0
|
||||
I (14735) wolfio: 16 03 03 00 52 02 00 00 4e 03 03 af 87 e2 58 57
|
||||
I (14735) wolfio: 73 c3 c1 35 1a 59 39 b2 03 9d 14 03 e0 b8 fb e8
|
||||
I (14745) wolfio: 9d 5b 9c 44 4f 57 4e 47 52 44 01 20 85 77 75 20
|
||||
I (14755) wolfio: 95 dd 00 e2 91 f8 42 33 f8 61 3f 1f de 81 15 58
|
||||
I (14755) wolfio: 23 0c e7 1e 71 e6 10 e5 67 23 e0 40 e0 11 00 00
|
||||
I (14765) wolfio: 06 00 0b 00 02 01 00
|
||||
I (14735) wolfio: 16 03 03 00 52 02 00 00 4e 03 03 af 87 e2 58 57
|
||||
I (14735) wolfio: 73 c3 c1 35 1a 59 39 b2 03 9d 14 03 e0 b8 fb e8
|
||||
I (14745) wolfio: 9d 5b 9c 44 4f 57 4e 47 52 44 01 20 85 77 75 20
|
||||
I (14755) wolfio: 95 dd 00 e2 91 f8 42 33 f8 61 3f 1f de 81 15 58
|
||||
I (14755) wolfio: 23 0c e7 1e 71 e6 10 e5 67 23 e0 40 e0 11 00 00
|
||||
I (14765) wolfio: 06 00 0b 00 02 01 00
|
||||
W (14775) wolfio: sz = 87
|
||||
I (14775) wolfssl: Shrinking output buffer
|
||||
I (14775) wolfssl: wolfSSL Leaving SendServerHello, return 0
|
||||
@ -372,53 +372,53 @@ I (14795) wolfssl: wolfSSL Entering SendCertificate
|
||||
I (14795) wolfssl: growing output buffer
|
||||
I (14805) internal.c: GrowOutputBuffer ok
|
||||
W (14815) wolfio: ssl->wflags = 0
|
||||
I (14815) wolfio: 16 03 03 02 e6 0b 00 02 e2 00 02 df 00 02 dc 30
|
||||
I (14815) wolfio: 82 02 d8 30 82 02 7e a0 03 02 01 02 02 01 01 30
|
||||
I (14825) wolfio: 0a 06 08 2a 81 1c cf 55 01 83 75 30 81 ac 31 0b
|
||||
I (14835) wolfio: 30 09 06 03 55 04 06 13 02 55 53 31 10 30 0e 06
|
||||
I (14835) wolfio: 03 55 04 08 0c 07 4d 6f 6e 74 61 6e 61 31 10 30
|
||||
I (14845) wolfio: 0e 06 03 55 04 07 0c 07 42 6f 7a 65 6d 61 6e 31
|
||||
I (14855) wolfio: 14 30 12 06 03 55 04 0a 0c 0b 77 6f 6c 66 53 53
|
||||
I (14855) wolfio: 4c 5f 73 6d 32 31 0f 30 0d 06 03 55 04 0b 0c 06
|
||||
I (14865) wolfio: 43 41 2d 73 6d 32 31 18 30 16 06 03 55 04 03 0c
|
||||
I (14875) wolfio: 0f 77 77 77 2e 77 6f 6c 66 73 73 6c 2e 63 6f 6d
|
||||
I (14875) wolfio: 31 1f 30 1d 06 09 2a 86 48 86 f7 0d 01 09 01 16
|
||||
I (14885) wolfio: 10 69 6e 66 6f 40 77 6f 6c 66 73 73 6c 2e 63 6f
|
||||
I (14895) wolfio: 6d 31 17 30 15 06 0a 09 92 26 89 93 f2 2c 64 01
|
||||
I (14895) wolfio: 01 0c 07 77 6f 6c 66 53 53 4c 30 1e 17 0d 32 33
|
||||
I (14905) wolfio: 30 32 31 35 30 36 32 33 30 37 5a 17 0d 32 35 31
|
||||
I (14915) wolfio: 31 31 31 30 36 32 33 30 37 5a 30 81 b0 31 0b 30
|
||||
I (14915) wolfio: 09 06 03 55 04 06 13 02 55 53 31 10 30 0e 06 03
|
||||
I (14925) wolfio: 55 04 08 0c 07 4d 6f 6e 74 61 6e 61 31 10 30 0e
|
||||
I (14935) wolfio: 06 03 55 04 07 0c 07 42 6f 7a 65 6d 61 6e 31 14
|
||||
I (14945) wolfio: 30 12 06 03 55 04 0a 0c 0b 77 6f 6c 66 53 53 4c
|
||||
I (14945) wolfio: 5f 73 6d 32 31 13 30 11 06 03 55 04 0b 0c 0a 53
|
||||
I (14955) wolfio: 65 72 76 65 72 2d 73 6d 32 31 18 30 16 06 03 55
|
||||
I (14965) wolfio: 04 03 0c 0f 77 77 77 2e 77 6f 6c 66 73 73 6c 2e
|
||||
I (14965) wolfio: 63 6f 6d 31 1f 30 1d 06 09 2a 86 48 86 f7 0d 01
|
||||
I (14975) wolfio: 09 01 16 10 69 6e 66 6f 40 77 6f 6c 66 73 73 6c
|
||||
I (14985) wolfio: 2e 63 6f 6d 31 17 30 15 06 0a 09 92 26 89 93 f2
|
||||
I (14985) wolfio: 2c 64 01 01 0c 07 77 6f 6c 66 53 53 4c 30 5a 30
|
||||
I (14995) wolfio: 14 06 08 2a 81 1c cf 55 01 82 2d 06 08 2a 81 1c
|
||||
I (15005) wolfio: cf 55 01 82 2d 03 42 00 04 94 70 2b 46 e4 5e 0f
|
||||
I (15005) wolfio: 41 fb 8f 2d 34 0a 41 40 19 5e fb d4 1d 11 ac fa
|
||||
I (15015) wolfio: f5 93 37 c6 fa 87 08 f7 16 1f 2c ce 30 40 9d 4f
|
||||
I (15025) wolfio: a6 2a 0a a1 d6 95 33 c3 a6 03 98 e6 8d 05 34 b0
|
||||
I (15025) wolfio: 97 0c de a4 c7 cf 53 8f d1 a3 81 89 30 81 86 30
|
||||
I (15035) wolfio: 1d 06 03 55 1d 0e 04 16 04 14 67 ae 60 ff 7e 1b
|
||||
I (15045) wolfio: 0f 95 ae 1f 82 59 f2 6c 56 2d 93 ef 17 32 30 1f
|
||||
I (15045) wolfio: 06 03 55 1d 23 04 18 30 16 80 14 47 0a 48 7e bb
|
||||
I (15055) wolfio: 02 a8 5a 26 57 2b 19 a9 7b 61 8b 7f 5d 99 6e 30
|
||||
I (15065) wolfio: 0c 06 03 55 1d 13 01 01 ff 04 02 30 00 30 0e 06
|
||||
I (15075) wolfio: 03 55 1d 0f 01 01 ff 04 04 03 02 03 a8 30 13 06
|
||||
I (15075) wolfio: 03 55 1d 25 04 0c 30 0a 06 08 2b 06 01 05 05 07
|
||||
I (15085) wolfio: 03 01 30 11 06 09 60 86 48 01 86 f8 42 01 01 04
|
||||
I (15095) wolfio: 04 03 02 06 40 30 0a 06 08 2a 81 1c cf 55 01 83
|
||||
I (15095) wolfio: 75 03 48 00 30 45 02 20 1b ca 94 28 7f f6 b2 0d
|
||||
I (15105) wolfio: 31 43 50 e1 d5 34 17 dd af 3a de 81 06 67 9a b3
|
||||
I (15115) wolfio: 06 22 7e 64 ec fd 0e b9 02 21 00 a1 48 a8 32 d1
|
||||
I (15115) wolfio: 05 09 6b 1c eb 89 12 66 d8 38 a1 c4 5c 89 09 0f
|
||||
I (15125) wolfio: fd e9 c0 3b 1d fb cd b5 4c 31 68
|
||||
I (14815) wolfio: 16 03 03 02 e6 0b 00 02 e2 00 02 df 00 02 dc 30
|
||||
I (14815) wolfio: 82 02 d8 30 82 02 7e a0 03 02 01 02 02 01 01 30
|
||||
I (14825) wolfio: 0a 06 08 2a 81 1c cf 55 01 83 75 30 81 ac 31 0b
|
||||
I (14835) wolfio: 30 09 06 03 55 04 06 13 02 55 53 31 10 30 0e 06
|
||||
I (14835) wolfio: 03 55 04 08 0c 07 4d 6f 6e 74 61 6e 61 31 10 30
|
||||
I (14845) wolfio: 0e 06 03 55 04 07 0c 07 42 6f 7a 65 6d 61 6e 31
|
||||
I (14855) wolfio: 14 30 12 06 03 55 04 0a 0c 0b 77 6f 6c 66 53 53
|
||||
I (14855) wolfio: 4c 5f 73 6d 32 31 0f 30 0d 06 03 55 04 0b 0c 06
|
||||
I (14865) wolfio: 43 41 2d 73 6d 32 31 18 30 16 06 03 55 04 03 0c
|
||||
I (14875) wolfio: 0f 77 77 77 2e 77 6f 6c 66 73 73 6c 2e 63 6f 6d
|
||||
I (14875) wolfio: 31 1f 30 1d 06 09 2a 86 48 86 f7 0d 01 09 01 16
|
||||
I (14885) wolfio: 10 69 6e 66 6f 40 77 6f 6c 66 73 73 6c 2e 63 6f
|
||||
I (14895) wolfio: 6d 31 17 30 15 06 0a 09 92 26 89 93 f2 2c 64 01
|
||||
I (14895) wolfio: 01 0c 07 77 6f 6c 66 53 53 4c 30 1e 17 0d 32 33
|
||||
I (14905) wolfio: 30 32 31 35 30 36 32 33 30 37 5a 17 0d 32 35 31
|
||||
I (14915) wolfio: 31 31 31 30 36 32 33 30 37 5a 30 81 b0 31 0b 30
|
||||
I (14915) wolfio: 09 06 03 55 04 06 13 02 55 53 31 10 30 0e 06 03
|
||||
I (14925) wolfio: 55 04 08 0c 07 4d 6f 6e 74 61 6e 61 31 10 30 0e
|
||||
I (14935) wolfio: 06 03 55 04 07 0c 07 42 6f 7a 65 6d 61 6e 31 14
|
||||
I (14945) wolfio: 30 12 06 03 55 04 0a 0c 0b 77 6f 6c 66 53 53 4c
|
||||
I (14945) wolfio: 5f 73 6d 32 31 13 30 11 06 03 55 04 0b 0c 0a 53
|
||||
I (14955) wolfio: 65 72 76 65 72 2d 73 6d 32 31 18 30 16 06 03 55
|
||||
I (14965) wolfio: 04 03 0c 0f 77 77 77 2e 77 6f 6c 66 73 73 6c 2e
|
||||
I (14965) wolfio: 63 6f 6d 31 1f 30 1d 06 09 2a 86 48 86 f7 0d 01
|
||||
I (14975) wolfio: 09 01 16 10 69 6e 66 6f 40 77 6f 6c 66 73 73 6c
|
||||
I (14985) wolfio: 2e 63 6f 6d 31 17 30 15 06 0a 09 92 26 89 93 f2
|
||||
I (14985) wolfio: 2c 64 01 01 0c 07 77 6f 6c 66 53 53 4c 30 5a 30
|
||||
I (14995) wolfio: 14 06 08 2a 81 1c cf 55 01 82 2d 06 08 2a 81 1c
|
||||
I (15005) wolfio: cf 55 01 82 2d 03 42 00 04 94 70 2b 46 e4 5e 0f
|
||||
I (15005) wolfio: 41 fb 8f 2d 34 0a 41 40 19 5e fb d4 1d 11 ac fa
|
||||
I (15015) wolfio: f5 93 37 c6 fa 87 08 f7 16 1f 2c ce 30 40 9d 4f
|
||||
I (15025) wolfio: a6 2a 0a a1 d6 95 33 c3 a6 03 98 e6 8d 05 34 b0
|
||||
I (15025) wolfio: 97 0c de a4 c7 cf 53 8f d1 a3 81 89 30 81 86 30
|
||||
I (15035) wolfio: 1d 06 03 55 1d 0e 04 16 04 14 67 ae 60 ff 7e 1b
|
||||
I (15045) wolfio: 0f 95 ae 1f 82 59 f2 6c 56 2d 93 ef 17 32 30 1f
|
||||
I (15045) wolfio: 06 03 55 1d 23 04 18 30 16 80 14 47 0a 48 7e bb
|
||||
I (15055) wolfio: 02 a8 5a 26 57 2b 19 a9 7b 61 8b 7f 5d 99 6e 30
|
||||
I (15065) wolfio: 0c 06 03 55 1d 13 01 01 ff 04 02 30 00 30 0e 06
|
||||
I (15075) wolfio: 03 55 1d 0f 01 01 ff 04 04 03 02 03 a8 30 13 06
|
||||
I (15075) wolfio: 03 55 1d 25 04 0c 30 0a 06 08 2b 06 01 05 05 07
|
||||
I (15085) wolfio: 03 01 30 11 06 09 60 86 48 01 86 f8 42 01 01 04
|
||||
I (15095) wolfio: 04 03 02 06 40 30 0a 06 08 2a 81 1c cf 55 01 83
|
||||
I (15095) wolfio: 75 03 48 00 30 45 02 20 1b ca 94 28 7f f6 b2 0d
|
||||
I (15105) wolfio: 31 43 50 e1 d5 34 17 dd af 3a de 81 06 67 9a b3
|
||||
I (15115) wolfio: 06 22 7e 64 ec fd 0e b9 02 21 00 a1 48 a8 32 d1
|
||||
I (15115) wolfio: 05 09 6b 1c eb 89 12 66 d8 38 a1 c4 5c 89 09 0f
|
||||
I (15125) wolfio: fd e9 c0 3b 1d fb cd b5 4c 31 68
|
||||
W (15135) wolfio: sz = 747
|
||||
I (15135) wolfssl: Shrinking output buffer
|
||||
I (15135) wolfssl: wolfSSL Leaving SendCertificate, return 0
|
||||
@ -440,16 +440,16 @@ I (15915) wolfssl: wolfSSL Entering SendHandshakeMsg
|
||||
I (15925) wolfssl: growing output buffer
|
||||
I (15925) internal.c: GrowOutputBuffer ok
|
||||
W (15925) wolfio: ssl->wflags = 0
|
||||
I (15935) wolfio: 16 03 03 00 95 0c 00 00 91 03 00 29 41 04 fd f5
|
||||
I (15935) wolfio: 5e 74 15 30 1d f3 84 ae a5 69 96 a9 5b dd 27 b3
|
||||
I (15945) wolfio: 00 7d 40 3a 59 93 93 6f 4d 1f 62 dc 60 48 34 1f
|
||||
I (15955) wolfio: a8 1d 34 b8 76 8f 8b 27 4a 1b 77 64 8e 2e d5 27
|
||||
I (15955) wolfio: 03 95 8b 9d a5 ed a4 a6 b9 40 1b ea aa 10 07 08
|
||||
I (15965) wolfio: 00 48 30 46 02 21 00 cb 89 61 e9 21 f9 c6 4d ad
|
||||
I (15975) wolfio: aa e7 f1 3f 6f 27 46 f0 35 ec 45 4e 8a ae f3 ac
|
||||
I (15985) wolfio: 7c c0 cf 68 11 44 e2 02 21 00 f6 40 5c bc 66 5a
|
||||
I (15985) wolfio: 74 1e 92 5d 9a 03 75 e7 7f 16 c2 b3 c8 fe 8d 5c
|
||||
I (15995) wolfio: 63 35 36 da 61 38 76 dc 4e d6
|
||||
I (15935) wolfio: 16 03 03 00 95 0c 00 00 91 03 00 29 41 04 fd f5
|
||||
I (15935) wolfio: 5e 74 15 30 1d f3 84 ae a5 69 96 a9 5b dd 27 b3
|
||||
I (15945) wolfio: 00 7d 40 3a 59 93 93 6f 4d 1f 62 dc 60 48 34 1f
|
||||
I (15955) wolfio: a8 1d 34 b8 76 8f 8b 27 4a 1b 77 64 8e 2e d5 27
|
||||
I (15955) wolfio: 03 95 8b 9d a5 ed a4 a6 b9 40 1b ea aa 10 07 08
|
||||
I (15965) wolfio: 00 48 30 46 02 21 00 cb 89 61 e9 21 f9 c6 4d ad
|
||||
I (15975) wolfio: aa e7 f1 3f 6f 27 46 f0 35 ec 45 4e 8a ae f3 ac
|
||||
I (15985) wolfio: 7c c0 cf 68 11 44 e2 02 21 00 f6 40 5c bc 66 5a
|
||||
I (15985) wolfio: 74 1e 92 5d 9a 03 75 e7 7f 16 c2 b3 c8 fe 8d 5c
|
||||
I (15995) wolfio: 63 35 36 da 61 38 76 dc 4e d6
|
||||
W (15995) wolfio: sz = 154
|
||||
I (16005) wolfssl: Shrinking output buffer
|
||||
I (16005) wolfssl: wolfSSL Leaving SendServerKeyExchange, return 0
|
||||
@ -459,7 +459,7 @@ I (16025) wolfssl: wolfSSL Entering SendServerHelloDone
|
||||
I (16035) wolfssl: growing output buffer
|
||||
I (16035) internal.c: GrowOutputBuffer ok
|
||||
W (16045) wolfio: ssl->wflags = 0
|
||||
I (16045) wolfio: 16 03 03 00 04 0e 00 00 00
|
||||
I (16045) wolfio: 16 03 03 00 04 0e 00 00 00
|
||||
W (16045) wolfio: sz = 9
|
||||
I (16055) wolfssl: Embed Send error
|
||||
I (16055) wolfssl: Connection reset
|
||||
@ -479,14 +479,14 @@ I (16125) wolfssl: User calling wolfSSL_read in error state, not allowed
|
||||
I (16135) wolfssl: wolfSSL Leaving wolfSSL_read_internal, return -308
|
||||
E (16145) tls_server: ERROR: failed to read
|
||||
I (16145) wolfssl: Client sends:
|
||||
I (16145) wolfssl:
|
||||
I (16145) wolfssl:
|
||||
I (16155) wolfssl: wolfSSL Entering wolfSSL_write
|
||||
I (16155) wolfssl: handshake not complete, trying to finish
|
||||
I (16165) wolfssl: wolfSSL Entering wolfSSL_negotiate
|
||||
I (16165) wolfssl: wolfSSL Entering wolfSSL_accept
|
||||
I (16175) wolfssl: wolfSSL Entering ReinitSSL
|
||||
W (16185) wolfio: ssl->wflags = 0
|
||||
I (16185) wolfio: 16 03 03 00 04 0e 00 00 00
|
||||
I (16185) wolfio: 16 03 03 00 04 0e 00 00 00
|
||||
W (16185) wolfio: sz = 9
|
||||
I (16195) wolfssl: Embed Send error
|
||||
I (16195) wolfssl: General error
|
||||
|
@ -20,18 +20,18 @@ The Example contains a wolfSSL simple server.
|
||||
1. `idf.py menuconfig` to configure the project
|
||||
|
||||
1-1. Example Connection Configuration ->
|
||||
|
||||
WIFI SSID : your own WIFI, which is connected to the Internet.(default is "myssid")
|
||||
|
||||
WIFI SSID : your own WIFI, which is connected to the Internet.(default is "myssid")
|
||||
WIFI Password : WIFI password, and default is "mypassword"
|
||||
|
||||
When you want to test the wolfSSL simple server demo
|
||||
|
||||
1. `idf.py -p <PORT> flash` to compile the code and load the firmware
|
||||
2. `idf.py monitor` to see the context. The assigned IP address can be found in output message.
|
||||
3. Once the server connects to the wifi, it is waiting for client request.
|
||||
3. Once the server connects to the wifi, it is waiting for client request.
|
||||
("Waiting for a connection..." message will be displayed.)
|
||||
|
||||
4. You can use <wolfssl>/examples/client to test the server
|
||||
|
||||
4. You can use <wolfssl>/examples/client to test the server
|
||||
e.g ./example/client/client -h xx.xx.xx
|
||||
|
||||
See the README.md file in the upper level 'examples' directory for more information about examples.
|
||||
|
@ -49,7 +49,7 @@ make clean && make
|
||||
### Others...
|
||||
|
||||
```
|
||||
# Success: Linux Client to ESP32 Server TLS1.2
|
||||
# Success: Linux Client to ESP32 Server TLS1.2
|
||||
./examples/client/client -h 192.168.1.113 -v 3 -l ECDHE-ECDSA-SM4-CBC-SM3 -c ./certs/sm2/client-sm2.pem -k ./certs/sm2/client-sm2-priv.pem -A ./certs/sm2/root-sm2.pem -C
|
||||
./examples/client/client -h 192.168.1.113 -v 3 -l ECDHE-ECDSA-SM4-GCM-SM3 -c ./certs/sm2/client-sm2.pem -k ./certs/sm2/client-sm2-priv.pem -A ./certs/sm2/root-sm2.pem -C
|
||||
./examples/client/client -h 192.168.1.113 -v 3 -l ECDHE-ECDSA-SM4-CCM-SM3 -c ./certs/sm2/client-sm2.pem -k ./certs/sm2/client-sm2-priv.pem -A ./certs/sm2/root-sm2.pem -C
|
||||
@ -81,7 +81,7 @@ be the same as the Linux server files.
|
||||
|
||||
| Usage | Certificate | Key | Certificate Authority file, default ./certs/client-cert.pem |
|
||||
| ----- | ---------------------------------- | ----------------------------------- | --------------------------------- |
|
||||
| server | -c ./certs/sm2/server-sm2.pem | -k ./certs/sm2/server-sm2-priv.pem | -A ./certs/sm2/client-sm2.pem -V |
|
||||
| server | -c ./certs/sm2/server-sm2.pem | -k ./certs/sm2/server-sm2-priv.pem | -A ./certs/sm2/client-sm2.pem -V |
|
||||
| client | -c ./certs/sm2/client-sm2.pem | -k ./certs/sm2/client-sm2-priv.pem | -A ./certs/sm2/root-sm2.pem -C |
|
||||
| emdedded:
|
||||
| server | wolfSSL_CTX_use_certificate_buffer<br/> server_sm2 | wolfSSL_CTX_use_PrivateKey_buffer<br/> server_sm2_priv | wolfSSL_CTX_load_verify_buffer<br/> client-sm2 |
|
||||
@ -156,7 +156,7 @@ I (622) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
|
||||
I (628) heap_init: At 40094DC8 len 0000B238 (44 KiB): IRAM
|
||||
I (636) spi_flash: detected chip: generic
|
||||
I (639) spi_flash: flash io: dio
|
||||
W (643) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the
|
||||
W (643) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the
|
||||
size in the binary image header.
|
||||
I (657) cpu_start: Starting scheduler on PRO CPU.
|
||||
I (0) cpu_start: Starting scheduler on APP CPU.
|
||||
@ -358,12 +358,12 @@ I (14715) internal.c: GrowOutputBuffer ok
|
||||
I (14715) wolfssl: wolfSSL Entering wolfSSL_get_options
|
||||
I (14725) wolfssl: Point Formats extension to write
|
||||
W (14735) wolfio: ssl->wflags = 0
|
||||
I (14735) wolfio: 16 03 03 00 52 02 00 00 4e 03 03 af 87 e2 58 57
|
||||
I (14735) wolfio: 73 c3 c1 35 1a 59 39 b2 03 9d 14 03 e0 b8 fb e8
|
||||
I (14745) wolfio: 9d 5b 9c 44 4f 57 4e 47 52 44 01 20 85 77 75 20
|
||||
I (14755) wolfio: 95 dd 00 e2 91 f8 42 33 f8 61 3f 1f de 81 15 58
|
||||
I (14755) wolfio: 23 0c e7 1e 71 e6 10 e5 67 23 e0 40 e0 11 00 00
|
||||
I (14765) wolfio: 06 00 0b 00 02 01 00
|
||||
I (14735) wolfio: 16 03 03 00 52 02 00 00 4e 03 03 af 87 e2 58 57
|
||||
I (14735) wolfio: 73 c3 c1 35 1a 59 39 b2 03 9d 14 03 e0 b8 fb e8
|
||||
I (14745) wolfio: 9d 5b 9c 44 4f 57 4e 47 52 44 01 20 85 77 75 20
|
||||
I (14755) wolfio: 95 dd 00 e2 91 f8 42 33 f8 61 3f 1f de 81 15 58
|
||||
I (14755) wolfio: 23 0c e7 1e 71 e6 10 e5 67 23 e0 40 e0 11 00 00
|
||||
I (14765) wolfio: 06 00 0b 00 02 01 00
|
||||
W (14775) wolfio: sz = 87
|
||||
I (14775) wolfssl: Shrinking output buffer
|
||||
I (14775) wolfssl: wolfSSL Leaving SendServerHello, return 0
|
||||
@ -372,53 +372,53 @@ I (14795) wolfssl: wolfSSL Entering SendCertificate
|
||||
I (14795) wolfssl: growing output buffer
|
||||
I (14805) internal.c: GrowOutputBuffer ok
|
||||
W (14815) wolfio: ssl->wflags = 0
|
||||
I (14815) wolfio: 16 03 03 02 e6 0b 00 02 e2 00 02 df 00 02 dc 30
|
||||
I (14815) wolfio: 82 02 d8 30 82 02 7e a0 03 02 01 02 02 01 01 30
|
||||
I (14825) wolfio: 0a 06 08 2a 81 1c cf 55 01 83 75 30 81 ac 31 0b
|
||||
I (14835) wolfio: 30 09 06 03 55 04 06 13 02 55 53 31 10 30 0e 06
|
||||
I (14835) wolfio: 03 55 04 08 0c 07 4d 6f 6e 74 61 6e 61 31 10 30
|
||||
I (14845) wolfio: 0e 06 03 55 04 07 0c 07 42 6f 7a 65 6d 61 6e 31
|
||||
I (14855) wolfio: 14 30 12 06 03 55 04 0a 0c 0b 77 6f 6c 66 53 53
|
||||
I (14855) wolfio: 4c 5f 73 6d 32 31 0f 30 0d 06 03 55 04 0b 0c 06
|
||||
I (14865) wolfio: 43 41 2d 73 6d 32 31 18 30 16 06 03 55 04 03 0c
|
||||
I (14875) wolfio: 0f 77 77 77 2e 77 6f 6c 66 73 73 6c 2e 63 6f 6d
|
||||
I (14875) wolfio: 31 1f 30 1d 06 09 2a 86 48 86 f7 0d 01 09 01 16
|
||||
I (14885) wolfio: 10 69 6e 66 6f 40 77 6f 6c 66 73 73 6c 2e 63 6f
|
||||
I (14895) wolfio: 6d 31 17 30 15 06 0a 09 92 26 89 93 f2 2c 64 01
|
||||
I (14895) wolfio: 01 0c 07 77 6f 6c 66 53 53 4c 30 1e 17 0d 32 33
|
||||
I (14905) wolfio: 30 32 31 35 30 36 32 33 30 37 5a 17 0d 32 35 31
|
||||
I (14915) wolfio: 31 31 31 30 36 32 33 30 37 5a 30 81 b0 31 0b 30
|
||||
I (14915) wolfio: 09 06 03 55 04 06 13 02 55 53 31 10 30 0e 06 03
|
||||
I (14925) wolfio: 55 04 08 0c 07 4d 6f 6e 74 61 6e 61 31 10 30 0e
|
||||
I (14935) wolfio: 06 03 55 04 07 0c 07 42 6f 7a 65 6d 61 6e 31 14
|
||||
I (14945) wolfio: 30 12 06 03 55 04 0a 0c 0b 77 6f 6c 66 53 53 4c
|
||||
I (14945) wolfio: 5f 73 6d 32 31 13 30 11 06 03 55 04 0b 0c 0a 53
|
||||
I (14955) wolfio: 65 72 76 65 72 2d 73 6d 32 31 18 30 16 06 03 55
|
||||
I (14965) wolfio: 04 03 0c 0f 77 77 77 2e 77 6f 6c 66 73 73 6c 2e
|
||||
I (14965) wolfio: 63 6f 6d 31 1f 30 1d 06 09 2a 86 48 86 f7 0d 01
|
||||
I (14975) wolfio: 09 01 16 10 69 6e 66 6f 40 77 6f 6c 66 73 73 6c
|
||||
I (14985) wolfio: 2e 63 6f 6d 31 17 30 15 06 0a 09 92 26 89 93 f2
|
||||
I (14985) wolfio: 2c 64 01 01 0c 07 77 6f 6c 66 53 53 4c 30 5a 30
|
||||
I (14995) wolfio: 14 06 08 2a 81 1c cf 55 01 82 2d 06 08 2a 81 1c
|
||||
I (15005) wolfio: cf 55 01 82 2d 03 42 00 04 94 70 2b 46 e4 5e 0f
|
||||
I (15005) wolfio: 41 fb 8f 2d 34 0a 41 40 19 5e fb d4 1d 11 ac fa
|
||||
I (15015) wolfio: f5 93 37 c6 fa 87 08 f7 16 1f 2c ce 30 40 9d 4f
|
||||
I (15025) wolfio: a6 2a 0a a1 d6 95 33 c3 a6 03 98 e6 8d 05 34 b0
|
||||
I (15025) wolfio: 97 0c de a4 c7 cf 53 8f d1 a3 81 89 30 81 86 30
|
||||
I (15035) wolfio: 1d 06 03 55 1d 0e 04 16 04 14 67 ae 60 ff 7e 1b
|
||||
I (15045) wolfio: 0f 95 ae 1f 82 59 f2 6c 56 2d 93 ef 17 32 30 1f
|
||||
I (15045) wolfio: 06 03 55 1d 23 04 18 30 16 80 14 47 0a 48 7e bb
|
||||
I (15055) wolfio: 02 a8 5a 26 57 2b 19 a9 7b 61 8b 7f 5d 99 6e 30
|
||||
I (15065) wolfio: 0c 06 03 55 1d 13 01 01 ff 04 02 30 00 30 0e 06
|
||||
I (15075) wolfio: 03 55 1d 0f 01 01 ff 04 04 03 02 03 a8 30 13 06
|
||||
I (15075) wolfio: 03 55 1d 25 04 0c 30 0a 06 08 2b 06 01 05 05 07
|
||||
I (15085) wolfio: 03 01 30 11 06 09 60 86 48 01 86 f8 42 01 01 04
|
||||
I (15095) wolfio: 04 03 02 06 40 30 0a 06 08 2a 81 1c cf 55 01 83
|
||||
I (15095) wolfio: 75 03 48 00 30 45 02 20 1b ca 94 28 7f f6 b2 0d
|
||||
I (15105) wolfio: 31 43 50 e1 d5 34 17 dd af 3a de 81 06 67 9a b3
|
||||
I (15115) wolfio: 06 22 7e 64 ec fd 0e b9 02 21 00 a1 48 a8 32 d1
|
||||
I (15115) wolfio: 05 09 6b 1c eb 89 12 66 d8 38 a1 c4 5c 89 09 0f
|
||||
I (15125) wolfio: fd e9 c0 3b 1d fb cd b5 4c 31 68
|
||||
I (14815) wolfio: 16 03 03 02 e6 0b 00 02 e2 00 02 df 00 02 dc 30
|
||||
I (14815) wolfio: 82 02 d8 30 82 02 7e a0 03 02 01 02 02 01 01 30
|
||||
I (14825) wolfio: 0a 06 08 2a 81 1c cf 55 01 83 75 30 81 ac 31 0b
|
||||
I (14835) wolfio: 30 09 06 03 55 04 06 13 02 55 53 31 10 30 0e 06
|
||||
I (14835) wolfio: 03 55 04 08 0c 07 4d 6f 6e 74 61 6e 61 31 10 30
|
||||
I (14845) wolfio: 0e 06 03 55 04 07 0c 07 42 6f 7a 65 6d 61 6e 31
|
||||
I (14855) wolfio: 14 30 12 06 03 55 04 0a 0c 0b 77 6f 6c 66 53 53
|
||||
I (14855) wolfio: 4c 5f 73 6d 32 31 0f 30 0d 06 03 55 04 0b 0c 06
|
||||
I (14865) wolfio: 43 41 2d 73 6d 32 31 18 30 16 06 03 55 04 03 0c
|
||||
I (14875) wolfio: 0f 77 77 77 2e 77 6f 6c 66 73 73 6c 2e 63 6f 6d
|
||||
I (14875) wolfio: 31 1f 30 1d 06 09 2a 86 48 86 f7 0d 01 09 01 16
|
||||
I (14885) wolfio: 10 69 6e 66 6f 40 77 6f 6c 66 73 73 6c 2e 63 6f
|
||||
I (14895) wolfio: 6d 31 17 30 15 06 0a 09 92 26 89 93 f2 2c 64 01
|
||||
I (14895) wolfio: 01 0c 07 77 6f 6c 66 53 53 4c 30 1e 17 0d 32 33
|
||||
I (14905) wolfio: 30 32 31 35 30 36 32 33 30 37 5a 17 0d 32 35 31
|
||||
I (14915) wolfio: 31 31 31 30 36 32 33 30 37 5a 30 81 b0 31 0b 30
|
||||
I (14915) wolfio: 09 06 03 55 04 06 13 02 55 53 31 10 30 0e 06 03
|
||||
I (14925) wolfio: 55 04 08 0c 07 4d 6f 6e 74 61 6e 61 31 10 30 0e
|
||||
I (14935) wolfio: 06 03 55 04 07 0c 07 42 6f 7a 65 6d 61 6e 31 14
|
||||
I (14945) wolfio: 30 12 06 03 55 04 0a 0c 0b 77 6f 6c 66 53 53 4c
|
||||
I (14945) wolfio: 5f 73 6d 32 31 13 30 11 06 03 55 04 0b 0c 0a 53
|
||||
I (14955) wolfio: 65 72 76 65 72 2d 73 6d 32 31 18 30 16 06 03 55
|
||||
I (14965) wolfio: 04 03 0c 0f 77 77 77 2e 77 6f 6c 66 73 73 6c 2e
|
||||
I (14965) wolfio: 63 6f 6d 31 1f 30 1d 06 09 2a 86 48 86 f7 0d 01
|
||||
I (14975) wolfio: 09 01 16 10 69 6e 66 6f 40 77 6f 6c 66 73 73 6c
|
||||
I (14985) wolfio: 2e 63 6f 6d 31 17 30 15 06 0a 09 92 26 89 93 f2
|
||||
I (14985) wolfio: 2c 64 01 01 0c 07 77 6f 6c 66 53 53 4c 30 5a 30
|
||||
I (14995) wolfio: 14 06 08 2a 81 1c cf 55 01 82 2d 06 08 2a 81 1c
|
||||
I (15005) wolfio: cf 55 01 82 2d 03 42 00 04 94 70 2b 46 e4 5e 0f
|
||||
I (15005) wolfio: 41 fb 8f 2d 34 0a 41 40 19 5e fb d4 1d 11 ac fa
|
||||
I (15015) wolfio: f5 93 37 c6 fa 87 08 f7 16 1f 2c ce 30 40 9d 4f
|
||||
I (15025) wolfio: a6 2a 0a a1 d6 95 33 c3 a6 03 98 e6 8d 05 34 b0
|
||||
I (15025) wolfio: 97 0c de a4 c7 cf 53 8f d1 a3 81 89 30 81 86 30
|
||||
I (15035) wolfio: 1d 06 03 55 1d 0e 04 16 04 14 67 ae 60 ff 7e 1b
|
||||
I (15045) wolfio: 0f 95 ae 1f 82 59 f2 6c 56 2d 93 ef 17 32 30 1f
|
||||
I (15045) wolfio: 06 03 55 1d 23 04 18 30 16 80 14 47 0a 48 7e bb
|
||||
I (15055) wolfio: 02 a8 5a 26 57 2b 19 a9 7b 61 8b 7f 5d 99 6e 30
|
||||
I (15065) wolfio: 0c 06 03 55 1d 13 01 01 ff 04 02 30 00 30 0e 06
|
||||
I (15075) wolfio: 03 55 1d 0f 01 01 ff 04 04 03 02 03 a8 30 13 06
|
||||
I (15075) wolfio: 03 55 1d 25 04 0c 30 0a 06 08 2b 06 01 05 05 07
|
||||
I (15085) wolfio: 03 01 30 11 06 09 60 86 48 01 86 f8 42 01 01 04
|
||||
I (15095) wolfio: 04 03 02 06 40 30 0a 06 08 2a 81 1c cf 55 01 83
|
||||
I (15095) wolfio: 75 03 48 00 30 45 02 20 1b ca 94 28 7f f6 b2 0d
|
||||
I (15105) wolfio: 31 43 50 e1 d5 34 17 dd af 3a de 81 06 67 9a b3
|
||||
I (15115) wolfio: 06 22 7e 64 ec fd 0e b9 02 21 00 a1 48 a8 32 d1
|
||||
I (15115) wolfio: 05 09 6b 1c eb 89 12 66 d8 38 a1 c4 5c 89 09 0f
|
||||
I (15125) wolfio: fd e9 c0 3b 1d fb cd b5 4c 31 68
|
||||
W (15135) wolfio: sz = 747
|
||||
I (15135) wolfssl: Shrinking output buffer
|
||||
I (15135) wolfssl: wolfSSL Leaving SendCertificate, return 0
|
||||
@ -440,16 +440,16 @@ I (15915) wolfssl: wolfSSL Entering SendHandshakeMsg
|
||||
I (15925) wolfssl: growing output buffer
|
||||
I (15925) internal.c: GrowOutputBuffer ok
|
||||
W (15925) wolfio: ssl->wflags = 0
|
||||
I (15935) wolfio: 16 03 03 00 95 0c 00 00 91 03 00 29 41 04 fd f5
|
||||
I (15935) wolfio: 5e 74 15 30 1d f3 84 ae a5 69 96 a9 5b dd 27 b3
|
||||
I (15945) wolfio: 00 7d 40 3a 59 93 93 6f 4d 1f 62 dc 60 48 34 1f
|
||||
I (15955) wolfio: a8 1d 34 b8 76 8f 8b 27 4a 1b 77 64 8e 2e d5 27
|
||||
I (15955) wolfio: 03 95 8b 9d a5 ed a4 a6 b9 40 1b ea aa 10 07 08
|
||||
I (15965) wolfio: 00 48 30 46 02 21 00 cb 89 61 e9 21 f9 c6 4d ad
|
||||
I (15975) wolfio: aa e7 f1 3f 6f 27 46 f0 35 ec 45 4e 8a ae f3 ac
|
||||
I (15985) wolfio: 7c c0 cf 68 11 44 e2 02 21 00 f6 40 5c bc 66 5a
|
||||
I (15985) wolfio: 74 1e 92 5d 9a 03 75 e7 7f 16 c2 b3 c8 fe 8d 5c
|
||||
I (15995) wolfio: 63 35 36 da 61 38 76 dc 4e d6
|
||||
I (15935) wolfio: 16 03 03 00 95 0c 00 00 91 03 00 29 41 04 fd f5
|
||||
I (15935) wolfio: 5e 74 15 30 1d f3 84 ae a5 69 96 a9 5b dd 27 b3
|
||||
I (15945) wolfio: 00 7d 40 3a 59 93 93 6f 4d 1f 62 dc 60 48 34 1f
|
||||
I (15955) wolfio: a8 1d 34 b8 76 8f 8b 27 4a 1b 77 64 8e 2e d5 27
|
||||
I (15955) wolfio: 03 95 8b 9d a5 ed a4 a6 b9 40 1b ea aa 10 07 08
|
||||
I (15965) wolfio: 00 48 30 46 02 21 00 cb 89 61 e9 21 f9 c6 4d ad
|
||||
I (15975) wolfio: aa e7 f1 3f 6f 27 46 f0 35 ec 45 4e 8a ae f3 ac
|
||||
I (15985) wolfio: 7c c0 cf 68 11 44 e2 02 21 00 f6 40 5c bc 66 5a
|
||||
I (15985) wolfio: 74 1e 92 5d 9a 03 75 e7 7f 16 c2 b3 c8 fe 8d 5c
|
||||
I (15995) wolfio: 63 35 36 da 61 38 76 dc 4e d6
|
||||
W (15995) wolfio: sz = 154
|
||||
I (16005) wolfssl: Shrinking output buffer
|
||||
I (16005) wolfssl: wolfSSL Leaving SendServerKeyExchange, return 0
|
||||
@ -459,7 +459,7 @@ I (16025) wolfssl: wolfSSL Entering SendServerHelloDone
|
||||
I (16035) wolfssl: growing output buffer
|
||||
I (16035) internal.c: GrowOutputBuffer ok
|
||||
W (16045) wolfio: ssl->wflags = 0
|
||||
I (16045) wolfio: 16 03 03 00 04 0e 00 00 00
|
||||
I (16045) wolfio: 16 03 03 00 04 0e 00 00 00
|
||||
W (16045) wolfio: sz = 9
|
||||
I (16055) wolfssl: Embed Send error
|
||||
I (16055) wolfssl: Connection reset
|
||||
@ -479,14 +479,14 @@ I (16125) wolfssl: User calling wolfSSL_read in error state, not allowed
|
||||
I (16135) wolfssl: wolfSSL Leaving wolfSSL_read_internal, return -308
|
||||
E (16145) tls_server: ERROR: failed to read
|
||||
I (16145) wolfssl: Client sends:
|
||||
I (16145) wolfssl:
|
||||
I (16145) wolfssl:
|
||||
I (16155) wolfssl: wolfSSL Entering wolfSSL_write
|
||||
I (16155) wolfssl: handshake not complete, trying to finish
|
||||
I (16165) wolfssl: wolfSSL Entering wolfSSL_negotiate
|
||||
I (16165) wolfssl: wolfSSL Entering wolfSSL_accept
|
||||
I (16175) wolfssl: wolfSSL Entering ReinitSSL
|
||||
W (16185) wolfio: ssl->wflags = 0
|
||||
I (16185) wolfio: 16 03 03 00 04 0e 00 00 00
|
||||
I (16185) wolfio: 16 03 03 00 04 0e 00 00 00
|
||||
W (16185) wolfio: sz = 9
|
||||
I (16195) wolfssl: Embed Send error
|
||||
I (16195) wolfssl: General error
|
||||
|
@ -1,3 +1,3 @@
|
||||
#
|
||||
# Main Makefile. This is basically the same as a component makefile.
|
||||
#
|
||||
#
|
||||
|
@ -7,7 +7,7 @@ For general information on [wolfSSL examples for Espressif](../README.md), see t
|
||||
|
||||
## ESP Registry
|
||||
|
||||
The easiest way to get started with wolfSSL is by using the
|
||||
The easiest way to get started with wolfSSL is by using the
|
||||
[ESP Registry](https://components.espressif.com/components/wolfssl/wolfssl/) examples.
|
||||
|
||||
```
|
||||
@ -24,10 +24,10 @@ No wolfSSL setup is needed. You may need to adjust your specific COM port. The d
|
||||
|
||||
## ESP-IDF Commandline
|
||||
|
||||
1. `idf.py menuconfig` to configure the program.
|
||||
1. `idf.py menuconfig` to configure the program.
|
||||
1-1. Example Configuration ->
|
||||
|
||||
TEST_ARG : argument that you want to use. Default is "-lng 0"
|
||||
TEST_ARG : argument that you want to use. Default is "-lng 0"
|
||||
The list of argument can be find in help.
|
||||
|
||||
When you want to run the test program
|
||||
@ -60,16 +60,16 @@ idf.py set-target esp32s3
|
||||
idf.py erase-flash -p /dev/ttyS24 -b 115200
|
||||
|
||||
# start with a low upload speed, then increase as found operational
|
||||
idf.py
|
||||
idf.py
|
||||
# build and flash, in this example to COM24
|
||||
idf.py build flash -p /dev/ttyS24 -b 115200 monitor
|
||||
```
|
||||
|
||||
## Example Output
|
||||
|
||||
Note the default wolfSSL `user_settings.h` is configured by default to be the most
|
||||
Note the default wolfSSL `user_settings.h` is configured by default to be the most
|
||||
compatible across the widest ranges of targets. Contact wolfSSL at support@wolfssl.com
|
||||
for help in optimizing for your particular application, or see the
|
||||
for help in optimizing for your particular application, or see the
|
||||
[docs](https://www.wolfssl.com/documentation/manuals/wolfssl/index.html).
|
||||
|
||||
Compiled and flashed with `idf.py build flash -p /dev/ttyS7 -b 115200 monitor`:
|
||||
|
@ -12,10 +12,10 @@ Open the VisualGDB Visual Studio Project file in the VisualGDB directory and cli
|
||||
|
||||
## ESP-IDF Commandline
|
||||
|
||||
1. `idf.py menuconfig` to configure the program.
|
||||
1. `idf.py menuconfig` to configure the program.
|
||||
1-1. Example Configuration ->
|
||||
|
||||
TEST_ARG : argument that you want to use. Default is "-lng 0"
|
||||
TEST_ARG : argument that you want to use. Default is "-lng 0"
|
||||
The list of argument can be find in help.
|
||||
|
||||
When you want to run the test program
|
||||
@ -46,9 +46,9 @@ idf.py build flash -p /dev/ttyS20 -b 115200 monitor
|
||||
|
||||
## Example Output
|
||||
|
||||
Note the default wolfSSL `user_settings.h` is configured by default to be the most
|
||||
Note the default wolfSSL `user_settings.h` is configured by default to be the most
|
||||
compatible across the widest ranges of targets. Contact wolfSSL at support@wolfssl.com
|
||||
for help in optimizing for your particular application, or see the
|
||||
for help in optimizing for your particular application, or see the
|
||||
[docs](https://www.wolfssl.com/documentation/manuals/wolfssl/index.html).
|
||||
|
||||
Compiled and flashed with `idf.py build flash -p /dev/ttyS7 -b 115200 monitor`:
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Main component makefile.
|
||||
#
|
||||
# This Makefile can be left empty. By default, it will take the sources in the
|
||||
# src/ directory, compile them and link them into lib(subdirectory_name).a
|
||||
# This Makefile can be left empty. By default, it will take the sources in the
|
||||
# src/ directory, compile them and link them into lib(subdirectory_name).a
|
||||
# in the build directory. This behaviour is entirely configurable,
|
||||
# please read the ESP-IDF documents if you need to do this.
|
||||
#
|
||||
#
|
||||
|
@ -1,3 +1,3 @@
|
||||
#
|
||||
# Main Makefile. This is basically the same as a component makefile.
|
||||
#
|
||||
#
|
||||
|
@ -4,4 +4,4 @@ Files in IDE\Espressif\ESP-IDF\libs:
|
||||
|
||||
`component.mk` used in ESP-IDF `wolfssl` component directory
|
||||
|
||||
`tigard.cfg` Tigard JTAG config file
|
||||
`tigard.cfg` Tigard JTAG config file
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
The test contains of wolfSSL unit-test app on Unity.
|
||||
|
||||
When you want to run the app
|
||||
1. Go to /esp-idf/tools/unit-test-app/ folder
|
||||
2. `idf.py menuconfig` to configure unit test app.
|
||||
3. `idf.py -T wolfssl build` to build wolfssl unit test app.
|
||||
When you want to run the app
|
||||
1. Go to /esp-idf/tools/unit-test-app/ folder
|
||||
2. `idf.py menuconfig` to configure unit test app.
|
||||
3. `idf.py -T wolfssl build` to build wolfssl unit test app.
|
||||
|
||||
See [https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/unit-tests.html] for more information about unit test app.
|
||||
|
@ -118,7 +118,7 @@ These settings are located in `Header/user_settings.h`.
|
||||
* `USE_SLOW_SHA`: Enables smaller/slower version of SHA.
|
||||
* `USE_SLOW_SHA256`: About 2k smaller and about 25% slower
|
||||
* `USE_SLOW_SHA512`: Over twice as small, but 50% slower
|
||||
* `USE_CERT_BUFFERS_1024` or `USE_CERT_BUFFERS_2048`: Size of RSA certs / keys to test with.
|
||||
* `USE_CERT_BUFFERS_1024` or `USE_CERT_BUFFERS_2048`: Size of RSA certs / keys to test with.
|
||||
* `BENCH_EMBEDDED`: Define this if using the wolfCrypt test/benchmark and using a low memory target.
|
||||
* `ECC_USER_CURVES`: Allows user to define curve sizes to enable. Default is 256-bit on. To enable others use `HAVE_ECC192`, `HAVE_ECC224`, etc....
|
||||
* `TFM_ARM`, `TFM_SSE2`, `TFM_AVR32`, `TFM_PPC32`, `TFM_MIPS`, `TFM_X86` or `TFM_X86_64`: These are assembly optimizations available with USE_FAST_MATH.
|
||||
|
@ -71,5 +71,5 @@ benchmarking using threads on aDSP
|
||||
20000 verifies on 4 threads took 23.261446 seconds
|
||||
|
||||
benchmarking 1 thread on cDSP
|
||||
5000 verifies on 1 threads took 18.560995 seconds
|
||||
5000 verifies on 1 threads took 18.560995 seconds
|
||||
|
||||
|
@ -32,14 +32,14 @@
|
||||
#define MAX_TIMES 5000
|
||||
#define MAX_BLOCK_SIZE 1024
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
static double get_time()
|
||||
{
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, 0);
|
||||
return (double)tv.tv_sec + (double)tv.tv_usec / 1000000;
|
||||
}
|
||||
static double get_time()
|
||||
{
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, 0);
|
||||
return (double)tv.tv_sec + (double)tv.tv_usec / 1000000;
|
||||
}
|
||||
|
||||
|
||||
/* software version */
|
||||
|
@ -26,4 +26,4 @@ int main(void) {
|
||||
OS_CREATETASK(&WLFTASK, "Tests task", wolfTask, 100, WLFSTACK);
|
||||
OS_Start(); /* Start the OS */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <rt.h>
|
||||
|
||||
BOOLEAN __stdcall RslMain( RTHANDLE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -39,7 +39,7 @@ extern int SER_PutChar (int ch);
|
||||
/*-----------------------------------------------------------------------------
|
||||
Write character to the Serial Port
|
||||
*----------------------------------------------------------------------------*/
|
||||
int sendchar (int c)
|
||||
int sendchar (int c)
|
||||
{
|
||||
if (c == '\n') {
|
||||
SER_PutChar ('\r');
|
||||
@ -52,7 +52,7 @@ int sendchar (int c)
|
||||
/*-----------------------------------------------------------------------------
|
||||
Read character from the Serial Port
|
||||
*----------------------------------------------------------------------------*/
|
||||
int getkey (void)
|
||||
int getkey (void)
|
||||
{
|
||||
int ch = SER_GetChar();
|
||||
#if defined (HAVE_KEIL_RTX)
|
||||
@ -67,7 +67,7 @@ int getkey (void)
|
||||
|
||||
/*--------------------------- _ttywrch ---------------------------------------*/
|
||||
|
||||
void _ttywrch (int ch)
|
||||
void _ttywrch (int ch)
|
||||
{
|
||||
#ifdef STDIO
|
||||
sendchar (ch);
|
||||
@ -76,28 +76,28 @@ void _ttywrch (int ch)
|
||||
|
||||
/*--------------------------- _sys_open --------------------------------------*/
|
||||
#ifndef NO_FILESYSTEM
|
||||
static int KEIL_FS_open(const char *name, int openmode)
|
||||
static int KEIL_FS_open(const char *name, int openmode)
|
||||
{
|
||||
int i ; int ret ;
|
||||
#define PATHSIZE 100
|
||||
char path[PATHSIZE] ; char *p ;
|
||||
|
||||
|
||||
if(strlen(name) > PATHSIZE)return(-1) ;
|
||||
|
||||
|
||||
for(i = 0; i<= strlen(name); i++) {
|
||||
if(name[i] == '/')path[i] = '\\' ;
|
||||
else path[i] = name[i] ;
|
||||
}
|
||||
}
|
||||
if(path[0] == '.' && path[1] == '\\') p = path + 2 ;
|
||||
else p = path ;
|
||||
|
||||
ret = __sys_open (p, openmode) ;
|
||||
|
||||
|
||||
return(ret) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
FILEHANDLE _sys_open (const char *name, int openmode)
|
||||
FILEHANDLE _sys_open (const char *name, int openmode)
|
||||
{
|
||||
/* Register standard Input Output devices. */
|
||||
if (strcmp(name, "STDIN") == 0) {
|
||||
@ -118,7 +118,7 @@ FILEHANDLE _sys_open (const char *name, int openmode)
|
||||
|
||||
/*--------------------------- _sys_close -------------------------------------*/
|
||||
|
||||
int _sys_close (FILEHANDLE fh)
|
||||
int _sys_close (FILEHANDLE fh)
|
||||
{
|
||||
if (fh > 0x8000) {
|
||||
return (0);
|
||||
@ -132,7 +132,7 @@ int _sys_close (FILEHANDLE fh)
|
||||
|
||||
/*--------------------------- _sys_write -------------------------------------*/
|
||||
|
||||
int _sys_write (FILEHANDLE fh, const U8 *buf, U32 len, int mode)
|
||||
int _sys_write (FILEHANDLE fh, const U8 *buf, U32 len, int mode)
|
||||
{
|
||||
#ifdef STDIO
|
||||
if (fh == STDOUT) {
|
||||
@ -155,7 +155,7 @@ int _sys_write (FILEHANDLE fh, const U8 *buf, U32 len, int mode)
|
||||
|
||||
/*--------------------------- _sys_read --------------------------------------*/
|
||||
|
||||
int _sys_read (FILEHANDLE fh, U8 *buf, U32 len, int mode)
|
||||
int _sys_read (FILEHANDLE fh, U8 *buf, U32 len, int mode)
|
||||
{
|
||||
#ifdef STDIO
|
||||
if (fh == STDIN) {
|
||||
@ -183,7 +183,7 @@ int _sys_read (FILEHANDLE fh, U8 *buf, U32 len, int mode)
|
||||
|
||||
/*--------------------------- _sys_istty -------------------------------------*/
|
||||
|
||||
int _sys_istty (FILEHANDLE fh)
|
||||
int _sys_istty (FILEHANDLE fh)
|
||||
{
|
||||
if (fh > 0x8000) {
|
||||
return (1);
|
||||
@ -193,7 +193,7 @@ int _sys_istty (FILEHANDLE fh)
|
||||
|
||||
/*--------------------------- _sys_seek --------------------------------------*/
|
||||
|
||||
int _sys_seek (FILEHANDLE fh, long pos)
|
||||
int _sys_seek (FILEHANDLE fh, long pos)
|
||||
{
|
||||
if (fh > 0x8000) {
|
||||
return (-1);
|
||||
@ -207,7 +207,7 @@ int _sys_seek (FILEHANDLE fh, long pos)
|
||||
|
||||
/*--------------------------- _sys_ensure ------------------------------------*/
|
||||
|
||||
int _sys_ensure (FILEHANDLE fh)
|
||||
int _sys_ensure (FILEHANDLE fh)
|
||||
{
|
||||
if (fh > 0x8000) {
|
||||
return (-1);
|
||||
@ -221,7 +221,7 @@ int _sys_ensure (FILEHANDLE fh)
|
||||
|
||||
/*--------------------------- _sys_flen --------------------------------------*/
|
||||
|
||||
long _sys_flen (FILEHANDLE fh)
|
||||
long _sys_flen (FILEHANDLE fh)
|
||||
{
|
||||
if (fh > 0x8000) {
|
||||
return (0);
|
||||
@ -236,21 +236,21 @@ long _sys_flen (FILEHANDLE fh)
|
||||
|
||||
/*--------------------------- _sys_tmpnam ------------------------------------*/
|
||||
|
||||
int _sys_tmpnam (char *name, int sig, unsigned maxlen)
|
||||
int _sys_tmpnam (char *name, int sig, unsigned maxlen)
|
||||
{
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*--------------------------- _sys_command_string ----------------------------*/
|
||||
|
||||
char *_sys_command_string (char *cmd, int len)
|
||||
char *_sys_command_string (char *cmd, int len)
|
||||
{
|
||||
return (cmd);
|
||||
}
|
||||
|
||||
/*--------------------------- _sys_exit --------------------------------------*/
|
||||
|
||||
void _sys_exit (int return_code)
|
||||
void _sys_exit (int return_code)
|
||||
{
|
||||
#ifdef WOLFSSL_MDK_SHELL
|
||||
return ;
|
||||
@ -258,6 +258,6 @@ void _sys_exit (int return_code)
|
||||
/* Endless loop. */
|
||||
while (1);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -8,8 +8,8 @@ extern int sizeof_client_key_der_1024 ;
|
||||
extern const unsigned char client_cert_der_1024[] ;
|
||||
extern int sizeof_client_cert_der_1024 ;
|
||||
/* ./certs/1024/dh1024.der, 1024-bit */
|
||||
extern const unsigned char dh_key_der_1024[] ;
|
||||
extern int sizeof_dh_key_der_1024 ;
|
||||
extern const unsigned char dh_key_der_1024[] ;
|
||||
extern int sizeof_dh_key_der_1024 ;
|
||||
/* ./certs/1024/dsa1024.der, 1024-bit */
|
||||
extern const unsigned char dsa_key_der_1024[] ;
|
||||
extern int sizeof_dsa_key_der_1024 ;
|
||||
|
@ -51,7 +51,7 @@ extern "C" {
|
||||
#undef FP_MAX_BITS
|
||||
#define FP_MAX_BITS 2048
|
||||
#else
|
||||
#define WOLFSSL_SP_MATH
|
||||
#define WOLFSSL_SP_MATH
|
||||
#define WOLFSSL_SP_SMALL
|
||||
#define WOLFSSL_SP_MATH_ALL
|
||||
#define SP_INT_BITS 256
|
||||
@ -162,7 +162,7 @@ extern "C" {
|
||||
|
||||
/* #undef WOLFSSL_AES_DIRECT
|
||||
#define WOLFSSL_AES_DIRECT */
|
||||
|
||||
|
||||
#undef NO_AES_CBC
|
||||
#define NO_AES_CBC
|
||||
#else
|
||||
@ -301,7 +301,7 @@ extern "C" {
|
||||
#define NO_PKCS8
|
||||
#define WOLFSSL_NO_PEM
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Enable Features */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -397,7 +397,7 @@ extern "C" {
|
||||
#undef NO_PWDBASED
|
||||
#define NO_PWDBASED
|
||||
|
||||
#undef NO_MD5
|
||||
#undef NO_MD5
|
||||
#define NO_MD5
|
||||
|
||||
#undef NO_DES3
|
||||
|
@ -26,4 +26,3 @@
|
||||
CC: コンパイラコマンド
|
||||
AR: ARコマンド
|
||||
WOLF_ROOT: Makefileの格納位置を変える場合はこの定義を変更してください
|
||||
|
@ -8,4 +8,4 @@ EXTRA_DIST+= IDE/MQX/README-jp.md
|
||||
EXTRA_DIST+= IDE/MQX/README.md
|
||||
EXTRA_DIST+= IDE/MQX/server-tls.c
|
||||
EXTRA_DIST+= IDE/MQX/user_config.h
|
||||
EXTRA_DIST+= IDE/MQX/user_settings.h
|
||||
EXTRA_DIST+= IDE/MQX/user_settings.h
|
||||
|
@ -193,4 +193,4 @@ int main()
|
||||
wolfSSL_Cleanup(); /* Cleanup the wolfSSL environment */
|
||||
close(sockfd); /* Close the socket listening for clients */
|
||||
return 0; /* Return reporting a success */
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
#define MQX_CPU PSP_CPU_MK60DN512Z
|
||||
#define MQX_CPU PSP_CPU_MK60DN512Z
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* client.c
|
||||
/* client.c
|
||||
*
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* server.c
|
||||
/* server.c
|
||||
*
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* template_appliance.h
|
||||
/* template_appliance.h
|
||||
*
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/ * Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
/ * Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* template_appliance.h
|
||||
/* template_appliance.h
|
||||
*
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
/// <summary>
|
||||
/// This identifier should be defined before including any of the networking-related header files.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* main.c
|
||||
/* main.c
|
||||
*
|
||||
* Copyright (C) 2006-2024 wolfSSL Inc.
|
||||
*
|
||||
|
@ -9,9 +9,9 @@ For general information on [wolfSSL examples for Espressif](../README.md), see t
|
||||
|
||||
## Example Output
|
||||
|
||||
Note the default wolfSSL `user_settings.h` is configured by default to be the most
|
||||
Note the default wolfSSL `user_settings.h` is configured by default to be the most
|
||||
compatible across the widest ranges of targets. Contact wolfSSL at support@wolfssl.com
|
||||
for help in optimizing for your particular application, or see the
|
||||
for help in optimizing for your particular application, or see the
|
||||
[docs](https://www.wolfssl.com/documentation/manuals/wolfssl/index.html).
|
||||
|
||||
```
|
||||
@ -59,7 +59,7 @@ I (323) cpu_start: Compile time: May 17 2024 19:42:07
|
||||
I (329) cpu_start: ELF file SHA256: eebe816ce...
|
||||
I (334) cpu_start: ESP-IDF: 5.2.1
|
||||
I (339) cpu_start: Min chip rev: v0.0
|
||||
I (344) cpu_start: Max chip rev: v3.99
|
||||
I (344) cpu_start: Max chip rev: v3.99
|
||||
I (349) cpu_start: Chip rev: v1.0
|
||||
I (354) heap_init: Initializing. RAM available for dynamic allocation:
|
||||
I (361) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
|
||||
@ -83,7 +83,7 @@ W (449) esp32_util: Warning: old cmake, user_settings.h location unknown.
|
||||
I (457) esp32_util: LIBWOLFSSL_VERSION_STRING = 5.7.0
|
||||
I (463) esp32_util: LIBWOLFSSL_VERSION_HEX = 5007000
|
||||
I (468) esp32_util: Stack HWM: 9204
|
||||
I (472) esp32_util:
|
||||
I (472) esp32_util:
|
||||
I (475) esp32_util: Macro Name Defined Not Defined
|
||||
I (482) esp32_util: ------------------------- --------- -------------
|
||||
I (489) esp32_util: NO_ESPIDF_DEFAULT........ X
|
||||
@ -115,7 +115,7 @@ I (638) esp32_util: FREERTOS................. X
|
||||
I (643) esp32_util: NO_WOLFSSL_DIR........... X
|
||||
I (649) esp32_util: WOLFSSL_NO_CURRDIR....... X
|
||||
I (654) esp32_util: WOLFSSL_LWIP............. X
|
||||
I (660) esp32_util:
|
||||
I (660) esp32_util:
|
||||
I (663) esp32_util: Compiler Optimization: Default
|
||||
I (668) esp32_util:
|
||||
I (671) esp32_util: CONFIG_IDF_TARGET = esp32
|
||||
|
@ -10,9 +10,9 @@ For general information on [wolfSSL examples for Espressif](../README.md), see t
|
||||
|
||||
## Example Output
|
||||
|
||||
Note the default wolfSSL `user_settings.h` is configured by default to be the most
|
||||
Note the default wolfSSL `user_settings.h` is configured by default to be the most
|
||||
compatible across the widest ranges of targets. Contact wolfSSL at support@wolfssl.com
|
||||
for help in optimizing for your particular application, or see the
|
||||
for help in optimizing for your particular application, or see the
|
||||
[docs](https://www.wolfssl.com/documentation/manuals/wolfssl/index.html).
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ I (511) cpu_start: Compile time: May 17 2024 19:31:47
|
||||
I (517) cpu_start: ELF file SHA256: 40b2541a0...
|
||||
I (523) cpu_start: ESP-IDF: 5.2.1
|
||||
I (528) cpu_start: Min chip rev: v0.0
|
||||
I (532) cpu_start: Max chip rev: v3.99
|
||||
I (532) cpu_start: Max chip rev: v3.99
|
||||
I (537) cpu_start: Chip rev: v1.0
|
||||
I (542) heap_init: Initializing. RAM available for dynamic allocation:
|
||||
I (549) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
|
||||
|
@ -17,7 +17,7 @@ source ~/qnx700/qnxsdp-env.sh
|
||||
make
|
||||
```
|
||||
|
||||
Once the wolfSSL library has been built cd to IDE/QNX/CAAM-DRIVER and run "make". This will produce the wolfCrypt resource manager. It should be started on the device with root permissions. Once wolfCrypt is running on the device with root permissions then any user with access to open a connection to /dev/wolfCrypt can make use of the driver.
|
||||
Once the wolfSSL library has been built cd to IDE/QNX/CAAM-DRIVER and run "make". This will produce the wolfCrypt resource manager. It should be started on the device with root permissions. Once wolfCrypt is running on the device with root permissions then any user with access to open a connection to /dev/wolfCrypt can make use of the driver.
|
||||
|
||||
### Momentics
|
||||
To build in momentics IDE:
|
||||
|
@ -44,7 +44,7 @@ The `IDE/RISCV/SIFIVE-HIFIVE1/main.c` example application provides a function to
|
||||
$ export WOLFSSL_SRC_DIR=~/wolfssl
|
||||
```
|
||||
|
||||
5. Setup your riscv64 compiler
|
||||
5. Setup your riscv64 compiler
|
||||
|
||||
```
|
||||
$ export RISCV_OPENOCD_PATH=/opt/riscv-openocd
|
||||
@ -64,7 +64,7 @@ You can build from source or create a static library.
|
||||
$ cd freedom-e-sdk
|
||||
$ make PROGRAM=wolfcrypt TARGET=sifive-hifive1-revb CONFIGURATION=debug clean software upload
|
||||
```
|
||||
This example cleans, builds and uploads the software on the sifive-hifive1-revb target but you can also combine and build for any of the supported targets.
|
||||
This example cleans, builds and uploads the software on the sifive-hifive1-revb target but you can also combine and build for any of the supported targets.
|
||||
|
||||
Review the test results on the target console.
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#ifndef NO_CRYPT_BENCHMARK
|
||||
|
||||
/*-specs=nano.specs doesn’t include support for floating point in printf()*/
|
||||
/*-specs=nano.specs doesn't include support for floating point in printf()*/
|
||||
asm (".global _printf_float");
|
||||
|
||||
#ifndef RTC_FREQ
|
||||
|
@ -6,7 +6,7 @@ Instructions for cross-compiling and running wolfSSL on the HiFive Unleashed boa
|
||||
|
||||
SiFive Freedom U540 SoC at 1.5GHz
|
||||
|
||||
Getting started guide:
|
||||
Getting started guide:
|
||||
https://sifive.cdn.prismic.io/sifive%2Ffa3a584a-a02f-4fda-b758-a2def05f49f9_hifive-unleashed-getting-started-guide-v1p1.pdf
|
||||
|
||||
Make sure your ethernet is attached and power up board. You can connecct the micro-usb to get a UART console that will display the DHCP IP address. Default user is "root" and login password is "sifive".
|
||||
|
@ -4,11 +4,11 @@ This directory contains a CrossWorks solution named wolfssl.hzp.
|
||||
|
||||
Inside are three projects:
|
||||
|
||||
1. libwolfssl:
|
||||
1. libwolfssl:
|
||||
This generates a library file named "libwolfssl_ARM_Debug/libwolfssl_v7em_t_le_eabi.a"
|
||||
2. benchmark:
|
||||
2. benchmark:
|
||||
This is a sample benchmark application. It runs the "benchmark_test" suite repeatedly until a failure occurs.
|
||||
3. test:
|
||||
3. test:
|
||||
This is a sample test application. It runs "wolfcrypt_test" suite suite repeatedly until a failure occurs.
|
||||
|
||||
# Prerequisites
|
||||
@ -21,7 +21,7 @@ All hardware functions are defined in `kinetis_hw.c` and are currently setup for
|
||||
|
||||
To create support for a new ARM microcontroller the functions in `hw.h` will need to be implemented.
|
||||
|
||||
Also you will need to configure the ARM Architecture and ARM Core Type in the "Solution Properties" -> "ARM".
|
||||
Also you will need to configure the ARM Architecture and ARM Core Type in the "Solution Properties" -> "ARM".
|
||||
Also the "Target Processor" in each of the projects ("Project Properties" -> "Target Processor")
|
||||
|
||||
## Hardware Crypto Acceleration
|
||||
|
@ -25,11 +25,11 @@
|
||||
#define NO_DEV_RANDOM
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
#define WOLFSSL_LOG_PRINTF
|
||||
#define NO_WOLFSSL_STUB
|
||||
#define NO_DYNAMIC_ARRAY /* for compilers not allowed dynamic size array */
|
||||
#define NO_DYNAMIC_ARRAY /* for compilers not allowed dynamic size array */
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
#define WOLFSSL_DH_CONST
|
||||
|
||||
|
@ -51,10 +51,10 @@ int strncasecmp(const char *s1, const char * s2, unsigned int sz)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void abort(void)
|
||||
|
||||
void abort(void)
|
||||
{
|
||||
while(1);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ static void timeTick(void *pdata)
|
||||
double current_time(int reset)
|
||||
{
|
||||
if(reset) tick = 0 ;
|
||||
return ((double)tick/FREQ) ;
|
||||
return ((double)tick/FREQ) ;
|
||||
}
|
||||
|
||||
#define ARG_SZ 256
|
||||
@ -50,10 +50,10 @@ static int get_arg(func_args *args)
|
||||
int i;
|
||||
char *arg = argBuff;
|
||||
args->argc = 0;
|
||||
|
||||
|
||||
for(i=0; i<ARG_SZ; i++) {
|
||||
*arg = getchar();
|
||||
|
||||
|
||||
switch(*arg){
|
||||
case '\n':
|
||||
*arg = '\0';
|
||||
@ -84,10 +84,10 @@ void wolfSSL_main()
|
||||
{
|
||||
int c;
|
||||
func_args args = {0};
|
||||
|
||||
|
||||
printf("wolfSSL Demo\nt: test, b: benchmark, s: server, or c <IP addr> <Port>: client\n$ ");
|
||||
c = getchar();
|
||||
|
||||
|
||||
switch(c) {
|
||||
case 't':
|
||||
get_arg(&args);
|
||||
@ -95,14 +95,14 @@ void wolfSSL_main()
|
||||
wolfcrypt_test(&args);
|
||||
printf("End wolfCrypt Test\n");
|
||||
break;
|
||||
|
||||
|
||||
case 'b':
|
||||
get_arg(&args);
|
||||
printf("Start wolfCrypt Benchmark\n");
|
||||
benchmark_test(NULL);
|
||||
printf("End wolfCrypt Benchmark\n");
|
||||
break;
|
||||
|
||||
|
||||
case 'c':
|
||||
if(get_arg(&args) < 0)
|
||||
break;
|
||||
@ -110,7 +110,7 @@ void wolfSSL_main()
|
||||
wolfSSL_TLS_client(wolfSSL_cl_ctx, &args);
|
||||
printf("End TLS Client\n");
|
||||
break;
|
||||
|
||||
|
||||
case 's':
|
||||
if(get_arg(&args) < 0)
|
||||
break;
|
||||
|
@ -45,7 +45,7 @@ void wolfcrypt_test(func_args args);
|
||||
void main(void)
|
||||
{
|
||||
func_args args = { 1 };
|
||||
|
||||
|
||||
printf("Start wolfCrypt Test\n");
|
||||
wolfcrypt_test(args);
|
||||
printf("End wolfCrypt Test\n");
|
||||
|
@ -27,7 +27,7 @@
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
#define WOLFSSL_USER_CURRTIME
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
#define NO_FILESYSTEM
|
||||
#define WOLFSSL_LOG_PRINTF
|
||||
|
@ -124,7 +124,7 @@ void wolfSSL_TLS_server_init(byte doClientCheck)
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
ret = wolfSSL_CTX_use_PrivateKey_file(server_ctx, key, 0);
|
||||
#else
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(server_ctx, key, sizeof_key,
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(server_ctx, key, sizeof_key,
|
||||
SSL_FILETYPE_ASN1);
|
||||
#endif
|
||||
if (ret != SSL_SUCCESS) {
|
||||
@ -138,20 +138,20 @@ void wolfSSL_TLS_server_init(byte doClientCheck)
|
||||
wolfSSL_CTX_set_verify(server_ctx, WOLFSSL_VERIFY_PEER |
|
||||
WOLFSSL_VERIFY_FAIL_IF_NO_PEER_CERT, 0);
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
if (wolfSSL_CTX_load_verify_locations(server_ctx, clientCert, 0)
|
||||
if (wolfSSL_CTX_load_verify_locations(server_ctx, clientCert, 0)
|
||||
!= WOLFSSL_SUCCESS)
|
||||
#else
|
||||
if (wolfSSL_CTX_load_verify_buffer(server_ctx, clientCert,
|
||||
if (wolfSSL_CTX_load_verify_buffer(server_ctx, clientCert,
|
||||
sizeof_clicert,
|
||||
SSL_FILETYPE_ASN1) != SSL_SUCCESS)
|
||||
#endif
|
||||
printf("can't load ca file, Please run from wolfSSL home dir\n");
|
||||
}
|
||||
|
||||
|
||||
/* Register callbacks */
|
||||
wolfSSL_SetIORecv(server_ctx, my_IORecv);
|
||||
wolfSSL_SetIOSend(server_ctx, my_IOSend);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void wolfSSL_TLS_server( )
|
||||
|
@ -7,7 +7,7 @@ function usage(){
|
||||
|
||||
Description:
|
||||
Generate 2048 bit Rsa key pair and Display modulus and public exponent
|
||||
|
||||
|
||||
Options:
|
||||
-g generate rsa key pair, default on
|
||||
-s only show modulus and public exponent
|
||||
@ -39,7 +39,7 @@ FLAG_S="off"
|
||||
|
||||
if [ $FLAG_G = "on" ]; then
|
||||
# generate 2048bit Rsa private key
|
||||
openssl genrsa 2048 2> /dev/null > private-key.pem
|
||||
openssl genrsa 2048 2> /dev/null > private-key.pem
|
||||
# expose public key
|
||||
openssl rsa -in private-key.pem -pubout -out public-key.pem 2> /dev/null
|
||||
fi
|
||||
|
@ -84,9 +84,9 @@ The following steps explain how to generate the missing files and where to place
|
||||
(Click the drop-down arrow to the left of the project name.)
|
||||
+ Select and Copy the following folders/files inside dummy_library
|
||||
|
||||
`ra/`
|
||||
`ra_gen/`
|
||||
`ra_cfg/`
|
||||
`ra/`
|
||||
`ra_gen/`
|
||||
`ra_cfg/`
|
||||
`script/`
|
||||
|
||||
+ Paste the copied folders/files into wolfSSL_RA6M3G
|
||||
@ -108,7 +108,7 @@ The following steps explain how to generate the missing files and where to place
|
||||
|
||||
+ Select and Copy the following folder inside dummy_app
|
||||
|
||||
`src/`
|
||||
`src/`
|
||||
`script/`
|
||||
|
||||
+ Paste the copied folders into `./IDE/Renesas/e2studio/RA6M3/common/ra6m3g/`
|
||||
@ -132,17 +132,17 @@ Right-Click each Project and select Build.
|
||||
|
||||
### Run wolfCrypt Test and Benchmark
|
||||
|
||||
1.) Right-Click the Project name.
|
||||
2.) Select `Debug As` -> `Renesas GDB Hardware Debugging`
|
||||
3.) Select J-Link ARM. Click OK.
|
||||
1.) Right-Click the Project name.
|
||||
2.) Select `Debug As` -> `Renesas GDB Hardware Debugging`
|
||||
3.) Select J-Link ARM. Click OK.
|
||||
4.) Select R7Fa6M3AH. Click OK.
|
||||
|
||||
### Run the wolfSSL TLS Server Example.
|
||||
|
||||
1.) Right-Click the Project name.
|
||||
2.) Select `Debug As` -> `Renesas GDB Hardware Debugging`
|
||||
3.) Select J-Link ARM. Click OK.
|
||||
4.) Select R7Fa6M3AH. Click OK.
|
||||
1.) Right-Click the Project name.
|
||||
2.) Select `Debug As` -> `Renesas GDB Hardware Debugging`
|
||||
3.) Select J-Link ARM. Click OK.
|
||||
4.) Select R7Fa6M3AH. Click OK.
|
||||
5.) Run the following wolfSSL example client command inside the base of the wolfssl directory.
|
||||
|
||||
```
|
||||
|
@ -83,9 +83,9 @@ wolfSSL のプロジェクトファイルは、wolfSSL と wolfCrypt の両方
|
||||
プロジェクト名横にある矢印マークをクリック
|
||||
+ `dummy_library` の以下のフォルダーとファイルを選択
|
||||
|
||||
`ra/`
|
||||
`ra_gen/`
|
||||
`ra_cfg/`
|
||||
`ra/`
|
||||
`ra_gen/`
|
||||
`ra_cfg/`
|
||||
`script/`
|
||||
|
||||
+ 選択したフォルダーとファイルを `wolfSSL_RA6M3G`プロジェクトに貼り付け
|
||||
@ -110,7 +110,7 @@ wolfSSL のプロジェクトファイルは、wolfSSL と wolfCrypt の両方
|
||||
|
||||
+ `dummy_app`の以下のフォルダーをコピー
|
||||
|
||||
`src/`
|
||||
`src/`
|
||||
`script/`
|
||||
|
||||
+ 選択したフォルダーを`./IDE/Renesas/e2studio/RA6M3/common/ra6m3g/`へコピー
|
||||
|
@ -4,13 +4,13 @@ wolfSSL for Renesas RA Evaluation Kit (EK-RA6M4)
|
||||
## Description
|
||||
|
||||
This directory contains e2studio projects targeted at the Renesas RA 32-bit MCUs.
|
||||
The example projects include a wolfSSL TLS client.
|
||||
The example projects include a wolfSSL TLS client.
|
||||
They also include benchmark and cryptography tests for the wolfCrypt library.
|
||||
|
||||
|
||||
The wolfssl project contains both the wolfSSL and wolfCrypt libraries.
|
||||
It is built as a `Renesas RA C Library Project` and contains the Renesas RA
|
||||
configuration. The wolfssl project uses `Secure Cryptography Engine on RA6 Protected Mode`
|
||||
configuration. The wolfssl project uses `Secure Cryptography Engine on RA6 Protected Mode`
|
||||
as hardware acceleration for cypto and TLS operation.
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ The wolfssl Project Summary is listed below and is relevant for every project.
|
||||
|:--|:--|
|
||||
|Network Events call vApplicationIPNetworkEventHook|Disable|
|
||||
|Use DHCP|Disable|
|
||||
|
||||
|
||||
+ Save `dummy_library` FSP configuration
|
||||
+ Copy <u>configuration.xml</u> and pincfg under `dummy_library` to `wolfSSL_RA6M4`
|
||||
+ Open Smart Configurator by clicking copied configuration.xml
|
||||
@ -105,7 +105,7 @@ The wolfssl Project Summary is listed below and is relevant for every project.
|
||||
+ Copy the following folder and file at `dummy_application` to `test_RA6M4`\
|
||||
script/\
|
||||
src/sce_tst_thread_entry.c
|
||||
|
||||
|
||||
+ Add `sce_test()` call under /* TODO: add your own code here */ line at sce_tst_thread_entry.c
|
||||
```
|
||||
...
|
||||
@ -119,7 +119,7 @@ The wolfssl Project Summary is listed below and is relevant for every project.
|
||||
+ Download J-Link software from [Segger](https://www.segger.com/downloads/jlink)
|
||||
+ Choose `J-Link Software and Documentation Pack`
|
||||
+ Copy sample program files below from `Installed SEGGER` folder, `e.g C:\Program Files\SEGGER\JLink\Samples\RTT`, to /path/to/wolfssl/IDE/Reenesas/e2studio/RA6M4/test/src/SEGGER_RTT\
|
||||
|
||||
|
||||
SEGGER_RTT.c\
|
||||
SEGGER_RTT.h\
|
||||
SEGGER_RTT_Conf.h\
|
||||
@ -134,7 +134,7 @@ The wolfssl Project Summary is listed below and is relevant for every project.
|
||||
you can specify "RTT control block" to 0x200232a8 by Address\
|
||||
OR\
|
||||
you can specify "RTT control block" to 0x20020000 0x10000 by Search Range
|
||||
|
||||
|
||||
## Run Client
|
||||
1.) Enable TLS_CLIENT definition in wolfssl_demo.h of test_RA6M4 project
|
||||
|
||||
@ -175,7 +175,7 @@ $./examples/server/server -b -d -i -c ./certs/server-ecc.pem -k ./certs/ecc-key.
|
||||
|
||||
You will see the following message on J-LinK RTT Viewer when using RSA sign and verify.
|
||||
```
|
||||
Start Client Example,
|
||||
Start Client Example,
|
||||
Connecting to 192.168.11.xx
|
||||
|
||||
[wolfSSL_TLS_client_do(00)][00] Start to connect to the server.
|
||||
@ -204,7 +204,7 @@ You will see the following message on J-LinK RTT Viewer when using RSA sign and
|
||||
|
||||
You will see the following message on J-LinK RTT Viewer when using ECDSA sign and verify.
|
||||
```
|
||||
Start Client Example,
|
||||
Start Client Example,
|
||||
Connecting to 192.168.11.xx
|
||||
|
||||
[wolfSSL_TLS_client_do(00)][00] Start to connect to the server.
|
||||
@ -235,7 +235,7 @@ You will see the following message on J-LinK RTT Viewer when using ECDSA sign an
|
||||
### Run Multi Client Session example
|
||||
1.) Enable TLS_CLIENT and TLS_MULTITHREAD_TEST definition in wolfssl_demo.h of test_RA6M4 project
|
||||
|
||||
2.) Follow [Run Client](#run-client) instruction
|
||||
2.) Follow [Run Client](#run-client) instruction
|
||||
|
||||
3.) Prepare peer wolfssl server
|
||||
|
||||
@ -258,7 +258,7 @@ $./examples/server/server -b -d -c -i ./certs/server-ecc.pem -k ./certs/ecc-key.
|
||||
4.) Run Multi Client Session Example
|
||||
You will see similar following message on J-LinK RTT Viewer when using ECDSA sign and verify.
|
||||
```
|
||||
Start Client Example,
|
||||
Start Client Example,
|
||||
Connecting to 192.168.11.xx
|
||||
|
||||
clt_thd_taskA connecting to 11111 port
|
||||
@ -291,7 +291,7 @@ You will see similar following message on J-LinK RTT Viewer when using ECDSA sig
|
||||
|
||||
You will see similar following message on J-LinK RTT Viewer when using ECDSA sign and verify.
|
||||
```
|
||||
Start Client Example,
|
||||
Start Client Example,
|
||||
Connecting to 192.168.11.xx
|
||||
|
||||
clt_thd_taskA connecting to 11111 port
|
||||
|
@ -16,4 +16,4 @@ EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/src/common/.gitignore
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/key_data/key_data_sce.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/key_data/key_data.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/common/wolfssl_demo.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/common/user_settings.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/common/user_settings.h
|
||||
|
@ -28,47 +28,47 @@ const st_user_key_block_data_t g_key_block_data =
|
||||
{
|
||||
/* uint8_t encrypted_provisioning_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2]; */
|
||||
{
|
||||
0xE7, 0x1C, 0xEB, 0xCA, 0x3A, 0x64, 0x0B, 0xD2, 0xC5, 0xB8, 0xF2, 0xD0,
|
||||
0xF7, 0x1B, 0xA9, 0x4A, 0x98, 0xFF, 0xF3, 0x48, 0x81, 0xAD, 0xAF, 0x63,
|
||||
0xE7, 0x1C, 0xEB, 0xCA, 0x3A, 0x64, 0x0B, 0xD2, 0xC5, 0xB8, 0xF2, 0xD0,
|
||||
0xF7, 0x1B, 0xA9, 0x4A, 0x98, 0xFF, 0xF3, 0x48, 0x81, 0xAD, 0xAF, 0x63,
|
||||
0x19, 0x24, 0x4B, 0x2B, 0xC0, 0x8B, 0x9C, 0x6B
|
||||
},
|
||||
/* uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE]; */
|
||||
{
|
||||
0xD7, 0x97, 0x56, 0x82, 0x5B, 0x4B, 0x7F, 0xB2, 0x1C, 0x1F, 0xEE, 0x85,
|
||||
0xD7, 0x97, 0x56, 0x82, 0x5B, 0x4B, 0x7F, 0xB2, 0x1C, 0x1F, 0xEE, 0x85,
|
||||
0x02, 0xC5, 0xD0, 0xBA
|
||||
},
|
||||
/* uint8_t encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16]; */
|
||||
{
|
||||
0x3F, 0xA5, 0xBE, 0xBF, 0x86, 0xEC, 0x23, 0x37, 0x82, 0x37, 0x71, 0x0C,
|
||||
0x83, 0xA7, 0x8E, 0x86, 0xF0, 0x16, 0xD3, 0x7B, 0xF1, 0x25, 0xA4, 0x37,
|
||||
0x7A, 0x2D, 0x16, 0xF2, 0xFF, 0x3D, 0xEE, 0x46, 0xE0, 0x05, 0x58, 0x56,
|
||||
0x3F, 0xA5, 0xBE, 0xBF, 0x86, 0xEC, 0x23, 0x37, 0x82, 0x37, 0x71, 0x0C,
|
||||
0x83, 0xA7, 0x8E, 0x86, 0xF0, 0x16, 0xD3, 0x7B, 0xF1, 0x25, 0xA4, 0x37,
|
||||
0x7A, 0x2D, 0x16, 0xF2, 0xFF, 0x3D, 0xEE, 0x46, 0xE0, 0x05, 0x58, 0x56,
|
||||
0xC2, 0xE7, 0x9D, 0x2C, 0x01, 0x84, 0x59, 0x8E, 0xA8, 0x9E, 0xEE, 0x3F,
|
||||
0x22, 0x83, 0x68, 0xDA, 0x9E, 0xCE, 0xEA, 0x99, 0xFD, 0xAF, 0xDF, 0x67,
|
||||
0x1E, 0x73, 0x25, 0x68, 0xBF, 0x0A, 0xDF, 0xAF, 0xC4, 0x3D, 0xF1, 0xBD,
|
||||
0x41, 0xF5, 0xAC, 0xAC, 0xA4, 0x36, 0xF8, 0x96, 0xC0, 0x8C, 0x2F, 0x1A,
|
||||
0x1E, 0x73, 0x25, 0x68, 0xBF, 0x0A, 0xDF, 0xAF, 0xC4, 0x3D, 0xF1, 0xBD,
|
||||
0x41, 0xF5, 0xAC, 0xAC, 0xA4, 0x36, 0xF8, 0x96, 0xC0, 0x8C, 0x2F, 0x1A,
|
||||
0x79, 0x75, 0x28, 0xAE, 0x67, 0xC9, 0x5A, 0xDE, 0x2A, 0xB4, 0x99, 0xDB,
|
||||
0x8C, 0x25, 0x53, 0x58, 0x8C, 0xDC, 0xA8, 0x0D, 0xFE, 0xEE, 0x0F, 0x6C,
|
||||
0x61, 0xE6, 0x43, 0x66, 0xE8, 0x4A, 0xE3, 0xEB, 0xAB, 0xA2, 0x52, 0xE4,
|
||||
0x67, 0xC2, 0x9A, 0x57, 0xA4, 0x1F, 0xE0, 0xFC, 0x2B, 0xBE, 0x25, 0xBF,
|
||||
0x8C, 0x25, 0x53, 0x58, 0x8C, 0xDC, 0xA8, 0x0D, 0xFE, 0xEE, 0x0F, 0x6C,
|
||||
0x61, 0xE6, 0x43, 0x66, 0xE8, 0x4A, 0xE3, 0xEB, 0xAB, 0xA2, 0x52, 0xE4,
|
||||
0x67, 0xC2, 0x9A, 0x57, 0xA4, 0x1F, 0xE0, 0xFC, 0x2B, 0xBE, 0x25, 0xBF,
|
||||
0xF0, 0x70, 0x18, 0x88, 0x93, 0xB7, 0x2F, 0x74, 0xF8, 0xF3, 0x88, 0xB8,
|
||||
0xFA, 0x18, 0xBE, 0xC1, 0xB2, 0x24, 0x4B, 0xBC, 0x89, 0x2D, 0xC4, 0x02,
|
||||
0xB3, 0x82, 0xEC, 0xDB, 0xC9, 0xF0, 0xA9, 0xC3, 0x30, 0x7C, 0xF5, 0x15,
|
||||
0xEB, 0x9B, 0x16, 0x8C, 0x9D, 0xEF, 0x42, 0x8A, 0xCA, 0x5D, 0x28, 0xDF,
|
||||
0xFA, 0x18, 0xBE, 0xC1, 0xB2, 0x24, 0x4B, 0xBC, 0x89, 0x2D, 0xC4, 0x02,
|
||||
0xB3, 0x82, 0xEC, 0xDB, 0xC9, 0xF0, 0xA9, 0xC3, 0x30, 0x7C, 0xF5, 0x15,
|
||||
0xEB, 0x9B, 0x16, 0x8C, 0x9D, 0xEF, 0x42, 0x8A, 0xCA, 0x5D, 0x28, 0xDF,
|
||||
0x68, 0xEA, 0xE0, 0xB8, 0x76, 0x7C, 0xBB, 0x4A, 0x51, 0xDD, 0x55, 0x14,
|
||||
0xB7, 0xAB, 0xD2, 0xF1, 0xB9, 0x51, 0x19, 0x05, 0x26, 0x87, 0xF7, 0x5C,
|
||||
0x69, 0x45, 0x3C, 0x82, 0xE8, 0x82, 0x05, 0x5D, 0x33, 0x8E, 0xD1, 0x42,
|
||||
0x71, 0xD6, 0x96, 0xDA, 0xAB, 0xB8, 0xC0, 0x0F, 0xF7, 0x85, 0x8A, 0x12,
|
||||
0xB7, 0xAB, 0xD2, 0xF1, 0xB9, 0x51, 0x19, 0x05, 0x26, 0x87, 0xF7, 0x5C,
|
||||
0x69, 0x45, 0x3C, 0x82, 0xE8, 0x82, 0x05, 0x5D, 0x33, 0x8E, 0xD1, 0x42,
|
||||
0x71, 0xD6, 0x96, 0xDA, 0xAB, 0xB8, 0xC0, 0x0F, 0xF7, 0x85, 0x8A, 0x12,
|
||||
0xEF, 0xB9, 0x53, 0xFF, 0xD2, 0x95, 0x18, 0x2F, 0x0C, 0xA6, 0x72, 0x98,
|
||||
0xC3, 0xC6, 0x9B, 0x95, 0x70, 0x69, 0xC5, 0xB7, 0xD5, 0x24, 0x77, 0x05,
|
||||
0xD0, 0x68, 0x85, 0x36, 0xB8, 0x57, 0xE3, 0xED, 0x2E, 0x4D, 0x95, 0xD3,
|
||||
0xFC, 0x24, 0x1B, 0x22, 0xFA, 0x43, 0xD8, 0x62, 0x28, 0x57, 0x6B, 0x34,
|
||||
0xC3, 0xC6, 0x9B, 0x95, 0x70, 0x69, 0xC5, 0xB7, 0xD5, 0x24, 0x77, 0x05,
|
||||
0xD0, 0x68, 0x85, 0x36, 0xB8, 0x57, 0xE3, 0xED, 0x2E, 0x4D, 0x95, 0xD3,
|
||||
0xFC, 0x24, 0x1B, 0x22, 0xFA, 0x43, 0xD8, 0x62, 0x28, 0x57, 0x6B, 0x34,
|
||||
0xBF, 0xD1, 0x63, 0x4B, 0xB5, 0xF5, 0x88, 0xBC, 0xB8, 0x69, 0xF3, 0xB5
|
||||
},
|
||||
};
|
||||
|
||||
#ifndef USE_CERT_BUFFERS_256
|
||||
/* ca-cert.der.sign,
|
||||
* ca-cert.der signed by RSA2048 PSS with SHA256
|
||||
/* ca-cert.der.sign,
|
||||
* ca-cert.der signed by RSA2048 PSS with SHA256
|
||||
* This is used for Root Certificate verify by SCE */
|
||||
const unsigned char ca_cert_der_sign[] =
|
||||
{
|
||||
@ -102,8 +102,8 @@ const unsigned char ca_cert_der_sign[] =
|
||||
|
||||
const int sizeof_ca_cert_der_sign = sizeof(ca_cert_der_sign);
|
||||
#else
|
||||
/* ca-ecc-cert.der.sign,
|
||||
* ca-ecc-cert.der signed by RSA2048 PSS with SHA256
|
||||
/* ca-ecc-cert.der.sign,
|
||||
* ca-ecc-cert.der signed by RSA2048 PSS with SHA256
|
||||
* This is used for Root Certificate verify by SCE
|
||||
*/
|
||||
const unsigned char ca_ecc_cert_der_sign[] =
|
||||
|
@ -100,9 +100,9 @@ static int SetScetlsKey()
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef struct func_args {
|
||||
@ -142,8 +142,8 @@ void SCE_KeyGeneration(FSPSM_ST *g)
|
||||
if (err == FSP_SUCCESS)
|
||||
g->keyflgs_crypt.bits.aes256_installedkey_set = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Clr_CallbackCtx(FSPSM_ST *g)
|
||||
@ -239,7 +239,7 @@ void sce_test(void)
|
||||
if ((ret = wolfCrypt_Init()) != 0) {
|
||||
printf("wolfCrypt_Init failed %d\n", ret);
|
||||
}
|
||||
|
||||
|
||||
#if defined(HAVE_RENESAS_SYNC) && \
|
||||
defined(HAVE_AES_CBC)
|
||||
|
||||
@ -261,14 +261,14 @@ void sce_test(void)
|
||||
printf("Start wolfCrypt Benchmark\n");
|
||||
benchmark_test(NULL);
|
||||
printf("End wolfCrypt Benchmark\n");
|
||||
|
||||
|
||||
/* free */
|
||||
Clr_CallbackCtx(&guser_PKCbInfo);
|
||||
|
||||
#elif defined(TLS_CLIENT)
|
||||
#include "hal_data.h"
|
||||
#include "r_sce.h"
|
||||
|
||||
|
||||
#if defined(WOLFSSL_TLS13)
|
||||
/* TLS1.3 needs RSA_PSS enabled.
|
||||
* SCE doesn't support RSA PSS Padding
|
||||
@ -353,20 +353,20 @@ void sce_test(void)
|
||||
info[j].log_f = my_Logging_cb;
|
||||
|
||||
memset(info[j].name, 0, sizeof(info[j].name));
|
||||
sprintf(info[j].name, "clt_thd_%s", ((j%2) == 0) ?
|
||||
sprintf(info[j].name, "clt_thd_%s", ((j%2) == 0) ?
|
||||
"taskA" : "taskB");
|
||||
|
||||
printf(" %s connecting to %d port\n", info[j].name, info[j].port);
|
||||
|
||||
xReturned = xTaskCreate(wolfSSL_TLS_client_do, info[j].name,
|
||||
xReturned = xTaskCreate(wolfSSL_TLS_client_do, info[j].name,
|
||||
THREAD_STACK_SIZE, &info[j], 2, NULL);
|
||||
if (xReturned != pdPASS) {
|
||||
printf("Failed to create task\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for(j = i; j < (i+2); j++) {
|
||||
xSemaphoreGiveFromISR(info[j].xBinarySemaphore,
|
||||
xSemaphoreGiveFromISR(info[j].xBinarySemaphore,
|
||||
&xHigherPriorityTaskWoken);
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ static int msg(const char* pname, int l,
|
||||
void TCPInit( )
|
||||
{
|
||||
BaseType_t fr_status;
|
||||
|
||||
|
||||
/* FreeRTOS+TCP Ethernet and IP Setup */
|
||||
fr_status = FreeRTOS_IPInit(ucIPAddress,
|
||||
ucNetMask,
|
||||
@ -114,14 +114,14 @@ void wolfSSL_TLS_client_init()
|
||||
/* set callback functions for ECC */
|
||||
wc_sce_set_callbacks(client_ctx);
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
if (wolfSSL_CTX_load_verify_locations(client_ctx, cert, 0) != SSL_SUCCESS) {
|
||||
printf("ERROR: can't load \"%s\"\n", cert);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
if (wolfSSL_CTX_load_verify_buffer(client_ctx, cert, SIZEOF_CERT,
|
||||
if (wolfSSL_CTX_load_verify_buffer(client_ctx, cert, SIZEOF_CERT,
|
||||
SSL_FILETYPE_ASN1) != SSL_SUCCESS){
|
||||
printf("ERROR: can't load certificate data\n");
|
||||
return;
|
||||
@ -142,16 +142,16 @@ int wolfSSL_TLS_client_do(void *pvParam)
|
||||
socklen_t xSize = sizeof(struct freertos_sockaddr);
|
||||
xSocket_t xClientSocket = NULL;
|
||||
struct freertos_sockaddr xRemoteAddress;
|
||||
|
||||
|
||||
WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)p->ctx;
|
||||
WOLFSSL *ssl = NULL;
|
||||
const char* pcName = p->name;
|
||||
|
||||
#define BUFF_SIZE 256
|
||||
static const char sendBuff[]= "Hello Server\n" ;
|
||||
|
||||
|
||||
char rcvBuff[BUFF_SIZE] = {0};
|
||||
|
||||
|
||||
i = p->id;
|
||||
/* Client Socket Setup */
|
||||
xRemoteAddress.sin_port = FreeRTOS_htons(p->port);
|
||||
@ -195,11 +195,11 @@ int wolfSSL_TLS_client_do(void *pvParam)
|
||||
|
||||
/* Set callback CTX */
|
||||
#if !defined(TLS_MULTITHREAD_TEST)
|
||||
|
||||
|
||||
XMEMSET(&guser_PKCbInfo, 0, sizeof(FSPSM_ST));
|
||||
guser_PKCbInfo.devId = 0;
|
||||
wc_sce_set_callback_ctx(ssl, (void*)&guser_PKCbInfo);
|
||||
|
||||
|
||||
#else
|
||||
if (p->port - DEFAULT_PORT == 0) {
|
||||
XMEMSET(&guser_PKCbInfo_taskA, 0, sizeof(FSPSM_ST));
|
||||
@ -210,7 +210,7 @@ int wolfSSL_TLS_client_do(void *pvParam)
|
||||
wc_sce_set_callback_ctx(ssl, (void*)&guser_PKCbInfo_taskB);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* Attach wolfSSL to the socket */
|
||||
@ -219,10 +219,10 @@ int wolfSSL_TLS_client_do(void *pvParam)
|
||||
msg(pcName, i, " Error [%d]: wolfSSL_set_fd.\n",ret);
|
||||
}
|
||||
|
||||
msg(pcName, i, " Cipher : %s\n",
|
||||
msg(pcName, i, " Cipher : %s\n",
|
||||
(p->cipher == NULL) ? "NULL" : p->cipher);
|
||||
/* use specific cipher */
|
||||
if (p->cipher != NULL && wolfSSL_set_cipher_list(ssl, p->cipher)
|
||||
if (p->cipher != NULL && wolfSSL_set_cipher_list(ssl, p->cipher)
|
||||
!= WOLFSSL_SUCCESS) {
|
||||
msg(pcName, i, " client can't set cipher list 1");
|
||||
goto out;
|
||||
@ -241,7 +241,7 @@ int wolfSSL_TLS_client_do(void *pvParam)
|
||||
wolfSSL_Debugging_OFF();
|
||||
#endif
|
||||
|
||||
if (wolfSSL_write(ssl, sendBuff, (int)strlen(sendBuff))
|
||||
if (wolfSSL_write(ssl, sendBuff, (int)strlen(sendBuff))
|
||||
!= (int)strlen(sendBuff)) {
|
||||
msg(pcName, i, " ERROR SSL write: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
goto out;
|
||||
|
@ -70,7 +70,7 @@ int sce_crypt_sha_multitest();
|
||||
int sce_crypt_test();
|
||||
int sce_crypt_sha256_multitest();
|
||||
void tskSha256_Test1(void *pvParam);
|
||||
|
||||
|
||||
void Clr_CallbackCtx(FSPSM_ST *g);
|
||||
void SCE_KeyGeneration(FSPSM_ST *g);
|
||||
|
||||
@ -111,7 +111,7 @@ static int sce_aes_cbc_test(int prnt, FSPSM_AES_PWKEY aes_key)
|
||||
byte plain[AES_BLOCK_SIZE];
|
||||
int ret = 0;
|
||||
|
||||
WOLFSSL_SMALL_STACK_STATIC const byte msg[] = {
|
||||
WOLFSSL_SMALL_STACK_STATIC const byte msg[] = {
|
||||
/* "Now is the time for all " w/o trailing 0 */
|
||||
0x6e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
|
||||
0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
|
||||
@ -125,10 +125,10 @@ static int sce_aes_cbc_test(int prnt, FSPSM_AES_PWKEY aes_key)
|
||||
if (prnt) {
|
||||
printf(" sce_aes_cbc_test() ");
|
||||
}
|
||||
|
||||
|
||||
ret = wc_AesInit(aes, NULL, devId);
|
||||
if (ret == 0) {
|
||||
ret = wc_AesSetKey(aes, (byte*)aes_key,
|
||||
ret = wc_AesSetKey(aes, (byte*)aes_key,
|
||||
AES_BLOCK_SIZE, iv, AES_ENCRYPTION);
|
||||
if (ret == 0) {
|
||||
ret = wc_AesCbcEncrypt(aes, cipher, msg, AES_BLOCK_SIZE);
|
||||
@ -143,7 +143,7 @@ static int sce_aes_cbc_test(int prnt, FSPSM_AES_PWKEY aes_key)
|
||||
#ifdef HAVE_AES_DECRYPT
|
||||
ret = wc_AesInit(aes, NULL, devId);
|
||||
if (ret == 0) {
|
||||
ret = wc_AesSetKey(aes, (byte*)aes_key,
|
||||
ret = wc_AesSetKey(aes, (byte*)aes_key,
|
||||
AES_BLOCK_SIZE, iv, AES_ENCRYPTION);
|
||||
if (ret == 0)
|
||||
ret = wc_AesCbcDecrypt(aes, plain, cipher, AES_BLOCK_SIZE);
|
||||
@ -161,7 +161,7 @@ static int sce_aes_cbc_test(int prnt, FSPSM_AES_PWKEY aes_key)
|
||||
if (prnt) {
|
||||
RESULT_STR(ret)
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ static void tskAes128_Cbc_Test(void *pvParam)
|
||||
{
|
||||
int ret = 0;
|
||||
Info *p = (Info*)pvParam;
|
||||
|
||||
|
||||
while (exit_loop == 0) {
|
||||
ret = sce_aes_cbc_test(0, &p->aes_key);
|
||||
vTaskDelay(10/portTICK_PERIOD_MS);
|
||||
@ -207,7 +207,7 @@ static int sce_aes256_test(int prnt, FSPSM_AES_PWKEY aes_key)
|
||||
|
||||
if (prnt)
|
||||
printf(" sce_aes256_test() ");
|
||||
|
||||
|
||||
if (wc_AesInit(enc, NULL, devId) != 0) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
@ -259,7 +259,7 @@ out:
|
||||
if (prnt) {
|
||||
RESULT_STR(ret)
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -267,7 +267,7 @@ static void tskAes256_Cbc_Test(void *pvParam)
|
||||
{
|
||||
int ret = 0;
|
||||
Info *p = (Info*)pvParam;
|
||||
|
||||
|
||||
while (exit_loop == 0) {
|
||||
ret = sce_aes256_test(0, &p->aes_key);
|
||||
vTaskDelay(10/portTICK_PERIOD_MS);
|
||||
@ -289,8 +289,8 @@ static int sce_aesgcm256_test(int prnt, FSPSM_AES_PWKEY aes256_key)
|
||||
Aes enc[1];
|
||||
Aes dec[1];
|
||||
FSPSM_ST userContext;
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* This is Test Case 16 from the document Galois/
|
||||
* Counter Mode of Operation (GCM) by McGrew and
|
||||
@ -350,7 +350,7 @@ static int sce_aesgcm256_test(int prnt, FSPSM_AES_PWKEY aes256_key)
|
||||
if (prnt) {
|
||||
printf(" sce_aes256_gcm_test() ");
|
||||
}
|
||||
|
||||
|
||||
XMEMSET(resultT, 0, sizeof(resultT));
|
||||
XMEMSET(resultC, 0, sizeof(resultC));
|
||||
XMEMSET(resultP, 0, sizeof(resultP));
|
||||
@ -365,7 +365,7 @@ static int sce_aesgcm256_test(int prnt, FSPSM_AES_PWKEY aes256_key)
|
||||
goto out;
|
||||
}
|
||||
|
||||
result = wc_AesGcmSetKey(enc,
|
||||
result = wc_AesGcmSetKey(enc,
|
||||
(byte*)aes256_key, AES_BLOCK_SIZE*2);
|
||||
if (result != 0) {
|
||||
ret = -3;
|
||||
@ -374,7 +374,7 @@ static int sce_aesgcm256_test(int prnt, FSPSM_AES_PWKEY aes256_key)
|
||||
|
||||
/* AES-GCM encrypt and decrypt both use AES encrypt internally */
|
||||
result = wc_AesGcmEncrypt(enc, resultC, p, sizeof(p),
|
||||
(byte*)iv1, sizeof(iv1),
|
||||
(byte*)iv1, sizeof(iv1),
|
||||
resultT, sizeof(resultT), a, sizeof(a));
|
||||
|
||||
if (result != 0) {
|
||||
@ -382,7 +382,7 @@ static int sce_aesgcm256_test(int prnt, FSPSM_AES_PWKEY aes256_key)
|
||||
goto out;
|
||||
}
|
||||
|
||||
result = wc_AesGcmSetKey(dec,
|
||||
result = wc_AesGcmSetKey(dec,
|
||||
(byte*)aes256_key, AES_BLOCK_SIZE*2);
|
||||
if (result != 0) {
|
||||
ret = -7;
|
||||
@ -407,7 +407,7 @@ static int sce_aesgcm256_test(int prnt, FSPSM_AES_PWKEY aes256_key)
|
||||
XMEMSET(resultC, 0, sizeof(resultC));
|
||||
XMEMSET(resultP, 0, sizeof(resultP));
|
||||
|
||||
wc_AesGcmSetKey(enc,
|
||||
wc_AesGcmSetKey(enc,
|
||||
(byte*)aes256_key, AES_BLOCK_SIZE*2);
|
||||
/* AES-GCM encrypt and decrypt both use AES encrypt internally */
|
||||
result = wc_AesGcmEncrypt(enc, resultC, p, sizeof(p),
|
||||
@ -420,7 +420,7 @@ static int sce_aesgcm256_test(int prnt, FSPSM_AES_PWKEY aes256_key)
|
||||
}
|
||||
|
||||
result = wc_AesGcmDecrypt(enc, resultP, resultC, sizeof(p),
|
||||
iv1, sizeof(iv1), resultT + 1, sizeof(resultT) - 1,
|
||||
iv1, sizeof(iv1), resultT + 1, sizeof(resultT) - 1,
|
||||
a, sizeof(a));
|
||||
|
||||
if (result != 0) {
|
||||
@ -437,11 +437,11 @@ static int sce_aesgcm256_test(int prnt, FSPSM_AES_PWKEY aes256_key)
|
||||
out:
|
||||
wc_AesFree(enc);
|
||||
wc_AesFree(dec);
|
||||
|
||||
|
||||
if (prnt) {
|
||||
RESULT_STR(ret)
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -449,7 +449,7 @@ static void tskAes256_Gcm_Test(void *pvParam)
|
||||
{
|
||||
int ret = 0;
|
||||
Info *p = (Info*)pvParam;
|
||||
|
||||
|
||||
while (exit_loop == 0) {
|
||||
ret = sce_aesgcm256_test(0, &p->aes_key);
|
||||
vTaskDelay(10/portTICK_PERIOD_MS);
|
||||
@ -471,7 +471,7 @@ static int sce_aesgcm128_test(int prnt, FSPSM_AES_PWKEY aes128_key)
|
||||
Aes enc[1];
|
||||
Aes dec[1];
|
||||
FSPSM_ST userContext;
|
||||
|
||||
|
||||
/*
|
||||
* This is Test Case 16 from the document Galois/
|
||||
* Counter Mode of Operation (GCM) by McGrew and
|
||||
@ -565,7 +565,7 @@ static int sce_aesgcm128_test(int prnt, FSPSM_AES_PWKEY aes128_key)
|
||||
ret = -4;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
result = wc_AesGcmDecrypt(enc, resultP, resultC, sizeof(c3),
|
||||
iv3, sizeof(iv3), resultT, sizeof(t3), a3, sizeof(a3));
|
||||
@ -583,11 +583,11 @@ static int sce_aesgcm128_test(int prnt, FSPSM_AES_PWKEY aes128_key)
|
||||
out:
|
||||
wc_AesFree(enc);
|
||||
wc_AesFree(dec);
|
||||
|
||||
|
||||
if (prnt) {
|
||||
RESULT_STR(ret)
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -595,7 +595,7 @@ static void tskAes128_Gcm_Test(void *pvParam)
|
||||
{
|
||||
int ret = 0;
|
||||
Info *p = (Info*)pvParam;
|
||||
|
||||
|
||||
while (exit_loop == 0) {
|
||||
ret = sce_aesgcm128_test(0, &p->aes_key);
|
||||
vTaskDelay(10/portTICK_PERIOD_MS);
|
||||
@ -622,7 +622,7 @@ static void tskAes128_Gcm_Test(void *pvParam)
|
||||
static int sce_rsa_test(int prnt, int keySize)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
||||
RsaKey *key = (RsaKey *)XMALLOC(sizeof *key, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
WC_RNG rng;
|
||||
const char inStr [] = TEST_STRING;
|
||||
@ -633,32 +633,32 @@ static int sce_rsa_test(int prnt, int keySize)
|
||||
byte *in2 = NULL;
|
||||
byte *out= NULL;
|
||||
byte *out2 = NULL;
|
||||
|
||||
|
||||
in = (byte*)XMALLOC(inLen, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
in2 = (byte*)XMALLOC(inLen, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
out= (byte*)XMALLOC(outSz, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
out2 = (byte*)XMALLOC(outSz, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
|
||||
|
||||
(void) prnt;
|
||||
|
||||
|
||||
if (key == NULL || in == NULL || out == NULL ||
|
||||
in2 == NULL || out2 == NULL) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
XMEMSET(&rng, 0, sizeof(rng));
|
||||
XMEMSET(key, 0, sizeof *key);
|
||||
XMEMCPY(in, inStr, inLen);
|
||||
XMEMCPY(in2, inStr2, inLen);
|
||||
XMEMSET(out, 0, outSz);
|
||||
XMEMSET(out2, 0, outSz);
|
||||
|
||||
|
||||
ret = wc_InitRsaKey_ex(key, NULL, 7890/* fixed devid for TSIP/SCE*/);
|
||||
if (ret != 0) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
if ((ret = wc_InitRng(&rng)) != 0)
|
||||
goto out;
|
||||
|
||||
@ -669,7 +669,7 @@ static int sce_rsa_test(int prnt, int keySize)
|
||||
if ((ret = wc_MakeRsaKey(key, keySize, 65537, &rng)) != 0) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
ret = wc_RsaPublicEncrypt(in, inLen, out, outSz, key, &rng);
|
||||
if (ret < 0) {
|
||||
goto out;
|
||||
@ -695,14 +695,14 @@ out:
|
||||
XFREE(in2, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(out, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(out2, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int sce_rsa_SignVerify_test(int prnt, int keySize)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
||||
RsaKey *key = (RsaKey *)XMALLOC(sizeof *key, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
WC_RNG rng;
|
||||
const char inStr [] = TEST_STRING;
|
||||
@ -717,14 +717,14 @@ static int sce_rsa_SignVerify_test(int prnt, int keySize)
|
||||
in = (byte*)XMALLOC(inLen, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
in2 = (byte*)XMALLOC(inLen, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
out= (byte*)XMALLOC(outSz, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
|
||||
|
||||
(void) prnt;
|
||||
|
||||
if (key == NULL || in == NULL || out == NULL) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
XMEMSET(&rng, 0, sizeof(rng));
|
||||
XMEMSET(key, 0, sizeof *key);
|
||||
XMEMCPY(in, inStr, inLen);
|
||||
@ -734,10 +734,10 @@ static int sce_rsa_SignVerify_test(int prnt, int keySize)
|
||||
if (ret != 0) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
if ((ret = wc_InitRng(&rng)) != 0)
|
||||
goto out;
|
||||
|
||||
|
||||
if ((ret = wc_RsaSetRNG(key, &rng)) != 0)
|
||||
goto out;
|
||||
|
||||
@ -745,7 +745,7 @@ static int sce_rsa_SignVerify_test(int prnt, int keySize)
|
||||
if ((ret = wc_MakeRsaKey(key, keySize, 65537, &rng)) != 0) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
gCbInfo.keyflgs_crypt.bits.message_type = 0;
|
||||
ret = wc_RsaSSL_Sign(in, inLen, out, outSz, key, &rng);
|
||||
if (ret < 0) {
|
||||
@ -773,7 +773,7 @@ static int sce_rsa_SignVerify_test(int prnt, int keySize)
|
||||
XFREE(in, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(in2, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(out, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -782,45 +782,45 @@ int sce_crypt_test()
|
||||
{
|
||||
int ret = 0;
|
||||
fsp_err_t err;
|
||||
|
||||
|
||||
Clr_CallbackCtx(&gCbInfo);
|
||||
Clr_CallbackCtx(&gCbInfo_a);
|
||||
|
||||
|
||||
/* sets wrapped aes key */
|
||||
gCbInfo.wrapped_key_aes128 = &g_user_aes128_key_index1;
|
||||
gCbInfo.wrapped_key_aes256 = &g_user_aes256_key_index1;
|
||||
/* Aes Key Gen */
|
||||
SCE_KeyGeneration(&gCbInfo);
|
||||
|
||||
|
||||
/* Rsa Key Gen */
|
||||
err = R_SCE_RSA1024_WrappedKeyPairGenerate(&g_wrapped_pair_1024key);
|
||||
if (err == FSP_SUCCESS) {
|
||||
/* sets wrapped rsa 1024 bits key */
|
||||
gCbInfo.wrapped_key_rsapri1024 =
|
||||
gCbInfo.wrapped_key_rsapri1024 =
|
||||
&g_wrapped_pair_1024key.priv_key;
|
||||
gCbInfo.keyflgs_crypt.bits.rsapri1024_installedkey_set = 1;
|
||||
gCbInfo.wrapped_key_rsapub1024 =
|
||||
gCbInfo.wrapped_key_rsapub1024 =
|
||||
&g_wrapped_pair_1024key.pub_key;
|
||||
gCbInfo.keyflgs_crypt.bits.rsapub1024_installedkey_set = 1;
|
||||
}
|
||||
|
||||
|
||||
err = R_SCE_RSA2048_WrappedKeyPairGenerate(&g_wrapped_pair_2048key);
|
||||
if (err == FSP_SUCCESS) {
|
||||
/* sets wrapped rsa 1024 bits key */
|
||||
gCbInfo.wrapped_key_rsapri2048 =
|
||||
gCbInfo.wrapped_key_rsapri2048 =
|
||||
&g_wrapped_pair_2048key.priv_key;
|
||||
gCbInfo.keyflgs_crypt.bits.rsapri2048_installedkey_set = 1;
|
||||
|
||||
gCbInfo.wrapped_key_rsapub2048 =
|
||||
|
||||
gCbInfo.wrapped_key_rsapub2048 =
|
||||
&g_wrapped_pair_2048key.pub_key;
|
||||
gCbInfo.keyflgs_crypt.bits.rsapub2048_installedkey_set = 1;
|
||||
}
|
||||
|
||||
|
||||
/* Key generation for multi testing */
|
||||
gCbInfo_a.wrapped_key_aes128 = &g_user_aes128_key_index2;
|
||||
gCbInfo_a.wrapped_key_aes256 = &g_user_aes256_key_index2;
|
||||
SCE_KeyGeneration(&gCbInfo_a);
|
||||
|
||||
|
||||
ret = wc_CryptoCb_CryptInitRenesasCmn(NULL, &gCbInfo);
|
||||
if ( ret > 0)
|
||||
ret = 0;
|
||||
@ -868,7 +868,7 @@ int sce_crypt_test()
|
||||
if (ret == 0) {
|
||||
ret = sce_aesgcm128_test(1, &g_user_aes128_key_index1);
|
||||
}
|
||||
|
||||
|
||||
if (ret == 0) {
|
||||
ret = sce_aesgcm256_test(1, &g_user_aes256_key_index1);
|
||||
}
|
||||
@ -890,12 +890,12 @@ int sce_crypt_test()
|
||||
sce_crypt_Sha_AesCbcGcm_multitest();
|
||||
} else
|
||||
ret = -1;
|
||||
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_RSIP_CRYPTONLY)
|
||||
Clr_CallbackCtx(&gCbInfo);
|
||||
Clr_CallbackCtx(&gCbInfo_a);
|
||||
#endif
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -944,7 +944,7 @@ int sce_crypt_sha256_multitest()
|
||||
int num = 0;
|
||||
int i;
|
||||
BaseType_t xRet;
|
||||
|
||||
|
||||
#ifndef NO_SHA256
|
||||
num+=2;
|
||||
#endif
|
||||
@ -954,7 +954,7 @@ int sce_crypt_sha256_multitest()
|
||||
|
||||
exit_semaph = xSemaphoreCreateCounting(num, 0);
|
||||
xRet = pdPASS;
|
||||
|
||||
|
||||
#ifndef NO_SHA256
|
||||
xRet = xTaskCreate(tskSha256_Test1, "sha256_test1",
|
||||
STACK_SIZE, NULL, 2, NULL);
|
||||
@ -976,15 +976,15 @@ int sce_crypt_sha256_multitest()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
vSemaphoreDelete(exit_semaph);
|
||||
|
||||
|
||||
if ((xRet == pdPASS) &&
|
||||
(sha256_multTst_rslt1 == 0 && sha256_multTst_rslt2 == 0))
|
||||
ret = 0;
|
||||
else
|
||||
ret = -1;
|
||||
|
||||
|
||||
RESULT_STR(ret)
|
||||
|
||||
return ret;
|
||||
@ -1001,7 +1001,7 @@ int sce_crypt_AesCbc_multitest()
|
||||
Info info_aes256_1;
|
||||
Info info_aes256_2;
|
||||
BaseType_t xRet;
|
||||
|
||||
|
||||
#if defined(HAVE_AES_CBC) && defined(WOLFSSL_AES_128)
|
||||
num+=2;
|
||||
#endif
|
||||
@ -1014,7 +1014,7 @@ int sce_crypt_AesCbc_multitest()
|
||||
|
||||
exit_semaph = xSemaphoreCreateCounting(num, 0);
|
||||
xRet = pdPASS;
|
||||
|
||||
|
||||
#if defined(HAVE_AES_CBC) && defined(WOLFSSL_AES_128)
|
||||
XMEMCPY(&info_aes1.aes_key, &g_user_aes128_key_index1,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
@ -1043,7 +1043,7 @@ int sce_crypt_AesCbc_multitest()
|
||||
xRet = xTaskCreate(tskAes256_Cbc_Test, "aes256_cbc_test2",
|
||||
STACK_SIZE, &info_aes256_2, 3, NULL);
|
||||
#endif
|
||||
|
||||
|
||||
if (xRet == pdPASS) {
|
||||
printf(" Waiting for completing tasks ... ");
|
||||
vTaskDelay(10000/portTICK_PERIOD_MS);
|
||||
@ -1057,7 +1057,7 @@ int sce_crypt_AesCbc_multitest()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
vSemaphoreDelete(exit_semaph);
|
||||
|
||||
if ((xRet == pdPASS) &&
|
||||
@ -1082,7 +1082,7 @@ int sce_crypt_AesGcm_multitest()
|
||||
Info info_aes256_1;
|
||||
Info info_aes256_2;
|
||||
BaseType_t xRet;
|
||||
|
||||
|
||||
#if defined(WOLFSSL_AES_128)
|
||||
num+=2;
|
||||
#endif
|
||||
@ -1096,7 +1096,7 @@ int sce_crypt_AesGcm_multitest()
|
||||
|
||||
exit_semaph = xSemaphoreCreateCounting(num, 0);
|
||||
xRet = pdPASS;
|
||||
|
||||
|
||||
#if defined(WOLFSSL_AES_128)
|
||||
XMEMCPY(&info_aes1.aes_key, &g_user_aes128_key_index1,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
@ -1141,7 +1141,7 @@ int sce_crypt_AesGcm_multitest()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
vSemaphoreDelete(exit_semaph);
|
||||
|
||||
if ((xRet == pdPASS) &&
|
||||
@ -1165,7 +1165,7 @@ int sce_crypt_Sha_AesCbcGcm_multitest()
|
||||
Info info_aes256cbc;
|
||||
Info info_aes256gcm;
|
||||
BaseType_t xRet;
|
||||
|
||||
|
||||
#ifndef NO_SHA256
|
||||
num+=2;
|
||||
#endif
|
||||
@ -1187,45 +1187,45 @@ int sce_crypt_Sha_AesCbcGcm_multitest()
|
||||
|
||||
exit_semaph = xSemaphoreCreateCounting(num, 0);
|
||||
xRet = pdPASS;
|
||||
|
||||
|
||||
#ifndef NO_SHA256
|
||||
xRet = xTaskCreate(tskSha256_Test1, "sha256_test1",
|
||||
xRet = xTaskCreate(tskSha256_Test1, "sha256_test1",
|
||||
STACK_SIZE, NULL, 3, NULL);
|
||||
|
||||
if (xRet == pdPASS)
|
||||
xRet = xTaskCreate(tskSha256_Test2, "sha256_test2",
|
||||
xRet = xTaskCreate(tskSha256_Test2, "sha256_test2",
|
||||
STACK_SIZE, NULL, 3, NULL);
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_AES_128)
|
||||
XMEMCPY(&info_aes128cbc.aes_key, &g_user_aes128_key_index1,
|
||||
XMEMCPY(&info_aes128cbc.aes_key, &g_user_aes128_key_index1,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
if (xRet == pdPASS)
|
||||
xRet = xTaskCreate(tskAes128_Cbc_Test, "aes128_cbc_test1",
|
||||
xRet = xTaskCreate(tskAes128_Cbc_Test, "aes128_cbc_test1",
|
||||
STACK_SIZE, &info_aes128cbc, 3, NULL);
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_AES_128)
|
||||
XMEMCPY(&info_aes128gcm.aes_key, &g_user_aes128_key_index2,
|
||||
XMEMCPY(&info_aes128gcm.aes_key, &g_user_aes128_key_index2,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
if (xRet == pdPASS)
|
||||
xRet = xTaskCreate(tskAes128_Gcm_Test, "aes128_gcm_test2",
|
||||
xRet = xTaskCreate(tskAes128_Gcm_Test, "aes128_gcm_test2",
|
||||
STACK_SIZE, &info_aes128gcm, 3, NULL);
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_AES_256)
|
||||
XMEMCPY(&info_aes256cbc.aes_key, &g_user_aes256_key_index1,
|
||||
XMEMCPY(&info_aes256cbc.aes_key, &g_user_aes256_key_index1,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
if (xRet == pdPASS)
|
||||
xRet = xTaskCreate(tskAes256_Cbc_Test, "aes256_cbc_test1",
|
||||
xRet = xTaskCreate(tskAes256_Cbc_Test, "aes256_cbc_test1",
|
||||
STACK_SIZE, &info_aes256cbc, 3, NULL);
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_AES_256)
|
||||
XMEMCPY(&info_aes256gcm.aes_key, &g_user_aes256_key_index2,
|
||||
XMEMCPY(&info_aes256gcm.aes_key, &g_user_aes256_key_index2,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
if (xRet == pdPASS)
|
||||
xRet = xTaskCreate(tskAes256_Gcm_Test, "aes256_gcm_test2",
|
||||
xRet = xTaskCreate(tskAes256_Gcm_Test, "aes256_gcm_test2",
|
||||
STACK_SIZE, &info_aes256gcm, 3, NULL);
|
||||
#endif
|
||||
|
||||
@ -1242,19 +1242,19 @@ int sce_crypt_Sha_AesCbcGcm_multitest()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
vSemaphoreDelete(exit_semaph);
|
||||
|
||||
if ((xRet == pdPASS) &&
|
||||
|
||||
if ((xRet == pdPASS) &&
|
||||
(Aes128_Gcm_multTst_rslt == 0 && Aes256_Gcm_multTst_rslt == 0) &&
|
||||
(sha256_multTst_rslt1 == 0 && sha256_multTst_rslt2 == 0)) {
|
||||
|
||||
|
||||
ret = 0;
|
||||
}
|
||||
else {
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
|
||||
RESULT_STR(ret)
|
||||
|
||||
return ret;
|
||||
|
@ -6,16 +6,16 @@ wolfSSL sample application project for GR-ROSE evaluation board
|
||||
## 1. Overview
|
||||
-----
|
||||
|
||||
We provide a sample program for evaluating wolfSSL targeting the GR-ROSE evaluation board, which has RX65N MCU on it. The sample program runs in a bare metal environment that does not use a real-time OS and uses e2 studio as an IDE. This document describes the procedure from build to execution of the sample program.
|
||||
We provide a sample program for evaluating wolfSSL targeting the GR-ROSE evaluation board, which has RX65N MCU on it. The sample program runs in a bare metal environment that does not use a real-time OS and uses e2 studio as an IDE. This document describes the procedure from build to execution of the sample program.
|
||||
|
||||
The sample provided is a single application that can evaluate the following three functions:
|
||||
|
||||
- CryptoTest: A program that automatically tests various cryptographic operation functions
|
||||
- Benchmark: A program that measures the execution speed of various cryptographic operations
|
||||
- Benchmark: A program that measures the execution speed of various cryptographic operations
|
||||
- TlsClient: A program that performs TLS communication with the opposite TLS server application
|
||||
<br><br>
|
||||
|
||||
Since the H/W settings and S/W settings for operating the evaluation board have already been prepared, the minimum settings are required to operate the sample application. In addition, the RootCA certificate and server-side certificate required for TLS communication have already been set for sample use only.
|
||||
Since the H/W settings and S/W settings for operating the evaluation board have already been prepared, the minimum settings are required to operate the sample application. In addition, the RootCA certificate and server-side certificate required for TLS communication have already been set for sample use only.
|
||||
|
||||
The following sections will walk you through the steps leading up to running the sample application.
|
||||
<br><br>
|
||||
@ -23,7 +23,7 @@ The following sections will walk you through the steps leading up to running the
|
||||
## 2. Target H/W, components and libraries
|
||||
-----
|
||||
|
||||
This sample program uses the following hardware and software libraries. If a new version of the software component is available at the time of use, please update it as appropriate.
|
||||
This sample program uses the following hardware and software libraries. If a new version of the software component is available at the time of use, please update it as appropriate.
|
||||
|
||||
|item|name & version|
|
||||
|:--|:--|
|
||||
@ -50,18 +50,18 @@ However, the FIT components themselves are not included in the distribution of t
|
||||
|TSIP(Trusted Secure IP) driver|1.17.l|r_tsip_rx|
|
||||
<br>
|
||||
|
||||
Note) As of April 2022, TIPS v1.15 does not seem to be able to be added as a FIT component by adding a component in the Smart Configurator Perspective. Add it manually along the method described later.
|
||||
Note) As of April 2022, TIPS v1.15 does not seem to be able to be added as a FIT component by adding a component in the Smart Configurator Perspective. Add it manually along the method described later.
|
||||
<br><br>
|
||||
|
||||
## 3. Importing sample application project into e2Studio
|
||||
----
|
||||
|
||||
There is no need to create a new sample program. Since the project file is already prepared, please import the project from the IDE by following the steps below.
|
||||
There is no need to create a new sample program. Since the project file is already prepared, please import the project from the IDE by following the steps below.
|
||||
|
||||
+ e2studio "File" menu> "Open project from file system ..."> "Directory (R) ..." Click the import source button and select the folder from which the project will be imported. Select the folder (Renesas/e2studio/{MCU}/{board-name-folder}) where this README file exists.
|
||||
+ Four projects that can be imported are listed, but check only the three projects "smc", "test" and "wolfssl" and click the "Finish" button.
|
||||
+ e2studio "File" menu> "Open project from file system ..."> "Directory (R) ..." Click the import source button and select the folder from which the project will be imported. Select the folder (Renesas/e2studio/{MCU}/{board-name-folder}) where this README file exists.
|
||||
+ Four projects that can be imported are listed, but check only the three projects "smc", "test" and "wolfssl" and click the "Finish" button.
|
||||
|
||||
You should see the **smc**, **test**, and **wolfssl** 3 projects you imported into the project explorer.
|
||||
You should see the **smc**, **test**, and **wolfssl** 3 projects you imported into the project explorer.
|
||||
<br><br>
|
||||
|
||||
## 4. FIT module download and smart configurator file generation
|
||||
@ -69,13 +69,13 @@ You should see the **smc**, **test**, and **wolfssl** 3 projects you imported in
|
||||
|
||||
You will need to get the required FIT modules yourself. Follow the steps below to get them.
|
||||
|
||||
1. Open the smc project in Project Explorer and double-click the **smc.scfg** file to open the Smart Configurator Perspective.
|
||||
1. Open the smc project in Project Explorer and double-click the **smc.scfg** file to open the Smart Configurator Perspective.
|
||||
|
||||
2. Select the "Components" tab on the software component settings pane. Then click the "Add Component" button at the top right of the pane. The software component selection dialog will pop up. Click "Download the latest version of FIT driver and middleware" at the bottom of the dialog to get the modules. You can check the download destination folder by pressing "Basic settings...".
|
||||
|
||||
3. The latest version of the TSIP component may not be automatically obtained due to the delay in Renesas' support by the method in step 2 above. In that case, you can download it manually from the Renesas website. Unzip the downloaded component and store the files contained in the FIT Modules folder in the download destination folder of step 2.
|
||||
|
||||
4. Select the required FIT components shown from the list and press the "Finish" button. Repeat this operation until you have the required FIT components.
|
||||
4. Select the required FIT components shown from the list and press the "Finish" button. Repeat this operation until you have the required FIT components.
|
||||
|
||||
5. Select the Components tab on the Software Component Settings pane and select the r_t4_rx component. In the settings pane on the right, specify the IP address of this board as the value of the "# IP address for ch0, when DHCP disable." Property (e.g. 192.168.1.9).
|
||||
|
||||
@ -117,7 +117,7 @@ Then build the test application.
|
||||
## 7. Build and run the test application
|
||||
-----
|
||||
|
||||
Now that the test application is ready to build.
|
||||
Now that the test application is ready to build.
|
||||
|
||||
1. Build the wolfssl project on the project explorer, then the test project.
|
||||
|
||||
@ -129,14 +129,14 @@ Now that the test application is ready to build.
|
||||
|
||||
5. Press the run button to run the test application.
|
||||
|
||||
6. CryptoTest, Benchmark or TLS_Client After displaying the execution result according to the selected behavior, it enters an infinite loop, so if you think that the output has stopped, stop debugging.
|
||||
6. CryptoTest, Benchmark or TLS_Client After displaying the execution result according to the selected behavior, it enters an infinite loop, so if you think that the output has stopped, stop debugging.
|
||||
<br><br>
|
||||
|
||||
## 8. Running test application as TLS_Client
|
||||
-----
|
||||
<br>
|
||||
|
||||
### 8.1 TLS version supported by the test application
|
||||
### 8.1 TLS version supported by the test application
|
||||
|
||||
<br>
|
||||
You can use the TLS1.3 protocol in addition to the existing TLS1.2. The following macro is defined to {board-name-folder}/common/user_settings.h.
|
||||
@ -177,7 +177,7 @@ In the test application, the TLS version and certificate type determine the ciph
|
||||
|:--|:--|:--|
|
||||
|TLS1.3|RSA/ECDSA certificate| |
|
||||
|||TLS_AES_128_GCM_SHA256|
|
||||
|||TLS_AES_128_CCM_SHA256|
|
||||
|||TLS_AES_128_CCM_SHA256|
|
||||
|TLS1.2|RSA certificate|
|
||||
|||TLS_RSA_WITH_AES_128_CBC_SHA|
|
||||
|||TLS_RSA_WITH_AES_256_CBC_SHA|
|
||||
@ -200,7 +200,7 @@ To operate as TLS_Client, an opposite application for TLS communication is requi
|
||||
|
||||
Configuration options need to be changed depending on the certificate type used.
|
||||
|
||||
#### 8.4.1 Configuration when using ECDSA certificates
|
||||
#### 8.4.1 Configuration when using ECDSA certificates
|
||||
|
||||
<br>
|
||||
|
||||
@ -217,7 +217,7 @@ Note: Do not forget to specify "-DNO_RSA"
|
||||
<br>
|
||||
|
||||
With the above build, <wolfssl-folder\>/examples/server/server
|
||||
Is generated. This executable acts as a TLS server application. If you execute it with the following options, it will be in the listening state for the connection from TLS_Client.
|
||||
Is generated. This executable acts as a TLS server application. If you execute it with the following options, it will be in the listening state for the connection from TLS_Client.
|
||||
<br><br>
|
||||
|
||||
```
|
||||
@ -298,7 +298,7 @@ If you want to use it for purposes beyond functional evaluation, you need to pre
|
||||
2. RSA key pair required for RootCA certificate validation
|
||||
3. The signature generated by the RootCA certificate with the private key in 2 above.
|
||||
|
||||
will become necessary. Please refer to the manual provided by Renesas for how to generate them.
|
||||
will become necessary. Please refer to the manual provided by Renesas for how to generate them.
|
||||
|
||||
<br>
|
||||
|
||||
@ -316,7 +316,7 @@ Use wolfSSL_use_certificate_buffer or wolfSSL_CTX_use_certificate_buffer to load
|
||||
|
||||
(2) Loading client private key/public key
|
||||
|
||||
Type of the client certificate decides the keys to be loaded.
|
||||
Type of the client certificate decides the keys to be loaded.
|
||||
|
||||
a) ECDSA certificate:<br>
|
||||
Load private key using tsip_use_PrivateKey_buffer.
|
||||
@ -324,14 +324,14 @@ a) ECDSA certificate:<br>
|
||||
b) RSA certificate:<br>
|
||||
Load private key using tsip_use_PrivateKey_buffer.
|
||||
Load public key using tsip_use_PublicKey_buffer.
|
||||
Note. In case of RSA certificate, the public key will be used for internal verification of signature process.
|
||||
Note. In case of RSA certificate, the public key will be used for internal verification of signature process.
|
||||
|
||||
(3) How to generate encrypted keys
|
||||
|
||||
The keys (private and public keys) to be loaded should be encrypted-key format. Those keys could be generated with Renesas Secure Flash Programmer or SecurityKeyManagementTool. Refer the section 7.5 and 7.6 of the application note named “RX Family TSIP Module Firmware Integration technology” how to operate above key wrapping tool.
|
||||
|
||||
(4) Macro to be defined
|
||||
Define “WOLF_PRIVATE_KEY_ID” in your user_settings.h.
|
||||
Define “WOLF_PRIVATE_KEY_ID” in your user_settings.h.
|
||||
|
||||
<br>
|
||||
|
||||
@ -345,4 +345,4 @@ wolfSSL, which supports TSIPv1.17, has the following functional restrictions.
|
||||
|
||||
1. Session resumption and early data using TSIP are not supported.
|
||||
|
||||
The above limitations are expected to be improved by TSIP or wolfSSL from the next version onwards.
|
||||
The above limitations are expected to be improved by TSIP or wolfSSL from the next version onwards.
|
||||
|
@ -186,7 +186,7 @@ testアプリケーションでは、TLSバージョンと証明書のタイプ
|
||||
|:--|:--|:--|
|
||||
|TLS1.3|RSA/ECDSA証明書| |
|
||||
|||TLS_AES_128_GCM_SHA256|
|
||||
|||TLS_AES_128_CCM_SHA256|
|
||||
|||TLS_AES_128_CCM_SHA256|
|
||||
|TLS1.2|RSA証明書|
|
||||
|||TLS_RSA_WITH_AES_128_CBC_SHA|
|
||||
|||TLS_RSA_WITH_AES_256_CBC_SHA|
|
||||
|
@ -30,7 +30,7 @@
|
||||
/*-- Renesas TSIP usage and its version ---------------------------------------
|
||||
*
|
||||
* "WOLFSSL_RENESAS_TSIP" definition makes wolfSSL to use H/W acceleration
|
||||
* for cipher operations.
|
||||
* for cipher operations.
|
||||
* TSIP definition asks to have its version number.
|
||||
* "WOLFSSL_RENESAS_TSIP_VER" takes following value:
|
||||
* 106: TSIPv1.06
|
||||
@ -47,18 +47,18 @@
|
||||
*
|
||||
* wolfSSL supports TLSv1.2 by default. In case you want your system to support
|
||||
* TLSv1.3, uncomment line below.
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define WOLFSSL_TLS13
|
||||
|
||||
|
||||
/*-- Operating System related definitions --------------------------------------
|
||||
*
|
||||
*
|
||||
* In case any real-time OS is used, define its name(e.g. FREERTOS).
|
||||
* Otherwise, define "SINGLE_THREADED". They are exclusive each other.
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define SINGLE_THREADED
|
||||
#define SINGLE_THREADED
|
||||
/*#define FREERTOS*/
|
||||
|
||||
/*-- Compiler related definitions ---------------------------------------------
|
||||
@ -98,34 +98,34 @@
|
||||
|
||||
/* USE_ECC_CERT
|
||||
* This macro is for selecting root CA certificate to load, it is valid only
|
||||
* in example applications. wolfSSL does not refer this macro.
|
||||
* If you want to use cipher suites including ECDSA authentication in
|
||||
* in example applications. wolfSSL does not refer this macro.
|
||||
* If you want to use cipher suites including ECDSA authentication in
|
||||
* the example applications with TSIP, enable this macro.
|
||||
* In TSIP 1.13 or later version, following cipher suites are
|
||||
* In TSIP 1.13 or later version, following cipher suites are
|
||||
* available:
|
||||
* - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
|
||||
* - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SAH256
|
||||
*
|
||||
*
|
||||
* Note that, this macro disables cipher suites including RSA
|
||||
* authentication such as:
|
||||
* - TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* - TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
* - TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
* - TLS_RSA_WITH_AES_128_CBC_SHA256
|
||||
* - TLS_RSA_WITH_AES_256_CBC_SHA256
|
||||
* - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
|
||||
* - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA256
|
||||
*
|
||||
*
|
||||
*/
|
||||
#define USE_ECC_CERT
|
||||
|
||||
/* In this example application, Root CA cert buffer named
|
||||
* "ca_ecc_cert_der_256" is used under the following macro definition
|
||||
/* In this example application, Root CA cert buffer named
|
||||
* "ca_ecc_cert_der_256" is used under the following macro definition
|
||||
* for ECDSA.
|
||||
*/
|
||||
#define USE_CERT_BUFFERS_256
|
||||
|
||||
/* In this example application, Root CA cert buffer named
|
||||
* "ca_cert_der_2048" is used under the following macro definition
|
||||
/* In this example application, Root CA cert buffer named
|
||||
* "ca_cert_der_2048" is used under the following macro definition
|
||||
* for RSA authentication.
|
||||
*/
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
@ -137,7 +137,7 @@
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
/*#define WOLFSSL_STATIC_MEMORY*/
|
||||
|
||||
|
||||
#if defined(WOLFSSL_STATIC_MEMORY)
|
||||
#define USE_FAST_MATH
|
||||
#else
|
||||
@ -146,24 +146,24 @@
|
||||
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* -- "NO_ASN_TIME" macro is to avoid certificate expiration validation --
|
||||
*
|
||||
* Note. In your actual products, do not forget to comment-out
|
||||
*
|
||||
* Note. In your actual products, do not forget to comment-out
|
||||
* "NO_ASN_TIME" macro. And prepare time function to get calendar time,
|
||||
* otherwise, certificate expiration validation will not work.
|
||||
* otherwise, certificate expiration validation will not work.
|
||||
*/
|
||||
/*#define NO_ASN_TIME*/
|
||||
|
||||
|
||||
#define NO_MAIN_DRIVER
|
||||
#define BENCH_EMBEDDED
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
#define NO_FILESYSTEM
|
||||
#define WOLFSSL_LOG_PRINTF
|
||||
#define WOLFSSL_HAVE_MIN
|
||||
#define WOLFSSL_HAVE_MAX
|
||||
|
||||
|
||||
#define NO_WRITEV
|
||||
#define WOLFSSL_USER_IO
|
||||
|
||||
@ -175,7 +175,7 @@
|
||||
#define USE_WOLF_SUSECONDS_T
|
||||
#define USE_WOLF_TIMEVAL_T
|
||||
|
||||
|
||||
|
||||
#define WC_RSA_BLINDING
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
@ -191,7 +191,7 @@
|
||||
|
||||
/*-- Definitions for functionality negation -----------------------------------
|
||||
*
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/*#define NO_RENESAS_TSIP_CRYPT*/
|
||||
@ -203,7 +203,7 @@
|
||||
|
||||
/*-- Consistency checking between definitions ---------------------------------
|
||||
*
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/*-- TSIP TLS specific definitions --*/
|
||||
|
@ -23,4 +23,4 @@ EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/common/unistd.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/common/user_settings.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/smc.scfg
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/smc.scfg
|
||||
|
@ -89,14 +89,14 @@ double current_time(int reset)
|
||||
|
||||
int SetTsiptlsKey()
|
||||
{
|
||||
#if defined(WOLFSSL_RENESAS_TSIP) && (WOLFSSL_RENESAS_TSIP_VER >=109)
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP) && (WOLFSSL_RENESAS_TSIP_VER >=109)
|
||||
|
||||
#if defined(TLS_CLIENT)
|
||||
|
||||
#if defined(USE_ECC_CERT)
|
||||
#if defined(USE_ECC_CERT)
|
||||
/* Root CA cert has ECC-P256 public key */
|
||||
tsip_inform_cert_sign((const byte *)ca_ecc_cert_der_sig);
|
||||
#else
|
||||
#else
|
||||
/* Root CA cert has RSA public key */
|
||||
tsip_inform_cert_sign((const byte *)ca_cert_der_sig);
|
||||
#endif
|
||||
@ -120,24 +120,24 @@ int SetTsiptlsKey()
|
||||
#endif
|
||||
|
||||
#elif defined(WOLFSSL_RENESAS_TSIP) && (WOLFSSL_RENESAS_TSIP_VER < 109)
|
||||
|
||||
|
||||
#if defined(TLS_CLIENT)
|
||||
|
||||
|
||||
tsip_inform_cert_sign((const byte *)ca_cert_sig);
|
||||
tsip_inform_user_keys((byte*)&g_key_block_data.encrypted_session_key,
|
||||
(byte*)&g_key_block_data.iv,
|
||||
(byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key);
|
||||
|
||||
|
||||
#elif defined(TLS_SERVER)
|
||||
|
||||
|
||||
tsip_inform_cert_sign((const byte *)client_cert_der_sign);
|
||||
tsip_inform_user_keys((byte*)&g_key_block_data.encrypted_session_key,
|
||||
(byte*)&g_key_block_data.iv,
|
||||
(byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -283,7 +283,7 @@ void main(void)
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
|
||||
SetTsiptlsKey();
|
||||
#endif
|
||||
|
||||
|
||||
do {
|
||||
if(cipherlist_sz > 0 ) printf("cipher : %s\n", cipherlist[i]);
|
||||
|
||||
|
@ -126,7 +126,7 @@ void wolfSSL_TLS_server_init(byte doClientCheck)
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
ret = wolfSSL_CTX_use_PrivateKey_file(server_ctx, key, 0);
|
||||
#else
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(server_ctx, key, sizeof_key,
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(server_ctx, key, sizeof_key,
|
||||
SSL_FILETYPE_ASN1);
|
||||
#endif
|
||||
if (ret != SSL_SUCCESS) {
|
||||
@ -140,20 +140,20 @@ void wolfSSL_TLS_server_init(byte doClientCheck)
|
||||
wolfSSL_CTX_set_verify(server_ctx, WOLFSSL_VERIFY_PEER |
|
||||
WOLFSSL_VERIFY_FAIL_IF_NO_PEER_CERT, 0);
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
if (wolfSSL_CTX_load_verify_locations(server_ctx, clientCert, 0)
|
||||
if (wolfSSL_CTX_load_verify_locations(server_ctx, clientCert, 0)
|
||||
!= WOLFSSL_SUCCESS)
|
||||
#else
|
||||
if (wolfSSL_CTX_load_verify_buffer(server_ctx, clientCert,
|
||||
if (wolfSSL_CTX_load_verify_buffer(server_ctx, clientCert,
|
||||
sizeof_clicert,
|
||||
SSL_FILETYPE_ASN1) != SSL_SUCCESS)
|
||||
#endif
|
||||
printf("can't load ca file, Please run from wolfSSL home dir\n");
|
||||
}
|
||||
|
||||
|
||||
/* Register callbacks */
|
||||
wolfSSL_SetIORecv(server_ctx, my_IORecv);
|
||||
wolfSSL_SetIOSend(server_ctx, my_IOSend);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void wolfSSL_TLS_server( )
|
||||
|
@ -3,7 +3,7 @@ wolfSSL sample application project for Renesas RSK+RX65N-2MB evaluation board
|
||||
|
||||
<br>
|
||||
|
||||
A sample program for evaluating wolfSSL targeting the Renesas RSK+RX65N-2MB evaluation board is provided. For details on the program, refer to the following documents included in the package.
|
||||
A sample program for evaluating wolfSSL targeting the Renesas RSK+RX65N-2MB evaluation board is provided. For details on the program, refer to the following documents included in the package.
|
||||
|
||||
+ InstructionManualForExample_RSK+RX65N-2MB_JP.pdf (Japanese)
|
||||
+ InstructionManualForExample_RSK+RX65N-2MB_EN.pdf (English)
|
||||
+ InstructionManualForExample_RSK+RX65N-2MB_EN.pdf (English)
|
||||
|
@ -9,4 +9,4 @@ Renesas社製 RSK+RX65N-2MB 評価ボードをターゲットとしてwolfSSLを
|
||||
+ InstructionManualForExample_RSK+RX65N-2MB_JP.pdf (日本語版)
|
||||
+ InstructionManualForExample_RSK+RX65N-2MB_EN.pdf (英語版)
|
||||
|
||||
を参照ください。
|
||||
を参照ください。
|
||||
|
@ -29,7 +29,7 @@
|
||||
/*-- Renesas TSIP usage and its version ---------------------------------------
|
||||
*
|
||||
* "WOLFSSL_RENESAS_TSIP" definition makes wolfSSL to use H/W acceleration
|
||||
* for cipher operations.
|
||||
* for cipher operations.
|
||||
* TSIP definition asks to have its version number.
|
||||
* "WOLFSSL_RENESAS_TSIP_VER" takes following value:
|
||||
* 106: TSIPv1.06
|
||||
@ -47,16 +47,16 @@
|
||||
*
|
||||
* wolfSSL supports TLSv1.2 by default. In case you want your system to support
|
||||
* TLSv1.3, uncomment line below.
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define WOLFSSL_TLS13
|
||||
|
||||
|
||||
/*-- Operating System related definitions --------------------------------------
|
||||
*
|
||||
*
|
||||
* In case any real-time OS is used, define its name(e.g. FREERTOS).
|
||||
* Otherwise, define "SINGLE_THREADED". They are exclusive each other.
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#define FREERTOS
|
||||
@ -101,23 +101,23 @@
|
||||
|
||||
/* USE_ECC_CERT
|
||||
* This macro is for selecting root CA certificate to load, it is valid only
|
||||
* in example applications. wolfSSL does not refer this macro.
|
||||
* If you want to use cipher suites including ECDSA authentication in
|
||||
* in example applications. wolfSSL does not refer this macro.
|
||||
* If you want to use cipher suites including ECDSA authentication in
|
||||
* the example applications with TSIP, enable this macro.
|
||||
* In TSIP 1.13 or later version, following cipher suites are
|
||||
* In TSIP 1.13 or later version, following cipher suites are
|
||||
* available:
|
||||
* - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
|
||||
* - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SAH256
|
||||
*
|
||||
*
|
||||
* Note that, this macro disables cipher suites including RSA
|
||||
* authentication such as:
|
||||
* - TLS_RSA_WITH_AES_128_CBC_SHA
|
||||
* - TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
* - TLS_RSA_WITH_AES_256_CBC_SHA
|
||||
* - TLS_RSA_WITH_AES_128_CBC_SHA256
|
||||
* - TLS_RSA_WITH_AES_256_CBC_SHA256
|
||||
* - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
|
||||
* - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA256
|
||||
*
|
||||
*
|
||||
*/
|
||||
#define USE_ECC_CERT
|
||||
|
||||
@ -126,14 +126,14 @@
|
||||
*/
|
||||
/*#define WOLFSSL_CHECK_SIG_FAULTS*/
|
||||
|
||||
/* In this example application, Root CA cert buffer named
|
||||
* "ca_ecc_cert_der_256" is used under the following macro definition
|
||||
/* In this example application, Root CA cert buffer named
|
||||
* "ca_ecc_cert_der_256" is used under the following macro definition
|
||||
* for ECDSA.
|
||||
*/
|
||||
#define USE_CERT_BUFFERS_256
|
||||
|
||||
/* In this example application, Root CA cert buffer named
|
||||
* "ca_cert_der_2048" is used under the following macro definition
|
||||
/* In this example application, Root CA cert buffer named
|
||||
* "ca_cert_der_2048" is used under the following macro definition
|
||||
* for RSA authentication.
|
||||
*/
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
@ -145,25 +145,25 @@
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* -- "NO_ASN_TIME" macro is to avoid certificate expiration validation --
|
||||
*
|
||||
* Note. In your actual products, do not forget to comment-out
|
||||
*
|
||||
* Note. In your actual products, do not forget to comment-out
|
||||
* "NO_ASN_TIME" macro. And prepare time function to get calendar time,
|
||||
* otherwise, certificate expiration validation will not work.
|
||||
* otherwise, certificate expiration validation will not work.
|
||||
*/
|
||||
/*#define NO_ASN_TIME*/
|
||||
|
||||
|
||||
#define NO_MAIN_DRIVER
|
||||
#define BENCH_EMBEDDED
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
#define NO_FILESYSTEM
|
||||
#define WOLFSSL_LOG_PRINTF
|
||||
#define WOLFSSL_HAVE_MIN
|
||||
#define WOLFSSL_HAVE_MAX
|
||||
#define NO_WRITEV
|
||||
|
||||
|
||||
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
#define TIME_OVERRIDES
|
||||
@ -196,7 +196,7 @@
|
||||
|
||||
/*-- Definitions for functionality negation -----------------------------------
|
||||
*
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/*#define NO_RENESAS_TSIP_CRYPT*/
|
||||
@ -207,7 +207,7 @@
|
||||
#endif
|
||||
/*-- Consistency checking between definitions ---------------------------------
|
||||
*
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/*-- TSIP TLS specific definitions --*/
|
||||
|
@ -145,7 +145,7 @@ static void Tls_client_init(const char* cipherlist)
|
||||
char *cert = "./certs/ca-cert.pem";
|
||||
#endif
|
||||
#else
|
||||
#if defined(USE_ECC_CERT) && defined(USE_CERT_BUFFERS_256)
|
||||
#if defined(USE_ECC_CERT) && defined(USE_CERT_BUFFERS_256)
|
||||
const unsigned char *cert = ca_ecc_cert_der_256;
|
||||
#define SIZEOF_CERT sizeof_ca_ecc_cert_der_256
|
||||
#else
|
||||
@ -164,7 +164,7 @@ static void Tls_client_init(const char* cipherlist)
|
||||
#endif
|
||||
|
||||
/* Create and initialize WOLFSSL_CTX */
|
||||
if ((client_ctx =
|
||||
if ((client_ctx =
|
||||
wolfSSL_CTX_new(wolfSSLv23_client_method_ex((void *)NULL))) == NULL) {
|
||||
printf("ERROR: failed to create WOLFSSL_CTX\n");
|
||||
return;
|
||||
@ -175,7 +175,7 @@ static void Tls_client_init(const char* cipherlist)
|
||||
#endif
|
||||
|
||||
#if defined(NO_FILESYSTEM)
|
||||
if (wolfSSL_CTX_load_verify_buffer(client_ctx, cert,
|
||||
if (wolfSSL_CTX_load_verify_buffer(client_ctx, cert,
|
||||
SIZEOF_CERT, SSL_FILETYPE_ASN1) != SSL_SUCCESS) {
|
||||
printf("ERROR: can't load certificate data\n");
|
||||
return;
|
||||
@ -187,10 +187,10 @@ static void Tls_client_init(const char* cipherlist)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* use specific cipher */
|
||||
if (cipherlist != NULL &&
|
||||
wolfSSL_CTX_set_cipher_list(client_ctx, cipherlist) !=
|
||||
if (cipherlist != NULL &&
|
||||
wolfSSL_CTX_set_cipher_list(client_ctx, cipherlist) !=
|
||||
WOLFSSL_SUCCESS) {
|
||||
wolfSSL_CTX_free(client_ctx); client_ctx = NULL;
|
||||
printf("client can't set cipher list");
|
||||
@ -220,8 +220,8 @@ static void Tls_client()
|
||||
socklen_t socksize = sizeof(struct freertos_sockaddr);
|
||||
struct freertos_sockaddr PeerAddr;
|
||||
char addrBuff[ADDR_SIZE] = {0};
|
||||
|
||||
static const char sendBuff[]= "Hello Server\n" ;
|
||||
|
||||
static const char sendBuff[]= "Hello Server\n" ;
|
||||
char rcvBuff[BUFF_SIZE] = {0};
|
||||
|
||||
|
||||
@ -285,7 +285,7 @@ static void Tls_client()
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* USE_ECC_CERT */
|
||||
#endif /* USE_ECC_CERT */
|
||||
|
||||
|
||||
#ifdef USE_ECC_CERT
|
||||
@ -313,14 +313,14 @@ static void Tls_client()
|
||||
}
|
||||
}
|
||||
#endif /* WOLFSSL_CHECK_SIG_FAULTS */
|
||||
|
||||
|
||||
#else
|
||||
|
||||
/* DER format ECC private key */
|
||||
if (ret == 0) {
|
||||
err = wolfSSL_use_PrivateKey_buffer(ssl,
|
||||
err = wolfSSL_use_PrivateKey_buffer(ssl,
|
||||
ecc_clikey_der_256,
|
||||
sizeof_ecc_clikey_der_256,
|
||||
sizeof_ecc_clikey_der_256,
|
||||
WOLFSSL_FILETYPE_ASN1);
|
||||
if (err != SSL_SUCCESS) {
|
||||
printf("ERROR wolfSSL_use_PrivateKey_buffer: %d\n",
|
||||
@ -334,7 +334,7 @@ static void Tls_client()
|
||||
#else
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
|
||||
|
||||
|
||||
/* Note: TSIP asks RSA client key pair for client authentication. */
|
||||
|
||||
/* TSIP specific RSA private key */
|
||||
@ -359,10 +359,10 @@ static void Tls_client()
|
||||
|
||||
#else
|
||||
|
||||
if (ret == 0) {
|
||||
if (ret == 0) {
|
||||
err = wolfSSL_use_PrivateKey_buffer(ssl, client_key_der_2048,
|
||||
sizeof_client_key_der_2048, WOLFSSL_FILETYPE_ASN1);
|
||||
|
||||
|
||||
if (err != SSL_SUCCESS) {
|
||||
printf("ERROR wolfSSL_use_PrivateKey_buffer: %d\n",
|
||||
wolfSSL_get_error(ssl, 0));
|
||||
@ -390,7 +390,7 @@ static void Tls_client()
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
if (wolfSSL_write(ssl, sendBuff, strlen(sendBuff)) !=
|
||||
if (wolfSSL_write(ssl, sendBuff, strlen(sendBuff)) !=
|
||||
strlen(sendBuff)) {
|
||||
printf("ERROR wolfSSL_write: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
ret = -1;
|
||||
@ -409,7 +409,7 @@ static void Tls_client()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
wolfSSL_shutdown(ssl);
|
||||
|
||||
FreeRTOS_shutdown(socket, FREERTOS_SHUT_RDWR);
|
||||
@ -499,7 +499,7 @@ static void Tls_client_demo(void)
|
||||
tsip_inform_cert_sign((const byte*)ca_ecc_cert_der_sig);
|
||||
|
||||
#else
|
||||
|
||||
|
||||
/* Root CA cert has RSA public key */
|
||||
tsip_inform_cert_sign((const byte*)ca_cert_der_sig);
|
||||
|
||||
@ -529,7 +529,7 @@ static void Tls_client_demo(void)
|
||||
#endif /* TLS_CLIENT */
|
||||
|
||||
/* Demo entry function called by iot_demo_runner
|
||||
* To run this entry function as an aws_iot_demo, define this as
|
||||
* To run this entry function as an aws_iot_demo, define this as
|
||||
* DEMO_entryFUNCTION in aws_demo_config.h.
|
||||
*/
|
||||
void wolfSSL_demo_task(bool awsIotMqttMode,
|
||||
|
@ -3,7 +3,7 @@ wolfSSL sample application project for Renesas RX72N EnvisionKit evaluation boar
|
||||
|
||||
<br>
|
||||
|
||||
A sample program for evaluating wolfSSL targeting the Renesas RX72N EnvisionKit evaluation board is provided. For details on the program, refer to the following documents included in the package.
|
||||
A sample program for evaluating wolfSSL targeting the Renesas RX72N EnvisionKit evaluation board is provided. For details on the program, refer to the following documents included in the package.
|
||||
|
||||
+ InstructionManualForExample_RX72N_EnvisonKit_JP.pdf (Japanese)
|
||||
+ InstructionManualForExample_RX72N_EnvisonKit_EN.pdf(English)
|
||||
+ InstructionManualForExample_RX72N_EnvisonKit_EN.pdf(English)
|
||||
|
@ -3,16 +3,16 @@ wolfSSL simple application project for RX72N EnvisionKit board
|
||||
## 1. Overview
|
||||
-----
|
||||
|
||||
We provide a simple program for evaluating wolfSSL targeting the RX72N evaluation board, which has RX72 MCU on it. The sample program runs in a bare metal environment that does not use a real-time OS and uses e2 studio as an IDE. This document describes the procedure from build to execution of the sample program.
|
||||
We provide a simple program for evaluating wolfSSL targeting the RX72N evaluation board, which has RX72 MCU on it. The sample program runs in a bare metal environment that does not use a real-time OS and uses e2 studio as an IDE. This document describes the procedure from build to execution of the sample program.
|
||||
|
||||
The sample provided is a single application that can evaluate the following four functions:
|
||||
|
||||
- CryptoTest: A program that automatically tests various cryptographic operation functions
|
||||
- Benchmark: A program that measures the execution speed of various cryptographic operations
|
||||
- Benchmark: A program that measures the execution speed of various cryptographic operations
|
||||
- TlsClient: A program that performs TLS communication with the opposite TLS server application
|
||||
- TlsServer: A program that performs TLS communication with the opposite TLS client application
|
||||
|
||||
Since the H/W settings and S/W settings for operating the evaluation board have already been prepared, the minimum settings are required to operate the sample application. In addition, the RootCA certificate and server-side certificate required for TLS communication have already been set for sample use only.
|
||||
Since the H/W settings and S/W settings for operating the evaluation board have already been prepared, the minimum settings are required to operate the sample application. In addition, the RootCA certificate and server-side certificate required for TLS communication have already been set for sample use only.
|
||||
|
||||
The following sections will walk you through the steps leading up to running the sample application.
|
||||
## 2. Target H/W, components and libraries
|
||||
@ -47,25 +47,25 @@ However, the FIT components themselves are not included in the distribution of t
|
||||
## 3. Importing sample application project into e2Studio
|
||||
----
|
||||
|
||||
There is no need to create a new sample program. Since the project file is already prepared, please import the project from the IDE by following the steps below.
|
||||
There is no need to create a new sample program. Since the project file is already prepared, please import the project from the IDE by following the steps below.
|
||||
|
||||
+ e2studio "File" menu> "Open project from file system ..."> "Directory (R) ..." Click the import source button and select the folder from which the project will be imported. Select the folder (Renesas/e2studio/{MCU}/{board-name-folder}/Simple) where this README file exists.
|
||||
+ Three projects that can be imported are listed, but check only the three projects "test" and "wolfssl" and click the "Finish" button.
|
||||
+ e2studio "File" menu> "Open project from file system ..."> "Directory (R) ..." Click the import source button and select the folder from which the project will be imported. Select the folder (Renesas/e2studio/{MCU}/{board-name-folder}/Simple) where this README file exists.
|
||||
+ Three projects that can be imported are listed, but check only the three projects "test" and "wolfssl" and click the "Finish" button.
|
||||
|
||||
You should see the **test** and **wolfssl** 2 projects you imported into the project explorer.
|
||||
You should see the **test** and **wolfssl** 2 projects you imported into the project explorer.
|
||||
|
||||
## 4. FIT module download and smart configurator file generation
|
||||
----
|
||||
|
||||
You will need to get the required FIT modules yourself. Follow the steps below to get them.
|
||||
|
||||
1. Open the test project in Project Explorer and double-click the **test.scfg** file to open the Smart Configurator Perspective.
|
||||
1. Open the test project in Project Explorer and double-click the **test.scfg** file to open the Smart Configurator Perspective.
|
||||
|
||||
2. Select the "Components" tab on the software component settings pane. Then click the "Add Component" button at the top right of the pane. The software component selection dialog will pop up. Click "Download the latest version of FIT driver and middleware" at the bottom of the dialog to get the modules. You can check the download destination folder by pressing "Basic settings...".
|
||||
|
||||
3. The latest version of the TSIP component may not be automatically obtained due to the delay in Renesas' support by the method in step 2 above. In that case, you can download it manually from the Renesas website. Unzip the downloaded component and store the files contained in the FIT Modules folder in the download destination folder of step 2.
|
||||
|
||||
4. Select the required FIT components shown from the list and press the "Finish" button. Repeat this operation until you have the required FIT components.
|
||||
4. Select the required FIT components shown from the list and press the "Finish" button. Repeat this operation until you have the required FIT components.
|
||||
|
||||
5. Select the Components tab on the Software Component Settings pane and select the r_t4_rx component. In the settings pane on the right, specify the IP address of this board as the value of the "# IP address for ch0, when DHCP disable." Property (e.g. 192.168.1.9).
|
||||
|
||||
@ -80,7 +80,7 @@ The test project is a single sample application, but you can specify to perform
|
||||
- Benchmark: A program that measures the execution speed of various cryptographic operations
|
||||
- TlsClient: A program that performs TLS communication with the opposite TLS server application
|
||||
- TlsServer: A program that performs TLS communication with the opposite TLS client application
|
||||
-
|
||||
-
|
||||
Open the <board-name-folder\>/test/src/wolfssl_simple_demo.h file and enable one of the following definitions:
|
||||
|
||||
- #define CRYPT_TEST
|
||||
@ -109,7 +109,7 @@ Now that the test application is ready to build.
|
||||
|
||||
5. Press the run button to run the test application.
|
||||
|
||||
6. CryptoTest, Benchmark, TLS_Client or TLS_Server After displaying the execution result according to the selected behavior, it enters an infinite loop, so if you think that the output has stopped, stop debugging.
|
||||
6. CryptoTest, Benchmark, TLS_Client or TLS_Server After displaying the execution result according to the selected behavior, it enters an infinite loop, so if you think that the output has stopped, stop debugging.
|
||||
|
||||
## 7. Running test application as Client
|
||||
-----
|
||||
@ -176,7 +176,7 @@ Client message: Hello Server
|
||||
Note `-v 4` option in server execution command line means to use TLS 1.3. If you want to use smaller version of TLS than 1.3, `-v 4` needs to be removed from an exmeple server command options.
|
||||
|
||||
### 7.3 Run Client using TSIP driver
|
||||
When it enables SIMPLE_TLS_TSIP_CLIENT, we can run TLS client including TSIP driver on the baord.
|
||||
When it enables SIMPLE_TLS_TSIP_CLIENT, we can run TLS client including TSIP driver on the baord.
|
||||
In this case, we disable `#define WOLFSSL_TLS13` and `#define USE_ECC_CERT`. As a result, TLS communication between Client and Server use TLS 1.2 and RSA certificate.
|
||||
|
||||
The table below shows the cipher suites that TSIP supports.
|
||||
@ -185,7 +185,7 @@ The table below shows the cipher suites that TSIP supports.
|
||||
|:--|:--|:--|
|
||||
|TLS1.3|RSA/ECDSA certificate| |
|
||||
|||TLS_AES_128_GCM_SHA256|
|
||||
|||TLS_AES_128_CCM_SHA256|
|
||||
|||TLS_AES_128_CCM_SHA256|
|
||||
|TLS1.2|RSA certificate|
|
||||
|||TLS_RSA_WITH_AES_128_CBC_SHA|
|
||||
|||TLS_RSA_WITH_AES_256_CBC_SHA|
|
||||
@ -213,7 +213,7 @@ $ ./examples/server/server -b -i
|
||||
```
|
||||
|
||||
|
||||
When you run the test application, it makes a TLS connection with the server application by TLS1.2, then exchanges a simple string and displays the following on the standard output.
|
||||
When you run the test application, it makes a TLS connection with the server application by TLS1.2, then exchanges a simple string and displays the following on the standard output.
|
||||
The cipher suites displayed depends on the combination of TLS version and certificate type.
|
||||
|
||||
```
|
||||
@ -285,7 +285,7 @@ If you want to use it for purposes beyond functional evaluation, you need to pre
|
||||
2. RSA key pair required for RootCA certificate validation
|
||||
3. The signature generated by the RootCA certificate with the private key in 2 above.
|
||||
|
||||
will become necessary. Please refer to the manual provided by Renesas for how to generate them.
|
||||
will become necessary. Please refer to the manual provided by Renesas for how to generate them.
|
||||
|
||||
## 10. Limitations
|
||||
----
|
||||
|
@ -212,7 +212,7 @@ TSIPドライバがサポートする暗号スイートは下記の一覧にな
|
||||
|:--|:--|:--|
|
||||
|TLS1.3|RSA/ECDSA certificate| |
|
||||
|||TLS_AES_128_GCM_SHA256|
|
||||
|||TLS_AES_128_CCM_SHA256|
|
||||
|||TLS_AES_128_CCM_SHA256|
|
||||
|TLS1.2|RSA certificate|
|
||||
|||TLS_RSA_WITH_AES_128_CBC_SHA|
|
||||
|||TLS_RSA_WITH_AES_256_CBC_SHA|
|
||||
@ -334,4 +334,4 @@ wolfSSL_CTX_use_certificate_buffer あるいはwolfSSL_CTX_use_certificate_chain
|
||||
上記制限1 ~ 4は次版以降のTSIPによって改善が見込まれています。
|
||||
|
||||
## 11. サポート
|
||||
ご質問・ご要望は、info@wolfssl.jp まで日本語でお知らせください。
|
||||
ご質問・ご要望は、info@wolfssl.jp まで日本語でお知らせください。
|
||||
|
@ -88,11 +88,11 @@ void simple_tcp_client( )
|
||||
|
||||
#define BUFF_SIZE 256
|
||||
static const char sendBuff[]= "Hello Server\n" ;
|
||||
|
||||
|
||||
char rcvBuff[BUFF_SIZE] = {0};
|
||||
|
||||
|
||||
static T_IPV4EP my_addr = { 0, 0 };
|
||||
|
||||
|
||||
T_IPV4EP dst_addr;
|
||||
|
||||
if((dst_addr.ipaddr = getIPaddr(SIMPLE_TCPSEVER_IP)) == 0){
|
||||
@ -109,7 +109,7 @@ void simple_tcp_client( )
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (my_IOSend((char*)sendBuff, strlen(sendBuff), (void*)&cepid) !=
|
||||
if (my_IOSend((char*)sendBuff, strlen(sendBuff), (void*)&cepid) !=
|
||||
strlen(sendBuff)) {
|
||||
printf("ERROR TCP write \n");
|
||||
goto out;
|
||||
@ -129,4 +129,4 @@ void simple_tcp_client( )
|
||||
tcp_cls_cep(cepid, TMO_FEVR);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -123,18 +123,18 @@ void wolfSSL_TLS_server_init()
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
ret = wolfSSL_CTX_use_PrivateKey_file(server_ctx, key, 0);
|
||||
#else
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(server_ctx, key, sizeof_key,
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(server_ctx, key, sizeof_key,
|
||||
SSL_FILETYPE_ASN1);
|
||||
#endif
|
||||
if (ret != SSL_SUCCESS) {
|
||||
printf("Error %d loading server-key!\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Register callbacks */
|
||||
wolfSSL_SetIORecv(server_ctx, my_IORecv);
|
||||
wolfSSL_SetIOSend(server_ctx, my_IOSend);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void wolfSSL_TLS_server( )
|
||||
|
@ -259,7 +259,7 @@ void main(void)
|
||||
#if defined(SIMPLE_TLS_TSIP_CLIENT)
|
||||
SetTsiptlsKey();
|
||||
#endif
|
||||
|
||||
|
||||
do {
|
||||
/* simply use TCP */
|
||||
#if defined(SIMPLE_TCP_CLIENT)
|
||||
|
@ -36,9 +36,9 @@
|
||||
/* cannot enable with other definition */
|
||||
/* simplest tcp client*/
|
||||
/*#define SIMPLE_TCP_CLIENT */
|
||||
/* software TLS client */
|
||||
/* software TLS client */
|
||||
/* #define SIMPLE_TLS_CLIENT */
|
||||
/* use TSIP Acceleration */
|
||||
/* use TSIP Acceleration */
|
||||
/*#define SIMPLE_TLS_TSIP_CLIENT*/
|
||||
|
||||
/* simplest tcp server */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user