Compare commits
4 Commits
v5.2.0-sta
...
v4.8.1-sta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
723ed009ae | ||
|
|
49ee2b71d7 | ||
|
|
21ea34282a | ||
|
|
e0292fdc94 |
58
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
58
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@@ -1,58 +0,0 @@
|
||||
name: Bug Report
|
||||
description: File a bug report
|
||||
title: "[Bug]: "
|
||||
labels: ["bug", "triage"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >
|
||||
Thanks for reporting an bug. If you would prefer a private method,
|
||||
please email support@wolfssl.com
|
||||
- type: input
|
||||
id: contact
|
||||
attributes:
|
||||
label: Contact Details
|
||||
description: How can we get in touch with you if we need more info?
|
||||
placeholder: ex. email@example.com
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: What version were you using?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: details
|
||||
attributes:
|
||||
label: Description
|
||||
description: |
|
||||
Describe the issue in detail
|
||||
Please include:
|
||||
* Specific `./configure` options or `user_settings.h`
|
||||
* Target and build environment
|
||||
placeholder: |
|
||||
Blinded by the light!
|
||||
Code runs too fast. It's gone plaid!
|
||||
...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: Reproduction steps
|
||||
description: If possible please give instructions on how to reproduce.
|
||||
placeholder: |
|
||||
1. `./configure --enable-42`
|
||||
2. `make question`
|
||||
3.
|
||||
...
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant log output
|
||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
||||
render: shell
|
||||
28
.github/ISSUE_TEMPLATE/other.yaml
vendored
28
.github/ISSUE_TEMPLATE/other.yaml
vendored
@@ -1,28 +0,0 @@
|
||||
name: General Issue
|
||||
description: Request support with an issue
|
||||
labels: ["triage"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >
|
||||
Thanks for reporting an issue. If you would prefer a private method,
|
||||
please email support@wolfssl.com
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: What version were you using?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: details
|
||||
attributes:
|
||||
label: Description
|
||||
description: |
|
||||
Describe the issue in detail.
|
||||
Please include specific configuration options or user_settings.h
|
||||
placeholder: |
|
||||
`./configure --enable-world-domination` fails
|
||||
...
|
||||
validations:
|
||||
required: true
|
||||
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,16 +0,0 @@
|
||||
# Description
|
||||
|
||||
Please describe the scope of the fix or feature addition.
|
||||
|
||||
Fixes zd#
|
||||
|
||||
# Testing
|
||||
|
||||
How did you test?
|
||||
|
||||
# Checklist
|
||||
|
||||
- [ ] added tests
|
||||
- [ ] updated/added doxygen
|
||||
- [ ] updated appropriate READMEs
|
||||
- [ ] Updated manual and documentation
|
||||
12
.github/SECURITY.md
vendored
12
.github/SECURITY.md
vendored
@@ -1,12 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you discover a vulnerability, please report it to support@wolfssl.com
|
||||
|
||||
1. Include a detailed description
|
||||
2. Include method to reproduce and/or method of discovery
|
||||
3. We will evaulate the report promptly and respond to you with findings.
|
||||
4. We will credit you with the report if you would like.
|
||||
|
||||
**Please keep the vulnerability private** until a fix has been released.
|
||||
37
.gitignore
vendored
37
.gitignore
vendored
@@ -27,7 +27,6 @@ rpm/spec
|
||||
stamp-h
|
||||
cyassl/options.h
|
||||
wolfssl/options.h
|
||||
.build_params
|
||||
libtool.m4
|
||||
aclocal.m4
|
||||
aminclude.am
|
||||
@@ -208,6 +207,14 @@ TAGS
|
||||
support/cyassl.pc
|
||||
support/wolfssl.pc
|
||||
cyassl/ctaocrypt/stamp-h1
|
||||
swig/_cyassl.so
|
||||
swig/_wolfssl.so
|
||||
swig/cyassl.py
|
||||
swig/wolfssl.py
|
||||
swig/cyassl.pyc
|
||||
swig/wolfssl.pyc
|
||||
swig/cyassl_wrap.c
|
||||
swig/wolfssl_wrap.c
|
||||
stamp-h1
|
||||
clang_output_*
|
||||
internal.plist
|
||||
@@ -227,14 +234,12 @@ IDE/MDK-ARM/LPC43xx/LPC43xx/
|
||||
!linuxkm/Makefile
|
||||
/Kbuild
|
||||
linuxkm/*.ko
|
||||
linuxkm/*.ko.signed
|
||||
linuxkm/Module.symvers
|
||||
linuxkm/built-in.a
|
||||
linuxkm/modules.order
|
||||
linuxkm/wolfcrypt
|
||||
linuxkm/libwolfssl.mod
|
||||
linuxkm/libwolfssl.mod.c
|
||||
linuxkm/libwolfssl.lds
|
||||
linuxkm/module_exports.c
|
||||
linuxkm/linuxkm/get_thread_size
|
||||
|
||||
@@ -322,10 +327,6 @@ IDE/HEXIWEAR/wolfSSL_HW/Debug
|
||||
# Linux-SGX
|
||||
IDE/LINUX-SGX/*.a
|
||||
|
||||
IDE/iotsafe/*.map
|
||||
IDE/iotsafe/*.elf
|
||||
IDE/iotsafe/*.bin
|
||||
|
||||
# Binaries
|
||||
wolfcrypt/src/port/intel/qat_test
|
||||
/mplabx/wolfssl.X/dist/default/
|
||||
@@ -355,24 +356,6 @@ IDE/XCODE/Index
|
||||
/IDE/Renesas/e2studio/Projects/test/*.launch
|
||||
/IDE/Renesas/e2studio/Projects/test/*.scfg
|
||||
|
||||
/IDE/Renesas/e2studio/RX65N/GR-ROSE/.metadata
|
||||
/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/src
|
||||
/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/trash
|
||||
/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/smc_gen
|
||||
/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/generate
|
||||
|
||||
/IDE/Renesas/e2studio/RX65N/RSK/.metadata
|
||||
/IDE/Renesas/e2studio/RX65N/RSK/smc/src
|
||||
/IDE/Renesas/e2studio/RX65N/RSK/smc/trash
|
||||
/IDE/Renesas/e2studio/RX65N/RSK/test/src/smc_gen
|
||||
/IDE/Renesas/e2studio/RX65N/RSK/test/generate
|
||||
|
||||
/IDE/Renesas/e2studio/RX72N/EnvisionKit/.metadata
|
||||
/IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/src
|
||||
/IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/trash
|
||||
/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/smc_gen
|
||||
/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/generate
|
||||
|
||||
# QNX CAAM
|
||||
/IDE/QNX/example-server/server-tls
|
||||
/IDE/QNX/example-client/client-tls
|
||||
@@ -386,7 +369,3 @@ IDE/XCODE/Index
|
||||
CMakeFiles/
|
||||
CMakeCache.txt
|
||||
cmake_install.cmake
|
||||
|
||||
# GDB Settings
|
||||
\.gdbinit
|
||||
|
||||
|
||||
913
CMakeLists.txt
913
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
465
ChangeLog.md
465
ChangeLog.md
@@ -1,470 +1,15 @@
|
||||
# wolfSSL Release 5.2.0 (Feb 21, 2022)
|
||||
|
||||
## Vulnerabilities
|
||||
|
||||
* \[High\] A TLS v1.3 server who requires mutual authentication can be
|
||||
bypassed. If a malicious client does not send the certificate_verify
|
||||
message a client can connect without presenting a certificate even
|
||||
if the server requires one. Thank you to Aina Toky Rasoamanana and
|
||||
Olivier Levillain of Télécom SudParis.
|
||||
* \[High\] A TLS v1.3 client attempting to authenticate a TLS v1.3
|
||||
server can have its certificate check bypassed. If the sig_algo in
|
||||
the certificate_verify message is different than the certificate
|
||||
message checking may be bypassed. Thank you to Aina Toky Rasoamanana and
|
||||
Olivier Levillain of Télécom SudParis.
|
||||
|
||||
## New Feature Additions
|
||||
|
||||
* Example applications for Renesas RX72N with FreeRTOS+IoT
|
||||
* Renesas FSP 3.5.0 support for RA6M3
|
||||
* For TLS 1.3, improved checks on order of received messages.
|
||||
* Support for use of SHA-3 cryptography instructions available in
|
||||
ARMv8.2-A architecture extensions. (For Apple M1)
|
||||
* Support for use of SHA-512 cryptography instructions available in
|
||||
ARMv8.2-A architecture extensions. (For Apple M1)
|
||||
* Fixes for clang -Os on clang >= 12.0.0
|
||||
* Expose Sequence Numbers so that Linux TLS (kTLS) can be configured
|
||||
* Fix bug in TLSX_ALPN_ParseAndSet when using ALPN select callback.
|
||||
* Allow DES3 with FIPS v5-dev.
|
||||
* Include HMAC for deterministic ECC sign build
|
||||
* Add --enable-chrony configure option. This sets build options needed
|
||||
to build the Chrony NTP (Network Time Protocol) service.
|
||||
* Add support for STM32U575xx boards.
|
||||
* Fixes for NXP’s SE050 Ed25519/Curve25519.
|
||||
* TLS: Secure renegotiation info on by default for compatibility.
|
||||
* Inline C code version of ARM32 assembly for cryptographic algorithms
|
||||
available and compiling for improved performance on ARM platforms
|
||||
* Configure HMAC: define NO_HMAC to disable HMAC (default: enabled)
|
||||
* ISO-TP transport layer support added to wolfio for TLS over CAN Bus
|
||||
* Fix initialization bug in SiLabs AES support
|
||||
* Domain and IP check is only performed on leaf certificates
|
||||
|
||||
## ARM PSA Support (Platform Security Architecture) API
|
||||
|
||||
* Initial support added for ARM’s Platform Security Architecture (PSA)
|
||||
API in wolfCrypt which allows support of ARM PSA enabled devices by
|
||||
wolfSSL, wolfSSH, and wolfBoot and wolfCrypt FIPS.
|
||||
* Included algorithms: ECDSA, ECDH, HKDF, AES, SHA1, SHA256, SHA224, RNG
|
||||
|
||||
## ECICE Updates
|
||||
|
||||
* Support for more encryption algorithms: AES-256-CBC, AES-128-CTR,
|
||||
AES-256-CTR
|
||||
* Support for compressed public keys in messages.
|
||||
|
||||
## Math Improvements
|
||||
|
||||
* Improved performance of X448 and Ed448 through inlining Karatsuba in
|
||||
square and multiplication operations for 128-bit implementation
|
||||
(64-bit platforms with 128-bit type support).
|
||||
* SP Math C implementation: fix for corner case in curve specific
|
||||
implementations of Montgomery Reduction (P-256, P-384).
|
||||
* SP math all: assembly snippets added for ARM Thumb. Performance
|
||||
improvement on platform.
|
||||
* SP math all: ARM64/32 sp_div_word assembly snippets added to remove
|
||||
dependency on __udiv3.
|
||||
* SP C implementation: multiplication of two signed types with overflow
|
||||
is undefined in C. Now cast to unsigned type before multiplication is
|
||||
performed.
|
||||
* SP C implementation correctly builds when using CFLAG: -m32
|
||||
|
||||
## OpenSSL Compatibility Layer
|
||||
|
||||
* Added DH_get_2048_256 to compatibility layer.
|
||||
* wolfSSLeay_version now returns the version of wolfSSL
|
||||
* Added C++ exports for API’s in wolfssl/openssl/crypto.h. This allows
|
||||
better compatibility when building with a C++ compiler.
|
||||
* Fix for OpenSSL x509_NAME_hash mismatch
|
||||
* Implement FIPS_mode and FIPS_mode_set in the compat layer.
|
||||
* Fix for certreq and certgen options with openssl compatibility
|
||||
* wolfSSL_BIO_dump() and wolfSSL_OBJ_obj2txt() rework
|
||||
* Fix IV length bug in EVP AES-GCM code.
|
||||
* Add new ASN1_INTEGER compatibility functions.
|
||||
* Fix wolfSSL_PEM_X509_INFO_read with NO_FILESYSTEM
|
||||
|
||||
## CMake Updates
|
||||
|
||||
* Check for valid override values.
|
||||
* Add `KEYGEN` option.
|
||||
* Cleanup help messages.
|
||||
* Add options to support wolfTPM.
|
||||
|
||||
## VisualStudio Updates
|
||||
|
||||
* Remove deprecated VS solution
|
||||
* Fix VS unreachable code warning
|
||||
|
||||
## New Algorithms and Protocols
|
||||
|
||||
* AES-SIV (RFC 5297)
|
||||
* DTLS SRTP (RFC 5764), used with WebRTC to agree on profile for new
|
||||
real-time session keys
|
||||
* SipHash MAC/PRF for hash tables. Includes inline assembly for
|
||||
x86_64 and Aarch64.
|
||||
|
||||
## Remove Obsolete Algorithms
|
||||
|
||||
* IDEA
|
||||
* Rabbit
|
||||
* HC-128
|
||||
|
||||
|
||||
# wolfSSL Release 5.1.1 (Jan 3rd, 2022)
|
||||
Release 5.1.1 of wolfSSL embedded TLS has a high vulnerability fix:
|
||||
|
||||
### Vulnerabilities
|
||||
* \[High\] In connections using AES-CBC or DES3 with TLS/DTLS 1.2 or 1.1 the IV being used is not random. Users using wolfSSL version 5.0.0 or 5.1.0 doing TLS/DTLS 1.2 or 1.1 connections, without AEAD only, should update the version of wolfSSL used. (CVE-2022-23408)
|
||||
|
||||
# wolfSSL Release 5.1.0 (Dec 27, 2021)
|
||||
Release 5.1.0 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
|
||||
### Vulnerabilities
|
||||
* \[Low\] Potential for DoS attack on a wolfSSL client due to processing hello packets of the incorrect side. This affects only connections using TLS v1.2 or less that have also been compromised by a man in the middle attack. Thanks to James Henderson, Mathy Vanhoef, Chris M. Stone, Sam L. Thomas, Nicolas Bailleut, and Tom Chothia (University of Birmingham, KU Leuven, ENS Rennes for the report.
|
||||
* \[Low\] Client side session resumption issue once the session resumption cache has been filled up. The hijacking of a session resumption has been demonstrated so far with only non verified peer connections. That is where the client is not verifying the server’s CA that it is connecting to. There is the potential though for other cases involving proxies that are verifying the server to be at risk, if using wolfSSL in a case involving proxies use wolfSSL_get1_session and then wolfSSL_SESSION_free when done where possible. If not adding in the session get/free function calls we recommend that users of wolfSSL that are resuming sessions update to the latest version (wolfSSL version 5.1.0 or later). Thanks to the UK's National Cyber Security Centre (NCSC) for the report.
|
||||
|
||||
### New Feature Additions
|
||||
###### Ports
|
||||
* Curve25519 support with NXP SE050 added
|
||||
* Renesas RA6M4 support with SCE Protected Mode and FSP 3.5.0
|
||||
* Renesas TSIP 1.14 support for RX65N/RX72N
|
||||
|
||||
###### Post Quantum
|
||||
* Post quantum resistant algorithms used with Apache port
|
||||
* NIST round 3 FALCON Signature Scheme support added to TLS 1.3 connections
|
||||
* FALCON added to the benchmarking application
|
||||
* Testing of cURL with wolfSSL post quantum resistant build
|
||||
|
||||
###### Compatibility Layer Additions
|
||||
* Updated NGINX port to NGINX version 1.21.4
|
||||
* Updated Apache port to Apache version 2.4.51
|
||||
* Add support for SSL_OP_NO_TLSv1_2 flag with wolfSSL_CTX_set_options function
|
||||
* Support added for the functions
|
||||
- SSL_CTX_get_max_early_data
|
||||
- SSL_CTX_set_max_early_data
|
||||
- SSL_set_max_early_data
|
||||
- SSL_get_max_early_data
|
||||
- SSL_CTX_clear_mode
|
||||
- SSL_CONF_cmd_value_type
|
||||
- SSL_read_early_data
|
||||
- SSL_write_early_data
|
||||
|
||||
###### Misc.
|
||||
* Crypto callback support for AES-CCM added. A callback function can be registered and used instead of the default AES-CCM implementation in wolfSSL.
|
||||
* Added AES-OFB to the FIPS boundary for future FIPS validations.
|
||||
* Add support for custom OIDs used with CSR (certificate signing request) generation using the macro WOLFSSL_CUSTOM_OID
|
||||
* Added HKDF extract callback function for use with TLS 1.3
|
||||
* Add variant from RFC6979 of deterministic ECC signing that can be enabled using the macro WOLFSSL_ECDSA_DETERMINISTIC_K_VARIANT
|
||||
* Added the function wc_GetPubKeyDerFromCert to get the public key from a DecodedCert structure
|
||||
* Added the functions wc_InitDecodedCert, wc_ParseCert and wc_FreeDecodedCert for access to decoding a certificate into a DecodedCert structure
|
||||
* Added the macro WOLFSSL_ECC_NO_SMALL_STACK for hybrid builds where the numerous malloc/free with ECC is undesired but small stack use is desired throughout the rest of the library
|
||||
* Added the function wc_d2i_PKCS12_fp for reading a PKCS12 file and parsing it
|
||||
|
||||
### Fixes
|
||||
###### 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
|
||||
* 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
|
||||
* Check return values on TFM library montgomery function in case the system runs out of memory. This resolves an edge case of invalid ECC signatures being created.
|
||||
* SP math library sanity check on size of values passed to sp_gcd.
|
||||
* SP math library sanity check on exponentiation by 0 with mod_exp
|
||||
* Update base ECC mp_sqrtmod_prime function to handle an edge case of zero
|
||||
* TFM math library with Intel MULX multiply fix for carry in assembly code
|
||||
|
||||
###### Misc.
|
||||
* Fix for potential heap buffer overflow with compatibility layer PEM parsing
|
||||
* Fix for edge memory leak case with an error encountered during TLS resumption
|
||||
* Fix for length on inner sequence created with wc_DhKeyToDer when handling small DH keys
|
||||
* Fix for sanity check on input argument to DSA sign and verify
|
||||
* Fix for setting of the return value with ASN1 integer get on an i386 device
|
||||
* Fix for BER to DER size checks with PKCS7 decryption
|
||||
* Fix for memory leak with PrintPubKeyEC function in compatibility layer
|
||||
* Edge case with deterministic ECC key generation when the private key has leading 0’s
|
||||
* Fix for build with OPENSSL_EXTRA and NO_WOLFSSL_STUB both defined
|
||||
* Use page aligned memory with ECDSA signing and KCAPI
|
||||
* Skip expired sessions for TLS 1.3 rather than turning off the resume behavior
|
||||
* Fix for DTLS handling dropped or retransmitted messages
|
||||
|
||||
### Improvements/Optimizations
|
||||
###### Build Options and Warnings
|
||||
* Bugfix: could not build with liboqs and without DH enabled
|
||||
* Build with macro NO_ECC_KEY_EXPORT fixed
|
||||
* Fix for building with the macro HAVE_ENCRYPT_THEN_MAC when session export is enabled
|
||||
* Building with wolfSentry and HAVE_EX_DATA macro set
|
||||
|
||||
###### Math Libraries
|
||||
* Improvement for performance with SP C implementation of montgomery reduction for ECC (P256 and P384) and SP ARM64 implementation for ECC (P384)
|
||||
* With SP math handle case of dividing by length of dividend
|
||||
* SP math improvement for lo/hi register names to be used with older GCC compilers
|
||||
|
||||
###### Misc.
|
||||
* ASN name constraints checking code refactor for better efficiency and readability
|
||||
* Refactor of compatibility layer stack free’ing calls to simplify and reduce code
|
||||
* Scrubbed code for trailing spaces, hard tabs, and any control characters
|
||||
* Explicit check that leaf certificate's public key type match cipher suite signature algorithm
|
||||
* Additional NULL sanity checks on WOLFSSL struct internally and improve switch statement fallthrough
|
||||
* Retain OCSP error value when CRL is enabled with certificate parsing
|
||||
* Update to NATIVE LwIP support for TCP use
|
||||
* Sanity check on PEM size when parsing a PEM with OpenSSL compatibility layer API.
|
||||
* SWIG wrapper was removed from the codebase in favor of dedicated Java and Python wrappers.
|
||||
* Updates to bundled example client for when to load the CA, handling print out of IP alt names, and printing out the peers certificate in PEM format
|
||||
* Handling BER encoded inner content type with PKCS7 verify
|
||||
* Checking for SOCKET_EPIPE errors from low level socket
|
||||
* Improvements to cleanup in the case that wolfSSL_Init fails
|
||||
* Update test and example certificates expiration dates
|
||||
|
||||
|
||||
# wolfSSL Release 5.0.0 (Nov 01, 2021)
|
||||
Release 5.0.0 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
|
||||
### Vulnerabilities
|
||||
* [\Low\] Hang with DSA signature creation when a specific q value is used in a maliciously crafted key. If a DSA key with an invalid q value of either 1 or 0 was decoded and used for creating a signature, it would result in a hang in wolfSSL. Users that are creating signatures with DSA and are using keys supplied from an outside source are affected.
|
||||
* [\Low\] Issue with incorrectly validating a certificate that has multiple subject alternative names when given a name constraint. In the case where more than one subject alternative name is used in the certificate, previous versions of wolfSSL could incorrectly validate the certificate. Users verifying certificates with multiple alternative names and name constraints, are recommended to either use the certificate verify callback to check for this case or update the version of wolfSSL used. Thanks to Luiz Angelo Daros de Luca for the report.
|
||||
|
||||
### New Feature Additions
|
||||
###### New Product
|
||||
* FIPS 140-3 -- currently undergoing laboratory testing, code review and ultimately CMVP validation. Targeting the latest FIPS standard.
|
||||
|
||||
###### Ports
|
||||
* IoT-Safe with TLS demo
|
||||
* SE050 port with support for RNG, SHA, AES, ECC (sign/verify/shared secret) and ED25519
|
||||
* Support for Renesas TSIP v1.13 on RX72N
|
||||
|
||||
###### Post Quantum
|
||||
* Support for OQS's (liboqs version 0.7.0) implementation of NIST Round 3 KEMs as TLS 1.3 groups --with-liboqs
|
||||
* Hybridizing NIST ECC groups with the OQS groups
|
||||
* Remove legacy NTRU and QSH
|
||||
* Make quantum-safe groups available to the compatibility layer
|
||||
|
||||
###### Linux Kernel Module
|
||||
* Full support for FIPS 140-3, with in-kernel power on self test (POST) and conditional algorithm self test(s) (CAST)
|
||||
* --enable-linuxkm-pie -- position-independent in-kernel wolfCrypt container, for FIPS
|
||||
* Vectorized x86 acceleration in PK algs (RSA, ECC, DH, DSA) and AES/AES-GCM
|
||||
* Vectorized x86 acceleration in interrupt handlers
|
||||
* Support for Linux-native module signatures
|
||||
* Complete SSL/TLS and Crypto API callable from other kernel module(s)
|
||||
* Support for LTS kernel lines: 3.16, 4.4, 4.9, 5.4, 5.10
|
||||
|
||||
###### Compatibility Layer Additions
|
||||
* Ports
|
||||
- Add support for libssh2
|
||||
- Add support for pyOpenSSL
|
||||
- Add support for libimobiledevice
|
||||
- Add support for rsyslog
|
||||
- Add support for OpenSSH 8.5p1
|
||||
- Add support for Python 3.8.5
|
||||
* API/Structs Added
|
||||
- ERR_lib_error_string
|
||||
- EVP_blake2
|
||||
- wolfSSL_set_client_CA_list
|
||||
- wolfSSL_EVP_sha512_224
|
||||
- wolfSSL_EVP_sha512_256
|
||||
- wc_Sha512_224/2256Hash
|
||||
- wc_Sha512_224/256Hash
|
||||
- wc_InitSha512_224/256
|
||||
- wc_InitSha512_224/256_ex
|
||||
- wc_Sha512_224/256Update
|
||||
- wc_Sha512_224/256FinalRaw
|
||||
- wc_Sha512_224/256Final
|
||||
- wc_Sha512_224/256Free
|
||||
- wc_Sha512_224/256GetHash
|
||||
- wc_Sha512_224/256Copy
|
||||
- wc_Sha512_224/256SetFlags
|
||||
- wc_Sha512_224/256GetFlags
|
||||
- wc_Sha512_224/256Transform
|
||||
- EVP_MD_do_all and OBJ_NAME_do_all
|
||||
- EVP_shake128
|
||||
- EVP_shake256
|
||||
- SSL_CTX_set_num_tickets
|
||||
- SSL_CTX_get_num_tickets
|
||||
- SSL_CIPHER_get_auth_nid
|
||||
- SSL_CIPHER_get_cipher_nid
|
||||
- SSL_CIPHER_get_digest_nid
|
||||
- SSL_CIPHER_get_kx_nid
|
||||
- SSL_CIPHER_is_aead
|
||||
- SSL_CTX_set_msg_callback
|
||||
- a2i_IPADDRESS
|
||||
- GENERAL_NAME_print
|
||||
- X509_VERIFY_PARAM_set1_ip
|
||||
- EVP_CIPHER_CTX_set_iv_length
|
||||
- PEM_read_bio_RSA_PUBKEY
|
||||
- i2t_ASN1_OBJECT
|
||||
- DH_set_length
|
||||
- Set_tlsext_max_fragment_length
|
||||
- AUTHORITY_iNFO_ACCESS_free
|
||||
- EVP_PBE_scrypt
|
||||
- ASN1_R_HEADER_TOO_LONG
|
||||
- ERR_LIB
|
||||
- X509_get_default_cert_file/file_env/dir/dir_env() stubs
|
||||
- SSL_get_read_ahead/SSL_set_read_ahead()
|
||||
- SSL_SESSION_has_ticket()
|
||||
- SSL_SESSION_get_ticket_lifetime_hint()
|
||||
- DIST_POINT_new
|
||||
- DIST_POINT_free
|
||||
- DIST_POINTS_free
|
||||
- CRL_DIST_POINTS_free
|
||||
- sk_DIST_POINT_push
|
||||
- sk_DIST_POINT_value
|
||||
- sk_DIST_POINT_num
|
||||
- sk_DIST_POINT_pop_free
|
||||
- sk_DIST_POINT_free
|
||||
- X509_get_extension_flags
|
||||
- X509_get_key_usage
|
||||
- X509_get_extended_key_usage
|
||||
- ASN1_TIME_to_tm
|
||||
- ASN1_TIME_diff
|
||||
- PEM_read_X509_REQ
|
||||
- ERR_load_ERR_strings
|
||||
- BIO_ssl_shutdown
|
||||
- BIO_get_ssl
|
||||
- BIO_new_ssl_connect
|
||||
- BIO_set_conn_hostname
|
||||
- NID_pkcs9_contentType
|
||||
|
||||
###### Misc.
|
||||
* KCAPI: add support for using libkcapi for crypto (Linux Kernel)
|
||||
* Configure option for --with-max-rsa-bits= and --with-max-ecc-bits=
|
||||
* SP ARM Thumb support for Keil and performance improvements
|
||||
* Add support for WOLFSSL_VERIFY_POST_HANDSHAKE verify mode
|
||||
* PKCS #11: support static linking with PKCS #11 library --enable-pkcs11=static LIBS=-l
|
||||
* Add build option --enable-wolfclu for use with wolfCLU product
|
||||
* Add support for X9.42 header i.e “BEGIN X9.42 DH PARAMETERS”
|
||||
* Add --enable-altcertchains for configuring wolfSSL with alternate certificate chains feature enabled
|
||||
* Add public API wc_RsaKeyToPublicDer_ex to allow getting RSA public key without ASN.1 header (can return only seq + n + e)
|
||||
* Add SNI and TLSx options to CMake build
|
||||
|
||||
### Fixes
|
||||
###### PORT Fixes
|
||||
* Add return value checking for FREESCALE_RNGA
|
||||
* Fix MMCAU_SHA256 type warnings
|
||||
* Fixes for building with Microchip XC32 and ATECC
|
||||
|
||||
###### Math Library Fixes
|
||||
* TFM check that the modulus length is valid for fixed data array size
|
||||
* TFM fp_submod_ct fix check for greater
|
||||
* Check return value of mp_grow in mp_mod_2d
|
||||
* Fix for ECC point multiply to error out on large multipliers
|
||||
* SP ECC error on multiplier larger than curve order
|
||||
|
||||
###### TLS 1.3
|
||||
* TLS1.3 sanity check for cases where a private key is larger than the configured maximum
|
||||
* Fix early data max size handling in TLS v1.3
|
||||
* Fixes for PK callbacks with TLS v1.3
|
||||
* Check min downgrade when no extensions are sent with the ServerHello
|
||||
|
||||
###### Misc.
|
||||
* Previously wolfSSL enum values were used as NID’s. Now only the compatibility layer NID enums are the NID values:
|
||||
- CTC_SHAwDSA -> NID_dsaWithSHA1
|
||||
- CTC_SHA256wDSA -> NID_dsa_with_SHA256
|
||||
- CTC_MD2wRSA -> NID_md2WithRSAEncryption
|
||||
- CTC_MD5wRSA -> NID_md5WithRSAEncryption
|
||||
- CTC_SHAwRSA -> NID_sha1WithRSAEncryption
|
||||
- CTC_SHA224wRSA -> NID_sha224WithRSAEncryption
|
||||
- CTC_SHA256wRSA -> NID_sha256WithRSAEncryption
|
||||
- CTC_SHA384wRSA -> NID_sha384WithRSAEncryption
|
||||
- CTC_SHA512wRSA -> NID_sha512WithRSAEncryption
|
||||
- CTC_SHA3_224wRSA -> NID_RSA_SHA3_224
|
||||
- CTC_SHA3_256wRSA -> NID_RSA_SHA3_256
|
||||
- CTC_SHA3_384wRSA -> NID_RSA_SHA3_384
|
||||
- CTC_SHA3_512wRSA -> NID_RSA_SHA3_512
|
||||
- CTC_SHAwECDSA -> NID_ecdsa_with_SHA1
|
||||
- CTC_SHA224wECDSA -> NID_ecdsa_with_SHA224
|
||||
- CTC_SHA256wECDSA -> NID_ecdsa_with_SHA256
|
||||
- CTC_SHA384wECDSA -> NID_ecdsa_with_SHA384
|
||||
- CTC_SHA512wECDSA -> NID_ecdsa_with_SHA512
|
||||
- CTC_SHA3_224wECDSA -> NID_ecdsa_with_SHA3_224
|
||||
- CTC_SHA3_256wECDSA -> NID_ecdsa_with_SHA3_256
|
||||
- CTC_SHA3_384wECDSA -> NID_ecdsa_with_SHA3_384
|
||||
- CTC_SHA3_512wECDSA -> NID_ecdsa_with_SHA3_512
|
||||
- DSAk -> NID_dsa
|
||||
- RSAk -> NID_rsaEncryption
|
||||
- ECDSAk -> NID_X9_62_id_ecPublicKey
|
||||
- BASIC_CA_OID -> NID_basic_constraints
|
||||
- ALT_NAMES_OID -> NID_subject_alt_name
|
||||
- CRL_DIST_OID -> NID_crl_distribution_points
|
||||
- AUTH_INFO_OID -> NID_info_access
|
||||
- AUTH_KEY_OID -> NID_authority_key_identifier
|
||||
- SUBJ_KEY_OID -> NID_subject_key_identifier
|
||||
- INHIBIT_ANY_OID -> NID_inhibit_any_policy
|
||||
* Fix for DES IV size used with FIPSv2
|
||||
* Fix signed comparison issue with serialSz
|
||||
* Fix missing CBIOSend and properly guard hmac in DupSSL()
|
||||
* Fix calculation of length of encoding in ssl.c
|
||||
* Fix encoding to check proper length in asn.c
|
||||
* Fix for wc_ecc_ctx_free and heap hint
|
||||
* Fix for debug messages with AF_ALG build
|
||||
* Fix for static memory with bucket size matching.
|
||||
* Fixes for SRP with heap hint.
|
||||
* Fixes for CAAM build macros and spelling for Keil build
|
||||
* Sniffer fix for possible math issue around 64-bit pointer and 32-bit unsigned int
|
||||
* Fix for sniffer TCP sequence rollover
|
||||
* wolfSSL_PEM_write_bio_PUBKEY to write only the public part
|
||||
* Fix for sending only supported groups in TLS extension
|
||||
* Fix for sniffer to better handle spurious retransmission edge case
|
||||
* SSL_set_alpn_protos and SSL_CTX_set_alpn_protos now returns 0 on successFixes issue with SSL_CTX_set1_curves_list and SSL_set1_curves_list not checking the last character of the names variable provided, non-0 on failure to better match expected return values
|
||||
* Fixes and improvements for crypto callbacks with TLS (mutual auth)
|
||||
* Fix for bad memory_mutex lock on static memory cleanup
|
||||
* Zero terminate name constraints strings when parsing certificates
|
||||
* Fix for verifying a certificate when multiple permitted name constraints are used
|
||||
* Fix typo in ifdef for HAVE_ED448
|
||||
* Fix typos in comments in SHA512
|
||||
* Add sanity check on buffer size with ED25519 key decode
|
||||
* Sanity check on PKCS7 stream amount read
|
||||
* PKCS7 fix for double free on error case and sanity check on set serial number
|
||||
* Sanity check on PKCS7 input size wc_PKCS7_ParseSignerInfo
|
||||
* Forgive a DTLS session trying to send too much at once
|
||||
|
||||
### Improvements/Optimizations
|
||||
###### Build Options and Warnings
|
||||
* Rework of RC4 disable by default and depreciation
|
||||
* wolfSSL as a Zephyr module (without setup.sh)
|
||||
* Add include config.h to bio.c
|
||||
* Support for PKCS7 without AES CBC.
|
||||
* Fixes for building without AES CBC
|
||||
* Added WOLFSSL_DH_EXTRA to --enable-all and --enable-sniffer
|
||||
* Add a CMake option to build wolfcrypt test and bench code as libraries
|
||||
* GCC makefile: allow overriding and provide more flexibility
|
||||
|
||||
###### Math Libraries
|
||||
* Improve performance of fp_submod_ct() and fp_addmod_ct()
|
||||
* Improve performance of sp_submod_ct() and sp_addmod_ct()
|
||||
* SP int, handle even modulus with exponentiation
|
||||
|
||||
###### Misc.
|
||||
* Cleanups for Arduino examples and memory documentation
|
||||
* Refactor hex char to byte conversions
|
||||
* Added GCC-ARM TLS server example
|
||||
* Improvements to session locking to allow per-row
|
||||
* Improved sniffer statistics and documentation
|
||||
* EVP key support for heap hint and crypto callbacks
|
||||
* Reduced stack size for dh_generation_test and Curve ASN functions
|
||||
* Espressif README Syntax / keyword highlighting / clarifications
|
||||
* AARCH64 SHA512: implementation using crypto instructions added
|
||||
* wc_RsaPSS_CheckPadding_ex2 added for use with HEAP hint
|
||||
* wc_AesKeyWrap_ex and wc_AesKeyUnWrap_ex bound checks on input and output sizes
|
||||
* Add additional error handling to wolfSSL_BIO_get_len
|
||||
* Add code to use popen and the command 'host', useful with qemu
|
||||
* Adjustment to subject alt names order with compatibility layer to better match expected order
|
||||
* Reduce BIO compatibility layer verbosity
|
||||
* Set a default upper bound on error queue size with compatibility layer
|
||||
* WOLFSSL_CRL_ALLOW_MISSING_CDP macro for Skip CRL verification in case no CDP in peer cert
|
||||
* Fixes for scan-build LLVM-13 and expanded coverage
|
||||
* Increase the default DTLS_MTU_ADDITIONAL_READ_BUFFER and make it adjustable
|
||||
|
||||
# wolfSSL Release 4.8.1 (July 16, 2021)
|
||||
Release 4.8.1 of wolfSSL embedded TLS has an OCSP vulnerability fix:
|
||||
|
||||
### Vulnerabilities
|
||||
* [High] OCSP verification issue when response is for a certificate with no relation to the chain in question BUT that response contains the NoCheck extension which effectively disables ALL verification of that one cert. Users who should upgrade to 4.8.1 are TLS client users doing OCSP, TLS server users doing mutual auth with OCSP, and CertManager users doing OCSP independent of TLS. Thanks to Jan Nauber, Marco Smeets, Werner Rueschenbaum and Alissa Kim of Volkswagen Infotainment for the report.
|
||||
* [High] OCSP verification issue when response is for a certificate with no relation to the chain in question BUT that response contains the NoCheck extension which effectively disables ALL verification of that one cert. Users who should upgrade to 4.8.1 are TLS client users doing OCSP, TLS server users doing mutual auth with OCSP, and CertManager users doing OCSP independent of TLS. Thanks to Jan Nauber, Marco Smeets, Werner Rueschenbaum and Alissa Kim for the report.
|
||||
|
||||
|
||||
# wolfSSL Release 4.8.0 (July 09, 2021)
|
||||
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] 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, Roee, Barak, Hila and Shoshi (from Cymotive 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.
|
||||
|
||||
### New Feature Additions
|
||||
@@ -534,7 +79,7 @@ Release 4.8.0 of wolfSSL embedded TLS has bug fixes and new features including:
|
||||
* Added wolfSSL_CTX_get_TicketEncCtx getter function to return the ticket encryption ctx value
|
||||
* Added wc_AesKeyWrap_ex and wc_AesKeyUnWrap_ex APIs to accept an Aes object to use for the AES operations
|
||||
* Added implementation of AES-GCM streaming (--enable-aesgcm-stream)
|
||||
* Added deterministic generation of k with ECC following RFC6979 when the macro WOLFSSL_ECDSA_DETERMINISTIC_K is defined and wc_ecc_set_deterministic function is called
|
||||
* Added deterministic generation of k with ECC following RFC6979 when the macro WOLFSL_ECDSA_DETERMINISTIC_K is defined and wc_ecc_set_deterministic function is called
|
||||
* Implemented wc_DsaParamsDecode and wc_DsaKeyToParamsDer
|
||||
* Asynchronous support for TLS v1.3 TLSX ECC/DH key generation and key agreement
|
||||
* Added crypto callback support for Ed/Curve25519 and SHA2-512/384
|
||||
@@ -2330,9 +1875,9 @@ More info can be found on-line at //http://wolfssl.com/yaSSL/Docs.html
|
||||
|
||||
- No filesystem build fixes for various configurations
|
||||
- Certificate generation now supports several extensions including KeyUsage,
|
||||
SKID, AKID, and Certificate Policies
|
||||
SKID, AKID, and Ceritifcate Policies
|
||||
- CRLs can be loaded from buffers as well as files now
|
||||
- SHA-512 Certificate Signing generation
|
||||
- SHA-512 Ceritifcate Signing generation
|
||||
- Fixes for sniffer reassembly processing
|
||||
|
||||
See INSTALL file for build instructions.
|
||||
|
||||
@@ -17,8 +17,8 @@ Step 2: Copy the directory wolfSSL that was just created to:
|
||||
|
||||
Step 3: Edit `<arduino-libraries>/wolfSSL/user_settings.h`
|
||||
If building for Intel Galileo platform add: `#define INTEL_GALILEO`.
|
||||
Add any other custom settings, for a good start see the examples in wolfssl root
|
||||
"/examples/configs/user_settings_*.h"
|
||||
Add any other custom settings, for a good start see the below in wolfssl root.
|
||||
(See wolfssl/IDE/ROWLEY-CROSSWORKS-ARM/user_settings.h)
|
||||
|
||||
Step 4: If you experience any issues with custom user_settings.h see the wolfssl
|
||||
porting guide here for more assistance: https://www.wolfssl.com/docs/porting-guide/
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <Ethernet.h>
|
||||
|
||||
const char host[] = "192.168.1.148"; /* server to connect to */
|
||||
const int port = 11111; /* port on server to connect to */
|
||||
const char host[] = "192.168.1.148"; // server to connect to
|
||||
const int port = 11111; // port on server to connect to
|
||||
|
||||
int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx);
|
||||
int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx);
|
||||
@@ -51,7 +51,7 @@ void setup() {
|
||||
Serial.println("unable to get ctx");
|
||||
return;
|
||||
}
|
||||
/* initialize wolfSSL using callback functions */
|
||||
// initialize wolfSSL using callback functions
|
||||
wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
|
||||
wolfSSL_SetIOSend(ctx, EthernetSend);
|
||||
wolfSSL_SetIORecv(ctx, EthernetReceive);
|
||||
@@ -119,10 +119,7 @@ void loop() {
|
||||
if ((wolfSSL_write(ssl, msg, msgSz)) == msgSz) {
|
||||
|
||||
Serial.print("Server response: ");
|
||||
/* wait for data */
|
||||
while (!client.available()) {}
|
||||
/* read data */
|
||||
while (wolfSSL_pending(ssl)) {
|
||||
while (client.available() || wolfSSL_pending(ssl)) {
|
||||
input = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
|
||||
total_input += input;
|
||||
if (input < 0) {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#error Please undefine NO_WOLFSSL_SERVER for this example
|
||||
#endif
|
||||
|
||||
const int port = 11111; /* port to listen on */
|
||||
const int port = 11111; // port to listen on
|
||||
|
||||
int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx);
|
||||
int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx);
|
||||
@@ -59,12 +59,12 @@ void setup() {
|
||||
return;
|
||||
}
|
||||
|
||||
/* initialize wolfSSL using callback functions */
|
||||
// initialize wolfSSL using callback functions
|
||||
wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
|
||||
wolfSSL_SetIOSend(ctx, EthernetSend);
|
||||
wolfSSL_SetIORecv(ctx, EthernetReceive);
|
||||
|
||||
/* setup the private key and certificate */
|
||||
// setup the private key and certificate
|
||||
err = wolfSSL_CTX_use_PrivateKey_buffer(ctx, ecc_key_der_256,
|
||||
sizeof_ecc_key_der_256, WOLFSSL_FILETYPE_ASN1);
|
||||
if (err != WOLFSSL_SUCCESS) {
|
||||
@@ -78,7 +78,7 @@ void setup() {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Start the server */
|
||||
// Start the server
|
||||
server.begin();
|
||||
|
||||
return;
|
||||
@@ -110,7 +110,7 @@ void loop() {
|
||||
int replySz = 0;
|
||||
const char* cipherName;
|
||||
|
||||
/* Listen for incoming client requests. */
|
||||
// Listen for incoming client requests.
|
||||
client = server.available();
|
||||
if (!client) {
|
||||
return;
|
||||
@@ -142,10 +142,7 @@ void loop() {
|
||||
Serial.println(cipherName);
|
||||
|
||||
Serial.print("Server Read: ");
|
||||
/* wait for data */
|
||||
while (!client.available()) {}
|
||||
/* read data */
|
||||
while (wolfSSL_pending(ssl)) {
|
||||
while (client.available() || wolfSSL_pending(ssl)) {
|
||||
input = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
|
||||
if (input < 0) {
|
||||
err = wolfSSL_get_error(ssl, 0);
|
||||
@@ -162,7 +159,7 @@ void loop() {
|
||||
}
|
||||
}
|
||||
|
||||
/* echo data */
|
||||
// echo data
|
||||
if ((wolfSSL_write(ssl, reply, replySz)) != replySz) {
|
||||
err = wolfSSL_get_error(ssl, 0);
|
||||
wolfSSL_ERR_error_string(err, errBuf);
|
||||
|
||||
@@ -11,29 +11,20 @@ space(){
|
||||
}
|
||||
|
||||
if [ "$DIR" = "ARDUINO" ]; then
|
||||
if [ ! -d "wolfSSL" ]; then
|
||||
mkdir wolfSSL
|
||||
fi
|
||||
rm -rf wolfSSL
|
||||
mkdir wolfSSL
|
||||
|
||||
cp ../../src/*.c ./wolfSSL
|
||||
cp ../../wolfcrypt/src/*.c ./wolfSSL
|
||||
|
||||
if [ ! -d "wolfSSL/wolfssl" ]; then
|
||||
mkdir wolfSSL/wolfssl
|
||||
fi
|
||||
mkdir wolfSSL/wolfssl
|
||||
cp ../../wolfssl/*.h ./wolfSSL/wolfssl
|
||||
if [ ! -d "wolfSSL/wolfssl/wolfcrypt" ]; then
|
||||
mkdir wolfSSL/wolfssl/wolfcrypt
|
||||
fi
|
||||
mkdir wolfSSL/wolfssl/wolfcrypt
|
||||
cp ../../wolfssl/wolfcrypt/*.h ./wolfSSL/wolfssl/wolfcrypt
|
||||
|
||||
# support misc.c as include in wolfcrypt/src
|
||||
if [ ! -d "./wolfSSL/wolfcrypt" ]; then
|
||||
mkdir ./wolfSSL/wolfcrypt
|
||||
fi
|
||||
if [ ! -d "./wolfSSL/wolfcrypt/src" ]; then
|
||||
mkdir ./wolfSSL/wolfcrypt/src
|
||||
fi
|
||||
mkdir ./wolfSSL/wolfcrypt
|
||||
mkdir ./wolfSSL/wolfcrypt/src
|
||||
cp ../../wolfcrypt/src/misc.c ./wolfSSL/wolfcrypt/src
|
||||
cp ../../wolfcrypt/src/asm.c ./wolfSSL/wolfcrypt/src
|
||||
|
||||
@@ -46,36 +37,31 @@ if [ "$DIR" = "ARDUINO" ]; then
|
||||
cp ./wolfSSL/wolfssl/bio.c ./wolfSSL/wolfcrypt/src/bio.c
|
||||
|
||||
# copy openssl compatibility headers to their appropriate location
|
||||
if [ ! -d "./wolfSSL/wolfssl/openssl" ]; then
|
||||
mkdir ./wolfSSL/wolfssl/openssl
|
||||
fi
|
||||
mkdir ./wolfSSL/wolfssl/openssl
|
||||
cp ../../wolfssl/openssl/* ./wolfSSL/wolfssl/openssl
|
||||
|
||||
echo "/* Generated wolfSSL header file for Arduino */" > ./wolfSSL/wolfssl.h
|
||||
echo "#include <user_settings.h>" >> ./wolfSSL/wolfssl.h
|
||||
echo "#include <wolfssl/wolfcrypt/settings.h>" >> ./wolfSSL/wolfssl.h
|
||||
echo "#include <wolfssl/ssl.h>" >> ./wolfSSL/wolfssl.h
|
||||
|
||||
if [ ! -f "./wolfSSL/user_settings.h" ]; then
|
||||
echo "/* Generated wolfSSL user_settings.h file for Arduino */" > ./wolfSSL/user_settings.h
|
||||
echo "#ifndef ARDUINO_USER_SETTINGS_H" >> ./wolfSSL/user_settings.h
|
||||
echo "#define ARDUINO_USER_SETTINGS_H" >> ./wolfSSL/user_settings.h
|
||||
space ./wolfSSL/user_settings.h
|
||||
echo "/* Platform */" >> ./wolfSSL/user_settings.h
|
||||
echo "#define WOLFSSL_ARDUINO" >> ./wolfSSL/user_settings.h
|
||||
space ./wolfSSL/user_settings.h
|
||||
echo "/* Math library (remove this to use normal math)*/" >> ./wolfSSL/user_settings.h
|
||||
echo "#define USE_FAST_MATH" >> ./wolfSSL/user_settings.h
|
||||
echo "#define TFM_NO_ASM" >> ./wolfSSL/user_settings.h
|
||||
space ./wolfSSL/user_settings.h
|
||||
echo "/* RNG DEFAULT !!FOR TESTING ONLY!! */" >> ./wolfSSL/user_settings.h
|
||||
echo "/* comment out the error below to get started w/ bad entropy source" >> ./wolfSSL/user_settings.h
|
||||
echo " * This will need fixed before distribution but is OK to test with */" >> ./wolfSSL/user_settings.h
|
||||
echo "#error \"needs solved, see: https://www.wolfssl.com/docs/porting-guide/\"" >> ./wolfSSL/user_settings.h
|
||||
echo "#define WOLFSSL_GENSEED_FORTEST" >> ./wolfSSL/user_settings.h
|
||||
space ./wolfSSL/user_settings.h
|
||||
echo "#endif /* ARDUINO_USER_SETTINGS_H */" >> ./wolfSSL/user_settings.h
|
||||
fi
|
||||
echo "/* Generated wolfSSL user_settings.h file for Arduino */" > ./wolfSSL/user_settings.h
|
||||
echo "#ifndef ARDUINO_USER_SETTINGS_H" >> ./wolfSSL/user_settings.h
|
||||
echo "#define ARDUINO_USER_SETTINGS_H" >> ./wolfSSL/user_settings.h
|
||||
space wolfSSL/user_settings.h
|
||||
echo "/* Platform */" >> ./wolfSSL/user_settings.h
|
||||
echo "#define WOLFSSL_ARDUINO" >> ./wolfSSL/user_settings.h
|
||||
space wolfSSL/user_settings.h
|
||||
echo "/* Math library (remove this to use normal math)*/" >> ./wolfSSL/user_settings.h
|
||||
echo "#define USE_FAST_MATH" >> ./wolfSSL/user_settings.h
|
||||
echo "#define TFM_NO_ASM" >> ./wolfSSL/user_settings.h
|
||||
space wolfSSL/user_settings.h
|
||||
echo "/* RNG DEFAULT !!FOR TESTING ONLY!! */" >> ./wolfSSL/user_settings.h
|
||||
echo "/* comment out the error below to get started w/ bad entropy source" >> ./wolfSSL/user_settings.h
|
||||
echo " * This will need fixed before distribution but is OK to test with */" >> ./wolfSSL/user_settings.h
|
||||
echo "#error \"needs solved, see: https://www.wolfssl.com/docs/porting-guide/\"" >> ./wolfSSL/user_settings.h
|
||||
echo "#define WOLFSSL_GENSEED_FORTEST" >> ./wolfSSL/user_settings.h
|
||||
space wolfSSL/user_settings.h
|
||||
echo "#endif /* ARDUINO_USER_SETTINGS_H */" >> ./wolfSSL/user_settings.h
|
||||
|
||||
cp wolfSSL/wolfssl/wolfcrypt/settings.h wolfSSL/wolfssl/wolfcrypt/settings.h.bak
|
||||
echo " /* wolfSSL Generated ARDUINO settings */" > ./wolfSSL/wolfssl/wolfcrypt/settings.h
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
cc_library_shared {
|
||||
|
||||
name: "libwolfssl",
|
||||
|
||||
arch: {
|
||||
arm: {
|
||||
instruction_set: "arm",
|
||||
},
|
||||
arm64: {
|
||||
cflags: ["-DARM64"],
|
||||
},
|
||||
},
|
||||
compile_multilib: "both",
|
||||
export_include_dirs: ["."],
|
||||
shared_libs: ["liblog"],
|
||||
cflags: [
|
||||
"-DWOLFSSL_USER_SETTINGS",
|
||||
"-Os",
|
||||
"-fomit-frame-pointer",
|
||||
|
||||
/* If using WOLFSSL_ARMASM then add these cflags for ARM crypto extensions */
|
||||
/* "-mcpu=cortex-a73+crypto", */
|
||||
/* "-march=armv8-a", */
|
||||
/* "-mstrict-align", */
|
||||
],
|
||||
include_dirs: [
|
||||
"external/wolfssl/wolfssl",
|
||||
"external/wolfssl",
|
||||
],
|
||||
|
||||
srcs: [
|
||||
"./src/crl.c",
|
||||
"./src/internal.c",
|
||||
"./src/keys.c",
|
||||
"./src/ocsp.c",
|
||||
"./src/sniffer.c",
|
||||
"./src/ssl.c",
|
||||
"./src/tls.c",
|
||||
"./src/tls13.c",
|
||||
"./src/wolfio.c",
|
||||
] + [
|
||||
"./wolfcrypt/src/aes.c",
|
||||
"./wolfcrypt/src/arc4.c",
|
||||
"./wolfcrypt/src/asm.c",
|
||||
"./wolfcrypt/src/asn.c",
|
||||
"./wolfcrypt/src/blake2b.c",
|
||||
"./wolfcrypt/src/blake2s.c",
|
||||
"./wolfcrypt/src/camellia.c",
|
||||
"./wolfcrypt/src/chacha.c",
|
||||
"./wolfcrypt/src/chacha20_poly1305.c",
|
||||
"./wolfcrypt/src/cmac.c",
|
||||
"./wolfcrypt/src/coding.c",
|
||||
"./wolfcrypt/src/compress.c",
|
||||
"./wolfcrypt/src/cpuid.c",
|
||||
"./wolfcrypt/src/cryptocb.c",
|
||||
"./wolfcrypt/src/curve25519.c",
|
||||
"./wolfcrypt/src/curve448.c",
|
||||
"./wolfcrypt/src/des3.c",
|
||||
"./wolfcrypt/src/dh.c",
|
||||
"./wolfcrypt/src/dsa.c",
|
||||
"./wolfcrypt/src/ecc.c",
|
||||
"./wolfcrypt/src/ecc_fp.c",
|
||||
"./wolfcrypt/src/ed25519.c",
|
||||
"./wolfcrypt/src/ed448.c",
|
||||
"./wolfcrypt/src/error.c",
|
||||
"./wolfcrypt/src/fe_448.c",
|
||||
"./wolfcrypt/src/fe_low_mem.c",
|
||||
"./wolfcrypt/src/fe_operations.c",
|
||||
"./wolfcrypt/src/fips.c",
|
||||
"./wolfcrypt/src/fips_test.c",
|
||||
"./wolfcrypt/src/ge_448.c",
|
||||
"./wolfcrypt/src/ge_low_mem.c",
|
||||
"./wolfcrypt/src/ge_operations.c",
|
||||
"./wolfcrypt/src/hash.c",
|
||||
"./wolfcrypt/src/kdf.c",
|
||||
"./wolfcrypt/src/hmac.c",
|
||||
"./wolfcrypt/src/integer.c",
|
||||
"./wolfcrypt/src/kdf.c",
|
||||
"./wolfcrypt/src/logging.c",
|
||||
"./wolfcrypt/src/md2.c",
|
||||
"./wolfcrypt/src/md4.c",
|
||||
"./wolfcrypt/src/md5.c",
|
||||
"./wolfcrypt/src/memory.c",
|
||||
"./wolfcrypt/src/pkcs12.c",
|
||||
"./wolfcrypt/src/pkcs7.c",
|
||||
"./wolfcrypt/src/poly1305.c",
|
||||
"./wolfcrypt/src/pwdbased.c",
|
||||
"./wolfcrypt/src/random.c",
|
||||
"./wolfcrypt/src/rc2.c",
|
||||
"./wolfcrypt/src/ripemd.c",
|
||||
"./wolfcrypt/src/rsa.c",
|
||||
"./wolfcrypt/src/selftest.c",
|
||||
"./wolfcrypt/src/sha256.c",
|
||||
"./wolfcrypt/src/sha3.c",
|
||||
"./wolfcrypt/src/sha512.c",
|
||||
"./wolfcrypt/src/sha.c",
|
||||
"./wolfcrypt/src/signature.c",
|
||||
"./wolfcrypt/src/sp_arm32.c",
|
||||
"./wolfcrypt/src/sp_arm64.c",
|
||||
"./wolfcrypt/src/sp_armthumb.c",
|
||||
"./wolfcrypt/src/sp_c32.c",
|
||||
"./wolfcrypt/src/sp_c64.c",
|
||||
"./wolfcrypt/src/sp_cortexm.c",
|
||||
"./wolfcrypt/src/sp_dsp32.c",
|
||||
"./wolfcrypt/src/sp_int.c",
|
||||
"./wolfcrypt/src/sp_x86_64.c",
|
||||
"./wolfcrypt/src/srp.c",
|
||||
"./wolfcrypt/src/tfm.c",
|
||||
"./wolfcrypt/src/wc_dsp.c",
|
||||
"./wolfcrypt/src/wc_encrypt.c",
|
||||
"./wolfcrypt/src/wc_pkcs11.c",
|
||||
"./wolfcrypt/src/wc_port.c",
|
||||
"./wolfcrypt/src/wolfcrypt_first.c",
|
||||
"./wolfcrypt/src/wolfcrypt_last.c",
|
||||
"./wolfcrypt/src/wolfevent.c",
|
||||
"./wolfcrypt/src/wolfmath.c",
|
||||
],
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
# Android wolfSSL Support
|
||||
|
||||
Tested on Android v8.1 with WPA Supplicant and KeyStore to replace BoringSSL.
|
||||
|
||||
## Files
|
||||
|
||||
* `Android.bp`: Template build system file for wolfSSL.
|
||||
* `user_settings.h`: Template build settings for wolfSSL
|
||||
|
||||
## Installation
|
||||
|
||||
1) Place the wolfSSL library into `./external/wolfssl`
|
||||
2) Copy `Android.bp` into `./external/wolfssl`
|
||||
3) Copy `user_settings.h` into `./external/wolfssl`
|
||||
4) Add `PRODUCT_PACKAGES += libwolfssl` to your device .mk.
|
||||
|
||||
## Typical Android build instruction
|
||||
|
||||
```sh
|
||||
source build/envsetup.sh
|
||||
lunch [num]
|
||||
mm -j8
|
||||
```
|
||||
|
||||
## Using wolfSSL in your Application
|
||||
|
||||
In your `Android.mk` build file for your application add the following:
|
||||
|
||||
```makefile
|
||||
# Crypto Provider - wolfSSL
|
||||
LOCAL_CFLAGS += -DWOLFSSL_USER_SETTINGS -Iexternal/wolfssl -Iexternal/wolfssl/wolfssl
|
||||
LOCAL_SHARED_LIBRARIES += libwolfssl
|
||||
```
|
||||
|
||||
## Support
|
||||
|
||||
For questions please email support@wolfssl.com
|
||||
@@ -1,8 +0,0 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST += \
|
||||
IDE/Android/Android.bp \
|
||||
IDE/Android/README.md \
|
||||
IDE/Android/user_settings.h
|
||||
@@ -1,138 +0,0 @@
|
||||
/* Custom build settings for Android */
|
||||
|
||||
#ifndef _WOLF_USER_SETTINGS_H_
|
||||
#define _WOLF_USER_SETTINGS_H_
|
||||
|
||||
#if 0
|
||||
#define HAVE_FIPS_VERSION 2
|
||||
#define HAVE_FIPS
|
||||
#endif
|
||||
|
||||
#ifdef __aarch64__
|
||||
#if !defined(__clang__) || \
|
||||
(defined(__clang__) && defined(__clang_major__) && __clang_major__ >= 5)
|
||||
/* older clang v4 has issue with inline assembly contraints */
|
||||
#define WOLFSSL_ARMASM
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if 1 /* SP Assembly Speedups (wPAA) */
|
||||
#define WOLFSSL_SP
|
||||
#define WOLFSSL_SP_SMALL /* use smaller version of code */
|
||||
#define WOLFSSL_HAVE_SP_RSA
|
||||
#define WOLFSSL_HAVE_SP_DH
|
||||
#define WOLFSSL_HAVE_SP_ECC
|
||||
#ifdef WOLFSSL_ARMASM
|
||||
#define WOLFSSL_SP_ARM64_ASM
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* WPA Supplicant Support */
|
||||
#define WOLFSSL_WPAS_SMALL
|
||||
#define OPENSSL_ALL
|
||||
#define HAVE_THREAD_LS
|
||||
|
||||
#define USE_FAST_MATH
|
||||
#define FP_MAX_BITS (4096*2) /* Maximum math bits (Max RSA key bits * 2) */
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
#define WC_RSA_BLINDING
|
||||
|
||||
#define HAVE_HASHDRBG
|
||||
|
||||
#if 1
|
||||
#define WOLFSSL_TLS13
|
||||
#endif
|
||||
#define WC_RSA_PSS
|
||||
#define HAVE_SESSION_TICKET
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#define HAVE_EXTENDED_MASTER
|
||||
#define HAVE_ENCRYPT_THEN_MAC
|
||||
#define WOLFSSL_ENCRYPTED_KEYS
|
||||
#define HAVE_KEYING_MATERIAL
|
||||
#define NO_OLD_TLS
|
||||
#define NO_CHECK_PRIVATE_KEY
|
||||
|
||||
/* enable PK callback support for signing operations to key store */
|
||||
#define HAVE_PK_CALLBACKS
|
||||
/* crypto callback support is not in FIPS 3389 */
|
||||
#ifndef HAVE_FIPS
|
||||
#define WOLF_CRYPTO_CB
|
||||
#endif
|
||||
|
||||
#define KEEP_OUR_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#define WOLFSSL_ALWAYS_VERIFY_CB
|
||||
#define WOLFSSL_ALWAYS_KEEP_SNI
|
||||
#define HAVE_EX_DATA
|
||||
#define HAVE_EXT_CACHE
|
||||
#define WOLFSSL_EITHER_SIDE
|
||||
#define WOLFSSL_PUBLIC_MP
|
||||
#define WOLFSSL_DER_LOAD
|
||||
|
||||
#define WOLFSSL_CERT_GEN
|
||||
#define WOLFSSL_CERT_EXT
|
||||
#define WOLFSSL_CERT_REQ
|
||||
|
||||
#define WOLFSSL_KEY_GEN
|
||||
#define WC_RSA_NO_PADDING
|
||||
|
||||
#define WOLFSSL_DH_CONST
|
||||
#define HAVE_FFDHE_2048
|
||||
#define HAVE_FFDHE_3072
|
||||
#define HAVE_FFDHE_4096
|
||||
#define HAVE_DH_DEFAULT_PARAMS
|
||||
#ifdef HAVE_FIPS
|
||||
#define WOLFSSL_VALIDATE_FFC_IMPORT
|
||||
#define HAVE_FFDHE_Q
|
||||
#endif
|
||||
|
||||
#define WOLFSSL_SHA224
|
||||
#define WOLFSSL_SHA512
|
||||
#define WOLFSSL_SHA384
|
||||
#define WOLFSSL_NOSHA512_256
|
||||
#define WOLFSSL_NOSHA512_224
|
||||
#define WOLFSSL_SHA3
|
||||
|
||||
#define HAVE_HKDF
|
||||
#define HAVE_PKCS8
|
||||
|
||||
#define HAVE_ECC
|
||||
#define TFM_ECC256
|
||||
#define ECC_SHAMIR
|
||||
#define HAVE_COMP_KEY
|
||||
#ifdef HAVE_FIPS
|
||||
#define HAVE_ECC_CDH
|
||||
#define WOLFSSL_VALIDATE_ECC_IMPORT
|
||||
#endif
|
||||
#ifdef __i386
|
||||
#define TFM_NO_ASM
|
||||
#endif
|
||||
|
||||
#define HAVE_AESGCM
|
||||
#define HAVE_AESCCM
|
||||
#define WOLFSSL_AES_DIRECT
|
||||
#define WOLFSSL_AES_COUNTER
|
||||
#define HAVE_AES_ECB
|
||||
#define WOLFSSL_CMAC
|
||||
|
||||
#define WOLFSSL_BASE64_ENCODE
|
||||
#define HAVE_CRL
|
||||
|
||||
#define NO_DSA
|
||||
#define NO_RC4
|
||||
#define NO_PSK
|
||||
#define WOLFSSL_NO_SHAKE256
|
||||
#define NO_MD4
|
||||
#define NO_OLD_MD5_NAME
|
||||
#define NO_OLD_SHA_NAMES
|
||||
#define NO_OLD_SHA256_NAMES
|
||||
#define NO_OLD_WC_NAMES
|
||||
|
||||
#if 0
|
||||
#define DEBUG_WOLFSSL
|
||||
#define WOLFSSL_ANDROID_DEBUG
|
||||
#endif
|
||||
|
||||
#endif /* _WOLF_USER_SETTINGS_H_ */
|
||||
@@ -558,6 +558,12 @@ extern "C" {
|
||||
#undef NO_OLD_TLS
|
||||
#define NO_OLD_TLS
|
||||
|
||||
#undef NO_HC128
|
||||
#define NO_HC128
|
||||
|
||||
#undef NO_RABBIT
|
||||
#define NO_RABBIT
|
||||
|
||||
#undef NO_PSK
|
||||
#define NO_PSK
|
||||
|
||||
|
||||
@@ -414,21 +414,26 @@
|
||||
<type>1</type>
|
||||
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/ge_operations.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/kdf.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/kdf.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/hash.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/hash.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/hc128.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/hc128.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/hmac.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/hmac.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/idea.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/idea.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/integer.c</name>
|
||||
<type>1</type>
|
||||
@@ -479,6 +484,11 @@
|
||||
<type>1</type>
|
||||
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/pwdbased.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/rabbit.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>WOLFSSL_ROOT/wolfcrypt/src/rabbit.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/random.c</name>
|
||||
<type>1</type>
|
||||
|
||||
@@ -93,6 +93,8 @@ HMAC-SHA test passed!
|
||||
HAC-SHA256 test passed!
|
||||
HMAC-SHA512 test passed!
|
||||
GMC test passed!
|
||||
HC-128 test passed!
|
||||
Rabbit test passed!
|
||||
DS test passed!
|
||||
DS3 test passed!
|
||||
AES test passed!
|
||||
|
||||
@@ -93,6 +93,8 @@ HMAC-SHA512 test passed!
|
||||
X963-KDF test passed!
|
||||
GMAC test passed!
|
||||
ARC4 test passed!
|
||||
HC-128 test passed!
|
||||
Rabbit test passed!
|
||||
DES test passed!
|
||||
DES3 test passed!
|
||||
AES test passed!
|
||||
@@ -170,4 +172,4 @@ ED 25519 verify 2 ops took 1.000 sec, avg 500.000 ms, 2.000 ops/sec
|
||||
|
||||
## References
|
||||
|
||||
For more information please contact info@wolfssl.com.
|
||||
For more information please contact info@wolfssl.com.
|
||||
@@ -4,28 +4,28 @@
|
||||
|
||||
Including the following examples:
|
||||
|
||||
* Simple [TLS client](./examples/wolfssl_client/)/[server](./examples/wolfssl_server/)
|
||||
* Cryptographic [test](./examples/wolfssl_test/)
|
||||
* Cryptographic [benchmark](./examples/wolfssl_benchmark/)
|
||||
* simple tls_client/server
|
||||
* crypt test
|
||||
* crypt benchmark
|
||||
|
||||
The *user_settings.h* file enables some of the hardened settings.
|
||||
|
||||
## Requirements
|
||||
1. [ESP-IDF development framework](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/)
|
||||
1. ESP-IDF development framework
|
||||
[https://docs.espressif.com/projects/esp-idf/en/latest/get-started/]
|
||||
|
||||
Note: This expects to use Linux version.
|
||||
|
||||
## Setup for Linux
|
||||
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)
|
||||
|
||||
## Setup for Windows
|
||||
1. Run ESP-IDF Command Prompt (cmd.exe) or Run ESP-IDF PowerShell Environment
|
||||
2. Run `setup_win.bat` at `.\IDE\Espressif\ESP-IDF\`
|
||||
3. Find Wolfssl files at _/path/to/esp_`/esp-idf/components/wolfssl/`
|
||||
4. 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)
|
||||
1. Run *setup.sh* at /path/to/wolfssl/IDE/Espressif/ESP-IDF/ to deploy files into ESP-IDF tree
|
||||
For Windows : Run *setup_win.bat* at \IDE\Espressif\ESP-IDF\
|
||||
2. Find Wolfssl files at /path/to/esp-idf/components/wolfssl/
|
||||
3. Find Example programs under /path/to/esp-idf/examples/protocols/wolfssl_xxx
|
||||
4. Uncomment out #define WOLFSSL_ESPIDF in /path/to/wolfssl/wolfssl/wolfcrypt/settings.h
|
||||
Uncomment out #define WOLFSSL_ESPWROOM32 in /path/to/wolfssl/wolfssl/wolfcrypt/settings.h
|
||||
|
||||
## Configuration
|
||||
1. The `user_settings.h` can be found in _/path/to/esp_`/esp-idf/components/wolfssl/include/user_settings.h`
|
||||
1. The *user_settings.h* can be found in /path/to/esp-idf/components/wolfssl/include/user_settings.h
|
||||
|
||||
## Build examples
|
||||
1. See README in each example folder
|
||||
@@ -34,6 +34,7 @@ Including the following examples:
|
||||
For question please email [support@wolfssl.com]
|
||||
|
||||
Note: This is tested with :
|
||||
- OS: Ubuntu 20.04.3 LTS and Microsoft Windows 10 Pro 10.0.19041 and well as WSL Ubuntu
|
||||
- ESP-IDF: ESP-IDF v4.3.2
|
||||
- OS: Ubuntu 18.04.1 LTS and Microsoft Windows 10 Pro 10.0.19041
|
||||
- ESP-IDF: v4.1 and v4.0.1
|
||||
- Module : ESP32-WROOM-32
|
||||
|
||||
|
||||
@@ -1,31 +1,35 @@
|
||||
# DEMO program with ATECC608A on ESP-WROOM-32SE
|
||||
## Overview
|
||||
Running demo programs with ATECC608A on 32SE by setting `WOLFSSL_ESPWROOM32SE` definition
|
||||
Running demo programs with ATECC608A on 32SE by setting *WOLFSSL_ESPWROOM32SE* definition
|
||||
|
||||
Including the following examples:
|
||||
|
||||
* simple `TLS client`/`server`
|
||||
* simple tls_client/tls_server
|
||||
* crypt benchmark
|
||||
|
||||
The `user_settings.h` file enables some of the hardened settings.
|
||||
|
||||
The *user_settings.h* file enables some of the hardened settings.
|
||||
|
||||
## Requirements
|
||||
1. ESP-IDF development framework: https://docs.espressif.com/projects/esp-idf/en/latest/get-started/
|
||||
|
||||
2. Microchip CryptoAuthentication Library: https://github.com/MicrochipTech/cryptoauthlib
|
||||
1. ESP-IDF development framework
|
||||
[https://docs.espressif.com/projects/esp-idf/en/latest/get-started/]
|
||||
|
||||
2. Microchip CryptoAuthentication Library
|
||||
[https://github.com/MicrochipTech/cryptoauthlib]
|
||||
|
||||
## Setup
|
||||
1. Comment out `#define WOLFSSL_ESPWROOM32` in `/path/to/wolfssl/IDE/Espressif/ESP-IDF/user_settings.h`\
|
||||
Uncomment out `#define WOLFSSL_ESPWROOM32SE` in `/path/to/wolfssl/IDE/Espressif/ESP-IDF/user_settings.h`
|
||||
* **Note:** crypt test will fail if enabled `WOLFSSL_ESPWROOM32SE`
|
||||
3. wolfSSL under ESP-IDF. Please see [README.md](https://github.com/wolfSSL/wolfssl/blob/master/IDE/Espressif/ESP-IDF/README.md)
|
||||
4. CryptoAuthentication Library under ESP-IDF. Please see [README.md](https://github.com/miyazakh/cryptoauthlib_esp_idf/blob/master/README.md)
|
||||
|
||||
1. wolfSSL under ESP-IDF. Please see [README.md](https://github.com/wolfSSL/wolfssl/blob/master/IDE/Espressif/ESP-IDF/README.md)
|
||||
2. CryptoAuthentication Library under ESP-IDF. Please see [README.md](https://github.com/miyazakh/cryptoauthlib_esp_idf/blob/master/README.md)
|
||||
|
||||
3. Uncomment out #define WOLFSSL_ESPWROOM32SE in /path/to/wolfssl/wolfssl/wolfcrypt/settings.h
|
||||
|
||||
Note : Need to enable WOLFSSL_ESPIDF
|
||||
Note : crypt test will fail if enabled WOLFSSL_ESPWROOM32SE
|
||||
|
||||
## Configuration
|
||||
1. The `user_settings.h` can be found in `/path/to/esp-idf/components/wolfssl/include/user_settings.h`
|
||||
1. The *user_settings.h* can be found in /path/to/esp-idf/components/wolfssl/include/user_settings.h
|
||||
|
||||
## Build examples
|
||||
1. See `README` in each example folder
|
||||
1. See README in each example folder
|
||||
|
||||
## Benchmark
|
||||
w/o atecc608a
|
||||
@@ -44,11 +48,11 @@ ECDSA 256 verify 14 ops took 1.079 sec, avg 77.071 ms, 12.975 ops/sec
|
||||
```
|
||||
|
||||
## Support
|
||||
For question please email [support@wolfssl.com](mailto:support@wolfssl.com)
|
||||
For question please email [support@wolfssl.com]
|
||||
|
||||
Note: This is tested with the following condition:
|
||||
|
||||
- Model : ESP32-WROOM-32SE
|
||||
- ESP-IDF : v3.3-beta1-39-g6cb37ecc5(commit hash : 6cb37ecc5)
|
||||
Note: This is tested with the following condition:
|
||||
|
||||
- Model : ESP32-WROOM-32SE
|
||||
- ESP-IDF : v3.3-beta1-39-g6cb37ecc5(commit hash : 6cb37ecc5)
|
||||
- CryptAuthLib: commit hash : c6b176e
|
||||
- OS : Ubuntu 18.04.1 LTS (Bionic Beaver)
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
/* wolfcrypt/test/test_paths.h
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifndef NO_FILESYSTEM
|
||||
#define CERT_PREFIX "@abs_top_srcdir@/"
|
||||
#define CERT_WRITE_TEMP_DIR "@abs_top_builddir@/"
|
||||
#endif /* NO_FILESYSTEM */
|
||||
@@ -1,8 +1,8 @@
|
||||
# wolfSSL Benchmark Example
|
||||
#wolfSSL Example
|
||||
|
||||
The Example contains of wolfSSL benchmark program.
|
||||
|
||||
1. `idf.py menuconfig` to configure the program.
|
||||
1. "make menuconfig" to configure the program.
|
||||
1-1. Example Configuration ->
|
||||
|
||||
BENCH_ARG : argument that you want to use. Default is "-lng 0"
|
||||
@@ -10,7 +10,7 @@ The Example contains of wolfSSL benchmark program.
|
||||
|
||||
When you want to run the benchmark program
|
||||
|
||||
1. `idf.py -p <PORT> flash` to compile and load the firmware
|
||||
2. `idf.py monitor` to see the message
|
||||
1. "make flash" to compile and load the firmware
|
||||
2. "make monitor" to see the message
|
||||
|
||||
See the README.md file in the upper level 'examples' directory for more information about examples.
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
#include <wolfcrypt/benchmark/benchmark.h>
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
@@ -2,26 +2,21 @@
|
||||
|
||||
The Example contains of wolfSSL tls client demo.
|
||||
|
||||
1. `idf.py menuconfig` to config the project
|
||||
1. "make 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 Password: WIFI password, and default is "mypassword"
|
||||
|
||||
WIFI Password: WIFI password, and default is "mypassword"
|
||||
Target host ip address : the host that you want to connect to.(default is 127.0.0.1)
|
||||
|
||||
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
|
||||
1. "make flash 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
|
||||
e.g. Launch ./examples/server/server -v 4 -b -i
|
||||
|
||||
See the README.md file in the upper level 'examples' directory for more information about examples.
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
menu "Example Configuration"
|
||||
|
||||
config WIFI_SSID
|
||||
string "WiFi SSID"
|
||||
default "myssid"
|
||||
help
|
||||
SSID (network name) for the example to connect to.
|
||||
|
||||
config WIFI_PASSWORD
|
||||
string "WiFi Password"
|
||||
default "mypassword"
|
||||
help
|
||||
WiFi password (WPA or WPA2) for the example to use.
|
||||
|
||||
config TARGET_HOST
|
||||
string "Target host"
|
||||
default "127.0.01.1"
|
||||
|
||||
@@ -102,13 +102,8 @@ static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_GOT_IP:
|
||||
#if ESP_IDF_VERSION_MAJOR >= 4
|
||||
ESP_LOGI(TAG, "got ip:" IPSTR "\n",
|
||||
IP2STR(&event->event_info.got_ip.ip_info.ip));
|
||||
#else
|
||||
ESP_LOGI(TAG, "got ip:%s",
|
||||
ip4addr_ntoa(&event->event_info.got_ip.ip_info.ip));
|
||||
#endif
|
||||
/* http://esp32.info/docs/esp_idf/html/dd/d08/group__xEventGroupSetBits.html */
|
||||
xEventGroupSetBits(wifi_event_group, CONNECTED_BIT);
|
||||
break;
|
||||
@@ -128,8 +123,7 @@ void app_main(void)
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
|
||||
ESP_LOGI(TAG, "Initialize wifi");
|
||||
#if (ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 1) || \
|
||||
(ESP_IDF_VERSION_MAJOR > 5)
|
||||
#if ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 1
|
||||
esp_netif_init();
|
||||
#else
|
||||
tcpip_adapter_init();
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
# wolfSSL Server Example
|
||||
#wolfSSL Example
|
||||
|
||||
The Example contains a wolfSSL simple server.
|
||||
|
||||
1. `idf.py menuconfigure` to configure the project
|
||||
1. "make menuconfigure" to configure the project
|
||||
|
||||
1-1. Example Connection Configuration ->
|
||||
|
||||
1-1. Example Configuration ->
|
||||
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.
|
||||
1. "make flash" to compile the code and load the firmware
|
||||
2. "make 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.
|
||||
("Waiting for a connection..." message will be displayed.)
|
||||
|
||||
@@ -20,3 +19,4 @@ When you want to test the wolfSSL simple server demo
|
||||
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.
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
menu "Example Configuration"
|
||||
|
||||
config WIFI_SSID
|
||||
string "WiFi SSID"
|
||||
default "myssid"
|
||||
help
|
||||
SSID (network name) for the example to connect to.
|
||||
|
||||
config WIFI_PASSWORD
|
||||
string "WiFi Password"
|
||||
default "mypassword"
|
||||
help
|
||||
WiFi password (WPA or WPA2) for the example to use.
|
||||
|
||||
endmenu
|
||||
@@ -126,8 +126,7 @@ void app_main(void)
|
||||
|
||||
ESP_LOGI(TAG, "Initialize wifi");
|
||||
/* TCP/IP adapter initialization */
|
||||
#if (ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 1) || \
|
||||
(ESP_IDF_VERSION_MAJOR > 5)
|
||||
#if ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 1
|
||||
esp_netif_init();
|
||||
#else
|
||||
tcpip_adapter_init();
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# wolfSSL Crypt Test Example
|
||||
#wolfSSL Example
|
||||
|
||||
The Example contains of wolfSSL test program.
|
||||
|
||||
When you want to run the benchmark program
|
||||
1. `idf.py menuconfig` to configure the program,first
|
||||
2. `idf.py build` to compile and `idf.py -p <PORT> flash` to load the firmware
|
||||
3. `idf.py monitor` to see the message
|
||||
1. "make menuconfig" to configure the program,first
|
||||
2. "make flash" to compile and load the firmware
|
||||
3. "make monitor" to see the message
|
||||
|
||||
See the README.md file in the upper level 'examples' directory for more information about examples.
|
||||
|
||||
@@ -16,22 +16,12 @@ set(COMPONENT_SRCDIRS "./src/"
|
||||
|
||||
set(COMPONENT_REQUIRES lwip)
|
||||
|
||||
if(IS_DIRECTORY ${IDF_PATH}/components/freertos/FreeRTOS-Kernel/)
|
||||
set(COMPONENT_ADD_INCLUDEDIRS
|
||||
"."
|
||||
"./include"
|
||||
"../freertos/FreeRTOS-Kernel/include/freertos"
|
||||
"${WOLFSSL_ROOT}"
|
||||
)
|
||||
else()
|
||||
|
||||
set(COMPONENT_ADD_INCLUDEDIRS
|
||||
"."
|
||||
"./include"
|
||||
"../freertos/include/freertos"
|
||||
"${WOLFSSL_ROOT}"
|
||||
)
|
||||
endif()
|
||||
set(COMPONENT_ADD_INCLUDEDIRS
|
||||
"."
|
||||
"./include"
|
||||
"../freertos/include/freertos"
|
||||
"${WOLFSSL_ROOT}"
|
||||
)
|
||||
|
||||
if(IS_DIRECTORY ${IDF_PATH}/components/cryptoauthlib)
|
||||
list(APPEND COMPONENT_ADD_INCLUDEDIRS "../cryptoauthlib/lib")
|
||||
|
||||
@@ -22,20 +22,6 @@ BASEDIR=`cd ${BASEDIR} && pwd -P`
|
||||
WOLFSSLLIB_TRG_DIR=${IDF_PATH}/components/wolfssl
|
||||
WOLFSSLEXP_TRG_DIR=${IDF_PATH}/examples/protocols
|
||||
|
||||
if [ "$1" == "--verbose" ]; then
|
||||
WOLFSSSL_SETUP_VERBOSE=true
|
||||
fi
|
||||
|
||||
if [ "${WOLFSSSL_SETUP_VERBOSE}" == "true" ]; then
|
||||
echo Verbose mode on!
|
||||
echo BASEDIR=${BASEDIR}
|
||||
echo SCRIPTDIR=${SCRIPTDIR}
|
||||
echo WOLFSSL_ESPIDFDIR=${WOLFSSL_ESPIDFDIR}
|
||||
echo WOLFSSLLIB_TRG_DIR=${WOLFSSLLIB_TRG_DIR}
|
||||
echo WOLFSSLEXP_TRG_DIR=${WOLFSSLEXP_TRG_DIR}
|
||||
echo ""
|
||||
fi
|
||||
|
||||
if [ ! -d $IDF_PATH ]; then
|
||||
echo "ESP-IDF Development Framework doesn't exist.: $IDF_PATH"
|
||||
exit 1
|
||||
@@ -45,12 +31,7 @@ fi
|
||||
pushd $IDF_PATH > /dev/null
|
||||
|
||||
echo "Copy files into $IDF_PATH"
|
||||
|
||||
# Remove/Create directories
|
||||
if [ "${WOLFSSSL_SETUP_VERBOSE}" == "true" ]; then
|
||||
echo "Remove/Create directories..."
|
||||
fi
|
||||
|
||||
${RMDCMD} ${WOLFSSLLIB_TRG_DIR}/
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/
|
||||
|
||||
@@ -58,7 +39,6 @@ ${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/src
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/wolfcrypt
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/src
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/wolfssl
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/wolfssl/openssl
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/test
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/include
|
||||
|
||||
@@ -66,30 +46,17 @@ popd > /dev/null # $WOLFSSL_ESPIDFDIR
|
||||
pushd ${BASEDIR} > /dev/null # WOLFSSL TOP DIR
|
||||
|
||||
# copying ... files in src/ into $WOLFSSLLIB_TRG_DIR/src
|
||||
|
||||
if [ "${WOLFSSSL_SETUP_VERBOSE}" == "true" ]; then
|
||||
echo "Copying ... files in src/ into \$WOLFSSLLIB_TRG_DIR/srcs ..."
|
||||
fi
|
||||
|
||||
${CPDCMD} ./src/*.c ${WOLFSSLLIB_TRG_DIR}/src/
|
||||
|
||||
|
||||
${CPDCMD} -r ./wolfcrypt/src/*.{c,i} ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/src/
|
||||
${CPDCMD} -r ./wolfcrypt/src/port ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/src/port/
|
||||
${CPDCMD} -r ./wolfcrypt/test ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/
|
||||
# Copy dummy test_paths.h to handle the case configure hasn't yet executed
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/dummy_test_paths.h ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/test/test_paths.h
|
||||
${CPDCMD} -r ./wolfcrypt/benchmark ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/
|
||||
|
||||
${CPDCMD} -r ./wolfssl/*.h ${WOLFSSLLIB_TRG_DIR}/wolfssl/
|
||||
${CPDCMD} -r ./wolfssl/openssl/*.h ${WOLFSSLLIB_TRG_DIR}/wolfssl/openssl/
|
||||
${CPDCMD} -r ./wolfssl/wolfcrypt ${WOLFSSLLIB_TRG_DIR}/wolfssl/
|
||||
|
||||
# user_settings.h
|
||||
if [ "${WOLFSSSL_SETUP_VERBOSE}" == "true" ]; then
|
||||
echo "Copying user_settings.h to ${WOLFSSLLIB_TRG_DIR}/include/"
|
||||
fi
|
||||
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/user_settings.h ${WOLFSSLLIB_TRG_DIR}/include/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/dummy_config_h ${WOLFSSLLIB_TRG_DIR}/include/config.h
|
||||
|
||||
@@ -104,24 +71,15 @@ ${CPDCMD} ./libs/component.mk ${WOLFSSLLIB_TRG_DIR}/
|
||||
pushd ${BASEDIR} > /dev/null # WOLFSSL TOP DIR
|
||||
|
||||
# Benchmark program
|
||||
if [ "${WOLFSSSL_SETUP_VERBOSE}" == "true" ]; then
|
||||
echo ""
|
||||
fi
|
||||
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/
|
||||
|
||||
${CPDCMD} ${BASEDIR}/wolfcrypt/benchmark/benchmark.h ${BASEDIR}/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/benchmark.h
|
||||
${CPDCMD} ${BASEDIR}/wolfcrypt/benchmark/benchmark.c ${BASEDIR}/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/benchmark.c
|
||||
|
||||
${CPDCMD} -r ./wolfcrypt/benchmark/benchmark.c ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_benchmark/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_benchmark/main/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/
|
||||
|
||||
# Crypt Test program
|
||||
if [ "${WOLFSSSL_SETUP_VERBOSE}" == "true" ]; then
|
||||
echo "Copying wolfssl_test to ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/"
|
||||
fi
|
||||
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/
|
||||
@@ -131,9 +89,6 @@ ${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_test/* ${WOLFSSLEXP_TRG_DIR}/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_test/main/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/
|
||||
|
||||
# TLS Client program
|
||||
if [ "${WOLFSSSL_SETUP_VERBOSE}" == "true" ]; then
|
||||
echo "Copying TLS Client program to ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/..."
|
||||
fi
|
||||
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/main/
|
||||
@@ -144,9 +99,6 @@ ${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_client/main/* ${WOLFSSLEXP_TR
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_client/main/include/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/main/include/
|
||||
|
||||
# TLS Server program
|
||||
if [ "${WOLFSSSL_SETUP_VERBOSE}" == "true" ]; then
|
||||
echo "Copying TLS Server program to ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/..."
|
||||
fi
|
||||
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/main/
|
||||
@@ -158,8 +110,4 @@ ${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_server/main/include/* ${WOLFS
|
||||
|
||||
popd > /dev/null #
|
||||
|
||||
if [ "${WOLFSSSL_SETUP_VERBOSE}" == "true" ]; then
|
||||
echo "Copy complete!"
|
||||
fi
|
||||
|
||||
exit 1
|
||||
|
||||
@@ -17,14 +17,13 @@ set WOLFSSL_ESPIDFDIR=%BASEDIR%\IDE\Espressif\ESP-IDF
|
||||
set WOLFSSLLIB_TRG_DIR=%IDF_PATH%\components\wolfssl
|
||||
set WOLFSSLEXP_TRG_DIR=%IDF_PATH%\examples\protocols
|
||||
|
||||
echo Copy files into %IDF_PATH%
|
||||
echo Copy files into $IDF_PATH%
|
||||
rem Remove/Create directories
|
||||
rmdir /S/Q %WOLFSSLLIB_TRG_DIR%
|
||||
mkdir %WOLFSSLLIB_TRG_DIR%
|
||||
mkdir %WOLFSSLLIB_TRG_DIR%\src
|
||||
mkdir %WOLFSSLLIB_TRG_DIR%\wolfcrypt\src
|
||||
mkdir %WOLFSSLLIB_TRG_DIR%\wolfssl
|
||||
mkdir %WOLFSSLLIB_TRG_DIR%\wolfssl\openssl
|
||||
mkdir %WOLFSSLLIB_TRG_DIR%\test
|
||||
mkdir %WOLFSSLLIB_TRG_DIR%\include
|
||||
|
||||
@@ -34,12 +33,8 @@ xcopy /Y/Q %BASEDIR%\wolfcrypt\src\*.c %WOLFSSLLIB_TRG_DIR%\wolfcrypt\src
|
||||
xcopy /Y/Q %BASEDIR%\wolfcrypt\src\*.i %WOLFSSLLIB_TRG_DIR%\wolfcrypt\src
|
||||
xcopy /E/Y/Q %BASEDIR%\wolfcrypt\src\port %WOLFSSLLIB_TRG_DIR%\wolfcrypt\src\port\
|
||||
xcopy /E/Y/Q %BASEDIR%\wolfcrypt\test %WOLFSSLLIB_TRG_DIR%\wolfcrypt\test\
|
||||
rem Copy dummy test_paths.h to handle the case configure hasn't yet executed
|
||||
echo F |xcopy /E/Y %WOLFSSL_ESPIDFDIR%\dummy_test_paths.h %WOLFSSLLIB_TRG_DIR%\wolfcrypt\test\test_paths.h
|
||||
xcopy /E/Y/Q %WOLFSSL_ESPIDFDIR%\dummy_test_paths.h %WOLFSSLIB_TRG_DIR%\wolfcrypt\test\test_paths.h
|
||||
xcopy /E/Y/Q %BASEDIR%\wolfcrypt\benchmark %WOLFSSLLIB_TRG_DIR%\wolfcrypt\benchmark\
|
||||
xcopy /Y/Q %BASEDIR%\wolfssl\*.h %WOLFSSLLIB_TRG_DIR%\wolfssl\
|
||||
xcopy /Y/Q %BASEDIR%\wolfssl\openssl\*.h %WOLFSSLLIB_TRG_DIR%\wolfssl\openssl\
|
||||
xcopy /E/Y/Q %BASEDIR%\wolfssl\wolfcrypt %WOLFSSLLIB_TRG_DIR%\wolfssl\wolfcrypt\
|
||||
|
||||
rem user_settings.h
|
||||
@@ -54,12 +49,8 @@ xcopy /F/Q %WOLFSSL_ESPIDFDIR%\libs\component.mk %WOLFSSLLIB_TRG_DIR%\
|
||||
rem Benchmark program
|
||||
rmdir /S/Q %WOLFSSLEXP_TRG_DIR%\wolfssl_benchmark\
|
||||
mkdir %WOLFSSLEXP_TRG_DIR%\wolfssl_benchmark\main\
|
||||
|
||||
echo F |xcopy /E/Y %BASEDIR%\wolfcrypt\benchmark\benchmark.h %BASEDIR%\IDE\Espressif\ESP-IDF\examples\wolfssl_benchmark\main\benchmark.h
|
||||
echo F |xcopy /E/Y %BASEDIR%\wolfcrypt\benchmark\benchmark.c %BASEDIR%\IDE\Espressif\ESP-IDF\examples\wolfssl_benchmark\main\benchmark.c
|
||||
|
||||
xcopy /F/Q %BASEDIR%\wolfcrypt\benchmark\benchmark.c %WOLFSSLEXP_TRG_DIR%\wolfssl_benchmark\main\
|
||||
xcopy /E/F/Q/Y %WOLFSSL_ESPIDFDIR%\examples\wolfssl_benchmark %WOLFSSLEXP_TRG_DIR%\wolfssl_benchmark\
|
||||
xcopy /E/F/Q %WOLFSSL_ESPIDFDIR%\examples\wolfssl_benchmark %WOLFSSLEXP_TRG_DIR%\wolfssl_benchmark\
|
||||
|
||||
rem Crypt Test program
|
||||
rmdir /S/Q %WOLFSSLEXP_TRG_DIR%\wolfssl_test\
|
||||
|
||||
@@ -4,7 +4,7 @@ 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.
|
||||
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.
|
||||
|
||||
@@ -18,12 +18,6 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#undef WOLFSSL_ESPIDF
|
||||
#define WOLFSSL_ESPIDF
|
||||
#define WOLFSSL_ESPWROOM32
|
||||
/* Uncomment next line if using Espressif ESP32-WROOM-32SE */
|
||||
/* comment the above line #define WOLFSSL_ESPWROOM32 */
|
||||
/* #define WOLFSSL_ESPWROOM32SE */
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
|
||||
@@ -610,6 +610,12 @@ extern unsigned int my_rng_seed_gen(void);
|
||||
#undef NO_OLD_TLS
|
||||
#define NO_OLD_TLS
|
||||
|
||||
#undef NO_HC128
|
||||
#define NO_HC128
|
||||
|
||||
#undef NO_RABBIT
|
||||
#define NO_RABBIT
|
||||
|
||||
#undef NO_PSK
|
||||
#define NO_PSK
|
||||
|
||||
@@ -631,10 +637,6 @@ extern unsigned int my_rng_seed_gen(void);
|
||||
#undef NO_SIG_WRAPPER
|
||||
//#define NO_SIG_WRAPPER
|
||||
|
||||
#undef WOLFSSL_IGNORE_FILE_WARN
|
||||
#define WOLFSSL_IGNORE_FILE_WARN
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
BUILD_DIR = ./Build
|
||||
|
||||
all: WolfSSLStaticLib WolfCryptTest WolfCryptBench WolfSSLClient WolfSSLServer
|
||||
all: WolfSSLStaticLib WolfCryptTest WolfCryptBench WolfSSLClient
|
||||
|
||||
WolfCryptTest:
|
||||
$(MAKE) -f Makefile.test
|
||||
@@ -8,8 +8,6 @@ WolfCryptBench:
|
||||
$(MAKE) -f Makefile.bench
|
||||
WolfSSLClient:
|
||||
$(MAKE) -f Makefile.client
|
||||
WolfSSLServer:
|
||||
$(MAKE) -f Makefile.server
|
||||
WolfSSLStaticLib:
|
||||
$(MAKE) -f Makefile.static
|
||||
|
||||
|
||||
@@ -6,39 +6,37 @@ BUILD_DIR = ./Build
|
||||
|
||||
# Toolchain location and prefix
|
||||
#TOOLCHAIN =
|
||||
TOOLCHAIN ?= /opt/gcc-arm-none-eabi/bin/arm-none-eabi-
|
||||
TOOLCHAIN = /opt/gcc-arm-none-eabi/bin/arm-none-eabi-
|
||||
|
||||
# Tools selection
|
||||
CC = $(TOOLCHAIN)gcc
|
||||
AS = $(CC)
|
||||
LD = $(CC)
|
||||
AS = $(TOOLCHAIN)gcc
|
||||
LD = $(TOOLCHAIN)gcc
|
||||
AR = $(TOOLCHAIN)ar
|
||||
NM = $(TOOLCHAIN)nm
|
||||
OBJCOPY ?= $(TOOLCHAIN)objcopy
|
||||
OBJDUMP ?= $(TOOLCHAIN)objdump
|
||||
SIZE ?= $(TOOLCHAIN)size
|
||||
OBJCOPY = $(TOOLCHAIN)objcopy
|
||||
OBJDUMP = $(TOOLCHAIN)objdump
|
||||
SIZE = $(TOOLCHAIN)size
|
||||
|
||||
# Includes
|
||||
USER_SETTINGS_DIR ?= ./Header
|
||||
INC = -I$(USER_SETTINGS_DIR) \
|
||||
-I../..
|
||||
INC = -I./Header \
|
||||
-I./Source \
|
||||
-I../..
|
||||
|
||||
# Defines
|
||||
DEF = -DWOLFSSL_USER_SETTINGS
|
||||
|
||||
# Architecture
|
||||
ARCHFLAGS ?= -mcpu=cortex-m4 -mthumb -mabi=aapcs -DUSE_WOLF_ARM_STARTUP
|
||||
ARCHFLAGS = -mcpu=cortex-m4 -mthumb -mabi=aapcs -DUSE_WOLF_ARM_STARTUP
|
||||
#ARCHFLAGS = -mcpu=cortex-m0 -mthumb -mabi=aapcs -DUSE_WOLF_ARM_STARTUP
|
||||
#ARCHFLAGS = -mcpu=cortex-r5 -mthumb -mabi=aapcs
|
||||
#ARCHFLAGS = -mcpu=cortex-a53 -mthumb -mabi=aapcs
|
||||
|
||||
# Compiler and linker flags
|
||||
ASFLAGS ?= $(ARCHFLAGS)
|
||||
CFLAGS_EXTRA ?= -Wno-cpp
|
||||
CFLAGS ?= $(ARCHFLAGS) -std=gnu99 -Wall $(CFLAGS_EXTRA)
|
||||
LDFLAGS ?= $(ARCHFLAGS)
|
||||
ASFLAGS = $(ARCHFLAGS)
|
||||
CFLAGS = $(ARCHFLAGS) -std=gnu99 -Wall -Wno-cpp
|
||||
LDFLAGS = $(ARCHFLAGS)
|
||||
|
||||
FIPS?=1
|
||||
# LD: Link with nosys
|
||||
LDFLAGS += --specs=nosys.specs
|
||||
|
||||
@@ -72,15 +70,12 @@ LDFLAGS += $(DBGFLAGS)
|
||||
# FILES
|
||||
|
||||
# Port and Test/Benchmark
|
||||
ifndef NO_EXAMPLES
|
||||
SRC_C += ./Source/wolf_main.c
|
||||
SRC_C += ./Source/armtarget.c
|
||||
SRC_C += ../../wolfcrypt/test/test.c
|
||||
SRC_C += ../../wolfcrypt/benchmark/benchmark.c
|
||||
endif
|
||||
|
||||
# WOLFSSL TLS FILES
|
||||
SRC_C += ../../src/bio.c
|
||||
SRC_C += ../../src/crl.c
|
||||
SRC_C += ../../src/internal.c
|
||||
SRC_C += ../../src/keys.c
|
||||
@@ -92,9 +87,7 @@ SRC_C += ../../src/tls13.c
|
||||
SRC_C += ../../src/wolfio.c
|
||||
|
||||
# wolfCrypt Core (FIPS)
|
||||
ifeq "$(FIPS)" "1"
|
||||
SRC_C += ../../wolfcrypt/src/wolfcrypt_first.c
|
||||
endif
|
||||
SRC_C += ../../wolfcrypt/src/aes.c
|
||||
SRC_C += ../../wolfcrypt/src/cmac.c
|
||||
SRC_C += ../../wolfcrypt/src/des3.c
|
||||
@@ -107,38 +100,26 @@ SRC_C += ../../wolfcrypt/src/sha.c
|
||||
SRC_C += ../../wolfcrypt/src/sha256.c
|
||||
SRC_C += ../../wolfcrypt/src/sha512.c
|
||||
SRC_C += ../../wolfcrypt/src/sha3.c
|
||||
ifeq "$(FIPS)" "1"
|
||||
SRC_C += ../../wolfcrypt/src/fips.c
|
||||
SRC_C += ../../wolfcrypt/src/fips_test.c
|
||||
SRC_C += ../../wolfcrypt/src/wolfcrypt_last.c
|
||||
endif
|
||||
|
||||
# wolfCrypt Additional
|
||||
SRC_C += ../../wolfcrypt/src/asm.c
|
||||
SRC_C += ../../wolfcrypt/src/asn.c
|
||||
SRC_C += ../../wolfcrypt/src/blake2s.c
|
||||
SRC_C += ../../wolfcrypt/src/chacha.c
|
||||
SRC_C += ../../wolfcrypt/src/chacha20_poly1305.c
|
||||
SRC_C += ../../wolfcrypt/src/cmac.c
|
||||
SRC_C += ../../wolfcrypt/src/coding.c
|
||||
SRC_C += ../../wolfcrypt/src/compress.c
|
||||
SRC_C += ../../wolfcrypt/src/cpuid.c
|
||||
SRC_C += ../../wolfcrypt/src/cryptocb.c
|
||||
SRC_C += ../../wolfcrypt/src/curve25519.c
|
||||
SRC_C += ../../wolfcrypt/src/curve448.c
|
||||
SRC_C += ../../wolfcrypt/src/ecc_fp.c
|
||||
SRC_C += ../../wolfcrypt/src/eccsi.c
|
||||
SRC_C += ../../wolfcrypt/src/ed25519.c
|
||||
SRC_C += ../../wolfcrypt/src/ed448.c
|
||||
SRC_C += ../../wolfcrypt/src/error.c
|
||||
SRC_C += ../../wolfcrypt/src/evp.c
|
||||
SRC_C += ../../wolfcrypt/src/fe_448.c
|
||||
SRC_C += ../../wolfcrypt/src/fe_low_mem.c
|
||||
SRC_C += ../../wolfcrypt/src/fe_operations.c
|
||||
SRC_C += ../../wolfcrypt/src/ge_448.c
|
||||
SRC_C += ../../wolfcrypt/src/ge_low_mem.c
|
||||
SRC_C += ../../wolfcrypt/src/ge_operations.c
|
||||
SRC_C += ../../wolfcrypt/src/hash.c
|
||||
SRC_C += ../../wolfcrypt/src/kdf.c
|
||||
SRC_C += ../../wolfcrypt/src/integer.c
|
||||
SRC_C += ../../wolfcrypt/src/logging.c
|
||||
SRC_C += ../../wolfcrypt/src/md5.c
|
||||
@@ -148,8 +129,6 @@ SRC_C += ../../wolfcrypt/src/pkcs12.c
|
||||
SRC_C += ../../wolfcrypt/src/pkcs7.c
|
||||
SRC_C += ../../wolfcrypt/src/poly1305.c
|
||||
SRC_C += ../../wolfcrypt/src/pwdbased.c
|
||||
SRC_C += ../../wolfcrypt/src/rc2.c
|
||||
SRC_C += ../../wolfcrypt/src/sakke.c
|
||||
SRC_C += ../../wolfcrypt/src/signature.c
|
||||
SRC_C += ../../wolfcrypt/src/srp.c
|
||||
SRC_C += ../../wolfcrypt/src/sp_arm32.c
|
||||
@@ -158,32 +137,23 @@ SRC_C += ../../wolfcrypt/src/sp_armthumb.c
|
||||
SRC_C += ../../wolfcrypt/src/sp_c32.c
|
||||
SRC_C += ../../wolfcrypt/src/sp_c64.c
|
||||
SRC_C += ../../wolfcrypt/src/sp_cortexm.c
|
||||
SRC_C += ../../wolfcrypt/src/sp_dsp32.c
|
||||
SRC_C += ../../wolfcrypt/src/sp_int.c
|
||||
SRC_C += ../../wolfcrypt/src/sp_x86_64.c
|
||||
SRC_C += ../../wolfcrypt/src/tfm.c
|
||||
SRC_C += ../../wolfcrypt/src/wc_dsp.c
|
||||
SRC_C += ../../wolfcrypt/src/wc_encrypt.c
|
||||
SRC_C += ../../wolfcrypt/src/wc_pkcs11.c
|
||||
SRC_C += ../../wolfcrypt/src/wc_port.c
|
||||
SRC_C += ../../wolfcrypt/src/wolfevent.c
|
||||
SRC_C += ../../wolfcrypt/src/wolfmath.c
|
||||
|
||||
ifeq "$(ASYNC)" "1"
|
||||
SRC_C += ../../wolfcrypt/src/async.c
|
||||
endif
|
||||
|
||||
ifeq "$(SELFTEST)" "1"
|
||||
SRC_C += ../../wolfcrypt/src/selftest.c
|
||||
endif
|
||||
|
||||
# wolfCrypt non-standard algorithms (disabled by default)
|
||||
SRC_C += ../../wolfcrypt/src/arc4.c
|
||||
SRC_C += ../../wolfcrypt/src/blake2b.c
|
||||
SRC_C += ../../wolfcrypt/src/camellia.c
|
||||
SRC_C += ../../wolfcrypt/src/dsa.c
|
||||
SRC_C += ../../wolfcrypt/src/hc128.c
|
||||
SRC_C += ../../wolfcrypt/src/idea.c
|
||||
SRC_C += ../../wolfcrypt/src/md2.c
|
||||
SRC_C += ../../wolfcrypt/src/md4.c
|
||||
SRC_C += ../../wolfcrypt/src/rabbit.c
|
||||
SRC_C += ../../wolfcrypt/src/ripemd.c
|
||||
|
||||
|
||||
@@ -195,11 +165,11 @@ vpath %.c $(dir $(SRC_C))
|
||||
|
||||
build_hex: $(BUILD_DIR) $(BUILD_DIR)/$(BIN).hex
|
||||
@echo ""
|
||||
$(CMD_ECHO) $(SIZE) $(BUILD_DIR)/$(BIN).elf
|
||||
$(CMD_ECHO) @$(SIZE) $(BUILD_DIR)/$(BIN).elf
|
||||
|
||||
build_static: $(BUILD_DIR) $(BUILD_DIR)/$(BIN).a
|
||||
@echo ""
|
||||
$(CMD_ECHO) $(SIZE) $(BUILD_DIR)/$(BIN).a
|
||||
$(CMD_ECHO) @$(SIZE) $(BUILD_DIR)/$(BIN).a
|
||||
|
||||
$(BUILD_DIR):
|
||||
$(CMD_ECHO) mkdir -p $(BUILD_DIR)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# Project name
|
||||
BIN = WolfSSLServer
|
||||
SRC_C = ./Source/tls_server.c
|
||||
|
||||
all: build_hex
|
||||
|
||||
include Makefile.common
|
||||
@@ -71,7 +71,7 @@ void reset_handler(void)
|
||||
|
||||
/* Init heap */
|
||||
__heap_start__[0] = 0;
|
||||
__heap_start__[1] = ((uintptr_t)__heap_end__ - (uintptr_t)__heap_start__);
|
||||
__heap_start__[1] = ((uint32_t)__heap_end__ - (uint32_t)__heap_start__);
|
||||
#endif /* USE_WOLF_ARM_STARTUP */
|
||||
|
||||
/* Start main */
|
||||
@@ -142,20 +142,20 @@ void HardFault_HandlerC( uint32_t *hardfault_args )
|
||||
_BFAR = (*((volatile uint32_t *)(0xE000ED38)));
|
||||
|
||||
printf ("\n\nHard fault handler (all numbers in hex):\n");
|
||||
printf ("R0 = %lx\n", stacked_r0);
|
||||
printf ("R1 = %lx\n", stacked_r1);
|
||||
printf ("R2 = %lx\n", stacked_r2);
|
||||
printf ("R3 = %lx\n", stacked_r3);
|
||||
printf ("R12 = %lx\n", stacked_r12);
|
||||
printf ("LR [R14] = %lx subroutine call return address\n", stacked_lr);
|
||||
printf ("PC [R15] = %lx program counter\n", stacked_pc);
|
||||
printf ("PSR = %lx\n", stacked_psr);
|
||||
printf ("CFSR = %lx\n", _CFSR);
|
||||
printf ("HFSR = %lx\n", _HFSR);
|
||||
printf ("DFSR = %lx\n", _DFSR);
|
||||
printf ("AFSR = %lx\n", _AFSR);
|
||||
printf ("MMAR = %lx\n", _MMAR);
|
||||
printf ("BFAR = %lx\n", _BFAR);
|
||||
printf ("R0 = %ux\n", stacked_r0);
|
||||
printf ("R1 = %ux\n", stacked_r1);
|
||||
printf ("R2 = %ux\n", stacked_r2);
|
||||
printf ("R3 = %ux\n", stacked_r3);
|
||||
printf ("R12 = %ux\n", stacked_r12);
|
||||
printf ("LR [R14] = %ux subroutine call return address\n", stacked_lr);
|
||||
printf ("PC [R15] = %ux program counter\n", stacked_pc);
|
||||
printf ("PSR = %ux\n", stacked_psr);
|
||||
printf ("CFSR = %ux\n", _CFSR);
|
||||
printf ("HFSR = %ux\n", _HFSR);
|
||||
printf ("DFSR = %ux\n", _DFSR);
|
||||
printf ("AFSR = %ux\n", _AFSR);
|
||||
printf ("MMAR = %ux\n", _MMAR);
|
||||
printf ("BFAR = %ux\n", _BFAR);
|
||||
|
||||
// Break into the debugger
|
||||
__asm("BKPT #0\n");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
|
||||
#if !defined(WOLFCRYPT_ONLY) && !defined(NO_WOLFSSL_CLIENT)
|
||||
#ifndef WOLFCRYPT_ONLY
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
@@ -100,11 +100,11 @@ static int tls_client(void)
|
||||
/*---------------------*/
|
||||
/* for no peer auth: */
|
||||
/*---------------------*/
|
||||
wolfSSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_NONE, NULL);
|
||||
wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
|
||||
/*---------------------*/
|
||||
/* end peer auth option*/
|
||||
/*---------------------*/
|
||||
if ((ret = wolfSSL_CTX_set_cipher_list(ctx, "ECDHE-ECDSA-AES128-SHA256")) != WOLFSSL_SUCCESS) {
|
||||
if ((ret = wolfSSL_CTX_set_cipher_list(ctx, "ECDHE-ECDSA-AES128-SHA256")) != SSL_SUCCESS) {
|
||||
wolfSSL_CTX_free(ctx);
|
||||
printf("CTXset_cipher_list failed, error: %d\n", ret);
|
||||
goto fail;
|
||||
@@ -123,14 +123,14 @@ static int tls_client(void)
|
||||
}
|
||||
|
||||
/* non blocking accept and connect */
|
||||
ret = WOLFSSL_FAILURE;
|
||||
ret = SSL_FAILURE;
|
||||
|
||||
while (ret != WOLFSSL_SUCCESS) {
|
||||
while (ret != SSL_SUCCESS) {
|
||||
/* client connect */
|
||||
ret = wolfSSL_connect(ssl);
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
if (error != WOLFSSL_ERROR_WANT_READ && error != WOLFSSL_ERROR_WANT_WRITE) {
|
||||
if (ret != SSL_SUCCESS) {
|
||||
if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE) {
|
||||
/* Fail */
|
||||
printf("wolfSSL connect failed with return code %d\n", error);
|
||||
goto fail;
|
||||
@@ -146,7 +146,7 @@ static int tls_client(void)
|
||||
ret = wolfSSL_write(ssl, msg, msgSz);
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
if (ret != msgSz) {
|
||||
if (error != WOLFSSL_ERROR_WANT_READ && error != WOLFSSL_ERROR_WANT_WRITE) {
|
||||
if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE) {
|
||||
/* Write failed */
|
||||
goto fail;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ static int tls_client(void)
|
||||
ret = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
if (ret < 0) {
|
||||
if (error != WOLFSSL_ERROR_WANT_READ && error != WOLFSSL_ERROR_WANT_WRITE) {
|
||||
if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE) {
|
||||
/* Can put print here, the server enters a loop waiting to read
|
||||
* a confirmation message at this point */
|
||||
// printf("client read failed\n");
|
||||
@@ -186,14 +186,14 @@ fail:
|
||||
|
||||
return -1;
|
||||
}
|
||||
#endif /* !WOLFCRYPT_ONLY && !NO_WOLFSSL_CLIENT */
|
||||
#endif
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#if !defined(WOLFCRYPT_ONLY) && !defined(NO_WOLFSSL_CLIENT)
|
||||
#ifndef WOLFCRYPT_ONLY
|
||||
wolfSSL_Init();
|
||||
|
||||
ret = tls_client();
|
||||
|
||||
@@ -1,206 +0,0 @@
|
||||
/* tls_server.c
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* 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 <wolfssl/wolfcrypt/error-crypt.h>
|
||||
|
||||
#if !defined(WOLFCRYPT_ONLY) && !defined(NO_WOLFSSL_SERVER)
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define MAXSZ 1024
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
/* TLS SERVER */
|
||||
/*------------------------------------------------------------------------*/
|
||||
static int CbIORecv(WOLFSSL *ssl, char *buf, int sz, void *ctx)
|
||||
{
|
||||
int ret = WOLFSSL_CBIO_ERR_GENERAL;
|
||||
|
||||
(void)ssl;
|
||||
(void)ctx;
|
||||
|
||||
/* TODO: Exchange data over your own transport */
|
||||
#warning TODO: Implement your own recv data transport
|
||||
#if 0
|
||||
ret = usart_read_buffer_wait(&cdc_uart_module, buf, sz);
|
||||
if (ret == STATUS_ERR_TIMEOUT)
|
||||
return WOLFSSL_CBIO_ERR_WANT_READ;
|
||||
|
||||
return (ret == STATUS_OK) ? sz : WOLFSSL_CBIO_ERR_GENERAL;
|
||||
#else
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int CbIOSend(WOLFSSL *ssl, char *buf, int sz, void *ctx)
|
||||
{
|
||||
int ret = WOLFSSL_CBIO_ERR_GENERAL;
|
||||
|
||||
(void)ssl;
|
||||
(void)ctx;
|
||||
|
||||
/* TODO: Exchange data over your own transport */
|
||||
#warning TODO: Implement your own send data transport
|
||||
#if 0
|
||||
ret = usart_write_buffer_wait(&cdc_uart_module, buf, sz);
|
||||
if (ret == STATUS_ERR_TIMEOUT)
|
||||
return WOLFSSL_CBIO_ERR_WANT_WRITE;
|
||||
|
||||
return (ret == STATUS_OK) ? sz : WOLFSSL_CBIO_ERR_GENERAL;
|
||||
#else
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int tls_server(void)
|
||||
{
|
||||
char reply[MAXSZ];
|
||||
int ret, error;
|
||||
WOLFSSL* ssl = NULL;
|
||||
WOLFSSL_CTX* ctx = NULL;
|
||||
|
||||
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method())) == NULL) {
|
||||
printf("CTXnew failed.\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
/* ECDHE-ECDSA */
|
||||
/*------------------------------------------------------------------------*/
|
||||
/*--------------------*/
|
||||
/* for peer auth use: */
|
||||
/*--------------------*/
|
||||
// wolfSSL_CTX_load_verify_buffer(ctx, rsa_key_der_1024,
|
||||
// sizeof_rsa_key_der_1024, SSL_FILETYPE_ASN1);
|
||||
// wolfSSL_CTX_load_verify_buffer(ctx, server_cert_der_1024,
|
||||
// sizeof_server_cert_der_1024, SSL_FILETYPE_ASN1);
|
||||
/*---------------------*/
|
||||
/* for no peer auth: */
|
||||
/*---------------------*/
|
||||
wolfSSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_NONE, NULL);
|
||||
/*---------------------*/
|
||||
/* end peer auth option*/
|
||||
/*---------------------*/
|
||||
if ((ret = wolfSSL_CTX_set_cipher_list(ctx, "ECDHE-ECDSA-AES128-SHA256")) != WOLFSSL_SUCCESS) {
|
||||
wolfSSL_CTX_free(ctx);
|
||||
printf("CTXset_cipher_list failed, error: %d\n", ret);
|
||||
goto fail;
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
/* END CIPHER SUITE OPTIONS */
|
||||
/*------------------------------------------------------------------------*/
|
||||
wolfSSL_CTX_SetIORecv(ctx, CbIORecv);
|
||||
wolfSSL_CTX_SetIOSend(ctx, CbIOSend);
|
||||
|
||||
if ((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
printf("wolfSSL_new failed %d\n", error);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* non blocking accept and connect */
|
||||
ret = WOLFSSL_FAILURE;
|
||||
|
||||
while (ret != WOLFSSL_SUCCESS) {
|
||||
/* server accept */
|
||||
ret = wolfSSL_accept(ssl);
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
if (error != WOLFSSL_ERROR_WANT_READ && error != WOLFSSL_ERROR_WANT_WRITE) {
|
||||
/* Fail */
|
||||
printf("wolfSSL accept failed with return code %d\n", error);
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
/* Success */
|
||||
}
|
||||
|
||||
/* read and write */
|
||||
while (1) {
|
||||
/* server read */
|
||||
ret = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
if (ret < 0) {
|
||||
if (error != WOLFSSL_ERROR_WANT_READ && error != WOLFSSL_ERROR_WANT_WRITE) {
|
||||
/* Can put print here, the server enters a loop waiting to read
|
||||
* a confirmation message at this point */
|
||||
// printf("server read failed\n");
|
||||
goto fail;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
/* Can put print here, the server enters a loop waiting to read
|
||||
* a confirmation message at this point */
|
||||
reply[ret] = '\0';
|
||||
// printf("Server Received Reply: %s\n", reply);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
while (1) {
|
||||
/* server write / echo */
|
||||
ret = wolfSSL_write(ssl, reply, XSTRLEN(reply));
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
if (ret != XSTRLEN(reply)) {
|
||||
if (error != WOLFSSL_ERROR_WANT_READ && error != WOLFSSL_ERROR_WANT_WRITE) {
|
||||
/* Write failed */
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
/* Write succeeded */
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
wolfSSL_shutdown(ssl);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
|
||||
return -1;
|
||||
}
|
||||
#endif /* !WOLFCRYPT_ONLY && !NO_WOLFSSL_SERVER */
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#if !defined(WOLFCRYPT_ONLY) && !defined(NO_WOLFSSL_SERVER)
|
||||
wolfSSL_Init();
|
||||
|
||||
ret = tls_server();
|
||||
|
||||
wolfSSL_Cleanup();
|
||||
#else
|
||||
ret = NOT_COMPILED_IN;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -8,13 +8,11 @@ EXTRA_DIST+= IDE/GCC-ARM/Source/wolf_main.c
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Source/benchmark_main.c
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Source/test_main.c
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Source/tls_client.c
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Source/tls_server.c
|
||||
EXTRA_DIST+= IDE/GCC-ARM/linker.ld
|
||||
EXTRA_DIST+= IDE/GCC-ARM/linker_fips.ld
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Makefile
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Makefile.bench
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Makefile.client
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Makefile.server
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Makefile.common
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Makefile.test
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Makefile.static
|
||||
|
||||
@@ -82,6 +82,7 @@ libwolfssl_C_SRCS += \
|
||||
../../wolfcrypt/src/chacha20_poly1305 \
|
||||
../../wolfcrypt/src/pwdbased \
|
||||
../../wolfcrypt/src/chacha \
|
||||
../../wolfcrypt/src/rabbit \
|
||||
../../wolfcrypt/src/cmac \
|
||||
../../wolfcrypt/src/random \
|
||||
../../wolfcrypt/src/coding \
|
||||
@@ -117,9 +118,11 @@ libwolfssl_C_SRCS += \
|
||||
../../wolfcrypt/src/wc_encrypt \
|
||||
../../wolfcrypt/src/hash \
|
||||
../../wolfcrypt/src/wc_pkcs11 \
|
||||
../../wolfcrypt/src/hc128 \
|
||||
../../wolfcrypt/src/wc_port \
|
||||
../../wolfcrypt/src/hmac \
|
||||
../../wolfcrypt/src/wolfcrypt_first \
|
||||
../../wolfcrypt/src/idea \
|
||||
../../wolfcrypt/src/wolfcrypt_last \
|
||||
../../wolfcrypt/src/wolfevent \
|
||||
../../wolfcrypt/src/logging \
|
||||
|
||||
@@ -1976,11 +1976,14 @@
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\hash.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\kdf.c</name>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\hc128.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\hmac.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\idea.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\integer.c</name>
|
||||
</file>
|
||||
@@ -2011,6 +2014,9 @@
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\pwdbased.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\rabbit.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\random.c</name>
|
||||
</file>
|
||||
|
||||
@@ -1956,9 +1956,6 @@
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\hash.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\kdf.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\hmac.c</name>
|
||||
</file>
|
||||
@@ -1980,6 +1977,9 @@
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\pwdbased.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\rabbit.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\random.c</name>
|
||||
</file>
|
||||
|
||||
@@ -2346,9 +2346,6 @@
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\hash.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\kdf.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\hmac.c</name>
|
||||
</file>
|
||||
@@ -2370,6 +2367,9 @@
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\pwdbased.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\rabbit.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\random.c</name>
|
||||
</file>
|
||||
|
||||
@@ -36,16 +36,15 @@ wolfssl (latest version)
|
||||
# asn.c misc.c #
|
||||
# chacha.c poly1305.c #
|
||||
# chacha20_poly1305.c pwdbased.c #
|
||||
# coding.c random.c #
|
||||
# des3.c rsa.c #
|
||||
# dh.c sha.c #
|
||||
# dsa.c sha256.c #
|
||||
# ecc.c sha512.c #
|
||||
# hash.c tfm.c #
|
||||
# hmac.c wc_encrypt.c #
|
||||
# md4.c wc_port.c #
|
||||
# md5.c #
|
||||
# kdf.c #
|
||||
# coding.c rabbit.c #
|
||||
# des3.c random.c #
|
||||
# dh.c rsa.c #
|
||||
# dsa.c sha.c #
|
||||
# ecc.c sha256.c #
|
||||
# hash.c sha512.c #
|
||||
# hmac.c tfm.c #
|
||||
# md4.c wc_encrypt.c #
|
||||
# md5.c wc_port.c #
|
||||
#---------------------------------------------#
|
||||
|
||||
5. Once those are all added go to
|
||||
@@ -173,6 +172,8 @@ HMAC-SHA256 test passed!
|
||||
HMAC-SHA384 test passed!
|
||||
HMAC-SHA512 test passed!
|
||||
GMAC test passed!
|
||||
HC-128 test passed!
|
||||
Rabbit test passed!
|
||||
Chacha test passed!
|
||||
POLY1305 test passed!
|
||||
ChaCha20-Poly1305 AEAD test passed!
|
||||
|
||||
@@ -46,8 +46,9 @@
|
||||
<ClCompile Include="..\..\wolfcrypt\src\ge_low_mem.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\ge_operations.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\hash.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\kdf.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\hc128.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\hmac.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\idea.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\integer.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\logging.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\md2.c" />
|
||||
@@ -58,6 +59,7 @@
|
||||
<ClCompile Include="..\..\wolfcrypt\src\pkcs7.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\poly1305.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\pwdbased.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\rabbit.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\random.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\ripemd.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\rsa.c" />
|
||||
@@ -111,7 +113,9 @@
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\fips_test.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\ge_operations.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\hash.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\hc128.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\hmac.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\idea.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\integer.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\logging.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\md2.h" />
|
||||
@@ -126,6 +130,7 @@
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\pkcs7.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\poly1305.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\pwdbased.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\rabbit.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\random.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\ripemd.h" />
|
||||
<ClInclude Include="..\..\wolfssl\wolfcrypt\rsa.h" />
|
||||
|
||||
@@ -418,6 +418,12 @@ extern "C" {
|
||||
#undef NO_RC4
|
||||
#define NO_RC4
|
||||
|
||||
#undef NO_HC128
|
||||
#define NO_HC128
|
||||
|
||||
#undef NO_RABBIT
|
||||
#define NO_RABBIT
|
||||
|
||||
#undef NO_MD4
|
||||
#define NO_MD4
|
||||
|
||||
|
||||
0
IDE/INTIME-RTOS/wolfExamples.sln
Normal file → Executable file
0
IDE/INTIME-RTOS/wolfExamples.sln
Normal file → Executable file
@@ -166,15 +166,20 @@
|
||||
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/hash.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfcrypt-src/kdf.c</name>
|
||||
<name>src/wolfcrypt-src/hc128.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/kdf.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/hc128.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfcrypt-src/hmac.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/hmac.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfcrypt-src/idea.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/idea.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfcrypt-src/integer.c</name>
|
||||
<type>1</type>
|
||||
@@ -225,6 +230,11 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/pwdbased.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfcrypt-src/rabbit.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/rabbit.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfcrypt-src/random.c</name>
|
||||
<type>1</type>
|
||||
|
||||
@@ -61,7 +61,7 @@ Wolfssl_C_Files :=$(WOLFSSL_ROOT)/wolfcrypt/src/aes.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/ecc.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/error.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/hash.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/kdf.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/hc128.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/hmac.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/integer.c\
|
||||
$(WOLFSSL_ROOT)/src/internal.c\
|
||||
@@ -78,6 +78,7 @@ Wolfssl_C_Files :=$(WOLFSSL_ROOT)/wolfcrypt/src/aes.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/wc_port.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/wolfmath.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/pwdbased.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/rabbit.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/random.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/ripemd.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/rsa.c\
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
#define NO_WOLFSSL_MEMORY
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_MD4
|
||||
#define NO_RABBIT
|
||||
#define NO_HC128
|
||||
#define NO_DSA
|
||||
#define NO_PWDBASED
|
||||
#define NO_PSK
|
||||
|
||||
@@ -20,7 +20,6 @@ CSRCS := ../../wolfcrypt/src/rsa.c \
|
||||
../../wolfcrypt/src/memory.c \
|
||||
../../wolfcrypt/src/coding.c \
|
||||
../../wolfcrypt/src/hash.c \
|
||||
../../wolfcrypt/src/kdf.c \
|
||||
../../wolfcrypt/src/hmac.c \
|
||||
../../wolfcrypt/src/md5.c \
|
||||
../../wolfcrypt/src/wc_port.c \
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
|
||||
#define NO_ASN_TIME
|
||||
#define NO_PWDBASED
|
||||
#define NO_HC128
|
||||
#define NO_RABBIT
|
||||
#define NO_RC4
|
||||
#define NO_DSA
|
||||
#define NO_DES3
|
||||
|
||||
@@ -138,6 +138,19 @@
|
||||
#define NO_HMAC
|
||||
#endif
|
||||
// </e>
|
||||
// <e>HC128
|
||||
#define MDK_CONF_HC128 0
|
||||
#if MDK_CONF_HC128 == 1
|
||||
#define HAVE_HC128
|
||||
#endif
|
||||
// </e>
|
||||
// <e>RABBIT
|
||||
#define MDK_CONF_RABBIT 1
|
||||
#if MDK_CONF_RABBI == 0
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>AEAD
|
||||
#define MDK_CONF_AEAD 0
|
||||
#if MDK_CONF_AEAD == 1
|
||||
@@ -202,6 +215,12 @@
|
||||
#define BUILD_AESGCM
|
||||
#endif
|
||||
// </e>
|
||||
// <e>NTRU (need License, "crypto_ntru.h")
|
||||
#define MDK_CONF_NTRU 0
|
||||
#if MDK_CONF_NTRU == 1
|
||||
#define HAVE_NTRU
|
||||
#endif
|
||||
// </e>
|
||||
// </h>
|
||||
|
||||
// <h>Others
|
||||
|
||||
@@ -175,6 +175,19 @@
|
||||
#define NO_HMAC
|
||||
#endif
|
||||
// </e>
|
||||
// <e>HC128
|
||||
#define MDK_CONF_HC128 0
|
||||
#if MDK_CONF_HC128 == 1
|
||||
#define HAVE_HC128
|
||||
#endif
|
||||
// </e>
|
||||
// <e>RABBIT
|
||||
#define MDK_CONF_RABBIT 1
|
||||
#if MDK_CONF_RABBI == 0
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>AEAD
|
||||
#define MDK_CONF_AEAD 0
|
||||
#if MDK_CONF_AEAD == 1
|
||||
@@ -239,6 +252,12 @@
|
||||
#define BUILD_AESGCM
|
||||
#endif
|
||||
// </e>
|
||||
// <e>NTRU (need License, "crypto_ntru.h")
|
||||
#define MDK_CONF_NTRU 0
|
||||
#if MDK_CONF_NTRU == 1
|
||||
#define HAVE_NTRU
|
||||
#endif
|
||||
// </e>
|
||||
// </h>
|
||||
|
||||
// <h>Others
|
||||
|
||||
@@ -197,6 +197,19 @@
|
||||
#define NO_HMAC
|
||||
#endif
|
||||
// </e>
|
||||
// <e>HC128
|
||||
#define MDK_CONF_HC128 0
|
||||
#if MDK_CONF_HC128 == 1
|
||||
#define HAVE_HC128
|
||||
#endif
|
||||
// </e>
|
||||
// <e>RABBIT
|
||||
#define MDK_CONF_RABBIT 1
|
||||
#if MDK_CONF_RABBI == 0
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>AEAD
|
||||
#define MDK_CONF_AEAD 0
|
||||
#if MDK_CONF_AEAD == 1
|
||||
@@ -261,6 +274,12 @@
|
||||
#define BUILD_AESGCM
|
||||
#endif
|
||||
// </e>
|
||||
// <e>NTRU (need License, "crypto_ntru.h")
|
||||
#define MDK_CONF_NTRU 0
|
||||
#if MDK_CONF_NTRU == 1
|
||||
#define HAVE_NTRU
|
||||
#endif
|
||||
// </e>
|
||||
// </h>
|
||||
|
||||
// <h>Others
|
||||
|
||||
@@ -74,7 +74,7 @@ __task void tcp_tick (void)
|
||||
|
||||
__task void tcp_poll (void)
|
||||
{
|
||||
WOLFSSL_MSG("TCP polling started.") ;
|
||||
WOLFSSL_MSG("TCP polling started.\n") ;
|
||||
while (1) {
|
||||
main_TcpNet ();
|
||||
#if defined (HAVE_KEIL_RTX)
|
||||
@@ -128,7 +128,7 @@ void main_task (void)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
WOLFSSL_MSG("Terminating tcp_main") ;
|
||||
WOLFSSL_MSG("Terminating tcp_main\n") ;
|
||||
os_tsk_delete_self ();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -145,6 +145,14 @@ extern void hmac_sha384_test(void *arg) ;
|
||||
extern void arc4_test(void *arg) ;
|
||||
#endif
|
||||
|
||||
#ifndef NO_HC128
|
||||
extern void hc128_test(void *arg) ;
|
||||
#endif
|
||||
|
||||
#ifndef NO_RABBIT
|
||||
extern void rabbit_test(void *arg) ;
|
||||
#endif
|
||||
|
||||
#ifndef NO_DES3
|
||||
extern void des_test(void *arg) ;
|
||||
extern void des3_test(void *arg) ;
|
||||
@@ -259,6 +267,12 @@ static struct {
|
||||
#ifndef NO_RC4
|
||||
"arc4", arc4_test,
|
||||
#endif
|
||||
#ifndef NO_HC128
|
||||
"hc128", hc128_test,
|
||||
#endif
|
||||
#ifndef NO_RABBIT
|
||||
"rabbit", rabbit_test,
|
||||
#endif
|
||||
#ifndef NO_DES3
|
||||
"des", des_test,
|
||||
"des3", des3_test,
|
||||
|
||||
@@ -851,6 +851,19 @@
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\wolfcrypt\src\hc128.c</PathWithFileName>
|
||||
<FilenameWithoutPath>hc128.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>23</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\wolfcrypt\src\hmac.c</PathWithFileName>
|
||||
<FilenameWithoutPath>hmac.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
@@ -858,7 +871,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>23</FileNumber>
|
||||
<FileNumber>24</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -871,7 +884,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>24</FileNumber>
|
||||
<FileNumber>25</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -884,7 +897,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>25</FileNumber>
|
||||
<FileNumber>26</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -897,7 +910,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>26</FileNumber>
|
||||
<FileNumber>27</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -910,7 +923,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>27</FileNumber>
|
||||
<FileNumber>28</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -923,7 +936,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>28</FileNumber>
|
||||
<FileNumber>29</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -936,7 +949,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>29</FileNumber>
|
||||
<FileNumber>30</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -949,7 +962,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>30</FileNumber>
|
||||
<FileNumber>31</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -962,7 +975,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>31</FileNumber>
|
||||
<FileNumber>32</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -975,7 +988,20 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>32</FileNumber>
|
||||
<FileNumber>33</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\wolfcrypt\src\rabbit.c</PathWithFileName>
|
||||
<FilenameWithoutPath>rabbit.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>34</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -988,7 +1014,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>33</FileNumber>
|
||||
<FileNumber>35</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1001,7 +1027,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>34</FileNumber>
|
||||
<FileNumber>36</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1014,7 +1040,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>35</FileNumber>
|
||||
<FileNumber>37</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1027,7 +1053,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>36</FileNumber>
|
||||
<FileNumber>38</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1040,7 +1066,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>37</FileNumber>
|
||||
<FileNumber>39</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1053,7 +1079,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>38</FileNumber>
|
||||
<FileNumber>40</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>1</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1066,7 +1092,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>39</FileNumber>
|
||||
<FileNumber>41</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1079,7 +1105,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>40</FileNumber>
|
||||
<FileNumber>42</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1092,7 +1118,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>41</FileNumber>
|
||||
<FileNumber>43</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1105,7 +1131,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>42</FileNumber>
|
||||
<FileNumber>44</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1118,7 +1144,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>43</FileNumber>
|
||||
<FileNumber>45</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1131,7 +1157,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>44</FileNumber>
|
||||
<FileNumber>46</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1144,7 +1170,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>45</FileNumber>
|
||||
<FileNumber>47</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1155,19 +1181,6 @@
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>46</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\wolfcrypt\src\kdf.c</PathWithFileName>
|
||||
<FilenameWithoutPath>kdf.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
@@ -1178,7 +1191,7 @@
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>47</FileNumber>
|
||||
<FileNumber>48</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1191,7 +1204,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>48</FileNumber>
|
||||
<FileNumber>49</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1204,7 +1217,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>49</FileNumber>
|
||||
<FileNumber>50</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1217,7 +1230,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>50</FileNumber>
|
||||
<FileNumber>51</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1230,7 +1243,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>51</FileNumber>
|
||||
<FileNumber>52</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1243,7 +1256,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>52</FileNumber>
|
||||
<FileNumber>53</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1256,7 +1269,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>53</FileNumber>
|
||||
<FileNumber>54</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1269,7 +1282,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>54</FileNumber>
|
||||
<FileNumber>55</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1290,7 +1303,7 @@
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>55</FileNumber>
|
||||
<FileNumber>56</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1303,7 +1316,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>56</FileNumber>
|
||||
<FileNumber>57</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1316,7 +1329,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>57</FileNumber>
|
||||
<FileNumber>58</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -1329,7 +1342,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>58</FileNumber>
|
||||
<FileNumber>59</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
|
||||
@@ -511,6 +511,11 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\ge_operations.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>hc128.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\hc128.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>hmac.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -561,6 +566,11 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\pwdbased.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>rabbit.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\rabbit.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>random.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -616,11 +626,6 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\hash.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>kdf.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\kdf.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>misc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -1215,6 +1220,11 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\ge_operations.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>hc128.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\hc128.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>hmac.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -1265,6 +1275,11 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\pwdbased.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>rabbit.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\rabbit.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>random.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -1320,11 +1335,6 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\hash.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>kdf.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\kdf.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>misc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -1919,6 +1929,11 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\ge_operations.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>hc128.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\hc128.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>hmac.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -1969,6 +1984,11 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\pwdbased.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>rabbit.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\rabbit.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>random.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -2024,11 +2044,6 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\hash.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>kdf.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\wolfcrypt\src\kdf.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>misc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
|
||||
@@ -245,6 +245,20 @@
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>HC128
|
||||
#define MDK_CONF_HC128 1
|
||||
#if MDK_CONF_HC128 == 0
|
||||
#define NO_HC128
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>RABBIT
|
||||
#define MDK_CONF_RABBIT 1
|
||||
#if MDK_CONF_RABBIT == 0
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>CHACHA
|
||||
#define MDK_CONF_CHACHA 1
|
||||
#if MDK_CONF_CHACHA == 1
|
||||
@@ -346,6 +360,13 @@
|
||||
#define HAVE_PKCS7
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>NTRU (need License, "crypto_ntru.h")
|
||||
#define MDK_CONF_NTRU 0
|
||||
#if MDK_CONF_NTRU == 1
|
||||
#define HAVE_NTRU
|
||||
#endif
|
||||
// </e>
|
||||
// </h>
|
||||
|
||||
// <e>Random Seed, for TEST Only
|
||||
|
||||
@@ -245,6 +245,20 @@
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>HC128
|
||||
#define MDK_CONF_HC128 1
|
||||
#if MDK_CONF_HC128 == 0
|
||||
#define NO_HC128
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>RABBIT
|
||||
#define MDK_CONF_RABBIT 1
|
||||
#if MDK_CONF_RABBIT == 0
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>CHACHA
|
||||
#define MDK_CONF_CHACHA 1
|
||||
#if MDK_CONF_CHACHA == 1
|
||||
@@ -346,6 +360,13 @@
|
||||
#define HAVE_PKCS7
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>NTRU (need License, "crypto_ntru.h")
|
||||
#define MDK_CONF_NTRU 0
|
||||
#if MDK_CONF_NTRU == 1
|
||||
#define HAVE_NTRU
|
||||
#endif
|
||||
// </e>
|
||||
// </h>
|
||||
|
||||
// <e>Random Seed, for TEST Only
|
||||
|
||||
@@ -245,6 +245,20 @@
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>HC128
|
||||
#define MDK_CONF_HC128 1
|
||||
#if MDK_CONF_HC128 == 0
|
||||
#define NO_HC128
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>RABBIT
|
||||
#define MDK_CONF_RABBIT 1
|
||||
#if MDK_CONF_RABBIT == 0
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>CHACHA
|
||||
#define MDK_CONF_CHACHA 1
|
||||
#if MDK_CONF_CHACHA == 1
|
||||
@@ -346,6 +360,13 @@
|
||||
#define HAVE_PKCS7
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>NTRU (need License, "crypto_ntru.h")
|
||||
#define MDK_CONF_NTRU 0
|
||||
#if MDK_CONF_NTRU == 1
|
||||
#define HAVE_NTRU
|
||||
#endif
|
||||
// </e>
|
||||
// </h>
|
||||
|
||||
// <e>Random Seed, for TEST Only
|
||||
|
||||
@@ -243,6 +243,20 @@
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>HC128
|
||||
#define MDK_CONF_HC128 1
|
||||
#if MDK_CONF_HC128 == 0
|
||||
#define NO_HC128
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>RABBIT
|
||||
#define MDK_CONF_RABBIT 1
|
||||
#if MDK_CONF_RABBIT == 0
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>CHACHA
|
||||
#define MDK_CONF_CHACHA 1
|
||||
#if MDK_CONF_CHACHA == 1
|
||||
@@ -344,6 +358,13 @@
|
||||
#define HAVE_PKCS7
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>NTRU (need License, "crypto_ntru.h")
|
||||
#define MDK_CONF_NTRU 0
|
||||
#if MDK_CONF_NTRU == 1
|
||||
#define HAVE_NTRU
|
||||
#endif
|
||||
// </e>
|
||||
// </h>
|
||||
|
||||
// <e>Random Seed, for TEST Only
|
||||
|
||||
@@ -245,6 +245,20 @@
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>HC128
|
||||
#define MDK_CONF_HC128 1
|
||||
#if MDK_CONF_HC128 == 0
|
||||
#define NO_HC128
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>RABBIT
|
||||
#define MDK_CONF_RABBIT 1
|
||||
#if MDK_CONF_RABBIT == 0
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>CHACHA
|
||||
#define MDK_CONF_CHACHA 1
|
||||
#if MDK_CONF_CHACHA == 1
|
||||
@@ -346,6 +360,13 @@
|
||||
#define HAVE_PKCS7
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>NTRU (need License, "crypto_ntru.h")
|
||||
#define MDK_CONF_NTRU 0
|
||||
#if MDK_CONF_NTRU == 1
|
||||
#define HAVE_NTRU
|
||||
#endif
|
||||
// </e>
|
||||
// </h>
|
||||
|
||||
// <e>Random Seed, for TEST Only
|
||||
|
||||
@@ -245,6 +245,20 @@
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>HC128
|
||||
#define MDK_CONF_HC128 1
|
||||
#if MDK_CONF_HC128 == 0
|
||||
#define NO_HC128
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>RABBIT
|
||||
#define MDK_CONF_RABBIT 1
|
||||
#if MDK_CONF_RABBIT == 0
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>CHACHA
|
||||
#define MDK_CONF_CHACHA 1
|
||||
#if MDK_CONF_CHACHA == 1
|
||||
@@ -346,6 +360,13 @@
|
||||
#define HAVE_PKCS7
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>NTRU (need License, "crypto_ntru.h")
|
||||
#define MDK_CONF_NTRU 0
|
||||
#if MDK_CONF_NTRU == 1
|
||||
#define HAVE_NTRU
|
||||
#endif
|
||||
// </e>
|
||||
// </h>
|
||||
|
||||
// <e>Random Seed, for TEST Only
|
||||
|
||||
@@ -245,6 +245,20 @@
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>HC128
|
||||
#define MDK_CONF_HC128 1
|
||||
#if MDK_CONF_HC128 == 0
|
||||
#define NO_HC128
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>RABBIT
|
||||
#define MDK_CONF_RABBIT 1
|
||||
#if MDK_CONF_RABBIT == 0
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>CHACHA
|
||||
#define MDK_CONF_CHACHA 1
|
||||
#if MDK_CONF_CHACHA == 1
|
||||
@@ -346,6 +360,13 @@
|
||||
#define HAVE_PKCS7
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>NTRU (need License, "crypto_ntru.h")
|
||||
#define MDK_CONF_NTRU 0
|
||||
#if MDK_CONF_NTRU == 1
|
||||
#define HAVE_NTRU
|
||||
#endif
|
||||
// </e>
|
||||
// </h>
|
||||
|
||||
// <e>Random Seed, for TEST Only
|
||||
|
||||
@@ -152,6 +152,14 @@ extern void hmac_sha384_test(void *arg) ;
|
||||
extern void arc4_test(void *arg) ;
|
||||
#endif
|
||||
|
||||
#ifndef NO_HC128
|
||||
extern void hc128_test(void *arg) ;
|
||||
#endif
|
||||
|
||||
#ifndef NO_RABBIT
|
||||
extern void rabbit_test(void *arg) ;
|
||||
#endif
|
||||
|
||||
#ifndef NO_DES3
|
||||
extern void des_test(void *arg) ;
|
||||
extern void des3_test(void *arg) ;
|
||||
@@ -266,6 +274,12 @@ static struct {
|
||||
#ifndef NO_RC4
|
||||
"arc4", arc4_test,
|
||||
#endif
|
||||
#ifndef NO_HC128
|
||||
"hc128", hc128_test,
|
||||
#endif
|
||||
#ifndef NO_RABBIT
|
||||
"rabbit", rabbit_test,
|
||||
#endif
|
||||
#ifndef NO_DES3
|
||||
"des", des_test,
|
||||
"des3", des3_test,
|
||||
|
||||
@@ -245,6 +245,20 @@
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>HC128
|
||||
#define MDK_CONF_HC128 1
|
||||
#if MDK_CONF_HC128 == 0
|
||||
#define NO_HC128
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>RABBIT
|
||||
#define MDK_CONF_RABBIT 1
|
||||
#if MDK_CONF_RABBIT == 0
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>CHACHA
|
||||
#define MDK_CONF_CHACHA 1
|
||||
#if MDK_CONF_CHACHA == 1
|
||||
@@ -346,6 +360,13 @@
|
||||
#define HAVE_PKCS7
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>NTRU (need License, "crypto_ntru.h")
|
||||
#define MDK_CONF_NTRU 0
|
||||
#if MDK_CONF_NTRU == 1
|
||||
#define HAVE_NTRU
|
||||
#endif
|
||||
// </e>
|
||||
// </h>
|
||||
|
||||
// <e>Random Seed, for TEST Only
|
||||
|
||||
@@ -98,7 +98,9 @@ $(WOLF_ROOT)/wolfcrypt/src/fe_operations.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/ge_low_mem.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/ge_operations.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/hash.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/hc128.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/hmac.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/idea.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/integer.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/logging.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/md2.o\
|
||||
@@ -109,6 +111,7 @@ $(WOLF_ROOT)/wolfcrypt/src/pkcs12.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/pkcs7.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/poly1305.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/pwdbased.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/rabbit.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/random.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/ripemd.o\
|
||||
$(WOLF_ROOT)/wolfcrypt/src/rsa.o\
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#define WC_RSA_PSS
|
||||
#define WOLFSSL_BASE64_ENCODE
|
||||
#define NO_RC4
|
||||
#define NO_HC128
|
||||
#define NO_RABBIT
|
||||
#define WOLFSSL_SHA224
|
||||
#define WOLFSSL_SHA3
|
||||
#define WOLFSSL_SHAKE256
|
||||
|
||||
@@ -27,16 +27,16 @@ INCLUDE_DIRECTORIES(
|
||||
ADD_DEFINITIONS(${SSL_DEFINES})
|
||||
SET(WOLFCRYPT_SOURCES src/aes.c src/arc4.c src/asn.c src/blake2b.c
|
||||
src/camellia.c src/chacha.c src/coding.c src/compress.c src/des3.c
|
||||
src/dh.c src/dsa.c src/ecc.c src/error.c src/hmac.c
|
||||
src/integer.c src/kdf.c src/logging.c src/md2.c src/md4.c src/md5.c src/memory.c
|
||||
src/pkcs7.c src/pkcs12.c src/poly1305.c src/pwdbased.c
|
||||
src/dh.c src/dsa.c src/ecc.c src/error.c src/hc128.c src/hmac.c
|
||||
src/integer.c src/logging.c src/md2.c src/md4.c src/md5.c src/memory.c
|
||||
src/pkcs7.c src/pkcs12.c src/poly1305.c src/pwdbased.c src/rabbit.c
|
||||
src/random.c src/ripemd.c src/rsa.c src/sha.c src/sha256.c src/sha512.c
|
||||
src/tfm.c src/wc_port.c src/wc_encrypt.c src/hash.c src/wolfmath.c
|
||||
../wolfssl/wolfcrypt/aes.h ../wolfssl/wolfcrypt/arc4.h ../wolfssl/wolfcrypt/asn.h ../wolfssl/wolfcrypt/blake2.h
|
||||
../wolfssl/wolfcrypt/camellia.h ../wolfssl/wolfcrypt/chacha.h ../wolfssl/wolfcrypt/coding.h ../wolfssl/wolfcrypt/compress.h ../wolfssl/wolfcrypt/des3.h
|
||||
../wolfssl/wolfcrypt/dh.h ../wolfssl/wolfcrypt/dsa.h ../wolfssl/wolfcrypt/ecc.h ../wolfssl/wolfcrypt/error-crypt.h ../wolfssl/wolfcrypt/hmac.h
|
||||
../wolfssl/wolfcrypt/dh.h ../wolfssl/wolfcrypt/dsa.h ../wolfssl/wolfcrypt/ecc.h ../wolfssl/wolfcrypt/error-crypt.h ../wolfssl/wolfcrypt/hc128.h ../wolfssl/wolfcrypt/hmac.h
|
||||
../wolfssl/wolfcrypt/integer.h ../wolfssl/wolfcrypt/logging.h ../wolfssl/wolfcrypt/md2.h ../wolfssl/wolfcrypt/md4.h ../wolfssl/wolfcrypt/md5.h ../wolfssl/wolfcrypt/memory.h
|
||||
../wolfssl/wolfcrypt/misc.h ../wolfssl/wolfcrypt/pkcs7.h ../wolfssl/wolfcrypt/poly1305.h ../wolfssl/wolfcrypt/pwdbased.h
|
||||
../wolfssl/wolfcrypt/misc.h ../wolfssl/wolfcrypt/pkcs7.h ../wolfssl/wolfcrypt/poly1305.h ../wolfssl/wolfcrypt/pwdbased.h ../wolfssl/wolfcrypt/rabbit.h
|
||||
../wolfssl/wolfcrypt/random.h ../wolfssl/wolfcrypt/ripemd.h ../wolfssl/wolfcrypt/rsa.h ../wolfssl/wolfcrypt/sha.h ../wolfssl/wolfcrypt/sha256.h ../wolfssl/wolfcrypt/sha512.h
|
||||
../wolfssl/wolfcrypt/tfm.h ../wolfssl/wolfcrypt/wc_port.h ../wolfssl/wolfcrypt/wc_encrypt.h
|
||||
../wolfssl/wolfcrypt/hash.h
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
WOLFSSL_ROOT=wolfCrypt_v4_5_2
|
||||
APP_WOLFCRYPTOBJS = $(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/wolfcrypt_first.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/aes.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/cmac.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/des3.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/dh.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/ecc.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/hmac.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/random.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/rsa.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/sha.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/sha256.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/sha3.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/sha512.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/fips.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/fips_test.o\
|
||||
$(NETOS_DIR)/src/$(WOLFSSL_ROOT)/objs/ns9210/32b/gnu/wolfcrypt_last.o
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
Developer notes about files in this directory:
|
||||
|
||||
NOTE: These files are for use with the wolfCrypt FIPS module and are not
|
||||
intended or designed for use in a generic NETOS use-case. Adjustments
|
||||
to the user_settings.h will be necessary for use in non-FIPS scenarios.
|
||||
|
||||
Makefile.wolfcrypt.inc:
|
||||
This was developed for a specific customer for inclusion by their recursive
|
||||
Makefile solution. This file is to be included by the top level Makefile and is
|
||||
used to preserve the FIPS module order when linked.
|
||||
|
||||
user_settings.h:
|
||||
For use with cert 3389: https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/3389
|
||||
|
||||
user_settings.h-cert2425:
|
||||
DEPRECATED (preserved for posterity)
|
||||
For use with expired cert 2425: https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/2425
|
||||
|
||||
wolfssl_netos_custom.c:
|
||||
Functions in this file may be modified without risk of effecting the FIPS
|
||||
validation, these APIs' are external to the FIPS module boundary.
|
||||
@@ -1,10 +0,0 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST+= IDE/NETOS/Makefile.wolfcrypt.inc
|
||||
EXTRA_DIST+= IDE/NETOS/user_settings.h
|
||||
EXTRA_DIST+= IDE/NETOS/user_settings.h-cert2425
|
||||
EXTRA_DIST+= IDE/NETOS/wolfssl_netos_custom.c
|
||||
EXTRA_DIST+= IDE/NETOS/README.md
|
||||
|
||||
@@ -1,624 +0,0 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
/* Custom wolfSSL user settings for GCC ARM */
|
||||
|
||||
#ifndef WOLFSSL_USER_SETTINGS_H
|
||||
#define WOLFSSL_USER_SETTINGS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Platform */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#undef WOLFSSL_GENERAL_ALIGNMENT
|
||||
#define WOLFSSL_GENERAL_ALIGNMENT 4
|
||||
|
||||
#undef THREADX
|
||||
#define THREADX
|
||||
|
||||
#ifndef TX_TIMER_TICKS_PER_SECOND
|
||||
#define TX_TIMER_TICKS_PER_SECOND 100
|
||||
#endif
|
||||
|
||||
#undef NETOS
|
||||
#define NETOS
|
||||
|
||||
#undef BIG_ENDIAN_ORDER
|
||||
#define BIG_ENDIAN_ORDER
|
||||
|
||||
#undef WOLFSSL_SMALL_STACK
|
||||
//#define WOLFSSL_SMALL_STACK
|
||||
|
||||
#undef WOLFSSL_USER_IO
|
||||
//#define WOLFSSL_USER_IO
|
||||
|
||||
#undef NO_THREAD_LS
|
||||
#define NO_THREAD_LS
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Math Configuration */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
#undef SIZEOF_LONG
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
#undef USE_FAST_MATH
|
||||
#if 1
|
||||
#define USE_FAST_MATH
|
||||
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#define TFM_TIMING_RESISTANT
|
||||
|
||||
/* Optimizations */
|
||||
#define TFM_ARM
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* FIPS - Requires eval or license from wolfSSL */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#undef HAVE_FIPS
|
||||
#if 1
|
||||
#define HAVE_FIPS
|
||||
|
||||
#undef HAVE_FIPS_VERSION
|
||||
#define HAVE_FIPS_VERSION 2
|
||||
|
||||
#ifdef SINGLE_THREADED
|
||||
#undef NO_THREAD_LS
|
||||
#define NO_THREAD_LS
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
#undef NO_ATTRIBUTE_CONSTRUCTOR
|
||||
#define NO_ATTRIBUTE_CONSTRUCTOR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Crypto */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* RSA */
|
||||
#undef NO_RSA
|
||||
#if 1
|
||||
#ifdef USE_FAST_MATH
|
||||
/* Maximum math bits (Max RSA key bits * 2) */
|
||||
#undef FP_MAX_BITS
|
||||
#define FP_MAX_BITS 8192
|
||||
#endif
|
||||
|
||||
/* half as much memory but twice as slow */
|
||||
#undef RSA_LOW_MEM
|
||||
//#define RSA_LOW_MEM
|
||||
|
||||
/* Enables blinding mode, to prevent timing attacks */
|
||||
#if 0
|
||||
#undef WC_RSA_BLINDING
|
||||
#define WC_RSA_BLINDING
|
||||
#else
|
||||
#undef WC_NO_HARDEN
|
||||
#define WC_NO_HARDEN
|
||||
#endif
|
||||
|
||||
/* RSA PSS Support */
|
||||
#if 1
|
||||
#define WC_RSA_PSS
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
#define WC_RSA_NO_PADDING
|
||||
#endif
|
||||
#else
|
||||
#define NO_RSA
|
||||
#endif
|
||||
|
||||
/* ECC */
|
||||
#undef HAVE_ECC
|
||||
#if 1
|
||||
#define HAVE_ECC
|
||||
|
||||
/* Manually define enabled curves */
|
||||
#undef ECC_USER_CURVES
|
||||
//#define ECC_USER_CURVES
|
||||
|
||||
#ifdef ECC_USER_CURVES
|
||||
/* Manual Curve Selection */
|
||||
//#define HAVE_ECC192
|
||||
//#define HAVE_ECC224
|
||||
#undef NO_ECC256
|
||||
//#define HAVE_ECC384
|
||||
//#define HAVE_ECC521
|
||||
#endif
|
||||
|
||||
/* Fixed point cache (speeds repeated operations against same private key) */
|
||||
#undef FP_ECC
|
||||
//#define FP_ECC
|
||||
#ifdef FP_ECC
|
||||
/* Bits / Entries */
|
||||
#undef FP_ENTRIES
|
||||
#define FP_ENTRIES 2
|
||||
#undef FP_LUT
|
||||
#define FP_LUT 4
|
||||
#endif
|
||||
|
||||
/* Optional ECC calculation method */
|
||||
/* Note: doubles heap usage, but slightly faster */
|
||||
#undef ECC_SHAMIR
|
||||
#define ECC_SHAMIR
|
||||
|
||||
/* Reduces heap usage, but slower */
|
||||
#undef ECC_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
|
||||
#ifdef HAVE_FIPS
|
||||
#undef HAVE_ECC_CDH
|
||||
#define HAVE_ECC_CDH /* Enable cofactor support */
|
||||
|
||||
#undef NO_STRICT_ECDSA_LEN
|
||||
#define NO_STRICT_ECDSA_LEN /* Do not force fixed len w/ FIPS */
|
||||
|
||||
#undef WOLFSSL_VALIDATE_ECC_IMPORT
|
||||
#define WOLFSSL_VALIDATE_ECC_IMPORT /* Validate import */
|
||||
#endif
|
||||
|
||||
/* Compressed Key Support */
|
||||
#undef HAVE_COMP_KEY
|
||||
//#define HAVE_COMP_KEY
|
||||
|
||||
/* Use alternate ECC size for ECC math */
|
||||
#ifdef USE_FAST_MATH
|
||||
/* MAX ECC BITS = ROUND8(MAX ECC) * 2 */
|
||||
#ifdef NO_RSA
|
||||
/* Custom fastmath size if not using RSA */
|
||||
#undef FP_MAX_BITS
|
||||
#define FP_MAX_BITS (256 * 2)
|
||||
#else
|
||||
#undef ALT_ECC_SIZE
|
||||
#define ALT_ECC_SIZE
|
||||
/* wolfSSL will compute the FP_MAX_BITS_ECC, but it can be overriden */
|
||||
//#undef FP_MAX_BITS_ECC
|
||||
//#define FP_MAX_BITS_ECC (256 * 2)
|
||||
#endif
|
||||
|
||||
/* Speedups specific to curve */
|
||||
#ifndef NO_ECC256
|
||||
#undef TFM_ECC256
|
||||
#define TFM_ECC256
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* DH */
|
||||
#undef NO_DH
|
||||
#if 1
|
||||
/* Use table for DH instead of -lm (math) lib dependency */
|
||||
#if 1
|
||||
#define WOLFSSL_DH_CONST
|
||||
#define HAVE_FFDHE_2048
|
||||
#define HAVE_FFDHE_4096
|
||||
//#define HAVE_FFDHE_6144
|
||||
//#define HAVE_FFDHE_8192
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FIPS
|
||||
#define WOLFSSL_VALIDATE_FFC_IMPORT
|
||||
#define HAVE_FFDHE_Q
|
||||
#endif
|
||||
#else
|
||||
#define NO_DH
|
||||
#endif
|
||||
|
||||
|
||||
/* AES */
|
||||
#undef NO_AES
|
||||
#if 1
|
||||
#undef HAVE_AES_CBC
|
||||
#define HAVE_AES_CBC
|
||||
|
||||
#undef HAVE_AESGCM
|
||||
#define HAVE_AESGCM
|
||||
|
||||
/* GCM Method: GCM_SMALL, GCM_WORD32 or GCM_TABLE */
|
||||
// #define GCM_SMALL
|
||||
// #define GCM_WORD32
|
||||
#define GCM_TABLE
|
||||
|
||||
#undef WOLFSSL_AES_DIRECT
|
||||
#define WOLFSSL_AES_DIRECT
|
||||
|
||||
#undef HAVE_AES_ECB
|
||||
#define HAVE_AES_ECB
|
||||
|
||||
#undef WOLFSSL_AES_COUNTER
|
||||
#define WOLFSSL_AES_COUNTER
|
||||
|
||||
#undef HAVE_AESCCM
|
||||
#define HAVE_AESCCM
|
||||
#else
|
||||
#define NO_AES
|
||||
#endif
|
||||
|
||||
|
||||
/* DES3 */
|
||||
#undef NO_DES3
|
||||
#if 1
|
||||
/* No change */
|
||||
#else
|
||||
#define NO_DES3
|
||||
#endif
|
||||
|
||||
/* ChaCha20 / Poly1305 */
|
||||
#undef HAVE_CHACHA
|
||||
#undef HAVE_POLY1305
|
||||
#if 0
|
||||
#define HAVE_CHACHA
|
||||
#define HAVE_POLY1305
|
||||
|
||||
/* Needed for Poly1305 */
|
||||
#undef HAVE_ONE_TIME_AUTH
|
||||
#define HAVE_ONE_TIME_AUTH
|
||||
#endif
|
||||
|
||||
/* Ed25519 / Curve25519 */
|
||||
#undef HAVE_CURVE25519
|
||||
#undef HAVE_ED25519
|
||||
#if 0
|
||||
#define HAVE_CURVE25519
|
||||
#define HAVE_ED25519 /* ED25519 Requires SHA512 */
|
||||
|
||||
/* Optionally use small math (less flash usage, but much slower) */
|
||||
#if 1
|
||||
#define CURVED25519_SMALL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Hashing */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Sha */
|
||||
#undef NO_SHA
|
||||
#if 1
|
||||
/* 1k smaller, but 25% slower */
|
||||
//#define USE_SLOW_SHA
|
||||
#else
|
||||
#define NO_SHA
|
||||
#endif
|
||||
|
||||
/* Sha256 */
|
||||
#undef NO_SHA256
|
||||
#if 1
|
||||
/* not unrolled - ~2k smaller and ~25% slower */
|
||||
//#define USE_SLOW_SHA256
|
||||
|
||||
/* Sha224 */
|
||||
#if 1
|
||||
#define WOLFSSL_SHA224
|
||||
#endif
|
||||
#else
|
||||
#define NO_SHA256
|
||||
#endif
|
||||
|
||||
/* Sha512 */
|
||||
#undef WOLFSSL_SHA512
|
||||
#if 1
|
||||
#define WOLFSSL_SHA512
|
||||
|
||||
/* Sha384 */
|
||||
#undef WOLFSSL_SHA384
|
||||
#if 1
|
||||
#define WOLFSSL_SHA384
|
||||
#endif
|
||||
|
||||
/* over twice as small, but 50% slower */
|
||||
//#define USE_SLOW_SHA512
|
||||
#endif
|
||||
|
||||
/* Sha3 */
|
||||
#undef WOLFSSL_SHA3
|
||||
#if 1
|
||||
#define WOLFSSL_SHA3
|
||||
#endif
|
||||
|
||||
/* MD5 */
|
||||
#undef NO_MD5
|
||||
#if 1
|
||||
/* No change */
|
||||
#else
|
||||
#define NO_MD5
|
||||
#endif
|
||||
|
||||
/* HKDF */
|
||||
#undef HAVE_HKDF
|
||||
#if 1
|
||||
#define HAVE_HKDF
|
||||
#endif
|
||||
|
||||
/* CMAC */
|
||||
#undef WOLFSSL_CMAC
|
||||
#if 1
|
||||
#define WOLFSSL_CMAC
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Benchmark / Test */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Use reduced benchmark / test sizes */
|
||||
#undef BENCH_EMBEDDED
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#undef USE_CERT_BUFFERS_2048
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
|
||||
#undef USE_CERT_BUFFERS_1024
|
||||
//#define USE_CERT_BUFFERS_1024
|
||||
|
||||
#undef USE_CERT_BUFFERS_256
|
||||
#define USE_CERT_BUFFERS_256
|
||||
|
||||
#undef FORCE_BUFFER_TEST
|
||||
#define FORCE_BUFFER_TEST
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Debugging */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#undef DEBUG_WOLFSSL
|
||||
#undef NO_ERROR_STRINGS
|
||||
#if 0
|
||||
#define DEBUG_WOLFSSL
|
||||
#else
|
||||
#if 0
|
||||
#define NO_ERROR_STRINGS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Memory */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* Override Memory API's */
|
||||
#if 0
|
||||
#undef XMALLOC_OVERRIDE
|
||||
#define XMALLOC_OVERRIDE
|
||||
|
||||
/* prototypes for user heap override functions */
|
||||
/* Note: Realloc only required for normal math */
|
||||
#include <stddef.h> /* for size_t */
|
||||
extern void *myMalloc(size_t n, void* heap, int type);
|
||||
extern void myFree(void *p, void* heap, int type);
|
||||
extern void *myRealloc(void *p, size_t n, void* heap, int type);
|
||||
|
||||
#define XMALLOC(n, h, t) myMalloc(n, h, t)
|
||||
#define XFREE(p, h, t) myFree(p, h, t)
|
||||
#define XREALLOC(p, n, h, t) myRealloc(p, n, h, t)
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* Static memory requires fast math */
|
||||
#define WOLFSSL_STATIC_MEMORY
|
||||
|
||||
/* Disable fallback malloc/free */
|
||||
#define WOLFSSL_NO_MALLOC
|
||||
#if 1
|
||||
#define WOLFSSL_MALLOC_CHECK /* trap malloc failure */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Memory callbacks */
|
||||
#if 1
|
||||
#undef USE_WOLFSSL_MEMORY
|
||||
#define USE_WOLFSSL_MEMORY
|
||||
|
||||
/* Use this to measure / print heap usage */
|
||||
#if 0
|
||||
#undef WOLFSSL_TRACK_MEMORY
|
||||
// #define WOLFSSL_TRACK_MEMORY
|
||||
|
||||
#undef WOLFSSL_DEBUG_MEMORY
|
||||
//#define WOLFSSL_DEBUG_MEMORY
|
||||
|
||||
#undef WOLFSSL_DEBUG_MEMORY_PRINT
|
||||
//#define WOLFSSL_DEBUG_MEMORY_PRINT
|
||||
#endif
|
||||
#else
|
||||
#ifndef WOLFSSL_STATIC_MEMORY
|
||||
#define NO_WOLFSSL_MEMORY
|
||||
/* Otherwise we will use stdlib malloc, free and realloc */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* RNG */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* Seed Source */
|
||||
/* Seed Source */
|
||||
#if 1
|
||||
extern int my_rng_generate_seed(unsigned char* output, int sz);
|
||||
#undef CUSTOM_RAND_GENERATE_SEED
|
||||
#define CUSTOM_RAND_GENERATE_SEED my_rng_generate_seed
|
||||
#endif
|
||||
|
||||
/* NETOS */
|
||||
#if 0
|
||||
extern unsigned char get_byte_from_pool(void);
|
||||
#define CUSTOM_RAND_GENERATE get_byte_from_pool
|
||||
#define CUSTOM_RAND_TYPE unsigned char
|
||||
#endif
|
||||
|
||||
/* Choose RNG method */
|
||||
#if 1
|
||||
/* Use built-in P-RNG (SHA256 based) with HW RNG */
|
||||
/* P-RNG + HW RNG (P-RNG is ~8K) */
|
||||
//#define WOLFSSL_GENSEED_FORTEST
|
||||
#undef HAVE_HASHDRBG
|
||||
#define HAVE_HASHDRBG
|
||||
#else
|
||||
#undef WC_NO_HASHDRBG
|
||||
#define WC_NO_HASHDRBG
|
||||
|
||||
/* Bypass P-RNG and use only HW RNG */
|
||||
extern int my_rng_gen_block(unsigned char* output, unsigned int sz);
|
||||
#undef CUSTOM_RAND_GENERATE_BLOCK
|
||||
#define CUSTOM_RAND_GENERATE_BLOCK my_rng_gen_block
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Enable Features */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#undef WOLFSSL_TLS13
|
||||
#if 0
|
||||
#define WOLFSSL_TLS13
|
||||
#endif
|
||||
|
||||
#undef WOLFSSL_KEY_GEN
|
||||
#if 1
|
||||
#define WOLFSSL_KEY_GEN
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_FIPS) && !defined(WOLFSSL_KEY_GEN)
|
||||
#define WOLFSSL_OLD_PRIME_CHECK
|
||||
#endif
|
||||
|
||||
#undef KEEP_PEER_CERT
|
||||
//#define KEEP_PEER_CERT
|
||||
|
||||
#undef HAVE_COMP_KEY
|
||||
//#define HAVE_COMP_KEY
|
||||
|
||||
#undef HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
|
||||
#undef HAVE_SUPPORTED_CURVES
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
|
||||
#undef WOLFSSL_BASE64_ENCODE
|
||||
#define WOLFSSL_BASE64_ENCODE
|
||||
|
||||
/* TLS Session Cache */
|
||||
#if 0
|
||||
#define SMALL_SESSION_CACHE
|
||||
#else
|
||||
#define NO_SESSION_CACHE
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Disable Features */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#undef NO_WOLFSSL_SERVER
|
||||
//#define NO_WOLFSSL_SERVER
|
||||
|
||||
#undef NO_WOLFSSL_CLIENT
|
||||
//#define NO_WOLFSSL_CLIENT
|
||||
|
||||
#undef NO_CRYPT_TEST
|
||||
//#define NO_CRYPT_TEST
|
||||
|
||||
#undef NO_CRYPT_BENCHMARK
|
||||
//#define NO_CRYPT_BENCHMARK
|
||||
|
||||
#undef WOLFCRYPT_ONLY
|
||||
//#define WOLFCRYPT_ONLY
|
||||
|
||||
/* In-lining of misc.c functions */
|
||||
/* If defined, must include wolfcrypt/src/misc.c in build */
|
||||
/* Slower, but about 1k smaller */
|
||||
#undef NO_INLINE
|
||||
//#define NO_INLINE
|
||||
|
||||
#undef NO_FILESYSTEM
|
||||
#define NO_FILESYSTEM
|
||||
|
||||
#undef NO_WOLFSSL_DIR
|
||||
#define NO_WOLFSSL_DIR
|
||||
|
||||
#undef NO_WRITEV
|
||||
#define NO_WRITEV
|
||||
|
||||
#undef NO_MAIN_DRIVER
|
||||
#define NO_MAIN_DRIVER
|
||||
|
||||
#undef NO_DEV_RANDOM
|
||||
#define NO_DEV_RANDOM
|
||||
|
||||
#undef NO_DSA
|
||||
#define NO_DSA
|
||||
|
||||
#undef NO_RC4
|
||||
#define NO_RC4
|
||||
|
||||
#undef NO_OLD_TLS
|
||||
#define NO_OLD_TLS
|
||||
|
||||
#undef NO_PSK
|
||||
#define NO_PSK
|
||||
|
||||
#undef NO_MD4
|
||||
#define NO_MD4
|
||||
|
||||
#undef NO_PWDBASED
|
||||
//#define NO_PWDBASED
|
||||
|
||||
#undef NO_CODING
|
||||
//#define NO_CODING
|
||||
|
||||
#undef NO_ASN_TIME
|
||||
//#define NO_ASN_TIME
|
||||
|
||||
#undef NO_CERTS
|
||||
//#define NO_CERTS
|
||||
|
||||
#undef NO_SIG_WRAPPER
|
||||
//#define NO_SIG_WRAPPER
|
||||
|
||||
/* ACVP Testing ONLY specific settings */
|
||||
#if 0
|
||||
#undef USE_NORMAL_PRINTF
|
||||
#define USE_NORMAL_PRINTF
|
||||
|
||||
#undef USE_UART_READ_LINE
|
||||
#define USE_UART_READ_LINE
|
||||
|
||||
#undef USE_SMALL_MONTE
|
||||
#define USE_SMALL_MONTE
|
||||
|
||||
#undef WOLFSSL_PUBLIC_MP
|
||||
#define WOLFSSL_PUBLIC_MP
|
||||
|
||||
#undef HAVE_FORCE_FIPS_FAILURE
|
||||
#define HAVE_FORCE_FIPS_FAILURE
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* WOLFSSL_USER_SETTINGS_H */
|
||||
@@ -1,173 +0,0 @@
|
||||
#ifndef _NETOS_USER_SETTINGS_H_
|
||||
#define _NETOS_USER_SETTINGS_H_
|
||||
|
||||
/* Verify this is NetOS */
|
||||
/*
|
||||
#ifndef _NETOS
|
||||
#error This user_settings.h header is only designed for NetOS
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Configurations */
|
||||
#if defined(HAVE_FIPS)
|
||||
#if defined(WOLFSSL_LIB)
|
||||
#define HAVE_FIPS_VERSION 2
|
||||
/* The FIPS lib */
|
||||
#define THREADX
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#define NO_WRITEV
|
||||
#define NO_WOLFSSL_DIR
|
||||
#if 0
|
||||
#define DEBUG_WOLFSSL
|
||||
#endif
|
||||
#define NO_DEV_RANDOM
|
||||
#define NETOS
|
||||
#define NO_FILESYSTEM
|
||||
#define FORCE_BUFFER_TEST
|
||||
/* wolfSSL FIPS TESTING UPDATES : */
|
||||
#define NO_ATTRIBUTE_CONSTRUCTOR
|
||||
#define NO_THREAD_LS
|
||||
#define NO_WOLFSSL_STUB
|
||||
#define WOLFSSL_KEY_GEN
|
||||
#define HAVE_FORCE_FIPS_FAILURE
|
||||
#define USE_CERT_BUFFERS_1024 /* for the op-tests */
|
||||
#define USE_CERT_BUFFERS_256 /* for the op-tests */
|
||||
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
#define WC_RSA_BLINDING
|
||||
#define HAVE_AESGCM
|
||||
#define WOLFSSL_SHA512
|
||||
#define WOLFSSL_SHA384
|
||||
#define NO_DSA
|
||||
#define HAVE_ECC
|
||||
#define TFM_ECC256
|
||||
#define ECC_SHAMIR
|
||||
#define WOLFSSL_BASE64_ENCODE
|
||||
#define NO_RC4
|
||||
#define HAVE_HASHDRBG
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#define HAVE_EXTENDED_MASTER
|
||||
#define NO_PSK
|
||||
#define NO_MD4
|
||||
#define NO_PWDBASED
|
||||
#define USE_FAST_MATH
|
||||
#define WC_NO_ASYNC_THREADING
|
||||
|
||||
#define WC_RSAKEY_TYPE_DEFINED
|
||||
#define WC_RNG_TYPE_DEFINED
|
||||
|
||||
#define NO_TESTSUITE_MAIN_DRIVER
|
||||
#define NO_MAIN_DRIVER
|
||||
|
||||
extern unsigned char get_byte_from_pool(void);
|
||||
#define CUSTOM_RAND_GENERATE get_byte_from_pool
|
||||
#define CUSTOM_RAND_TYPE unsigned char
|
||||
|
||||
#define OPENSSL_EXTRA
|
||||
#define HAVE_LIGHTY
|
||||
#define WOLFSSL_AES_DIRECT
|
||||
|
||||
#define WOLFSSL_MYSQL_COMPATIBLE
|
||||
#else
|
||||
/* The FIPS apps */
|
||||
#define HAVE_FIPS_VERSION 2
|
||||
#define THREADX
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#define NO_WRITEV
|
||||
#define NO_WOLFSSL_DIR
|
||||
#if 0
|
||||
#define DEBUG_WOLFSSL
|
||||
#endif
|
||||
#define NO_DEV_RANDOM
|
||||
#define NETOS
|
||||
#define NO_FILESYSTEM
|
||||
#define FORCE_BUFFER_TEST
|
||||
/* wolfSSL FIPS TESTING UPDATES : */
|
||||
#define NO_ATTRIBUTE_CONSTRUCTOR
|
||||
#define NO_THREAD_LS
|
||||
#define NO_WOLFSSL_STUB
|
||||
#define WOLFSSL_KEY_GEN
|
||||
#define HAVE_FORCE_FIPS_FAILURE
|
||||
#define USE_CERT_BUFFERS_2048 /* for the op-tests */
|
||||
#define USE_CERT_BUFFERS_256 /* for the op-tests */
|
||||
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
#define WC_RSA_BLINDING
|
||||
#define HAVE_AESGCM
|
||||
#define WOLFSSL_SHA512
|
||||
#define WOLFSSL_SHA384
|
||||
#define NO_DSA
|
||||
#define HAVE_ECC
|
||||
#define TFM_ECC256
|
||||
#define ECC_SHAMIR
|
||||
#define WOLFSSL_BASE64_ENCODE
|
||||
#define NO_RC4
|
||||
#define HAVE_HASHDRBG
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#define HAVE_EXTENDED_MASTER
|
||||
#define NO_PSK
|
||||
#define NO_MD4
|
||||
#define NO_PWDBASED
|
||||
#define USE_FAST_MATH
|
||||
#define WC_NO_ASYNC_THREADING
|
||||
|
||||
#define WC_RSAKEY_TYPE_DEFINED
|
||||
#define WC_RNG_TYPE_DEFINED
|
||||
|
||||
#define NO_TESTSUITE_MAIN_DRIVER
|
||||
#define NO_MAIN_DRIVER
|
||||
|
||||
|
||||
|
||||
#define OPENSSL_EXTRA
|
||||
#define HAVE_LIGHTY
|
||||
#define WOLFSSL_AES_DIRECT
|
||||
|
||||
#define WOLFSSL_MYSQL_COMPATIBLE
|
||||
#endif
|
||||
#else /* HAVE_FIPS */
|
||||
#if defined(WOLFSSL_LIB)
|
||||
/* The NON-FIPS lib */
|
||||
#define THREADX
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#if 0
|
||||
#define OPENSSL_EXTRA
|
||||
#endif
|
||||
#define WOLFSSL_RIPEMD
|
||||
#define WOLFSSL_SHA512
|
||||
#define NO_PSK
|
||||
#define HAVE_EXTENDED_MASTER
|
||||
#define WOLFSSL_SNIFFER
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SECURE_RENEGOTIATION
|
||||
#define NO_WRITEV
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define DEBUG_WOLFSSL
|
||||
#define NO_DEV_RANDOM
|
||||
#define NETOS
|
||||
#define NO_FILESYSTEM
|
||||
#else
|
||||
/* The NON-FIPS apps */
|
||||
#define THREADX
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#if 0
|
||||
#define OPENSSL_EXTRA
|
||||
#endif
|
||||
#define NO_PSK
|
||||
#define HAVE_EXTENDED_MASTER
|
||||
#define WOLFSSL_SNIFFER
|
||||
#define HAVE_SECURE_RENEGOTIATION
|
||||
#define NO_WRITEV
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
#define DEBUG_WOLFSSL
|
||||
#define NETOS
|
||||
#define NO_FILESYSTEM
|
||||
#endif
|
||||
#endif /* HAVE_FIPS */
|
||||
|
||||
#endif /* _NETOS_USER_SETTINGS_H_ */
|
||||
@@ -1,97 +0,0 @@
|
||||
/* wolfssl_netos_custom.c
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <tx_api.h>
|
||||
#include <entropy.h>
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
#include <wolfssl/wolfcrypt/fips_test.h>
|
||||
|
||||
int dc_log_printf(char* format, ...);
|
||||
|
||||
#if BSP_SIGMA == 0
|
||||
int dc_log_printf(char* format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start(args, (format));
|
||||
|
||||
fflush(stdout);
|
||||
vprintf(format, args);
|
||||
fflush(stdout);
|
||||
|
||||
va_end(args);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
unsigned char get_byte_from_pool(void)
|
||||
{
|
||||
unsigned char out;
|
||||
float density;
|
||||
|
||||
/* Wait until pool has at least one byte */
|
||||
/* TODO: improve this */
|
||||
while (ent_get_byte_count() == 0)
|
||||
tx_thread_sleep(1);
|
||||
|
||||
/* Stop gathering entropy to avoid race conditions */
|
||||
ent_set_status(0);
|
||||
|
||||
/* Pop a single byte from the pool and continue gathering entropy */
|
||||
ent_pop(&out, &density);
|
||||
ent_set_status(1);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
int my_rng_generate_seed(unsigned char* output, int sz)
|
||||
{
|
||||
word32 i;
|
||||
srand(get_byte_from_pool());
|
||||
|
||||
for (i = 0; i < sz; i++) {
|
||||
output[i] = (unsigned char) rand();
|
||||
srand(get_byte_from_pool());
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void appFipsCb(int ok, int err, const char* hash)
|
||||
{
|
||||
dc_log_printf("in appFipsCb Fips callback, ok = %d, err = %d\n", ok, err);
|
||||
dc_log_printf("message = %s\n", wc_GetErrorString(err));
|
||||
dc_log_printf("hash = %s\n", hash);
|
||||
|
||||
if (err == IN_CORE_FIPS_E) {
|
||||
dc_log_printf("In core integrity hash check failure, copy above hash\n");
|
||||
dc_log_printf("into verifyCore[] in fips_test.c and rebuild\n");
|
||||
}
|
||||
}
|
||||
|
||||
void setAppFipsCb(void)
|
||||
{
|
||||
wolfCrypt_SetCb_fips(appFipsCb);
|
||||
}
|
||||
@@ -5,11 +5,11 @@ PLATFORM = armv7le
|
||||
OUTPUT_DIR = build
|
||||
TARGET = $(ARTIFACT)
|
||||
|
||||
CC ?= qcc -Vgcc_nto$(PLATFORM)
|
||||
CC = qcc -Vgcc_nto$(PLATFORM)
|
||||
CXX = qcc -lang-c++ -Vgcc_nto$(PLATFORM)
|
||||
LD = $(CC)
|
||||
|
||||
INCLUDES += -I../../../ -I../../../wolfssl/wolfcrypt/port/caam/
|
||||
INCLUDES += -I../../../wolfssl/wolfcrypt/port/caam/
|
||||
CCFLAGS += -O2 -Wall
|
||||
|
||||
SRCS = \
|
||||
|
||||
@@ -5,7 +5,7 @@ PLATFORM = armv7le
|
||||
OUTPUT_DIR = build
|
||||
TARGET = $(ARTIFACT)
|
||||
|
||||
CC ?= qcc -Vgcc_nto$(PLATFORM)
|
||||
CC = qcc -Vgcc_nto$(PLATFORM)
|
||||
CXX = qcc -lang-c++ -Vgcc_nto$(PLATFORM)
|
||||
LD = $(CC)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ PLATFORM = armv7le
|
||||
OUTPUT_DIR = build
|
||||
TARGET = $(ARTIFACT)
|
||||
|
||||
CC ?= qcc -Vgcc_nto$(PLATFORM)
|
||||
CC = qcc -Vgcc_nto$(PLATFORM)
|
||||
CXX = qcc -lang-c++ -Vgcc_nto$(PLATFORM)
|
||||
LD = $(CC)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ PLATFORM = armv7le
|
||||
OUTPUT_DIR = build
|
||||
TARGET = $(ARTIFACT)
|
||||
|
||||
CC ?= qcc -Vgcc_nto$(PLATFORM)
|
||||
CC = qcc -Vgcc_nto$(PLATFORM)
|
||||
CXX = qcc -lang-c++ -Vgcc_nto$(PLATFORM)
|
||||
LD = $(CC)
|
||||
|
||||
|
||||
@@ -558,6 +558,12 @@ extern "C" {
|
||||
#undef NO_OLD_TLS
|
||||
#define NO_OLD_TLS
|
||||
|
||||
#undef NO_HC128
|
||||
#define NO_HC128
|
||||
|
||||
#undef NO_RABBIT
|
||||
#define NO_RABBIT
|
||||
|
||||
#undef NO_PSK
|
||||
#define NO_PSK
|
||||
|
||||
|
||||
@@ -407,6 +407,12 @@ extern unsigned int custom_rand_generate(void);
|
||||
#undef NO_OLD_TLS
|
||||
#define NO_OLD_TLS
|
||||
|
||||
#undef NO_HC128
|
||||
#define NO_HC128
|
||||
|
||||
#undef NO_RABBIT
|
||||
#define NO_RABBIT
|
||||
|
||||
#undef NO_PSK
|
||||
#define NO_PSK
|
||||
|
||||
|
||||
@@ -71,8 +71,9 @@
|
||||
<file file_name="../../wolfcrypt/src/ge_low_mem.c" />
|
||||
<file file_name="../../wolfcrypt/src/ge_operations.c" />
|
||||
<file file_name="../../wolfcrypt/src/hash.c" />
|
||||
<file file_name="../../wolfcrypt/src/kdf.c" />
|
||||
<file file_name="../../wolfcrypt/src/hc128.c" />
|
||||
<file file_name="../../wolfcrypt/src/hmac.c" />
|
||||
<file file_name="../../wolfcrypt/src/idea.c" />
|
||||
<file file_name="../../wolfcrypt/src/include.am" />
|
||||
<file file_name="../../wolfcrypt/src/integer.c" />
|
||||
<file file_name="../../wolfcrypt/src/logging.c" />
|
||||
@@ -89,6 +90,7 @@
|
||||
<file file_name="../../wolfcrypt/src/pkcs7.c" />
|
||||
<file file_name="../../wolfcrypt/src/poly1305.c" />
|
||||
<file file_name="../../wolfcrypt/src/pwdbased.c" />
|
||||
<file file_name="../../wolfcrypt/src/rabbit.c" />
|
||||
<file file_name="../../wolfcrypt/src/random.c" />
|
||||
<file file_name="../../wolfcrypt/src/ripemd.c" />
|
||||
<file file_name="../../wolfcrypt/src/rsa.c" />
|
||||
|
||||
@@ -73,8 +73,9 @@
|
||||
<file file_name="../../wolfcrypt/src/ge_low_mem.c" />
|
||||
<file file_name="../../wolfcrypt/src/ge_operations.c" />
|
||||
<file file_name="../../wolfcrypt/src/hash.c" />
|
||||
<file file_name="../../wolfcrypt/src/kdf.c" />
|
||||
<file file_name="../../wolfcrypt/src/hc128.c" />
|
||||
<file file_name="../../wolfcrypt/src/hmac.c" />
|
||||
<file file_name="../../wolfcrypt/src/idea.c" />
|
||||
<file file_name="../../wolfcrypt/src/include.am" />
|
||||
<file file_name="../../wolfcrypt/src/integer.c" />
|
||||
<file file_name="../../wolfcrypt/src/logging.c" />
|
||||
@@ -91,6 +92,7 @@
|
||||
<file file_name="../../wolfcrypt/src/pkcs7.c" />
|
||||
<file file_name="../../wolfcrypt/src/poly1305.c" />
|
||||
<file file_name="../../wolfcrypt/src/pwdbased.c" />
|
||||
<file file_name="../../wolfcrypt/src/rabbit.c" />
|
||||
<file file_name="../../wolfcrypt/src/random.c" />
|
||||
<file file_name="../../wolfcrypt/src/ripemd.c" />
|
||||
<file file_name="../../wolfcrypt/src/rsa.c" />
|
||||
|
||||
@@ -273,6 +273,13 @@
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>2170607d-803e-45b0-80af-6507d495a8de</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="980e2f67-afb3-4b48-bc51-8de94240ee4f">
|
||||
<Name>hc128.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\..\..\..\..\wolfcrypt\src\hc128.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>2170607d-803e-45b0-80af-6507d495a8de</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="85c26e25-fbfe-4ece-afca-4d142c6ea135">
|
||||
<Name>hmac.c</Name>
|
||||
<Type>File</Type>
|
||||
@@ -280,6 +287,13 @@
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>2170607d-803e-45b0-80af-6507d495a8de</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="74663551-9e8b-4269-9c36-d538d56a3414">
|
||||
<Name>idea.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\..\..\..\..\wolfcrypt\src\idea.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>2170607d-803e-45b0-80af-6507d495a8de</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="d2806186-287c-47e3-bf79-8daa033201cb">
|
||||
<Name>integer.c</Name>
|
||||
<Type>File</Type>
|
||||
@@ -287,13 +301,6 @@
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>2170607d-803e-45b0-80af-6507d495a8de</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="3e659978-d6e8-4d27-b8f7-6215eca64a09">
|
||||
<Name>kdf.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\..\..\..\..\wolfcrypt\src\kdf.c</RelativePath>
|
||||
<ParentItem>2170607d-803e-45b0-80af-6507d495a8de</ParentItem>
|
||||
<Property>2d70eb4e-e44a-4902-85bd-c2213863b503</Property>
|
||||
</Instance>
|
||||
<Instance Guid="83d865e6-46a2-49da-8549-b021d2114a0e">
|
||||
<Name>logging.c</Name>
|
||||
<Type>File</Type>
|
||||
@@ -357,6 +364,13 @@
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>2170607d-803e-45b0-80af-6507d495a8de</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="97304576-9ee3-46bd-933a-d30ce60633b0">
|
||||
<Name>rabbit.c</Name>
|
||||
<Type>File</Type>
|
||||
<RelativePath>..\..\..\..\..\wolfcrypt\src\rabbit.c</RelativePath>
|
||||
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
|
||||
<ParentItem>2170607d-803e-45b0-80af-6507d495a8de</ParentItem>
|
||||
</Instance>
|
||||
<Instance Guid="91aab859-8af5-44f1-a8c9-e80cce8db8ac">
|
||||
<Name>random.c</Name>
|
||||
<Type>File</Type>
|
||||
@@ -621,69 +635,75 @@
|
||||
<SourceItemType32>CSource</SourceItemType32>
|
||||
<SourceItemGuid33>1529a7d4-0b6c-4ea8-900a-ec81b5eac904</SourceItemGuid33>
|
||||
<SourceItemType33>CSource</SourceItemType33>
|
||||
<SourceItemGuid34>980e2f67-afb3-4b48-bc51-8de94240ee4f</SourceItemGuid34>
|
||||
<SourceItemType34>CSource</SourceItemType34>
|
||||
<SourceItemGuid35>85c26e25-fbfe-4ece-afca-4d142c6ea135</SourceItemGuid35>
|
||||
<SourceItemType35>CSource</SourceItemType35>
|
||||
<SourceItemGuid37>d2806186-287c-47e3-bf79-8daa033201cb</SourceItemGuid36>
|
||||
<SourceItemType37>CSource</SourceItemType36>
|
||||
<SourceItemGuid38>83d865e6-46a2-49da-8549-b021d2114a0e</SourceItemGuid37>
|
||||
<SourceItemType38>CSource</SourceItemType37>
|
||||
<SourceItemGuid39>d2f5a477-e313-47c6-acd6-094c38f1ab1a</SourceItemGuid38>
|
||||
<SourceItemType39>CSource</SourceItemType38>
|
||||
<SourceItemGuid40>f45859b1-b772-490f-a33a-b5b4a5a3c588</SourceItemGuid39>
|
||||
<SourceItemType40>CSource</SourceItemType39>
|
||||
<SourceItemGuid41>b471977c-7300-4655-bd30-3796dc3d258e</SourceItemGuid40>
|
||||
<SourceItemType41>CSource</SourceItemType40>
|
||||
<SourceItemGuid42>3fdef9c1-79c2-4de3-b252-9e999235ac35</SourceItemGuid41>
|
||||
<SourceItemType42>CSource</SourceItemType41>
|
||||
<SourceItemGuid43>209f29fe-f9fe-4822-ab88-9feaad450052</SourceItemGuid42>
|
||||
<SourceItemType43>CSource</SourceItemType42>
|
||||
<SourceItemGuid44>9d5b45a5-4bed-444b-915c-b002bc2a2fa6</SourceItemGuid43>
|
||||
<SourceItemType44>CSource</SourceItemType43>
|
||||
<SourceItemGuid45>3ede6353-7678-4ee8-9a02-eab7215dc75a</SourceItemGuid44>
|
||||
<SourceItemType45>CSource</SourceItemType44>
|
||||
<SourceItemGuid46>9bf244df-506e-4b4c-ad2f-e5dc9ee7dd98</SourceItemGuid45>
|
||||
<SourceItemType46>CSource</SourceItemType45>
|
||||
<SourceItemGuid47>91aab859-8af5-44f1-a8c9-e80cce8db8ac</SourceItemGuid46>
|
||||
<SourceItemType47>CSource</SourceItemType46>
|
||||
<SourceItemGuid48>344691e8-47e1-4656-8d67-554b79beeb09</SourceItemGuid47>
|
||||
<SourceItemType48>CSource</SourceItemType47>
|
||||
<SourceItemGuid49>c70b46e7-e59d-4f63-b374-25c07445cbd9</SourceItemGuid48>
|
||||
<SourceItemType49>CSource</SourceItemType48>
|
||||
<SourceItemGuid50>84abe674-65a0-4a83-9950-b3b2de5541e8</SourceItemGuid49>
|
||||
<SourceItemType50>CSource</SourceItemType49>
|
||||
<SourceItemGuid51>97a9f706-2d1d-423b-ae9d-67f1953b4646</SourceItemGuid50>
|
||||
<SourceItemType51>CSource</SourceItemType50>
|
||||
<SourceItemGuid52>43097e29-0472-439a-94e3-12705379cb30</SourceItemGuid51>
|
||||
<SourceItemType52>CSource</SourceItemType51>
|
||||
<SourceItemGuid53>953be9ae-7876-4d95-bccf-4d9872e5893e</SourceItemGuid52>
|
||||
<SourceItemType53>CSource</SourceItemType52>
|
||||
<SourceItemGuid54>811d4212-787b-4006-a87f-eb5c82ff497b</SourceItemGuid53>
|
||||
<SourceItemType54>CSource</SourceItemType53>
|
||||
<SourceItemGuid55>eb209abd-c2f3-40fc-b36d-3489af8c2789</SourceItemGuid54>
|
||||
<SourceItemType55>CSource</SourceItemType54>
|
||||
<SourceItemGuid56>27b7c24f-ed90-4cdf-9e0f-8b8c97d1ef3d</SourceItemGuid55>
|
||||
<SourceItemType56>CSource</SourceItemType55>
|
||||
<SourceItemGuid57>9a47b4ee-7f6b-4b54-914a-d52b6c697869</SourceItemGuid56>
|
||||
<SourceItemType57>CSource</SourceItemType56>
|
||||
<SourceItemGuid58>b1390d66-373b-4f43-9ec5-024078ccd77e</SourceItemGuid57>
|
||||
<SourceItemType58>CSource</SourceItemType57>
|
||||
<SourceItemGuid59>815a4f81-17bf-43d9-8891-bbe2d22555a9</SourceItemGuid58>
|
||||
<SourceItemType59>CSource</SourceItemType58>
|
||||
<SourceItemGuid60>51299014-db14-4e23-a579-ae04ec1ff314</SourceItemGuid59>
|
||||
<SourceItemType60>CSource</SourceItemType59>
|
||||
<SourceItemGuid61>17e90222-3ae5-41b9-a3be-70013eae67f2</SourceItemGuid60>
|
||||
<SourceItemType61>CSource</SourceItemType60>
|
||||
<SourceItemGuid62>75311d1a-e849-465b-bb0b-77546709e1ec</SourceItemGuid61>
|
||||
<SourceItemType62>CSource</SourceItemType61>
|
||||
<SourceItemGuid63>52c93bf0-a1fe-4691-afab-4b9811aade10</SourceItemGuid62>
|
||||
<SourceItemType63>CSource</SourceItemType62>
|
||||
<SourceItemGuid64>317a55ec-33e2-45da-be24-8bc5730885fe</SourceItemGuid63>
|
||||
<SourceItemType64>CSource</SourceItemType63>
|
||||
<SourceItemGuid65>221078b7-a232-4160-8909-cbc48b3f6a2a</SourceItemGuid64>
|
||||
<SourceItemType65>CSource</SourceItemType64>
|
||||
<SourceItemGuid66>d1a109cd-a5af-4f79-8bef-7acd6d46c8db</SourceItemGuid65>
|
||||
<SourceItemType66>CSource</SourceItemType65>
|
||||
<SourceItemCount>66</SourceItemCount>
|
||||
<SourceItemGuid36>74663551-9e8b-4269-9c36-d538d56a3414</SourceItemGuid36>
|
||||
<SourceItemType36>CSource</SourceItemType36>
|
||||
<SourceItemGuid37>d2806186-287c-47e3-bf79-8daa033201cb</SourceItemGuid37>
|
||||
<SourceItemType37>CSource</SourceItemType37>
|
||||
<SourceItemGuid38>83d865e6-46a2-49da-8549-b021d2114a0e</SourceItemGuid38>
|
||||
<SourceItemType38>CSource</SourceItemType38>
|
||||
<SourceItemGuid39>d2f5a477-e313-47c6-acd6-094c38f1ab1a</SourceItemGuid39>
|
||||
<SourceItemType39>CSource</SourceItemType39>
|
||||
<SourceItemGuid40>f45859b1-b772-490f-a33a-b5b4a5a3c588</SourceItemGuid40>
|
||||
<SourceItemType40>CSource</SourceItemType40>
|
||||
<SourceItemGuid41>b471977c-7300-4655-bd30-3796dc3d258e</SourceItemGuid41>
|
||||
<SourceItemType41>CSource</SourceItemType41>
|
||||
<SourceItemGuid42>3fdef9c1-79c2-4de3-b252-9e999235ac35</SourceItemGuid42>
|
||||
<SourceItemType42>CSource</SourceItemType42>
|
||||
<SourceItemGuid43>209f29fe-f9fe-4822-ab88-9feaad450052</SourceItemGuid43>
|
||||
<SourceItemType43>CSource</SourceItemType43>
|
||||
<SourceItemGuid44>9d5b45a5-4bed-444b-915c-b002bc2a2fa6</SourceItemGuid44>
|
||||
<SourceItemType44>CSource</SourceItemType44>
|
||||
<SourceItemGuid45>3ede6353-7678-4ee8-9a02-eab7215dc75a</SourceItemGuid45>
|
||||
<SourceItemType45>CSource</SourceItemType45>
|
||||
<SourceItemGuid46>9bf244df-506e-4b4c-ad2f-e5dc9ee7dd98</SourceItemGuid46>
|
||||
<SourceItemType46>CSource</SourceItemType46>
|
||||
<SourceItemGuid47>97304576-9ee3-46bd-933a-d30ce60633b0</SourceItemGuid47>
|
||||
<SourceItemType47>CSource</SourceItemType47>
|
||||
<SourceItemGuid48>91aab859-8af5-44f1-a8c9-e80cce8db8ac</SourceItemGuid48>
|
||||
<SourceItemType48>CSource</SourceItemType48>
|
||||
<SourceItemGuid49>344691e8-47e1-4656-8d67-554b79beeb09</SourceItemGuid49>
|
||||
<SourceItemType49>CSource</SourceItemType49>
|
||||
<SourceItemGuid50>c70b46e7-e59d-4f63-b374-25c07445cbd9</SourceItemGuid50>
|
||||
<SourceItemType50>CSource</SourceItemType50>
|
||||
<SourceItemGuid51>84abe674-65a0-4a83-9950-b3b2de5541e8</SourceItemGuid51>
|
||||
<SourceItemType51>CSource</SourceItemType51>
|
||||
<SourceItemGuid52>97a9f706-2d1d-423b-ae9d-67f1953b4646</SourceItemGuid52>
|
||||
<SourceItemType52>CSource</SourceItemType52>
|
||||
<SourceItemGuid53>43097e29-0472-439a-94e3-12705379cb30</SourceItemGuid53>
|
||||
<SourceItemType53>CSource</SourceItemType53>
|
||||
<SourceItemGuid54>953be9ae-7876-4d95-bccf-4d9872e5893e</SourceItemGuid54>
|
||||
<SourceItemType54>CSource</SourceItemType54>
|
||||
<SourceItemGuid55>811d4212-787b-4006-a87f-eb5c82ff497b</SourceItemGuid55>
|
||||
<SourceItemType55>CSource</SourceItemType55>
|
||||
<SourceItemGuid56>eb209abd-c2f3-40fc-b36d-3489af8c2789</SourceItemGuid56>
|
||||
<SourceItemType56>CSource</SourceItemType56>
|
||||
<SourceItemGuid57>27b7c24f-ed90-4cdf-9e0f-8b8c97d1ef3d</SourceItemGuid57>
|
||||
<SourceItemType57>CSource</SourceItemType57>
|
||||
<SourceItemGuid58>9a47b4ee-7f6b-4b54-914a-d52b6c697869</SourceItemGuid58>
|
||||
<SourceItemType58>CSource</SourceItemType58>
|
||||
<SourceItemGuid59>b1390d66-373b-4f43-9ec5-024078ccd77e</SourceItemGuid59>
|
||||
<SourceItemType59>CSource</SourceItemType59>
|
||||
<SourceItemGuid60>815a4f81-17bf-43d9-8891-bbe2d22555a9</SourceItemGuid60>
|
||||
<SourceItemType60>CSource</SourceItemType60>
|
||||
<SourceItemGuid61>51299014-db14-4e23-a579-ae04ec1ff314</SourceItemGuid61>
|
||||
<SourceItemType61>CSource</SourceItemType61>
|
||||
<SourceItemGuid62>17e90222-3ae5-41b9-a3be-70013eae67f2</SourceItemGuid62>
|
||||
<SourceItemType62>CSource</SourceItemType62>
|
||||
<SourceItemGuid63>75311d1a-e849-465b-bb0b-77546709e1ec</SourceItemGuid63>
|
||||
<SourceItemType63>CSource</SourceItemType63>
|
||||
<SourceItemGuid64>52c93bf0-a1fe-4691-afab-4b9811aade10</SourceItemGuid64>
|
||||
<SourceItemType64>CSource</SourceItemType64>
|
||||
<SourceItemGuid65>317a55ec-33e2-45da-be24-8bc5730885fe</SourceItemGuid65>
|
||||
<SourceItemType65>CSource</SourceItemType65>
|
||||
<SourceItemGuid66>221078b7-a232-4160-8909-cbc48b3f6a2a</SourceItemGuid66>
|
||||
<SourceItemType66>CSource</SourceItemType66>
|
||||
<SourceItemGuid67>d1a109cd-a5af-4f79-8bef-7acd6d46c8db</SourceItemGuid67>
|
||||
<SourceItemType67>CSource</SourceItemType67>
|
||||
<SourceItemCount>68</SourceItemCount>
|
||||
<LastDeviceChangedCounter>1</LastDeviceChangedCounter>
|
||||
</Instance>
|
||||
<Instance Guid="9e208646-ccba-4100-a676-29b1efe6545f">
|
||||
@@ -1704,10 +1724,18 @@
|
||||
<ItemAddTime>636575488940589048</ItemAddTime>
|
||||
<ItemAddTimeCount>27</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="980e2f67-afb3-4b48-bc51-8de94240ee4f">
|
||||
<ItemAddTime>636575488940589048</ItemAddTime>
|
||||
<ItemAddTimeCount>28</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="85c26e25-fbfe-4ece-afca-4d142c6ea135">
|
||||
<ItemAddTime>636575488940589048</ItemAddTime>
|
||||
<ItemAddTimeCount>29</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="74663551-9e8b-4269-9c36-d538d56a3414">
|
||||
<ItemAddTime>636575488940589048</ItemAddTime>
|
||||
<ItemAddTimeCount>30</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="d2806186-287c-47e3-bf79-8daa033201cb">
|
||||
<ItemAddTime>636575488940589048</ItemAddTime>
|
||||
<ItemAddTimeCount>31</ItemAddTimeCount>
|
||||
@@ -1748,6 +1776,10 @@
|
||||
<ItemAddTime>636575488940589048</ItemAddTime>
|
||||
<ItemAddTimeCount>40</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="97304576-9ee3-46bd-933a-d30ce60633b0">
|
||||
<ItemAddTime>636575488940589048</ItemAddTime>
|
||||
<ItemAddTimeCount>41</ItemAddTimeCount>
|
||||
</Instance>
|
||||
<Instance Guid="91aab859-8af5-44f1-a8c9-e80cce8db8ac">
|
||||
<ItemAddTime>636575488940589048</ItemAddTime>
|
||||
<ItemAddTimeCount>42</ItemAddTimeCount>
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
## Project Summary
|
||||
|Item|Name/Version|
|
||||
|:--|:--|
|
||||
|Board|DK-S7G2|
|
||||
|Toolchain|GCC ARM Embedded|
|
||||
|SSP Version|1.7.0|
|
||||
|
||||
|
||||
## Building wolfSSL For DK-S7G2
|
||||
|
||||
|
||||
149
IDE/Renesas/e2studio/GR-ROSE/README
Normal file
149
IDE/Renesas/e2studio/GR-ROSE/README
Normal file
@@ -0,0 +1,149 @@
|
||||
-----------------------------------------------------
|
||||
0. 初めに
|
||||
-----------------------------------------------------
|
||||
|
||||
このドキュメントではE2Studio上でwolfsslを含んだテストアプリケーションを作成する手順を示します。
|
||||
|
||||
このREADMEが含まれているフォルダには
|
||||
1.smc ---スマートコンフィギュレータ用プロジェクトが格納されているフォルダです
|
||||
2.test ---テストアプリケーション用プロジェクトが格納されているフォルダです
|
||||
3.wolfssl ---テストアプリケーションにリンクされて使用されるwolfsslライブラリ用プロジェクトが格納されているフォルダです
|
||||
4.common ---設定ファイル等が格納されたフォルダです
|
||||
|
||||
フォルダが存在しています。
|
||||
|
||||
-------------------------------------
|
||||
1.プロジェクトのインポート
|
||||
-------------------------------------
|
||||
|
||||
e2studioを起動したら、プロジェクト・エクスプローラー画面を表示させ、"ファイル"メニュー > ”ファイル・システムからプロジェクトを開く...”を選択し、
|
||||
プロジェクトインポートダイアログを表示させます。
|
||||
|
||||
ディレクトリボタンを押して、上記の1~3のフォルダの3プロジェクトをインポートしてください。
|
||||
|
||||
-------------------------------------
|
||||
2.smcプロジェクトでソースファイルを生成させる
|
||||
-------------------------------------
|
||||
|
||||
smcプロジェクトにはsmc.scfgファイルが既に用意してあります。
|
||||
このファイルをダブルクリックするとスマートコンフィギュレータパースペクティブが開き、複数のタブを含んだ設定ページが表示されます。
|
||||
概要タブに現在選択されているコンポーネントがバージョンとともにリストアップされています。
|
||||
これらはテストアプリケーションの実行に必要なものが設定済みとなっています。
|
||||
ボード情報、クロック設定などもGR-ROSEに合わせて設定済みです。
|
||||
|
||||
設定が必要な個所は、
|
||||
コンポーネントタブで r_t4_rx コンポーネントの設定を表示させます。ここで、次のプロパティの値
|
||||
#IP address for ch0,when DHCP disable.
|
||||
|
||||
として、GR-ROSEに設定するIPv4アドレスを皆さんの環境に合った値に設定してください。
|
||||
ここだけが設定が必要な個所です。
|
||||
|
||||
設定を保存し、画面右上のソースファイル生成ボタンを押してソースファイルを生成させてください。
|
||||
|
||||
-------------------------------------
|
||||
3.testプロジェクトに生成させたソースファイルをコピーする
|
||||
-------------------------------------
|
||||
|
||||
e2studioのプロジェクト・エクスプローラー画面のtestプロジェクトのフォルダを展開すると、
|
||||
srcフォルダがあります。このフォルダに、smcプロジェクトフォルダ内のsrc/smc_genをコピーしてください。
|
||||
|
||||
-------------------------------------
|
||||
4.testプロジェクトの動作を選択する
|
||||
-------------------------------------
|
||||
|
||||
テストアプリケーションは、暗号化テスト、ベンチマーク、TLSクライアント、TLSサーバーの
|
||||
4種類の動作を選択できます。選択は、common/user_settings.hの
|
||||
定義文を有効化することで行います。
|
||||
|
||||
-------------------------------------
|
||||
5.wolfsslプロジェクト、testプロジェクトをビルドする
|
||||
-------------------------------------
|
||||
|
||||
ビルド前に必ず上記4の設定が終わっていることを確認してください。
|
||||
ビルドはwolfssl,testの順に行います。
|
||||
|
||||
-------------------------------------
|
||||
6.エミュレータを使ってtestアプリケーションを実行する
|
||||
-------------------------------------
|
||||
|
||||
エミュレータとターゲットボードとPCをケーブルで接続したら、すでに、test HardwareDebug.launchが用意してありますから
|
||||
e2studioの”実行” >”デバッグ”を選択してデバッグを開始してください。
|
||||
|
||||
お手持ちのエミュレータが異なる場合はデバッグ構成を変更して上記ファイルを更新してください。
|
||||
|
||||
|
||||
=================================================================================
|
||||
|
||||
-----------------------------------------------------
|
||||
0. About this document
|
||||
-----------------------------------------------------
|
||||
|
||||
This document will show you how to create a test application containing wolfssl on E2Studio.
|
||||
|
||||
The folder that contains this README has:
|
||||
1.smc --- the folder where the smart configurator project is stored.
|
||||
2.test --- the folder where the test application project is stored
|
||||
3. wolfssl --- the folder where the project for the wolfssl library used by the test application is stored.
|
||||
4.common --- the folder where the configuration files etc. are stored
|
||||
|
||||
|
||||
-------------------------------------
|
||||
1. Import projects
|
||||
-------------------------------------
|
||||
|
||||
After starting e2studio, display the project explorer screen,
|
||||
select "File" menu> "Open project from file system...",
|
||||
Display the project import dialog.
|
||||
|
||||
Press the directory button and import the 3 projects in the folders 1 to 3 above.
|
||||
|
||||
-------------------------------------
|
||||
2. Generate source files in smc project
|
||||
-------------------------------------
|
||||
|
||||
The smc.scfg file is already prepared in the smc project.
|
||||
Double-clicking on this file will open the Smart Configurator perspective,
|
||||
displaying a configuration page with multiple tabs.
|
||||
The components currently selected in the Overview tab are listed along with their version.
|
||||
These are already set up to run the test application.
|
||||
Board information and clock settings are already set according to GR-ROSE.
|
||||
|
||||
The points that need to be set are
|
||||
Display the r_t4_rx component settings in the component tab. Where the value of the following property
|
||||
#IP address for ch0,when DHCP disable.
|
||||
|
||||
Then, set the IPv4 address set in GR-ROSE to a value that suits your environment.
|
||||
This is the only place that needs to be set.
|
||||
|
||||
Save the settings and press the source file generation button at the top right of the screen to generate the source file.
|
||||
|
||||
-------------------------------------
|
||||
3. Copy the source files generated in the test project
|
||||
-------------------------------------
|
||||
|
||||
When you expand the test project folder on the e2studio Project Explorer screen,
|
||||
There is a src folder. Copy src/smc_gen in the smc project folder to test/src folder.
|
||||
|
||||
-------------------------------------
|
||||
4. Select the behavior of the test project
|
||||
-------------------------------------
|
||||
|
||||
Test applications include encryption test, benchmark, TLS client, TLS server
|
||||
You can select four types of operation. Select from common/user_settings.h
|
||||
This is done by activating one of those commented definition statements.
|
||||
|
||||
-------------------------------------
|
||||
5. Build wolfssl project, test project
|
||||
-------------------------------------
|
||||
|
||||
Make sure that the above 4 settings are completed before building.
|
||||
Build in order of wolfssl and test.
|
||||
|
||||
-------------------------------------
|
||||
6. Run the test application using the emulator
|
||||
-------------------------------------
|
||||
|
||||
After connecting the emulator, target board and PC with a cable, test HardwareDebug.launch is already prepared.
|
||||
Select "Run"> "Debug" in e2 studio to start debugging.
|
||||
|
||||
If the emulator you have is different, change the debug configuration and update the above file.
|
||||
@@ -23,8 +23,8 @@
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define WOLFSSL_RENESAS_RX65N
|
||||
|
||||
#define WOLFSSL_RENESAS_RX65N
|
||||
/*#define WOLFSSL_RENESAS_RX72N*/
|
||||
|
||||
|
||||
/*-- Renesas TSIP usage and its version ---------------------------------------
|
||||
@@ -35,16 +35,15 @@
|
||||
* "WOLFSSL_RENESAS_TSIP_VER" takes following value:
|
||||
* 106: TSIPv1.06
|
||||
* 109: TSIPv1.09
|
||||
* 113: TSIPv1.13
|
||||
* 114: TSIPv1.14
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define WOLFSSL_RENESAS_TSIP
|
||||
#define WOLFSSL_RENESAS_TSIP_VER 114
|
||||
#define WOLFSSL_RENESAS_TSIP_VER 109
|
||||
|
||||
|
||||
/*-- TLS version definitions --------------------------------------------------
|
||||
*
|
||||
* wolfSSL supports TLSv1.2 by default. In case you want your system to support
|
||||
* wolfSSL supports TLSv1.2 by default. In case you want your system suppots
|
||||
* TLSv1.3, uncomment line below.
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
@@ -53,7 +52,7 @@
|
||||
|
||||
/*-- Operating System related definitions --------------------------------------
|
||||
*
|
||||
* In case any real-time OS is used, define its name(e.g. FREERTOS).
|
||||
* In case any realtime OS is used, define its name(e.g. FREERTOS).
|
||||
* Otherwise, define "SINGLE_THREADED". They are exclusive each other.
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
@@ -67,7 +66,7 @@
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#define NO_DEV_RANDOM
|
||||
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
#define WOLFSSL_DH_CONST
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
|
||||
@@ -83,40 +82,7 @@
|
||||
|
||||
#define WOLFSSL_STATIC_RSA
|
||||
|
||||
/* 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
|
||||
* the example applications with TSIP, enable this macro.
|
||||
* 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_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
|
||||
* 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
|
||||
* for RSA authentication.
|
||||
*/
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
|
||||
|
||||
/*-- Misc definitions ---------------------------------------------------------
|
||||
*
|
||||
*
|
||||
@@ -134,7 +100,7 @@
|
||||
* "NO_ASN_TIME" macro. And prepare time function to get calender time,
|
||||
* otherwise, certificate expiration validation will not work.
|
||||
*/
|
||||
/*#define NO_ASN_TIME*/
|
||||
#define NO_ASN_TIME
|
||||
|
||||
#define NO_MAIN_DRIVER
|
||||
#define BENCH_EMBEDDED
|
||||
@@ -148,18 +114,17 @@
|
||||
#define NO_WRITEV
|
||||
#define WOLFSSL_USER_IO
|
||||
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
#define WOLFSSL_USER_CURRTIME
|
||||
#define USER_TIME
|
||||
#define XTIME time
|
||||
#define USE_WOLF_SUSECONDS_T
|
||||
#define USE_WOLF_TIMEVAL_T
|
||||
|
||||
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
#define WC_RSA_BLINDING
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
|
||||
|
||||
/*-- Debugging options ------------------------------------------------------
|
||||
*
|
||||
* "DEBUG_WOLFSSL" definition enables log to output into stdout.
|
||||
@@ -168,7 +133,7 @@
|
||||
|
||||
/*#define DEBUG_WOLFSSL*/
|
||||
|
||||
/*-- Definitions for functionality negation -----------------------------------
|
||||
/*-- Definitions for fuctionality negation -----------------------------------
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
@@ -176,9 +141,6 @@
|
||||
/*#define NO_RENESAS_TSIP_CRYPT*/
|
||||
/*#define NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION*/
|
||||
|
||||
#if defined(WOLFCRYPT_ONLY)
|
||||
#undef WOLFSSL_RENESAS_TSIP
|
||||
#endif
|
||||
|
||||
/*-- Consistency checking between definitions ---------------------------------
|
||||
*
|
||||
@@ -203,8 +165,6 @@
|
||||
#define WOLFSSL_RENESAS_TSIP_CRYPT
|
||||
#define WOLFSSL_RENESAS_TSIP_TLS
|
||||
#define WOLFSSL_RENESAS_TSIP_TLS_AES_CRYPT
|
||||
#define HAVE_PK_CALLBACKS
|
||||
#define WOLF_CRYPTO_CB
|
||||
#endif
|
||||
|
||||
#else
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
typedef unsigned long time_t;
|
||||
|
||||
#define YEAR 2021
|
||||
#define YEAR 2020
|
||||
#define MON 7
|
||||
|
||||
static int tick = 0;
|
||||
23
IDE/Renesas/e2studio/GR-ROSE/include.am
Normal file
23
IDE/Renesas/e2studio/GR-ROSE/include.am
Normal file
@@ -0,0 +1,23 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/README
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/wolfssl/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/wolfssl/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/test_HardwareDebug.launch
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/src/test_main.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/src/key_data.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/src/key_data.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/src/wolf_client.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/src/wolf_server.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/src/wolfssl_demo.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/common/wolfssl_dummy.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/common/strings.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/common/unistd.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/common/user_settings.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/smc/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/smc/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/smc/smc.scfg
|
||||
@@ -43,21 +43,20 @@
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.4886222" name="浮動小数点演算命令を使用する (-fpu/-nofpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.yes" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include.1248634269" name="インクルード・ファイルを検索するフォルダ (-include)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${TCINSTALL}/include"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/general}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/Config_TMR0}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_pincfg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_config}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_cmt_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_cmt_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_ether_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/general}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_pincfg}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userBefore.1431645164" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
@@ -78,7 +77,7 @@
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userAfter.214576131" name="追加するオプション(すべての指定オプションの後ろに追加) " superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.1261556953" name="プログラムの文字コード (-euc/-sjis/-latin1/-utf8/-big5/-gb2312)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.utf8" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.1261556953" name="プログラムの文字コード (-euc/-sjis/-latin1/-big5/-gb2312)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.utf8" valueType="enumerated"/>
|
||||
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType.756564181" name="Assembler InputType" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker.1339846431" name="Linker" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker">
|
||||
@@ -101,7 +100,6 @@
|
||||
<listOptionValue builtIn="false" value="".\smc.lib""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile.1233488024" name="リンクするリロケータブル・ファイル、ライブラリ・ファイルおよびバイナリ・ファイル (-input/-library/-binary)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx/lib/ccrx/r_tsip_rx65n_little.lib}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib/ccrx/T4_Library_ether_ccrx_rxv1_little.lib}""/>
|
||||
</option>
|
||||
</tool>
|
||||
@@ -122,7 +120,6 @@
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userAfter.291317464" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.typeOfOutputFile.342553276" name="出力ファイル形式 (-form)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.typeOfOutputFile" value="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.typeOFOutputFile.none" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig.287664454" name="RTOS Configurator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig"/>
|
||||
</toolChain>
|
||||
@@ -143,4 +140,4 @@
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cproject>
|
||||
</cproject>
|
||||
@@ -5,11 +5,6 @@
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.renesas.smc.ui.pgsupport.SCContentBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user