Compare commits

...

596 Commits

Author SHA1 Message Date
e116c89a58 Merge pull request #2906 from ejohnstown/release-rollup
Release Rollup
2020-04-22 10:43:44 -07:00
83152c767f touch dates 2020-04-21 10:50:59 -07:00
bf680b4a92 Fix for QAT with Shake256. Fix for XFREE missing semicolon. 2020-04-21 10:38:27 -07:00
7b6cc2056b Update release date in readme and changelog. 2020-04-21 10:21:59 -07:00
ccd096e1bb Memory Leak Fix
1. In `wolfSSL_d2i_DHparams()`, when setting the internal key on a
   WOLFSSL_KEY, set the flag inSet.
2. Not a leak, but in `wolfSSL_EVP_PKEY_set1_DH()`, only allocate one
   buffer to store the flat key. Saves an alloc, memcpy, and free.
2020-04-21 10:21:59 -07:00
61f3783111 Fixes to test.c for the following build configurations:
1. ./configure --disable-rsa --enable-certgen --enable-certreq
2. ./configure --disable-ecc --enable-pkcs7
2020-04-21 10:21:59 -07:00
c134626946 Update credit names on vuln notice in README. 2020-04-21 10:21:59 -07:00
087675e31e Update the RPM build spec. 2020-04-21 10:21:59 -07:00
4331b7df18 Update the VS library build resource. 2020-04-21 10:21:58 -07:00
bf4f50ab93 Add Azure Sphere file missing from release. 2020-04-21 10:21:58 -07:00
a29eac035b Update credit for vulnerability report. 2020-04-21 10:21:58 -07:00
836e77508d Remove notes for reverted DTLS commits. 2020-04-21 10:21:58 -07:00
7cbf496329 Encrypt key requirements check
The file wc_encrypt.c offers a function named wc_CryptKey(), which
requires PWDBASED and ASN. Added the check for ASN.
2020-04-21 10:21:58 -07:00
e84cd1a887 Updated the README file and ChangeLog for some spelling and omissions. 2020-04-21 10:21:58 -07:00
27011ff7ff Release Rollup
1. Update configure with the new version.
2. Update the ChangeLog.
3. Update the readme.
2020-04-21 10:21:53 -07:00
0cfde0794b Merge pull request #2848 from julek-wolfssl/wpa-supplicant-openssl-compat
Added partial support for wpa_supplicant, hostapd, and cjose:
2020-04-20 12:17:55 -06:00
f87f09fcd7 Merge pull request #2910 from embhorn/zd10169
Fix forbidden iv length 0 with AES-GCM
2020-04-16 16:01:03 -07:00
6b3642db36 Fix forbidden iv length 0 with AES-GCM 2020-04-16 13:48:56 -05:00
75deec250c Merge pull request #2908 from ejohnstown/dtls-revert
DTLS Revert
2020-04-16 09:58:48 -07:00
9918ee8b68 Merge pull request #2907 from SparkiDev/sp_arm64_reg
SP ARM64 - use fewer registers in mont_reduces
2020-04-16 09:58:07 -07:00
dd68074104 Fix merge issues 2020-04-16 10:09:15 +02:00
40ea386509 Revert "DTLS Fix"
This reverts commit 04dcb8f774.
2020-04-15 21:33:33 -07:00
78a9185d0b Revert "DTLS Fuzz Fix"
This reverts commit 70d03f3ba0.
2020-04-15 21:33:27 -07:00
da5d9a923b SP ARM64 - use fewer registers in mont_reduces 2020-04-16 09:20:04 +10:00
36403c1dad Merge remote-tracking branch 'wolfSSL/master' into wpa-supplicant-openssl-compat 2020-04-15 16:55:03 +02:00
1d3fd5cd07 Code review
- make `wc_ecc_export_point_der_compressed` a local function
- use `int` for `shortKeySize` in `wc_ecc_import_point_der_ex`
- check for null return value from `wolfSSL_OBJ_nid2obj` and `wolfSSL_d2i_PUBKEY`
- add comments to `ssl.c`
- check `lnlen` in `wolfSSL_OBJ_ln2nid`
2020-04-15 12:53:38 +02:00
ebb490204a Merge pull request #2898 from embhorn/zd9856
Fix EVP API to return NID types / SHA3 for RSA sign
2020-04-14 16:09:00 -07:00
f97a56b9ce Merge pull request #2905 from ejohnstown/dtls-fuzz
DTLS Fuzz Fix
2020-04-14 14:19:09 -07:00
d9472b895f Fix conflicts after rebase 2020-04-14 15:24:52 -05:00
19ca00bcd4 Adding support for SHA3 in wolfSSL_RSA_sign_ex 2020-04-14 14:31:00 -05:00
1487917214 Fix EVP_MD_CTX_type to return NID 2020-04-14 14:27:21 -05:00
be437c0bd2 Fix EVP API to use NID instead of WC_ types 2020-04-14 12:47:10 -05:00
70d03f3ba0 DTLS Fuzz Fix
Only save a next epoch message if it is in the next epoch, not any future epoch.
2020-04-14 10:13:37 -07:00
9c1b90170a Merge pull request #2903 from SparkiDev/test_4096
Fix testing using 4096 bits keys and parameters
2020-04-14 09:25:00 -07:00
06c6e583c8 Merge pull request #2891 from julek-wolfssl/refactor-evp-functions
Move EVP functions to evp.c
2020-04-14 09:22:51 -07:00
a2892f66c0 Merge pull request #2889 from JacobBarthelmeh/SanityChecks
sanity check on input length before secure renegotiation compare
2020-04-14 09:21:29 -07:00
b6d6b1db77 Added new DH 4096-bit key to gencertbuf.pl. 2020-04-14 07:11:07 -07:00
dad0bc0159 Keep compatibility with old OPENSSL_EXTRA_X509_SMALL functions 2020-04-14 12:52:23 +02:00
0b3a331265 Revert wc_OBJ_sn2nid 2020-04-14 11:48:14 +02:00
0ded4d4ccb wolfSSL_RSA_*_PKCS1_PSS rewrite 2020-04-14 11:48:14 +02:00
89f7a51838 Add option to enable DPP support in wpa_supplicant (note DPP not yet supported as of this commit) 2020-04-14 11:48:14 +02:00
20e669a65a New API
Add `wc_ecc_import_point_der_ex` for correct importing DER ECC point and keep `wc_ecc_import_point_der` old functionality
2020-04-14 11:48:14 +02:00
dbe4e778d3 Test fixes
- Add `parameter` to `WOLFSSL_X509_ALGOR`
- Implement `wolfSSL_ASN1_TYPE_new`, `wolfSSL_ASN1_TYPE_free`, and `wolfSSL_ASN1_TYPE_set`
- Fix leak where `pval` in `wolfSSL_X509_ALGOR_set0` was lost if `aobj` was provided
2020-04-14 11:48:14 +02:00
18093a6b0b Code review changes
- Don't include `ENABLED_OPENSSLALL` with `ENABLED_WPAS`
- Return length in `wolfSSL_i2d_DHparams`
- Implement `wolfSSL_EC_POINT_mul` with independent multiplication and addition if `ECC_SHAMIR` not defined
- Implment `ASN1_SIMPLE` without `offsetof` by using a dummy struct
- Style fixes
2020-04-14 11:48:14 +02:00
9722082372 Fix nid2* and *2nid functions 2020-04-14 11:48:14 +02:00
eb549f7095 Test fixes 2020-04-14 11:45:32 +02:00
ef5eefac91 Test fixes 2020-04-14 11:45:32 +02:00
b4d9007a48 Test fixes
Config fixes
Fix windows FIPS
2020-04-14 11:45:32 +02:00
680a481e61 Test fixes
Remove redundant macros
2020-04-14 11:45:32 +02:00
9ced70edc1 Test fixes
Free `x509->key.pkey` in `FreeX509
Fix type conversions
Fix memory leaks and use of uninitialized memory
2020-04-14 11:45:32 +02:00
73b4d78d5b Added partial support for wpa_supplicant, hostapd, and cjose:
- Moved `SetECKeyInternal` and `SetECKeyExternal` to `internal.h` to allow usage outside of `ssl.c`
- Added `asn1t.h`
- Implemented the `IMPLEMENT_ASN1_FUNCTIONS` macro for a small subset of ASN1 tags
-- So far only `X509_ALGOR` and `ASN1_BIT_STRING` are supported
- Implemented `BN_mod_add` function
- Allow for setting of `EC_KEY` export form through EC_KEY_set_conv_form
- Implemented `i2o_ECPublicKey`
- Implemented `EC_POINT_copy`
- Implemented deriving DH and ECDH keys in `EVP_PKEY_CTX`. Functions added:
-- `EVP_PKEY_derive_init`
-- `EVP_PKEY_derive_set_peer`
-- `EVP_PKEY_derive`
- Implemented `EVP_PKEY_get0_DH`
- Implemented `X509_ALGOR_new`
- Implemented `X509_ALGOR_free`
- Implemented `X509_ALGOR_set0`
- Implemented `X509_PUBKEY_new`
- Implemented `X509_PUBKEY_free`
- Implemented `X509_PUBKEY_set`
- Implemented `RSA_padding_add_PKCS1_PSS`
- Implemented `RSA_verify_PKCS1_PSS`
- Changed second parameter of `wolfSSL_d2i_PUBKEY` to be constant
- Corrected long names in `asn.h`
- Added `wc_ecc_get_generator` as a way to get the generator point of a curve
- Added `wc_ecc_export_point_der_ex` to export an ECC point in compressed or uncompressed format with one API
- Added `wc_ecc_export_point_der_compressed` to export a point in an `ecc_point` structure in compressed DER format
- Added 'wc_RsaSSL_Verify_ex` which adds the option to choose a padding type
- Added `wc_RsaPad_ex` and `wc_RsaUnPad_ex` to `rsa.h` as `WOLFSSL_LOCAL` functions
- `CopyDecodedToX509` now fills `x509->key` and `x509->algor` when populating x509
- `wolfSSL_EVP_CipherInit` now uses `wc_AesGcmSetExtIV` to set the IV so that it is copied to `ctx->iv` by `wolfSSL_StoreExternalIV`
- Added error checking to `wolfSSL_EVP_PKEY_get_der`
- `wolfSSL_X509_ALGOR_get0` now attempts to return something in all parameters
- Refactored `wolfSSL_EC_KEY_new` to use `*_new` functions when available
- Added `setupPoint` to set the internal point if not yet set
- Always set external point in `wolfSSL_ECPoint_d2i`
- Added compressed point support to `wolfSSL_EC_POINT_point2oct`
- Fix `wolfSSL_EC_POINT_mul` so that it will calculate the full `generator * n + q * m` then OpenSSL does
- Added `WOLFSSL_RSA_GetRNG` helper function to get a `WC_RNG` from `WOLFSSL_RSA`
- Correct short names in `wolfssl_object_info`
- Added all currently supported curves to `wolfssl_object_info`
- Added `oidCurveType` to `oid2nid`
- Add more padding types to `wolfSSL_RSA_public_decrypt`
- Fix `keysize` in `wc_ecc_import_point_der`
- Added tests for new additions
2020-04-14 11:45:32 +02:00
ba401c9bde Fix testing using 4096 bits keys and parameters
RSA PKCS #1.5 padding for signing is not reliant on a random.
2020-04-14 12:03:51 +10:00
416f0775d3 Merge pull request #2900 from dgarske/sp_no_malloc
Added option to build SP small without malloc
2020-04-14 09:40:11 +10:00
3cb0c600ba Merge pull request #2894 from SparkiDev/ecc_cr_fix
Change constant time and cache resistant ECC mulmod
2020-04-13 16:36:22 -07:00
f309173518 Merge pull request #2899 from embhorn/zd9564
Adding check for invalid SAN ext with no entries
2020-04-13 15:31:06 -06:00
ee0289bea6 Merge pull request #2825 from julek-wolfssl/self-include-options
OpenVPN changes
2020-04-13 13:11:18 -07:00
aadec345ab Merge pull request #2871 from vaintroub/master
Fix clang warnings (issue #2870)
2020-04-13 09:02:51 -07:00
1f5a7bffaa Build fixes for WOLFSSL_NO_MALLOC in wolfCrypt test. 2020-04-13 07:39:06 -07:00
b01ce168ea Fixes for SP small with no malloc in sp_256_ecc_mulmod_10 and sp_384_ecc_mulmod_15. 2020-04-13 07:19:06 -07:00
4748254b60 Merge pull request #2896 from embhorn/zd9916
Fix wc_KeyPemToDer with PKCS1 and empty key
2020-04-10 15:38:07 -07:00
d412ccb6f8 Added new option WOLFSSL_SP_NO_MALLOC for building small SP without malloc. Added SP documentation. Added ./configure --enable-sp=yes,nomalloc supprt. https://github.com/wolfSSL/scripts/pull/79 2020-04-10 11:13:55 -07:00
8644fdca7d Update from review 2020-04-10 08:29:31 -05:00
ffd06e359f Change constant time and cache resistant ECC mulmod
Ensure points being operated on change to make constant time.
2020-04-10 09:28:20 +10:00
0a40bbe2a9 Merge pull request #2897 from ejohnstown/omit-omit
Omit -fomit-frame-pointer from CFLAGS
2020-04-09 16:01:34 -07:00
cf8459e518 Merge pull request #2892 from SparkiDev/cppcheck_fixes_4
Fixes from cppcheck
2020-04-09 16:01:11 -07:00
7d82c4e3f2 Adding check for invalid SAN ext with no entries 2020-04-09 16:49:52 -05:00
c3e0575914 Fix from review 2020-04-09 12:52:32 -05:00
f6b9b2e0eb Remove redundant guards 2020-04-09 18:26:23 +02:00
2bf9dc4037 Merge pull request #2895 from dgarske/qat_tls13
Fix for asynchronous TLS v1.3 issue
2020-04-09 09:25:36 -07:00
9cbbd164e0 Fix test errors 2020-04-09 14:54:09 +02:00
6621465433 Merge pull request #2890 from JacobBarthelmeh/Testing
set ChaCha counter state for TLS 1.3 AEAD
2020-04-09 10:28:50 +10:00
7a6de91296 Omit -fomit-frame-pointer from CFLAGS. 2020-04-08 14:06:11 -07:00
4d6e33b1dd Fix wc_KeyPemToDer with PKCS1 and empty key 2020-04-08 11:34:24 -05:00
97d798743a Merge pull request #2893 from SparkiDev/tls13_capable_fix
Another place where TLS 1.3 capable check is required
2020-04-08 09:09:19 -07:00
5e5af8e93a Fix for asynchronous TLS v1.3 issue where connect or accept state is incorrectly advanced when there is data to queued to send. 2020-04-08 07:26:21 -07:00
7001599782 Another place where TLS 1.3 capable check is required 2020-04-08 11:36:47 +10:00
411aee6e05 Fixes from cppcheck
Added PRIVATE_D version of rsa private key operation for SP
implementation for specific platforms.
WC_NO_RNG results in warnings when RNG calls don't do anything.
Added ifdef checks for variables not used otherwise.
Remove superfluous if statements like when checking ret == 0.
Change names of globals that are generic and are used locally before
global definition.
Remove definition of variable len that isn't used except as a
replacement for sz which is parameter.
Don't subtract two variables when one has just been assigned the value
of the other.
Fix shifting of signed value.
Fix parameter checking in aes.c and des3.c for platform specific code.
2020-04-08 09:46:22 +10:00
9e08efe8e0 Merge pull request #2885 from SparkiDev/sp_x64_ecc_tweak
Tweak the SP x86_64 ECC assembly
2020-04-07 14:27:12 -07:00
6e8d3f224d Merge pull request #2888 from SparkiDev/tls13_down_rand
Fix downgrade fixed random to match spec
2020-04-07 14:22:07 -07:00
690b546260 Merge pull request #2887 from dgarske/nodir
Fix for building with `NO_WOLFSSL_DIR`
2020-04-07 14:14:34 -07:00
b6f98a3cde Merge pull request #2886 from kaleb-himes/ZD10106
Avoid leak when HAVE_AESGCM and NO_AES_DECRYPT. Thanks to G.G. on ZD …
2020-04-07 14:13:43 -07:00
4c0ea10e45 Move EVP functions to evp.c 2020-04-07 22:36:50 +02:00
ebcf86070d Merge pull request #2883 from miyazakh/esp_aescounter
add aes counter on esp32
2020-04-07 13:24:53 -07:00
77b75ef3a2 Merge pull request #2881 from dgarske/ecc_asn
Fixes for building ECC without ASN
2020-04-07 13:09:37 -07:00
dec111722f Merge pull request #2880 from SparkiDev/tls_csr_ext_empty
GNU TLS server sends empty CSR extension
2020-04-07 13:08:21 -07:00
c002df4cce Merge pull request #2879 from ejohnstown/dtls-fix
DTLS Fix
2020-04-07 13:07:30 -07:00
154dd552e9 Merge pull request #2877 from SparkiDev/tls_hmac_trunc
Allow use of truncated HMAC with TLS_hmac checking
2020-04-07 13:06:36 -07:00
65cf5a0d46 Merge pull request #2802 from embhorn/zd9764
Fix for bidirectional shutdown
2020-04-07 13:03:54 -07:00
f742693062 Merge pull request #2867 from SparkiDev/aes-ccm-aesni
For CCM using AES-NI, do 4 blocks at a time if possible
2020-04-07 13:03:23 -07:00
4a4f383485 Merge pull request #2842 from julek-wolfssl/set_curve_groups_list
Check length to avoid XSTRNCMP accessing  memory after `list`
2020-04-07 13:02:18 -07:00
bf332b459b set ChaCha counter state for TLS 1.3 AEAD 2020-04-07 10:36:23 -06:00
1ce0268477 sanity check on input length before secure renegotiation compare 2020-04-07 10:10:03 -06:00
e6affa386f Fix downgrade fixed random to match spec 2020-04-07 09:42:08 +10:00
31ea4b388c Fix for building with NO_WOLFSSL_DIR when compatibility layer is enabled. ZD 10117. 2020-04-06 10:33:16 -07:00
4ec0591e45 Avoid leak when HAVE_AESGCM and NO_AES_DECRYPT. Thanks to G.G. on ZD #10106 for the report 2020-04-06 09:43:24 -06:00
06f23223e4 Allow wolfSSL to include options.h with EXTERNAL_OPTS_OPENVPN header 2020-04-06 15:06:15 +02:00
9c67bc2864 For CCM using AES-NI, do 4 blocks at a time if possible 2020-04-06 11:11:28 +10:00
7dad0d3965 Tweak the SP x86_64 ECC assembly
Put back fixes undone in previous commits:
 - Fix casting warning in SP when mp_digit < sp_digit
 - SP fix check for NULL in EC point_new
2020-04-06 11:02:30 +10:00
302e1d6818 add aes counter on esp32 2020-04-04 14:04:44 +09:00
1831193c20 * Fixes for building ECC without ASN.
* Fix to expose `wc_ecc_import_private_key_ex` and its ability to import a private key even when `NO_ASN` is defined.
* Remove execute bit on CSharp files.
2020-04-03 10:55:31 -07:00
c0dc3091e1 GNU TLS server sends empty CSR extension 2020-04-03 16:03:41 +10:00
9a1687d00e Merge pull request #2836 from dgarske/fips_ld
Example for FIPS Linker Descriptor (.ld)
2020-04-02 14:28:30 -07:00
8128a269f3 Merge pull request #2876 from SparkiDev/sp_arm64
Improve speed of AArch64 assembly
2020-04-02 14:26:48 -07:00
48e40fac2b OpenVPN changes
Include <wolfssl/options.h> in settings.h for OpenVPN
Additional API fixes
2020-04-02 20:23:13 +02:00
6126aca387 Merge pull request #2874 from SparkiDev/tls13_cert_hash
When picking hash alg for ECC certs use key size
2020-04-02 09:52:10 -07:00
86adb7f9c5 Merge pull request #2873 from SparkiDev/aes_small
Smaller table version of the AES encrypt/decrypt
2020-04-02 09:50:58 -07:00
5df5ab5931 Merge pull request #2862 from dgarske/iar_ropi
Support for IAR with position independent code (ROPI)
2020-04-02 09:49:00 -07:00
06442c410d Merge pull request #2861 from dgarske/zynqmp
Fixes for Xilinx SDK and Zynq UltraScale+ MPSoC
2020-04-02 09:46:48 -07:00
b1a80973dd size_t -> int 2020-04-02 18:45:53 +02:00
c48ea3f567 When picking hash alg for ECC certs use key size 2020-04-02 11:53:35 +10:00
04dcb8f774 DTLS Fix
If the finished message (well, next epoch handshake message) is received,
store it. Process it after a change cipher spec message.
2020-04-01 17:17:51 -07:00
e23a6b46b0 Allow use of truncated HMAC with TLS_hmac checking 2020-04-02 08:52:40 +10:00
b1ec15de3e Only try shutdown once in example 2020-04-01 17:48:17 -05:00
3f7ce61dbd Updates from review 2020-04-01 11:14:25 -05:00
df1819b79f Improve speed of AArch64 assembly
Improve point_dbl and point_dbl_n for all platforms.
2020-04-01 15:06:50 +10:00
47d1cb8415 Changes to support IAR with position independent code (ROPI). Updated example wolfSSL IAR project to use "ropi" (Position indipendance for code and read-only data). 2020-03-31 08:17:09 -07:00
3bd52b166b Merge pull request #2863 from miyazakh/dtls_benchmark
added dtls benchmark
2020-03-27 12:06:06 -07:00
9339808ea1 Smaller table version of the AES encrypt/decrypt
Use WOLFSSL_AES_SMALL_TABLES.
Much slower. Decrypt much slower then encrypt.
2020-03-27 15:53:01 +10:00
99b9f46e58 fixed not working on mac
fixed case of -s or -c
2020-03-27 12:33:51 +09:00
ddb4b5eb89 Merge pull request #2872 from SparkiDev/rsa_pub_fix
Fix performance of RSA public key ops with TFM
2020-03-26 11:56:23 -07:00
16fa1a4747 Merge pull request #2855 from JacobBarthelmeh/PKCS12
maintenance to PKCS12 create for outputting encrypted bundles
2020-03-26 10:41:04 -07:00
1bc2ecff6a Merge pull request #2849 from dgarske/csharp_wrapper
CSharp wrapper improvements
2020-03-26 09:10:24 -06:00
c82531a41a Fix performance of RSA public key ops with TFM
Have a constant and non-constant time modular exponentation available in
tfm.c.
Call the non-constant time version explicitly when performing RSA public
key mod exp.
2020-03-26 17:33:07 +10:00
a6034a38c7 Fix for building with WOLFSSL_SMALL_STACK_CACHE only (no WOLFSSL_SMALL_STACK). 2020-03-25 16:04:45 -07:00
d57d194de3 Fix clang warnings (issue #2870)
The warning was "comparison of array 'ecc_sets[i].name' not equal to a null
pointer is always true [-Wtautological-pointer-compare]"

Compiler is correct, ecc_sets[i].name  is an array of size 16, thus
can't be NULL

Also, fix build error on Windows by changing uint8_t to "unsigned char"
(alternative fix could be including stdint.h)
2020-03-25 23:07:12 +01:00
3717982d47 Fix to build wolfssl/testsuite in Any CPU case. 2020-03-25 14:53:58 -07:00
70773f3b3e Added "WOLFSSL_ARMASM" ifdef checks on ARMv8 port files. 2020-03-25 12:54:40 -07:00
93fd1b1eeb Merge pull request #2869 from JacobBarthelmeh/Testing
add single quotes around -? in test scripts
2020-03-25 11:03:19 -07:00
083b8f680f Merge pull request #2868 from JacobBarthelmeh/Certs
refactor decrypt content with PKCS12 and fix for AES-256 + HMAC SHA25…
2020-03-25 11:02:34 -07:00
2116c20f5d add test case for PKCS12 to DER and back 2020-03-25 10:38:18 -06:00
469de9a580 Fix for CSharp solution to eliminate Debug/Release. Only DLL Debug and DLL Release should be available. 2020-03-25 08:57:58 -07:00
0a6b93fda2 add single quotes around -? in test scripts 2020-03-24 22:40:48 -06:00
59ab600d76 refactor decrypt content with PKCS12 and fix for AES-256 + HMAC SHA256 case 2020-03-24 22:23:44 -06:00
9fac21f463 replace the size at bench_embedded 2020-03-25 08:09:42 +09:00
26f539400a Merge pull request #2866 from SparkiDev/curve448_gcc_bug
Curve448 - 128-bit impl workaround for compiler
2020-03-24 09:55:43 -07:00
e66334e56b Merge pull request #2865 from SparkiDev/sp_cast_fix
Fix casting warning in SP when mp_digit < sp_digit
2020-03-24 09:52:26 -07:00
b92e5d83c5 Merge pull request #2864 from JacobBarthelmeh/ARMv8
Fix for clang warning with ARM assembly build
2020-03-24 09:51:11 -07:00
75eca61b3e address review comments 2020-03-24 20:35:21 +09:00
c95e7f88aa Curve448 - 128-bit impl workaround for compiler
Old gcc compilers can keep track of the 128-bit multiplication and left
shift results' size.
Split all multiplication and left shift results into separate variables.
Add/subtract into the correct variable at end.
Don't want variable declarations after statements so reduce doesn't use
'tr' anymore.
2020-03-24 16:28:14 +10:00
a7d265bf46 Fix casting warning in SP when mp_digit < sp_digit 2020-03-24 12:41:25 +10:00
7fabd74a90 Merge pull request #2859 from SparkiDev/tfm_ec_invmod_ct
Constant time EC map to affine for private operations
2020-03-23 19:16:45 -07:00
dde1c3bc08 Fix for clang warning with ARM assembly build 2020-03-23 15:08:28 -06:00
5c424769a0 Added DH and Curve/Ed25519. 2020-03-23 09:08:45 -07:00
7d4b4e4994 added dtls benchmark 2020-03-22 17:56:28 +09:00
a8f2c97e13 Added CSharp example for multi-threaded TLS server. Refactor to separate the ssl and ctx handles. 2020-03-20 16:10:19 -07:00
97f08393e2 Added wolfCrypt Xilinx SDK project. Fix for stsafe.h inclusion of ssl.h with WOLFCRYPT_ONLY. 2020-03-20 14:40:17 -07:00
2706d6d48a Improve the benchmark to use snprintf then printf. Resolve issue showing results with xil_printf. 2020-03-20 12:34:08 -07:00
3127a7e9e5 Fixes for building with bare-metal on Xilinx SDK with zynqmp. Added Zynqmp benchmark timer support. 2020-03-20 12:22:47 -07:00
9b8752e314 Merge pull request #2858 from SparkiDev/netscape_cert_ext
Recognise Netscape Certificate Type extension
2020-03-19 16:33:25 -07:00
0c3667ba93 Merge pull request #2857 from SparkiDev/sp_null_check
SP fix check for NULL in EC point_new
2020-03-19 16:30:59 -07:00
33b95b8ad7 Merge pull request #2854 from JacobBarthelmeh/Certs
add +1 for string null terminator
2020-03-19 16:24:42 -07:00
49f01450de Merge pull request #2853 from SparkiDev/dtls_mtu
Allow setting of MTU in DTLS
2020-03-19 16:23:39 -07:00
f4a8430115 Merge pull request #2851 from JacobBarthelmeh/SanityChecks
add space for null terminator and check on header pointer
2020-03-19 16:00:57 -07:00
1de07da61f Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign.
2020-03-20 08:59:41 +10:00
ce6aeebdb4 fixes for static analysis checks 2020-03-19 16:34:02 -06:00
62a593e72e Recognise Netscape Certificate Type extension
Checks the bit string is valid but doesn't store or use value.
(Some certificates have this extension as critical)
2020-03-19 12:43:03 +10:00
c776a4219a SP fix check for NULL in EC point_new 2020-03-19 08:56:52 +10:00
a28fc5e70b Peer review feedback. Handle socket.Connect() failures. 2020-03-18 13:33:15 -07:00
09dedfbe17 maintenance to PKCS12 create for outputting encrypted bundles 2020-03-18 12:00:57 -06:00
00630baa53 Merge pull request #2826 from miyazakh/fix_csharp_dtlsexample
fix dtl server example of CSharp when freeing stuff
2020-03-18 09:26:14 -07:00
2bf39307f1 add +1 for string null terminator 2020-03-18 10:25:56 -06:00
e17e064ce2 Allow setting of MTU in DTLS 2020-03-18 12:36:11 +10:00
eb6f44e491 Merge pull request #2847 from tmael/memLeak
Fix memory leak
2020-03-17 13:31:10 -07:00
d0767164c8 Merge pull request #2846 from SparkiDev/sp_rsa_priv_fix
Fix SP RSA private op
2020-03-17 13:28:11 -07:00
aff80ab0d3 adjust test case for no ECC 2020-03-17 08:56:55 -07:00
9fc8c8e0b6 add space for null terminator and check on header pointer 2020-03-16 15:14:29 -07:00
74781a3d45 Merge pull request #2829 from cconlon/pkcs7multioctets
PKCS7/CMS EnvelopedData support for fragmented encrypted content
2020-03-16 13:12:23 -06:00
321a43edee Merge pull request #2850 from JacobBarthelmeh/SanityChecks
sanity check on IV size
2020-03-16 09:36:17 -07:00
2d950f1ab4 sanity check on IV size 2020-03-15 18:46:11 -06:00
00a49dffd0 Add new files to autoconf. 2020-03-13 20:40:18 -07:00
6498cb48bc CSharp wrapper improvements. Added TLS client example. Added TLS v1.3 methods. Added set_verify and CTX_set_verify. Added example code for CTX_set_cipher_list. 2020-03-13 14:54:57 -07:00
a6b01904d2 Release mem during failure 2020-03-13 14:22:06 -07:00
bcc720ef68 Merge pull request #2773 from SKlimaRA/master
Coverity issues fixes.
2020-03-13 10:20:45 -07:00
464631f920 Merge pull request #2841 from JacobBarthelmeh/Certs
add function wolfSSL_X509_NAME_ENTRY_create_by_txt
2020-03-13 10:17:52 -07:00
fa4ccbe728 Merge pull request #2844 from JacobBarthelmeh/SanityChecks
set inital state of TLS 1.3 peerSuites structure
2020-03-13 10:16:53 -07:00
452b4c03a6 Fix memory leak 2020-03-12 23:24:44 -07:00
6321eabf86 Fix SP RSA private op
tmpa - tmpb can be less than -p.
Need to conditionally add p twice.
C and multiple platform fix.
2020-03-12 09:33:52 +10:00
0be0cf44e4 fix for returning NULL when text not found and add test case 2020-03-10 09:54:31 -06:00
93326a7aeb Changed dst NULL check. 2020-03-10 09:55:27 +01:00
fb0ad6532f set inital state of TLS 1.3 peerSuites structure 2020-03-09 15:13:01 -06:00
3fcbcbf42a Revert "Logically dead code."
This reverts commit 2db62f744a.
2020-03-09 17:45:15 +01:00
87ff2fa47d Merge pull request #2839 from ejohnstown/hmac-init
HMAC Init
2020-03-06 11:05:30 -08:00
ab8bfc241d Merge pull request #2833 from JacobBarthelmeh/Compatibility-Layer
compile for NO_WOLFSSL_STUB
2020-03-06 11:04:36 -08:00
4ad8a2bacb store wc_PKCS7_DecodeEnvelopedData encryptedContentTotalSz in existing variable instead of adding another 2020-03-06 10:50:00 -07:00
fe9a876895 Check length to avoid XSTRNCMP accessing memory after list 2020-03-06 17:13:59 +01:00
1035d73a05 add function wolfSSL_X509_NAME_ENTRY_create_by_txt 2020-03-05 16:29:55 -07:00
9fe2ddacf4 HMAC Init
1. wc_HmacSetKey() has a check against the hmac's type that assumes one
has called wc_HmacInit() on the object first. In FIPS Ready builds we
do not have wc_HmacInit() in the boundary. This change removes that check
and action when making a FIPS build. The free called doesn't do anything
in the FIPS build case.
2. Initialize the Hmac's macType to WC_HASH_TYPE_NONE. Check the macType
against that rather than 0. There are some build configs where none isn't
0.
2020-03-05 13:38:02 -08:00
a6385a2b48 Merge pull request #2840 from SparkiDev/tls_show_fddhe
Fix to show the FFDHE group when negotiated
2020-03-05 08:33:49 -08:00
59b9483cde Merge pull request #2837 from SparkiDev/sp_x64_rsa_priv
Fix SP x64 RSA Private op
2020-03-05 08:33:11 -08:00
f24622596f Merge pull request #2827 from kaleb-himes/ZD9976
Fix infinite loop with small sha1 inputs. Thanks to Peter W. on ZD997…
2020-03-05 08:32:14 -08:00
6fcfde0651 Fix to show the FFDHE group when negotiated 2020-03-05 12:37:49 +10:00
9f6cf8a154 Merge pull request #2834 from dgarske/various_tls
Fix for TLS server with TLSv1.2 or less `wolfSSL_get_curve_name`
2020-03-04 16:24:28 -08:00
9b54af199c Merge pull request #2822 from dgarske/notime_openssl
Fixes for building NO_ASN_TIME with OPENSSL_EXTRA
2020-03-04 16:22:18 -08:00
e1215e0e1b Merge pull request #2810 from SparkiDev/tls13_mut_auth
Allow mutual authentication to be required for TLS server side
2020-03-04 16:21:03 -08:00
3707eea2f3 Fix SP x64 RSA Private op
tmpa - tmpb can be less than -p.
Need to conditionally add p twice.
2020-03-04 15:54:17 +10:00
fca5895090 Example for FIPS Linker Descriptor to explicitly set wolfCrypt FIPS boundaries. 2020-03-03 15:47:30 -08:00
c5b4fe1283 Fix for namedGroup missing. 2020-03-03 15:35:56 -08:00
bb76495233 compile for NO_WOLFSSL_STUB 2020-03-03 14:03:11 -07:00
44d2fc55e6 scan-build fixes for wc_PKCS7_DecodeEnvelopedData() 2020-03-03 10:27:22 -07:00
730c95cf38 Fix for TLS server incorrectly showing "FFDHE_2048" for "SSL curve name is" when using ECDHE and TLS v1.2 or less. The PickHashSigAlgo should be resetting ssl->namedGroup to indicate a named group was not used. 2020-03-03 09:20:58 -08:00
4895fd7b0b Added "either" side functions for SSLv3. These are only enabled with WOLFSSL_EITHER_SIDE and WOLFSSL_ALLOW_SSLV3. ZD 9984. 2020-03-03 09:18:11 -08:00
41ff54f873 Fix for typo with wc_ecc_init in documentation. 2020-03-03 09:16:48 -08:00
d8eeefb4b7 initialize explicitOctet to 0 in pwc_PKCS7_DecodeEnvelopedData() 2020-03-02 09:13:11 -07:00
127e304901 DTLS Fix
An endpoint's retransmit pool was being reset when receiving its peer's
change cipher spec message. When the finished message was lost, and
retransmits need to happen, they weren't available, so nothing happened.
Moved the reset to the finished case rather than CCS.
2020-03-01 16:43:10 -08:00
8cccb9008b Change to work for other TLS versions
Send alert when client doesn't send a certificate on request.
2020-03-02 08:50:57 +10:00
6334dd9cb0 Allow mutual authentication to be required for TLS 1.3 2020-03-02 08:50:57 +10:00
debb792690 fix PKCS7 encrypted content decoding for streaming API usage 2020-02-28 17:55:19 -07:00
92114fef75 Fixes for building NO_ASN_TIME with OPENSSL_EXTRA. Fixes #2820.
* `./configure --enable-opensslextra CFLAGS="-DNO_ASN_TIME"`
2020-02-28 09:35:17 -08:00
805034bca3 Merge pull request #2830 from SparkiDev/sp_ff_x86_64
Improve performance of RSA/DH ops on x64
2020-02-28 09:03:22 -08:00
5b58130210 Merge pull request #2806 from SparkiDev/curve448
Add Curve448, X448, Ed448 implementations
2020-02-28 08:59:08 -08:00
441027a502 Improve performance of RSA/DH ops on x64
Focus on 3072-bit ops but others improved as well.
2020-02-28 10:42:37 +10:00
2c6eb7cb39 Add Curve448, X448, Ed448 implementations 2020-02-28 09:30:45 +10:00
d21e370822 add support for PKCS7/CMS EnvelopedData with fragmented encrypted content 2020-02-27 14:42:57 -07:00
c7a2510d97 Merge pull request #2823 from SparkiDev/sp_div_fix
Fix for SP x64 div
2020-02-27 12:57:35 -08:00
a313b9d2cb Merge pull request #2821 from dgarske/crl_bitmask
Fix for CRL bit-mask enum value issue
2020-02-27 12:54:08 -08:00
b7d0b81443 Merge pull request #2818 from dgarske/rsa_sha3only
RSA with SHA-3 only and RSA 4096-bit tests
2020-02-27 12:44:29 -08:00
6dabe82c65 Merge pull request #2814 from SparkiDev/curve25519_x64_fix
Curve25519 x64 asm: Fix negate and add fe_sq_n
2020-02-27 12:21:53 -08:00
60afebdb86 Merge pull request #2811 from miyazakh/fix_espidf_buildtest_failure
fixed build failure and warnings in ESP-IDF port
2020-02-27 12:21:14 -08:00
1288c6b249 Merge pull request #2809 from dgarske/conf_usersettings
Fix to enable inclusion of all .c files when using `--enable-usersettings`
2020-02-27 12:10:07 -08:00
ed7a5b17d8 Merge pull request #2808 from dgarske/mdk5
Fix for minor typos in the MDK5 examples
2020-02-27 12:06:50 -08:00
3349dbc852 Merge pull request #2807 from dgarske/arg_checks
Added missing argument checks for public API's in `wolfio.c`
2020-02-27 12:03:32 -08:00
eddf4abf8e Merge pull request #2775 from embhorn/api_port
openSSL compatibility API for EVP, BIO, and SSL_SESSION
2020-02-27 11:51:21 -08:00
d9e221806b Fix infinite loop with small sha1 inputs. Thanks to Peter W. on ZD9976 for the report 2020-02-27 09:39:22 -07:00
2d530499e3 fix dtl server example when freeing stuff 2020-02-27 21:56:25 +09:00
f568f394b1 Merge pull request #2824 from julek-wolfssl/EVP-aesgcm
Fix AES-GCM IV length in wolfSSL_EVP_CIPHER_iv_length
2020-02-27 14:06:56 +10:00
3b822ad3d5 Fix AES-GCM IV length in wolfSSL_EVP_CIPHER_iv_length 2020-02-26 22:11:36 +01:00
2a5d7a2ac3 Fix for SP x64 div
Check the top half of number being divided to see if it is greater than
or equal.
If it is then the first div_word may crash as the result is more than
64-bits. So subtract modulus from the top to keep value small.
2020-02-26 10:53:35 +10:00
4b83b88a29 Fix for CRL bit-mask enum value issue. ZD 9948. 2020-02-24 18:52:50 -08:00
969e4dccc5 Merge pull request #2803 from julek-wolfssl/EVP-aesgcm
Evp aesgcm
2020-02-25 08:24:30 +10:00
ef2c1ae738 Fix for examples/benchmark/tls_bench.c:114:20: error: unused variable 'kShutdown' with WOLFCRYPT_ONLY. 2020-02-23 19:01:46 -08:00
7a3138f841 Merge pull request #2817 from miyazakh/rename_enum_tisp
Rename enumeration definition
2020-02-23 18:40:48 -08:00
da882f3912 Added wolfCrypt RSA 4096-bit test support using USE_CERT_BUFFERS_4096 build option (./configure CFLAGS="-DUSE_CERT_BUFFERS_4096"). 2020-02-23 18:40:13 -08:00
c8e618a817 Fix build for WOLFSSL_RSA_VERIFY_ONLY. 2020-02-23 15:58:28 -08:00
e80c696d5f Fix for RSA with SHA3 only (resolves warning with unsed RsaMGF1. 2020-02-23 13:54:48 -08:00
3187624d9e rename common naming enum 2020-02-22 11:35:02 +09:00
0f188be892 Merge pull request #2805 from ejohnstown/update-config
configure
2020-02-21 09:35:52 -08:00
c9ce065f8a Curve25519 x64 asm: Fix negate and add fe_sq_n 2020-02-21 11:37:45 +10:00
5716862a8a Merge pull request #2813 from julek-wolfssl/openssh-8.1
Remove redundant wolfSSL_EVP_CIPHER_CTX_iv_length call
2020-02-21 09:52:44 +10:00
403c263e0b Fix valgrind issue 2020-02-20 17:28:34 -06:00
b74dac6171 Fix WIN test 2020-02-20 17:28:34 -06:00
60dea0c53a Fix VS error 2020-02-20 17:28:34 -06:00
e4188d935b Fix WIN error 2020-02-20 17:28:34 -06:00
b4563e6af3 Fix CFB and OFB 2020-02-20 17:28:34 -06:00
61ebfd571c Fix new file error 2020-02-20 17:28:34 -06:00
a64e1540ba Adding EVP support for SHA3 2020-02-20 17:28:34 -06:00
6eda4e7b46 Fix in test 2020-02-20 17:28:34 -06:00
95f973a5be Adding test and dox for ERR_print_errors_cb 2020-02-20 17:28:34 -06:00
936312f77e Adding ERR_print_errors_cb 2020-02-20 17:28:33 -06:00
a0ddb05a07 change evp with cfb1 expect input size in bytes 2020-02-20 17:28:33 -06:00
1a96558b6e Adding macro and XTS support functions 2020-02-20 17:28:33 -06:00
922b308029 Fix from review 2020-02-20 17:28:33 -06:00
3eee891cf5 fix redefinition warning on older clang compiler 2020-02-20 17:28:33 -06:00
51d55ed1c8 account for different peer certificate in test case, g++ build fix, static memory size increase 2020-02-20 17:28:33 -06:00
a9accb6c39 add more macro guards for builds 2020-02-20 17:28:33 -06:00
b67ade5164 account for cavp build 2020-02-20 17:28:33 -06:00
76eec8884b clean up memory after test and don't leak x509 with get session peer 2020-02-20 17:28:33 -06:00
258382048d Fix test failures 2020-02-20 17:28:33 -06:00
018f313cca Fix clang warning 2020-02-20 17:28:33 -06:00
5a87dbe094 Adding tests for EVP_CIPHER_CTX_reset 2020-02-20 17:28:33 -06:00
64dcf5740a Fix for AES_XTS 2020-02-20 17:28:33 -06:00
e421d9f52c Fix in evp_aes_xts init 2020-02-20 17:28:33 -06:00
d7c1b9561f fix for cfb1 mode and add EVP tests 2020-02-20 17:28:33 -06:00
d6be24c4f7 add 192/256 key size tests of EVP cfb8 2020-02-20 17:28:33 -06:00
d4428ebc0c add EVP cfb1 test and update some EVP code 2020-02-20 17:28:32 -06:00
887eeb3c47 add EVP tests for cfb128 2020-02-20 17:28:32 -06:00
9d61ba6c62 initial cfb1/cfb8 support added 2020-02-20 17:28:32 -06:00
9c4e0807e2 Adding EVP_aes_###_xts tests (not complete) 2020-02-20 17:28:32 -06:00
16ce670897 Revert "Testing aes_*_xts"
This reverts commit 776eeb756c70b052849323d7645622a3f1d2b76a.
2020-02-20 17:28:32 -06:00
3197d67e62 Testing aes_*_xts 2020-02-20 17:28:32 -06:00
49def96998 add test for get0 session peer certificate 2020-02-20 17:28:32 -06:00
653235cd57 add stub implementation for SSL_MODE_AUTO_RETRY 2020-02-20 17:28:32 -06:00
b83a5840d6 add stub function for wolfSSL_EVP_mdc2 2020-02-20 17:28:32 -06:00
c2c3e0d4aa add initial implementation for wolfSSL_SESSION_get0_peer 2020-02-20 17:28:32 -06:00
ab49120652 add aesofb benchmark 2020-02-20 17:28:32 -06:00
df0d5f3b08 add EVP_aes_*_ofb implementation and tests, add support for inline with OFB 2020-02-20 17:28:32 -06:00
e837894578 add AES-OFB mode 2020-02-20 17:28:32 -06:00
65732c2269 add bio retry and set close tests 2020-02-20 17:28:32 -06:00
3137312911 update to implementation of BIO_MD type 2020-02-20 17:28:32 -06:00
62f20db48e Adding more EVP and SSL API 2020-02-20 17:28:32 -06:00
8f7af875a4 add BIO_f_md and BIO_get_md_ctx tests 2020-02-20 17:28:32 -06:00
0abc814792 EVP_MD_CTX_reset and EVP_aes fixes 2020-02-20 17:28:31 -06:00
ba25161f6c Adding BIO and EVP api 2020-02-20 17:28:31 -06:00
49a9239cf2 Merge pull request #2804 from SparkiDev/sp_cache_resist_fix
Fix cache resist compile to work with SP C code
2020-02-20 15:05:18 -08:00
da2980172b Merge pull request #2812 from kaleb-himes/FAILING_FIPS_IN_MASTER
Fix failing FIPS tests in master stemming from PR #2733
2020-02-20 14:29:16 -08:00
70ef925a48 Remove redundant wolfSSL_EVP_CIPHER_CTX_iv_length call 2020-02-20 18:32:56 +01:00
1f003967df Fix failing FIPS tests in master stemming from PR #2733 2020-02-20 09:20:59 -07:00
d4a9279a6c Revert "Resource leak." to resolve the conflict (this fix is unapplicable, because the leaking code was removed).
This reverts commit 451d0a470a.
2020-02-20 15:12:02 +01:00
f7018c4765 fixed build failure and warnings
fixed unit test app failure
2020-02-20 18:40:16 +09:00
c62f31cd27 Fix cache resist compile to work with SP C code 2020-02-20 10:10:05 +10:00
418c508eba Fixes for SCTP example to check build options. 2020-02-19 12:28:49 -08:00
6036f604a6 Added missing argument checks for public API's in wolfio.c. 2020-02-19 12:18:00 -08:00
75183262ad Minor typos and fixes to the MDK5 examples. 2020-02-19 12:03:14 -08:00
baace2c0e3 Fix to enable inclusion of all .c files when using the --enable-usersettings option. 2020-02-19 11:58:33 -08:00
e72b87f372 Merge pull request #2733 from julek-wolfssl/openssh-8.1
Openssh 8.1
2020-02-19 10:14:35 -07:00
cc597add48 Don't always include wolfssl/openssl/bn.h 2020-02-19 11:17:31 +01:00
9953f2d01d 1. Remove duplicate AM_CONDITIONAL statments from configure.ac.
2. Update copyright year in configure.ac.
2020-02-18 16:16:59 -08:00
17c3bb00d8 Merge pull request #2798 from ejohnstown/vxworks-strings
VxWorks Strings
2020-02-18 17:10:31 -07:00
26e2d6eacf Adressing Todd's comments
Check for HAVE_GETADDRINFO beside WOLF_C99
Move STR_SIZEOF to wolfssl/wolfcrypt/types.h and rename to XSTR_SIZEOF to prevent collision in client projects
Remove wolfssl/openssl/ssl.h and wolfssl/internal.h from crypto layer
2020-02-18 21:37:06 +01:00
b736a65fa8 Fix redefinition issue 2020-02-18 21:37:06 +01:00
2218f7b95d Fix merge issues 2020-02-18 21:37:06 +01:00
d6686f1320 Remove usage of res in wolfSSL_BN_clear_bit 2020-02-18 21:37:06 +01:00
5a766bd5bb Change STR_SIZEOF declaration file 2020-02-18 21:37:06 +01:00
1512485926 Fix user-rsa tests 2020-02-18 21:37:06 +01:00
5c4d3df4f3 Fix broken Windows FIPS build 2020-02-18 21:37:06 +01:00
f55cfd7ba7 Fix missing wolfSSL_i2d_RSAPrivateKey references 2020-02-18 21:37:06 +01:00
3fcec191a4 Refactor wolfSSL_RSA_To_Der 2020-02-18 21:37:06 +01:00
5ed1c233b7 Sean comments 2020-02-18 21:37:06 +01:00
dac23dfe15 Add DSA and DH free to wolfSSL_EVP_PKEY_set1_EC_KEY 2020-02-18 21:37:06 +01:00
7aaa89aedc Cleanup bn_one in wolfSSL_Cleanup 2020-02-18 21:37:06 +01:00
43ce272cb3 Variable declaration at start of scope 2020-02-18 21:37:06 +01:00
eedbce7c0a Null-check keyFormat
Zero all of WOLFSSL_DH struct
Fix macros for self-test
2020-02-18 21:37:06 +01:00
97a4889bb3 Undo some stuff 2020-02-18 21:37:06 +01:00
1df9963b80 sha3.h 2020-02-18 21:37:06 +01:00
7ce7017521 Fix memory leaks when compiling with SMALL_STACK 2020-02-18 21:37:06 +01:00
f765b711bf More macro preproc stuff 2020-02-18 21:37:06 +01:00
48b39a34c7 Properly Init mp_int number 2020-02-18 21:37:06 +01:00
b592b241c7 Fix Segfault in wolfSSL_EC_KEY_dup
Fix more header stuff
2020-02-18 21:37:06 +01:00
b58f26945d Different configuration fixes 2020-02-18 21:37:06 +01:00
480227704d Fix missing stuff in headers 2020-02-18 21:37:06 +01:00
59b001c484 Fix header definitions when running CAVP self test 2020-02-18 21:37:06 +01:00
50f8fb1475 Enable wc_RsaKeyToDer even when key generation is turned off 2020-02-18 21:37:06 +01:00
e6547c75cd Reimplement external data as it was before: a fixed size vector. This makes external data implementation easier as it doesn't require allocation or cleanup. Only zeroing the entire structure that it is in (which happens in all structures anyway) and then calling the appropriate getter and setter functions to manipulate external data. 2020-02-18 21:37:06 +01:00
9a0d3ba369 Check boundaries in B64 decode
ERR_get_error will always return a positive error code
2020-02-18 21:37:06 +01:00
58c239a49f Fix stuff after rebase 2020-02-18 21:37:06 +01:00
d6a160c637 Fix error codes for OpenSSL compatiblity 2020-02-18 21:37:06 +01:00
6e72a299d7 Don't undef HAVE_GETADDRINFO as it disables defines in projects using wolfSSL
Change test_wolfssl_EVP_aes_gcm so that changing the tag will fail the authentication check
2020-02-18 21:37:06 +01:00
ab56d078a4 keygen-moduli passed
Handle trailing newlines in wolfSSL_BN_hex2bn
2020-02-18 21:37:06 +01:00
ae948e2a07 Pass try-ciphers
define EVP_CIPHER_CTX_set_iv as wolfSSL_EVP_CIPHER_CTX_set_iv
add wolfSSL_GetLoggingCb functionality when compiling without enable-debug
fix initialization vector handling of all cipher modes when using our EVP layer. The IV was incorrectly handled in initialization as well as not being updated after processing
2020-02-18 21:37:06 +01:00
fbedabe601 OpenSSH changes
- increase FP_MAX_BITS for OpenSSH
- Add helpful loggin API (names are self-explanatory)
-- wolfSSL_GetLoggingCb
-- WOLFSSL_IS_DEBUG_ON
- Define WOLFSSL_EC_METHOD as an alias of WOLFSSL_EC_GROUP
- Add wolfSSL_EC_GROUP_method_of which really just returns the group itself
- Add wolfSSL_EC_METHOD_get_field_type which gets the curve type of the WOLFSSL_EC_GROUP(remember that WOLFSSL_EC_METHOD is an alias of WOLFSSL_EC_GROUP for now)
- Modify Base64_Decode so that it accepts arbitrary PEM line length
- Modify PemToDer so that it accepts private keys with a custom -----BEGIN * PRIVATE KEY----- header
2020-02-18 21:37:06 +01:00
84a2ca7a4e Map the Jacobian point back to affine space in wolfSSL_EC_POINT_get_affine_coordinates_GFp 2020-02-18 21:37:06 +01:00
aea95232d1 WIP
Add EC_POINT conversion to BIGNUM (EC_POINT_point2bn)
Add setting affine coordinates for EC_POINT (EC_POINT_set_affine_coordinates_GFp)
Add bit clearing for BIGNUM (BN_clear_bit)
Add supporting unit tests in api.c
2020-02-18 21:37:06 +01:00
89e35e2547 openssh 8.1 compiles 2020-02-18 21:37:06 +01:00
b5c52d7c70 openssh WIP and some light refactoring 2020-02-18 21:37:06 +01:00
41de1bb156 WIP 2020-02-18 21:36:26 +01:00
b05cfaa601 Add aes-gcm to wolfSSL_EVP_get_cipherbyname and wolfSSL_EVP_get_cipherbynid 2020-02-18 21:34:23 +01:00
6f3623f220 Moved infinite loop check to the other bad func arg check. 2020-02-18 09:59:59 +01:00
41d3ba0efa Tests and examples for bidirectional shutdown 2020-02-17 16:47:47 -06:00
59fb81c950 Add fix 2020-02-17 16:47:47 -06:00
2566986d41 Merge pull request #2632 from SparkiDev/sp_p384
Add support for P384 curve into SP
2020-02-17 11:46:09 -08:00
bf1ec3004a Merge pull request #2787 from dgarske/size_reduc
Adds options to disable the hash wrappers and base64 decode
2020-02-17 11:44:37 -08:00
651ffe2c12 Merge pull request #2789 from JacobBarthelmeh/SanityChecks
fix return with error on process peer cert
2020-02-17 11:44:02 -08:00
f2e1266f2d Merge pull request #2791 from dgarske/async_fixes
Fixes for asynchronous crypto issues
2020-02-17 11:43:13 -08:00
14b7355411 Merge pull request #2792 from SparkiDev/rsa_kg_blind_fix
Fix for rsa key gen blinding - don't call lcm
2020-02-17 11:42:25 -08:00
44c327ee14 Merge pull request #2795 from SparkiDev/tls13_secret_cb
Call secret callback when TLS 1.3 secrets generated
2020-02-17 11:41:16 -08:00
fda322829f Merge pull request #2796 from JacobBarthelmeh/Compatibility-Layer
free existing cert store when setting a new one
2020-02-17 11:37:56 -08:00
8972bf6278 Add support for P384 curve into SP 2020-02-17 15:46:34 +10:00
defa54f40d Merge pull request #2800 from tmael/trim-padding
Trim trailing padding bytes from a key
2020-02-14 16:05:44 -08:00
30936e7ad4 Merge pull request #2793 from kaleb-himes/ZD9865
Fix issue in wolfSSL_EVP_PKEY_assign_RSA when RSA key not zeroized
2020-02-14 16:40:52 -07:00
aaaa191937 Trim trailing padding byte 2020-02-14 12:54:35 -08:00
8f6a614d17 Merge pull request #2797 from kaleb-himes/JENKINS_STUFF
--disable-supportedcurves --enable-opensslextra - NIGHTLY DISABLE OPT…
2020-02-14 09:01:03 -08:00
614e675a00 Call secret callback when TLS 1.3 secrets generated 2020-02-14 08:42:47 +10:00
b62064f6a8 Merge pull request #2737 from JacobBarthelmeh/dks7g2
changes for build with s7g2
2020-02-13 14:07:44 -07:00
cabe30828c Merge pull request #2786 from cconlon/android-debug
add Android debug for logcat
2020-02-13 10:12:40 -08:00
fba40d14d4 Merge pull request #2785 from ottok/bugfix/menu-js-width
Wrap JavaScript source on multiple lines to make it readable
2020-02-13 10:07:13 -08:00
b038e2e8f0 Merge pull request #2771 from JacobBarthelmeh/Windows
change public Timeval to WOLFSSL_TIMEVAL
2020-02-13 09:38:42 -08:00
63a005d71b VxWorks Strings
When building for VxWorks, set HAVE_STRINGS_H as it uses strings.h, not string.h.
2020-02-13 09:08:54 -08:00
bb7508f570 --disable-supportedcurves --enable-opensslextra - NIGHTLY DISABLE OPTIONS TEST 2020-02-12 15:57:00 -07:00
8e1adb125c free existing cert store when setting a new one 2020-02-12 15:45:44 -07:00
0814f61b11 fix code formating and turn on HW acc. by default 2020-02-12 10:31:34 -07:00
1b13178182 Fixes possible compile error if NO_PKCS7_STREAM is defined. 2020-02-12 13:46:12 +01:00
1a38c26097 Prevent infinite loop. 2020-02-12 13:29:33 +01:00
109173d756 Fix two resource leaks. 2020-02-12 12:57:40 +01:00
5b7fc7b133 Address failure when blinding disabled and key not initialized to zero 2020-02-11 14:39:30 -07:00
d1397656ef Merge pull request #2790 from ejohnstown/abi-tweak
ABI Additions
2020-02-10 15:07:35 -08:00
61221742b7 Merge pull request #2734 from aaronjense/renesas-ra-port
Renesas RA e2studio projects for Client, Server, Test and Benchmark
2020-02-10 14:49:03 -07:00
669d9b1ae4 Fix for rsa key gen blinding - don't call lcm 2020-02-10 08:51:43 +10:00
f322b71526 wolfCrypt fixes for asynchronous (--enable-asynccrypt):
* Fix for ECC and using NULL curve->order (wasn't loaded).
* Fix for typo on heap.
* Fix for QT case where GetInt failure retry did not "init" the mp_int.
2020-02-07 13:34:43 -08:00
3c077a3cef add NO_OLD_TIMEVAL_NAME macro for backwards compatibility 2020-02-07 11:56:30 -07:00
7648997e37 ABI Additions
Added the functions wolfSSL_GetRNG(), wolfSSL_CTX_GetDevId(),
      wc_ecc_import_x963(), and wc_RNG_GenerateBlock() to the ABI
      testing.
2020-02-06 13:33:38 -08:00
17bedbac67 fix return with error on process peer cert 2020-02-06 11:53:42 -07:00
61a5fe3108 add macro for trng and gce driver names 2020-02-06 09:20:07 -08:00
17cfe2589b Merge pull request #2748 from tmael/fix_cppcheck
Fix cppcheck
2020-02-05 16:02:22 -07:00
da3df4f9c6 Changing logic to remove dead code section. 2020-02-05 19:36:37 +01:00
0964272dc6 Resource leak fix. 2020-02-05 18:28:50 +01:00
ba9dc11e62 Adds options to disable the hash wrappers (NO_HASH_WRAPPER) and base64 decode (NO_WOLFSSL_BASE64_DECODE). 2020-02-05 11:58:44 -05:00
bbfefd3cde Sanity check NULL dereference. 2020-02-05 16:59:20 +01:00
e75b1b5cb9 add suport for AES acceleration 2020-02-04 16:10:20 -08:00
b7d772700a update sha256 support for endian 2020-02-04 16:03:45 -08:00
b8b0b7da03 add Android debug for logcat 2020-02-04 10:07:26 -07:00
e664a4f206 Review comments 2020-02-04 08:55:37 -08:00
b67fd249e2 Fix for cppcheck 2020-02-04 08:55:37 -08:00
b29fe41a35 Merge pull request #2738 from SparkiDev/cppcheck_fixes_3
Changes to clear issues raised by cppcheck
2020-02-03 17:02:40 -07:00
63a73be3f0 Merge pull request #2777 from dgarske/constchar
Fixes for char strings not marked as const.
2020-02-03 11:12:55 -08:00
4ee022f788 Merge pull request #2776 from julek-wolfssl/set_curve_groups_list
Add SSL_CTX_set1_groups_list and SSL_set1_groups_list APIs
2020-02-03 11:11:59 -08:00
6f2230e459 Merge pull request #2774 from SparkiDev/sp_x86_64_asm
Improve performance of SP Intel 64-bit asm
2020-02-03 11:08:17 -08:00
61e78880a5 Merge pull request #2769 from dgarske/zd9791
Fix for `wc_EccPublicKeyDecode` to use the length from ASN sequence
2020-02-03 11:05:17 -08:00
c98876d440 Merge pull request #2768 from julek-wolfssl/openvpn-config
Add --enable-openvpn build option
2020-02-03 11:01:06 -08:00
0551b1f2de Merge pull request #2765 from SparkiDev/client_read_write
Client using common read and write func
2020-02-03 11:00:15 -08:00
967235c1f3 Wrap JavaScript source on multiple lines to make it readable
Closes: wolfSSL/wolfssl#2783
2020-02-03 20:15:18 +02:00
cc2bf03e73 Client using common read and write func 2020-02-03 09:17:27 +10:00
420e597c16 Move functions to ssl.c 2020-02-01 10:06:53 +01:00
6ec136208c add sha256 hardware acceleration 2020-01-31 14:26:04 -08:00
d63bdf257d Merge pull request #2337 from MKinclRA/fix-visual-studio-2019-build
Added stdio.h include to types.h.
2020-01-31 12:59:58 -08:00
26794e7b5e Merge pull request #2778 from ejohnstown/fix-abi
Fix ABI
2020-01-31 06:49:16 -08:00
e13d9f7f1b Add SSL_CTX_set1_groups_list and SSL_set1_groups_list APIs 2020-01-31 06:38:38 +01:00
3d233d624c Merge pull request #2770 from JacobBarthelmeh/Testing
fix typo in wolfSSL_sk_X509_EXTENSION_pop_free
2020-01-30 18:55:54 -08:00
aa498a7956 Merge pull request #2767 from dgarske/freertos
Fix for evp.c included and FREERTOS realloc
2020-01-30 15:53:05 -07:00
4bc0f79dd9 Fix ABI
Someone removed some of the WOLFSSL_ABI tags from the ssl.h header file. It looks like it was a bad manual merge.
2020-01-30 14:07:27 -08:00
928f641064 Fixes for char strings not marked as const. The const is an optimization to allow use from flash, which saves RAM space on embedded devices. 2020-01-30 13:53:06 -08:00
0fda8cc3b3 Merge pull request #2756 from dgarske/changelog
Template for ChangeLog.md for next release
2020-01-30 10:47:12 -07:00
ba49427cc4 Cleanup include.am whitespace. 2020-01-30 08:44:52 -08:00
32f478d335 Better fix for using the ASN.1 provided length, not provided inSz. Confirmed CheckBitString will check case where inSz < ASN.1 length. 2020-01-30 08:38:22 -08:00
75e30a33f1 Merge pull request #2764 from SparkiDev/rsa_q_modinv_p
Constant time q modinv p in RSA key gen
2020-01-30 08:08:07 -08:00
3df9ca3fae Fix to use TBD version for next release. 2020-01-30 06:26:45 -08:00
6cf63b1738 Template for ChangeLog.md for next release. New PR's should update this document if its worth mention in the change log. 2020-01-30 06:26:45 -08:00
e5426f85c9 Fix for evp.c when being included directly due to improperly placed WOLFSSL_EVP_INCLUDED. Fix for FREERTOS to expose XREALLOC for normal math. 2020-01-30 06:22:08 -08:00
9bfbdfe695 Fix for wc_EccPublicKeyDecode to use the length from ASN sequence, not the provided inSz. Also checked the case where the sequence number is larger than supplied inSz and it will properly return ASN_PARSE_E. ZD 9791 2020-01-30 06:20:29 -08:00
a90cc51a5f Merge pull request #2772 from dgarske/cert_tests
Fixes for build with opensslextra and 3072-bit cert buffers
2020-01-30 06:47:51 -07:00
55ea2facdd Changes to clear issues raised by cppcheck 2020-01-30 14:24:32 +10:00
81bebd8e5c Improve performance of SP Intel 64-bit asm
RSA: Only constant time copy out when doing private key op
Improve performance of sp_count_bits
2020-01-30 12:23:38 +10:00
c938cb35ca Logically dead code. 2020-01-29 17:35:15 +01:00
ed88e8d1c5 Logically dead code. 2020-01-29 17:34:58 +01:00
2db62f744a Logically dead code. 2020-01-29 17:34:40 +01:00
37386f5fb5 NULL dereference. 2020-01-29 17:34:19 +01:00
670ba75ea4 Missing varargs cleanup. 2020-01-29 17:33:59 +01:00
2d36624d84 NULL dereference. 2020-01-29 17:33:38 +01:00
c3fabb1da6 NULL dereference. 2020-01-29 17:33:21 +01:00
df0b0a6e91 NULL dereference. 2020-01-29 17:31:14 +01:00
70cb97c116 NULL dereference. 2020-01-29 17:30:57 +01:00
972790fb86 Resource leak. 2020-01-29 17:30:35 +01:00
451d0a470a Resource leak. 2020-01-29 17:30:14 +01:00
96d1593735 Possible use after free. 2020-01-29 17:29:52 +01:00
77b69ebf56 Logically dead code. 2020-01-29 17:29:23 +01:00
e183d95c86 Fix for moved file. 2020-01-29 07:22:07 -08:00
5677a96c80 Fixes to resolve openssl_pkey1_test with updated test buffer sizes. 2020-01-29 06:51:47 -08:00
5aabebddd8 Fix more 3072-bit cert buffer edge case builds (certext/certgen). 2020-01-29 06:43:35 -08:00
3f1c3392e5 Fixes for build with opensslextra and 3072-bit cert buffers. Adds 3072-bit RSA public key der. Eliminates duplicate 3072-bit client cert/key. 2020-01-29 06:37:06 -08:00
a9e9120fa0 change public Timeval to WOLFSSL_TIMEVAL 2020-01-28 17:11:46 -07:00
59af7a8e35 fix typo in wolfSSL_sk_X509_EXTENSION_pop_free 2020-01-28 16:50:54 -07:00
3bdb7d8188 Merge pull request #2761 from JacobBarthelmeh/Testing
add close on pre to echoserver example
2020-01-28 09:29:29 -08:00
044ad957e5 Add --enable-openvpn build option 2020-01-28 15:29:24 +01:00
1ea7755232 Merge pull request #2742 from tmael/dsa_mem_leak
Fix mem leak in DSA
2020-01-28 06:25:58 -08:00
43b7258d3b Review comments 2020-01-27 12:44:16 -08:00
91a9117e1b Renesas RA e2studio projects for Client, Server, Test and Benchmark 2020-01-27 13:22:32 -07:00
695b126a1c Merge pull request #2739 from dgarske/pkcs8_ed25519
Added PKCS8 support for ED25519
2020-01-24 10:56:40 -08:00
b9f39b7c06 Merge pull request #2759 from ejohnstown/config-maint
Deprecate some configure flags
2020-01-24 10:40:19 -08:00
126dceee1f Merge pull request #2763 from SparkiDev/sp_int_div_word
Add support to sp_int.c for platforms that do not divide an sp_int_wo…
2020-01-23 18:37:04 -08:00
b4cadae4e2 Constant time q modinv p in RSA key gen 2020-01-23 14:52:29 -08:00
ec877aa91e Add support to sp_int.c for platforms that do not divide an sp_int_word by an sp_int_digit 2020-01-23 14:39:19 -08:00
945d34533c Merge pull request #2727 from JacobBarthelmeh/Windows
update to ECC key parsing custom curves for Windows
2020-01-23 13:57:06 -08:00
d1e39668aa Merge pull request #2740 from aaronjense/compatibility-fixes
Compatibility Layer Fixes
2020-01-23 08:25:40 -08:00
c7340fd90b Merge pull request #2750 from ejohnstown/mingw
mingw update
2020-01-23 08:00:15 -08:00
1c56d62753 Merge pull request #2754 from dgarske/crypttest_3072
wolfCrypt Test 3072-bit Support
2020-01-23 07:55:19 -08:00
d9253afc04 add close on pre to echoserver example 2020-01-22 16:23:46 -08:00
f2db85c07c Deprecate some configure flags
1. Add C_EXTRA_FLAGS and C_FLAGS to CFLAGS.
2. Remove the cached copied of C_EXTRA_FLAGS and C_FLAGS.
3. The option.h is set only on CFLAGS, CPPFLAGS, and the AM_ versions.
2020-01-22 14:26:16 -08:00
06e3c90073 Merge pull request #2732 from kaleb-himes/ZD9730-spellchecker
Fixing some typos. Thanks to Fossies for the report
2020-01-22 13:52:56 -08:00
e3efdc4b5d Merge pull request #2755 from SparkiDev/rsa_enc_3072
Fix masking of 16 bits
2020-01-22 13:40:21 -08:00
55d485cc45 Fix masking of 16 bits 2020-01-22 10:39:36 -08:00
b022b651b3 wolfCrypt test fixes for hard coded "256" byte buffers to support 3072-bit RSA. Requires PR #2755 2020-01-22 10:04:53 -08:00
84a878bda2 Fix for include .am issue. 2020-01-22 09:11:00 -08:00
2a5c623c97 Fix for RSA without SHA512 build error. Fix or renew cert PEM to DER. 2020-01-22 08:15:34 -08:00
e3e862c8b6 Test case fixes for sig wrapper test and DH. 2020-01-21 22:25:11 -08:00
4d9dbc9ec3 Adds 3072-bit RSA tests using USE_CERT_BUFFERS_3072. 2020-01-21 22:16:54 -08:00
37cad6e9ba %zu, pragma: not supported, 2020-01-22 08:12:51 +09:00
aabdec214e MinGW uses the Win32 setsockopt() function which uses a char for
SO_REUSEADDR's option. Everything else uses an int.
2020-01-21 10:53:19 -08:00
2cd3474e9d Improve "keyFormat" to always set based on "algId" and let the later key parsing code produce failure. 2020-01-20 20:49:55 -08:00
0489cc97a8 Fix for ProcessBuffer with PEM private keys, where PemToDer call was only setting eccKey. Cleanup to use "keyFormat" OID sum. 2020-01-20 20:49:55 -08:00
de8e5ffd6e Cleanup asn.c use of WOLFSSL_LOCAL (only required in the header). 2020-01-20 20:49:55 -08:00
77426e78e1 Added test case for PKCS8 ED25519 encrypted private key. 2020-01-20 20:47:47 -08:00
40c8562dc2 Added PKCS8 support for ED25519. 2020-01-20 20:47:47 -08:00
7707234901 Merge pull request #2743 from JacobBarthelmeh/Compatibility-Layer
adjust set1 curves list function for TLS extension sent
2020-01-20 16:19:55 -08:00
98f14eff9f Refactor to combine duplicate ECC param parsing code. 2020-01-20 16:17:12 -08:00
23427085af 1. Add an indent to a new line in user settings.
2. Remove the execute bit from the changed files.
2020-01-20 12:30:32 -08:00
a08ab1fc7a fix mnGW error 2020-01-20 12:19:18 -08:00
c581c56999 update return value of local GetCurveByOID 2020-01-20 10:40:56 -07:00
3508579f4c add check on NETX duo build and return value of opening driver 2020-01-20 09:33:14 -07:00
a624ae14df Merge pull request #2725 from kaleb-himes/ZD9735
Remove redundant packing flag
2020-01-18 21:21:32 -08:00
66daac4c94 Merge pull request #2709 from JacobBarthelmeh/Testing
set chacha20 similar to aes-ctr when handling leftover stream and add…
2020-01-17 15:05:24 -08:00
356636e88d fix typo 2020-01-17 15:13:52 -07:00
87859f9e81 Merge pull request #2747 from dgarske/sizeof_long
Improvements for detection of 64-bit support
2020-01-17 15:10:44 -07:00
204ef9543a Merge pull request #2728 from ejohnstown/maint-x509
Maintenance: X509
2020-01-17 13:51:02 -08:00
92877a1214 Merge pull request #2730 from SparkiDev/sp_div_word_fix
Fix for div_word builds of SP C code
2020-01-17 13:15:44 -08:00
60afa72330 Merge pull request #2731 from SparkiDev/auth_key_id_set
Fix when extAuthKeyIdSet is set.
2020-01-17 13:14:22 -08:00
cca545f76c Merge pull request #2735 from dgarske/ecc_sign
Fixes for ECC sign with `WOLFSSL_ECDSA_SET_K`
2020-01-17 13:13:38 -08:00
dadcce3eb8 Merge pull request #2741 from SparkiDev/ecc_no_cache
Fix for ecc and no cache resistance - set M[2]
2020-01-17 13:09:53 -08:00
c5932a9874 account for leantls and selftest builds 2020-01-17 13:32:59 -07:00
9760ed07a9 Based on peer feedback, remove WOLFSSL_PACK from sniffer.h 2020-01-17 12:27:46 -07:00
bd4a9c69dd convert name to oidsum to curve type for setting supported curves 2020-01-17 11:56:46 -07:00
d8c5353466 adjust set1 curves list function for TLS extension sent 2020-01-16 13:21:14 -07:00
c38d5e9a29 Further improved to use HAVE_LIMITS_H and ULL instead of ui64 2020-01-16 09:06:44 -08:00
541bf3e639 Improvements for detection of 64-bit support. Adds support for IBM s390x. Improves detection on Windows. Adds new WC_USE_LIMITS_FOR_SIZEOF option to use limits.h to detect sizeof long. Fixes #2600 and Fixes #2745. 2020-01-16 07:15:18 -08:00
fbf91f7397 Fix mem leak in DSA 2020-01-15 16:03:42 -08:00
584d8498f8 Fix for ecc and no cache resistance - set M[2]
Need to have a value in order to maintain timing resistance.
Small maths fails also.
2020-01-16 09:35:34 +10:00
3db7b44be4 Compatibility Layer Fixes 2020-01-15 13:49:47 -07:00
bd44091111 refactor solution 2020-01-15 09:29:10 -07:00
c01cd808da changes for build with s7g2
add project info

add project info

adjust wolfssl library template

change TRNG collection

fix include.am

fix argument for TRNG

rename example templates

comment out DEBUG_WOLFSSL

change include.am

update license
2020-01-14 17:48:41 -07:00
989f3d3684 Fix for FREE_VAR call on sharedA. 2020-01-14 14:35:20 -08:00
e429dd8f0b Peer review feedback minor cleanup. 2020-01-14 14:33:23 -08:00
e9bbf89287 Fix for WOLFSSL_ECDSA_SET_K with normal math. The sign_k mp_int was not initialized. 2020-01-14 14:13:12 -08:00
95b6076fe1 Fixes for ECC sign with WOLFSSL_ECDSA_SET_K, which was not loading all curve params for the wc_ecc_make_pub_ex call and not correctly setting ALLOC_CURVE_SPECS for WOLFSSL_SMALL_STACK. Cleanup around the loading of curve specs. 2020-01-13 16:25:37 -08:00
22f49d8597 Fixes for building with ECC sign/verify only. 2020-01-13 15:35:08 -08:00
8974827fbe Added WOLFSSL_ECC_CURVE_STATIC build option to allow using fixed arrays for ECC parameters. This is enabled by default on Windows. Fixed several compiler warnings. Fixed build macro for key->deallocSet. 2020-01-13 07:15:17 -08:00
c69bd5169f Switch strncpy to memcpy in the altname store function. 2020-01-10 20:34:14 -08:00
8d1b20706c Maintenance: X509
1. Add a test for the new alt name handling.
2. Added an API to set altnames in a WOLFSSL_X509 struct. Just adds
DNS_entries.
3. Removed the "static" from a bunch of constant byte arrays used inside
some of the ASN.1 code.
2020-01-10 20:26:35 -08:00
5dcffa6b40 Maintenance: X509
1. Fix for issue #2724. When making a certificate out of an X.509
structure, the subject alt names weren't getting correctly copied.
2. Added a function to flatten the DNS_entries into a sequence of
GeneralNames.
3. Put the proper certificate extension wrapping around the flattened
general names.
2020-01-10 20:26:35 -08:00
7571fbdbfb Maintenance: X509
1. Fix for issue #2718. Added a flag to the X509 structure when someone
sets the issuer name.
2. When making a certificate out of the X509, if the issuer name is set
clear the self-signed flag in the cert.
3. Propigate the flat X509_NAMEs to the string the cert building code
uses.
2020-01-10 20:25:43 -08:00
6b4551c012 Merge pull request #2654 from cariepointer/qt-512-513
Add Qt 5.12 and 5.13 support
2020-01-10 17:34:23 -07:00
71f8f3031d Merge pull request #2729 from dgarske/telit_time
Fixes for the Telit time functions
2020-01-10 14:51:39 -08:00
1f104e52a3 Merge pull request #2715 from ejohnstown/maint-dtls
Maintentance: DTLS
2020-01-10 14:43:15 -08:00
9b8d4e91c2 Fixing some typos. Thanks to Fossies for the report 2020-01-10 11:45:51 -07:00
544ff3f9ac Fix length in wolfSSL_sk_CIPHER_description 2020-01-10 11:26:57 -07:00
99d657af4f adjust test cases 2020-01-10 10:31:56 -07:00
26a075cfec Merge pull request #2716 from cariepointer/apache-fixes
Fixes for Apache nightly Jenkins tests
2020-01-10 10:20:43 -07:00
ef99086aee Fix valgrind errors 2020-01-10 10:08:39 -07:00
de3536a067 More fixes from review 2020-01-09 17:28:20 -07:00
0c25588ad1 adjust TEST_SMALL_CHACHA_CHUNKS size and add more tests 2020-01-09 17:13:57 -07:00
1538e631a8 revert size of ChaCha structure and delay counter increment 2020-01-09 16:39:48 -07:00
a1944c477a set chacha20 counter in TLS AEAD use 2020-01-09 16:39:48 -07:00
8e24bf6c2c add macro guard for optimized versions 2020-01-09 16:39:48 -07:00
0ec7b311d8 set chacha20 similar to aes-ctr when handling leftover stream and add test case 2020-01-09 16:39:48 -07:00
a9cf16cc2b Merge branch 'master' into apache-fixes 2020-01-09 16:33:35 -07:00
6e8f3faedd Fix when extAuthKeyIdSet is set.
Was set when extension is seen - extension may not have hash.
But is used to indicate that the hash is set - ie look up by hash.
2020-01-10 09:28:45 +10:00
03c42423eb Fix for div_word builds of SP C code 2020-01-10 09:02:26 +10:00
f3b2815e1f Merge pull request #2708 from julek-wolfssl/nginx-fix
Nginx fix
2020-01-09 15:00:59 -08:00
3c9f7809f1 Merge pull request #2714 from JacobBarthelmeh/Docs
update linux sgx readme for wolfssl/options.h creation
2020-01-09 14:58:22 -08:00
51f44cb09b Merge pull request #2719 from dgarske/nxp_k64_mmcau
Fixes for NXP K64
2020-01-09 14:57:11 -08:00
21f82a5662 Merge pull request #2721 from SparkiDev/sp_small_stack_fixes
Fix in SP C impl for small stack
2020-01-09 14:55:44 -08:00
99045a2fea Merge pull request #2723 from SparkiDev/rsa_vfy_only_fix
Rsa vfy only fix
2020-01-09 14:55:10 -08:00
3ea69676eb Merge pull request #2726 from ejohnstown/maint-ren
Maintenance: Secure Renegotiation
2020-01-09 14:54:13 -08:00
11a0b117f8 Merge pull request #2706 from dgarske/chapoly_aead_iuf
New API's for ChaCha20/Poly1305 AEAD init/update/final
2020-01-09 14:49:26 -08:00
0938cdde52 Remove dup->dynamicName = 1 call 2020-01-09 14:09:38 -08:00
47040f1dae EC_KEY_dup fixes 2020-01-09 14:35:57 -07:00
8fb586f3ee Fixes for the Telit time functions. ZD 9733 2020-01-09 11:17:19 -08:00
41f134ae31 update to ECC key parsing custom curves for Windows 2020-01-08 14:45:59 -07:00
1f0f3eb97d Maintenance: Secure Renegotiation
Allow sending application data during the secure renegotiation.
2020-01-08 11:50:18 -08:00
b9c99709f7 Fixes from review 2020-01-08 12:48:01 -07:00
187702efb9 bring sniffer.h inline with types.h 2020-01-08 09:45:59 -07:00
bc1cb4ead8 Fix to keep existing behavior where AAD is optional for wc_ChaCha20Poly1305_Encrypt and wc_ChaCha20Poly1305_Decrypt. 2020-01-07 18:58:26 -08:00
f13cee2689 Add comments above functions 2020-01-07 17:30:25 -07:00
b27ec58d20 Fix RSA verify only build 2020-01-08 10:18:37 +10:00
28cf563c76 Fixes from PR review: styling and formatting, remove duplicate code 2020-01-07 17:01:53 -07:00
89d8a90781 Get code compiling with SP math and RSA key gen again. 2020-01-08 09:51:26 +10:00
1f1a173d56 Fix in SP C impl for small stack
Memset correct size and only when pointer is not NULL.
2020-01-08 08:57:20 +10:00
d257003341 Merge pull request #2711 from cconlon/copyright2020
update copyright to 2020
2020-01-07 08:40:15 -08:00
190623cbb2 Merge pull request #2705 from dgarske/atecc_leak
Fix for possible ECC memory leak when using ATECC and TLS
2020-01-07 08:39:39 -08:00
709d17904a Merge pull request #2693 from SparkiDev/mp_rand
Improve speed of mp_rand
2020-01-07 08:39:11 -08:00
9e4836a863 Fix for jenkins test failure 2020-01-07 08:11:05 -08:00
b7ac709617 Merge pull request #2692 from SparkiDev/rsa_gen_modinv
Add blinding of mod inverse to RSA key gen
2020-01-07 07:56:38 -08:00
56e57f3216 Refactor Poly1305 AEAD / MAC to reduce duplicate code. Tested with TLS v1.3 interop and AEAD test vectors. 2020-01-07 07:04:01 -08:00
0f0d307b76 Fix to avoid duplicate symbol for CheckRunTimeSettings when SP and TFM are built. Specifically with these build options: USE_FAST_MATH, WOLFSSL_SP and WOLFSSL_SP_MATH. 2020-01-07 05:43:59 -08:00
acfe9717f8 Fix for K64 MMCAU with WOLFSSL_SMALL_STACK_CACHE. Moved random test prior to cipher tests (was getting called first time in GMAC test). 2020-01-07 05:39:17 -08:00
914cd00e40 Merge pull request #2717 from SparkiDev/sp_cortexm_r7
Don't use r7 with Cortex-M SP assembly
2020-01-07 05:28:43 -08:00
e0ab92058b Check CRL extension errors but don't require them 2020-01-07 11:55:07 +01:00
34a462b342 Don't use r7 with Cortex-M SP assembly
r7 not available when compiling Cortex-M4 in debug.
2020-01-07 12:53:34 +10:00
d68d5229e1 Refactor wc_ChaCha20Poly1305_Encrypt and wc_ChaCha20Poly1305_Decrypt to use the new ChaChaPoly_Aead context and init/update/final functions. 2020-01-06 17:07:09 -08:00
681ecf0e58 Fixes for wolfSSL_CTX_load_verify_locations_ex 2020-01-06 14:32:32 -08:00
991ee662c0 Return 0 in ParseCRL_Extensions if there are no CRL extensions to parse 2020-01-06 08:42:37 -08:00
f593ff8776 update linux sgx readme for wolfssl/options.h creation 2020-01-06 09:27:17 -07:00
ce0475a8e0 Merge pull request #2689 from tmael/pkey_freeMutex
Free EVP ctx pkey
2020-01-06 23:15:00 +07:00
75637445ee Improve speed of mp_rand 2020-01-06 09:39:29 +10:00
26eea36d7f Fix X509_NAME issues for Apache 2020-01-03 15:40:52 -08:00
45c5a2d39c update copyright to 2020 2020-01-03 15:06:03 -08:00
443b7ed0c4 Accept newline and null teminator at end of X509 certificate 2020-01-02 10:52:02 +01:00
01c7cc6502 Fixes to avoid declaring any variables mid-function and always initializing. 2019-12-31 11:43:13 -08:00
784d95afbe Improved state handling. 2019-12-31 10:34:06 -08:00
7d2adb2fc0 Merge pull request #2707 from tmael/rsa_cc310
Cryptocell RSA improvements to sign/verify more digest types
2019-12-31 09:19:25 -08:00
bff6dcec24 Added support for AAD calc only. Allows Init, UpdateAad and Final sequence. Verfied again with customer test cases. 2019-12-31 08:25:23 -08:00
f01999b322 Peer review feedback. 2019-12-31 08:08:33 -08:00
b901a2cd35 Use byte for bit-field. Line length cleanup. 2019-12-30 18:05:25 -08:00
4f71bcfa7c Merge pull request #2704 from ejohnstown/renegotiation
Maintenance: Renegotiation
2019-12-30 16:45:31 -08:00
f58a9e81e9 Cryptocell rsa improvements to sign/verify more digest types 2019-12-30 16:31:30 -08:00
1ee9d182cf New API's for ChaCha20/Poly1305 AEAD init/update/final:
* Provides a context for AEAD to allow "chunked" updates of data then a final calculation for the authentication tag.
* New API's are on by default and can be disabled using NO_CHACHAPOLY_AEAD_IUF.
2019-12-30 15:20:55 -08:00
abc96f20fb Merge pull request #2696 from embhorn/cert_vfy_CB
CertManager verify callback
2019-12-30 11:57:44 -08:00
1bf6eb466f CRL extensions are optional so ext errors should be skipped 2019-12-30 19:08:59 +01:00
4004963c6a test pkey references count 2019-12-30 09:31:23 -08:00
f51d940e34 Fix for ECC memory leak when using ATECC and non SECP256R1 curves for sign, verify or shared secret. Fixes #2701. 2019-12-30 08:35:30 -08:00
3b7b71c9e0 Merge pull request #2700 from JacobBarthelmeh/HardwareAcc
Hardware calls for DSP use
2019-12-27 13:58:43 -08:00
deac82c8ed Merge pull request #2683 from dgarske/various_items
Various cleanups and fixes
2019-12-27 13:53:39 -08:00
95daec5326 Merge pull request #2633 from tmael/cc_310
Update Cryptocell readme
2019-12-27 12:58:19 -08:00
78fa84be00 Merge pull request #2649 from SparkiDev/rsa_pubonly
Fix RSA public key only builds
2019-12-27 12:55:34 -08:00
dd28f26c44 Merge pull request #2699 from JacobBarthelmeh/Testing
big endian changes
2019-12-27 12:52:30 -08:00
38f466bdfe Keep untrustedDepth = 0 for self signed certs 2019-12-27 17:48:34 +01:00
add7cdd4e2 Maintenance: Renegotiation
1. Found a corner case where secure renegotiation would fail trying to
inappropriately use a session ticket.
2. Explicitly split renegotiation into Rehandshake and SecureResume.
2019-12-26 16:39:44 -08:00
e8afcbf031 Merge pull request #2702 from embhorn/spelling
Correct misspellings and typos from codespell tool
2019-12-26 08:19:20 -08:00
8580bd9937 CertManager verify callback
Execute verify callback from wolfSSL_CertManagerLoadCA
2019-12-26 09:29:03 -06:00
ac0acb3c37 fix for test case with big endian 2019-12-26 05:57:26 -07:00
b83804cb9d Correct misspellings and typos from codespell tool 2019-12-24 12:29:33 -06:00
ad9011a863 initial DSP build and success with Debug mode
build dps with ARM neon 64

fix for release mode build

add in threading protection and seperate out rng

added callback function and updates to README

update default handle to lock, and add finished handle call

cleanup after veiwing diff of changes
2019-12-23 14:17:58 -07:00
5348ecb1f2 initial makefile and build with hexagon 2019-12-23 13:49:06 -07:00
ca59bc2d16 big endian changes 2019-12-23 12:33:59 -07:00
99a7aff31e Increment pkey references count 2019-12-20 22:38:54 -08:00
48e59eaeb1 Free EVP ctx pkey 2019-12-20 22:38:54 -08:00
9d94b48056 Add blinding of mod inverse to RSA key gen 2019-12-20 12:17:42 +10:00
6c7e86f366 Maintentance: DTLS
1. Client wasn't skipping a handshake state when the server sends a
hello without a hello verify. It ended up resetting the handshake hash
and resending Hello with its next messages.
2019-12-19 11:48:05 -08:00
22f0b145d3 Various cleanups and fixes:
* Fix for key gen macro name in benchmark.c
* Fix for possible RSA fall-through warning.
* Fix for building `WOLFSSL_STM32_PKA` without `HAVE_ECC`.
* Added option to build RSA keygen without the DER to PEM using `WOLFSSL_NO_DER_TO_PEM`.
* Added options.h includes for test.c and benchmark.c.
* Added printf warning on the math size mismatch in test.c.
* Added support for benchmarking larger sizes.
* TLS benchmarks for HiFive unleashed.
2019-12-18 07:09:26 -08:00
69a0c1155f Review comment 2019-12-17 17:36:38 -08:00
5711d12364 Remove SSL_library_init() calls in unit tests to fix valgrind issues 2019-12-17 15:54:10 -07:00
c66ca1b774 Remove unused dNSName malloc from wolfSSL_X509_get_ext_d2i 2019-12-10 17:00:16 -07:00
b08d180bc9 WOLFSSL_DH redefined error fix 2019-12-09 16:13:18 -07:00
4511557f01 More jenkins test fixes 2019-12-09 15:57:53 -07:00
9ad970d8a4 Fixes for jenkins test failures 2019-12-09 14:04:52 -07:00
ee13dfd878 Add Qt 5.12 and 5.13 support
Co-Authored-By: aaronjense <aaron@wolfssl.com>
Co-Authored-By: MJSPollard <mpollard@wolfssl.com>
Co-Authored-By: Quinn Miller <quinnmiller1997@users.noreply.github.com>
Co-Authored-By: Tim Parrish <timparrish@users.noreply.github.com>
2019-12-06 14:27:01 -07:00
2528121925 Fix RSA public key only builds
Client side only and no client auth
2019-12-06 20:42:27 +10:00
4f8a37ef7b Remove wc_RsaSSL_VerifyInline from Cryptocell 2019-12-05 10:40:21 -08:00
889f111454 Update CC readme 2019-12-02 14:55:21 -08:00
996cef6db2 Added stdio.h include to types.h. 2019-07-10 18:26:43 +02:00
784 changed files with 152596 additions and 55504 deletions

View File

@ -1,3 +1,127 @@
# wolfSSL Release 4.4.0 (04/22/2020)
If you have questions about this release, then feel free to contact us on our
info@ address.
Release 4.4.0 of wolfSSL embedded TLS has bug fixes and new features including:
## New Feature Additions
* Hexagon support.
* DSP builds to offload ECC verify operations.
* Certificate Manager callback support.
* New APIs for running updates to ChaCha20/Poly1305 AEAD.
* Support for use with Apache.
* Add support for IBM s390x.
* PKCS8 support for ED25519.
* OpenVPN support.
* Add P384 curve support to SP.
* Add BIO and EVP API.
* Add AES-OFB mode.
* Add AES-CFB mode.
* Add Curve448, X448, and Ed448.
* Add Renesas Synergy S7G2 build and hardware acceleration.
## Fixes
* Fix for RSA public encrypt / private sign with RSA key sizes over 2048-bit.
* Correct misspellings.
* Secure renegotiation fix.
* Fix memory leak when using ATECC and non-SECP256R1 curves for sign, verify,
or shared secret.
* Fix for K64 MMCAU with `WOLFSSL_SMALL_STACK_CACHE`.
* Fix the RSA verify only build.
* Fix in SP C implementation for small stack.
* Fix using the auth key id extension is set, hash might not be present.
* Fix when flattening certificate structure to include the subject alt names.
* Fixes for building with ECC sign/verify only.
* Fix for ECC and no cache resistance.
* Fix memory leak in DSA.
* Fix build on minGW.
* Fix `PemToDer()` call in `ProcessBuffer()` to set more than ECC.
* Fix for using RSA without SHA-512.
* Add some close tags to the echoserver HTTP example output.
* Miscellaneous fixes and updates for static analysis reports.
* Fixes for time structure support.
* Fixes for VxWorks support.
* Fixes for Async crypto support.
* Fix cache resist compile to work with SP C code.
* Fixes for Curve25519 x64 asm.
* Fix for SP x64 div.
* Fix for DTLS edge case where CCS and Finished come out of order and the
retransmit pool gets flushed.
* Fix for infinite loop in SHA-1 with small inputs. Thanks to Peter W.
* Fix for FIPS Hmac where `wc_HmacInit()` isn't used. `wc_HmacSetKey()` needs
to initialize the Hmac structure. Type is set to NONE, and checked against
NONE, not 0.
* Fixes for SP RSA private operations.
* Fixes for Xilinx SDK and Zynq UltraScale+ MPSoC
* Fix leak when building with HAVE_AESGCM and NO_AES_DECRYPT. Thanks G.G.
* Fixes for building ECC without ASN.
* Fix for async TLSv1.3 issues.
* Fix `wc_KeyPemToDer()` with PKCS1 and empty key.
* Omit `-fomit-frame-pointer` from CFLAGS in configure.ac.
## Improvements/Optimizations
* Qt 5.12 and 5.13 support.
* Added more digest types to Cryptocell RSA sign/verify.
* Some memory usage improvements.
* Speed improvements for mp_rand.
* Improvements to CRL and OCSP support.
* Refactor Poly1305 AEAD/MAC to reduce duplicate code.
* Add blinding to RSA key gen.
* Improvements to blinding.
* Improvement and expansion of OpenSSL Compatibility Layer.
* Improvements to ChaCha20.
* Improvements to X.509 processing.
* Improvements to ECC support.
* Improvement in detecting 64-bit support.
* Refactor to combine duplicate ECC parameter parsing code.
* Improve keyFormat to be set by algId and let later key parsing produce fail.
* Add test cases for 3072-bit and 4096-bit RSA keys.
* Improve signature wrapper and DH test cases.
* Improvements to the configure.ac script.
* Added constant time RSA q modinv p.
* Improve performance of SP Intel 64-bit asm.
* Added a few more functions to the ABI list.
* Improve TLS bidirectional shutdown behavior.
* OpenSSH 8.1 support.
* Improve performance of RSA/DH operations on x64.
* Add support for PKCS7/CMS Enveloped data with fragmented encrypted content.
* Example linker description for FIPS builds to enforce object ordering.
* C# wrapper improvements. Added TLS client example and TLSv1.3 methods.
* Allow setting MTU in DTLS.
* Improve PKCS12 create for outputting encrypted bundles.
* Constant time EC map to affine for private operations.
* Improve performance of RSA public key ops with TFM.
* Smaller table version of AES encrypt/decrypt.
* Support IAR with position independent code (ROPI).
* Improve speed of AArch64 assembly.
* Support AES-CTR with AES-NI.
* Support AES-CTR on esp32.
* Add a no malloc option for small SP math.
## This release of wolfSSL includes fixes for 2 security vulnerabilities.
* For fast math, use a constant time modular inverse when mapping to affine
when operation involves a private key - keygen, calc shared secret, sign.
Thank you to Alejandro Cabrera Aldaya, Cesar Pereida García and
Billy Bob Brumley from the Network and Information Security Group (NISEC)
at Tampere University for the report.
* Change constant time and cache resistant ECC mulmod. Ensure points being
operated on change to make constant time. Thank you to Pietro Borrello at
Sapienza University of Rome.
For additional vulnerability information visit the vulnerability page at
https://www.wolfssl.com/docs/security-vulnerabilities/
See INSTALL file for build instructions.
More info can be found on-line at https://wolfssl.com/wolfSSL/Docs.html
# wolfSSL Release 4.3.0 (12/20/2019)
If you have questions about this release, then feel free to contact us on our info@ address.
@ -1020,7 +1144,7 @@ More info can be found on-line at https://wolfssl.com/wolfSSL/Docs.html
- Add helper functions for static memory option to allow getting optimum buffer
sizes.
- Update DTLS behavior on bad MAC. DTLS silently drops packets with bad MACs now.
- Update fp_isprime function from libtom enchancement/cleanup repository.
- Update fp_isprime function from libtom enhancement/cleanup repository.
- Update sanity checks on inputs and return values for AES-CMAC.
- Update wolfSSL for use with MYSQL v5.6.30.
- Update LPCXpresso eclipse project to not include misc.c when not needed.
@ -1347,7 +1471,7 @@ More info can be found on-line at //http://wolfssl.com/yaSSL/Docs.html
the Prosecco team at INRIA Paris-Rocquencourt for the report.
- FIPS version submitted
- Removes SSLv2 Client Hello processing, can be enabled with OLD_HELLO_ALLOWED
- User can set mimimum downgrade version with CyaSSL_SetMinVersion()
- User can set minimum downgrade version with CyaSSL_SetMinVersion()
- Small stack improvements at TLS/SSL layer
- TLS Master Secret generation and Key Expansion are now exposed
- Adds client side Secure Renegotiation, * not recommended *
@ -2014,7 +2138,7 @@ works but seems to remove sockets from TIME_WAIT entirely?
`sudo sysctl -w net.ipv4.tcp_fin_timeout=1`
doen't control TIME_WAIT, it controls FIN_WAIT(2) contrary to some posts
doesn't control TIME_WAIT, it controls FIN_WAIT(2) contrary to some posts
# CyaSSL Release 1.4.0 (2/18/2010)

View File

@ -1,6 +1,6 @@
/* wolfssl_client.ino
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* wolfssl_server.ino
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -22,13 +22,15 @@ The `IDE/CRYPTOCELL/main.c` example application provides a function to run the s
- SHA-256
- AES CBC
- CryptoCell 310 RNG
- RSA sign/verify and RSA key gen
- RSA sign/verify and RSA key gen (2048 bit in PKCSv1.5 padding mode)
- RSA encrypt/decrypt
- ECC sign/verify/shared secret
- ECC key import/export and key gen pairs
- Hardware RNG
- RTC for benchmark timing source
Note: All Cryptocell features are not supported. The wolfcrypt RSA API allows import and export of Private/Public keys in DER format. However, this is not possible with key pairs generated with Cryptocell because the importing/exporting Cryptocell keys has not been implemented yet.
## Setup
### Setting up Nordic SDK with wolfSSL
1. Download the wolfSSL source code or a zip file from GitHub and place it under your SDK `InstallFolder/external/` directory. You can also copy or simlink to the source.

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2019 wolfSSL Inc.
* Copyright (C) 2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2019 wolfSSL Inc.
* Copyright (C) 2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* deos_malloc.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* tls_wolfssl.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -380,10 +380,7 @@ void wolfssl_server_test(uintData_t statusPtr)
int socketAddrLen=sizeof(sockaddr);
char rx_buf[RX_BUF_SIZE];
char tx_buf[TX_BUF_SIZE];
unsigned char attempt_conn;
clientConnectionHandleType TCPserverHandle;
void * sendBuffer;
DWORD bufferSizeInBytes;
WOLFSSL * ssl;
WOLFSSL_CTX * ctx;
@ -572,7 +569,6 @@ int wolfsslRunTests (void)
{
thread_handle_t TCPhandle;
threadStatus ts;
int ret;
#if !defined(NO_CRYPT_TEST)
wolfcrypt_test(NULL);

View File

@ -1,6 +1,6 @@
/* tls_wolfssl.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* user_setting.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* client_wolfssl.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* client_wolfssl.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* server_wolfssl.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* server_wolfssl.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* user_setting.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* wolfsslRunTests.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* config.h - dummy
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* helper.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* client-tls-callback.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* wifi_connect.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -92,7 +92,7 @@ static void tls_smp_client_init(void)
ESP_LOGI(TAG, "create thread %s failed", TLS_SMP_CLIENT_TASK_NAME);
}
}
/* event hander for wifi events */
/* event handler for wifi events */
static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
{
switch (event->event_id)

View File

@ -1,6 +1,6 @@
/* wifi_connect.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* server-tls-callback.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -64,7 +64,7 @@ static void ShowCiphers(void)
#include "wolfssl/wolfcrypt/port/atmel/atmel.h"
/* when you want to use a custom slot allocation */
/* enable the difinition CUSTOM_SLOT_ALLOCATION. */
/* enable the definition CUSTOM_SLOT_ALLOCATION. */
#if defined(CUSTOM_SLOT_ALLOCATION)

View File

@ -1,6 +1,6 @@
/* wifi_connect.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -35,7 +35,7 @@ const static int CONNECTED_BIT = BIT0;
static EventGroupHandle_t wifi_event_group;
/* prefix for logging */
const static char *TAG = "tls_server";
/* proto-type difinition */
/* proto-type definition */
extern void tls_smp_server_task();
static void tls_smp_server_init();
@ -89,7 +89,7 @@ static void tls_smp_server_init(void)
ESP_LOGI(TAG, "create thread %s failed", TLS_SMP_SERVER_TASK_NAME);
}
}
/* event hander for wifi events */
/* event handler for wifi events */
static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
{
switch (event->event_id)
@ -98,8 +98,13 @@ 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_IDF_VERSION_MINOR >= 1
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;
@ -120,8 +125,11 @@ 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_netif_init();
#else
tcpip_adapter_init();
#endif
/* */
#if ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 1
(void) wifi_event_handler;

View File

@ -171,7 +171,7 @@ static void tskAes256_Test(void *pvParam)
}
#endif
#if !defined(NO_RSA) || defined(HAVE_ECC)
#if (!defined(NO_RSA) || defined(HAVE_ECC)) && !defined(WC_NO_RNG)
int mp_performance_check(int mul, int mulmod, int exptmod)
{
@ -280,13 +280,13 @@ int mp_performance_check(int mul, int mulmod, int exptmod)
printf("(%d,%d) Xbits = %d, Ybits = %d Pbits = %d",
i , j, Xbits, Ybits, Pbits);
if(mul) {
printf(" mul = %llu (us)", elapsedTime1);
printf(" mul = %llu (us)", (unsigned long long)elapsedTime1);
}
if(mulmod) {
printf(" mulmod = %llu (us)\n", elapsedTime2);
printf(" mulmod = %llu (us)\n", (unsigned long long)elapsedTime2);
}
if(exptmod) {
printf(" exptmod = %llu (ms)\n", elapsedTime3);
printf(" exptmod = %llu (ms)\n", (unsigned long long)elapsedTime3);
}
}
}
@ -539,20 +539,20 @@ int mp_unitest_exptmod(const char* strZ, const char* strX, const char* strY,
TEST_CASE("wolfssl mp exptmod test" , "[wolfssl]")
{
ESP_LOGI(TAG, "mp test");
int verbose = 0;
int verbose = 1;
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("2", "5", "1", "3", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("1", "-5", "1", "3", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("02", "5", "1", "3", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("01", "-5", "1", "3", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("CE331E6D30A77A57", "1234", "A",
"FFFFFFFFFFFFFFFF", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("1000000", "1000", "2", "FFFFFFF", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("1000000", "2", "128",
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("01000000", "1000", "2", "FFFFFFF", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("01000000", "2", "128",
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("14B5A90", "1234", "2", "FFFFFFF", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("1234321", "1111", "2", "FFFFFFFF", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("2", "5", "1", "3", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("014B5A90", "1234", "2", "FFFFFFF", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("01234321", "1111", "2", "FFFFFFFF", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("02", "5", "1", "3", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("22", "55", "1", "33", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("222", "555", "1", "333", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("0222", "555", "1", "333", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("2222", "5555", "1", "3333", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("11", "5555", "1", "33", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_exptmod("55", "1111", "1", "77", verbose));
@ -564,14 +564,14 @@ TEST_CASE("wolfssl mp mulmod test" , "[wolfssl]")
ESP_LOGI(TAG, "mp test");
int verbose = 0;
/* Z X Y M */
TEST_ASSERT_EQUAL(0, mp_unitest_mulmod("2", "5", "1", "3", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mulmod("1", "-5", "1", "3", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mulmod("2", "-64", "A", "3", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mulmod("02", "5", "1", "3", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mulmod("01", "-5", "1", "3", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mulmod("02", "-64", "A", "3", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mulmod("74C3AC", "123456", "55555", "AAAAA1", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mulmod("73A068", "123456", "55555", "AAAAA3", verbose));
mp_unitest_mulmod(
"10C530243ADE5EA7C557E9A2FF5B4573195665A89CB921F573267B15CD2BCB6467E925235AA752CC2D08B07D31497B497744CA3685A46E76247439826628589DD814AC9EEE9EF8B4B44BEE2DB6065BE3C51B788E4ECFF39FB28C3D8EBE10FC9989D97CDC6624E32EBD222E222A2E93085FC2D05E4EB73375F7FC7B11E9B3024",
"010C530243ADE5EA7C557E9A2FF5B4573195665A89CB921F573267B15CD2BCB6467E925235AA752CC2D08B07D31497B497744CA3685A46E76247439826628589DD814AC9EEE9EF8B4B44BEE2DB6065BE3C51B788E4ECFF39FB28C3D8EBE10FC9989D97CDC6624E32EBD222E222A2E93085FC2D05E4EB73375F7FC7B11E9B3024",
"A4F780E83C3FAC34878787D4876BA7582E48C7637A26C6E720974FC7416150A3865D44F6D08E3DA38EB4296928C564D9A0008D8A0D63E0B8EF54D14D54FBEAB540E43D2ED6BE54806D9150C1944437CC3D8B2486A1FB932A6691B529E0E2A46524CB0825BA4F4E1B9C24554DB1913169E5373173A3B7CBBF77C3403C8C7AE86A",
"6520379E44C1A2C359342010E1038F8C3644D9A47A9346A80C92B48A6986872D74C3BDDB49B2D93C554B588D4A4448614FADBC066CC10F3EB20A2422EA857B7DD0BF60C9CB7D733B12761BD785BCD122D97ECA0A8F1D0F705BC094B66EE5C96712AE3B14B5AA6AD9E50C6A3020BA01DA4FB94E3934527ADCDB3DE51C368B37C2",
"BE7070B80418E528FE66D89088E0F1B7C3D0D23EE64B9474B0FFB0F763A5AB7EAFB62BB738161A50BFF1CA873AD5B0DAF8437A15B97EEA2A80D251B035AF07F3F25D243A4B8756481B3C249ADA7080BD3C8B034A0C8371DEE30370A2B760091B5EC73DA06460E3A9068DD3FF42BB0A94272D57420DB02DE0BA182560921192F3",
@ -604,11 +604,11 @@ TEST_CASE("wolfssl mp mul test" , "[wolfssl]")
ESP_LOGI(TAG, "mp test");
int verbose = 0;
TEST_ASSERT_EQUAL(0, mp_unitest_mul("A", "5", "2", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mul("-A", "-5", "2", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mul("A", "-5", "-2", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mul("6260060", "1234", "5678", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mul("38E83", "123", "321", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mul("0A", "5", "2", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mul("-0A", "-5", "2", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mul("0A", "-5", "-2", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mul("06260060", "1234", "5678", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mul("038E83", "123", "321", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mul("75CD7FCBBC", "123456", "6789A", verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mul(
@ -618,7 +618,7 @@ TEST_CASE("wolfssl mp mul test" , "[wolfssl]")
verbose));
TEST_ASSERT_EQUAL(0, mp_unitest_mul(
"33676FE7B625BF0759F7E8932B6B50D5F45E16E1C670AD20F1CDA5DFFA433685937CA8422A9CB916CC8",
"033676FE7B625BF0759F7E8932B6B50D5F45E16E1C670AD20F1CDA5DFFA433685937CA8422A9CB916CC8",
"165196BA298CD54975DC483C4D21A51EA0A146783CFB41522E76E50C",
"24D9D5CA7D9CCC06F5E70F1963E6",
verbose));
@ -636,7 +636,7 @@ TEST_CASE("wolfssl mp mul performance test" , "[wolfssl]")
TEST_ASSERT_EQUAL(0, mp_performance_check(mul, mulmod, exptmod));
}
#endif/* !NO_RSA || HAVE_ECC */
#endif/* (!NO_RSA || HAVE_ECC) && !WC_NO_RNG */
TEST_CASE("wolfssl aes test" , "[wolfssl]")
{

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -43,6 +43,10 @@
#define CURVE25519_SMALL
#define HAVE_ED25519
/* when you want to use aes counter mode */
/* #define WOLFSSL_AES_DIRECT */
/* #define WOLFSSL_AES_COUNTER */
/* esp32-wroom-32se specific definition */
#if defined(WOLFSSL_ESPWROOM32SE)
#define WOLFSSL_ATECC508A

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* armtarget.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -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");

View File

@ -1,6 +1,6 @@
/* benchmark_main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* test_main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* tls_client.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* wolf_main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -9,6 +9,7 @@ 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/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

View File

@ -0,0 +1,92 @@
MEMORY
{
FLASH (wx) : ORIGIN = 0x00000000, LENGTH = 256K
RAM (wx) : ORIGIN = 0x20000000, LENGTH = 64K
}
SECTIONS
{
__vectors_start__ = .;
.vectors : { *(.vectors) } > FLASH
__vectors_end__ = __vectors_start__ + 0x400;
/* Custom section for wolfCrypt FIPS module */
.wolfCryptFIPSModule_text :
{
. = ALIGN(4);
KEEP(wolfcrypt_first.o (.text .text* ))
KEEP(aes.o(.text .text* ))
KEEP(cmac.o (.text .text* ))
KEEP(des3.o (.text .text* ))
KEEP(dh.o (.text .text* ))
KEEP(ecc.o (.text .text* ))
KEEP(fips.o (.text .text* ))
KEEP(fips_test.o (.text .text* ))
KEEP(hmac.o (.text .text* ))
KEEP(random.o(.text .text* ))
KEEP(rsa.o (.text .text* ))
KEEP(sha.o (.text .text* ))
KEEP(sha256.o (.text .text* ))
KEEP(sha3.o (.text .text* ))
KEEP(sha512.o (.text .text* ))
KEEP(wolfcrypt_last.o(.text .text*))
. = ALIGN(4);
} > FLASH
.wolfCryptFIPSModule_rodata :
{
. = ALIGN(4);
KEEP(wolfcrypt_first.o (.rodata .rodata*))
KEEP(aes.o(.rodata .rodata*))
KEEP(cmac.o(.rodata .rodata*))
KEEP(des3.o(.rodata .rodata*))
KEEP(dh.o(.rodata .rodata*))
KEEP(ecc.o(.rodata .rodata*))
KEEP(fips.o(.rodata .rodata*))
KEEP(fips_test.o(.rodata .rodata*))
KEEP(hmac.o(.rodata .rodata*))
KEEP(random.o(.rodata .rodata*))
KEEP(rsa.o(.rodata .rodata*))
KEEP(sha.o(.rodata .rodata*))
KEEP(sha256.o(.rodata .rodata*))
KEEP(sha3.o(.rodata .rodata*))
KEEP(sha512.o(.rodata .rodata*))
KEEP(wolfcrypt_last.o(.rodata .rodata*))
. = ALIGN(4);
} > FLASH
/* Custom section for wolfCrypt and LibC to prevent FIPS hash from changing
when application code changes are made */
.wolfCryptNonFIPS_text :
{
. = ALIGN(4);
KEEP(*wolf*src*.o(.text .text*))
lib_a* ( .text .text*)
. = ALIGN(4);
} > FLASH
.wolfCryptNonFIPS_rodata :
{
. = ALIGN(4);
KEEP(*wolf*src*.o(.rodata .rodata*))
lib_a* (.rodata .rodata*)
. = ALIGN(4);
} > FLASH
.sys : { *(.sys*) } > FLASH
.text : { *(.text*) } > FLASH
.rodata : { *(.text*) } > FLASH
__data_load_start__ = .;
__data_start__ = .;
.data : { *(.data*) } > RAM
__data_end__ = __data_start__ + SIZEOF(.data);
__bss_start__ = .;
.bss : { *(.bss*) } > RAM
__bss_end__ = __bss_start__ + SIZEOF(.bss);
__heap_start__ = .;
.heap : { *(.heap*) } > RAM
__heap_end__ = __heap_start__ + SIZEOF(.heap);
end = .;
}

110
IDE/HEXAGON/DSP/Makefile Normal file
View File

@ -0,0 +1,110 @@
# Makefile
#
# Copyright (C) 2006-2020 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
ENVI=hexagon
# default to hexagon v65 Release build
ifndef V
V=hexagon_Release_dynamic_toolv83_v65
endif
SUPPORTED_VS = $(default_VS)
DEPENDENCIES = \
ATOMIC \
RPCMEM \
TEST_MAIN \
TEST_UTIL
ATOMIC_DIR = $(HEXAGON_SDK_ROOT)/libs/common/atomic
RPCMEM_DIR = $(HEXAGON_SDK_ROOT)/libs/common/rpcmem
TEST_MAIN_DIR = $(HEXAGON_SDK_ROOT)/test/common/test_main
TEST_UTIL_DIR = $(HEXAGON_SDK_ROOT)/test/common/test_util
include $(HEXAGON_SDK_ROOT)/build/make.d/$(ENVI)_vs.min
include $(HEXAGON_SDK_ROOT)/build/defines.min
QURT = $(HEXAGON_SDK_ROOT)/libs/common/qurt
QAIC_FLAGS += -I../../../
CC_FLAGS += -I../../../
CC_FLAGS += -I $(QURT)/computev65/include/posix/
CC_FLAGS += -I $(QURT)/computev65/include/qurt/
CC_FLAGS += -I../
CC_FLAGS += -DWOLFSSL_USER_SETTINGS
CC_FLAGS += -DWOLFSSL_DSP_BUILD
CC_FLAGS += -DWC_NO_RNG
#CC_FLAGS += -O3
C_FLAGS += $(MHVX_DOUBLE_FLAG) -mllvm -hexagon-eif=0
CC_FLAGS += $(MHVX_DOUBLE_FLAG) -mllvm -hexagon-eif=0
# stub library
BUILD_LIBS += libwolfssl_dsp_skel
ifeq (1,$(V_dynamic))
BUILD_DLLS += libwolfssl_dsp_skel
endif
libwolfssl_dsp_skel_QAICIDLS += wolfssl_dsp
libwolfssl_dsp_skel_C_SRCS += $V/wolfSSL_skel
libwolfssl_dsp_skel.C_SRCS += ../../../wolfcrypt/src/sp_dsp32.c
libwolfssl_dsp_skel.C_SRCS += ../../../wolfcrypt/src/sp_int.c
libwolfssl_dsp_skel.C_SRCS += ../../../wolfcrypt/src/wc_port.c
libwolfssl_dsp_skel.C_SRCS += ../../../wolfcrypt/src/logging.c
libwolfssl_dsp_skel.C_SRCS += ../../../wolfcrypt/src/memory.c
libwolfssl_dsp_skel.C_SRCS += ../../../wolfcrypt/src/wolfmath.c
#libsp_dsp_skel_DLLS += libdspCV_skel
# quality test
#BUILD_QEXES += eccverify_q
#eccverify_q_QAICIDLS = wolfssl_dsp
#eccverify_q_C_SRCS = ../ecc-verify
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/wc_dsp.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/sp_dsp32.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/sp_int.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/wc_port.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/wc_encrypt.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/pwdbased.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/hash.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/arc4.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/hmac.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/md5.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/coding.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/aes.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/des3.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/random.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/logging.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/ecc.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/memory.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/sha256.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/sha.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/asn.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/wolfmath.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/sp_c32.c
#eccverify_q.C_SRCS += ../../../wolfcrypt/src/sp_c64.c
#eccverify_q_LIBS = rtld rpcmem test_util atomic test_main
BUILD_COPIES = \
$(DLLS) \
$(EXES) \
$(LIBS) \
$(SHIP_DIR)/ ;
include $(RULES_MIN)

View File

@ -0,0 +1,13 @@
#ifndef WOLFSSL_DSP_INC
#define WOLFSSL_DSP_INC
#include "AEEStdDef.idl"
#include "remote.idl"
interface wolfSSL: remote_handle64{
/* ecc operations */
long DSP_ECC_Verify_256(inrout sequence<int32> hash, inrout sequence<int32> pX, inrout sequence<int32> pY,
inrout sequence<int32> pZ, inrout sequence<int32> r, inrout sequence<int32> sm, inrout long res);
};
#endif

189
IDE/HEXAGON/Makefile Normal file
View File

@ -0,0 +1,189 @@
# Makefile
#
# Copyright (C) 2006-2020 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
ENVI=UbuntuARM
# default to Ubuntu Release build
ifndef V
V=UbuntuARM_Release_aarch64
endif
SUPPORTED_VS = $(default_VS)
include $(HEXAGON_SDK_ROOT)/build/make.d/$(ENVI)_vs.min
include $(HEXAGON_SDK_ROOT)/build/defines.min
ifeq ($(CDSP_FLAG), 1)
LIB_DSPRPC = libcdsprpc
else ifeq ($(MDSP_FLAG), 1)
LIB_DSPRPC = libmdsprpc
else ifeq ($(SLPI_FLAG), 1)
LIB_DSPRPC = libsdsprpc
else
LIB_DSPRPC = libadsprpc
endif
$(info ************ LIB=$(LIB_DSPRPC) ************)
# include files
CC_FLAGS += -I../../
CC_FLAGS += -I./
CC_FLAGS += -DWOLFSSL_USER_SETTINGS
CC_FLAGS += -mcpu=generic+crypto
#CC_FLAGS += -O3
DEPENDENCIES = \
ATOMIC \
RPCMEM
ATOMIC_DIR = $(HEXAGON_SDK_ROOT)/libs/common/atomic
RPCMEM_DIR = $(HEXAGON_SDK_ROOT)/libs/common/rpcmem
# stub library
BUILD_DLLS += libwolfssl
libwolfssl_QAICIDLS += DSP/wolfssl_dsp
libwolfssl_C_SRCS += $V/wolfSSL_stub
libwolfssl_DLLS += $(LIB_DSPRPC)
libwolfssl_C_SRCS += ../../wolfcrypt/src/wc_dsp
libwolfssl_LIBS += rpcmem
libwolfssl_LD_FLAGS += -ldl
# wolfSSL crypto source files
libwolfssl_C_SRCS += \
../../wolfcrypt/src/aes \
../../wolfcrypt/src/md2 \
../../wolfcrypt/src/arc4 \
../../wolfcrypt/src/md4 \
../../wolfcrypt/src/asm \
../../wolfcrypt/src/md5 \
../../wolfcrypt/src/asn \
../../wolfcrypt/src/memory \
../../wolfcrypt/src/async \
../../wolfcrypt/src/blake2b \
../../wolfcrypt/src/pkcs12 \
../../wolfcrypt/src/blake2s \
../../wolfcrypt/src/pkcs7 \
../../wolfcrypt/src/camellia \
../../wolfcrypt/src/poly1305 \
../../wolfcrypt/src/chacha20_poly1305 \
../../wolfcrypt/src/pwdbased \
../../wolfcrypt/src/chacha \
../../wolfcrypt/src/rabbit \
../../wolfcrypt/src/cmac \
../../wolfcrypt/src/random \
../../wolfcrypt/src/coding \
../../wolfcrypt/src/ripemd \
../../wolfcrypt/src/compress \
../../wolfcrypt/src/rsa \
../../wolfcrypt/src/cpuid \
../../wolfcrypt/src/selftest \
../../wolfcrypt/src/cryptocb \
../../wolfcrypt/src/sha256 \
../../wolfcrypt/src/curve25519 \
../../wolfcrypt/src/sha3 \
../../wolfcrypt/src/des3 \
../../wolfcrypt/src/sha512 \
../../wolfcrypt/src/dh \
../../wolfcrypt/src/sha \
../../wolfcrypt/src/signature \
../../wolfcrypt/src/ecc \
../../wolfcrypt/src/ecc_fp \
../../wolfcrypt/src/ed25519 \
../../wolfcrypt/src/sp_armthumb \
../../wolfcrypt/src/error \
../../wolfcrypt/src/sp_int \
../../wolfcrypt/src/fe_low_mem \
../../wolfcrypt/src/sp_cortexm \
../../wolfcrypt/src/fe_operations \
../../wolfcrypt/src/fips \
../../wolfcrypt/src/sp_x86_64 \
../../wolfcrypt/src/fips_test \
../../wolfcrypt/src/srp \
../../wolfcrypt/src/ge_low_mem \
../../wolfcrypt/src/ge_operations \
../../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 \
../../wolfcrypt/src/sp_c32 \
../../wolfcrypt/src/sp_c64 \
../../wolfcrypt/src/sp_arm32 \
../../wolfcrypt/src/sp_arm64 \
../../wolfcrypt/src/wolfmath
# wolfSSL TLS source files
libwolfssl_C_SRCS += \
../../src/ocsp \
../../src/tls \
../../src/crl \
../../src/sniffer \
../../src/wolfio \
../../src/internal \
../../src/ssl \
../../src/keys \
../../src/tls13
# build benchmark app
BUILD_EXES += benchmark
benchmark_C_SRCS += ../../wolfcrypt/benchmark/benchmark
benchmark_LD_FLAGS += -ldl
benchmark_LD_FLAGS += -lpthread
benchmark_DLLS += libwolfssl
benchmark_LIBS += rpcmem
benchmark_DLLS += $(LIB_DSPRPC)
# build test app
BUILD_EXES += testwolfcrypt
testwolfcrypt_C_SRCS += ../../wolfcrypt/test/test
testwolfcrypt_DLLS += libwolfssl
testwolfcrypt_LD_FLAGS += -ldl
testwolfcrypt_LIBS += rpcmem
testwolfcrypt_DLLS += $(LIB_DSPRPC)
# build ecc verify test app
BUILD_EXES += eccverify
eccverify_C_SRCS += ecc-verify
eccverify_DLLS += libwolfssl
eccverify_LD_FLAGS += -ldl
eccverify_LIBS += rpcmem
eccverify_DLLS += $(LIB_DSPRPC)
# build ecc verify test app
BUILD_EXES += eccbenchmark
eccbenchmark_C_SRCS += ecc-verify-benchmark
eccbenchmark_DLLS += libwolfssl
eccbenchmark_LD_FLAGS += -lpthread
eccbenchmark_LD_FLAGS += -ldl
eccbenchmark_LIBS += rpcmem
eccbenchmark_DLLS += $(LIB_DSPRPC)
BUILD_COPIES = \
$(DLLS) \
$(EXES) \
$(LIBS) \
$(SHIP_DIR)/ ;
include $(RULES_MIN)

75
IDE/HEXAGON/README.md Normal file
View File

@ -0,0 +1,75 @@
# Building wolfSSL with DSP Use
## Intro
This directory is to help with building wolfSSL for use with DSP. It assumes that the Hexagon SDK has been setup on the machine and that the environment variables have been set by calling (source ~/Qualcomm/Hexagon_SDK/3.4.3/setup_sdk_env.source). Currently offloading ECC 256 verify operations to the DSP is supported. When WOLFSSL_DSP is defined ECC verify operations are offloaded to the aDSP by default. When not in SINGLE_THREADED mode a call back function must be set for getting the handle or a handle must be set in the ecc_key structure for the operation to make use of multiple threads when offloading to the DSP. This is because creating new handles for new threads must be done.
## Building
The directory is divided up into a build for the CPU portion in IDE/HEXAGON and a build for use on the DSP located in IDE/HEXAGON/DSP. Each section has their own Makefile. The Makefile default to an Ubuntu + hexagon v65 release build but can be changed by using V=<build type>. An example of building both would be:
```
cd IDE/HEXAGON
make V=UbuntuARM_Release_aarch64
cd DSP
make V=hexagon_Release_dynamic_toolv83_v65
```
The results from each build will be placed into the ship directories of each, for example ./UbuntuARM_Release_aarch64/ship/* and ./DSP/hexagon_Release_dynamic_toolv83_v65/ship/*.
The Makefile creates a DSP library libwolfssl_dsp_skel.so, library libwolfssl.so, executable benchmark, example ecc-verify, example ecc-verify-benchmark and executable testwolfcrypt.
These then need pushed to the device in order to run. An example of pushing the results to the device would be:
```
cd IDE/HEXAGON
adb push DSP/hexagon_Release_dynamic_toolv83_v65/ship/libwolfssl_dsp_skel.so /data/rfsa/adsp/
adb push UbuntuARM_Release_aarch64/ship/libwolfssl.so /data/
adb push UbuntuARM_Release_aarch64/ship/benchmark /data/
adb push UbuntuARM_Release_aarch64/ship/eccverify /data/
adb push UbuntuARM_Release_aarch64/ship/eccbenchmark /data/
```
To change the settings wolfSSL is built with macros can be set in IDE/HEXAGON/user_settings.h. It contains a default setting at this point that was used for collecting benchmark values. The macro necessary to turn on use of the DSP is WOLFSSL_DSP.
The script IDE/HEXAGON/build.sh was added to help speed up building and testing. An example of using the script would be:
```
cd IDE/HEXAGON
./build.sh Release
```
This will delete the previous build and rebuild for Release mode. Then it will try to push the resulting library and some of the executables to the device.
For increased performance uncomment the -O3 flag in IDE/HEXAGON/Makefile and IDE/HEXAGON/DSP/Makefile.
## Use
A default handle is created with the call to wolfCrypt_Init() and is set to use the aDSP. A default mutex is locked for each use of the handle to make the library stable when multiple threads are calling to DSP supported operations.
To use wolfSSL with a user created handle it can be done by calling wc_ecc_set_handle or by setting a callback function using wolfSSL_SetHandleCb(). This should be set in the case of multithreaded applications to account for having a handle for each thread being used.
#### wolfSSL_SetHandleCb
The API wolfSSL_SetHandleCb takes a function pointer of type "int (*wolfSSL_DSP_Handle_cb)(remote_handle64 *handle, int finished void *ctx);". This callback is executed right before the operation is handed off to the DSP (finished set to 0) and right after done with the handle (finished set to 1). With ECC this would be after the ECC verify function has been called but before the information is passed on to the DSP and once again with the finished flag set after the result is returned.
The callback set should return 0 on successfully setting the input handle. The ctx argument is for future custom context to be passed in and is currently not used.
#### Expected Performance
This is the expected results from running ./eccbenchmark using the -O3 flag
benchmarking using default (locks on handle for aDSP)
5000 verifies on 1 threads took 17.481616 seconds
10000 verifies on 2 threads took 35.324308 seconds
benchmarking using software (+NEON if built in)
5000 verifies on 1 threads took 1.398336 seconds
10000 verifies on 2 threads took 1.383992 seconds
benchmarking using threads on aDSP
5000 verifies on 1 threads took 17.616811 seconds
10000 verifies on 2 threads took 19.215413 seconds
15000 verifies on 3 threads took 20.410200 seconds
20000 verifies on 4 threads took 23.261446 seconds
benchmarking 1 thread on cDSP
5000 verifies on 1 threads took 18.560995 seconds

38
IDE/HEXAGON/build.sh Executable file
View File

@ -0,0 +1,38 @@
#!/bin/bash
if [ -z $1 ]; then
echo "./build <Debug | Release>"
exit -1
fi
printf "Erasing previous hexagon_$1_dynamic_toolv83_v65 and UbuntuARM_$1_aarch64\n"
rm -rf hexagon_$1_dynamic_toolv83_v65 &> /dev/null
rm -rf UbuntuARM_$1_aarch64 &> /dev/null
cd ./DSP &> /dev/null
rm -rf hexagon_$1_dynamic_toolv83_v65 &> /dev/null
printf "Building hexagon_$1_dynamic_toolv83_v65 ..."
make V=hexagon_$1_dynamic_toolv83_v65 &> /dev/null
if [ $? != 0 ]; then
printf "failed\n"
else
printf "done\n"
fi
cd ../ &> /dev/null
printf "Building UbuntuARM_$1_aarch64 ..."
make V=UbuntuARM_$1_aarch64 &> /dev/null
if [ $? != 0 ]; then
printf "failed\n"
else
printf "done\n"
fi
printf "Trying to push libwolfssl_Dsp_skel.so, libwolfssl.so, benchmark, eccverify, eccbenchmark\n"
adb push DSP/hexagon_$1_dynamic_toolv83_v65/ship/libwolfssl_dsp_skel.so /data/rfsa/adsp/
adb push UbuntuARM_$1_aarch64/ship/libwolfssl.so /data/
adb push UbuntuARM_$1_aarch64/ship/benchmark /data/
adb push UbuntuARM_$1_aarch64/ship/eccverify /data/
adb push UbuntuARM_$1_aarch64/ship/eccbenchmark /data/
#adb push UbuntuARM_$1_aarch64/ship/testwolfcrypt /data/wolfcrypt/test/
printf "done\n"
exit 0

View File

@ -0,0 +1,185 @@
/* ecc-verify-benchmark.c
*
* Copyright (C) 2006-2020 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/sha256.h>
#include <wolfssl/wolfcrypt/random.h>
#include <wolfssl/wolfcrypt/ecc.h>
#include <wolfssl/wolfcrypt/asn_public.h>
#include <pthread.h>
#define USE_CERT_BUFFERS_256
#include <wolfssl/certs_test.h>
#define MAX_TIMES 5000
#define MAX_BLOCK_SIZE 1024
#include <sys/time.h>
static double get_time()
{
struct timeval tv;
gettimeofday(&tv, 0);
return (double)tv.tv_sec + (double)tv.tv_usec / 1000000;
}
/* software version */
void* hash_firmware_verify(void* key)
{
int ret, i;
int verify;
const byte hash[] = {
0XFB, 0XBA, 0XB2, 0X89, 0XF7, 0XF9, 0X4B, 0X25, 0X73, 0X6C, 0X58, 0XBE, 0X46, 0XA9, 0X94, 0XC4, 0X41, 0XFD, 0X02, 0X55, 0X2C, 0XC6, 0X02, 0X23, 0X52, 0XE3, 0XD8, 0X6D, 0X2F, 0XAB, 0X7C, 0X83
};
const byte sigBuf[] = {
0X30, 0X44, 0X02, 0X20, 0X05, 0X38, 0XBC, 0X16, 0XC7, 0X67, 0X18, 0XEC, 0XE6, 0X1E, 0X43, 0X7B, 0X29, 0X8F, 0X85, 0X01, 0X33, 0XA8, 0X9B, 0XDD, 0X91, 0X32, 0X1F, 0XEC, 0XF7, 0X91, 0X18, 0X72, 0X9C, 0XE2, 0X6F, 0X31, 0X02, 0X20, 0X3E, 0X31, 0XD6, 0X40, 0XF7, 0X38, 0X3C, 0X1B, 0X6D, 0XAD, 0XE3, 0X93, 0X20, 0XE8, 0XB1, 0XBD, 0X3C, 0X59, 0XF2, 0XD2, 0X7C, 0X46, 0X1B, 0XE5, 0XE1, 0XE3, 0XAB, 0X5E, 0X76, 0X73, 0X6F, 0XFB
};
word32 sigLen = (word32)sizeof(sigBuf);
word32 hashLen = (word32)sizeof(hash);
for (i = 0; i < MAX_TIMES; i++) {
ret = wc_ecc_verify_hash((byte*)sigBuf, sigLen, hash, hashLen, &verify, (ecc_key*)key);
if (ret < 0 || verify != 1) {
printf("failed on try %d\n", i);
break;
}
}
if (ret < 0 || verify != 1) {
printf("unable to verify, ret = %d verify = %d\n", ret, verify);
}
return NULL;
}
/* when flag is set then try to use software only if DSP is built in */
static int hash_firmware_verify_default(int numThreads)
{
int ret, i;
word32 idx;
double t;
pthread_t threads[numThreads];
ecc_key eccKey[numThreads];
for (i = 0; i < numThreads; i++) {
wc_ecc_init(&(eccKey[i]));
idx = 0;
ret = wc_EccPrivateKeyDecode(ecc_clikey_der_256, &idx, &(eccKey[i]), sizeof_ecc_clikey_der_256);
if (ret < 0)
return ret;
}
t = get_time();
for (i = 0; i < numThreads; i++) {
pthread_create(&threads[i], NULL, hash_firmware_verify, (void*)&(eccKey[i]));
}
for (i = 0; i < numThreads; i++) {
pthread_join(threads[i], NULL);
}
t = get_time() - t;
printf("%d verifies on %d threads took %f seconds\n", MAX_TIMES * numThreads, numThreads, t);
return 0;
}
#ifdef WOLFSSL_DSP
/* domain 0 = cDSP 1 = aDSP */
static int hash_firmware_verify_dsp(int numThreads, int domain)
{
int ret, i;
word32 idx;
double t;
remote_handle64 handle[numThreads];
char *sp_URI_value;
pthread_t threads[numThreads];
ecc_key eccKey[numThreads];
if (domain == 0) {
sp_URI_value = wolfSSL_URI "&_dom=cdsp";
}
else {
sp_URI_value = wolfSSL_URI "&_dom=adsp";
}
for (i = 0; i < numThreads; i++) {
wc_ecc_init(&(eccKey[i]));
idx = 0;
ret = wc_EccPrivateKeyDecode(ecc_clikey_der_256, &idx, &(eccKey[i]), sizeof_ecc_clikey_der_256);
if (ret < 0)
return ret;
ret = wolfSSL_open(sp_URI_value, &(handle[i]));
if (ret != 0) {
printf("unable to open CDSP? retVal = %d\n", ret);
return -1;
}
wc_ecc_set_handle(&(eccKey[i]), handle[i]);
}
t = get_time();
for (i = 0; i < numThreads; i++) {
pthread_create(&threads[i], NULL, hash_firmware_verify, (void*)&(eccKey[i]));
}
for (i = 0; i < numThreads; i++) {
pthread_join(threads[i], NULL);
wolfSSL_close(handle[i]);
}
t = get_time() - t;
printf("%d verifies on %d threads took %f seconds\n", MAX_TIMES * numThreads, numThreads, t);
return 0;
}
#endif /* WOLFSSL_DSP */
int main(int argc, char* argv[])
{
wolfCrypt_Init();
printf("benchmarking using default (locks on handle for aDSP)\n");
hash_firmware_verify_default(1);
hash_firmware_verify_default(2);
printf("\nbenchmarking using software (+NEON if built in)\n");
#ifdef WOLFSSL_DSP
wolfSSL_SetHandleCb(NULL); /* remove calls to DSP by default */
#endif
hash_firmware_verify_default(1);
hash_firmware_verify_default(2);
#ifdef WOLFSSL_DSP
printf("\nbenchmarking using threads on aDSP\n");
hash_firmware_verify_dsp(1, 1);
hash_firmware_verify_dsp(2, 1);
hash_firmware_verify_dsp(3, 1);
hash_firmware_verify_dsp(4, 1);
printf("\nbenchmarking 1 thread on cDSP\n");
hash_firmware_verify_dsp(1, 0);
#endif /* WOLFSSL_DSP */
wolfCrypt_Cleanup();
return 0;
}

91
IDE/HEXAGON/ecc-verify.c Normal file
View File

@ -0,0 +1,91 @@
/* ecc-verify.c
*
* Copyright (C) 2006-2020 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/sha256.h>
#include <wolfssl/wolfcrypt/random.h>
#include <wolfssl/wolfcrypt/ecc.h>
#include <wolfssl/wolfcrypt/asn_public.h>
#define USE_CERT_BUFFERS_256
#include <wolfssl/certs_test.h>
#define MAX_BLOCK_SIZE 1024
#ifdef WOLFSSL_DSP
static char *sp_URI_value = wolfSSL_URI "&_dom=cdsp";
int hash_firmware_verify(const byte* hash, word32 hashLen, const byte* sigBuf, word32 sigLen)
{
int ret;
ecc_key eccKey;
word32 idx;
int verify;
remote_handle64 handle = -1;
idx = 0;
ret = wc_EccPrivateKeyDecode(ecc_clikey_der_256, &idx, &eccKey, sizeof_ecc_clikey_der_256);
if (ret < 0)
goto exit;
int retVal = wolfSSL_open(sp_URI_value, &handle);
if (retVal != 0) {
printf("unable to open CDSP? retVal = %d\n", retVal);
ret = -1;
goto exit;
}
wc_ecc_set_handle(&eccKey, handle);
ret = wc_ecc_verify_hash((byte*)sigBuf, sigLen, hash, hashLen, &verify, &eccKey);
printf("verify = %d\n", verify);
if (ret < 0)
goto exit;
wolfSSL_close(handle);
exit:
return ret;
}
int main(void)
{
int ret;
const byte hash[] = {
0XFB, 0XBA, 0XB2, 0X89, 0XF7, 0XF9, 0X4B, 0X25, 0X73, 0X6C, 0X58, 0XBE, 0X46, 0XA9, 0X94, 0XC4, 0X41, 0XFD, 0X02, 0X55, 0X2C, 0XC6, 0X02, 0X23, 0X52, 0XE3, 0XD8, 0X6D, 0X2F, 0XAB, 0X7C, 0X83
};
const byte sigBuf[] = {
0X30, 0X44, 0X02, 0X20, 0X05, 0X38, 0XBC, 0X16, 0XC7, 0X67, 0X18, 0XEC, 0XE6, 0X1E, 0X43, 0X7B, 0X29, 0X8F, 0X85, 0X01, 0X33, 0XA8, 0X9B, 0XDD, 0X91, 0X32, 0X1F, 0XEC, 0XF7, 0X91, 0X18, 0X72, 0X9C, 0XE2, 0X6F, 0X31, 0X02, 0X20, 0X3E, 0X31, 0XD6, 0X40, 0XF7, 0X38, 0X3C, 0X1B, 0X6D, 0XAD, 0XE3, 0X93, 0X20, 0XE8, 0XB1, 0XBD, 0X3C, 0X59, 0XF2, 0XD2, 0X7C, 0X46, 0X1B, 0XE5, 0XE1, 0XE3, 0XAB, 0X5E, 0X76, 0X73, 0X6F, 0XFB
};
word32 sigLen = (word32)sizeof(sigBuf);
wolfCrypt_Init();
ret = hash_firmware_verify(hash, sizeof(hash), sigBuf, sigLen);
printf("hash_firmware_verify: %d\n", ret);
wolfCrypt_Cleanup();
return 0;
}
#else
int main()
{
printf("WOLFSSL_DSP expected to be defined when building\n");
return 0;
}
#endif /* WOLFSSL_DSP */

14
IDE/HEXAGON/include.am Normal file
View File

@ -0,0 +1,14 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
EXTRA_DIST+= IDE/HEXAGON/Makefile
EXTRA_DIST+= IDE/HEXAGON/user_settings.h
EXTRA_DIST+= IDE/HEXAGON/README.md
EXTRA_DIST+= IDE/HEXAGON/build.sh
EXTRA_DIST+= IDE/HEXAGON/ecc-verify.c
EXTRA_DIST+= IDE/HEXAGON/ecc-verify-benchmark.c
EXTRA_DIST+= IDE/HEXAGON/DSP/Makefile
EXTRA_DIST+= IDE/HEXAGON/DSP/wolfssl_dsp.idl

View File

@ -0,0 +1,37 @@
#ifndef USER_SETTINGS_H
#define USER_SETTINGS_H
#define WOLFCRYPT_ONLY
#define HAVE_ECC
#define FP_ECC
//#define FP_ENTRIES 1
#define NO_DSA
#define NO_DH
#define NO_RSA
//#define DEBUG_WOLFSSL
#define USE_FAST_MATH
#define TFM_TIMING_RESISTANT
#ifdef HAVE_ECC
#define ECC_TIMING_RESISTANT
#endif
#ifndef NO_RSA
#define WC_RSA_BLINDING
#endif
#if 1
#define WOLFSSL_HAVE_SP_RSA
#define WOLFSSL_HAVE_SP_ECC
#define WOLFSSL_SP_MATH
#if 1
/* ARM NEON instructions */
#define WOLFSSL_SP_ARM64_ASM
#endif
#if 1
/* Use DSP */
#define WOLFSSL_DSP
#endif
#endif
#endif

View File

@ -1,6 +1,6 @@
/* benchmark-main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* current-time.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -44,7 +44,7 @@ void InitTimer(void) {
SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);
printf("Clock=%dMHz\n", ui32SysClock/1000000) ;
printf("Clock=%dMHz\n", (int)(ui32SysClock/1000000));
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
ROM_TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC);
ROM_TimerLoadSet(TIMER0_BASE, TIMER_A, -1);
@ -64,10 +64,10 @@ double current_time(int reset)
/* dummy */
double current_time(int reset) {
static double t;
t += 1.0; /* for avoid infinit loop of waiting time */
static double t;
t += 1.0; /* for avoid infinite loop of waiting time */
if(reset)t = 0.0;
return t ;
}
return t ;
}
#endif
#endif

View File

@ -1,6 +1,6 @@
/* minimum-startup.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -343,7 +343,7 @@
</option>
<option>
<name>CCPosIndRopi</name>
<state>0</state>
<state>1</state>
</option>
<option>
<name>CCPosIndRwpi</name>

View File

@ -1,6 +1,6 @@
/* test-main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -6,7 +6,7 @@ embOS v4.16 (for Cortex-M and IAR compiler)
wolfssl (latest version)
Required items (Hardware) for this guide:
Atmel SAM V71 Xplained Ultra (Or equivelent Cortex-M Evaluation Board)
Atmel SAM V71 Xplained Ultra (Or equivalent Cortex-M Evaluation Board)
Note: Must have J-Trace adapter (SWD or SWD + ETM)
j-Trace for ARM Cortex-M Processors
Note: You can see here: https://www.segger.com/j-trace-for-cortex-m.html

View File

@ -6,7 +6,7 @@ embOS v4.16 (for Cortex-M and IAR compiler)
wolfssl (latest version)
Required items (Hardware) for this guide:
Atmel SAM V71 Xplained Ultra (Or equivelent Cortex-M Evaluation Board)
Atmel SAM V71 Xplained Ultra (Or equivalent Cortex-M Evaluation Board)
Note: Must have J-Trace adapter (SWD or SWD + ETM)
j-Trace for ARM Cortex-M Processors
Note: You can see here: https://www.segger.com/j-trace-for-cortex-m.html

View File

@ -6,7 +6,7 @@ embOS v4.16 (for Cortex-M and IAR compiler)
wolfssl (latest version)
Required items (Hardware) for this guide:
Atmel SAM V71 Xplained Ultra (Or equivelent Cortex-M Evaluation Board)
Atmel SAM V71 Xplained Ultra (Or equivalent Cortex-M Evaluation Board)
Note: Must have J-Trace adapter (SWD or SWD + ETM)
j-Trace for ARM Cortex-M Processors
Note: You can see here: https://www.segger.com/j-trace-for-cortex-m.html

View File

@ -109,7 +109,7 @@ We are now set to link to this library in the evaluation project
#---------------------------------------------
5. Go to Project -> Options -> Linker -> Library (Tab)
Add to the field "Additonal libraries:"
Add to the field "Additional libraries:"
$PROJ_DIR$\..\embOS_wolfcrypt_lib_SAMV71_XULT\Debug\Exe\wolfcrypt_lib.a
$PROJ_DIR$\..\..\extract_trial_here\Start\Lib\os7m_tlv_dp.a

View File

@ -55,7 +55,7 @@ int wolfExample_TLSClient(const char* ip, int port)
int ret = 0;
WOLFSSL_CTX* ctx = NULL;
WOLFSSL* ssl = NULL; /* create WOLFSSL object */
int sockFd = -1; /* socket file descriptor */
int sockFd; /* socket file descriptor */
struct sockaddr_in servAddr; /* struct for server address */
char sendBuff[TLS_MAXDATASIZE], rcvBuff[TLS_MAXDATASIZE];
@ -144,13 +144,13 @@ int wolfExample_TLSServer(int port)
int ret = 0;
WOLFSSL_CTX* ctx = NULL;
WOLFSSL* ssl = NULL;
int sockFd = -1, clientFd = -1;
int sockFd, clientFd = -1;
struct sockaddr_in serverAddr = {0}, clientAddr = {0};
const char reply[] = "I hear ya fa shizzle!\n";
int addrSize = sizeof(clientAddr);
char buff[256];
sockFd = socket(AF_INET, SOCK_STREAM, 0);
sockFd = socket(AF_INET, SOCK_STREAM, 0);
if (sockFd < 0) {
printf("Failed to create socket. Error: %d\n", errno);
return errno;

View File

@ -1,10 +1,11 @@
# Static Library: Building libwolfssl.sgx.static.lib.a for use with SGX Enclaves
### Requirements:
This code was created to use Intel's SGX hardware. It is expected that the user has gone through the steps of both turning on the hardware in bios if needed and has installed the necesary software from Intel to make use of the hardware. (https://software.intel.com/en-us/sgx) If these steps have not been done then it is expected that the user is familure with simulation software being used in place of hardware.
This code was created to use Intel's SGX hardware. It is expected that the user has gone through the steps of both turning on the hardware in bios if needed and has installed the necessary software from Intel to make use of the hardware. (https://software.intel.com/en-us/sgx) If these steps have not been done then it is expected that the user is familure with simulation software being used in place of hardware.
### Overview and Build:
This project creates a static library to then link with Enclaves. A simple example of an Enclave linking to the created wolfSSL library can be found in wolfssl-examples on github. This project has been tested with gcc 5.4.0 on Ubuntu 16.04.
When building with tests the file wolfssl/options.h is expected, in downloaded bundles from wolfssl.com this file exists but when building from a cloned version of wolfSSL from GitHub then the file needs created. This is done either through cd wolfssl && ./autogen.sh && ./configure && ./config.status or by cd wolfssl && touch wolfssl/options.h.
To create the static library, simply call make:

View File

@ -1,6 +1,6 @@
/* lpc_18xx_port.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* lpc_18xx_startup.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -3,7 +3,7 @@ toolchain and example benchmark/testwolfcrypt application linking to it. The
examples and default builds where made to support a MCF5441X board.
Macros to define for use:
WOLFSSL_MCF5441X /* arch settings i.e. sizeof long and endianess */
WOLFSSL_MCF5441X /* arch settings i.e. sizeof long and endianness */
WOLFSSL_NETBURNER /* for use of NetBurner headers and RNG seed */
@ -17,7 +17,7 @@ wolfssl-root/wolfssl/wolfcrypt/settings.h sets the sizeof long and long long
along with big endian macro.
The configuration for the build is located in wolfssl-root/IDE/M68K/user_settings.h
Along with the defualt build there is 2 others BUILD_B (smaller resource use),
Along with the default build there is 2 others BUILD_B (smaller resource use),
and BUILD_C (faster runtime with more resource use).
RSA speeds of the builds

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* time.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* certs_test.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* config-BEREFOOT.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* config-FS.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* config-RTX-TCP-FS.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* config.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/*shell.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -214,7 +214,7 @@ static struct {
"stack", stack_comm, /* On/Off check stack size */
"for", for_command, /* iterate next command X times */
"debug", dbg_comm, /* On/Off debug message */
"help", help_comm, /* Breif description about the commands */
"help", help_comm, /* Brief description about the commands */
/** short name **/
"ec", echoclient_test,
@ -436,7 +436,7 @@ static void for_command(void *args)
{
if( args == NULL || ((func_args *)args)->argc == 1) {
printf("For %d times\n", for_iteration) ;
} else if( args == NULL || ((func_args *)args)->argc == 2) {
} else if(((func_args *)args)->argc == 2) {
for_iteration = atoi(((func_args *)args)->argv[1]) ;
} else printf("Invalid argument\n") ;
}
@ -483,7 +483,7 @@ static char command_stack[COMMAND_STACK_SIZE] ;
static wolfSSL_Mutex command_mutex ;
#endif
/*********** Invoke Forground Command *********************/
/*********** Invoke Foreground Command *********************/
static void command_invoke(void *args)
{
void (*func)(void * ) ;

View File

@ -1,6 +1,6 @@
/* time-STM32F2.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* time-dummy.c.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* wolfssl_KEIL_RL.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -69,7 +69,7 @@ char *inet_ntoa(struct in_addr in)
unsigned long inet_addr(const char *cp)
{
unsigned int a[4] ; unsigned long ret ;
sscanf(cp, "%d.%d.%d.%d", &a[0], &a[1], &a[2], &a[3]) ;
sscanf(cp, "%u.%u.%u.%u", &a[0], &a[1], &a[2], &a[3]) ;
ret = ((a[3]<<24) + (a[2]<<16) + (a[1]<<8) + a[0]) ;
return(ret) ;
}

View File

@ -1,6 +1,6 @@
/* wolfssl_KEIL_RL.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* time-STM32F2xx.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -55,11 +55,11 @@
#define STM32F7xx
#endif
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <2=>SafeRTOS<3=>Windows
// <4=>PThread <5=>ThreadX<6=> ThreadX/NetX
// <7=>Micrium <8=>EBSnet<9=>MQX
// <10=>T-RTOS <11=>uITRON4<12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS<15=>CMSIS RTOSv2<16=>Others
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <3=>SafeRTOS <4=>Windows
// <5=>PThread <6=>ThreadX
// <7=>Micrium <8=>EBSnet <9=>MQX
// <10=>T-RTOS <11=>uITRON4 <12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS <15=>CMSIS RTOSv2 <16=>Others
#define MDK_CONF_THREAD 15
#if MDK_CONF_THREAD== 0
#define SINGLE_THREADED
@ -247,7 +247,7 @@
// <e>HC128
#define MDK_CONF_HC128 1
#if MDK_CONF_AESGCM == 0
#if MDK_CONF_HC128 == 0
#define NO_HC128
#endif
// </e>
@ -516,4 +516,3 @@
// </e>
//</h>

View File

@ -1,6 +1,6 @@
/* wolfssl_KEIL_ARM.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -55,10 +55,10 @@
#define STM32F7xx
#endif
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <2=>SafeRTOS<3=>Windows
// <4=>PThread <5=>ThreadX<6=> ThreadX/NetX
// <7=>Micrium <8=>EBSnet<9=>MQX
// <10=>T-RTOS <11=>uITRON4<12=>uTKERNEL2
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <3=>SafeRTOS<4=>Windows
// <5=>PThread <6=>ThreadX
// <7=>Micrium <8=>EBSnet<9=>MQX
// <10=>T-RTOS <11=>uITRON4<12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS<15=>CMSIS RTOSv2<16=>Others
#define MDK_CONF_THREAD 15
#if MDK_CONF_THREAD== 0
@ -247,7 +247,7 @@
// <e>HC128
#define MDK_CONF_HC128 1
#if MDK_CONF_AESGCM == 0
#if MDK_CONF_HC128 == 0
#define NO_HC128
#endif
// </e>
@ -516,4 +516,3 @@
// </e>
//</h>

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -55,11 +55,11 @@
#define STM32F7xx
#endif
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <2=>SafeRTOS<3=>Windows
// <4=>PThread <5=>ThreadX<6=> ThreadX/NetX
// <7=>Micrium <8=>EBSnet<9=>MQX
// <10=>T-RTOS <11=>uITRON4<12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS<15=>CMSIS RTOSv2<16=>Others
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <3=>SafeRTOS <4=>Windows
// <5=>PThread <6=>ThreadX
// <7=>Micrium <8=>EBSnet <9=>MQX
// <10=>T-RTOS <11=>uITRON4 <12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS <15=>CMSIS RTOSv2 <16=>Others
#define MDK_CONF_THREAD 15
#if MDK_CONF_THREAD== 0
#define SINGLE_THREADED
@ -247,7 +247,7 @@
// <e>HC128
#define MDK_CONF_HC128 1
#if MDK_CONF_AESGCM == 0
#if MDK_CONF_HC128 == 0
#define NO_HC128
#endif
// </e>
@ -516,4 +516,3 @@
// </e>
//</h>

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -55,11 +55,11 @@
#define STM32F7xx
#endif
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <2=>SafeRTOS<3=>Windows
// <4=>PThread <5=>ThreadX<6=> ThreadX/NetX
// <7=>Micrium <8=>EBSnet<9=>MQX
// <10=>T-RTOS <11=>uITRON4<12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS<15=>Others
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <3=>SafeRTOS <4=>Windows
// <5=>PThread <6=>ThreadX
// <7=>Micrium <8=>EBSnet <9=>MQX
// <10=>T-RTOS <11=>uITRON4 <12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS <15=>CMSIS RTOSv2 <16=>Others
#define MDK_CONF_THREAD 14
#if MDK_CONF_THREAD== 0
#define SINGLE_THREADED
@ -245,7 +245,7 @@
// <e>HC128
#define MDK_CONF_HC128 1
#if MDK_CONF_AESGCM == 0
#if MDK_CONF_HC128 == 0
#define NO_HC128
#endif
// </e>
@ -514,4 +514,3 @@
// </e>
//</h>

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -55,11 +55,11 @@
#define STM32F7xx
#endif
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <2=>SafeRTOS<3=>Windows
// <4=>PThread <5=>ThreadX<6=> ThreadX/NetX
// <7=>Micrium <8=>EBSnet<9=>MQX
// <10=>T-RTOS <11=>uITRON4<12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS<15=>CMSIS RTOSv2<16=>Others
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <3=>SafeRTOS <4=>Windows
// <5=>PThread <6=>ThreadX
// <7=>Micrium <8=>EBSnet <9=>MQX
// <10=>T-RTOS <11=>uITRON4 <12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS <15=>CMSIS RTOSv2 <16=>Others
#define MDK_CONF_THREAD 14
#if MDK_CONF_THREAD== 0
#define SINGLE_THREADED
@ -247,7 +247,7 @@
// <e>HC128
#define MDK_CONF_HC128 1
#if MDK_CONF_AESGCM == 0
#if MDK_CONF_HC128 == 0
#define NO_HC128
#endif
// </e>
@ -516,4 +516,3 @@
// </e>
//</h>

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -55,11 +55,11 @@
#define STM32F7xx
#endif
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <2=>SafeRTOS<3=>Windows
// <4=>PThread <5=>ThreadX<6=> ThreadX/NetX
// <7=>Micrium <8=>EBSnet<9=>MQX
// <10=>T-RTOS <11=>uITRON4<12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS<15=>CMSIS RTOSv2<16=>Others
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <3=>SafeRTOS <4=>Windows
// <5=>PThread <6=>ThreadX
// <7=>Micrium <8=>EBSnet <9=>MQX
// <10=>T-RTOS <11=>uITRON4 <12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS <15=>CMSIS RTOSv2 <16=>Others
#define MDK_CONF_THREAD 15
#if MDK_CONF_THREAD== 0
#define SINGLE_THREADED
@ -247,7 +247,7 @@
// <e>HC128
#define MDK_CONF_HC128 1
#if MDK_CONF_AESGCM == 0
#if MDK_CONF_HC128 == 0
#define NO_HC128
#endif
// </e>
@ -516,4 +516,3 @@
// </e>
//</h>

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -209,7 +209,7 @@ int main (void) {
snprintf(ver, VERSIZE, "%d", TLS_VER);
argv[6] = ver;
printf("SSL/TLS Client(%d)\n ", sizeof(argv)/sizeof(argv[0])) ;
printf("SSL/TLS Client(%d)\n ", (int)(sizeof(argv)/sizeof(argv[0]))) ;
printf(" Remote IP: %s, Port: %s\n Version: %s\n", argv[2], argv[4], verStr[TLS_VER]) ;
printf(" Other options: %s\n", OTHER_OPTIONS);
setTime((time_t)((RTC_YEAR-1970)*365*24*60*60) + RTC_MONTH*30*24*60*60 + RTC_DAY*24*60*60);

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -55,11 +55,11 @@
#define STM32F7xx
#endif
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <2=>SafeRTOS<3=>Windows
// <4=>PThread <5=>ThreadX<6=> ThreadX/NetX
// <7=>Micrium <8=>EBSnet<9=>MQX
// <10=>T-RTOS <11=>uITRON4<12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS<15=>CMSIS RTOSv2<16=>Others
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <3=>SafeRTOS <4=>Windows
// <5=>PThread <6=>ThreadX
// <7=>Micrium <8=>EBSnet <9=>MQX
// <10=>T-RTOS <11=>uITRON4 <12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS <15=>CMSIS RTOSv2 <16=>Others
#define MDK_CONF_THREAD 15
#if MDK_CONF_THREAD== 0
#define SINGLE_THREADED
@ -247,7 +247,7 @@
// <e>HC128
#define MDK_CONF_HC128 1
#if MDK_CONF_AESGCM == 0
#if MDK_CONF_HC128 == 0
#define NO_HC128
#endif
// </e>
@ -516,4 +516,3 @@
// </e>
//</h>

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/*shell.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -221,7 +221,7 @@ static struct {
"stack", stack_comm, /* On/Off check stack size */
"for", for_command, /* iterate next command X times */
"debug", dbg_comm, /* On/Off debug message */
"help", help_comm, /* Breif description about the commands */
"help", help_comm, /* Brief description about the commands */
/** short name **/
"ec", echoclient_test,
@ -477,7 +477,7 @@ static void for_command(void *args)
{
if( args == NULL || ((func_args *)args)->argc == 1) {
printf("For %d times\n", for_iteration) ;
} else if( args == NULL || ((func_args *)args)->argc == 2) {
} else if(((func_args *)args)->argc == 2) {
for_iteration = atoi(((func_args *)args)->argv[1]) ;
} else printf("Invalid argument\n") ;
}
@ -554,7 +554,7 @@ void exit_command(void) {
}
/*********** Invoke Forground Command *********************/
/*********** Invoke Foreground Command *********************/
static void command_invoke(void const *args)
{
void (*func)(void const * ) ;
@ -630,7 +630,9 @@ void shell_main(void *arg) {
int i ;
func_args args ;
int bf_flg ;
#if defined(WOLFSSL_CMSIS_RTOS)
osThreadId cmd ;
#endif
i = BackGround ;
/* Dummy for avoiding warning: BackGround is defined but not used. */

View File

@ -1,6 +1,6 @@
/* time-STM32F2.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -55,11 +55,11 @@
#define STM32F7xx
#endif
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <2=>SafeRTOS<3=>Windows
// <4=>PThread <5=>ThreadX<6=> ThreadX/NetX
// <7=>Micrium <8=>EBSnet<9=>MQX
// <10=>T-RTOS <11=>uITRON4<12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS<15=>CMSIS RTOSv2<16=>Others
// <o> Thread/RTOS<0=>Single Threaded <1=>FreeRTOS <3=>SafeRTOS <4=>Windows
// <5=>PThread <6=>ThreadX
// <7=>Micrium <8=>EBSnet <9=>MQX
// <10=>T-RTOS <11=>uITRON4 <12=>uTKERNEL2
// <13=>Frosted <14=>CMSIS RTOS <15=>CMSIS RTOSv2 <16=>Others
#define MDK_CONF_THREAD 15
#if MDK_CONF_THREAD== 0
#define SINGLE_THREADED
@ -247,7 +247,7 @@
// <e>HC128
#define MDK_CONF_HC128 1
#if MDK_CONF_AESGCM == 0
#if MDK_CONF_HC128 == 0
#define NO_HC128
#endif
// </e>
@ -516,4 +516,3 @@
// </e>
//</h>

View File

@ -1,6 +1,6 @@
/* ssl-dummy.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
# CMakeLists.txt
#
# Copyright (C) 2006-2019 wolfSSL Inc.
# Copyright (C) 2006-2020 wolfSSL Inc.
#
# This file is part of wolfSSL.
#

View File

@ -1,6 +1,6 @@
# CMakeLists.txt
#
# Copyright (C) 2006-2019 wolfSSL Inc.
# Copyright (C) 2006-2020 wolfSSL Inc.
#
# This file is part of wolfSSL.
#

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* wolfssl_example.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -1,6 +1,6 @@
/* wolfssl_example.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -1122,7 +1122,7 @@ int bench_tls(void* args)
{
int ret = 0;
info_t *info = NULL;
char *cipher, *next_cipher, *ciphers = NULL;
char *cipher, *next_cipher, *ciphers;
/* Runtime variables */
int argRuntimeSec = BENCH_RUNTIME_SEC;

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2019 wolfSSL Inc.
* Copyright (C) 2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -143,12 +143,12 @@ int main(void)
#ifdef USE_CLOCK_HZ
/* Speed up clock */
printf("SiFive HiFive1 Demo\n");
printf("Setting clock to %dMHz\n", USE_CLOCK_HZ/1000000);
printf("Setting clock to %dMHz\n", (int)(USE_CLOCK_HZ/1000000));
clk_Hz = metal_clock_set_rate_hz(
&__METAL_DT_SIFIVE_FE310_G000_PLL_HANDLE->clock, USE_CLOCK_HZ
);
#endif
printf("Actual Clock %dMHz\n", clk_Hz/1000000);
printf("Actual Clock %dMHz\n", (int)(clk_Hz/1000000));
/* Reconfigure the SPI Bus for dual mode */
#define QSPI0_CTRL 0x10014000UL

View File

@ -1,6 +1,6 @@
/* user_settings.h
*
* Copyright (C) 2019 wolfSSL Inc.
* Copyright (C) 2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*

View File

@ -9,7 +9,7 @@ SiFive Freedom U540 SoC at 1.5GHz
Getting started guide:
https://sifive.cdn.prismic.io/sifive%2Ffa3a584a-a02f-4fda-b758-a2def05f49f9_hifive-unleashed-getting-started-guide-v1p1.pdf
Make sure your ethernet is attached and power up board. You can connecct the micro-usb to get a UART console that will display the DHCP IP address. Default login password is "sifive".
Make sure your ethernet is attached and power up board. You can connecct the micro-usb to get a UART console that will display the DHCP IP address. Default user is "root" and login password is "sifive".
## Building Freedom-U-SDK
@ -99,10 +99,10 @@ make
## Benchmark Results
The following is running the wolfCrypt benchmark at 1.5GHz on a single thread (default CPU speed is 1.0GHz).
The following is running the wolfCrypt benchmark at 1.4GHz on a single thread (default CPU speed is 1.0GHz).
```sh
echo 1500000000 > /sys/devices/platform/soc/10000000.prci/rate
echo 1400000000 > /sys/devices/platform/soc/10000000.prci/rate
./benchmark
------------------------------------------------------------------------------
@ -146,6 +146,60 @@ ECDSA 256 verify 300 ops took 1.104 sec, avg 3.680 ms, 271.766 ops/sec
Benchmark complete
```
## TLS Benchmarks
```
echo 1400000000 > /sys/devices/platform/soc/10000000.prci/rate
./examples/benchmark/tls_bench -p 8192 -m
Side Cipher Total Bytes Num Conns Rx ms Tx ms Rx MB/s Tx MB/s Connect Total ms Connect Avg ms
Server DHE-RSA-AES128-SHA 557056 18 94.722 34.548 2.804 7.689 915.005 50.834
Client DHE-RSA-AES128-SHA 557056 18 113.339 34.464 2.344 7.707 896.122 49.785
Server DHE-RSA-AES256-SHA 524288 17 102.691 37.624 2.434 6.645 866.921 50.995
Client DHE-RSA-AES256-SHA 524288 17 123.016 37.391 2.032 6.686 846.925 49.819
Server ECDHE-RSA-AES128-SHA 851968 27 144.719 52.871 2.807 7.684 828.128 30.671
Client ECDHE-RSA-AES128-SHA 851968 27 173.414 52.593 2.343 7.724 799.406 29.608
Server ECDHE-ECDSA-AES128-SHA 1245184 39 210.728 75.683 2.818 7.845 702.403 18.010
Client ECDHE-ECDSA-AES128-SHA 1245184 39 251.039 76.824 2.365 7.729 660.166 16.927
Server ECDHE-ECDSA-AES256-SHA 1179648 37 232.303 85.585 2.421 6.572 673.207 18.195
Client ECDHE-ECDSA-AES256-SHA 1179648 37 277.830 85.551 2.025 6.575 626.807 16.941
Server DHE-RSA-AES128-SHA256 524288 17 106.848 39.533 2.340 6.324 867.397 51.023
Client DHE-RSA-AES128-SHA256 524288 17 127.601 39.334 1.959 6.356 846.556 49.797
Server DHE-RSA-AES256-SHA256 524288 17 120.685 45.184 2.072 5.533 870.931 51.231
Client DHE-RSA-AES256-SHA256 524288 17 144.842 44.807 1.726 5.579 847.038 49.826
Server DHE-RSA-AES128-GCM-SHA256 524288 17 124.636 49.373 2.006 5.064 869.243 51.132
Client DHE-RSA-AES128-GCM-SHA256 524288 17 148.326 49.277 1.685 5.073 845.442 49.732
Server DHE-RSA-AES256-GCM-SHA384 491520 16 129.714 51.389 1.807 4.561 822.309 51.394
Client DHE-RSA-AES256-GCM-SHA384 491520 16 154.349 51.488 1.518 4.552 797.458 49.841
Server ECDHE-RSA-AES128-GCM-SHA256 753664 24 179.251 71.130 2.005 5.052 744.773 31.032
Client ECDHE-RSA-AES128-GCM-SHA256 753664 24 213.410 71.098 1.684 5.055 710.151 29.590
Server ECDHE-RSA-AES256-GCM-SHA384 753664 24 198.233 78.075 1.813 4.603 751.299 31.304
Client ECDHE-RSA-AES256-GCM-SHA384 753664 24 235.646 78.914 1.525 4.554 712.908 29.705
Server ECDHE-ECDSA-AES128-GCM-SHA256 1114112 35 263.646 103.830 2.015 5.117 641.739 18.335
Client ECDHE-ECDSA-AES128-GCM-SHA256 1114112 35 312.647 105.155 1.699 5.052 590.693 16.877
Server ECDHE-ECDSA-AES256-GCM-SHA384 1048576 33 275.753 117.824 1.813 4.244 615.062 18.638
Client ECDHE-ECDSA-AES256-GCM-SHA384 1048576 33 336.538 109.886 1.486 4.550 561.107 17.003
Server ECDHE-RSA-AES128-SHA256 786432 25 159.515 58.314 2.351 6.431 777.706 31.108
Client ECDHE-RSA-AES128-SHA256 786432 25 190.152 58.939 1.972 6.362 746.025 29.841
Server ECDHE-ECDSA-AES128-SHA256 1179648 37 239.776 87.656 2.346 6.417 675.020 18.244
Client ECDHE-ECDSA-AES128-SHA256 1179648 37 285.535 88.530 1.970 6.354 626.898 16.943
Server ECDHE-RSA-AES256-SHA384 786432 25 173.038 63.549 2.167 5.901 780.063 31.203
Client ECDHE-RSA-AES256-SHA384 786432 25 206.355 63.950 1.817 5.864 745.912 29.836
Server ECDHE-ECDSA-AES256-SHA384 1146880 36 252.686 94.012 2.164 5.817 666.287 18.508
Client ECDHE-ECDSA-AES256-SHA384 1146880 36 302.699 93.089 1.807 5.875 616.081 17.113
Server ECDHE-RSA-CHACHA20-POLY1305 983040 31 67.015 25.344 6.995 18.496 929.187 29.974
Client ECDHE-RSA-CHACHA20-POLY1305 983040 31 79.041 25.765 5.930 18.193 916.451 29.563
Server ECDHE-ECDSA-CHACHA20-POLY1305 1572864 49 110.132 40.284 6.810 18.618 848.004 17.306
Client ECDHE-ECDSA-CHACHA20-POLY1305 1572864 49 131.014 41.404 5.725 18.114 824.766 16.832
Server DHE-RSA-CHACHA20-POLY1305 589824 19 40.016 15.086 7.028 18.643 951.114 50.059
Client DHE-RSA-CHACHA20-POLY1305 589824 19 46.994 15.467 5.985 18.184 943.807 49.674
Server ECDHE-RSA-CHACHA20-POLY1305-OLD 983040 31 66.802 25.246 7.017 18.567 928.078 29.938
Client ECDHE-RSA-CHACHA20-POLY1305-OLD 983040 31 78.402 25.915 5.979 18.088 915.354 29.528
Server ECDHE-ECDSA-CHACHA20-POLY1305-OLD 1572864 49 106.853 40.000 7.019 18.750 844.887 17.243
Client ECDHE-ECDSA-CHACHA20-POLY1305-OLD 1572864 49 124.956 41.720 6.002 17.977 824.284 16.822
Server DHE-RSA-CHACHA20-POLY1305-OLD 589824 19 40.200 14.991 6.996 18.762 951.477 50.078
Client DHE-RSA-CHACHA20-POLY1305-OLD 589824 19 46.852 15.688 6.003 17.928 944.071 49.688
```
## Support
For questions please email us at support@wolfssl.com.

Some files were not shown because too many files have changed in this diff Show More