Compare commits

...

3505 Commits

Author SHA1 Message Date
951bd5a01a FIPSv2: RNG Update
1. Put the SeedTest function in the HASH_DRBG scope.
2018-09-19 07:22:04 -07:00
8972867ada FIPSv2: RNG Update
1. Updated the IDE/WIN10 user settings to enable RDSEED by default.
2. Updated the Windows GenerateSeed() function to take into account the
RDSEED enabled setting.
3. Exclude the TestSeed() function check for the "selftest" build as
well as old FIPS.
2018-09-18 16:08:35 -07:00
582cf3182e FIPSv2: RNG Update
1. Update the SEED_BLOCK_SZ to 4 for non-FIPS builds.
2. Change fips-check.sh to skip copying over the random.{c,h} files for
now. Need the tagged versions of the other files and the new random for
now.
2018-09-18 14:36:43 -07:00
4aa85f956f FIPSv2: RNG Update
1. The wolfcrypt test shouldn't check TestSeed() for old FIPS builds.
2018-09-18 14:36:42 -07:00
b9a850575f FIPSv2: RNG Update
1. For non-FIPS builds, lower the entropy request size to the old value.
2. Added a consistency check to the result of the entropy source. The test
involves requesting an additional 64-bits, then doing a running
comparison of each block of 64-bits. The first block of bits is ignored.
3. Refactored the RNG seeding a bit. Renamed all variables with
"entropy" in the name as "seed". Renamed the constants for entropy sizes
as seed sizes. Changed the security strength to its actual value and
introduced an entropy scaling factor for the number of bits of entropy
per bit and a size for the NDRBG block size.
4. Changed it so the user can change the parameters for the RNG at the
build configuration. If using FIPSv2, triggers an error if the paramters
are changed.
2018-09-18 14:36:42 -07:00
085daa78cd Merge pull request #1833 from dgarske/norng_fixes
Fixes for building without RNG enabled
2018-09-18 14:52:21 -06:00
4981480215 Fix to make sure wc_RNG_GenerateBlock return code is checked in test.h GetRandomPort. 2018-09-18 12:55:52 -07:00
9e305a01b4 More fixes for building with ./configure --disable-rng. 2018-09-18 11:17:39 -07:00
d05423af7e Merge pull request #1835 from danielinux/fix-fall-through-define-typo
Fixed typo in the definition of macro FALL_THROUGH
2018-09-18 07:01:15 -07:00
b832b7bad3 Fixes for building with ./configure --enable-opensslextra --disable-hashdrbg --disable-rng --enable-cryptonly --disable-dh --disable-rsa --disable-ecc. 2018-09-17 09:38:45 -07:00
14815431e7 Merge pull request #1836 from kaleb-himes/MP_SET_IMPL_DEC_FIX
mp_set pre-processor logic in fastmath breaking existing builds, norm…
2018-09-14 16:44:29 -07:00
2e4c07ed93 Fixes and improvements for handling the --disable-rng case. Valid make check tests requires wolfCrypt only and no asymmetric crypto (./configure --disable-rng --enable-cryptonly --disable-dh --disable-rsa --disable-ecc). 2018-09-14 14:09:27 -07:00
301e91e4d3 mp_set pre-processor logic in fastmath breaking existing builds, normal math not effected 2018-09-14 14:29:19 -06:00
32d3cb6cfb Fixes for case with Intel rand source and no DRBG (./configure --enable-intelasm --enable-intelrand --disable-hashdrbg). Fixes to wolfSSL_RAND_egd to better handle no DRBG case. 2018-09-14 09:48:57 -07:00
a7ab98be69 Removed typo in the definition of macro FALL_THROUGH 2018-09-14 11:02:23 +02:00
fb699acec4 Merge pull request #1831 from MJSPollard/benchmarkCSV
added option to print wolfcrypt benchmark tests in CSV format
2018-09-13 16:16:09 -06:00
a4d502e22a Additional fixes for no RNG cases. Specifically ./configure --disable-hashdrbg --disable-rng --enable-cryptonly 2018-09-13 14:07:08 -07:00
77cd361bca Fixes for building with WC_NO_RNG. 2018-09-13 13:23:55 -07:00
e071f1ca7e Merge pull request #1825 from SparkiDev/compat_apis_1
Add more compatability APIs.
2018-09-13 13:13:12 -07:00
8a6a9e7620 Merge pull request #1820 from kojo1/portingAid
Porting aid
2018-09-13 11:06:55 -06:00
d4d6346ee5 fixed unused variable error 2018-09-13 08:47:01 -06:00
7457ab3e14 added define to work with certain enabled options 2018-09-12 23:37:31 -06:00
037151eae0 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into benchmarkCSV 2018-09-12 23:32:45 -06:00
0275366fb6 Fixes from code review
Document how length of ECDSA signature calculated.
Check parameter not NULL before use.
Formatting fix.
Also, disable RSA test of EVP_DigestSign/Verify* when HAVE_USER_RSA.
2018-09-13 08:47:09 +10:00
324235f698 Merge pull request #1823 from dgarske/cert_ext_only
Fix for build with cert extensions and openssl extra only
2018-09-12 13:03:37 -07:00
581f72adf8 Merge pull request #1822 from dgarske/fixes_async
Fix for dh_test to make sure the provided agree size is populated
2018-09-12 13:03:04 -07:00
5b985c7dbd Merge pull request #1821 from dgarske/nxp-ltc
Fixes for NXP LTC support with K82
2018-09-12 13:02:21 -07:00
b330c6e035 Merge pull request #1801 from kaleb-himes/OCSP-GLOBALSIGN-FIXr2
Address issues when testing with WOLFSSL_OCSP_TEST set
2018-09-12 11:36:41 -07:00
bd1d36f0aa Merge pull request #1818 from aaronjense/IAR-EWARM-build-update
fixed compile time errors and warnings for IAR-EWARM projects
2018-09-12 11:15:59 -07:00
df20daa1ae Support RSA and ECC in wolfSSL_DigestSign/Verify* 2018-09-12 16:31:39 +10:00
7ddc756d15 eliminate double semi-colon 2018-09-12 10:13:30 +09:00
66dc735454 Merge pull request #1830 from dgarske/renesas
Fixes for Renesas example projects
2018-09-11 15:40:00 -06:00
4bbbb82a01 Merge pull request #1829 from embhorn/zd3928
Make DecodedCert elements available with WOLFSSL_CERT_EXT
2018-09-11 14:38:31 -07:00
d280359548 added option to print wolfcrypt benchmark tests in CSV format 2018-09-11 14:49:54 -06:00
0ad77628f1 Merge pull request #1827 from kaleb-himes/CPP_POLY1305
Fix for HAVE_POLY1305 without one time auth
2018-09-11 10:00:39 -07:00
ca83f97508 Merge pull request #1828 from cconlon/nucleusfix
Pass arguments through to Nucleus memory functions in 1.2 build
2018-09-11 09:41:01 -07:00
a63da76e07 Fixes for Renesas example projects. 2018-09-11 09:38:24 -07:00
d658701350 Added NO_WOLF_C99 define, replaced sp.c with relevant sp_*.c, removed evp.c and bio.c from compiling seperately from ssl.c 2018-09-11 11:16:04 -05:00
01dc018cda Make DecodedCert elements available with WOLFSSL_CERT_EXT 2018-09-11 10:41:12 -05:00
8060deb40a pass arguments through to Nucleus memory functions in 1.2 build 2018-09-11 09:26:12 -06:00
330a7048c7 Add more compatability APIs.
d2i_ECDSA_SIG, i2d_ECDSA_SIG, EVP_DigestVerifyInit,
EVP_DigestVerifyUpdate, EVP_DigestVerifyFinal, EVP_PKEY_id,
PEM_read_bio_PUBKEY
2018-09-11 09:28:03 +10:00
f90b7d6c37 Merge pull request #1826 from embhorn/serialnumOID_new
`wolfSSL_CTX_load_verify_chain_buffer_format` and device serial number OID
2018-09-10 11:33:37 -07:00
238f45d89d Fix for build with ./configure --enable-certext --enable-opensslextra. 2018-09-10 08:22:17 -07:00
f48e2067ae Added new API wolfSSL_CTX_load_verify_chain_buffer_format for loading CA cert chain as DER buffer list including API unit test. Support for device serial number OID. 2018-09-10 08:15:17 -07:00
2c5b0d82da Fix for dh_test to make sure the provided agree size is populated. This resolves issue with async and QuickAssist DH. 2018-09-10 07:13:52 -07:00
a2be7590d1 Fixes for NXP LTC support with K82. Fix for SHA384/512. Fix for AES CBC not storing previous IV. Fix for wc_AesSetKey arg check. Fix for AES GCM IV != 12 test. Changed LTC default in settings.h to not enable SHA512 and Ed/Curve25519. Tested using Rowley Crossworks v4.2.0 on a FRDM-K82F. There is an initial stack pointer issue with the arm-startup code here for Rowley still outstanding, but these fixes are valid as-is. 2018-09-10 07:13:32 -07:00
8fdb6b79d0 Merge pull request #1824 from SparkiDev/tls_cam_no_aes
Camellia is a block cipher in TLS - can't turn on AEAD only define
2018-09-09 17:28:34 -07:00
f8ac5b5f71 Merge pull request #1819 from dgarske/fix_load_loc
Fix for load location test to handle multiple failure codes
2018-09-10 08:36:19 +10:00
2d413c5bb8 Camellia is a block cipher in TLS - can't turn on AEAD only define 2018-09-10 08:18:03 +10:00
0d44252608 error pass though build flag WOLFSSL_PASSTHRU_ERR 2018-09-08 10:19:31 +09:00
902008f5ea refer unit_PassThrough flag at least once 2018-09-08 09:17:52 +09:00
412eecd51a Add wc_SetIssuerRaw and EncodeCert with raw fields (#1798)
* Make cert with raw issuer
* Add wc_SetIssuerRaw
* Use issuer raw in EncodeCert
2018-09-07 16:22:23 -07:00
7d1ab5e9d2 Merge pull request #1817 from danielinux/fix-old-style-definitions
Remove old-style function definitions
2018-09-07 15:52:45 -07:00
575382e5a9 Fix for load location test to handle multiple failure codes (failure may return ProcessFile error code or WOLFSSL_FAILURE). Moved expired certs and setup load location test for expired certs. 2018-09-07 15:30:30 -07:00
e677c32714 test file access functions 2018-09-08 07:27:33 +09:00
294a22e938 flag to pass throug errors for correcting as many error information as possible. 2018-09-08 06:02:20 +09:00
c98f8842a3 Merge pull request #1816 from ejohnstown/ocsp-no-server
OCSP Stapling/No Server Build
2018-09-07 11:48:13 -07:00
27555d6eb7 Fix old-style function definitions 2018-09-07 09:13:20 +02:00
a7fb48e157 Merge pull request #1783 from dgarske/load_loc
Enhanced load verify locations to support flags
2018-09-06 17:00:09 -07:00
15be0aceed OCSP Stapling/No Server Build
In the case of OCSP Stapling being enabled and NO_WOLFSSL_SERVER being
set, there was a spot where the ocsp_stapling list was still being
touched even though it is left out of the build. Just needed to add the
right #ifdefs.
2018-09-06 16:56:09 -07:00
ed14b68c38 Merge pull request #1813 from ejohnstown/bitfield
Bitfield Fixes
2018-09-06 16:01:59 -07:00
5360faac9d Bitfield Fixes
A couple flags were being implemented as bitfields from an int type.
GCC-8 is being more strict of type and value checking and is treating
single bit ints as both 1 and -1 and complaining about value changes.
Change the two int bitfields to use word16 bitfields as is the
pattern elsewhere.
2018-09-06 13:46:00 -07:00
d9a6484b75 Fix to improve return code logic in wolfSSL_CTX_load_verify_locations_ex. 2018-09-06 13:01:44 -07:00
ae3d8d3779 * Fixed wolfSSL_CTX_load_verify_locations to continue loading if there is an error (ZD 4265).
* Added new `wolfSSL_CTX_load_verify_locations_ex` that supports flags `WOLFSSL_LOAD_FLAG_IGNORE_ERR`, `WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY` and `WOLFSSL_LOAD_FLAG_PEM_CA_ONLY`.
* Fix for `PemToDer` to handle PEM which may include a null terminator in length at end of file length causing wrong error code to be returned. Added test case for this. (ZD 4278)
* Added macro to override default flags for `wolfSSL_CTX_load_verify_locations` using `WOLFSSL_LOAD_VERIFY_DEFAULT_FLAGS`.
* Added tests for loading CA PEM's from directory using `wolfSSL_CTX_load_verify_locations` and `wolfSSL_CTX_load_verify_locations_ex` with flags.
* Added tests for `wolfSSL_CertManagerLoadCABuffer`.
* Updated the expired test certs and added them to `./certs/test/gen-testcerts.sh` script.
2018-09-06 12:51:22 -07:00
d998d10f02 Merge pull request #1805 from dgarske/fix_csr
Fix for CSR generation email value
2018-09-05 19:44:41 -07:00
a7821e0d6d Merge pull request #1810 from quinnmiller1997/fp_mul_comba_7-typo
Fixed typo in fp_mul_comba_7
2018-09-05 19:43:47 -07:00
30d968d6b0 Merge pull request #1811 from SparkiDev/tls_sig_ret
Fix CheckCertSignature return to be remembered past ParseCertRelative
2018-09-05 19:43:23 -07:00
a3cc2119d7 Fix CheckCertSignature return to be remembered past ParseCertRelative 2018-09-06 10:42:49 +10:00
b8605fa544 Fixed typo in fp_mul_comba_7 2018-09-05 14:51:50 -06:00
0626338be2 Fix for HAVE_POLY1305 without one time auth 2018-09-05 14:41:57 -06:00
5ee09f77a1 Merge pull request #1796 from ghoso/e2studio
add project files for Renesas e2studio
2018-09-05 11:41:01 -06:00
d432d346aa Merge pull request #1809 from cconlon/stm32rngfix
enable RNG clock when WOLFSSL_STM32F427_RNG is defined
2018-09-04 17:21:01 -07:00
28ad8e591d Adding comment for empty case in GetNameType 2018-09-04 18:08:40 -05:00
bac8b78a8c Merge pull request #1803 from SparkiDev/tfm_stack
Small stack for fast math code
2018-09-04 15:57:59 -07:00
d149795648 Merge pull request #1759 from dgarske/verifycbfail
Fix to resolve issue with verify callback not causing an error
2018-09-04 15:52:58 -07:00
8e67ef33b2 Merge pull request #1799 from SparkiDev/cert_vfy_small
Smaller dynamic memory usage in TLS
2018-09-04 15:40:11 -07:00
8584da60a8 Merge pull request #1802 from SparkiDev/tls13_0rtt_ch
Group Early Data message with ClientHello for faster delivery
2018-09-04 15:39:14 -07:00
e1c4d3f5e6 Merge pull request #1808 from ejohnstown/vali-date
Validate Date
2018-09-04 15:33:41 -07:00
d3ea903c55 enable RNG clock when WOLFSSL_STM32F427_RNG is defined 2018-09-04 16:13:09 -06:00
e730cda550 Validate Date
The ValidateDate() function is wrapped by a macro so it may be replaced
in environments without ASN_TIME built in. In two cases, OCSP and CRL,
ValidateDate() is called directly instead of by the macro. This change
fixes that.
2018-09-04 13:39:26 -07:00
17a70aee1b Added test and minor fixes for CheckCertSignature 2018-09-03 10:50:47 +10:00
4b208f4fe5 Make grouping EarlyData and ClientHello a configuration option 2018-09-03 08:48:28 +10:00
4d0478a287 Fix fp_div_2d to return remainder correctly
If a == c are then a and c don't equal d:
calculate d before c
If a != c then a doesn't change in calculating c:
calculate d after c
2018-09-03 08:32:55 +10:00
d2b9b230a0 Added additional verify callback override test cases. 2018-08-31 16:26:51 -07:00
6171e29fe8 Fix for CSR generation after PR (https://github.com/wolfSSL/wolfssl/pull/1734). This resolves issue with email name in CSR. (Thanks to Forum post https://www.wolfssl.com/forums/post4137.html).
Failed examples:

```
145:d=5  hl=2 l=  16 prim: EOC
      0000 - 69 6e 66 6f 40 77 6f 6c-66 73 73 6c 2e 63 6f 6d   info@wolfssl.com
```

```
SET {
138  23:         SEQUENCE {
140   3:           OBJECT IDENTIFIER objectClass (2 5 4 0)
       :             Error: Spurious EOC in definite-length item.
```

Success Examples:

```
140:d=5  hl=2 l=   9 prim: OBJECT            :emailAddress
  151:d=5  hl=2 l=  16 prim: IA5STRING         :info@wolfssl.com
```

```
SET {
138  29:         SEQUENCE {
140   9:           OBJECT IDENTIFIER emailAddress (1 2 840 113549 1 9 1)
151  16:           IA5String 'info@wolfssl.com'
```
2018-08-31 11:20:04 -07:00
41ab3d91fd Small stack for fast math code
Any large stack usages have been changed to dynamic memory allocations
when WOLFSSL_SMALL_STACK is defined.
Modified functions to return error codes.
2018-08-31 17:55:49 +10:00
697c61af35 correct typo in IDE/include.am 2018-08-31 14:57:16 +09:00
00ff519b23 remove wrong configuration in IDE/include.am 2018-08-31 14:52:12 +09:00
d089a4651a Group Early Data message with ClientHello for faster delivery 2018-08-31 09:28:38 +10:00
d86fc2dbbe Smaller dynamic memory usage in TLS
Code doesn't require a DecodedCert which saves on dynamic memory usage.
WOLFSSL_SMALL_CERT_VERIFY: Don't have a DecodedCert allocated and verify
certificate signature in ProcessPeerCerts as this is maximum dynamic
memory usage.
WOLFSSL_SMALL_CERT_VERIFY is enabled with 'lowresource' configuration
option.
Fix sp_clear to work with NULL parameter.
Define a new function HashId that maps to the hashing function
available.
Set MAX_CERT_VERIFY_SZ to be the maximum based on what algorithms are
compiled in.
Fix usage of MAX_CERT_VERIFY_SZ in functions sending certificate verify
messages.
2018-08-31 08:29:28 +10:00
ffc0f0fb26 Fix for building with SESSION_CERTS using pointer after free. Documented store->discardSessionCerts. 2018-08-30 13:57:21 -07:00
3729b12fae Address issues when testing with WOLFSSL_OCSP_TEST set 2018-08-30 14:44:49 -06:00
b369e524d4 Fix for the ECDSA verify callback override test case. Switched to AES128-GCM cipher suite (better cipher suite overall). 2018-08-30 11:48:08 -07:00
3d0d10345a Added test cases for ensuring forced error fails on client and server. Added test cases to ensure bad certificate can be overriden. 2018-08-30 11:17:21 -07:00
944342b386 Fixes for verify callback failure override handling. Fixes the return codes in the failure cases. 2018-08-30 11:17:21 -07:00
53c0003cad Fix to resolve issue with verify callback not causing an error (if one not already present) when returning 0. Test case to follow shortly. 2018-08-30 11:17:21 -07:00
2551512718 add CS+ and e2studio settings in IDE/include.am 2018-08-30 13:50:50 +09:00
31e37ea5df Merge pull request #1797 from SparkiDev/stack_size
Small stack usage fixes
2018-08-29 16:19:46 -07:00
fc64788092 Merge pull request #1795 from SparkiDev/tls13_no_tls12
Fixes to work when compiled with TLS 1.3 only
2018-08-29 16:16:46 -07:00
d084a4bcb8 Merge pull request #1794 from SparkiDev/sp_armasm_modexp
Fix for SP ASM arm and no DH
2018-08-29 16:13:34 -07:00
03fbad22a6 Merge pull request #1792 from SparkiDev/gcc_8_fixes
GCC 8 new warnings in -Wall fix
2018-08-29 16:12:19 -07:00
818b0a3c9c Merge pull request #1791 from SparkiDev/keyshare_ecc_free
Fix memory leak in KeyShare using ECC and not fast math
2018-08-29 16:11:32 -07:00
ab487e25a0 Merge pull request #1790 from JacobBarthelmeh/SanityChecks
change grep message for RSA key size with tests
2018-08-29 16:11:14 -07:00
4fd805ff1e Merge pull request #1789 from JacobBarthelmeh/Fuzzer
sanity check on buffer before clearing it
2018-08-29 16:10:56 -07:00
e4ccb2fe83 Merge pull request #1784 from dgarske/stsafe_server
Added ST-Safe PK callback example for Key Generation (TLS server only)
2018-08-29 16:07:14 -07:00
4d79eb121e add include.am file and comment for related code of Renesas cs+ and e2studio 2018-08-29 11:06:13 +09:00
4dbe86f1fd Small stack usage fixes
Stack pointer logging added.
2018-08-29 10:16:51 +10:00
4d6f43277e add project files for Renesas e2studio 2018-08-28 17:56:55 +09:00
487c60df78 Fixes to work when compiled with TLS 1.3 only
TLS 1.3 Early Data can be used with PSK and not session tickets.
If only TLS 1.3 and no session tickets then no resumption.
External sites don't support TLS 1.3 yet.
2018-08-28 15:37:15 +10:00
57620caac8 Fix for SP ASM arm and no DH
Fix mod exp in ARM asm to work for different size exponents.
In ASM code, mont_norm is not used in RSA so protect from no DH.
2018-08-28 11:24:38 +10:00
551201c00c GCC 8 new warnings in -Wall fix 2018-08-27 12:51:01 +10:00
24694ef7b0 Fix memory leak in KeyShare using ECC and not fast math 2018-08-27 10:50:57 +10:00
46c04cafd3 change grep message for RSA key size with tests 2018-08-24 16:47:37 -06:00
d122b9f8b5 sanity check on buffer before clearing it 2018-08-24 16:29:43 -06:00
205088d1bc Merge pull request #1787 from ejohnstown/patches
Patches for various build errors
2018-08-24 14:46:28 -07:00
459455328f Merge pull request #1788 from ejohnstown/oid
OID handling in DecodeExtKeyUsage
2018-08-24 14:46:19 -07:00
1d9b482711 Merge pull request #1747 from kaleb-himes/XCODE-UPDATES
Xcode updates
2018-08-24 14:01:39 -07:00
86ce22c32e Merge pull request #1785 from embhorn/zd4225
Fix for old certs not discarded when server does not resume session
2018-08-24 13:22:06 -07:00
1005ca0703 Merge pull request #1786 from kaleb-himes/USER-HEAP-WITH-CM
Unloading from CM, and using custom heap, ensure XFREE has acces…
2018-08-24 11:56:48 -07:00
bd5e507617 OID
1. When checking an OID sum against an OID string based on context, skip the unknown OIDs instead of treating them as parse errors.
2. When getting an OID, pass the lower error upstream instead of just PARSE error.
2018-08-24 11:51:25 -07:00
4eb0d32fa8 Patches
1. Define Timeval in callbacks.h if the file sys/time.h is missing.
2. When picking the correct strtok() function, take into account MINGW64.
3. In the example server, changed the call to SSL_accept_ex() as it doesn't exist. Using wolfSSL_accept_ex(). Only a problem when setting WOLFSSL_CALLBACKS.
4. PickHashSigAlgo() is missing a ; when WOLFSSL_CALLBACKS is set.
2018-08-24 11:46:02 -07:00
347fdccf1c Added missing README.md. 2018-08-24 11:11:30 -07:00
c96aeb4550 Added documentation and benchmarks for STM32 and STSAFE-A100 support. 2018-08-24 11:03:14 -07:00
7f324d2c3b Merge pull request #1781 from JacobBarthelmeh/Compatibility-Layer
fix for IV of DES_ncbc function
2018-08-24 10:16:21 -07:00
b7b99a2e92 Unloading from CM, and using custom heap, ensure XFREE has access to custom heap 2018-08-24 10:07:10 -06:00
274b41dea5 Merge pull request #1782 from JacobBarthelmeh/SanityChecks
refactor CloseSocket for WOLFSSL_BIO free with USER IO
2018-08-24 09:08:05 -06:00
498d8e6c15 Fix for old certs not discarded when server does not resume session 2018-08-24 07:53:35 -05:00
88e6bd2915 Added ST-Safe server side PK callback example for key gen. Added helper API's for setting up the PK callbacks and custom context. 2018-08-23 15:57:14 -07:00
40551720ab refactor CloseSocket and add guard 2018-08-23 16:30:53 -06:00
689da22799 Refactor and updates for XCODE projects following peer review 2018-08-23 15:41:35 -06:00
c7dde6c682 Merge pull request #1656 from danielinux/contiki-port
Contiki port
2018-08-23 12:31:56 -07:00
cc39f3211a Merge pull request #1780 from dgarske/pkcs7_ex
Added new PKCS7 ex API's to support signing and validation of large data
2018-08-23 08:41:25 -07:00
5d8a2a7702 Merge pull request #1778 from SparkiDev/sp_mem
Make ALT_ECC_SIZE with SP work
2018-08-23 08:25:44 -07:00
554d40a62e Merge pull request #1777 from dgarske/async_fixes
Build fixes for async
2018-08-23 08:23:20 -07:00
0d171e591b Merge pull request #1776 from SparkiDev/inline_cmpl_fix
Fix for clang builds with configs not using inline funcs
2018-08-23 08:22:39 -07:00
54a379d8e0 Merge pull request #1775 from SparkiDev/tls_no_cert_vfy
Fix for no certificates and calling DoVerifyCallback.
2018-08-23 08:22:07 -07:00
8477d5ba1b Merge pull request #1773 from ejohnstown/critical-option
Certificate Extension Critical Check Optionality
2018-08-23 08:21:19 -07:00
5ce1757e05 Merge pull request #1779 from dgarske/pic32mz_crypt_align
Fix for PIC32MZ crypto hardware alignment
2018-08-23 09:05:50 -06:00
f23eb37ade fix for IV of DES_ncbc function 2018-08-23 09:03:09 -06:00
57d72028f6 Fix for missing return code on wc_Pic32HashFree. 2018-08-22 16:38:55 -07:00
d0d28c82cd Added new PKCS7 ex API's for supporting signing and validation of large data blobs. New API's are wc_PKCS7_EncodeSignedData_ex and wc_PKCS7_VerifySignedData_ex. Includes header docx and unit tests for new API's. Cleanup for the PKCS7 small stack and const oid's. 2018-08-22 15:46:37 -07:00
53af520911 Fix to resolve issue with PIC32MZ crypto hardware (AES/DES3 only) where an unaligned input/output buffer was not handled correctly. This results in a BUFFER_E. This was seen with DTLS v1.0 and TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA cipher suite. Fix is to allocate a dynamic buffer from heap if the input/output are not aligned. Tested and verified with a PIC32MZ2048EFM144 and the wolfssl_udp_client example for Harmony using DTLS v1.0 and the setudppacketoptions 192.168.0.107 11111 hello -> sendudppacket commands. Cleanups in older ctoacrypt/settings.h for PIC32MZ. 2018-08-22 13:39:03 -07:00
d7d2fb34af fixed ifdef WOLFSSL_CONTIKI 2018-08-22 17:37:47 +02:00
bdb5d3c191 Improved support for contiki/uIP. 2018-08-22 09:15:10 +02:00
7bd16a2582 Fixed after second review 2018-08-22 09:15:10 +02:00
b74869a61a Moved contiki + uIP support in the library 2018-08-22 09:15:10 +02:00
b7385476f0 Removed empty ifdef section 2018-08-22 09:15:09 +02:00
79a7518fdd Using inline functions for XMALLOC/XFREE/XREALLOC in contiki
This is necessary to avoid the "unused variable" warnings
2018-08-22 09:15:09 +02:00
3d27a8dc53 Contiki port 2018-08-22 09:15:09 +02:00
783c4a0c5e Make ALT_ECC_SIZE with SP work
Change to more relevant dynamic types in SP also.
2018-08-22 16:02:51 +10:00
9ae4ef2d5c Build fixes for --enable-async --enable-all --with-intelqa. Resolves conflict for stat variable name. Fix for DH with async. Fix for async devSize. 2018-08-21 19:51:13 -07:00
08c2d94011 return value check of XFSEEK 2018-08-22 10:46:46 +09:00
31bd844d6f Fix for clang builds with configs not using inline funcs 2018-08-22 11:16:57 +10:00
fff5cff273 Fix for no certificates and calling DoVerifyCallback. 2018-08-22 10:57:19 +10:00
776fd51720 Merge pull request #1768 from SparkiDev/tls13_final
Use final TLS 1.3 version value by default.
2018-08-21 12:29:51 -07:00
e635e49635 Merge pull request #1772 from SparkiDev/tls13_point_ext
Send EC poiint format extension if downgradable from TLS 1.3
2018-08-21 12:27:10 -07:00
a505f2b063 Merge pull request #1662 from SparkiDev/mem_track
Add memory usage tracking and logging
2018-08-21 12:25:49 -07:00
a0f1c9dbe4 Make the check of the certificate extension critical flag optional based on compile option. 2018-08-21 10:57:04 -07:00
1ab17ac827 More changes to minimize dynamic memory usage.
Change define to WOLFSSL_MEMORY_LOG.
Fix for ED25519 server certificate - single cert to allow comparison
with ECC dynamic memory usage.
Free memory earlier to reduce maximum memory usage in a connection.
Make MAX_ENCODED_SIG_SZ only as big as necessary.
Change memory allocation type in sha256 from RNG to DIGEST.
If we know the key type use it in decoding private key
2018-08-21 14:41:01 +10:00
d29118ba58 Merge pull request #1771 from dgarske/tls13only
Fixes for building with TLS v1.3 only enabled.
2018-08-21 14:25:54 +10:00
103a0d351b Send EC poiint format extension if downgradable from TLS 1.3 2018-08-21 10:11:12 +10:00
389f56b5c7 Fix for building with TLS 1.3 only when AES CBC is enabled. Algorithm is allowed to be enabled, but the AES CBC cipher suites should not be. Fixed AEAD enable to check AES CBC based on HAVE_AES_CBC define. 2018-08-20 16:29:48 -07:00
506c858ed6 Add memory usage tracking and logging
Add WOLFSSL_MEMORY_TRACKING to report allocations and frees with the
type.
Fix places where memory can be freed earlier.
2018-08-21 08:54:57 +10:00
b12386fbb1 Fixes for building with TLS v1.3 only (./configure --disable-tlsv12 --enable-tls13 --disable-aescbc --enable-ed25519 --enable-curve25519) 2018-08-20 15:49:03 -07:00
20950ffde8 Remove TODOs around TLS 1.3 draft version. 2018-08-21 08:41:50 +10:00
3d16ed9c02 Merge pull request #1770 from ejohnstown/prime-fix
Prime Test Bug Fix
2018-08-20 13:24:05 -07:00
e4757f1283 Prime Test Bug Fix
Using the wrong size for the MR test check value. Converting from size
of FP_MAX_BITS to the DH prime size, dividing too much. Switched it to
its own constant.
2018-08-20 11:43:06 -07:00
f3c4d5442e Merge pull request #1757 from dgarske/pkcs8_pad
Fix to resolve padding issue with PKCS 8 encryption.
2018-08-20 09:32:34 -07:00
0e1b8b7bd8 Merge pull request #1760 from dgarske/atmel_asf
Fixes for building with Atmel ASF (`WOLFSSL_ATMEL`)
2018-08-20 09:20:01 -07:00
0f539616be Merge pull request #1766 from JacobBarthelmeh/UnitTests
cleanup with test cases and access to FP_MAX_BITS
2018-08-20 09:19:14 -07:00
683182f494 Merge pull request #1765 from SparkiDev/sp_fixes_1
Fixes for SP
2018-08-20 09:18:31 -07:00
555714afa3 Merge pull request #1764 from SparkiDev/tls13_psk_cb
Separate PSK callback for TLS 1.3
2018-08-20 09:17:01 -07:00
c8814a7ee1 Merge pull request #1769 from SparkiDev/tls13_dh
TLS 1.3: Always left-pad DH secret to length of prime
2018-08-20 09:13:50 -07:00
3e08c27512 Merge pull request #1715 from SparkiDev/disable_aescbc
Config option to disable AES-CBC
2018-08-20 09:08:19 -07:00
d104ae39e3 TLS 1.3: Always left-pad DH secret to length of prime 2018-08-20 14:20:50 +10:00
3cdeccc36e Use final TLS 1.3 version value by default. 2018-08-20 14:17:38 +10:00
a7b5ed1c27 Merge pull request #1767 from aaronjense/dsa-unreachable-statement
silence warning for unreachable statement from some compilers.
2018-08-18 17:50:45 -07:00
79590f3310 silence warning for unreachable statement from some compilers. 2018-08-17 15:13:06 -06:00
ed9aaa93f4 include tfm in example client for veiwing FP_MAX_BITS 2018-08-17 11:06:40 -06:00
cc10c971cd make sure that even if wolfSSL_Init has been called multiple times that wolfSSL_Cleanup gets called in tests 2018-08-17 11:04:21 -06:00
ff635d5b2b Merge pull request #1763 from aaronjense/ecc-check-key-type
Fix error with wolfCrypt-JNI having ECC_PRIVATEKEY_ONLY and d != NULL
2018-08-16 18:16:43 -07:00
f1222c3f9f Separate PSK callback for TLS 1.3
It is highly recommended that the PSK be different for each protocol.
Example callback already returns a different key for TLS 1.3.
New callback includes the ciphersuite, as a string, to use with the key.
2018-08-17 10:18:28 +10:00
2ac2c24f22 Fixes for SP
More places to mask shifted n.
Fix conditional check on NO_3072 in sp_int.h
Disable prime checking when using SP maths.
Add support for mp_tohex to SP maths.
Fix wolfmath.c to support including SP maths.
2018-08-17 10:13:29 +10:00
93546694ca modify for readability 2018-08-16 17:04:32 -06:00
aeb9ab8aea Combine if statements 2018-08-16 16:25:53 -06:00
eb08c6f6fc Fix error with wolfCrypt-JNI having ECC_PRIVATEKEY_ONLY and d != NULL 2018-08-16 15:29:46 -06:00
f487b0d96a Config option to disable AES-CBC
AEAD only detection and removeal of code.
Also in single threaded builds, reference the ctx suites in ssl object
if it exists.
2018-08-16 08:25:13 +10:00
9db7ba2f0d Fix for cast mismatch and spelling of state. 2018-08-15 12:00:44 -07:00
c6e075f077 Fixes for building with Atmel ASF and no ECC508A. 2018-08-15 12:00:44 -07:00
739bbd1355 Merge pull request #1750 from JacobBarthelmeh/SanityChecks
update condition for include of sys/time.h
2018-08-15 11:28:05 -06:00
baab6755b2 Merge pull request #1756 from dgarske/norng
Fixes for building with `WC_NO_RNG`
2018-08-15 10:18:44 -07:00
be0523b7cd Merge pull request #1749 from JacobBarthelmeh/UnitTests
check max key size with ocsp stapling test
2018-08-15 10:18:12 -07:00
373258a0c2 account for NO_RSA and SP math when printing max RSA key size 2018-08-15 09:52:43 -06:00
c3ab52ed44 key size check on ocsp-stapling2 test 2018-08-15 09:52:43 -06:00
f74406d2c9 check max key size with ocsp stapling test 2018-08-15 09:52:43 -06:00
3d16f891d4 Fix to check for buffer overrrun with the additional padding in PKCS12 EncryptContent function. 2018-08-14 19:20:24 -06:00
cdff2869c2 Fixes for building with WC_NO_RNG (applies to wolfCrypt only builds). Tested with ./configure --enable-cryptonly CFLAGS="-DWC_NO_RNG" && make. 2018-08-14 18:53:25 -06:00
2420af3cf2 Merge pull request #1758 from dgarske/certext
Fix for building certext without certgen
2018-08-14 17:00:51 -05:00
9ad059542a Merge pull request #1745 from dgarske/ecc_export_hex
Added new ECC export API's to support export as hex string
2018-08-14 14:19:23 -07:00
e2de988f98 Merge pull request #1739 from dgarske/asio
Fixes to openssl compatibility for Boost.Asio with SSF
2018-08-14 14:18:08 -07:00
d1e13a973c Fix for building WOLFSSL_CERT_EXT without WOLFSSL_CERT_GEN due to missing CTC_MAX_EKU_OID_SZ. Change to allow --enable-certext without certgen. 2018-08-14 15:00:56 -06:00
1c297b3ac4 Cleanup of some macro logic for enabling the mp_toradix. 2018-08-14 12:58:00 -06:00
f23915baa1 Fix for BIO ssl case, which is not supported (for the Boost.Asio project this isn't required either). 2018-08-14 12:44:31 -06:00
6ca56ee98c Fix to handle carriage return case in PEM end of line character handling (for Windows). Cleanup to consolidate duplicate end of line character handling code. 2018-08-14 12:22:18 -06:00
ff7d2fefdc Fix for DH max size calc not including DH_Pub. 2018-08-14 12:22:18 -06:00
7b83db0f65 Fix for PemToDer which was not properly handling extra new lines at end of file. 2018-08-14 12:22:18 -06:00
eca64717be Fix for BIO_wpending to work correctly. 2018-08-14 12:22:18 -06:00
17e102d914 Fixes for asio build options (so includes OPENSSL_EXTRA). Fix for bad named variable shutdown. Fix for the side size in Options struct to support WOLFSSL_SIDE_NEITHER (3). Fix to set the side on wolfSS_connect() or wolfSS_accept(). 2018-08-14 12:22:18 -06:00
be33e69b22 Refactor to rename wc_ecc_export_int to wc_export_int for generic API for exporting an mp_int as hex string or unsigned bin. 2018-08-14 12:17:20 -06:00
368227be2c Fix to make sure fp_div_d is available. 2018-08-14 12:05:22 -06:00
c073aee87c Added new ECC export API's to support export as hex string. New API's are wc_ecc_export_ex and wc_ecc_export_int. For hex string use ECC_TYPE_HEX_STR as encType arg. Refactor to reduce duplicate code. Build fixes for NO_ECC_KEY_EXPORT. 2018-08-14 12:05:22 -06:00
04c2b51b4d Fix for padding size calculation and cast warning. 2018-08-14 11:49:21 -06:00
278fd9c054 update condition for include of sys/time.h 2018-08-14 10:51:05 -06:00
d823d6f7b6 Fix to resolve padding issue with PKCS 8 encryption. 2018-08-14 10:51:04 -06:00
64f553d944 Merge pull request #1755 from ejohnstown/scan-build-fix
Scan-Build Fix
2018-08-14 10:11:02 -06:00
aee4aea64d Merge pull request #1748 from JacobBarthelmeh/Testing
call hamc init with blake2 software test
2018-08-14 10:07:01 -06:00
d4f908c372 Merge pull request #1728 from JacobBarthelmeh/HardwareAcc
Add build for AF_ALG
2018-08-13 16:27:51 -07:00
a3627106ea Merge pull request #1753 from dgarske/gcc_arm_fips
Enhancements to the GCC-ARM example
2018-08-13 16:20:13 -07:00
91d2b17139 Scan-Build Fix
1. Initialize the sz variable in wc_BerToDer().
2018-08-13 14:37:04 -07:00
f44d42b1c8 Enhancements to the GCC-ARM example to support FIPS and additional build options. Added examples for memory overrides and standard library overrides. Fixes for building without test, benchmark or TLS. Changed the ARM startup code to only work for the Cortex M0 example using the define USE_WOLF_ARM_STARTUP. 2018-08-13 12:22:14 -06:00
5caaa94868 Merge pull request #1754 from dgarske/fix_fipsv2
Fix for FIPS PRB error with CAVP test
2018-08-13 11:18:33 -07:00
b71c2ddf38 call hamc init with blake2 software test 2018-08-13 08:58:01 -06:00
93a7b76da5 Fix missing RSA_MIN_SIZE and RSA_MAX_SIZE and case where HAVE_FIPS_VERSION is not defined. 2018-08-13 08:18:51 -06:00
80e46253d9 Fix for FIPS v1 CAVP case so the wc_RsaExportKey and wc_CheckProbablePrime functions are available. Cleanup to remove unused ERROR_OUT. 2018-08-13 06:25:55 -06:00
bb574d28b2 Support for more cert subject OIDs and raw subject access (#1734)
* Add businessCategory OID
* Raw subject support methods
* Support for jurisdiction OIDs
* Wrap in WOLFSSL_CERT_EXT
* Adding tests
2018-08-12 12:53:29 -07:00
6d10efe79c Merge pull request #1752 from kaleb-himes/ocsp-stapling-pzero-take2
Use port 0 (dynamic) solution on servers and clients in addition to ocsp responders. Fix for OCSP tests when running concurrently.
2018-08-10 15:15:43 -07:00
280de47d06 Use pzero solutions on servers and clients in addition to ocsp responders 2018-08-10 14:17:17 -06:00
c288a214b1 give servers time to shut-down after client connection 2018-08-10 11:57:35 -06:00
ba3bc59771 further test control over ocsp-stapling tests 2018-08-10 11:44:16 -06:00
735e4a0986 ocsp stapling tests to wait until unit tests are complete 2018-08-10 11:18:04 -06:00
6113f68c21 make renewcerts-for-test use portable function declaration 2018-08-10 10:40:16 -06:00
35dbf9a6fe address file restoration issue present when git not available 2018-08-10 10:24:42 -06:00
a9a9dd257e Merge pull request #1743 from kaleb-himes/ocsp-logic-update
update ocsp test case for portability and informative updates on use …
2018-08-08 10:45:26 -06:00
c7f1d810c3 update ocsp test case for portability and informative updates on use of environment variable 2018-08-07 10:42:18 -06:00
cc1680dc98 Merge pull request #1741 from dgarske/verify_cb
Refactor of the verify callback
2018-08-06 13:12:54 -07:00
56974c099e Improved the logic for WOLFSSL_ALWAYS_VERIFY_CB to be more explicit and updated comments. 2018-08-06 11:40:35 -07:00
c4ea50b956 Fix for issue with using CopyDecodedToX509 again for existing X509 and freeing the altNames in original. Fix was to use the ssl->peerCert directly for the index 0 cert. Improvement to make sure ex_data is always populated. Added NULL arg check on wolfSSL_get_peer_certificate. 2018-08-06 11:40:35 -07:00
7d39a897dc Refactor of the verify callback to eliminate duplicate code and provide consistency with various build options. Documented build options and added code comments in new DoVerifyCallback function. Added documentation in test.h myVerify function for arguments and return code. Fix from commit da1ac36 which added current_cert to WOLFSSL_X509_STORE_CTX, but is only required for ASIO compatibility and is not used. 2018-08-06 11:40:35 -07:00
30d6c0c1fc Merge pull request #1737 from ejohnstown/ocsp-free
OCSP Free
2018-08-06 09:08:01 -07:00
30e787b10c create buffer with structure copy and set fd after close 2018-08-03 16:46:15 -06:00
7726786998 fix comment and remove duplicate free 2018-08-03 15:04:37 -06:00
738a121d61 Merge pull request #1740 from ejohnstown/null-check
NULL Check
2018-08-03 13:53:53 -07:00
b88d60ecbb Merge pull request #1665 from ejohnstown/mr
Prime Number Testing
2018-08-03 12:50:27 -07:00
f6a8a2f5bd NULL Check
When using the async option, the RSA key is checked on the first call to
DoTls13CertificateVerify() when the async state machine is set up. On
the subsequent call, the pointer to the key isn't checked again. Added a
check. (This was from a static analysis report.)
2018-08-03 11:09:43 -07:00
368b5b1072 Merge pull request #1729 from kaleb-himes/init-array
Initialize array to zero(s)
2018-08-02 16:33:37 -07:00
f45dbed8f9 OCSP
1. Modify the other OCSP Stapling scripts to better manage the OCSP responder.
2. Modify the client's W option to take:
 - 1 for Stapling v1
 - 2 for Stapling v2
 - 3 for Stapling v2 MULTI
3. Modify the client to disallow stapling v2 with TLSv1.3.
2018-08-02 16:25:38 -07:00
a43d4d16ba Merge pull request #1719 from MJSPollard/OpenSSLAllFix
Added boost define and openssl bug fix with WOLFSSL_KEY_GEN
2018-08-02 15:20:27 -07:00
a915c3a381 Merge pull request #1738 from ejohnstown/DH
DH SP Fix
2018-08-02 15:04:33 -07:00
660c3300e1 Merge pull request #1730 from dgarske/dertoc
Added handy script for converting DER file to C array
2018-08-02 15:54:15 -06:00
5ae45436f4 OSCP
1. Added a missed attr files for the OSCP status files. Bare minimum attr.
2. Added the attr files to the automake include.
3. Fix out of bounds read with the OCSP URL.
2018-08-02 14:50:59 -07:00
782ea74fbf Merge pull request #1732 from kojo1/Ticket-4169-2
Ticket 4169: eliminate ssl->CBIORecv/Send overwritten in SSL_set_bio
2018-08-02 14:58:25 -06:00
99b556c07d Merge pull request #1735 from embhorn/zd4179
Fix for resource leak
2018-08-02 14:27:04 -06:00
c71f730d67 OSCP
1. Made killing the OCSP server process more reliable.
2. Added attr files for the OSCP status files. Bare minimum attr.
3. Added a NL to the error string from the client regarding external tests.
2018-08-02 11:32:36 -07:00
ddec878152 Disable external tests for OCSP scripts 2018-08-02 10:03:47 -06:00
b248af6f84 Update from review 2018-08-02 10:59:07 -05:00
a178764a8b Portability and self-cleanup changes to ocsp test scripts 2018-08-02 09:47:13 -06:00
93c2f3b170 Initialize array to zero(s) 2018-08-02 09:21:09 -06:00
fd75f35801 fix cbioFlag check 2018-08-02 10:18:09 +09:00
6527c2a724 DH SP Fix
When doing the sp_2048_mod_exp_*() is processed, one of the index
variables is masked with 0x1f when it was updated. Added the masking to
the initial set of the index.
2018-08-01 16:32:22 -07:00
c87d6b27e2 OCSP Free
Free the OCSP request when creating the response only if there is an error making the request.
2018-08-01 15:34:43 -07:00
0ccdefb8d0 Merge pull request #1733 from ejohnstown/des-iv
Fix DES IV value
2018-08-01 14:57:26 -07:00
7647d52d77 Prime Number Testing
1. Remove a copy-paste error when clearing up the RNG used to test a prime.
2. Tag a some const test values as static in the wolfCrypt test.
2018-08-01 14:49:06 -07:00
244d931e75 Merge pull request #1721 from kaleb-himes/cleanup-debug
Cleanup debug errors
2018-08-01 15:01:25 -06:00
ba2f0fd8fc Fix for zd4179, 4181, 4182 2018-08-01 15:56:15 -05:00
5ca2ff187b DES IV
Change the DES_IV_SIZE back to 8 bytes, rather than 16.

DES/DES3 was passing the wolfCrypt test becuase the main DES code uses
the DES_BLOCK_SIZE when handling the IV. The TLS/SSL code uses the
DES_IV_SIZE when generating the session keys.
2018-08-01 13:08:52 -07:00
98f6ae16ca copy cbioFlag from ctx to ssl 2018-08-02 04:48:39 +09:00
8bc5bc227d Merge pull request #1634 from ejohnstown/gcc-8-fixes
GCC-8 String Fixes
2018-08-01 12:13:10 -07:00
da096497e0 Merge pull request #1727 from dgarske/memdocs
Documented memory build options
2018-08-01 12:12:34 -07:00
ce5e787afc formating and sanity check on pointer with test case 2018-08-01 11:57:36 -06:00
dba8131b19 Merge pull request #1731 from ejohnstown/redundant-cert
redundant certificate fix
2018-08-01 10:42:30 -07:00
a72cbcf8eb Merge pull request #1726 from ejohnstown/memcb-test
memory callback test fix
2018-08-01 10:05:14 -07:00
cb756397b3 inital AES-CBC with af_alg
progress on AES-GCM with AF_ALG and add SHA256

add aes-gcm test cases and finish logic of aes-gcm with AF_ALG

formating of tabs and white space

add files to dist

adding ecb and ctr mode with af_alg

make length of buffers for ctr be AES_BLOCK_SIZE

formating and add support for sha256 copy/gethash

sanity checks on arguments

cast return values and valgrind tests

make it easier to use sha256 with af_alg

remove hard tabs

add endif for after rebase
2018-08-01 08:54:20 -06:00
96c1a567f0 #4169: CBIO set flag to escape from overwritten in SSL_set_bio 2018-08-01 19:16:42 +09:00
61ac7315e2 a certificate was named in an automake include that isn't actually in the tree, a similar named certificate is actually used 2018-07-31 17:25:35 -07:00
72aef0ab11 Added handy script for converting DER file to C array. Example: ./scripts/dertoc.pl ./certs/server-cert.der server_cert_der_2048 server-cert.c. 2018-07-31 15:57:02 -07:00
f5b3de6b54 GCC-8 string fixes
1. Found one more case where a string is copied, potentially without the null. In wc_ports w.r.t. directory and file names.
2018-07-31 14:02:44 -07:00
7053830628 GCC-8 string fixes
Fix for the Windows directory search code.
2018-07-31 14:02:44 -07:00
af89458af0 GCC-8 string fixes
1. strncpy needs to include the source string's NULL.
2. Deleted a few redundant string modifications.
2018-07-31 14:02:44 -07:00
ed208efc4d GCC-8 string fixes
1. Modify wolfSSL_get_ciphers() to limit the XSTRNCPY based on the dst buf length, not the src string.
2018-07-31 14:02:44 -07:00
2e1a1681ec GCC-8 string fixes
1. strncat() does not like to copy single byte strings with "n = 1", as it won't null-terminate.
2. strncpy()'s len parameter is the size of the dst not the src.
3. Replaced the echoserver HTTP response composition of const strings with a copy of a single string.
2018-07-31 14:02:44 -07:00
50372b7033 Memory Callback
1. Allow SetAllocators to use NULL as a callback. Memory wrappers will use default with NULL.
2. Remove the ResetAllocators function. Use SetAllocators with NULL.
3. Modify memory tracker to save the old allocators on init and restore them on cleanup.
2018-07-31 09:30:03 -07:00
0e1588f4ad Documented memory build options. Added logging for normal wolf malloc/free opterations when using WOLFSSL_DEBUG_MEMORY and WOLFSSL_DEBUG_MEMORY_PRINT (previously only worked with WOLFSSL_STATIC_MEMORY and WOLFSSL_TRACK_MEMORY). Changed WOLFSSL_MALLOC_CHECK option to use WOLFSSL_MSG. 2018-07-31 09:03:40 -07:00
fe08b98117 Adjust guards following peer review 2018-07-31 09:50:44 -06:00
2b3f94944d Merge pull request #1723 from kaleb-himes/overhead-avoidance
avoid overhead call to alloc and free when sigSz invalid
2018-07-31 08:14:49 -07:00
f18351fef5 Merge pull request #1718 from dgarske/memtest
New memory testing feature and fixes for null checks
2018-07-31 07:56:29 -07:00
f5bd376450 Merge pull request #1720 from dgarske/stsafe_wolf
Added STM32L4/ST-Safe support. Fixes for AES CBC Decrypt w/CubeMX
2018-07-31 07:41:49 -07:00
0f86494161 * Added support for STM32L4 AES hardware crypto.
* Added reference PK callbacks functions for ECC sign, verify and shared secret used by TLS in `wolfcrypt/src/port/st/stsafe.c`.
* Fix for wolfcrypt_test to not require args to be provided.
* Fix for wolfCrypt `ecc_test_buffers` to poperly init ecc_key (resolves devId issue).
* Fix for STM32 AES CBC Decrypt with CubeMX, which was not capturing the first input block for next IV.
* Refactor to combine STM32 hardware init code.
2018-07-30 13:58:19 -07:00
656c0453a2 Fix for unit test abort(). 2018-07-30 13:53:54 -07:00
6a91fbcfdd Fixes for warnings from Jenkins reports. 2018-07-30 13:53:54 -07:00
4eff7b641b First pass at bugs found with ./scripts/memtest.sh. Fixes for NULL pointer checks, making sure free'd pointers are reset, making sure pointers are initialized and making sure memory is always free'd. Fix for TicketInit() which was using non-thread safe RNG and key_ctx. Fix for possible double free case in wolfSSL_PEM_read_X509_CRL. 2018-07-30 13:53:54 -07:00
6ed6876b1f Enhanced the --enable-memtrack option to keep list of pointers allocated and reports leaked memory at end. Cleanup of the wolfCrypt_Init and wolfCrypt_Cleanup calls in unit.test and SrpTest memory tracking feature. 2018-07-30 13:53:54 -07:00
2c3475c1d6 Added new build option --enable-memtest or WOLFSSL_FORCE_MALLOC_FAIL_TEST which enables random malloc failures for testing. This test supresses the abort() calls to detect seg faults. A new script ./scripts/memtest.sh starts the test. If an issue is found it can be reviewed with the ./scripts/memtest.txt log and reproduced using the seed printed at top of unit test as --- RNG MALLOC FAIL AT 295--- and rerun using ./tests/unit.test 295. 2018-07-30 13:53:35 -07:00
62cb69ded6 Merge pull request #1724 from dgarske/pemtoder
Added API's to expose alloc/free of DerBuffer and new unit tests
2018-07-30 13:50:19 -07:00
335f467b8c Merge pull request #1714 from dgarske/pic32hashleak
Fixes for PIC32MZ hash memory leak
2018-07-30 13:48:59 -07:00
50115e55b3 Merge pull request #1725 from kaleb-himes/USER_CONF_SIZES
Allow users to adjust upper bounds
2018-07-30 13:44:58 -07:00
ec238c0553 Allow users to adjust upper bounds 2018-07-30 13:44:40 -06:00
c71d8eb6ba Merge pull request #1653 from Naruto/feature/mynewt
port apache mynewt
2018-07-30 13:33:25 -06:00
1079b0e3b3 Merge pull request #1716 from cariepointer/osp/haproxy
Define functions required by HAProxy and enable SSLV3 dependency
2018-07-30 13:26:38 -06:00
0ef63048a0 Fix for new report in wc_BerToDer with uninitialized derSz. 2018-07-30 11:51:26 -07:00
309d7a9d0d Added API's to expose alloc/free of DerBuffer using wc_AllocDer and wc_FreeDer. Added unit tests for new API's and missing ones for wc_PemToDer and wc_CertPemToDer. ZD 4185. 2018-07-30 11:19:59 -07:00
d19b78d81a Fix typo in comment 2018-07-30 12:17:55 -06:00
166330030c Handle case where external unassigned 2018-07-29 06:46:07 -06:00
861fec1dc6 porting mynewt 2018-07-28 18:03:20 +09:00
0ee4b88e74 avoid overhead call to alloc and free when sigSz invalid 2018-07-27 16:25:10 -06:00
4b8507813e Prime Number Testing
1. Also disable the new prime test from TLS while using SELFTEST.
2018-07-27 13:34:38 -07:00
afb2180e80 Cleanup debug errors 2018-07-27 14:00:19 -06:00
04e16b8df8 Merge pull request #1717 from JacobBarthelmeh/Testing
sanity check on pkcs8 variable
2018-07-27 13:33:55 -06:00
543cac65d8 Added boost define and openssl bug fix with WOLFSSL_KEY_GEN 2018-07-27 12:42:09 -06:00
74c4d31c07 sanity check on pkcs8 variable 2018-07-27 11:16:41 -06:00
31f1692cbf Prime Number Testing
1. Disable the new prime test from TLS while using FIPS or setting the flag WOLFSSL_OLD_PRIME_CHECK.
2018-07-26 16:01:08 -07:00
4b2a591a93 Prime Number Testing
1. Added calls to wc_DhSetCheckKey() on the client side of TLS.
2. Added an API test to the wolfCrypt test.
3. Fixed a bug in the prime test found with the API test. Misuse of tertiary operator.
2018-07-26 14:43:04 -07:00
efbabbfb29 Further improvements to hashing code to make sure wc_*Free is always called including wc_HashFree. Added new defines to disable PIC32MZ hardware features using NO_PIC32MZ_HASH, NO_PIC32MZ_RNG and NO_PIC32MZ_CRYPT. 2018-07-26 14:41:30 -07:00
a1f69f0d64 Define functions required by HAProxy and enable SSLV3 dependency 2018-07-26 12:53:21 -07:00
90367df13c Merge pull request #1710 from SparkiDev/ed25519_only
Changes to build with X25519 and Ed25519 only
2018-07-25 14:24:03 -07:00
84c1b633fb Merge pull request #1713 from JacobBarthelmeh/UnitTests
fix buffer types for ARC4 test
2018-07-25 14:17:10 -07:00
92cb8f06ea Fixes to make sure hash free is always called (resolves memory leaks with PIC32MZ hashing hardware). Only print Alloc/Free messages with track memory when WOLFSSL_DEBUG_MEMORY_PRINT is defined. Added test for ForceZero with 0 length. 2018-07-25 11:22:03 -07:00
beceab2734 Fix for leak with WOLFSSL_PIC32MZ_HASH and TLS. The PIC32 update cache buffer was not always being free'd. 2018-07-25 11:22:03 -07:00
74fbd06817 Merge pull request #1686 from cconlon/nucleus-update
Nucleus port and PB changes
2018-07-25 09:17:40 -06:00
003b7b28f4 fix buffer types for ARC4 test 2018-07-24 17:37:39 -06:00
fe2aee11d8 Merge pull request #1712 from JacobBarthelmeh/Testing
check if internal of WOLFSSL_RSA struct is already set
2018-07-24 11:55:15 -07:00
17c7ecb2bc Merge pull request #1711 from dgarske/memtrack
Fix for memory tracking cleanup
2018-07-24 11:53:08 -07:00
169cca355f Merge pull request #1705 from cconlon/truestudio-project
Add wolfSSL library project for Atollic TrueSTUDIO
2018-07-24 11:52:11 -07:00
018573bcf3 Merge pull request #1695 from JacobBarthelmeh/Optimizations
add some macro guards for CipherRequires function
2018-07-24 11:51:03 -07:00
0175447eb3 tie TRUESTUDIO files into include.am 2018-07-24 09:36:49 -06:00
f69c6e382c check if internal of WOLFSSL_RSA struct is already set 2018-07-23 17:17:27 -06:00
92bc891713 Merge pull request #1709 from SparkiDev/rsa_low_mem_fix
Fix for RSA_LOW_MEM and other configurations
2018-07-23 16:15:28 -07:00
e618f34c2f Merge pull request #1707 from kaleb-himes/ARM_GCC_EX_FIXES
Fixes for building without DRBG and ForceZero test
2018-07-23 16:14:43 -07:00
ef076a68d3 Added new API wolfSSL_ResetAllocators to allow reset of memory callbacks to defaults. Added new CleanupMemoryTracker which restores memory callback functions. This resolves issue with trying to free memory allocated prior to InitMemoryTracker. 2018-07-23 16:03:08 -07:00
ab3ffaa26a Merge pull request #1706 from SparkiDev/sha384_not_sha512
Allow SHA384 to be compiled in without SHA512
2018-07-23 09:47:49 -07:00
69aa74d220 Merge pull request #1708 from ejohnstown/config-fix
Configure Fix
2018-07-23 10:43:12 -06:00
6d3e145571 Changes to build with X25519 and Ed25519 only
Allows configurations without RSA, DH and ECC but with Curve25519
algorithms to work with SSL/TLS using X25519 key exchange and Ed25519
certificates.
Fix Ed25519 code to call wc_Sha512Free().
Add certificates to test.h and fix examples to use them.
2018-07-23 10:20:18 +10:00
06b888a997 Fix for RSA_LOW_MEM and other configurations
Also cast return of XMALLOCs.
2018-07-23 08:47:11 +10:00
3957bb4ebe Configure Fix
1. The check for options that start with an underscore to wrap them with another check was broken. Replaced with a use of grep. The old original version breaks on some shells.
2018-07-20 15:14:03 -07:00
c432bb5e82 Revert back to no tests for test.h consideration 2018-07-20 14:41:46 -06:00
887e3deee8 Move ForceZero test to api.c and turn on tests when inline disabled 2018-07-20 13:30:06 -06:00
027f18919a Resolving some unwanted dependencies 2018-07-20 11:54:36 -06:00
7f19f914c0 create WOLFSSL_NUCLEUS_1_2 for older 1.2 version 2018-07-20 10:51:15 -06:00
d54c7a7df8 Merge pull request #1704 from quinnmiller1997/crossworks
Added support for Jenkins testing in Rowley Crossworks
2018-07-20 08:15:16 -07:00
9433fcb820 Allow SHA384 to be compiled in without SHA512 2018-07-20 09:42:01 +10:00
c5a44c083a Merge pull request #1703 from cconlon/truestudio
Fix Atollic TrueSTUDIO warning, add WOLFSSL_STM32F427_RNG
2018-07-19 15:59:11 -07:00
b6ac3379f0 add wolfSSL library project for Atollic TrueSTUDIO 2018-07-19 16:06:42 -06:00
6d0c49a425 Added support for Jenkins testing in Rowley Crossworks 2018-07-19 15:34:28 -06:00
59f241e510 Merge pull request #1702 from ejohnstown/fips-ecc
FIPS build and ECC fixes
2018-07-19 13:56:03 -07:00
a58d1cf030 Merge pull request #1655 from MJSPollard/wolfASIO
Added wolfSSL compatability for Asio C++ library
2018-07-19 13:44:07 -06:00
19dd08e191 requested style changes 2018-07-19 11:05:56 -06:00
c9434c5ad8 FIPS build and ECC fixes
1. The fips-check script was missing the ecc file when building the FIPSv2 test directory. The correct file was sent in for testing.
2. When building with ECC import validation enabled, one usage of the ALLOC_CURVE_SPECS macro had an extra parameter. (copy-and-paste error)
2018-07-19 10:02:14 -07:00
213f79f06f only require Nucleus XTIME when NO_ASN_TIME is not defined 2018-07-19 10:47:37 -06:00
42985d8250 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into wolfASIO 2018-07-19 10:26:54 -06:00
5c940351b7 add include for task.h for FREERTOS in benchmark.c 2018-07-18 16:52:16 -06:00
5b9fbb5d42 add WOLFSSL_STM32F427_RNG support 2018-07-18 16:44:30 -06:00
27b7791f5e fix TrueSTUDIO warning in PKCS12_create_key_bag() 2018-07-18 16:15:33 -06:00
da1ac3643f added current_issuer member in X509_STORE_CTX struct for SSF use 2018-07-18 16:01:16 -06:00
70dfb9af72 Merge pull request #1700 from embhorn/zd4110
Move #if blocking wc_PubKeyPemToDer
2018-07-18 12:33:01 -07:00
0dbd35ae01 websocketpp compat. addition, add new define for asio 2018-07-18 12:09:12 -06:00
db8939c578 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into wolfASIO 2018-07-18 11:10:35 -06:00
227e7cc8c7 Merge pull request #1690 from SparkiDev/tls_sha384_copy
Remove special case SHA-384 copy code
2018-07-18 09:37:50 -07:00
aa2d6f8060 Merge pull request #1699 from dgarske/ecc508a_pkcb
Added reference PK callbacks for ATECC508A to support TLS
2018-07-18 09:35:58 -07:00
436e774729 Merge pull request #1685 from SparkiDev/dh_max
Add support for maximum DH key size
2018-07-18 09:33:43 -07:00
52aac6e641 Merge pull request #1697 from embhorn/zd4060
Dead code in wolfSSL_BIO_gets()
2018-07-18 09:22:35 -07:00
0c59aa8e31 Move #if blocking wc_PubKeyPemToDer 2018-07-18 11:15:06 -05:00
17d5b6a42b Merge pull request #1694 from SparkiDev/stack_ecc
Small stack support in ECC
2018-07-18 08:57:35 -07:00
ebdfe9715e Merge pull request #1698 from SparkiDev/ed25519_def
Fix define protection to be ED25519 not ECC
2018-07-17 20:05:47 -07:00
74c391d138 Added reference PK callbacks (HAVE_PK_CALLBACKS) for ATECC508A device for wolfSSL TLS. 2018-07-17 19:02:56 -07:00
0236a293e4 Fix define protection to be ED25519 not ECC 2018-07-18 10:12:57 +10:00
ce092a96a2 Change default maximum to 4096 bits. 2018-07-18 08:40:43 +10:00
a862ef860b Merge pull request #1696 from quinnmiller1997/crossworks
Updated Rowley-Crossworks settings for CMSIS 4, added support for Jenkins testing
2018-07-17 13:32:34 -07:00
1840ae7013 Merge pull request #1693 from SparkiDev/stack_rsa
Small stack fixes and ignore RSA fields in RSA_LOW_MEM
2018-07-17 12:24:00 -07:00
6a6f5d01b4 Fix for zd4060 2018-07-17 14:20:14 -05:00
f693c9cc8b Merge pull request #1692 from SparkiDev/stack_hashalgs
Stack hashalgs
2018-07-17 12:20:02 -07:00
96567112cd Merge pull request #1691 from SparkiDev/stack_dh_tls
Small stack fixes
2018-07-17 12:15:26 -07:00
8fed6dfb27 Merge pull request #1687 from cariepointer/openssh-des3
Update configure to enable des3 when building OpenSSH
2018-07-17 12:03:18 -06:00
1766b69de2 Added suppport for Jenkins testing on FRDM-K64F and updated README 2018-07-17 11:30:33 -06:00
d6c9d30aee Merge pull request #1689 from ejohnstown/atomic-dtls
DTLS and Atomic Encrypt Callback
2018-07-17 09:37:50 -07:00
eebbe0239a Merge pull request #1683 from kaleb-himes/SGX_STATIC_LIB_FIX
Update SGX Static lib solution, solve through settings.h
2018-07-17 10:22:14 -06:00
7e5bf9b8a9 add some macro guards for CipherRequires function 2018-07-17 09:04:06 -06:00
e6c22fbd85 Small stack support in ECC
Small stack builds now dynamically allocate large stack variables.
Cache option added to avoid repeated allocation of temporaries in add
points, double point and map.
Cached memory allocated in mulmod and mul2add.
2018-07-17 16:39:53 +10:00
c01c79349e Small stack fixes and ignore RSA fields in RSA_LOW_MEM
Fix asn.c and rsa.c small stack to not have large stack variables.
In RSA code don't load or store dP, dQ or u when using RSA_LOW_MEM as
they are not used.
Fix SP to recognize RSA_LOW_MEM means to use d, private exponent.
Fix wc_CheckRsaKey to work with SP.
Fix sp_int to support mp_set_int for wc_CheckRsaKey().
2018-07-17 11:05:38 +10:00
befe15ddb9 Add configure option to cache when using small stack 2018-07-17 09:36:49 +10:00
6ef800e5f7 Cache Sha256 for small stack when asked in random
Small stack builds see SHA-256 allocating W a lot.
Cache the SHA-256 object in DRBG when WOLFSSL_SMALL_STACK_CACHE is
defined.
Call free function on SHA-256 object now that it is required.
2018-07-17 09:33:24 +10:00
88a2531652 Cache the data allocated in SHA-2 Transform functions
SHA-2 algorithms allocate W each call to transform when using
WOLFSSL_SMALL_STACK.
Put a pointer into the SHA-2 object to cache W.
Change code to call the SHA-2 Free functions now that they are required.
Only cache when WOLFSSL_SMALL_STACK_CACHE is defined.
2018-07-17 09:17:39 +10:00
514a949557 Small stack fixes
Changes to DH and SSL/TLS code to dynamically allocate large stack
variables when compiled with WOLFSSL_SMALL_STACK.
2018-07-17 09:04:00 +10:00
87f378efb5 Remove special case SHA-384 copy code
SHA-384 implementation has a GetHash API and TLS code uses it.
2018-07-17 08:16:46 +10:00
49fefe176e DTLS and Atomic Encrypt Callback
When using the encrypt callback, the DTLS sequence number isn't incremented. Moved the increment to later in the BuildMessage() function.
2018-07-16 13:33:03 -07:00
ea769b831c Fix tab indentation 2018-07-16 13:09:45 -07:00
dbe0ac6fec Update configure to enable des3 when building OpenSSH 2018-07-16 09:49:23 -07:00
00fd7ff8de Prime Number Testing
1. Added some new ifdef clauses to tfc and integer so that
the prime checking is available when using RSA, DSA, or DH.
A couple functions used were dependent on ECC being enabled.
2018-07-13 17:42:35 -07:00
f0422bec41 Merge pull request #1681 from dgarske/pk_keygen
Added ECC and Curve25519 Key Generation PK callback support
2018-07-13 14:03:13 -07:00
f59fb0df8e add custom print to test.c for PB 2018-07-13 14:58:48 -06:00
eeb50099d9 initial Nucleus port with PB changes 2018-07-13 14:58:37 -06:00
1337f7ddec Merge pull request #1674 from dgarske/derchainsz
Fix for max cert chain size calculation
2018-07-13 13:53:35 -07:00
ddd6563442 Dependencies for SGX project updated 2018-07-13 13:18:15 -06:00
6c1778d373 Merge pull request #1669 from cconlon/mqxfixes
fixes for MQX classic 4.0 with IAR-EWARM
2018-07-13 11:59:28 -07:00
223c71b96c Merge pull request #1673 from ejohnstown/configure-update
Yet Another Configure Update
2018-07-13 11:55:08 -07:00
0a19dc0940 Don't run new cert chain test if RSA is disabled (test chain contains RSA certs). 2018-07-13 11:41:06 -07:00
2f00c0b465 Added test case for new server ECDHE PK callback. 2018-07-13 10:45:36 -07:00
71d8946ee6 Merge pull request #1678 from cariepointer/osp/openssh
Move function prototypes from wolfss/ssl.h and openssl/ssl.h to appropriate header files for OpenSSH compatibility
2018-07-13 10:05:18 -06:00
9bc0e0c4fc Static analysis fixes (#1658)
* Static analysis fixes
* Fixes for zd4071, zd4074, zd4093-zd4094, zd4096, zd4097-zd4104.
* Add test cases.
2018-07-13 09:02:09 -07:00
f22f33606a Merge pull request #1684 from ejohnstown/distcheckfix
add missing certificates to the automake include
2018-07-13 09:41:10 -06:00
ffc6cf4eb8 Add support for maximum DH key size 2018-07-13 17:36:42 +10:00
771e349925 Prime Number Testing
1. Moved a few functions around in tfm.c and integer.c.
2. Added some new ifdef clauses to tfc and integer so that the prime checking is available when using RSA, DSA, or DH.
3. Added an internal version of function wc_DhSetKey and wc_DsaImportParamsRaw that always checks to see if the prime value is prime. Modified the original function to be a wrapper.
2018-07-12 17:22:44 -07:00
0240cc7795 add missing certificates to the automake include 2018-07-12 17:06:02 -07:00
997a377310 Prime Number Testing
1. In wc_DhGenerateParams(), changed the call to mp_prime_is_prime() to
mp_prime_is_prime_ex().
2. In wc_MakeDsaParameters(), changed the call to mp_prime_is_prime() to
mp_prime_is_prime_ex().
3. Added wc_CheckProbablePrime_ex in RSA that also takes an RNG to call
mp_prime_is_prime_ex(). If RNG is NULL, call mp_prime_is_prime().
4. Rewrite wc_CheckProbablePrime() in terms of
wc_CheckProbablePrime_ex().
2018-07-12 15:00:13 -07:00
7d5da4d122 Fix typo in function name 2018-07-12 14:40:46 -07:00
0ce6cbd4c4 Added API unit test for wolfSSL_CTX_use_certificate_chain_file_format. 2018-07-12 13:22:21 -07:00
1b965491d9 Solve through settings.h instead 2018-07-12 14:09:57 -06:00
f7c5b27bfc Merge pull request #1675 from toddouska/zero-error
make SOCKET_PEER_CLOSED_E consistent between read and 2 write cases
2018-07-12 12:53:48 -07:00
cadd556b3a cast result of bitwise not back to original type to prevent compiler warnings 2018-07-12 13:46:55 -06:00
eeece1df1e Fix for duplicate declaration of EccMakeKey. 2018-07-12 12:13:10 -07:00
81d13e15d5 Added ECC and Curve25519 Key generation callback support for HAVE_PK_CALLBACKS. The TLS server side ECDHE could not correctly handle PK callback based shared secret calculation using a hardware based generated key. Refactor internal functions to use the callback ctx getter API. 2018-07-12 11:52:54 -07:00
d486df50aa fix an error where mp_copy was used instead of mp_sub_d 2018-07-12 11:03:41 -07:00
93d7891701 Added different tls version support for asio 2018-07-12 11:59:58 -06:00
d8dff3e4de Merge branch 'master' of https://github.com/wolfSSL/wolfssl into wolfASIO 2018-07-12 11:57:34 -06:00
40d0e7f711 Merge pull request #1677 from ejohnstown/gcc-arm-update
GCC-ARM README Update
2018-07-12 10:27:07 -07:00
c1af8d2190 Move function prototypes from wolfss/ssl.h and openssl/ssl.h to appropriate header files for OpenSSH compatibility 2018-07-12 08:13:51 -07:00
5908230d20 Prime Number Testing
1. Fixed variable name typo in DH for the FFDHE 8192-bit q value.
2. Updated some error strings in wolfSSL_BN_is_prime_ex().
3. Changed the calls to mp_prime_is_prime_ex() in fp_randprime() and
mp_randprime() so they go back to the 8 rounds of MR, which is more than
adequate in this situation.
2018-07-11 16:24:41 -07:00
2f638a0ae1 GCC-ARM README Update
Added directions for building wolfSSL using the gcc-arm-none-eabi tools.
2018-07-11 16:05:02 -07:00
23687f44bc Merge pull request #1643 from ejohnstown/altnames
Subject Alt Name Matching
2018-07-11 13:20:58 -07:00
d639939a07 make SOCKET_PEER_CLOSED_E consistent between read and 2 write cases 2018-07-11 13:00:29 -07:00
05cfeae3ce Fix for handling max cert chain size. It was not accounting for the 3 byte header in max size calculation. 2018-07-11 12:32:49 -07:00
eb32935081 Configure Update
1. Fix typo.
2. Change the parsing of the -D options to be more POSIX friendly.
Removed the "==" and replaced the multi escaped [] with a test command.
2018-07-11 12:01:05 -07:00
0f2b5ca181 fixes for MQX classic 4.0 with IAR-EWARM 2018-07-11 10:54:24 -06:00
df6c496c4e Merge pull request #1671 from SparkiDev/x25519_asm_fix
Fix for Curve25519 ASM
2018-07-11 09:50:57 -07:00
c1a9945656 Merge pull request #1670 from JacobBarthelmeh/UnitTests
check that fp max bits is large enough before test
2018-07-11 09:49:22 -07:00
9281f30deb Fix for Curve25519 ASM
On rare occasions, multiplication and/or squaring result had top bit set
after overflow add - must to be reduced in that case.
2018-07-11 11:53:53 +10:00
239880a9de Subject Alt Name Matching
1. Removed an external test tag from a failure test case. Ends up leaving a thread still running on exit.
2018-07-10 17:07:48 -07:00
e2dec618d8 Merge pull request #1667 from ejohnstown/certgentime
Cert Gen Time
2018-07-10 14:40:37 -07:00
0e06f6413d Prime Number Testing
1. Update the function wolfSSL_BN_is_prime_ex to use mp_prime_is_prime_ex.
2. Modified fast and normal mp_prime_is_prime_ex() to use random numbers
that are in the range 2 < a < n-2.
2018-07-10 14:30:53 -07:00
9ca5c65f33 Merge pull request #1645 from abrahamsonn/doxygen-appearance-fix
Doxygen appearance fix
2018-07-10 15:27:07 -06:00
58478c50af check that fp max bits is large enough before test 2018-07-10 15:09:47 -06:00
4cbae0bca3 changes to make jenkins tests work 2018-07-10 13:34:16 -06:00
3fc7424e03 implemented requested changes 2018-07-10 11:52:41 -06:00
d361a1aebd Merge branch 'master' of https://github.com/wolfSSL/wolfssl into wolfASIO 2018-07-10 11:04:53 -06:00
f1c3098bdc Prime Number Testing
Made modifications to the primality testing so that the Miller-Rabin tests check against up to 40 random numbers rather than a fixed list of small primes.
2018-07-09 16:33:26 -07:00
87499aa7bd Merge pull request #1668 from ejohnstown/ignore-file
Ignore File
2018-07-09 11:18:44 -07:00
376a4d3ca8 Merge pull request #1666 from dgarske/fix_always_verify
Fix for building with `WOLFSSL_ALWAYS_VERIFY_CB`
2018-07-09 11:13:28 -07:00
90cf4ad7ad Merge pull request #1648 from embhorn/pkcb
Add PK_CALLBACK support for RSA/ECC verify to ConfirmSignature
2018-07-09 11:05:48 -07:00
9c2a5d2906 Further simplification of the PK verify wrapping to avoid malloc/free. Thanks Todd! 2018-07-06 16:21:43 -07:00
ed17963f21 Add fipsv2.c to the gitignore file. 2018-07-06 16:08:16 -07:00
2e2a502683 Merge pull request #1659 from ejohnstown/configure-update
Configure Update
2018-07-06 16:08:11 -07:00
85d58cbf8c Fix for building with WOLFSSL_ALWAYS_VERIFY_CB. 2018-07-06 15:31:52 -07:00
5cc8771b43 Cert Gen Time
When generating the times for a generated certificate, calculate the
time differences based on the seconds from epoch rather then converting
back and forth between tm structures. One particular RTOS calculates the
date change when generating a certificate on the first of the month. It
leaves the certificate valid on the zeroth of the month.
2018-07-06 15:31:34 -07:00
595beb3fec Fixup for the removal of const. 2018-07-06 09:35:00 -07:00
32f1b0a9c2 Added separate context for each SignatureCtx verify callback. Added missing ssl info to callback context. 2018-07-06 09:28:46 -07:00
9bf8122af7 Merge pull request #1660 from JacobBarthelmeh/ARMv8
adjust macro guards for additional functions
2018-07-06 09:02:35 -07:00
8ba4dda8a8 Merge pull request #1663 from dgarske/lib_isolate
Cleanup old `WOLFSSL` and `WOLFSSL_CTX` references in wolfCrypt
2018-07-05 16:09:56 -07:00
80f98f7ab7 Merge pull request #1664 from JacobBarthelmeh/Testing
keep length value after call to wc_BerToDer
2018-07-05 18:05:28 -05:00
3cbcc872c1 Improved PK callback support for ConfirmSignature so certificate verification uses the callbacks. Retained wolfSSL/wolfCrypt isolation (I.E. no wolfSSL references from wolfCrypt). 2018-07-05 14:04:06 -07:00
e44cb91a3b keep length value after call to wc_BerToDer 2018-07-05 14:35:35 -06:00
0e8e3b7441 Cleanup old WOLFSSL and WOLFSSL_CTX references in wolfCrypt that are no longer required. 2018-07-05 09:58:47 -07:00
c8e118cd12 adjust macro guards for additional functions 2018-07-03 16:52:29 -06:00
af65a9520a Configure Update
Change the increment of the number of jobservers to be more posixish.
More compatible with HPUX's ksh.
2018-07-03 14:42:51 -07:00
ae54bae2fa Merge pull request #1654 from SparkiDev/tls13_stapling
TLS 1.3 OCSP Stapling
2018-07-03 12:56:28 -07:00
ad0f775911 Merge branch 'master' into wolfASIO 2018-07-03 11:14:16 -06:00
ac0b31dee8 refactored and added defines for wolfSSL/Asio Compat 2018-07-03 11:07:15 -06:00
f809a6a17b Merge pull request #1651 from dgarske/pkcs7_dynamic
Added PKCS7 dynamic allocation support
2018-07-02 16:26:03 -07:00
fbd5a4f67f Merge pull request #1650 from dgarske/fix_armv8_aes
Fix ARMv8 AES code build error
2018-07-02 16:23:32 -07:00
77f11a6be9 Merge pull request #1649 from embhorn/zd4043
Fix for memory leak in wolfSSL_BN_hex2bn
2018-07-02 16:22:57 -07:00
9f35d211e0 Merge pull request #1644 from JacobBarthelmeh/Compatibility-Layer
add ca when getting chain from x509 store
2018-07-02 16:22:11 -07:00
e17a16a45a Merge pull request #1600 from dgarske/lighttpd
Changes to support Lighttpd 1.4.49
2018-07-02 16:18:41 -07:00
df9ed87c5f Merge pull request #1652 from ejohnstown/dhtestleak
Fixed a memory leak in the wolfCrypt test for DH key generation.
2018-07-02 17:05:22 -06:00
52d9803d72 Merge pull request #1657 from JacobBarthelmeh/Testing
casts for tls 1.3 windows warnings
2018-07-03 08:25:01 +10:00
adb3cc5a5a Subject Alt Name Matching
1. Added certificates for localhost where the CN and SAN match and differ.
2. Change subject name matching so the CN is checked if the SAN list doesn't exit, and only check the SAN list if present.
3. Added a test case for the CN/SAN mismatch.
4. Old matching behavior restored with build option WOLFSSL_ALLOW_NO_CN_IN_SAN.
5. Add test case for a correct certificate.

Note: The test for the garbage certificate should fail. If you enable the old behavior, that test case will start succeeding, causing the test to fail.
2018-07-02 13:39:11 -07:00
cf191a4d96 Fixed a memory leak in the wolfCrypt test for DH key generation. 2018-07-02 13:31:13 -07:00
201217bd97 casts for tls 1.3 windows warnings 2018-07-02 13:55:38 -06:00
2bd4fb110c Fix additional cases for use of unititlized PKCS isDynmaic in unit test. 2018-07-02 10:24:41 -07:00
e319987579 Added wolfSSl compatability for Asio C++ library 2018-07-02 10:48:02 -06:00
fb3d3dce0e Fix for use of unititlized PKCS7.isDynamic case in unit test. Added return code checks for wc_PKCS7_Init. 2018-07-02 09:38:14 -07:00
a9ff79e321 check return value 2018-07-02 10:10:30 -06:00
0bf3a89992 TLS 1.3 OCSP Stapling
Introduce support for OCSP stapling in TLS 1.3.
Note: OCSP Stapling v2 is not used in TLS 1.3.
Added tests.
Allow extensions to be sent with first certificate.
Fix writing out of certificate chains in TLS 1.3.
Tidy up the OCSP stapling code to remove duplication as much as
possible.
2018-07-02 16:59:23 +10:00
3adbb07abe Comment correction. 2018-06-29 15:07:56 -07:00
733cb74ea8 Updated all PKCS7 XMALLOC/XFREE to use heap pointer (even small stack). 2018-06-29 15:05:37 -07:00
07401d909c Added support for dynamic allocation of PKCS7 structure using wc_PKCS7_New and wc_PKCS7_Free. Updated the test examples to use the dynamic method. Add API unit test for wc_PKCS7_New. 2018-06-29 15:04:28 -07:00
33b72a3dfe Merge pull request #1647 from ejohnstown/akid-not-crit
Add error case for critical Auth Key ID extension
2018-06-29 10:41:04 -07:00
44c4e33290 Fix ARMv8 AES code to use the shared aes.h CTR_SZ and GCM_NONCE_MID_SZ. 2018-06-29 10:22:25 -07:00
ebb3eb87d1 Update from review 2018-06-29 11:02:10 -05:00
42ece70ff2 Merge pull request #1635 from ejohnstown/rpm-fixes
RPM Fixes
2018-06-29 09:44:11 -06:00
c6890d518e Fix resource leak in wolfSSL_BN_hex2bn 2018-06-29 09:44:01 -05:00
54f2c3fe18 Merge pull request #1646 from dgarske/stm32l4_iar
Added support for the STM32L4 and fixed mixed enum warnings
2018-06-28 15:34:33 -07:00
b4da4340a1 Merge pull request #1640 from SparkiDev/tls13_nb
Fix non-blocking and buffered I/O
2018-06-28 15:32:42 -07:00
ea32f2dbef Merge pull request #1638 from SparkiDev/nginx-ocsp
Fix support for OCSP and Nginx
2018-06-28 15:31:18 -07:00
e204b19923 add statusCb variable to OPENSSL_EXTRA build 2018-06-28 14:36:15 -06:00
6fa92fdd71 Add error case for critical Auth Key ID extension 2018-06-28 13:03:16 -07:00
cd2971fb93 Abstracted code for setting options mask to improve wolfSSL_CTX_set_options, so it doesn't require allocating a WOLFSSL object. 2018-06-27 21:30:25 -07:00
6dbca2b718 Fix to resolve the increased stack by allocating the temp ssl from the heap. 2018-06-27 19:44:34 -07:00
66c2c65444 Changes to support Lighttpd 1.4.49:
* Fix for `wolfSSL_CTX_set_options` to work correctly when no certificate has been set for WOLFSSL_CTX, otherwise this operation fails with `Server missing certificate`.
* Fix for bad argument name `time`.
* Fix for `warning: type of bit-field`: Allowed types for bit-fields are int and unsigned int only.
* Exposed `ERR_remove_thread_state` and `SSL_CTX_set_tmp_ecdh` for lighttpd
* Renamed `WOLFSSL_ERR_remove_thread_state` to `wolfSSL_ERR_remove_thread_state` and setup old name macro.
* Add missing newline on asn1.h.
* Whitespace cleanup in ssl.c.
2018-06-27 19:44:34 -07:00
7ae9e4359d Added support for the STM32L4 with AES/SHA hardware acceleration. Fixed a few minor compiler warnings with mis-matched enum types. 2018-06-27 19:40:03 -07:00
abaa5daf43 Fix non-blocking and buffered I/O
Fix states in TLS 1.3 connect and accept to be monotonically increasing
by 1.
Always have a new state after a buffer is constructed to be sent.
Add non-blocking support into TLS benchmark and support TLS 1.3.
2018-06-28 08:49:32 +10:00
7fbe1d3049 Fix support for OCSP and Nginx
Store DER copy of CA certificate with signer when
WOLFSSL_SIGNER_DER_CERT is defined.
Keep the bad issuer error for later when compiling for OpenSSL
compatability.
Authority Info string needs to be passed back with a nul terminator.
2018-06-28 08:48:06 +10:00
f32bd77a1d Updating appearance
In the past, Doxygen just listed API for wolfSSL and wolfCrypt in one long list.
Now there are two separate pages for the wolfSSL and wolfCrypt API references.
2018-06-27 16:29:37 -06:00
765d97ae01 1. Trailing whitespace removal 2018-06-27 16:22:12 -06:00
af75145602 adjust macro guards 2018-06-27 16:13:46 -06:00
ac3eb470f9 Merge pull request #1642 from ejohnstown/conner-doc-update
Doxy Update
2018-06-27 14:37:52 -06:00
c2c209fb89 add ca when getting chain from x509 store 2018-06-27 14:09:32 -06:00
47497f5aaa Removed stray merge failure marker debris. 2018-06-27 10:40:03 -07:00
554275ba71 documentation fix, changes made to x509_print for wolfCLU 2018-06-27 10:29:18 -07:00
13b7dad0fa documentation clean up, added check for asn generalized time 2018-06-27 10:22:47 -07:00
5d767aa004 Merge pull request #1641 from ejohnstown/rename-inline
Rename INLINE
2018-06-27 09:34:41 -07:00
0c74e778dc Merge pull request #1633 from dgarske/bench_3072
Benchmark support for 3072-bit RSA and DH
2018-06-27 07:17:53 -07:00
3572b26bd9 Merge pull request #1636 from JacobBarthelmeh/Testing
add options for OCSP test and combine certs
2018-06-26 22:46:11 -07:00
1b2876679b Merge pull request #1631 from ejohnstown/wolfio-select
wolfIO Select Update
2018-06-26 19:27:20 -07:00
f031a6fc67 check on variable for printout 2018-06-26 17:03:04 -06:00
586874b997 Rename INLINE
1. Renamed the macro INLINE as WC_INLINE.
2. For FIPS and the "selftest" build, define INLINE as WC_INLINE. Allows the FIPS code to work unchanged.
2018-06-26 15:17:46 -07:00
d8086ded6a Merge pull request #1639 from ejohnstown/selftest-fixes
netbsd-selftest fix
2018-06-26 15:38:03 -06:00
d9b5948947 Merge pull request #1605 from dgarske/asyncfsanitize
Fixes for async to resolve runtime fsanitize issues
2018-06-26 14:27:07 -07:00
4151af4b4a A few new functions in AES-GCM and DH don't exist in the netbsd-selftest build of wolfSSL. Option them out of the wolfCrypt self-test. 2018-06-25 17:49:11 -07:00
a7d761c336 Merge pull request #1424 from ejohnstown/fipsv2
FIPSv2
2018-06-25 09:58:48 -07:00
8c9e0cd427 add options for OCSP test and combine certs 2018-06-22 15:58:27 -06:00
d13dfa309e RPM Fixes
1. Fixed a few parsing checks in the dates in the RPM changelog.
2. Moved some file names between sections in the include.am and spec.in files.
3. Added the match-start-of-line to the regex for finding the -D items for the options file.
2018-06-22 11:55:09 -07:00
9d7bcf8ec7 wolfIO Select Update
1. In wolfIO_Select(), separate out the fd lists into separate read and write lists.
2. Check the read and write fds lists to see if the connect() succeeded or failed.
3. Windows doesn't use the nfds parameter to Select. Initialize it to zero and reset it to the right value when building for not-Windows.
4. Remove the warning disable for Windows.

GCC 8.1 checks that "restrict" pointer parameters don't point to the same thing and will error if they do.
2018-06-22 10:49:57 -07:00
e6c7952f50 Merge master into fipsv2. Resolved a conflict in api.c. 2018-06-22 09:52:26 -07:00
ed1c56a4fc Benchmark support for 3072-bit RSA and DH when USE_CERT_BUFFERS_3072 is defined. 2018-06-22 09:30:33 -07:00
522f365279 Fix one more issue with PKCS7 and async, which is not supported. 2018-06-22 09:30:25 -07:00
1cb5bbf8ea Fixes for some async issues. Fixes an async issue with BuildMessage. Fixes for PKCS7 tests to not use async since it is not supported. 2018-06-22 09:30:25 -07:00
71606dde45 Fixes for a few wolfCrypt test memory leaks. Fix for HMAC with empty input not supported on QuickAssist. 2018-06-22 09:30:25 -07:00
ec132cd3f4 Fix fsanitize issue for mp_rand. 2018-06-22 09:30:25 -07:00
623f1b58ac Fix for min IV size check. Cleanup of the max IV to use new enum MAX_IV_SZ. 2018-06-22 09:30:25 -07:00
64ba151c35 Experimental fixes for async to resolve runtime fsanitize issues with invalid memory access due to attempting realloc on non NUMA type. Tested with ./configure --with-intelqa=../QAT1.6 --enable-asynccrypt CC="clang -fsanitize=address" --enable-debug --disable-shared --enable-trackmemory CFLAGS="-DWOLFSSL_DEBUG_MEMORY -DWOLFSSL_DEBUG_MEMORY_PRINT" && make and sudo ./tests/unit.test. 2018-06-22 09:30:25 -07:00
1179969dcf Merge pull request #1630 from embhorn/zd3963
Add support for C99 tools without strings.h and add option to disable C99
2018-06-21 18:00:23 -07:00
8e78623123 Merge pull request #1632 from JacobBarthelmeh/Release
prepare for release v3.15.3
2018-06-21 15:37:32 -07:00
8fd18e06f7 prepare for release v3.15.3 2018-06-21 12:22:27 -06:00
518c987c61 update CA for ocsp test 2018-06-21 12:13:33 -06:00
9d86d323ef Merge pull request #1628 from JacobBarthelmeh/Fuzzer
sanity check on hashing size
2018-06-20 17:46:38 -07:00
bf63003237 sanity check before reading word16 from buffer 2018-06-20 16:48:40 -06:00
2f43d5eece update size to be used with fuzzing 2018-06-20 15:29:05 -06:00
0dc9a19835 Remove check to include strings.h 2018-06-20 10:40:03 -05:00
777c89a257 sanity check on pointer 2018-06-20 09:37:36 -06:00
61655ef56d comment on sz value and sanity check before fuzzing 2018-06-20 09:21:56 -06:00
83324f39d7 update IO callback function names with CSharp wrapper 2018-06-20 09:10:19 -06:00
07810eb21e Merge branch 'master' into zd3963 2018-06-20 10:05:20 -05:00
6d3237a0b4 Add support for C99 tools withoutstrings.h and add option to disable C99 checking. 2018-06-20 09:49:33 -05:00
c1362cca60 Merge pull request #1629 from JacobBarthelmeh/Certs
disable CRL with additional cn/alt test certs
2018-06-19 14:42:21 -07:00
d481a3fb92 Merge pull request #1625 from JacobBarthelmeh/Testing
memory management with test cases
2018-06-19 14:41:18 -07:00
d8e278b6b3 revert free on sig and add comment 2018-06-18 18:15:26 -06:00
e348522353 Merge pull request #1627 from ejohnstown/pkcs7-verify
Fix PKCS7 Sign Verify
2018-06-18 15:32:18 -07:00
4e6a88caf9 Merge pull request #1626 from JacobBarthelmeh/UnitTests
fix for implicit declaration error
2018-06-18 15:30:06 -07:00
d3cd0b6b2e disable CRL with additional cn/alt test certs 2018-06-18 16:10:45 -06:00
38f916a798 sanity check on hashing size 2018-06-18 15:50:44 -06:00
2fd000532a A length value was set to zero in a situation where the existing value was needed. 2018-06-18 11:48:45 -07:00
c98aca32c4 static analysis report fixes 2018-06-15 17:00:45 -06:00
bade35bd76 update return value 2018-06-15 16:25:09 -06:00
0f9063d2a9 fix for implicit declaration error 2018-06-15 16:14:22 -06:00
a1295b3148 memory management with test cases 2018-06-15 15:43:42 -06:00
c78a552eb3 Merge pull request #1598 from JacobBarthelmeh/Nucleus
wolfCrypt only Nucleus
2018-06-15 14:23:54 -07:00
0d0aa74444 Merge pull request #1623 from dgarske/fix_atecc508a
Fixes for build with `WOLFSSL_ATECC508A` defined
2018-06-15 11:06:33 -07:00
55945acd55 Merge pull request #1622 from cconlon/cavp-selftest-fix
fix CAVP self test build with newer raw hash functions
2018-06-15 11:02:15 -07:00
b90fa909ef add warning for source of entropy 2018-06-15 11:40:05 -06:00
495e3552d2 Merge pull request #1624 from JacobBarthelmeh/Testing
move location of wolfSSL_d2i_RSA_PublicKey to fix x509 small build
2018-06-15 10:39:08 -07:00
c03c10e1d4 move location of wolfSSL_d2i_RSA_PublicKey to fix x509 small build 2018-06-14 14:38:15 -06:00
139a08a98e Merge pull request #1621 from SparkiDev/tls13_no_cs
Allow NO_WOLFSSL_CLIENT/SERVER to compile and pass tests
2018-06-14 09:08:13 -07:00
5b2bb44bc8 Fixes for build with WOLFSSL_ATECC508A defined. 2018-06-13 20:10:01 -07:00
aa01fd8adf Merge pull request #1619 from JacobBarthelmeh/HardwareAcc
RAW hash function APIs not supported with ARMv8 build
2018-06-13 16:07:53 -07:00
15348d4936 Merge pull request #1612 from dgarske/fixmatchdomainname
Fixes for `MatchDomainName` to properly detect failures
2018-06-13 13:13:52 -07:00
534114d979 For the FIPSv2 build, remove the define for FP_MAX_BITS from the CFLAGS. Default value was appropriate. 2018-06-13 09:35:42 -07:00
61056829c5 Added success test cases for domain name match (SNI) in common name and alternate name. 2018-06-13 09:26:54 -07:00
1db5d6ebd6 fix CAVP self test build with newer raw hash functions 2018-06-13 09:55:16 -06:00
a03c15e598 Allow NO_WOLFSSL_CLIENT/SERVER to compile and pass tests 2018-06-13 11:42:16 +10:00
e60262cbf1 Merge pull request #1604 from TimParrish/addAMDFunk
Update cpuid.c to optimize intelasm for performance on AMD processors
2018-06-12 16:19:33 -07:00
8fa1592542 Fix to use SHA256 for the self-signed test certificates. 2018-06-12 16:12:29 -07:00
9dc560dd01 RAW hash function APIs not supported with ARMv8 build 2018-06-12 16:45:38 -06:00
1f16b36402 Fixes for MatchDomainName to properly detect failures:
* Fix `MatchDomainName` to also check for remaining len on success check.
* Enhanced `DNS_entry` to include actual ASN.1 length and use it thoughout (was using XSTRLEN).

Added additional tests for matching on domain name:
* Check for bad common name with embedded null (CN=localhost\0h, Alt=None) - Note: Trouble creating cert with this criteria
* Check for bad alternate name with embedded null (CN=www.nomatch.com, Alt=localhost\0h)
* Check for bad common name (CN=www.nomatch.com, Alt=None)
* Check for bad alternate name (CN=www.nomatch.com, Alt=www.nomatch.com)
* Check for good wildcard common name (CN=*localhost, Alt=None)
* Check for good wildcard alternate name (CN=www.nomatch.com, Alt=*localhost)
2018-06-12 14:15:34 -07:00
9448b96afd updated change log 2018-06-12 14:15:57 -06:00
26835bef79 Updated README.md 2018-06-12 13:54:50 -06:00
1dd7f83752 Merge branch 'addAMDFunk' of https://github.com/TimParrish/wolfssl into addAMDFunk 2018-06-12 13:50:07 -06:00
af7b676405 Merge pull request #1602 from dgarske/compat_withnotls
Fixes for building with openssl compatibility enabled and no SSL/TLS
2018-06-12 12:25:32 -07:00
Tim
d043b2c559 Merge branch 'addAMDFunk' of github.com:TimParrish/wolfssl into addAMDFunk 2018-06-12 13:17:53 -06:00
Tim
d518e0b7f6 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into addAMDFunk 2018-06-12 13:16:01 -06:00
5e516cc2e0 Merge branch 'master' into fipsv2 2018-06-12 10:10:50 -07:00
53b0d2cba3 updated readme to show that AMD processors are supported 2018-06-12 10:59:42 -06:00
dac5f84f61 Fix build error with missing bio. Fix for pkey not being reset to NULL for d2i_PrivateKey failure case test. 2018-06-12 09:38:18 -07:00
292e9535ae Fix for wolfSSL_ERR_clear_error to call wc_ClearErrorNodes when its available (mismatched macros), which was incorrectly causing test_wolfSSL_ERR_put_error to fail. Added test_wolfSSL_PEM_PrivateKey test for ECC based key. Refactored the RNG test to only run the reseed test if TEST_RESEED_INTERVAL is defined. This is the test that was causing the tests/api.c to take so long to complete. Will add this macro to the enable options test. 2018-06-12 09:38:18 -07:00
9cbd2b00d4 Added test for PEM_read_bio_PrivateKey using BIO loaded using BIO_new_mem_buf. 2018-06-12 09:38:18 -07:00
e1890a4b0e Added some bad argument checks on compatibility functions BIO_new_mem_buf and PEM_read_bio_PrivateKey. 2018-06-12 09:38:18 -07:00
ad0a10441d Fixes for building with openssl compatibility enabled and no TLS client/server.
Resolves issues building with:
`./configure --enable-opensslextra --disable-rsa --disable-supportedcurves CFLAGS="-DNO_WOLFSSL_CLIENT -DNO_WOLFSSL_SERVER" --disable-examples`
`./configure --enable-opensslextra --disable-ecc --disable-supportedcurves CFLAGS="-DNO_WOLFSSL_CLIENT -DNO_WOLFSSL_SERVER" --disable-examples`

Ticket 3872
2018-06-12 09:38:18 -07:00
39f3df0778 Merge pull request #1610 from SparkiDev/ed25519_priv
Fix private-only keys and make them script generated
2018-06-12 08:34:38 -07:00
8ecb9aacd3 Merge pull request #1592 from SparkiDev/psk_test_fix
Fix test to work with configurations not including AES-GCM
2018-06-12 08:33:44 -07:00
82550b2f8c Merge pull request #1617 from dgarske/fix_arduino
Fixes for Arduino
2018-06-12 08:31:51 -07:00
cb8351c027 Merge pull request #1607 from SparkiDev/tls13_interop_ver
Return TLS 1.3 draft version in ServerHello
2018-06-12 08:30:48 -07:00
766323e90f Merge pull request #1613 from SparkiDev/tls13_post_auth
Fix post authentication for TLS 1.3
2018-06-12 08:29:38 -07:00
83ffb64cda Merge pull request #1599 from dgarske/pkcs7free
Fixes for PKCS7 error case that might leak memory
2018-06-12 08:28:19 -07:00
3b74dbf86a Merge pull request #1609 from SparkiDev/tls13_time
Don't include sys/time.h explicitly in tls13.c
2018-06-12 08:27:43 -07:00
2c8f89ae33 Merge pull request #1611 from kaleb-himes/AN_UP2
Allow for wc_SetAltNamesBuffer call with larger than 16384 bytes
2018-06-12 08:26:58 -07:00
49b82456eb Merge pull request #1618 from cconlon/opensslcompat
Align return values for EVP_DigestUpdate/Final for OpenSSL Compatibility
2018-06-12 08:25:18 -07:00
29410ada1e Merge pull request #1595 from SparkiDev/tls13_cipher_down
Fix for downgrading from TLS 1.3 due to old cipher suite
2018-06-12 08:24:26 -07:00
f2a20c4232 Merge pull request #1573 from SparkiDev/tls_pad_vfy
Constant time padding and HMAC verification in TLS
2018-06-12 08:22:32 -07:00
22ddd41b61 Merge pull request #1581 from ejohnstown/update-configure
Update configure.ac
2018-06-12 08:17:35 -07:00
b7caab938e Fix post authentication for TLS 1.3 2018-06-12 09:49:23 +10:00
7827712fcc FIPS Revalidation (acceptance fixes)
1. The Windows 10 wolfcrypt test project was missing the flag for USE_CERT_BUFFERS_256.
2. Add note to fips-check about using linuxv2 with Win10.
2018-06-11 15:27:52 -07:00
35c8ba3188 Merge pull request #1601 from SparkiDev/ecdsa_sign
Change ECDSA signing to use blinding.
2018-06-11 14:13:24 -07:00
637eaa08ba Merge pull request #1614 from SparkiDev/tls13_log_file
Remove log file and change location to local
2018-06-11 13:51:51 -07:00
a472325f89 return WOLFSSL_FAILURE on error from EVP_DigestUpdate() and EVP_DigestFinal() 2018-06-11 14:27:08 -06:00
7e5c41ca35 Fixes for some async issues in FIPSv2. 2018-06-11 12:41:15 -07:00
10070bb5fd FIPS Revalidation (acceptance fixes)
1. Backed out some changes to AES-GCM with respect PIC32 only code. (This change will not be in the FIPS boundary.)
2018-06-11 10:21:19 -07:00
74d4a02542 Remove log file and change location to local 2018-06-11 15:00:17 +10:00
cf9c352d91 Fixes for Arduino. Don't use C99 for Arduino. Enhanced the script to create as new folder in IDE/ARDUINO/wolfSSL. Updated README.md. 2018-06-08 14:27:54 -07:00
ce2f393bc7 Autoconf Update
1. Remove many redundant macros.
2. Reorder several macros to more appropriate locations.
3. Several macros take lists of items to process, not just individual items. Combined duplicated macros' parameters into lists.
4. Some macros had unnecessary parameters.
5. Added some AX_REQUIRE_DEFINED() checks for the macros used.
6. Add cyassl/options.h to the AC_CONFIG_FILES list. It will be recreated from the template when running config.status the same as wolfssl/options.h
7. Remove the dist-dir rule from Makefile.am. This is prefering the process rather than automating that one step. Make dist will not run config.status.

* AC_PROG_CC must be before any macros that will try to compile for tests.
* AC_CHECK_SIZEOF takes a single type, no size values.
* Only one of the AC_CANONICAL_X macros are expanded. Removed AC_CANONICAL_BUILD since it is never actually used.
* Removed the AC_PROG_CXX and anything C++ related.
* Removed LT_LANG([C]) as it is the default and the C doesn't do anything.
2018-06-08 10:47:14 -07:00
df6fe0b07c FIPS Revalidation (acceptance fixes)
1. Update the fips-check script to pull the FIPSv2 code from the main repositories.
2. Script cleanup.
3. Disable the api.test check of wc_ecc_mulmod() when WOLFSSL_VALIDATE_ECC_IMPORT is enabled.
2018-06-08 10:36:28 -07:00
e99fc3026d Fixed issue with MatchDomainName. Fixes issue #1606. This is a valid and confirmed bug report in v3.15.0. Applies to ./configure --enable-sni case with wolfSSL_CTX_UseSNI where common name has wildcards. Pushing fix for visibility now and will add test case. 2018-06-08 10:09:53 -07:00
1123beb2d2 Allow for wc_SetAltNamesBuffer call with larger than 16384 buffers at user discretion 2018-06-08 10:16:40 -06:00
bea0e6142a Merge pull request #1608 from dgarske/maxcerfix
Resolves issue with reassembling large certificates
2018-06-08 08:25:14 -07:00
5547a7b4bd Fix private-only keys and make them script generated 2018-06-08 17:38:11 +10:00
587f4ae79e Don't include sys/time.h explicitly in tls13.c 2018-06-08 09:00:12 +10:00
00ddeb07d8 Resolves issue with reassembling large certificates. The ProcessPeerCerts function was using the wrong max size check for certs. Built and test with ./configure CFLAGS="-DMAX_CERTIFICATE_SZ=20000". 2018-06-07 15:56:37 -07:00
391d1953fa FIPS Revalidation (acceptance fixes)
1. Add a couple of missing options to user_settings.h for Win10 and configure.ac.
2. Clear the execute flag from the ecc.h.
2018-06-07 10:57:46 -07:00
c6e2585fbc added check for AMD processor to asm.c 2018-06-07 10:35:54 -06:00
020b69aba0 Return TLS 1.3 draft version in ServerHello 2018-06-07 22:01:42 +10:00
234228e5af FIPS Revalidation (acceptance fixes)
1. Fixed some whitespace in api.c.
2018-06-06 17:50:55 -07:00
e673cdf2d2 Merge pull request #1594 from kojo1/openSSL-Compat-CRL-STORE
FILE* to XFILE
2018-06-06 16:34:59 -07:00
596cedc226 Merge pull request #1603 from ejohnstown/add-changelog
Add ChangeLog
2018-06-06 16:32:18 -07:00
Tim
59067825fc Update cpuid.c to optimize intelasm for performance 2018-06-06 16:44:46 -06:00
a6dd93aa2e Removed replaced the last two references to "CYASSL" macros with "WOLFSSL" in the example server. 2018-06-06 13:14:06 -07:00
7e9a32fffd FIPS Revalidation
Merge branch 'master' into fipsv2. Using a merge instead of a rebase to retain commit IDs and tags.
2018-06-06 12:43:15 -07:00
e9d9e7c37c replaced NEWS.md in Makefile.am with ChangeLog.md 2018-06-06 10:56:24 -07:00
9b9568d500 Change ECDSA signing to use blinding. 2018-06-06 11:52:04 +10:00
1c17f55ee4 updated the readme/changelog with the correct release date 2018-06-05 16:10:08 -07:00
0c966d7700 Update ChangeLog and NEWS
While the GNU coding standard states that the NEWS file should be a list of the high level changes and the ChangeLog should be every change in detail, our public source repository contains the detailed log of all changes and the name "ChangeLog" makes more sense to me than "NEWS".  Instead of keeping two copies of the README, one in plain text and one in MarkDown, only keeping the MarkDown copy. It displays better in the source repository, it is still plain text, and we aren't keeping two separate copies of the files.
2018-06-05 16:07:53 -07:00
ab319ae599 Fixed a couple of places in PKCS7 error cases where key free (wc_FreeRsaKey or wc_ecc_free) might not be called. 2018-06-05 14:32:17 -07:00
b63d3173a1 update change log (#1597) 2018-06-05 12:42:43 -07:00
4ac34b74bd Fix test to work with configurations not including AES-GCM 2018-06-05 10:30:15 +10:00
ab5eeb9f79 Merge pull request #1596 from dgarske/leakfixes
Fix for possible leak with normal math and ECC verify fail for R and S
2018-06-04 13:30:09 -07:00
5eca844e01 Fix for possible leak with normal math and verify fail for R and S in ECC verify. 2018-06-04 11:05:14 -07:00
fcd2234841 Fix for downgrading from TLS 1.3 due to old cipher suite
TLS 1.3 specification doesn't allow downgrading based on cipher suite.
2018-06-04 12:42:41 +10:00
caf88c81c2 Merge pull request #1593 from ejohnstown/fix-cert-includes
Fix Cert Includes
2018-06-01 11:32:18 -07:00
f1588e0ad9 Fix Cert Includes
1. Added files that were missing from the certs directory include.am files.
2. Fixed the duplicate items in the certs directory's include.am files.
3. Reorganized the certs directory include.am files to be a tree.
2018-05-31 17:38:47 -07:00
3ff8c45aa8 FILE to XFILE 2018-06-01 09:30:20 +09:00
1cc6042f01 exlude unneeded files with Nucleus build 2018-05-31 15:27:37 -06:00
0c2199084e single threaded wolfcrypt only Nucleus port 2018-05-31 15:04:44 -06:00
70b3ba1c04 Merge pull request #1591 from ejohnstown/release-3.15.0
Release v3.15.0 Preparation
2018-05-31 12:07:43 -07:00
c43a84547a Merge pull request #1572 from dgarske/cryptodev
Added crypto device framework
2018-05-31 10:28:58 -07:00
dfca1beff0 Touch the version number on the library filename in the rpm spec. 2018-05-31 10:20:18 -07:00
8a61b7303a Remove execute bit from a few files. 2018-05-31 10:14:47 -07:00
a4e6cfd3ac Added new file NEWS.md to Makefile for dist builds. 2018-05-31 10:12:34 -07:00
6a2c30e593 Release v3.15.0
1. Update configure.ac for new version.
2. Update the version header.
3. Update the README files with the new changelog.
4. Moved all previous change logs from README files to NEWS files.
2018-05-30 20:00:09 -07:00
bca29395a3 Merge pull request #1590 from JacobBarthelmeh/Compatibility-Layer
add NO_OLD_SHA_NAMES macro and add back SHA512, SHA384
2018-05-30 19:56:17 -07:00
5849e9f1a1 update macro name in test case 2018-05-30 17:42:07 -06:00
e358fc03c7 Merge pull request #1589 from quinnmiller1997/pkcs7_fix
Fixed a filename in the pkcs7.h comments
2018-05-30 16:19:50 -07:00
587484a1ef add NO_OLD_SHA_NAMES macro and add back SHA512, SHA384 2018-05-30 16:10:34 -06:00
4ecff14bd2 Fixed a filename in the pkcs7.h comments 2018-05-30 14:53:03 -06:00
33d416a060 Fix two more scan-build issues with set but not used. 2018-05-30 13:23:08 -07:00
6d84755106 Merge pull request #1587 from cconlon/cavp-selftest-fix
Fix CAVP selftest build
2018-05-30 12:57:35 -07:00
d7b560f2ab Fix for scan-build warning about value being stored and not used. Changed the wc_RsaFunction API to public. Added ability to expose wc_RsaDirect with new define WC_RSA_DIRECT. 2018-05-30 12:44:55 -07:00
999663fae1 Merge pull request #1498 from JacobBarthelmeh/Certs
update before/after dates with certificates
2018-05-30 10:09:49 -07:00
5d99079603 fix HAVE_SELFTEST build for CAVP selftest 2018-05-30 11:08:18 -06:00
fc482235b0 Improved the CryptoDev test to include example callback with context. 2018-05-30 09:11:44 -07:00
a2fdc6262d Merge pull request #1586 from ejohnstown/suite-info
Rerefactor Cipher Suite List
2018-05-30 07:54:13 -07:00
5e4c6e35cc Merge pull request #1542 from ghoso/openssl_compat201805
OpenSSL Compatibility APIs
2018-05-30 08:50:29 -06:00
b84f111d51 rebase with master branch and fix some code. 2018-05-30 17:15:07 +09:00
8cd357aa3a d2i_PKCS12_fp 2018-05-30 12:10:41 +09:00
c715bb5ade X509_check_ca 2018-05-30 12:08:27 +09:00
3f6b7c8833 Merge with openSSL-Compat-CRL-STORE on kojo1/wolfssl 2018-05-30 12:08:27 +09:00
0fb446ad36 i2c_ASN1_INTEGER 2018-05-30 12:03:58 +09:00
d7e4bbf1cf ASN1_STRING_print_ex 2018-05-30 11:56:43 +09:00
5c11e1440f ASN1_TIME_to_generalizedtime 2018-05-30 11:56:43 +09:00
b1ef0c808e Add all stubs. 2018-05-30 11:56:42 +09:00
36ced360cb Add Renesas CS+ project files. 2018-05-30 11:53:18 +09:00
5ff460bb7f OPENSSL_add_all_algorightms_noconf 2018-05-30 11:53:18 +09:00
005284a127 ASN1_GENERALIZEDTIME_free 2018-05-30 11:53:17 +09:00
24ff55b085 RAND_poll 2018-05-30 11:53:17 +09:00
fb7d74c197 FinalRaw parameter hash may not be aligned. 2018-05-30 09:10:46 +10:00
e684156a1e Constant time padding and HMAC verification in TLS 2018-05-30 09:10:46 +10:00
1a7d208a60 add crl2.pem to renew certs script 2018-05-29 16:57:30 -06:00
b2225a0bc0 Rerefactor Cipher Suite List
1. Do not add iana_name to the struct if disabling error strings.
2. Change the IANA_NAME macro to SUITE_INFO, and build the suite info records as appropriate for the error string enablement.
2018-05-29 14:34:57 -07:00
cc58d3160f Merge pull request #1579 from C-Treff/Tenasys_Review
time 64bit, test update
2018-05-29 14:06:44 -07:00
0a35c37211 Merge pull request #1584 from SparkiDev/tls_many_nst
Allow multiple NewSessionTicket messages
2018-05-29 13:43:59 -07:00
52179eba16 Merge pull request #1583 from dgarske/nomatch
Added test for common name failure with check domain name
2018-05-29 13:30:42 -07:00
2cf853d1f1 Merge pull request #1582 from SparkiDev/tls13_only
Allow TLS 1.2 to be compiled out.
2018-05-29 13:26:54 -07:00
92dd231c27 Merge pull request #1585 from SparkiDev/new_compiler
New compilers
2018-05-29 12:25:56 -07:00
16738f1449 Merge pull request #1569 from kojo1/openSSL-Compat-CRL-STORE
openSSL compatibility APIs: X509_CRL, STORE
2018-05-29 09:47:22 -06:00
f871bafe3a Fix uninitialized 2018-05-29 11:06:26 +10:00
68666101b7 Fix for g++ 7.3 - macro strings in asm 2018-05-29 09:25:38 +10:00
1d8fb7be82 Allow multiple NewSessionTicket messages
Interopability testing with OpenSSL
2018-05-28 09:18:26 +10:00
c60b60c50c #if condition to refer wc_PKCS12_new, wc_d2i_PKCS12 2018-05-26 16:02:51 +09:00
ba03f6e08b wolfSSL_d2i_PKCS12_fp 2018-05-26 13:04:06 +09:00
3939eadf9c get derLen by RsaPublicKeyDerSize 2018-05-26 10:55:17 +09:00
af471a360d Merge pull request #1574 from cariepointer/test/wolfcrypt
Add unit test for wc_SignatureGetSize
2018-05-25 11:29:58 -06:00
12dc346058 Change return value to 0 for null key when HAVE_USER_RSA is defined 2018-05-25 09:25:25 -06:00
ba8e441e53 Allow TLS 1.2 to be compiled out. 2018-05-25 11:00:00 +10:00
65014248f9 Fix typos, update ret for if HAVE_USER_RSA defined 2018-05-24 16:32:27 -06:00
a5c2e8b912 Added test for common name with invalid domain fails as expected when set with wolfSSL_check_domain_name. 2018-05-24 14:39:35 -07:00
453daee965 Merge pull request #1523 from SparkiDev/ed25519_key
Allow Ed25519 private-only keys to work in TLS
2018-05-24 09:56:17 -07:00
87f9d0f141 Merge pull request #1566 from ejohnstown/tcp-timeout
Fix TCP with Timeout
2018-05-24 09:07:50 -07:00
5d693b263d removed more tabs 2018-05-24 09:56:54 +02:00
06e9354629 removed tabs 2018-05-24 09:48:18 +02:00
1d281ce515 replace memset by XMEMSET
replaced memset with XMEMSET as requested by @dgarske

INtime project files cleanup
2018-05-24 09:35:46 +02:00
005a0d4dff Define devId if RSA is enabled 2018-05-23 20:17:11 -06:00
d38a0039ed Merge pull request #1549 from JacobBarthelmeh/Cert-Report1
fix for relative URI detection
2018-05-23 17:05:35 -07:00
e4e0dfe9d3 Merge pull request #1564 from JacobBarthelmeh/PKCS12
Pkcs12
2018-05-23 16:59:13 -07:00
6f221ff75c Fix possible leak in PKCS for failure case with small stack enabled. 2018-05-23 16:21:49 -07:00
0315b378f5 Fix TCP with Timeout
Updated example client and server to use the new wolfSSL_dtls_set_using_nonblock() function.
2018-05-23 16:07:45 -07:00
6a00bfc9f7 Merge pull request #1580 from JacobBarthelmeh/Testing
check on cipher suites for AEAD
2018-05-23 17:02:01 -06:00
450741f8ef Change checks for message chaching to happen once
Add compile option to remove Ed25119 client auth in TLS 1.2.
Cipher suite choice does not affect client auth.
2018-05-24 08:43:28 +10:00
982119b495 Only cache messages when required. 2018-05-24 08:43:28 +10:00
9358edf5dd Fixes from code review
Include new private key files in release.
Set messages field to NULL after free.
2018-05-24 08:43:28 +10:00
58f523beba Allow Ed25519 private-only keys to work in TLS
Change Ed25519 in TLS 1.2 to keep a copy of all the messages for
certificate verification - interop with OpenSSL.
2018-05-24 08:43:28 +10:00
4eeb9c8c56 Merge branch 'master' into test/wolfcrypt 2018-05-23 16:35:10 -06:00
72d168028e Fixes to better handle PKCS7 error cases. 2018-05-23 15:29:33 -07:00
9a75e5cf68 Fixes in PKCS7 for handling hardware based devId and no private key. Fix to handle scenario where kari->decoded is allocated, but not initalized (was causing use of unitliaized in FreeDecodedCert). Fix to handle hardware base RSA key size. 2018-05-23 14:48:10 -07:00
555efe0345 Merge pull request #1577 from TimParrish/firstUnitTest
First unit test
2018-05-23 15:24:56 -06:00
a18f220a5a Remove trailing whitespaces 2018-05-23 14:39:36 -06:00
8bd41629ae Split wc_SignatureGetSize test into wc_SignatureGetSize_ecc and wc_SignatureGetSize_rsa tests 2018-05-23 14:26:35 -06:00
9021091896 update comments 2018-05-23 14:04:41 -06:00
690f98fb0f Merge pull request #1578 from SparkiDev/test_cov
Improve coverage
2018-05-23 12:51:37 -06:00
b1ed852f36 Fix TCP with Timeout
wolfSSL remains agnostic to network socket behavior be it blocking or non-blocking. The non-blocking flag was meant for the default EmbedRecvFrom() callback for use with UDP to assist the timing of the handshake.

1. Deprecate wolfSSL_set_using_nonblock() and wolfSSL_get_using_nonblock() for use with TLS sockets. They become don't-cares when used with TLS sessions.
2. Added functions wolfSSL_dtls_set_using_nonblock() and wolfSSL_dtls_get_using_nonblock().
3. Removed a test case from EmbedReceive() that only applied to UDP.
4. Removed the checks for non-blocking sockets from EmbedReceive().
5. Socket timeouts only apply to DTLS sessions.
2018-05-23 11:29:16 -07:00
89fbb1b40d only compile SEQ increment function in case of DTLS or HAVE_AEAD 2018-05-23 12:07:35 -06:00
Tim
4fd85853c5 I think I now understand the trailing white space... 2018-05-23 11:57:12 -06:00
29d9759aa0 check on cipher suites for AEAD 2018-05-23 11:53:33 -06:00
cd9f86d921 time 64bit, test update
64bit settings for time is mandatory for INtime. Changed the project file.

Test for ecc_test_buffers was unreliable, as the structs were not initialized befor usage.
2018-05-23 10:33:56 +02:00
3bb4949e02 Improve coverage
Renumber errors in test.c to be unique.
Fix stack usage to work in --enable-distro --enable-stacksize builds.
2018-05-23 16:24:23 +10:00
Tim
124f45d449 re-upload 2018-05-22 17:45:04 -06:00
Tim
83e67a4197 additional changes made 2018-05-22 17:25:22 -06:00
438f8da11f Merge pull request #1559 from ejohnstown/update-ar
Hush ar warning
2018-05-22 17:22:48 -06:00
Tim
58ac951471 Changes made- Thank you 2018-05-22 16:00:40 -06:00
abf93c9c2c Merge pull request #1575 from quinnmiller1997/Unit_Test
Added unit test for Blake2
2018-05-22 14:22:05 -06:00
Tim
b308fa9a39 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into firstUnitTest 2018-05-22 13:26:45 -06:00
6321008ef4 Modify wc_SignatureGetSize test for ECC and RSA specific API 2018-05-22 13:24:36 -06:00
Tim
d6809c029d First unit test 2018-05-22 13:21:37 -06:00
f2ce8dcbca Added unit test for Blake2 2018-05-22 10:47:44 -06:00
df24bc6096 Update unit test 2018-05-22 09:22:01 -06:00
6cc84d2301 Add initial test_wc_SignatureGetSize() method 2018-05-21 17:11:21 -06:00
be9ae9a3c4 Merge pull request #1570 from MJSPollard/MikePollardBranch
added Poly1305SetKey Unit Test
2018-05-21 16:35:15 -06:00
85511067e4 Added crypto device framework to handle PK RSA/ECC operations using callbacks. Adds new build option ./configure --enable-cryptodev or #define WOLF_CRYPTO_DEV. Added devId support to PKCS7. 2018-05-21 14:31:08 -07:00
1b9cff1c5d Hush ar warning
At some point, ar on Ubuntu started throwing the following warning:

    ar: `u' modifier ignored since `D' is the default (see `U')

Add the "U" option to the ar flags if the version of ar supports it.
(The version used by macOS does not support the flag, for example.) The
AR_FLAGS set in configure will later be used by libtool.
2018-05-21 13:49:20 -07:00
2021bcb188 Merge pull request #1560 from dgarske/ciphernamecleanup
Refactor of the cipher suite names to use single array
2018-05-21 14:24:53 -06:00
e7de654b61 Merge pull request #1558 from dgarske/fsanitize
Fixes for fsanitize reports
2018-05-21 14:18:07 -06:00
2d88e2efe7 Merge pull request #1567 from SparkiDev/intel_64_align
ForceZero - align 64-bit access on Intel 64-bit
2018-05-21 14:16:36 -06:00
fb247a5d8d added null check for key 2018-05-21 13:59:15 -06:00
6e13bfcfce Merge pull request #1571 from aaronjense/unit-test-curve25519
Added unit-test for wc_curve25519_init and wc_curve25519_free
2018-05-21 13:42:11 -06:00
2b49f69f1b updated unit test 2018-05-21 12:44:59 -06:00
f214dbc3dd Removed unneeded call on test_wc_curve25519_init 2018-05-21 11:50:52 -06:00
8197d9ec36 Added unit-test for wc_curve25519_init and wc_curve25519_free in tests/api.c 2018-05-21 10:59:02 -06:00
f447fe22b0 added Poly1305SetKey Unit Test 2018-05-21 10:55:56 -06:00
3a27d85c4e Use sizeof instead of constant value 2018-05-21 21:26:25 +10:00
22078d6811 wc_Sha512 type 2018-05-20 15:50:16 +09:00
da8452ab29 Removed redundant #defines 2018-05-20 14:29:40 +09:00
d347f5ca77 #define SHA384/512 WC_SHA384/512 -> wolfSSL_SHA384/512 2018-05-20 13:55:47 +09:00
d10f0911a4 sHA384, SHA512 conflict with openSSL 2018-05-20 13:55:47 +09:00
874022d938 fix #if conditions and others 2018-05-20 13:55:47 +09:00
153bcb5297 d2i_X509_fp 2018-05-20 13:55:47 +09:00
460becf739 SHA256, SHA384, SHA512 2018-05-20 13:55:47 +09:00
c275dfc5ab X509_STORE_add_crl 2018-05-20 13:55:46 +09:00
4efe8740ad Eliminate d2i_RSAPublicKey test when HAVE_FAST_RSA is enabled 2018-05-20 13:55:46 +09:00
98ef7f43e1 use wolfSSL_X509_CRL_free instead of XFREE 2018-05-20 13:55:46 +09:00
c26bcdd199 Enable RSA_LoadDer with HAVE_FAST_RSA 2018-05-20 13:55:45 +09:00
03d68812a9 Fix #if condition for test 2018-05-20 13:55:45 +09:00
ad71f44f3c suppress i2d_RSAPublicKey with HAVE_FAST_RSA 2018-05-20 13:55:45 +09:00
6cef2e5d31 memory leak in d2i_X509_CRL 2018-05-20 13:55:45 +09:00
76686c9e20 fix error return, i2d_RSAPublicKey 2018-05-20 13:55:44 +09:00
6580a1fefa enable SetBitString, SetASNInt, SetASNIntMP with OPENSSL_EXTRA 2018-05-20 13:55:44 +09:00
5d4c0c582e skip d2i_X509_CRL_fp test. Done locally. 2018-05-20 13:55:44 +09:00
2e4884b6f9 PEM_read_X509_CRL only with HAVE_CRL 2018-05-20 13:55:44 +09:00
f56fd5db00 eliminate dupricated func prototypes 2018-05-20 13:55:44 +09:00
138f9f8f66 add wc_RsaKeyToPublicDer in asn.c when OPENSSL_EXTRA, fix wolfSSL_i2d_RSAPublicKey 2018-05-20 13:55:43 +09:00
03846b2d2d d2i_RSAPublicKey, d2i_X509_CRL, d2i_X509_CRL_fp, X509_CRL_free, PEM_read_X509_CRL 2018-05-20 13:55:43 +09:00
6e697c21d9 Fix the include.am to include aes_asm.S with the correct filename. 2018-05-18 15:02:43 -07:00
cf70b1a013 Revert ForceZero changes in favor of PR #1567. 2018-05-18 05:29:09 -07:00
dd0489db8c 1. Added the pair-wise consistency test to the RSA Key Gen.
2. Modified an RSA key size test case so it didn't try to make a key that was too big.
2018-05-17 17:41:34 -07:00
d63da10c96 ForceZero - align 64-bit access on Intel 64-bit
Test added to ensure ForceZero works.
2018-05-18 10:38:21 +10:00
f67046f485 better bounds checking 2018-05-17 16:55:59 -06:00
d8c33c5551 Fix TCP with Timeout
1. Take out DTLS support from EmbedReceive(). DTLS uses EmbedReceiveFrom().
2. Modify EmbedReceive() to return TIMEOUT if the session is set to blocking mode.
2018-05-17 15:53:38 -07:00
096456f466 Merge pull request #1565 from embhorn/zd3883
wolfSSL_HMAC_Final parameter len should be optional
2018-05-17 13:19:19 -07:00
b973d6e8b1 Fix to handle NO_ERROR_STRINGS case in unit test. The IANA names are disabled when NO_ERROR_STRINGS is defined. 2018-05-17 10:24:02 -07:00
b6a92a97ce convert to byte to fix warning 2018-05-17 08:55:07 -06:00
5cbb9e8341 wolfSSL_HMAC_Final parameter len should be optional 2018-05-17 08:53:21 -05:00
e1745428ac add set short int helper function 2018-05-16 20:16:40 -06:00
8163225180 Refactor of the cipher suite names to use single array, which contains internal name, IANA name and cipher suite bytes. 2018-05-16 15:29:27 -07:00
dad574edb8 Fix to use proper type (size_t) for alignment check. 2018-05-16 14:34:16 -07:00
52b66edf72 Fixes for a few more fsanitize issues. Added alignment for ForceZero. Added word32 aligned acceleration for ForceZeero. Added 'NO_ALIGNED_FORCEZERO' define to allow disabling aligned ForceZero acceleration. We cast the 24 left-shifts to word32 because compiler assumes signed int type, and a runtime value with MSB set results into runtime fsanitize error. 2018-05-16 13:27:13 -07:00
4dacd31ea4 Force to zero the buffer used to generate the DH private key. 2018-05-16 15:47:13 -04:00
6a31f103aa Test Fixes
1. When building on VS, it didn't like using a variable for an array size. Fixed it so it was a constant.
2. In dh.c, there were a few #if that should have been #ifdef.
3. Tweaked a return value in the wolfCrypt test so it was read after being set.
2018-05-16 15:47:13 -04:00
12edf80e2b FIPS Revalidation
1. ForceZero the odd block when using RDSEED to seed the DRBG.
2. When using FIPSv2 and Intel_ASM speedups, force RDSEED failure flag.
3. Annotate the ecc key pair checking code with NIST process references.
4. Add function to pair-wise check the DH key.
5. Add optional "Q" values for the FFDHE canned parameters from RFC 7919.
6. Enabled the ECC key checks by default for FIPS.
7. Added DH private key check function.
8. Enabled the DH key checks by default for FIPS.
2018-05-16 15:47:13 -04:00
ceed6e08fd FIPS Revalidation
1. Add second RNG initialization API to let caller pass in a nonce.
2018-05-16 15:47:13 -04:00
20d8a4a376 FIPS Revalidation
1. Added missing pair-wise consistency test for RSA keys.
Note: This function is not available to old FIPS and user RSA.
2018-05-16 15:47:13 -04:00
1ff4ea1ec9 Test Fixes
1. Changed the ecc_sets table for Windows builds to use arrays instead of pointers to strings.
2. Updated the initializer to play nice with the Windows and not-Windows versions of the ecc_sets table.

This is a change for FIPS mode on Windows. The ecc_sets table has pointers to constants. When the FIPS POST runs, the pointers stored in the table are relocated pointers so the verify fails.
2018-05-16 15:47:13 -04:00
6b6ed2c42f FIPS Revalidation
1. Created a new IDE project directory for WIN10.
2. Reverted the Windows IDE project files.
2018-05-16 15:47:13 -04:00
a8dbdd6c28 Test Fixes
1. Windows IDE project, clean up the preprocessor flags.
2. Add command line define to the MASM steps to set HAVE_FIPS and HAVE_FIPS_VERSION=2.
3. Disable the whole program optimization for the non-DLL builds for the file fips.c.
4. Tweaked the aes_asm.asm's code segment line to be dependant on the FIPS setting. Only place it specially for FIPSv2.
5. Reverted the Windows IDE project and copied the new setting to a WIN10 directory.
2018-05-16 15:47:13 -04:00
4d0a061acb FIPS Revalidation
1. Updated the segment tags in the aes_asm.asm file so that it is linked in order between aes.obj and des3.obj.
2018-05-16 15:47:13 -04:00
3be824ad68 Test Fixes
1. Changed the _InitHmac() function in ssl.c to have a different name.
2. Added switch in ssl.c to use _InitHmac or _HMAC_Init depending on FIPS option.
2018-05-16 15:47:13 -04:00
f7fa648f77 Test Fixes
1. Found a problem in AES-GCM encrypt where it could step on the ciphertext with the correct sized IV.
2018-05-16 15:47:13 -04:00
1538ceef47 FIPS Revalidation
1. Update the Windows project settings.
2018-05-16 15:47:13 -04:00
dde1f87de9 Test Fixes
1. The intrinsic versions of AES_GCM_encrypt and AES_GCM_decrypt needed updates for variable length tags.
2018-05-16 15:47:13 -04:00
6d4777f3ca Test Fixes
1. MSC doesn't allow for inline assembly. Restore the intrinsic version of AES_GCM_encrypt and AES_GCM_decrypt for MSC AES-NI builds. This is lacking AVX.
2018-05-16 15:47:13 -04:00
418cca5efd Test Fixes
1. Something changed in the wolfSSL layer with respect to setting some constants for old FIPS mode, didn't take into account new FIPS mode.
2018-05-16 15:47:13 -04:00
b120a27c3e FIPS Revalidation
1. Update the GenerateSeed() function for RDSEED on Windows to use the intrinsic function instead of inline assembly.
2018-05-16 15:47:13 -04:00
4f1dd3b9a7 Test Fixes
1. Update gitignore with some more VS outputs.
2. Update the Windows IDE user settings with FIPSv2 settings.
3. Remove redundant _InitHmac() function from ssl.c.
4. In wc_DhGenerateParams(), initialize the groupSz and bufSz to 0.
5. In wc_DhExportParamsRaw(), initialize pLen, qLen, and gLen to 0.
6. In wc_MakeRsaKey(), initialize isPrime to 0.
7. In ecc_test_make_pub(), initialize exportBuf and tmp to NULL and initialize the ECC key before any chance of trying to free it.
8. In fips_test.h header, update types.h include to use the wolfCrypt types rather than ctaocrypt types.
9. In fips_test.h header, change the visibility tags on all the function prototypes to use the WOLFSSL tags rather than CYASSL.
10. Change the wolfCrypt visibility tags to use CyaSSL's tags for old FIPS and the regular tags for new FIPS and non-FIPS builds.
2018-05-16 15:47:13 -04:00
eea4d6da50 Test Fixes
1. Modify RSA-PSS to be able to sign and verify SHA-384 and SHA-512 hashes with 1024-bit RSA keys.
2018-05-16 15:47:12 -04:00
dc31dbaeaf FIPS Revalidation/Test Fixes
1. Added APIs to perform RSA-PSS verify and padding operation in the same call.
2. Change to RsaPSS sign and verify to pick the proper salt length if the key is 1024-bits and the hash is SHA-512.
2018-05-16 15:47:12 -04:00
27470aa704 FIPS Revalidation/Test Fixes
1. For FIPSv2 builds, changed the FP_MAX_BITS to 6144.
2. Fixed bug in HMAC-SHA-3 where the digest size was being used instead of the block size for processing the key.
2018-05-16 15:47:12 -04:00
8fb3a0c078 FIPS Revalidation
1. Add a copy of the DSA parameter generation function to DH for use without DSA.
2018-05-16 15:47:12 -04:00
6796ab5f8c FIPS Revalidation
1. Bug fixes to AES-GCM. Separated out the internal and external IV set functions.
2018-05-16 15:47:12 -04:00
c2f964039e FIPS Revalidation
1. Updated the configure.ac to add in the RSA direct function to FIPS builds
2018-05-16 15:47:12 -04:00
6d7599cf47 FIPS Revalidation
1. Add new APIs for AES-GCM so it can manage the IV per SP 800-38D.
2. Add new APIs for AES-CCM so it can manage the IV, similar to the behavior in AES-GCM.
3. Add new APIs for GMAC that use the new AES-GCM APIs.
2018-05-16 15:47:12 -04:00
4ba026c0bf Test Fixes
1. Added error code for ECDHE FIPS KAT failure.
2018-05-16 15:47:12 -04:00
19da916102 Test Fixes
1. Removed redundant forward declaration of RsaKey from hmac.h.
2. Updated gitignore with the first and last files.
3. Updated autogen with touching the first and last files.
2018-05-16 15:47:12 -04:00
3685b7b176 Test Fixes
1. AesGcmEncrypt_ex requires the RNG, remove function if RNG disabled.
2. Fix a couple function name changes in the example server.
3. Removed the old FIPS wrapping added to dh.h, was redundant.
4. Move include of random.h in the aes.h file.
5. Fix where ecc.c was being left out of old FIPS builds.
6. Exclude the AES-GCM internal IV test case when building without the RNG.
7. Fix api test where AES-GCM Encrypt was called with a too-long IV in old FIPS mode. Non-FIPS and new FIPS are allowed longer IVs.
2018-05-16 15:47:12 -04:00
13ff245166 FIPS Revalidation
1. AES-GCM encrypt IV length allowed to be 8-bits.
2018-05-16 15:47:12 -04:00
90a5bde0f2 FIPS Revalidation
1. Update the const data and code segment tags for the Windown builds.
2018-05-16 15:47:12 -04:00
4b3933aa1b FIPS Revalidation
1. Enabled ECC Cofactor DH for the FIPSv2 build.
2. Updated the wolfCrypt HMAC-SHA-3 test to leave out the set of test cases that use the four-byte key in FIPS mode.
2018-05-16 15:47:12 -04:00
33040a25d8 FIPS Revalidation
1. Change to configure.ac to automatically enable HKDF in FIPSv2 builds.
2018-05-16 15:47:12 -04:00
d0d2527950 FIPS Revalidation
1. Change to configure.ac to automatically enable AES-CTR in FIPSv2 builds.
2. Move the aes-ni asm file into the boundary if enabled.
3. Enable AES-ECB by default.
2018-05-16 15:47:12 -04:00
4bcd7b7986 AES-GCM
1. Updated the wolfCrypt GMAC test to leave out the test case with the 15-byte tag when building for FIPS.
2. Replace tabs with spaces.
2018-05-16 15:47:12 -04:00
eb1a76bf2a FIPS Revalidation
1. Updated CMAC to allow tag length from 4 to 16 bytes, inclusive.
2018-05-16 15:47:12 -04:00
aa968eac98 FIPS Revalidation
1. Enable SHA-224 by default if building for FIPSv2.
2018-05-16 15:47:12 -04:00
fe8d46da95 FIPS Revalidation
1. Added new AES-GCM Encrypt API for FIPS where the IV is generated internally.
2. Fix the AES-NI guard flags so it can be used when FIPS enabled.
2018-05-16 15:47:12 -04:00
be61204fd7 FIPS Revalidation
1. Added CMAC to the boundary.
2. Added DHE to the boundary.
2018-05-16 15:47:12 -04:00
f6fe3744a7 FIPS Update
1. Moved the rest of the FIPS algorithms to FIPSv2.
2. Updated the fips-check and autogen scripts.
3. Updated the automake include for the crypto files.
4. Updated the example server to use the wolfSSL API and wolfSSL-based OpenSSL compatibility layer.
5. Added error code for the SHA-3 KAT.
6. Updated an test case in the API test for AES-GCM encrypt that is now considered a success case, but the FIPS mode was still treating as a failure.
2018-05-16 15:47:12 -04:00
df4d748f59 FIPS Update
1. Move SHA-224 and SHA-256 into FIPSv2.
2. Move HMAC into FIPSv2.
3. Move Hash_DRBG into FIPSv2.
2018-05-16 15:47:12 -04:00
6352208e04 FIPS Update
1. Add SHA-3 to the src/include.am so that it is always included in FIPSv2.
2. Tweak the SHA-3 header to follow the new FIPS pattern.
2018-05-16 15:47:12 -04:00
0c5d704c7f AES-CCM FIPS
1. Add new error code for the AES-CCM FIPS KAT failure.
2. When enabling FIPSv2, force enable AES-CCM.
2018-05-16 15:47:12 -04:00
d373844a18 fix sequence with pkcs12 shrouded keybag creation 2018-05-16 10:16:15 -06:00
8ff328cb39 Merge pull request #1551 from dgarske/asynccheck
Added new `async-check.sh` script
2018-05-16 08:02:11 -07:00
b5e0499022 Merge pull request #1550 from dgarske/rsaverify
Check returned size matches signature size for RSA verify in openssl compatibility
2018-05-16 08:00:31 -07:00
bbc178a704 Merge pull request #1548 from JacobBarthelmeh/Testing
fix ecc public key print with X509 print function
2018-05-16 07:59:19 -07:00
8619062ae7 Merge pull request #1522 from dgarske/mbedtls_compat
Port for using AWS FreeRTOS
2018-05-16 07:57:55 -07:00
1be8a6e4ef Merge pull request #1502 from ejohnstown/update-m4
Update M4 Autoconf Files
2018-05-16 07:57:13 -07:00
566bb4cefe version for PBE SHA1 DES oid 2018-05-16 08:38:50 -06:00
1ca62ee0a1 add error return for unsuported version 2018-05-15 22:51:11 -06:00
f021375c4b Fixes for fsanitize reports. 2018-05-15 17:23:35 -07:00
a6ad6b94d1 account for IGNORE_NAME_CONSTRAINTS when testing the parsing of a relative URI 2018-05-14 16:03:51 -06:00
63a0e872c5 add test for fail case when parsing relative URI path 2018-05-14 14:27:02 -06:00
9c33244158 Update ax_pthread.m4
The AX_PTHREAD macro has a check for side-effects of the pthread flag beyond the functions being available. It also checks for a particular macro being set when compiling the test file. When running the build through the scan-build static analysis, for some reason, the check value isn't set. The build fails. I commented the check out for now.
2018-05-11 17:39:51 -07:00
2a4d386a50 Update ax_pthread.m4
1. Updated to the most recent copy of ax_pthread.m4.
2. Removed the darwin-clang check m4.
3. Added a check to see if AX_PTHREAD added the flag `-Qunused-arguments` for clang and if so prepend `-Xcompiler` so libtool will use it. Otherwise when building on Sierra's clang you get "soft" warnings on the build of the dylib.
2018-05-11 10:21:47 -07:00
83257d662a Also check returned size matches for RSA verfiy in openssl compatability layer. 2018-05-11 17:09:07 +02:00
af9507391a Fixes and improvements for FreeRTOS AWS. Fixes for building openssl compatibility with FreeRTOS. Fixes for TLS 1.3 possibly uninitialized vars. 2018-05-11 16:40:32 +02:00
cb2f1d6d7d Added new async-check.sh script for setting up the async simulator for internal testing. 2018-05-11 16:38:24 +02:00
7a4da340d4 Merge pull request #1547 from JacobBarthelmeh/Docs
add aes init function to docs
2018-05-09 16:40:36 -07:00
110c41613f cast on return of malloc 2018-05-09 14:50:26 -06:00
d1192021a5 alter search behavior for testing if URI is a absolute path 2018-05-09 14:43:52 -06:00
c910d84507 Merge pull request #1527 from kojo1/RenesasCSPlus
Renesas CS+ projects
2018-05-09 10:07:16 -06:00
66e59e4a6a Rollback #if condition 2018-05-09 10:58:10 +09:00
bb979980ca add test case for parsing URI from certificate 2018-05-08 16:24:41 -06:00
4ee957afa3 fix for relative URI detection 2018-05-08 10:19:51 -06:00
4f0893bda5 fix ecc public key print with X509 print function 2018-05-07 14:16:27 -06:00
fd691a5795 add aes init function to docs 2018-05-07 10:24:44 -06:00
08165d5a16 Merge pull request #1540 from SparkiDev/tls13_ticket_fix
NewSessionTicket parsing error fix
2018-05-04 10:54:23 -07:00
0fec651338 Merge pull request #1539 from cconlon/toradix
expose mp_toradix() when WOLFSSL_PUBLIC_MP is defined
2018-05-04 10:49:21 -07:00
6e5258b56e Merge pull request #1538 from dgarske/fixmatchdomainnull
Fix for handling match on domain name that may have a null terminator inside
2018-05-04 10:25:28 -07:00
ecd2e75564 #ifndef FREESCALE_LTC_ECC with fe_init 2018-05-04 07:34:47 +09:00
69ce10f292 NewSessionTicket parsing error fix 2018-05-04 08:18:54 +10:00
3fd47bdff3 Fix for example client/server with -H exitWithRet option to make sure all cleanup is performed. Resolves valgrind report due to TicketCleanup() not being called. 2018-05-03 13:39:37 -07:00
bb7bcfd877 expose mp_toradix() when WOLFSSL_PUBLIC_MP is defined 2018-05-03 13:41:23 -06:00
a2fa61cd3d Merge pull request #1534 from SparkiDev/tls13_static_rsa
Fix TLS 1.3, change Client Hello version to work with static RSA (TLS 1.0 - TLS 1.2)
2018-05-03 12:38:55 -07:00
1c09c06349 Merge pull request #1533 from SparkiDev/tls13_draft26
Allow building TLS 1.3 at draft 26
2018-05-03 12:37:39 -07:00
74618d0e3c Merge pull request #1532 from SparkiDev/test_fix
Fixes for tests
2018-05-03 11:44:01 -07:00
73d85774df Merge pull request #1525 from dgarske/sockclose
Cleanup of the socket close code
2018-05-03 11:42:30 -07:00
325402cf5a Minor fix for the expected failure case use of ssl after free. Renamed skipExit to exitWithRet. 2018-05-03 10:02:59 -07:00
89a4c98670 * Added support for expected fail test cases with example client/server and suites unit test.
* Added test for certificate with bad alt name containing a null character mid byte stream.
* Fix for issue with suites unit test where last arg in file doesn't conain data for a param, causing it to skip test.
* Fix for last test in tests/test.conf not being run for `TLSv1.2 RSA 3072-bit DH 3072-bit`.
* Moved the `tls-cert-fail.test` tests into the new expected failure suite test (`./tests/test-fails.conf`). Now it explicilty checks RSA and ECC for the no signer and no sig tests.
2018-05-03 09:40:51 -07:00
d43aa37041 Fix for handling match on domain name that may have a null terminator inside. The check should match on len from ASN.1 reguardless of a null character. 2018-05-03 09:33:05 -07:00
996ee78d50 Fix Client Hello version to work with static RSA 2018-05-02 10:20:55 +10:00
d60b16c5b8 Merge pull request #1531 from kaleb-himes/FIPS-CHECK-SCRIPT
revert to default but exclude for sgx/netos
2018-05-01 15:14:00 -06:00
27c3a70e13 Allow building TLS 1.3 at draft 26 2018-05-01 15:19:18 +10:00
5845482fc0 Fixes for tests
Fix the benchmark client to set all groups supported.
Fix TLS 1.3 test script to work on PPC - check counter in separate test.
2018-05-01 14:27:38 +10:00
c5a39b9048 rever to default but exclude for sgx/netos projects 2018-04-30 15:17:58 -06:00
65eb79e5cd Merge pull request #1519 from dgarske/buildfixes
Build fixes for a few configurations
2018-04-30 11:49:16 -07:00
d53716496a Merge pull request #1521 from dgarske/tlsx_returncodes
Refactor of the TLSX code to support returning error codes
2018-04-30 11:46:41 -07:00
3ad708fb20 Merge pull request #1514 from dgarske/certdates
Enhancements and cleanup to ASN date/time
2018-04-30 11:14:38 -07:00
8311628f93 Merge pull request #1508 from kaleb-himes/FIPS-CHECK-SCRIPT
Fips check script
2018-04-30 10:50:03 -07:00
4c5982949e minor fix 2018-04-28 13:25:41 +09:00
7de23d65ce Merge pull request #1517 from dgarske/sighash
Added new signature wrapper functions to allow use of hash directly
2018-04-27 16:07:56 -07:00
6e96318785 Readme.txt 2018-04-28 06:36:56 +09:00
8ef777315a Merge pull request #1516 from dgarske/gccarm
GCC-ARM IDE example improvements
2018-04-27 14:13:45 -07:00
e69af98a7e fix warnings 2018-04-28 06:06:45 +09:00
3e9028387f test project 2018-04-28 05:46:42 +09:00
c5df9d56ad wolfssl_lib project 2018-04-28 05:39:42 +09:00
ac791610dd USE_WOLF_TIMEVAL_T 2018-04-28 05:28:49 +09:00
22a2b45108 duplicated fe_init for non-configure based IDE 2018-04-28 05:07:00 +09:00
a91ac55e24 define valiable before exec statements 2018-04-28 05:05:45 +09:00
2cc2f224f8 XTIME in LowResTimer 2018-04-28 05:03:51 +09:00
e9dd44a667 Merge pull request #1524 from abrahamsonn/master
Doxygen landing page update
2018-04-27 11:44:00 -07:00
3200040d1a Cleanup of the socket close code used for examples, CRL/OCSP and BIO. Now only a single macro is responsible for closing a socket CloseSocket and all duplicate code is eliminated. 2018-04-27 10:29:19 -07:00
9424a96289 Doxygen landing page update 2018-04-27 10:56:13 -06:00
e45f0efc3f Documentation Fixes (#1520)
* Fixed documentation errors found by check_api script
* Formatting changes so that comments/API pairs are more obvious
2018-04-27 09:50:34 -07:00
5c97374156 Fix for RSA RSS check to make sure RSA is enabled. Added TLS 1.3 DH check for key sizes. 2018-04-26 14:04:54 -07:00
ef7b40dcab Refactor of the TLSX code to support returning error codes.
* The `SANITY_MSG_E` responses in `TLSX_SupportedVersions_GetSize`, `TLSX_SupportedVersions_Write`, `TLSX_Cookie_GetSize` and `TLSX_Cookie_Write` would incorrectly be handled.
* Added build-time checks in `tls13.c` for dependencies on `HAVE_HKDF` and `WC_RSA_PSS`.
2018-04-26 11:30:57 -07:00
fe4cbb2a03 Fix for Jenkins report Expected Configurations Test - NIGHTLY BUILD #267, building ./configure --disable-asn --disable-ecc --disable-rsa --enable-psk --enable-sni. Reported unused variables, parameters and function. 2018-04-26 05:47:48 -07:00
04626c6a1f Fixes build issue using wrong DES define for WC_MAX_SYM_KEY_SIZE macro. Reproduced using ./configure --enable-leanpsk --enable-des3. Fixes issue #1518. 2018-04-26 05:35:04 -07:00
fc02003f76 Added new signature wrapper functions to allow direct use of hash wc_SignatureVerifyHash and wc_SignatureGenerateHash. These new function abstract existing signature wrapper code, so minimal code size increase. Added test cases for new functions for RSA (with and without DER encoding) and ECC. 2018-04-25 13:10:53 -07:00
c1d4f659ad Merge pull request #1511 from ejohnstown/dist-tweak
Make Dist Automation Tweak
2018-04-25 10:56:40 -07:00
107290b552 Merge pull request #1515 from dgarske/buildfixes
Fixes for various build configurations
2018-04-25 10:23:27 -07:00
5c61810d4d Merge pull request #1497 from SparkiDev/tls13_draft28
Tls13 draft28
2018-04-25 10:17:37 -07:00
a9f32c30da Fix for SGX build after C99 changes strings.h: No such file or directory. 2018-04-25 07:56:54 -07:00
3c684886ad Fixes to resolve building --enable-tls13 --disable-ecc --enable-curve25519 --enable-ed25519. 2018-04-25 07:54:53 -07:00
089e1b6b9b Fix for expected Configurations Test - NIGHTLY BUILD #265 and ifdef cleanup. 2018-04-25 07:54:53 -07:00
2e6c195b43 GCC-ARM IDE improvements:
* Added documentation for `ECC_USER_CURVES`.
* Added option for RSA PSS padding support.
2018-04-24 15:26:53 -07:00
65c9277213 More fixes from Jenkins testing. 2018-04-24 14:01:33 -07:00
ff1559275d Merge pull request #1512 from dgarske/c99
Fixes to resolve issues with c99 compliance
2018-04-24 13:36:41 -07:00
1ddccf63dc Merge pull request #1496 from JacobBarthelmeh/Compatibility-Layer
Compatibility layer
2018-04-24 13:33:33 -07:00
e63afa08bd Fix a couple of minor Jenkins issues. 2018-04-24 13:25:28 -07:00
56025f38b9 Enhancements and cleanup to ASN date/time:
* Refactor the ASN get date logic to combine shared code.
* Added new API `wc_GetDateInfo` to get raw date, format and length.
* Added new API `wc_GetCertDates` to extract certificate before/after dates as `struct tm` type.
* Added new API `wc_GetDateAsCalendarTime` which parses the raw date string and convers to `struct tm`.
* Added tests for new API's.
* Added missing tests for `wc_SetAltNames`, `wc_SetAltNamesBuffer` and `wc_SetDatesBuffer`.
* Fixed build for older `NO_TIME_H` macro.
2018-04-24 13:04:36 -07:00
b48a9ded15 Fix to allow user to force build using WOLF_C99 option. 2018-04-23 13:52:58 -07:00
289a282183 Fixes to resolve issues with c99 compliance (building with ./configure CFLAGS="-std=c99").
* Fix for ReadDir checking for file flag to use `S_ISREG(ctx->s.st_mode)` syntax.
* Added macro for strsep `XSTRSEP`. Added wolf implementation as `wc_strsep` enabled as C99 or `USE_WOLF_STRSEP`.
* Fix to use `gethostbyname` for c99 instead of `getaddrinfo`.
* For c99 use wolf strtok `wc_strtok`.
* Exposed API's for `wc_strtok` and `wc_strsep` when available.
* Include `sys/time.h` when available from autocon `HAVE_SYS_TIME_H` or c99.
* include `<strings.h>` when `HAVE_STRINGS_H` or c99.
2018-04-23 13:47:22 -07:00
568d24c63c Coverity fixes (#1509)
* Coverity fixes 3
2018-04-23 09:20:28 -07:00
9831a8ac94 Added a dist-hook target to the Makefile to copy the default options.h.in over options.h. 2018-04-20 11:07:57 -07:00
7d425a5ce6 Added support for an anonymous cipher suite (#1267)
* Added support for cipher suite TLS_DH_anon_WITH_AES256_GCM_SHA384
* Added test cases for verification of anonymous cipher suite
2018-04-20 10:35:37 -07:00
853756a73c Added a TLS alert message 115 (#1391)
Added a new TLS alert message `unknown_psk_identity` (115) from RFC 4279,  section 2.
2018-04-20 10:23:57 -07:00
94157634e1 TLS 1.3 fixes/improvements
Support Draft 28: able to compile code to return BAD_BINDER if no PSKs
match and certificates not to be used.
Change key share implementation to use server preference - server now
checks each client key share's group is in supported_groups extension.
Client and server examples modified to support server preference.
Application can set client's and server's supported groups by rank.
Server's supported groups is sent back in encrypted_extensions if
preferred group is not in client's list - able to be turned off at
compile time.
Application can query server's preferred group from client.
Able to compile using 0x0304 as version instead of draft version.
Fix state machine in TLS 1.3 to support unexpected hello_retry_request.
Also fixes non-blocking.
Fix resumption to use the named group from session.
Fix named group in session structure to be a 2-byte field.
Better detection of errors in message flow.
Fix DoTls13ClientHello when downgrading - don't do TLS 1.3 things.
Not downgrading on client fixed.
Downgrade protocol version from TLS 1.3 when not TLS 1.3 ciphersuite.
Get downgrading from TLS 1.3 and resumption working.
Change earlyData value to an enum.
Support no extensions data (as opposed to zero length extension data) in
TLS 1.3 ClientHello.
Check PSK cipher suite is available to both client and server before
using.
Check first PSK identity chosen when server says it is using early data
at client.
Check PSK extension is last in client_hello on server.
Check the PSK cipher suite to use is supported on client.
Check the returned cipher suite for pre-shared keys is the same as
client expects.
Send alert decrypt_error when verification fails in certificate_verify
or finished message doesn't match calculated value.
Fail when certificate messages recieved in handshake when using PSK.
Validate on the server that EndOfEarlyData message has been recieved
before finished message when server sent EarlyData extension.
2018-04-20 09:44:02 +10:00
3476a9b55a versions for Baxter updated, new tag in fips v3.12.6 2018-04-19 15:24:22 -06:00
9e4bb3fee1 Merge pull request #1504 from SparkiDev/nginx-pemenc
Key derivation for encrypted PEM uses salt length of 8 in OpenSSL
2018-04-19 11:23:39 -07:00
f7cb5c5c15 Merge pull request #1507 from kaleb-himes/README-update
Bring special notes inline with commit 8edbca1b21b6fcd6d09910c66bbf35…
2018-04-19 11:17:25 -07:00
b7c61a72c8 Merge pull request #1503 from kojo1/Ticket3793
HMAC with SHA2
2018-04-19 09:38:55 -06:00
23615dd15f Bring special notes inline with commit 8edbca1b21 2018-04-18 09:58:03 -06:00
bf950198f2 api.c: option conditions 2018-04-18 13:02:40 +09:00
6689ee965a Key derivation for encrypted PEM uses salt length of 8 in OpenSSL 2018-04-18 12:37:06 +10:00
7c7913264b remove printf 2018-04-18 09:25:24 +09:00
56af3a5b36 add HMAC SHA2 2018-04-18 08:47:39 +09:00
57d40bc6d1 remove internal data types in ssl.h 2018-04-17 15:57:23 -06:00
11065f9222 added the missing macro file ax_require_defined.m4. 2018-04-17 13:23:17 -07:00
48b3aa90d3 Update autoconf m4 files, except pthreads which should be its own commit 2018-04-17 13:20:33 -07:00
a116b5ba83 Merge pull request #1500 from BrianAker/patch-1
Adding Copyright notice to autoconf files.
2018-04-17 11:15:36 -07:00
09706a4ed2 Merge pull request #1488 from SparkiDev/tls13_perf
Changes for interop and performance
2018-04-16 09:16:13 -07:00
3179d6ce2b Adding Copyright notice to autoconf files. 2018-04-14 22:30:02 -10:00
942c720dc4 Merge pull request #1499 from ejohnstown/aes-asm
AES assembly file name change
2018-04-13 11:23:03 -07:00
e895bacbba update before/after dates with certificates 2018-04-13 09:31:32 -06:00
f9eda5d790 free test certificate after use 2018-04-13 09:16:22 -06:00
a0d8327320 Coverity fixes 2 (#1493)
* Coverity fixes for wolfcrypt folder
* Fixes for remaining issues
* Fixes for test files
2018-04-13 05:35:18 -07:00
9600266483 WOLFSSL_FUNC_TIME changes
Warning in code about using this define.
Remove usage of WOLFSSL_FUNC_TIME from server.c.
2018-04-13 12:13:31 +10:00
0b47811c46 Changes for interop and performance
Changes made to test.h to allow interop of PSK with OpenSSL.
Changes to allow server to pre-generate key share and perform other
operations at later time.
Fix ChaCha20 code header to have bigger state to support assembly code
for AVX1.
Fix Curve25519 code to use define instead.
Change Curve25519 to memset all object data on init.
Change Poly1305 to put both sizes into one buffer to avoid a second call
to wc_Poly1305Update().
Added WOLFSSL_START and WOLFSSL_END API and calls to show time of
protocol message function enter and leave to analyse performance
differences.
Moved Curve25519 code in KeyShare extension out of general ECC code.
2018-04-13 12:01:20 +10:00
425cee64a7 AES assembly file name change
Some versions of GCC on the Mac will not run the file aes_asm.s through the preprocessor. There are some ifdefs in the file that are included when they shouldn't be. This is not a problem on Linux. Renaming the file to have a capital S extension forces the assembler to run with the preprocessor.
2018-04-12 16:47:58 -07:00
84f7bd8cde Merge pull request #1494 from dgarske/wpas
Fix for building wpa_supplicant
2018-04-12 13:49:31 -07:00
eacd98fe4e Merge pull request #1491 from dgarske/config
Configure improvements and new options
2018-04-12 13:48:20 -07:00
8f1e8be2d0 Merge pull request #1490 from dgarske/hashoid_cleanup
Hash OID cleanup
2018-04-12 13:46:47 -07:00
cfaed48f90 adjust GetInt call with ASN1 integer to big number 2018-04-12 14:40:20 -06:00
df06707496 Handle larger values with ASN1 INTEGER structure 2018-04-12 14:07:29 -06:00
cf1230d232 Fix for building wpa_supplicant (./configure --enable-wpas) after PemToDer refactor in PR #1467. 2018-04-12 06:53:44 -07:00
1f7b954d47 Fix for wc_GetCTC_HashOID in FIPS mode. Uses the new wc_HashTypeConvert to handle conversion from unique WC_ALGO (int) to WC_HASH_TYPE_ALGO (enum wc_HashType). 2018-04-12 06:51:23 -07:00
ce6728951f Added a new --enable-opensslall option, which ensures all openssl features are enabled. Documented and tested building the various open source defines we support in our build. 2018-04-11 13:54:07 -07:00
689203d310 Added some more features to the --enable-all. Added new --enable-webclient option. 2018-04-11 13:54:07 -07:00
ee5d78f84f Added new wc_OidGetHash API for getting the hash type from a hash OID. Refactor PKCS7 and PKCS12 to use new API and reduce duplicate ocde. Updated wc_GetCTC_HashOID to use wc_HashGetOID and maintain back compat. 2018-04-11 13:53:30 -07:00
d85580691b Merge pull request #1492 from dgarske/fix_noasn_pwdbased
Fixes for ASN disabled and PWDBASED enabled / Win FIPS
2018-04-11 12:09:30 -07:00
83bfdb1594 Fix for issue with unique hash types on ctoacrypt FIPS using different values than WC_HASH_TYPE_*. Add new API wc_HashTypeConvert to handle the conversion between enum wc_HashType and int. For FIPS it uses a switch() to convert and for non-FIPS it uses a simple cast. Changed the pwdbased_test to return actual ret instead of adding values (made it difficult to track down error location). 2018-04-11 09:30:30 -07:00
3f3e332a3a Fix for evp.c statement will never be executed in wolfSSL_EVP_CIPHER_CTX_block_size. 2018-04-11 08:18:39 -07:00
38aa56cc40 Fix for Windows FIPS build in current master. Resolves issue with missing DES/AES key size enums. 2018-04-10 20:07:14 -07:00
565f394972 Fix for building without ASN and PWDBASED enabled (./configure --disable-asn --enable-pwdbased). 2018-04-10 16:36:11 -07:00
e25da80766 Merge pull request #1467 from dgarske/asnpemtoder
PEM Encrypted Keys cleanup and PemToDer move to wolfCrypt asn.c
2018-04-09 16:33:30 -07:00
a38576146e * Added support for disabling PEM to DER functionality using WOLFSSL_PEM_TO_DER. This allows way to use with DER (ASN.1) certificates only in an embedded environment. This option builds, but internal make check requires PEM support for tests.
* More cleanup to move PEM functions from ssl.c to asn.c (`wolfSSL_CertPemToDer`, `wolfSSL_KeyPemToDer`, `wolfSSL_PubKeyPemToDer`). Renamed these API's to `wc_` and added backwards compatability macro for old function names.
2018-04-09 13:28:15 -07:00
5a46bdf6f6 Added unit test for using encrypted keys with TLS. Only works with --enable-des3, since the keys are all encrypted with DES3 (also requires either --enable-opensslextra or --enable-enckeys). 2018-04-09 13:28:15 -07:00
d68a6fb4c7 Make sure wc_encrypt.h includes the ciphers. 2018-04-09 13:28:15 -07:00
98c186017a Fixes for build failures. Added new WC_MAX_SYM_KEY_SIZE macro for helping determine max key size. Added enum for unique cipher types. Added CHACHA_MAX_KEY_SZ for ChaCha. 2018-04-09 13:28:15 -07:00
2c72f72752 Fixes for FIPS, sniffer (w/o enc keys), scan-build issues and backwards compatability. 2018-04-09 13:28:15 -07:00
9be11bf62c Fix to correct missing wolfSSL_EVP_BytesToKey header int he NO_MD5 case. 2018-04-09 13:28:15 -07:00
1f00ea2115 Fixes for various build issues with type casting and unused functions. Moved mystrnstr to wc_port.c. Added some additional argument checks on pwdbased. 2018-04-09 13:28:15 -07:00
e60032b961 Fix for duplicate API defs. 2018-04-09 13:28:15 -07:00
b01535b483 Fix for stray character. 2018-04-09 13:28:15 -07:00
8a31f13cb6 Remove obsolete WOLFSSL_PEMPUBKEY_TODER_DEFINED header logic. 2018-04-09 13:28:15 -07:00
6de8348918 Fixes for various build configurations. Added --enable-enckeys option to enable support for encrypted PEM private keys using password callback without having to use opensslextra. Moved ASN CryptKey function to wc_encrypt.c as wc_CryptKey. Fixup some missing heap args on XMALLOC/XFREE in asn.c. 2018-04-09 13:28:15 -07:00
1315fad7dc Added ForceZero on the password buffer after done using it. 2018-04-09 13:28:15 -07:00
3a8b08cdbf Fix to move the hashType out of EncryptedInfo. Fix for parsing "DEC-Info: ". Fix for determining when to set and get ivSz. 2018-04-09 13:28:15 -07:00
c83e63853d Refactor unqiue hash types to use same internal values (ex WC_MD5 == WC_HASH_TYPE_MD5). Refactor the Sha3 types to use wc_ naming. 2018-04-09 13:28:15 -07:00
264496567a Improvements to EncryptedInfo. Added build option WOLFSSL_ENCRYPTED_KEYS to indicate support for EncryptedInfo. Improvements to wc_PBKDF1 to support more hash types and the non-standard extra data option. 2018-04-09 13:28:15 -07:00
f9e830bce7 First pass at changes to move PemToDer into asn.c. 2018-04-09 13:28:14 -07:00
2ded38ec2b Merge pull request #1485 from dgarske/tlskeygeneccorcurve
Fix TLS 1.3 with ED25519/CURVE25519 enabled and ECC disabled
2018-04-09 12:12:31 -07:00
21833e245f Fix TLS 1.3 with ECC disabled and CURVE25519 enabled. Resolves issue with using ./configure --disable-ecc --enable-curve25519 --enable-ed25519 --enable-tls13. Refactor TLSX_KeyShare_GenEccKey to support either ECC or CURVE25519. Fix for PemToDer to handle ED25519 without ECC enabled. 2018-04-09 10:10:08 -07:00
2a460d3d05 Merge pull request #1484 from embhorn/coverity
Coverity fixes
2018-04-06 18:18:38 -07:00
36b9b0b558 Updates from code review 2018-04-06 17:29:27 -05:00
86767e727c Fixes for CID 185033 185028 185142 185064 185068 185079 185147 2018-04-06 13:15:16 -05:00
d2c1a1906d Fixes for CID 184980 185017 185047 185167 2018-04-06 11:10:37 -05:00
6090fb9020 Merge pull request #1483 from dgarske/winvs
Fixes for unused `heap` warnings
2018-04-06 09:01:49 -07:00
e56209cee4 Merge pull request #1482 from dgarske/nourand
Added new define `NO_DEV_URANDOM` to disable the use of `/dev/urandom`
2018-04-06 09:00:37 -07:00
920e6ed911 Fix warning in ssl.c 2018-04-06 09:30:54 -05:00
c6ad885459 Coverity fixes for tls.c/n CID 184996 185112 185122 2018-04-06 09:08:00 -05:00
ec429e50b1 Fixes for ssl.c 2018-04-06 07:45:12 -05:00
426335b68f Found additional VS unused heap warnings. Replace tabs with 4-spaces. 2018-04-05 12:28:32 -07:00
2b48a074eb Merge pull request #1480 from dgarske/extcache
Fix for HAVE_EXT_CACHE callbacks not being available without OPENSSL_EXTRA
2018-04-05 10:52:44 -07:00
bab62cc435 Added new define NO_DEV_URANDOM to disable the use of /dev/urandom. Added better named define WC_RNG_BLOCKING to indicate block w/sleep(0) is okay. 2018-04-05 09:34:43 -07:00
ede006b3e1 Merge pull request #1479 from JacobBarthelmeh/HardwareAcc
Fix PIC32 AES-CBC and add test case
2018-04-05 09:15:08 -07:00
5439402c1d Refactor for max record size (#1475)
* Added new internal function `wolfSSL_GetMaxRecordSize`.
* Modified tls_bench to use dynamic buffer based on max record size.
* Added comment for DTLS maxFragment calculation.
2018-04-05 09:11:58 -07:00
412d4d76ee Fix for HAVE_EXT_CACHE callbacks not being available without OPENSSL_EXTRA defined. Added tests for external cache callbacks. 2018-04-05 07:10:04 -07:00
a1d6bc68de Merge pull request #1478 from dgarske/fixeccmaxsize
Fix for ECC max bits
2018-04-04 16:27:15 -07:00
815219b589 fix pic32 AES-CBC and add test case 2018-04-04 16:09:11 -06:00
bc76f57959 Fix for ECC max bits ( MAX_ECC_BITS). 2018-04-04 13:39:14 -07:00
a78c6ba4ea Fix for unused heap warnings. 2018-04-04 12:51:45 -07:00
aa660bc9b8 Merge pull request #1477 from dgarske/fix_strtok
Fix for issue with `wc_strtok` function declaration
2018-04-04 12:35:38 -07:00
2189827287 Fix for issue with wc_strtok function declaration not being available because of include order. Fixes issue #1469. 2018-04-04 10:41:14 -07:00
0da4a8f1fe Merge pull request #1476 from dgarske/fix_haveextcache
Fix building with `HAVE_EXT_CACHE` when `OPENSSL_EXTRA` is not defined
2018-04-04 10:34:07 -07:00
2deb977ecf Merge pull request #1473 from dgarske/pkcs7_norsa
Enabled PKCS7 support without RSA
2018-04-04 10:33:11 -07:00
960d2ec031 Merge pull request #1471 from JacobBarthelmeh/Fuzzer
sanity check on buffer read
2018-04-04 10:31:55 -07:00
1196a3b64d Merge pull request #1455 from dgarske/nitroxv
Nitrox V fixes and additions
2018-04-04 10:27:53 -07:00
5702e8ee48 Fix building with HAVE_EXT_CACHE when OPENSSL_EXTRA is not defined. Fixes issue #1474. 2018-04-04 09:02:52 -07:00
c288d0815d Added support for building and using PKCS7 without RSA (assuming ECC is enabled). 2018-04-03 09:26:57 -07:00
0c898f513d Nitrox V fixes and additions:
* Added support for ECC, AES-GCM and HMAC (SHA-224 and SHA3).
* Fixes for Nitrox V with TLS.
* ECC refactor for so key based `r` and `s` apply only when building with `WOLFSSL_ASYNC_CRYPT`.
* ECC refactor for `e` and `signK` to use key based pointer for Nitrox V.
* Improved the Nitrox V HMAC to use start, update and final API's instead of caching updates.
* Fix for Intel QuickAssist with unsupported HMAC hash algos using `IntelQaHmacGetType` (such as SHA3).
* Added new API `wc_mp_to_bigint_sz` to zero pad unsigned bin.
* Fix for AES GCM to gate HW use based on IV len in aes.c and remove the gate in test.c.
* Implemented workaround to use software for AES GCM Nitrox V hardware and 13 byte AAD length for TLS.
* New debug option `WOLFSSL_NITROX_DEBUG` to add pending count.
2018-04-03 09:14:20 -07:00
adb817e8d2 Feature update for tls_bench test that will allow passing in arguments (#1466)
* Feature update for tls_bench test that will allow passing in command line arguments that enable test features.
* Fix type conversion errors.
* Fixed use of uninitialized data. Declare DH arrays as const.
2018-04-02 14:00:34 -07:00
6a1013888f sanity check on buffer read 2018-04-02 14:30:58 -06:00
b33feb9dbf Merge pull request #1470 from kojo1/EVP
EVP_CipherUpdate return value for inlen == 0
2018-04-02 14:03:48 -06:00
c60d9ff983 if(ret != 1) error 2018-04-01 13:27:08 +09:00
1c0b84d47d openSSL compatibility, EVP_CipherUpdate, if(inlen == 0)return 1; 2018-04-01 12:13:18 +09:00
effaa18b32 Fixing some kinks 2018-03-30 12:46:59 -06:00
87c1658ab8 Merge pull request #1464 from jrblixt/unitTest_api_addPkcs7-nightlyBuildFix2
Nightly build fix for PKCS#7 errors.
2018-03-29 15:26:11 -06:00
86a5330b31 Merge pull request #1462 from ejohnstown/cxxflags
Configure Update
2018-03-28 16:41:15 -07:00
e59bb43878 Configure Update
Revise default compiler optimization flags enable name to something more descriptive.
2018-03-28 13:19:46 -07:00
3a8a7b8a55 Merge pull request #1458 from dgarske/cleanupthreaded
wolfCrypt ECC FP cleanup for thread local storage cases
2018-03-28 12:25:20 -07:00
e6a19bb1e8 Configure Update
Add a disable option to turn off the default optimization options so the user may set their own in a CFLAGS.
2018-03-27 16:41:39 -07:00
1cd6075b9d Nightly build fix. 2018-03-27 16:54:14 -06:00
c9d840ed8d Fix for the HAVE_THEAD_LS case with FP_ECC where starting a new thead and doing ECC operations and not calling wc_ecc_fp_free. Added missing wolfCrypt_Init to API docs. 2018-03-27 14:29:39 -07:00
f62d372bbe Merge pull request #1461 from cconlon/netbsd-update
update NetBSD fips-check version to include selftest ECDSA fix
2018-03-27 13:28:49 -07:00
9de2bdce24 Merge pull request #1460 from dgarske/winecc
Enable ECC, AES-GCM and SHA-512/384 by default in VS
2018-03-27 13:28:23 -07:00
504b13530e Merge pull request #1459 from cconlon/selftest_fixes
Fix for wolfCrypt test and CAVP selftest build
2018-03-27 13:27:28 -07:00
477d2413cd Configure Update
1. Initialize CXXFLAGS (C++ compiler flags) the same way we do CFLAGS.
2. Add CPPFLAGS (C preprocessor flags) to the options.h file with the other CFLAGS.
2018-03-27 10:23:44 -07:00
9f231e0020 Merge pull request #1453 from dgarske/ecc508a_linux
Support for building with `WOLFSSL_ATECC508A` on other targets
2018-03-27 09:57:39 -07:00
42e6ea8685 Added ECC_TIMING_RESISTANT to eliminate harden warnings. 2018-03-26 15:54:29 -07:00
8fbc765dba Enable ECC, AES-GCM and SHA-512/384 by default in Windows Visual Studio projects. 2018-03-26 15:09:51 -07:00
9edaac8e1c update NetBSD fips-check version to include selftest ECDSA fix 2018-03-26 14:37:39 -06:00
021560035b fix unused var warning for extNameConsOid with IGNORE_NAME_CONSTRAINTS 2018-03-26 09:43:37 -06:00
d2aa7d0a37 exclude ecc_import_unsigned test when building for CAVP selftest 2018-03-23 16:31:17 -06:00
c08f5b86cf Merge pull request #1444 from jrblixt/unitTest_api_addPkcs-PR03162018
Unit test functions for PKCS#7.
2018-03-23 10:00:33 -06:00
aee6f4d0ca Merge pull request #1457 from dgarske/base16
Base16/64 improvements
2018-03-22 15:14:57 -07:00
316a2b9fb4 Review changes: Chris. 2018-03-22 15:35:25 -06:00
a92696edec Merge pull request #1454 from dgarske/noprivkey
Support for not loading a private key when using `HAVE_PK_CALLBACKS`
2018-03-22 12:47:22 -07:00
040e0ab752 Merge pull request #1456 from dgarske/iocbname
Refactor IO callback function names to use `_CTX_`
2018-03-22 12:40:48 -07:00
43f4faa7be Merge pull request #1452 from cconlon/mcapifix
fix unused param warning with NO_ERROR_STRINGS
2018-03-22 12:39:19 -07:00
3bf325290d Base16/64 improvements:
* Add define `WOLFSSL_BASE16` to explicitly expose base16 support.
* Add `./configure --enable-base16` option (disabled by default in configure, but enabled in coding.h when required internally).
* Added base16 tests in test.c `base16_test`.
* Enabled base64 decode tests when `WOLFSSL_BASE64_ENCODE` is not defined.
2018-03-22 10:36:56 -07:00
0cff2f8b10 Replace use of PUB_KEY_SIZE (from CryptoAuthLib) with new ECC_MAX_CRYPTO_HW_PUBKEY_SIZE. 2018-03-22 09:45:27 -07:00
8c4bfd825a Support for building the ATECC508A without WOLFSSL_ATMEL defined, which enables features specific to Atmel Studio Framework (ASF) and an embedded target. This allows for building with WOLFSSL_ATECC508A defined on other targets such as Linux. 2018-03-22 09:39:21 -07:00
2989c73411 Merge pull request #1447 from JacobBarthelmeh/PKCS7
remove pkcs7 requirement of x963kdf when ecc is disabled
2018-03-22 10:01:55 -06:00
e564c973b6 Refactor IO callback function names to use _CTX_ to eliminate confusion about the first parameter. 2018-03-21 16:08:55 -07:00
4b51431546 Fix for possible unused ctx in wolfSSL_CTX_IsPrivatePkSet when no ECC, RSA or ED25519. 2018-03-21 15:46:08 -07:00
104f7a0170 Merge pull request #1451 from JacobBarthelmeh/Optimizations
Adjust X509 small build and add more macro guards
2018-03-21 15:15:27 -07:00
f3d0879ed7 Merge pull request #1449 from dgarske/asn_nullterm
ASN improvements for building header/footer in `wc_DerToPemEx`
2018-03-21 15:13:46 -07:00
2a356228be Merge pull request #1445 from SparkiDev/wpas_fix
Fixes for wpa_supplicant
2018-03-21 15:11:43 -07:00
dbb34126f6 * Added support for not loading a private key for server or client when HAVE_PK_CALLBACK is defined and the private PK callback is set. Tested with all cipher suites, TLS 1.2/1.3, client/server certs, RSA/ECC/ED25519.
* Added PK callback context tests for client/server examples (`SetupPkCallbackContexts`).
* Added new test define for `TEST_PK_PRIVKEY` to allows simulating hardware based private key.
* Added new test.h function for loading PEM key file and converting to DER (`load_key_file`).
* Added way to get private key signature size (`GetPrivateKeySigSize`).
* Added new ECC API `wc_ecc_sig_size_calc` to return max signature size for a key size.
* Added inline comments to help track down handshake message types.
* Cleanup of RSS PSS terminating byte (0xbc) to use enum value.
* Fixed bug with PK callback for `myEccVerify` public key format.
* Fixed bug with PK callback for ED25519 verify key buffer in DoServerKeyExchange.
2018-03-21 11:27:08 -07:00
26bb86690a fix for unused parameter warning 2018-03-21 10:06:06 -06:00
14bb14c6ab fix unused param warning with NO_ERROR_STRINGS 2018-03-21 09:56:08 -06:00
90f97f4a5a fix for unused variable 2018-03-21 09:16:43 -06:00
0aa3b5fa0e macros for conditionally compiling code 2018-03-21 00:09:29 -06:00
d9917049c4 use bit fields with WOLFSSL_CTX structure 2018-03-20 22:07:42 -06:00
087df8f1cd more macro guards to reduce size 2018-03-20 17:15:16 -06:00
c9c2e1a8a7 Don't base signature algorithm support on certificate
The signature algorithm support is what you can do with another key, not
what you can do with your key.
2018-03-21 08:33:54 +10:00
4d65e4cc1e add WOLFSSL_NO_DH186 macro to optionally compile out DH186 function 2018-03-20 15:31:20 -06:00
df6ea54cd5 add support for PKCS8 decryption to OPENSSL_EXTRA_X509_SMALL build 2018-03-20 15:06:35 -06:00
2788183e79 Known config. tests fix. 2018-03-20 14:35:26 -06:00
bba0a3e88c Merge pull request #1448 from dgarske/ecc_cleanup
ECC import/export cleanups and additions
2018-03-20 11:05:15 -07:00
38d1eea8cd Merge pull request #1446 from SparkiDev/tls13_draft27
TLS v1.3 support for Draft 23 and Draft 27
2018-03-20 09:13:03 -07:00
18879ce271 Merge pull request #1440 from dgarske/VerifyRsaSign_PKCallback
Added VerifyRsaSign PK callback
2018-03-20 09:02:18 -07:00
764aec071c Further improvement to the null termination and newline logic in wc_DerToPemEx. 2018-03-19 22:58:18 -07:00
59aa893260 Cleanup ECC point import/export code. Added new API wc_ecc_import_unsigned to allow importing public x/y and optional private as unsigned char. Cleanup wc_ecc_sign_hash to move the hardware crypto code into a separate function. Added missing tests for wc_ecc_export_public_raw, wc_ecc_export_private_raw and new test for wc_ecc_import_unsigned. 2018-03-19 13:28:57 -07:00
87c70e76a9 Merge pull request #1441 from dgarske/ocsp_nb
Fix for handling OCSP with non-blocking
2018-03-19 12:05:59 -07:00
2cc1a1c5bf Renamed callbacks for VerifySign to SignCheck. Switched the new callback context to use the one for the sign. Fix for callback pointer check on VerifyRsaSign. Added inline comments about the new RsaSignCheckCb and RsaPssSignCheckCb. 2018-03-19 10:19:24 -07:00
cb8f8a953b Merge pull request #1438 from SparkiDev/nginx_pem_write
Fix PEM_write_bio_X509 to work with new BIO code
2018-03-19 09:13:51 -07:00
1040cf9caa Merge pull request #1437 from dgarske/eccrsrawtosig
Added new ECC API `wc_ecc_rs_raw_to_sig`
2018-03-19 09:12:39 -07:00
467608b6c9 remove pkcs7 requirement of x963kdf when ecc is disabled 2018-03-19 10:08:46 -06:00
7ce2efd572 Merge pull request #1431 from JacobBarthelmeh/Optimizations
more aes macro key size guards
2018-03-19 09:07:05 -07:00
b28c6a394f Merge pull request #1428 from JacobBarthelmeh/Certs
Update to certificate renew scripts
2018-03-19 09:05:15 -07:00
bd53d7ba59 TLS v1.3 support for Draft 23 and Draft 27
Draft 24: Second ClientHello usees version 0x0303 - no change.
Draft 25: The record layer header is now additional authentication data to
encryption.
Draft 26: Disallow SupportedVersion being used in ServerHello for
negotiating below TLS v1.3.
Draft 27: Older versions can be negotiated (by exclusion of 0x0304) in
SupportedVersion - no change.
2018-03-19 16:15:02 +10:00
b325e0ff91 Fixes for wpa_supplicant 2018-03-19 11:46:38 +10:00
465f1d491f Merge pull request #1443 from cconlon/dhagree
check z against 1 in wc_DhAgree()
2018-03-17 20:15:31 -07:00
250cd3b7eb Merge pull request #1433 from SparkiDev/sp_size
Fix size on Intel and improve 32-bit C code performance
2018-03-16 17:05:46 -07:00
1aba6e9b44 Prepare for PR. 2018-03-16 17:07:28 -06:00
3118c8826b check z against 1 in wc_DhAgree() 2018-03-16 15:59:48 -06:00
323abafc1c backup updates for SGX and DB jobs 2018-03-16 15:34:30 -06:00
fa73f7bc55 Fix for handling OCSP with non-blocking. The HashInput function was being called on the re-entry, which produced a bad mac response from server. Also cleanup for some of the WC_PENDING_E logic for the non-async cases to reduce code size. 2018-03-16 12:05:07 -07:00
e858ec11ac Fix unused arg when building with pk callbacks disabled. 2018-03-16 09:37:07 -07:00
ed7774e94a Added new callbacks for the VerifyRsaSign, which uses a private key to verify a created signature. The new callbacks API's are wolfSSL_CTX_SetRsaVerifySignCb and wolfSSL_CTX_SetRsaPssVerifySignCb. These use the same callback prototype as the CallbackRsaVerify and use the same context. 2018-03-15 14:43:41 -07:00
f70351242b Merge pull request #1432 from kojo1/mdk5
3.14.0 update on mdk5 pack
2018-03-15 14:47:14 -06:00
3f99a2a391 Fix PEM_write_bio_X509 to work with new BIO code 2018-03-15 10:45:49 +10:00
a207cae0f4 add some more macro guards to reduce size 2018-03-14 17:24:23 -06:00
607bd96317 add ocsp cert renew and test-pathlen to script 2018-03-14 16:35:16 -06:00
4d1986fc21 Improve speed of 32-bit C code 2018-03-15 08:33:04 +10:00
9ccf876a21 Added new ECC API wc_ecc_rs_raw_to_sig to take raw unsigned R and S and encodes them into ECDSA signature format. 2018-03-14 10:59:25 -07:00
d8fe341998 First pass at added PK_CALLBACK support for VerifyRsaSign. 2018-03-14 09:54:18 -07:00
717ba83deb Merge pull request #1434 from SparkiDev/tls13_multi_recs
Fix multiple handshake messages in last record of certs
2018-03-14 09:46:32 -07:00
262aa7c9a4 Merge pull request #1429 from JacobBarthelmeh/Testing
fix for build with NTRU and certgen
2018-03-14 09:42:39 -07:00
afe300acc0 Fix multiple handshake messages in last record of certs 2018-03-14 16:37:58 +10:00
8d750a22b1 Update project files 2018-03-14 08:15:18 +09:00
1de291be8d macro INLINE 2018-03-14 07:14:07 +09:00
c4dfa41088 SP improvements
Tag functions to not be inlined so llvm doesn't make huge builds.
Add sp_mod to support new DH key generation function.
2018-03-13 14:16:48 +10:00
8fb3ccacb7 opensslextra fixs and warning for unused variable 2018-03-12 18:05:24 -06:00
c41bc8205c account for build with no aes and no des3 2018-03-12 16:41:26 -06:00
6b04ebe3a4 fix for compiling with different build settings 2018-03-12 16:12:10 -06:00
fa21fb4a27 more aes macro key size guards 2018-03-12 15:44:48 -06:00
15805d626d Merge pull request #1430 from SparkiDev/srp_test_fix
Fix SRP test to have 2048 bit test data
2018-03-12 11:33:50 -07:00
b297d9dce0 Merge pull request #1427 from JacobBarthelmeh/Compatibility-Layer
return value on bad mutex with error nodes and add x509 host check to OPENSSL_EXTRA
2018-03-12 11:33:20 -07:00
00203d66d5 Fix SRP test to have 2048 bit test data 2018-03-12 17:32:27 +10:00
8fdb99443a fix for build with NTRU and certgen 2018-03-09 14:21:43 -07:00
72f390a102 Merge pull request #1361 from connerWolfSSL/doxygen_project
wolfSSL with Doxygen Documentation
2018-03-09 13:17:54 -08:00
e41f5de556 default generate ed25519 cert with renew and add ecc crls to script 2018-03-09 14:09:34 -07:00
d9738563af add ed25519 certificate generation to renewcerts.sh 2018-03-09 10:43:36 -07:00
f6b5427f2b bad sig certificate renew script 2018-03-09 09:50:52 -07:00
849e1eb10d updating renewcerts script 2018-03-09 00:35:14 -07:00
3b4d1bc796 Merge pull request #1425 from dgarske/config_defaults
Enable ECC by default and for aarch64 more algos
2018-03-08 14:05:03 -08:00
0ab4166a80 Merge pull request #1421 from JacobBarthelmeh/Optimizations
trim out more strings and fix DN tag
2018-03-08 14:03:10 -08:00
1f9583c59c Merge pull request #1409 from SparkiDev/tls13_old_ver_fix
Fix downgrading when WOLFSSL_TLS13 is defined (despite NO_OLD_TLS being defined)
2018-03-08 13:59:59 -08:00
200077c62c Merge pull request #1426 from cconlon/dh186
DH - Use q parameter when available, add wc_DhSetKey_ex()
2018-03-08 13:57:54 -08:00
e0afec0600 fix RSA macro, tickets without server, and add test case 2018-03-08 14:36:43 -07:00
e960e0544a try to clear out error queue with failing mutex 2018-03-08 11:49:16 -07:00
2a0ef55a66 fix for check on return value with mutex error case 2018-03-08 11:26:22 -07:00
74475a26ba compile more functions in with OPENSSL_EXTRA 2018-03-08 11:06:40 -07:00
0535a8a68a Added isntall flag, improved pathing for using doxygen to generate documentation 2018-03-08 10:53:44 -07:00
0ac833790d check q in wc_CheckPubKey_ex() if available in DhKey 2018-03-08 10:17:52 -07:00
6f95677bb8 add wc_DhSetKey_ex() with support for q and SP 800-56A 2018-03-08 09:36:44 -07:00
9e6b9a3793 Merge https://github.com/wolfssl/wolfssl into doxygen_project 2018-03-08 08:10:10 -07:00
d6ffa0dd8e Fix downgrade when doing TLS v1.3 2018-03-08 15:05:36 +10:00
d35a3f1e69 Fixes from code review
If doing TLS v1.3 and version on ServerHello is below TLS v1.2 then
handle message with old code.
If doing TLS v1.3, downgrading and version ClientHello is less than
minimum downgrade then this is a version error.
2018-03-08 09:00:36 +10:00
8edbca1b21 Enable ECC for all platforms by default. For aarch64 enable SHA512, SHA224, SHA3 and FastMath by default. 2018-03-07 09:41:07 -08:00
612a80609a warning about extra set of parentheses 2018-03-07 10:35:31 -07:00
799a6b6d2d fix warning of unused variable and add guard for disable ecc build 2018-03-07 10:35:31 -07:00
a9c6385fd1 trim out more strings and fix DN tag 2018-03-07 10:35:31 -07:00
a4000ba196 Merge pull request #1418 from SparkiDev/sp_armasm
Add assembly code for ARM and 64-bit ARM
2018-03-07 09:18:16 -08:00
91a59eb625 Merge pull request #1422 from JacobBarthelmeh/Compatibility-Layer
add stub code for flag with x509 check host
2018-03-07 08:55:21 -08:00
35f8460e8a Merge pull request #1419 from dgarske/stm32f1
Added support for `WOLFSSL_STM32F1`
2018-03-07 08:51:22 -08:00
cd940ccb5c Merge pull request #1417 from dgarske/asn_x509_header
Cleanup of the ASN X509 header logic
2018-03-07 08:50:00 -08:00
71ba87bb4d Merge pull request #1416 from dgarske/fix_pluton_ecc_sign
Fix for Pluton ECC sign (2nd try)
2018-03-07 08:47:46 -08:00
89182f5ca9 Add assembly code for ARM and 64-bit ARM
Split out different implementations into separate file.
Turn on SP asm by configuring with: --enable-sp-asm
Changed small ASM code for ECC on x86_64 to be smaller and slower.
2018-03-07 11:57:09 +10:00
602874cff4 Merge pull request #1423 from ejohnstown/touch-file
Fix issue with the creation of dummy fips.h header.
2018-03-06 16:29:05 -08:00
a7fe5e3502 Fix issue with the creation of dummy fips.h header. 2018-03-06 13:15:35 -08:00
3f80006b25 add stub code for flag with x509 check host 2018-03-06 11:55:20 -07:00
fcae6d46be Merge https://github.com/wolfssl/wolfssl into doxygen_project 2018-03-06 10:16:21 -07:00
5a1bdff0bd Added wolfssl vs doxygen api checking, removed storing warnings and errors in files 2018-03-06 10:13:13 -07:00
5699afe63d Fix for minor typos in OPENSTM32 README.md. 2018-03-06 09:09:44 -08:00
5174ad77f2 Added support for WOLFSSL_STM32F1. 2018-03-06 09:07:43 -08:00
b879d138af Fix for using non-const as array sizer (resolves build error with VS). 2018-03-06 09:04:12 -08:00
57e9b3c994 Cleanup of the ASN X509 header and XSTRNCPY logic. 2018-03-05 16:11:12 -08:00
d75b3f99ac Proper fix for Pluton ECC sign. 2018-03-05 15:29:34 -08:00
317c890961 Fix minimum downgrade when NO_OLD_TLS is defined 2018-03-05 10:12:04 +10:00
dee74e98dd Fix downgrading when WOLFSSL_TLS13 is defined (despite NO_OLD_TLS being defined) 2018-03-05 10:11:51 +10:00
e95fa69a9b Merge pull request #1414 from JacobBarthelmeh/Certs
update certificate after dates
2018-03-02 15:17:25 -08:00
f223f8fdfd update certificate after dates 2018-03-02 14:31:08 -07:00
a82dc1ad22 Merge pull request #1413 from JacobBarthelmeh/Release
bump version to 3.14.0
2018-03-02 12:58:31 -08:00
48cd2806af Merge pull request #1412 from JacobBarthelmeh/PKCS12
clean up memory in error case with PKCS12 create
2018-03-02 12:37:12 -08:00
2c12b0d678 Merge pull request #1411 from ejohnstown/dtls-null-fix
DTLS Import/Export with Null Cipher
2018-03-02 11:41:04 -08:00
922d65d97c bump version to 3.14.0 2018-03-02 12:31:41 -07:00
ae23f777d6 clean up memory in error case with PKCS12 create 2018-03-02 11:35:16 -07:00
53c0bf6a20 Merge pull request #1408 from JacobBarthelmeh/Release
Testing in preparation for release
2018-03-02 10:12:27 -08:00
e698084eac Merge pull request #1406 from dgarske/mmcau_sha256_cast
Fix for cast warning with NXP CAU and SHA256.
2018-03-02 10:10:14 -08:00
edfe16ef8c Merge pull request #1410 from dgarske/fix_pluton_ecc_sign
Fix for pluton ECC sign
2018-03-02 11:07:01 -07:00
da76ee0877 allow import of DTLS sessions with null cipher as the null cipher is allowed with dtls when enabled 2018-03-02 09:57:07 -08:00
223903717a add sanity check for short read 2018-03-02 09:38:11 -07:00
f6869dfe09 AES ECB build with ARMv8 instructions enabled 2018-03-02 09:30:43 -07:00
f6d770b5bd Fix for pluton ECC sign. 2018-03-02 07:57:22 +01:00
223facc46a sanity check on index before reading from input 2018-03-01 18:03:21 -07:00
ae21c03d69 check on certificate index when getting Name 2018-03-01 18:00:52 -07:00
e80e82a89b sanity check on reading newline character 2018-03-01 18:00:52 -07:00
e7b0fefd7a add sanity check on read index 2018-03-01 18:00:52 -07:00
d46a2b449d fix for smallstack buffer size 2018-03-01 18:00:52 -07:00
df1c73c8e5 check for case that BER to DER API is available 2018-03-01 18:00:52 -07:00
db18e49920 gcc-7 warning about misleading indentation 2018-03-01 18:00:52 -07:00
2a368abd20 fix build for haproxy 2018-03-01 18:00:52 -07:00
b25ebf64b9 Merge pull request #1407 from ejohnstown/new-ca-cert
added another CA to the wolfssl website ca file
2018-03-01 17:58:19 -07:00
ecb2463bbe modify the client external test list to skip the test case when aes and aes-gcm are disabled 2018-03-01 15:22:38 -08:00
7b1f6967c8 added another CA to the wolfssl website ca file 2018-03-01 11:57:12 -08:00
ba40a71a3c added script so ensure doxygen api documentation matches wolfssl api 2018-03-01 10:27:30 -07:00
59c8d3cdf7 Fix for cast warning with NXP CAU and SHA256. 2018-03-01 08:06:29 +01:00
1b2e43478d Merge pull request #1405 from ejohnstown/selftest-errors
added error codes for the FIPS pairwise agreement tests in the POST
2018-02-28 14:16:59 -07:00
d035c1dd81 added error code for the FIPS DH agreement KAT test in the POST 2018-02-28 10:54:53 -08:00
b6aae0c2d1 Merge pull request #1402 from JacobBarthelmeh/Testing
Improve bounds and sanity checks
2018-02-28 09:45:19 -08:00
02970c9a11 Merge pull request #1404 from JacobBarthelmeh/Compatibility-Layer
reduce impact of NO_OLD_SHA256_NAMES macro
2018-02-28 16:12:37 +01:00
25e7dbd17a add comment on sanity check 2018-02-27 23:30:50 -07:00
5cc046eb6d added error codes for the FIPS pairwise agreement tests in the POST 2018-02-27 12:42:25 -08:00
06163f2bbb reduce impact of NO_OLD_SHA256_NAMES macro 2018-02-27 12:21:11 -07:00
91141e43c9 Merge pull request #1403 from cconlon/shadow_warnings
Fix shadow warnings on older compilers in tls_bench example
2018-02-27 08:32:56 -08:00
00b6419964 use XSTRLEN and revert adding outLen parameter 2018-02-26 16:52:09 -07:00
306600cba6 resolve variable shadow warnings on older compilers in tls_bench example 2018-02-26 16:14:15 -07:00
e6c95a0854 sanity check on input size 2018-02-26 14:41:00 -07:00
5ef4296b3d sanity check on buffer length with ASNToHexString 2018-02-26 14:25:39 -07:00
e4f40fb6c0 add sanity checks and change index increment 2018-02-26 13:55:56 -07:00
f7d70e4650 Merge pull request #1401 from kaleb-himes/NETOS-SV
possible shadowed global variable declaration in NETOS
2018-02-26 12:21:13 -08:00
442430d39e Merge pull request #1392 from ejohnstown/rsa-decrypt-check
RSA Decrypt Bounds Checking
2018-02-26 12:19:37 -08:00
f58619bb9f possible shadowed global variable declaration in NETOS 2018-02-26 11:48:33 -07:00
68b8557878 Merge pull request #1400 from JacobBarthelmeh/Testing
possible shadowed global variable declaration
2018-02-26 10:37:17 -08:00
512a0be75e possible shadowed global variable declaration 2018-02-26 09:52:51 -07:00
b527f6fb81 Merge pull request #1397 from JacobBarthelmeh/Optimizations
Optimizations
2018-02-26 08:43:22 -08:00
73dbc8f6e7 Merge pull request #1395 from JacobBarthelmeh/Certs
Add support for writing multiple OUs, DCs and for writing a unique EKU OID
2018-02-26 08:39:58 -08:00
a49553df6a RSA Decrypt Bounds Checking
1. Added some bounds checking on the ciphertext passed into the RSA decrypt function. NIST SP 800-56B specifies that the ciphertext shouldn't be a number larger than the modulus.
2. Added an API test to check that the direct RSA decrypt function returns an error with a "bad" message.
3. Added an ifndef guard to disable the bounds check. Default is to keep the bounds check.
4. RSA Decrypt bounds check only checked the first time into wc_RsaFunction().
2018-02-23 17:04:05 -08:00
942f39de3b cast return from XSTRLEN 2018-02-23 17:35:44 -07:00
9391c608cc remove error string function when no error strings is defined 2018-02-23 17:31:20 -07:00
f2cbab95b0 change _EncodeName, add test with wc_MakeCertReq, add XMEMSET with Cert init 2018-02-23 17:22:48 -07:00
1c2506f94c Merge pull request #1393 from SparkiDev/sp_math_dh
DH public key check working with sp-math
2018-02-23 16:15:15 -08:00
9b90cdc919 Merge pull request #1396 from JacobBarthelmeh/Testing
fix for static analysis warning of null dereference
2018-02-23 15:51:29 -08:00
22e55e72c1 Merge pull request #1394 from cconlon/selftest
Add CAVP-only Self Test for special build
2018-02-23 15:50:06 -08:00
be8cfcf587 Merge pull request #1379 from JacobBarthelmeh/Compatibility-Layer
Compatibility layer
2018-02-23 14:59:22 -08:00
9757effdc1 fix for static analysis warning of null dereference 2018-02-23 14:49:06 -07:00
79f13478df add AES macro guards and reduce code in GetName 2018-02-23 13:45:42 -07:00
453aa16e8d Add support for writing multiple OUs, DCs and for writing a unique EKU OID 2018-02-23 10:46:26 -07:00
ad53037852 add CAVP selftest option for special build 2018-02-23 10:14:56 -07:00
30e8429a3f DH public key check working with sp-math 2018-02-23 15:10:54 +10:00
89390180a0 Merge branch 'master' into Compatibility-Layer 2018-02-22 15:24:31 -07:00
6500c40015 Merge pull request #1386 from JacobBarthelmeh/RSA
add WC_RSA_NO_PADDING macro and WC_RSA_NO_PAD enum
2018-02-22 13:34:20 -08:00
fcb82d561e Merge pull request #1388 from cconlon/dh_check_pubkey
add wc_DhCheckPubKey_ex() with checks against large prime q
2018-02-22 13:10:03 -08:00
de4893486e add wc_DhCheckPubKey_ex() with checks against large prime q 2018-02-22 11:09:06 -07:00
63802849a1 remove magic number 2018-02-22 09:55:20 -07:00
41ae47fa3c Merge pull request #1390 from SparkiDev/tls13_downgrade
Fix downgrading from TLS v1.3 to TLS v1.2
2018-02-22 08:53:48 -08:00
dda7dbd7fd Merge pull request #1389 from JacobBarthelmeh/CAAM
fix unused function warning with CAAM and AES
2018-02-22 08:51:34 -08:00
4154492d4b Merge pull request #1387 from JacobBarthelmeh/Testing
fix for unused variables
2018-02-22 08:46:32 -08:00
06abc12d40 Merge pull request #1384 from SparkiDev/sp_math_dh
Enable DH public key check code with sp-math
2018-02-22 08:41:25 -08:00
5c07aadc41 Merge pull request #1383 from SparkiDev/explicit_curve
Explicit curve
2018-02-22 08:32:44 -08:00
20e7d2d426 Merge pull request #1380 from SparkiDev/ber_indef
Support indefinite length BER encodings in PKCS #7
2018-02-22 08:31:26 -08:00
6bf5f06397 Fixes from code review 2018-02-22 14:59:19 +10:00
7160384a19 Explicit curve data in public ECC key
Certificate's public key data contains more of the encoding.
PKCS #7 using public key from certificates calls proper decode.
2018-02-22 14:59:19 +10:00
274110a10c Added tests and fixes from testing 2018-02-22 14:58:37 +10:00
da4024b46a Fix downgrading from TLS v1.3 to TLS v1.2
Fix handling of ServerHello in TLS v1.3 to support TLS v1.2 when
downgrading.
Added support in client and server examples for using downgrade method:
wolfSSLv23_client_method_ex() or wolfSSLv23_server_method_ex().
Add tests, using downgrade version, of client or server downgrading from
TLS v1.3 to TLS v1.2.
2018-02-22 12:48:50 +10:00
76b0464a3b Fixes from review 2018-02-22 08:31:19 +10:00
312d1a2aaf fix unused function warning with CAAM and AES 2018-02-21 15:21:07 -07:00
fd7ffc992f fix for unused variables 2018-02-21 11:19:49 -07:00
08e199d78a add support for async with wc_RsaDirect function 2018-02-21 11:09:38 -07:00
7374e2e751 add WC_RSA_NO_PADDING macro and WC_RSA_NO_PAD enum 2018-02-21 10:10:35 -07:00
dc4edd0cd9 SNI fix for nginx 2018-02-21 23:48:43 +10:00
d1f19e8ecc Fix resumption code around when not available
Can't set a ticket if the encryption callback is NULL.
If no useable pre-shared key is found then we won't do PSK.
2018-02-21 17:45:13 +10:00
7d4c693d7e Enable DH public key check code with sp-math 2018-02-21 09:13:00 +10:00
3dfc2d87f3 Fix leak when wc_PKCS7_InitWithCert is called in verify 2018-02-21 08:29:50 +10:00
6dad94c0fa Change wc_BerToDer signature to have length as param
Clean up code to make readable
2018-02-21 08:29:50 +10:00
d09f26a69f Support indefinite length BER encodings in PKCS #7 2018-02-21 08:29:50 +10:00
7a2aa6bc13 Merge pull request #1382 from dgarske/cleanup_strncpy
Fixes for ensuring null termination on all strncpy calls
2018-02-20 08:18:08 -08:00
d34309b141 Merge pull request #1381 from JacobBarthelmeh/Testing
macro guard for redefinition warning
2018-02-20 08:14:30 -08:00
3586ae04dc Merge pull request #1373 from JacobBarthelmeh/Optimizations
Some memory optimizations
2018-02-20 08:13:02 -08:00
a275022dbe account for pwdbased being enabled with x509small 2018-02-19 17:32:39 -07:00
33b699f81a macro guards on PEM strings 2018-02-19 17:32:39 -07:00
e4df21df94 More cleanup for const strings. 2018-02-19 17:32:39 -07:00
772651c17a update tests and benchmark for HAVE_AES_DECRYPT 2018-02-19 17:32:39 -07:00
4614bd4e56 scan-build warning and AES key size builds for ARMv8 2018-02-19 17:32:39 -07:00
94b7ab92f3 fix for unused variable 2018-02-19 17:32:39 -07:00
801ce67fc9 surround BIO function with macro guard 2018-02-19 17:32:39 -07:00
2a15b3912b revert pkcs7 attrib structure for scep and add more macro guards for AES key size 2018-02-19 17:32:39 -07:00
8006b68cac more macro guards 2018-02-19 17:32:39 -07:00
c9525d9c1d add opensslextra=x509small build option 2018-02-19 17:32:39 -07:00
ae2306ebcf more structure packing and macro guards 2018-02-19 17:32:39 -07:00
e187ce42da more macro guards for asn 2018-02-19 17:28:53 -07:00
16a4aef18e clean up of macro guards on OIDs 2018-02-19 17:28:53 -07:00
02753e53a5 add some of AES key size macros to benchmark.c and test.c 2018-02-19 17:28:53 -07:00
7143b09786 pack PKCS7 structure 2018-02-19 17:28:53 -07:00
c2f660c0fc first round of adding AES key size macros 2018-02-19 17:23:49 -07:00
08696449f6 Merge pull request #1349 from JacobBarthelmeh/PKCS7
pkcs7 attribute parsing
2018-02-19 15:36:55 -08:00
44079e4bb8 Fixes for ensuring null termination on all strncpy calls. Cleanup of the null termination character '\0'; for char types. 2018-02-19 13:33:16 -08:00
b6f96d68be macro guard for redefinition warning 2018-02-19 14:11:41 -07:00
a2d96bad49 update SHA names with mcapi build 2018-02-19 09:29:21 -07:00
165059226e add HAVE_AES_ECB to enable all build 2018-02-16 17:06:26 -07:00
f569645212 add wolfSSL_SHA256 function 2018-02-16 16:57:45 -07:00
a651b08afa add wolfSSL_AES_ecb_encrypt function 2018-02-16 15:08:31 -07:00
223edab6d9 Merge pull request #1378 from dgarske/evp_gcc7_async_test
Fixes a few build errors with EVP/wolfCrypt test and async API test hang
2018-02-16 13:11:36 -07:00
62c2145e74 Merge pull request #1376 from JacobBarthelmeh/Compatibility-Layer
add wolfSSL_PEM_read_bio_RSAPrivateKey function
2018-02-16 10:20:07 -08:00
ae5dac8994 Fixes for GCC 7 build errors with evp.c and switch fall through. General EVP code formatting cleanup. Fix for wolfCrypt test un-used var when HAVE_AES_CBC not defined. Fix for async in test_wolfSSL_SESSION with err not being initialized. 2018-02-16 09:32:40 -08:00
488a795747 add wolfSSL_PEM_read_bio_RSAPrivateKey function 2018-02-15 22:34:50 -07:00
74ebf510a3 Merge pull request #1374 from dgarske/pub_ecc_mul2add
Add option for `ecc_mul2add` to be made as exposed API
2018-02-15 14:21:42 -08:00
cbd7612324 Merge pull request #1375 from dgarske/ifm_feedback
Add support for `WOLFSSL_NO_MALLOC` with memory callbacks
2018-02-15 14:19:21 -08:00
d8eff923f1 Merge pull request #1372 from JacobBarthelmeh/UnitTests
clear error node queue after test case and initialize logging buffer
2018-02-15 08:40:45 -08:00
8c8ed06202 Added the WOLFSSL_NO_MALLOC option for the realloc callback as well. 2018-02-15 07:15:30 -08:00
32547e280a Added ecc_mul2add to ecc.h header and is exposed as an API if WOLFSSL_PUBLIC_ECC_ADD_DBL is defined. 2018-02-15 07:04:29 -08:00
8285648e46 Fix to support using memory callbacks with no malloc / free using WOLFSSL_NO_MALLOC. Fix to only include <errno.h> if LWIP_PROVIDE_ERRNO is not defined. 2018-02-15 06:54:14 -08:00
ad1fc26d4e Merge pull request #1370 from JacobBarthelmeh/Testing
check on verify depth for certificates with opensslextra
2018-02-14 16:29:25 -08:00
1b98ccbac8 add else condition for logging string with OPENSSL_EXTRA 2018-02-14 17:21:42 -07:00
9ff97997a6 Merge pull request #1360 from SparkiDev/sp_math
Minimal implementation of MP when using SP.
2018-02-14 15:49:23 -08:00
a7a8ce8721 Merge pull request #1371 from ejohnstown/asn-fix
Update wc_GetKeyOID()
2018-02-14 15:10:01 -08:00
641af487ea Changed missed MP_API change 2018-02-15 08:23:49 +10:00
c1b1fbaf7e clear error node queue after test case 2018-02-14 13:55:43 -07:00
0853fcb202 Update wc_GetKeyOID()
1. Check that the algoID is not NULL.
2. Initialize algoID to 0.
3. Moved the key variables around.
2018-02-14 12:43:02 -08:00
9a4fe0fe4e Merge pull request #1353 from dgarske/asn_strict
Added RFC 5280 "must" checks
2018-02-14 10:01:58 -08:00
2e15842ef2 revert verify depth check and increase array size to account for possible cert index 2018-02-14 10:01:22 -07:00
09f1247007 Support WOLFSSL_PUBLIC_MP define in SP math 2018-02-14 15:30:33 +10:00
b18fdea2ce Fixes from code review 2018-02-14 11:09:20 +10:00
4b5524b39a Merge pull request #1368 from JacobBarthelmeh/PKCS12
add check for having ECC enabled when testing with ECC certificate
2018-02-13 11:42:11 -08:00
8b5864c475 Merge pull request #1366 from ejohnstown/hmac-sha3
HMAC-SHA-3
2018-02-13 11:41:34 -08:00
4d04f0951c Merge pull request #1363 from SparkiDev/tls13_draft23
Support TLS v1.3 Draft 23
2018-02-13 11:39:53 -08:00
9bb29c46e3 Merge pull request #1347 from kaleb-himes/SGX-FIPS-WINDOWS
windows configuration changes
2018-02-13 10:38:25 -07:00
6f1e5383da check on verify depth for certificates with opensslextra 2018-02-13 10:29:23 -07:00
e48eb1ded8 added hmac-sha-3 2018-02-12 13:24:06 -08:00
c09e55c749 add check for having ECC enabled when testing with ECC certificate 2018-02-12 09:59:35 -07:00
95ed1a88ed Merge pull request #1364 from SparkiDev/aesni_authtagsz
AES-GCM AES-NI code now handles different tag lengths
2018-02-09 13:19:14 -08:00
e254f25baf Merge pull request #1359 from SparkiDev/nginx_fixes
Fixes to get Nginx working again.
2018-02-09 13:17:38 -08:00
44be47a83b Merge pull request #1358 from dgarske/fix_aesgcm_emb
Fix for missing `ret` in some `wc_AesGcmEncrypt` functions
2018-02-09 13:16:21 -08:00
a27d2448e2 Merge pull request #1344 from dgarske/portability_cleanups
Portability cleanups and `tls_bench` fixes
2018-02-09 13:15:47 -08:00
d827e93af9 Merge pull request #1329 from JacobBarthelmeh/PKCS12
PKCS12 reverse order that certificates are compared for keypair
2018-02-09 13:15:07 -08:00
87179837e7 Merge pull request #1365 from cconlon/p7karifix
detect and set keyAgreeOID from CMS EnvelopedData if user has not set
2018-02-09 13:27:40 -07:00
fa676d96cf detect and set keyAgreeOID from CMS EnvelopedData if user has not set 2018-02-09 09:37:51 -07:00
35c993e55d AES-GCM AES-NI code now handles different tag lengths
Encrypt and decrypt code modified.
AES-NI, AVX1 and AVX2 code modified.
Test of 15 byte tag added.
2018-02-09 17:21:06 +10:00
0da8694ff3 Fix Hello Retry Request parsing of new KeyShare choice 2018-02-09 11:12:04 +10:00
9a0c822582 Support TLS v1.3 Draft 23
Change KeyShare number.
Support SignatureAlgorithmsCert extension - nothing done with
information as only one chain supported on server.
Compiling for Draft 22 supported: --enable-tls-draft22
Compiling for Draft 18 still supported.
2018-02-09 10:42:15 +10:00
e8a5af2651 Merge pull request #1362 from ejohnstown/aesgcmtest
Add AES-GCM Test Case
2018-02-08 16:41:06 -08:00
6907241180 Add AES-GCM Test Case
Added a new AES-GCM test case where the provided IV is of length 1 byte.
2018-02-08 11:37:21 -08:00
fab99f9f44 Merge https://github.com/wolfssl/wolfssl into doxygen_project 2018-02-08 10:13:43 -07:00
17e88b47f6 Migrated documentation directory to doc. README updated. Error fixes. Moved make options to doc/include.am 2018-02-08 10:05:30 -07:00
a3a4f2d59c Minimal implementation of MP when using SP.
--enable-sp-math to include minimal implementation of MP (only with
--enable-sp.)
Add futher functionality for ECC (conditionally compiled):
- check key
- is point on curve
- API to add and double projective points
- API to map from project to affine
- Uncompress point (including sqrt)
Some configuration options will not work with SP math - configure.ac
detects this and errors out.
Change test code to better support SP sizes only.
2018-02-08 15:50:17 +10:00
297fb1a447 Fixes to get Nginx working again.
Only use weOwnDH as Nginx can change from client to server.
Allow TLS v1.3 with client method for Nginx.
2018-02-08 11:14:31 +10:00
62b8c0c3fd add test case for order of certificates with PKCS12 parse 2018-02-07 16:52:39 -07:00
fbdcd3c67f Fix for missing ret in some wc_AesGcmEncrypt functions due to refactor in commit 0765aa0. 2018-02-07 15:40:28 -08:00
c2a0de93b8 Fix to resolve wolfCrypt test for `cert_test nameConstraints test. Fixed ASN check to properly determine if certificate is CA type. 2018-02-07 12:48:33 -08:00
266b6fe7a7 Merge pull request #1356 from JacobBarthelmeh/Compatibility-Layer
Fix for Windows FIPS build
2018-02-07 13:18:36 -07:00
4a6bb20ba6 Refactor the VERIFY_AND_SET_OID macro to simplify so it works on older C compilers like Visual Studio. 2018-02-07 12:17:03 -08:00
d78e45dbb6 Added check to enforce RFC 5280 Sec 4.2: "A certificate MUST NOT include more than one instance of a particular extension". Refactor of the DecodedCert struct to combine bit type options into bit-fields. Fix for wolfCrypt test for error codes to allow -161. 2018-02-07 11:15:22 -08:00
d9002bb072 Fix to enforce RFC 5280 Sec 4.2.1.6: "The name MUST NOT be a relative URI". Verifies the URI contains "://". Can be disabled using WOLFSSL_NO_ASN_STRICT. 2018-02-07 11:15:22 -08:00
f4ad808d12 Added check to enforce RFC 5280 Sec 4.2.1.10 rule: "The name constraints extension, which MUST be used only in a CA certificate". Added new define WOLFSSL_NO_ASN_STRICT to restore old behavior for compatability. Fix wc_port time HAVE_RTP_SYS (noticed it was missed during ASN time move to wc_port). 2018-02-07 11:15:22 -08:00
3e05118995 * Added the tls_bench example to the build output when threading is supported.
* Fixed some `tls_bench` build issues with various configure options.
* Moved the `WOLFSSL_PACK` and `WC_NORETURN` macros into types.h.
* Added support for `__builtin_bswap32` and `__builtin_bswap64`. Since the performance of the builtins varries by platform its off by default, but can be enabled by customer using `WOLF_ALLOW_BUILTIN`. Quick check on x86 showed the 32-bit swap performance matched, but 64-bit swap was slower.
2018-02-07 11:13:13 -08:00
e1c246f918 Merge pull request #1355 from JacobBarthelmeh/Testing
Fix for build with having opensslextra and IGNORE_NAME_CONSTRAINTS
2018-02-07 11:12:55 -08:00
69db17fcda Merge pull request #1352 from dgarske/freertos_static
Fix to allow `FREERTOS` and `WOLFSSL_STATIC_MEMORY`
2018-02-07 10:06:51 -08:00
012fb31f00 Merge pull request #1351 from dgarske/fix_ipv6
Fix for building with IPV6
2018-02-07 10:04:41 -08:00
7769ba83ad Merge pull request #1346 from dgarske/stm32_hash_ctx
STM32 Hashing Improvements
2018-02-07 10:03:50 -08:00
47aa4bbe2f handle disable md5 case 2018-02-07 10:44:16 -07:00
61da8ec1dc Fix for Windows FIPS build 2018-02-07 10:13:28 -07:00
a1a1ca9991 Fix for build with having opensslextra and IGNORE_NAME_CONSTRAINTS 2018-02-07 09:54:24 -07:00
9afd26e853 Fixes for better supporting FREERTOS with and without static memory. Added fallback case to use pvPortMalloc/vPortFree when heap ptr not available. 2018-02-06 09:28:27 -08:00
b3b3a28616 Fix logic typo for IPV6 any addr. 2018-02-06 09:18:42 -08:00
172989c3c4 Merge pull request #1343 from ghoso/dev201801
Fix decryption error when EVP_CipherInit is called mulitple times.
2018-02-05 16:51:08 -08:00
82850422fc Merge pull request #1338 from JacobBarthelmeh/Testing
set have session id flag
2018-02-05 14:58:55 -08:00
0be1c10fcd Moved the STM32 functions to their own .c file. Added GPL header. Finished testing on STM32 CubeMX with F4 and F7 and StdPeriLib with F4. 2018-02-05 12:57:06 -08:00
4803b3316e Update settings.h 2018-02-05 13:05:24 -07:00
81b64742f3 Fix to allow FREERTOS and WOLFSSL_STATIC_MEMORY. 2018-02-05 11:55:35 -08:00
1ca56f97a4 Fix warning with pointer compare to zero for IPV6 peer == INADDR_ANY in test.h. Fixes issue #1350. 2018-02-05 11:03:19 -08:00
a196fac0c2 itterate through certificates with PKCS7 2018-02-05 10:52:54 -07:00
0765aa0f20 Merge pull request #1342 from SparkiDev/aes_gcm_sb2
Improve performance of AES-GCM for AVX1 and AVX2
2018-02-02 10:56:14 -08:00
7ad0ea808c Merge pull request #1341 from JacobBarthelmeh/master
fix build for OLD_HELLO_ALLOWED macro
2018-02-02 10:53:16 -08:00
02ef52c3cd Merge pull request #1340 from dgarske/ecc_pub_import_wcurve
Adds curve information to public key import for `wc_EccPublicKeyDecode`
2018-02-02 10:52:06 -08:00
d63373066b Merge pull request #1331 from JacobBarthelmeh/Compatibility-Layer
add comments and better error checking for PKCS8 strip
2018-02-02 10:50:29 -08:00
c66ebb6748 Merge pull request #1317 from SparkiDev/chacha20_sb_avx2
Improve performance of chacha20-poly1305 on AVX and AVX2.
2018-02-02 10:46:39 -08:00
19ce41c3cc pkcs7 attribute parsing 2018-02-02 09:01:32 -07:00
f5c33a9362 added force flag to not through warning if no file present to remove 2018-02-01 10:23:10 -07:00
841e75afcf Merge branch 'master' of https://github.com/wolfssl/wolfssl 2018-02-01 09:47:13 -07:00
a6bab49f8a fixed bn.h header 2018-02-01 09:43:11 -07:00
15486ae379 windows configuration changes 2018-01-31 15:09:16 -07:00
a4a5f4f27a STM32 refactor to move hashing code into wolfssl/wolfcrypt/port/stm32.h. Supports CubeMX HAL or StdPeriLib with MD5, SHA1, SHA224 and SHA256. Detects if hardware supports SHA2. Adds hashing context save/restore and hashing clock/power optimizations. Fix for building *.c in wolfcrypt/src/port for caam_driver.c. Fix for warning with wolfSSL_CryptHwMutexUnLock when no threading defined and return code not checked. 2018-01-31 11:25:20 -08:00
640015ed5f Merge pull request #1345 from kaleb-himes/SGX-FIPS-UPDATES
Updates to settings necessary for SGX FIPS
2018-01-31 11:09:19 -07:00
5b083497da Merge pull request #1300 from kaleb-himes/SGX-FIPS-LINUX
Add build scripts for default SGX build and improve cleanup
2018-01-31 09:34:06 -07:00
0101440cc8 Fix decryption error when EVP_CipherInit is called mulitple times. 2018-01-31 17:08:06 +09:00
1af85cf9c4 Update include.am 2018-01-30 15:39:20 -07:00
7facff2fd2 Feedback update 2018-01-30 15:36:18 -07:00
229d98e1f8 Updates to settings necessary for SGX FIPS 2018-01-30 15:30:52 -07:00
03fe54dcc4 Update following review 2018-01-30 14:30:44 -07:00
3d3b9f69a6 Test larger variable data size if available 2018-01-30 12:21:25 +10:00
e82e3d3d6e Improve performance of AES-GCM for AVX1 and AVX2 2018-01-30 12:00:13 +10:00
9d7374348b Fix the ecc_decode_test to use a real OID (instead of 1), so the tests work properly. 2018-01-29 15:58:04 -08:00
580a55ce49 fix build for OLD_HELLO_ALLOWED macro 2018-01-29 14:55:32 -07:00
90a3daa887 Adds curve information to public key import for wc_EccPublicKeyDecode. Cleanup to remove the ECC_CHECK_PUBLIC_KEY_OID define. The call to wc_ecc_get_oid does the same check as CheckCurve. 2018-01-29 12:09:12 -08:00
ca5b1dbbcb set have session id flag 2018-01-26 14:18:36 -07:00
d179e442b4 Merge pull request #1337 from dgarske/pkcs7_pad
Expose the PKCS 7 pad functionality `wc_PKCS7_PadData`
2018-01-26 10:01:07 -08:00
058c2a7a25 Made public the wc_PKCS7_GetPadSize API. Cleanup to use GetPadSize for the wc_PKCS7_PadData. 2018-01-25 08:14:56 -08:00
4d75f337bb Fix AVX2 final func to reset state 2018-01-24 16:36:44 -08:00
776e222143 Merge pull request #1336 from SparkiDev/sha256_freescale
Transform_Sha256 no longer passed a buffer - fix for FREESCALE
2018-01-23 14:51:30 -08:00
138bc3e6cc Enhancement to expose the PKCS 7 pad functionality (wc_PKCS7_PadData). 2018-01-23 13:21:56 -08:00
11ea2689d8 Transform_Sha256 no longer passed a buffer - fix for FREESCALE 2018-01-23 12:45:17 -08:00
e476cb2958 Merge pull request #1334 from dgarske/fix_asn_leak
Fix for possible leak in error case for `wc_RsaKeyToDer`
2018-01-22 23:20:39 -07:00
4e10173eed Fix for possible leak in error case for wc_RsaKeyToDer. 2018-01-22 16:17:08 -08:00
79f4b963cd Merge pull request #1333 from SparkiDev/tls13_no_server
Make TLSX_SetResponse available in client and server
2018-01-22 07:43:37 -08:00
6e6085501d Make TLSX_SetResponse available in client and server 2018-01-21 18:12:34 -08:00
72b8b71082 Merge pull request #1332 from kojo1/part5
fix shadow global
2018-01-21 16:48:12 -08:00
162326dfcb fix shadow global 2018-01-22 01:19:45 +09:00
4d1ebc0827 Merge pull request #1330 from wolfSSL/revert-1315-aes_gcm_sb
Revert "Improve AES-GCM code for Intel AVX1 and AVX2"
2018-01-19 17:49:19 -07:00
1428934ad5 add comments and better error checking for PKCS8 strip 2018-01-19 16:53:12 -07:00
f06abdb3ae Revert "Improve AES-GCM code for Intel AVX1 and AVX2" 2018-01-19 15:12:08 -08:00
085d3dae14 Merge pull request #1315 from SparkiDev/aes_gcm_sb
Improve AES-GCM code for Intel AVX1 and AVX2
2018-01-19 15:09:34 -08:00
9045a2562a Merge pull request #1316 from JacobBarthelmeh/Testing
Fix for AES-CFB with --enable-armasm and fix for windows fips tests
2018-01-19 15:02:53 -08:00
8d27a2720c Merge pull request #1325 from SparkiDev/bench_rsa
Added option to benchmark RSA sign/verify instead of enc/dec
2018-01-19 14:52:40 -08:00
0059266b21 Merge pull request #1328 from dgarske/fix_async_rsapss
Fixes for wolfCrypt test RSA PSS with async enabled
2018-01-19 14:52:09 -08:00
d5c1cf4fc7 Merge pull request #1327 from dgarske/ignore_file_warn
Added `WOLFSSL_IGNORE_FILE_WARN` option
2018-01-19 14:51:31 -08:00
2efe7f6d96 Merge pull request #1319 from JacobBarthelmeh/Compatibility-Layer-Part5
Compatibility layer part4
2018-01-19 14:49:12 -08:00
213a2d0a7d reverse order that certificates are compared with private key when parsing PKCS12 2018-01-19 15:41:52 -07:00
be98e3e7f3 build condition for SendAlerts and fix free of x509 store 2018-01-19 09:48:02 -07:00
025ba1445e add WOLFSSL_VERIFY_CB_ALL_CERTS macro 2018-01-18 18:26:32 -07:00
8a0bbb0faf Fixes for wolfCrypt test RSA PSS with async enabled. 2018-01-18 15:35:21 -08:00
5d52466d6f Merge pull request #1326 from ejohnstown/rsa-test-fix
RSA Key Generation Test Fix
2018-01-18 15:01:55 -08:00
f61e56e5b6 Merge pull request #1312 from kojo1/mdk5
CMSIS pack 3.13.0
2018-01-18 14:48:37 -08:00
9654f19075 RSA Key Gen Test Fix
A recent change to the RSA key generation process is capping the number of attempts of finding a probable prime to a multiple of the prime's size, in FIPS builds. This means it might fail once in a while. (It could also fail for a couple other reasons but this is the most likely.) The API is changed to retry key generation until it succeeds. Non-FIPS builds keep trying until they find a prime.
2018-01-18 12:20:25 -08:00
584520c9b4 increase static memory bucket size with session certs 2018-01-18 10:59:20 -07:00
377f5c304c update for async build and include for getenv 2018-01-18 09:05:21 -07:00
f2079ca792 Added option to benchmark RSA sign/verify instead of enc/dec 2018-01-18 11:35:19 +10:00
2a308bdda9 add some comments and return domain name 2018-01-17 17:39:17 -07:00
a0f5126076 build option fixes 2018-01-17 16:40:06 -07:00
db970b685a Merge pull request #1324 from kaleb-himes/INLINE-STATUS
Add status of inline configure option to feature output
2018-01-17 15:36:50 -08:00
98f85c9235 wolfssl_tcp_select 2018-01-18 07:25:09 +09:00
f79a3e9ddb Reverse ByteReversWOrd64 2018-01-18 07:10:55 +09:00
cfe88b37f6 SOCK_LISTEN_MAX_QUEUE, listen arg 2018-01-18 07:04:48 +09:00
1f0171d79b hard tab 2018-01-18 07:03:19 +09:00
c7ce6ce772 fix main.c under projects 2018-01-18 07:00:51 +09:00
1276d21d8e Added WOLFSSL_IGNORE_FILE_WARN option to ignore warning for .c files that do not need to be included. 2018-01-17 13:27:59 -08:00
ed95fca448 Add status of inline configure option to feature output 2018-01-17 14:20:49 -07:00
0b8c069119 Merge pull request #1323 from JacobBarthelmeh/RSA-min
adjustment to RSA key size check
2018-01-17 13:12:47 -08:00
54acc2df51 Merge pull request #1318 from SparkiDev/tls13_draft22
Changes for TLS v1.3 Draft 22
2018-01-17 11:22:50 -08:00
19288ea127 casting values, update names, g++ build 2018-01-17 12:18:00 -07:00
fa3ab4fd61 adjustment to RSA key size check 2018-01-17 11:34:27 -07:00
676e2f1f63 add comments and remove 2999 bit rsa key test for now 2018-01-17 11:19:21 -07:00
57cbd5e53c Merge pull request #1322 from SparkiDev/poly1305_clang_fix
Fix clang using wrong registers in poly1305 AVX2 code
2018-01-17 08:30:33 -08:00
2dc60b9e01 Merge pull request #1321 from SparkiDev/fe_init_small_fix
Fix fe_init implementation to appear for small Ed25519
2018-01-17 08:30:13 -08:00
bf57da1914 static analysis fixes, free buffer return in test case, fips build 2018-01-17 09:28:25 -07:00
4915a784ec Fix clang using wrong registers in poly1305 AVX2 code 2018-01-17 15:02:58 +10:00
c09d972012 Fix fe_init implementation to appear for small Ed25519 2018-01-17 11:34:22 +10:00
5f14de33e7 Changes for TLS v1.3 Draft 22
Middlebox compatibility available too.
2018-01-17 09:38:11 +10:00
60b329f7e5 fix example client error print out and ASN1_TIME_print after rebase 2018-01-16 15:39:58 -07:00
b3ab0a9c11 simplify visibility control 2018-01-16 14:59:50 -07:00
dce628ae8e Eliminate dup _InitHmac 2018-01-16 14:59:48 -07:00
56efe657fc save iPad, oPad. test long key 2018-01-16 14:57:53 -07:00
30e6ec5396 HMAC_CTX_copy, copy save_len, save_key 2018-01-16 14:54:44 -07:00
e93d7d3c93 fix for MD5 case, "recover hmac", in HMAC_init 2018-01-16 14:54:44 -07:00
937c759998 HMAC_Init, keylen arg check 2018-01-16 14:54:44 -07:00
f38a321e64 HMAC_Init_ex with NULL key to recover Hmac initial state 2018-01-16 14:54:43 -07:00
8f1fc8ad2e Error return value of checkPad 2018-01-16 14:51:44 -07:00
ed0d4d3b06 Add ECB in wolfSSL_EVP_get_cipherbyname 2018-01-16 14:51:44 -07:00
13325606b7 Peer cert ASN PARSE ERROR 2018-01-16 14:51:42 -07:00
6f44969e23 Signature check compatibility 2018-01-16 14:48:56 -07:00
2fdf98ebd4 eliminate redandant pad block, DES3 2018-01-16 14:48:56 -07:00
e8d628f61b wrap up no certificate alert related code in OPENSSL_EXTRA directive. 2018-01-16 14:48:55 -07:00
f690a980bf Avoid duplicated callback when error is overriden 2018-01-16 14:48:53 -07:00
92c9ff5f48 reset cipher suites after call to wolfSSL_set_options 2018-01-16 14:45:58 -07:00
0a3d6534c7 add SanityCheckMsgReceived in ProcessOldClientHello 2018-01-16 14:42:17 -07:00
d6e22346e3 Regarding with commit #4899aad884880bb8ef1859ea6b57eded013cd2b4, send no certificate alert only if SSLv3, otherwise proceed with size 0 certificate. 2018-01-16 14:42:17 -07:00
a918dfdb33 discard session chain in SSL_clear 2018-01-16 14:42:17 -07:00
2a4766198a add SendAlert(ssl, alert_fatal, bad_certificate); 2018-01-16 14:42:15 -07:00
401db67bcd WOLFSSL_MIN_DOWNGRADE, default: TLSv1_MINOR 2018-01-16 14:41:03 -07:00
5a40d8b3c2 rollingback certErr_ovrdn, VerifyCallback 2018-01-16 14:41:01 -07:00
dbad348537 DES3_cbc_encrypt with fragmentary size 2018-01-16 14:39:42 -07:00
a19813eab2 CertificateVerify, getting past when the error is overridden by VerifyCallback 2018-01-16 14:39:40 -07:00
2f1f86d5f2 VerifyCallback with any reason 2018-01-16 14:35:10 -07:00
8336e02931 send no certificate alert on SSLv3 if certificate size is 0. 2018-01-16 14:32:52 -07:00
b40218f7f4 certificate verify callback override 2018-01-16 14:32:50 -07:00
3d0c850e10 Change to send certificate message on SSLv3 even though certificate size is 0. 2018-01-16 14:27:50 -07:00
21a14403c6 wolfSSL_set_options behavior with downgrade version 2018-01-16 14:27:50 -07:00
973bac429c eliminate dupricate callbacks on -188 error 2018-01-16 14:27:48 -07:00
2cee800127 verifyCallback and SendAlert on invalid certificate, 2018-01-16 14:24:00 -07:00
4ab0934000 Merge branch 'Compatibility-Layer-Part5' of https://github.com/JacobBarthelmeh/wolfssl into Compatibility-Layer-Part5 2018-01-16 14:16:14 -07:00
c80cadb25f DES_set_odd_parity to MLB 2018-01-16 14:12:43 -07:00
a3ad8c5bae Implement DomainComponent in wolfSSL_X509_NAME_get_index_by_NID() and wolfSSL_X509_NAME_get_entry(). 2018-01-16 13:50:01 -07:00
aa99031346 restore WOLFSSL_NEITHER_END value. 2018-01-16 13:50:01 -07:00
4b13a0f301 Fix code review suggestion. 2018-01-16 13:50:01 -07:00
0edd97293d Add read or write phrase at each transaction message in wolfSSL_state_string_long(). 2018-01-16 13:50:01 -07:00
54a006f47d correct wolfSSL_get_state() by code review suggestion. 2018-01-16 13:50:00 -07:00
eb9c225304 Change to 2 dimension array as messages store in wolfSSL_state_string_long(). 2018-01-16 13:50:00 -07:00
fd05de8346 Fix some memory issues in wolfSSL_state_string_long(). 2018-01-16 13:50:00 -07:00
a32ae3e516 Change to kick info callback when state transition occurs. 2018-01-16 13:50:00 -07:00
7210e881a8 eliminate empty if body 2018-01-16 13:50:00 -07:00
b6abf4596e SetDhInternal in DH_compute_key 2018-01-16 13:49:59 -07:00
a643ae1907 return code of sk num, X509 store peer chain, and get text by NID fix 2018-01-16 13:49:58 -07:00
19244fc0c9 fix memory management 2018-01-16 13:44:53 -07:00
01cd58cc43 fix wolfSSL_DH_1536_prime 2018-01-16 13:44:53 -07:00
cc5e9e3dae adjustment for verify callback and certificate error depth 2018-01-16 13:44:52 -07:00
0b4e499e1d MD4 in md_tbl 2018-01-16 13:37:27 -07:00
47bca28b1d Fix compatibility, inl == 0, EVP_CipherUpdate 2018-01-16 13:37:26 -07:00
43ae3c9f59 ASN_PARSE_E in GetASNInt 2018-01-16 13:36:35 -07:00
3af8975a66 shadow global value error with cross-compiler 2018-01-16 13:34:35 -07:00
a6e6cc781d fix comment on function 2018-01-16 13:25:46 -07:00
934d149931 macro guards for checking if sha features used 2018-01-16 13:25:44 -07:00
a18c1abc13 add comments for SHA1 function 2018-01-16 10:39:22 -07:00
479b7e5ca8 SHA1 implementation and test 2018-01-16 10:39:22 -07:00
7cc7de9d4a add set msg callback tests 2018-01-16 10:39:21 -07:00
990e1f3ddf implement wolfSSL set msg callback function 2018-01-16 10:39:20 -07:00
01e6feb060 add hmac ctx copy testing to unit tests 2018-01-16 09:27:39 -07:00
47a2783cf1 size of buffer with DES ecb encrypt 2018-01-16 09:27:37 -07:00
982e9ab8ad implement hmac ctx copy function 2018-01-16 09:25:51 -07:00
b9001d3c4d implement X509 store ctx set error function 2018-01-16 09:12:02 -07:00
86112a574f implement X509 store ctx get ssl idx 2018-01-16 02:29:51 -07:00
e1d71d7ab8 add macro guard to RSA key generation 2018-01-16 02:17:43 -07:00
c8381afdc1 implement asn1 object to nid function 2018-01-16 02:17:43 -07:00
189a4d74c0 implement get error line data function 2018-01-16 02:17:42 -07:00
f393eb9176 implement ssl set session id context 2018-01-16 02:17:42 -07:00
ede8127569 implement function for setting CTX verify depth 2018-01-16 02:17:40 -07:00
762b7144e0 implement WOLFSSL get app data and set app data functions 2018-01-16 02:13:16 -07:00
3089fa2d27 group sk x509 functions together and implement sk x509 pop free 2018-01-16 02:10:15 -07:00
b369112ed3 implement CTX check private key function 2018-01-16 01:53:05 -07:00
86deb23d2f put a macro guard on stub functions and implement quick ones, alo update macro guards on recent BN and RSA tests 2018-01-16 01:51:00 -07:00
266132521c implement RSA key generation compatibility function and BN get word 2018-01-16 01:50:58 -07:00
248dce258e update dynamic type when freeing bio mem 2018-01-16 01:44:32 -07:00
39126cbb63 move variable declaration to top of function and silence compiler warning 2018-01-16 01:44:30 -07:00
fcb1a10a3c upadte memory bio read and setting bios in ssl struct 2018-01-16 01:42:34 -07:00
d0d762c1a2 add 1536bit DH prime from RFC 3526 2018-01-16 01:28:24 -07:00
bbff8f00ae WOFLSSL_STUB: SSL_CTX_check_private_key 2018-01-16 01:27:36 -07:00
d3f4845c55 EVP_PKEY_decrypt return value 2018-01-16 01:25:17 -07:00
47f234dce2 add wolfSSL_EVP_md4 function 2018-01-16 01:22:48 -07:00
ca50d13149 update const type compatibility 2018-01-16 01:18:32 -07:00
60ea23a6de fix invalid check on unsigned type 2018-01-16 01:18:30 -07:00
ad6cc6be2e fix clang build warnings and change return type 2018-01-16 01:12:11 -07:00
db3badb73a add GENERAL NAME stack functions and fix WOLFSSL_BIO free with files 2018-01-16 01:12:09 -07:00
6455801518 add TLSv1 method, getter function for cipher key length, and start stack functions 2018-01-16 00:58:33 -07:00
071e11ed58 Remove key->rsa setting in EVP_PKEY_get1_RSA 2018-01-16 00:29:08 -07:00
2cc7057071 Rollback 2018-01-16 00:29:07 -07:00
b7ffc263cf set pkey->rsa in d2i_PUBKEY 2018-01-16 00:29:07 -07:00
522e989292 set pkey->rsa in EVP_PKEY_get1_RSA 2018-01-16 00:29:07 -07:00
84bc5ba678 update DER to internal public key and add alert functions 2018-01-16 00:29:05 -07:00
1d792b0b44 detect SHA256, SHA384, and SHA512 NID types when signing 2018-01-16 00:19:53 -07:00
1f8df3e403 fix copy of RSA key from WOLFSSL_EVP_PKEY 2018-01-16 00:16:34 -07:00
32ca91cd2f fix return value type of fread 2018-01-16 00:16:34 -07:00
d1c05c1883 fix DER to internal private key function 2018-01-16 00:14:08 -07:00
d7e844d7a2 Refined NO_WOLFSSL_STUB 2018-01-16 00:05:33 -07:00
f49e58a169 Eliminat cross compiler warnings: BUF_MEM, SESSION_set_ex_data 2018-01-15 23:43:34 -07:00
7baa65e515 OpenSSL_add_all_digests, ciphers() to wolfCrypt_Init() 2018-01-15 23:40:02 -07:00
f5913d875f return type compatibility AES_set_encrypt/decrypt_key 2018-01-15 23:39:52 -07:00
31fe154d1c removed STUB mark from wolfSSL_ERR_load_crypto_strings 2018-01-15 23:34:15 -07:00
18019f1bae evp key flags and add WOLFSSL_BUF_MEM struct to WOLFSSL_BIO 2018-01-15 23:34:13 -07:00
4ab9cc65f3 fix EVP_get_cipherbyname("RC4") 2018-01-15 23:17:05 -07:00
46a0cedb08 return value for printing asn1 time 2018-01-15 23:17:03 -07:00
be1aba1f70 Improve performance of chacha20-poly1305 on AVX and AVX2.
Create an AVX2 version of the small block size chacha20 encryption code.
Only update the poly1305 once for the two lengths in chacha20-poly1305.
Poly1305 AVX2 uses AVX code to handle last bytes, store H whole.
Fix error codes in poly1305 test and add a longer data test case.
2018-01-16 13:45:36 +10:00
9a2b1636f9 xstat2err stat shadows global 2018-01-15 18:26:10 -07:00
8db170250e add support for file type BIO to PEM read private key 2018-01-15 18:03:24 -07:00
90179e554e add RC4 to EVP_get_cipherbyname 2018-01-15 18:03:24 -07:00
8ae1b7823e ecc.c, logging.c: local value shadows global 2018-01-15 18:03:21 -07:00
32bf163633 update base64 WOLFSSL_BIO encoding and checking session context ID 2018-01-15 17:54:46 -07:00
b5ab505d1e testing with WOLFSSL_BIO write 2018-01-15 17:40:51 -07:00
cda44c89ac account for different build options 2018-01-15 17:40:46 -07:00
dc4159546b refactor WOLFSSL_BIO read/write to bio.c and update read and write for base64 formating 2018-01-15 17:22:54 -07:00
91632d64f1 word32 casting inSz, wolfSSL_d2i_PrivateKey 2018-01-15 16:19:58 -07:00
c20bff79ad fix to fix EVP_CipherFinal stream cipher outlen 2018-01-15 16:19:57 -07:00
52a89349dd resolves redefinition warnings with clang builds 2018-01-15 16:13:45 -07:00
60b21ffa62 add compat functions; rand egd, rand file, bio_f_base64, bio pop, bio set flags, crypto set id callback, crypto set locking callback, evp pkey get1 RSA, PEM write bio RSA private key, set info callback and alter ERR GET REASON 2018-01-15 16:06:36 -07:00
d0abfbf3f3 turn on AES Direct if AES-CFB is enabled 2018-01-15 16:00:31 -07:00
455ffc2ad7 fix for windows fips build 2018-01-15 15:39:33 -07:00
6fd949279d fix EVP_CipherFinal outlen for stream cipher 2018-01-15 13:48:31 -07:00
27a9b23d2b fix ToTraditionalInline inSz type 2018-01-15 13:46:19 -07:00
930930ebc4 update DER to internal function with private RSA key 2018-01-15 13:46:18 -07:00
de2e7d4f75 fix some WOLFSSL_STUB api names 2018-01-15 13:46:17 -07:00
9910c51e67 add #ifndef NO_WOLFSSL_STUB 2018-01-15 13:41:55 -07:00
3415b05732 Merge pull request #1311 from ejohnstown/rsakeygen
RSA Key Generation (FIPS 186-4)
2018-01-15 13:26:44 -07:00
9e1283aedb update WOLFSSL_STUB - Part2 2018-01-15 13:05:39 -07:00
0c4f9c39c9 adjust AES-CFB location in code or --enable-armasm build and use wc_AesEncryptDirect function calls 2018-01-15 13:00:25 -07:00
6a129ca5c7 undate WOLFSSL_STUB - Part 1 2018-01-15 12:58:31 -07:00
e9f3d7f898 add the function ERR remove state and test for it 2018-01-15 10:56:54 -07:00
2e6f97621a Merge pull request #764 from JacobBarthelmeh/Compatibility-Layer-Part3
Compatibility layer part3
2018-01-13 09:57:14 -08:00
862e59f474 FIPS Update
1. White space changes. Converting tabs to spaces.
2. Add some comments explaining where a loop bound came from.
3. Added parameter checks to a function.
2018-01-12 15:37:22 -08:00
2945213871 update to d2i_PUBKEY function 2018-01-12 16:01:23 -07:00
0590f2493e Merge pull request #1314 from dgarske/cleanups
Minor fixes and cleanups for hash digest/block size
2018-01-12 13:00:53 -08:00
df7917fcd9 add --enable-aescfb, add comments, include of stdio with snprintf 2018-01-12 11:05:43 -07:00
3f8ecb4e70 Merge pull request #1313 from JacobBarthelmeh/Testing
DHE suite with test case and set server/client method
2018-01-12 10:03:03 -08:00
d04775ecfb Add check for AES with using AES cipher suite 2018-01-12 09:10:55 -07:00
3d6d80fe21 Improve AES-GCM code for Intel AVX1 and AVX2
Improve AES-GCM Intel performance by converting to pure inline ASM.
Improve AES-GCM Intel code algorithmically.
Split out platform specific code for AES-GCM encrypt and decrypt.
Move C implementation of AES-GCM to separate function to speed up Intel
ASM code.
Modified test to try all input byte sizes up to large benchmark size
when defined.
2018-01-12 10:51:32 +10:00
e8179b29ff Merge pull request #1299 from JacobBarthelmeh/PKCS7
handle degenerate case with PKCS7
2018-01-11 16:56:39 -07:00
f254a002a8 fix small stack with X509 print function 2018-01-11 15:41:23 -07:00
29ccc36fc2 refactor openssl test in test.c and update AES CFB compatibility function 2018-01-11 15:35:38 -07:00
953fc0d4a8 update CFB mode to handle partial AES block sizes 2018-01-11 15:28:56 -07:00
c2a6c6c395 add CFB mode for AES 2018-01-11 15:23:15 -07:00
857bbe65b5 update OID check for domain component 2018-01-11 14:47:12 -07:00
e2a16190a6 add NID_domainComponent in X509_NAME_get_text_by_NID 2018-01-11 14:37:49 -07:00
2fc494f66b add NID_domainComponent 2018-01-11 14:37:49 -07:00
289ad7a42c add CRYPTO_cleanup_all_ex_data 2018-01-11 14:31:32 -07:00
ae7783847c accept no key, IV case in EVP_CipherInit 2018-01-11 14:31:32 -07:00
d39ca40fee wrapper for Aes structure added and checks on structure size 2018-01-11 14:23:51 -07:00
f5d9cf0e5d XSNPRINTF not defined in the case of having no filesystem 2018-01-11 14:17:25 -07:00
68d7d26839 account for C++ compiler and fast rsa option 2018-01-11 14:12:11 -07:00
064a54f552 static analysis and windows fix 2018-01-11 14:08:22 -07:00
d2f1ced52f added x509 functions : x509 name cmp, i2d x509 name, i2d x509, x509 print 2018-01-11 14:04:03 -07:00
31186cd341 add RSA compat function and stub for x509 name compare 2018-01-11 13:30:02 -07:00
f968e65314 add macro for get thread id and update debug message for wolfSSL_HMAC 2018-01-11 11:54:24 -07:00
f2518ecbc4 RC4 compatibility functions added 2018-01-11 11:54:24 -07:00
40b56e724f AES cbc wrapper and AES cbf stub function 2018-01-11 11:54:24 -07:00
cf03aa4f52 Fix for building with FIPS where wolfCrypt FIPS already has enum value for MAX_DIGEST_SIZE. 2018-01-11 10:53:12 -08:00
4a9f5f3a7e add DES cksum and DES set odd parity 2018-01-11 11:32:00 -07:00
481f4765eb Cleanup to remove duplicate MAX_DIGEST_SIZE in hmac.h and refactor to use WC_MAX_DIGEST_SIZE. Cleanup for HMAC to include hash.h and refactor HMAC_BLOCK_SIZE to WC_HMAC_BLOCK_SIZE. Fix build warning in benchmark.c with unused variable if features are disabled. 2018-01-11 09:52:49 -08:00
e442f8dccf DHE suite with test case and set server/client method 2018-01-11 10:24:48 -07:00
bb52b0a7b9 Merge pull request #724 from JacobBarthelmeh/Compatibility-Layer-Part2
Compatibility layer part2
2018-01-11 08:28:54 -08:00
2cdcd560a2 Merge pull request #1307 from JacobBarthelmeh/Testing
fix check key pair match with ECC
2018-01-11 08:26:25 -08:00
df3c775f1d Merge pull request #1304 from cconlon/dsa1864
DSA 186-4 Key Generation, raw params and key import/export
2018-01-11 08:25:27 -08:00
e4093a56f5 remove .uvguix 2018-01-11 07:14:13 +09:00
f55fa9260d user_settings.h under RTE 2018-01-11 06:55:51 +09:00
c53961d4c5 fix MPU menu 2018-01-11 06:55:51 +09:00
e0ab3888ec remove NO_64BIT from STM32 options 2018-01-11 06:55:51 +09:00
379c6d0ad8 dummy RTC 2018-01-11 06:55:50 +09:00
a429f5ef98 add MPU menu to user_settings.h 2018-01-11 06:55:50 +09:00
8c000c05ee refactor MDK options in client/server.c 2018-01-11 06:55:50 +09:00
d8ca8586c0 remove ByteReverseWord64 in sha512 2018-01-11 06:55:50 +09:00
28e18e35f8 mdk5 error 2018-01-11 06:53:34 +09:00
f49bd43ba1 add HAL_HASH, HAL_RNG to benchmark project 2018-01-11 06:53:33 +09:00
f1cba97773 remove wolfssl_fgets 2018-01-11 06:53:33 +09:00
109dd05bb3 Fix benchmark and test project 2018-01-11 06:53:33 +09:00
d34fb44df2 listen parrameter for Keil tcp net 2018-01-11 06:53:33 +09:00
cd0c5d4b93 refactor WOLFSSL_DMK_ARM and WOLFSSL_KEIL_TCP_NET in wolfio.h 2018-01-11 06:53:33 +09:00
bb2e73566b add WOLFSSL_CMSIS_RTOS option in internal.h 2018-01-11 06:53:32 +09:00
c1fe2f36db add WOLFSSL_CMSIS_RTOS option 2018-01-11 06:53:32 +09:00
a53b7a8ced clean up files under projects 2018-01-11 06:53:32 +09:00
cf5708d156 Update SimpleServer, clean up other project files 2018-01-11 06:53:32 +09:00
84c216a5f7 new user_settings.h for mdk5 config menu 2018-01-11 06:53:32 +09:00
76e1a34fd0 update SimpleClient example 2018-01-11 06:53:32 +09:00
3f922b4254 update CryptBenchmark 2018-01-11 06:53:31 +09:00
b569dff905 update CryptTest project 2018-01-11 06:53:31 +09:00
59b9ab9097 place buffer on stack instead and zero it when done 2018-01-10 13:36:03 -07:00
d01d255985 FIPS Update
1. When configuring FIPSv2, force enable RSA-PSS and ECC.
2. Add more checks for FIPSv2 around the code.
2018-01-10 11:29:01 -08:00
788cc39498 FIPS Update
1. Switch in different versions of rsa.c depending on FIPS v1 or v2.
2. Add the Windows pragmas to rsa.c if building for FIPS v2.
3. Leave out FIPS wrappers from rsa.c if not building for FIPS v1.
2018-01-10 11:29:01 -08:00
6fdbe02291 ECC FIPS
Add the ECC API to the FIPS boundary. Included are ECDHE and ECDSA.
2018-01-10 11:29:01 -08:00
274c6ca492 RSA Update
1. Fix issue with new key gen options and using old FIPS releases.
2. Modify the FIPS configure option to handle an option for the updated FIPS.
2018-01-10 11:29:01 -08:00
a784142edf RSA Update
1. Added FIPS wrappers for MakeRsaKey(), CheckProbablePrime(), and RsaFlattenPublicKey().
2. Update the API test so that it used appropriate key and message sizes for the RSA testing.
3. Add function to get all parts of a flattened RSA key.
2018-01-10 11:29:01 -08:00
84f6093068 RSA Update
1. Replaced MakeRsaKey() function wth a version that follows the NIST prescribed process closer.
2. Added an additional check to RSA key generation to ensure that |p-q| > 2^((nlen/2)-100) per NIST FIPS 186-4 sec B.3.1.
3. Added public API for checking a number being probably prime according to FIPS 186-4.
4. Added a large integer used to check the lower bound of a possible prime.
2018-01-10 11:13:23 -08:00
4afa7c7e22 RSA Update
Added mp wrappers for fp_abs() and fp_2expt().
2018-01-10 11:11:56 -08:00
32a345e2f2 Merge pull request #1309 from SparkiDev/pss_var_salt_len
Add support in PSS for salt lengths up to hash length
2018-01-10 11:00:47 -08:00
8c900a2391 added in comments and check on return code 2018-01-10 10:33:48 -07:00
d78a6cebd8 allow DSA raw export functions to return buffer sizes 2018-01-10 10:21:58 -07:00
9839809c99 add better comments and update return values 2018-01-10 09:28:56 -07:00
89973a7eaf cast for call to ecc_point copy function 2018-01-10 09:28:56 -07:00
e9432005d4 build for no old names and fix valgrind report 2018-01-10 09:28:56 -07:00
439498b3c1 remove redefinitions and add guards 2018-01-10 09:28:56 -07:00
23b271da84 clean up after rebase 2018-01-10 09:28:56 -07:00
0deaf1e227 increase max memory bucket size to account for larger WOLFSSL structure with sessioncerts 2018-01-10 09:28:56 -07:00
a60db81d09 check on key type with SetRsaExternal and fix for function name after rebase 2018-01-10 09:28:56 -07:00
d1b24f2bb1 remove unneeded XFREE with small stack 2018-01-10 09:28:56 -07:00
13bc1f64b8 account for larger WOLFSSL structure with save session certs 2018-01-10 09:28:56 -07:00
cecdd50eab make NID values avaliable with OPENSSL_EXTRA build 2018-01-10 09:28:56 -07:00
4d9675bebe fix for PKCS12 create with small stack 2018-01-10 09:28:56 -07:00
d758c114b0 fix return value 2018-01-10 09:28:56 -07:00
1b7f4ad1dd return value check in EVP_PKEY_encrypt 2018-01-10 09:28:56 -07:00
09eeafe4f0 add cipher name "DES-EDE3" 2018-01-10 09:28:56 -07:00
c0db7d02f7 cast for const qualifier match on argument 2018-01-10 09:28:56 -07:00
06891fa14a session SSL object size increase with compatibility layer 2018-01-10 09:28:56 -07:00
513e3b7338 rebasing compatiblity layer on nginx work 2018-01-10 09:28:56 -07:00
641af21cb0 Fix AES192-ECB in EVP_CipherInit 2018-01-10 09:28:56 -07:00
5237a25699 Add rc4 to EVP_CipherUpdate 2018-01-10 09:28:56 -07:00
21021aa408 Fix EVP_Cipher padding control 2018-01-10 09:28:56 -07:00
326d889658 initialize extra name entries to 0 2018-01-10 09:28:56 -07:00
ab0bc32d4c resolve rebase by adding an error node pull function 2018-01-10 09:28:56 -07:00
7763a002f3 fix for static analysis warning 2018-01-10 09:28:56 -07:00
0f2a4be832 update tests and memory checking 2018-01-10 09:28:56 -07:00
7a7f686f16 add test case for X509_get_pubkey, d2i_PrivateKey 2018-01-10 09:28:56 -07:00
f802103923 add RSA_new, RSA_LoadDer in d2i_PrivateKey 2018-01-10 09:28:56 -07:00
00670233af account for fast rsa when testing get rsa size 2018-01-10 09:28:56 -07:00
c8233177c3 fix bio gets and enhance x509 get public key 2018-01-10 09:28:56 -07:00
734e728fba Fix padding control: EVP_CipherUpdate 2018-01-10 09:28:56 -07:00
150481699f add BIO_new_file: ssl.c, tests/api.c 2018-01-10 09:28:56 -07:00
546d31c51c add X509_load_certificate_file 2018-01-10 09:28:56 -07:00
8928160df7 memset structures to 0 in Init functions 2018-01-10 09:28:56 -07:00
340963742a memory bio flag mapped to wolfSSL 2018-01-10 09:28:56 -07:00
1765246cf7 bio gets test, certificate buffer tests, and increase max static memory bucket size with sessioncerts 2018-01-10 09:28:56 -07:00
ff8da2d4fe windows and no filesystem build warnings 2018-01-10 09:28:56 -07:00
79ea6b78bb add name entry and fix build without RSA 2018-01-10 09:28:56 -07:00
03a4b9d2fe return code checks for PKEY, EVP Sign test 2018-01-10 09:28:56 -07:00
54246053de WOLFSSL_RSA in EVP_PKEY structure and fixes for PKCS12 build 2018-01-10 09:28:56 -07:00
863034f20f Fixed RSA_verify. Add test on EVP_Sign/Verify 2018-01-10 09:28:56 -07:00
8e41d32950 EVP MD and PKEY test. Add PKEY_new/free 2018-01-10 09:28:56 -07:00
49816b95e0 Type mismatch AssertInt(x, y, op, er) in api.c 2018-01-10 09:28:56 -07:00
7252a138e0 ASN1 object functions 2018-01-10 09:28:56 -07:00
492809203d templates for upcoming compatibility functions 2018-01-10 09:28:56 -07:00
35ad1269a8 expand compatibility layer, hmac, dsa gen, pubkey from bio, pseudo rand 2018-01-10 09:28:56 -07:00
e391931711 error put function 2018-01-10 09:28:56 -07:00
704d765501 adjust compat. layer to not include wolfSSL headers where possible, add d2i for X509's, clang-3.3 build 2018-01-10 09:28:56 -07:00
e213e60471 PKCS 8 info function 2018-01-10 09:28:56 -07:00
03b0a07adb add BN pseudo random function 2018-01-10 09:28:56 -07:00
c552de77f4 PKCS12 create function 2018-01-10 09:28:56 -07:00
2e1068f30c Added stubs for new OBJ_cleanup, OBJ_nid2obj, OBJ_obj2txt. Added openssl/objects.h for compatibility. Moved around OBJ function defs. 2018-01-10 09:28:30 -07:00
aac050369a Added API unit tests for new BUF_MEM. Fixed wolfSSL_BUF_MEM_grow handling of negative “len” input. Added GPLv2 header to new buffer.h. 2018-01-10 09:28:30 -07:00
2a4ea5843d Added new openssl compatibility functions for BUF_MEM_new, BUF_MEM_grow and BUF_MEM_free. 2018-01-10 09:28:30 -07:00
c237980d47 typedef struct Aes in openssl/aes.h 2018-01-10 09:28:30 -07:00
d5a0b81e97 fix SSL_load_error_strings redefinition 2018-01-10 09:28:30 -07:00
392b1c6f36 EVP verify final type change. Resolve Ubuntu build and clang warning 2018-01-10 09:26:58 -07:00
921eb03a01 add PEM read bio private key function and update reading a memory bio 2018-01-10 09:26:58 -07:00
f9eb8f8f6d missing rename SSL_check_private_key, DSA_dup_DH 2018-01-10 09:26:58 -07:00
9290b2e464 RAND cleanup and no-op functions for compatibility -- brackets added to ssl.c if statements for gcc-6 2018-01-10 09:26:58 -07:00
4f76e33bc7 add test on EVP_Encrypt/DecryptFinal 2018-01-10 09:26:58 -07:00
d113acb5ab add EVP_MD_CTX_type 2018-01-10 09:26:58 -07:00
a29f15feff add EVP_VerifyFinal, RSA_verify 2018-01-10 09:26:58 -07:00
54af9fb884 compatibility mapping for STORE_CTX functions and added test case 2018-01-10 09:26:58 -07:00
f0c19ba9b2 add internal to DER X509 function 2018-01-10 09:26:58 -07:00
11d42f5112 add X509 new function 2018-01-10 09:26:58 -07:00
7da0f50457 tests for added DES functions and fix check on DES key 2018-01-10 09:26:58 -07:00
cf6f4718e8 add public function to check if a DES key is weak 2018-01-10 09:26:58 -07:00
bebe60a4c1 EVP PKEY RSA encrypt/decrypt, tentative 2018-01-10 09:26:58 -07:00
a11e389bc8 EVP_PKEY templates 2018-01-10 09:26:58 -07:00
f695683fd0 begin BIO gets functions 2018-01-10 09:26:58 -07:00
2b75d0faf3 asn1 string compatibility 2018-01-10 09:26:58 -07:00
b9197f96db Merge pull request #1305 from JacobBarthelmeh/DH
add dh header to test.h and adjust macro guards
2018-01-10 08:09:51 -08:00
36f621db1c Merge pull request #1308 from JacobBarthelmeh/Compatibility-Layer
change place holders to be void* type and add comment to compatibilit…
2018-01-10 08:08:54 -08:00
87109dd46e Add support in PSS for salt lengths up to hash length
Added non-inline RSA-PSS verify
Added tests of RSA-PSS
Fixed comments in TLS v1.3 code
Added PSS salt length error
2018-01-10 10:16:32 +10:00
e77a05c3b2 change place holders to be void* type and add comment to compatibility header files 2018-01-09 17:08:54 -07:00
0bfa399b6c fix check key pair match with ECC 2018-01-09 16:13:46 -07:00
fc754ba88e Merge https://github.com/wolfssl/wolfssl 2018-01-09 14:15:39 -07:00
e6cef73658 html and pdf documentation for wolfssl, generated by doxygen 2018-01-09 14:12:06 -07:00
7d3c502c47 add dh header to test.h and adjust macro gaurds 2018-01-09 12:06:43 -07:00
30f8f7d409 Make clean rules more portable
(If this directory were ever to move using ../../ is insufficient. Use the WOLFSS_ROOT variable instead.
2018-01-09 10:48:13 -07:00
09bb2e5837 clarify DSA variable names, use WOLFSSL_BIT_SIZE 2018-01-08 17:06:33 -07:00
4c65726091 Merge pull request #1296 from JacobBarthelmeh/DH
add DH Agree callback
2018-01-08 15:19:12 -08:00
e42fea8710 add unit tests for DSA raw key and param import/export functions 2018-01-08 13:36:06 -07:00
fc563550c6 add DSA raw params import export, raw key export functions 2018-01-08 13:36:01 -07:00
61f6b9ce0f add DSA 186-4 key generation 2018-01-08 09:54:27 -07:00
11fdef0206 Merge pull request #1297 from cconlon/pkcs7signedfix
fix for PKCS#7 SignedData RSA signature types, include hash function
2018-01-05 13:34:12 -07:00
b22ae9de4c add DH callback to example server and client 2018-01-05 11:56:59 -07:00
91138648aa Merge pull request #1302 from dgarske/fix_readme
Fix typo in readme for enabling old TLS 1.0
2018-01-05 09:15:30 -07:00
e1505bb857 Merge pull request #1301 from ejohnstown/drbg-warn
DRBG Warning Fix
2018-01-04 18:43:31 -08:00
bc8625cbea Fix typo in readme for enabling old TLS 1.0 using ./configure --enable-tlsv10. 2018-01-04 15:46:03 -08:00
983aa97f94 DRBG Warning Fix
1. Some compilers will warn on unused constants. Removed the constant DRBG_ERROR which is unused and causing warnings on a particular build.
2. Renumbered the remaining internal return codes.
2018-01-04 15:22:58 -08:00
9315d18901 Merge pull request #1294 from dgarske/log_improve
Improvements to logging
2018-01-04 10:15:22 -08:00
34df8b98bf fix for PKCS#7 SignedData RSA signature types, include hash function 2018-01-04 10:55:17 -07:00
effb751204 Add build scripts for default SGX build and improve cleanup 2018-01-04 10:38:56 -07:00
bc7b1a8a1f handle degenerate case with PKCS7 2018-01-04 09:45:43 -07:00
915f628bc7 add DH Agree callback 2018-01-03 16:47:15 -07:00
3f53e8d1dd Merge pull request #1270 from JacobBarthelmeh/CAAM
add CAAM with INTEGRITY support
2018-01-03 08:14:46 -08:00
ab3d1e85cf Fix to disable log output for WOLFSSL_ERROR with WOLFSSL_NGINX defined. Cleanup on the loggingEnabled. 2018-01-02 19:30:33 -08:00
d0bd52910f Fix for issue with unit test where mutliple threads are outputting log data. 2018-01-02 18:20:23 -08:00
01f603ad65 add documentation, macro for no AES hw or HASH hw, use usleep when waiting for entropy 2018-01-02 15:00:35 -07:00
f2375f3fee Merge pull request #1271 from SparkiDev/chacha20_sb
Improve performance of small number of blocks for chacha20
2018-01-02 09:40:49 -08:00
d8ff36e692 Merge pull request #1285 from jrblixt/unitTest_api_addEcc-PR08042017
Add ECC unit test functions.
2017-12-29 15:02:07 -07:00
6c76a89785 Add ECC unit test functions.
Change per David RE: WOLFSSL_ATECC508A
Jenkins fix.
Changes per Chris.
2017-12-29 13:03:45 -07:00
b53f2a1ac1 Improvements to logging. Added new build option WOLFSSL_DEBUG_ERRORS_ONLY to reduce logging/code size when building with DEBUG_WOLFSSL. Added new WOLFSSL_ERROR_MSG(const char* msg) API for logging errors. Exposed the logging API's. Improvements to the wolfCrypt logging_test. Moved wolfSSL_Debugging_ON and wolfSSL_Debugging_OFF to logging.h. 2017-12-29 10:44:51 -08:00
0af93ffd08 Merge pull request #1290 from jrblixt/unitTest_api_addEd25519-PR08092017
Added Ed25519 to unit test functions.
2017-12-29 11:31:48 -07:00
ad4cf69993 Moved doxygen API comments in to a seperate directory 2017-12-29 10:57:14 -07:00
8a51df9fd8 Spacing issue per Chris. 2017-12-29 09:48:35 -07:00
272e37767b Merge pull request #1293 from dgarske/bench_emb
Fix for building with `BENCH_EMBEDDED`
2017-12-29 09:19:50 -07:00
f71047ef2d Fix for building with BENCH_EMBEDDED. Fix for building without OPENSSL_EXTRA where wolfSSL_OPENSSL_malloc assumes size_t is defined. Improvements to the GCC-ARM IDE example. 2017-12-29 08:19:21 -08:00
f492c4f120 Merge pull request #1264 from dgarske/wolf_extra
Adds new `WOLFSSL_EXTRA` define to expose useful compatibility API's
2017-12-28 16:10:09 -08:00
555551b745 Added Ed25519 to unit test functions. 2017-12-28 09:42:51 -07:00
83cb000958 Merge pull request #1289 from jrblixt/unitTest_api_addCmac-PR08162017
AES_CMAC unit test functions added.
2017-12-27 15:54:32 -07:00
84ecf94263 spelling mistakes, formatting, and change error name 2017-12-27 15:24:14 -07:00
0c709a9088 Merge pull request #1098 from jrblixt/unitTest_api_addSha3-PR08112017
Sha3 unit test functions.
2017-12-27 15:23:14 -07:00
3c6443e1e5 Added wolfSSL_CTX_set_client_CA_list and wolfSSL_SSL_CTX_get_client_CA_list to WOLF_EXTRA. 2017-12-27 08:55:28 -08:00
d75c2e2a91 Added new WOLFSSL_EXTRA define for expanded API's without openssl extra. Removed old GOAHEAD_WS, which had build errors and current project requires full openssl extra compatability. Fix unused arg build warnings for OCSP. The WOLFSSL_EXTRA adds: wolfSSL_CTX_set_quiet_shutdown, wolfSSL_set_quiet_shutdown, wolfSSL_set_accept_state and wolfSSL_set_connect_state. 2017-12-27 08:55:28 -08:00
0e9cd7a3d7 Merge pull request #1292 from moisesguimaraes/fixes-ocsp-stapling
fixes OCSP Stapling v2 tests
2017-12-27 08:53:18 -08:00
263525d812 enables OCSPStapling CM for ocspstapling2 2017-12-26 22:57:20 -03:00
43c234029b adds a call to wolfSSL_CTX_EnableOCSPStapling() on client.c to fix ocspstapling2 tests and removes unnecessary 'kill ' from the test scripts 2017-12-26 22:32:21 -03:00
22fc90006b AES-XTS performance enhancement 2017-12-23 14:44:32 -07:00
cf1575fafb AES-GCM performance enhancement 2017-12-23 14:44:32 -07:00
6d3166316b set input size constraints for AES-ECB mode with driver 2017-12-23 14:44:31 -07:00
fe7dec0edb refactor input/output with AES and fix sizes passed in 2017-12-22 12:18:04 -07:00
1bbe18bb8d Merge pull request #1234 from abrahamsonn/readme-fix
README updates to attempt to improve GitHub search positioning
2017-12-21 16:29:03 -07:00
2660ff0b93 Merge pull request #1251 from kojo1/openSSL-Compat-201711
openSSL compatibility 201711
2017-12-21 16:25:46 -07:00
b3eef2b10e formating and removing white space, also added sanity check on blob arguments 2017-12-21 14:26:22 -07:00
d1ee0f3d0d Merge pull request #1288 from cconlon/release3.13
wolfSSL 3.13.0 README and version updates
2017-12-21 12:01:38 -08:00
9c74c4d69b update library version for 3.13.0 in rpm/spec.in 2017-12-21 10:09:29 -07:00
8bebadcd4b update library version for 3.13.0 in configure.ac/version.h 2017-12-21 09:54:19 -07:00
d848a15fc8 update README for 3.13.0 2017-12-21 09:48:52 -07:00
5f4cc1a5ed Merge pull request #1287 from cconlon/inferfixes
Release fixes from Facebook infer
2017-12-20 17:57:17 -08:00
212f2d0ca8 Merge pull request #1286 from cconlon/fixes
Release prep fixes
2017-12-20 16:32:45 -08:00
22f25fa9bb add NULL ctx argument check to wolfSSL_X509_STORE_CTX_set_time() 2017-12-20 17:30:09 -07:00
8ab4e5d18c fix NULL pointer dereference in wolfSSL_CTX_new() for ctx->srp if ctx is NULL 2017-12-20 17:21:57 -07:00
6bb60581ea free WOLFSSL_BIGNUM when wolfSSL_BN_mod_inverse() fails if dynamic 2017-12-20 17:04:59 -07:00
4552c8a4a7 AES_CMAC unit test functions added. 2017-12-20 15:44:44 -07:00
adc8ca0f16 api.c fix for fast-rsa 2017-12-20 15:13:13 -07:00
be4d3c8321 fix for SetBitString() defined but not used 2017-12-20 15:02:35 -07:00
7bc5bcb86a benchmark.c fixes for NO_MAIN_DRIVER, const arrays 2017-12-20 14:55:35 -07:00
fd292b1ae4 check key for NULL in wc_ecc_import_private_key_ex() 2017-12-20 14:45:46 -07:00
28582ad5d9 remove HMAC from driver, it was never completely stable yet 2017-12-20 14:21:15 -07:00
51c3427a27 Merge pull request #1284 from cconlon/fixes
scan-build, valgrind, and test.c fixes
2017-12-20 13:06:26 -08:00
20e69460b0 minor change of variable name and add settings check 2017-12-20 13:59:20 -07:00
0c01533fe4 Merge pull request #1280 from dgarske/crypto_hw
Add crypto hardware support for ECC sign
2017-12-20 11:34:39 -08:00
2460a3de3d fix asn_test print in test.c 2017-12-20 12:28:27 -07:00
e97f8b5a9c fix scanbuild issues, internal.c and tfm.c 2017-12-20 12:18:49 -07:00
f93ed32cb3 fix scanbuild issue, use of NULL pointer in wc_Sha256Update 2017-12-20 11:48:09 -07:00
4dc49590db Merge pull request #1282 from SparkiDev/tls13_win
Fix for building TLS v1.3 code on Windows
2017-12-20 10:38:27 -08:00
e4ac38c532 fix valgrind use of uninitialized value warning 2017-12-20 11:35:30 -07:00
351a673ec0 Add AES-CCM hardware acceleration support and other fixes 2017-12-20 11:16:11 -07:00
3a6d5b8f90 formating / add c files to distro / remove unneeded macros 2017-12-20 11:16:11 -07:00
5fa9455bf9 add CAAM with INTEGRITY support 2017-12-20 11:16:11 -07:00
98603d9e74 Sha3 unit test functions.
Code review changes per Chris.
2017-12-20 10:49:24 -07:00
696ddc9b71 Added wolfSSL_CTX_SetDevId and wolfSSL_SetDevId to allow setting devId. Use #define macro to map the original async wolfSSL_CTX_UseAsync and wolfSSL_UseAsync API's to the new ones. 2017-12-20 09:08:01 -08:00
ac8996c9bc Merge pull request #1281 from dgarske/fix_ocsp_nb_checkall
Fix for OCSP non-blocking with check all flag set
2017-12-20 09:04:09 -08:00
d94d90a22e Merge pull request #1276 from dgarske/http_appstr_list
Fix for processing HTTP responses to accept a list of application strings
2017-12-20 09:03:14 -08:00
b40b13c0eb Merge pull request #1279 from SparkiDev/fe_init_ed25519
Fix fe_init to be avaible when compiling ED25519 only
2017-12-20 09:12:42 -07:00
4712376ce1 Fix for OCSP non-blocking with check all flag set. 2017-12-19 16:52:47 -08:00
fa2db8b22e Fix for building TLS v1.3 code on Windows 2017-12-20 10:32:33 +10:00
9f51674be4 Merge pull request #1278 from cconlon/winfix
fix Windows Visual Studio warnings
2017-12-19 15:55:13 -08:00
aa4f38143e Fix fe_init to be avaible when compiling ED25519 only 2017-12-20 09:27:50 +10:00
574beff4cc fix Windows Visual Studio warnings 2017-12-19 13:57:33 -07:00
c0f2a0c77b Support for crypto hardware on ECC sign using Crypto_EccSign. 2017-12-19 12:51:45 -08:00
5235e256c7 Merge pull request #1277 from JacobBarthelmeh/Testing
Testing
2017-12-19 12:38:35 -08:00
89e57f4159 protect against AES-CCM copy to smaller local buffer 2017-12-19 11:55:40 -07:00
0d5a772348 revert macro to allow AES keywrap and AES XTS with ARM assembly 2017-12-19 11:49:30 -07:00
d6472c7f71 Merge pull request #1272 from ejohnstown/pkcs5-fix
PKCS5 Fixes
2017-12-19 10:09:14 -08:00
05d0176b84 Fix for processing HTTP responses to accept a list of application strings. Specifically for CRL which has both "application/pkix-crl" and "application/x-pkcs7-crl". Both CRL formats are the same and both parse correctly. Applies to --enable-crl with HAVE_CRL_IO only. 2017-12-19 09:54:03 -08:00
ba4ff62953 Merge pull request #1169 from JacobBarthelmeh/Testing
fix DH free with switch from server to client side
2017-12-19 09:50:41 -08:00
9a6a4f6e02 Merge pull request #1245 from danielinux/chibios_port
Chibios port
2017-12-19 09:19:38 -08:00
fd0088fb34 Merge pull request #1269 from ghoso/signal-dev
Add support for libsignal-protocol-c
2017-12-19 09:30:03 -07:00
b9cda18be9 change type with free to match malloc'd type 2017-12-19 09:08:41 -07:00
7662bd58f0 fix DH free with switch from server to client side 2017-12-19 09:08:41 -07:00
5be8c7fa1a Merge pull request #1275 from dgarske/fix_async_sim_wctest
Fix for wolfCrypt test with async
2017-12-19 07:19:04 -08:00
d08572164f Merge pull request #1148 from dgarske/fix_ecc508a
Fixes to `WOLFSSL_ATECC508A` support to allow import/export
2017-12-19 07:17:41 -08:00
f939f407c5 Merge pull request #1268 from cconlon/eccpkcs8
Add ECC private key export for unencrypted PKCS#8
2017-12-19 07:16:21 -08:00
31aa5e308d Improve performance of small number of blocks for chacha20 2017-12-19 18:02:21 +10:00
bfed9f28d3 Modification for compliling application with libsignal-protocol-c. 2017-12-19 13:19:05 +09:00
e6334fdaf8 PKCS5 Fixes
1. Fix issue where optional and default items in the ASN.1 blob were not getting "parsed" correctly.
2. Added OIDs for the SHA based HMACs.
3. Removed some redundant constants from key decryption.
4. Updated the DecryptKey() function to handle AES256-CBC.
5. Updated the DecryptContent() function to act like DecryptKey().
2017-12-18 17:08:29 -08:00
ddae61afbd Merge pull request #1259 from dgarske/fix_ocsp_nonblock
Fixes for handling non-blocking OCSP
2017-12-18 16:43:24 -08:00
6b4b17a07d Fix for wolfCrypt test with async simulator, which requires polling on the ECC make key. 2017-12-18 16:39:53 -08:00
680f78f2ae Merge pull request #1274 from dgarske/fix_jenkins
Fixes to address Jenkins issues
2017-12-18 16:31:02 -08:00
57c0b5d4ac Adjustment to fix for --enable-32bit where time_t is not long. 2017-12-18 14:34:40 -08:00
5b003918ef Fix for #ifdef issue causing some X509 functions to be unavailable when DH and ECC were disabled. Fix for HashAlgoToType not being available if building with DH and ECC disabled and RSA PSS enabled. 2017-12-18 11:10:12 -08:00
bbd27b491e Fix for building with --enable-32bit where test assumes time_t is long. 2017-12-18 11:04:40 -08:00
7a59275688 add arg check, wolfSSL_CTX_clear_options 2017-12-16 09:03:44 +09:00
6421324287 add arg check 2017-12-15 05:45:45 +09:00
db7cd22645 remove ECC key conversion functions from WOLFSSL_KEY_GEN 2017-12-13 09:44:47 -07:00
43ef843257 add ECC private key export for unencrypted PKCS#8 2017-12-13 09:44:36 -07:00
bacbc06856 Merge pull request #1263 from SparkiDev/fe_init_fix
Only implement and call fe_init when available
2017-12-12 16:25:09 -08:00
26019b3441 Merge pull request #1262 from SparkiDev/benchmark
Improve benchmark program
2017-12-11 15:55:00 -08:00
1bf8dc5246 Merge pull request #1265 from SparkiDev/sp_init_mp
Initialize mp for compilers that don't track if conditions
2017-12-11 09:19:16 -08:00
704b332960 Add usage information
Only recognize on command line algorithms compiled in.
2017-12-11 11:40:11 +10:00
8ee1996e39 Initialize mp for compilers that don't track if conditions 2017-12-11 09:44:47 +10:00
137eb291cd Merge pull request #1261 from SparkiDev/tls_def_fix
Fix placement of #endif
2017-12-08 07:57:10 -08:00
c457ca462a Only implement and call fe_init when available 2017-12-08 14:16:24 +10:00
2954b67f96 Improve benchmark program
Supports command line choosing of algorithms to benchmark.
Display benchmarks in powers of 10 (1000, 1000*1000) instead of
powers of 2 (1024, 1024*1024).
2017-12-08 13:57:34 +10:00
de05c563b6 Fix to handle non-blocking OCSP when WOLFSSL_NONBLOCK_OCSP is defined and not using async. OCSP callback should return OCSP_WANT_READ. Added ability to simulate non-blocking OCSP using TEST_NONBLOCK_CERTS. 2017-12-08 03:12:33 +01:00
4f97a49213 Fix placement of #endif 2017-12-08 09:13:53 +10:00
87690ce8bd Merge pull request #1257 from dgarske/xcode_fixes
Xcode project improvements inc/benchmark tool
2017-12-07 08:44:03 -08:00
bababf115a Moved to IDE/XCODE. Fixed build warnings with xcode. Updated the user_settings.h to support fast math, ECC, timing resistance, single precision math, ARMv8, SHA3, ChaCha20/Poly1305, Ed/Curve25519 and ensure default disables are defined. Added Xcode iOS benchmark example. Runs wolfCrypt test, wolfCrypt benchmark and the new TLS benchmark by cipher suite. 2017-12-07 11:02:19 +01:00
24ef88f6f0 Merge pull request #1258 from SparkiDev/sp_from_mp_fix
Fix loading of MP
2017-12-07 01:58:56 -08:00
d78734f37d Fix loading of MP 2017-12-07 17:50:47 +10:00
4c4b02bb31 Merge pull request #1256 from SparkiDev/ed25519_perf
Ed25519 perf
2017-12-04 14:42:03 -08:00
5a56757018 Merge pull request #1250 from SparkiDev/curve25519_asm
Intel ASM code for Curve25519
2017-12-04 14:38:12 -08:00
d11581aaff new lines, BAD_FUNC_ARG 2017-12-01 09:49:38 +09:00
34ecfda145 Check for ADX instructions 2017-12-01 08:55:46 +10:00
e8e5179d1c Optimize the Ed25519 operations 2017-12-01 08:54:12 +10:00
29943dc352 Redo reduce and muladd to be cleaner 2017-12-01 08:54:12 +10:00
f2b8ffa919 Check for ADX instructions 2017-12-01 08:51:24 +10:00
3cdf3565c8 Intel ASM code for Curve25519
AVX2 added as well
2017-11-30 12:34:05 +10:00
98235f9e36 fix hard tabs 2017-11-30 09:08:59 +09:00
57e5648a5d Merge pull request #1247 from kaleb-himes/pre-processor-logic-fix
Proposed fix for build-time errors with (mp/fp)_s_rmap when debug ena…
2017-11-30 09:29:28 +10:00
909b519139 Merge pull request #1254 from dgarske/fix_ecpoint_leak
Fix leak with `wolfSSL_EC_POINT_mul`
2017-11-29 14:51:56 -08:00
eeca36dc75 Merge pull request #1249 from SparkiDev/avx2_fix
Make AVX2 code compile in on Mac
2017-11-29 14:49:30 -08:00
8e91d9ffd9 Merge pull request #1244 from SparkiDev/sha3_fast
SHA-3 fast code is smaller and a bit faster
2017-11-29 14:45:57 -08:00
ecb9e799a9 Merge pull request #1243 from dgarske/def_sec_reneg
Adds new define to enable secure-renegotiation by default
2017-11-29 14:40:23 -08:00
b664a1187b fix hard tabs, new line 2017-11-29 07:03:00 +09:00
af1f48ccb5 Fix leak with EC Point mul, where inSet wasn't being set, which caused a leak. 2017-11-28 13:00:26 -08:00
64caf325f8 add ctx == NULL checks, fix spacing 2017-11-28 10:16:24 +09:00
792672e77b Merge pull request #1252 from kojo1/IAR-EWARM
update IAR-EWARM projects
2017-11-27 11:37:57 -07:00
718455f9c6 Merge pull request #1248 from cconlon/oidfix
fix CTC_SHA224wECDSA oid sum
2017-11-27 09:13:03 -08:00
a4f5b2e29f Added the requested changes 2017-11-27 09:50:12 -07:00
a14b67100b refactor following feedback 2017-11-27 08:47:58 -07:00
4cd39b4bfb refine dummy current_time to avoid infinit waiting loop 2017-11-27 09:03:50 +09:00
a3b2817036 refine user_settings.h for EWARM projects 2017-11-27 09:02:40 +09:00
86a287be01 fix compile error with EWARM 2017-11-27 09:01:33 +09:00
f53fca88e6 Eliminate unused macro options in project properties 2017-11-27 09:00:19 +09:00
8a1de2f69d update file listed in wolflib project 2017-11-27 07:59:06 +09:00
8f31d36bcd gurde SSL_get_peer_cert_chain->count check by macro option 2017-11-25 06:25:15 +09:00
eb85accea9 Fix 'buffer' shadows a global (2) 2017-11-25 03:59:35 +09:00
79b648c006 Fix ‘buffer’ shadows a global 2017-11-24 18:21:32 +09:00
ac83445032 eliminate redundant dec, wolfSSL_CTX_get_options 2017-11-24 13:26:40 +09:00
a320ca92fb fix rebase miss 2017-11-24 08:21:27 +09:00
fce1b90b63 SSL_get_peer_cert_chain(ssl)->count value check in api.c 2017-11-24 08:09:41 +09:00
91c1a0a810 move (void) for Visual Studio 2017-11-24 08:07:32 +09:00
803bd7c612 Review feedbacks: refactor test_SSL_set_options and add SSL_clear_option 2017-11-24 08:07:32 +09:00
c6988b74b1 Remove unused files 2017-11-24 08:03:16 +09:00
c195c85999 merge master 2017-11-24 08:03:16 +09:00
f1befc0e87 Make AVX2 code compile in on Mac
Fix problems not seen due to AVX2 define being off.
2017-11-24 08:49:45 +10:00
3c0a146cd7 SSL_CTX_clear_options return verue 2017-11-24 06:27:36 +09:00
dace30cfac Missing X509_STORE_CTX_free(ctx); 2017-11-24 06:27:36 +09:00
a8bc2df19c static bucket size for SSL 2017-11-24 06:27:36 +09:00
05b9b39e06 free ctx->alpn_cli_protos 2017-11-24 06:27:36 +09:00
196bcf6f51 remove unused velues 2017-11-24 06:27:36 +09:00
279f12cc7d fix test_wolfSSL_msgCb 2017-11-24 06:27:35 +09:00
0d69376e95 SSL_CTX_clear_options macro switch 2017-11-24 06:05:01 +09:00
527c94c06b add test_wolfSSL_msgCb 2017-11-24 06:02:01 +09:00
a9cbb0ee10 add api tests 2017-11-24 05:52:25 +09:00
5f025de0f8 pull ssl->protoMsgCb() from Part5 2017-11-24 05:49:41 +09:00
06455436d3 add ERR_load_BIO_strings 2017-11-24 05:49:41 +09:00
5b16fe2f3c add X509_STORE_CTX_set_verify_cb 2017-11-24 05:49:41 +09:00
b8c5218ad3 add SSL_CTX_set_alpn_protos 2017-11-24 05:49:41 +09:00
1bcec16509 add SSL_get_peer_cert_chain 2017-11-24 05:47:20 +09:00
a320464c5a add SSL_set_msg_callback_arg 2017-11-24 05:44:54 +09:00
7e579e46aa pull SSL_set_msg_callback from Part5 2017-11-24 05:42:35 +09:00
12a9f41755 add SSL_CTX_clear_options 2017-11-24 05:38:24 +09:00
d967129581 add BN_mod_mul 2017-11-24 05:38:24 +09:00
cf00f6ae1d fix CTC_SHA224wECDSA oid sum 2017-11-22 17:07:13 -07:00
8c15c65343 Merge pull request #1216 from abrahamsonn/windows-errors
Windows errors
2017-11-21 15:21:14 -08:00
2308b0769a Changed "ifdef _WIN32" to "ifdef USE_WINDOWS_API" 2017-11-21 14:15:47 -07:00
ff64ca17f4 Merge branch 'origin/master' into chibios_port 2017-11-21 20:00:07 +01:00
400d56a1a9 SHA-3 fast code is smaller and a bit faster 2017-11-21 12:22:08 +10:00
01233edb44 Merge pull request #1242 from cconlon/pkcs7des
PKCS7 and SCEP need either AES or 3DES enabled, error out if not
2017-11-20 16:27:50 -08:00
60a6da1c14 Adds new option to enable secure-renegotiation by default (used by IIS for client authentication). WOLFSSL_SECURE_RENEGOTIATION_ON_BY_DEFAULT. 2017-11-20 16:15:06 -08:00
e3a4f468c1 PKCS7 and SCEP need either AES or 3DES enabled, error out if not 2017-11-20 13:16:44 -07:00
baf655df23 Merge pull request #1241 from SparkiDev/tls13_rec_pad
Handle reading record layer padding in TLS v1.3
2017-11-20 11:35:15 -08:00
5ccf54dd1a Handle reading record layer padding 2017-11-20 12:08:18 +10:00
935f33ab54 Merge pull request #1240 from cconlon/tls13issue
fix illegal use of type warning on Windows for TLS 1.3
2017-11-17 13:12:41 -08:00
21e391fbce Merge pull request #1235 from SparkiDev/tls13_draft21
Update code to support Draft 21 of TLS v1.3
2017-11-17 13:11:03 -08:00
4839aca7ba fix illegal use of type warning on Windows for TLS 1.3 2017-11-17 06:42:15 -07:00
8badc334ea Merge pull request #1239 from JacobBarthelmeh/AES
fix AES ECB sanity checks
2017-11-16 13:57:47 -08:00
6793a7bc4c Voided 2 variables outside of their ifdef's 2017-11-16 14:54:54 -07:00
53ec80b291 Merge pull request #1238 from cconlon/pkcs7cleanup
PKCS7 cleanup: remove dependencies on 3DES and SHA1
2017-11-16 13:51:57 -08:00
653cce17e5 Merge pull request #1237 from cconlon/pkcs7encrypted
PKCS7: optionally compile out EncryptedData content type
2017-11-16 13:50:43 -08:00
9d2c739d6d Merge pull request #1236 from kaleb-himes/sean-changes
Fix AES-GCM code to compile with GCC 4.8.*
2017-11-16 13:50:08 -08:00
947fceda6d Merge pull request #1232 from dgarske/disable_oldtls_v1_0
Disable TLS v1.0 by default
2017-11-16 13:49:03 -08:00
d741474f03 Merge pull request #1220 from SparkiDev/sha2_asm_perf
Improve speed of Intel AVX1/2 ASM for SHA-256 and SHA-512
2017-11-16 13:47:12 -08:00
877b6c35a2 Merge pull request #1233 from kaleb-himes/TI_CRYPT_UPDATE
resolving build-time issues when using TI-CRYPT
2017-11-16 12:40:46 -08:00
a89280ac91 fix AES ECB sanity checks 2017-11-16 13:27:57 -07:00
30e8f5539b PKCS7 cleanup: remove dependencies on 3DES and SHA1 2017-11-16 10:37:47 -07:00
ea7f2e4548 PKCS7: optionally compile out EncryptedData type with NO_PKCS7_ENCRYPTED_DATA 2017-11-16 09:15:02 -07:00
20edc0e961 Remove use of data from SHA-2 data structures
Only compiled and used with Intel speed-up code
2017-11-16 08:59:21 +10:00
fd9a2a8d62 Change function to macro for GCC 4.8.*
GCC 4.8.* bug can't handle parameter that is a pointer to __m128i
2017-11-16 08:32:45 +10:00
098edc2845 Merge pull request #1229 from dgarske/fix_static_rsa_pad
Fix for handling of static RSA padding failures
2017-11-15 12:31:38 -08:00
9dd8baecc0 Fix when RORX implementations are compiled and used 2017-11-15 16:56:19 +10:00
cb8e284464 Update code to support Draft 21 of TLS v1.3 2017-11-15 16:40:48 +10:00
901eab7e06 README updates to attempt to improve GitHub search positioning 2017-11-14 15:51:32 -07:00
9ce73cf1a6 Add stub functions for Aes/Des Init/Free in TI_CRYPT 2017-11-14 15:30:16 -07:00
fe7318455f Incorrect placement of variable casting 2017-11-14 15:19:40 -07:00
110409218c Fix for sniffer to use TLS v1.2 client method. 2017-11-14 14:09:44 -08:00
fd455d5a5e Fix for handling of static RSA PKCS formatting failures so they are indistinguishable from from correctly formatted RSA blocks (per RFC5246 section 7.4.7.1). Adjusted the static RSA preMasterSecret RNG creation for consistency in client case. Removed obsolete PMS_VERSION_ERROR. 2017-11-14 14:05:50 -08:00
f17470b42b Added more of the requested changes & made an attempt to remove merge conflicts 2017-11-14 15:05:32 -07:00
d5cc3ca198 Disable TLS v1.0 by default. Added new --enable-tlsv10 option to force enable (only works if --enable-oldtls is set, which is on by default). 2017-11-14 14:01:31 -08:00
cc65429946 Merge pull request #1231 from dgarske/fix_max_sigalgo
Fixes and cleanup for handling of sig/algo
2017-11-14 13:25:29 -08:00
815cbd8f68 Merge pull request #1227 from moisesguimaraes/adds-client-side-get-sni
enables wolfSSL_SNI_GetRequest() at client side.
2017-11-14 13:22:37 -08:00
a0931313dd Merge pull request #1226 from SparkiDev/aes_gcm_avx1_avx2
Improve AES-GCM performance on AVX1 (IvyBridge) and AVX2
2017-11-14 13:03:22 -08:00
20f5c61675 Added debug message when signature/algorithm list is truncated. 2017-11-14 10:31:48 -08:00
67451cc3e2 Fix for older compilers and AVX2 2017-11-14 11:36:22 +10:00
1ede982495 Improve speed of Intel AVX1/2 ASM for SHA-256 and SHA-512 2017-11-14 10:36:17 +10:00
0ade0eb55b Merge pull request #1224 from dgarske/get_version
Improvements to wolfSSL get/set version
2017-11-13 16:05:22 -08:00
fd4b3b40ac Merge pull request #1222 from dgarske/pem_public
Fixes for PEM public key functions
2017-11-13 16:03:04 -08:00
69461ae5e2 Merge pull request #1217 from dgarske/sha_slow
New `--enable-lowresource` option and SHA256 not unrolled support
2017-11-13 16:02:01 -08:00
35377d933e Merge pull request #1228 from abrahamsonn/2275
Moved variable declaration to beginning of block
2017-11-13 15:19:27 -08:00
b08a99057c Cleanup of hashSigAlgo handling in DoClientHello. 2017-11-13 15:02:13 -08:00
9f7e40ad5c Fix to make sure provided sigalgo list doesn't overflow the buffer. 2017-11-13 14:52:53 -08:00
2b5c4ffa7f Enhancement to allow override of maximum sig/algos using new WOLFSSL_MAX_SIGALGO define (default is 32). 2017-11-13 14:35:15 -08:00
5da82f43ed makes SNI.status available at client side 2017-11-13 16:10:23 -02:00
020a004bad makes SNI.status available at client side 2017-11-13 15:39:24 -02:00
9f72f018e0 Moved variable declaration to beginning of block 2017-11-13 10:28:22 -07:00
fe5b512af7 fixes commnet typos 2017-11-13 14:59:47 -02:00
f82f03f982 fixes API visibility 2017-11-13 14:53:56 -02:00
a23b65751d enables wolfSSL_SNI_GetRequest() at client side. 2017-11-13 13:58:14 -02:00
6c848e7133 Improve AES-GCM performance on AVX1 (IvyBridge) and AVX2 2017-11-13 15:43:30 +10:00
3b0d415ad9 Merge pull request #1223 from JacobBarthelmeh/Memory
fix for logging file names
2017-11-10 14:04:55 -08:00
149559e40f change WOLFSSL_MAX_ERROR_SZ to be a macro instead of enum 2017-11-10 13:29:49 -07:00
54c663ed49 Added new API wolfSSL_GetVersion to get version as wolfSSL value which can be passed into wolfSSL_SetVersion. Fixed duplicate CyaSSL_CTX_use_PrivateKey_buffer define. Added TLS1.3 to wolfSSL_SetVersion. 2017-11-10 11:13:48 -08:00
686f18825a Merge pull request #1209 from moisesguimaraes/tlsx-fix2
TLSX fixes
2017-11-10 08:44:58 -08:00
d7abd5c8fb changes WOLFSSL_SKIP_UNSUPPORTED_EXTENSION to WOLFSSL_OLD_UNSUPPORTED_EXTENSION 2017-11-10 11:35:49 -02:00
39ad478973 make the WOLFSSL_MAX_ERROR_SZ overridable 2017-11-09 17:07:00 -07:00
7733ee7e89 fix for logging file names 2017-11-09 15:54:24 -07:00
2ba5475cf3 Merge pull request #1219 from JacobBarthelmeh/master
fix unused variable warning
2017-11-09 14:33:49 -08:00
8ced766d61 fix warning for static analysis report 2017-11-09 13:16:29 -07:00
717ebf0146 Fix for wolfSSL_PubKeyPemToDer so its available when NO_FILESYSTEM is defined (moved it out of NO_FILESYSTEM block). Added wc_DerToPemEx support for PUBLICKEY_TYPE. 2017-11-09 11:15:33 -08:00
5a5fea7b46 Add USE_SLOW_SHA256 and USE_SLOW_SHA512 options for reduced code size of SHA. Existing USE_SLOW_SHA2 applies for SHA512 only. Cleanup formatting of the sha256.c and sha512.c code. Added new ./configure --lowresource option, which defines the memory reduction defines. Fix for make check resume.test scipt with NO_SESSION_CACHE defined. 2017-11-09 11:05:28 -08:00
40be578415 fix unused variable warning 2017-11-09 11:22:10 -07:00
29b091eae6 Merge pull request #1221 from SparkiDev/warn_fix1
Fix warnings and g++ casting error
2017-11-09 09:35:54 -08:00
127c849594 Merge pull request #1215 from dgarske/fix_stm32_cubemx_sha
Fix accidental removal of wc_Sha hashHandle for STM32 w/CubeMX
2017-11-09 09:07:34 -08:00
ddec639712 Merge pull request #1218 from dgarske/fix_powerpc_debug
Fix for build error on PowerPC with enable debug
2017-11-09 09:06:43 -08:00
6a825ea0ce Fix warnings and g++ casting error 2017-11-09 17:30:59 +10:00
a97ee6c232 Fix for build error on PowerPC with enable debug. 2017-11-08 09:21:05 -08:00
55ec382093 Merge pull request #1212 from dgarske/emscripten
Fixes for building with Emscripten (adds `--disable-asm` option).
2017-11-07 09:19:49 -08:00
1a69fb9430 Fix accidental removal of wc_Sha hashHandle for STM32 w/CubeMX. This was removed during merge of 6707be2 on 10/11/17. Thanks liubing for the report. 2017-11-07 09:10:12 -08:00
a5f7b182bf Merge pull request #1214 from moisesguimaraes/fix-tlsx-unreachable
Removes unreachable code in TLSX supported-curves and ec-point-format.
2017-11-07 08:49:15 -08:00
1c19c8847b fixes while loop 2017-11-07 10:57:06 -03:00
7674a24972 removes unreachable code with a single return point 2017-11-07 10:43:47 -03:00
7df0e7f286 Fix typo with with extra paren. 2017-11-06 16:24:12 -08:00
90c5a64547 Merge pull request #1211 from dgarske/cleanup_hardcoded
Cleanup hard coded values
2017-11-06 16:10:34 -08:00
2c5778215d Merge pull request #1210 from dgarske/fix_ti_newnames
Fix for building with TI using new names.
2017-11-06 15:59:57 -08:00
b8cc132e99 Added ability to force 32-bit mode using --enable-32bit. Added ability to disable all inline asembly using --disable-asm. Added check for __EMSCRIPTEN__ define in types.h to properly setup 64-bit type. Fixes for build combinations with SHA512 and CHACHA20. 2017-11-06 14:37:34 -08:00
096e850adb Fix a few places where there are break; and break; when TLS 1.3 is not defined. Fix TIRTOS logic for XSTRNCASECMP and XSTRTOK. 2017-11-06 13:59:36 -08:00
e591576cdf Cleanup of the RSA exponent hard coded value. 2017-11-06 10:23:06 -08:00
231ebeea0e Add unit test for BN_bn2hex. Cleanup math radix constants. 2017-11-06 09:16:37 -08:00
d2938dd13a Fix for building with TI using new names. Update TI settings for timing, blinding and strtok_r. 2017-11-06 08:25:35 -08:00
775487cab1 Support for ChibiOS. 2017-11-06 09:45:12 +01:00
94c1aab67e Merge pull request #1208 from dgarske/fix_nightlyreports
Fixes from nightly builds for time_t and no AES
2017-11-03 12:28:55 -07:00
b672616b38 fixes cast to void 2017-11-03 15:31:13 -03:00
caf5708bb6 adds unsupported_extension behavior to ALPN 2017-11-03 15:31:13 -03:00
56b38946ed adds unsupported_extension behavior to Session Tickets and Supported Curves 2017-11-03 15:31:13 -03:00
c8e5558f3f adds unsupported_extension behavior to CSR and CSR2 2017-11-03 15:31:13 -03:00
a636858a49 adds unsupported_extension behavior to THMAC 2017-11-03 15:31:13 -03:00
cd4eb2c5b1 adds unsupported_extension behavior to MFL 2017-11-03 15:31:13 -03:00
0dd2ba2d80 adds unsupported_extension behavior to SNI 2017-11-03 15:31:13 -03:00
57ea7ba319 Various fixes from nightly Jenkins builds. Fix for new test_wolfSSL_ASN1_TIME_adj API unit test to skip generalized time test when on PowerPC (which has time_t as int). Fix for building with AES disabled and PKCS7 enabled. Fix for building without openssl_extra when time_t is not present. 2017-11-03 10:16:45 -07:00
8f687e9905 Merge pull request #1206 from ejohnstown/vs-arm-update
VS-ARM Update
2017-11-02 17:14:00 -06:00
5e02100921 Merge pull request #1192 from dgarske/client_staticmem
Added static memory support to client example
2017-11-02 14:49:33 -06:00
1d1e904acb Merge pull request #942 from ghoso/dev201705
New openssl compatibility functions for: `BN_mod_inverse`, `PKCS5_PBKDF2_HMAC_SHA1` and 
`SSL_set_tlsext_status_type`.
2017-11-02 10:47:14 -07:00
4084255fd5 Improve SSL failure cleanup case where ssl->ctx isn't set yet. 2017-11-02 09:48:43 -07:00
229cecfb61 Fix static memory failure case (insuficient mem) in InitSSL case where ssl->ctx isn't set yet and SSL_ResourceFree is called NULL dereferece happens. 2017-11-02 09:48:43 -07:00
72f44aba87 Fix for X509 FreeAltNames with static memory enabled. 2017-11-02 09:48:43 -07:00
0e34f35c08 Increase the static memory pool in client to better support ECC or session certs. 2017-11-02 09:48:43 -07:00
6369794b6f Fixes for static memory with -r session resumption option on client. Fix for possible failed InitSSL cleanup using NULL ssl->ctx for static memory. 2017-11-02 09:48:43 -07:00
a4f94366a4 Added static memory code to client example. 2017-11-02 09:48:43 -07:00
a14ea92d78 Merge pull request #1204 from dgarske/ec_tests
Fixes and improvements for `EC_POINT_mul`
2017-11-02 08:50:34 -07:00
cd4dd6bd40 Merge pull request #1207 from SparkiDev/rem_cov
Remove coverage rules not required.
2017-11-02 07:03:00 -07:00
32cbff7257 Remove coverage rules not required. 2017-11-02 09:46:57 +10:00
57853fa3e9 Merge pull request #1202 from dgarske/fix_nofs
Build fixes for building without filesystem
2017-11-01 10:14:22 -07:00
d8ef0d7df1 Merge pull request #1203 from dgarske/fix_const2
Fix issue with `fp_s_rmap` not being const
2017-11-01 10:12:45 -07:00
f91b2e19d7 Merge pull request #1205 from SparkiDev/tls_ext_fix
Fix TLS extension code
2017-11-01 10:10:10 -07:00
cc7a5fd490 Fix for bug in wolfSSL_EC_POINT_free not freeing the internal ECC point. Unit test fixup for test_wolfSSL_EVP_PKEY_new_mac_key with malloc and size 0. Cleanup the EC_POINT unit test to not set Gxy->inSet, since its already 0. 2017-11-01 09:44:19 -07:00
f4ae86dc1b Fix TLS extension code
Don't respond with TLS v1.3 extensions if doing TLS v1.2 or lower.
Use calculated size in SendServerHello rather than fixed maximum.
2017-11-01 18:08:11 +10:00
9c9978ce9f OpenSSL Compatibility functions on PR#942. 2017-11-01 13:00:47 +09:00
8a016879f0 Fixes to WOLFSSL_ATECC508A support to enable use of wc_ecc_export_x963_ex and wc_ecc_import_x963_ex. These changes are experimental (builds, but not tested). 2017-10-31 16:17:03 -07:00
72a33136f5 Fix for EC_POINT_mul population of result. Add NULL arg checks for a few compatability functions. Added unit tests for compatability layer API's EC_POINT_ and EC_GROUP_ in test_wolfSSL_EC. Cleanup of the EC_POINT_dump. 2017-10-31 16:09:39 -07:00
5b55d384a7 VS-ARM Update
1. Added HAVE_SUPPORTED_CURVES and WOLFSSL_SHA384 to the user settings file.
2017-10-31 13:19:10 -07:00
68371c8e66 Merge pull request #1201 from moisesguimaraes/fix-tlsx-sig-algo
adds check for server side sig-algo extension
2017-10-31 11:40:30 -07:00
5cf175c49b adds check for server side sig-algo extension 2017-10-30 23:02:36 -03:00
fa01c41ea9 Build fixes for building without filesystem. 2017-10-30 15:25:47 -07:00
2037a6c9ea Merge pull request #1199 from JacobBarthelmeh/fast-rsa
increase test buffer size to account for edge case
2017-10-27 15:48:14 -07:00
d42ebb836f Merge pull request #1200 from JacobBarthelmeh/staticmemory
allow for adjusting static IO buffer size
2017-10-27 15:01:17 -07:00
e8627f1f93 Fix issue with fp_s_rmap not being const. 2017-10-27 11:46:24 -07:00
92b71da6d2 allow for adjusting static IO buffer size 2017-10-26 16:40:16 -06:00
016f7357d2 increase test buffer size to account for edge case 2017-10-26 16:19:56 -06:00
264c481c71 Merge pull request #1191 from SparkiDev/tls13_no_ecc
Fix no ECC builds with TLS13 code.
2017-10-26 10:49:59 -07:00
ee489b12ef Merge pull request #1198 from dgarske/fix_build
Fix build errors with various configs.
2017-10-26 09:46:50 -07:00
aa95c6bdd1 Merge pull request #1197 from dgarske/fix_const
Fix `cipher_name_idx` to be const.
2017-10-26 09:45:30 -07:00
94e0b06b9f Fix build errors with configs for no ASN and no PKI with PSK. 2017-10-26 07:34:41 -07:00
b4d802d524 Fix cipher_name_idx to be const. 2017-10-25 16:57:53 -07:00
182028819d Merge pull request #1195 from dgarske/rel_fixes2
Release updates for ec_point_formats and ASN1 SetSerialNumber bug
2017-10-24 15:20:15 -06:00
323db1a95d Fix no ECC builds with TLS13 code.
Fix tests so that having ECC disabled works as well.
Fix define protection for Draft 18 and HRR Cookie.
2017-10-24 09:11:24 -07:00
8a01d725da Merge pull request #1177 from dgarske/certreq_tests
Testing improvements for cert gen and TLS cert validation
2017-10-24 08:21:37 -07:00
c0105b3008 Merge pull request #1175 from dgarske/cleanup_inlines
Cleanup to consolidate the inline helpers
2017-10-24 08:15:12 -07:00
e0734d56df Fix to handle valid serial number with MSB set. Cleanup to consolidate max serial number length check. 2017-10-24 06:49:00 -07:00
2dfad0918a Updated release notes for added ec_point_formats extension. Fix for setting serial number with random data where the MSB was cleared and resulted in a zero. Fix for build type mismatch error in wolfCrypt test with ed25519 and WOLFSSL_TEST_CERT defined. 2017-10-23 15:36:58 -07:00
96667b47ee ec point format TLS extension (#1034)
* adds client support to ec_point_format
* adds ec_point_format support for server side
* makes ec-point-format activation dependent on supported-curves activation
* removes recursive functions preserving the writing order
* renames EllipticCurves to SupportedCurves
2017-10-23 14:06:20 -07:00
d46ab1f724 Merge pull request #1194 from dgarske/rel_fixes
Release cleanup: Remove execute bit on all code files
2017-10-23 14:23:33 -06:00
7f30397252 Remove execute bit on all code files. 2017-10-23 11:16:40 -07:00
372e8b04d0 Merge pull request #1193 from dgarske/rel_v3.12.2
Release v3.12.2 (lib 14.0.0)
2017-10-23 11:53:55 -06:00
911b6f95f8 Release v3.12.2 (lib 14.0.0). Updated copywright. 2017-10-22 15:58:35 -07:00
39749ed5be Merge pull request #1190 from dgarske/fix_ocspstaplingenable
Fix to not send OCSP stapling extensions in client_hello when not enabled
2017-10-20 12:16:56 -07:00
d7ae1df778 Fix to add keyUsage keyAgreement for the ECC server certificate. Resolves issue with openssl test using "ECDH-ECDSA" cipher suite. 2017-10-20 11:26:15 -07:00
c5f80760a8 Merge pull request #1145 from JacobBarthelmeh/HardwareAcc
init hardware acc. use of public RSA key with public key decode funct…
2017-10-20 10:32:18 -07:00
bdefdfe860 Merge pull request #1165 from JacobBarthelmeh/mysql
add check for SIZEOF_LONG with sun and LP64
2017-10-20 10:16:58 -07:00
024c8725ad Testing improvements for cert gen and TLS cert validation:
* Fixes to support certificate generation (`WOLFSSL_CERT_GEN`) without RSA enabled.
* Added new ECC CA for 384-bit tests.
* Created new server cert chain (ECC CA for 256-bit that signs server-ecc.pem)
* Created new `./certs/ecc/genecc.sh` script for generating all ECC CA's, generated server cert req (CSR), signing with CA and the required CRL.
* Moved the wolfCrypt ECC CA / ECC cert gen test into `ecc_test` as `ecc_test_cert_gen`.
* Refactor duplicate code that saves DER to disk, converts DER to PEM and saves PEM to disk into SaveDerAndPem function.
* Changed `ecc_test_make_pub` and `ecc_test_key_gen` to use XMALLOC for temp buffers (uses heap instead of stack).
* Cleanup to combine all certificate subject information into global `certDefaultName`.
* Updated cert request info to use wolfSSL instead of Yassl.
* Cleanup to combine keyUsage into `certKeyUsage` and `certKeyUsage2`.
* Re-number error codes in rsa_test.
* Moved the certext_test after the ecc_test, since it uses a file generated in `ecc_test_cert_gen`.
2017-10-19 16:17:51 -07:00
e904a38092 Fix to not send OCSP stapling extensions in client_hello when not enabled. Fix for typo in WOLFSSL_SHUTDOWN_NOT_DONE. 2017-10-19 11:18:34 -07:00
5362d46da9 Fix issues building with inline disabled. 2017-10-18 14:26:34 -07:00
06f564dea3 Merge pull request #1189 from dgarske/fix_oldnames
Fix for building with `--disable-oldnames`
2017-10-18 13:34:26 -06:00
c9558ee27b Updated a few more old names. Added PR for new configs to Jenkins. 2017-10-18 10:38:27 -07:00
f23ec7d5f2 Fix for building with --disable-oldnames. 2017-10-18 10:22:35 -07:00
e82807024b Switched word24 back to byte for compatability. 2017-10-18 09:08:22 -07:00
7f2e6e1d8a Cleanup to consolidate the inline helpers like cto, ato and bto into misc.c. Relocate the word24 typedef into types.h. 2017-10-18 09:06:48 -07:00
1377577af5 Merge pull request #1187 from dgarske/build_fixes
Build fixes for various TLS 1.3 disable options
2017-10-18 08:59:46 -07:00
c9516e20b2 Merge pull request #1158 from dgarske/openssl_compat
Minor openssl compatibility layer improvements to AES, MD5 and SSL.
2017-10-18 08:54:28 -07:00
ccda176bfa Merge pull request #1183 from SparkiDev/tls13_nu
Disallow upgrading to TLS v1.3
2017-10-18 08:53:00 -07:00
9bea6cca52 Merge pull request #1186 from SparkiDev/sha2_asm
Fix SHA-256 Intel assembly code to work with 'fasthugemath'
2017-10-18 08:51:05 -07:00
9920bdf097 Merge pull request #1103 from SparkiDev/sp_rsa
Single Precision maths for RSA, DH and ECC
2017-10-18 08:44:47 -07:00
1bf9d092af Merge pull request #1179 from ejohnstown/evp-aes
EVP-AES
2017-10-17 19:23:11 -07:00
1a7d58715a Merge pull request #1188 from dgarske/ocsp_enables
Added missing API's for disabling OCSP stapling
2017-10-17 15:26:48 -07:00
3d7e86f08d Added missing API's for disabling OCSP stapling. Added OCSP stapling enable/disable for WOLFSSL. 2017-10-17 13:52:05 -07:00
ddb5e57811 Merge pull request #1185 from cconlon/bench
Add HMAC benchmark, expand AES key size benchmarks
2017-10-17 11:15:12 -07:00
b82a529ec2 Cleanup to move the secret length to ssl.h so its accessible for the compatability layer as well. 2017-10-17 09:56:34 -07:00
aab1e060a0 Minor openssl compatability layer improvements to AES, MD5 and SSL. 2017-10-17 09:50:25 -07:00
8659140494 Build fixes for various TLS 1.3 disable options (RSA, ECC and ED/Curve 25519). 2017-10-17 09:39:32 -07:00
32103891e2 Merge pull request #1117 from dgarske/gcc_arm
Added simple GCC ARM Makefile example
2017-10-17 10:23:32 -06:00
e49560fbf0 add missing parameter in SHOW_INTEL_CYCLES 2017-10-17 09:31:21 -06:00
7dccd9d478 set hash size for PIC32MZ hardware crypto 2017-10-17 09:30:26 -06:00
d5b7c13fbf change enc/dec labels for AES, move scrypt bench below HMAC 2017-10-17 09:30:26 -06:00
d65704c6b4 add benchmarks for AES-128/192/256-ECB 2017-10-17 09:30:16 -06:00
c0472a3a89 Fix SHA-256 Intel assembly code to work with 'fasthugemath' 2017-10-17 18:35:18 +10:00
c49188cc89 Turn off SP by default 2017-10-17 09:32:24 +10:00
9e4e58fe8c Disallow upgrading to TLS v1.3
Change SupportedVersions extension to only include TLS v1.3 if downgrade
is disabled.
Fix parsing of SupportedVersions extension
Don't upgrade
Only downgrade in SupportedVersions extension if option enabled
2017-10-17 08:52:12 +10:00
f724206e37 Add test for 3072-bit RSA and DH and fix modexp 2017-10-17 08:36:39 +10:00
90f8f67982 Single Precision maths for RSA (and DH)
Single Precision ECC implementation
2017-10-17 08:36:39 +10:00
9a6e4b2939 add separate benchmarks for AES-128/192/256-GCM 2017-10-16 14:43:39 -06:00
1e445e10a1 add separate benchmarks for AES-128/192/256-CTR 2017-10-16 14:43:38 -06:00
2b077b2792 add separate benchmarks for AES-128/192/256-CBC 2017-10-16 14:43:38 -06:00
1f72696359 add HMAC-MD5/SHA/SHA224/SHA384/SHA512 benchmarks 2017-10-16 14:43:38 -06:00
130e026139 Merge pull request #1184 from dgarske/fix_fips
Fix for FIPS build to support new names
2017-10-16 13:20:05 -07:00
de34ec0f0c Fix scan-build report of possible use of unitialized output[i]. 2017-10-16 11:24:41 -07:00
02ee22e73b Support for mapping to new names with old for FIPS build. Fix to revert HMAC SHA224 type check, since SHA224 type isn't in FIPS wolfCrypt. 2017-10-16 09:57:22 -07:00
819acd18a7 Merge pull request #1180 from SparkiDev/tls13_nd
Fixed DRAFT_18 define and fixed downgrading with TLS v1.3
2017-10-13 09:24:55 -07:00
2c2217fcdc Merge pull request #1181 from dgarske/cert_serial
Certificate serial number enhancements
2017-10-13 09:22:11 -07:00
b79b816276 Merge pull request #1168 from dgarske/ctx_get_cm
Add method to get WOLFSSL_CTX certificate manager
2017-10-13 09:13:54 -07:00
6fd53d31c2 Merge pull request #1157 from dgarske/old-names
Refactor SSL_ and hashing types to use wolf specific prefix
2017-10-13 09:09:44 -07:00
04106a0089 Merge pull request #1174 from dgarske/ocsp_cb_ctx
Improvement to `wolfSSL_SetOCSP_Cb` to allow context per WOLFSSL object
2017-10-12 10:02:49 -07:00
de77d5cc83 Merge pull request #1170 from dgarske/alt_cert_chains
Alternate certificate chain support `WOLFSSL_ALT_CERT_CHAINS`
2017-10-12 10:02:29 -07:00
34cac68f81 Added wolfCrypt test example for setting a custom serial number. Changed CTC_SERIAL_SIZE to 16 (more common max). 2017-10-11 19:16:58 -07:00
6548f32ee0 Enhancement to allow a serial number to be customized via Cert.serial and Cert.serialSz for cert request or generation. Fix to make sure serial number is always postive and has no leading zeros. Increase the size of the certificate serial number to 20 bytes. 2017-10-11 17:21:26 -07:00
6021c37ec7 Refactor WOLF_SSL_ to WOLFSSL_ (much better). 2017-10-11 09:10:43 -07:00
6707be2b0e Added new --disable-oldnames option to allow for using openssl along-side wolfssl headers (without OPENSSL_EXTRA). Add --enable-opensslcoexist which makes sure oldnames is disabled. Refactor of SSL_ to WOLF_SSL_. Refactor of SHA, MD5, SHA224, SHA256, SHA512 and SHA384 to WC_ naming. 2017-10-11 09:10:42 -07:00
7dca25ea88 Fixed DRAFT_18 define and fixed downgrading with TLS v1.3
Changed the define in configure.ac to match the one used in the code.
Fixed downgrading to disallow unless ssl->options.downgrade is set.
TLS 1.3 client method does not have downgrade on anymore.
Test changed to not expect downgrading to work.
Test of TLS v1.3 client downgrade is actually upgrading on server.
Fixed 80 character line problems.
2017-10-11 12:17:28 +10:00
09f8ddd0f0 EVP-AES
1. Fixed using wolfSSL_EVP_CipherFinal() when a message's size is a round multiple of a block size. It wasn't adding the appropriate padding.
2. Update the EVP_Cipher test to call CipherUpdate and CipherFinal instead. It checks a message that is 24 bytes long and a second that is 16 bytes long.
2017-10-10 13:44:06 -07:00
4c8d228080 Added WOLFSSL_ALT_CERT_CHAINS option to enable checking cert aginst multiple CA's. Added new API's for wolfSSL_get_peer_alt_chain and wolfSSL_is_peer_alt_cert_chain, which allow a way to know if alternate cert chain is used and provides a way to get it (when SESSION_CERTS is defined). Cleanup of the defines to enable debugging certs (just use SHOW_CERTS now). 2017-10-10 08:55:35 -07:00
35141c335d Merge pull request #1178 from SparkiDev/asm_mulx_2
Fix for MULX asm
2017-10-09 18:33:29 -07:00
898893fbcd Fix for MULX asm 2017-10-10 09:41:17 +10:00
280de41515 Improvement to wolfSSL_SetOCSP_Cb to set the context per WOLFSSL object (callback functions are same). Adding API unit tests next. 2017-10-06 12:18:21 -07:00
effad6e91c clean up include paths for MySQL cmake build 2017-10-06 09:05:56 -06:00
c945e65479 Merge pull request #1171 from ejohnstown/wolfssh
wolfSSH Option
2017-10-05 09:43:17 -07:00
541f60801d Merge pull request #1172 from SparkiDev/aesgcm_avx2_fix
Fix aesni code for avx2
2017-10-05 09:10:50 -07:00
152c24f210 Fix aesni code for avx2 2017-10-05 13:02:33 +10:00
f344f04e60 wolfSSH Option
Added a configure convenience option for building wolfSSL to work with wolfSSH.
2017-10-04 16:11:52 -07:00
d855fd9452 Merge pull request #1166 from JacobBarthelmeh/Compatibility-Layer
fix for wolfSSL_ASN1_TIME_print function
2017-10-04 14:10:53 -07:00
75e04a08cd Merge pull request #1167 from ejohnstown/install-update
update INSTALL with VS-ARM build
2017-10-04 13:58:23 -07:00
c4052607d7 Updated README.md to include instructions for how to build on a different ARM architecture (like Raspberry Pi CortexA53). Moved the -T into SRC_LD so its easier to disable. 2017-10-04 13:53:39 -07:00
6058362970 Fix bug in user_settings.h which was incorrectly setting FP_MAX_BITS to 512 when RSA was enabled. This resulted in RSA_FUNCTION MP_EXPTMOD_E: memory/config problem. 2017-10-04 13:53:39 -07:00
614736cbb2 Add code to detect if Cortex M series and disable architecture specific code in armtarget.c. Improved Makefile.common to include toolchain prefix. 2017-10-04 13:53:39 -07:00
d88d8c3ed8 Updates to GCC ARM README.md for the ARCHFLAGS and correct file to update. 2017-10-04 13:53:39 -07:00
d4b18a6d3f Added warning for IO callback stubs to make sure they get implemented. 2017-10-04 13:53:39 -07:00
a02903c43e Improvements to Makefile templates. Added missing Makefile. Added new static library support. 2017-10-04 13:53:39 -07:00
2d67f46247 Minor cleanups for the GCC ARM example. Fixed build with DH enabled. Changed random.h to always make sure CUSTOM_RAND_TYPE is defined. Added TLS13 option to reference user_settings.h. 2017-10-04 13:53:39 -07:00
69b25ee508 Added simple GCC ARM gcc-arm-none-eabi Makefile project example for wolfCrypt test/benchmark and wolfSSL Client. 2017-10-04 13:53:39 -07:00
19ea4716f3 Add unit tests for wolfSSL_CTX_GetCertManager, wolfSSL_CTX_UnloadCAs, wolfSSL_CertManagerUnloadCAs and wolfSSL_CTX_get_cert_cache_memsize. Fixed comment typo PERSISTE_CERT_CACHE. 2017-10-03 10:00:20 -07:00
dcf61bd10e Added new API wolfSSL_CTX_GetCertManager for getting the WOLFSSL_CTX certificate manager. 2017-10-03 08:46:15 -07:00
5c636b4f4a update INSTALL with VS-ARM build 2017-10-02 12:00:11 -07:00
918a5fd5a6 Merge pull request #1164 from SparkiDev/asm_mulx
Get the multiplcation code using MULX to work consistently
2017-09-30 09:51:03 +09:00
9bf14a152f change return value for wolfSSL_ASN1_TIME_print 2017-09-29 10:28:10 -06:00
cb94911e1f add check for SIZEOF_LONG with sun and LP64 2017-09-28 16:39:30 -06:00
8cd0b7dfc7 fix for wolfSSL_ASN1_TIME_print function 2017-09-28 15:30:46 -06:00
09e92c518d Merge pull request #1163 from cconlon/mysql_sha
Add returns to OpenSSL compatibility SHA functions
2017-09-28 13:12:14 -06:00
3b12b7223a Merge pull request #1160 from dgarske/asn_extkeyusage
ASN Extended Key Usage Support
2017-09-28 11:31:04 -06:00
34ef7207f9 check hash function returns in wolfSSL_EVP_DigestInit 2017-09-28 11:19:51 -06:00
eff781c0aa add int return to OpenSSL compatibility MD5 functions 2017-09-28 11:12:18 -06:00
c836724685 Merge pull request #1162 from cconlon/mysql_compat
wolfSSL_ERR_peek_error() with WOLFSSL_MYSQL_COMPATIBLE
2017-09-28 09:51:07 -06:00
7350bf93b3 Merge pull request #1153 from dgarske/fix_testbench_castwarns
Fix cast warnings with wolfCrypt test/benchmark
2017-09-28 09:41:21 -06:00
fd9b2d3b8d Merge pull request #1116 from dgarske/stm32_hash
Fixes for STM32 hardware acceleration
2017-09-28 09:35:36 -06:00
0376a53f6b Get the multiplcation code using MULX to work consistently 2017-09-28 09:12:29 +10:00
ef141c3ce9 add int return to OpenSSL compatibility SHA functions 2017-09-27 14:28:19 -06:00
6c85bc5d3d enable functionality of wolfSSL_ERR_peek_error() when WOLFSSL_MYSQL_COMPATIBLE defined 2017-09-27 10:56:04 -06:00
fadee8fbf2 Merge pull request #1161 from cconlon/mysql_compat
Enable ASN1_TIME_print when WOLFSSL_MYSQL_COMPATIBLE is defined
2017-09-26 15:44:50 -07:00
4f15cde2eb Merge pull request #1155 from dgarske/fixes_pic32mz
PIC32MZ minor build warning fixes
2017-09-26 16:26:32 -06:00
e8dd7d0c4a Merge pull request #840 from koichi-tsujino/EVP
add EVP_get_cipherbynid
2017-09-26 16:23:26 -06:00
b4f7997fdc enable ASN1_TIME_print when WOLFSSL_MYSQL_COMPATIBLE is defined 2017-09-26 15:02:13 -06:00
19aaa88c72 Merge pull request #1156 from ejohnstown/ios-android
iOS and Android Project Updates
2017-09-26 12:06:17 -07:00
9eb7e2aafa ASN1 Extended Key Usage support. Adds new wc_SetExtKeyUsage() API. Available only with --enable-certext or WOLFSSL_CERT_EXT. 2017-09-26 12:05:46 -07:00
931fbde41d iOS/Android
1. Updated the iOS user_settings.h with the hardened settings.
2. Updated the iOS project file with Xcode's suggested settings.
3. Added an IDE project for building wolfSSL for Android using Visual Studio 2017.
2017-09-26 09:08:34 -07:00
b172585fc3 Resolved conflicts 2017-09-26 09:01:23 +09:00
e8f95b9252 add EVP_get_cipherbynid 2017-09-26 08:58:36 +09:00
8f3aa49ef6 Merge pull request #1149 from ejohnstown/aesgcm-init
AES-GCM-NI Init
2017-09-25 16:13:55 -07:00
d15704b2ba Merge pull request #1159 from cconlon/session_cache
exclude wolfSSL_SSL_get0_session when NO_SESSION_CACHE is defined
2017-09-25 15:20:27 -07:00
46f7e786cb exclude wolfSSL_SSL_get0_session when NO_SESSION_CACHE is defined 2017-09-25 14:07:17 -06:00
0ced1f4847 AESGCM Init
1. Update the AES-GCM with AES-NI 128-bit constant initializers so they work on both GCC/Clang and MSC.
* MSC uses a union for the type where the first member is a 16-byte array.
* GCC/Clang uses a 16-byte vector masking as a long long array.
2. Disable AES-GCM loop unrolling for Windows, when using AES-NI in 32-bit mode.
2017-09-22 15:28:47 -07:00
ee6f88cd98 Fix cast warnings with wolfCrypt test/benchmark. Cleanup of 80 char max line length in wolfCrypt test. 2017-09-22 15:22:42 -07:00
6451e12313 Merge pull request #1154 from dgarske/fix_async
Fixes for building with async
2017-09-22 16:01:28 -06:00
763d5f26c7 Merge pull request #1031 from dgarske/math_update
Math updates
2017-09-22 15:26:34 -06:00
2c4844d5ef Merge pull request #1146 from ejohnstown/compat
OpenSSL Compatibility Additions and Fixes
2017-09-22 14:19:28 -07:00
4a510218c2 Tested PPC32 with TFM_PPC32. Fixed warning with possible uninitialized use of sc0, sc1 and sc2. 2017-09-22 11:37:00 -07:00
eec5f9bb41 Fixes for benchmark after buffers were moved into thread. Needed THREAD_LS_T and fixed benchmark alloc failure cleanup. 2017-09-22 11:35:46 -07:00
218f944984 Fix for building async with AES XTS. 2017-09-22 11:12:23 -07:00
a2ed22286f Adds TFM_MIPS (tested on PIC32MZ2048EFM144 with XC32 v1.44). Adds check for mp_read_radix to return failure for invalid character. Adds checking for s_mp_sub response code. Improved mp_init_copy error handling. Improved init to use size where applicable. Asm PPC 32 changes to add r to register. Asm formatting cleanups. 2017-09-22 09:48:35 -07:00
824eb55648 Merge pull request #1151 from dgarske/fix_asn_keyusage
Fixes bug with creation of the KeyUsage BitString
2017-09-21 10:41:08 -06:00
f5c4a68ab3 Merge pull request #1152 from JacobBarthelmeh/Testing
fix for wolfSSL_X509_NAME_get_text_by_NID
2017-09-20 18:52:14 -07:00
80333979a9 fix for wolfSSL_X509_NAME_get_text_by_NID 2017-09-20 17:31:53 -06:00
3f493770d4 Fixes bug with creation of the KeyUsage BitString which was always adding the optional second byte reguardless of len, which created invalid ASN if value provided was less than 256. Bug was introduced with ASN refactor in commit fd9e41dd99. 2017-09-20 15:00:24 -07:00
2f96f1ae9f Merge pull request #1150 from kaleb-himes/HASH_DRBG_UPDATE
Update HASH_DRBG Reseed mechanism and add test case
2017-09-20 13:15:17 -07:00
1c2199be24 Merge pull request #1137 from JacobBarthelmeh/Windows
rename the file io.h to wolfio.h
2017-09-20 11:34:33 -07:00
5777b92745 Improved solution 2017-09-20 11:25:51 -06:00
5e6213bfa1 Merge pull request #1140 from JacobBarthelmeh/RSA-fix
account for 8k keys with MySQL compatibility
2017-09-20 10:05:32 -07:00
28c15bed1c Merge pull request #1141 from SparkiDev/chacha_avx1
Fix ChaCha to check for AVX1
2017-09-20 09:57:20 -07:00
3763b88397 rename the file io.h to wolfio.h 2017-09-20 10:53:11 -06:00
60dca94821 Update HASH_DRBG Reseed mechanism and add test case 2017-09-20 10:36:36 -06:00
4d8e1c9e5a Minor build fixes for unused function and variable. 2017-09-19 12:48:57 -07:00
816767744f Fix for STM32 AES-CTR (tested on STM32F437). Improvement to the STM32 RNG code to detect improper RNG_CLK. Cleanup of the PIC32MZ Aes struct variables and the AES-CTR (tested on PIC32MZ2048). 2017-09-18 16:08:09 -07:00
2620cb4559 OpenSSL Compatibility Additions and Fixes
1. Added a check on the hex2bn function for null strings to be treated like the NULL pointer.
2. Added some more test cases to the big number unit test.
3. Added wolfSSL_EVP_add_cipher() analogous to wolfSSL_EVP_add_digest().
4. Implemented `RSA_public_encrypt()` and `RSA_private_decrypt()` for the OpenSSL compatibility layer.
5. Added `RSA_PKCS1_OAEP_PADDING` as an option to the new functions.
6. Fixed the constness on the `from` parameter in function `RSA_public_decrypt()`. Note: this does not allow OAEP to be used in FIPS mode.
7. Added size constants for EVP_MAX_BLOCK_LENGTH, RSA_PKCS1_PADDING_SIZE, and RSA_PKCS1_OAEP_PADDING_SIZE.
8. Added functions `wolfSSL_EVP_PKEY_new_mac_key()` and `wolfSSL_EVP_PKEY_get0_hmac()` for storing HMAC keys in an EVP_PKEY structure for use later.
9. Added the routines EVP_DigestSignXXX(). They only work w.r.t HMAC.
10. Added the ForceZero() to EVP_MD_CTX_cleanup().
11. Modified the EVP_MD_CTX structure to have a union with both the hasher and a wolfCrypt Hmac structure.
12. Added a mapping of SHA1->SHA to the list of digest name aliases in wolfSSL_EVP_get_digestbyname().
13. Changed the mapping of ssl3-sha1->SHA.
14. When using RSA blinding, the OpenSSL compatibility layer RSA object was attempting to decrypt without an RNG. Added an RNG if needed.
15. Add comment to wolfSSL_BN_hex2bn() to cover usage w.r.t. string length. Remember to keep the length even, front-pad with zeroes if needed.
16. Added tests for the new functions.
2017-09-18 13:53:44 -07:00
c4e87c8cc4 Merge pull request #1121 from ejohnstown/solution-update
Update VS Solution Files
2017-09-15 18:22:44 -06:00
a9e540fc07 Moved the bench_ buffer allocation/free into the thread, so the THREAD_LS has a unique one for each which resolves issues with benchmark when using the USE_QAE_THREAD_LS option. 2017-09-15 14:02:06 -07:00
23903ec903 Merge pull request #1144 from kaleb-himes/FIPS-TEST
NULL plaintext input is supported in FIPS testing
2017-09-15 13:21:32 -07:00
3f16fba4f8 Fix build warning with possible use of unitialized ret. 2017-09-15 10:41:43 -07:00
27d607efa3 Fixes for AES on STM32 with StdPeriLib and fix for building with NO_STM32_CYPTO. Researching better solution for AES-CTR. 2017-09-15 10:39:09 -07:00
dcab2f47ee Fixes for STM32 hardware acceleration. Adds CubeMX HAL hashing support for MD5, SHA1, SHA224 and SHA256. Adds support for STM32F7 (WOLFSSL_STM32F7). Fixes issue with AES-GCM and STM32F2. Cleanup of the STM32 macros (adds NO_STM32_HASH, NO_STM32_CRYPTO and NO_STM32_RNG to optionally disable hardware acceleration). 2017-09-15 10:39:09 -07:00
63e8d63943 Update following review 2017-09-15 10:52:33 -06:00
0b11b265f6 Merge pull request #1143 from SparkiDev/wpas_aesctr
Fix WPAS config to not use FORTRESS config
2017-09-15 10:39:13 -06:00
5f0afcfe88 Merge pull request #1142 from JacobBarthelmeh/fast-rsa
fix for clang warning on RsaKey redefinition
2017-09-15 09:40:42 -06:00
1f7d73f626 NULL plaintext input is supported in FIPS testing 2017-09-14 20:14:21 -06:00
00e073424a Fix WPAS config to not use FORTRESS config 2017-09-15 10:49:07 +10:00
f97f9a6158 init hardware acc. use of public RSA key with public key decode functions 2017-09-14 17:07:19 -06:00
e10b2f027f fix for clang warning on RsaKey redefinition 2017-09-14 15:08:15 -06:00
1b3a8f40b8 account for 8k keys with MySQL compatibility 2017-09-14 09:37:32 -06:00
7721aca114 Fix ChaCha to check for AVX1 2017-09-14 09:07:04 +10:00
afcef7d394 Merge pull request #1136 from JacobBarthelmeh/Testing
anon flag with interop script
2017-09-13 14:40:30 -07:00
23fff62d8b Merge pull request #1135 from dgarske/cy
Fix issue with empty array (requires C99 compliance).
2017-09-13 14:39:50 -07:00
4c31c53f37 Merge pull request #1128 from JacobBarthelmeh/AES
AES XTS feature addition
2017-09-13 14:38:15 -07:00
bea82ce214 Merge pull request #1118 from JacobBarthelmeh/mysql
downgrade with options set when using opensslextra feature
2017-09-13 14:12:09 -07:00
a5eaecaa0e Fix unit API test call to wolfSSL_CertManagerLoadCA when building without file system. 2017-09-11 06:51:27 -07:00
932773735b Cleanup the wolfIO_Send function. 2017-09-11 05:48:41 -07:00
398252ddad add XtsAes structure and change XTS-AES API 2017-09-08 16:00:33 -06:00
2c39219f2a Fix issue with empty array (requires C99 compliance). 2017-09-08 11:24:55 -07:00
c018a1abf3 Merge pull request #1130 from SparkiDev/cpuid_fix
MSVC fix around cpuid check
2017-09-08 11:04:50 -06:00
1d1fc66374 double check support of SSLv3 with interop testing 2017-09-08 10:50:23 -06:00
ee9d410326 anon flag with interop script 2017-09-07 16:58:37 -06:00
a073d5d448 Merge pull request #1129 from JacobBarthelmeh/Testing
additional sanity checks
2017-09-06 15:34:26 -07:00
c482524b78 big endian testing and packing Aes struct 2017-09-01 15:32:55 -06:00
f7ea118dd7 downgrade with options set when using opensslextra feature 2017-09-01 13:47:56 -06:00
6a226efd15 MSVC fix around cpuid check 2017-09-01 08:43:28 +10:00
8807b8af4f additional sanity checks 2017-08-31 16:00:08 -06:00
3da5ddd49e Merge pull request #1123 from SparkiDev/poly1305_fix
Fix for the AVX implemetation of Poly1305
2017-08-31 10:21:00 -06:00
d48c940334 add comments for AES-XTS functions to aes.h 2017-08-30 17:52:26 -06:00
ef73c1df7c add AES-XTS mode --enable-xts 2017-08-30 17:50:15 -06:00
7ac0bab37e Merge pull request #1114 from kojo1/tls1.3
bring up settings.h in tls13.c
2017-08-30 13:00:40 -07:00
9aef8a91fd Merge pull request #1120 from JacobBarthelmeh/Testing
fix creating shared secret with ECC private only key
2017-08-30 11:02:14 -07:00
1ba77e4306 Merge pull request #1122 from JacobBarthelmeh/Compatibility-Layer
using memory bio with no filesystem and adjustment for Windows line e…
2017-08-30 10:58:30 -07:00
3b351fd640 Fix to stop inlining of assembly code with fixed label 2017-08-30 10:51:44 +10:00
3dbe5d2af9 fixes for Windows build 2017-08-29 12:02:24 -06:00
34dc4a493d Merge pull request #1124 from JacobBarthelmeh/UnitTests
fix memory management in unit test with --disable-fastmath
2017-08-29 09:06:14 -06:00
61ff3e136a fix memory management in unit test with --disable-fastmath 2017-08-28 16:23:44 -06:00
e6cf3c88f2 Fix for the AVX implemetation of Poly1305
Need one more multiple of r (0..6 instead of 0..5)
2017-08-28 11:44:27 +10:00
a8417c1078 using memory bio with no filesystem and adjustment for Windows line ending 2017-08-25 15:11:10 -06:00
6970333473 1. Set the base address of the 32-bit DLL builds.
2. Add LTCG option for 64-bit DLL Debug build. Fixes issue with VS2015.
3. Fixed sln issue where test tools linked against the DLL are built outside the DLL build directories.
2017-08-25 11:21:11 -07:00
a308a56044 fix creating shared secret with ECC private only key 2017-08-25 09:07:03 -06:00
59358fd91d Merge pull request #1119 from JacobBarthelmeh/Windows
cast to fix warning on Windows with Visual Studio
2017-08-25 07:04:42 -07:00
7918b31cae cast to fix warning on Windows with Visual Studio 2017-08-24 15:22:32 -06:00
23342337ab Merge pull request #1115 from JacobBarthelmeh/Compatibility-Layer
fix advancing memory WOLFSSL_BIO when reading
2017-08-24 10:45:32 -07:00
2d5194cdf0 Merge pull request #1113 from JacobBarthelmeh/Testing
add function to generate public ECC key from private key
2017-08-24 10:40:27 -07:00
b10e0b789b fix error return value when unable to extract ECC public key 2017-08-23 14:45:08 -06:00
4b630b67fa fix advancing memory WOLFSSL_BIO when reading 2017-08-23 11:37:19 -06:00
73b8be8fcc Merge pull request #1039 from jrblixt/unitTest_api_addDsa-PR07192017
Add Dsa unit test functions.
2017-08-22 15:46:46 -06:00
7c604bfc48 Fixes for building with WOLFSSL_ATECC508A. 2017-08-22 13:11:20 -07:00
c25832ad14 type cast the return of fread 2017-08-22 14:06:25 -06:00
71f4d546a8 add function to generate public ECC key from private key 2017-08-22 14:06:25 -06:00
fbae4420ad Merge pull request #1110 from dgarske/pic32mz_largehash
Fixes for PIC32MZ to support large hashing using hardware
2017-08-22 09:24:05 -07:00
8865b272bb Merge pull request #1112 from dgarske/async_sniff
Adds async blocking support for sniffer tool
2017-08-22 09:19:45 -07:00
439e803bd1 Merge pull request #1107 from JacobBarthelmeh/UnitTests
build option for certificate buffers with PKCS7 test
2017-08-22 10:05:36 -06:00
7892714516 bring up settings.h before #ifdef WOLFSSL_TLS13 2017-08-22 20:13:17 +09:00
07d137480d Fix to PIC32MZ handling of hashing empty string. Changed default MPLABX/MCAPI user_settings.h to use 2048-bit. All tests passed! 2017-08-21 15:19:18 -07:00
075adcb15b Add wolfCrypt hash tests for empty string. Add large hash test for SHA2 384/512 and SHA3. Cleanup hashing error handling to call free. RSA spelling fixes. RSA error detail for bad padding. 2017-08-21 14:03:48 -07:00
5a27e2f621 Fix so PIC32MZ works in caching mode after large hash. Reduced default block size for large hash to 256 (512 bytes total). 2017-08-21 11:10:16 -07:00
2b7f4b0903 Adds async blocking support for sniffer tool. 2017-08-21 11:07:13 -07:00
c9d6a4de6f Fixes for building --enable-mcapi. 2017-08-21 09:18:53 -07:00
c330c6b7f9 Merge pull request #1109 from JacobBarthelmeh/Testing
fix check on ephemeral key type before free'ing
2017-08-18 11:53:08 -07:00
8a37af42bf Merge pull request #1108 from dgarske/fix_async_misc
Fixes for async ECC encrypt, ParseCertRelative and API Unit test inits
2017-08-18 11:44:28 -07:00
d7f7c27e0a Merge pull request #1106 from JacobBarthelmeh/NTRU
QSH update
2017-08-18 11:35:48 -07:00
74ed94ddb1 Fixes to support large hashing against HW without caching (in exclusive hardware access) Large hashing uses previous hash code with two descriptors and polling. Added wolfCrypt large hash tests for MD5, SHA and SHA256. Add missing MCAPI set size API's. Cleanup AES GCM large test. Changed MPLABX projects to default to PIC32MZ2048EFM144. 2017-08-18 11:25:30 -07:00
7460aaf5ea build option for certificate buffers with PKCS7 test 2017-08-18 11:07:40 -06:00
c6e722170e fix check on ephemeral key type before free'ing 2017-08-18 10:55:38 -06:00
c9efcc4561 Merge pull request #1105 from dgarske/strtok
Enhancement to add strtok implementation for platforms where its not avail
2017-08-17 14:02:32 -07:00
84a396b7dc Additional init fixes for unit tests based on async valgrind report. 2017-08-17 12:41:18 -07:00
f6ad5524eb remove invalid test-qsh version tests, revert if statement check in internal.c 2017-08-17 11:27:47 -06:00
c06e672eb7 Added missing AES/DES3/HMAC init functions for helping with valgrind reports on unitialized use for async markers. 2017-08-17 09:58:46 -07:00
9909c8428c Code review changes per Chris. 2017-08-16 16:08:50 -06:00
3ca679c1d7 Added ability to force use of `USE_WOLF_STRTOK. 2017-08-16 13:21:31 -07:00
9fb0862bc1 Fix for TI RTOS (WOLFSSL_TIRTOS) to use our wc_strtok for the XSTRTOK macro. 2017-08-16 13:21:31 -07:00
ff6a136b8a Enhancement to add strtok implementation for platforms where it is not available such as MinGW. 2017-08-16 13:21:31 -07:00
3fda99cbc4 seperate build of QSH from build of NTRU 2017-08-16 14:19:38 -06:00
f7ca2f157d Improvement on the ParseCertRelative fixes for intializing the event prior to operation. Fix possible uninitialized value with DecryptKey and DES3. 2017-08-16 13:19:31 -07:00
68c04bd821 Fix for ECC encrypt/decrypt with async enabled. Reverts previous change from PR #1101 and adds return code checking for wc_AsyncWait. ECC shared secret needs to be in loop to call again for completion. 2017-08-16 12:04:57 -07:00
53e05786da Merge pull request #1101 from dgarske/fix_bench_async
Fixes for async multi-threading
2017-08-16 10:15:55 -07:00
ad4849d692 Merge pull request #1100 from JacobBarthelmeh/Testing
Fix for test script: add ECDH-RSA server for interop tests
2017-08-16 09:54:16 -07:00
0ed03987df Merge pull request #1099 from cconlon/micrium
Update Micrium uC/OS-III Port
2017-08-16 09:48:56 -07:00
2e4000acb4 Merge pull request #1102 from cconlon/ocsp-certs
Update root certs for OCSP scripts
2017-08-16 09:50:02 -06:00
1f80fb952f Fix issue with using wrong asyncDev in ConfirmSignature. Fix un-initialized Hmac in API unit tests. 2017-08-15 21:20:32 -07:00
ccc226eae4 Fixes for refactor to initialize the asyncDev.event prior to call for ParseCertRelative, ConfirmSignature and ECC shared secret (return code). Scan-build and G++ fixes. 2017-08-15 21:20:32 -07:00
b32be20110 Refactored async event intialization so its done prior to making possible async calls. Added threadId and removed volatile attribs in WOLF_EVENT. Fixed possible unitialized value in benchmark ret. 2017-08-15 21:19:28 -07:00
a9c943d5bd Fix jenkins warning with possible uninitialized 'ret'. 2017-08-15 21:19:28 -07:00
b4aaeb5768 Fix for possible leak with multi-threading and curve cache. Note memory leak still possible with --enable-fpecc and async multithreading. Add voltaile on event state and ret to resolve possible multi-thread timing issue. Use define for --enable-stacksize init value. 2017-08-15 21:19:28 -07:00
44a3622248 Fixes to better handle threading with async. Fix wc_CamelliaCbcEncrypt return code checking. Fix to ensure cycles per byte shows on same line. Refactor of async event state. Refactor to initalize event prior to operation (in case it finishes before adding to queue). Add HAVE_AES_DECRYPT to --enable-all option. Cleanup benchmark error display. 2017-08-15 21:19:28 -07:00
dd5430d188 Code review changes, Chris. 2017-08-14 16:09:35 -06:00
af00787f80 update root certs for ocsp scripts 2017-08-14 12:58:36 -06:00
a6db5fc882 add ECDH-RSA server for interop tests 2017-08-11 16:41:27 -06:00
2f92998529 update test.c for Micrium port and XSTRNCPY 2017-08-11 14:30:25 -06:00
f6d0b2898d update Micrium uC/OS-III port 2017-08-11 14:30:15 -06:00
2740d313a7 fix unused variable warning in load_verify_locations with NO_WOLFSSL_DIR 2017-08-11 11:37:30 -06:00
7736125156 Merge pull request #1095 from jrblixt/unitTest_hashReorder
Re-order hash functions in unit test.
2017-08-11 10:15:37 -06:00
21a8662948 Merge pull request #1093 from toddouska/polyold
have poly asm detect older compilers w/o avx2 like chacha does
2017-08-11 08:27:34 +10:00
963746fb3e Merge pull request #1094 from JacobBarthelmeh/Testing
Testing
2017-08-10 13:01:46 -07:00
294a13f9a2 Merge pull request #1097 from cconlon/validate_ecc_import
WOLFSSL_VALIDATE_ECC_IMPORT fixes
2017-08-10 12:45:26 -07:00
5865816198 fix wc_ecc_import_private_key_ex() with WOLFSSL_VALIDATE_ECC_IMPORT with private only, wolfcrypt test 2017-08-10 10:04:14 -06:00
3c1140d90e Re-order hash functions in unit test. 2017-08-09 15:23:01 -06:00
8b41fc841b remove setting variable that is currently not used after being set 2017-08-09 13:43:28 -06:00
219fcde773 fix shadow declaration warning 2017-08-09 11:58:29 -06:00
36b1a666d0 have poly asm detect older compilers w/o avx2 like chacha does 2017-08-09 09:52:06 -07:00
df1e5f2e1a Merge pull request #1091 from dgarske/fix_async_aes
Fix async issue with AES set key trying to use a NULL IV.
2017-08-09 09:44:46 -07:00
04c16ca843 Merge pull request #1086 from SparkiDev/sha256_sha512_gcc44
GCC 4.4 on Linux doesn't like empty clobber list
2017-08-09 09:41:58 -07:00
af4158d231 Merge pull request #1084 from SparkiDev/aesni_avx2_fix
Fix for AVX2 unrolled code
2017-08-09 09:39:38 -07:00
d12e98eea3 Merge pull request #1079 from SparkiDev/poly1305_asm
Poly1305 Intel Assembly code - AVX and AVX2
2017-08-09 09:37:09 -07:00
f27b3a83aa Fix async issue with AES set key trying to use a NULL IV. 2017-08-07 17:47:59 -07:00
d195009dcb Merge pull request #1090 from JacobBarthelmeh/Release
update readme for known issue
2017-08-07 13:36:53 -07:00
6717035563 update readme for known issue 2017-08-07 13:13:43 -06:00
d949832059 Merge pull request #1088 from JacobBarthelmeh/Release
prepare for release v3.12.0
2017-08-07 11:49:27 -07:00
e9c6fa5f22 Merge pull request #1089 from JacobBarthelmeh/StaticAnalysisTests
fix potential memory leaks
2017-08-07 11:47:33 -07:00
1dc2889388 fix potential memory leaks 2017-08-04 16:49:31 -06:00
b55f981d5b prepare for release v3.12.0 2017-08-04 15:32:27 -06:00
032d606f99 GCC 4.4 on Linux doesn't like empty clobber list 2017-08-04 14:07:55 +10:00
32cedb2b12 Fix for AVX2 unrolled code 2017-08-04 12:40:10 +10:00
d0ff6067a6 Chacha asm fix - can't use buffer in old compiler 2017-08-04 12:17:41 +10:00
df4387cff4 Merge pull request #1083 from dgarske/chacha_noasm
Option to disable Intel speedups for ChaCha using `--enable-chacha=noasm`
2017-08-03 15:45:47 -07:00
ea6b719ec2 Fix register issue 2017-08-04 08:39:09 +10:00
3be4e0823e Adds option --enable-chacha=noasm to allow disabling the Intel AVX/AVX2 speedups when used with --enable-intelasm. 2017-08-03 13:39:46 -07:00
4d6cb66bc1 Merge pull request #1082 from dgarske/fix_intelasm_aesgcm
Fixes for `intelasm` and AES GCM with AVX2
2017-08-03 12:35:00 -07:00
3f2de7154f Merge pull request #1080 from abrahamsonn/vcxproj_update
added files to wolfssl.vcxproj includes list for windows config testing
2017-08-03 12:15:23 -07:00
977e909f60 Merge pull request #1081 from dgarske/chacha20_asm
Fix for `intelasm` and ChaCha20
2017-08-03 12:11:59 -07:00
4a5ecb8a15 Fix typo with xmm5 (was xxm5). Workaround for Clang issues with AVX2 and using register __m128i tmp3 asm("xmm6"); syntax by using NO_UNROLL option. 2017-08-03 10:47:21 -07:00
089a050d7a added files to wolfssl.vcxproj includes list for windows config testing 2017-08-03 11:00:30 -06:00
b0eeed364b Fix for intelasm and ChaCha20 with causing "error: unknown type name '__m256i'" on some compilers. Fix is to change the __m128i and __m256i to arrays of word64 (source Sean PR #1079). 2017-08-03 10:00:20 -07:00
80bc089cb5 Merge pull request #1078 from SparkiDev/intel_asm_fixup
Stop using positional parameters in inline asm. Fixes issue with `--enable-intelasm --enable-debug` for AES GCM.
2017-08-03 09:32:50 -07:00
5c2736f1a9 Poly1305 Intel Assembly code - AVX and AVX2 2017-08-03 14:35:09 +10:00
31854c1566 Stop using positional parameters in inline asm 2017-08-03 13:55:30 +10:00
108f6a4958 Merge pull request #1077 from JacobBarthelmeh/StaticAnalysisTests
Static analysis tests
2017-08-02 15:08:32 -07:00
635bacef28 Merge pull request #357 from kojo1/PIC32
Fixes for PIC32MZ
2017-08-02 13:14:06 -07:00
433ca50292 remove unneeded XMEMSETs 2017-08-02 14:04:41 -06:00
e77e93ef2e Merge pull request #1065 from JacobBarthelmeh/Testing
update DTLS export session version and tests
2017-08-02 11:40:38 -07:00
edce23b563 use memset when initializing DecodedCert structure 2017-08-02 10:50:34 -06:00
43b04af388 adjust sanity check in integer.c to avoid reading uninitialized values 2017-08-02 10:39:05 -06:00
062f3efa6d adjust integer.c for loop range 2017-08-02 10:29:34 -06:00
65b8389af0 Fix for handling hash copies to make sure copied buffer is not free’d. Resolves issues when testing TLS connection with wolfssl_tcp_client and openurl https://www.google.com/. 2017-08-02 08:42:04 -07:00
9f1b17effc Merge pull request #1076 from JacobBarthelmeh/UnitTests
place macro guard on test of RSA-OAEP with SHA1 dependency
2017-08-01 14:05:58 -07:00
2d94a3954a Merge pull request #1075 from JacobBarthelmeh/fast-rsa
add sanity check in fast-rsa and change loop behavior when generating…
2017-08-01 14:05:03 -07:00
bd20729fba Merge pull request #1069 from ejohnstown/dtls-mac
DTLS Bad MAC Checks
2017-08-01 13:45:19 -07:00
c93d348ecd fix sesion export buffer to be not dependent on macros defined 2017-08-01 14:19:06 -06:00
be432d8d3a Fix for building in Harmony with crypto.h path. 2017-08-01 12:48:44 -07:00
4e735631e7 Fixes for PIC32MZ:
* Adds crypto HW support for AES Direct and AES CCM.
* Fixes to enable PIC32MZ hardware hashing where updates are cached via heap buffer and final performs single operations against hardware.
* Fix for benchmark with 1024-bit certs passing in wrong size for `wc_RsaPrivateDecrypt` when using `USE_CERT_BUFFERS_1024`.
* Fix to resolve missing `strncasecmp` for the Microchip XC32. Workaround to use case sensitive version instead. This error occurred when building with HAVE_ECC defined in Harmony with XC32.
* Cleanup of the PIC32MZ crypto and hashing hardware code. Replace `pic32mz-hash.c` with `pic32mz-crypt.c`
* Add user_settings.h for mplabx and mcapi examples.
* Sync up with Harmony changes for MCAPI.
2017-08-01 12:42:09 -07:00
af0514704f place macro guard on test of RSA-OAEP with SHA1 dependency 2017-08-01 11:46:49 -06:00
c20859e67d add sanity check in fast-rsa and change loop behavior when generating fast-rsa key 2017-08-01 11:29:16 -06:00
b553d36548 Merge pull request #1074 from SparkiDev/tls13_cr
Add NULL check after signature alg extension search
2017-08-01 09:01:42 -06:00
24e9f7c43d Add NULL check after signature alg extension search 2017-08-01 13:55:06 +10:00
7cee1c5e8a Merge pull request #1072 from toddouska/alert
add AlertCount to detect dos attempt
2017-07-31 18:29:23 -07:00
2296f4806c Merge pull request #1073 from JacobBarthelmeh/StaticAnalysisTests
Static analysis tests
2017-07-31 18:24:17 -07:00
0c753718bd Merge pull request #1042 from SparkiDev/chacha_asm
Intel Assembly optimizations for ChaCha20 - AVX and AVX2
2017-07-31 16:27:17 -07:00
a27738b5f9 Merge pull request #1071 from dgarske/cleanup_tests
Cleanup AES GCM large test
2017-07-31 16:13:06 -07:00
a55e42c14f Merge pull request #1070 from dgarske/fix_qat_normal_math
Fix normal math issue with async and `mp_read_unsigned_bin`
2017-07-31 16:12:08 -07:00
01099fd97e cast for when compiling with g++-7 2017-07-31 16:58:53 -06:00
08da8df455 sanity check on peer sequence for static analysis report 2017-07-31 16:37:34 -06:00
66852a9252 add AlertCount to detect dos attempt 2017-07-31 15:17:54 -07:00
2051a05139 Cleanup AES GCM large test. Move test into stack and disable if using BENCH_EMBEDDED. 2017-07-31 14:09:30 -07:00
8a11b78960 Fix for normal math mp_read_unsigned_bin where mp_zero was also resetting the raw source. This caused failures with QAT when using normal math. 2017-07-31 14:09:15 -07:00
36a539760a DTLS Bad MAC Checks
1. Make the decrypt and verify MAC failure cases behave the same with
   respect to DTLS messages. It should pretend the message never happened.
2. Allow the echoclient to survive the echoserver sending a message with
   a bad MAC.
3. Allow the server to survive the client sending a message with a bad MAC.
2017-07-31 13:54:53 -07:00
fb53fac1c1 Merge pull request #1067 from JacobBarthelmeh/Memory
sanity check on index when adding cipher suites
2017-07-31 12:03:49 -07:00
62ce8c8b81 Merge pull request #1066 from dgarske/no_certs
Fix for building with `NO_CERTS` or `NO_WOLFSSL_SERVER` defined.
2017-07-31 12:01:39 -07:00
87611fdb5d Merge pull request #1064 from SparkiDev/cpuid_fix
Fix cpuid to work with different configs
2017-07-31 11:59:17 -07:00
5564be6113 sanity check on index when adding cipher suites 2017-07-28 17:42:52 -06:00
3387b12a9a Fix for building with NO_CERTS or NO_WOLFSSL_SERVER defined. 2017-07-28 15:24:53 -07:00
e1ccc5acad update DTLS export session version and tests 2017-07-28 14:27:24 -06:00
d452f97e99 Fix cpuid to work with different configs
Fix 'may be uninitialized' warning in aes.c
Fix memory overwrite in AES-CBC when using AESNI.
2017-07-28 08:41:49 +10:00
bc72d0c2d5 Merge pull request #1063 from JacobBarthelmeh/Testing
C89 compliance with variable declaration
2017-07-26 16:19:25 -07:00
d5cf5f9887 Merge pull request #1062 from JacobBarthelmeh/UnitTests
update sanity checks with ARMv8 port
2017-07-26 16:18:37 -07:00
0978dd4285 C89 compliance with variable declaration 2017-07-26 15:29:00 -06:00
dc7acc0400 Merge pull request #1059 from dgarske/fix_leaks
Fix for PKCS12 dynamic type names
2017-07-26 11:52:42 -06:00
637ca44e6a update sanity checks with ARMv8 port 2017-07-26 11:05:20 -06:00
3560eed52b Add Dsa unit test functions. 2017-07-26 09:01:36 -06:00
05ed5cafc2 Merge pull request #1061 from SparkiDev/tls13_leantls
Fixes for LEANTLS and TLS13 builds
2017-07-25 21:01:00 -07:00
41e2b236aa Merge pull request #1051 from kaleb-himes/fsanitize-fixes
Fsanitize fixes
2017-07-25 20:57:43 -07:00
fbf4e94bcf Merge pull request #1060 from SparkiDev/tls13_memleak
Fix memory leak when not using fast math and TLS13.
2017-07-25 20:55:42 -07:00
038d16212f Fixes for LEANTLS and TLS13 builds 2017-07-26 10:43:36 +10:00
59450e83fa Fix memory leak when not using fast math. 2017-07-26 09:48:34 +10:00
e1830772de Merge pull request #1056 from JacobBarthelmeh/UnitTests
check return values with new unit tests
2017-07-25 16:34:41 -06:00
55b07019a0 Fix for PKCS12 dynamic type names (also fix to use manual realloc since its NUMA type and that behaves different). 2017-07-25 15:19:34 -07:00
c03487d463 Fix for dynamic type of ED25519 key and PK_CALLBACK buffer not being free’d. Fix for portNumber stack var being used out of scope. 2017-07-25 15:07:58 -07:00
4fead493e7 add to return values checked 2017-07-25 14:44:40 -06:00
4438b8e92d update unit test case with DES3 and FIPS 2017-07-25 14:42:17 -06:00
5b0022fba0 HMAC key size when testing with FIPS 2017-07-25 14:42:17 -06:00
1b80e5a75f check return values with new unit tests 2017-07-25 14:42:17 -06:00
ef98e96767 Merge pull request #1058 from jrblixt/fix-AesFipsSanityCheck
Unit test GCM sanity check Fips change.
2017-07-25 13:30:35 -07:00
a076a2f0d8 Merge pull request #1055 from JacobBarthelmeh/Memory
fix memory management with --enable-fast-rsa make key and free RSA ke…
2017-07-25 11:03:16 -07:00
69d4bcbfd5 Merge pull request #1048 from dgarske/fix_custcurve
Fixes for using custom curves with `wc_ecc_set_custom_curve`
2017-07-25 10:59:58 -07:00
f9dee9adcc Merge pull request #1057 from kaleb-himes/TIRTOS-UPDATE
Add dependancy file to tirtos package.bld
2017-07-25 10:25:52 -07:00
4939c3eeef Merge pull request #1030 from SparkiDev/aesni_sha384
Assembly optimization for AES-NI, and AVX1 and AVX2
2017-07-25 09:35:43 -07:00
874144be73 Merge pull request #1046 from kojo1/zendesk-3052
io.h for VxWorks
2017-07-25 09:53:15 -06:00
f8e2f596d6 Unit test GCM sanity check Fips change. 2017-07-25 09:23:19 -06:00
e9f87b9f33 Merge pull request #1054 from jrblixt/fix-RsaSetRng
Fix rsa set rng
2017-07-25 09:16:14 -06:00
e8e1504d9f Alignment fix 2017-07-25 15:41:33 +10:00
08488b52b7 Fix for wolfCrypt test custom curve test not setting wc_ecc_set_custom_curvebefore calling wc_ecc_import_x963_ex. Fix for using ECC_CACHE_CURVE option and wc_ecc_set_custom_curve. Added error checking for wc_ecc_set_custom_curve calls. Reverted ASN header change in test.c. 2017-07-24 21:04:18 -07:00
33e214ffc1 Fix to allow ECC set curve size with curve_id == 0. Added wolfCrypt tests / example for using wc_ecc_set_custom_curve for BRAINPOOLP256R1. 2017-07-24 17:24:23 -07:00
5180cf4cce Fix ECC sign with custom curves so the custom params (dp) are passed to public key used for sign. 2017-07-24 17:21:51 -07:00
f147b01674 Fixes for using WOLFSSL_CUSTOM_CURVES and wc_ecc_set_custom_curve. Fixes resolves issue with ->dp and ->idx getting reset which caused curve parameters to not be set correctly. Proper sequence for using custom curves is ‘wc_ecc_init, wc_ecc_set_custom_curve then wc_ecc_make_key_ex(…, ECC_CUSTOM_IDX)’ or wc_ecc_import_x963_ex(…, ECC_CUSTOM_IDX). Test case and example to follow shortly. 2017-07-24 17:21:51 -07:00
b23f983604 Intel Assembly optimizations for ChaCha20 - AVX and AVX2 2017-07-25 10:19:02 +10:00
2329e37d97 Remove options outside VxWorks 2017-07-25 09:07:30 +09:00
8e38dcc347 Tidy code up - use local static for cpuid flags 2017-07-25 08:50:39 +10:00
bde6a35ac4 Assembly optimization for AES-NI, and AVX1 and AVX2
Unroll the loop for 8.
Use new optimized maths.
Fix SHA-384 to use SHA-512 assembly code.
Only perform CPU id check in one place.
2017-07-25 08:50:39 +10:00
36c2ee92dc Merge pull request #1050 from JacobBarthelmeh/ARMv8
Xilinx port
2017-07-24 15:37:05 -07:00
1040bbde16 fix memory management with --enable-fast-rsa make key and free RSA key before calling make key function 2017-07-24 16:20:27 -06:00
be61d7fca3 Merge pull request #1044 from ejohnstown/dtls-multicast
DTLS Multicast
2017-07-24 14:20:26 -07:00
6df9bc07a4 RSA Fips harness fix. 2017-07-24 13:21:06 -06:00
e68ceb3d2c Guard against WC_RSA_BLINDING in api.c unit test. 2017-07-24 09:51:50 -06:00
95664fdd05 Merge pull request #1041 from dgarske/armc0
Fixes for building with custom options
2017-07-24 08:40:51 -07:00
9d919ca947 Merge pull request #1049 from dgarske/fix_asynchmac
Fixes for building with Async
2017-07-24 08:36:20 -07:00
0fed9c1dc5 Add dependancy file to tirtos package.bld 2017-07-24 08:32:01 -06:00
59a46d08d9 Xilinx port 2017-07-21 17:39:47 -06:00
26ac5e1ab7 Fix for error: array subscript is below array bounds warning with GCC 7. Added check to prevent negative value from being used against array. 2017-07-21 12:00:28 -07:00
b7dac4911b Fix for using Async and HMAC when its not Intel QuickAssist. 2017-07-21 11:43:01 -07:00
9e3497b3d5 Merge pull request #1047 from JacobBarthelmeh/Testing
macro guard to check if ECC is enabled
2017-07-21 10:34:13 -07:00
f0d6299581 Fix issue with benchmark_init refactor where malloc failure could use null pointer. Added error checking on the wolfCrypt_Init(). 2017-07-21 09:31:12 -07:00
173283208b add WOLFSSL_HAVE_MAX in settings.h 2017-07-21 12:42:24 +09:00
bd6633a31c #elif defined(WOLFSSL_VXWORKS) in io.h 2017-07-21 12:37:32 +09:00
e3ffd7d539 macro guard to check if ECC is enabled 2017-07-20 16:38:53 -06:00
7a972d9611 Fix warning for signed/unsigned comparison. 2017-07-20 11:35:52 -07:00
cf9dfac877 Merge pull request #1043 from SparkiDev/sha3_be
Big endian fix for SHA-3
2017-07-20 09:14:00 -07:00
d6190507ac Big endian fix for SHA-3 2017-07-20 16:53:36 +10:00
8bfbabd147 Merge pull request #1040 from jrblixt/fix-FreeToHash
Added Free functions to hash unit test.
2017-07-19 18:19:28 -07:00
0a63221220 Fix for SHA3 benchmark digest size for 224. Fix for building track and debug memory together. Fix for hash test order of SHA256 wrong. Fix for asn SkipObjectId missing, when RSA and ECC disabled. Enhancement to allow individual bench calls with bench init/free. 2017-07-19 18:14:57 -07:00
7d82d7235a Merge pull request #1038 from JacobBarthelmeh/Testing
fix warnings found building on a PPC
2017-07-19 16:54:50 -07:00
0fee243b75 Multicast DTLS
Restored the multicast key setting code that was lost during rebase.
2017-07-19 14:01:29 -07:00
935bf9028d DTLS Multicast
1. Keep track of the number of records a session drops for having a
   bad MAC or detected as replayed.
2. Add function to access the drop statistics.
2017-07-19 13:38:31 -07:00
3329aa7bef DTLS Multicast
Added an API so a session may be queried to see if it has seen any messages
from a specified peerId.
2017-07-19 13:38:31 -07:00
6223f4cd8e fix a couple rebase merge errors 2017-07-19 13:38:31 -07:00
43f3e304e6 DTLS Multicast
Added a parameter check to wolfSSL_mcast_read().
2017-07-19 13:36:42 -07:00
1d32409651 DTLS Multicast
1. Allow the MTU size to be changed at compile time for memory
   contrained environments using static memory.
2. Add compile time option to disable the check for DTLS messages
   in the current epoch with an outside-the-window sequence number.
2017-07-19 13:36:42 -07:00
3b5e537f08 DTLS Multicast
wolfSSL_set_secret() was checking the preMasterSz against the sizeof
the preMasterSecret member of the Arrays structure. That member
was changed to a pointer and allocated dynamically for the session
write-duping. The comparison between the passed in size and the size
of the parameter started failing. The check now uses the constant
that is used for allocating the preMasterSecret member.
2017-07-19 13:36:42 -07:00
4c5ddc8482 Multicast DTLS
Handshake resources are required for Multicast DTLS to calculate the
session keys. When the session key is set, free the handshake resources.
2017-07-19 13:36:42 -07:00
6509faa78d Several parameters stored with DTLS session export have moved into
a wrapper structure. Updated the references.
2017-07-19 13:36:42 -07:00
1d5c6cce00 Fix some small things compiling with a different compiler, and some
other options.
1. Missing prototype for the Mcast receive I/O callback.
2. When disabling SHA-1, the old DTLS cookie callback wouldn't work.
   Allow for SHA-256.
2017-07-19 13:36:42 -07:00
fbd7f7972b Multicast
1. Used quotes rather than angle-brackets when including
   user_settings.h.
2. Used angle-brackets rather than quotes when including
   the ThreadX and NetX headers.
3. Added a define flag to include types.h with NetX or ThreadX.
4. Added a void typecast to hush a warning about an unused variable
   in the I/O callbacks for NetX.
5. Clean up static analysis warning in the peer sequence
   number selection for DTLS.
2017-07-19 13:36:41 -07:00
b40aad3f9e Added new “wolfSSL_mcast_get_max_peers” API. Minor cleanup with examples/client failure case. Fix possible unused var in wolfSSL_set_secret with DTLS disabled. 2017-07-19 13:35:59 -07:00
6097d29045 DTLS Multicast
1. Restore original EmbedRecvFrom callback.
2. Add new EmbedRecvFromMcast callback. (EmbedSendTo still the same.)
3. Set new receive from callback when setting the member ID.
4. Fixed bad rebase change.
2017-07-19 13:34:32 -07:00
af1a9ca908 Multicast
1. Squash a couple unused variable warnings.
2017-07-19 13:34:32 -07:00
1657569605 DTLS Multicast
1. Adding the prototypes for the sequence number high water callback.
2. Added the accessors to set the highwater callback function,
   trigger levels, and application context.
3. Calls the highwater callback at specified sequence number thresholds
   per peer.
2017-07-19 13:34:32 -07:00
96c25b2caa DTLS Multicast
1. Separated the peer ID from the array index into the peer sequence
   list. This allows peer IDs to range from 0..255, and to have an
   arbitrary size for the sequence list.
2. Add API to add and remove peer IDs from the sequence number list.
2017-07-19 13:33:58 -07:00
3f330a2b21 Multicast
1. Move the function `wolfSSL_mcast_read()` to
   follow `wolfSSL_read_internal()`.
2. Implemented `wolfSSL_mcast_read()`.
2017-07-19 13:33:58 -07:00
60c6c32ad3 Multicast DTLS
Tweak the size of the Peer Sequence list.
2017-07-19 13:33:58 -07:00
fa4a8fee8c DTLS Multicast
1. Temporary change to io.c to recieve datagrams from any peer.
2. Uses an array of Peer Sequence structures to track the current
   sequence number of all the peers.
2017-07-19 13:33:57 -07:00
0457df83d4 Multicast
1. When setting the key data, use same keys for server and client
   sides of the different keys. This feels a little kludgey, and
   won't work when using separate senders and listeners who may
   use unicast messages. But this works for the all peers are
   multicast senders case.
2017-07-19 13:33:57 -07:00
30a54a4860 Multicast
1. Add haveMcast as an exception case for needing a signing key along
   with havePSK and haveAnon.
2017-07-19 13:31:39 -07:00
41638b437b DTLS Multicast
1. Add configured group ID to outbound DTLS datagrams.
2. Parse the group ID from inbound DTLS datagrams.
2017-07-19 13:31:39 -07:00
dd9800856d Multicast DTLS
When setting the new secret, in DTLS mode, update the sequence
numbers, message windows, and epoch.
2017-07-19 13:31:39 -07:00
431a0cbea9 Multicast
1. Since multicast's only cipher suite uses null cipher
   automatically enable it.
2. Add options to example client and server to start
   testing multicast API. (Uses TLS over TCP.)
3. Updates to use the forced secrets set by API.
2017-07-19 13:31:39 -07:00
f83a593f27 Added Free functions to hash unit test. 2017-07-19 14:28:41 -06:00
b616b8df02 Multicast DTLS
1. Update API
2. Update unit test
3. Partially implemented wolfSSL_set_secret().
2017-07-19 13:26:23 -07:00
0838a3828b Multicast DTLS
1. Added new cipher suite for use with Multicast DTLS,
   WDM_WITH_NULL_SHA256. (It should be a private suite.)
2. Update the API test to use the new suite.
2017-07-19 13:26:23 -07:00
5154584576 Multicast DTLS
1. Add DTLS-multicast to the enable options.
2. Reorg DTLS related enable options together.
3. Update a couple enable option texts to use the AS_HELP_STRING() macro.
4. Add three new APIs for managing a DTLS Multicast session.
5. Add test code for new APIs.
6. Add stub code for the new APIs.
2017-07-19 13:26:23 -07:00
b3a20470fd Merge pull request #1036 from jrblixt/unitTest_api_addHc128-PR07182017
Unit test functions for HC128.
2017-07-19 13:29:18 -06:00
5c19b7bfe0 Changes per Chris. 2017-07-19 11:24:56 -06:00
667b8431cc Merge pull request #683 from moisesguimaraes/wolfssl-py
wolfssl python wrapper
2017-07-19 09:22:02 -07:00
81f09e575e fix warnings found building on a PPC 2017-07-19 09:24:45 -06:00
d2245b9614 Unit test functions for HC128. 2017-07-19 09:18:48 -06:00
5f17598d47 Merge pull request #1035 from jrblixt/Api_c-Fix
api.c fix.
2017-07-18 15:46:12 -07:00
0e6b0a6156 Merge pull request #1033 from jrblixt/unitTest_api_addAesCcm-PR07172017
Unit test functions for AES-CCM.
2017-07-18 15:44:12 -07:00
e68f1b2cec api.c fix. 2017-07-18 11:02:19 -06:00
c93a903cae atualiza lista de arquivos incluídos na versão de distribuição. 2017-07-18 11:36:07 -03:00
47fd21dc63 Merge pull request #1032 from JacobBarthelmeh/SGX
fix macro check with SGX settings
2017-07-17 19:07:28 -07:00
5671a4cb49 Added unit test functions for AES-CCM. 2017-07-17 15:58:11 -06:00
808f4692c7 Merge pull request #993 from jrblixt/unitTest_api_addRsa-PR06222017
Add RSA to unit test.
2017-07-17 13:42:42 -07:00
fdb371e82e Changes per Chris. 2017-07-17 10:43:36 -06:00
c4f0bd6172 fix macro check with SGX settings 2017-07-17 09:36:45 -06:00
cc4ca6a44a Merge pull request #1029 from kaleb-himes/RIOT_OS_PORTABILITY
Riot os portability and minor design modifications
2017-07-17 05:16:56 -07:00
a7390e32ec Identified two more old-style definitions in test app 2017-07-16 16:01:52 -06:00
e51225aca6 Address typo in RIOT_OS settings and removed ECC as a default feature 2017-07-16 14:22:15 -06:00
8acf709b59 Address some old-style function definitions found in RIOT testing 2017-07-16 14:18:58 -06:00
f7cd8a0f15 Merge pull request #1028 from JacobBarthelmeh/SGX
update SGX macros for harden
2017-07-14 19:42:29 -07:00
12795e9a40 update SGX macros for harden 2017-07-14 16:59:11 -06:00
9e9dbc5e97 Merge pull request #1026 from dgarske/curve_128bit
Fix for ARMv8 and Curve25519 with debug enabled
2017-07-14 13:27:22 -07:00
8612d52844 Fix issue with ARMv8 not performing 128-bit math against constants correctly in debug builds. Fix was to use the __int128_t as const for integers. Also added ./configure --enable-curve25519=no128bit option to force FE to not use the int128_t math. 2017-07-14 10:39:30 -07:00
8b55122ba0 Merge pull request #1024 from JacobBarthelmeh/UnitTests
adjust size of test buffer
2017-07-13 16:48:00 -07:00
a0e918c350 Merge pull request #1022 from JacobBarthelmeh/curve25519
build for ed25519 only
2017-07-13 12:30:26 -07:00
ba48221c41 adjust size of test buffer 2017-07-13 13:21:09 -06:00
af8b96e277 Merge pull request #1021 from toddouska/zeroret
don't treat peer closed / zero return as hard error in example servers
2017-07-13 09:11:31 -07:00
4491102eed Merge pull request #1018 from dgarske/fix_tfm_rusb_max
Fix for fast math `fp_read_unsigned_bin` function to check max size
2017-07-13 09:27:02 -06:00
d559eb0f4f Fix for fast math fp_read_unsigned_bin function to check max and correctly set a->used (is handled in fp_mul_2d). 2017-07-12 16:39:26 -07:00
43260f02f4 Merge pull request #1020 from toddouska/null
add NULL checks to check_domain_name()
2017-07-12 14:58:07 -07:00
b12e3c6579 Merge pull request #1019 from JacobBarthelmeh/Testing
update AES CTR API with ARMv8 port
2017-07-12 15:57:25 -06:00
c4fe67b633 build for ed25519 only 2017-07-12 15:53:11 -06:00
b4f9c46069 Merge pull request #1011 from dgarske/fixes_armv8
Fixes for building ARMv8 (--enable-armasm)
2017-07-12 15:44:31 -06:00
19787e6d4f don't treat peer closed / zero return as hard error in example servers 2017-07-12 14:15:16 -06:00
c777097e54 Fix wc_AesGcmDecrypt arg check for authIn. 2017-07-12 09:49:27 -07:00
b02c995fff add NULL checks to check_domain_name() 2017-07-12 10:16:31 -06:00
5bb8de627e Fixes based on peer review (thanks). 2017-07-12 09:04:10 -07:00
43ad30d364 Merge pull request #1016 from dgarske/fix_harden
Warn if hardening options are not defined and not disabled using `WC_NO_HARDEN`
2017-07-12 09:27:32 -06:00
dc5e6f789d Merge pull request #1017 from dgarske/bigend
Fix for big endian seg fault in `SendCertificateVerify`
2017-07-12 09:25:25 -06:00
9d7e8a83c9 update AES CTR API with ARMv8 port 2017-07-11 17:13:32 -06:00
7853440d89 Merge pull request #1015 from dgarske/config_ignore_cleanup
Improve the Git ignore formula for `config`
2017-07-11 15:42:08 -07:00
3ff088b92f Merge pull request #1014 from dgarske/atecc508a
Fixes for building with ATECC508A
2017-07-11 15:41:05 -07:00
00724c95a9 Add RSA to unit test. 2017-07-11 09:57:33 -06:00
f8c0a52170 Merge pull request #996 from jrblixt/unitTest_api_addAes-PR06152017
Unit test api add AES.
2017-07-11 08:36:13 -07:00
69e9aa29f2 Fix for big endian platform in SendCertificateVerify where seg fault occurred due to passing a int pointer to a word16 pointer, which caused wrong bits to get set. Fix to replace int with word16. Tests pass now. Also searched for other (word16*)& scenarios and only other place was in ntru code, which was also fixed. 2017-07-10 20:00:37 -07:00
a5cdbb18cb Reworked the AES Key Wrap to use existing code in aes.c (instead of duplicating code in armv8-aes.c). Cleanup for GE/FE math on 32-bit to remove duplicate #ifdef check. Fixed AES GCM arg check for authIn to allows NULL. 2017-07-10 19:12:41 -07:00
792fcefbb7 Fix to not warn about WC_RSA_BLINDING in FIPS mode. Add WC_RSA_BLINDING to Windows user_settings.h. 2017-07-10 18:41:22 -07:00
171796e8e2 Fix up for building without ./configure to warn if hardening options are not enabled. Currently ./configure defaults to --enable-harden, but if building sources directly and using settings.h or user_settings.h the hardening defines will not be set by default. If a user wants to use without hardening they can suppress the warning by defining WC_NO_HARDEN. 2017-07-10 14:40:07 -07:00
cebcee34dd Improve the Git ignore formula for config. Fixes issue #1012. 2017-07-10 14:21:19 -07:00
f9c949e7e5 Merge pull request #871 from danielinux/rm-wolfssl.pc
Remove automatically generated file wolfssl.pc
2017-07-10 14:16:48 -07:00
58c05123da Fixes for building with ATECC508A. Allow ECC check key to pass if slot numb is valid. 2017-07-10 11:07:24 -07:00
205da48416 Fixes for building ARMv8. Adds missing SHA224 and AES KeyWrap. Fixes for FE/GE warning with Aarch32. Fix possible build error with ed25519_test with ret not defined. 2017-07-07 15:12:51 -07:00
b6854d620f Merge pull request #1009 from dgarske/fix_tls13_async_aes
Fix problem with async TLS 1.3 and raw AES encryption key change
2017-07-06 15:39:22 -07:00
626eeaa63d Merge pull request #1005 from SparkiDev/nginx-1.13.2
Changes for Nginx
2017-07-06 14:33:46 -07:00
ced45ced41 Changes requested by Chris. 2017-07-06 13:42:54 -06:00
31ac379c4f Code review fixes
Change verify depth and set curve to be compiled in whe using:
OPENSSL_EXTRA
Fix comparison of curve name strings to use ecc function.
Fix verify depth check when compiling with both OPENSSL_EXTRA and
WOLFSSL_TRUST_PEER_CERT.
2017-07-06 15:32:34 +10:00
4b9069f786 Merge pull request #1008 from dgarske/fix_async_frag
Fixes for using async with max fragment
2017-07-05 11:00:26 -07:00
e767d40656 Merge pull request #1006 from cconlon/mqx
Update MQX Classic, mmCAU Ports
2017-07-05 10:30:20 -07:00
df119692d1 Fixes for using async with HAVE_MAX_FRAGMENT or --enable-maxfragment which affected TLS 1.2/1.3. Added TLS 1.2 test for using max fragment. 2017-07-03 19:57:37 -07:00
5bddb2e4ef Changes for Nginx
Support TLS v1.3 clients connecting to Nginx.
Fix for PSS to not advertise hash unless the signature fits the private
key size.
Allow curves to be chosen by user.
Support maximum verification depth (maximum number of untrusted certs in
chain.)
Add support for SSL_is_server() API.
Fix number of certificates in chain when using
wolfSSL_CTX_add_extra_chain_cert().
Allow TLS v1.2 client hello parsing to call TLS v1.3 parsing when
SupportedVersions extension seen.
Minor fixes.
2017-07-04 09:37:44 +10:00
2939fbe242 Merge pull request #1004 from dgarske/fix_qat_dh
Fixes for QAT with DH and HMAC
2017-07-03 12:31:48 -07:00
1729e0205f reads _CADATA from file 2017-07-03 12:39:42 -03:00
54177c14b4 imports certs from ./certs 2017-07-03 12:31:47 -03:00
bba3fcf772 removes certs 2017-07-03 12:22:22 -03:00
c9a2c4ef02 Fix problem with async TLS 1.3 with hardware where encryption key is referenced into ssl->keys and changes before it should be used. Solution is to make raw copy of key and IV for async AES. 2017-06-30 16:41:01 -07:00
6a695b76cb Fixed server side case for DH agree issue with QAT hardware where agreeSz is not set. Fix to allow QAT start failure to continue (this is useful since only one process can use hardware with default QAT configuration). 2017-06-30 11:48:59 -07:00
a025417877 Fix issue with QAT and DH operations where key size is larger than block size. Fix issue with DhAgree in TLS not setting agreeSz, which caused result to not be returned. Renamed the internal.c HashType to HashAlgoToType static function because of name conflict with Cavium. Optimize the Hmac struct to replace keyRaw with ipad. Enable RNG HW for benchmark. Fixed missing AES free in AES 192/256 tests. 2017-06-30 11:35:51 -07:00
a3375ef961 Merge pull request #997 from NickolasLapp/master
Updates to Linux-SGX README, and disable automatic include of
2017-06-30 11:48:12 -06:00
d956181911 Merge pull request #1003 from jrblixt/asn_cMemLeak-fix
Fix possible memory leak in wc_SetKeyUsage.
2017-06-29 15:28:53 -07:00
baf6bdd6e1 asn.c memory leak fix. 2017-06-29 14:55:19 -06:00
31e1d469c0 Merge pull request #1002 from SparkiDev/tls13_imprv
Improvements to TLS v1.3 code
2017-06-29 09:21:20 -07:00
bba914f92e protect wolfSSL_BN_print_fp with NO_STDIO_FILESYSTEM 2017-06-29 08:52:45 -06:00
d2ce95955d Improvements to TLS v1.3 code
Reset list of supported sig algorithms before sending certificate
request on server.
Refactored setting of ticket for both TLS13 and earlier.
Remember the type of key for deciding which sig alg to use with TLS13
CertificateVerify.
RSA PKCS #1.5 not allowed in TLS13 for CertificateVerify.
Remove all remaining DTLS code as spec barely started.
Turn off SHA512 code where decision based on cipher suite hash.
Fix fragment handling to work with encrypted messages.
Test public APIS.
2017-06-29 09:00:44 +10:00
c099137450 add classic Kinetis mmCAU support, FREESCALE_USE_MMCAU_CLASSIC 2017-06-28 16:32:35 -06:00
15a1c9d48e fixes for MQX classic with Codewarrior 2017-06-28 12:28:40 -06:00
a89e50b7b7 include settings.h in wc_port.h to pick up user_settings.h 2017-06-28 12:25:44 -06:00
c748d9dae9 Merge pull request #998 from dgarske/fix_no_server_or_client
Fix build with either `NO_WOLFSSL_SERVER` or `NO_WOLFSSL_CLIENT` defined
2017-06-28 10:30:08 -07:00
b29cd414ef Merge pull request #995 from SparkiDev/tls13_cookie
Add TLS v1.3 Cookie extension support
2017-06-28 10:12:49 -07:00
47cc3ffdbc Fix build with either NO_WOLFSSL_SERVER or NO_WOLFSSL_CLIENT defined. 2017-06-26 23:05:32 -07:00
7aee92110b Code review fixes
Also put in configuration option for sending HRR Cookie extension with
state.
2017-06-27 08:52:53 +10:00
9ca1903ac5 Change define name for sending HRR Cookie 2017-06-27 08:37:55 +10:00
d4e104231c Updates to Linux-SGX README, and disable automatic include of
benchmark/wolfcrypt tests in static library compile
2017-06-26 14:55:13 -07:00
a3b21f0394 Aes unit test functions. 2017-06-26 15:16:51 -06:00
8bd6a1e727 Add TLS v1.3 Cookie extension support
Experimental stateless cookie
2017-06-26 16:41:05 +10:00
3bdf8b3cfd remove fcntl.h include when custom generate seed macro is defined (#994) 2017-06-23 14:03:07 -07:00
fbc4123ec0 Added -x option to allow example server to continue running when errors occur. 2017-06-22 21:19:59 -07:00
8ef556c2a0 Merge pull request #991 from JacobBarthelmeh/Testing
update .am files for make dist
2017-06-22 15:02:12 -07:00
b0f87fdcf7 update .am files for make dist 2017-06-22 14:14:45 -06:00
72da8a9a07 Merge pull request #731 from moisesguimaraes/fixes-ocsp-responder
adds OCSP Responder extKeyUsage validation
2017-06-22 11:43:51 -07:00
d017274bff Merge pull request #976 from levi-wolfssl/PemToDer-overflow-fix
Fix potential buffer over-read in PemToDer()
2017-06-22 10:07:11 -07:00
3a4edf75bd Rename the option to disable the new issuer sign check to ‘WOLFSSL_NO_OCSP_ISSUER_CHECK`. 2017-06-22 09:56:43 -07:00
06fa3de31c Merge pull request #980 from SparkiDev/tls13_0rtt
TLS v1.3 0-RTT
2017-06-22 09:44:41 -07:00
ccb8e8c976 Merge pull request #988 from jrblixt/unitTest_api_addArc4-PR06212017
Add Arc4 to unit test.
2017-06-22 09:15:28 -06:00
207b275d24 Fix HelloRetryRequest for Draft 18 2017-06-22 14:40:09 +10:00
08a0b98f52 Updates from code review 2017-06-22 12:40:41 +10:00
a37808b32c Sanity checkes added 2017-06-21 17:14:20 -06:00
1aee054902 Add Arc4 to unit test. 2017-06-21 17:03:27 -06:00
a3578c6643 Adds WOLFSSL_NO_OCSP_EXTKEYUSE_OCSP_SIGN option to provide backwards compatibility option for OCSP checking. 2017-06-21 14:12:12 -07:00
7a3769f435 Fix wolfCrypt errors test to allow -178. 2017-06-21 14:12:12 -07:00
4bb17205fe adds new ocsp test 2017-06-21 14:12:12 -07:00
a9d5dcae58 updates ocsp tests; adds check for OCSP response signed by issuer. 2017-06-21 14:12:12 -07:00
42a2f5858e adds OCSP Responder extKeyUsage validation 2017-06-21 14:12:12 -07:00
9ead657723 Merge pull request #989 from dgarske/testing
Fixes for CRL handling and possible false failure in `wolfSSL_CTX_load_verify_locations`
2017-06-21 14:10:49 -07:00
cd570a01f2 Merge pull request #975 from dgarske/ed_curve_small
Allow different Ed25519/Curve25519 math versions
2017-06-21 13:00:33 -07:00
247388903b Remove double cast + move min() calls 2017-06-21 13:56:34 -06:00
fec75e445e Fix for build error in master from QAT fixes in PR #967. Odd that this build error didn’t show up till just now. 2017-06-21 12:52:03 -07:00
64873489ef Merge pull request #977 from cconlon/cms
add PKCS7/CMS decode support for KARI with IssuerAndSerialNumber
2017-06-21 11:54:20 -06:00
d75a9f2436 Fix for wc_ReadDirFirst to return non-zero value if no files found. Fix for wolfSSL_CTX_load_verify_locations to not return failure due to wc_ReadDirNext “no more files” -1 response. 2017-06-21 10:36:49 -07:00
2f9f746053 Fix for CRL serial number matching to also check length. Fix for testing the verify callback override ‘-j’ to not enable CRL since the CA’s are not loaded for this test. 2017-06-21 10:36:49 -07:00
0fa99fcc2e Fix for openssl script test reporting ./scripts/openssl.test: line 219: psk: command not found. 2017-06-21 10:36:49 -07:00
3e06beac19 Additional edge case build error with 32-bit and small where int32_t not defined due to stdint.h not being included. 2017-06-21 10:13:20 -07:00
c183e03802 Merge pull request #986 from jrblixt/unitTest_api_addRabbit-PR06192017
Add Rabbit unit test functions.
2017-06-21 10:45:41 -06:00
decdf7ae8b Cleanup 2017-06-21 16:56:51 +10:00
1549a60aa5 Put back Draft 18 code 2017-06-21 08:35:28 +10:00
350ce5fcef TLS v1.3 0-RTT 2017-06-21 08:35:28 +10:00
97906bfdb2 Merge pull request #982 from JacobBarthelmeh/Testing
set return code to TEST_SUCCESS on successful connection
2017-06-20 16:21:50 -06:00
8b637cbd1b Merge pull request #967 from dgarske/fix_qat
Fixes and Improvements for Intel QuickAssist
2017-06-20 14:49:56 -07:00
a555b5e54a Merge pull request #987 from SparkiDev/nginx_fix
Fix for Nginx - return specific error when at end of file
2017-06-20 14:28:34 -07:00
c14e2d5888 Add Rabbit unit test functions. 2017-06-20 15:16:12 -06:00
6e6b341b46 Removed automatically generated file wolfssl.pc 2017-06-20 10:39:02 +02:00
d5b1698c43 Fix for Nginx - return specific error when at end of file 2017-06-20 09:27:24 +10:00
4950c644cd Fix edge case on 32-bit with ED small only. 2017-06-19 10:15:05 -07:00
7fdb7037d8 Fixes for building Ed/Curve for building on 32/64 bit with uint64_t. Fixes for build with Ed/Curve with ECC disabled. 2017-06-19 10:09:12 -07:00
2a688bf905 Merge pull request #972 from jrblixt/unitTest_api_addCamellia-PR06142017
Add Camellia unit test functions.
2017-06-19 09:33:19 -06:00
c118146803 set return code to TEST_SUCCESS on successful connection 2017-06-19 09:26:16 -06:00
ee83710a0a Fix for building only curve small and ed disabled. Fix for client assuming supported curves is enabled with curve. 2017-06-16 16:17:01 -07:00
6a2824f199 Add Camellia unit test functions.. 2017-06-16 16:27:03 -06:00
e0e8d14630 Merge pull request #970 from jrblixt/unitTest_api_addChacha-PR06142017
Add ChaCha unit test functions.
2017-06-16 16:15:39 -06:00
816b0b058c add PKCS7/CMS decode support for KARI with IssuerAndSerialNumber 2017-06-16 15:16:32 -06:00
43d6b7a145 Add ChaCha unit test functions. 2017-06-16 13:00:17 -06:00
17936d65e0 please Jenkins + a bit of cleanup 2017-06-16 12:27:59 -06:00
2f36b24796 Merge pull request #973 from JacobBarthelmeh/Testing
add sanity check for wolfSSL_X509_NAME_oneline function
2017-06-16 10:54:02 -07:00
4389d271cc Fixed potential buffer overflows when configured with --enable-opensslextra 2017-06-16 11:02:06 -06:00
3c173ba366 Enhancement to support different sized Curve/Ed math library implementations for FE/GE. Remains backwards compatible with CURVED25519_SMALL define. Adds new defines CURVE25519_SMALL and ED25519_SMALL to allow individual enabling of math library choice (_low_mem or _operations). Example: ./configure --enable-ed25519=small --enable-curve25519. 2017-06-16 09:41:10 -07:00
e6f0ee84ec Merge pull request #971 from jrblixt/unitTest_api_addIdea-PR06142017
Add IDEA unit test functions.
2017-06-15 13:12:52 -06:00
bb6582896d add sanity check for wolfSSL_X509_NAME_oneline function 2017-06-15 11:55:37 -06:00
d5a43af751 Code review changes. Reviewer: Chris. 2017-06-15 11:12:01 -06:00
1d303f5f61 Merge pull request #966 from cconlon/ecc_asn
fix wc_EccPrivateKeyDecode when pub exists
2017-06-15 08:42:09 -07:00
25ce52cd0c Add IDEA unit test functions. 2017-06-14 23:43:00 -06:00
2b085351b6 Merge pull request #968 from JacobBarthelmeh/Testing
silence "may be used uninitialized" warning
2017-06-14 18:05:45 -07:00
55d421d8b6 Merge pull request #964 from SparkiDev/ecc_priv_only
Ecc priv only
2017-06-14 16:42:24 -07:00
e1fef39aa2 silence "may be used uninitialized" warning 2017-06-14 16:58:22 -06:00
f008350afd Added QAT DRBG support. 2017-06-14 15:45:34 -07:00
73567853d3 Fix possible memory leak in DSA and ECC (mp_clear should always be called since async was implemented… even for fast math). Fix dynamic type mismatch in PKCS7. 2017-06-14 15:11:43 -07:00
68439d4317 Completed refactor to cleanup dynamic types. Refined the tmp buffers to new types for more granularity. Fixed several places where malloc/free type was mis-matched. Cleanup of the PKCS12 code to improve cleanup handling. Fix wc_PKCS12_parse to return 0 on success else failure. 2017-06-14 15:11:43 -07:00
88afc7a92f Progress on dynamic type cleanup for over-use of tmp_buffer. Increases performance on NUMA memory platform having ability to be more selective about the types that are NUMA allocated for use against QuickAssist hardware. 2017-06-14 15:11:43 -07:00
40d94724eb Added async hardware support for p_hash (PRF). Fix BuildTls13HandshakeHmac to use async devId. Rename poor global variable names for rng with QSH/NTRU. 2017-06-14 15:11:43 -07:00
131ccf289f Disable large alloc scrypt test. Fix unused ret warning in DH key gen from prev change. 2017-06-14 15:11:43 -07:00
a77f9fe3e6 Fix for DH so software math is used if prime is under 768 bits. 2017-06-14 15:11:43 -07:00
b778ddfea2 Merge pull request #957 from SparkiDev/tls13_updates
Tls13 updates
2017-06-14 14:59:11 -07:00
c283d4aece Merge pull request #962 from NickolasLapp/linux-sgx
Add LINUX SGX Support for building of wolfSSL static library. See README
2017-06-14 15:56:30 -06:00
70eddc4336 Merge pull request #965 from cconlon/threadx
ThreadX/NetX warning and optional dc_log_printf exclusion
2017-06-14 14:56:12 -07:00
ff48d19727 fix wc_EccPrivateKeyDecode when pub exists 2017-06-14 14:49:52 -06:00
89e6ac91bf Improve PSK timeout checks
Post-handshake Authentication

Fix KeyUpdate to derive keys properly

Fix supported curves (not checking ctx extensions)
2017-06-14 11:28:53 -07:00
6d5c257010 Merge pull request #963 from dgarske/fix_tls13_options
Fixes for TLS 1.3 without ECC or RSA
2017-06-14 11:19:14 -07:00
ea9e4887e9 ThreadX/NetX warning and optional dc_log_printf exclusion 2017-06-14 11:12:27 -06:00
1e94868432 Add LINUX SGX Support for building of wolfSSL static library. See README
in IDE/LINUX-SGX/README.md.
2017-06-13 17:34:45 -07:00
13c4fe6cc4 Add test 2017-06-14 09:44:26 +10:00
62ae1d3023 Fix for private key only ECC key. 2017-06-14 09:33:27 +10:00
19f22edd9a Merge pull request #949 from cconlon/string_abstraction
Fix mystrnstr() prototype declaration
2017-06-13 16:06:31 -07:00
1ddd6fd3fe Merge pull request #933 from jrblixt/unitTest_api_add3des
Add 3Des to unit test.
2017-06-13 15:35:54 -06:00
189d579bec Merge pull request #960 from levi-wolfssl/void
Add void to function prototype.
2017-06-13 13:58:34 -07:00
76aa1f855f Merge branch 'masterB' of https://github.com/jrblixt/wolfssl into unitTest_api_add3des-cpy 2017-06-13 14:06:30 -06:00
0ef1129f18 Changes WRT small stack. 2017-06-13 13:44:06 -06:00
042ee817f3 Merge pull request #757 from moisesguimaraes/updates-wolfcrypt-py-docs
Removes 3DES from the wolfCrypt Python docs
2017-06-13 10:55:21 -06:00
048b074894 Merge pull request #932 from jrblixt/unitTest_api_addHmac-mergeWolfMaster
Add HMAC test functions to unit test.
2017-06-13 10:53:09 -06:00
adf819458c Fixes for TLS 1.3 without ECC or RSA. Fix for building without ECC where HAVE_SUPPORTED_CURVES was getting defined because of ENABLED_TLSX. 2017-06-13 09:44:14 -07:00
a18e9a220f Merge pull request #956 from dgarske/fix_tls13_async
Fixes for asynchronous TLS 1.3
2017-06-13 08:08:34 -07:00
af2cbcdbab Added new arg documentation for asyncOkay in doxygen style. 2017-06-12 11:42:48 -07:00
ce231e0cbc Fixes for asynchronous TLS 1.3. Fixes for PK_CALLBACKS with async. New helper API's for wolfSSL_CTX_GetDevId and wolfSSL_CTX_GetHeap. Fix for build to not include tls13.c if not enabled to suppress empty object file warning. Fix typo in fe_low_mem.c. General cleanup. Extra tls13.c debug messages. 2017-06-12 11:42:48 -07:00
1d2b4226a4 Merge pull request #959 from SparkiDev/tls_pss_fix
Fix check for PSS availability in peer
2017-06-12 11:20:29 -07:00
894f4f6fa5 Merge pull request #954 from jrblixt/asn_cSetKeyUsage-fix
Fix wc_SetKeyUsage() value error.
2017-06-12 10:48:56 -07:00
0fcd1617eb Merge pull request #952 from JacobBarthelmeh/Testing
sanity check on build with ECC or RSA
2017-06-12 10:47:53 -07:00
7cc455259e Merge pull request #941 from SparkiDev/ed25519
ED25519 with certificates and TLS
2017-06-12 10:47:21 -07:00
267753acdd add void to function prototype 2017-06-12 10:28:10 -06:00
8dbd9a88ee Fix for CCM - TLS v1.3 needs all nonce/IV bytes 2017-06-12 14:21:43 +10:00
044417ba01 Fix for cache only SNI and TLS v1.3 2017-06-12 09:46:50 +10:00
fdcf25b6d1 Fix check for PSS availability in peer 2017-06-12 09:05:32 +10:00
c70fa33094 Merge pull request #958 from kaleb-himes/OPENSSL_EVP
Fix compile time Error with openssl extra and cryptonly
2017-06-09 11:12:36 -07:00
86809cca74 Fix compile time warning with openssl extra and cryptonly 2017-06-08 20:14:15 -06:00
90287c8857 Merge pull request #955 from kaleb-himes/ARG-ERR
Fix compile error, too many args with --enable-wpas
2017-06-08 14:59:55 -07:00
a00165768c Fix compile error, too many args with --enabl-wpas 2017-06-08 13:34:44 -06:00
3429b5a3b5 Rework CheckPrivateKey 2017-06-08 09:26:49 +10:00
1db52f0c04 Fix to use different PEM header for EDDSA keys
Include new cert and key files in distribution
Fix compile issue when only doing TLS13.
2017-06-08 09:26:49 +10:00
a30e8eb4ad Fix for benchmarking X25519 2017-06-08 09:26:49 +10:00
1bc862ae24 Ed25519 testing in test.c 2017-06-08 09:26:49 +10:00
613d30bcae ED25519 TLS support 2017-06-08 09:26:49 +10:00
4beda52dcd Ed25519 Certificates 2017-06-08 09:26:49 +10:00
1be0b2aa30 Merge pull request #953 from SparkiDev/tls13_psk
External PSK working in TLS13
2017-06-07 13:58:03 -07:00
2c84eee2df Fix wc_SetKeyUsage() value error. 2017-06-07 13:58:13 -06:00
5d5ff56336 External PSK working in TLS13 2017-06-07 17:20:22 +10:00
26f106c42b Merge pull request #948 from SparkiDev/tls13_down
Implement TLS v1.3 specified downgrade protection mechanism
2017-06-05 16:17:49 -07:00
63c85f72d2 sanity check on build with ECC or RSA 2017-06-05 15:21:34 -06:00
af03b7a4ff Merge pull request #944 from SparkiDev/tls13_20
Updates for Draft 20 of TLS v1.3
2017-06-05 14:06:09 -07:00
026a95ff10 Merge pull request #950 from dgarske/fix_ocsp_crl
Fixes for OCSP and CRL with non-blocking sockets
2017-06-05 13:59:36 -07:00
642795db1b Implement TLS v1.3 specified downgrade protection mechanism
TLS v1.2 implementations whould implement the downgrade protection
mechanism too and so is included.
2017-06-05 09:18:46 +10:00
c55575665f Cleanup to use WANT_READ instead of async WC_PENDING_E for non-blocking OCSP and CRL. 2017-06-02 10:35:26 -07:00
c3d29ddfe3 Merge pull request #946 from SparkiDev/jenkins
Fix NO_DH build issue
2017-06-02 09:46:55 -07:00
b3a85bc2c7 Fixes for OCSP and CRL with non-blocking sockets. Fix for OCSP and CRL file descriptor check to allow 0. 2017-06-02 09:36:35 -07:00
3df565475a protect mystrnstr prototype with WOLFSSL_LEANPSK instead of STRING_USER 2017-06-02 09:26:40 -06:00
0b32d0368f Updates for Draft 20 of TLS v1.3 2017-06-02 15:59:49 +10:00
6b34a94589 Fix NO_DH build issue 2017-06-01 11:56:53 +10:00
7a52b5b394 fixes makefiles and requiremets 2017-05-29 20:44:28 -03:00
38c6d2e3eb Merge pull request #737 from embray/patch-1
wolfcrypt Python: work around minor issue in Random.__del__
2017-05-29 20:19:21 -03:00
320ad56139 Merge pull request #939 from dgarske/fixes_async
Fixes for build with async
2017-05-26 17:04:57 -07:00
c0408aebb4 Merge pull request #938 from dgarske/fix_asn_noocspoptcert
Fixes for OCSP workaround for incomplete cert chain
2017-05-26 17:02:31 -07:00
e345471b21 Logical error fix. 2017-05-26 13:27:27 -06:00
a0345f6ba9 Fix for building without WOLFSSL_NO_TRUSTED_CERTS_VERIFY. 2017-05-26 10:53:42 -07:00
53021a5df7 Increased security for WOLFSSL_NO_TRUSTED_CERTS_VERIFY workaround so it only applies to OCSP. Fix for the workaround to still return date or parsing errors. 2017-05-26 10:01:42 -07:00
1c0006882a Remove AssertIntEq from within function. 2017-05-26 09:44:12 -06:00
a44df73151 Merge pull request #937 from SparkiDev/sha3
Initial revision of SHA-3
2017-05-25 10:48:28 -07:00
7ef5aeaf13 Fixes from review and tidy up code. 2017-05-25 09:09:50 +10:00
4134073c8d Initial revision of SHA-3 2017-05-25 09:09:50 +10:00
0e22752af4 Jenkins fixes. 2017-05-24 16:32:21 -06:00
47b0a62c88 Hmac unit test functions ready for PR. 2017-05-24 16:32:17 -06:00
edddd05226 Changes per Chris. 2017-05-24 11:50:18 -06:00
4d458831b7 Jenkins fixes. 2017-05-24 11:50:18 -06:00
b47fca5760 Patched and Clean up for PR. 2017-05-24 11:50:13 -06:00
60c51db831 Merge pull request #928 from jrblixt/unitTest_api_sha224-RipeMd
Add sha224 RipeMd to unit test
2017-05-24 09:00:35 -06:00
c1664bd1a0 Fixes for async with benchmark tool. 2017-05-23 15:41:42 -07:00
64de29f277 Fix for wolfCrypt test with enable-all and asynccrypt. 2017-05-23 15:23:58 -07:00
77dbf539c8 Merge pull request #934 from JacobBarthelmeh/mysql
some MYSQL updates for cmake and with sun 64 bit
2017-05-23 15:01:39 -07:00
720f3fdad2 Fixed a few minor build errors with async enabled. 2017-05-23 15:00:55 -07:00
d2b6ab0796 Merge pull request #935 from JacobBarthelmeh/Testing
remove size_t dependency with default build
2017-05-23 14:58:50 -07:00
6b09a7c6e1 Merge pull request #922 from SparkiDev/tls_pss
TLS v1.2 and v1.3 RSA PSS
2017-05-23 14:57:10 -07:00
1880677232 Disable wc_scrypt tests that use high memory for BENCH_EMBEDDED. 2017-05-23 14:42:19 -07:00
fc5a37ac02 Changes per Chris. 2017-05-23 10:01:31 -06:00
9f5f1dd00f Merge pull request #936 from SparkiDev/cplusplus
Compiling with g++ when configured with --enable-distro
2017-05-22 16:02:56 -07:00
19edd47018 Merge pull request #917 from SparkiDev/tls_curve25519
Enable X25519 for Key Exchange in TLS
2017-05-22 16:00:00 -07:00
47d04ebaff Fix from review. 2017-05-23 08:54:25 +10:00
c85d07a49d Merge pull request #929 from dgarske/fix_asn_perm_dirname
Fix for parsing permitted name constraint for subject directory name
2017-05-22 09:55:49 -07:00
a8f08d1d70 Merge pull request #807 from kojo1/AES-GCM-stm32f4
Fixes for STM32F4 AES GCM
2017-05-22 09:53:53 -07:00
0e860b0d55 Merge pull request #925 from dgarske/enable_all
Added new `./configure --enable-all` option to enable all features
2017-05-22 09:22:50 -07:00
15a2323c09 Compiling with g++ when configured with --enable-distro 2017-05-22 10:14:02 +10:00
6c6069bed8 Fixes from review 2017-05-22 09:47:45 +10:00
8920cd89e4 Fixes from review 2017-05-22 09:09:31 +10:00
570c3f02b8 Merge pull request #931 from JacobBarthelmeh/Memory
add trackmemory enable option
2017-05-19 17:21:56 -07:00
398c27d848 remove size_t dependency with default build 2017-05-19 16:16:08 -06:00
b6c2e2acf9 require using wolfSSL memory when enabling trackmemory 2017-05-19 15:24:38 -06:00
184e9c4090 Fix typo from intermediate change for unaligned CBC fixes. Thanks Nick. 2017-05-19 14:10:50 -07:00
a616513860 Added support for AES GCM with STM32F2/STM32F4 using Standard Peripheral Library and CubeMX. Added AES ECB Decrypt for Standard Peripheral Library. Fixes for wolfCrypt test with STM32 crypto hardware for unsupported tests (AES CTR plus 9 and AES GCM with IV != 12). Improve AES CBC for STM32 to handle block aligned only. Added IDE example for SystemWorkbench for STM32 (Open STM32 tools) IDE. 2017-05-19 11:15:46 -07:00
0a28b76e8b Refactor of the ./configure help to use AS_HELP_STRING. 2017-05-19 10:54:13 -07:00
1cf3530124 Fix for building with WOLFSSL_NO_OCSP_OPTIONAL_CERTS defined. 2017-05-19 09:59:03 -07:00
bdaa827114 Merge pull request #927 from dgarske/fix_nxp_ltc
Build fixes for NXP KSDK with MMCAU / LTC after Hexiwear changes
2017-05-19 08:49:54 -07:00
7f01aa917a Merge pull request #930 from dgarske/fix_win
Fixes for building AES key wrap and PKCS7 on Windows
2017-05-19 08:16:21 -07:00
4390f4c711 TLS v1.2 and PSS
Cleanup the TLS v1.3 PSS code as well.
Added RSA API wc_RsaPSS_CheckPadding() to check the padding - no longer
a simple memcmp with the digest.
2017-05-19 11:49:43 +10:00
5ef977aa3d Put X25519 behind P256
Option to have X25519 prioritized.
Show curve name and DH key size in TLS v1.3.
2017-05-19 10:58:43 +10:00
7f350a726b Merge pull request #926 from dgarske/bench_block_size
Added argument for benchmark block size
2017-05-18 16:45:00 -07:00
452e057dbf Merge pull request #919 from dgarske/bshg
Add `WOLFSSL_NO_TRUSTED_CERTS_VERIFY` option
2017-05-18 16:44:14 -07:00
c3a7497562 Merge pull request #923 from JacobBarthelmeh/staticmemory
updated static memory feature with pkcs7
2017-05-18 16:42:21 -07:00
4737b97503 add trackmemory enable option 2017-05-18 16:46:56 -06:00
cbb2c73828 Improve NXP MMCAU/LTC AES CBC handling for unaligned sizes. Cleanup formatting in a few places. 2017-05-18 15:04:01 -07:00
d61e0243a3 Fixes for building AES key wrap and PKCS7 on Windows. Cleanup snprintf to use XSNPRINTF and changed so define is always setup. 2017-05-18 14:44:19 -07:00
36e1fb5e5b Fix for parsing permitted name constraint for subject directory name. Cleanup to use switch in ConfirmNameConstraints. 2017-05-18 14:06:56 -07:00
09ca962d66 use LP64 for CPU arch type when sun or __sun is defined 2017-05-18 14:39:26 -06:00
2086394a35 compatibility of get cipher list function and update cmake files 2017-05-18 14:36:34 -06:00
77ac61c0f4 Prepare for PR Add Sha224 and RipeMd to unit test. 2017-05-18 13:08:25 -06:00
30db8e95a7 Build fixes for KSDK NXP MMCAU / LTC after Hexiwear changes. 2017-05-18 11:52:20 -07:00
48895cf03b Added argument for benchmark block size. Usage: ./wolfcrypt/benchmark/benchmark 128. Automatic calculation for showing as bytes, KB or MB. 2017-05-18 11:24:32 -07:00
7bd1e0b80a Added new ./configure --enable-all option to enable all features. Allows building all features without using the --enable-distro option, which only allows shared build and does not generate an options.h file. 2017-05-18 10:57:28 -07:00
c5cc9f5392 Patch from customer that adds new WOLFSSL_NO_TRUSTED_CERTS_VERIFY option to load CA using subject and match using publicKey. This is a workaround for situation where entire cert chain is not loaded/available. This is not a secure solution because it does not perform PKI validation. 2017-05-18 09:55:39 -07:00
4370a01778 Merge pull request #921 from dgarske/fix_crl
Fix for CRL issue with XFREE using invalid arg for heap.
2017-05-18 09:40:40 -07:00
b5e74878b3 Merge with wolfSSL master for PR includes RipeMd and Sha224 unit test
functions.
2017-05-18 10:05:22 -06:00
4edcbc79c1 RipeMd and Sha224 added to unit test. 2017-05-18 09:32:11 -06:00
548c01ce54 updated static memory feature with pkcs7 2017-05-18 09:31:09 -06:00
9fb6373cfb Get PSS going on server side 2017-05-18 15:36:01 +10:00
c1f82ece7a Fix for CRL issue with XFREE using invalid arg for heap. 2017-05-17 16:39:35 -07:00
2f15d57a6f Merge pull request #640 from jrblixt/unitTest_api_dev
unit test md5, sha, sha256, sha384, sha512
2017-05-17 09:17:32 -07:00
63a6618feb Enable X25519 for Key Exchange in TLS 2017-05-17 08:58:12 +10:00
4c451a6c61 Merge pull request #920 from dgarske/fix_sb_tls
Fix for scan-build warning for possible use of uninitialized `eccKey`
2017-05-16 12:56:50 -07:00
5621fad02b Merge pull request #918 from cconlon/vxworksreadme
fix VxWorks README formatting
2017-05-16 12:46:26 -07:00
cb3b10054d unwanted removal added back. 2017-05-16 13:13:53 -06:00
270d6cbae3 Merge branch 'unitTest_api_dev' of https://github.com/jrblixt/wolfssl into unitTest_api_dev 2017-05-16 13:05:26 -06:00
6acd5dafa7 Changes from Todd's code review. 2017-05-16 12:58:07 -06:00
81b6894f6f Merge pull request #841 from SparkiDev/nginx2
Fix loading of CRLs and certs from a file.
2017-05-16 09:13:29 -07:00
289f60e2c9 Changes from Todd's code review. 2017-05-16 10:04:30 -06:00
79b0311952 Fix for scan-build warning src/tls.c:4898:20: warning: The left operand of '!=' is a garbage value. 2017-05-16 08:50:06 -07:00
c960faffeb fix VxWorks README formatting 2017-05-16 09:21:54 -06:00
e5fe1a3750 Unlock on memory allocation failure. 2017-05-16 09:41:17 +10:00
da15b54529 Merge pull request #915 from SparkiDev/blake2b_init
Blake2b fix for GCC 5.4
2017-05-15 08:59:54 -07:00
bb60f7a4a4 Merge pull request #914 from JacobBarthelmeh/Testing
check return value of test case
2017-05-15 08:58:31 -07:00
d53a77a589 Merge pull request #916 from SparkiDev/ecc_unused
Fix for scan_build_known_configs warning
2017-05-14 21:51:02 -07:00
1a08143946 Fixup for async on master 2017-05-15 10:10:28 +10:00
1e2a6412d7 Find the CRL entry again after lock 2017-05-15 10:10:28 +10:00
ff4fcf21d6 Add test for private key only ecc key 2017-05-15 10:04:42 +10:00
c6ce1fe330 Allow private key only ECC key to be loaded 2017-05-15 10:04:42 +10:00
c7e57e9c6c Late CRL check - copy data before use 2017-05-15 10:04:42 +10:00
c8e6c64e51 Fix warning when building for Windows 2017-05-15 10:04:42 +10:00
4723b8470a Allow a CRL's signature to be verified on use 2017-05-15 10:04:42 +10:00
4d77e80d04 Fix loading of CRLs and certs.
Change function wolfSSL_X509_LOOKUP_load_file to load multiple CRLs and
certificates from a file.
Change CRL loading to have a flag to not verify CRL signature - only do
this when using wolfSSL_X509_LOOKUP_load_file() as the certificate is
not always available.
Add test case for loading multiple CRLs in one file without certificate.
2017-05-15 10:04:42 +10:00
224c1b2645 Fix for scan_build_known_configs warning 2017-05-15 09:59:34 +10:00
f8023b808f Blake2b fix for GCC 5.4
Memsetting P and then setting non-zero fields works with GCC 5.4.
2017-05-15 09:47:11 +10:00
3297280e62 Merge pull request #913 from JacobBarthelmeh/Compatibility-Layer
allow re-using WOLFSSL structure after calling shutdown
2017-05-12 16:50:14 -07:00
dcd3a6a478 Merge pull request #907 from dgarske/fix_verifycb
Fixes for verify callback override
2017-05-12 16:45:55 -07:00
66e086a0bf check return value of test case 2017-05-12 16:40:37 -06:00
0374907acc allow re-using WOLFSSL structure after calling shutdown 2017-05-12 13:54:20 -06:00
d03f97dafc Merge pull request #911 from dgarske/gcc_7
Fixes to work with gcc 7.1
2017-05-12 12:08:08 -07:00
606aca9916 Merge branch 'master' of https://github.com/jrblixt/wolfssl into unitTest_api_dev 2017-05-12 02:04:58 -06:00
01a5f901d0 Merge pull request #909 from dgarske/fix_no_harden
Fix issue with --disable-harden
2017-05-11 16:42:19 -07:00
53a837b230 Fix to only use FALL_THROUGH macro for GCC 7.1 or later. 2017-05-11 15:52:32 -07:00
7c7503449f Removed the -Wimplicit-fallthrough=5 from autogen.sh, since older GCC throws “error: unknown warning option”. 2017-05-11 15:28:49 -07:00
562db08c3d Implemented strict switch fall-through handling using new macro FALL_THROUGH. 2017-05-11 15:15:19 -07:00
c0c98c8f64 Fixes to address build warnings for GCC 7. Used -Wimplicit-fallthrough=0 to suppress all switch fall-through warnings. 2017-05-11 15:12:16 -07:00
f1e6f7d01d Attempt to fix Visual Studio 2012 compiler issue with test.h myVerify callback. 2017-05-11 13:53:04 -07:00
ce42738198 Merge pull request #900 from dgarske/coverity_part3
Coverity fixes for TLS 1.3, async, small stack and normal math.
2017-05-11 13:05:53 -07:00
5c652e398f Merge pull request #896 from dgarske/async_cleanups
Fixes for async and smallstack
2017-05-11 13:05:25 -07:00
e12545ac38 Merge pull request #846 from SparkiDev/renum
Renumbered return values in test.c
2017-05-11 13:05:08 -07:00
05d2032661 Fix for useVerifyCb variable not used warning with NO_CERTS defined. 2017-05-11 12:57:12 -07:00
1b21df9b2b Fix issue with --disable-harden build due to wc_off_on_addr defined but not used. Cleanup of the wc_off_on_addr code to combine duplicate definitions. Fixes issue #908. 2017-05-11 12:49:34 -07:00
2efa7d5b8b Fix for verify callback override, peerVerifyRet code on success and ensuring DOMAIN_NAME_MISMATCH error gets passed down in ECDSAk case. Added unit test case to verify callback override works. Fixes issue #905 and issue #904. Fix for async build goto label typo. 2017-05-11 12:23:17 -07:00
a79f9c93c9 Merge pull request #906 from cconlon/tls13beta
wolfSSL 3.11.1 release, TLS 1.3 BETA
2017-05-11 11:46:10 -07:00
7d6597fe55 wolfSSL 3.11.1 release, TLS 1.3 BETA 2017-05-11 10:01:04 -06:00
dcc9f9ae63 Merge pull request #903 from SparkiDev/tls13_interop3
Interop testing fixes
2017-05-10 23:04:56 -07:00
22ce2f183d Interop testing fixes
Fix TLS13 cipher suite name to CHACHA20
Include SignatureAlgorithm in older versions of TLS when compiling for
TLS v1.3.
BIT STRING unused bits doesn't necessarily indicate last unused bit.
Fix ecc_dsa_sa_algo value.
2017-05-11 10:42:09 +10:00
01586b26ae Merge pull request #902 from SparkiDev/tls13_interop2
TLS v1.3 Interop changes
2017-05-10 09:28:22 -07:00
ec6d8f48b8 Add PSS for TLS v1.3 2017-05-10 17:22:53 +10:00
df3abee72c TLS v1.3 Interop changes
Added Curve25519 for TLS v1.3 only. Curve25519 won't work with older
protocol versions.
Always send signature algorithm extension in TLS v1.3 for server
certificates. If only doing PSK doesn't need to be sent though.
2017-05-10 15:16:27 +10:00
8d4f8c6d80 Fixes for build with distro for BuildTls13HandshakeHmac arg change. 2017-05-09 10:09:43 -07:00
c47826cc8f Additional TLS 1.3 return code checking. 2017-05-09 09:45:40 -07:00
e8cf4b5ff0 Coverity fixes for TLS 1.3, async, small stack and normal math. 2017-05-09 09:13:21 -07:00
dea092fa0a Merge pull request #901 from SparkiDev/tls13_interop
TLS v1.3 interop fixes
2017-05-09 09:08:31 -07:00
46c4adcf4c TLS v1.3 interop fixes 2017-05-09 14:49:21 +10:00
2e016f3b25 Refactor of the rsa_test and dh_test to better handle cleanup. 2017-05-08 12:30:54 -07:00
285a338054 Merge pull request #899 from kaleb-himes/release-update
Credit E.S. from W.A. with report of DTLS interop bug
2017-05-08 12:06:41 -06:00
7b6e2b1002 Credit E.S. from W.A. with report of DTLS interop bug 2017-05-08 10:26:08 -06:00
5726c23d81 Fix for scan-build warning with ret not being read in DoServerHello. 2017-05-06 14:00:24 -07:00
8cd78edac1 Fixes for building with smallstack 2017-05-06 00:39:12 -04:00
011178994b Fix typos with goto exit labels and heap. 2017-05-06 00:32:02 -04:00
6cc3983894 Fix for using async with —enable-eccencrypt. 2017-05-06 00:28:01 -04:00
17587d38f8 Fix for new AES 192/256 tests to handle async wait. 2017-05-06 00:28:01 -04:00
d23f1e5637 Merge pull request #895 from JacobBarthelmeh/Testing
use type with XFREE
2017-05-05 16:27:03 -07:00
176193a835 Merge pull request #877 from dgarske/tls13
Add TLS 1.3 support
2017-05-05 12:50:40 -07:00
a4ceeed462 use type with XFREE 2017-05-05 13:27:33 -06:00
fdb46ac24c Fix typo with blake2b_test return code. 2017-05-05 11:11:17 -07:00
0ca2d7c137 Renumbered return values. 2017-05-04 14:53:39 -07:00
af0103bc94 Fix for Valgrind memory leak with the “ssl->hsHashes”. The DTLS wolfSSL_connect for “IsDtlsNotSctpMode” at line 8134 calls InitHandshakeHashes, but doesn’t free existing. Best overall solution is to make sure and free an existing on InitHandshakeHashes, since WOLFSSL is memset to 0. 2017-05-04 14:51:31 -07:00
758c2a761c Increase timeout on ready file for tls13.test 2017-05-04 14:51:31 -07:00
902f5cf53f Stack size enabled config fix 2017-05-04 14:51:31 -07:00
f0204de881 Fix for async and tls13 config 2017-05-04 14:51:31 -07:00
570befb63f Fixes for using async. Combine duplicate DoCertificate and DoTls13Certificate code into ProcessPeerCerts. Cleanup of the XMALLOC/XFREE to use ssl->heap. 2017-05-04 14:51:31 -07:00
efb4b3c183 Fix for unit test with non-blocking set. 2017-05-04 14:51:31 -07:00
253140f37e Fixes for TLS 1.3. Fix issue with wc_AesGcmDecrypt checking for authIn arg (allowed to be NULL). Fix for preMasterSz in TLSX_KeyShare_ProcessEcc. Fix for building with --disable-asn (NO_CERTS). Fix to remove client “-t” option from help, which no longer exists. Added new WOLFSSL_DEBUG_TLS option for new messages added. 2017-05-04 14:51:31 -07:00
77f9126edf Rebase fixes for TLS 1.3. Getting a decrypt error with the TLS 1.3 test from the SendTls13CertificateVerify. 2017-05-04 14:51:31 -07:00
2b1e9973ec Add TLS v1.3 as an option 2017-05-04 14:51:30 -07:00
edf5d6d777 Merge pull request #894 from JacobBarthelmeh/Release
Prepare for release 3.11.0
2017-05-04 14:49:43 -07:00
b51643c344 prepare for release version 3.11.0 2017-05-04 14:17:35 -06:00
7dd877554b build for windows visual studio with AES GCM 2017-05-04 14:14:12 -06:00
9b5340d3af sanity checks before copying copying peer certificate 2017-05-04 13:10:46 -06:00
bfc43cee15 Merge pull request #893 from cconlon/pkcs7-valgrind-fix
fix PKCS7 signedData valgrind issue
2017-05-03 18:14:32 -07:00
5e06d59c79 fix PKCS7 signedData valgrind issue 2017-05-03 17:16:44 -06:00
e771611c29 Merge pull request #891 from JacobBarthelmeh/Testing
sanity check on input buffer index
2017-05-03 12:13:43 -07:00
86f10086bb Merge pull request #890 from dgarske/fix_sb_sni
Fix for scan build warning for `TLSX_SNI_GetRequest` possible use of null ptr
2017-05-03 10:03:59 -07:00
55538b5de0 sanity check on input buffer index 2017-05-03 10:21:03 -06:00
338194be25 Fix for scan build warning for TLSX_SNI_GetRequest possible use of null pointer. 2017-05-03 07:33:13 -07:00
1dc5a0fba2 Merge pull request #889 from JacobBarthelmeh/master
add digsigku to renewcerts script and update the not after date
2017-05-02 19:59:07 -07:00
a8a5841b7c Merge pull request #888 from JacobBarthelmeh/Testing
Testing
2017-05-02 17:52:14 -07:00
4c8fdf99c5 add digsigku to renewcerts script and update the not after date 2017-05-02 18:08:10 -06:00
8146f73eff warnings when using g++ compiler 2017-05-02 15:20:20 -06:00
aa990ed1ce in error case close FILE 2017-05-02 14:54:27 -06:00
dbb67d8582 warnings for builds of haproxy, nginx, and leanpsk 2017-05-02 14:29:53 -06:00
0532adf653 Merge pull request #887 from dgarske/minor_cleanups
Added return code checking for `wolfCrypt_Init()`
2017-05-02 12:19:12 -07:00
ddcf11011e Added return code checking for wolfCrypt_Init(). Added initRefCount check on wolfCrypt_Cleanup(). Fix link for tenAsys INtime RTOS readme. 2017-05-02 10:20:31 -07:00
27aafd674a Merge pull request #886 from dgarske/fixes_coverity2
Fixes for coverity scan (part 2)
2017-05-02 08:53:03 -07:00
8d032081ae Merge pull request #767 from shihrer/hexiwear_pr
Hexiwear changes and KDS Project for Hexiwear platform
2017-05-02 07:31:41 -06:00
4135279f82 Merge pull request #843 from kaleb-himes/dtls-interop
DTLS update per RFC 6347 Section 4.2.3
2017-05-01 19:29:27 -07:00
f61380da21 Merge pull request #870 from kaleb-himes/PSK-UPDATE
Update PSK identity length per RFC 4279 - section 5.3
2017-05-01 19:04:32 -07:00
3647e50c17 Fixes for the GrowInputBuffer and GrowOutputBuffer changes to only use align when WOLFSSL_GENERAL_ALIGNMENT > 0. 2017-05-01 18:48:54 -07:00
9491027c85 Fixes for coverity scan (part 2). 2017-05-01 16:34:24 -07:00
1a0b408658 Merge pull request #883 from dgarske/fixes_coverity
Fixes for coverity scan
2017-05-01 16:30:04 -07:00
9655a1e38c Merge pull request #885 from dgarske/async_cavium
Fixes for Cavium Nitrox with async
2017-05-01 13:36:59 -07:00
f19cf4cb34 Fix the client PSK callback to always null terminate after callback. Remove the +1 on the test.h examples for PSK callbacks. 2017-05-01 12:10:05 -07:00
7a1776e931 Merge pull request #881 from cconlon/sniffer
fix sniffer with AES-GCM, add scratch authTag buffer
2017-05-01 11:51:01 -07:00
893b6f7d75 Merge pull request #884 from JacobBarthelmeh/Testing
fix warnings and errors with FreeBSD PowerPC
2017-05-01 11:37:04 -07:00
9269298034 Merge branch 'hexiwear_pr' of https://github.com/shihrer/wolfssl into hexiwear_pr 2017-05-01 12:04:35 -06:00
abe5a318f2 Added hexiwear to include.am and removed dev environment specific variable 2017-05-01 10:44:09 -06:00
2de6c88b80 correct typo when checking if variable rng is null 2017-04-30 18:53:58 -06:00
7270134aec Merge pull request #788 from takotakot/readme
Fix spacing and comma
2017-04-30 06:48:45 +09:00
450ff55d83 fix warnings and errors with FreeBSD PowerPC 2017-04-28 17:57:48 -06:00
db63fe83d4 Initial pass at fixes for coverity scan. 2017-04-28 14:59:45 -07:00
4387e1f08e Merge pull request #855 from insane-adding-machines/master
Added support for HAproxy load balancer
2017-04-28 13:10:58 -07:00
885b301e72 Merge pull request #882 from dgarske/fix_memleak
Fix memory leak with InitSSL having duplicate RNG creation code
2017-04-28 12:07:45 -07:00
c92b497ea3 Fix async merge error which duplicated the wolfSSL_new RNG creation and caused a memory leak. Fix for build error with plainDigestSz not being initialized. 2017-04-28 10:11:17 -07:00
ab78bd0d90 Merge pull request #880 from dgarske/intime_rtos2
tenAsys INtime RTOS port fixes from customer peer review
2017-04-27 21:47:53 -07:00
b8917baa6a fix sniffer with AES-GCM, add scratch authTag buffer 2017-04-27 15:22:30 -06:00
053594eb98 Workaround for expected failed RSA operations in test.c not failing for Cavium Nitrox V. 2017-04-27 14:21:38 -07:00
2deced22dc Merge pull request #879 from dgarske/fix_builderrors2
Fix for scan-build issues with possible use of null’s
2017-04-27 15:06:37 -06:00
b61f279b61 Merge pull request #878 from cconlon/serialfix
skip removal of leading zero in GetASNInt() when INTEGER is only a si…
2017-04-27 13:13:21 -07:00
a4efaf5eaa Fix mutex to use single count for semaphore so behavior is like mutex. Fix typo with “received”. Fix for mp_clear with fast math to do null check on arg (noticed null with ecc make key benchmark with wc_ecc_free). 2017-04-27 13:09:11 -07:00
3e6243eb08 Fix for scan-build issues with possible use of null’s in evp.c wolfSSL_EVP_CipherFinal out arg and DoCertificate args->certs. Removed obsolete client example help arg “-t”. 2017-04-27 10:53:47 -07:00
8118762dc4 skip removal of leading zero in GetASNInt() when INTEGER is only a single zero byte 2017-04-27 11:07:59 -06:00
fd2996bdeb Progress with RSA fixes for Cavium Nitrox after async refactor. Improved method for RsaKey and ecc_key typedef to work with async. 2017-04-26 16:40:10 -07:00
774ce1a47c Fixes for build with Cavium. 2017-04-26 16:39:41 -07:00
4363cf8a5c Merge pull request #876 from dgarske/fix_jenkins_errors
Fix minor build errors and warnings
2017-04-26 16:54:49 -06:00
d612b827b7 Fixes for build warnings on Windows. Fix PKCS7 to use const for byte array declaration. Cleanup of the pkcs7 MAX_PKCS7_DIGEST_SZ. Fix for unsigned / signed comparison warning for pkcs7_load_certs_keys in test.c. Fix for cast warning from word16 to byte in asn.c. Fix for build error with io.h refactor for InTime RTOS. 2017-04-26 09:40:33 -07:00
325a3ce418 Merge pull request #875 from dgarske/fix_asn_setname_len
Fix issue with ASN encoding SetName function header length
2017-04-26 10:03:25 -06:00
5a77eaa579 Fix issue with XFREE in asn.c using invalid heap pointer. Fix issue with bad variable names and missing asterisk in test.c pkcs7_load_certs_keys. 2017-04-26 08:45:05 -07:00
7db30ef550 Merge pull request #690 from embray/build/enable_aes_counter
Add a configure flag specifically for enabling AES CTR mode
2017-04-25 15:14:13 -07:00
1f923a11ee Merge pull request #874 from dgarske/fix_builderrors
Build fixes to address Jenkins reports
2017-04-25 15:14:37 -06:00
ac2835ec2e Merge pull request #873 from dgarske/fix_crl_smallstack
Fix build error with CRL and WOLFSSL_SMALL_STACK.
2017-04-25 15:02:04 -06:00
d435c16fe8 Fix issue with ASN encoding, where the SetName function was incorrectly adding extra byte for object id tag. Refactor changed lines 7694 and 7700 to use SetObjectId which handles length (was using SetLength prior to refactor). Issue was noticed via compatibility testing using generated cert against openssl asn1parse. 2017-04-25 12:06:08 -07:00
fb90a4e498 Fix issue with PSK max length by adding 1 for the null terminator on the strings and allowing up to 128 characters for the PSK. Improved the test.h example for PSK callbacks. 2017-04-25 11:43:45 -07:00
be6b12a350 Build fixes to address Jenkins reports. Additionally tested with enable-distro and small-stack identified issue in ssl.c (note: we need to add this combination to Jenkins). 2017-04-25 11:10:36 -07:00
92d3c7cd59 Merge pull request #872 from JacobBarthelmeh/Testing
handle redefinition warnings
2017-04-24 15:08:13 -07:00
8b0784bdfa Fix build error with CRL and WOLFSSL_SMALL_STACK. 2017-04-24 14:08:59 -07:00
4dad4b6962 handle redefinition warnings 2017-04-24 10:40:56 -06:00
dd2915f4fa Merge pull request #869 from cconlon/ecckeytoder
Fix leading zero in wc_BuildEccKeyDer
2017-04-24 09:02:41 -07:00
08787621ea wolfssl.pc: Prefix reset to /usr/local 2017-04-24 12:45:23 +02:00
6ada67f93f Prefix stubs with wolfSSL_ 2017-04-24 11:43:19 +02:00
7bd7de350c More fixes for haproxy port 2017-04-24 10:41:39 +02:00
7058211860 Merge from latest masterbranch 2017-04-24 06:18:44 +02:00
ebb32265eb Minor fixes after PR review 2017-04-24 06:16:35 +02:00
db835da00b Fixes after wolfSSL feedback 2017-04-22 10:58:05 +02:00
348536af9a Update PSK identity length per RFC 4279 - 5.3 2017-04-21 16:38:19 -06:00
3600371abf Merge pull request #848 from ghoso/des_ecb_encrypt_impl
openSSL compatibility API
2017-04-21 14:05:22 -06:00
af26708330 Fix leading zero in wc_BuildEccKeyDer 2017-04-21 11:40:50 -06:00
7a3f7ad9be Merge pull request #868 from kaleb-himes/ARDUINO-UPDATE
Update ARDUINO script per issue #859 from @pasko-zh
2017-04-20 17:02:49 -07:00
a857da23c0 Merge pull request #862 from kaleb-himes/STUNNEL-FIX
Fix this issue: PKCS12 is defined to be WC_PKCS12, then redefined as an enumerated value of 12 in asn.h
2017-04-20 13:24:39 -07:00
1dd16e6702 Update enum name from peer review 2017-04-20 10:05:12 -06:00
c9d53a4ca2 Merge pull request #854 from NickolasLapp/master
Add AES 192/256 bit wolfCrypt tests
2017-04-19 16:50:18 -07:00
d6abd4d131 Merge pull request #867 from JacobBarthelmeh/mutex
fix mutex allocation sanity checks
2017-04-19 13:32:55 -07:00
a8eb2614f6 Update reference for aes192/256 test to remove bad url and give specific
NIST reference document.
2017-04-19 13:13:34 -06:00
14e37cdc4c Change variable name, add comment 2017-04-19 13:10:55 -06:00
5b257d6fd8 Merge pull request #866 from JacobBarthelmeh/Testing
add back in haveTrustPeer variable and put macro guard on WC_RNG typedef
2017-04-19 11:57:56 -07:00
32e83cb55d Update ARDUINO script per issue #859 from @pasko-zh 2017-04-19 11:53:58 -06:00
344c0ec747 Merge branch 'master' of github.com:wolfSSL/wolfssl 2017-04-19 10:10:23 -06:00
4eecaf2574 fix mutex allocation sanity checks 2017-04-18 17:18:19 -06:00
a8115d51fa add back in haveTrustPeer variable and put macro guard on WC_RNG typedef 2017-04-18 16:53:02 -06:00
5b82c2f6ec Merge pull request #853 from JacobBarthelmeh/Windows
testsuite time check on Windows system and fix dh_test if statement
2017-04-18 14:57:53 -07:00
1215203c39 Update sha384 fips. 2017-04-18 12:53:54 -06:00
4a8259b2ad Jenkin's Fips corrections. 2017-04-18 11:29:35 -06:00
5486a60326 sha512.c updates. 2017-04-18 11:18:29 -06:00
3279865610 Fixes after jenkins report
https://test.wolfssl.com/jenkins/job/windows_pull_request_builder/1453/
2017-04-18 18:47:04 +02:00
bf877a636f Merge from masterbranch 2017-04-18 18:34:14 +02:00
7df7a07a68 Merge pull request #863 from JacobBarthelmeh/Testing
fix old version of AEAD cipher suite
2017-04-18 09:33:00 -07:00
8e7d0ba243 Merge pull request #860 from dgarske/fix_allow_old_tls_wsha1
Fix for building with NO_OLD_TLS and WOLFSSL_ALLOW_TLS_SHA1
2017-04-18 09:31:45 -07:00
fbd5d5bfc6 Merge pull request #865 from cconlon/pkcs7-signed-ecc
PKCS#7 SignedData - ECDSA and hash options
2017-04-18 09:30:47 -07:00
bab3fd5925 fix clang/scan-build warnings for PKCS7 2017-04-17 14:23:37 -06:00
4f26e0341b allow different hashes with PKCS7 SignedData, cleanup conditional builds 2017-04-17 09:46:26 -06:00
f7c58b0643 Updated wolfcrypt/src/sha256.c. 2017-04-14 16:42:18 -06:00
3749988ee2 Updated wolfcrypt/src/sha.c. 2017-04-14 16:24:25 -06:00
5b5c8f1e95 Updated mcapi/mcapi_test.c ; wolfcrypt/src/md5.c ; wolfcrypt/src/pwdbased.c. 2017-04-14 16:12:29 -06:00
b08e5f3b82 Merge branch 'master' into hexiwear_pr 2017-04-14 12:03:42 -06:00
53eca92cc0 change type for test instead and add RSA blinding check 2017-04-14 12:02:49 -06:00
21d2becd6b Modified settings.h to allow building on KSDK 1.3, modified test.c and benchmark.c to work with KSDK, added KDS project for building wolfSSL for Hexiwear 2017-04-14 12:02:28 -06:00
999328f2a0 fix old version of AEAD cipher suite 2017-04-14 10:32:15 -06:00
3f067bccf0 fix redefinition of PKCS12 version and PKCS12 struct when building w/ STUNNEL 2017-04-14 10:20:35 -06:00
74aafb1679 add PKCS7 SignedData with ECDSA 2017-04-14 09:29:22 -06:00
609ca3c823 Jenkin's Visual Studio status check correction. 2017-04-14 02:34:31 -06:00
b5d856eada Merge branch 'master' of https://github.com/wolfSSL/wolfssl into unitTest_api_dev 2017-04-14 02:17:57 -06:00
00ea508751 Param check fix in hash files. 2017-04-14 02:16:04 -06:00
7779a64cae Fix for building with NO_OLD_TLS and WOLFSSL_ALLOW_TLS_SHA1. 2017-04-13 21:26:20 -07:00
f2ac410f1e Merge pull request #858 from dgarske/fix_bench_count
Fix build/test error with `--enable-scrypt` and build error for ARMv8 AES init
2017-04-13 21:14:44 -07:00
ac6b840dc5 Merge Conflict with wolfSSL master. 2017-04-13 16:51:08 -06:00
85b78835a6 Merge branch 'master' into unitTest_api_dev
src/keys.c
	wolfcrypt/src/hmac.c
	wolfcrypt/src/md5.c
	wolfcrypt/src/sha256.c
	wolfcrypt/src/sha512.c
	wolfssl/wolfcrypt/md5.h
2017-04-13 16:33:23 -06:00
ebde18af59 silence static analysis tool warning about null parameter after sanity check 2017-04-13 15:32:31 -06:00
620d21c850 fix scrypt test with no password 2017-04-13 15:06:26 -06:00
3df47d57ab Fix error with armv8-aes wc_AesInit function using h instead of heap variable. (moved from PR #852). 2017-04-13 14:50:55 -06:00
4c6a70861b Fix build errors with --enable-scrypt. 2017-04-13 09:37:48 -07:00
723ee69114 Fixed missing braces in wolfcrypt test 2017-04-13 15:31:50 +02:00
ef231a039d Updated to latest masterbranch 2017-04-13 15:28:19 +02:00
fe215c4a57 Fix DES_ecb_encrypt function in terms of reviewing point. 2017-04-13 12:31:52 +09:00
460197a5e0 Add aes192 and aes256 tests
Fix bug with AES decrypt for non-128 bit sizes on STM32F4 hardware
crypto
2017-04-12 20:09:47 -06:00
3ac35ce3b3 Merge pull request #838 from SparkiDev/curve25519_51-bit
Curve25519 51-bit Implementation
2017-04-12 16:06:37 -06:00
26c8958d1e testsuite time check on Windows system and fix dh_test if statement 2017-04-12 15:56:45 -06:00
8ee9e4ff8b Merge pull request #851 from toddouska/nosessid
don't send session ID on server side if session cache is off unless w…
2017-04-12 14:50:43 -07:00
3abcff4db5 Merge pull request #850 from JacobBarthelmeh/Testing
fix invalid check on unsigned type
2017-04-12 13:56:44 -07:00
27d009475c Merge pull request #847 from dgarske/distro_options
Fixes for --enable-distro to include more features by default
2017-04-12 13:56:24 -07:00
e1a53a6c36 Merge pull request #845 from SparkiDev/cert_file
Rename caCertFile
2017-04-12 13:55:56 -07:00
4f7b27fc88 Merge pull request #844 from SparkiDev/size_t-printf
32-bit size_t and printf fix
2017-04-12 13:54:52 -07:00
3810571e0d Merge pull request #715 from dgarske/async_intelqa
Intel QuickAssist (QAT) support and async enhancements/fixes
2017-04-12 13:54:19 -07:00
b1d59a2334 don't send session ID on server side if session cache is off unless we're echoing session ID as part of session tickets 2017-04-12 10:54:19 -07:00
11133e578d Fixes and cleanups based on feedback from Sean. Added ifdef checks around WC_PENDING_E code to reduce code size for non-async builds. Cleanup accumulative result code checking in SSL_hmac. Cleanup of the RSA async state advancement. 2017-04-12 10:07:38 -07:00
b510c8199e fix invalid check on unsigned type 2017-04-12 10:41:35 -06:00
df70b3c859 Removed empty ifdef 2017-04-12 12:50:17 +02:00
3e9a5fd433 Updated to latest masterbranch 2017-04-12 12:48:38 +02:00
9ca49e7f56 Add more stubs for haproxy 2017-04-12 11:59:17 +02:00
02513792b6 Make new function stubs public 2017-04-12 10:37:17 +02:00
d0f31d4a30 Fix issue with wc_ecc_make_key where state failure can occur if the wc_ecc_init hasn’t been called on key prior. Now wc_ecc_make_key and wc_ecc_import_private_key (and _ex versions) can be called without having to call wc_ecc_init first. This keeps backwards compatibility. If async or static memory is desired then wc_ecc_init_ex must be called first. 2017-04-11 15:57:09 -07:00
85bef98331 Fix wc_ecc_alloc_rs memset logic. Fix error handling in hmac.c for SHA224. Cleanup of the wc_DhGenerateKeyPair_Async function. Added comment about the “BuildTlsFinished” allocation for hash buffer. Fixed issue with example server that caused the benchmark script to fail in throughput mode. 2017-04-11 14:13:08 -07:00
0cebc2172c Fix WolfSSL_DES_ecb_encrypt(). 2017-04-12 00:03:35 +09:00
d399b51ba8 Fix WolfSSL_DES_ecb_encrypt(). 2017-04-11 23:49:10 +09:00
de017b0028 Added stubs required to compile HAPROXY 2017-04-11 16:03:08 +02:00
8f300515bd Grouped HAPROXY compatibility into WOLFSSL_HAPROXY flag
now haproxy compatible wolfssl builds with:

./configure --prefix=/usr --sysconfdir=/etc --disable-fastmath \
iam * ] 2:18 PM
    --disable-fasthugemath --disable-bump \
    --enable-opensslextra \
    --enable-keygen --enable-certgen \
    --disable-ntru --disable-examples \
    --enable-tlsx --enable-haproxy \
    --enable-savecert --enable-savesession --enable-sessioncerts \
    --enable-webserver --enable-sslv3 --enable-stunnel
2017-04-11 14:18:41 +02:00
213afe18c3 Merge pull request #842 from JacobBarthelmeh/Testing
fix c32toa needed with --enable-session-ticket
2017-04-10 19:10:35 -07:00
eb1a191fd2 Refactor to add the wc_HmacInit and wc_HmacFree calls. 2017-04-10 14:47:08 -07:00
e419a6f899 Fixes and cleanups based on feedback from Sean. 2017-04-10 14:47:07 -07:00
62e7dc87c3 Fix merge error with verify callback and totalCerts. 2017-04-10 14:45:05 -07:00
56a1618ba0 Fixes to a few things based on peer review. 2017-04-10 14:45:05 -07:00
c1640e8a3d Intel QuickAssist (QAT) support and async enhancements/fixes:
* Adds ./configure "--with-intelqa=../QAT1.6”, port files, memory management and README.md (see wolfcrypt/src/port/intel/).
* Added Intel QAT support for RSA public/private (CRT/non-CRT), AES CBC/GCM, ECDH/ECDSA, DH, DES3, SHA, SHA224, SHA256, SHA384, SHA512, MD5 and HMAC.
* wolfSSL async enabled all client and server: PKI, Encrypt/Decrypt, Hashing/HMAC and Certificate Sign/Verify.
* wolfSSL async support in functions: Encrypt, Decrypt, VerifyMAC, BuildMessage, ConfirmSignature, DoCertificate, ParseCertRelative, and MakeSignature.
* wolfCrypt test and benchmark async support added for all HW acceleration.
* wolfCrypt benchmark multi-threading support.
* Added QuickAssist memory overrides for XMALLOC, XFREE and XREALLOC. XREALLOC determines if existing pointer needs reallocated for NUMA.
* Refactor to make sure “heap” is available for async dev init.
* Added async support for all examples for connect, accept, read and write.
* Added new WC_BIGINT (in wolfmath.c) for async hardware support.
* Added async simulator tests for DES3 CBC, AES CBC/GCM.
* Added QAT standalone build for unit testing.
* Added int return code to SHA and MD5 functions.
* Refactor of the async stack variable handling, so async operations have generic args buffer area and cleanup function pointer.
* Combined duplicate code for async push/pop handling.
* Refactor internal.c to add AllocKey / FreeKey.
* Refactor of hash init/free in TLS to use InitHashes and FreeHashes.
* Refactor of the async event->context to use WOLF_EVENT_TYPE_ASYNC_WOLFSSL for WOLFSSL* and WOLF_EVENT_TYPE_ASYNC_WOLFCRYPT for WC_ASYNC_DEV*.
* Suppress error message for WC_PENDING_E.
* Implemented "wolfSSL_EVP_MD_CTX_init" to do memset.
* Cleanup of the openssl compat CTX sizes when async is enabled.
* Cleanup of AES, DES3, DH, SHA, MD5, DES3, DH, HMAC, MD5 for consistency and readability.
* Cleanup of the OPAQUE_LEN.
* Cleanup to use ENCRYPT_LEN instead of sizeof(ssl->arrays.preMasterSecret).
* Changed ssl->arrays.preMasterSecret to use XMALLOC (accelerates HW operations)
* Reduce verbosity with debug enabled for "GetMyVersion", "wolfSSL Using RSA OAEP padding" and "wolfSSL Using RSA PKCSV15 padding".
* Updated RSA un-padding error message so its different than one above it for better debugging.
* Added QAT async enables for each algorithm.
* Refactor of the async init to use _ex.
* Added WC_ASYNC_THRESH_NONE to allow bypass of the async thresholds for testing.
* Reformatted the benchmark results:
PKI: "RSA 2048 private HW 18522 ops took 1.003 sec, avg 0.054 ms, 18467.763 ops/sec"
Crypto/Hashing: SHA-256 SW 350 megs took 1.009 seconds, 346.946 MB/s Cycles per byte = 9.87
* Added min execution time for all benchmarks.
* Moved wc_*GetHash and wc_*RestorePos to appropriate files so use of isCopy flag is local.
* Fix for ECC sign status sometimes being invalid due to uninitialized ECC digest in benchmark.
* Added new DECLARE_VAR/FREE_VAR and DECLARE_ARRAY/FREE_ARRAY macros for helping setup test/benchmark variables to accelerate async.
* Added NO_SW_BENCH option to only run HW bench.
* Added support for PRNG to use hardware SHA256 if _wc devId provided.
* Fix to prevent curve tests from running against wrong curve sizes. Changed wc_ecc_set_curve to match on exact size.
* Added the wc_*GetHash calls to the wolfCrypt tests.
* Added async hardware start/stop to wolfSSL init/cleanup.
* Refactor to add wc_*Copy for hashing context (for async), which replaces wc_*RestorePos.
* Fixes for building with TI hashing (including: SHA224, missing new API’s and building with dummy build for non hw testing). Note: We need to add build test for this `./configure CFLAGS="-DWOLFSSL_TI_HASH -DTI_DUMMY_BUILD”`.
* Added arg checks on wc_*GetHash and wc_*Copy.
* Cleanup of the BuildMD5, BuildSHA, BuildMD5_CertVerify and BuildSHA_CertVerify functions.
* Added new ./configure --enable-asyncthreads, to allow enable/disable of the async threading support. If --enable-asynccrypt set this will be enabled by default if pthread is supported. Allows multi-threaded benchmarks with async simulator.
* Added checks for all hashing to verify valid ->buffLen.
* Fix for SHA512 scan-build warning about un-initialized “W_X”.
* Fix for valgrind un-initialized use of buffer in AllocDer (der->buffer) and BuildTlsFinished handshake_hash.
* Refactor of the benchmarking to use common function for start, check and finish of the stats.
* Fixed issue with ECC cache loading in multi-threading.
* Fix bug with AESNI not aligned code that assumes XMALLOC is 16-byte aligned.
* Added new WC_ASYNC_NO_… options to allow disabling of individual async algorithms. New defines are: WC_ASYNC_NO_CRYPT, WC_ASYNC_NO_PKI and WC_ASYNC_NO_HASH. Additionally each algorithm has a WC_ASYNC_NO_[ALGO] define.
* Added “wolfSSL_GetAllocators” API and fixed the wolfCrypt memcb_test so it restores callback pointers after test is complete (fixes issue with using custom allocators and test breaking it).
2017-04-10 14:45:05 -07:00
dc65a9a277 Distro fix to enable SHA224 by default. Was causing Debian build error since SHA224 is enabled by default only for the x86_64 architecture. Updated --enable-distro option to include new features for aeskeywrap, x963kdf and scrypt. Changed the ECC custom curve option to enable all curve types when used with distro. 2017-04-10 11:45:26 -07:00
dccff615d5 Add wolfSSL_DES_ecb_encrypt() encrypt/decrypt parameter check. 2017-04-10 16:19:44 +09:00
97c22c88d8 Add test result message for test_wolfSSL_DES_ecb_encrypt(). 2017-04-10 15:37:47 +09:00
27c6625bfe Fix #ifdef in WolfSSL_DES_ecb_encrypt and test_WolfSSL_DES_ecb_encrypt. 2017-04-10 14:44:48 +09:00
5edcf685ca Rename caCertFile 2017-04-10 10:38:16 +10:00
335b6d41c1 32-bit size_t and printf fix 2017-04-10 10:26:36 +10:00
cbe46f8d74 Include new file in dist 2017-04-10 08:30:44 +10:00
b19cf2cfb8 Add test_wolfSSL_DES_ecb_encrypt() 2017-04-08 17:03:58 +09:00
e8971c361a Merge pull request #830 from kaleb-himes/suite-typo
Fixes for using default ciphers
2017-04-07 17:20:54 -07:00
8953ed9f30 DTLS update per RFC 6347 Section 4.2.3 2017-04-07 14:26:33 -06:00
3478c9b937 Added return checks to src/keys.c. 2017-04-07 14:15:53 -06:00
80d88b9421 fix c32toa needed with --enable-session-ticket 2017-04-07 11:46:27 -06:00
4ff2903b55 Fix to allow anonymous ciphers to work with the new default suite testing. 2017-04-07 10:20:41 -07:00
eb40175cc6 Fix to calc BuildSHA_CertVerify if WOLFSSL_ALLOW_TLS_SHA1. Fix to add check for DTLS to not allow stream ciphers. Removed the RC4 tests from the test-dtls.conf. Added support for using default suites on client side. Switched the arg to “-H”. Cleanup of the example server/client args list. Fixes for build with “--disable-sha”. 2017-04-07 10:20:41 -07:00
6a1ae7ee5b Fix on server side to make sure SHA hash is setup even with NO_OLD_TLS. Fix to initialize hsHashes to zero. Fix in PickHashSigAlgo to not default to SHA if NO_OLD_TLS is defined (unless WOLFSSL_ALLOW_TLS_SHA1 is set). Fix to allow pre TLS 1.2 for “AES128-SHA256” and “AES256-SHA256”. 2017-04-07 10:20:18 -07:00
b14da2622e Fix InitSuites to allow old TLS for DHE_RSA with AES 128/256 for SHA256. Reverted changes to test.conf and test-dtls.conf. 2017-04-07 10:20:18 -07:00
4dcad96f97 Added test for server to use the default cipher suite list using new “-U” option. This allows the InitSuites logic to be used for determining cipher suites instead of always overriding using the “-l” option. Now both versions are used, so tests are done with wolfSSL_CTX_set_cipher_list and InitSuites. Removed a few cipher suite tests from test.conf that are not valid with old TLS. These were not picked up as failures before because wolfSSL_CTX_set_cipher_list matched on name only, allowing older versions to use the suite. 2017-04-07 10:20:18 -07:00
b827380baf Typo in cipher suite pre-processor macro 2017-04-07 10:19:24 -07:00
4e703b6805 Merge pull request #839 from JacobBarthelmeh/Testing
build with session tickets and without client
2017-04-07 09:39:47 -07:00
2b443a79f2 Merge pull request #836 from dgarske/stack_check_free
Fix leak in StackSizeCheck and build error with debug enabled
2017-04-07 09:35:01 -07:00
ecaaf19ebf Merge pull request #835 from dgarske/fix_name_conflict
Fix name conflicts in wolfCrypt test with --enable-stacksize
2017-04-07 09:33:00 -07:00
c466e3c078 Implements wolfSSL_DES_ecb_encrypt function. 2017-04-07 11:21:32 +09:00
2c13ea9a67 Cleanup name conflicts with test.h cert files (by adding “File” to end). Fix memory leak in ecc_test_buffers function. 2017-04-06 15:54:59 -07:00
b49a2561bc build with session tickets and without client 2017-04-06 16:19:21 -06:00
6e16410e25 Modifications per Todd's requests. 2017-04-06 15:47:53 -06:00
d62d0aaa26 Changes made per Todd's instruction. 2017-04-06 14:42:42 -06:00
9ef26679df Merge pull request #833 from SparkiDev/asn_func
ASN Code Rework
2017-04-06 12:47:40 -07:00
bb8e67b79c Merge pull request #837 from cconlon/release-3.10.4
3.10.4 release
2017-04-06 11:39:31 -06:00
706c02deed Changes Chris requested. 2017-04-06 10:53:14 -06:00
c8400e9ff1 Merge pull request #824 from dgarske/fix_asn_confirm_sig
Fix for return code checking on ConfirmSignature
2017-04-05 16:58:47 -07:00
b11bb5325a Implementation of 51-bit curve25519 2017-04-06 09:48:01 +10:00
c9bb75c0f3 3.10.4 release 2017-04-05 16:37:35 -06:00
d648d4f6c7 Fix leak in StackSizeCheck. Fix build error with debug enabled and stack size check. 2017-04-05 14:24:55 -07:00
338c70a1ab Merge pull request #834 from cconlon/ecc_name_from_params
add wc_ecc_get_curve_id_from_params()
2017-04-05 14:09:41 -07:00
3328b4d38b Cleanup the unit test naming for new signature failure tests. 2017-04-05 11:24:22 -07:00
0c61a5b1fd add invalid test case for wc_ecc_get_curve_id_from_params() 2017-04-05 11:18:47 -06:00
4eefa22629 Merge pull request #810 from toddouska/write-dup
add wolfSSL_write_dup(), creates write_only WOLFSSL to allow concurre…
2017-04-05 10:06:20 -06:00
15091675fe Fix VS warning about long to size_t conversion in load_buffer. 2017-04-05 07:23:53 -07:00
e101dfa26e add wc_ecc_get_curve_id_from_params() 2017-04-04 14:49:46 -06:00
deb80e5ddb Fix load_file/load_buffer enables. Fix error in load_buffer with “ret”. 2017-04-04 11:45:55 -07:00
e0a4758c0f Fixes with load_file helper to make sure return code is set correctly and args are initialized. 2017-04-04 11:40:54 -07:00
2aa523e0ea Added API unit test for certificate validation failure using corrupted signature in cert. 2017-04-04 11:15:32 -07:00
26f3924c93 Fix for return code checking on ConfirmSignature, so it returns actual error codes or 0 on success. 2017-04-04 10:55:22 -07:00
e740756706 Merge pull request #832 from toddouska/rdrand64
allow rdrand to use full 64bit output
2017-04-04 08:58:06 -07:00
36e81b650e Fix missing symbol for specific configs 2017-04-04 14:33:14 +10:00
683a655908 Starting 128-bit FE implementation 2017-04-04 14:17:54 +10:00
b02a75510e Fix Windows warnings 2017-04-04 11:19:06 +10:00
abaf820537 Improvements and comments 2017-04-04 10:42:04 +10:00
cd358bd2ab protect against multiple write dups 2017-04-03 15:58:33 -07:00
2d323dee42 Merge pull request #829 from cconlon/ecc_import
fix curve selection on ecc private only import
2017-04-03 15:44:42 -07:00
59dc839341 Merge pull request #819 from dgarske/test_static_fixes
Fixes for wolfCrypt test/benchmark with static memory
2017-04-03 15:25:45 -07:00
1d48fba032 allow rdrand to use full 64bit output 2017-04-03 15:08:35 -07:00
68076dee45 Merge pull request #805 from dgarske/rng_cleanup
Fix RNG issue with Intel RD and cleanup to remove old ARC4 support
2017-04-03 14:57:09 -07:00
29eabe5535 Better stack size check return code handling. 2017-04-03 09:41:12 -07:00
8cde26a6c5 fix curve selection on ecc private only import 2017-04-03 09:50:46 -06:00
e168d4db09 Merge pull request #821 from SparkiDev/wpas_fips
FIPS changes and fixups for wpa_supplicant
2017-04-03 08:27:25 -07:00
fd9e41dd99 ASN functions added to simplify code
Functions to get and set different ASN.1 tags have been added.
The functions are used in the asn.c file to simplify the code and ensure
all checks are done.
2017-04-03 16:56:21 +10:00
d626c917dd Merge branch 'master' of https://github.com/wolfSSL/wolfssl into unitTest_api_dev 2017-03-31 14:18:27 -06:00
d69c860ab8 Fix bad #elif logic cleanup for using “USE_TEST_GENSEED”. 2017-03-31 13:16:21 -07:00
c532819659 Fixes for building with “CUSTOM_RAND_GENERATE_BLOCK”. Removed seed as backup RNG source. Fixed building on embedded system with time_t not defined (test.c should use long for asn_test). 2017-03-31 13:16:21 -07:00
69535198ca Fix RNG to only allow disabling HASHDRBG if CUSTOM_RAND_GENERATE_BLOCK is defined. Added support for CUSTOM_RAND_GENERATE_BLOCK with Intel RDRAND. 2017-03-31 13:16:21 -07:00
1251607b04 Retain existing HAVE_HASHDRBG functionality and only disable if ./configure --disable-hashdrbg or WC_NO_HASHDRBG defined. Fix use of warning with VS. Fix to only use rng seed as source if no DRBG. 2017-03-31 13:16:21 -07:00
5e3d8e705e Fix RNG issue with Intel RDRAND and RDSEED accelerations not being used because HAVE_HASHDRBG was always being defined if !WOLFSSL_FORCE_RC4_DRBG. Added new --enable-intelrand option to indicate use of RDRAND preference for RNG source (if RDRAND not supported by CPU then HASHDRBG will be used). The --enable-intelasm option enables the RDSEED support for seeding HASHDRBG if CPU supports it. Allow use of seed as RNG source if --disable-hashdbrg (shows build warning). Cleanup to remove old ARC4 RNG support. Fixed random_test return code with !HAVE_HASHDRBG. Cleanup of ./configure --help alignment. 2017-03-31 13:16:21 -07:00
34a4f1fae0 Move wolfCrypt test/benchmark to move static memory pool to global (not in stack). Fix wolfCrypt test wc_InitRng to use _ex with HEAP_HINT (when not FIPS). Added ability to use HAVE_STACK_SIZE with wolfCrypt test and benchmark. Cleanup of the benchmark_test function main wrapper. 2017-03-31 13:11:23 -07:00
ccad9f5575 Merge pull request #818 from dgarske/tkernel_port
TKernel port
2017-03-31 10:10:26 -07:00
9455c3b469 Merge pull request #826 from cconlon/ecc_adds
add XSTRLEN cast in ecc helper
2017-03-31 10:08:05 -07:00
6a4b71de05 Merge pull request #822 from JacobBarthelmeh/Testing
testing buffer size with const DH and remove redeclaration of WOLFSSL…
2017-03-31 08:53:49 -07:00
e1f6dbe74e add XSTRLEN cast in ecc helper 2017-03-31 09:17:42 -06:00
cc4cc41ccf Merge pull request #825 from cconlon/ecc_der
add EccPrivateKeyToDer()
2017-03-30 20:07:26 -07:00
5d840751c0 Merge pull request #823 from cconlon/ecc_adds
add ECC helpers to get size and id from curve name
2017-03-30 17:28:29 -07:00
4e829bc0a5 Fix to assign default OID for TLS supported curves based on loaded extension order. 2017-03-30 13:54:24 -07:00
507f052b3f ECC helper cleanup 2017-03-30 14:34:12 -06:00
6735dd7031 add EccPrivateKeyToDer() 2017-03-30 13:56:48 -06:00
347f4e3e4d Merge pull request #820 from JacobBarthelmeh/PKCS8
PKCS8 create function
2017-03-30 13:54:30 -06:00
61d82790e4 add ECC helpers to get size and id from curve name 2017-03-30 11:32:56 -06:00
5c2b5f86b9 testing buffer size with const DH and remove redeclaration of WOLFSSL_CRL 2017-03-30 10:53:13 -06:00
71b75efd63 move PKCS8 create function and remove PWDBASED requirement 2017-03-30 10:46:58 -06:00
c74c2ce00c FIPS changes and fixups
Enable ex data explicitly.
Keep the peer cert for verification callback.
External session cache for hostapd.
Enable DES_ECB when not FIPS.
Don't send the peer cert if it is not received from peer.
Initialize the peer cert after free as will be freed on tear down of
SSL.
Allow a server to become a client.
2017-03-30 11:53:35 +10:00
9ebfb0e953 make the function wc_CreatePKCS8Key public 2017-03-29 16:42:51 -06:00
5663fbf41a adjust placement of ECC curve OID in PKCS8 and add parameter notes 2017-03-29 16:17:54 -06:00
219fb584e2 fix for lenght of PKCS8 with ECC and for ECC get key algo ID 2017-03-29 16:17:26 -06:00
72d11e19cd add create PKCS8 key 2017-03-29 16:14:34 -06:00
36d9504bc3 Added NO_WRITE_TEMP_FILES option to prevent writing temp files during wolfCrypt test. 2017-03-28 19:37:55 -07:00
75abeaecfc Updates for TKernel port (WOLFSSL_uTKERNEL2). Added support for InterNiche prconnect_pro using WOLFSSL_PRCONNECT_PRO. Cleanup the min/max functions. Add NO_STDIO_FGETS_REMAP to not include the fgets remap for WOLFSSL_uTKERNEL2. Fix TFM build warning. Added HAVE_POCO_LIB. Added wolfCrypt test temp cert path for WOLFSSL_uTKERNEL2 = /uda/. Added WOLFSSL_CURRTIME_REMAP for benchmark to allow different function name to be used for system which have a conflicting name. Add ability to use normal malloc/free with WOLFSSL_uTKERNEL2 using NO_TKERNEL_MEM_POOL. Added new XMALLOC_OVERRIDE to allow custom XMALLOC/XFREE/XREALLOC macros. Move CUSTOM_RAND_GENERATE up in RNG choices. Rename tls.c STK macros due to conflict. 2017-03-28 19:10:19 -07:00
25779dfb4f Introduce HAPROXY config flag + get/set app_data 2017-03-28 13:28:36 +02:00
d94fcd8b69 Implemented wolfSSL_EVP_PKEY_base_id, wolfSSL_BIO_read_filename. Added wolfSSL_EVP_PKEY_type stub 2017-03-28 11:42:30 +02:00
14efd9735d Merge pull request #816 from kaleb-himes/eccCaKeyFile-undefined
Fix for: 'Fix for build error with unused eccCaKeyFile'
2017-03-27 21:18:46 -07:00
2bcb8e53fc Address case from review 2017-03-27 16:53:13 -06:00
5cffae2e3f Merge branch 'master' of https://github.com/wolfSSL/wolfssl into eccCaKeyFile-undefined 2017-03-27 16:52:51 -06:00
10bf955b70 Merge pull request #817 from kaleb-himes/ocsp-cert-update
add 'Class 3 Public Primary Certification Authority' to ocspstapling …
2017-03-27 15:21:55 -07:00
9c8574111e Merge pull request #815 from toddouska/switchcerts
better handling of TLS layer switching out CTX layer keys/certs
2017-03-27 15:57:58 -06:00
bddf0c52a6 add 'Class 3 Public Primary Certification Authority' to ocspstapling test certificate 2017-03-27 14:13:22 -06:00
00ca1dcbb7 Fix for: 'Fix for build error with unused eccCaKeyFile' 2017-03-24 14:01:06 -06:00
a7c131c0a1 fix vs warning 2017-03-24 11:19:01 -07:00
86efbbbb1d simplify reset suites on cert/key changes to end of function 2017-03-24 10:40:42 -07:00
4783fbfc4f better handling of TLS layer switching out CTX layer keys/certs 2017-03-24 10:19:01 -07:00
d8261796a6 Merge pull request #813 from cconlon/addcert
add server-keyPkcs8.der to include.am
2017-03-22 14:58:22 -07:00
a216da38d2 Merge pull request #798 from toddouska/trackmem
add deallocs to memory tracker
2017-03-22 13:59:29 -06:00
0983536c98 Merge pull request #814 from dgarske/fix_crl_redef
Fix build warning with redefinition of typedef 'WOLFSSL_CRL’
2017-03-22 08:59:02 -07:00
5f7e77f131 Merge branch 'master' of https://github.com/jrblixt/wolfssl into unitTest_api_dev 2017-03-21 16:48:55 -06:00
4e6f70e15e Merge pull request #784 from JacobBarthelmeh/Cert-Report2
error out with duplicate policy OID in a certificate policies extension
2017-03-21 15:21:46 -07:00
a6ecf793ba Merge pull request #806 from dgarske/tfm_heap_reduce
Reduce heap usage with fast math when not using ALT_ECC_SIZE
2017-03-21 15:21:09 -07:00
360fb2db0a Merge pull request #808 from kojo1/TrialProj
eccCaKeyFile in RSA/ECC test
2017-03-21 15:21:00 -07:00
3e2fe536ad Merge pull request #809 from JacobBarthelmeh/Testing
test case when not using RSA blinding
2017-03-21 15:18:53 -07:00
30024b7e7f Merge pull request #812 from SparkiDev/valgrind_ecc
Fix leak in test
2017-03-21 15:18:09 -07:00
88679a6a0c Merge wolfSSL master. 2017-03-21 15:33:40 -06:00
739436d7a8 Merge with wolfSSL master. 2017-03-21 15:23:47 -06:00
d829e5ba5a Fix build warning with redefinition of typedef 'WOLFSSL_CRL’. 2017-03-21 09:13:50 -07:00
c46eb36b4e add server-keyPkcs8.der to include.am 2017-03-21 09:53:24 -06:00
7be1077216 Fix for build error with unused “eccCaKeyFile”. 2017-03-21 08:31:07 -07:00
8bf22b253a Fix leak in test
Use new points for compressed point testing.
2017-03-21 23:34:48 +10:00
15423428ed add wolfSSL_write_dup(), creates write_only WOLFSSL to allow concurrent access 2017-03-20 15:08:34 -07:00
f26d584cec test case when not using RSA blinding 2017-03-20 14:15:34 -06:00
4cb891334d Merge pull request #801 from toddouska/fipscheck
add keep option to fips-check.sh to keep FIPS temp folder around
2017-03-20 13:44:01 -06:00
15e442637d Fix “#error old TLS requires MD5 and SHA” to only occur if !WOLFCRYPT_ONLY. 2017-03-20 10:42:08 -07:00
e35489fd75 eccCaKeyFile in RSA/ECC test 2017-03-20 13:46:26 +09:00
52215b3ecf Merge pull request #734 from kaleb-himes/csharp-addition
Adds wrapper for CTX_load_verify_locations to C# wrapper
2017-03-17 18:18:17 -06:00
10bf3c4d1d Merge pull request #804 from SparkiDev/wpas_shared
Wpas shared
2017-03-17 16:15:51 -07:00
6cc42dcacb Reduce TFM fp_int size by only adding the “int size” if ALT_ECC_SIZE or WOLFSSL_ASYNC_CRYPT is defined. Fix couple of async build errors in wolfCrypt test. 2017-03-17 15:01:18 -07:00
3bb1723476 Merge pull request #768 from dgarske/crl_lookup
Added support for inline CRL lookup when HAVE_CRL_IO is defined
2017-03-17 12:18:45 -07:00
b9d3db8b47 Merge pull request #800 from SparkiDev/no_fs
If there is no filesystem then still compile and run
2017-03-17 12:08:49 -07:00
ad57738cc6 Merge pull request #795 from JacobBarthelmeh/Testing
bounds checking with adding string terminating character
2017-03-17 12:07:55 -07:00
db526999c3 Merge pull request #803 from dgarske/fix_int_cast_warn
Fix warning with "implicit conversion loses integer precision”.
2017-03-17 12:05:29 -07:00
c69dea624c Merge pull request #802 from cconlon/rsa_decode
add wc_GetPkcs8TraditionalOffset()
2017-03-17 12:04:44 -07:00
461f051ef1 Only expose ECC APIs on config define 2017-03-17 10:52:38 +10:00
37a52414cc Make MP and ECC APIs public
These APIs are needed by wpa_supplicant.
2017-03-17 10:23:37 +10:00
141210dcc0 Fix warning with "implicit conversion loses integer precision”. 2017-03-16 14:56:03 -07:00
3f33f2b995 add duplicate policy OID cert to dist 2017-03-16 15:49:40 -06:00
92587651c9 variable i is not used when WOLFSSL_SEP is enabled 2017-03-16 15:48:15 -06:00
faf2bacd56 error out with duplicate policy OID in a certificate policies extension 2017-03-16 15:48:15 -06:00
efc2bb43d2 add wc_GetPkcs8TraditionalOffset() 2017-03-16 15:14:20 -06:00
ce6e3ce8d0 Merge pull request #799 from cconlon/ecc_decode
remove EccPublicKeyDecode() from WOLFSSL_CERT_EXT guard
2017-03-16 12:47:19 -07:00
c62b4e8ed5 Merge pull request #797 from cconlon/ecc_private
allow ECC private key only import
2017-03-16 12:45:49 -07:00
7651afbd38 Merge pull request #794 from dgarske/fix_rsa_e_overflow_w32bit
Fix issue with TFM mp_set_int, which should handle unsigned long.
2017-03-16 11:49:07 -07:00
2b1b7632fc add keep option to fips-check.sh to keep FIPS temp folder around 2017-03-16 11:10:12 -07:00
d22dcdb78d If there is no filesystem then still compile and run
Defaults to 2048-bit FF and 256-bit EC keys.
2017-03-16 16:00:31 +10:00
94d56fda59 Merge pull request #796 from toddouska/noasntime
fix NO_ASN_TIME build with --enable-wpas
2017-03-16 14:46:10 +10:00
a7f8bdb387 remove EccPublicKeyDecode() from WOLFSSL_CERT_EXT guard 2017-03-15 17:28:52 -06:00
5839bd0177 add deallocs to memory tracker 2017-03-15 15:36:12 -07:00
a13cce9213 allow ECC private key only import 2017-03-15 16:04:17 -06:00
36ecbfb1a8 fix NO_ASN_TIME build with --enable-wpas 2017-03-15 14:57:38 -07:00
0ef1b5d298 bounds checking with adding string terminating character 2017-03-15 13:40:41 -06:00
2c890e6827 Fix mp_set_int to use calc for 32 const. Changed it to sizeof(b) instead of sizeof(long). 2017-03-15 12:34:55 -07:00
4eb76e1d71 Fixes for building with IPV6. Added new WOLFSSL_IPV6 define to indicate IPV6 support. Fix to not include connect() and socket() calls unless HAVE_HTTP_CLIENT, HAVE_OCSP or HAVE_CRL_IO defined. Typo fixes. 2017-03-15 12:27:02 -07:00
cf73a2244f Fix for stray brace in wolfIO_TcpConnect. Fix to typedef sockaddr_in6 only when TEST_IPV6 is defined. Moved XSOCKLENT into io.h. Added useful WOLFSSL_NO_SOCK, which can be used with WOLFSSL_USER_IO. 2017-03-15 12:26:40 -07:00
d3a07858c0 Fixes based on peer review feedback. Fix to only include the non-blocking / select timeout functions when HAVE_IO_TIMEOUT is defined. Fix to only include TCP connect if HAVE_GETADDRINFO or HAVE_SOCKADDR defined. Cleanup of the “struct sockaddr*” to use typedef with HAVE_SOCKADDR. Moved helpful XINET_* and XHTONS/XNTOHS macros to io.h. 2017-03-15 12:26:18 -07:00
628f740363 Added support for inline CRL lookup when HAVE_CRL_IO is defined (shares code with OCSP lookup in io.c). Added http chunk transfer encoding support. Added default connection timeout value (DEFAULT_TIMEOUT_SEC) and new wolfIO_SetTimeout() API with HAVE_IO_TIMEOUT. Added generic wolfIO_ API’s for connect, select, non-blocking, read and write. Added new define USE_WOLFSSL_IO to enable access to new wolfIO_* socket wrappers even when WOLFSSL_USER_IO is defined. Moved all API declarations for io.c into new io.h header. Added HAVE_HTTP_CLIENT to expose HTTP API’s. Moved SOCKET_T and SOCKET_ defines into io.h. Added WOLFIO_DEBUG define to display request/responses. 2017-03-15 12:26:18 -07:00
5a24fd9237 Fix TFM mp_set_int to handle long. Enhance mp_set_int to use mp_set if less than max mp_digit. Added new MP_SET_CHUNK_BITS to eliminate hard coded const’s and allow build time adjustment. 2017-03-15 12:23:50 -07:00
4725a8aea6 Merge pull request #775 from SparkiDev/wpas
Changes for WPA Supplicant
2017-03-15 11:19:46 -06:00
f38d23a315 Merge pull request #791 from dgarske/fix_ecc_test_curve_idx
Fix wc_ecc_export_point_der to use curve_id
2017-03-14 19:22:53 -07:00
916a5c97ce Merge pull request #793 from SparkiDev/scan_build
Fixes for scan-build
2017-03-14 19:19:09 -07:00
003e18ecbc Fixes for scan-build 2017-03-15 09:38:53 +10:00
97b98c5c44 Changes from review
Add a free handshake resources API.
Rename to wolfSSL_KeepHandshakeResources().
Add APIs to indicate the client's preference order is to be used when
matching cipher suites.
2017-03-15 09:09:25 +10:00
ac713e62c5 Code review fixes
Put back check for server end when setting DH.
Add option to keep resources rather than free after handshake.
2017-03-15 09:09:25 +10:00
122f648fd8 Only support client preference order as default for WPAS. 2017-03-15 09:09:02 +10:00
7897d04145 Need GetHMACSize and GetIVSize for wpas 2.0 2017-03-15 09:09:02 +10:00
fd3093f937 Protect code with #ifdefs 2017-03-15 09:09:02 +10:00
e2930b0a43 Changes for WPA Supplicant 2017-03-15 09:09:02 +10:00
7bef7aaa81 Merge pull request #792 from SparkiDev/valgrind
Fix valgrind issues
2017-03-14 13:50:26 -07:00
4210ce0f67 Merge pull request #789 from SparkiDev/jenkins
Fixes for extended configuration testing
2017-03-14 10:00:39 -07:00
cccaa8671e Merge pull request #778 from dgarske/intime_rtos
INtime RTOS port
2017-03-14 09:55:50 -07:00
2fbce65975 Revert change in types.h for INTIME_RTOS. HAVE_THREAD_LS is not supported here, so don’t define out. Added note in INtime RTOS user_settings.h to indicate this. 2017-03-13 20:03:09 -07:00
0eb01698f4 Fix for wolfCrypt ECC import/export point test to not use const idx and instead lookup using the “ecc_curve_id” enum value. Added new “wc_ecc_get_curve_idx” and “wc_ecc_get_curve_id” API’s. Redirected duplicate ECC function “wc_ecc_get_curve_name_from_id” to “wc_ecc_get_name”. Added “ECC_CURVE_INVALID” to indicate invalid curve_id. 2017-03-13 19:58:15 -07:00
72728b21af Undo as mp_digit is not allowed to get as large as tested 2017-03-14 10:23:13 +10:00
81731df72f Fix valgrind issues
Test program was re-using RSA and ECC key with multiple imports ops.
wc_RsaPublicKeyDecode() leaked if n parseable but not e.
2017-03-14 09:47:34 +10:00
8a562c817c Fix build issues with DEBUG_WOLFSSL defined. Fix typo in user_settings.h for DEBUG_WOLFSSL. Fix issue with example client waiting on local server (shouldn’t be). Updated README.md with example output. 2017-03-13 12:22:44 -07:00
e98a0465ae tenAsys INtime RTOS port. Porting complete for mutex semaphores, threading, file, socket and RNG. Added projects for libwolfssl and wolfExamples. The wolfExamples project includes examples for wolfCrypt Test/Benchmark and wolfSSL TLS client/server. Provided reference user_settings.h with comments and enable/disable gates. Added README.md with overview and instructions. Fixed issue building master with NO_WOLFSSL_DIR defined. Added check if old TLS is enabled that SHA and MD5 are enabled. Cleanup of the wolfCrypt test use of USE_CERT_BUFFERS with file system enabled. 2017-03-13 09:48:55 -07:00
610ac07cd8 Add MP_MASK 2017-03-13 16:28:36 +10:00
8ac2f5cb9c Windows warning about negating unsigned fix 2017-03-13 12:29:58 +10:00
d4f0c79272 Cast for Windows 2017-03-13 12:18:45 +10:00
614231f71c Fixes for extended configuration testing 2017-03-13 11:33:39 +10:00
9780f1faef Fix spacing and comma 2017-03-12 23:01:32 +09:00
a6cbfe6f93 Merge pull request #787 from SparkiDev/def_p256
Fix elliptic curve selection.
2017-03-11 08:35:11 -08:00
91737ceb3f Merge pull request #786 from JacobBarthelmeh/Testing
Testing
2017-03-10 17:03:24 -08:00
80fe2a3524 Fix elliptic curve selection.
Preference by:
1. the default for the curve strength (eccTempKeySz),
2. a curve at the curve strength (eccTempKeySz),
3. the default for next higher curve strength,
4. the first curve (client order) with the next highest curve strength
2017-03-11 10:17:15 +10:00
93f1e7cf2e remove magic number in test case 2017-03-10 13:16:22 -07:00
bb81ea804c add AES get key to ARMv8 port and add check for BASE 64 encode to tests 2017-03-10 09:55:27 -07:00
dee3159f0f update byte size conversion 2017-03-10 09:39:18 -07:00
e8d97c9b1e make test buffers large enough for results 2017-03-10 09:36:29 -07:00
5a803730b8 Merge pull request #785 from SparkiDev/fixes
Fixes from merge of test coverage changes
2017-03-09 17:58:15 -08:00
2b5dba798f Merge pull request #783 from JacobBarthelmeh/Cert-Report1
Add error case for critical Subject Key ID extension
2017-03-09 15:39:23 -08:00
5c9eedbf69 Fixes from merge of test coverage changes
Include new certificates in distribution.
Casting changes for clang.
Extra error code - recognize in test.
2017-03-10 09:15:18 +10:00
2444a55afe Merge pull request #708 from SparkiDev/test_cov
Extend testing for coverage
2017-03-09 12:52:17 -08:00
2bb14903f9 Merge pull request #698 from SparkiDev/nginx
Get Nginx working with wolfSSL
2017-03-09 10:23:20 -08:00
0e64c7708f Merge pull request #769 from JacobBarthelmeh/Testing
Testing
2017-03-09 10:17:48 -08:00
fd50fd8a3e Add error case for critical Subject Key ID extension 2017-03-08 16:40:07 -07:00
df32c6fb0b Merge pull request #782 from dgarske/ecc_mem
Fix to reduce ECC memory usage when async crypt is not enabled
2017-03-08 15:35:47 -08:00
2b0963c42a Merge pull request #780 from dgarske/crl_win
Fixes for building CRL with Windows
2017-03-08 15:31:02 -08:00
a55ebb4c18 Fixes for building CRL with Windows. Refactor load_verify_buffer and LoadCRL to use new wc_ReadDir* functions. Added new directory/file API's: wc_ReadDirFirst(), wc_ReadDirNext(), wc_ReadDirClose(). Moved MAX_PATH and MAX_FILENAME_SZ to wc_port.h. Moved BAD_PATH_ERROR into error-crypt.h. The wc_ReadDir is only supported when NO_WOLFSSL_DIR and NO_FILESYSTEM are not defined. Add map to __FUNCTION__ macro in Windows with debug enabled (to resolve build error with VS and __func__ missing). Fix cast warning on response from EncodeOcspRequestExtensions. Fix for cast to call to BuildCertificateStatus. 2017-03-08 11:21:11 -08:00
a0effa6329 call mp_clear to match call to mp_init 2017-03-08 11:26:16 -07:00
e115205d18 Fix to reduce ECC memory usage when async crypt is not enabled. Fix uses local for r and s instead of key->r and key->s. 2017-03-07 13:45:02 -08:00
e7445b8e49 Merge pull request #781 from dgarske/fix_sb_int_dp
Fix integer.c scan-build warning for possible use of NULL dp
2017-03-07 12:03:20 -08:00
be42a575da Fix additional integer.c report of possible use of NULL dp (after normal math performance improvement to defer dp pointer alloc commit bdbb98ed20 2017-03-06 13:19:52 -08:00
ebef5083ca Merge pull request #777 from toddouska/dhpub
add check dh public key to agree()
2017-03-06 10:16:57 -07:00
bb3bea3d4c Merge pull request #773 from toddouska/authtag
add defined for default AES AUTH_TAG_MIN_SZ
2017-03-06 09:53:01 -07:00
ae6fbb220f Pass the context to statusCb (needed in Nginx 1.10.3) 2017-03-06 10:58:25 +10:00
ba1a8d7681 Merge pull request #765 from dgarske/scanbuild_fixes
Fixes for scan-build warnings
2017-03-03 15:58:10 -08:00
0d3ef0b399 Merge pull request #776 from dgarske/fix_iis_signature_algorithms
Fix issue with IIS servers and NO_OLD_TLS
2017-03-03 12:51:22 -08:00
a348898e96 add AUTH_SZ size check to ti and armv8 ports 2017-03-03 11:42:24 -08:00
7bcd26e321 add check dh public key to agree() 2017-03-03 11:30:38 -08:00
6800ffe8fa Merge pull request #772 from toddouska/sr3-fix
fix signer memory takeover on malformed data
2017-03-03 10:21:01 -07:00
eef3ec4a87 Merge pull request #763 from NickolasLapp/master
Changes to bring wolfssl up to date with stunnel 5.40
2017-03-03 09:00:11 -08:00
ace417b087 Merge pull request #774 from ejohnstown/psk-staticmemory
Static Memory Handshake Fix
2017-03-03 09:38:19 -07:00
2b937e2f23 Merge pull request #771 from JacobBarthelmeh/master
account for static memory IO_POOL free when general memory was used
2017-03-03 08:31:55 -08:00
431f363520 Better fixes for suppressing scan-build warning with normal math enabled. 2017-03-03 07:35:26 -08:00
0182d99efb Updates for nginx 1.10.3
Don't return global error when: SOCKET_PEER_CLOSED_E or SOCKET_ERROR_E
Increase max ex_data items to 5
2017-03-03 16:38:29 +10:00
b5fe3ddbfa Fix to allow connection to IIS server which requires SHA1 hash algo to be present in signature_algos extension. Issue only exists when NO_OLD_TLS is defined. To enable SHA1 with TLS 1.2 define "WOLFSSL_ALLOW_TLS_SHA1”. 2017-03-02 18:18:05 -08:00
67a8626430 Fix for scan-build warning with “->dp == NULL”. Scenario can’t happen, but adding sanity check to suppress warning. 2017-03-02 15:56:31 -08:00
ec1d8c7090 Fixed where the client was using NULL instead of ssl->heap when allocating memory during SendClientKeyExchange(). Failing on an embedded static build. 2017-03-02 10:05:24 -08:00
d903059e05 Fixes to allow signature_algorithms extension to send SHA1 (if enabled) and NO_OLD_TLS is defined. This resolves an issue connected to ISS servers. 2017-03-01 19:07:13 -08:00
c1c7c90345 add defined for default AES AUTH_TAG_MIN_SZ 2017-03-01 11:17:24 -08:00
9ab28f9756 account for static memory IO_POOL free when general memory was used 2017-03-01 11:39:00 -07:00
2d612da9f4 fix signer memory takeover on malformed data 2017-03-01 10:25:54 -08:00
7ca19f9fff Protect other call to wc_EccPublicKeyDecode 2017-03-01 09:37:18 +10:00
292a17fff8 wc_EccPublicKeyDecode changes from review 2017-03-01 09:37:18 +10:00
455fb96faa Extend testing for coverage 2017-03-01 09:37:18 +10:00
0608cd0dd3 Merge pull request #770 from JacobBarthelmeh/master
adjust return value of hash update and address warning with NO_SHA
2017-02-28 14:56:43 -08:00
13e6217fd5 Changes from code review 2017-03-01 08:38:54 +10:00
d4abeb56db Fixes required after logging changes to master. 2017-03-01 08:38:54 +10:00
e6434f380b Get Nginx working with wolfSSL 2017-03-01 08:38:54 +10:00
d5d7a4ae7b Report failure but continue to run. 2017-02-28 14:44:11 -07:00
f77458992e resolve windows warnings and add sanity check with PKCS12 parse 2017-02-28 14:33:07 -07:00
0ed8024bcf adjust return value of hash update and address warning with NO_SHA 2017-02-28 13:40:03 -07:00
b86dfd582f Merge pull request #766 from JacobBarthelmeh/Testing
debug message fix
2017-02-27 12:09:43 -08:00
b2fc525a1d update MD5, SHA, SHA256, SHA384, SHA512 Update functions. 2017-02-24 15:58:47 -07:00
c467bbd776 Reasses return values on all Init, Update, Final functions. 2017-02-24 15:16:54 -07:00
26bd19bbd8 debug message fix 2017-02-23 17:15:44 -07:00
9db6a27921 Fixes for scan-build warnings. Fix possible memory leak in wolfSSL_DH_new on failure. Add null checks in integer.c for destination to make sure “dp” grows when NULL (even though never happens in real-use). Added suppression of wc_port.c warning “Value stored to 'ret' is never read”. 2017-02-23 14:47:36 -08:00
6ca16b06d2 MergeConflicts 2017-02-23 11:13:32 -07:00
6425a654be Merge pull request #761 from dgarske/stm32_fixes
Fix for AES-GCM with STM32 and CubeMX HAL
2017-02-22 14:31:36 -08:00
302db35b2f Merge pull request #752 from dgarske/fix_ecc_import_wstaticmem
Fix issue with wc_ecc_import_x963_ex() loosing heap pointer
2017-02-22 14:30:57 -08:00
bdbb98ed20 Merge pull request #735 from dgarske/norm_math_speedup
Normal math speed-up to not allocate on mp_int and defer until mp_grow
2017-02-22 14:29:51 -08:00
d52f44108c Merge pull request #762 from moisesguimaraes/fix-ocsp-request
Adds missing free(request) in CheckOcspRequest()
2017-02-22 14:19:51 -08:00
8bbcdf977d adds missing free(request) in CheckOcspRequest() 2017-02-22 10:43:07 -08:00
2ef4525d4d Changes to bring wolfssl up to date with stunnel 5.40 2017-02-22 11:15:59 -07:00
5a539751a2 Fixes for AES with STM32 and CubeMX. The key size was not being set and causing issues with AES GCM. 2017-02-21 15:12:40 -08:00
aeea24a5e3 Merge pull request #760 from toddouska/mcheck
fix small stack malloc checks
2017-02-21 14:33:44 -08:00
e01da5c44c Fix mp_set to return int after rebase. 2017-02-21 14:12:27 -08:00
b05cfec057 Fix build warning with missing “mp_to_unsigned_bin_at_pos” declaration. 2017-02-21 14:03:21 -08:00
4cbfec1c7d Implemented ksdk_port fixes to handle mp_ response codes. Added KSDK support for normal math. Regression testing against K82 hardware (MMCAU/LTC) and software with normal and fast math. 2017-02-21 14:03:21 -08:00
3008c888bf Fix mp_cmp_d logic to handle a->used == 0. Revert mp_copy and mp_set 0 size workarounds. 2017-02-21 14:03:21 -08:00
9c7407d18c Added return codes to wc_InitDhKey, wc_InitDsaKey and mp_set. Added missing return code checks on mp_copy in ecc.c. Fixed build with DSA and no ECC where mp_set function def would be missing. 2017-02-21 14:03:21 -08:00
d14be65315 Improve handling of mp_clear for RSA after speed-up. 2017-02-21 13:59:38 -08:00
bced81d234 Improve handling of mp_init / mp_clear for DH and DSA after speed-up. 2017-02-21 13:59:38 -08:00
da5825b94d Normal math speed-up to not allocate on mp_int and defer until mp_grow. Added memory tracker support to ./tests/unit.test. Fix memory leak with curve cache enabled, by adding to wolfSSL_Cleanup. 2017-02-21 13:59:38 -08:00
e9c806a639 Merge pull request #743 from JacobBarthelmeh/master
change pem_password_cb typedef for compatibility
2017-02-21 13:23:05 -08:00
ce94243a20 Merge pull request #746 from cconlon/pkcs7ukm
PKCS7: fix optional UserKeyingMaterial encoding
2017-02-21 13:22:31 -08:00
f4f5d2d569 Merge pull request #747 from dgarske/integer_min_max
Fix naming for integer.c min/max local variables
2017-02-21 13:21:52 -08:00
988f7fa983 Merge pull request #759 from dgarske/fix_smallstack_procuserhcain
Fix for ProcessUserChain with WOLFSSL_SMALL_STACK defined causing stack corruption
2017-02-21 13:20:43 -08:00
c01fb8f655 Merge pull request #758 from kaleb-himes/mp_set
Fix for building with ECC disabled and DSA enabled with mp_set API.
2017-02-21 12:59:53 -08:00
7125d16f3e Fix issue with wc_ecc_import_x963_ex() and wc_ecc_import_raw_private() loosing heap pointer. Fixes issue #750. 2017-02-21 12:19:48 -08:00
fc85b8189c fix small stack malloc checks 2017-02-21 11:18:09 -08:00
f0112c2f7d Fix for ProcessUserChain with WOLFSSL_SMALL_STACK defined causing stack corruption. 2017-02-21 10:38:44 -08:00
fddf3bc664 pre-processor-macro update for mp_set API 2017-02-20 16:31:19 -07:00
db1f205522 Merge pull request #756 from toddouska/release3-10-3
3.10.3 rel
2017-02-20 10:08:14 -07:00
ebb21fc284 update rpm spec 2017-02-17 15:02:04 -08:00
e3503b8f9b 3.10.3 rel 2017-02-17 14:49:18 -08:00
3837173f93 Merge pull request #754 from wolfSSL/ecc_cdh
Added ECC Cofactor DH (ECC-CDH) support
2017-02-17 14:26:09 -08:00
19ee115392 Merge pull request #755 from toddouska/kat-errors
add ECC_CDH KAT error code
2017-02-17 14:25:51 -08:00
b4802cd73d add ECC_CDH KAT error code 2017-02-17 12:26:35 -08:00
bdd3f2be41 Make sure ecc key is always memset to 0 2017-02-17 12:15:18 -08:00
3e6ef835b1 Free the ecc keys 2017-02-17 12:06:27 -08:00
09bae9da3e Fixup from review 2017-02-17 11:18:05 -08:00
24cd46f1f1 Fixes from code review 2017-02-17 11:05:29 -08:00
d625645338 Refactor to combine ECC-CDH with existing “wc_ecc_shared_secret()” and use flag to perform cofactor computation on private key. Added new API “wc_ecc_set_flags()” and flag “WC_ECC_FLAG_COFACTOR” to indicate key should use cofactor. Added NIST CAVS test vector for ECC CDH Primitive with P-256. 2017-02-16 16:30:30 -08:00
39607984f7 Added ECC Cofactor DH (ECC-CDH) support with new “wc_ecc_cdh()” and “wc_ecc_cdh_ex()” API’s. Enable using “HAVE_ECC_CDH” define. 2017-02-16 13:17:08 -08:00
7da446c25a Merge pull request #748 from JacobBarthelmeh/Release
Release
2017-02-12 21:55:31 -08:00
337c52b4cf prepare for release 3.10.2 2017-02-10 10:19:34 -07:00
6c55701725 c89 build with ECC compresed key 2017-02-10 10:09:45 -07:00
4f53761faf Fix naming for integer.c min/max local variables to resolve reported “error: declaration of 'min' shadows a global declaration”. 2017-02-09 15:52:25 -08:00
e307f3e89d free decoded cert with small stack build 2017-02-09 16:06:34 -07:00
0cbc640aad memory managment in crl.c with crl monitor 2017-02-09 15:39:55 -07:00
c022614e07 Merge pull request #742 from dgarske/fix_asn_getlen
Improved ASN error checking
2017-02-09 13:05:26 -08:00
93642cfcb9 PKCS7: fix optional UserKeyingMaterial encoding 2017-02-09 12:04:19 -07:00
8763a71420 Merge pull request #745 from JacobBarthelmeh/Windows
wolfCrypt cleanup in test.c moved and add wolfSSL init to testsuite w…
2017-02-09 10:19:51 -08:00
3a6e8bf0d0 Merge pull request #744 from JacobBarthelmeh/Testing
static analysis fixes for memory management and possible null dereference
2017-02-09 10:18:26 -08:00
321392998d Additional ASN checks for GetSequence and GetSet. Cleanup of the buffer space check error to use BUFFER_E. 2017-02-09 09:50:06 -08:00
6a6e61f1d8 wolfCrypt cleanup in test.c moved and add wolfSSL init to testsuite with single threaded 2017-02-08 18:52:16 -07:00
b6b3021def gcc-6 uninitialized warning with srp build 2017-02-08 16:49:58 -07:00
b0728645c9 static analysis fixes for memory management and possible null derefrence 2017-02-08 16:29:54 -07:00
ef38ab8fc5 Merge pull request #701 from JacobBarthelmeh/mutex
better compatibility with printing errors to a file
2017-02-08 11:12:17 -08:00
c02f35c128 change pem_password_cb typedef for compatibility 2017-02-08 11:48:50 -07:00
868e704b82 Merge pull request #732 from kaleb-himes/openrtos-3.9.2-checkout
fips checkout for OpenRTOS v9.0.0 w/ wolfCrypt v3.9.2 on Atmels ATSAM…
2017-02-07 21:19:43 -08:00
c074ab273f Merge pull request #740 from toddouska/ocsp
Fix OCSP signature leading zero, certdecode free on parse failure. Add WOLFSSL_NO_OCSP_OPTIONAL_CERTS to skip optional OCSP certs, responder issuer must still be trusted. Add user clock skew defines for date skew before checks (WOLFSSL_AFTER_DATE_CLOCK_SKEW=# and WOLFSSL_BEFORE_DATE_CLOCK_SKEW=#).
2017-02-07 18:46:31 -08:00
993a604124 remove extern variables and use error queue instead 2017-02-07 17:16:22 -07:00
6fc81652b7 Merge pull request #738 from JacobBarthelmeh/Testing
align compatibility layer sha256 and sha224 structs
2017-02-07 13:59:34 -08:00
8f1c2965af Fix build warning in asn.c with “potentially uninitialized local variable 'length' used”. 2017-02-07 13:34:27 -08:00
468df109b6 add WOLFSSL_NO_OCSP_OPTIONAL_CERTS to skip optional OCSP certs, responder issuer must still be trusted 2017-02-07 13:31:59 -08:00
19204ab1ac Fix comment. 2017-02-07 11:07:48 -08:00
a2984553d7 Fixes for build with user-crypto RSA (--enable-fast-rsa). 2017-02-07 11:03:17 -08:00
3a1921e107 Fixes to ASN GetLength changes. Additional GetLength checks in PKCS7 and PKCS12. 2017-02-07 10:59:34 -08:00
0286d157a7 First pass at cleanup of the GetLength function handling of 0 length value. Added some asn.c build option comments. 2017-02-06 20:05:04 -08:00
7ddeb1afd9 add user clock skew defines for date skew before checks 2017-02-06 16:30:48 -08:00
f938a75780 fix OCSP signature leading zero, certdecode free on parse failure 2017-02-06 14:10:38 -08:00
53bebb4785 add error code for wolfCrypt_Cleanup 2017-02-06 14:51:55 -07:00
1f7976a587 Merge pull request #739 from JacobBarthelmeh/Memory
reduction of mp_jacobi stack usage
2017-02-06 11:59:52 -08:00
daafb2c5ac changes docs to single page 2017-02-05 18:56:19 -03:00
e33d4c0172 adds full docs 2017-02-05 18:51:13 -03:00
00a74d0da4 adds initial doc files 2017-02-05 16:43:43 -03:00
0f91542cf4 add peek error node function to make use of debug mutex 2017-02-03 11:52:36 -07:00
e8110e773e reduction of mp_jacobi stack usage 2017-02-02 17:13:26 -07:00
b1522e0c59 pack Sha256 struct 2017-02-02 14:55:51 -07:00
e722459df3 align compatibility layer sha256 and sha224 structs 2017-02-02 11:57:29 -07:00
bf12e4ecca wolfcrypt Python: work around minor issue in Random.__del__
During interpreter shutdown, depending on the order in which things happen, a module can be unloaded before all instances of classes defined in that module are garbage collected.

In particular, this means that any global variables (including imported modules) become `None` by the time the instances `__del__` is called, resulting in
```
AttributeError: 'NoneType' object has no attribute 'wc_FreeRng'
```
being displayed while the process exits.  This can be avoided simply by catching and ignoring the `AttributeError` in this case, since the process is shutting down anyways.
2017-02-02 16:51:41 +01:00
895bf8dfbc Merge pull request #728 from embray/patch-1
Fixes a serious bug in Random.byte
2017-02-01 21:07:20 -03:00
16698db48f Merge pull request #733 from kaleb-himes/tirtos-updates
updates for TIRTOS build following release 3.10.0
2017-02-01 14:47:12 -08:00
fde6700d89 fix typo 2017-01-31 15:10:49 -07:00
d1f323ca58 Adds wrapper for CTX_load_verify_locations to C# wrapper 2017-01-31 14:45:33 -07:00
b11265dbf5 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into unitTest_api_dev 2017-01-31 14:34:58 -07:00
de9f05f3c5 Update sha256.c function punctuation. 2017-01-31 14:33:21 -07:00
af355f7472 updates for TIRTOS build following release 3.10.0 2017-01-31 13:15:45 -08:00
b2e4a50bf4 fips checkout for OpenRTOS v9.0.0 w/ wolfCrypt v3.9.2 on Atmels ATSAM4L CPU 2017-01-30 15:32:59 -07:00
29f52ec735 Merge pull request #730 from toddouska/ocsp
Better CheckOcspRequest error detection on retry
2017-01-30 12:59:58 -03:00
ea96fa95b3 add new OCSP response validated debug message and remove redundant ret set 2017-01-28 11:11:25 -08:00
a094a36fa8 Update random.py
Realized that `ffi.string()` could truncate the output on null bytes.
2017-01-28 15:55:42 +01:00
a10d464126 fix scan-build warning and simplify CheckOcspRequest validation 2017-01-27 17:07:31 -08:00
f44bbe9ba3 Better CheckOcspRequest error detection on retry 2017-01-27 15:42:00 -08:00
1108ea0303 Merge pull request #729 from JacobBarthelmeh/staticmemory
account for unaligned memory when computing optimum size and update s…
2017-01-27 15:00:18 -08:00
0b8730f0b6 check bounds of buffer and get file buffer size 2017-01-27 15:14:25 -07:00
fc899029fb account for unaligned memory when computing optimum size and update static memory tests 2017-01-27 10:50:47 -07:00
e4942eaa3d Reorder restore statement. 2017-01-26 17:03:05 -07:00
74f72b5c6b Jenkins fix. 2017-01-26 13:15:11 -07:00
e96a720f04 Fixes a serious bug in Random.byte
Python's bytecode compiler has a peephole optimizer which, among other things, can recognize constant expressions and replace them with a constant.

In `Random.byte` the expression `t2b('\0')` is recognized as a constant and is replaced with a single constant compiled into the function's bytecode.

This means that every time you run `Random.byte`, rather than creating a new `str` object (or `bytes` in Python 3) it's reusing the same one each time, and `wc_RNG_GenerateByte` is writing right into that constant object's buffer; hence the following behavior:

```
In [55]: rng = Random()

In [56]: a = rng.byte()

In [57]: a
Out[57]: "'"

In [58]: rng.byte()
Out[58]: '\x11'

In [59]: a
Out[59]: '\x11'

In [60]: rng.byte()
Out[60]: '\x16'

In [61]: a
Out[61]: '\x16'

In [62]: rng.byte.__func__.__code__.co_consts
Out[62]:
('\n        Generate and return a random byte.\n        ',
 '\x16',
 0,
 'RNG generate byte error (%d)')

In [63]: rng.byte()
Out[63]: '\xad'

In [64]: rng.byte.__func__.__code__.co_consts
Out[64]:
('\n        Generate and return a random byte.\n        ',
 '\xad',
 0,
 'RNG generate byte error (%d)')
```

`Random.bytes` does not necessarily have this problem since its result buffer is not a constant expression, though I feel like it could also in principle be affected if the string were interned (though I couldn't produce such a result). Nevertheless, it doesn't seem like a good idea to be updating `str` objects' buffers directly.
2017-01-26 20:48:15 +01:00
3ca087e850 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into unitTest_api_dev 2017-01-26 12:48:03 -07:00
79e8bd2f2b Restore the ssl->hsHashes->hashSha384 before returning on failure. 2017-01-26 12:44:20 -07:00
be768f5395 Made changes in api.c to reflect Update() changes. 2017-01-26 12:34:09 -07:00
d22bc5d347 Merge pull request #727 from ejohnstown/minor-cleanups
Minor Cleanups
2017-01-26 08:50:28 -08:00
d93f856081 Minor Cleanups
1. Removed the execute bit from a few C source files.
2. Changed a couple letters in Moises's name in tfm.h to
   the non-extended/accented versions of "e" and "a".
2017-01-25 14:17:17 -08:00
1e02d00f61 Merge pull request #725 from toddouska/psk
add PSK test support to openssl script interop
2017-01-24 13:52:23 -08:00
d60d0b4e3f Merge pull request #726 from ejohnstown/static-memory-fix
Allow Static Memory...
2017-01-24 09:38:08 -07:00
13d0908b09 Allow static memory option when not using fast math or not using
slow math for anything.
2017-01-23 16:38:29 -08:00
a9a0cdfe71 add PSK test support to openssl script interop 2017-01-23 16:10:01 -08:00
52bc606ef9 Merge pull request #723 from dgarske/fix_ecc_noshamir_wstaticmem
Fix issue with wc_ecc_verify_hash_ex when not using SHAMIR and using static memory
2017-01-23 14:00:43 -08:00
a1b79abedb Merge pull request #717 from wolfSSL/auto_ecc_sup_curves
Added code to automatically populate supported ECC curve information
2017-01-23 13:57:56 -08:00
b7c3a340c1 Fix issue with wc_ecc_verify_hash_ex when not using SHAMIR and using static memory. Fixes issue #722. 2017-01-23 09:12:03 -08:00
008a69f185 Merge pull request #721 from ejohnstown/cleanups-for-multicast
Small Fixes for Multicast
2017-01-22 13:19:10 -08:00
d3d7446a24 removes 3DES from docs 2017-01-21 15:31:26 -02:00
8e0affb4a3 Merge pull request #692 from moisesguimaraes/fixes-ocsp-stapling-parser
Fixes certificate status parsing, adds behavior for unknown status type
2017-01-20 16:41:28 -07:00
ac0181d527 In benchmark, change the calls to InitRNG to the explicit
heap versions like all the other crypt calls so it works
with static memory. Plays nice with FIPS mode if available.
2017-01-20 15:36:08 -08:00
4d83ef1c23 Merge pull request #712 from moisesguimaraes/fixes-ocsp-lookup
fixes CA matching when using NO_SKID
2017-01-20 16:15:12 -07:00
497313978f Multicast
1. Opt-out the wolfmath code if not using big integers.
2. Opt-in a few functions when using lean PSK and DTLS.
3. Add a couple (void)heap to hush the compiler for
   usused variables in lean PSK.
4. Add include limits.h to internal.h if CHAR_BIT isn't
   defined. This is mainly for DTLS with lean PSK.
2017-01-20 11:59:28 -08:00
3918cdef03 Wrapped functions. 2017-01-19 13:35:23 -07:00
784ce57f45 Fix for TLSX_PopulateExtensions to not use #else HAVE_QSH case for populating supported curves. 2017-01-19 09:23:07 -08:00
835e3b7953 Merge pull request #719 from dgarske/fix_aes_no_dec
Fixes for building with NO_AES_DECRYPT
2017-01-19 08:52:32 -08:00
e86d59b3f7 Merge pull request #718 from dgarske/fix_ecc_comp_err
Fix scan-build warning with err not being read with HAVE_COMP_KEY defined
2017-01-19 08:50:44 -08:00
18b78795fb Merge pull request #716 from dgarske/fix_no_asn_time
Fix build with NO_ASN_TIME
2017-01-19 08:43:50 -08:00
fa2882322d Merge pull request #713 from JacobBarthelmeh/master
chacha20_poly1305 function expects a key size of 32 bytes
2017-01-19 08:41:48 -08:00
1afe613512 Fixes for building with NO_AES_DECRYPT. Added new HAVE_AESGCM_DECRYPT to allow AES GCM Decrypt with NO_AES_DECRYPT defined, since GCM uses only encrypt routine. Only allow TLS AES if NO_AES_DECRYPT is not defined. 2017-01-18 15:56:18 -08:00
b3721c6808 Fix scan-build warning with err not being read with HAVE_COMP_KEY defined. Okay to always call wc_ecc_curve_free, since DECLARE_CURVE_SPECS does a memset. 2017-01-18 14:05:32 -08:00
a761a7fc64 updates provisioners 2017-01-18 19:19:03 -02:00
feb6617dc9 updates centos provisioner 2017-01-18 18:41:15 -02:00
51bf46288b adds client example 2017-01-18 18:18:19 -02:00
5c8e69eb5e updates vagrant configs; updates server example, updates copyright year. 2017-01-18 17:59:48 -02:00
01f4a7b5bd Added code to automatically populate supported ECC curve information, unless already provided by user via wolfSSL_CTX_UseSupportedCurve or wolfSSL_UseSupportedCurve. 2017-01-18 11:54:43 -08:00
31981cc365 Merge pull request #711 from cconlon/ecc
add ECC export raw, sig to (R,S), helper functions
2017-01-18 09:27:42 -08:00
58f1fd2cc9 Merge pull request #704 from SparkiDev/memfail
Fixes from failure testing
2017-01-17 12:53:56 -08:00
c5bd24c1b7 Added changes Chris requested.
Moved error-crypt.h location and corrected FIPS return code.

Made requested changes to printf where 0 == 0.
2017-01-17 13:51:17 -07:00
a00bdb0de7 Merge pull request #714 from wolfSSL/fix_intelasm_debug
Fixed issue with intelasm and debug with SHA256
2017-01-17 12:50:17 -08:00
e84528205e chacha20_poly1305 function expects a key size of 32 bytes 2017-01-17 13:39:26 -07:00
2281560f1a Merge pull request #710 from JacobBarthelmeh/staticmemory
pass heap hint to temporary public ECC key
2017-01-17 12:15:45 -08:00
2e60330796 Merge pull request #703 from JacobBarthelmeh/SGX
wolfcrypt only build with Windows
2017-01-17 12:13:37 -08:00
c7ecf23c85 Merge pull request #696 from JacobBarthelmeh/Testing
fix possible memory leak on error case with ASN1 INTEGER to BN function
2017-01-17 12:10:21 -08:00
a0dc8dc8f9 Fix build with NO_ASN_TIME. Kaleb, add to future build options tests. 2017-01-17 10:35:48 -08:00
bb97e03a44 initial server tests 2017-01-16 19:40:46 -02:00
089387906e updates tests 2017-01-16 18:52:34 -02:00
715d6afeda updates tox config 2017-01-16 18:48:01 -02:00
0a9f66338c adds coverity tests 2017-01-15 12:51:09 -02:00
2d56f09320 adds accept() behavior to SSLSocket; Migrates tests to pytest. 2017-01-15 12:26:22 -02:00
1aeab91828 Fixed issue with intelasm and debug with SHA256 due to stack variable W_K alignment. Removed obsolete DEBUG_XMM code. 2017-01-13 15:50:04 -08:00
56091e267f moving source code into src 2017-01-12 19:27:36 -02:00
00fed61d36 Merge pull request #709 from JacobBarthelmeh/PKCS12
heap hint with PKCS7
2017-01-12 09:34:20 -07:00
75e3b5a297 pass heap hint to temporary public ECC key 2017-01-12 09:10:25 -07:00
86a3039e0b fixes CA matching when using NO_SKID 2017-01-12 13:56:38 -02:00
ba1315a499 Fixes from failure testing 2017-01-12 16:22:35 +10:00
f6647fbf84 add ECC export raw, sig to (R,S), helper functions 2017-01-11 17:08:35 -07:00
36d34ce069 free WOLFSSL_BN in SetIndividualExternal error case and simplify mpi_clear call 2017-01-11 14:53:32 -07:00
fc8ab42612 Merge pull request #671 from dgarske/ecc_curve_cache
New ECC curve cache feature to improve performance
2017-01-11 13:34:32 -08:00
575ac7b9d3 Merge pull request #707 from JacobBarthelmeh/master
fix location in tfm.c that could result in potential cache attack
2017-01-11 12:35:22 -08:00
bafddd1ba8 heap hint with PKCS7 2017-01-11 11:38:21 -07:00
e3277c19b7 fix location in tfm.c that could result in potential cache attack 2017-01-10 15:00:00 -07:00
8954de40ff Merge pull request #706 from JacobBarthelmeh/Windows
open test file in binary mode
2017-01-10 11:54:47 -08:00
c191a19a77 Merge pull request #705 from cconlon/pkcs7rng
fix RNG to WC_RNG typo in pkcs7.c
2017-01-10 10:15:05 -07:00
6732961e0d open test file in binary mode 2017-01-10 09:57:29 -07:00
993e6298ac fix RNG to WC_RNG typo in pkcs7.c 2017-01-09 16:59:42 -07:00
3338ea9ef7 Added ecc.c documentation for WOLFSSL_VALIDATE_ECC_IMPORT. Note: Add this define to enable checks for Jenkins (after this is merged). 2017-01-09 15:01:17 -08:00
0722f4d20f Fixes to reduce stack usage with ECC_CACHE_CURVE disabled (same as previous code). Added USE_ECC_B_PARAM macro (enabled with ECC_CACHE_CURVE or HAVE_COMP_KEY). Fixed bug with WOLFSSL_VALIDATE_ECC_KEYGEN defined and args to ecc_check_pubkey_order. Fixed counts for DECLARE_CURVE_SPECS(). Fixed wc_ecc_import_point_der to use curve cache. Enhance wc_ecc_check_key to support ECC_CACHE_CURVE for b or load using read_radix. Enhance to expose wc_ecc_is_point with all required mp_int* args directly. 2017-01-09 11:15:13 -08:00
6edb639d9d wolfcrypt only build with Windows 2017-01-09 10:33:46 -07:00
af00ad7683 Merge pull request #700 from JacobBarthelmeh/master
run peek last error line test only when NO_OLD_TLS is not defined
2017-01-07 11:37:27 -08:00
4be5f624e8 include logging.h in test.c 2017-01-06 16:40:19 -07:00
dcb9ef6651 better compatibility with printing errors to a file 2017-01-06 14:29:16 -07:00
274ac21450 Merge pull request #699 from kaleb-himes/FREERTOS_TCP
Remove toolchain level define from OS_TCP section
2017-01-06 13:23:22 -08:00
d3604f1061 run peek last error line test only when NO_OLD_TLS is not defined 2017-01-06 13:22:49 -07:00
2b49f4205f Remove toolchain level define from OS level define section 2017-01-06 11:44:04 -07:00
08f188ab44 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into unitTest_api_dev 2017-01-06 11:26:06 -07:00
2c87f8d33c merge with wolfSSL master. 2017-01-06 11:06:01 -07:00
050ba9d6e0 unit test md5, sha, sha256, sha384, sha512
Memory leak fix.
2017-01-06 10:57:50 -07:00
c20a35f1db Merge pull request #697 from JacobBarthelmeh/master
adjust dynamic types with PKCS12 parse
2017-01-05 14:39:17 -08:00
1afb7e20db fix for freeing copy of mpi in the case of not using fastmath 2017-01-05 13:49:07 -07:00
147a7d5096 adjust dynamic types with PKCS12 parse 2017-01-05 10:21:14 -07:00
1a55309207 fix possible memory leak on error case with ASN1 INTEGER to BN function 2017-01-05 10:00:17 -07:00
ea47d76bf7 Merge pull request #695 from dgarske/openssl_compat_enums
Additional openssl compatibility enums for X509_V_ERR and SSL_CB
2017-01-04 16:35:09 -07:00
cb0cc92ff2 Fixes for building with CRL monitor when not linux, OS X or FreeBSD and --enable-distro set. Cleanup of the crl.c HAVE_CRL_MONITOR checks for OS and make sure if StopMonitor preprocessor is defined the function will also be defined. 2017-01-04 15:27:15 -07:00
2f3ec778bd For distro build don't install options.h (conflicts with multi-arch). Fix for BUILD_DISTRO excludes with indent. 2017-01-04 15:27:15 -07:00
d3195d0b75 Pulled in patches from Debian package. 2017-01-04 15:27:15 -07:00
fc6217e4f6 Added stubs for the set_msg_callback functions. Cleanup of the SSL_ST_* and SSL_CB_* enums. 2017-01-04 12:14:09 -08:00
7c7b1233f7 Additional enums needed for compatibility with openssl for paho c mqtt client SSLSocket.c layer. 2017-01-04 11:00:08 -08:00
f25416d424 Merge pull request #689 from dgarske/fix_iar_arm
Fixes for compiler warnings with IAR EWARM 8
2017-01-03 15:46:12 -08:00
916e58b93c Merge pull request #694 from moisesguimaraes/fixes-ocsp-nonce-check
removes request->nonceSz check to fully validate response->nonce.
2017-01-03 13:04:24 -08:00
dd737ca103 Merge pull request #618 from kojo1/openssl-ex
Openssl Extra
2017-01-03 12:40:51 -08:00
11775acb86 Merge pull request #691 from JacobBarthelmeh/Windows
random port for MinGW with unit tests
2017-01-03 11:46:33 -08:00
c82372cf78 removes request->nonceSz check to fully validate response->nonce. 2017-01-02 14:59:00 -02:00
07ce995b12 Fix issue with imported key not having a reset key->r, key->s and key->state, which was causing wc_ecc_encrypt to fail. 2016-12-30 12:24:03 -08:00
762064c292 fixes certificate status parsing, adds behavior for unknown status type. 2016-12-29 22:29:46 -02:00
e3ec769107 Adds an --enable-aesctr flag to the configure script to explicitly compile with -DWOLFSSL_AES_COUNTER and -DWOLFSSL_AES_DIRECT
If --enable-fortress or --enable-mcapi are used they effectively force --enable-aesctr
2016-12-29 21:26:34 +01:00
073aa95496 Merge pull request #678 from dgarske/cleanup_macros
Cleanup min(), TRUE, FALSE, ALIGN16 and ALIGN32
2016-12-29 11:19:05 -08:00
0decefed11 Merge pull request #679 from dgarske/wolfmath
Combine generic math functions into new wolfmath.c/.h
2016-12-29 11:17:44 -08:00
fab72ed163 Merge pull request #688 from JacobBarthelmeh/master
fix C++ compiler warnings for distro build
2016-12-29 11:06:47 -08:00
f550172fd4 Merge pull request #687 from JacobBarthelmeh/Testing
update Windows FIPS build
2016-12-29 11:06:11 -08:00
5abfe9d1cf random port for MinGW with unit tests 2016-12-29 11:05:10 -07:00
19ee499c96 Fix to improve fp_copy performance without ALT_ECC_SIZE defined. This change is required for async because we can’t memcpy/memset the entire fp_int. 2016-12-28 16:47:14 -08:00
e75fddd49e Moving macType below hash in WOLFSSL_EVP_MD_CTX (instead of ALIGN16) to resolve 16-bit alignment crash I was seeing on CentOS due to size change of “WOLFSSL_Hasher”. 2016-12-28 16:31:41 -08:00
a854320a96 Revert changes to aes.c roll_auth. 2016-12-28 16:28:02 -08:00
6c90f097ca remove extra white space 2016-12-28 15:40:34 -07:00
c77a18f0ec add EVP_CIPHER_CTX_mode 2016-12-28 14:45:29 -07:00
f60cb08c29 macro and tests for get_passwd_cb functions 2016-12-28 14:45:29 -07:00
4f317a9a1d wolfSSL_EVP_CipherInit_ex handle ENGINE argument and add a sanity check 2016-12-28 14:45:29 -07:00
1326fe1b0d return values of DES set key and return block size for EVP block_size getter function 2016-12-28 14:45:29 -07:00
ccc72d72c2 change argument to pointer. In most cases NULL is used for this argument, as was the case in previous ports 2016-12-28 14:45:29 -07:00
95ea74a91e sanity checks and one function return type for better compatibility 2016-12-28 14:45:29 -07:00
091fc10147 adjust read ahead, some sanity checks and rebase 2016-12-28 14:45:29 -07:00
724e50c4fd cast flag to byte type from int 2016-12-28 14:45:29 -07:00
aabe456592 sanity checks, remove some magic numbers, TLS read ahead 2016-12-28 14:45:29 -07:00
ed5ff77e4f account for BIO with no filesystem and rebase commits 2016-12-28 14:45:29 -07:00
f7737fdc55 expand BIO compatibility 2016-12-28 14:45:29 -07:00
a2d1db4b73 Merge branch 'openssl-ex' of https://github.com/kojo1/wolfssl into openssl-ex 2016-12-28 14:45:29 -07:00
5a2794fe9c add EVP_MD_CTX_md, EVP_MD_type 2016-12-28 14:45:29 -07:00
2b3438e11b pem x509 read from bio and bio set fd 2016-12-28 14:45:29 -07:00
80efc366df add wolfSSL_EVP_MD_CTX_new/free 2016-12-28 14:45:29 -07:00
b377125ad1 add alias to EVP_get_cipher/digestbyname 2016-12-28 14:45:29 -07:00
c57803a4a5 add test EVP_CIPHER_CTX_new/free 2016-12-28 14:45:29 -07:00
a774f26613 add EVP_get_cipherbyname 2016-12-28 14:45:29 -07:00
2ef85e3d4d EVP_CIPHER_CTX_new/free, EVP_get_digestbyname 2016-12-28 14:45:29 -07:00
0c742654dc EVP_add_digest 2016-12-28 14:45:29 -07:00
64a3333870 adjust wolfSSL_set_options and test case 2016-12-28 14:45:29 -07:00
2daeecdb90 BIO s_socket and BN mod exp 2016-12-28 14:45:29 -07:00
e741a24089 add get last error and line function, fix ASN1 object redeclaration 2016-12-28 14:45:29 -07:00
1d0fc83d40 function to add X509 to cert chain 2016-12-28 14:45:29 -07:00
280f5cb542 fix int long type mismatch 2016-12-28 14:45:29 -07:00
1704a8d683 expand compatibility layer with write bio function 2016-12-28 14:45:29 -07:00
778680116e HMAC_cleanup, MD5xxx for bsd 2016-12-28 14:45:29 -07:00
570486b90c add SL_CTX_need/set_tmp_RSA 2016-12-28 14:45:29 -07:00
4baf494ddd add EVP_CipherUpdate/Final 2016-12-28 14:45:29 -07:00
869529642d Add #define EVP_DigestInit_ex 2016-12-28 14:45:29 -07:00
781c7d0055 check for user RSA 2016-12-28 14:45:29 -07:00
7e91838d4a memory management and add to compatibility layer 2016-12-28 14:45:29 -07:00
ff05c8a7a5 expanding compatibility layer 2016-12-28 14:45:29 -07:00
9d1cb18616 add function X509_get_ext_d2i 2016-12-28 14:45:29 -07:00
5f3fa171cd templates wolfSSL_ctrl and wolfSSL_CTX_ctrl 2016-12-28 14:44:05 -07:00
79472e11a1 add bio.c to dist and implement wolfSSL_check_private_key , wolfSSL_get_server_random 2016-12-28 14:44:05 -07:00
fed4ed40a9 compatibility functions for X509 2016-12-28 14:44:05 -07:00
0d7c259282 compatibility functions for ssl cert and private key 2016-12-28 14:44:05 -07:00
d8d3cd5269 staub: SSL_get_server_random 2016-12-28 14:44:05 -07:00
3946931320 stubs: SSL_get_server_random/verify_result/session/set_accept_state 2016-12-28 14:44:05 -07:00
a09a761d07 stubs: PEM_read_bio_DSAparams/X509_AUX/PrivateKey,SSL_CTX_get_default_passwd_cb/userdata 2016-12-28 14:44:05 -07:00
ee86325ae4 template: ERR_peek_last_error_line/print_errors_fp, EVP_add_digest 2016-12-28 14:44:05 -07:00
63dcacb437 templates: ENGINE_cleanup, BN_mod_exp 2016-12-28 14:44:05 -07:00
f3435eefbd templates: ASN1_INTEGER_to_BN, BN_mod_exp, CONF_modules_free/unload, DSA_dup_DH 2016-12-28 14:44:05 -07:00
f2f52c3ec9 add more compatiblity functions 2016-12-28 14:44:05 -07:00
6520a77fac DES ECB prototypes 2016-12-28 14:44:05 -07:00
526b602ebd AESNI support with EVP AES 2016-12-28 14:44:05 -07:00
8554912d68 COMPAT. LAYER : jenkins warnings and build configurations 2016-12-28 14:44:05 -07:00
464543df26 COMPAT. LAYER : jenkins warnings and spacing around if statements 2016-12-28 14:44:05 -07:00
8844554fca Templates BIO/SSL/SSL_CTX_ctrl 2016-12-28 14:44:05 -07:00
86014fb0d0 add BIO_ctrl and other BIO templates 2016-12-28 14:44:05 -07:00
8ed0b83c21 Test on EVP_Cipher AES Counter 2016-12-28 14:44:05 -07:00
de91e7df03 add EVP_Cipher with AES Counter 2016-12-28 14:44:05 -07:00
aed9b2d3bb add EVP_CIPHER_CTX_block_size/mode/set_flags/set_padding 2016-12-28 14:44:05 -07:00
bb400789b8 add EVP_Cipher with EVP_aes_256_ecb() 2016-12-28 14:44:05 -07:00
0fd50cd57a Added AES_set_encrypt/decrypt_key, AES_ecnrypt/decrypt 2016-12-28 14:44:05 -07:00
b57e576abd Fixes for compiler warnings with IAR EWARM 8.
* Fix “wc_PKCS7_DecodeUnprotectedAttributes” return prior to free in GetSet error case.
* Fix “wc_PKCS7_KariGenerateKEK” type mismatch for kdfType.
* Fix aes.c roll_auth use of inSz over 24-bit.
* Fix ecc “build_lut”, “accel_fp_mul” and “accel_fp_mul2add” use of err as unsigned.
* Fix “wc_HKDF” use of un-initialized “myHmac” for heap.
* Fix undefined reference to __REV for IAR due to missing intrinsics.h.
* Fix build error for “wolfSSL_CTX_set_tmp_dh” if OPENSSL_EXTRA not defined and “HAVE_LIGHTY || HAVE_STUNNEL || WOLFSSL_MYSQL_COMPATIBLE”.
* Cleanup of “wolfSSL_get_chain_X509” brace..
* Cleanup SSL_CtxResourceFree use of `i` and define comments.
* Added “SIZEOF_LONG_LONG” to IAR-EWARM user_settings.h to support word64 (required for SHA512, etc).
2016-12-28 11:18:41 -08:00
a40a3cb142 Merge pull request #686 from jay/fix_poly1305_ADD_macros
poly1305: fix ADD macros for multi-line
2016-12-27 17:52:53 -07:00
511f41b0e4 fix C++ compiler warnings for distro build 2016-12-27 14:38:14 -07:00
fb49dbd083 update Windows FIPS build 2016-12-27 10:34:13 -07:00
3b6dac9751 poly1305: fix ADD macros for multi-line 2016-12-24 02:46:35 -05:00
2cf7785068 Merge pull request #682 from JacobBarthelmeh/Release
prepare for release 3.10.0
2016-12-23 09:10:35 -07:00
c4af58b973 Refined the FIPS “min” logic. 2016-12-22 18:11:25 -08:00
fc16890641 Fix “min” with ctaocrypt FIPS. 2016-12-22 14:01:05 -08:00
7752f9ad05 prepare for release 3.10.0 2016-12-22 14:23:41 -07:00
784b24eebc Merge pull request #680 from ejohnstown/dtls-sctp-fix
DTLS-SCTP fix
2016-12-22 13:10:29 -07:00
53d4c171c8 adds more client tests 2016-12-22 17:58:13 -02:00
35f03eb00a fixes docs. 2016-12-22 16:59:50 -02:00
1c9147a41e adds supported curves to context; fixes compatibility issues with py27 2016-12-22 15:01:58 -02:00
9b58ab0211 renames exceptions file 2016-12-22 15:01:58 -02:00
4b75d11164 fixes socket calls 2016-12-22 15:01:58 -02:00
f3c1522608 always treat native_object as a pointer 2016-12-22 15:01:58 -02:00
b9934695fb pretest version of SSLSocket 2016-12-22 15:01:58 -02:00
567dfd76b3 adds initial code for SSLSocket 2016-12-22 15:01:58 -02:00
2cbdd45e8f adds negotiate() to ssl interface 2016-12-22 15:01:58 -02:00
07072ef266 moving SSLContext and SSLSocket to __init__ to avoid ciclic includes 2016-12-22 15:01:58 -02:00
baeba53527 adds wrap_socket to the context 2016-12-22 15:01:58 -02:00
445e375daa adds ssl interface to ffi 2016-12-22 15:01:58 -02:00
52eb0becf0 adds set_ciphers to context 2016-12-22 15:01:58 -02:00
368f2baf88 adds verify_mode to context 2016-12-22 15:01:58 -02:00
8eec3cb874 adds initial code for SSLSocket 2016-12-22 15:01:58 -02:00
0ed0672b16 fixes pylint warnings 2016-12-22 15:01:58 -02:00
c0b59a585b adds support for buffered ca certificates 2016-12-22 15:01:58 -02:00
015ffecbab fixes unicode quotes and adds load_cert_chain test. 2016-12-22 15:01:58 -02:00
760ddd14f5 fixes pylint warnings;
adds more tests to load_verify_locations;
fixes data type when calling C functions;
fixes result verification when calling C functions.
2016-12-22 15:01:58 -02:00
7201435f2d adds initial context tests. 2016-12-22 15:01:58 -02:00
bd14611879 adds load_verify_locations and load_cert_chain implementations. 2016-12-22 15:01:58 -02:00
c8ae6abb43 adds context functions. 2016-12-22 15:01:58 -02:00
e1c01378c7 fixes ssl version in test to maintain backward compatibility. 2016-12-22 15:01:58 -02:00
20cfbe399c fixes integer comparison and adds virtual env to ignored files. 2016-12-22 15:01:58 -02:00
e06b17e170 adds methods and client tests;
adds context creation;
adds memory module;
removes init and cleanup functions.
2016-12-22 15:01:58 -02:00
0df897d4b9 adds methods 2016-12-22 15:01:58 -02:00
7b884ad72a removes non-ASCII chars from docs. 2016-12-22 15:01:58 -02:00
8b0edafef3 adds build_ffI.py 2016-12-22 15:01:58 -02:00
f4d6890b51 adds basic files and exception classes. 2016-12-22 15:01:58 -02:00
d6a6226c8e Merge pull request #681 from JacobBarthelmeh/Testing
static analysis check of null dereference and memory management
2016-12-22 08:43:55 -08:00
93c87eb777 Merge pull request #677 from ejohnstown/dtls-prevseq
DTLS Previous Epoch Sequence Number Update
2016-12-22 08:42:56 -08:00
1c17b8eed6 static analysis check of null dereference and memory management 2016-12-21 16:20:18 -07:00
40800d8065 DTLS-SCTP fix
1. Add the SCTP suite test file to the include.am.
2. Skip the sequence number increment for client_hello messages in
   DTLS, but do the increment for SCTP.
2016-12-21 14:24:20 -08:00
338cc9e873 Added wolfevent.c and wolfmath.c to ltc project. 2016-12-21 14:09:19 -08:00
3bec816f97 Cleanup min(), TRUE, FALSE, ALIGN16 and ALIGN32. Replace only use of BYTE3_LEN with OPAQUE24_LEN. Replace “ “ with “\t” (saves bytes and is consistent). Fix align issue with “WOLFSSL_EVP_MD_CTX” hash. 2016-12-21 14:05:00 -08:00
d73338851d Combine generic math functions into new wolfmath.c/.h. Cleanup of the !ALT_ECC_SIZE code so fp_int always has size. This is in prep for async changes for new WC_BIGINT type for hardware crypto. 2016-12-21 13:39:33 -08:00
6cc1fd293e Fixed issue with stack increase with curve cache disabled. Fixed issue with missing wc_ecc_curve_free() in wc_ecc_verify_hash_ex() causing mem leak. Changed ecc_curve_spec_cache to be allocated per curve. Added new wc_ecc_curve_cache_free() API to release all curve cache memory. Moved ecc_curve_spec struct and ecc_curve_load_mask enum to ecc.c. Add missing wc_ecc_fp_free() to wolfCrypt test. Added ecc.c comment for FP_ECC. 2016-12-21 12:31:02 -08:00
ac27d6d7ca DTLS Sequence Number update
1. Set the prevSeq to nextSeq on CCS.
2. Fully clear nextSeq on CCS.
2016-12-20 09:30:46 -08:00
1a5c5d0011 Merge pull request #676 from cconlon/fortify
address fortify high issues
2016-12-19 20:03:24 -08:00
07e7521f34 Merge pull request #674 from JacobBarthelmeh/Testing
Bug fix for cache attack
2016-12-19 18:31:04 -08:00
125cfcacc3 Merge pull request #675 from JacobBarthelmeh/SGX
fix make dist with SGX project
2016-12-19 17:06:14 -07:00
46f3b2a367 address fortify high issues 2016-12-19 15:50:11 -07:00
345df93978 Bug fix for cache attack 2016-12-19 14:51:42 -07:00
6cefca6a49 Merge pull request #672 from cconlon/pkcs7fix
PKCS#7: fixes for building with AES disabled, smallstack
2016-12-19 13:46:35 -08:00
dca57bf2f0 Merge pull request #673 from cconlon/fortify
address fortify critical issues
2016-12-19 13:42:11 -08:00
4d637146d7 fix make dist with SGX project 2016-12-19 14:03:07 -07:00
060ff5e5ef address fortify critical issues 2016-12-19 11:53:14 -07:00
168203ff9d Merge pull request #649 from dgarske/distro
Linux Distro Patches
2016-12-16 16:03:16 -08:00
c313d97579 Merge pull request #622 from SparkiDev/sha384
SHA384
2016-12-16 15:57:40 -08:00
50cf1df8da Merge pull request #669 from SparkiDev/scrypt
Implementation of scrypt
2016-12-16 15:53:48 -08:00
c73ddf3f8a Merge pull request #670 from dgarske/executebit
Removed the execute bit on the new port files.
2016-12-16 15:52:26 -08:00
c5fbf96557 PKCS#7: fixes for building with AES disabled, smallstack 2016-12-16 15:58:18 -07:00
57571cb45e Fix merge issues with ECC HAVE_COMP_KEY after rebase. 2016-12-16 14:20:00 -08:00
f990775451 Fix issue with ECC_SHAMIR disabled due to curve->b remnant from async branch. 2016-12-16 11:53:33 -08:00
cbc3cc6e91 Removed the execute bit on the new port files. 2016-12-16 11:35:40 -08:00
f1ead30987 New ECC curve cache feature to improve performance. Disabled by default and enabled using ./configure CFALGS="-DECC_CACHE_CURVE" or #define ECC_CACHE_CURVE. Added internal ECC states. Combined wc_ecc_mulmod_ex versions for timing rest / not. Tested with all math, timing, FP variants and NXP LTC and ECC508A hardware. Pulled in from latest async branch. Added new ECC_MAX_SIG_SIZE enum to help with sizing the sign buffer.
Performance Increases with ECC_CACHE_CURVE enabled:
* Key Gen 4.2%
* Key Agree, 4.0%
* Sign 6.8%
* Verify 5.8%
2016-12-16 11:32:59 -08:00
a9e7c4081f Merge pull request #660 from ejohnstown/win-renegotiation
Enable secure renegotiation by default for Windows library build.
2016-12-15 16:17:15 -08:00
7b948fe04d Merge pull request #667 from JacobBarthelmeh/SGX
add Windows build for SGX
2016-12-15 16:23:29 -07:00
ec90d72412 Merge pull request #666 from cconlon/chachafix
fix CertificateRequest cert type for ECDSA ChaCha suites
2016-12-15 12:08:08 -08:00
01d8201284 Merge pull request #665 from cconlon/certs
add missing certs and keys to certs/include.am
2016-12-15 12:03:12 -08:00
d0533c6dad Merge pull request #664 from cconlon/pkcs7
PKCS#7/CMS expansion
2016-12-15 12:01:00 -08:00
9d94474133 Merge pull request #668 from ejohnstown/handshake-size
Fail on redundant handshake message data
2016-12-15 11:41:53 -08:00
6959c21fdd Merge pull request #663 from dgarske/stm32_iar
Fixes to build STM32 with IAR
2016-12-15 11:26:43 -08:00
be65f26dd2 If there is a badly formed handshake message with extra data at the
end, but the correct size with the extra data, send a decode_error
alert and fail the handshake.
2016-12-14 16:02:29 -08:00
33f21e8b8d set correct cert type in CertificateRequest when using ChaCha suite with ECDSA 2016-12-14 11:34:10 -07:00
e16f2c0722 add Windows build for SGX 2016-12-14 10:41:52 -07:00
41f6863970 add missing certs and keys to certs/include.am 2016-12-14 09:46:41 -07:00
55554b79a9 PKCS#7: fix use after free in wc_DecodeKtri 2016-12-14 09:15:45 -07:00
20887a8c35 Implementation of scrypt
Tests and benchmarking added.
Configure with --enable-scrypt and requires --enable-pwdbased
2016-12-14 16:57:41 +10:00
e5d1e3ae10 PKCS#7: only output test bundles when PKCS7_OUTPUT_TEST_BUNDLES is defined 2016-12-13 15:27:46 -07:00
22ecd55964 Don't ForceZero in assembly optimized versions. 2016-12-14 08:22:05 +10:00
a1b92dc809 Tidy up CPU Id check not not reference SHA384 2016-12-14 08:22:05 +10:00
24cfba4276 Fix ForceZero calls 2016-12-14 08:22:05 +10:00
0e4aa233ba Use ForceZero in all implementations of Transform 2016-12-14 08:22:05 +10:00
fd21023823 Share code between SHA512 and SHA384 2016-12-14 08:22:05 +10:00
811be0eb9e Faster zeroize on x86_64 2016-12-14 08:22:05 +10:00
f70860a9af Make sure NO_64BIT is defined. 2016-12-13 12:18:21 -08:00
fd9a94b2bd Fixes to build STM32 with IAR. 2016-12-13 10:24:55 -08:00
dad0cfda92 add EnvelopedData ECC support, refactor pkcs7 2016-12-13 09:40:54 -07:00
483e461c49 Merge pull request #647 from kaleb-himes/RIOT_OS
RIOT OS support, test scripts will be submitted to RIOT-OS repository
2016-12-10 19:13:19 -08:00
6c7e1785aa EXIT_TEST macro added for cleaner implementation and maintenance 2016-12-09 19:39:36 -07:00
1748045d52 use NO_WRITEV for portability 2016-12-09 19:12:25 -07:00
5006306bb8 PKCS#7: add support for optional unprotectedAttributes with EncryptedData 2016-12-09 17:02:57 -07:00
abf18858a8 refactor PKCS#7 functionality into separate functions for Enveloped and EncryptedData 2016-12-09 17:02:57 -07:00
b5eb8dce2f add PKCS#7/CMS EncryptedContent support 2016-12-09 16:57:31 -07:00
e80331e03a fix Windows debug build warning with secure renegotiation 2016-12-09 14:31:21 -08:00
7fa825fde0 Enable secure renegotiation by default for Windows library build. 2016-12-09 13:39:00 -08:00
e3b57211d5 undo whitespace modification 2016-12-09 14:36:06 -07:00
fc9d689bc6 fastmath works with RIOT_OS if defined TFM_NO_ASM 2016-12-09 14:34:14 -07:00
b0b80bed78 Merge pull request #657 from cconlon/x963kdf
add ANSI-X9.63-KDF support [SEC1]
2016-12-09 13:29:41 -08:00
ad2b0810c6 Merge pull request #648 from cconlon/keywrap
add AES key wrap support, RFC 3394
2016-12-09 13:23:39 -08:00
7a76baa83e restore .am and gitignore 2016-12-09 13:13:43 -07:00
c957107d76 merge with master and remove RIOT_Make directory, keep changes for working on Mac OS X 2016-12-09 13:11:45 -07:00
9e17b2b0aa Merge branch 'master' of https://github.com/wolfssl/wolfssl into RIOT_OS 2016-12-09 13:09:25 -07:00
8b1a6d4c70 Merge pull request #658 from kaleb-himes/sniffer
Prevent forcezero from running on freed memory
2016-12-09 09:04:01 -08:00
33e840b01b add AES key wrap support, RFC 3394 2016-12-09 09:30:56 -07:00
fdbb142699 Merge pull request #659 from toddouska/distcheck
fix nxp distcheck filename typo
2016-12-09 08:04:02 -08:00
d2ed611757 fix nxp distcheck filename typo 2016-12-08 16:52:12 -08:00
6cfb8e30b2 Merge pull request #591 from dgarske/STM32_CUBEMX
STM32 F2/F4 CubeMX and Std Peripheral Library hardware crypto support
2016-12-08 16:36:43 -08:00
ab7849be0d Merge pull request #655 from JacobBarthelmeh/ARMv8
ARMv8
2016-12-08 16:34:19 -08:00
2db7bf0dc0 use static digest for X9.63 KDF, add smallstack support 2016-12-08 17:28:53 -07:00
5da564d03c Merge pull request #656 from SparkiDev/hashes
Get the hash of the handshake messages rather than finalize.
2016-12-08 16:23:28 -08:00
d2b5a9538d Prevent forcezero from running on freed memory 2016-12-08 15:11:41 -07:00
289acd088a Remove state save and restore 2016-12-08 15:21:04 +10:00
ea1a03d538 Get the hash of the handshake messages rather than finalize.
Inconsistency between SHA256 and SHA384/SHA512 when getting hash.
More handshake messages can be added after this operation.
2016-12-08 15:21:04 +10:00
a5b267087f add ANSI-X9.63-KDF support [SEC1] 2016-12-07 20:26:09 -07:00
2a3f3433e7 Merge pull request #652 from ejohnstown/autoconf-size-check
Move autoconf size checks
2016-12-07 15:23:25 -08:00
3dec222969 Merge pull request #523 from dgarske/atmel_pr
Support for Atmel ATECC508A
2016-12-07 15:01:08 -08:00
074741aabf Merge pull request #651 from dgarske/ksdk_dup_dec
Remove obsolete duplicate declaration for wc_RsaFunction in the KSDK header
2016-12-07 13:48:53 -08:00
a1bd2c8b35 Merge pull request #654 from dgarske/smallstackfixes
Fixes for build with WOLFSSL_SMALL_STACK defined
2016-12-07 13:41:45 -08:00
da4a46ddf6 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into RIOT_OS 2016-12-07 14:16:34 -07:00
477ec3c3d1 Merge pull request #2 from NickolasLapp/STM32_CUBEmX
Fix DES3 on STM32 CUBEMX
2016-12-07 11:27:24 -08:00
82c12fb7be Fix DES3 on STM32 CUBEMX 2016-12-07 10:20:46 -07:00
5c59ccdeb9 Fix scan-build warning. Updated "side" variable failure case to return proper error code. 2016-12-07 07:57:55 -08:00
4dd393077f Updated EccSharedSecret callback to use ecc_key* peer directly. Passes examples with "-P" tests and new pkcallback test script. 2016-12-07 07:57:55 -08:00
45d26876c8 Moved wolfSSL_GetEccKey logic to internal.c and use only for PK_CALLBACK. Added other ECC key info to the EccSharedSecretCb. Cleanup of the "if (ssl->ctx->EccSharedSecretCb == NULL)" logic to revert indent so changes are minimized. Removed new wolfSSL_GetEccKey API. 2016-12-07 07:57:55 -08:00
eaca90db28 New Atmel support (WOLFSSL_ATMEL) and port for ATECC508A (WOLFSSL_ATECC508A). Adds wolfCrypt support for ECC Hardware acceleration using the ATECC508A. Adds new PK callback for ECC shared secret. Fixed missing "wc_InitRng_ex" when using "CUSTOM_RAND_GENERATE_BLOCK". Added ATECC508A RNG block function for P-RNG bypass ability. Added internal "wolfSSL_GetEccPrivateKey" function for getting reference to private key for ECC shared secret (used in test.h for testing PK_CALLBACK mode). Added README.md for using the Atmel ATECC508A port. 2016-12-07 07:57:55 -08:00
9399cc05cb Fixes for building with CRL monitor when not linux, OS X or FreeBSD and --enable-distro set. Cleanup of the crl.c HAVE_CRL_MONITOR checks for OS and make sure if StopMonitor preprocessor is defined the function will also be defined. 2016-12-07 07:07:27 -08:00
fdc297f6bd Moved the check for the size of long, long long, and __m128 to before
the checks for libraries. In some combination of autotools, making a
32-bit build, the autoconf test code can't link libnetwork and crashes,
leaving those sizes all set to 0.
2016-12-06 16:15:45 -08:00
55b1ced783 Merge pull request #653 from toddouska/pkcallbacks
add pkcallbacks script test
2016-12-06 15:15:50 -08:00
944e5fba03 ARMv8 : load pointer to AES key and counter into a register along with pointer to SHA256 K table to handle tight optimized loops on function call with -flto 2016-12-06 21:42:15 +00:00
ed8e0132a7 do_cleanup on pkcallbacks.test 2016-12-06 13:04:12 -08:00
c0e006d42c Fixes for build with small stack enabled. 2016-12-06 12:38:05 -08:00
80cc737ffa add pkcallbacks script test 2016-12-06 11:27:05 -08:00
9fcb6e4e3c Remove obsolete duplicate declaration for wc_RsaFunction in the KSDK port header. 2016-12-06 10:25:56 -08:00
932199c5e9 Fix build warning about unused static functions wc_AesEncrypt and wc_AesDecrypt with STM32. 2016-12-05 14:22:59 -08:00
4a7651a09a STM32 F2/F4 CubeMX and Std Peripheral Library hardware crypto support for RNG, AES, SHA1, DES3 and MD5. Adds new WOLFSSL_STM32_CUBEMX and WOLFSSL_STM32F4 defines. Tested on STM32F437II. 2016-12-05 14:22:59 -08:00
f3816a4dc5 Merge pull request #597 from dgarske/NXPLTC
NXP (K82) LTC math hardware acceleration support
2016-12-05 13:50:31 -08:00
1d14ac5ff3 Fixes to include.am and sha256.c after master rebase. Retested on NXP K82 with and without HW accel (all tests/benchmarks pass). 2016-12-05 09:15:58 -08:00
877ea7011c Fix for LTC RSA-4096. Use original wolfSSL code for RSA operation, reduce in LTC port layer. 2016-12-05 09:01:59 -08:00
0611c45869 Attempt to fix sha.c error with older visual studio compiler. 2016-12-05 09:01:59 -08:00
08b8af5f83 Fix for forced software crypto build. 2016-12-05 09:01:59 -08:00
c35daa877e Fix to allow disabling MMCAU/LTC for software only test (moved preprocessor defines to Kinetis). Updated K82 software benchmark with actual values. 2016-12-05 09:01:59 -08:00
ae75842021 Fix build issues with rebase for ECC and RSA. Changed user_settings.h example when LTC is enabled to disable Shamir and ECC-521. Cleanup to add USE_NXP_MMCAU and USE_NXP_LTC for the example user_settings.h, so the project file can automatically configure. 2016-12-05 09:01:59 -08:00
a6b96b17ff Fixes to include path for NXP ksdk_port. Fixes for time USER/OVERRIDES so their #ifdef's are checked first. Fix to initialize LTC via new "ksdk_port_init" function. Cleanup of the ksdk_port.c for formatting, macros, statics and line length. Cleanup of the AES code for key size. Cleanup of the wolfCrypt sha.c for readability. Added support for the KSDK bare metal drivers to the IDE Rowley CrossWorks example. Updated the settings.h to allow for overrides in Freescale section. Updated README with info for using LTC. 2016-12-05 09:01:59 -08:00
8e64d564dc NXP/Freescale K8X MMCAU / LTC core support for RSA, ECC, Ed/Curve25519, AES, DSA, DES3, MD5, RNG, SHA and SHA2. 2016-12-05 09:01:59 -08:00
ddeb9da502 warning on empty translation units ignored, move cflags to Makefile 2016-12-03 11:55:24 -07:00
d2aef9a82a README update 2016-12-03 11:03:17 -07:00
43525343fc add RIOT tests to dist and make sure Makefiles are not excluded by .gitignore 2016-12-02 17:30:57 -07:00
162294e3e5 added benchmark app for RIOT and updated test error handling 2016-12-02 14:39:37 -07:00
684f9bad22 RIOT OS build and test scripts, build instructions 2016-12-02 13:53:05 -07:00
4317141260 Merge pull request #646 from JacobBarthelmeh/master
remove fPIE flag
2016-12-01 12:56:56 -08:00
d32af7e44b remove fPIE flag : fPIE is suitable for use with executables and not when creating libraries 2016-12-01 12:01:38 -07:00
92377140b7 Merge pull request #520 from dgarske/compat_fixes
Add user cert chain DER support and OpenSSL compatibility fixes/improvements
2016-12-01 09:23:49 -08:00
650ddb8d23 Fixes so make check works with NO_FILESYSTEM and FORCE_BUFFER_TEST. Example: ./configure CFLAGS="-DNO_FILESYSTEM -DFORCE_BUFFER_TEST" 2016-11-30 16:27:24 -08:00
039aedcfba Added "wolfSSL_use_certificate_chain_buffer_format". Added "wolfSSL_SESSION_CIPHER_get_name" to get cipher suite name using WOLFSSL_SESSION*. Moved the "wolfSSL_get_cipher_name_from_suite" function to internal.c. Added new server-cert-chain.der, which is combination of ca-cert.der and server-cert.der. Enhanced load_buffer to detect format using file extension. Can test use of DER cert chain with NO_FILESYSTEM defined using "./examples/server/server -c ./certs/server-cert-chain.der -k ./certs/server-key.der". 2016-11-30 16:26:02 -08:00
3d920b23a0 Fix for building with NO_ERROR_STRINGS. 2016-11-30 16:26:02 -08:00
7a35d904c2 Added new API "wolfSSL_CIPHER_get_name_from_suite" to allow use of the cipherSuite and cipherSuite0 args directly to get cipher suite name. Changed "wolfSSL_CIPHER_get_name" to call new API (based on original). ASN change to allow ToTraditional and SetName for OPENSSL_EXTRA. 2016-11-30 16:26:02 -08:00
c3c3419138 Added processing of user cert chain in DER format. Added arg check on "wolfSSL_get_certificate" to fix NULL dereference if certificate not yet set via "wolfSSL_use_certificate_buffer" or "wolfSSL_use_certificate_file". Added "wolfSSL_CTX_use_certificate_chain_buffer_format" to expose way to import certificate chain buffer as ASN1 (since "wolfSSL_CTX_use_certificate_chain_buffer" assumes PEM) . Changed ProcessFile from static and added as local in internal.h. 2016-11-30 16:26:01 -08:00
cfc5de8c5a Merge pull request #645 from toddouska/fds
allow separate set fds for read/write, helpful for DTLS multicast
2016-11-30 13:17:58 -08:00
8f89d4922f allow separate set fds for read/write, helpful for DTLS multicast 2016-11-30 11:15:57 -08:00
a2dc01413c For distro build don't install options.h (conflicts with multi-arch). Fix for BUILD_DISTRO excludes with indent. 2016-11-29 13:29:19 -08:00
235060eff2 Merge pull request #644 from cconlon/return_fix
correct MEMORY_E returns in asn.c
2016-11-28 10:58:06 -08:00
a9936cf3ee correct MEMORY_E returns in asn.c 2016-11-28 10:39:07 -07:00
2cbc6ed673 ARMv8 : handle aggressive optimizers 2016-11-23 15:44:53 -07:00
7dab97fb01 Merge pull request #641 from dgarske/verifycb_peer_cert_chain
Add the peer cert buffer and count to X509_STORE_CTX for verify callback
2016-11-23 12:59:00 -08:00
1240014fab Fix OCSP to use public buffer type (now WOLFSSL_BUFFER_INFO). 2016-11-22 19:33:40 -08:00
8a8274d403 Merge pull request #643 from dgarske/fix_hmac_224
Fix wc_HmacSizeByType for SHA224.
2016-11-23 13:28:37 +10:00
50131b410d Added new "WOLFSSL_BUFFER_INFO" type to represent internal "buffer" type and the "WOLFSSL_X509_STORE_CTX" certs. Added "VERIFY_CALLBACK_SHOW_PEER_CERTS" to print peer certs pointer and length. 2016-11-22 19:24:54 -08:00
ff16ecda5e Merge pull request #642 from dgarske/ecc_custcurve_speedup
ECC performance increase with custom curves enabled
2016-11-22 16:05:57 -08:00
a540169b72 Merge pull request #638 from ejohnstown/dtls-window-update
DTLS Sequence Window Tracking Update
2016-11-22 16:53:04 -07:00
16907de633 Fix wc_HmacSizeByType for SHA224. 2016-11-22 14:45:10 -08:00
13cf313001 ECC performance increase with custom curves enabled (WOLFSSL_CUSTOM_CURVES) when A param is 3. 2016-11-22 13:43:18 -08:00
5b76a37234 Add the peer cert buffer and count to the X509_STORE_CTX used for the verify callback. Fixes #627. 2016-11-22 11:45:00 -08:00
13bdcc518d Pulled in patches from Debian package. 2016-11-22 11:25:40 -08:00
2d9d3aeb91 DTLS Window Update: fixes and changes 2016-11-22 10:12:18 -08:00
b61e6e1219 Merge pull request #639 from moisesguimaraes/fixes-srp-priv-key-size
fixes random keys size ('a' and 'b')
2016-11-21 15:59:32 -07:00
64fc68920d fixes random keys size ('a' and 'b') 2016-11-21 18:08:19 -03:00
ec6fec452d Update session export with the new sequence number windows. 2016-11-21 09:16:53 -08:00
2507c4da8a DTLS Sequence Window Tracking Update
1. Modify the DTLS sequence window to use an array of word32 instead
   of a word32 or word64 depending on the availability of word64.
2. One can change the array size to have a bigger window.
2016-11-18 11:52:43 -08:00
b380eef3e2 Merge pull request #637 from JacobBarthelmeh/master
PKCS12 : return on memory error
2016-11-18 11:03:57 -08:00
ac5436b462 PKCS12 : return on memory error 2016-11-18 09:40:26 -07:00
1289e66641 Merge pull request #636 from dgarske/fix-ti-hash-mem-leak
Fix memory leak issue in ti-hash.c with small stack
2016-11-17 16:19:37 -08:00
f167fe3d4a Merge pull request #625 from dgarske/tls_nosha256
Fix to allow TLS with NO_SHA256
2016-11-17 16:14:28 -08:00
bfd0a1b405 Fix to allow SHA384 cipher suite with NO_SHA256 defined. Without this fix the BUILD_AESGCM wasn't getting defined. 2016-11-17 10:29:48 -08:00
b01952ea40 Cleanup the hash free in FreeHandshakeResources. 2016-11-17 09:34:31 -08:00
de1ee91863 Fix memory leak issue with WOLFSSL_SMALL_STACK defined and using TI hardware accelerated hashing. 2016-11-17 09:24:56 -08:00
f275331e44 Merge pull request #634 from toddouska/sha512-length
Sha512 length
2016-11-16 15:06:20 -08:00
5c3bd7e1a0 Merge pull request #635 from cconlon/pkcs7signed
fix wc_PKCS7_EncodeSignedData with no signed attributes
2016-11-16 14:07:58 -08:00
8cea6ad148 fix wc_PKCS7_EncodeSignedData when used with empty or no signed attributes 2016-11-16 13:35:57 -07:00
44a23b072f fix mcapi with size change 2016-11-16 09:39:21 -08:00
afc54c3dff change sha512 hi/loLen to 64bits 2016-11-16 09:30:35 -08:00
f922d3f2d6 Merge pull request #624 from SparkiDev/sha224
SHA224 implementation added
2016-11-15 13:53:34 -08:00
98b57e045a Merge pull request #629 from SparkiDev/rsa-crt
Make RSA CRT constant time
2016-11-15 13:36:32 -08:00
82e8210208 Support for building without SHA256 with NO_OLD_TLS and SHA384/512. Although TLS 1.2 default digest for certs is SHA256 and our test cert signatures use SHA256, so make check will fail. Also requires disabling the P-RNG which uses SHA256. Added missing "wc_InitRng_ex" when using "CUSTOM_RAND_GENERATE_BLOCK". Cleanup of the BuildCertHashes, DoRounds, HashInput, HashOutput and HashOutputRaw return codes. 2016-11-14 12:47:24 -08:00
2023b65f4c Make RSA CRT constant time
Identifying which part of the CRT failed, through timing, reveals
information useful to an attacker.
2016-11-14 08:57:28 +10:00
9b0d53ba50 Fixes from review
Remove ForceZero changes (better version in another pull request)
Remove SHA-224 APIs for FIPS (algorithm not avaialable in FIPS.
2016-11-12 09:52:07 +10:00
478f279b3c Fix logic 2016-11-11 16:38:28 +10:00
abcd6af512 Disable SHA-224 in FIPS 2016-11-11 16:29:34 +10:00
9e81261f1e Fixes 2016-11-11 16:11:16 +10:00
45983c3b32 Fix SHA224 enum in HMAC code 2016-11-11 12:17:32 +10:00
fdfc177254 SHA224 implementation added
Added SHA24 implementation and tetss.
Added HMAC-SHA224 implementation and tests.
Added RSA-SHA224 and ECDSA-SHA224.
Added MGF1-SHA224
Added OpenSSL APIs for SHA224
Configuration option to enable SHA224 and it is on by default for x86_64
2016-11-10 15:52:26 +10:00
972 changed files with 380859 additions and 54268 deletions

View File

@ -66,7 +66,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="wolfcrypt/src/misc.c|IDE/LPCXPRESSO/wolf_example|tirtos|testsuite|tests|swig|support|sslSniffer|scripts|rpm|mqx|mplabx|mcapi|m4|IDE/WORKBENCH|IDE/WIN|IDE/ROWLEY-CROSSWORKS-ARM|IDE/MYSQL|IDE/MDK-ARM|IDE/MDK5-ARM|IDE/LPCXPRESSO/wolf_demo|IDE/LPCXPRESSO/lpc_chip_18xx|IDE/LPCXPRESSO/lpc_board_nxp_lpcxpresso_1837|IDE/iOS|IDE/IAR-EWARM|examples|Debug|certs|build-aux|Backup|autom4te.cache|wolfcrypt/src/aes_asm.s|wolfcrypt/src/aes_asm.asm|wolfcrypt/user-crypto" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="src/bio.c|wolfcrypt/src/evp.c|wolfcrypt/src/misc.c|IDE/LPCXPRESSO/wolf_example|tirtos|testsuite|tests|swig|support|sslSniffer|scripts|rpm|mqx|mplabx|mcapi|m4|IDE/WORKBENCH|IDE/WIN|IDE/ROWLEY-CROSSWORKS-ARM|IDE/MYSQL|IDE/MDK-ARM|IDE/MDK5-ARM|IDE/LPCXPRESSO/wolf_demo|IDE/LPCXPRESSO/lpc_chip_18xx|IDE/LPCXPRESSO/lpc_board_nxp_lpcxpresso_1837|IDE/iOS|IDE/IAR-EWARM|examples|Debug|certs|build-aux|Backup|autom4te.cache|wolfcrypt/src/aes_asm.s|wolfcrypt/src/aes_asm.asm|wolfcrypt/user-crypto" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>

65
.gitignore vendored
View File

@ -9,7 +9,8 @@ ctaocrypt/src/src/
*.cache
.dirstamp
*.user
config*
configure
config.*
*Debug/
*Release/
*.ncb
@ -37,17 +38,29 @@ tags
cyassl-config
wolfssl-config
cyassl.sublime*
fips.h
fips.c
fips_test.c
fips
wolfcrypt_first.c
wolfcrypt_last.c
selftest.c
fipsv2.c
src/async.c
wolfssl/async.h
wolfcrypt/src/async.c
wolfssl/wolfcrypt/async.h
wolfcrypt/src/port/intel/quickassist.c
wolfcrypt/src/port/intel/quickassist_mem.c
wolfcrypt/src/port/cavium/cavium_nitrox.c
wolfssl/wolfcrypt/port/intel/quickassist.h
wolfssl/wolfcrypt/port/intel/quickassist_mem.h
wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h
ctaocrypt/benchmark/benchmark
ctaocrypt/test/testctaocrypt
wolfcrypt/benchmark/benchmark
wolfcrypt/test/testwolfcrypt
examples/benchmark/tls_bench
examples/client/client
examples/echoclient/echoclient
examples/echoserver/echoserver
@ -64,6 +77,7 @@ testsuite/testsuite
tests/unit
testsuite/testsuite.test
tests/unit.test
tests/bio_write_test.txt
testsuite/*.der
testsuite/*.pem
testsuite/*.raw
@ -73,18 +87,32 @@ certecc.der
certecc.pem
othercert.der
othercert.pem
certeccrsa.der
certeccrsa.pem
ntru-cert.der
ntru-cert.pem
ntru-key.raw
key.der
key.pem
ecc-public-key.der
ecc-key-pkcs8.der
ecc-key.der
ecc-key.pem
certreq.der
certreq.pem
pkcs7cert.der
pkcs7signedData.der
pkcs7signedData_RSA_SHA.der
pkcs7signedData_RSA_SHA_noattr.der
pkcs7signedData_RSA_SHA224.der
pkcs7signedData_RSA_SHA256.der
pkcs7signedData_RSA_SHA384.der
pkcs7signedData_RSA_SHA512.der
pkcs7signedData_ECDSA_SHA.der
pkcs7signedData_ECDSA_SHA_noattr.der
pkcs7signedData_ECDSA_SHA224.der
pkcs7signedData_ECDSA_SHA256.der
pkcs7signedData_ECDSA_SHA384.der
pkcs7signedData_ECDSA_SHA512.der
pkcs7envelopedDataDES3.der
pkcs7envelopedDataAES128CBC.der
pkcs7envelopedDataAES192CBC.der
@ -109,6 +137,7 @@ autoscan.log
TAGS
.DS_Store
support/cyassl.pc
support/wolfssl.pc
cyassl/ctaocrypt/stamp-h1
swig/_cyassl.so
swig/_wolfssl.so
@ -149,6 +178,12 @@ mplabx/wolfcrypt_test.X/nbproject/Makefile-*
mplabx/wolfcrypt_test.X/nbproject/Package-default.bash
mplabx/wolfssl.X/nbproject/Makefile-*
mplabx/wolfssl.X/nbproject/Package-default.bash
mplabx/wolfssl.X/nbproject/private
mplabx/wolfcrypt_test.X/nbproject/private
mplabx/wolfcrypt_benchmark.X/nbproject/private
mplabx/wolfssl.X/dist/default/
mplabx/wolfcrypt_test.X/dist/default/
mplabx/wolfcrypt_benchmark.X/dist/default/
*.dSYM
# Vagrant folder
@ -188,4 +223,28 @@ wolfcrypt/user-crypto/lib/libusercrypto.*
wrapper/CSharp/x64/
# Visual Studio Code Workspace Files
*.vscode
*.vscode
*.userprefs
*.exe
*.dll
.vs
Backup
UpgradeLog.htm
IDE/INTIME-RTOS/Debug_*
IDE/VS-ARM/.vs
# Hexiwear
IDE/HEXIWEAR/wolfSSL_HW/Debug
# Linux-SGX
IDE/LINUX-SGX/*.a
# Binaries
wolfcrypt/src/port/intel/qat_test
/mplabx/wolfssl.X/dist/default/
/mplabx/wolfcrypt_test.X/dist/default/
# Arduino Generated Files
/IDE/ARDUINO/wolfSSL
scripts/memtest.txt

1932
ChangeLog.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,22 +4,23 @@
This is a shell script that will re-organize the wolfSSL library to be
compatible with Arduino projects. The Arduino IDE requires a library's source
files to be in the library's root directory with a header file in the name of
the library. This script moves all src/ files to the root wolfssl directory and
creates a stub header file called wolfssl.h.
the library. This script moves all src/ files to the `IDE/ARDUINO/wolfSSL`
directory and creates a stub header file called `wolfssl.h`.
Step 1: To configure wolfSSL with Arduino, enter the following from within the
wolfssl/IDE/ARDUINO directory:
./wolfssl-arduino.sh
`./wolfssl-arduino.sh`
Step 2: Edit <wolfssl-root>/wolfssl/wolfcrypt/settings.h uncomment the define for
WOLFSSL_ARDUINO
Step 2: Edit `<wolfssl-root>/IDE/ARDUINO/wolfSSL/wolfssl/wolfcrypt/settings.h` uncomment the define for `WOLFSSL_ARDUINO`
If building for Intel Galileo platform also uncomment the define for `INTEL_GALILEO`.
also uncomment the define for INTEL_GALILEO if building for that platform
#####Including wolfSSL in Arduino Libraries (for Arduino version 1.6.6)
1. Copy the wolfSSL directory into Arduino/libraries (or wherever Arduino searches for libraries).
2. In the Arduino IDE:
- Go to ```Sketch > Include Libraries > Manage Libraries```. This refreshes your changes to the libraries.
- Next go to ```Sketch > Include Libraries > wolfSSL```. This includes wolfSSL in your sketch.
1. In the Arduino IDE:
- In `Sketch -> Include Library -> Add .ZIP Library...` and choose the
`IDE/ARDUNIO/wolfSSL` folder.
- In `Sketch -> Include Library` choose wolfSSL.
An example wolfSSL client INO sketch exists here: `sketches/wolfssl_client/wolfssl_client.ino`

View File

@ -1,6 +1,6 @@
/* wolfssl_client.ino
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2018 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -142,4 +142,3 @@ void loop() {
}
delay(1000);
}

View File

@ -7,9 +7,29 @@
DIR=${PWD##*/}
if [ "$DIR" = "ARDUINO" ]; then
cp ../../src/*.c ../../
cp ../../wolfcrypt/src/*.c ../../
echo "/* stub header file for Arduino compatibility */" >> ../../wolfssl.h
rm -rf wolfSSL
mkdir wolfSSL
cp ../../src/*.c ./wolfSSL
cp ../../wolfcrypt/src/*.c ./wolfSSL
mkdir wolfSSL/wolfssl
cp ../../wolfssl/*.h ./wolfSSL/wolfssl
mkdir wolfSSL/wolfssl/wolfcrypt
cp ../../wolfssl/wolfcrypt/*.h ./wolfSSL/wolfssl/wolfcrypt
# support misc.c as include in wolfcrypt/src
mkdir ./wolfSSL/wolfcrypt
mkdir ./wolfSSL/wolfcrypt/src
cp ../../wolfcrypt/src/misc.c ./wolfSSL/wolfcrypt/src
# put bio and evp as includes
mv ./wolfSSL/bio.c ./wolfSSL/wolfssl
mv ./wolfSSL/evp.c ./wolfSSL/wolfssl
echo "/* Generated wolfSSL header file for Arduino */" >> ./wolfSSL/wolfssl.h
echo "#include <wolfssl/wolfcrypt/settings.h>" >> ./wolfSSL/wolfssl.h
echo "#include <wolfssl/ssl.h>" >> ./wolfSSL/wolfssl.h
else
echo "ERROR: You must be in the IDE/ARDUINO directory to run this script"
fi

183
IDE/CSBENCH/.cproject Normal file
View File

@ -0,0 +1,183 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.mentor.nucleus.lib.debug.16169494">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mentor.nucleus.lib.debug.16169494" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/wolfcrypt"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/wolfcrypt/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="wolfssl" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.mentor.embedded.toolchains.core.nucleus.FuseErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="wolfssl" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="cs-rm -rf" description="" id="cdt.managedbuild.config.gnu.mentor.nucleus.lib.debug.16169494" name="Debug" parent="cdt.managedbuild.config.gnu.mentor.nucleus.lib.debug">
<folderInfo id="cdt.managedbuild.config.gnu.mentor.nucleus.lib.debug.16169494." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mentor.nucleus.lib.debug.223487397" name="Sourcery CodeBench for Nucleus" superClass="cdt.managedbuild.toolchain.gnu.mentor.nucleus.lib.debug">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.mentor.nucleus.1602489785" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.mentor.nucleus"/>
<builder buildPath="${workspace_loc:/wolfcrypt}/Debug" id="cdt.managedbuild.builder.gnu.mentor.nucleus.1164120304" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CodeSourcery GNU Builder" superClass="cdt.managedbuild.builder.gnu.mentor.nucleus"/>
<tool id="cdt.managedbuild.tool.gnu.mentor.archiver.nucleus.729368558" name="CodeSourcery GNU Archiver" superClass="cdt.managedbuild.tool.gnu.mentor.archiver.nucleus"/>
<tool id="cdt.managedbuild.tool.gnu.mentor.cpp.compiler.nucleus.1374010562" name="CodeSourcery GNU C++ Compiler" superClass="cdt.managedbuild.tool.gnu.mentor.cpp.compiler.nucleus">
<option id="mentor.gnu.cpp.compiler.option.optimization.level.2002648562" name="Optimization Level" superClass="mentor.gnu.cpp.compiler.option.optimization.level" value="mentor.gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="mentor.gnu.cpp.compiler.option.debugging.level.498021118" name="Debug Level" superClass="mentor.gnu.cpp.compiler.option.debugging.level" value="mentor.gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="mentor.gnu.cpp.compiler.option.indexer_include.2050335782" name="Include paths for indexer" superClass="mentor.gnu.cpp.compiler.option.indexer_include" valueType="includePath">
<listOptionValue builtIn="false" value="${CFG_INCLUDE}"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/./"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/bsp/realview_eb_ct926ejs/include/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/bsp/realview_eb_ct926ejs/include/bsp/arch/plat-realview_eb/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/arch/arm/tool-csgnu_arm/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/include/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/include/arch/arm/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/include/arch/arm/tool-csgnu_arm/"/>
</option>
</tool>
<tool id="cdt.managedbuild.tool.gnu.mentor.c.compiler.nucleus.2014778929" name="CodeSourcery GNU C Compiler" superClass="cdt.managedbuild.tool.gnu.mentor.c.compiler.nucleus">
<option defaultValue="mentor.gnu.c.optimization.level.none" id="mentor.gnu.c.compiler.option.optimization.level.398007200" name="Optimization Level" superClass="mentor.gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
<option id="mentor.gnu.c.compiler.option.debugging.level.732537986" name="Debug Level" superClass="mentor.gnu.c.compiler.option.debugging.level" value="mentor.gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="mentor.gnu.c.compiler.option.indexer_include.1166025607" name="Include paths for indexer" superClass="mentor.gnu.c.compiler.option.indexer_include" valueType="includePath">
<listOptionValue builtIn="false" value="${CFG_INCLUDE}"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/./"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/bsp/realview_eb_ct926ejs/include/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/bsp/realview_eb_ct926ejs/include/bsp/arch/plat-realview_eb/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/arch/arm/tool-csgnu_arm/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/include/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/include/arch/arm/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/include/arch/arm/tool-csgnu_arm/"/>
</option>
<option id="mentor.gnu.c.compiler.option.preprocessor.def.symbols.1143748896" name="Defined symbols (-D)" superClass="mentor.gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
</option>
<option id="mentor.gnu.c.compiler.option.include.paths.194565509" name="Include paths (-I)" superClass="mentor.gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.mentor.c.compiler.nucleus.input.923848555" superClass="cdt.managedbuild.tool.gnu.mentor.c.compiler.nucleus.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.mentor.c.linker.nucleus.1059991805" name="CodeSourcery GNU C Linker" superClass="cdt.managedbuild.tool.gnu.mentor.c.linker.nucleus"/>
<tool id="cdt.managedbuild.tool.gnu.mentor.cpp.linker.nucleus.1339624750" name="CodeSourcery GNU C++ Linker" superClass="cdt.managedbuild.tool.gnu.mentor.cpp.linker.nucleus"/>
<tool id="cdt.managedbuild.tool.gnu.mentor.assembler.nucleus.729188509" name="CodeSourcery GNU Assembler" superClass="cdt.managedbuild.tool.gnu.mentor.assembler.nucleus">
<option id="gnu.both.asm.option.debugging.level.260047724" name="Debug Level" superClass="gnu.both.asm.option.debugging.level" value="gnu.both.asm.debugging.level.max" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.376260780" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="com.mentor.embedded.toolchains.core.nucleus.exportgen.process.403073591" name="Nucleus Exports Generator" superClass="com.mentor.embedded.toolchains.core.nucleus.exportgen.process"/>
<tool id="com.mentor.embedded.toolchains.core.nucleus.exportgen.application.645196251" name="Nucleus Exports Generator" superClass="com.mentor.embedded.toolchains.core.nucleus.exportgen.application"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="src/src/evp.c|src/src/aes_asm.S|src/benchmark|src/user-crypto|src/src/misc.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings">
<externalSettings containerId="system-project;" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier"/>
</storageModule>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.mentor.nucleus.lib.release.1927475508">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mentor.nucleus.lib.release.1927475508" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/wolfcrypt"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/wolfcrypt/Release"/>
<entry flags="RESOLVED" kind="libraryFile" name="wolfssl" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.mentor.embedded.toolchains.core.nucleus.FuseErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="wolfssl" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="cs-rm -rf" description="" id="cdt.managedbuild.config.gnu.mentor.nucleus.lib.release.1927475508" name="Release" parent="cdt.managedbuild.config.gnu.mentor.nucleus.lib.release">
<folderInfo id="cdt.managedbuild.config.gnu.mentor.nucleus.lib.release.1927475508." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mentor.nucleus.lib.release.215643800" name="Sourcery CodeBench for Nucleus" superClass="cdt.managedbuild.toolchain.gnu.mentor.nucleus.lib.release">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.mentor.nucleus.1262083747" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.mentor.nucleus"/>
<builder buildPath="${workspace_loc:/wolfcrypt}/Release" id="cdt.managedbuild.builder.gnu.mentor.nucleus.656729475" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CodeSourcery GNU Builder" superClass="cdt.managedbuild.builder.gnu.mentor.nucleus"/>
<tool id="cdt.managedbuild.tool.gnu.mentor.archiver.nucleus.1642691673" name="CodeSourcery GNU Archiver" superClass="cdt.managedbuild.tool.gnu.mentor.archiver.nucleus"/>
<tool id="cdt.managedbuild.tool.gnu.mentor.cpp.compiler.nucleus.53089999" name="CodeSourcery GNU C++ Compiler" superClass="cdt.managedbuild.tool.gnu.mentor.cpp.compiler.nucleus">
<option id="mentor.gnu.cpp.compiler.option.optimization.level.1972432162" name="Optimization Level" superClass="mentor.gnu.cpp.compiler.option.optimization.level" value="mentor.gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="mentor.gnu.cpp.compiler.option.debugging.level.1063240694" name="Debug Level" superClass="mentor.gnu.cpp.compiler.option.debugging.level"/>
<option id="mentor.gnu.cpp.compiler.option.indexer_include.482283905" name="Include paths for indexer" superClass="mentor.gnu.cpp.compiler.option.indexer_include" valueType="includePath">
<listOptionValue builtIn="false" value="${CFG_INCLUDE}"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/./"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/bsp/realview_eb_ct926ejs/include/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/bsp/realview_eb_ct926ejs/include/bsp/arch/plat-realview_eb/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/arch/arm/tool-csgnu_arm/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/include/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/include/arch/arm/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/include/arch/arm/tool-csgnu_arm/"/>
</option>
</tool>
<tool id="cdt.managedbuild.tool.gnu.mentor.c.compiler.nucleus.768508310" name="CodeSourcery GNU C Compiler" superClass="cdt.managedbuild.tool.gnu.mentor.c.compiler.nucleus">
<option defaultValue="mentor.gnu.c.optimization.level.most" id="mentor.gnu.c.compiler.option.optimization.level.1172306433" name="Optimization Level" superClass="mentor.gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
<option id="mentor.gnu.c.compiler.option.debugging.level.1416772866" name="Debug Level" superClass="mentor.gnu.c.compiler.option.debugging.level"/>
<option id="mentor.gnu.c.compiler.option.indexer_include.190263447" name="Include paths for indexer" superClass="mentor.gnu.c.compiler.option.indexer_include" valueType="includePath">
<listOptionValue builtIn="false" value="${CFG_INCLUDE}"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/./"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/bsp/realview_eb_ct926ejs/include/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/bsp/realview_eb_ct926ejs/include/bsp/arch/plat-realview_eb/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/arch/arm/tool-csgnu_arm/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/include/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/include/arch/arm/"/>
<listOptionValue builtIn="false" value="${SYSTEM_HOME}/os/include/arch/arm/tool-csgnu_arm/"/>
</option>
<option id="mentor.gnu.c.compiler.option.include.paths.378624521" name="Include paths (-I)" superClass="mentor.gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../../../"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
</option>
<option id="mentor.gnu.c.compiler.option.preprocessor.def.symbols.377672412" name="Defined symbols (-D)" superClass="mentor.gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.mentor.c.compiler.nucleus.input.390280819" superClass="cdt.managedbuild.tool.gnu.mentor.c.compiler.nucleus.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.mentor.c.linker.nucleus.1383453309" name="CodeSourcery GNU C Linker" superClass="cdt.managedbuild.tool.gnu.mentor.c.linker.nucleus"/>
<tool id="cdt.managedbuild.tool.gnu.mentor.cpp.linker.nucleus.543421555" name="CodeSourcery GNU C++ Linker" superClass="cdt.managedbuild.tool.gnu.mentor.cpp.linker.nucleus"/>
<tool id="cdt.managedbuild.tool.gnu.mentor.assembler.nucleus.115889274" name="CodeSourcery GNU Assembler" superClass="cdt.managedbuild.tool.gnu.mentor.assembler.nucleus">
<option id="gnu.both.asm.option.debugging.level.886431226" name="Debug Level" superClass="gnu.both.asm.option.debugging.level" value="gnu.both.asm.debugging.level.none" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.419671347" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="com.mentor.embedded.toolchains.core.nucleus.exportgen.process.278067994" name="Nucleus Exports Generator" superClass="com.mentor.embedded.toolchains.core.nucleus.exportgen.process"/>
<tool id="com.mentor.embedded.toolchains.core.nucleus.exportgen.application.1699281427" name="Nucleus Exports Generator" superClass="com.mentor.embedded.toolchains.core.nucleus.exportgen.application"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="src/src/evp.c|src/src/aes_asm.S|src/benchmark|src/user-crypto|src/src/misc.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings">
<externalSettings containerId="system-project;" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier"/>
</storageModule>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="wolfcrypt.cdt.managedbuild.target.gnu.mentor.nucleus.lib.1763261605" name="Static Library" projectType="cdt.managedbuild.target.gnu.mentor.nucleus.lib"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mentor.nucleus.lib.release.1927475508;cdt.managedbuild.config.gnu.mentor.nucleus.lib.release.1927475508.;cdt.managedbuild.tool.gnu.mentor.c.compiler.nucleus.768508310;cdt.managedbuild.tool.gnu.mentor.c.compiler.nucleus.input.390280819">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.mentor.embedded.toolchains.core.nucleus.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mentor.nucleus.lib.debug.16169494;cdt.managedbuild.config.gnu.mentor.nucleus.lib.debug.16169494.;cdt.managedbuild.tool.gnu.mentor.c.compiler.nucleus.2014778929;cdt.managedbuild.tool.gnu.mentor.c.compiler.nucleus.input.923848555">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.mentor.embedded.toolchains.core.nucleus.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="com.mentor.embedded">
<project systemProject="system-project" version="2017.02.1"/>
</storageModule>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cproject>

33
IDE/CSBENCH/.project Normal file
View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>wolfcrypt</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
<linkedResources>
<link>
<name>src</name>
<type>2</type>
<locationURI>PARENT-2-PROJECT_LOC../wolfcrypt</locationURI>
</link>
</linkedResources>
</projectDescription>

8
IDE/CSBENCH/include.am Normal file
View File

@ -0,0 +1,8 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
EXTRA_DIST+= IDE/CSBENCH/.project
EXTRA_DIST+= IDE/CSBENCH/.cproject
EXTRA_DIST+= IDE/CSBENCH/user_settings.h

View File

@ -0,0 +1,22 @@
#ifndef WOLFSSL_CSBENCH_H
#define WOLFSSL_CSBENCH_H
/* wolfSSL settings */
#define WOLFCRYPT_ONLY
#define USE_FAST_MATH
#define TFM_TIMING_RESISTANT
#define WC_RSA_BLINDING
#define SINGLE_THREADED
#define HAVE_AESGCM
#define NO_ASN_TIME
#define HAVE_ECC
#define ECC_TIMING_RESISTANT
#define WOLFSSL_NUCLEUS
/* wolfSSH settings */
#define WOLFSSH_SFTP
//#define DEBUG_WOLFSSH
#endif

View File

@ -0,0 +1,643 @@
/* user_settings.h
*
* Copyright (C) 2006-2018 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/* Custom wolfSSL user settings for GCC ARM */
#ifndef WOLFSSL_USER_SETTINGS_H
#define WOLFSSL_USER_SETTINGS_H
#ifdef __cplusplus
extern "C" {
#endif
/* ------------------------------------------------------------------------- */
/* Platform */
/* ------------------------------------------------------------------------- */
#undef WOLFSSL_GENERAL_ALIGNMENT
#define WOLFSSL_GENERAL_ALIGNMENT 4
#undef SINGLE_THREADED
#define SINGLE_THREADED
#undef WOLFSSL_SMALL_STACK
#define WOLFSSL_SMALL_STACK
#undef WOLFSSL_USER_IO
#define WOLFSSL_USER_IO
/* ------------------------------------------------------------------------- */
/* Math Configuration */
/* ------------------------------------------------------------------------- */
#undef USE_FAST_MATH
#define USE_FAST_MATH
#undef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG 8
#undef USE_FAST_MATH
#if 1
#define USE_FAST_MATH
#undef TFM_TIMING_RESISTANT
#define TFM_TIMING_RESISTANT
/* Optimizations */
//#define TFM_ARM
#endif
/* Wolf Single Precision Math */
#undef WOLFSSL_SP
#if 0
#define WOLFSSL_SP
#define WOLFSSL_SP_SMALL
#define WOLFSSL_HAVE_SP_RSA
#define WOLFSSL_HAVE_SP_DH
#define WOLFSSL_HAVE_SP_ECC
#define WOLFSSL_SP_CACHE_RESISTANT
//#define WOLFSSL_SP_MATH
/* 64 or 32 bit version */
//#define WOLFSSL_SP_ARM32_ASM
//#define WOLFSSL_SP_ARM64_ASM
#endif
/* ------------------------------------------------------------------------- */
/* FIPS - Requires eval or license from wolfSSL */
/* ------------------------------------------------------------------------- */
#undef HAVE_FIPS
#if 0
#define HAVE_FIPS
#undef HAVE_FIPS_VERSION
#define HAVE_FIPS_VERSION 2
#ifdef SINGLE_THREADED
#undef NO_THREAD_LS
#define NO_THREAD_LS
#endif
#endif
/* ------------------------------------------------------------------------- */
/* Crypto */
/* ------------------------------------------------------------------------- */
/* RSA */
#undef NO_RSA
#if 1
#ifdef USE_FAST_MATH
/* Maximum math bits (Max RSA key bits * 2) */
#undef FP_MAX_BITS
#define FP_MAX_BITS 4096
#endif
/* half as much memory but twice as slow */
#undef RSA_LOW_MEM
//#define RSA_LOW_MEM
/* Enables blinding mode, to prevent timing attacks */
#if 1
#undef WC_RSA_BLINDING
#define WC_RSA_BLINDING
#else
#undef WC_NO_HARDEN
#define WC_NO_HARDEN
#endif
/* RSA PSS Support */
#if 0
#define WC_RSA_PSS
#endif
#if 0
#define WC_RSA_NO_PADDING
#endif
#else
#define NO_RSA
#endif
/* ECC */
#undef HAVE_ECC
#if 1
#define HAVE_ECC
/* Manually define enabled curves */
#undef ECC_USER_CURVES
#define ECC_USER_CURVES
#ifdef ECC_USER_CURVES
/* Manual Curve Selection */
//#define HAVE_ECC192
//#define HAVE_ECC224
#undef NO_ECC256
//#define HAVE_ECC384
//#define HAVE_ECC521
#endif
/* Fixed point cache (speeds repeated operations against same private key) */
#undef FP_ECC
//#define FP_ECC
#ifdef FP_ECC
/* Bits / Entries */
#undef FP_ENTRIES
#define FP_ENTRIES 2
#undef FP_LUT
#define FP_LUT 4
#endif
/* Optional ECC calculation method */
/* Note: doubles heap usage, but slightly faster */
#undef ECC_SHAMIR
#define ECC_SHAMIR
/* Reduces heap usage, but slower */
#undef ECC_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
/* Enable cofactor support */
#ifdef HAVE_FIPS
#undef HAVE_ECC_CDH
#define HAVE_ECC_CDH
#endif
/* Validate import */
#ifdef HAVE_FIPS
#undef WOLFSSL_VALIDATE_ECC_IMPORT
#define WOLFSSL_VALIDATE_ECC_IMPORT
#endif
/* Compressed Key Support */
#undef HAVE_COMP_KEY
//#define HAVE_COMP_KEY
/* Use alternate ECC size for ECC math */
#ifdef USE_FAST_MATH
#ifdef NO_RSA
/* Custom fastmath size if not using RSA */
/* MAX = ROUND32(ECC BITS 256) + SIZE_OF_MP_DIGIT(32) */
#undef FP_MAX_BITS
#define FP_MAX_BITS (256 + 32)
#else
#undef ALT_ECC_SIZE
#define ALT_ECC_SIZE
#endif
/* Speedups specific to curve */
#ifndef NO_ECC256
#undef TFM_ECC256
#define TFM_ECC256
#endif
#endif
#endif
/* DH */
#undef NO_DH
#if 1
/* Use table for DH instead of -lm (math) lib dependency */
#if 0
#define WOLFSSL_DH_CONST
#define HAVE_FFDHE_2048
#define HAVE_FFDHE_4096
//#define HAVE_FFDHE_6144
//#define HAVE_FFDHE_8192
#endif
#ifdef HAVE_FIPS
#define WOLFSSL_VALIDATE_FFC_IMPORT
#define HAVE_FFDHE_Q
#endif
#else
#define NO_DH
#endif
/* AES */
#undef NO_AES
#if 1
#undef HAVE_AES_CBC
#define HAVE_AES_CBC
#undef HAVE_AESGCM
#define HAVE_AESGCM
/* GCM Method: GCM_SMALL, GCM_WORD32 or GCM_TABLE */
#define GCM_SMALL
#undef WOLFSSL_AES_DIRECT
//#define WOLFSSL_AES_DIRECT
#undef HAVE_AES_ECB
//#define HAVE_AES_ECB
#undef WOLFSSL_AES_COUNTER
//#define WOLFSSL_AES_COUNTER
#undef HAVE_AESCCM
//#define HAVE_AESCCM
#else
#define NO_AES
#endif
/* DES3 */
#undef NO_DES3
#if 0
#else
#define NO_DES3
#endif
/* ChaCha20 / Poly1305 */
#undef HAVE_CHACHA
#undef HAVE_POLY1305
#if 0
#define HAVE_CHACHA
#define HAVE_POLY1305
/* Needed for Poly1305 */
#undef HAVE_ONE_TIME_AUTH
#define HAVE_ONE_TIME_AUTH
#endif
/* Ed25519 / Curve25519 */
#undef HAVE_CURVE25519
#undef HAVE_ED25519
#if 0
#define HAVE_CURVE25519
#define HAVE_ED25519 /* ED25519 Requires SHA512 */
/* Optionally use small math (less flash usage, but much slower) */
#if 1
#define CURVED25519_SMALL
#endif
#endif
/* ------------------------------------------------------------------------- */
/* Hashing */
/* ------------------------------------------------------------------------- */
/* Sha */
#undef NO_SHA
#if 1
/* 1k smaller, but 25% slower */
//#define USE_SLOW_SHA
#else
#define NO_SHA
#endif
/* Sha256 */
#undef NO_SHA256
#if 1
/* not unrolled - ~2k smaller and ~25% slower */
//#define USE_SLOW_SHA256
/* Sha224 */
#if 0
#define WOLFSSL_SHA224
#endif
#else
#define NO_SHA256
#endif
/* Sha512 */
#undef WOLFSSL_SHA512
#if 0
#define WOLFSSL_SHA512
/* Sha384 */
#undef WOLFSSL_SHA384
#if 0
#define WOLFSSL_SHA384
#endif
/* over twice as small, but 50% slower */
//#define USE_SLOW_SHA512
#endif
/* Sha3 */
#undef WOLFSSL_SHA3
#if 0
#define WOLFSSL_SHA3
#endif
/* MD5 */
#undef NO_MD5
#if 0
#else
#define NO_MD5
#endif
/* HKDF */
#undef HAVE_HKDF
#if 0
#define HAVE_HKDF
#endif
/* CMAC */
#undef WOLFSSL_CMAC
#if 0
#define WOLFSSL_CMAC
#endif
/* ------------------------------------------------------------------------- */
/* Benchmark / Test */
/* ------------------------------------------------------------------------- */
/* Use reduced benchmark / test sizes */
#undef BENCH_EMBEDDED
#define BENCH_EMBEDDED
#undef USE_CERT_BUFFERS_2048
#define USE_CERT_BUFFERS_2048
//#undef USE_CERT_BUFFERS_1024
//#define USE_CERT_BUFFERS_1024
#undef USE_CERT_BUFFERS_256
#define USE_CERT_BUFFERS_256
/* ------------------------------------------------------------------------- */
/* Debugging */
/* ------------------------------------------------------------------------- */
#undef DEBUG_WOLFSSL
#undef NO_ERROR_STRINGS
#if 0
#define DEBUG_WOLFSSL
#else
#if 0
#define NO_ERROR_STRINGS
#endif
#endif
/* ------------------------------------------------------------------------- */
/* Memory */
/* ------------------------------------------------------------------------- */
/* Override Memory API's */
#if 0
#undef XMALLOC_OVERRIDE
#define XMALLOC_OVERRIDE
/* prototypes for user heap override functions */
/* Note: Realloc only required for normal math */
#include <stddef.h> /* for size_t */
extern void *myMalloc(size_t n, void* heap, int type);
extern void myFree(void *p, void* heap, int type);
extern void *myRealloc(void *p, size_t n, void* heap, int type);
#define XMALLOC(n, h, t) myMalloc(n, h, t)
#define XFREE(p, h, t) myFree(p, h, t)
#define XREALLOC(p, n, h, t) myRealloc(p, n, h, t)
#endif
#if 0
/* Static memory requires fast math */
#define WOLFSSL_STATIC_MEMORY
/* Disable fallback malloc/free */
#define WOLFSSL_NO_MALLOC
#if 1
#define WOLFSSL_MALLOC_CHECK /* trap malloc failure */
#endif
#endif
/* Memory callbacks */
#if 0
#undef USE_WOLFSSL_MEMORY
#define USE_WOLFSSL_MEMORY
/* Use this to measure / print heap usage */
#if 1
#undef WOLFSSL_TRACK_MEMORY
#define WOLFSSL_TRACK_MEMORY
#undef WOLFSSL_DEBUG_MEMORY
#define WOLFSSL_DEBUG_MEMORY
#endif
#else
#ifndef WOLFSSL_STATIC_MEMORY
#define NO_WOLFSSL_MEMORY
/* Otherwise we will use stdlib malloc, free and realloc */
#endif
#endif
/* ------------------------------------------------------------------------- */
/* Port */
/* ------------------------------------------------------------------------- */
/* Override Current Time */
/* Allows custom "custom_time()" function to be used for benchmark */
#define WOLFSSL_USER_CURRTIME
#define WOLFSSL_GMTIME
#define USER_TICKS
extern unsigned long my_time(unsigned long* timer);
#define XTIME my_time
/* ------------------------------------------------------------------------- */
/* RNG */
/* ------------------------------------------------------------------------- */
/* Seed Source */
/* Size of returned HW RNG value */
#define CUSTOM_RAND_TYPE unsigned int
extern unsigned int my_rng_seed_gen(void);
#undef CUSTOM_RAND_GENERATE
#define CUSTOM_RAND_GENERATE my_rng_seed_gen
/* Choose RNG method */
#if 1
/* Use built-in P-RNG (SHA256 based) with HW RNG */
/* P-RNG + HW RNG (P-RNG is ~8K) */
#undef HAVE_HASHDRBG
#define HAVE_HASHDRBG
#else
#undef WC_NO_HASHDRBG
#define WC_NO_HASHDRBG
/* Bypass P-RNG and use only HW RNG */
extern int my_rng_gen_block(unsigned char* output, unsigned int sz);
#undef CUSTOM_RAND_GENERATE_BLOCK
#define CUSTOM_RAND_GENERATE_BLOCK my_rng_gen_block
#endif
/* ------------------------------------------------------------------------- */
/* Custom Standard Lib */
/* ------------------------------------------------------------------------- */
/* Allows override of all standard library functions */
#undef STRING_USER
#if 0
#define STRING_USER
#include <string.h>
#undef USE_WOLF_STRSEP
#define USE_WOLF_STRSEP
#define XSTRSEP(s1,d) wc_strsep((s1),(d))
#undef USE_WOLF_STRTOK
#define USE_WOLF_STRTOK
#define XSTRTOK(s1,d,ptr) wc_strtok((s1),(d),(ptr))
#define XSTRNSTR(s1,s2,n) mystrnstr((s1),(s2),(n))
#define XMEMCPY(d,s,l) memcpy((d),(s),(l))
#define XMEMSET(b,c,l) memset((b),(c),(l))
#define XMEMCMP(s1,s2,n) memcmp((s1),(s2),(n))
#define XMEMMOVE(d,s,l) memmove((d),(s),(l))
#define XSTRLEN(s1) strlen((s1))
#define XSTRNCPY(s1,s2,n) strncpy((s1),(s2),(n))
#define XSTRSTR(s1,s2) strstr((s1),(s2))
#define XSTRNCMP(s1,s2,n) strncmp((s1),(s2),(n))
#define XSTRNCAT(s1,s2,n) strncat((s1),(s2),(n))
#define XSTRNCASECMP(s1,s2,n) strncasecmp((s1),(s2),(n))
#define XSNPRINTF snprintf
#endif
/* ------------------------------------------------------------------------- */
/* Enable Features */
/* ------------------------------------------------------------------------- */
#undef WOLFSSL_TLS13
#if 0
#define WOLFSSL_TLS13
#endif
#undef WOLFSSL_KEY_GEN
#if 0
#define WOLFSSL_KEY_GEN
#endif
#if defined(HAVE_FIPS) && !defined(WOLFSSL_KEY_GEN)
#define WOLFSSL_OLD_PRIME_CHECK
#endif
#undef KEEP_PEER_CERT
//#define KEEP_PEER_CERT
#undef HAVE_COMP_KEY
//#define HAVE_COMP_KEY
#undef HAVE_TLS_EXTENSIONS
#define HAVE_TLS_EXTENSIONS
#undef HAVE_SUPPORTED_CURVES
#define HAVE_SUPPORTED_CURVES
#undef WOLFSSL_BASE64_ENCODE
#define WOLFSSL_BASE64_ENCODE
/* TLS Session Cache */
#if 0
#define SMALL_SESSION_CACHE
#else
#define NO_SESSION_CACHE
#endif
/* ------------------------------------------------------------------------- */
/* Disable Features */
/* ------------------------------------------------------------------------- */
#undef NO_WOLFSSL_SERVER
//#define NO_WOLFSSL_SERVER
#undef NO_WOLFSSL_CLIENT
//#define NO_WOLFSSL_CLIENT
#undef NO_CRYPT_TEST
//#define NO_CRYPT_TEST
#undef NO_CRYPT_BENCHMARK
//#define NO_CRYPT_BENCHMARK
#undef WOLFCRYPT_ONLY
//#define WOLFCRYPT_ONLY
/* In-lining of misc.c functions */
/* If defined, must include wolfcrypt/src/misc.c in build */
/* Slower, but about 1k smaller */
#undef NO_INLINE
//#define NO_INLINE
#undef NO_FILESYSTEM
#define NO_FILESYSTEM
#undef NO_WRITEV
#define NO_WRITEV
#undef NO_MAIN_DRIVER
#define NO_MAIN_DRIVER
#undef NO_DEV_RANDOM
#define NO_DEV_RANDOM
#undef NO_DSA
#define NO_DSA
#undef NO_RC4
#define NO_RC4
#undef NO_OLD_TLS
#define NO_OLD_TLS
#undef NO_HC128
#define NO_HC128
#undef NO_RABBIT
#define NO_RABBIT
#undef NO_PSK
#define NO_PSK
#undef NO_MD4
#define NO_MD4
#undef NO_PWDBASED
#define NO_PWDBASED
#undef NO_CODING
//#define NO_CODING
#undef NO_ASN_TIME
//#define NO_ASN_TIME
#undef NO_CERTS
//#define NO_CERTS
#undef NO_SIG_WRAPPER
//#define NO_SIG_WRAPPER
#ifdef __cplusplus
}
#endif
#endif /* WOLFSSL_USER_SETTINGS_H */

16
IDE/GCC-ARM/Makefile Normal file
View File

@ -0,0 +1,16 @@
BUILD_DIR = ./Build
all: WolfSSLStaticLib WolfCryptTest WolfCryptBench WolfSSLClient
WolfCryptTest:
$(MAKE) -f Makefile.test
WolfCryptBench:
$(MAKE) -f Makefile.bench
WolfSSLClient:
$(MAKE) -f Makefile.client
WolfSSLStaticLib:
$(MAKE) -f Makefile.static
clean:
rm -f $(BUILD_DIR)/*.elf $(BUILD_DIR)/*.hex $(BUILD_DIR)/*.map
rm -f $(BUILD_DIR)/*.o $(BUILD_DIR)/*.a $(BUILD_DIR)/*.sym $(BUILD_DIR)/*.disasm

View File

@ -0,0 +1,7 @@
# Project name
BIN = WolfCryptBench
SRC_C = ./Source/benchmark_main.c
all: build_hex
include Makefile.common

View File

@ -0,0 +1,7 @@
# Project name
BIN = WolfSSLClient
SRC_C = ./Source/tls_client.c
all: build_hex
include Makefile.common

213
IDE/GCC-ARM/Makefile.common Normal file
View File

@ -0,0 +1,213 @@
# Set to @ if you want to suppress command echo
CMD_ECHO =
# Important directories
BUILD_DIR = ./Build
# Toolchain location and prefix
#TOOLCHAIN =
TOOLCHAIN = /opt/gcc-arm-none-eabi/bin/arm-none-eabi-
# Tools selection
CC = $(TOOLCHAIN)gcc
AS = $(TOOLCHAIN)gcc
LD = $(TOOLCHAIN)gcc
AR = $(TOOLCHAIN)ar
NM = $(TOOLCHAIN)nm
OBJCOPY = $(TOOLCHAIN)objcopy
OBJDUMP = $(TOOLCHAIN)objdump
SIZE = $(TOOLCHAIN)size
# Includes
INC = -I./Header \
-I./Source \
-I../..
# Defines
DEF = -DWOLFSSL_USER_SETTINGS
# Architecture
ARCHFLAGS = -mcpu=cortex-m0 -mthumb -mabi=aapcs -DUSE_WOLF_ARM_STARTUP
#ARCHFLAGS = -mcpu=cortex-r5 -mthumb -mabi=aapcs
#ARCHFLAGS = -mcpu=cortex-a53 -mthumb -mabi=aapcs
# Compiler and linker flags
ASFLAGS = $(ARCHFLAGS)
CFLAGS = $(ARCHFLAGS) -std=gnu99 -Wall -Wno-cpp
LDFLAGS = $(ARCHFLAGS)
# LD: Link with nosys
LDFLAGS += --specs=nosys.specs
# LD: Link with nano or rdimon implementation for standard library
LDFLAGS += --specs=nano.specs
#LDFLAGS += --specs=rdimon.specs
# LD: generate map
LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(BIN).map
# LD: Entry point
LDFLAGS += -Wl,-ereset_handler
# Math lib (for DH)
LIBS = -lm
# Memory Map
SRC_LD = -T./linker.ld
# Optimization level and place functions / data into separate sections to allow dead code removal
CFLAGS += -Os -ffunction-sections -fdata-sections -fno-builtin
# Remove unused sections and link time optimizations
LDFLAGS += -Wl,--gc-sections -flto
# Debugging
#DBGFLAGS = -ggdb -g3
CFLAGS += $(DBGFLAGS)
LDFLAGS += $(DBGFLAGS)
# FILES
# Port and Test/Benchmark
SRC_C += ./Source/wolf_main.c
SRC_C += ./Source/armtarget.c
SRC_C += ../../wolfcrypt/test/test.c
SRC_C += ../../wolfcrypt/benchmark/benchmark.c
# WOLFSSL TLS FILES
SRC_C += ../../src/crl.c
SRC_C += ../../src/internal.c
SRC_C += ../../src/keys.c
SRC_C += ../../src/ocsp.c
SRC_C += ../../src/sniffer.c
SRC_C += ../../src/ssl.c
SRC_C += ../../src/tls.c
SRC_C += ../../src/tls13.c
SRC_C += ../../src/wolfio.c
# wolfCrypt Core (FIPS)
SRC_C += ../../wolfcrypt/src/wolfcrypt_first.c
SRC_C += ../../wolfcrypt/src/aes.c
SRC_C += ../../wolfcrypt/src/cmac.c
SRC_C += ../../wolfcrypt/src/des3.c
SRC_C += ../../wolfcrypt/src/dh.c
SRC_C += ../../wolfcrypt/src/ecc.c
SRC_C += ../../wolfcrypt/src/hmac.c
SRC_C += ../../wolfcrypt/src/random.c
SRC_C += ../../wolfcrypt/src/rsa.c
SRC_C += ../../wolfcrypt/src/sha.c
SRC_C += ../../wolfcrypt/src/sha256.c
SRC_C += ../../wolfcrypt/src/sha512.c
SRC_C += ../../wolfcrypt/src/sha3.c
SRC_C += ../../wolfcrypt/src/fips.c
SRC_C += ../../wolfcrypt/src/fips_test.c
SRC_C += ../../wolfcrypt/src/wolfcrypt_last.c
# wolfCrypt Additional
SRC_C += ../../wolfcrypt/src/asn.c
SRC_C += ../../wolfcrypt/src/chacha.c
SRC_C += ../../wolfcrypt/src/cmac.c
SRC_C += ../../wolfcrypt/src/coding.c
SRC_C += ../../wolfcrypt/src/compress.c
SRC_C += ../../wolfcrypt/src/cpuid.c
SRC_C += ../../wolfcrypt/src/cryptodev.c
SRC_C += ../../wolfcrypt/src/curve25519.c
SRC_C += ../../wolfcrypt/src/ed25519.c
SRC_C += ../../wolfcrypt/src/error.c
SRC_C += ../../wolfcrypt/src/fe_low_mem.c
SRC_C += ../../wolfcrypt/src/fe_operations.c
SRC_C += ../../wolfcrypt/src/ge_low_mem.c
SRC_C += ../../wolfcrypt/src/ge_operations.c
SRC_C += ../../wolfcrypt/src/hash.c
SRC_C += ../../wolfcrypt/src/integer.c
SRC_C += ../../wolfcrypt/src/logging.c
SRC_C += ../../wolfcrypt/src/md5.c
SRC_C += ../../wolfcrypt/src/memory.c
SRC_C += ../../wolfcrypt/src/misc.c
SRC_C += ../../wolfcrypt/src/pkcs12.c
SRC_C += ../../wolfcrypt/src/pkcs7.c
SRC_C += ../../wolfcrypt/src/poly1305.c
SRC_C += ../../wolfcrypt/src/pwdbased.c
SRC_C += ../../wolfcrypt/src/signature.c
SRC_C += ../../wolfcrypt/src/srp.c
SRC_C += ../../wolfcrypt/src/sp_arm32.c
SRC_C += ../../wolfcrypt/src/sp_arm64.c
SRC_C += ../../wolfcrypt/src/sp_c32.c
SRC_C += ../../wolfcrypt/src/sp_int.c
SRC_C += ../../wolfcrypt/src/tfm.c
SRC_C += ../../wolfcrypt/src/wc_encrypt.c
SRC_C += ../../wolfcrypt/src/wc_port.c
SRC_C += ../../wolfcrypt/src/wolfevent.c
SRC_C += ../../wolfcrypt/src/wolfmath.c
# wolfCrypt non-standard algorithms (disabled by default)
SRC_C += ../../wolfcrypt/src/arc4.c
SRC_C += ../../wolfcrypt/src/blake2b.c
SRC_C += ../../wolfcrypt/src/camellia.c
SRC_C += ../../wolfcrypt/src/dsa.c
SRC_C += ../../wolfcrypt/src/hc128.c
SRC_C += ../../wolfcrypt/src/idea.c
SRC_C += ../../wolfcrypt/src/md2.c
SRC_C += ../../wolfcrypt/src/md4.c
SRC_C += ../../wolfcrypt/src/rabbit.c
SRC_C += ../../wolfcrypt/src/ripemd.c
FILENAMES_C = $(notdir $(SRC_C))
FILENAMES_C := $(filter-out evp.c, $(FILENAMES_C))
OBJS_C = $(addprefix $(BUILD_DIR)/, $(FILENAMES_C:.c=.o))
vpath %.c $(dir $(SRC_C))
build_hex: $(BUILD_DIR) $(BUILD_DIR)/$(BIN).hex
@echo ""
$(CMD_ECHO) @$(SIZE) $(BUILD_DIR)/$(BIN).elf
build_static: $(BUILD_DIR) $(BUILD_DIR)/$(BIN).a
@echo ""
$(CMD_ECHO) @$(SIZE) $(BUILD_DIR)/$(BIN).a
$(BUILD_DIR):
$(CMD_ECHO) mkdir -p $(BUILD_DIR)
$(BUILD_DIR)/$(BIN).hex: $(BUILD_DIR)/$(BIN).elf
@echo "Generating HEX binary: $(notdir $@)"
$(CMD_ECHO) $(OBJCOPY) -O ihex $< $@
$(BUILD_DIR)/%.o: %.s
@echo "Compiling ASM file: $(notdir $<)"
$(CMD_ECHO) $(AS) $(ASFLAGS) $(DEF) $(INC) -c -o $@ $<
$(BUILD_DIR)/%.o: %.c
@echo "Compiling C file: $(notdir $<)"
$(CMD_ECHO) $(CC) $(CFLAGS) $(DEF) $(INC) -c -o $@ $<
$(BUILD_DIR)/$(BIN).elf: $(OBJS_ASM) $(OBJS_C)
@echo "Linking ELF binary: $(notdir $@)"
$(CMD_ECHO) $(LD) $(LDFLAGS) $(SRC_LD) -o $@ $^ $(LIBS)
@echo "Generating name list: $(BIN).sym"
$(CMD_ECHO) $(NM) -n $@ > $(BUILD_DIR)/$(BIN).sym
@echo "Showing final size:"
$(CMD_ECHO) ls -la $@
@echo "Generating disassembly: $(BIN).disasm"
$(CMD_ECHO) $(OBJDUMP) -S $@ > $(BUILD_DIR)/$(BIN).disasm
$(BUILD_DIR)/$(BIN).a: $(OBJS_ASM) $(OBJS_C)
@echo "Building static library: $(notdir $@)"
$(CMD_ECHO) $(AR) -r $@ $^
@echo "Generating name list: $(BIN).sym"
$(CMD_ECHO) $(NM) -n $@ > $(BUILD_DIR)/$(BIN).sym
@echo "Showing final size:"
$(CMD_ECHO) ls -la $@
@echo "Generating disassembly: $(BIN).disasm"
$(CMD_ECHO) $(OBJDUMP) -S $@ > $(BUILD_DIR)/$(BIN).disasm
clean:
rm -f $(BUILD_DIR)/*.elf $(BUILD_DIR)/*.hex $(BUILD_DIR)/*.map
rm -f $(BUILD_DIR)/*.o $(BUILD_DIR)/*.a $(BUILD_DIR)/*.sym $(BUILD_DIR)/*.disasm

View File

@ -0,0 +1,6 @@
# Project name
BIN = libwolfssl
all: build_static
include Makefile.common

View File

@ -0,0 +1,7 @@
# Project name
BIN = WolfCryptTest
SRC_C = ./Source/test_main.c
all: build_hex
include Makefile.common

125
IDE/GCC-ARM/README.md Normal file
View File

@ -0,0 +1,125 @@
# Example Project for GCC ARM
This example is for Cortex M series, but can be adopted for other architectures.
## Design
* All library options are defined in `Header/user_settings.h`.
* The memory map is located in the linker file in `linker.ld`.
* Entry point function is `reset_handler` in `armtarget.c`.
* The RTC and RNG hardware interface needs implemented for real production applications in `armtarget.c`
## Building
1. Make sure you have `gcc-arm-none-eabi` installed.
2. Modify the `Makefile.common`:
* Use correct toolchain path `TOOLCHAIN`.
* Use correct architecture 'ARCHFLAGS'. See [GCC ARM Options](https://gcc.gnu.org/onlinedocs/gcc-4.7.3/gcc/ARM-Options.html) `-mcpu=name`.
* Confirm memory map in linker.ld matches your flash/ram or comment out `SRC_LD = -T./linker.ld` in Makefile.common.
3. Use `make` to build the static library (libwolfssl.a), wolfCrypt test/benchmark and wolfSSL TLS client targets as `.elf` and `.hex` in `/Build`.
## Building for Raspberry Pi
Example `Makefile.common` changes for Raspberry Pi with Cortex-A53:
1. In Makefile.common change `ARCHFLAGS` to `-mcpu=cortex-a53 -mthumb`.
2. Comment out `SRC_LD`, since custom memory map is not applicable.
3. Clear `TOOLCHAIN`, so it will use default `gcc`. Set `TOOLCHAIN = `
4. Comment out `LDFLAGS += --specs=nano.specs` and `LDFLAGS += --specs=nosys.specs` to nosys and nano.
Note: To comment out a line in a Makefile use place `#` in front of line.
## Building for FIPS
1. Request evaluation from wolfSSL by emailing fips@wolfss.com.
2. Modify user_settings.h so section for `HAVE_FIPS` is enabled.
3. Use `make`.
4. Run the wolfCrypt test `./Build/WolfCryptTest.elf` to generate the FIPS boundary HASH
Example:
```
$ Crypt Test
error test passed!
base64 test passed!
base16 test passed!
asn test passed!
in my Fips callback, ok = 0, err = -203
message = In Core Integrity check FIPS error
hash = F607C7B983D1D283590448A56381DE460F1E83CB02584F4D77B7F2C583A8F5CD
In core integrity hash check failure, copy above hash
into verifyCore[] in fips_test.c and rebuild
SHA test failed!
error = -1802
Crypt Test: Return code -1
```
5. Update the `../../wolfcrypt/src/fips_test.c` array `static const char verifyCore[] = {}` with the correct core hash check.
6. Build again using `make`.
7. Run the wolfCrypt test.
## Building with configure
The configure script in the main project directory can perform a cross-compile
build with the the gcc-arm-none-eabi tools. Assuming the tools are installed in
your executable path:
```
$ ./configure \
--host=arm-non-eabi \
CC=arm-none-eabi-gcc \
AR=arm-none-eabi-ar \
STRIP=arm-none-eabi-strip \
RANLIB=arm-none-eabi-ranlib \
--prefix=/path/to/build/wolfssl-arm \
CFLAGS="-march=armv8-a --specs=nosys.specs \
-DHAVE_PK_CALLBACKS -DWOLFSSL_USER_IO -DNO_WRITEV" \
--disable-filesystem --enable-fastmath \
--disable-shared
$ make
$ make install
```
If you are building for a 32-bit architecture, add `-DTIME_T_NOT_LONG` to the
list of CFLAGS.
## Example Build Output
```
make clean && make
text data bss dec hex filename
50076 2508 44 52628 cd94 ./Build/WolfCryptTest.elf
text data bss dec hex filename
39155 2508 60 41723 a2fb ./Build/WolfCryptBench.elf
text data bss dec hex filename
70368 464 36 70868 114d4 ./Build/WolfSSLClient.elf
```
## Performance Tuning Options
These settings are located in `Header/user_settings.h`.
* `DEBUG_WOLFSSL`: Undefine this to disable debug logging.
* `NO_ERROR_STRINGS`: Disables error strings to save code space.
* `NO_INLINE`: Disabling inline function saves about 1KB, but is slower.
* `WOLFSSL_SMALL_STACK`: Enables stack reduction techniques to allocate stack sections over 100 bytes from heap.
* `USE_FAST_MATH`: Uses stack based math, which is faster than the heap based math.
* `ALT_ECC_SIZE`: If using fast math and RSA/DH you can define this to reduce your ECC memory consumption.
* `FP_MAX_BITS`: Is the maximum math size (key size * 2). Used only with `USE_FAST_MATH`.
* `ECC_TIMING_RESISTANT`: Enables timing resistance for ECC and uses slightly less memory.
* `ECC_SHAMIR`: Doubles heap usage, but slightly faster
* `RSA_LOW_MEM`: Half as much memory but twice as slow. Uses Non-CRT method for private key.
* AES GCM: `GCM_SMALL`, `GCM_WORD32` or `GCM_TABLE`: Tunes performance and flash/memory usage.
* `CURVED25519_SMALL`: Enables small versions of Ed/Curve (FE/GE math).
* `USE_SLOW_SHA`: Enables smaller/slower version of SHA.
* `USE_SLOW_SHA256`: About 2k smaller and about 25% slower
* `USE_SLOW_SHA512`: Over twice as small, but 50% slower
* `USE_CERT_BUFFERS_1024` or `USE_CERT_BUFFERS_2048`: Size of RSA certs / keys to test with.
* `BENCH_EMBEDDED`: Define this if using the wolfCrypt test/benchmark and using a low memory target.
* `ECC_USER_CURVES`: Allows user to defines curve sizes to enable. Default is 256-bit on. To enable others use `HAVE_ECC192`, `HAVE_ECC224`, etc....
* `TFM_ARM`, `TFM_SSE2`, `TFM_AVR32`, `TFM_PPC32`, `TFM_MIPS`, `TFM_X86` or `TFM_X86_64`: These are assembly optimizations available with USE_FAST_MATH.
* Single Precision Math for ARM: See `WOLFSSL_SP`. Optimized math for ARM performance of specific RSA, DH and ECC algorithms.

View File

@ -0,0 +1,210 @@
/* armtarget.c
*
* Copyright (C) 2006-2018 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/ssl.h>
#include <wolfssl/wolfcrypt/random.h> /* for CUSTOM_RAND_TYPE */
#include <stdint.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#ifdef USE_WOLF_ARM_STARTUP
/* Memory initialization */
extern uint32_t __data_load_start__[];
extern uint32_t __data_start__[];
extern uint32_t __data_end__[];
extern uint32_t __bss_start__[];
extern uint32_t __bss_end__[];
extern uint32_t __stack_process_end__[];
extern uint32_t __heap_start__[];
extern uint32_t __heap_end__[];
/* Copy memory: src=Source, dst_beg=Destination Begin, dst_end=Destination End */
void memcpy32(uint32_t* src, uint32_t* dst_beg, uint32_t* dst_end)
{
while (dst_beg < dst_end) {
*dst_beg++ = *src++;
}
}
/* Zero address in range */
void meminit32(uint32_t* start, uint32_t* end)
{
while (start < end) {
*start++ = 0;
}
}
#endif /* USE_WOLF_ARM_STARTUP */
/* Entry Point */
void reset_handler(void)
{
#ifdef USE_WOLF_ARM_STARTUP
/* Init sections */
memcpy32(__data_load_start__, __data_start__, __data_end__);
meminit32(__bss_start__, __bss_end__);
/* Init heap */
__heap_start__[0] = 0;
__heap_start__[1] = ((uint32_t)__heap_end__ - (uint32_t)__heap_start__);
#endif /* USE_WOLF_ARM_STARTUP */
/* Start main */
extern int main(void);
main();
/* Application has ended, so busy wait */
while(1);
}
#ifdef USE_WOLF_ARM_STARTUP
// Vector Exception/Interrupt Handlers
static void Default_Handler(void)
{
/* If we get here then need to implement real IRQ handler */
while(1);
}
__attribute__((section(".sys"))) __attribute__ ((used))
void HardFault_HandlerC( uint32_t *hardfault_args )
{
/* These are volatile to try and prevent the compiler/linker optimizing them
away as the variables never actually get used. If the debugger won't show the
values of the variables, make them global my moving their declaration outside
of this function. */
volatile uint32_t stacked_r0;
volatile uint32_t stacked_r1;
volatile uint32_t stacked_r2;
volatile uint32_t stacked_r3;
volatile uint32_t stacked_r12;
volatile uint32_t stacked_lr;
volatile uint32_t stacked_pc;
volatile uint32_t stacked_psr;
volatile uint32_t _CFSR;
volatile uint32_t _HFSR;
volatile uint32_t _DFSR;
volatile uint32_t _AFSR;
volatile uint32_t _BFAR;
volatile uint32_t _MMAR;
stacked_r0 = ((uint32_t)hardfault_args[0]);
stacked_r1 = ((uint32_t)hardfault_args[1]);
stacked_r2 = ((uint32_t)hardfault_args[2]);
stacked_r3 = ((uint32_t)hardfault_args[3]);
stacked_r12 = ((uint32_t)hardfault_args[4]);
stacked_lr = ((uint32_t)hardfault_args[5]);
stacked_pc = ((uint32_t)hardfault_args[6]);
stacked_psr = ((uint32_t)hardfault_args[7]);
// Configurable Fault Status Register
// Consists of MMSR, BFSR and UFSR
_CFSR = (*((volatile uint32_t *)(0xE000ED28)));
// Hard Fault Status Register
_HFSR = (*((volatile uint32_t *)(0xE000ED2C)));
// Debug Fault Status Register
_DFSR = (*((volatile uint32_t *)(0xE000ED30)));
// Auxiliary Fault Status Register
_AFSR = (*((volatile uint32_t *)(0xE000ED3C)));
// Read the Fault Address Registers. These may not contain valid values.
// Check BFARVALID/MMARVALID to see if they are valid values
// MemManage Fault Address Register
_MMAR = (*((volatile uint32_t *)(0xE000ED34)));
// Bus Fault Address Register
_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);
// Break into the debugger
__asm("BKPT #0\n");
}
__attribute__((section(".sys"))) __attribute__( ( naked ) )
void HardFault_Handler(void)
{
__asm volatile
(
" movs r0,#4 \n" /* load bit mask into R0 */
" mov r1, lr \n" /* load link register into R1 */
" tst r0, r1 \n" /* compare with bitmask */
" beq _MSP \n" /* if bitmask is set: stack pointer is in PSP. Otherwise in MSP */
" mrs r0, psp \n" /* otherwise: stack pointer is in PSP */
" b _GetPC \n" /* go to part which loads the PC */
"_MSP: \n" /* stack pointer is in MSP register */
" mrs r0, msp \n" /* load stack pointer into R0 */
"_GetPC: \n" /* find out where the hard fault happened */
" ldr r1,[r0,#20] \n" /* load program counter into R1. R1 contains address of the next instruction where the hard fault happened */
" ldr r2, =HardFault_HandlerC \n"
" bx r2 \n"
" bx lr \n" /* decode more information. R0 contains pointer to stack frame */
);
}
/* Vectors Table */
typedef void (*vector_entry)(void);
const vector_entry vectors[] __attribute__ ((section(".vectors"),used)) =
{
/* Interrupt Vector Table Function Pointers */
// Address Vector IRQ Source module Source description
(vector_entry)__stack_process_end__, // ARM core Initial Supervisor SP
reset_handler, // 0x0000_0004 1 - ARM core Initial Program Counter
Default_Handler, // 0x0000_0008 2 - ARM core Non-maskable Interrupt (NMI)
HardFault_Handler, // 0x0000_000C 3 - ARM core Hard Fault
Default_Handler, // 0x0000_0010 4 -
HardFault_Handler, // 0x0000_0014 5 - ARM core Bus Fault
HardFault_Handler, // 0x0000_0018 6 - ARM core Usage Fault
Default_Handler, // 0x0000_001C 7 -
Default_Handler, // 0x0000_0020 8 -
Default_Handler, // 0x0000_0024 9 -
Default_Handler, // 0x0000_0028 10 -
Default_Handler, // 0x0000_002C 11 - ARM core Supervisor call (SVCall)
Default_Handler, // 0x0000_0030 12 - ARM core Debug Monitor
Default_Handler, // 0x0000_0034 13 -
Default_Handler, // 0x0000_0038 14 - ARM core Pendable request for system service (PendableSrvReq)
Default_Handler, // 0x0000_003C 15 - ARM core System tick timer (SysTick)
/* remainder go below */
};
#endif /* USE_WOLF_ARM_STARTUP */

View File

@ -0,0 +1,54 @@
/* benchmark_main.c
*
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#include <wolfssl/wolfcrypt/logging.h>
#include <wolfcrypt/benchmark/benchmark.h>
#include <stdio.h>
#ifndef NO_CRYPT_BENCHMARK
typedef struct func_args {
int argc;
char** argv;
int return_code;
} func_args;
static func_args args = { 0 } ;
#endif
int main(void)
{
int ret;
#ifndef NO_CRYPT_BENCHMARK
wolfCrypt_Init();
printf("\nBenchmark Test\n");
benchmark_test(&args);
ret = args.return_code;
printf("Benchmark Test: Return code %d\n", ret);
wolfCrypt_Cleanup();
#else
ret = NOT_COMPILED_IN;
#endif
return ret;
}

View File

@ -0,0 +1,55 @@
/* test_main.c
*
* Copyright (C) 2006-2017 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/logging.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#include <wolfcrypt/test/test.h>
#include <stdio.h>
#ifndef NO_CRYPT_TEST
typedef struct func_args {
int argc;
char** argv;
int return_code;
} func_args;
static func_args args = { 0 } ;
#endif
int main(void)
{
int ret;
#ifndef NO_CRYPT_TEST
wolfCrypt_Init();
printf("\nCrypt Test\n");
wolfcrypt_test(&args);
ret = args.return_code;
printf("Crypt Test: Return code %d\n", ret);
wolfCrypt_Cleanup();
#else
ret = NOT_COMPILED_IN;
#endif
return ret;
}

View File

@ -0,0 +1,207 @@
/* tls_client.c
*
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#ifndef WOLFCRYPT_ONLY
#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/logging.h>
#include <stdio.h>
#define MAXSZ 1024
/*------------------------------------------------------------------------*/
/* TLS CLIENT */
/*------------------------------------------------------------------------*/
static int CbIORecv(WOLFSSL *ssl, char *buf, int sz, void *ctx)
{
int ret = WOLFSSL_CBIO_ERR_GENERAL;
(void)ssl;
(void)ctx;
/* TODO: Exchange data over your own transport */
#warning TODO: Implement your own recv data transport
#if 0
ret = usart_read_buffer_wait(&cdc_uart_module, buf, sz);
if (ret == STATUS_ERR_TIMEOUT)
return WOLFSSL_CBIO_ERR_WANT_READ;
return (ret == STATUS_OK) ? sz : WOLFSSL_CBIO_ERR_GENERAL;
#else
return ret;
#endif
}
static int CbIOSend(WOLFSSL *ssl, char *buf, int sz, void *ctx)
{
int ret = WOLFSSL_CBIO_ERR_GENERAL;
(void)ssl;
(void)ctx;
/* TODO: Exchange data over your own transport */
#warning TODO: Implement your own send data transport
#if 0
ret = usart_write_buffer_wait(&cdc_uart_module, buf, sz);
if (ret == STATUS_ERR_TIMEOUT)
return WOLFSSL_CBIO_ERR_WANT_WRITE;
return (ret == STATUS_OK) ? sz : WOLFSSL_CBIO_ERR_GENERAL;
#else
return ret;
#endif
}
static int tls_client(void)
{
char msg[] = "Hello WolfSSL!\r\n";
char reply[MAXSZ];
int ret, msgSz, error;
WOLFSSL* ssl = NULL;
WOLFSSL_CTX* ctx = NULL;
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) {
printf("CTXnew failed.\n");
goto fail;
}
/*------------------------------------------------------------------------*/
/* ECDHE-ECDSA */
/*------------------------------------------------------------------------*/
/*--------------------*/
/* for peer auth use: */
/*--------------------*/
// wolfSSL_CTX_load_verify_buffer(ctx, rsa_key_der_1024,
// sizeof_rsa_key_der_1024, SSL_FILETYPE_ASN1);
// wolfSSL_CTX_load_verify_buffer(ctx, server_cert_der_1024,
// sizeof_server_cert_der_1024, SSL_FILETYPE_ASN1);
/*---------------------*/
/* for no peer auth: */
/*---------------------*/
wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
/*---------------------*/
/* end peer auth option*/
/*---------------------*/
if ((ret = wolfSSL_CTX_set_cipher_list(ctx, "ECDHE-ECDSA-AES128-SHA256")) != SSL_SUCCESS) {
wolfSSL_CTX_free(ctx);
printf("CTXset_cipher_list failed, error: %d\n", ret);
goto fail;
}
/*------------------------------------------------------------------------*/
/* END CIPHER SUITE OPTIONS */
/*------------------------------------------------------------------------*/
wolfSSL_CTX_SetIORecv(ctx, CbIORecv);
wolfSSL_CTX_SetIOSend(ctx, CbIOSend);
if ((ssl = wolfSSL_new(ctx)) == NULL) {
error = wolfSSL_get_error(ssl, 0);
printf("wolfSSL_new failed %d\n", error);
wolfSSL_CTX_free(ctx);
return -1;
}
/* non blocking accept and connect */
ret = SSL_FAILURE;
while (ret != SSL_SUCCESS) {
/* client connect */
ret = wolfSSL_connect(ssl);
error = wolfSSL_get_error(ssl, 0);
if (ret != SSL_SUCCESS) {
if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE) {
/* Fail */
printf("wolfSSL connect failed with return code %d\n", error);
goto fail;
}
}
/* Success */
}
/* read and write */
while (1) {
/* client send/read */
msgSz = sizeof(msg);
ret = wolfSSL_write(ssl, msg, msgSz);
error = wolfSSL_get_error(ssl, 0);
if (ret != msgSz) {
if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE) {
/* Write failed */
goto fail;
}
}
/* Write succeeded */
break;
}
while (1) {
ret = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
error = wolfSSL_get_error(ssl, 0);
if (ret < 0) {
if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE) {
/* Can put print here, the server enters a loop waiting to read
* a confirmation message at this point */
// printf("client read failed\n");
goto fail;
}
continue;
}
else {
/* Can put print here, the server enters a loop waiting to read
* a confirmation message at this point */
reply[ret] = '\0';
// printf("Client Received Reply: %s\n", reply);
break;
}
}
return 0;
fail:
wolfSSL_shutdown(ssl);
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
return -1;
}
#endif
int main(void)
{
int ret;
#ifndef WOLFCRYPT_ONLY
wolfSSL_Init();
ret = tls_client();
wolfSSL_Cleanup();
#else
ret = NOT_COMPILED_IN;
#endif
return ret;
}

View File

@ -0,0 +1,142 @@
/* wolf_main.c
*
* Copyright (C) 2006-2018 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/random.h> /* for CUSTOM_RAND_TYPE */
#include <stdint.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
/* TIME CODE */
/* TODO: Implement real RTC */
/* Optionally you can define NO_ASN_TIME to disable all cert time checks */
static int gTimeMs;
static int hw_get_time_sec(void)
{
#warning Must implement your own time source if validating certificates
return ++gTimeMs;
}
/* This is used by wolfCrypt asn.c for cert time checking */
unsigned long my_time(unsigned long* timer)
{
(void)timer;
return hw_get_time_sec();
}
#ifndef WOLFCRYPT_ONLY
/* This is used by TLS only */
unsigned int LowResTimer(void)
{
return hw_get_time_sec();
}
#endif
#ifndef NO_CRYPT_BENCHMARK
/* This is used by wolfCrypt benchmark tool only */
double current_time(int reset)
{
double time;
int timeMs = gTimeMs;
(void)reset;
time = (timeMs / 1000); // sec
time += (double)(timeMs % 1000) / 1000; // ms
return time;
}
#endif
/* RNG CODE */
/* TODO: Implement real RNG */
static unsigned int gCounter;
unsigned int hw_rand(void)
{
#warning Must implement your own random source
return ++gCounter;
}
unsigned int my_rng_seed_gen(void)
{
return hw_rand();
}
int my_rng_gen_block(unsigned char* output, unsigned int sz)
{
uint32_t i = 0;
while (i < sz)
{
/* If not aligned or there is odd/remainder */
if( (i + sizeof(CUSTOM_RAND_TYPE)) > sz ||
((uint32_t)&output[i] % sizeof(CUSTOM_RAND_TYPE)) != 0
) {
/* Single byte at a time */
output[i++] = (unsigned char)my_rng_seed_gen();
}
else {
/* Use native 8, 16, 32 or 64 copy instruction */
*((CUSTOM_RAND_TYPE*)&output[i]) = my_rng_seed_gen();
i += sizeof(CUSTOM_RAND_TYPE);
}
}
return 0;
}
#ifdef XMALLOC_OVERRIDE
void *myMalloc(size_t n, void* heap, int type)
{
(void)n;
(void)heap;
(void)type;
#warning Must implement your own malloc
return NULL;
}
void myFree(void *p, void* heap, int type)
{
(void)p;
(void)heap;
(void)type;
#warning Must implement your own free
}
/* Required for normal math (!USE_FAST_MATH) */
void *myRealloc(void *p, size_t n, void* heap, int type)
{
(void)p;
(void)n;
(void)heap;
(void)type;
#warning Must implement your own realloc
return NULL;
}
#endif /* XMALLOC_OVERRIDE */

18
IDE/GCC-ARM/include.am Normal file
View File

@ -0,0 +1,18 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
EXTRA_DIST+= IDE/GCC-ARM/Header/user_settings.h
EXTRA_DIST+= IDE/GCC-ARM/Source/armtarget.c
EXTRA_DIST+= IDE/GCC-ARM/Source/wolf_main.c
EXTRA_DIST+= IDE/GCC-ARM/Source/benchmark_main.c
EXTRA_DIST+= IDE/GCC-ARM/Source/test_main.c
EXTRA_DIST+= IDE/GCC-ARM/Source/tls_client.c
EXTRA_DIST+= IDE/GCC-ARM/linker.ld
EXTRA_DIST+= IDE/GCC-ARM/Makefile
EXTRA_DIST+= IDE/GCC-ARM/Makefile.bench
EXTRA_DIST+= IDE/GCC-ARM/Makefile.client
EXTRA_DIST+= IDE/GCC-ARM/Makefile.common
EXTRA_DIST+= IDE/GCC-ARM/Makefile.test
EXTRA_DIST+= IDE/GCC-ARM/Makefile.static
EXTRA_DIST+= IDE/GCC-ARM/README.md

30
IDE/GCC-ARM/linker.ld Normal file
View File

@ -0,0 +1,30 @@
MEMORY
{
FLASH (wx) : ORIGIN = 0x00000000, LENGTH = 256K
RAM (wx) : ORIGIN = 0x20000000, LENGTH = 64K
}
SECTIONS
{
__vectors_start__ = .;
.vectors : { *(.vectors) } > FLASH
__vectors_end__ = __vectors_start__ + 0x400;
.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 = .;
}

View File

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.170735395">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.170735395" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<macros>
<stringMacro name="PROJECT_KSDK_PATH" type="VALUE_TEXT" value="~/Work/KSDK_1.3.0"/>
</macros>
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/wolfSSL_HW"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/wolfSSL_HW/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="wolfssl_hw" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.managedbuilder.core.ManagedBuildManager" point="org.eclipse.cdt.core.ScannerInfoProvider"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="wolfssl_hw" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.170735395" name="Debug" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug">
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.170735395." name="/" resourcePath="">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.955851768" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.1637878147" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.none" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.596937133" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.412948756" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.1412387181" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.1877241998" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.2038051180" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.max" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.1062002269" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.1592667634" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m4" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.1112951710" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.hard" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.1079530716" name="FPU Type" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.fpv4spd16" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.192917244" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="GNU Tools for ARM Embedded Processors" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.2108482930" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.500222702" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.175873499" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.1700937041" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" value="objcopy" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.1874549763" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.178137928" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.1274071175" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="make" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.655658023" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="rm" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.1937238341" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1476617138" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.1035232247" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto.8601271" name="Link-time optimizer (-flto)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.lto" value="false" valueType="boolean"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.817253425" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
<builder buildPath="${workspace_loc:/wolfSSL_HW}/Debug" id="ilg.gnuarmeclipse.managedbuild.cross.builder.2043375702" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1135882719" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.369489760" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1086496768" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1696761989" name="Cross ARM GNU C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.9643995" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.c99" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.349147702" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../../&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_KSDK_PATH}/platform/devices&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_KSDK_PATH}/platform/CMSIS/Include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_KSDK_PATH}/platform/devices/MK64F12/startup&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_KSDK_PATH}/platform/drivers/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_KSDK_PATH}/platform/hal/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_KSDK_PATH}/platform/osa/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${PROJECT_KSDK_PATH}/platform/utilities/inc&quot;"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1294205548" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
<listOptionValue builtIn="false" value="&quot;CPU_MK64FN1M0VMD12&quot;"/>
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.817994152" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.234608726" name="Cross ARM GNU C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.1452713629" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="false"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.497680378" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
<listOptionValue builtIn="false" value="&quot;CPU_MK64FN1M0VMD12&quot;"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.909966654" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.506002589" name="Cross ARM GNU C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.1489822225" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.575756954" name="Cross ARM GNU C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.11344634" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.paths.1878565771" name="Library search path (-L)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/Project_Settings/Linker_Files&quot;"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.1517060693" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value="-specs=nosys.specs -specs=nano.specs -Xlinker -z -Xlinker muldefs" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.468376236" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" valueType="stringList">
<listOptionValue builtIn="false" value="&quot;MK64FN1M0xxx12_flash.ld&quot;"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.955790366" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.1962941231" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.1365673947" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.790507756" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.1929510617" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.573901902" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.2051558160" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.851594065" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.1352373056" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.934998862" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.1738611770" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="wolfcrypt/src/integer.c|wolfcrypt/src/misc.c|src/bio.c|wolfcrypt/src/evp.c|wolfcrypt/src/aes_asm.s|wolfcrypt/src/aes_asm.asm|SDK|wolfssl/wolfcrypt/port|wolfcrypt/src/port|wolfcrypt/user-crypto" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="wolfSSL_HW.ilg.gnuarmeclipse.managedbuild.cross.target.elf.1053752509" name="Executable" projectType="ilg.gnuarmeclipse.managedbuild.cross.target.elf"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.170735395;ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.170735395.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.234608726;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.909966654">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.170735395;ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.170735395.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1696761989;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.817994152">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/wolfSSL_HW"/>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cproject>

View File

@ -0,0 +1,19 @@
Sources/main.c
Project_Settings/Linker_Files/MK64FN1M0xxx12_flash.ld
SDK/platform/CMSIS/Include/core_cmSimd.h
SDK/platform/devices/MK64F12/include/MK64F12.h
SDK/platform/CMSIS/Include/arm_common_tables.h
SDK/platform/CMSIS/Include/arm_const_structs.h
SDK/platform/devices/MK64F12/include/MK64F12_features.h
SDK/platform/CMSIS/Include/core_cm4.h
SDK/platform/CMSIS/Include/core_cmFunc.h
SDK/platform/CMSIS/Include/core_cmInstr.h
SDK/platform/devices/fsl_device_registers.h
SDK/platform/devices/MK64F12/include/fsl_bitaccess.h
SDK/platform/CMSIS/Include/arm_math.h
SDK/platform/devices/MK64F12/include/MK64F12_extension.h
Project_Settings/Startup_Code/startup.c
Project_Settings/Startup_Code/system_MK64F12.c
Project_Settings/Startup_Code/startup.h
Project_Settings/Startup_Code/startup_MK64F12.S
Project_Settings/Startup_Code/system_MK64F12.h

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>wolfSSL_HW</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
<linkedResources>
<link>
<name>src</name>
<type>2</type>
<locationURI>$%7BPARENT-3-PROJECT_LOC%7D/src</locationURI>
</link>
<link>
<name>wolfcrypt</name>
<type>2</type>
<locationURI>$%7BPARENT-3-PROJECT_LOC%7D/wolfcrypt</locationURI>
</link>
<link>
<name>wolfssl</name>
<type>2</type>
<locationURI>$%7BPARENT-3-PROJECT_LOC%7D/wolfssl</locationURI>
</link>
</linkedResources>
<variableList>
<variable>
<name>PROJECT_KSDK_PATH</name>
<value>file:/.KSDK_1.3.0</value>
</variable>
</variableList>
</projectDescription>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
versionGenerated/versionGenerated=1.0.0.RT7_b1550-0615

View File

@ -0,0 +1,6 @@
#define FREESCALE_KSDK_BM
#define FREESCALE_KSDK_1_3
#define FSL_HW_CRYPTO_MANUAL_SELECTION
#define NO_MAIN_DRIVER
#define USE_CERT_BUFFERS_1024
#define ECC_USER_CURVES

View File

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

View File

@ -1,6 +1,6 @@
/* current-time.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -53,7 +53,7 @@ void InitTimer(void) {
static int initFlag = false ;
double current_time(int reset)
{
{
if(!initFlag)InitTimer() ;
initFlag = true ;
if(reset)ROM_TimerLoadSet(TIMER0_BASE, TIMER_A, -1);
@ -62,6 +62,12 @@ double current_time(int reset)
#else
double current_time(int reset) { return 0.0 ; }
/* dummy */
double current_time(int reset) {
static double t;
t += 1.0; /* for avoid infinit loop of waiting time */
if(reset)t = 0.0;
return t ;
}
#endif

View File

@ -169,9 +169,7 @@
<option>
<name>CCDefines</name>
<state>ewarm</state>
<state>PART_TM4C129XNCZAD</state>
<state>WOLFSSL_USER_SETTINGS</state>
<state>TARGET_IS_SNOWFLAKE_RA0</state>
</option>
<option>
<name>CCPreprocFile</name>

View File

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

View File

@ -170,8 +170,6 @@
<name>CCDefines</name>
<state>WOLFSSL_USER_SETTINGS</state>
<state>ewarm</state>
<state>PART_TM4C129XNCZAD</state>
<state>TARGET_IS_SNOWFLAKE_RA0</state>
</option>
<option>
<name>CCPreprocFile</name>
@ -939,7 +937,7 @@
</option>
<option>
<name>IarchiveOutput</name>
<state>C:\ROOT\CyaSSL-Support\TI\Staging-20150522\wolfssl\IDE\IAR-EWARM\Projects\lib\ewarm\Exe\wolfSSL-Lib.a</state>
<state>$PROJ_DIR$\..\lib\ewarm\Exe\wolfSSL-Lib.a</state>
</option>
</data>
</settings>
@ -1926,12 +1924,18 @@
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\chacha20_poly1305.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\cmac.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\coding.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\compress.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\cpuid.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\curve25519.c</name>
</file>
@ -1977,6 +1981,9 @@
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\hmac.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\idea.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\integer.c</name>
</file>
@ -1996,7 +2003,7 @@
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\memory.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\misc.c</name>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\pkcs12.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\pkcs7.c</name>
@ -2025,9 +2032,30 @@
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sha256.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sha3.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sha512.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\signature.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sp_arm32.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sp_arm64.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sp_c32.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sp_c64.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\sp_int.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\srp.c</name>
</file>
@ -2040,6 +2068,12 @@
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\wc_port.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\wolfevent.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\src\wolfmath.c</name>
</file>
</group>
<group>
<name>wolfSSL</name>
@ -2049,9 +2083,6 @@
<file>
<name>$PROJ_DIR$\..\..\..\..\src\internal.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\src\io.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\src\keys.c</name>
</file>
@ -2067,6 +2098,12 @@
<file>
<name>$PROJ_DIR$\..\..\..\..\src\tls.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\src\tls13.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\src\wolfio.c</name>
</file>
</group>
</project>

View File

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

View File

@ -169,9 +169,7 @@
<option>
<name>CCDefines</name>
<state>ewarm</state>
<state>PART_TM4C129XNCZAD</state>
<state>WOLFSSL_USER_SETTINGS</state>
<state>TARGET_IS_SNOWFLAKE_RA0</state>
</option>
<option>
<name>CCPreprocFile</name>

View File

@ -1,14 +1,33 @@
#define NO_MAIN_DRIVER
#define BENCH_EMBEDDED
#define SINGLE_THREADED
#define NO_FILESYSTEM
#define NO_WRITEV
#define WOLFSSL_USER_IO
#define NO_DEV_RANDOM
#define USE_CERT_BUFFERS_2048
#define WOLFSSL_USER_CURRTIME
#define SIZEOF_LONG_LONG 8
#define NO_WOLFSSL_DIR
#define WOLFSSL_NO_CURRDIR
#define NO_WOLF_C99
#define CUSTOM_RAND_GENERATE custom_rand_generate
/* warning "write a real random seed!!!!, just for testing now" */
static int custom_rand_generate(void) { return 0 ; }
#define XVALIDATEDATE(d, f,t) (0)
#define WOLFSSL_USER_CURRTIME /* for benchmark */
#define WOLFSSL_GENSEED_FORTEST /* Warning: define your own seed gen */
#define TFM_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
#define WC_RSA_BLINDING
#define SINGLE_THREADED /* or define RTOS option */
/* #define WOLFSSL_CMSIS_RTOS */
#define NO_FILESYSTEM
/* #define NO_DH */
#define HAVE_AESGCM
#define WOLFSSL_SHA512
#define HAVE_ECC
#define HAVE_CURVE25519
#define CURVE25519_SMALL
#define HAVE_ED25519

158
IDE/INTIME-RTOS/README.md Normal file
View File

@ -0,0 +1,158 @@
# tenAsys INtime RTOS Port
## Overview
This port is for the tenAsys INtime RTOS available [here](http://www.tenasys.com/intime).
To enable use the define `INTIME_RTOS`.
## Usage
The wolfExamples.sln is a Visual Studio 2015 project. You must have the INtime SDK installed and an INtime RTOS agent running.
The default configuration is set inside the `IDE/INTIME-RTOS/user_settings.h` file.
The example application provides a simple menu interface to select difference application functions to test.
```
wolfExamples started
wolfExamples finished initialization
MENU
t. WolfCrypt Test
b. WolfCrypt Benchmark
c. WolfSSL Client Example
s. WolfSSL Server Example
l. WolfSSL Localhost Client/Server Example
Please select one of the above options:
```
### `t`wolfCrypt Test
Performs testing of all crypto algorithms.
```
Crypt Test
error test passed!
base64 test passed!
base64 test passed!
MD5 test passed!
SHA test passed!
SHA-256 test passed!
SHA-384 test passed!
SHA-512 test passed!
Hash test passed!
HMAC-MD5 test passed!
HMAC-SHA test passed!
HMAC-SHA256 test passed!
HMAC-SHA384 test passed!
HMAC-SHA512 test passed!
HMAC-KDF test passed!
X963-KDF test passed!
GMAC test passed!
Chacha test passed!
POLY1305 test passed!
ChaCha20-Poly1305 AEAD test passed!
DES test passed!
DES3 test passed!
AES test passed!
AES-GCM test passed!
AES-CCM test passed!
AES Key Wrap test passed!
RANDOM test passed!
RSA test passed!
DH test passed!
DSA test passed!
SRP test passed!
PWDBASED test passed!
openSSL extra test
OPENSSL test passed!
ECC test passed!
ECC Enc test passed!
ECC buffer test passed!
CURVE25519 test passed!
ED25519 test passed!
CMAC test passed!
PKCS7enveloped test passed!
PKCS7signed test passed!
PKCS7encrypted test passed!
mutex test passed!
memcb test passed!
Crypt Test: Return code 0
```
### `b` wolfCrypt Benchmark
Performs benchmark of crypto algorithms.
```
Benchmark Test
RNG 25 kB took 0.002 seconds, 11.017 MB/s
AES enc 25 kB took 0.002 seconds, 15.090 MB/s
AES dec 25 kB took 0.002 seconds, 15.119 MB/s
AES-GCM 25 kB took 0.003 seconds, 9.433 MB/s
AES-CTR 25 kB took 0.001 seconds, 22.378 MB/s
AES-CCM 25 kB took 0.002 seconds, 15.306 MB/s
CHACHA 25 kB took 0.002 seconds, 16.063 MB/s
CHA-POLY 25 kB took 0.001 seconds, 20.447 MB/s
3DES 25 kB took 0.002 seconds, 10.717 MB/s
MD5 25 kB took 0.00 seconds, 31.576 MB/s
POLY1305 25 kB took 0.000 seconds, 201.575 MB/s
SHA 25 kB took 0.00 seconds, 43.761 MB/s
SHA-256 25 kB took 0.001 seconds, 19.299 MB/s
SHA-384 25 kB took 0.002 seconds, 14.577 MB/s
SHA-512 25 kB took 0.001 seconds, 21.718 MB/s
AES-CMAC 25 kB took 0.00 seconds, 34.925 MB/s
RSA 2048 public 2.445 milliseconds, avg over 1 iterations
RSA 2048 private 64.711 milliseconds, avg over 1 iterations
RSA 1024 key generation 318.755 milliseconds, avg over 5 iterations
RSA 2048 key generation 22648.396 milliseconds, avg over 5 iterations
DH 2048 key generation 23.119 milliseconds, avg over 1 iterations
DH 2048 key agreement 26.756 milliseconds, avg over 1 iterations
ECC 256 key generation 2.984 milliseconds, avg over 5 iterations
EC-DHE key agreement 2.967 milliseconds, avg over 5 iterations
EC-DSA sign time 1.448 milliseconds, avg over 5 iterations
EC-DSA verify time 3.304 milliseconds, avg over 5 iterations
ECC encrypt 5.860 milliseconds, avg over 1 iterations
ECC decrypt 6.360 milliseconds, avg over 1 iterations
CURVE25519 256 key generation 1.416 milliseconds, avg over 5 iterations
CURVE25519 key agreement 1.332 milliseconds, avg over 5 iterations
ED25519 key generation 0.320 milliseconds, avg over 5 iterations
ED25519 sign time 0.595 milliseconds, avg over 5 iterations
ED25519 verify time 1.310 milliseconds, avg over 5 iterations
Benchmark Test: Return code 0
```
### `c` wolfSSL Client
To configure the host address and port modify the `TLS_HOST_REMOTE` and `TLS_PORT` macros at top of `wolfExamples.c`. This example uses TLS 1.2 to connect to a remote host.
### `s` wolfSSL Server
To configure the port to listen on modify `TLS_PORT` at top of `wolfExamples.c`.
### `l` wolfSSL Localhost Server/Client
Starts a TLS server thread listening on localhost. Starts the TLS client and performs connect, exchanges some data and disconnects.
```
Waiting for a connection...
Client connected successfully
Using Non-Blocking I/O: 0
Message for server: Client:
Received: I hear ya fa shizzle!
The client has closed the connection.
```
## References
For more information please contact info@wolfssl.com.

View File

@ -0,0 +1,13 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
EXTRA_DIST += \
IDE/INTIME-RTOS/README.md \
IDE/INTIME-RTOS/user_settings.h \
IDE/INTIME-RTOS/libwolfssl.c \
IDE/INTIME-RTOS/libwolfssl.vcxproj \
IDE/INTIME-RTOS/wolfExamples.c \
IDE/INTIME-RTOS/wolfExamples.h \
IDE/INTIME-RTOS/wolfExamples.vcxproj \
IDE/INTIME-RTOS/wolfExamples.sln

View File

@ -0,0 +1,20 @@
// libwolfssl.c
// Defines the entry point for the DLL application
#include <rt.h>
BOOLEAN __stdcall RslMain( RTHANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call) {
case RSL_PROCESS_ATTACH:
case RSL_THREAD_ATTACH:
case RSL_THREAD_DETACH:
case RSL_PROCESS_DETACH:
break;
}
return TRUE;
}

View File

@ -0,0 +1,215 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|INtime">
<Configuration>Debug</Configuration>
<Platform>INtime</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|INtime">
<Configuration>Release</Configuration>
<Platform>INtime</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<Text Include="README.md" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="libwolfssl.c" />
<ClCompile Include="..\..\src\crl.c" />
<ClCompile Include="..\..\src\internal.c" />
<ClCompile Include="..\..\src\wolfio.c" />
<ClCompile Include="..\..\src\keys.c" />
<ClCompile Include="..\..\src\ocsp.c" />
<ClCompile Include="..\..\src\sniffer.c" />
<ClCompile Include="..\..\src\ssl.c" />
<ClCompile Include="..\..\src\tls.c" />
<ClCompile Include="..\..\wolfcrypt\src\aes.c" />
<ClCompile Include="..\..\wolfcrypt\src\arc4.c" />
<ClCompile Include="..\..\wolfcrypt\src\asm.c" />
<ClCompile Include="..\..\wolfcrypt\src\asn.c" />
<ClCompile Include="..\..\wolfcrypt\src\blake2b.c" />
<ClCompile Include="..\..\wolfcrypt\src\camellia.c" />
<ClCompile Include="..\..\wolfcrypt\src\chacha.c" />
<ClCompile Include="..\..\wolfcrypt\src\chacha20_poly1305.c" />
<ClCompile Include="..\..\wolfcrypt\src\cmac.c" />
<ClCompile Include="..\..\wolfcrypt\src\coding.c" />
<ClCompile Include="..\..\wolfcrypt\src\compress.c" />
<ClCompile Include="..\..\wolfcrypt\src\curve25519.c" />
<ClCompile Include="..\..\wolfcrypt\src\des3.c" />
<ClCompile Include="..\..\wolfcrypt\src\dh.c" />
<ClCompile Include="..\..\wolfcrypt\src\dsa.c" />
<ClCompile Include="..\..\wolfcrypt\src\ecc.c" />
<ClCompile Include="..\..\wolfcrypt\src\ed25519.c" />
<ClCompile Include="..\..\wolfcrypt\src\error.c" />
<ClCompile Include="..\..\wolfcrypt\src\fe_low_mem.c" />
<ClCompile Include="..\..\wolfcrypt\src\fe_operations.c" />
<ClCompile Include="..\..\wolfcrypt\src\ge_low_mem.c" />
<ClCompile Include="..\..\wolfcrypt\src\ge_operations.c" />
<ClCompile Include="..\..\wolfcrypt\src\hash.c" />
<ClCompile Include="..\..\wolfcrypt\src\hc128.c" />
<ClCompile Include="..\..\wolfcrypt\src\hmac.c" />
<ClCompile Include="..\..\wolfcrypt\src\idea.c" />
<ClCompile Include="..\..\wolfcrypt\src\integer.c" />
<ClCompile Include="..\..\wolfcrypt\src\logging.c" />
<ClCompile Include="..\..\wolfcrypt\src\md2.c" />
<ClCompile Include="..\..\wolfcrypt\src\md4.c" />
<ClCompile Include="..\..\wolfcrypt\src\md5.c" />
<ClCompile Include="..\..\wolfcrypt\src\memory.c" />
<ClCompile Include="..\..\wolfcrypt\src\pkcs12.c" />
<ClCompile Include="..\..\wolfcrypt\src\pkcs7.c" />
<ClCompile Include="..\..\wolfcrypt\src\poly1305.c" />
<ClCompile Include="..\..\wolfcrypt\src\pwdbased.c" />
<ClCompile Include="..\..\wolfcrypt\src\rabbit.c" />
<ClCompile Include="..\..\wolfcrypt\src\random.c" />
<ClCompile Include="..\..\wolfcrypt\src\ripemd.c" />
<ClCompile Include="..\..\wolfcrypt\src\rsa.c" />
<ClCompile Include="..\..\wolfcrypt\src\sha.c" />
<ClCompile Include="..\..\wolfcrypt\src\sha256.c" />
<ClCompile Include="..\..\wolfcrypt\src\sha512.c" />
<ClCompile Include="..\..\wolfcrypt\src\signature.c" />
<ClCompile Include="..\..\wolfcrypt\src\srp.c" />
<ClCompile Include="..\..\wolfcrypt\src\tfm.c" />
<ClCompile Include="..\..\wolfcrypt\src\wc_encrypt.c" />
<ClCompile Include="..\..\wolfcrypt\src\wc_port.c" />
<ClCompile Include="..\..\wolfcrypt\src\wolfevent.c" />
<ClCompile Include="..\..\wolfcrypt\src\wolfmath.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="user_settings.h" />
<ClInclude Include="..\..\wolfssl\callbacks.h" />
<ClInclude Include="..\..\wolfssl\certs_test.h" />
<ClInclude Include="..\..\wolfssl\crl.h" />
<ClInclude Include="..\..\wolfssl\error-ssl.h" />
<ClInclude Include="..\..\wolfssl\internal.h" />
<ClInclude Include="..\..\wolfssl\ocsp.h" />
<ClInclude Include="..\..\wolfssl\options.h" />
<ClInclude Include="..\..\wolfssl\sniffer.h" />
<ClInclude Include="..\..\wolfssl\sniffer_error.h" />
<ClInclude Include="..\..\wolfssl\ssl.h" />
<ClInclude Include="..\..\wolfssl\test.h" />
<ClInclude Include="..\..\wolfssl\version.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\aes.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\arc4.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\asn.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\asn_public.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\async.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\blake2-impl.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\blake2-int.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\blake2.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\camellia.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\chacha.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\chacha20_poly1305.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\cmac.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\coding.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\compress.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\curve25519.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\des3.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\dh.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\dsa.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\ecc.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\ed25519.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\error-crypt.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\fe_operations.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\fips_test.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\ge_operations.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\hash.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\hc128.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\hmac.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\idea.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\integer.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\logging.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\md2.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\md4.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\md5.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\memory.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\mem_track.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\misc.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\mpi_class.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\mpi_superclass.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\pkcs12.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\pkcs7.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\poly1305.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\pwdbased.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\rabbit.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\random.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\ripemd.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\rsa.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\settings.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\sha.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\sha256.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\sha512.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\signature.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\srp.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\tfm.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\types.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\visibility.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\wc_encrypt.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\wc_port.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\wolfevent.h" />
<ClInclude Include="..\..\wolfssl\wolfcrypt\wolfmath.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{1731767D-573F-45C9-A466-191DA0D180CF}</ProjectGuid>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|INtime'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|INtime'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|INtime'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|INtime'">
<IntDir>$(Configuration)_$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">
<IntDir>$(Configuration)_$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|INtime'">
<ClCompile>
</ClCompile>
<Link>
<Version>21076.20052</Version>
<AdditionalOptions>/SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib</AdditionalDependencies>
<OutputFile>$(SolutionDir)$(Configuration)\\libwolfssl.rsl</OutputFile>
</Link>
<ClCompile>
<ExceptionHandling>Async</ExceptionHandling>
<PreprocessorDefinitions>_USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;_USE_64BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">
<ClCompile>
</ClCompile>
<Link>
<Version>21076.20052</Version>
<AdditionalOptions>/SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib</AdditionalDependencies>
<OutputFile>$(SolutionDir)$(Configuration)\\libwolfssl.rsl</OutputFile>
</Link>
<ClCompile>
<ExceptionHandling>Async</ExceptionHandling>
<PreprocessorDefinitions>_USRDLL;WOLFSSL_DLL;BUILDING_WOLFSSL;WOLFSSL_USER_SETTINGS;_USE_64BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,511 @@
/* Example custom user settings for wolfSSL and INtime RTOS port */
#ifndef WOLFSSL_USER_SETTINGS_H
#define WOLFSSL_USER_SETTINGS_H
#ifdef __cplusplus
extern "C" {
#endif
/* ------------------------------------------------------------------------- */
/* Port - Platform */
/* ------------------------------------------------------------------------- */
#undef INTIME_RTOS
#define INTIME_RTOS
#undef WOLF_EXAMPLES_STACK
#define WOLF_EXAMPLES_STACK 65536
#undef WOLFSSL_GENERAL_ALIGNMENT
#define WOLFSSL_GENERAL_ALIGNMENT 4
/* platform already has min()/max() */
#undef WOLFSSL_HAVE_MIN
#define WOLFSSL_HAVE_MIN
#undef WOLFSSL_HAVE_MAX
#define WOLFSSL_HAVE_MAX
/* disable directory support */
#undef NO_WOLFSSL_DIR
#define NO_WOLFSSL_DIR
/* disable writev */
#undef NO_WRITEV
#define NO_WRITEV
/* we provide main entry point */
#undef NO_MAIN_DRIVER
#define NO_MAIN_DRIVER
/* if using in single threaded mode */
#undef SINGLE_THREADED
//#define SINGLE_THREADED
/* Note: HAVE_THREAD_LS is not support for INtime RTOS */
/* reduces stack usage, by using malloc/free for stack variables over 100 bytes */
#undef WOLFSSL_SMALL_STACK
//#define WOLFSSL_SMALL_STACK
/* ------------------------------------------------------------------------- */
/* Math Configuration */
/* ------------------------------------------------------------------------- */
/* fast math uses stack and inline assembly to speed up math */
#undef USE_FAST_MATH
#define USE_FAST_MATH
#ifdef USE_FAST_MATH
/* timing resistance for side-channel attack protection */
#undef TFM_TIMING_RESISTANT
#define TFM_TIMING_RESISTANT
#endif
/* ------------------------------------------------------------------------- */
/* Crypto */
/* ------------------------------------------------------------------------- */
/* ECC */
#if 1
#undef HAVE_ECC
#define HAVE_ECC
/* Support for custom curves */
#define WOLFSSL_CUSTOM_CURVES
/* Curve types */
//#define NO_ECC_SECP
#define HAVE_ECC_SECPR2
#define HAVE_ECC_SECPR3
#define HAVE_ECC_BRAINPOOL
#define HAVE_ECC_KOBLITZ
/* Curve sizes */
#undef HAVE_ALL_CURVES
//#define HAVE_ALL_CURVES
#ifndef HAVE_ALL_CURVES
/* allows enabling custom curve sizes */
#undef ECC_USER_CURVES
#define ECC_USER_CURVES
//#define HAVE_ECC112
//#define HAVE_ECC128
//#define HAVE_ECC160
#define HAVE_ECC192
#define HAVE_ECC224
//#define NO_ECC256
#define HAVE_ECC384
#define HAVE_ECC521
#endif
/* Fixed point cache (speeds repeated operations against same private key) */
#undef FP_ECC
#define FP_ECC
#ifdef FP_ECC
/* Bits / Entries */
#undef FP_ENTRIES
#define FP_ENTRIES 2
#undef FP_LUT
#define FP_LUT 4
#endif
/* Optional ECC calculation method */
/* Note: doubles heap usage, but slightly faster */
#undef ECC_SHAMIR
#define ECC_SHAMIR
/* Reduces heap usage, but slower */
/* timing resistance for side-channel attack protection */
#undef ECC_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
#ifdef USE_FAST_MATH
/* use reduced size math buffers for ecc points */
#undef ALT_ECC_SIZE
#define ALT_ECC_SIZE
/* Enable TFM optimizations for ECC */
#if defined(HAVE_ECC192) || defined(HAVE_ALL_CURVES)
#define TFM_ECC192
#endif
#if defined(HAVE_ECC224) || defined(HAVE_ALL_CURVES)
#define TFM_ECC224
#endif
#if !defined(NO_ECC256) || defined(HAVE_ALL_CURVES)
#define TFM_ECC256
#endif
#if defined(HAVE_ECC384) || defined(HAVE_ALL_CURVES)
#define TFM_ECC384
#endif
#if defined(HAVE_ECC521) || defined(HAVE_ALL_CURVES)
#define TFM_ECC521
#endif
#endif
#endif
/* RSA */
#undef NO_RSA
#if 1
#ifdef USE_FAST_MATH
/* Maximum math bits (Max RSA key bits * 2) */
#undef FP_MAX_BITS
#define FP_MAX_BITS 4096
#endif
/* half as much memory but twice as slow */
#undef RSA_LOW_MEM
//#define RSA_LOW_MEM
/* RSA blinding countermeasures */
#undef WC_RSA_BLINDING
#define WC_RSA_BLINDING
#else
#define NO_RSA
#endif
/* AES */
#undef NO_AES
#if 1
#undef HAVE_AESGCM
#define HAVE_AESGCM
#ifdef HAVE_AESGCM
/* GCM Method: GCM_SMALL, GCM_WORD32 or GCM_TABLE */
//#define GCM_SMALL
#define GCM_TABLE
#endif
#undef WOLFSSL_AES_COUNTER
#define WOLFSSL_AES_COUNTER
#undef HAVE_AESCCM
#define HAVE_AESCCM
#undef WOLFSSL_AES_DIRECT
#define WOLFSSL_AES_DIRECT
#undef HAVE_AES_KEYWRAP
#define HAVE_AES_KEYWRAP
#else
#define NO_AES
#endif
/* ChaCha20 / Poly1305 */
#undef HAVE_CHACHA
#undef HAVE_POLY1305
#if 1
#define HAVE_CHACHA
#define HAVE_POLY1305
/* Needed for Poly1305 */
#undef HAVE_ONE_TIME_AUTH
#define HAVE_ONE_TIME_AUTH
#endif
/* Ed25519 / Curve25519 */
#undef HAVE_CURVE25519
#undef HAVE_ED25519
#if 1
#define HAVE_CURVE25519
#define HAVE_ED25519
/* Optionally use small math (less flash usage, but much slower) */
#if 0
#define CURVED25519_SMALL
#endif
#endif
/* ------------------------------------------------------------------------- */
/* Hashing */
/* ------------------------------------------------------------------------- */
/* Sha */
#undef NO_SHA
#if 1
/* 1k smaller, but 25% slower */
//#define USE_SLOW_SHA
#else
#define NO_SHA
#endif
/* Sha256 */
#undef NO_SHA256
#if 1
#else
#define NO_SHA256
#endif
/* Sha512 */
#undef WOLFSSL_SHA512
#if 1
#define WOLFSSL_SHA512
/* Sha384 */
#undef WOLFSSL_SHA384
#if 1
#define WOLFSSL_SHA384
#endif
/* over twice as small, but 50% slower */
//#define USE_SLOW_SHA2
#endif
/* MD5 */
#undef NO_MD5
#if 1
#else
#define NO_MD5
#endif
/* ------------------------------------------------------------------------- */
/* Enable Features */
/* ------------------------------------------------------------------------- */
#undef KEEP_PEER_CERT
#define KEEP_PEER_CERT
#undef HAVE_COMP_KEY
#define HAVE_COMP_KEY
#undef HAVE_ECC_ENCRYPT
#define HAVE_ECC_ENCRYPT
#undef HAVE_TLS_EXTENSIONS
#define HAVE_TLS_EXTENSIONS
#undef HAVE_SUPPORTED_CURVES
#define HAVE_SUPPORTED_CURVES
#undef HAVE_EXTENDED_MASTER
#define HAVE_EXTENDED_MASTER
#undef WOLFSSL_DTLS
#define WOLFSSL_DTLS
#undef OPENSSL_EXTRA
#define OPENSSL_EXTRA
#undef WOLFSSL_BASE64_ENCODE
#define WOLFSSL_BASE64_ENCODE
#undef HAVE_HKDF
#define HAVE_HKDF
#undef WOLFSSL_CMAC
#define WOLFSSL_CMAC
#undef WOLFSSL_KEY_GEN
#define WOLFSSL_KEY_GEN
#undef WOLFSSL_CERT_GEN
#define WOLFSSL_CERT_GEN
#undef WOLFSSL_CERT_REQ
#define WOLFSSL_CERT_REQ
#undef WOLFSSL_CERT_EXT
#define WOLFSSL_CERT_EXT
#undef HAVE_PK_CALLBACKS
#define HAVE_PK_CALLBACKS
#undef HAVE_ALPN
#define HAVE_ALPN
#undef HAVE_SNI
#define HAVE_SNI
#undef HAVE_MAX_FRAGMENT
#define HAVE_MAX_FRAGMENT
#undef HAVE_TRUNCATED_HMAC
#define HAVE_TRUNCATED_HMAC
#undef SESSION_CERTS
#define SESSION_CERTS
#undef HAVE_SESSION_TICKET
#define HAVE_SESSION_TICKET
#undef WOLFCRYPT_HAVE_SRP
#define WOLFCRYPT_HAVE_SRP
#undef WOLFSSL_HAVE_CERT_SERVICE
#define WOLFSSL_HAVE_CERT_SERVICE
#undef HAVE_PKCS7
#define HAVE_PKCS7
#undef HAVE_X963_KDF
#define HAVE_X963_KDF
#undef WOLFSSL_HAVE_WOLFSCEP
#define WOLFSSL_HAVE_WOLFSCEP
#undef WOLFSSL_ALWAYS_KEEP_SNI
#define WOLFSSL_ALWAYS_KEEP_SNI
#undef WOLFSSL_ALWAYS_VERIFY_CB
#define WOLFSSL_ALWAYS_VERIFY_CB
#undef WOLFSSL_SEP
#define WOLFSSL_SEP
#undef ATOMIC_USER
#define ATOMIC_USER
#undef HAVE_OCSP
#define HAVE_OCSP
#undef HAVE_CERTIFICATE_STATUS_REQUEST
#define HAVE_CERTIFICATE_STATUS_REQUEST
#undef HAVE_CERTIFICATE_STATUS_REQUEST_V2
#define HAVE_CERTIFICATE_STATUS_REQUEST_V2
#undef HAVE_CRL
#define HAVE_CRL
#undef PERSIST_CERT_CACHE
//#define PERSIST_CERT_CACHE
#undef PERSIST_SESSION_CACHE
//#define PERSIST_SESSION_CACHE
#undef WOLFSSL_DER_LOAD
//#define WOLFSSL_DER_LOAD
#undef WOLFSSL_DES_ECB
//#define WOLFSSL_DES_ECB
#undef HAVE_CAMELLIA
//#define HAVE_CAMELLIA
#undef HAVE_NULL_CIPHER
//#define HAVE_NULL_CIPHER
#undef WOLFSSL_RIPEMD
//#define WOLFSSL_RIPEMD
/* TLS Session Cache */
#if 1
#define SMALL_SESSION_CACHE
//#define MEDIUM_SESSION_CACHE
//#define BIG_SESSION_CACHE
//#define HUGE_SESSION_CACHE
#else
#define NO_SESSION_CACHE
#endif
/* ------------------------------------------------------------------------- */
/* Disable Features */
/* ------------------------------------------------------------------------- */
#undef NO_WOLFSSL_SERVER
//#define NO_WOLFSSL_SERVER
#undef NO_WOLFSSL_CLIENT
//#define NO_WOLFSSL_CLIENT
/* disables TLS 1.0/1.1 support */
#undef NO_OLD_TLS
//#define NO_OLD_TLS
/* disable access to filesystem */
#undef NO_FILESYSTEM
//#define NO_FILESYSTEM
#undef NO_RC4
#define NO_RC4
#undef NO_HC128
#define NO_HC128
#undef NO_RABBIT
#define NO_RABBIT
#undef NO_MD4
#define NO_MD4
/* Pre-shared keys */
#undef NO_PSK
//#define NO_PSK
#undef NO_DSA
//#define NO_DSA
#undef NO_DH
//#define NO_DH
#undef NO_DES3
//#define NO_DES3
#undef NO_PWDBASED
//#define NO_PWDBASED
/* encoding/decoding support */
#undef NO_CODING
//#define NO_CODING
/* memory wrappers and memory callbacks */
#undef NO_WOLFSSL_MEMORY
//#define NO_WOLFSSL_MEMORY
/* In-lining of misc.c functions */
/* If defined, must include wolfcrypt/src/misc.c in build */
/* Slower, but about 1k smaller */
#undef NO_INLINE
//#define NO_INLINE
/* ------------------------------------------------------------------------- */
/* Benchmark / Test */
/* ------------------------------------------------------------------------- */
#undef NO_CRYPT_TEST
//#define NO_CRYPT_TEST
#undef NO_CRYPT_BENCHMARK
//#define NO_CRYPT_BENCHMARK
/* Use reduced benchmark / test sizes */
#undef BENCH_EMBEDDED
#define BENCH_EMBEDDED
#undef USE_CERT_BUFFERS_2048
#define USE_CERT_BUFFERS_2048
#undef USE_CERT_BUFFERS_256
#define USE_CERT_BUFFERS_256
/* ------------------------------------------------------------------------- */
/* Debugging */
/* ------------------------------------------------------------------------- */
#undef DEBUG_WOLFSSL
//#define DEBUG_WOLFSSL
#ifdef DEBUG_WOLFSSL
/* Use this to measure / print heap usage */
#if 0
#undef USE_WOLFSSL_MEMORY
#define USE_WOLFSSL_MEMORY
#undef WOLFSSL_TRACK_MEMORY
#define WOLFSSL_TRACK_MEMORY
#endif
/* Math debugging (adds support for mp_dump) */
#undef WOLFSSL_DEBUG_MATH
//#define WOLFSSL_DEBUG_MATH
#else
#undef NO_ERROR_STRINGS
//#define NO_ERROR_STRINGS
#endif
#ifdef __cplusplus
}
#endif
#endif /* WOLFSSL_USER_SETTINGS_H */

View File

@ -0,0 +1,619 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <rt.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <io.h>
#include "wolfExamples.h"
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/ssl.h>
#include <wolfssl/certs_test.h>
#include <wolfcrypt/test/test.h>
#include <wolfcrypt/benchmark/benchmark.h>
/*****************************************************************************
* Globals
****************************************************************************/
RTHANDLE hRootProcess;
DWORD dwKtickInUsecs;
INIT_STRUCT gInit;
static int gServerExit = 0;
static int gServerReady = 0;
static const char menu1[] = "\r\n"
"\tt. WolfCrypt Test\r\n"
"\tb. WolfCrypt Benchmark\r\n"
"\tc. WolfSSL Client Example\r\n"
"\ts. WolfSSL Server Example\r\n"
"\tl. WolfSSL Localhost Client/Server Example\r\n";
/*****************************************************************************
* Configuration
****************************************************************************/
#define TLS_MAXDATASIZE 4096 /* maximum acceptable amount of data */
#define TLS_PORT 11111 /* define default port number */
#define TLS_HOST_LOCAL "127.0.0.1"
#define TLS_HOST_REMOTE "192.168.0.112"
#define SOCK_MAX_PENDING 5
#define THREAD_BASE_PRIO 150
/*****************************************************************************
* TLS Client
****************************************************************************/
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 */
struct sockaddr_in servAddr; /* struct for server address */
char sendBuff[TLS_MAXDATASIZE], rcvBuff[TLS_MAXDATASIZE];
sockFd = socket(AF_INET, SOCK_STREAM, 0);
if (sockFd < 0) {
printf("Failed to create socket. Error: %d\n", errno);
return errno;
}
memset(&servAddr, 0, sizeof(servAddr)); /* clears memory block for use */
servAddr.sin_family = AF_INET; /* sets addressfamily to internet*/
servAddr.sin_port = htons(port); /* sets port to defined port */
/* looks for the server at the entered address (ip in the command line) */
if (inet_pton(AF_INET, ip, &servAddr.sin_addr) < 1) {
/* checks validity of address */
ret = errno;
printf("Invalid Address. Error: %d\n", ret);
goto exit;
}
if (connect(sockFd, (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0) {
/* if socket fails to connect to the server*/
ret = errno;
printf("Connect error. Error: %d\n", ret);
goto exit;
}
/* create and initialize WOLFSSL_CTX structure */
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) {
printf("SSL_CTX_new error.\n");
goto exit;
}
/* load CA certificates into wolfSSL_CTX. which will verify the server */
ret = wolfSSL_CTX_load_verify_buffer(ctx, ca_cert_der_2048,
sizeof_ca_cert_der_2048, SSL_FILETYPE_ASN1);
if (ret != SSL_SUCCESS) {
printf("Error %d loading CA cert\n", ret);
goto exit;
}
if ((ssl = wolfSSL_new(ctx)) == NULL) {
printf("wolfSSL_new error.\n");
goto exit;
}
wolfSSL_set_fd(ssl, sockFd);
ret = wolfSSL_connect(ssl);
if (ret == SSL_SUCCESS) {
printf("Message for server:\t");
fgets(sendBuff, TLS_MAXDATASIZE, stdin);
if (wolfSSL_write(ssl, sendBuff, strlen(sendBuff)) != strlen(sendBuff)) {
/* the message is not able to send, or error trying */
ret = wolfSSL_get_error(ssl, 0);
printf("Write error: Error: %d\n", ret);
goto exit;
}
memset(rcvBuff, 0, TLS_MAXDATASIZE);
if (wolfSSL_read(ssl, rcvBuff, TLS_MAXDATASIZE) < 0) {
/* the server failed to send data, or error trying */
ret = wolfSSL_get_error(ssl, 0);
printf("Read error. Error: %d\n", ret);
goto exit;
}
printf("Received: \t%s\n", rcvBuff);
}
exit:
/* frees all data before client termination */
if (sockFd != -1)
close(sockFd);
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
gServerExit = 1;
return ret;
}
/*****************************************************************************
* TLS Server
****************************************************************************/
int wolfExample_TLSServer(int port)
{
int ret = 0;
WOLFSSL_CTX* ctx = NULL;
WOLFSSL* ssl = NULL;
int sockFd = -1, 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);
if (sockFd < 0) {
printf("Failed to create socket. Error: %d\n", errno);
return errno;
}
/* create and initialize WOLFSSL_CTX structure */
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method())) == NULL) {
fprintf(stderr, "wolfSSL_CTX_new error.\n");
goto exit;
}
/* Load server certificate into WOLFSSL_CTX */
ret = wolfSSL_CTX_use_certificate_buffer(ctx, server_cert_der_2048,
sizeof_server_cert_der_2048, SSL_FILETYPE_ASN1);
if (ret != SSL_SUCCESS) {
fprintf(stderr, "Error %d loading server-cert!\n", ret);
goto exit;
}
/* Load server key into WOLFSSL_CTX */
ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx, server_key_der_2048,
sizeof_server_key_der_2048, SSL_FILETYPE_ASN1);
if (ret != SSL_SUCCESS) {
fprintf(stderr, "Error %d loading server-key!\n", ret);
goto exit;
}
/* Initialize the server address struct to zero */
memset((char *)&serverAddr, 0, sizeof(serverAddr));
/* Fill the server's address family */
serverAddr.sin_family = AF_INET;
serverAddr.sin_addr.s_addr = INADDR_ANY;
serverAddr.sin_port = htons(port);
/* Attach the server socket to our port */
if (bind(sockFd, (struct sockaddr *)&serverAddr, sizeof(serverAddr)) < 0) {
printf("ERROR: failed to bind\n");
goto exit;
}
printf("Waiting for a connection...\n");
gServerReady = 1;
/* Continuously accept connects while not in an active connection */
while (gServerExit == 0) {
/* listen for a new connection */
ret = listen(sockFd, SOCK_MAX_PENDING);
if (ret == 0) {
/* Wait until a client connects */
clientFd = accept(sockFd, (struct sockaddr*)&clientAddr, &addrSize);
/* If fails to connect, loop back up and wait for a new connection */
if (clientFd == -1) {
printf("failed to accept the connection..\n");
}
/* If it connects, read in and reply to the client */
else {
printf("Client connected successfully\n");
ssl = wolfSSL_new(ctx);
if (ssl == NULL) {
fprintf(stderr, "wolfSSL_new error.\n");
break;
}
/* direct our ssl to our clients connection */
wolfSSL_set_fd(ssl, clientFd);
printf("Using Non-Blocking I/O: %d\n",
wolfSSL_get_using_nonblock(ssl));
for ( ; ; ) {
/* Clear the buffer memory for anything possibly left over */
memset(&buff, 0, sizeof(buff));
/* Read the client data into our buff array */
ret = wolfSSL_read(ssl, buff, sizeof(buff) - 1);
if (ret > 0) {
/* Print any data the client sends to the console */
printf("Client: %s\n", buff);
/* Reply back to the client */
ret = wolfSSL_write(ssl, reply, sizeof(reply) - 1);
if (ret < 0) {
printf("wolfSSL_write error = %d\n",
wolfSSL_get_error(ssl, ret));
gServerExit = 1;
break;
}
}
/* if the client disconnects break the loop */
else {
if (ret < 0)
printf("wolfSSL_read error = %d\n",
wolfSSL_get_error(ssl, ret));
else if (ret == 0)
printf("The client has closed the connection.\n");
gServerExit = 1;
break;
}
}
wolfSSL_free(ssl); /* Free the WOLFSSL object */
ssl = NULL;
}
close(clientFd); /* close the connected socket */
clientFd = -1;
}
} /* while */
exit:
if (clientFd != -1)
close(clientFd);
if (sockFd != -1)
close(sockFd);
wolfSSL_free(ssl); /* Free the WOLFSSL object */
wolfSSL_CTX_free(ctx); /* Free WOLFSSL_CTX */
return ret;
}
/*****************************************************************************
* TLS Local Test
****************************************************************************/
static void wolfSSLLocalServerThread(void* param)
{
int port = (int)((int*)param);
wolfExample_TLSServer(port);
}
int wolfExample_TLSLocal(int port)
{
int ret;
RTHANDLE srvHandle;
/* start server thread */
srvHandle = CreateRtThread(THREAD_BASE_PRIO + 10,
(LPPROC)wolfSSLLocalServerThread, WOLF_EXAMPLES_STACK, (void*)port);
if (srvHandle == BAD_RTHANDLE) {
Fail("Cannot create server thread");
return -1;
}
/* wait for server to be ready */
while (gServerReady != 1) {
RtSleep(0);
}
/* run client */
ret = wolfExample_TLSClient(TLS_HOST_LOCAL, port);
return ret;
}
/*****************************************************************************
* Thread
memset(&args, 0, sizeof(args));
****************************************************************************/
typedef struct func_args {
int argc;
char** argv;
int return_code;
} func_args;
static void wolfExampleThread(void* param)
{
func_args args;
#ifdef DEBUG_WOLFSSL
wolfSSL_Debugging_ON();
#endif
/* initialize wolfSSL */
wolfSSL_Init();
while (1) {
char rc;
gServerExit = 0;
gServerReady = 0;
printf("\r\n\t\t\t\tMENU\r\n");
printf(menu1);
printf("Please select one of the above options: ");
rc = getchar();
switch (rc) {
case 't':
printf("\nCrypt Test\n");
wolfcrypt_test(&args);
printf("Crypt Test: Return code %d\n", args.return_code);
break;
case 'b':
printf("\nBenchmark Test\n");
benchmark_test(&args);
printf("Benchmark Test: Return code %d\n", args.return_code);
break;
case 'c':
wolfExample_TLSClient(TLS_HOST_REMOTE, TLS_PORT);
break;
case 's':
wolfExample_TLSServer(TLS_PORT);
break;
case 'l':
wolfExample_TLSLocal(TLS_PORT);
break;
// All other cases go here
default:
if (rc != '\r' && rc != '\n')
printf("\r\nSelection %c out of range\r\n", rc);
break;
}
}
wolfSSL_Cleanup();
}
/*****************************************************************************
* FUNCTION: Catalog
*
* PARAMETERS: 1. handle of the process whose object directory must be used
* 2. the object whose handle must be cataloged
* 3. the name to be used (upto 14 characters)
*
* RETURNS: TRUE on success
*
* DESCRIPTION: If the given name already exists,
* and the existing name refers to a non-existing object,
* then the existing name is removed before cataloging.
\*****************************************************************************/
BOOLEAN Catalog(
RTHANDLE hProcess,
RTHANDLE hObject,
LPSTR lpszName)
{
RTHANDLE hOld;
if (CatalogRtHandle(hProcess, hObject, lpszName))
return TRUE;
// something wrong: check for the case mentioned above
if (((hOld = LookupRtHandle(hProcess, lpszName, NO_WAIT)) != BAD_RTHANDLE) &&
(GetRtHandleType(hOld) == INVALID_TYPE))
{
// this is the case mentioned above: remove the old entry and try again
if (UncatalogRtHandle(hProcess, lpszName))
return (CatalogRtHandle(hProcess, hObject, lpszName));
}
return FALSE;
}
/*****************************************************************************
* FUNCTION: Cleanup (local function)
*
* DESCRIPTION:
* Tell threads to delete themselves and wait a while;
* if any thread still exists, kill it.
* Remove all other objects as far as they have been created.
\*****************************************************************************/
void Cleanup(void)
{
// indicate that we are cleaning up
gInit.state = CLEANUP_BUSY;
gInit.bShutdown = TRUE;
#ifdef _DEBUG
fprintf(stderr, "wolfExamples started cleaning up\n");
#endif
// remove our name from the root process
if (gInit.bCataloged) {
if (!UncatalogRtHandle(hRootProcess, "wolfExample"))
Fail("Cannot remove my own name");
}
#ifdef _DEBUG
fprintf(stderr, "wolfExamples finished cleaning up\n");
#endif
// lie down
exit(0);
}
/*****************************************************************************
* FUNCTION: Fail
*
* PARAMETERS: same parameters as expected by printf
*
* DESCRIPTION:
* If in debug mode, prints the message, appending a new line and the error number.
* Then the current process is killed graciously:
* If the current thread is the main thread, this is done directly.
* if the current thread is another one, a terminate request is sent and
* the function returns to the calling thread.
\*****************************************************************************/
void Fail(LPSTR lpszMessage, ...)
{
EXCEPTION eh;
RTHANDLE hDelMbx;
DWORD dwTerminate;
#ifdef _DEBUG
va_list ap;
va_start(ap, lpszMessage);
vfprintf(stderr, lpszMessage, ap);
va_end(ap);
fprintf(stderr, "\nError nr=%x %s\n", GetLastRtError(), GetRtErrorText(GetLastRtError()));
#endif
// make sure that exceptions are returned for inline handling
GetRtExceptionHandlerInfo(THREAD_HANDLER, &eh);
eh.ExceptionMode = 0;
SetRtExceptionHandler(&eh);
// if we had not started initializing yet, just get out
if (BEFORE_INIT == gInit.state)
exit(0);
if (gInit.hMain == GetRtThreadHandles(THIS_THREAD))
{
// this is the main thread:
// if we are busy initializing, then do Cleanup
if (INIT_BUSY == gInit.state)
Cleanup(); // does not return
// this is the main thread, but we are not initializing: just return
return;
}
// this is not the main thread:
// ask main thread to do cleanup
// (allow some time to setup the deletion mailbox, ignore errors)
hDelMbx = LookupRtHandle(NULL_RTHANDLE, "R?EXIT_MBOX", 5000);
dwTerminate = TERMINATE;
SendRtData(hDelMbx, &dwTerminate, 4);
}
/*****************************************************************************
*
* FUNCTION: UsecsToKticks
*
* PARAMETERS: 1. number of usecs
*
* RETURNS: number of low level ticks
*
* DESCRIPTION: returns the parameter if it is WAIT_FOREVER
* otherwise rounds up to number of low level ticks
\*****************************************************************************/
DWORD UsecsToKticks(DWORD dwUsecs)
{
if (dwUsecs == WAIT_FOREVER)
return WAIT_FOREVER;
return (dwUsecs + dwKtickInUsecs - 1) / dwKtickInUsecs;
}
/*****************************************************************************
* FUNCTION: main
*
* DESCRIPTION:
* This is the main program module.
* It creates global objects and all threads.
* The main thread then waits for notifications and acts accordingly
\*****************************************************************************/
int main(int argc, char* argv[])
{
SYSINFO sysinfo;
EVENTINFO eiEventInfo;
RTHANDLE taskHandle;
#ifdef _DEBUG
fprintf(stderr, "wolfExamples started\n");
#endif
// obtain handle of root process (cannot fail)
hRootProcess = GetRtThreadHandles(ROOT_PROCESS);
// initialize the structure for cleaning up
memset(&gInit, 0, sizeof(gInit));
gInit.state = BEFORE_INIT;
// get low level tick length in usecs
if (!CopyRtSystemInfo(&sysinfo))
Fail("Cannot copy system info");
dwKtickInUsecs = 10000 / sysinfo.KernelTickRatio;
if (dwKtickInUsecs == 0)
Fail("Invalid low level tick length");
// adjust process max priority (ignore error)
// TODO adjust the 2nd parameter to a value closer to zero if you want to allow more priorities
SetRtProcessMaxPriority(NULL_RTHANDLE, THREAD_BASE_PRIO);
// obtain main thread's handle
gInit.hMain = GetRtThreadHandles(THIS_THREAD);
gInit.state = INIT_BUSY;
// attempt to catalog the thread but ignore error
Catalog(NULL_RTHANDLE, gInit.hMain, "TMain");
// catalog the handle of this process in the root process
if (!Catalog(hRootProcess, GetRtThreadHandles(THIS_PROCESS), "wolfExample")) {
Fail("Cannot catalog process name");
}
gInit.bCataloged = TRUE;
// create thread
taskHandle = CreateRtThread(THREAD_BASE_PRIO + 20,
(LPPROC)wolfExampleThread, WOLF_EXAMPLES_STACK, 0);
if (taskHandle == BAD_RTHANDLE) {
Fail("Cannot create thread");
}
// indicate that initialization has finished
gInit.state = INIT_DONE;
#ifdef _DEBUG
fprintf(stderr, "wolfExamples finished initialization\n");
#endif
// wait for notifications
while (RtNotifyEvent(RT_SYSTEM_NOTIFICATIONS | RT_EXIT_NOTIFICATIONS,
WAIT_FOREVER, &eiEventInfo))
{
switch(eiEventInfo.dwNotifyType)
{
case TERMINATE:
// TODO: this process should terminate
// cleanup the environment
Cleanup(); // does not return
case NT_HOST_UP:
// TODO: react to a Windows host that has come back
break;
case NT_BLUESCREEN:
// TODO: react to a Windows blue screen
break;
case KERNEL_STOPPING:
// TODO: react to the INtime kernel stopping
break;
case NT_HOST_HIBERNATE:
// TODO: react to the Windows host going in hibernation
break;
case NT_HOST_STANDBY:
// TODO: react to the Windows host going in standby mode
break;
case NT_HOST_SHUTDOWN_PENDING:
// TODO: react to a Windows host that is about to shutdown
break;
}
}
Fail("Notify failed");
return 0;
}

View File

@ -0,0 +1,47 @@
#ifndef _WOLFEXAMPLES_H_
#define _WOLFEXAMPLES_H_
#include <rt.h>
#ifdef __cplusplus
extern "C" {
#endif
// support functions for all threads
BOOLEAN Catalog(RTHANDLE hProcess, RTHANDLE hObject, LPSTR lpszName);
void Cleanup(void);
void Fail(LPSTR lpszMessage, ...);
DWORD UsecsToKticks(DWORD dwUsecs);
/* Example API's */
int wolfExample_TLSServer(int port);
int wolfExample_TLSClient(const char* ip, int port);
int wolfExample_TLSLocal(int port);
// global type definitions
typedef enum {
BEFORE_INIT,
INIT_BUSY,
INIT_DONE,
CLEANUP_BUSY
} INIT_STATE;
typedef struct {
RTHANDLE hMain; // RTHANDLE of main thread
INIT_STATE state; // main thread state
BOOLEAN bCataloged; // TRUE if we cataloged process name in root
BOOLEAN bShutdown; // TRUE if all threads have to terminate
} INIT_STRUCT;
// global variables
extern RTHANDLE hRootProcess; // RTHANDLE of root process
extern DWORD dwKtickInUsecs; // length of one low level tick in usecs
extern INIT_STRUCT gInit; // structure describing all global objects
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* _WOLFEXAMPLES_H_ */

View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wolfExamples", "wolfExamples.vcxproj", "{557A7EFD-2627-478A-A855-50F518DD13EE}"
ProjectSection(ProjectDependencies) = postProject
{1731767D-573F-45C9-A466-191DA0D180CF} = {1731767D-573F-45C9-A466-191DA0D180CF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libwolfssl", "libwolfssl.vcxproj", "{1731767D-573F-45C9-A466-191DA0D180CF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|INtime = Debug|INtime
Release|INtime = Release|INtime
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{557A7EFD-2627-478A-A855-50F518DD13EE}.Debug|INtime.ActiveCfg = Debug|INtime
{557A7EFD-2627-478A-A855-50F518DD13EE}.Debug|INtime.Build.0 = Debug|INtime
{557A7EFD-2627-478A-A855-50F518DD13EE}.Release|INtime.ActiveCfg = Release|INtime
{557A7EFD-2627-478A-A855-50F518DD13EE}.Release|INtime.Build.0 = Release|INtime
{1731767D-573F-45C9-A466-191DA0D180CF}.Debug|INtime.ActiveCfg = Debug|INtime
{1731767D-573F-45C9-A466-191DA0D180CF}.Debug|INtime.Build.0 = Debug|INtime
{1731767D-573F-45C9-A466-191DA0D180CF}.Release|INtime.ActiveCfg = Release|INtime
{1731767D-573F-45C9-A466-191DA0D180CF}.Release|INtime.Build.0 = Release|INtime
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|INtime">
<Configuration>Debug</Configuration>
<Platform>INtime</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|INtime">
<Configuration>Release</Configuration>
<Platform>INtime</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<Text Include="README.md" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="wolfExamples.c" />
<ClCompile Include="..\..\wolfcrypt\test\test.c" />
<ClCompile Include="..\..\wolfcrypt\benchmark\benchmark.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="user_settings.h" />
<ClInclude Include="wolfExamples.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{557A7EFD-2627-478A-A855-50F518DD13EE}</ProjectGuid>
<ProjectName>wolfExamples</ProjectName>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|INtime'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|INtime'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|INtime'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|INtime'">
<IntDir>$(Configuration)_$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">
<IntDir>$(Configuration)_$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|INtime'">
<ClCompile>
</ClCompile>
<Link>
<Version>21076.20053</Version>
<AdditionalOptions>/SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib;libwolfssl.lib</AdditionalDependencies>
<OutputFile>$(SolutionDir)$(Configuration)\\wolfExamples.rta</OutputFile>
<AdditionalLibraryDirectories>$(ProjectDir)$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<ClCompile>
<ExceptionHandling>Async</ExceptionHandling>
<PreprocessorDefinitions>WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">
<ClCompile>
</ClCompile>
<Link>
<Version>21076.20053</Version>
<AdditionalOptions>/SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>rt.lib;pcibus.lib;netlib.lib;clib.lib;vshelper.lib;libwolfssl.lib</AdditionalDependencies>
<OutputFile>$(SolutionDir)$(Configuration)\\wolfExamples.rta</OutputFile>
<AdditionalLibraryDirectories>$(ProjectDir)$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<ClCompile>
<ExceptionHandling>Async</ExceptionHandling>
<PreprocessorDefinitions>WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

32
IDE/LINUX-SGX/README.md Normal file
View File

@ -0,0 +1,32 @@
# 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.
### 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.
To create the static library, simply call make:
`make -f sgx_t_static.mk all`
To clean the static library and compiled objects use the provided clean script:
`clean.sh`
This will create a local static library, libwolfssl.sgx.static.lib.a, that can be linked with SGX enclaves to access wolfSSL APIs using SGX hardware.
### Customization:
To enable wolfssl debug, add CFLAGS=-DDEBUG_WOLFSSL.
To enable wolfssl benchmark tests with enclave, specify: HAVE_WOLFSSL_BENCHMARK at build
To enable wolfcrypt testsuite with enclave, specify: HAVE_WOLFSSL_TEST at build
For example, to enable all three:
`make -f sgx_t_static.mk CFLAGS=-DDEBUG_WOLFSSL HAVE_WOLFSSL_BENCHMARK=1 HAVE_WOLFSSL_TEST=1`
NOTE: This more customized step has been provided for easier execution in the
script `build.sh`
### Limitations:
Single Threaded (multiple threaded applications have not been tested)
AES-NI use with SGX has not been added in yet

9
IDE/LINUX-SGX/build.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
CFLAGS_NEW="-DDEBUG_WOLFSSL"
export CFLAGS="${CFLAGS} ${CFLAGS_NEW}"
echo ${CFLAGS}
make -f sgx_t_static.mk HAVE_WOLFSSL_BENCHMARK=1 HAVE_WOLFSSL_TEST=1

3
IDE/LINUX-SGX/clean.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
make -f sgx_t_static.mk clean

8
IDE/LINUX-SGX/include.am Normal file
View File

@ -0,0 +1,8 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
EXTRA_DIST+= IDE/LINUX-SGX/README.md
EXTRA_DIST+= IDE/LINUX-SGX/sgx_t_static.mk
EXTRA_DIST+= IDE/LINUX-SGX/build.sh
EXTRA_DIST+= IDE/LINUX-SGX/clean.sh

View File

@ -0,0 +1,145 @@
######## Intel(R) SGX SDK Settings ########
SGX_SDK ?= /opt/intel/sgxsdk
SGX_MODE ?= SIM
SGX_ARCH ?= x64
WOLFSSL_ROOT ?= $(shell readlink -f ../..)
ifeq ($(shell getconf LONG_BIT), 32)
SGX_ARCH := x86
else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32)
SGX_ARCH := x86
endif
ifeq ($(SGX_ARCH), x86)
SGX_COMMON_CFLAGS := -m32
SGX_LIBRARY_PATH := $(SGX_SDK)/lib
SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign
SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r
else
SGX_COMMON_CFLAGS := -m64
SGX_LIBRARY_PATH := $(SGX_SDK)/lib64
SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign
SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r
endif
ifeq ($(SGX_DEBUG), 1)
ifeq ($(SGX_PRERELEASE), 1)
$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!)
endif
endif
ifeq ($(SGX_DEBUG), 1)
SGX_COMMON_CFLAGS += -O0 -g
else
SGX_COMMON_CFLAGS += -O2
endif
ifneq ($(SGX_MODE), HW)
Trts_Library_Name := sgx_trts_sim
Service_Library_Name := sgx_tservice_sim
else
Trts_Library_Name := sgx_trts
Service_Library_Name := sgx_tservice
endif
Crypto_Library_Name := sgx_tcrypto
Wolfssl_C_Extra_Flags := -DWOLFSSL_SGX
Wolfssl_C_Files :=$(WOLFSSL_ROOT)/wolfcrypt/src/aes.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/arc4.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/asn.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/blake2b.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/camellia.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/coding.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/chacha.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/chacha20_poly1305.c\
$(WOLFSSL_ROOT)/src/crl.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/des3.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/dh.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/tfm.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/ecc.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/error.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/hash.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/hc128.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/hmac.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/integer.c\
$(WOLFSSL_ROOT)/src/internal.c\
$(WOLFSSL_ROOT)/src/wolfio.c\
$(WOLFSSL_ROOT)/src/keys.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/logging.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/md4.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/md5.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/memory.c\
$(WOLFSSL_ROOT)/src/ocsp.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/pkcs7.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/pkcs12.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/poly1305.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/wc_port.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/wolfmath.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/pwdbased.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/rabbit.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/random.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/ripemd.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/rsa.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/dsa.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/sha.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/sha256.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/sha512.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/signature.c\
$(WOLFSSL_ROOT)/src/ssl.c\
$(WOLFSSL_ROOT)/src/tls.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/wc_encrypt.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/wolfevent.c\
Wolfssl_Include_Paths := -I$(WOLFSSL_ROOT)/ \
-I$(WOLFSSL_ROOT)/wolfcrypt/ \
-I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/stlport
ifeq ($(HAVE_WOLFSSL_TEST), 1)
Wolfssl_Include_Paths += -I$(WOLFSSL_ROOT)/wolfcrypt/test
Wolfssl_C_Files += $(WOLFSSL_ROOT)/wolfcrypt/test/test.c
endif
ifeq ($(HAVE_WOLFSSL_BENCHMARK), 1)
Wolfssl_C_Files += $(WOLFSSL_ROOT)/wolfcrypt/benchmark/benchmark.c
Wolfssl_Include_Paths += -I$(WOLFSSL_ROOT)/wolfcrypt/benchmark/
endif
Flags_Just_For_C := -Wno-implicit-function-declaration -std=c11
Common_C_Cpp_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -fstack-protector $(Wolfssl_Include_Paths) -fno-builtin-printf -I.
Wolfssl_C_Flags := $(Flags_Just_For_C) $(Common_C_Cpp_Flags) $(Wolfssl_C_Extra_Flags)
Wolfssl_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \
-Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \
-Wl,--start-group -lsgx_tstdc -lsgx_tstdcxx -l$(Crypto_Library_Name) -l$(Service_Library_Name) -Wl,--end-group \
-Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \
-Wl,-pie,-eenclave_entry -Wl,--export-dynamic \
-Wl,--defsym,__ImageBase=0 \
-Wl,--version-script=trusted/wolfcrypt.lds
Wolfssl_C_Objects := $(Wolfssl_C_Files:.c=.o)
ifeq ($(SGX_MODE), HW)
ifneq ($(SGX_DEBUG), 1)
ifneq ($(SGX_PRERELEASE), 1)
Build_Mode = HW_RELEASE
endif
endif
endif
override CFLAGS += $(Wolfssl_C_Flags)
.PHONY: all run
all: libwolfssl.sgx.static.lib.a
######## WolfSSL Objects ########
libwolfssl.sgx.static.lib.a: $(Wolfssl_C_Objects)
ar rcs libwolfssl.sgx.static.lib.a $(Wolfssl_C_Objects)
@echo "LINK => $@"
clean:
@rm -f $(WOLFSSL_ROOT)/wolfcrypt/benchmark/*.o $(WOLFSSL_ROOT)/wolfcrypt/test/*.o static_trusted/wolfssl_t.* libwolfssl.sgx.static.lib.a $(Wolfssl_C_Objects)

View File

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

View File

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

View File

@ -1,6 +1,6 @@
/* time.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -19,25 +19,25 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/*-----------------------------------------------------------------------------
* initialize RTC
* initialize RTC
*----------------------------------------------------------------------------*/
#include <stdio.h>
#include "lpc43xx_rtc.h"
#include "lpc43xx_cgu.h"
static void init_RTC()
{
static void init_RTC()
{
/* Enable GPIO register interface clock */
LPC_CCU1->CLK_M4_GPIO_CFG |= 1;
while (!(LPC_CCU1->CLK_M4_GPIO_STAT & 1)) ;
/* RTC Block section ------------------------------------------------------ */
/* Init RTC module */
RTC_Init(LPC_RTC);
@ -53,13 +53,13 @@ static void init_RTC()
/* Enable rtc (starts increase the tick counter and second counter register) */
RTC_Cmd(LPC_RTC, ENABLE);
}
/*-----------------------------------------------------------------------------
* initialize TIM
*----------------------------------------------------------------------------*/
#include "lpc43xx_timer.h"
static void init_TIM()
@ -75,9 +75,9 @@ static void init_TIM()
TIM_Cmd(LPC_TIMER2,ENABLE);
}
double current_time()
double current_time()
{
return (double)LPC_TIMER2->TC/1000000.0;
return (double)LPC_TIMER2->TC/1000000.0;
}
@ -88,9 +88,9 @@ void init_time(void) {
#include <time.h>
struct tm *Cyassl_MDK_gmtime(const time_t *c)
{
static struct tm date ;
struct tm *Cyassl_MDK_gmtime(const time_t *c)
{
static struct tm date ;
RTC_TIME_Type RTCFullTime;
RTC_GetFullTime (LPC_RTC, &RTCFullTime);
@ -102,17 +102,17 @@ struct tm *Cyassl_MDK_gmtime(const time_t *c)
date.tm_min = RTCFullTime.MIN ;
date.tm_sec = RTCFullTime.SEC ;
#if defined(DEBUG_CYASSL)
#if defined(DEBUG_CYASSL)
{
extern void CYASSL_MSG(char *msg) ;
char msg[100] ;
sprintf(msg, "Debug::Cyassl_KEIL_gmtime(DATE=/%4d/%02d/%02d TIME=%02d:%02d:%02d)\n",
RTCFullTime.YEAR+2000, RTCFullTime.MONTH, RTCFullTime.DOM,
RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ;
CYASSL_MSG(msg) ;
RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ;
CYASSL_MSG(msg) ;
}
#endif
return(&date) ;
}
@ -124,42 +124,42 @@ typedef struct func_args {
#include <stdio.h>
void time_main(void *args)
void time_main(void *args)
{
char * datetime ;
int year ;
RTC_TIME_Type RTCFullTime;
if( args == NULL || ((func_args *)args)->argc == 1) {
if( args == NULL || ((func_args *)args)->argc == 1) {
RTC_GetFullTime (LPC_RTC, &RTCFullTime);
printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n",
RTCFullTime.MONTH, RTCFullTime.DOM, RTCFullTime.YEAR+2000,
RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ;
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-' &&
printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n",
RTCFullTime.MONTH, RTCFullTime.DOM, RTCFullTime.YEAR+2000,
RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ;
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-' &&
((func_args *)args)->argv[1][1] == 'd' ) {
datetime = ((func_args *)args)->argv[2];
sscanf(datetime, "%d/%d/%d",
sscanf(datetime, "%d/%d/%d",
(int *)&RTCFullTime.MONTH, (int *)&RTCFullTime.DOM, &year) ;
RTCFullTime.YEAR = year - 2000 ;
RTCFullTime.YEAR = year - 2000 ;
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_MONTH, RTCFullTime.MONTH);
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_YEAR, RTCFullTime.YEAR);
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_DAYOFMONTH, RTCFullTime.DOM);
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-' &&
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_DAYOFMONTH, RTCFullTime.DOM);
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-' &&
((func_args *)args)->argv[1][1] == 't' ) {
RTC_GetFullTime (LPC_RTC, &RTCFullTime);
datetime = ((func_args *)args)->argv[2];
sscanf(datetime, "%d:%d:%d",
(int *)&RTCFullTime.HOUR,
(int *)&RTCFullTime.MIN,
sscanf(datetime, "%d:%d:%d",
(int *)&RTCFullTime.HOUR,
(int *)&RTCFullTime.MIN,
(int *)&RTCFullTime.SEC
) ;
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_SECOND, RTCFullTime.SEC);
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_MINUTE, RTCFullTime.MIN);
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_HOUR, RTCFullTime.HOUR);
} else printf("Invalid argument\n") ;
} else printf("Invalid argument\n") ;
}

View File

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

View File

@ -1,6 +1,6 @@
/* config-BEREFOOT.h
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -72,7 +72,7 @@
// <e>Crypt/Cipher Benchmark
#define MDK_CONF_CTaoCryptBenchmark 1
#if MDK_CONF_CTaoCryptBenchmark == 0
#define NO_CRYPT_BENCHMARK
#define NO_CRYPT_BENCHMARK
#define BENCH_EMBEDDED
#endif
// </e>
@ -120,10 +120,10 @@
#define WOLFSSL_SHA384
#endif
// </e>
// <e>SHA-512
// <e>SHA-512
#define MDK_CONF_SHA512 0
#if MDK_CONF_SHA512 == 1
#define WOLFSSL_SHA512
#define WOLFSSL_SHA512
#endif
// </e>
// <e>RIPEMD
@ -151,7 +151,7 @@
#endif
// </e>
// <e>AEAD
// <e>AEAD
#define MDK_CONF_AEAD 0
#if MDK_CONF_AEAD == 1
#define HAVE_AEAD
@ -178,7 +178,7 @@
#endif
// </e>
// <e>DSA
#define MDK_CONF_DSA 1
#define MDK_CONF_DSA 1
#if MDK_CONF_DSA == 0
#define NO_DSA
#endif

View File

@ -1,6 +1,6 @@
/* config-FS.h
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -70,7 +70,7 @@
// <e>Crypt/Cipher Benchmark
#define MDK_CONF_CTaoCryptBenchmark 1
#if MDK_CONF_CTaoCryptBenchmark == 0
#define NO_CRYPT_BENCHMARK
#define NO_CRYPT_BENCHMARK
#endif
// </e>
// </h>
@ -97,7 +97,7 @@
// <h>SSL (Included by default)
// </h>
// <e>TLS
// <e>TLS
#define MDK_CONF_TLS 1
#if MDK_CONF_TLS == 0
#define NO_TLS
@ -157,10 +157,10 @@
#define WOLFSSL_SHA384
#endif
// </e>
// <e>SHA-512
// <e>SHA-512
#define MDK_CONF_SHA512 0
#if MDK_CONF_SHA512 == 1
#define WOLFSSL_SHA512
#define WOLFSSL_SHA512
#endif
// </e>
// <e>RIPEMD
@ -188,7 +188,7 @@
#endif
// </e>
// <e>AEAD
// <e>AEAD
#define MDK_CONF_AEAD 0
#if MDK_CONF_AEAD == 1
#define HAVE_AEAD
@ -215,7 +215,7 @@
#endif
// </e>
// <e>DSA
#define MDK_CONF_DSA 1
#define MDK_CONF_DSA 1
#if MDK_CONF_DSA == 0
#define NO_DSA
#endif

View File

@ -1,6 +1,6 @@
/* config-RTX-TCP-FS.h
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -66,7 +66,7 @@
// <e>Crypt/Cipher Benchmark
#define MDK_CONF_CTaoCryptBenchmark 1
#if MDK_CONF_CTaoCryptBenchmark == 0
#define NO_CRYPT_BENCHMARK
#define NO_CRYPT_BENCHMARK
#define BENCH_EMBEDDED
#endif
// </e>
@ -120,7 +120,7 @@
// <h>SSL (Included by default)
// </h>
// <e>TLS
// <e>TLS
#define MDK_CONF_TLS 1
#if MDK_CONF_TLS == 0
#define NO_TLS
@ -179,10 +179,10 @@
#define WOLFSSL_SHA384
#endif
// </e>
// <e>SHA-512
// <e>SHA-512
#define MDK_CONF_SHA512 0
#if MDK_CONF_SHA512 == 1
#define WOLFSSL_SHA512
#define WOLFSSL_SHA512
#endif
// </e>
// <e>RIPEMD
@ -210,7 +210,7 @@
#endif
// </e>
// <e>AEAD
// <e>AEAD
#define MDK_CONF_AEAD 0
#if MDK_CONF_AEAD == 1
#define HAVE_AEAD
@ -237,7 +237,7 @@
#endif
// </e>
// <e>DSA
#define MDK_CONF_DSA 1
#define MDK_CONF_DSA 1
#if MDK_CONF_DSA == 0
#define NO_DSA
#endif

View File

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

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@ -35,7 +35,7 @@
* Initialize a Flash Memory Card
*----------------------------------------------------------------------------*/
#if !defined(NO_FILESYSTEM)
static void init_card (void)
static void init_card (void)
{
U32 retv;
@ -55,14 +55,14 @@ static void init_card (void)
* TCP/IP tasks
*----------------------------------------------------------------------------*/
#ifdef WOLFSSL_KEIL_TCP_NET
__task void tcp_tick (void)
__task void tcp_tick (void)
{
WOLFSSL_MSG("Time tick started.") ;
#if defined (HAVE_KEIL_RTX)
os_itv_set (10);
#endif
while (1) {
#if defined (HAVE_KEIL_RTX)
os_itv_wait ();
@ -99,11 +99,11 @@ extern void benchmark_test(void) ;
extern void SER_Init(void) ;
/*-----------------------------------------------------------------------------
* mian entry
* mian entry
*----------------------------------------------------------------------------*/
/*** This is the parent task entry ***/
void main_task (void)
void main_task (void)
{
#ifdef WOLFSSL_KEIL_TCP_NET
init_TcpNet ();
@ -111,8 +111,8 @@ void main_task (void)
os_tsk_create (tcp_tick, 2);
os_tsk_create (tcp_poll, 1);
#endif
#ifdef WOLFSSL_MDK_SHELL
#ifdef WOLFSSL_MDK_SHELL
#ifdef HAVE_KEIL_RTX
os_tsk_create_user(shell_main, 1, Shell_stack, SHELL_STACKSIZE) ;
#else
@ -124,8 +124,8 @@ void main_task (void)
/*** USER APPLICATION HERE ***/
/************************************/
printf("USER LOGIC STARTED\n") ;
#endif
#endif
#ifdef HAVE_KEIL_RTX
WOLFSSL_MSG("Terminating tcp_main\n") ;
@ -148,7 +148,7 @@ extern void SystemInit(void);
int main() {
SystemInit();
SystemInit();
#if !defined(NO_FILESYSTEM)
init_card () ; /* initializing SD card */
#endif
@ -157,7 +157,7 @@ int main() {
printf("Turning ON Debug message\n") ;
wolfSSL_Debugging_ON() ;
#endif
#ifdef HAVE_KEIL_RTX
os_sys_init (main_task) ;
#else

View File

@ -1,6 +1,6 @@
/*shell.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -19,9 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/*** tiny Shell for wolfSSL apps ***/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@ -185,7 +185,7 @@ extern void dh_test(void *arg) ;
#ifndef NO_DSA
extern void dsa_test(void *arg) ;
#endif
#ifndef NO_PWDBASED
extern void pwdbased_test(void *arg) ;
#endif
@ -276,8 +276,8 @@ static struct {
#ifndef NO_DES3
"des", des_test,
"des3", des3_test,
#endif
#ifndef NO_AES
#endif
#ifndef NO_AES
"aes", aes_test,
#ifdef HAVE_AESGCM
"aesgcm", aesgcm_test,
@ -299,10 +299,10 @@ static struct {
#endif
#ifndef NO_DSA
"dsa", dsa_test,
#endif
#endif
#ifndef NO_PWDBASED
"pwdbased", pwdbased_test,
#endif
#endif
#ifdef OPENSSL_EXTRA
"openssl", openssl_test,
#endif
@ -320,22 +320,22 @@ enum jobtype { FORGROUND, BACKGROUND } ;
#define IF_DELIMITER(ch) ((ch) == ' ' || (ch) == '\n')
/******* Get Command Line *****************************/
static int getline(char * line, int sz, func_args *args, int*bf_flg)
static int getline(char * line, int sz, func_args *args, int*bf_flg)
{
char * ret ;
int i ;
#define MAXARGS 10
#define MAXARGLEN 30
static char *argv[MAXARGS] ;
args->argv = argv ;
putchar('>') ;
fflush(stdout) ;
ret = fgets(line, sz, stdin) ;
#define SHELL_ERROR_FGETS -102
if(ret != line) return(SHELL_ERROR_FGETS) ;
if(line[strlen(line)-2] == '&') {
(*bf_flg) = BACKGROUND ;
line[strlen(line)-2] = '\n' ;
@ -363,22 +363,22 @@ static int BackGround = 0 ; /* 1: background job is running */
#define IP_SIZE 16
#ifdef WOLFSSL_KEIL_NET
static void ipaddr_comm(void *args)
static void ipaddr_comm(void *args)
{
if(((func_args *)args)->argc == 1) {
printf("IP addr: %s, port %d\n", wolfSSLIP, wolfSSLPort) ;
} else {
if(BackGround != 0) {
printf("Cannot change IP addr while background server is running\n") ;
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-'&&
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-'&&
((func_args *)args)->argv[1][1] == 'a' ) {
/* strcpy(wolfSSLIP, ((func_args *)args)->argv[2]) ; */
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-' &&
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-' &&
((func_args *)args)->argv[1][1] == 'p' ) {
/* yasslPort = atoi(((func_args *)args)->argv[2]) ; */
} else printf("Invalid argument\n") ;
} else printf("Invalid argument\n") ;
}
}
@ -389,7 +389,7 @@ static void ipaddr_comm(void *args)
#if defined(HAVE_KEIL_RTX)
static int stack_ck = 0 ;
static void stack_comm(void *args)
static void stack_comm(void *args)
{
if(stack_ck) {
printf("Stack Check: Off\n") ;
@ -399,7 +399,7 @@ static void stack_comm(void *args)
stack_ck = 1 ;
}
}
#define FILL_PATTERN 0xa596695a
void stack_fill(char * stack, int size)
{
@ -410,13 +410,13 @@ void stack_fill(char * stack, int size)
((int *)stack)[i] = FILL_PATTERN ;
}
void stack_check(char * stack, int size)
void stack_check(char * stack, int size)
{
int i ;
if(stack_ck == 0)return ;
if(stack_ck == 1) {
stack_ck ++ ; return ;
stack_ck ++ ; return ;
}
for(i=1; i<size/4 ; i++) {
if(((int *)stack)[i] != FILL_PATTERN) break ;
@ -432,7 +432,7 @@ void stack_check(char * stack, int size)
static int for_iteration = 1 ;
static void for_command(void *args)
static void for_command(void *args)
{
if( args == NULL || ((func_args *)args)->argc == 1) {
printf("For %d times\n", for_iteration) ;
@ -446,7 +446,7 @@ static void for_command(void *args)
static int wolfsslDebug = 1 ;
static void dbg_comm(void *args)
static void dbg_comm(void *args)
{
if(wolfsslDebug == 1) {
wolfsslDebug = 0 ;
@ -460,9 +460,9 @@ static void dbg_comm(void *args)
}
#endif
static void help_comm(void *args)
static void help_comm(void *args)
{
}
@ -484,12 +484,12 @@ static wolfSSL_Mutex command_mutex ;
#endif
/*********** Invoke Forground Command *********************/
static void command_invoke(void *args)
static void command_invoke(void *args)
{
void (*func)(void * ) ;
int i,iteration ;
func = (void(*)(void *))((func_args *)args)->argv[0] ;
func = (void(*)(void *))((func_args *)args)->argv[0] ;
#ifdef HAVE_KEIL_RTX
wc_LockMutex((wolfSSL_Mutex *)&command_mutex) ;
#endif
@ -499,14 +499,14 @@ static void command_invoke(void *args)
#if defined(HAVE_KEIL_RTX)
stack_fill(command_stack, COMMAND_STACK_SIZE) ;
#endif
func(args) ; /* invoke command */
#if defined(HAVE_KEIL_RTX)
stack_check(command_stack, COMMAND_STACK_SIZE) ;
#endif
}
if(iteration > 1)
if(iteration > 1)
for_iteration = 1 ;
#ifdef HAVE_KEIL_RTX
wc_UnLockMutex((wolfSSL_Mutex *)&command_mutex) ;
@ -517,12 +517,12 @@ static void command_invoke(void *args)
#if (!defined(NO_SIMPLE_SERVER) && !defined(NO_ECHOSERVER)) && \
defined(HAVE_KEIL_RTX)
/******* Invoke Background Job *******************************/
static void bg_job_invoke(void *args)
static void bg_job_invoke(void *args)
{
void (*func)(void * ) ;
BackGround = 1 ;
BackGround = 1 ;
stack_fill(bg_job_stack, BG_JOB_STACK_SIZE) ;
func = (void(*)(void *))((func_args *)args)->argv[0] ;
func = (void(*)(void *))((func_args *)args)->argv[0] ;
func(args) ; /* invoke command */
stack_check(bg_job_stack, BG_JOB_STACK_SIZE) ;
#ifdef WOLFSSL_KEIL_NET
@ -539,14 +539,14 @@ static char line[LINESIZE] ;
/********* SHEULL MAIN LOOP ***********************************/
void shell_main(void) {
int i ;
int i ;
func_args args ;
int bf_flg ;
i = BackGround ;
i = BackGround ;
/* Dummy for avoiding warning: BackGround is defined but not used. */
#if defined(HAVE_KEIL_RTX)
wc_InitMutex(&command_mutex) ;
#endif
@ -574,9 +574,9 @@ void shell_main(void) {
if(BackGround != 0) {
printf("Multiple background servers not supported.\n") ;
} else {
printf("\"%s\" is running with the background mode.\n",
printf("\"%s\" is running with the background mode.\n",
commandTable[i].command) ;
os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke,
os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke,
6, bg_job_stack, BG_JOB_STACK_SIZE, &args) ;
}
#else

View File

@ -1,6 +1,6 @@
/* time-STM32F2.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -19,23 +19,23 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdint.h>
#define DWT ((DWT_Type *) (0xE0001000UL) )
#include <stdint.h>
#define DWT ((DWT_Type *) (0xE0001000UL) )
typedef struct
{
uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */
uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */
uint32_t CTRL; /*< Offset: 0x000 (R/W) Control Register */
uint32_t CYCCNT; /*< Offset: 0x004 (R/W) Cycle Count Register */
} DWT_Type;
extern uint32_t SystemCoreClock ;
double current_time(int reset)
double current_time(int reset)
{
if(reset) DWT->CYCCNT = 0 ;
return ((double)DWT->CYCCNT/SystemCoreClock) ;

View File

@ -1,6 +1,6 @@
/* time-dummy.c.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -19,16 +19,16 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "time.h"
struct tm *wolfssl_MDK_gmtime(const time_t *c)
{
static struct tm date ;
struct tm *wolfssl_MDK_gmtime(const time_t *c)
{
static struct tm date ;
return(&date) ;
}

View File

@ -1,6 +1,6 @@
/* wolfssl_KEIL_RL.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -35,8 +35,8 @@
#if defined(WOLFSSL_MDK5)
#include "cmsis_os.h"
#include "rl_fs.h"
#include "rl_net.h"
#include "rl_fs.h"
#include "rl_net.h"
#else
#include "rtl.h"
#endif
@ -58,7 +58,7 @@
/** TCPnet BSD socket does not have following functions. **/
#if defined(WOLFSSL_KEIL_TCP_NET)
char *inet_ntoa(struct in_addr in)
char *inet_ntoa(struct in_addr in)
{
#define NAMESIZE 16
static char name[NAMESIZE] ;
@ -76,11 +76,11 @@ unsigned long inet_addr(const char *cp)
/*** tcp_connect is actually associated with following syassl_tcp_connect. ***/
int wolfssl_connect(int sd, const struct sockaddr* sa, int sz)
int wolfssl_connect(int sd, const struct sockaddr* sa, int sz)
{
int ret = 0 ;
#if defined(WOLFSSL_KEIL_TCP_NET)
#if defined(WOLFSSL_KEIL_TCP_NET)
SOCKADDR_IN addr ;
addr = *(SOCKADDR_IN *)sa ;
@ -91,19 +91,19 @@ int wolfssl_connect(int sd, const struct sockaddr* sa, int sz)
os_dly_wait(50);
} while(ret == SCK_EWOULDBLOCK) ;
#ifdef DEBUG_WOLFSSL
{
{
char msg[50] ;
sprintf(msg, "BSD Connect return code: %d\n", ret) ;
WOLFSSL_MSG(msg) ;
}
#endif
#endif /* WOLFSSL_KEIL_TCP_NET */
return(ret ) ;
}
int wolfssl_accept(int sd, struct sockaddr *addr, int *addrlen)
int wolfssl_accept(int sd, struct sockaddr *addr, int *addrlen)
{
int ret = 0 ;
@ -113,24 +113,24 @@ int wolfssl_accept(int sd, struct sockaddr *addr, int *addrlen)
ret = accept(sd, addr, addrlen) ;
if(ret != SCK_EWOULDBLOCK) break ;
os_dly_wait(1);
}
}
#ifdef DEBUG_WOLFSSL
{
char msg[50] ;
sprintf(msg, "BSD Accept return code: %d\n", ret) ;
WOLFSSL_MSG(msg) ;
WOLFSSL_MSG(msg) ;
}
#endif
#endif /* WOLFSSL_KEIL_TCP_NET */
return(ret ) ;
}
int wolfssl_recv(int sd, void *buf, size_t len, int flags)
int wolfssl_recv(int sd, void *buf, size_t len, int flags)
{
int ret = 0;
#if defined(WOLFSSL_KEIL_TCP_NET)
#if defined(WOLFSSL_KEIL_TCP_NET)
while(1) {
#undef recv /* Go to KEIL TCPnet recv */
ret = recv(sd, buf, len, flags) ;
@ -138,10 +138,10 @@ int wolfssl_recv(int sd, void *buf, size_t len, int flags)
os_dly_wait(1);
}
#ifdef DEBUG_WOLFSSL
{
{
char msg[50] ;
sprintf(msg, "BSD Recv return code: %d\n", ret) ;
WOLFSSL_MSG(msg) ;
WOLFSSL_MSG(msg) ;
}
#endif
@ -149,22 +149,22 @@ int wolfssl_recv(int sd, void *buf, size_t len, int flags)
return(ret ) ;
}
int wolfssl_send(int sd, const void *buf, size_t len, int flags)
int wolfssl_send(int sd, const void *buf, size_t len, int flags)
{
int ret = 0 ;
#if defined(WOLFSSL_KEIL_TCP_NET)
#if defined(WOLFSSL_KEIL_TCP_NET)
while(1) {
#undef send /* Go to KEIL TCPnet send */
ret = send(sd, buf, len, flags) ;
if(ret != SCK_EWOULDBLOCK) break ;
os_dly_wait(1);
}
}
#ifdef DEBUG_WOLFSSL
{
char msg[50] ;
sprintf(msg, "BSD Send return code: %d\n", ret) ;
WOLFSSL_MSG(msg) ;
WOLFSSL_MSG(msg) ;
}
#endif
@ -175,49 +175,49 @@ int wolfssl_send(int sd, const void *buf, size_t len, int flags)
#endif /* WOLFSSL_KEIL_TCP_NET */
#if defined(WOLFSSL_KEIL_TCP_NET)
void wolfssl_sleep(int t)
#if defined(WOLFSSL_KEIL_TCP_NET)
void wolfssl_sleep(int t)
{
#if defined(HAVE_KEIL_RTX)
os_dly_wait(t/1000+1) ;
#endif
}
int wolfssl_tcp_select(int sd, int timeout)
int wolfssl_tcp_select(int sd, int timeout)
{
return 0 ;
}
#endif
FILE * wolfSSL_fopen(const char *name, const char *openmode)
FILE * wolfSSL_fopen(const char *name, const char *openmode)
{
int i ; FILE * ret ;
#define PATHSIZE 100
char path[PATHSIZE] ; char *p ;
if(strlen(name) > PATHSIZE)return(NULL) ;
for(i = 0; i<= strlen(name); i++) {
if(name[i] == '/')path[i] = '\\' ;
else path[i] = name[i] ;
}
}
if(path[0] == '.' && path[1] == '\\') p = path + 2 ;
else p = path ;
ret = fopen (p, openmode) ;
return(ret) ;
}
#define getkey getchar
#define sendchar putchar
char * wolfssl_fgets ( char * str, int num, FILE * f )
char * wolfssl_fgets ( char * str, int num, FILE * f )
{
int i ;
for(i = 0 ; i< num ; i++) {
while((str[i] = getkey()) == 0) {
#if defined (HAVE_KEIL_RTX) && !defined(WOLFSSL_CMSIS_RTOS)
@ -228,15 +228,15 @@ char * wolfssl_fgets ( char * str, int num, FILE * f )
}
if(str[i] == '\n' || str[i] == '\012' || str[i] == '\015') {
sendchar('\n') ;
str[i++] = '\n' ;
str[i] = '\0' ;
str[i++] = '\n' ;
str[i] = '\0' ;
break ;
} else if(str[i] == '\010') { /* BS */
if(i) { /* erace one char */
sendchar('\010') ; sendchar(' ') ; sendchar('\010') ;
sendchar('\010') ; sendchar(' ') ; sendchar('\010') ;
i = (i>0 ? (i-2) : -1 ) ;
continue ;
}
}
} else if(str[i] == '\033' || str[i] == '\004' ) { /* ESC or ^D */
str[i] = '\0' ;
return(0) ;

View File

@ -1,6 +1,6 @@
/* wolfssl_KEIL_RL.h
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -31,7 +31,7 @@
#include <stdio.h>
/* Go to STDIN */
#define fgets(buff, sz, fd) wolfssl_fgets(buff, sz, fd)
#define fgets(buff, sz, fd) wolfssl_fgets(buff, sz, fd)
extern char * wolfssl_fgets ( char * str, int num, FILE * f ) ;
#define SOCKET_T int
@ -53,19 +53,19 @@ struct timeval {
long tv_usec; /* microseconds */
};
#if defined(WOLFSSL_KEIL_TCP_NET)
#if defined(WOLFSSL_KEIL_TCP_NET)
#if defined(WOLFSSL_MDK5)
#define SCK_EWOULDBLOCK BSD_ERROR_WOULDBLOCK
#define SCK_ETIMEOUT BSD_ERROR_TIMEOUT
#include "rl_net.h"
#include "rl_net.h"
#endif
typedef int socklen_t ;
/* for avoiding conflict with KEIL-TCPnet BSD socket */
/* Bodies are in wolfssl_KEIL_RL.c */
#define connect(a,b,c) wolfssl_connect(a, (struct sockaddr* )(b), c)
#define connect(a,b,c) wolfssl_connect(a, (struct sockaddr* )(b), c)
#define accept wolfssl_accept
#define recv wolfssl_recv
#define send wolfssl_send
@ -73,7 +73,7 @@ typedef int socklen_t ;
/* for avoiding conflicting with KEIL-TCPnet TCP socket */
/* Bodies are in test.h */
#define tcp_connect wolfssl_tcp_connect
#define tcp_connect wolfssl_tcp_connect
#define tcp_socket wolfssl_tcp_soket
#define tcp_listen wolfssl_tcp_listen
#define tcp_select wolfssl_tcp_select
@ -89,7 +89,7 @@ extern int wolfssl_tcp_select(int sd, int timeout) ;
/* TCPnet BSD socket does not have following functions. */
extern char *inet_ntoa(struct in_addr in);
extern unsigned long inet_addr(const char *cp);
extern int setsockopt(int sockfd, int level, int optname,
extern int setsockopt(int sockfd, int level, int optname,
const void *optval, socklen_t optlen);
extern int select(int nfds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, const struct timeval *timeout);

View File

@ -1223,8 +1223,8 @@
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\src\io.c</PathWithFileName>
<FilenameWithoutPath>io.c</FilenameWithoutPath>
<PathWithFileName>..\..\..\src\wolfio.c</PathWithFileName>
<FilenameWithoutPath>wolfio.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>

View File

@ -657,9 +657,9 @@
<FilePath>..\..\..\src\internal.c</FilePath>
</File>
<File>
<FileName>io.c</FileName>
<FileName>wolfio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\src\io.c</FilePath>
<FilePath>..\..\..\src\wolfio.c</FilePath>
</File>
<File>
<FileName>keys.c</FileName>
@ -1366,9 +1366,9 @@
<FilePath>..\..\..\src\internal.c</FilePath>
</File>
<File>
<FileName>io.c</FileName>
<FileName>wolfio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\src\io.c</FilePath>
<FilePath>..\..\..\src\wolfio.c</FilePath>
</File>
<File>
<FileName>keys.c</FileName>
@ -2075,9 +2075,9 @@
<FilePath>..\..\..\src\internal.c</FilePath>
</File>
<File>
<FileName>io.c</FileName>
<FileName>wolfio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\src\io.c</FilePath>
<FilePath>..\..\..\src\wolfio.c</FilePath>
</File>
<File>
<FileName>keys.c</FileName>

View File

@ -1,6 +1,6 @@
/* main.c
/* time-STM32F2xx.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -19,16 +19,16 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "time.h"
#define PERIPH_BASE ((uint32_t)0x40000000)
#define PERIPH_BASE ((uint32_t)0x40000000)
/*-----------------------------------------------------------------------------
* initialize RTC
* initialize RTC
*----------------------------------------------------------------------------*/
#include "stm32f2xx.h"
@ -46,15 +46,15 @@
#define CR_OFFSET (PWR_OFFSET + 0x00)
#define DBP_BitNumber 0x08
#define CR_DBP_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (DBP_BitNumber * 4))
#define RTC_INIT_MASK ((uint32_t)0xFFFFFFFF)
#define RTC_INIT_MASK ((uint32_t)0xFFFFFFFF)
#define INITMODE_TIMEOUT ((uint32_t) 0x00010000)
static void init_RTC()
static void init_RTC()
{
__IO uint32_t initcounter = 0x00 ;
uint32_t initstatus = 0x00; /* Enable the PWR clock : RCC_APB1Periph_PWR */
uint32_t initstatus = 0x00; /* Enable the PWR clock : RCC_APB1Periph_PWR */
((uint32_t *)RCC)[0x10] |= ((uint32_t)0x10000000) ;
/* Allow access to RTC */
*(__IO uint32_t *) CR_DBP_BB = ENABLE ;
/* RCC_LSEConfig(RCC_LSE_ON) */
@ -62,7 +62,7 @@ static void init_RTC()
/* Reset LSEBYP bit */
*(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x00);
*(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x01);
/* Wait till LSE is ready */
/* Wait till LSE is ready */
while((RCC->BDCR << 0x2) == 0x0) { }
/* Select the RTC clock source: RCC_RTCCLKSource_LSE */
((RCC_TypeDef *)RCC)->BDCR |= (uint32_t)0x00000100;
@ -70,13 +70,13 @@ static void init_RTC()
/* Enable the RTC Clock */
*(__IO uint32_t *) (PERIPH_BB_BASE + (((RCC_BASE - PERIPH_BASE)+ 0x70) * 32) + (0x0F* 4)) = (uint32_t)ENABLE;
*(__IO uint32_t *) CR_DBP_BB = (uint32_t)ENABLE;
*(__IO uint32_t *) CR_DBP_BB = (uint32_t)ENABLE;
RTC->ISR = (uint32_t) RTC_INIT_MASK;
do {
initstatus = RTC->ISR & RTC_ISR_INITF;
initcounter++;
initcounter++;
} while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00));
/* Disable the write protection for RTC registers */
RTC->WPR = 0xCA;
RTC->WPR = 0x53;
@ -86,14 +86,14 @@ static void init_RTC()
RTC->CR |= ((uint32_t)0x00000000) ; /* RTC_HourFormat_24 */
/* Configure the RTC PRER */
RTC->PRER = 0x7f ;
RTC->PRER = 0x7f ;
RTC->PRER |= (uint32_t)(0xff << 16);
/* Exit Initialization mode */
RTC->ISR &= (uint32_t)~RTC_ISR_INIT;
RTC->ISR &= (uint32_t)~RTC_ISR_INIT;
/* Enable the write protection for RTC registers */
RTC->WPR = 0xFF;
RTC->WPR = 0xFF;
}
/*-----------------------------------------------------------------------------
@ -108,16 +108,16 @@ static void init_TIM()
((uint32_t *)RCC)[0x10] |= RCC_APB1Periph_TIM2 ;
tmpcr1 = TIM2->CR1 ;
tmpcr1 &= (uint16_t) (~(((uint16_t)0x0010) | ((uint16_t)0x0060) ));
tmpcr1 &= (uint16_t) (~(((uint16_t)0x0010) | ((uint16_t)0x0060) ));
/* CR1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS) */
tmpcr1 |= (uint16_t)0x0000 ; /* CR1 |= TIM_CounterMode_Up */
TIM2->CR1= tmpcr1 ;
TIM2->ARR = 0xffffffff ; /* ARR= TIM_Period */
TIM2->PSC = 60 ; /* PSC = TIM_Prescaler */
TIM2->EGR = ((uint16_t)0x0001) ; /* EGR = TIM_PSCReloadMode_Immediate */
TIM2->EGR = ((uint16_t)0x0001) ; /* EGR = TIM_PSCReloadMode_Immediate */
*(uint16_t *)(PERIPH_BASE+0x0) |=((uint16_t)0x0001) ;
*(uint16_t *)(PERIPH_BASE+0x0) |=((uint16_t)0x0001) ;
/* TIM_Cmd(TIM2, ENABLE) ; */
}
@ -129,10 +129,10 @@ void init_time(void) {
static void GetTime(uint8_t *h, uint8_t *m, uint8_t *s)
{
uint32_t tmpreg = 0;
tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK);
tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK);
*h = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> 16));
*m = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8));
*s = (uint8_t)Bcd2ToByte((tmpreg & (RTC_TR_ST | RTC_TR_SU)));
*s = (uint8_t)Bcd2ToByte((tmpreg & (RTC_TR_ST | RTC_TR_SU)));
}
static uint32_t ByteToBcd2(uint8_t Value)
@ -151,29 +151,29 @@ static void SetTime(uint8_t h, uint8_t m, uint8_t s)
uint32_t synchrostatus = 0x00;
__IO uint32_t initcounter = 0;
uint32_t initstatus = 0x00;
uint32_t tmpreg ;
uint32_t tmpreg ;
tmpreg = ((ByteToBcd2(h) << 16) | (ByteToBcd2(m) << 8) | ByteToBcd2(s)) ;
/* Disable the write protection for RTC registers */
RTC->WPR = 0xCA;
RTC->WPR = 0x53;
RTC->ISR &= (uint32_t)~RTC_ISR_INIT;
RTC->ISR &= (uint32_t)~RTC_ISR_INIT;
RTC->ISR = (uint32_t)RTC_INIT_MASK;
/* Wait till RTC is in INIT state and if Time out is reached exit */
do {
initstatus = RTC->ISR & RTC_ISR_INITF;
initcounter++;
initcounter++;
} while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00));
RTC->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK);
RTC->ISR &= (uint32_t)RTC_RSF_MASK;
/* Wait the registers to be synchronised */
do {
synchrostatus = RTC->ISR & RTC_ISR_RSF;
synchrocounter++;
synchrocounter++;
} while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00));
RTC->WPR = 0xFF;
@ -182,7 +182,7 @@ static void SetTime(uint8_t h, uint8_t m, uint8_t s)
static void GetDate(uint8_t *y, uint8_t *m, uint8_t *d)
{
uint32_t tmpreg = 0;
tmpreg = (uint32_t)(RTC->DR & RTC_TR_RESERVED_MASK);
tmpreg = (uint32_t)(RTC->DR & RTC_TR_RESERVED_MASK);
*y = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_DR_YT|RTC_DR_YU)) >>16));
*m = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_DR_MT|RTC_DR_MU)) >> 8));
*d = (uint8_t)Bcd2ToByte((uint8_t)(tmpreg & (RTC_DR_DT |RTC_DR_DU)));
@ -194,20 +194,20 @@ static void SetDate(uint8_t y, uint8_t m, uint8_t d)
uint32_t synchrostatus = 0x00;
__IO uint32_t initcounter = 0;
uint32_t initstatus = 0x00;
uint32_t tmpreg = 0 ;
uint32_t tmpreg = 0 ;
tmpreg = ((ByteToBcd2(y) << 16) | (ByteToBcd2(m) << 8) | ByteToBcd2(d)) ;
/* Disable the write protection for RTC registers */
RTC->WPR = 0xCA;
RTC->WPR = 0x53;
RTC->ISR &= (uint32_t)~RTC_ISR_INIT;
RTC->ISR &= (uint32_t)~RTC_ISR_INIT;
RTC->ISR = (uint32_t)RTC_INIT_MASK;
/* Wait till RTC is in INIT state and if Time out is reached exit */
do {
initstatus = RTC->ISR & RTC_ISR_INITF;
initcounter++;
initcounter++;
} while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00));
RTC->DR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK);
@ -216,7 +216,7 @@ static void SetDate(uint8_t y, uint8_t m, uint8_t d)
/* Wait the registers to be synchronised */
do {
synchrostatus = RTC->ISR & RTC_ISR_RSF;
synchrocounter++;
synchrocounter++;
} while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00));
RTC->WPR = 0xFF;
@ -226,11 +226,11 @@ static void SetDate(uint8_t y, uint8_t m, uint8_t d)
#include <stdio.h>
void CYASSL_MSG(const char *msg) ;
struct tm *Cyassl_MDK_gmtime(const time_t *c)
{
struct tm *Cyassl_MDK_gmtime(const time_t *c)
{
uint8_t h, m, s ;
uint8_t y, mo, d ;
static struct tm date ;
static struct tm date ;
GetTime(&h, &m, &s) ;
GetDate(&y, &mo, &d) ;
@ -242,20 +242,20 @@ struct tm *Cyassl_MDK_gmtime(const time_t *c)
date.tm_min = m ;
date.tm_sec = s ;
#if defined(DEBUG_CYASSL)
#if defined(DEBUG_CYASSL)
{
char msg[100] ;
sprintf(msg,
sprintf(msg,
"Debug::Cyassl_KEIL_gmtime(DATE=/%2d/%02d/%04d TIME=%02d:%02d:%02d)\n",
d, mo, y+2000, h, m, s) ;
CYASSL_MSG(msg) ;
d, mo, y+2000, h, m, s) ;
CYASSL_MSG(msg) ;
}
#endif
return(&date) ;
}
double current_time()
double current_time()
{
return ((double)TIM2->CNT/1000000.0) ;
}
@ -266,35 +266,35 @@ typedef struct func_args {
int return_code;
} func_args;
void time_main(void *args)
void time_main(void *args)
{
char * datetime ;
uint8_t h, m, s ;
uint8_t y, mo, d ;
if( args == NULL || ((func_args *)args)->argc == 1) {
GetTime(&h, &m, &s) ;
GetDate(&y, &mo, &d) ;
printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n",
mo, d, y+2000, h, m, s) ;
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-' &&
printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n",
mo, d, y+2000, h, m, s) ;
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-' &&
((func_args *)args)->argv[1][1] == 'd' ) {
datetime = ((func_args *)args)->argv[2];
sscanf(datetime, "%d/%d/%d", (int *)&mo, (int *)&d, (int *) &y) ;
SetDate(y-2000, mo, d) ;
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-' &&
SetDate(y-2000, mo, d) ;
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-' &&
((func_args *)args)->argv[1][1] == 't' ) {
datetime = ((func_args *)args)->argv[2];
sscanf(datetime, "%d:%d:%d",
sscanf(datetime, "%d:%d:%d",
(int *)&h, (int *)&m, (int *)&s) ;
SetTime(h, m, s) ;
} else printf("Invalid argument\n") ;
} else printf("Invalid argument\n") ;
}
/*******************************************************************
time()
time()
********************************************************************/
time_t time(time_t * t) { return 0 ; }

View File

@ -1,304 +0,0 @@
/* config-Crypt.h
*
* Copyright (C) 2006-2016 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
*/
// <<< Use Configuration Wizard in Context Menu >>>
// <h> wolfCrypt Configuration
// <h>Cert/Key Strage
// <o>Cert Storage <0=> SD Card <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes)
#define MDK_CONF_CERT_BUFF 0
#if MDK_CONF_CERT_BUFF== 1
#define USE_CERT_BUFFERS_1024
#elif MDK_CONF_CERT_BUFF == 2
#define USE_CERT_BUFFERS_2048
#endif
//</h>
// <h>Crypt Algrithm
// <e>MD2
#define MDK_CONF_MD2 1
#if MDK_CONF_MD2 == 1
#define WOLFSSL_MD2
#endif
// </e>
// <e>MD4
#define MDK_CONF_MD4 1
#if MDK_CONF_MD4 == 0
#define NO_MD4
#endif
// </e>
// <e>MD5
#define MDK_CONF_MD5 1
#if MDK_CONF_MD5 == 0
#define NO_MD5
#endif
// </e>
// <e>SHA
#define MDK_CONF_SHA 1
#if MDK_CONF_SHA == 0
#define NO_SHA
#endif
// </e>
// <e>SHA-256
#define MDK_CONF_SHA256 1
#if MDK_CONF_SHA256 == 0
#define NO_SHA256
#endif
// </e>
// <e>SHA-384
#define MDK_CONF_SHA384 1
#if MDK_CONF_SHA384 == 1
#define WOLFSSL_SHA384
#endif
// </e>
// <e>SHA-512
#define MDK_CONF_SHA512 1
#if MDK_CONF_SHA512 == 1
#define WOLFSSL_SHA512
#endif
// </e>
// <e>RIPEMD
#define MDK_CONF_RIPEMD 1
#if MDK_CONF_RIPEMD == 1
#define WOLFSSL_RIPEMD
#endif
// </e>
// <e>BLAKE2
#define MDK_CONF_BLAKE2 0
#if MDK_CONF_BLAKE2 == 1
#define HAVE_BLAKE2
#endif
// </e>
// <e>HMAC
#define MDK_CONF_HMAC 1
#if MDK_CONF_HMAC == 0
#define NO_HMAC
#endif
// </e>
// <e>HMAC KDF
#define MDK_CONF_HKDF 1
#if MDK_CONF_HKDF == 1
#define HAVE_HKDF
#endif
// </e>
// <e>AES CCM
#define MDK_CONF_AESCCM 1
#if MDK_CONF_AESCCM == 1
#define HAVE_AESCCM
#endif
// </e>
// <e>AES GCM
#define MDK_CONF_AESGCM 1
#if MDK_CONF_AESGCM == 1
#define HAVE_AESGCM
#endif
// </e>
// <e>RC4
#define MDK_CONF_RC4 1
#if MDK_CONF_RC4 == 0
#define NO_RC4
#endif
// </e>
// <e>HC128
#define MDK_CONF_HC128 1
#if MDK_CONF_AESGCM == 0
#define NO_HC128
#endif
// </e>
// <e>RABBIT
#define MDK_CONF_RABBIT 1
#if MDK_CONF_RABBIT == 0
#define NO_RABBIT
#endif
// </e>
// <e>CHACHA
#define MDK_CONF_CHACHA 1
#if MDK_CONF_CHACHA == 1
#define HAVE_CHACHA
#endif
// </e>
// <e>POLY1305
#define MDK_CONF_POLY1305 1
#if MDK_CONF_POLY1305 == 1
#define HAVE_POLY1305
#define HAVE_ONE_TIME_AUTH
#endif
// </e>
// <e>DES3
#define MDK_CONF_DES3 1
#if MDK_CONF_DES3 == 0
#define NO_DES3
#endif
// </e>
// <e>AES
#define MDK_CONF_AES 1
#if MDK_CONF_AES == 0
#define NO_AES
#endif
// </e>
// <e>CAMELLIA
#define MDK_CONF_CAMELLIA 1
#if MDK_CONF_CAMELLIA == 1
#define HAVE_CAMELLIA
#endif
// </e>
// <e>DH
#define MDK_CONF_DH 1
#if MDK_CONF_DH == 0
#define NO_DH
#endif
// </e>
// <e>DSA
#define MDK_CONF_DSA 1
#if MDK_CONF_DSA == 0
#define NO_DSA
#endif
// </e>
// <e>SRP
#define MDK_CONF_SRP 1
#if MDK_CONF_SRP == 1
#define HAVE_SRP
#endif
// </e>
// <e>PWDBASED
#define MDK_CONF_PWDBASED 1
#if MDK_CONF_PWDBASED == 0
#define NO_PWDBASED
#endif
// </e>
// <e>ECC
#define MDK_CONF_ECC 1
#if MDK_CONF_ECC == 1
#define HAVE_ECC
#endif
// </e>
// <e>CURVE25519
#define MDK_CONF_CURVE25519 1
#if MDK_CONF_CURVE25519 == 1
#define HAVE_CURVE25519
#define CURVED25519_SMALL
//#define TFM_ECC256
#endif
// </e>
// <e>ED25519
#define MDK_CONF_ED25519 1
#if MDK_CONF_ED25519 == 1
#define HAVE_ED25519
#endif
// </e>
// <e>PKCS7
#define MDK_CONF_PKCS7 0
#if MDK_CONF_PKCS7 == 1
#define HAVE_PKCS7
#endif
// </e>
// <e>NTRU (need License, "crypto_ntru.h")
#define MDK_CONF_NTRU 0
#if MDK_CONF_NTRU == 1
#define HAVE_NTRU
#endif
// </e>
// </h>
// <h>Hardware Crypt (See document for usage)
// <e>Hardware RNG
#define MDK_CONF_STM32F2_RNG 0
#if MDK_CONF_STM32F2_RNG == 1
#define STM32F2_RNG
#else
#endif
// </e>
// <e>Hardware Crypt
#define MDK_CONF_STM32F2_CRYPTO 0
#if MDK_CONF_STM32F2_CRYPTO == 1
#define STM32F2_CRYPTO
#endif
// </e>
// </h>
// <h>Other Settings
// <e>Use Fast Math
#define MDK_CONF_FASTMATH 1
#if MDK_CONF_FASTMATH == 1
#define USE_FAST_MATH
#define TFM_TIMING_RESISTANT
#endif
// </e>
// <e>Small Stack
#define MDK_CONF_SmallStack 0
#if MDK_CONF_SmallStack == 0
#define NO_WOLFSSL_SMALL_STACK
#endif
// </e>
// <e>ErrNo.h
#define MDK_CONF_ErrNo 1
#if MDK_CONF_ErrNo == 1
#define HAVE_ERRNO
#endif
// </e>
// <e>Error Strings
#define MDK_CONF_ErrorStrings 1
#if MDK_CONF_ErrorStrings == 0
#define NO_ERROR_STRINGS
#endif
// </e>
// <e>zlib (need "zlib.h")
#define MDK_CONF_LIBZ 0
#if MDK_CONF_LIBZ == 1
#define HAVE_LIBZ
#endif
// </e>
// <e>CAVIUM (need CAVIUM headers)
#define MDK_CONF_CAVIUM 0
#if MDK_CONF_CAVIUM == 1
#define HAVE_CAVIUM
#endif
// </e>
// </h>
//</h>
// <<< end of configuration section >>>

View File

@ -1,29 +1,515 @@
/* user_settings.h
*
* Copyright (C) 2006-2017 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
*/
/* #define SINGLE_THREADED or define RTOS option */
#define WOLFSSL_CMSIS_RTOS
/* #define NO_FILESYSTEM or define Filesystem option */
#define WOLFSSL_KEIL_FS
#define NO_WOLFSSL_DIR
#define WOLFSSL_NO_CURRDIR
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
#define NO_MAIN_DRIVER
#define BENCH_EMBEDDED
#define NO_DEV_RANDOM
#define WOLFSSL_USER_CURRTIME
#define SIZEOF_LONG_LONG 8
#define NO_WRITEV
#define NO_DEV_RANDOM
/* define your Rand gen for the operational use */
#define WOLFSSL_GENSEED_FORTEST
#define USE_WOLFSSL_MEMORY
#define WOLFSSL_MALLOC_CHECK
#define TFM_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
#define WC_RSA_BLINDING
#define XVALIDATEDATE(d, f,t) (0)
#define WOLFSSL_USER_CURRTIME /* for benchmark */
#define WOLFSSL_CURRTIME_OSTICK /* use OS tich for current_time */
#define WOLFSSL_GMTIME
// <<< Use Configuration Wizard in Context Menu >>>
// <h>Common options
// <o> MPU<0=>Undefined<1=>STM32F2xx<2=>STM32F4xx<3=>STM32F7xx
#define MDK_CONF_MPU 3
#if MDK_CONF_MPU == 0
#elif MDK_CONF_MPU == 1
#define WOLFSSL_STM32_CUBEMX
#define STM32F2xx
#elif MDK_CONF_MPU == 2
#define WOLFSSL_STM32_CUBEMX
#define STM32F4xx
#elif MDK_CONF_MPU == 3
#define WOLFSSL_STM32_CUBEMX
#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
#define MDK_CONF_THREAD 14
#if MDK_CONF_THREAD== 0
#define SINGLE_THREADED
#elif MDK_CONF_THREAD == 1
#define FREERTOS
#elif MDK_CONF_THREAD == 3
#define WOLFSSL_SAFERTOS
#elif MDK_CONF_THREAD == 4
#define USE_WINDOWS_API
#elif MDK_CONF_THREAD == 5
#define WOLFSSL_PTHREADS
#elif MDK_CONF_THREAD == 6
#define THREADX
#define NETX
#elif MDK_CONF_THREAD == 7
#define MICRIUM
#elif MDK_CONF_THREAD == 8
#define EBSNET
#elif MDK_CONF_THREAD == 9
#define FREESCALE_MQX
#define FREESCALE_KSDK_MQX
#elif MDK_CONF_THREAD == 10
#define WOLFSSL_TIRTOS
#elif MDK_CONF_THREAD == 11
#define WOLFSSL_uITRON4
#elif MDK_CONF_THREAD == 12
#define WOLFSSL_uTKERNEL2
#elif MDK_CONF_THREAD == 13
#define WOLFSSL_FROSTED
#elif MDK_CONF_THREAD == 14
#define WOLFSSL_CMSIS_RTOS
#elif MDK_CONF_THREAD == 15
#define SINGLE_THREADED
#endif
// <e>File System
#define MDK_CONF_FILESYSTEM 1
#if MDK_CONF_FILESYSTEM == 0
#define NO_FILESYSTEM
#else
#define WOLFSSL_KEIL_FS
#define NO_WOLFSSL_DIR
#endif
// </e>
// <o> Network<0=>None <1=>RLnet <2=>User I/O
#define MDK_CONF_NETWORK 1
#if MDK_CONF_NETWORK == 0
#elif MDK_CONF_NETWORK == 1
#define WOLFSSL_KEIL_TCP_NET
#elif MDK_CONF_NETWORK == 2
#define WOLFSSL_USER_IO
#endif
// <h>Debug options
// <e>Debug Message
#define MDK_CONF_DebugMessage 0
#if MDK_CONF_DebugMessage == 1
#define DEBUG_WOLFSSL
#endif
// </e>
// <e>Check malloc
#define MDK_CONF_CheckMalloc 1
#if MDK_CONF_CheckMalloc == 1
#define WOLFSSL_MALLOC_CHECK
#define USE_WOLFSSL_MEMORY
#endif
// </e>
// <e>ErrNo.h
#define MDK_CONF_ErrNo 1
#if MDK_CONF_ErrNo == 1
#define HAVE_ERRNO
#endif
// </e>
// <e>Error Strings
#define MDK_CONF_ErrorStrings 1
#if MDK_CONF_ErrorStrings == 0
#define NO_ERROR_STRINGS
#endif
// </e>
//</h>
//</h>
// <h> wolfCrypt Configuration
// <h>Hash/Crypt Algrithm
// <e>MD2
#define MDK_CONF_MD2 1
#if MDK_CONF_MD2 == 1
#define WOLFSSL_MD2
#endif
// </e>
// <e>MD4
#define MDK_CONF_MD4 1
#if MDK_CONF_MD4 == 0
#define NO_MD4
#endif
// </e>
// <e>MD5
#define MDK_CONF_MD5 1
#if MDK_CONF_MD5 == 0
#define NO_MD5
#endif
// </e>
// <e>SHA
#define MDK_CONF_SHA 1
#if MDK_CONF_SHA == 0
#define NO_SHA
#endif
// </e>
// <e>SHA-256
#define MDK_CONF_SHA256 1
#if MDK_CONF_SHA256 == 0
#define NO_SHA256
#endif
// </e>
// <e>SHA-384
#define MDK_CONF_SHA384 1
#if MDK_CONF_SHA384 == 1
#define WOLFSSL_SHA384
#endif
// </e>
// <e>SHA-512
#define MDK_CONF_SHA512 1
#if MDK_CONF_SHA512 == 1
#define WOLFSSL_SHA512
#endif
// </e>
// <e>Hash DRBG
#define MDK_CONF_HASHDRBG 1
#if MDK_CONF_HASHDRBG == 1
#define HAVE_HASHDRBG
#endif
// </e>
// <e>RIPEMD
#define MDK_CONF_RIPEMD 1
#if MDK_CONF_RIPEMD == 1
#define WOLFSSL_RIPEMD
#endif
// </e>
// <e>BLAKE2
#define MDK_CONF_BLAKE2 0
#if MDK_CONF_BLAKE2 == 1
#define HAVE_BLAKE2
#endif
// </e>
// <e>HMAC
#define MDK_CONF_HMAC 1
#if MDK_CONF_HMAC == 0
#define NO_HMAC
#endif
// </e>
// <e>HMAC KDF
#define MDK_CONF_HKDF 1
#if MDK_CONF_HKDF == 1
#define HAVE_HKDF
#endif
// </e>
// <e>AES CCM
#define MDK_CONF_AESCCM 1
#if MDK_CONF_AESCCM == 1
#define HAVE_AESCCM
#endif
// </e>
// <e>AES GCM
#define MDK_CONF_AESGCM 1
#if MDK_CONF_AESGCM == 1
#define HAVE_AESGCM
#endif
// </e>
// <e>RC4
#define MDK_CONF_RC4 1
#if MDK_CONF_RC4 == 0
#define NO_RC4
#endif
// </e>
// <e>HC128
#define MDK_CONF_HC128 1
#if MDK_CONF_AESGCM == 0
#define NO_HC128
#endif
// </e>
// <e>RABBIT
#define MDK_CONF_RABBIT 1
#if MDK_CONF_RABBIT == 0
#define NO_RABBIT
#endif
// </e>
// <e>CHACHA
#define MDK_CONF_CHACHA 1
#if MDK_CONF_CHACHA == 1
#define HAVE_CHACHA
#endif
// </e>
// <e>POLY1305
#define MDK_CONF_POLY1305 1
#if MDK_CONF_POLY1305 == 1
#define HAVE_POLY1305
#define HAVE_ONE_TIME_AUTH
#endif
// </e>
// <e>DES3
#define MDK_CONF_DES3 1
#if MDK_CONF_DES3 == 0
#define NO_DES3
#endif
// </e>
// <e>AES
#define MDK_CONF_AES 1
#if MDK_CONF_AES == 0
#define NO_AES
#endif
// </e>
// <e>CAMELLIA
#define MDK_CONF_CAMELLIA 1
#if MDK_CONF_CAMELLIA == 1
#define HAVE_CAMELLIA
#endif
// </e>
// <e>DH
#define MDK_CONF_DH 1
#if MDK_CONF_DH == 0
#define NO_DH
#endif
// </e>
// <e>DSA
#define MDK_CONF_DSA 1
#if MDK_CONF_DSA == 0
#define NO_DSA
#endif
// </e>
// <e>SRP
#define MDK_CONF_SRP 1
#if MDK_CONF_SRP == 1
#define HAVE_SRP
#endif
// </e>
// <e>PWDBASED
#define MDK_CONF_PWDBASED 1
#if MDK_CONF_PWDBASED == 0
#define NO_PWDBASED
#endif
// </e>
// <e>ECC
#define MDK_CONF_ECC 1
#if MDK_CONF_ECC == 1
#define HAVE_ECC
#endif
// </e>
// <e>CURVE25519
#define MDK_CONF_CURVE25519 1
#if MDK_CONF_CURVE25519 == 1
#define HAVE_CURVE25519
#define CURVED25519_SMALL
#endif
// </e>
// <e>CURVE25519 SMALL
#define MDK_CONF_CURVE25519_SMALL 0
#if MDK_CONF_CURVE25519_SMALL == 1
#define CURVED25519_SMALL
#endif
// </e>
// <e>ED25519
#define MDK_CONF_ED25519 1
#if MDK_CONF_ED25519 == 1
#define HAVE_ED25519
#endif
// </e>
// <e>ED25519 SMALL
#define MDK_CONF_ED25519_SMALL 0
#if MDK_CONF_ED25519_SMALL == 1
#define ED25519_SMALL
#endif
// </e>
// <e>PKCS7
#define MDK_CONF_PKCS7 0
#if MDK_CONF_PKCS7 == 1
#define HAVE_PKCS7
#endif
// </e>
// <e>NTRU (need License, "crypto_ntru.h")
#define MDK_CONF_NTRU 0
#if MDK_CONF_NTRU == 1
#define HAVE_NTRU
#endif
// </e>
// </h>
// <e>Random Seed, for TEST Only
#define MDK_CONF_RNDSEED 1
#if MDK_CONF_RNDSEED == 1
#define WOLFSSL_GENSEED_FORTEST
#endif
// </e>
// <h>Hardware Crypt (See document for usage)
// <e>Hardware RNG
#define MDK_CONF_STM32F2_RNG 1
#if MDK_CONF_STM32F2_RNG == 1
#define WOLFSSL_STM32_CUBEMX
#define STM32_RNG
#define WC_ASYNC_DEV_SIZE 320+24
#define STM32_HAL_TIMEOUT 0xFF
#if defined(STM32F2xx)
#define WOLFSSL_STM32F2
#elif defined(STM32F4xx)
#define WOLFSSL_STM32F4
#elif defined(STM32F7xx)
#define WOLFSSL_STM32F7
#endif
#endif
// </e>
// <e>Hardware Crypt
#define MDK_CONF_STM32F2_CRYPTO 1
#if MDK_CONF_STM32F2_CRYPTO == 1
#define WOLFSSL_STM32_CUBEMX
#define STM32_CRYPTO
#define WC_ASYNC_DEV_SIZE 320+24
#define STM32_HAL_TIMEOUT 0xFF
#if defined(STM32F2xx)
#define WOLFSSL_STM32F2
#elif defined(STM32F4xx)
#define WOLFSSL_STM32F4
#elif defined(STM32F7xx)
#define WOLFSSL_STM32F7
#endif
#endif
// </e>
// <e>Hardware Hash
#define MDK_CONF_STM32F2_HASH 1
#if MDK_CONF_STM32F2_HASH == 1
#define WOLFSSL_STM32_CUBEMX
#define STM32_HASH
#define WC_ASYNC_DEV_SIZE 320+24
#define STM32_HAL_TIMEOUT 0xFF
#if defined(STM32F2xx)
#define WOLFSSL_STM32F2
#elif defined(STM32F4xx)
#define WOLFSSL_STM32F4
#elif defined(STM32F7xx)
#define WOLFSSL_STM32F7
#endif
#endif
// </e>
// </h>
// <h>Cert/Key Strage
// <o>Cert Storage <0=> SD Card <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes)
#define MDK_CONF_CERT_BUFF 0
#if MDK_CONF_CERT_BUFF== 1
#define USE_CERT_BUFFERS_1024
#elif MDK_CONF_CERT_BUFF == 2
#define USE_CERT_BUFFERS_2048
#endif
//</h>
// <h>Cert/Key Generation
// <e>CertGen
#define MDK_CONF_CERT_GEN 0
#if MDK_CONF_CERT_GEN == 1
#define WOLFSSL_CERT_GEN
#endif
// </e>
// <e>KeyGen
#define MDK_CONF_KEY_GEN 0
#if MDK_CONF_KEY_GEN == 1
#define WOLFSSL_KEY_GEN
#endif
// </e>
// </h>
// <e>Use Fast Math
#define MDK_CONF_FASTMATH 1
#if MDK_CONF_FASTMATH == 1
#define USE_FAST_MATH
#define TFM_TIMING_RESISTANT
#endif
// </e>
// <e>Small Stack
#define MDK_CONF_SmallStack 0
#if MDK_CONF_SmallStack == 0
#define NO_WOLFSSL_SMALL_STACK
#endif
// </e>
#define BENCH_EMBEDDED
// </h>
/**** wolfSSL Configuration ****/
// <h> wolfSSL Configuration
// <e>TLS 1.3
#define MDK_CONF_TLS 0
#if MDK_CONF_TLS == 1
#define WOLFSSL_TLS13
#define HAVE_TLS_EXTENSIONS
#define WC_RSA_PSS
#define HAVE_HKDF
#define HAVE_FFDHE_2048
#endif
// </e>
// <e>Include Old TLS
#define MDK_CONF_NO_OLDTLS 0
#if MDK_CONF_NO_OLDTLS == 0
#define NO_OLD_TLS
#endif
// </e>
// <e>CRL
#define MDK_CONF_CRL 0
#if MDK_CONF_CRL == 1
#define HAVE_CRL
#define WOLFSSL_DER_LOAD
#endif
// </e>
// <e>OCSP
#define MDK_CONF_OCSP 0
#if MDK_CONF_OCSP == 1
#define HAVE_OCSP
#endif
// </e>
// <e>OpenSSL Extra
#define MDK_CONF_OPENSSL_EXTRA 0
#if MDK_CONF_OPENSSL_EXTRA == 1
#define OPENSSL_EXTRA
#endif
// </e>
//</h>
#define NO_WRITEV
#define NO_MAIN_DRIVER

View File

@ -1,58 +0,0 @@
/* config.h
*
* Copyright (C) 2006-2016 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
*/
#define __CORTEX_M3__
#if defined(MDK_CONF_full)
#include "config-Crypt.h"
#include "config-wolfSSL.h"
#elif defined(MDK_CONF_SimpleClient)
#include "config-Crypt.h"
#include "config-wolfSSL.h"
#elif defined(MDK_CONF_SimpleServer)
#include "config-Crypt.h"
#include "config-wolfSSL.h"
#elif defined(MDK_CONF_EchoClient)
#include "config-Crypt.h"
#include "config-wolfSSL.h"
#elif defined(MDK_CONF_EchoServer)
#include "config-Crypt.h"
#include "config-wolfSSL.h"
#elif defined(MDK_CONF_Benchmark)
#define SINGLE_THREADED
#include "config-Crypt.h"
#elif defined(MDK_CONF_CryptTest)
#define SINGLE_THREADED
#include "config-Crypt.h"
#elif defined(MDK_CONF_wolfSSL_lib)
#include "config-Crypt.h"
#include "config-wolfSSL.h"
#endif

View File

@ -1,6 +1,6 @@
/* wolfssl_KEIL_ARM.h
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -27,10 +27,6 @@
#include <stdio.h>
/* Go to STDIN */
#define fgets(buff, sz, fd) wolfssl_fgets(buff, sz, fd)
extern char * wolfssl_fgets ( char * str, int num, FILE * f ) ;
#define SOCKET_T int
/*** #include <socket.h> ***/
@ -51,12 +47,12 @@ struct timeval {
};
#if defined(WOLFSSL_KEIL_TCP_NET)
#if defined(WOLFSSL_KEIL_TCP_NET)
#define SCK_EWOULDBLOCK BSD_ERROR_WOULDBLOCK
#define SCK_ETIMEOUT BSD_ERROR_TIMEOUT
#include "rl_net.h"
#include "rl_net.h"
typedef int socklen_t ;
/* for avoiding conflict with KEIL-TCPnet BSD socket */
@ -69,11 +65,12 @@ typedef int socklen_t ;
/* for avoiding conflicting with KEIL-TCPnet TCP socket */
/* Bodies are in test.h */
#define tcp_connect wolfssl_tcp_connect
#define tcp_connect wolfssl_tcp_connect
#define tcp_socket wolfssl_tcp_soket
#define tcp_listen wolfssl_tcp_listen
#define tcp_select(a,b) (0)
#define connect(a,b,c) connect(a, (SOCKADDR *)(b), c)
#define SOCKADDR struct sockaddr
/** KEIL-RL TCPnet ****/
/* TCPnet BSD socket does not have following functions. */
extern char *inet_ntoa(struct in_addr in);

View File

@ -1,14 +1,10 @@
This program is a simple benchmark of wolfCrypt library.
wolfCrypt Benchmark
In order to run this benchmark, copy
{PACK}\wolfSSL\CyaSSL\{version}\cyassl\certs folder and files to the SD memory.
Use Configuration Wizard tab
user_settings.h for wolfCrypt options
For benchmark configuration, refer config-Crypt.h.
For further options, details, see wolfSSL User Manual.
For the hardware crypt on config-Crypt.h, download
STSW-STM32062: STM32F2xx standard peripherals library at
http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to
{PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib
Support
-------

View File

@ -0,0 +1,14 @@
LR_IROM1 0x08000000 0x00100000 { ; load region size_region
ER_IROM1 0x08000000 0x00100000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x20010000 0x00040000 { ; RW data
.ANY (+RW +ZI)
}
RW_RETARGET 0x2000FFF0 0x00000010 {
retarget_io.o (+ZI +RW)
}
}

View File

@ -8,7 +8,7 @@
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj</oExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<pExt>*.plm</pExt>
@ -22,16 +22,16 @@
</DaveTm>
<Target>
<TargetName>CryptBenchmark</TargetName>
<TargetName>wolfSSL-Benchmark</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>12000000</CLKADS>
<CLKADS>25000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunSim>1</RunSim>
<RunTarget>0</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
@ -45,7 +45,7 @@
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\Object\</ListingPath>
<ListingPath>.\Output\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
@ -78,23 +78,6 @@
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<Books>
<Book>
<Number>0</Number>
<Title>Schematics (MCBSTM32F200)</Title>
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F2xx_DFP\2.2.0\MDK/Boards/Keil/MCBSTM32F200/Documentation/mcbstm32f200-schematics.pdf</Path>
</Book>
<Book>
<Number>1</Number>
<Title>User Manual (MCBSTM32F200)</Title>
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F2xx_DFP\2.2.0\MDK/Boards/Keil/MCBSTM32F200/Documentation/mcbstm32f200.chm</Path>
</Book>
<Book>
<Number>2</Number>
<Title>MCBSTM32F200 Evaluation Board Web Page (MCBSTM32F200)</Title>
<Path>http://www.keil.com/mcbstm32f200/</Path>
</Book>
</Books>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
@ -117,7 +100,8 @@
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<nTsel>1</nTsel>
<bEvRecOn>1</bEvRecOn>
<nTsel>5</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
@ -127,10 +111,15 @@
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile>.\STM32_SWO.ini</tIfile>
<pMon>BIN\UL2CM3.DLL</pMon>
<tIfile></tIfile>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U303030303030303030303031 -O8399 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(5BA02477) -L00(0) -TO27 -TC216000000 -TP21 -TDS806B -TDT0 -TDC1F -TIEFFFFFFFF -TIP1 -FO15 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F756NGHx$CMSIS\Flash\STM32F7x_1024.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
@ -139,18 +128,13 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)</Name>
<Name>(1010=-1,-1,-1,-1,0)(6017=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(6016=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ULP2CM3</Key>
<Name>-UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$CMSIS/Flash/STM32F2xx_1024.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
@ -159,32 +143,28 @@
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>-UM1020ADE -O206 -S0 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP21 -TDS801F -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F207IGHx$CMSIS/Flash/STM32F2xx_1024.FLM)</Name>
<Name>-UV0998FBE -O207 -S10 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(5BA02477) -L00(0) -TO18 -TC216000000 -TP21 -TDS80B8 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F756NGHx$CMSIS\Flash\STM32F7x_1024.FLM)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<SubType>8</SubType>
<ItemText>0x20000408</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>8</SubType>
<ItemText>0x8004dc8</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<ItemText>eth_pins</ItemText>
</Ww>
</WatchWindow1>
<ScvdPack>
<Filename>C:\Keil_v5\ARM\PACK\Keil\MDK-Middleware\7.5.0\FileSystem\FileSystem.scvd</Filename>
<Type>Keil.MDK-Middleware.7.5.0</Type>
<SubType>1</SubType>
</ScvdPack>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
@ -203,50 +183,29 @@
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>1</aSer4>
<StkLoc>1</StkLoc>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<DebugDescription>
<Enable>1</Enable>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>2000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
<Group>
<GroupName>Source</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\time-CortexM3-4.c</PathWithFileName>
<FilenameWithoutPath>time-CortexM3-4.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Configuration</GroupName>
<tvExp>1</tvExp>
@ -254,24 +213,10 @@
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>3</FileNumber>
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\RTE\wolfSSL\config-Crypt.h</PathWithFileName>
<FilenameWithoutPath>config-Crypt.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\RTE\wolfSSL\user_settings.h</PathWithFileName>
@ -288,11 +233,10 @@
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>5</FileNumber>
<GroupNumber>2</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Abstract.txt</PathWithFileName>
@ -302,6 +246,34 @@
</File>
</Group>
<Group>
<GroupName>Source</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>::Board Support</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
<tvExp>1</tvExp>

View File

@ -7,21 +7,23 @@
<Targets>
<Target>
<TargetName>CryptBenchmark</TargetName>
<TargetName>wolfSSL-Benchmark</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060528::V5.06 update 5 (build 528)::ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>STM32F207IGHx</Device>
<Device>STM32F756NGHx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32F2xx_DFP.2.2.0</PackID>
<PackID>Keil.STM32F7xx_DFP.2.9.0</PackID>
<PackURL>http://www.keil.com/pack</PackURL>
<Cpu>IROM(0x08000000,0x100000) IRAM(0x20000000,0x20000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE</Cpu>
<Cpu>IROM(0x08000000,0x100000) IROM2(0x00200000,0x100000) IRAM(0x20010000,0x40000) IRAM2(0x20000000,0x10000) CPUTYPE("Cortex-M7") FPU3(SFPU) CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IGHx$CMSIS/Flash/STM32F2xx_1024.FLM))</FlashDriverDll>
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F756NGHx$CMSIS\Flash\STM32F7x_1024.FLM))</FlashDriverDll>
<DeviceId>0</DeviceId>
<RegisterFile>$$Device:STM32F207IGHx$Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h</RegisterFile>
<RegisterFile>$$Device:STM32F756NGHx$Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f7xx.h</RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
@ -31,7 +33,7 @@
<SLE66CMisc></SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile>$$Device:STM32F207IGHx$CMSIS\SVD\STM32F20x.svd</SFDFile>
<SFDFile>$$Device:STM32F756NGHx$CMSIS\SVD\STM32F7x.svd</SFDFile>
<bCustSvd>0</bCustSvd>
<UseEnv>0</UseEnv>
<BinPath></BinPath>
@ -46,14 +48,14 @@
<NotGenerated>0</NotGenerated>
<InvalidFlash>1</InvalidFlash>
</TargetStatus>
<OutputDirectory>.\Object\</OutputDirectory>
<OutputName>CryptBenchmark</OutputName>
<OutputDirectory>.\Output\</OutputDirectory>
<OutputName>wolfCryptBenchmark</OutputName>
<CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib>
<CreateHexFile>0</CreateHexFile>
<DebugInformation>1</DebugInformation>
<BrowseInformation>1</BrowseInformation>
<ListingPath>.\Object\</ListingPath>
<ListingPath>.\Output\</ListingPath>
<HexFormatSelection>1</HexFormatSelection>
<Merge32K>0</Merge32K>
<CreateBatchFile>0</CreateBatchFile>
@ -84,6 +86,8 @@
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopA1X>0</nStopA1X>
<nStopA2X>0</nStopA2X>
</AfterMake>
<SelectedForBatchBuild>0</SelectedForBatchBuild>
<SVCSIdString></SVCSIdString>
@ -108,11 +112,11 @@
<SimDllName>SARMCM3.DLL</SimDllName>
<SimDllArguments> -REMAP -MPU</SimDllArguments>
<SimDlgDll>DCM.DLL</SimDlgDll>
<SimDlgDllArguments>-pCM3</SimDlgDllArguments>
<SimDlgDllArguments>-pCM7</SimDlgDllArguments>
<TargetDllName>SARMCM3.DLL</TargetDllName>
<TargetDllArguments> -MPU</TargetDllArguments>
<TargetDlgDll>TCM.DLL</TargetDlgDll>
<TargetDlgDllArguments>-pCM3</TargetDlgDllArguments>
<TargetDlgDllArguments>-pCM7</TargetDlgDllArguments>
</DllOption>
<DebugOption>
<OPTHX>
@ -122,47 +126,6 @@
<HexOffset>0</HexOffset>
<Oh166RecLen>16</Oh166RecLen>
</OPTHX>
<Simulator>
<UseSimulator>0</UseSimulator>
<LoadApplicationAtStartup>1</LoadApplicationAtStartup>
<RunToMain>1</RunToMain>
<RestoreBreakpoints>1</RestoreBreakpoints>
<RestoreWatchpoints>1</RestoreWatchpoints>
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
<RestoreFunctions>1</RestoreFunctions>
<RestoreToolbox>1</RestoreToolbox>
<LimitSpeedToRealTime>0</LimitSpeedToRealTime>
<RestoreSysVw>1</RestoreSysVw>
</Simulator>
<Target>
<UseTarget>1</UseTarget>
<LoadApplicationAtStartup>1</LoadApplicationAtStartup>
<RunToMain>1</RunToMain>
<RestoreBreakpoints>1</RestoreBreakpoints>
<RestoreWatchpoints>1</RestoreWatchpoints>
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
<RestoreFunctions>0</RestoreFunctions>
<RestoreToolbox>1</RestoreToolbox>
<RestoreTracepoints>1</RestoreTracepoints>
<RestoreSysVw>1</RestoreSysVw>
</Target>
<RunDebugAfterBuild>0</RunDebugAfterBuild>
<TargetSelection>1</TargetSelection>
<SimDlls>
<CpuDll></CpuDll>
<CpuDllArguments></CpuDllArguments>
<PeripheralDll></PeripheralDll>
<PeripheralDllArguments></PeripheralDllArguments>
<InitializationFile></InitializationFile>
</SimDlls>
<TargetDlls>
<CpuDll></CpuDll>
<CpuDllArguments></CpuDllArguments>
<PeripheralDll></PeripheralDll>
<PeripheralDllArguments></PeripheralDllArguments>
<InitializationFile>.\STM32_SWO.ini</InitializationFile>
<Driver>BIN\UL2CM3.DLL</Driver>
</TargetDlls>
</DebugOption>
<Utilities>
<Flash1>
@ -171,11 +134,11 @@
<RunIndependent>0</RunIndependent>
<UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
<Capability>1</Capability>
<DriverSelection>4100</DriverSelection>
<DriverSelection>4096</DriverSelection>
</Flash1>
<bUseTDR>1</bUseTDR>
<Flash2>BIN\UL2CM3.DLL</Flash2>
<Flash3></Flash3>
<Flash3>"" ()</Flash3>
<Flash4></Flash4>
<pFcarmOut></pFcarmOut>
<pFcarmGrp></pFcarmGrp>
@ -211,7 +174,7 @@
<AdsLsxf>1</AdsLsxf>
<RvctClst>0</RvctClst>
<GenPPlst>0</GenPPlst>
<AdsCpuType>"Cortex-M3"</AdsCpuType>
<AdsCpuType>"Cortex-M7"</AdsCpuType>
<RvctDeviceName></RvctDeviceName>
<mOS>1</mOS>
<uocRom>0</uocRom>
@ -220,13 +183,14 @@
<hadIRAM>1</hadIRAM>
<hadXRAM>0</hadXRAM>
<uocXRam>0</uocXRam>
<RvdsVP>0</RvdsVP>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<RvdsVP>2</RvdsVP>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>1</hadIROM2>
<StupSel>8</StupSel>
<useUlib>0</useUlib>
<EndSel>0</EndSel>
<uLtcg>0</uLtcg>
<nSecure>0</nSecure>
<RoSelD>3</RoSelD>
<RwSelD>3</RwSelD>
<CodeSel>0</CodeSel>
@ -279,8 +243,8 @@
</Ocm6>
<IRAM>
<Type>0</Type>
<StartAddress>0x20000000</StartAddress>
<Size>0x20000</Size>
<StartAddress>0x20010000</StartAddress>
<Size>0x40000</Size>
</IRAM>
<IROM>
<Type>1</Type>
@ -314,8 +278,8 @@
</OCR_RVCT4>
<OCR_RVCT5>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
<StartAddress>0x200000</StartAddress>
<Size>0x100000</Size>
</OCR_RVCT5>
<OCR_RVCT6>
<Type>0</Type>
@ -334,13 +298,13 @@
</OCR_RVCT8>
<OCR_RVCT9>
<Type>0</Type>
<StartAddress>0x20000000</StartAddress>
<Size>0x20000</Size>
<StartAddress>0x20010000</StartAddress>
<Size>0x40000</Size>
</OCR_RVCT9>
<OCR_RVCT10>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
<StartAddress>0x20000000</StartAddress>
<Size>0x10000</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector></RvctStartVector>
@ -361,9 +325,16 @@
<uSurpInc>0</uSurpInc>
<uC99>0</uC99>
<useXO>0</useXO>
<v6Lang>0</v6Lang>
<v6LangP>0</v6LangP>
<vShortEn>0</vShortEn>
<vShortWch>0</vShortWch>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define>HAVE_CONFIG_H MDK_CONF_Benchmark WOLFSSL_USER_SETTINGS</Define>
<Define>USE_STM32756G_EVAL USE_IOEXPANDER WOLFSSL_USER_SETTINGS</Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
@ -378,6 +349,7 @@
<NoWarn>0</NoWarn>
<uSurpInc>0</uSurpInc>
<useXO>0</useXO>
<uClangAs>0</uClangAs>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
@ -386,16 +358,16 @@
</VariousControls>
</Aads>
<LDads>
<umfTarg>1</umfTarg>
<umfTarg>0</umfTarg>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<noStLib>0</noStLib>
<RepFail>1</RepFail>
<useFile>0</useFile>
<TextAddressRange>0x08000000</TextAddressRange>
<DataAddressRange>0x20000000</DataAddressRange>
<TextAddressRange></TextAddressRange>
<DataAddressRange></DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile></ScatterFile>
<ScatterFile>.\CryptBenchmark.sct</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
@ -405,33 +377,13 @@
</TargetArmAds>
</TargetOption>
<Groups>
<Group>
<GroupName>Source</GroupName>
<Files>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>.\main.c</FilePath>
</File>
<File>
<FileName>time-CortexM3-4.c</FileName>
<FileType>1</FileType>
<FilePath>.\time-CortexM3-4.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Configuration</GroupName>
<Files>
<File>
<FileName>config-Crypt.h</FileName>
<FileType>5</FileType>
<FilePath>.\RTE\wolfssl\config-Crypt.h</FilePath>
</File>
<File>
<FileName>user_settings.h</FileName>
<FileType>5</FileType>
<FilePath>.\RTE\wolfssl\user_settings.h</FilePath>
<FilePath>.\RTE\wolfSSL\user_settings.h</FilePath>
</File>
</Files>
</Group>
@ -445,6 +397,19 @@
</File>
</Files>
</Group>
<Group>
<GroupName>Source</GroupName>
<Files>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>.\main.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>::Board Support</GroupName>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
</Group>
@ -468,351 +433,343 @@
</Targets>
<RTE>
<packages>
<filter>
<targetInfos/>
</filter>
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0">
<targetInfos>
<targetInfo name="CryptBenchmark"/>
</targetInfos>
</package>
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0">
<targetInfos>
<targetInfo name="CryptBenchmark"/>
</targetInfos>
</package>
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta">
<targetInfos>
<targetInfo name="CryptBenchmark"/>
</targetInfos>
</package>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0">
<targetInfos>
<targetInfo name="CryptBenchmark"/>
</targetInfos>
</package>
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0">
<targetInfos>
<targetInfo name="CryptBenchmark"/>
</targetInfos>
</package>
</packages>
<apis>
<api Capiversion="2.02" Cclass="CMSIS Driver" Cgroup="MCI" exclusive="0">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0"/>
<api Capiversion="2.3.0" Cclass="CMSIS Driver" Cgroup="MCI" exclusive="0">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.1.1"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</api>
<api Capiversion="1.0" Cclass="CMSIS" Cgroup="RTOS" exclusive="0">
<package name="CMSIS" schemaVersion="1.0" url="http://www.keil.com/pack/" vendor="ARM" version="3.20.4"/>
<api Cclass="CMSIS" Cgroup="RTOS" exclusive="0">
<package license="CMSIS\CMSIS END USER LICENCE AGREEMENT.rtf" name="CMSIS" url="http://www.keil.com/pack/" vendor="ARM" version="3.20.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</api>
<api Cclass="Device" Cgroup="STM32Cube Framework" exclusive="1">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<api Capiversion="1.0.0" Cclass="Device" Cgroup="STM32Cube Framework" exclusive="1">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</api>
</apis>
<components>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="4.1.0" condition="CMSIS Core">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0"/>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.1.1" condition="ARMv6_7_8-M Device">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.3.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="CMSIS" Cgroup="RTOS" Csub="Keil RTX" Cvendor="ARM" Cversion="4.78.0" condition="Cortex-M Device Startup">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0"/>
<component Capiversion="1.0.0" Cclass="CMSIS" Cgroup="RTOS" Csub="Keil RTX" Cvendor="ARM" Cversion="4.81.1" condition="RTOS RTX">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.1.1"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="CORE" Cvariant="LFN" Cvendor="Keil" Cversion="6.5.0" condition="CMSIS Core with RTOS and File System I/O">
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta"/>
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="I/O" Csub="File" Cvariant="File System" Cvendor="Keil" Cversion="1.2.1" condition="ARMCC Cortex-M with File System">
<package name="ARM_Compiler" schemaVersion="1.4.9" url="http://www.keil.com/pack/" vendor="Keil" version="1.3.3"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="Drive" Csub="Memory Card" Cvendor="Keil" Cversion="6.5.0" condition="File System and SD/MMC Driver" maxInstances="2">
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta"/>
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="I/O" Csub="STDERR" Cvariant="ITM" Cvendor="Keil" Cversion="1.2.1" condition="ARMCC Cortex-M with ITM">
<package name="ARM_Compiler" schemaVersion="1.4.9" url="http://www.keil.com/pack/" vendor="Keil" version="1.3.3"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Capiversion="2.02" Cclass="CMSIS Driver" Cgroup="MCI" Cvendor="Keil" Cversion="2.02" condition="STM32F2 CMSIS_Driver MCI">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="I/O" Csub="STDIN" Cvariant="ITM" Cvendor="Keil" Cversion="1.2.1" condition="ARMCC Cortex-M with ITM">
<package name="ARM_Compiler" schemaVersion="1.4.9" url="http://www.keil.com/pack/" vendor="Keil" version="1.3.3"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Compiler" Cgroup="I/O" Csub="File" Cvariant="File System" Cvendor="Keil" Cversion="1.0.0" condition="ARMCC Cortex-M with File System">
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0"/>
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="I/O" Csub="STDOUT" Cvariant="ITM" Cvendor="Keil" Cversion="1.2.1" condition="ARMCC Cortex-M with ITM">
<package name="ARM_Compiler" schemaVersion="1.4.9" url="http://www.keil.com/pack/" vendor="Keil" version="1.3.3"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Compiler" Cgroup="I/O" Csub="STDERR" Cvariant="ITM" Cvendor="Keil" Cversion="1.0.0" condition="ARMCC Cortex-M with ITM">
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0"/>
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="I/O" Csub="TTY" Cvariant="Breakpoint" Cvendor="Keil" Cversion="1.2.1" condition="ARMCC Cortex-M">
<package name="ARM_Compiler" schemaVersion="1.4.9" url="http://www.keil.com/pack/" vendor="Keil" version="1.3.3"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Compiler" Cgroup="I/O" Csub="STDIN" Cvariant="ITM" Cvendor="Keil" Cversion="1.0.0" condition="ARMCC Cortex-M with ITM">
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0"/>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="CORE" Cvariant="LFN" Cvendor="Keil" Cversion="6.10.0" condition="CMSIS Core with RTOS and File System I/O">
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.5.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Compiler" Cgroup="I/O" Csub="STDOUT" Cvariant="ITM" Cvendor="Keil" Cversion="1.0.0" condition="ARMCC Cortex-M with ITM">
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0"/>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="Drive" Csub="Memory Card" Cvendor="Keil" Cversion="6.10.0" condition="File System and SD/MMC Driver" maxInstances="2">
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.5.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 Framework Classic">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Cbundle="STM32756G-EVAL" Cclass="Board Support" Cgroup="Drivers" Csub="Basic I/O" Cvendor="Keil" Cversion="1.1.0" condition="STM32756G-EVAL BSP">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Common" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 HAL Common">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Cbundle="STM32756G-EVAL" Cclass="Board Support" Cgroup="Drivers" Csub="I/O" Cvendor="Keil" Cversion="1.1.0" condition="STM32756G-EVAL BSP IO">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Cortex" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 HAL">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Cbundle="STM32756G-EVAL" Cclass="Board Support" Cgroup="Drivers" Csub="NOR" Cvendor="Keil" Cversion="1.1.0" condition="STM32756G-EVAL BSP NOR">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="DMA" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 HAL">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Cbundle="STM32756G-EVAL" Cclass="Board Support" Cgroup="Drivers" Csub="SDRAM" Cvendor="Keil" Cversion="1.1.0" condition="STM32756G-EVAL BSP SDRAM">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="GPIO" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 HAL">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Capiversion="2.2.0" Cclass="CMSIS Driver" Cgroup="MCI" Cvendor="Keil" Cversion="1.4.0" condition="STM32F7 CMSIS_Driver MCI">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="RCC" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 HAL GPIO">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Capiversion="1.0.0" Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 Framework Classic">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.0.1" condition="STM32F2 CMSIS HAL">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="ADC" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Benchmark" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="CRYP" Cvendor="Keil" Cversion="1.2.0" condition="STM32F756_777_779 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Common" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL Common">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Dummy" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Cortex" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="DMA" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="GPIO" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="HASH" Cvendor="Keil" Cversion="1.2.0" condition="STM32F756_777_779 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="I2C" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="NOR" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="PWR" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="RCC" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL GPIO">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="RNG" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="SDRAM" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="SRAM" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="UART" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 CMSIS">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Benchmark" Cvendor="wolfSSL" Cversion="3.14.0" condition="wolfCrypt-Core">
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.4" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.14.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.14.0" condition="wolfCrypt-Core">
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.4" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.14.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Dummy" Cvendor="wolfSSL" Cversion="3.14.0" condition="wolfCrypt-Core">
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.4" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.14.0"/>
<targetInfos>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</component>
</components>
<files>
<file attr="config" category="source" name="CMSIS_RTX\Templates\RTX_Conf_CM.c" version="4.70.0">
<file attr="config" category="source" name="CMSIS\RTOS\RTX\Templates\RTX_Conf_CM.c" version="4.70.1">
<instance index="0">RTE\CMSIS\RTX_Conf_CM.c</instance>
<component Cclass="CMSIS" Cgroup="RTOS" Csub="Keil RTX" Cvendor="ARM" Cversion="4.74.0" condition="CMSIS Core"/>
<package name="CMSIS" schemaVersion="1.0" url="http://www.keil.com/pack/" vendor="ARM" version="3.20.4"/>
<component Capiversion="1.0.0" Cclass="CMSIS" Cgroup="RTOS" Csub="Keil RTX" Cvendor="ARM" Cversion="4.81.1" condition="RTOS RTX" isDefaultVariant="1"/>
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.3.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</file>
<file attr="config" category="header" name="CMSIS\Driver\Config\RTE_Device.h" version="2.01">
<instance index="0">RTE\Device\STM32F207IGHx\RTE_Device.h</instance>
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 Framework Classic"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<file attr="config" category="header" name="CMSIS\Driver\Config\RTE_Device.h" version="1.4.0">
<instance index="0">RTE\Device\STM32F756NGHx\RTE_Device.h</instance>
<component Capiversion="1.0.0" Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 Framework Classic"/>
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</file>
<file attr="config" category="source" condition="STM32F207xx_ARMCC" name="Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\arm\startup_stm32f207xx.s" version="2.0.1">
<instance index="0">RTE\Device\STM32F207IGHx\startup_stm32f207xx.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.0.1" condition="STM32F2 CMSIS HAL"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<file attr="config" category="source" condition="STM32F756_ARMCC" name="Drivers\CMSIS\Device\ST\STM32F7xx\Source\Templates\arm\startup_stm32f756xx.s" version="1.2.0">
<instance index="0">RTE\Device\STM32F756NGHx\startup_stm32f756xx.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 CMSIS"/>
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</file>
<file attr="config" category="header" name="MDK\Templates\Inc\stm32f2xx_hal_conf.h">
<instance index="0">RTE\Device\STM32F207IGHx\stm32f2xx_hal_conf.h</instance>
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 Framework Classic"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<file attr="config" category="header" name="MDK\Templates\Inc\stm32f7xx_hal_conf.h" version="1.2.0">
<instance index="0">RTE\Device\STM32F756NGHx\stm32f7xx_hal_conf.h</instance>
<component Capiversion="1.0.0" Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 Framework Classic"/>
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</file>
<file attr="config" category="source" name="Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\system_stm32f2xx.c" version="2.0.1">
<instance index="0">RTE\Device\STM32F207IGHx\system_stm32f2xx.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.0.1" condition="STM32F2 CMSIS HAL"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<file attr="config" category="source" name="Drivers\CMSIS\Device\ST\STM32F7xx\Source\Templates\system_stm32f7xx.c" version="1.2.0">
<instance index="0">RTE\Device\STM32F756NGHx\system_stm32f7xx.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 CMSIS"/>
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</file>
<file attr="config" category="header" name="CMSIS\Driver\Config\RTE_Device.h" version="2.01">
<instance index="0" removed="1">RTE\Device\STM32F207IG\RTE_Device.h</instance>
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 Framework Classic"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" condition="STM32F207xx_ARMCC" name="Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\arm\startup_stm32f207xx.s" version="2.0.1">
<instance index="0" removed="1">RTE\Device\STM32F207IG\startup_stm32f207xx.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.0.1" condition="STM32F2 CMSIS HAL"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Device\Source\ARM\startup_stm32f2xx.s">
<instance index="0" removed="1">RTE\Device\STM32F207IG\startup_stm32f2xx.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.0.0" condition="STM32F2xx CMSIS Device"/>
<package name="STM32F2xx_DFP" schemaVersion="1.2" url="http://www.keil.com/pack" vendor="Keil" version="1.0.7"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="MDK\Templates\Inc\stm32f2xx_hal_conf.h">
<instance index="0" removed="1">RTE\Device\STM32F207IG\stm32f2xx_hal_conf.h</instance>
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 Framework Classic"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\system_stm32f2xx.c" version="2.0.1">
<instance index="0" removed="1">RTE\Device\STM32F207IG\system_stm32f2xx.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.0.1" condition="STM32F2 CMSIS HAL"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="FileSystem\Config\FS_Config.c" version="6.2">
<file attr="config" category="source" name="FileSystem\Config\FS_Config.c" version="6.2.0">
<instance index="0">RTE\File_System\FS_Config.c</instance>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="CORE" Cvariant="SFN" Cvendor="Keil" Cversion="6.5.0" condition="CMSIS Core with RTOS and File System I/O"/>
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta"/>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="CORE" Cvariant="LFN" Cvendor="Keil" Cversion="6.10.0" condition="CMSIS Core with RTOS and File System I/O"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.6.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</file>
<file attr="config" category="source" name="FileSystem\Config\FS_Config_MC.h" version="6.2">
<file attr="config" category="source" name="FileSystem\Config\FS_Config_MC.h" version="6.2.0">
<instance index="0">RTE\File_System\FS_Config_MC_0.h</instance>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="Drive" Csub="Memory Card" Cvendor="Keil" Cversion="6.5.0" condition="File System and SD/MMC Driver" maxInstances="2"/>
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta"/>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="Drive" Csub="Memory Card" Cvendor="Keil" Cversion="6.10.0" condition="File System and SD/MMC Driver" maxInstances="2"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.6.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config.c">
<file attr="config" category="source" name="FileSystem\Config\FS_Config_NOR.h" version="6.2.0">
<instance index="0" removed="1">RTE\File_System\FS_Config_NOR_0.h</instance>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="Drive" Csub="NOR" Cvendor="Keil" Cversion="6.10.0" condition="File System and Flash Driver" maxInstances="2"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.6.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config.c" version="0.0.0">
<instance index="0" removed="1">RTE\Network\Net_Config.c</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="CORE" Cvariant="Debug" Cvendor="Keil" Cversion="5.0.2" condition="CMSIS Core with RTOS"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="CORE" Cvariant="IPv4/IPv6 Release" Cvendor="Keil" Cversion="7.5.0" condition="CMSIS Core with RTOS"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.4.1"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config_BSD.h">
<file attr="config" category="source" name="Network\Config\Net_Config_BSD.h" version="0.0.0">
<instance index="0" removed="1">RTE\Network\Net_Config_BSD.h</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Socket" Csub="BSD" Cvendor="Keil" Cversion="5.0.2" condition="Network UDP/TCP"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Socket" Csub="BSD" Cvendor="Keil" Cversion="7.5.0" condition="Network UDP/TCP"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.4.1"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config_DNS_Client.h">
<instance index="0" removed="1">RTE\Network\Net_Config_DNS_Client.h</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Service" Csub="DNS Client" Cvendor="Keil" Cversion="5.0.2" condition="Network UDP"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config_ETH.h">
<file attr="config" category="source" name="Network\Config\Net_Config_ETH.h" version="0.0.0">
<instance index="0" removed="1">RTE\Network\Net_Config_ETH_0.h</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Interface" Csub="ETH" Cvendor="Keil" Cversion="5.0.2" condition="Network Driver ETH" maxInstances="1"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Interface" Csub="ETH" Cvendor="Keil" Cversion="7.5.0" condition="Network Driver ETH" maxInstances="1"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.4.1"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config_TCP.h">
<file attr="config" category="source" name="Network\Config\Net_Config_TCP.h" version="0.0.0">
<instance index="0" removed="1">RTE\Network\Net_Config_TCP.h</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Socket" Csub="TCP" Cvendor="Keil" Cversion="5.0.2" condition="Network Interface"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Socket" Csub="TCP" Cvendor="Keil" Cversion="7.5.0" condition="Network Interface"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.4.1"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config_UDP.h">
<file attr="config" category="source" name="Network\Config\Net_Config_UDP.h" version="0.0.0">
<instance index="0" removed="1">RTE\Network\Net_Config_UDP.h</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Socket" Csub="UDP" Cvendor="Keil" Cversion="5.0.2" condition="Network Interface"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Debug.c">
<instance index="0" removed="1">RTE\Network\Net_Debug.c</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="CORE" Cvariant="Debug" Cvendor="Keil" Cversion="5.0.2" condition="CMSIS Core with RTOS"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-Crypt.h">
<instance index="0" removed="1">RTE\Other\config-Crypt.h</instance>
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-FS.h">
<instance index="0" removed="1">RTE\Other\config-FS.h</instance>
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h">
<instance index="0" removed="1">RTE\Other\config-RTX-TCP-FS.h</instance>
<component Cclass="Other" Cgroup="CyaSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="2.7.0" condition="CyaSSL-RTX,TCP,FS"/>
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
<instance index="0" removed="1">RTE\Other\config.h</instance>
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Socket" Csub="UDP" Cvendor="Keil" Cversion="7.5.0" condition="Network Interface"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.4.1"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-Crypt.h">
<instance index="0">RTE\wolfssl\config-Crypt.h</instance>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
</targetInfos>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
<instance index="0" removed="1">RTE\wolfssl\config.h</instance>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
<package license="wolfssl\IDE\MDK5-ARM\Docs\CyaSSL-Licnese.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<instance index="0" removed="1">RTE\wolfSSL\config-Crypt.h</instance>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core"/>
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.4" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.13.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\wolfssl\wolfcrypt\settings.h">
<instance index="0" removed="1">RTE\wolfssl\settings.h</instance>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-wolfSSL.h">
<instance index="0" removed="1">RTE\wolfSSL\config-wolfSSL.h</instance>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core"/>
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.4" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.12.2"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\user_settings.h">
<instance index="0">RTE\wolfssl\user_settings.h</instance>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\user_settings.h" version="3.14.0">
<instance index="0">RTE\wolfSSL\user_settings.h</instance>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.14.0" condition="wolfCrypt-Core"/>
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.4" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.14.0"/>
<targetInfos>
<targetInfo name="CryptBenchmark"/>
<targetInfo name="wolfSSL-Benchmark"/>
</targetInfos>
</file>
</files>

View File

@ -1,29 +1,515 @@
/* #define SINGLE_THREADED or define RTOS option */
#define WOLFSSL_CMSIS_RTOS
/* #define NO_FILESYSTEM or define Filesystem option */
#define WOLFSSL_KEIL_FS
#define NO_WOLFSSL_DIR
#define WOLFSSL_NO_CURRDIR
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
/* user_settings.h
*
* Copyright (C) 2006-2017 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
*/
#define NO_MAIN_DRIVER
#define BENCH_EMBEDDED
#define NO_DEV_RANDOM
#define WOLFSSL_USER_CURRTIME
#define SIZEOF_LONG_LONG 8
#define NO_WRITEV
#define NO_DEV_RANDOM
/* define your Rand gen for the operational use */
#define WOLFSSL_GENSEED_FORTEST
#define USE_WOLFSSL_MEMORY
#define WOLFSSL_MALLOC_CHECK
#define TFM_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
#define WC_RSA_BLINDING
#define XVALIDATEDATE(d, f,t) (0)
#define WOLFSSL_USER_CURRTIME /* for benchmark */
#define WOLFSSL_CURRTIME_OSTICK /* use OS tich for current_time */
#define WOLFSSL_GMTIME
// <<< Use Configuration Wizard in Context Menu >>>
// <h>Common options
// <o> MPU<0=>Undefined<1=>STM32F2xx<2=>STM32F4xx<3=>STM32F7xx
#define MDK_CONF_MPU 3
#if MDK_CONF_MPU == 0
#elif MDK_CONF_MPU == 1
#define WOLFSSL_STM32_CUBEMX
#define STM32F2xx
#elif MDK_CONF_MPU == 2
#define WOLFSSL_STM32_CUBEMX
#define STM32F4xx
#elif MDK_CONF_MPU == 3
#define WOLFSSL_STM32_CUBEMX
#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
#define MDK_CONF_THREAD 14
#if MDK_CONF_THREAD== 0
#define SINGLE_THREADED
#elif MDK_CONF_THREAD == 1
#define FREERTOS
#elif MDK_CONF_THREAD == 3
#define WOLFSSL_SAFERTOS
#elif MDK_CONF_THREAD == 4
#define USE_WINDOWS_API
#elif MDK_CONF_THREAD == 5
#define WOLFSSL_PTHREADS
#elif MDK_CONF_THREAD == 6
#define THREADX
#define NETX
#elif MDK_CONF_THREAD == 7
#define MICRIUM
#elif MDK_CONF_THREAD == 8
#define EBSNET
#elif MDK_CONF_THREAD == 9
#define FREESCALE_MQX
#define FREESCALE_KSDK_MQX
#elif MDK_CONF_THREAD == 10
#define WOLFSSL_TIRTOS
#elif MDK_CONF_THREAD == 11
#define WOLFSSL_uITRON4
#elif MDK_CONF_THREAD == 12
#define WOLFSSL_uTKERNEL2
#elif MDK_CONF_THREAD == 13
#define WOLFSSL_FROSTED
#elif MDK_CONF_THREAD == 14
#define WOLFSSL_CMSIS_RTOS
#elif MDK_CONF_THREAD == 15
#define SINGLE_THREADED
#endif
// <e>File System
#define MDK_CONF_FILESYSTEM 1
#if MDK_CONF_FILESYSTEM == 0
#define NO_FILESYSTEM
#else
#define WOLFSSL_KEIL_FS
#define NO_WOLFSSL_DIR
#endif
// </e>
// <o> Network<0=>None <1=>RLnet <2=>User I/O
#define MDK_CONF_NETWORK 0
#if MDK_CONF_NETWORK == 0
#elif MDK_CONF_NETWORK == 1
#define WOLFSSL_KEIL_TCP_NET
#elif MDK_CONF_NETWORK == 2
#define WOLFSSL_USER_IO
#endif
// <h>Debug options
// <e>Debug Message
#define MDK_CONF_DebugMessage 0
#if MDK_CONF_DebugMessage == 1
#define DEBUG_WOLFSSL
#endif
// </e>
// <e>Check malloc
#define MDK_CONF_CheckMalloc 1
#if MDK_CONF_CheckMalloc == 1
#define WOLFSSL_MALLOC_CHECK
#define USE_WOLFSSL_MEMORY
#endif
// </e>
// <e>ErrNo.h
#define MDK_CONF_ErrNo 1
#if MDK_CONF_ErrNo == 1
#define HAVE_ERRNO
#endif
// </e>
// <e>Error Strings
#define MDK_CONF_ErrorStrings 1
#if MDK_CONF_ErrorStrings == 0
#define NO_ERROR_STRINGS
#endif
// </e>
//</h>
//</h>
// <h> wolfCrypt Configuration
// <h>Hash/Crypt Algrithm
// <e>MD2
#define MDK_CONF_MD2 1
#if MDK_CONF_MD2 == 1
#define WOLFSSL_MD2
#endif
// </e>
// <e>MD4
#define MDK_CONF_MD4 1
#if MDK_CONF_MD4 == 0
#define NO_MD4
#endif
// </e>
// <e>MD5
#define MDK_CONF_MD5 1
#if MDK_CONF_MD5 == 0
#define NO_MD5
#endif
// </e>
// <e>SHA
#define MDK_CONF_SHA 1
#if MDK_CONF_SHA == 0
#define NO_SHA
#endif
// </e>
// <e>SHA-256
#define MDK_CONF_SHA256 1
#if MDK_CONF_SHA256 == 0
#define NO_SHA256
#endif
// </e>
// <e>SHA-384
#define MDK_CONF_SHA384 1
#if MDK_CONF_SHA384 == 1
#define WOLFSSL_SHA384
#endif
// </e>
// <e>SHA-512
#define MDK_CONF_SHA512 1
#if MDK_CONF_SHA512 == 1
#define WOLFSSL_SHA512
#endif
// </e>
// <e>Hash DRBG
#define MDK_CONF_HASHDRBG 1
#if MDK_CONF_HASHDRBG == 1
#define HAVE_HASHDRBG
#endif
// </e>
// <e>RIPEMD
#define MDK_CONF_RIPEMD 1
#if MDK_CONF_RIPEMD == 1
#define WOLFSSL_RIPEMD
#endif
// </e>
// <e>BLAKE2
#define MDK_CONF_BLAKE2 0
#if MDK_CONF_BLAKE2 == 1
#define HAVE_BLAKE2
#endif
// </e>
// <e>HMAC
#define MDK_CONF_HMAC 1
#if MDK_CONF_HMAC == 0
#define NO_HMAC
#endif
// </e>
// <e>HMAC KDF
#define MDK_CONF_HKDF 1
#if MDK_CONF_HKDF == 1
#define HAVE_HKDF
#endif
// </e>
// <e>AES CCM
#define MDK_CONF_AESCCM 1
#if MDK_CONF_AESCCM == 1
#define HAVE_AESCCM
#endif
// </e>
// <e>AES GCM
#define MDK_CONF_AESGCM 1
#if MDK_CONF_AESGCM == 1
#define HAVE_AESGCM
#endif
// </e>
// <e>RC4
#define MDK_CONF_RC4 1
#if MDK_CONF_RC4 == 0
#define NO_RC4
#endif
// </e>
// <e>HC128
#define MDK_CONF_HC128 1
#if MDK_CONF_AESGCM == 0
#define NO_HC128
#endif
// </e>
// <e>RABBIT
#define MDK_CONF_RABBIT 1
#if MDK_CONF_RABBIT == 0
#define NO_RABBIT
#endif
// </e>
// <e>CHACHA
#define MDK_CONF_CHACHA 1
#if MDK_CONF_CHACHA == 1
#define HAVE_CHACHA
#endif
// </e>
// <e>POLY1305
#define MDK_CONF_POLY1305 1
#if MDK_CONF_POLY1305 == 1
#define HAVE_POLY1305
#define HAVE_ONE_TIME_AUTH
#endif
// </e>
// <e>DES3
#define MDK_CONF_DES3 1
#if MDK_CONF_DES3 == 0
#define NO_DES3
#endif
// </e>
// <e>AES
#define MDK_CONF_AES 1
#if MDK_CONF_AES == 0
#define NO_AES
#endif
// </e>
// <e>CAMELLIA
#define MDK_CONF_CAMELLIA 1
#if MDK_CONF_CAMELLIA == 1
#define HAVE_CAMELLIA
#endif
// </e>
// <e>DH
#define MDK_CONF_DH 1
#if MDK_CONF_DH == 0
#define NO_DH
#endif
// </e>
// <e>DSA
#define MDK_CONF_DSA 1
#if MDK_CONF_DSA == 0
#define NO_DSA
#endif
// </e>
// <e>SRP
#define MDK_CONF_SRP 1
#if MDK_CONF_SRP == 1
#define HAVE_SRP
#endif
// </e>
// <e>PWDBASED
#define MDK_CONF_PWDBASED 1
#if MDK_CONF_PWDBASED == 0
#define NO_PWDBASED
#endif
// </e>
// <e>ECC
#define MDK_CONF_ECC 1
#if MDK_CONF_ECC == 1
#define HAVE_ECC
#endif
// </e>
// <e>CURVE25519
#define MDK_CONF_CURVE25519 1
#if MDK_CONF_CURVE25519 == 1
#define HAVE_CURVE25519
#define CURVED25519_SMALL
#endif
// </e>
// <e>CURVE25519 SMALL
#define MDK_CONF_CURVE25519_SMALL 0
#if MDK_CONF_CURVE25519_SMALL == 1
#define CURVED25519_SMALL
#endif
// </e>
// <e>ED25519
#define MDK_CONF_ED25519 1
#if MDK_CONF_ED25519 == 1
#define HAVE_ED25519
#endif
// </e>
// <e>ED25519 SMALL
#define MDK_CONF_ED25519_SMALL 0
#if MDK_CONF_ED25519_SMALL == 1
#define ED25519_SMALL
#endif
// </e>
// <e>PKCS7
#define MDK_CONF_PKCS7 0
#if MDK_CONF_PKCS7 == 1
#define HAVE_PKCS7
#endif
// </e>
// <e>NTRU (need License, "crypto_ntru.h")
#define MDK_CONF_NTRU 0
#if MDK_CONF_NTRU == 1
#define HAVE_NTRU
#endif
// </e>
// </h>
// <e>Random Seed, for TEST Only
#define MDK_CONF_RNDSEED 1
#if MDK_CONF_RNDSEED == 1
#define WOLFSSL_GENSEED_FORTEST
#endif
// </e>
// <h>Hardware Crypt (See document for usage)
// <e>Hardware RNG
#define MDK_CONF_STM32F2_RNG 1
#if MDK_CONF_STM32F2_RNG == 1
#define WOLFSSL_STM32_CUBEMX
#define STM32_RNG
#define WC_ASYNC_DEV_SIZE 320+24
#define STM32_HAL_TIMEOUT 0xFF
#if defined(STM32F2xx)
#define WOLFSSL_STM32F2
#elif defined(STM32F4xx)
#define WOLFSSL_STM32F4
#elif defined(STM32F7xx)
#define WOLFSSL_STM32F7
#endif
#endif
// </e>
// <e>Hardware Crypt
#define MDK_CONF_STM32F2_CRYPTO 1
#if MDK_CONF_STM32F2_CRYPTO == 1
#define WOLFSSL_STM32_CUBEMX
#define STM32_CRYPTO
#define WC_ASYNC_DEV_SIZE 320+24
#define STM32_HAL_TIMEOUT 0xFF
#if defined(STM32F2xx)
#define WOLFSSL_STM32F2
#elif defined(STM32F4xx)
#define WOLFSSL_STM32F4
#elif defined(STM32F7xx)
#define WOLFSSL_STM32F7
#endif
#endif
// </e>
// <e>Hardware Hash
#define MDK_CONF_STM32F2_HASH 1
#if MDK_CONF_STM32F2_HASH == 1
#define WOLFSSL_STM32_CUBEMX
#define STM32_HASH
#define WC_ASYNC_DEV_SIZE 320+24
#define STM32_HAL_TIMEOUT 0xFF
#if defined(STM32F2xx)
#define WOLFSSL_STM32F2
#elif defined(STM32F4xx)
#define WOLFSSL_STM32F4
#elif defined(STM32F7xx)
#define WOLFSSL_STM32F7
#endif
#endif
// </e>
// </h>
// <h>Cert/Key Strage
// <o>Cert Storage <0=> SD Card <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes)
#define MDK_CONF_CERT_BUFF 0
#if MDK_CONF_CERT_BUFF== 1
#define USE_CERT_BUFFERS_1024
#elif MDK_CONF_CERT_BUFF == 2
#define USE_CERT_BUFFERS_2048
#endif
//</h>
// <h>Cert/Key Generation
// <e>CertGen
#define MDK_CONF_CERT_GEN 0
#if MDK_CONF_CERT_GEN == 1
#define WOLFSSL_CERT_GEN
#endif
// </e>
// <e>KeyGen
#define MDK_CONF_KEY_GEN 0
#if MDK_CONF_KEY_GEN == 1
#define WOLFSSL_KEY_GEN
#endif
// </e>
// </h>
// <e>Use Fast Math
#define MDK_CONF_FASTMATH 1
#if MDK_CONF_FASTMATH == 1
#define USE_FAST_MATH
#define TFM_TIMING_RESISTANT
#endif
// </e>
// <e>Small Stack
#define MDK_CONF_SmallStack 0
#if MDK_CONF_SmallStack == 0
#define NO_WOLFSSL_SMALL_STACK
#endif
// </e>
#define BENCH_EMBEDDED
// </h>
/**** wolfSSL Configuration ****/
// <h> wolfSSL Configuration
// <e>TLS 1.3
#define MDK_CONF_TLS 0
#if MDK_CONF_TLS == 1
#define WOLFSSL_TLS13
#define HAVE_TLS_EXTENSIONS
#define WC_RSA_PSS
#define HAVE_HKDF
#define HAVE_FFDHE_2048
#endif
// </e>
// <e>Include Old TLS
#define MDK_CONF_NO_OLDTLS 0
#if MDK_CONF_NO_OLDTLS == 0
#define NO_OLD_TLS
#endif
// </e>
// <e>CRL
#define MDK_CONF_CRL 0
#if MDK_CONF_CRL == 1
#define HAVE_CRL
#define WOLFSSL_DER_LOAD
#endif
// </e>
// <e>OCSP
#define MDK_CONF_OCSP 0
#if MDK_CONF_OCSP == 1
#define HAVE_OCSP
#endif
// </e>
// <e>OpenSSL Extra
#define MDK_CONF_OPENSSL_EXTRA 0
#if MDK_CONF_OPENSSL_EXTRA == 1
#define OPENSSL_EXTRA
#endif
// </e>
//</h>
#define NO_WRITEV
#define NO_MAIN_DRIVER

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@ -28,16 +28,81 @@
#include "wolfcrypt/test/test.h"
#include <stdio.h>
#include "stm32f2xx_hal.h"
#include "cmsis_os.h"
#include <time.h>
/* Dummy definition for test RTC */
#define RTC_YEAR 2018
#define RTC_MONTH 1
#define RTC_DAY 1
#if defined(STM32F7xx)
#include "stm32f7xx_hal.h"
#elif defined(STM32F4xx)
#include "stm32f4xx_hal.h"
#elif defined(STM32F2xx)
#include "stm32f2xx_hal.h"
#endif
#warning "write MPU specific Set ups\n"
static void SystemClock_Config (void) {
/*-----------------------------------------------------------------------------
* System Clock Configuration
*----------------------------------------------------------------------------*/
void SystemClock_Config(void) {
#warning "write MPU specific System Clock Set up\n"
}
static void MPU_Config (void) {
}
static void CPU_CACHE_Enable (void) {
}
#ifdef RTE_CMSIS_RTOS_RTX
extern uint32_t os_time;
static time_t epochTime;
uint32_t HAL_GetTick(void) {
return os_time;
}
time_t time(time_t *t){
return epochTime ;
}
void setTime(time_t t){
epochTime = t;
}
#endif
#ifdef WOLFSSL_CURRTIME_OSTICK
#include <stdint.h>
extern uint32_t os_time;
double current_time(int reset)
{
if(reset) os_time = 0 ;
return (double)os_time /1000.0;
}
#else
#include <stdint.h>
#define DWT ((DWT_Type *) (0xE0001000UL) )
typedef struct
{
uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */
uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */
} DWT_Type;
extern uint32_t SystemCoreClock ;
double current_time(int reset)
{
if(reset) DWT->CYCCNT = 0 ;
return ((double)DWT->CYCCNT/SystemCoreClock) ;
}
#endif
/*-----------------------------------------------------------------------------
* Initialize a Flash Memory Card
*----------------------------------------------------------------------------*/
@ -48,13 +113,13 @@ static void init_filesystem (void) {
int32_t retv;
retv = finit ("M0:");
if (retv == 0) {
if (retv == fsOK) {
retv = fmount ("M0:");
if (retv == 0) {
if (retv == fsOK) {
printf ("Drive M0 ready!\n");
}
else {
printf ("Drive M0 mount failed!\n");
printf ("Drive M0 mount failed(%d)!\n", retv);
}
}
else {
@ -64,24 +129,28 @@ static void init_filesystem (void) {
#endif
/*-----------------------------------------------------------------------------
* mian entry
* mian entry
*----------------------------------------------------------------------------*/
void benchmark_test(void *arg) ;
int main()
void benchmark_test(void *arg) ;
int main()
{
void * arg = NULL ;
HAL_Init(); /* Initialize the HAL Library */
SystemClock_Config(); /* Configure the System Clock */
#if !defined(NO_FILESYSTEM)
init_filesystem ();
#endif
osDelay(300) ;
printf("=== Start: Crypt Benchmark ===\n") ;
benchmark_test(arg) ;
printf("=== End: Crypt Benchmark ===\n") ;
void * arg = NULL ;
MPU_Config();
CPU_CACHE_Enable();
HAL_Init(); /* Initialize the HAL Library */
SystemClock_Config(); /* Configure the System Clock */
#if !defined(NO_FILESYSTEM)
init_filesystem ();
#endif
setTime((RTC_YEAR-1970)*365*24*60*60 + RTC_MONTH*30*24*60*60 + RTC_DAY*24*60*60);
printf("=== Start: Crypt Benchmark ===\n") ;
benchmark_test(arg) ;
printf("=== End: Crypt Benchmark ===\n") ;
}

View File

@ -1,16 +1,11 @@
This program is a simple test suite of wolfCrypt library.
wolfCrypt test
In order to run this test suite, copy
{PACK}\wolfSSL\CyaSSL\{version}\cyassl\certs folder and files to the SD memory.
Use Configuration Wizard tab
user_settings.h for wolfCrypt options
For selecting test crypt algorism options, refer config-Crypt.h.
For the hardware crypt on config-Crypt.h, download
STSW-STM32062: STM32F2xx standard peripherals library at
http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to
{PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib
For further options, details, see wolfSSL User Manual.
Support
Support
-------
Please send questions or comments to support@wolfssl.com

View File

@ -0,0 +1,14 @@
LR_IROM1 0x08000000 0x00100000 { ; load region size_region
ER_IROM1 0x08000000 0x00100000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x20010000 0x00040000 { ; RW data
.ANY (+RW +ZI)
}
RW_RETARGET 0x2000FFF0 0x00000010 {
retarget_io.o (+ZI +RW)
}
}

View File

@ -8,7 +8,7 @@
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj</oExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<pExt>*.plm</pExt>
@ -26,12 +26,12 @@
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>12000000</CLKADS>
<CLKADS>25000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunSim>1</RunSim>
<RunTarget>0</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
@ -45,7 +45,7 @@
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\Object\</ListingPath>
<ListingPath>.\Output\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
@ -78,23 +78,6 @@
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<Books>
<Book>
<Number>0</Number>
<Title>Schematics (MCBSTM32F200)</Title>
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F2xx_DFP\2.2.0\MDK/Boards/Keil/MCBSTM32F200/Documentation/mcbstm32f200-schematics.pdf</Path>
</Book>
<Book>
<Number>1</Number>
<Title>User Manual (MCBSTM32F200)</Title>
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F2xx_DFP\2.2.0\MDK/Boards/Keil/MCBSTM32F200/Documentation/mcbstm32f200.chm</Path>
</Book>
<Book>
<Number>2</Number>
<Title>MCBSTM32F200 Evaluation Board Web Page (MCBSTM32F200)</Title>
<Path>http://www.keil.com/mcbstm32f200/</Path>
</Book>
</Books>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
@ -117,7 +100,8 @@
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<nTsel>1</nTsel>
<bEvRecOn>1</bEvRecOn>
<nTsel>5</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
@ -128,9 +112,14 @@
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile>.\STM32_SWO.ini</tIfile>
<pMon>BIN\UL2CM3.DLL</pMon>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U303030303030303030303031 -O8399 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(5BA02477) -L00(0) -TO1 -TC216000000 -TP21 -TDS86F -TDT0 -TDC1F -TIE1 -TIP1 -FO15 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F756NGHx$CMSIS\Flash\STM32F7x_1024.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
@ -138,13 +127,13 @@
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
<Name>(105=-1,-1,-1,-1,0)</Name>
<Key>ULP2CM3</Key>
<Name>-UP0940001 -O207 -S10 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(5BA02477) -L00(0) -TO1 -TC216000000 -TP11 -TDX0 -TDD0 -TDS8001 -TDT0 -TDC1F -TIE1 -TIP1 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F756NGHx$CMSIS\Flash\STM32F7x_1024.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)</Name>
<Name>(1010=-1,-1,-1,-1,0)(6017=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(6016=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -153,38 +142,39 @@
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ULP2CM3</Key>
<Name>-UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO7 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$CMSIS/Flash/STM32F2xx_1024.FLM)</Name>
<Key>DLGUARM</Key>
<Name>(105=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>-UM1020ADE -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP21 -TDS801F -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F207IGHx$CMSIS/Flash/STM32F2xx_1024.FLM)</Name>
<Name>-UV0998FBE -O207 -S10 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(5BA02477) -L00(0) -TO1 -TC216000000 -TP21 -TDS86F -TDT0 -TDC1F -TIE1 -TIP1 -FO15 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F756NGHx$CMSIS\Flash\STM32F7x_1024.FLM)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<SubType>8</SubType>
<ItemText>clientKey</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>8</SubType>
<ItemText>0x8004dc8</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<ItemText>mfxstm32l152Identifier</ItemText>
</Ww>
</WatchWindow1>
<ScvdPack>
<Filename>C:\Keil_v5\ARM\PACK\Keil\MDK-Middleware\7.5.0\FileSystem\FileSystem.scvd</Filename>
<Type>Keil.MDK-Middleware.7.5.0</Type>
<SubType>1</SubType>
</ScvdPack>
<ScvdPack>
<Filename>C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.3.2\EventRecorder.scvd</Filename>
<Type>Keil.ARM_Compiler.1.3.2</Type>
<SubType>1</SubType>
</ScvdPack>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
@ -210,6 +200,19 @@
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<DebugDescription>
<Enable>1</Enable>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>2000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
@ -224,7 +227,6 @@
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\main.c</PathWithFileName>
@ -234,6 +236,46 @@
</File>
</Group>
<Group>
<GroupName>Linker Script</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\CryptTest.sct</PathWithFileName>
<FilenameWithoutPath>CryptTest.sct</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Documentation</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Abstract.txt</PathWithFileName>
<FilenameWithoutPath>Abstract.txt</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Configuration</GroupName>
<tvExp>1</tvExp>
@ -241,24 +283,10 @@
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>2</FileNumber>
<GroupNumber>4</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\RTE\wolfSSL\config-Crypt.h</PathWithFileName>
<FilenameWithoutPath>config-Crypt.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\RTE\wolfSSL\user_settings.h</PathWithFileName>
@ -269,24 +297,11 @@
</Group>
<Group>
<GroupName>Documentation</GroupName>
<GroupName>::Board Support</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Abstract.txt</PathWithFileName>
<FilenameWithoutPath>Abstract.txt</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<RteFlg>1</RteFlg>
</Group>
<Group>

View File

@ -10,18 +10,20 @@
<TargetName>CryptTest</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060528::V5.06 update 5 (build 528)::ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>STM32F207IGHx</Device>
<Device>STM32F756NGHx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32F2xx_DFP.2.2.0</PackID>
<PackID>Keil.STM32F7xx_DFP.2.9.0</PackID>
<PackURL>http://www.keil.com/pack</PackURL>
<Cpu>IROM(0x08000000,0x100000) IRAM(0x20000000,0x20000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE</Cpu>
<Cpu>IROM(0x08000000,0x100000) IROM2(0x00200000,0x100000) IRAM(0x20010000,0x40000) IRAM2(0x20000000,0x10000) CPUTYPE("Cortex-M7") FPU3(SFPU) CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F207IGHx$CMSIS/Flash/STM32F2xx_1024.FLM))</FlashDriverDll>
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F756NGHx$CMSIS\Flash\STM32F7x_1024.FLM))</FlashDriverDll>
<DeviceId>0</DeviceId>
<RegisterFile>$$Device:STM32F207IGHx$Drivers/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h</RegisterFile>
<RegisterFile>$$Device:STM32F756NGHx$Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f7xx.h</RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
@ -31,7 +33,7 @@
<SLE66CMisc></SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile>$$Device:STM32F207IGHx$CMSIS\SVD\STM32F20x.svd</SFDFile>
<SFDFile>$$Device:STM32F756NGHx$CMSIS\SVD\STM32F7x.svd</SFDFile>
<bCustSvd>0</bCustSvd>
<UseEnv>0</UseEnv>
<BinPath></BinPath>
@ -46,14 +48,14 @@
<NotGenerated>0</NotGenerated>
<InvalidFlash>1</InvalidFlash>
</TargetStatus>
<OutputDirectory>.\Object\</OutputDirectory>
<OutputDirectory>.\Output\</OutputDirectory>
<OutputName>CryptTest</OutputName>
<CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib>
<CreateHexFile>0</CreateHexFile>
<DebugInformation>1</DebugInformation>
<BrowseInformation>1</BrowseInformation>
<ListingPath>.\Object\</ListingPath>
<ListingPath>.\Output\</ListingPath>
<HexFormatSelection>1</HexFormatSelection>
<Merge32K>0</Merge32K>
<CreateBatchFile>0</CreateBatchFile>
@ -84,6 +86,8 @@
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopA1X>0</nStopA1X>
<nStopA2X>0</nStopA2X>
</AfterMake>
<SelectedForBatchBuild>0</SelectedForBatchBuild>
<SVCSIdString></SVCSIdString>
@ -108,11 +112,11 @@
<SimDllName>SARMCM3.DLL</SimDllName>
<SimDllArguments> -REMAP -MPU</SimDllArguments>
<SimDlgDll>DCM.DLL</SimDlgDll>
<SimDlgDllArguments>-pCM3</SimDlgDllArguments>
<SimDlgDllArguments>-pCM7</SimDlgDllArguments>
<TargetDllName>SARMCM3.DLL</TargetDllName>
<TargetDllArguments> -MPU</TargetDllArguments>
<TargetDlgDll>TCM.DLL</TargetDlgDll>
<TargetDlgDllArguments>-pCM3</TargetDlgDllArguments>
<TargetDlgDllArguments>-pCM7</TargetDlgDllArguments>
</DllOption>
<DebugOption>
<OPTHX>
@ -122,47 +126,6 @@
<HexOffset>0</HexOffset>
<Oh166RecLen>16</Oh166RecLen>
</OPTHX>
<Simulator>
<UseSimulator>0</UseSimulator>
<LoadApplicationAtStartup>1</LoadApplicationAtStartup>
<RunToMain>1</RunToMain>
<RestoreBreakpoints>1</RestoreBreakpoints>
<RestoreWatchpoints>1</RestoreWatchpoints>
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
<RestoreFunctions>1</RestoreFunctions>
<RestoreToolbox>1</RestoreToolbox>
<LimitSpeedToRealTime>0</LimitSpeedToRealTime>
<RestoreSysVw>1</RestoreSysVw>
</Simulator>
<Target>
<UseTarget>1</UseTarget>
<LoadApplicationAtStartup>1</LoadApplicationAtStartup>
<RunToMain>1</RunToMain>
<RestoreBreakpoints>1</RestoreBreakpoints>
<RestoreWatchpoints>1</RestoreWatchpoints>
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
<RestoreFunctions>0</RestoreFunctions>
<RestoreToolbox>1</RestoreToolbox>
<RestoreTracepoints>1</RestoreTracepoints>
<RestoreSysVw>1</RestoreSysVw>
</Target>
<RunDebugAfterBuild>0</RunDebugAfterBuild>
<TargetSelection>1</TargetSelection>
<SimDlls>
<CpuDll></CpuDll>
<CpuDllArguments></CpuDllArguments>
<PeripheralDll></PeripheralDll>
<PeripheralDllArguments></PeripheralDllArguments>
<InitializationFile></InitializationFile>
</SimDlls>
<TargetDlls>
<CpuDll></CpuDll>
<CpuDllArguments></CpuDllArguments>
<PeripheralDll></PeripheralDll>
<PeripheralDllArguments></PeripheralDllArguments>
<InitializationFile>.\STM32_SWO.ini</InitializationFile>
<Driver>BIN\UL2CM3.DLL</Driver>
</TargetDlls>
</DebugOption>
<Utilities>
<Flash1>
@ -171,11 +134,11 @@
<RunIndependent>0</RunIndependent>
<UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
<Capability>1</Capability>
<DriverSelection>4100</DriverSelection>
<DriverSelection>4096</DriverSelection>
</Flash1>
<bUseTDR>1</bUseTDR>
<Flash2>BIN\UL2CM3.DLL</Flash2>
<Flash3></Flash3>
<Flash3>"" ()</Flash3>
<Flash4></Flash4>
<pFcarmOut></pFcarmOut>
<pFcarmGrp></pFcarmGrp>
@ -211,7 +174,7 @@
<AdsLsxf>1</AdsLsxf>
<RvctClst>0</RvctClst>
<GenPPlst>0</GenPPlst>
<AdsCpuType>"Cortex-M3"</AdsCpuType>
<AdsCpuType>"Cortex-M7"</AdsCpuType>
<RvctDeviceName></RvctDeviceName>
<mOS>1</mOS>
<uocRom>0</uocRom>
@ -220,13 +183,14 @@
<hadIRAM>1</hadIRAM>
<hadXRAM>0</hadXRAM>
<uocXRam>0</uocXRam>
<RvdsVP>0</RvdsVP>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<RvdsVP>2</RvdsVP>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>1</hadIROM2>
<StupSel>8</StupSel>
<useUlib>0</useUlib>
<EndSel>0</EndSel>
<uLtcg>0</uLtcg>
<nSecure>0</nSecure>
<RoSelD>3</RoSelD>
<RwSelD>3</RwSelD>
<CodeSel>0</CodeSel>
@ -279,8 +243,8 @@
</Ocm6>
<IRAM>
<Type>0</Type>
<StartAddress>0x20000000</StartAddress>
<Size>0x20000</Size>
<StartAddress>0x20010000</StartAddress>
<Size>0x40000</Size>
</IRAM>
<IROM>
<Type>1</Type>
@ -314,8 +278,8 @@
</OCR_RVCT4>
<OCR_RVCT5>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
<StartAddress>0x200000</StartAddress>
<Size>0x100000</Size>
</OCR_RVCT5>
<OCR_RVCT6>
<Type>0</Type>
@ -334,13 +298,13 @@
</OCR_RVCT8>
<OCR_RVCT9>
<Type>0</Type>
<StartAddress>0x20000000</StartAddress>
<Size>0x20000</Size>
<StartAddress>0x20010000</StartAddress>
<Size>0x40000</Size>
</OCR_RVCT9>
<OCR_RVCT10>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
<StartAddress>0x20000000</StartAddress>
<Size>0x10000</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector></RvctStartVector>
@ -361,9 +325,16 @@
<uSurpInc>0</uSurpInc>
<uC99>0</uC99>
<useXO>0</useXO>
<v6Lang>0</v6Lang>
<v6LangP>0</v6LangP>
<vShortEn>0</vShortEn>
<vShortWch>0</vShortWch>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define>HAVE_CONFIG_H WOLFSSL_USER_SETTINGS MDK_CONF_CryptTest</Define>
<Define>USE_STM32756G_EVAL USE_IOEXPANDER WOLFSSL_USER_SETTINGS</Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
@ -378,6 +349,7 @@
<NoWarn>0</NoWarn>
<uSurpInc>0</uSurpInc>
<useXO>0</useXO>
<uClangAs>0</uClangAs>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
@ -386,16 +358,16 @@
</VariousControls>
</Aads>
<LDads>
<umfTarg>1</umfTarg>
<umfTarg>0</umfTarg>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<noStLib>0</noStLib>
<RepFail>1</RepFail>
<useFile>0</useFile>
<TextAddressRange>0x08000000</TextAddressRange>
<DataAddressRange>0x20000000</DataAddressRange>
<TextAddressRange></TextAddressRange>
<DataAddressRange></DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile></ScatterFile>
<ScatterFile>.\CryptTest.sct</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
@ -416,17 +388,12 @@
</Files>
</Group>
<Group>
<GroupName>Configuration</GroupName>
<GroupName>Linker Script</GroupName>
<Files>
<File>
<FileName>config-Crypt.h</FileName>
<FileName>CryptTest.sct</FileName>
<FileType>5</FileType>
<FilePath>.\RTE\wolfSSL\config-Crypt.h</FilePath>
</File>
<File>
<FileName>user_settings.h</FileName>
<FileType>5</FileType>
<FilePath>.\RTE\wolfSSL\user_settings.h</FilePath>
<FilePath>.\CryptTest.sct</FilePath>
</File>
</Files>
</Group>
@ -440,6 +407,19 @@
</File>
</Files>
</Group>
<Group>
<GroupName>Configuration</GroupName>
<Files>
<File>
<FileName>user_settings.h</FileName>
<FileType>5</FileType>
<FilePath>.\RTE\wolfSSL\user_settings.h</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>::Board Support</GroupName>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
</Group>
@ -463,367 +443,307 @@
</Targets>
<RTE>
<packages>
<filter>
<targetInfos/>
</filter>
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0">
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</package>
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0">
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</package>
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta">
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</package>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0">
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</package>
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0">
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</package>
</packages>
<apis>
<api Capiversion="2.02" Cclass="CMSIS Driver" Cgroup="MCI" exclusive="0">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0"/>
<package name="CMSIS" schemaVersion="1.2" url="http://www.keil.com/pack/" vendor="ARM" version="4.1.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</api>
<api Capiversion="1.0" Cclass="CMSIS" Cgroup="RTOS" exclusive="1">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0"/>
<api Cclass="CMSIS" Cgroup="RTOS" exclusive="0">
<package license="CMSIS\CMSIS END USER LICENCE AGREEMENT.rtf" name="CMSIS" url="http://www.keil.com/pack/" vendor="ARM" version="3.20.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</api>
<api Cclass="Device" Cgroup="STM32Cube Framework" exclusive="1">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<api Capiversion="1.1.0" Cclass="Device" Cgroup="STM32Cube Framework" exclusive="1">
<package name="STM32F4xx_DFP" schemaVersion="1.2" url="http://www.keil.com/pack" vendor="Keil" version="2.0.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</api>
</apis>
<components>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="4.1.0" condition="CMSIS Core">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0"/>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.1.1" condition="ARMv6_7_8-M Device">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.3.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="CMSIS" Cgroup="RTOS" Csub="Keil RTX" Cvendor="ARM" Cversion="4.78.0" condition="Cortex-M Device Startup">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0"/>
<component Capiversion="1.0.0" Cclass="CMSIS" Cgroup="RTOS" Csub="Keil RTX" Cvendor="ARM" Cversion="4.81.1" condition="RTOS RTX">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.1.1"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="CORE" Cvariant="LFN" Cvendor="Keil" Cversion="6.5.0" condition="CMSIS Core with RTOS and File System I/O">
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta"/>
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="Event Recorder" Cvariant="DAP" Cvendor="Keil" Cversion="1.2.1" condition="Cortex-M Device">
<package name="ARM_Compiler" schemaVersion="1.4.9" url="http://www.keil.com/pack/" vendor="Keil" version="1.3.2"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="Drive" Csub="Memory Card" Cvendor="Keil" Cversion="6.5.0" condition="File System and SD/MMC Driver" maxInstances="2">
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta"/>
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="I/O" Csub="File" Cvariant="File System" Cvendor="Keil" Cversion="1.2.1" condition="ARMCC Cortex-M with File System">
<package name="ARM_Compiler" schemaVersion="1.4.9" url="http://www.keil.com/pack/" vendor="Keil" version="1.3.3"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Capiversion="2.02" Cclass="CMSIS Driver" Cgroup="MCI" Cvendor="Keil" Cversion="2.02" condition="STM32F2 CMSIS_Driver MCI">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="I/O" Csub="STDERR" Cvariant="ITM" Cvendor="Keil" Cversion="1.2.1" condition="ARMCC Cortex-M with ITM">
<package name="ARM_Compiler" schemaVersion="1.4.9" url="http://www.keil.com/pack/" vendor="Keil" version="1.3.3"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Compiler" Cgroup="I/O" Csub="File" Cvariant="File System" Cvendor="Keil" Cversion="1.0.0" condition="ARMCC Cortex-M with File System">
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0"/>
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="I/O" Csub="STDIN" Cvariant="ITM" Cvendor="Keil" Cversion="1.2.1" condition="ARMCC Cortex-M with ITM">
<package name="ARM_Compiler" schemaVersion="1.4.9" url="http://www.keil.com/pack/" vendor="Keil" version="1.3.3"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Compiler" Cgroup="I/O" Csub="STDERR" Cvariant="ITM" Cvendor="Keil" Cversion="1.0.0" condition="ARMCC Cortex-M with ITM">
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0"/>
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="I/O" Csub="STDOUT" Cvariant="ITM" Cvendor="Keil" Cversion="1.2.1" condition="ARMCC Cortex-M with ITM">
<package name="ARM_Compiler" schemaVersion="1.4.9" url="http://www.keil.com/pack/" vendor="Keil" version="1.3.3"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Compiler" Cgroup="I/O" Csub="STDIN" Cvariant="ITM" Cvendor="Keil" Cversion="1.0.0" condition="ARMCC Cortex-M with ITM">
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0"/>
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="I/O" Csub="TTY" Cvariant="ITM" Cvendor="Keil" Cversion="1.2.1" condition="ARMCC Cortex-M with ITM">
<package name="ARM_Compiler" schemaVersion="1.4.9" url="http://www.keil.com/pack/" vendor="Keil" version="1.3.3"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Compiler" Cgroup="I/O" Csub="STDOUT" Cvariant="ITM" Cvendor="Keil" Cversion="1.0.0" condition="ARMCC Cortex-M with ITM">
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0"/>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="CORE" Cvariant="LFN Debug" Cvendor="Keil" Cversion="6.10.0" condition="CMSIS Core with RTOS and File System I/O and Event Recorder">
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.5.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 Framework Classic">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="Drive" Csub="Memory Card" Cvendor="Keil" Cversion="6.10.0" condition="File System and SD/MMC Driver" maxInstances="2">
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.5.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Common" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 HAL Common">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Cbundle="STM32756G-EVAL" Cclass="Board Support" Cgroup="Drivers" Csub="Basic I/O" Cvendor="Keil" Cversion="1.1.0" condition="STM32756G-EVAL BSP">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Cortex" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 HAL">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Cbundle="STM32756G-EVAL" Cclass="Board Support" Cgroup="Drivers" Csub="I/O" Cvendor="Keil" Cversion="1.1.0" condition="STM32756G-EVAL BSP IO">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="DMA" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 HAL">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Cbundle="STM32756G-EVAL" Cclass="Board Support" Cgroup="Drivers" Csub="SDRAM" Cvendor="Keil" Cversion="1.1.0" condition="STM32756G-EVAL BSP SDRAM">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="GPIO" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 HAL">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Capiversion="2.2.0" Cclass="CMSIS Driver" Cgroup="MCI" Cvendor="Keil" Cversion="1.4.0" condition="STM32F7 CMSIS_Driver MCI">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="RCC" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 HAL GPIO">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Capiversion="1.0.0" Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 Framework Classic">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0-dev5"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="SRAM" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 HAL DMA">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="ADC" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.0.1" condition="STM32F2 CMSIS HAL">
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="CRYP" Cvendor="Keil" Cversion="1.2.0" condition="STM32F756_777_779 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Common" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL Common">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Dummy" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Cortex" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Test" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="DMA" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="GPIO" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="HASH" Cvendor="Keil" Cversion="1.2.0" condition="STM32F756_777_779 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="I2C" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="PWR" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="RCC" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL GPIO">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="RNG" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="SDRAM" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="SRAM" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="UART" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 HAL DMA">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 CMSIS">
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0-dev5"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.14.0" condition="wolfCrypt-Core">
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.4" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.14.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Dummy" Cvendor="wolfSSL" Cversion="3.14.0" condition="wolfCrypt-Core">
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.4" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.14.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Test" Cvendor="wolfSSL" Cversion="3.14.0" condition="wolfCrypt-Core">
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.4" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.14.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</component>
</components>
<files>
<file attr="config" category="source" name="CMSIS_RTX\Templates\RTX_Conf_CM.c" version="4.70.0">
<file attr="config" category="source" name="CMSIS\RTOS\RTX\Templates\RTX_Conf_CM.c" version="4.70.1">
<instance index="0">RTE\CMSIS\RTX_Conf_CM.c</instance>
<component Cclass="CMSIS" Cgroup="RTOS" Csub="Keil RTX" Cvendor="ARM" Cversion="4.74.0" condition="CMSIS Core"/>
<package name="CMSIS" schemaVersion="1.0" url="http://www.keil.com/pack/" vendor="ARM" version="3.20.4"/>
<component Capiversion="1.0.0" Cclass="CMSIS" Cgroup="RTOS" Csub="Keil RTX" Cvendor="ARM" Cversion="4.81.1" condition="RTOS RTX" isDefaultVariant="1"/>
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.3.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</file>
<file attr="config" category="header" name="CMSIS\Driver\Config\RTE_Device.h" version="2.01">
<instance index="0">RTE\Device\STM32F207IGHx\RTE_Device.h</instance>
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 Framework Classic"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<file attr="config" category="header" name="Config\EventRecorderConf.h" version="1.0.0">
<instance index="0">RTE\Compiler\EventRecorderConf.h</instance>
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="Event Recorder" Cvariant="DAP" Cvendor="Keil" Cversion="1.2.1" condition="Cortex-M Device"/>
<package name="ARM_Compiler" schemaVersion="1.4.9" url="http://www.keil.com/pack/" vendor="Keil" version="1.3.3"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</file>
<file attr="config" category="source" condition="STM32F207xx_ARMCC" name="Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\arm\startup_stm32f207xx.s" version="2.0.1">
<instance index="0">RTE\Device\STM32F207IGHx\startup_stm32f207xx.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.0.1" condition="STM32F2 CMSIS HAL"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<file attr="config" category="header" name="CMSIS\Driver\Config\RTE_Device.h" version="1.4.0">
<instance index="0">RTE\Device\STM32F756NGHx\RTE_Device.h</instance>
<component Capiversion="1.0.0" Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 Framework Classic"/>
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</file>
<file attr="config" category="header" name="MDK\Templates\Inc\stm32f2xx_hal_conf.h">
<instance index="0">RTE\Device\STM32F207IGHx\stm32f2xx_hal_conf.h</instance>
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 Framework Classic"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<file attr="config" category="source" condition="STM32F756_ARMCC" name="Drivers\CMSIS\Device\ST\STM32F7xx\Source\Templates\arm\startup_stm32f756xx.s" version="1.2.0">
<instance index="0">RTE\Device\STM32F756NGHx\startup_stm32f756xx.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 CMSIS"/>
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</file>
<file attr="config" category="source" name="Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\system_stm32f2xx.c" version="2.0.1">
<instance index="0">RTE\Device\STM32F207IGHx\system_stm32f2xx.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.0.1" condition="STM32F2 CMSIS HAL"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<file attr="config" category="header" name="MDK\Templates\Inc\stm32f7xx_hal_conf.h" version="1.2.0">
<instance index="0">RTE\Device\STM32F756NGHx\stm32f7xx_hal_conf.h</instance>
<component Capiversion="1.0.0" Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 Framework Classic"/>
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</file>
<file attr="config" category="header" name="CMSIS\Driver\Config\RTE_Device.h" version="2.01">
<instance index="0" removed="1">RTE\Device\STM32F207IGTx\RTE_Device.h</instance>
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 Framework Classic"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<targetInfos/>
<file attr="config" category="source" name="Drivers\CMSIS\Device\ST\STM32F7xx\Source\Templates\system_stm32f7xx.c" version="1.2.0">
<instance index="0">RTE\Device\STM32F756NGHx\system_stm32f7xx.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.2.0" condition="STM32F7 CMSIS"/>
<package name="STM32F7xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</file>
<file attr="config" category="source" condition="STM32F207xx_ARMCC" name="Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\arm\startup_stm32f207xx.s" version="2.0.1">
<instance index="0" removed="1">RTE\Device\STM32F207IGTx\startup_stm32f207xx.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.0.1" condition="STM32F2 CMSIS HAL"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="MDK\Templates\Inc\stm32f2xx_hal_conf.h">
<instance index="0" removed="1">RTE\Device\STM32F207IGTx\stm32f2xx_hal_conf.h</instance>
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.0.1" condition="STM32F2 Framework Classic"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Drivers\CMSIS\Device\ST\STM32F2xx\Source\Templates\system_stm32f2xx.c" version="2.0.1">
<instance index="0" removed="1">RTE\Device\STM32F207IGTx\system_stm32f2xx.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.0.1" condition="STM32F2 CMSIS HAL"/>
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="RTE_Driver\Config\RTE_Device.h">
<instance index="0" removed="1">RTE\Device\STM32F207IG\RTE_Device.h</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.0.0" condition="STM32F2xx CMSIS Device"/>
<package name="STM32F2xx_DFP" schemaVersion="1.2" url="http://www.keil.com/pack" vendor="Keil" version="1.0.7"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Device\Source\ARM\startup_stm32f2xx.s">
<instance index="0" removed="1">RTE\Device\STM32F207IG\startup_stm32f2xx.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.0.0" condition="STM32F2xx CMSIS Device"/>
<package name="STM32F2xx_DFP" schemaVersion="1.2" url="http://www.keil.com/pack" vendor="Keil" version="1.0.7"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Device\Source\system_stm32f2xx.c">
<instance index="0" removed="1">RTE\Device\STM32F207IG\system_stm32f2xx.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="1.0.0" condition="STM32F2xx CMSIS Device"/>
<package name="STM32F2xx_DFP" schemaVersion="1.2" url="http://www.keil.com/pack" vendor="Keil" version="1.0.7"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="FileSystem\Config\FS_Config.c" version="6.2">
<file attr="config" category="source" name="FileSystem\Config\FS_Config.c" version="6.2.0">
<instance index="0">RTE\File_System\FS_Config.c</instance>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="CORE" Cvariant="LFN" Cvendor="Keil" Cversion="6.5.0" condition="CMSIS Core with RTOS and File System I/O"/>
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta"/>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="CORE" Cvariant="LFN Debug" Cvendor="Keil" Cversion="6.10.0" condition="CMSIS Core with RTOS and File System I/O and Event Recorder"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.6.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</file>
<file attr="config" category="source" name="FileSystem\Config\FS_Config_MC.h" version="6.2">
<file attr="config" category="source" name="FileSystem\Config\FS_Config_MC.h" version="6.2.0">
<instance index="0">RTE\File_System\FS_Config_MC_0.h</instance>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="Drive" Csub="Memory Card" Cvendor="Keil" Cversion="6.5.0" condition="File System and SD/MMC Driver" maxInstances="2"/>
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta"/>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="Drive" Csub="Memory Card" Cvendor="Keil" Cversion="6.10.0" condition="File System and SD/MMC Driver" maxInstances="2"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.6.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config.c">
<instance index="0" removed="1">RTE\Network\Net_Config.c</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="CORE" Cvariant="Debug" Cvendor="Keil" Cversion="5.0.2" condition="CMSIS Core with RTOS"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config_BSD.h">
<instance index="0" removed="1">RTE\Network\Net_Config_BSD.h</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Socket" Csub="BSD" Cvendor="Keil" Cversion="5.0.2" condition="Network UDP/TCP"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config_DNS_Client.h">
<instance index="0" removed="1">RTE\Network\Net_Config_DNS_Client.h</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Service" Csub="DNS Client" Cvendor="Keil" Cversion="5.0.2" condition="Network UDP"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config_ETH.h">
<instance index="0" removed="1">RTE\Network\Net_Config_ETH_0.h</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Interface" Csub="ETH" Cvendor="Keil" Cversion="5.0.2" condition="Network Driver ETH" maxInstances="1"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config_TCP.h">
<instance index="0" removed="1">RTE\Network\Net_Config_TCP.h</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Socket" Csub="TCP" Cvendor="Keil" Cversion="5.0.2" condition="Network Interface"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config_UDP.h">
<instance index="0" removed="1">RTE\Network\Net_Config_UDP.h</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="Socket" Csub="UDP" Cvendor="Keil" Cversion="5.0.2" condition="Network Interface"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Debug.c">
<instance index="0" removed="1">RTE\Network\Net_Debug.c</instance>
<component Cbundle="MDK-Pro" Cclass="Network" Cgroup="CORE" Cvariant="Debug" Cvendor="Keil" Cversion="5.0.2" condition="CMSIS Core with RTOS"/>
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-Crypt.h">
<instance index="0" removed="1">RTE\Other\config-Crypt.h</instance>
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.9.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-FS.h">
<instance index="0" removed="1">RTE\Other\config-FS.h</instance>
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.9.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-RTX-TCP-FS.h">
<instance index="0" removed="1">RTE\Other\config-RTX-TCP-FS.h</instance>
<component Cclass="Other" Cgroup="wolfSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="3.9.0" condition="CyaSSL-RTX,TCP,FS"/>
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.9.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
<instance index="0" removed="1">RTE\Other\config.h</instance>
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.9.0"/>
<file attr="config" category="source" name="FileSystem\Config\FS_Config_NOR.h" version="6.2">
<instance index="0" removed="1">RTE\File_System\FS_Config_NOR_0.h</instance>
<component Cbundle="MDK-Pro" Cclass="File System" Cgroup="Drive" Csub="NOR" Cvendor="Keil" Cversion="6.9.8" condition="File System and Flash Driver" maxInstances="2"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.4.1"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-Crypt.h">
<instance index="0">RTE\wolfSSL\config-Crypt.h</instance>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
<instance index="0" removed="1">RTE\wolfSSL\config.h</instance>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
<package name="wolfSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<instance index="0" removed="1">RTE\wolfSSL\config-Crypt.h</instance>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core"/>
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.4" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.13.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\wolfssl\ctaocrypt\settings.h">
<instance index="0" removed="1">RTE\wolfSSL\settings.h</instance>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
<package license="wolfssl\IDE\MDK5-ARM\Docs\CyaSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\user_settings.h">
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\user_settings.h" version="3.14.0">
<instance index="0">RTE\wolfSSL\user_settings.h</instance>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.14.0" condition="wolfCrypt-Core"/>
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.4" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.14.0"/>
<targetInfos>
<targetInfo name="CryptTest"/>
</targetInfos>

View File

@ -1,31 +1,515 @@
/* user_settings.h
*
* Copyright (C) 2006-2017 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
*/
/* #define SINGLE_THREADED or define RTOS option */
#define WOLFSSL_CMSIS_RTOS
/* #define NO_FILESYSTEM or define Filesystem option */
#define WOLFSSL_KEIL_FS
#define NO_WOLFSSL_DIR
#define WOLFSSL_NO_CURRDIR
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
#define NO_MAIN_DRIVER
#define BENCH_EMBEDDED
#define NO_DEV_RANDOM
#define WOLFSSL_USER_CURRTIME
#define SIZEOF_LONG_LONG 8
#define NO_WRITEV
#define NO_DEV_RANDOM
/* define your Rand gen for the operational use */
#define WOLFSSL_GENSEED_FORTEST
#define USE_WOLFSSL_MEMORY
#define WOLFSSL_MALLOC_CHECK
#define TFM_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
#define WC_RSA_BLINDING
#define XVALIDATEDATE(d, f,t) (0)
#define WOLFSSL_USER_CURRTIME /* for benchmark */
#define WOLFSSL_CURRTIME_OSTICK /* use OS tich for current_time */
#define WOLFSSL_GMTIME
// <<< Use Configuration Wizard in Context Menu >>>
// <h>Common options
// <o> MPU<0=>Undefined<1=>STM32F2xx<2=>STM32F4xx<3=>STM32F7xx
#define MDK_CONF_MPU 3
#if MDK_CONF_MPU == 0
#elif MDK_CONF_MPU == 1
#define WOLFSSL_STM32_CUBEMX
#define STM32F2xx
#elif MDK_CONF_MPU == 2
#define WOLFSSL_STM32_CUBEMX
#define STM32F4xx
#elif MDK_CONF_MPU == 3
#define WOLFSSL_STM32_CUBEMX
#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
#define MDK_CONF_THREAD 14
#if MDK_CONF_THREAD== 0
#define SINGLE_THREADED
#elif MDK_CONF_THREAD == 1
#define FREERTOS
#elif MDK_CONF_THREAD == 3
#define WOLFSSL_SAFERTOS
#elif MDK_CONF_THREAD == 4
#define USE_WINDOWS_API
#elif MDK_CONF_THREAD == 5
#define WOLFSSL_PTHREADS
#elif MDK_CONF_THREAD == 6
#define THREADX
#define NETX
#elif MDK_CONF_THREAD == 7
#define MICRIUM
#elif MDK_CONF_THREAD == 8
#define EBSNET
#elif MDK_CONF_THREAD == 9
#define FREESCALE_MQX
#define FREESCALE_KSDK_MQX
#elif MDK_CONF_THREAD == 10
#define WOLFSSL_TIRTOS
#elif MDK_CONF_THREAD == 11
#define WOLFSSL_uITRON4
#elif MDK_CONF_THREAD == 12
#define WOLFSSL_uTKERNEL2
#elif MDK_CONF_THREAD == 13
#define WOLFSSL_FROSTED
#elif MDK_CONF_THREAD == 14
#define WOLFSSL_CMSIS_RTOS
#elif MDK_CONF_THREAD == 15
#define SINGLE_THREADED
#endif
// <e>File System
#define MDK_CONF_FILESYSTEM 1
#if MDK_CONF_FILESYSTEM == 0
#define NO_FILESYSTEM
#else
#define WOLFSSL_KEIL_FS
#define NO_WOLFSSL_DIR
#endif
// </e>
// <o> Network<0=>None <1=>RLnet <2=>User I/O
#define MDK_CONF_NETWORK 0
#if MDK_CONF_NETWORK == 0
#elif MDK_CONF_NETWORK == 1
#define WOLFSSL_KEIL_TCP_NET
#elif MDK_CONF_NETWORK == 2
#define WOLFSSL_USER_IO
#endif
// <h>Debug options
// <e>Debug Message
#define MDK_CONF_DebugMessage 0
#if MDK_CONF_DebugMessage == 1
#define DEBUG_WOLFSSL
#endif
// </e>
// <e>Check malloc
#define MDK_CONF_CheckMalloc 1
#if MDK_CONF_CheckMalloc == 1
#define WOLFSSL_MALLOC_CHECK
#define USE_WOLFSSL_MEMORY
#endif
// </e>
// <e>ErrNo.h
#define MDK_CONF_ErrNo 1
#if MDK_CONF_ErrNo == 1
#define HAVE_ERRNO
#endif
// </e>
// <e>Error Strings
#define MDK_CONF_ErrorStrings 1
#if MDK_CONF_ErrorStrings == 0
#define NO_ERROR_STRINGS
#endif
// </e>
//</h>
//</h>
// <h> wolfCrypt Configuration
// <h>Hash/Crypt Algrithm
// <e>MD2
#define MDK_CONF_MD2 1
#if MDK_CONF_MD2 == 1
#define WOLFSSL_MD2
#endif
// </e>
// <e>MD4
#define MDK_CONF_MD4 1
#if MDK_CONF_MD4 == 0
#define NO_MD4
#endif
// </e>
// <e>MD5
#define MDK_CONF_MD5 1
#if MDK_CONF_MD5 == 0
#define NO_MD5
#endif
// </e>
// <e>SHA
#define MDK_CONF_SHA 1
#if MDK_CONF_SHA == 0
#define NO_SHA
#endif
// </e>
// <e>SHA-256
#define MDK_CONF_SHA256 1
#if MDK_CONF_SHA256 == 0
#define NO_SHA256
#endif
// </e>
// <e>SHA-384
#define MDK_CONF_SHA384 1
#if MDK_CONF_SHA384 == 1
#define WOLFSSL_SHA384
#endif
// </e>
// <e>SHA-512
#define MDK_CONF_SHA512 1
#if MDK_CONF_SHA512 == 1
#define WOLFSSL_SHA512
#endif
// </e>
// <e>Hash DRBG
#define MDK_CONF_HASHDRBG 1
#if MDK_CONF_HASHDRBG == 1
#define HAVE_HASHDRBG
#endif
// </e>
// <e>RIPEMD
#define MDK_CONF_RIPEMD 1
#if MDK_CONF_RIPEMD == 1
#define WOLFSSL_RIPEMD
#endif
// </e>
// <e>BLAKE2
#define MDK_CONF_BLAKE2 0
#if MDK_CONF_BLAKE2 == 1
#define HAVE_BLAKE2
#endif
// </e>
// <e>HMAC
#define MDK_CONF_HMAC 1
#if MDK_CONF_HMAC == 0
#define NO_HMAC
#endif
// </e>
// <e>HMAC KDF
#define MDK_CONF_HKDF 1
#if MDK_CONF_HKDF == 1
#define HAVE_HKDF
#endif
// </e>
// <e>AES CCM
#define MDK_CONF_AESCCM 1
#if MDK_CONF_AESCCM == 1
#define HAVE_AESCCM
#endif
// </e>
// <e>AES GCM
#define MDK_CONF_AESGCM 1
#if MDK_CONF_AESGCM == 1
#define HAVE_AESGCM
#endif
// </e>
// <e>RC4
#define MDK_CONF_RC4 1
#if MDK_CONF_RC4 == 0
#define NO_RC4
#endif
// </e>
// <e>HC128
#define MDK_CONF_HC128 1
#if MDK_CONF_AESGCM == 0
#define NO_HC128
#endif
// </e>
// <e>RABBIT
#define MDK_CONF_RABBIT 1
#if MDK_CONF_RABBIT == 0
#define NO_RABBIT
#endif
// </e>
// <e>CHACHA
#define MDK_CONF_CHACHA 1
#if MDK_CONF_CHACHA == 1
#define HAVE_CHACHA
#endif
// </e>
// <e>POLY1305
#define MDK_CONF_POLY1305 1
#if MDK_CONF_POLY1305 == 1
#define HAVE_POLY1305
#define HAVE_ONE_TIME_AUTH
#endif
// </e>
// <e>DES3
#define MDK_CONF_DES3 1
#if MDK_CONF_DES3 == 0
#define NO_DES3
#endif
// </e>
// <e>AES
#define MDK_CONF_AES 1
#if MDK_CONF_AES == 0
#define NO_AES
#endif
// </e>
// <e>CAMELLIA
#define MDK_CONF_CAMELLIA 1
#if MDK_CONF_CAMELLIA == 1
#define HAVE_CAMELLIA
#endif
// </e>
// <e>DH
#define MDK_CONF_DH 1
#if MDK_CONF_DH == 0
#define NO_DH
#endif
// </e>
// <e>DSA
#define MDK_CONF_DSA 1
#if MDK_CONF_DSA == 0
#define NO_DSA
#endif
// </e>
// <e>SRP
#define MDK_CONF_SRP 1
#if MDK_CONF_SRP == 1
#define HAVE_SRP
#endif
// </e>
// <e>PWDBASED
#define MDK_CONF_PWDBASED 1
#if MDK_CONF_PWDBASED == 0
#define NO_PWDBASED
#endif
// </e>
// <e>ECC
#define MDK_CONF_ECC 1
#if MDK_CONF_ECC == 1
#define HAVE_ECC
#endif
// </e>
// <e>CURVE25519
#define MDK_CONF_CURVE25519 1
#if MDK_CONF_CURVE25519 == 1
#define HAVE_CURVE25519
#define CURVED25519_SMALL
#endif
// </e>
// <e>CURVE25519 SMALL
#define MDK_CONF_CURVE25519_SMALL 0
#if MDK_CONF_CURVE25519_SMALL == 1
#define CURVED25519_SMALL
#endif
// </e>
// <e>ED25519
#define MDK_CONF_ED25519 1
#if MDK_CONF_ED25519 == 1
#define HAVE_ED25519
#endif
// </e>
// <e>ED25519 SMALL
#define MDK_CONF_ED25519_SMALL 0
#if MDK_CONF_ED25519_SMALL == 1
#define ED25519_SMALL
#endif
// </e>
// <e>PKCS7
#define MDK_CONF_PKCS7 0
#if MDK_CONF_PKCS7 == 1
#define HAVE_PKCS7
#endif
// </e>
// <e>NTRU (need License, "crypto_ntru.h")
#define MDK_CONF_NTRU 0
#if MDK_CONF_NTRU == 1
#define HAVE_NTRU
#endif
// </e>
// </h>
// <e>Random Seed, for TEST Only
#define MDK_CONF_RNDSEED 1
#if MDK_CONF_RNDSEED == 1
#define WOLFSSL_GENSEED_FORTEST
#endif
// </e>
// <h>Hardware Crypt (See document for usage)
// <e>Hardware RNG
#define MDK_CONF_STM32F2_RNG 1
#if MDK_CONF_STM32F2_RNG == 1
#define WOLFSSL_STM32_CUBEMX
#define STM32_RNG
#define WC_ASYNC_DEV_SIZE 320+24
#define STM32_HAL_TIMEOUT 0xFF
#if defined(STM32F2xx)
#define WOLFSSL_STM32F2
#elif defined(STM32F4xx)
#define WOLFSSL_STM32F4
#elif defined(STM32F7xx)
#define WOLFSSL_STM32F7
#endif
#endif
// </e>
// <e>Hardware Crypt
#define MDK_CONF_STM32F2_CRYPTO 1
#if MDK_CONF_STM32F2_CRYPTO == 1
#define WOLFSSL_STM32_CUBEMX
#define STM32_CRYPTO
#define WC_ASYNC_DEV_SIZE 320+24
#define STM32_HAL_TIMEOUT 0xFF
#if defined(STM32F2xx)
#define WOLFSSL_STM32F2
#elif defined(STM32F4xx)
#define WOLFSSL_STM32F4
#elif defined(STM32F7xx)
#define WOLFSSL_STM32F7
#endif
#endif
// </e>
// <e>Hardware Hash
#define MDK_CONF_STM32F2_HASH 1
#if MDK_CONF_STM32F2_HASH == 1
#define WOLFSSL_STM32_CUBEMX
#define STM32_HASH
#define WC_ASYNC_DEV_SIZE 320+24
#define STM32_HAL_TIMEOUT 0xFF
#if defined(STM32F2xx)
#define WOLFSSL_STM32F2
#elif defined(STM32F4xx)
#define WOLFSSL_STM32F4
#elif defined(STM32F7xx)
#define WOLFSSL_STM32F7
#endif
#endif
// </e>
// </h>
// <h>Cert/Key Strage
// <o>Cert Storage <0=> SD Card <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes)
#define MDK_CONF_CERT_BUFF 0
#if MDK_CONF_CERT_BUFF== 1
#define USE_CERT_BUFFERS_1024
#elif MDK_CONF_CERT_BUFF == 2
#define USE_CERT_BUFFERS_2048
#endif
//</h>
// <h>Cert/Key Generation
// <e>CertGen
#define MDK_CONF_CERT_GEN 0
#if MDK_CONF_CERT_GEN == 1
#define WOLFSSL_CERT_GEN
#endif
// </e>
// <e>KeyGen
#define MDK_CONF_KEY_GEN 0
#if MDK_CONF_KEY_GEN == 1
#define WOLFSSL_KEY_GEN
#endif
// </e>
// </h>
// <e>Use Fast Math
#define MDK_CONF_FASTMATH 1
#if MDK_CONF_FASTMATH == 1
#define USE_FAST_MATH
#define TFM_TIMING_RESISTANT
#endif
// </e>
// <e>Small Stack
#define MDK_CONF_SmallStack 0
#if MDK_CONF_SmallStack == 0
#define NO_WOLFSSL_SMALL_STACK
#endif
// </e>
#define BENCH_EMBEDDED
// </h>
#define NO_WRITEV
#define NO_MAIN_DRIVER
#define WOLFSSL_MDK_SHELL
/**** wolfSSL Configuration ****/
// <h> wolfSSL Configuration
// <e>TLS 1.3
#define MDK_CONF_TLS 0
#if MDK_CONF_TLS == 1
#define WOLFSSL_TLS13
#define HAVE_TLS_EXTENSIONS
#define WC_RSA_PSS
#define HAVE_HKDF
#define HAVE_FFDHE_2048
#endif
// </e>
// <e>Include Old TLS
#define MDK_CONF_NO_OLDTLS 0
#if MDK_CONF_NO_OLDTLS == 0
#define NO_OLD_TLS
#endif
// </e>
// <e>CRL
#define MDK_CONF_CRL 0
#if MDK_CONF_CRL == 1
#define HAVE_CRL
#define WOLFSSL_DER_LOAD
#endif
// </e>
// <e>OCSP
#define MDK_CONF_OCSP 0
#if MDK_CONF_OCSP == 1
#define HAVE_OCSP
#endif
// </e>
// <e>OpenSSL Extra
#define MDK_CONF_OPENSSL_EXTRA 0
#if MDK_CONF_OPENSSL_EXTRA == 1
#define OPENSSL_EXTRA
#endif
// </e>
//</h>

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -18,25 +18,89 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include "wolfcrypt/test/test.h"
#include "cmsis_os.h"
#include <stdio.h>
#include "stm32f2xx_hal.h"
#include <time.h>
/* Dummy definition for test RTC */
#define RTC_YEAR 2018
#define RTC_MONTH 1
#define RTC_DAY 1
#if defined(STM32F7xx)
#include "stm32f7xx_hal.h"
#elif defined(STM32F4xx)
#include "stm32f4xx_hal.h"
#elif defined(STM32F2xx)
#include "stm32f2xx_hal.h"
#endif
#warning "write MPU specific Set ups\n"
static void SystemClock_Config (void) {
/*-----------------------------------------------------------------------------
* System Clock Configuration
*----------------------------------------------------------------------------*/
void SystemClock_Config(void) {
#warning "write MPU specific System Clock Set up\n"
}
static void MPU_Config (void) {
}
static void CPU_CACHE_Enable (void) {
}
#ifdef RTE_CMSIS_RTOS_RTX
extern uint32_t os_time;
static time_t epochTime;
uint32_t HAL_GetTick(void) {
return os_time;
}
time_t time(time_t *t){
return epochTime ;
}
void setTime(time_t t){
epochTime = t;
}
#endif
#ifdef WOLFSSL_CURRTIME_OSTICK
#include <stdint.h>
extern uint32_t os_time;
double current_time(int reset)
{
if(reset) os_time = 0 ;
return (double)os_time /1000.0;
}
#else
#include <stdint.h>
#define DWT ((DWT_Type *) (0xE0001000UL) )
typedef struct
{
uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */
uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */
} DWT_Type;
extern uint32_t SystemCoreClock ;
double current_time(int reset)
{
if(reset) DWT->CYCCNT = 0 ;
return ((double)DWT->CYCCNT/SystemCoreClock) ;
}
#endif
/*-----------------------------------------------------------------------------
* Initialize a Flash Memory Card
*----------------------------------------------------------------------------*/
@ -47,13 +111,13 @@ static void init_filesystem (void) {
int32_t retv;
retv = finit ("M0:");
if (retv == 0) {
if (retv == fsOK) {
retv = fmount ("M0:");
if (retv == 0) {
if (retv == fsOK) {
printf ("Drive M0 ready!\n");
}
else {
printf ("Drive M0 mount failed!\n");
printf ("Drive M0 mount failed(%d)!\n", retv);
}
}
else {
@ -62,24 +126,29 @@ static void init_filesystem (void) {
}
#endif
/*-----------------------------------------------------------------------------
* mian entry
*----------------------------------------------------------------------------*/
int main()
/*-----------------------------------------------------------------------------
* mian entry
*----------------------------------------------------------------------------*/
void wolfcrypt_test(void *arg) ;
int main()
{
void * arg = NULL ;
HAL_Init(); /* Initialize the HAL Library */
SystemClock_Config(); /* Configure the System Clock */
MPU_Config();
CPU_CACHE_Enable();
HAL_Init(); /* Initialize the HAL Library */
SystemClock_Config(); /* Configure the System Clock */
#if !defined(NO_FILESYSTEM)
#if !defined(NO_FILESYSTEM)
init_filesystem ();
#endif
osDelay(1000) ;
#endif
printf("=== Start: Crypt test ===\n") ;
setTime((RTC_YEAR-1970)*365*24*60*60 + RTC_MONTH*30*24*60*60 + RTC_DAY*24*60*60);
printf("=== Start: Crypt test === \n") ;
wolfcrypt_test(arg) ;
printf("=== End: Crypt test ===\n") ;
printf("=== End: Crypt test ===\n") ;
}

View File

@ -1,22 +1,12 @@
This program is echo client with CyaSSL/wolfCrypt library.
wolfSSL example: echo Client
In order to run this program,
Copy {PACK}\wolfSSL\CyaSSL\{version}\cyassl\certs folder and files to the SD memory.
Set config-EchoClient.h configuration file for the Callee IP or Port number.
Use Configuration Wizard tab
main.c for remote IP address, port or TLS version
user_settings.h for wolfCrypt or wolfSSL options
For further configuration, refer config-Crypt.h and config-CyaSSL.h.
When testing this client, it is recommended to test against one of the standard
CyaSSL example applications running on a desktop machine. The standard CyaSSL
example applications are located in the CyaSSL root directory under the
<cyassl_root>/examples directory.
For the hardware crypt on config-Crypt.h, download
STSW-STM32062: STM32F2xx standard peripherals library at
http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to
{PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib
For further options, details, see wolfSSL User Manual.
Support
-------
Please send questions or comments to support@wolfssl.com
Please send questions or comments to support@wolfssl.com

View File

@ -8,7 +8,7 @@
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj</oExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<pExt>*.plm</pExt>
@ -22,16 +22,16 @@
</DaveTm>
<Target>
<TargetName>STM32F207 Flash</TargetName>
<TargetName>echoClient</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>12000000</CLKADS>
<CLKADS>25000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunSim>1</RunSim>
<RunTarget>0</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
@ -45,7 +45,7 @@
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\Object\</ListingPath>
<ListingPath>.\Output\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
@ -78,23 +78,6 @@
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<Books>
<Book>
<Number>0</Number>
<Title>Schematics (MCBSTM32F200)</Title>
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F2xx_DFP\2.2.0\MDK/Boards/Keil/MCBSTM32F200/Documentation/mcbstm32f200-schematics.pdf</Path>
</Book>
<Book>
<Number>1</Number>
<Title>User Manual (MCBSTM32F200)</Title>
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F2xx_DFP\2.2.0\MDK/Boards/Keil/MCBSTM32F200/Documentation/mcbstm32f200.chm</Path>
</Book>
<Book>
<Number>2</Number>
<Title>MCBSTM32F200 Evaluation Board Web Page (MCBSTM32F200)</Title>
<Path>http://www.keil.com/mcbstm32f200/</Path>
</Book>
</Books>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
@ -117,7 +100,8 @@
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<nTsel>1</nTsel>
<bEvRecOn>1</bEvRecOn>
<nTsel>5</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
@ -127,10 +111,15 @@
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile>.\STM32_SWO.ini</tIfile>
<pMon>BIN\UL2CM3.DLL</pMon>
<tIfile></tIfile>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U303030303030303030303031 -O8399 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(5BA02477) -L00(0) -TO27 -TC216000000 -TP21 -TDS806B -TDT0 -TDC1F -TIEFFFFFFFF -TIP9 -FO15 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F756NGHx$CMSIS\Flash\STM32F7x_1024.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
@ -139,18 +128,13 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)</Name>
<Name>(1010=-1,-1,-1,-1,0)(6017=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(6016=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ULP2CM3</Key>
<Name>-UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$CMSIS/Flash/STM32F2xx_1024.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
@ -159,32 +143,77 @@
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>-UM1020ADE -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP21 -TDS801F -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F207IGHx$CMSIS/Flash/STM32F2xx_1024.FLM)</Name>
<Name>-UV0998FBE -O207 -S10 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(5BA02477) -L00(0) -TO18 -TC216000000 -TP21 -TDS80B8 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F756NGHx$CMSIS\Flash\STM32F7x_1024.FLM)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>185</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219474</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\main.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\echoClient\main.c\185</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>181</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219494</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\main.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\echoClient\main.c\181</Expression>
</Bp>
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>306</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\main.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
</Breakpoint>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<SubType>8</SubType>
<ItemText>port</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>8</SubType>
<ItemText>0x8004dc8</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<ItemText>eth_pins</ItemText>
</Ww>
</WatchWindow1>
<ScvdPack>
<Filename>C:\Keil_v5\ARM\PACK\Keil\MDK-Middleware\7.4.1\FileSystem\FileSystem.scvd</Filename>
<Type>Keil.MDK-Middleware.7.4.1</Type>
<SubType>1</SubType>
</ScvdPack>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
@ -203,13 +232,26 @@
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>1</aSer4>
<StkLoc>1</StkLoc>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<DebugDescription>
<Enable>1</Enable>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>2000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
@ -224,7 +266,6 @@
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\main.c</PathWithFileName>
@ -234,6 +275,46 @@
</File>
</Group>
<Group>
<GroupName>Documentation</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Abstract.txt</PathWithFileName>
<FilenameWithoutPath>Abstract.txt</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Linker Script</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\wolfssl-link.sct</PathWithFileName>
<FilenameWithoutPath>wolfssl-link.sct</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Configuration</GroupName>
<tvExp>1</tvExp>
@ -241,37 +322,10 @@
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\RTE\wolfSSL\config-Crypt.h</PathWithFileName>
<FilenameWithoutPath>config-Crypt.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\RTE\wolfSSL\config-wolfSSL.h</PathWithFileName>
<FilenameWithoutPath>config-wolfSSL.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<GroupNumber>4</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\RTE\wolfSSL\user_settings.h</PathWithFileName>
@ -282,24 +336,11 @@
</Group>
<Group>
<GroupName>Dcumentation</GroupName>
<tvExp>1</tvExp>
<GroupName>::Board Support</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Abstract.txt</PathWithFileName>
<FilenameWithoutPath>Abstract.txt</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<RteFlg>1</RteFlg>
</Group>
<Group>
@ -312,7 +353,7 @@
<Group>
<GroupName>::CMSIS Driver</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
@ -320,7 +361,7 @@
<Group>
<GroupName>::Compiler</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
@ -336,7 +377,7 @@
<Group>
<GroupName>::File System</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
@ -344,7 +385,7 @@
<Group>
<GroupName>::Network</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +0,0 @@
/* #define SINGLE_THREADED or define RTOS option */
#define WOLFSSL_CMSIS_RTOS
/* #define NO_FILESYSTEM or define Filesystem option */
#define WOLFSSL_KEIL_FS
#define NO_WOLFSSL_DIR
#define WOLFSSL_NO_CURRDIR
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
#define NO_DEV_RANDOM
/* define your Rand gen for the operational use */
#define WOLFSSL_GENSEED_FORTEST
#define USE_WOLFSSL_MEMORY
#define WOLFSSL_MALLOC_CHECK
#define XVALIDATEDATE(d, f,t) (0)
#define WOLFSSL_USER_CURRTIME /* for benchmark */
#define USE_FAST_MATH
#define TFM_TIMING_RESISTANT
#define BENCH_EMBEDDED
#define NO_WRITEV
#define NO_MAIN_DRIVER
#define WOLFSSL_MDK_SHELL

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -18,44 +18,68 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/visibility.h>
#include <wolfssl/wolfcrypt/logging.h>
#include "wolfssl/wolfcrypt/settings.h"
#include "cmsis_os.h" /* CMSIS RTOS definitions */
#include "rl_net.h" /* Network definitions */
#include <time.h>
#if defined(STM32F7xx)
#include "stm32f7xx_hal.h"
#elif defined(STM32F4xx)
#include "stm32f4xx_hal.h"
#elif defined(STM32F2xx)
#include "stm32f2xx_hal.h"
#include "cmsis_os.h"
#include "rl_net.h"
#include <stdio.h>
#endif
#include <wolfssl/ssl.h>
//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
// <h>RTC: for validate certificate date
// <o>Year <1970-2099>
#define RTC_YEAR 2018
// <o>Month <1=>Jan<2=>Feb<3=>Mar<4=>Apr<5=>May<6=>Jun<7=>Jul<8=>Aut<9=>Sep<10=>Oct<11=>Nov<12=>Dec
#define RTC_MONTH 1
// <o>Day <1-31>
#define RTC_DAY 1
// </h>
//------------- <<< end of configuration section >>> -----------------------
#warning "write MPU specific Set ups\n"
static void SystemClock_Config (void) {
}
static void MPU_Config (void) {
}
static void CPU_CACHE_Enable (void) {
/*-----------------------------------------------------------------------------
* Initialize Clock Configuration
*----------------------------------------------------------------------------*/
void SystemClock_Config(void) {
#warning "write MPU specific System Clock Set up\n"
}
/*-----------------------------------------------------------------------------
* Initialize a Flash Memory Card
*----------------------------------------------------------------------------*/
#if !defined(NO_FILESYSTEM)
#include "rl_fs.h"
#include "rl_fs.h" /* FileSystem definitions */
static void init_filesystem (void) {
int32_t retv;
retv = finit ("M0:");
if (retv == 0) {
if (retv == fsOK) {
retv = fmount ("M0:");
if (retv == 0) {
if (retv == fsOK) {
printf ("Drive M0 ready!\n");
}
else {
printf ("Drive M0 mount failed!\n");
printf ("Drive M0 mount failed(%d)!\n", retv);
}
}
else {
@ -64,6 +88,68 @@ static void init_filesystem (void) {
}
#endif
void net_loop(void const *arg)
{
while(1) {
net_main ();
osThreadYield ();
}
}
osThreadDef(net_loop, osPriorityLow, 2, 0);
#ifdef RTE_CMSIS_RTOS_RTX
extern uint32_t os_time;
static time_t epochTime;
uint32_t HAL_GetTick(void) {
return os_time;
}
time_t time(time_t *t){
return epochTime ;
}
void setTime(time_t t){
epochTime = t;
}
#endif
#ifdef WOLFSSL_CURRTIME_OSTICK
#include <stdint.h>
extern uint32_t os_time;
double current_time(int reset)
{
if(reset) os_time = 0 ;
return (double)os_time /1000.0;
}
#else
#include <stdint.h>
#define DWT ((DWT_Type *) (0xE0001000UL) )
typedef struct
{
uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */
uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */
} DWT_Type;
extern uint32_t SystemCoreClock ;
double current_time(int reset)
{
if(reset) DWT->CYCCNT = 0 ;
return ((double)DWT->CYCCNT/SystemCoreClock) ;
}
#endif
/*----------------------------------------------------------------------------
Main Thread 'main': Run Network
*---------------------------------------------------------------------------*/
#include <stdio.h>
typedef struct func_args {
int argc;
char** argv;
@ -71,30 +157,38 @@ typedef struct func_args {
extern void echoclient_test(func_args * args) ;
/*-----------------------------------------------------------------------------
* mian entry
*----------------------------------------------------------------------------*/
int myoptind = 0;
char* myoptarg = NULL;
int main()
{
func_args args ;
args.argc = 1 ;
int main (void) {
static char *argv[] =
{ "client" } ;
static func_args args =
{ 1, argv } ;
MPU_Config(); /* Configure the MPU */
CPU_CACHE_Enable(); /* Enable the CPU Cache */
HAL_Init(); /* Initialize the HAL Library */
SystemClock_Config(); /* Configure the System Clock */
SystemClock_Config ();
#if !defined(NO_FILESYSTEM)
init_filesystem ();
#endif
netInitialize() ;
osDelay(300) ;
net_initialize ();
#if defined(DEBUG_WOLFSSL)
printf("Turning ON Debug message\n") ;
wolfSSL_Debugging_ON() ;
#endif
printf("Starting EchoClient, Enter messages to EchoServer (\"quit\" to quit the program)\n") ;
setTime((RTC_YEAR-1970)*365*24*60*60 + RTC_MONTH*30*24*60*60 + RTC_DAY*24*60*60);
osThreadCreate (osThread(net_loop), NULL);
echoclient_test(&args) ;
printf("End of EchoClient\n") ;
while(1)
osDelay(1000);
}

View File

@ -0,0 +1,14 @@
LR_IROM1 0x08000000 0x00100000 { ; load region size_region
ER_IROM1 0x08000000 0x00100000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x20010000 0x00040000 { ; RW data
.ANY (+RW +ZI)
}
RW_RETARGET 0x2000FFF0 0x00000010 {
retarget_io.o (+ZI +RW)
}
}

View File

@ -1,24 +1,12 @@
This program is echo server with CyaSSL/wolfCrypt library.
wolfSSL example: echo Server
In order to run this program,
Copy {PACK}\wolfSSL\CyaSSL\{version}\cyassl\certs folder and files to the SD memory.
Set the server IP address in Net_Config_ETH_0.h
The server default port is 11111, defined in test.h.
Use Configuration Wizard tab
main.c for server port or TLS version
user_settings.h for wolfCrypt or wolfSSL options
For further configuration, refer config-Crypt.h and config-CyaSSL.h.
When testing this server, it is recommended to test against one of the standard
CyaSSL example applications running on a desktop machine. The standard CyaSSL
example applications are located in the CyaSSL root directory under the
<cyassl_root>/examples directory.
For the hardware crypt on config-Crypt.h, download
STSW-STM32062: STM32F2xx standard peripherals library at
http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to
{PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib
For further options, details, see wolfSSL User Manual.
Support
-------
Please send questions or comments to support@wolfssl.com

View File

@ -8,7 +8,7 @@
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj</oExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<pExt>*.plm</pExt>
@ -22,16 +22,16 @@
</DaveTm>
<Target>
<TargetName>STM32F207 Flash</TargetName>
<TargetName>echoServer</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>12000000</CLKADS>
<CLKADS>25000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunSim>1</RunSim>
<RunTarget>0</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
@ -45,7 +45,7 @@
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\Object\</ListingPath>
<ListingPath>.\Output\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
@ -78,23 +78,6 @@
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<Books>
<Book>
<Number>0</Number>
<Title>Schematics (MCBSTM32F200)</Title>
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F2xx_DFP\2.2.0\MDK/Boards/Keil/MCBSTM32F200/Documentation/mcbstm32f200-schematics.pdf</Path>
</Book>
<Book>
<Number>1</Number>
<Title>User Manual (MCBSTM32F200)</Title>
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F2xx_DFP\2.2.0\MDK/Boards/Keil/MCBSTM32F200/Documentation/mcbstm32f200.chm</Path>
</Book>
<Book>
<Number>2</Number>
<Title>MCBSTM32F200 Evaluation Board Web Page (MCBSTM32F200)</Title>
<Path>http://www.keil.com/mcbstm32f200/</Path>
</Book>
</Books>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
@ -117,7 +100,8 @@
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<nTsel>1</nTsel>
<bEvRecOn>1</bEvRecOn>
<nTsel>5</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
@ -127,10 +111,15 @@
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile>.\STM32_SWO.ini</tIfile>
<pMon>BIN\UL2CM3.DLL</pMon>
<tIfile></tIfile>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U303030303030303030303031 -O8399 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(5BA02477) -L00(0) -TO27 -TC216000000 -TP21 -TDS806B -TDT0 -TDC1F -TIEFFFFFFFF -TIP9 -FO15 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F756NGHx$CMSIS\Flash\STM32F7x_1024.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
@ -139,18 +128,13 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)</Name>
<Name>(1010=-1,-1,-1,-1,0)(6017=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(6016=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ULP2CM3</Key>
<Name>-UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$CMSIS/Flash/STM32F2xx_1024.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
@ -159,32 +143,28 @@
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>-UM1020ADE -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP21 -TDS801F -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F207IGHx$CMSIS/Flash/STM32F2xx_1024.FLM)</Name>
<Name>-UV0998FBE -O207 -S10 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(5BA02477) -L00(0) -TO18 -TC216000000 -TP21 -TDS80B8 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F756NGHx$CMSIS\Flash\STM32F7x_1024.FLM)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<SubType>8</SubType>
<ItemText>port</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>8</SubType>
<ItemText>0x8004dc8</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<ItemText>eth_pins</ItemText>
</Ww>
</WatchWindow1>
<ScvdPack>
<Filename>C:\Keil_v5\ARM\PACK\Keil\MDK-Middleware\7.5.0\FileSystem\FileSystem.scvd</Filename>
<Type>Keil.MDK-Middleware.7.5.0</Type>
<SubType>1</SubType>
</ScvdPack>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
@ -203,13 +183,26 @@
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>1</aSer4>
<StkLoc>1</StkLoc>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<DebugDescription>
<Enable>1</Enable>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>2000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
@ -224,7 +217,6 @@
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\main.c</PathWithFileName>
@ -234,6 +226,46 @@
</File>
</Group>
<Group>
<GroupName>Documentation</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Abstract.txt</PathWithFileName>
<FilenameWithoutPath>Abstract.txt</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Linker Script</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\wolfssl-link.sct</PathWithFileName>
<FilenameWithoutPath>wolfssl-link.sct</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Configuration</GroupName>
<tvExp>1</tvExp>
@ -241,37 +273,10 @@
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\RTE\wolfSSL\config-Crypt.h</PathWithFileName>
<FilenameWithoutPath>config-Crypt.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\RTE\wolfSSL\config-wolfSSL.h</PathWithFileName>
<FilenameWithoutPath>config-wolfSSL.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<GroupNumber>4</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\RTE\wolfSSL\user_settings.h</PathWithFileName>
@ -282,24 +287,11 @@
</Group>
<Group>
<GroupName>Dcumentation</GroupName>
<tvExp>1</tvExp>
<GroupName>::Board Support</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Abstract.txt</PathWithFileName>
<FilenameWithoutPath>Abstract.txt</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<RteFlg>1</RteFlg>
</Group>
<Group>
@ -312,7 +304,7 @@
<Group>
<GroupName>::CMSIS Driver</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
@ -320,7 +312,7 @@
<Group>
<GroupName>::Compiler</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
@ -336,7 +328,7 @@
<Group>
<GroupName>::File System</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
@ -344,7 +336,7 @@
<Group>
<GroupName>::Network</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +0,0 @@
/* #define SINGLE_THREADED or define RTOS option */
#define WOLFSSL_CMSIS_RTOS
/* #define NO_FILESYSTEM or define Filesystem option */
#define WOLFSSL_KEIL_FS
#define NO_WOLFSSL_DIR
#define WOLFSSL_NO_CURRDIR
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
#define NO_DEV_RANDOM
/* define your Rand gen for the operational use */
#define WOLFSSL_GENSEED_FORTEST
#define USE_WOLFSSL_MEMORY
#define WOLFSSL_MALLOC_CHECK
#define XVALIDATEDATE(d, f,t) (0)
#define WOLFSSL_USER_CURRTIME /* for benchmark */
#define USE_FAST_MATH
#define TFM_TIMING_RESISTANT
#define BENCH_EMBEDDED
#define NO_WRITEV
#define NO_MAIN_DRIVER
#define WOLFSSL_MDK_SHELL

View File

@ -1,6 +1,6 @@
/* main.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@ -18,44 +18,87 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/visibility.h>
#include <wolfssl/wolfcrypt/logging.h>
#include "wolfssl/wolfcrypt/settings.h"
#include "cmsis_os.h" /* CMSIS RTOS definitions */
#include "rl_net.h" /* Network definitions */
#include <time.h>
#if defined(STM32F7xx)
#include "stm32f7xx_hal.h"
#elif defined(STM32F4xx)
#include "stm32f4xx_hal.h"
#elif defined(STM32F2xx)
#include "stm32f2xx_hal.h"
#include "cmsis_os.h"
#include "rl_net.h"
#include <stdio.h>
#endif
#include <wolfssl/ssl.h>
//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
// <h>Server parameter
// ====================
// <s.6>Port
// <i> Default: "11111"
#define SERVER_PORT "11111"
// </h>
// <h>Protocol
// ====================
// <o>SSL/TLS Version<0=> SSL3 <1=> TLS1.0 <2=> TLS1.1 <3=> TLS1.2 <4=> TLS1.3
#define TLS_VER 3
// <s.2>Other option
#define OTHER_OPTIONS ""
// </h>
// <h>RTC: for validate certificate date
// <o>Year <1970-2099>
#define RTC_YEAR 2018
// <o>Month <1=>Jan<2=>Feb<3=>Mar<4=>Apr<5=>May<6=>Jun<7=>Jul<8=>Aut<9=>Sep<10=>Oct<11=>Nov<12=>Dec
#define RTC_MONTH 1
// <o>Day <1-31>
#define RTC_DAY 1
// </h>
//------------- <<< end of configuration section >>> -----------------------
#warning "write MPU specific Set ups\n"
static void SystemClock_Config (void) {
/*-----------------------------------------------------------------------------
* Initialize Clock Configuration
*----------------------------------------------------------------------------*/
void SystemClock_Config(void) {
#warning "write MPU specific System Clock Set up\n"
}
static void MPU_Config (void) {
}
static void CPU_CACHE_Enable (void) {
}
/*-----------------------------------------------------------------------------
* Initialize a Flash Memory Card
*----------------------------------------------------------------------------*/
#if !defined(NO_FILESYSTEM)
#include "rl_fs.h"
#if !defined(NO_FILESYSTEM)
#include "rl_fs.h" /* FileSystem definitions */
static void init_filesystem (void) {
int32_t retv;
retv = finit ("M0:");
if (retv == 0) {
if (retv == fsOK) {
retv = fmount ("M0:");
if (retv == 0) {
if (retv == fsOK) {
printf ("Drive M0 ready!\n");
}
else {
printf ("Drive M0 mount failed!\n");
printf ("Drive M0 mount failed(%d)!\n", retv);
}
}
else {
@ -65,10 +108,68 @@ static void init_filesystem (void) {
#endif
/*-----------------------------------------------------------------------------
* mian entry
*----------------------------------------------------------------------------*/
void net_loop(void const *arg)
{
while(1) {
net_main ();
osThreadYield ();
}
}
osThreadDef(net_loop, osPriorityLow, 2, 0);
#ifdef RTE_CMSIS_RTOS_RTX
extern uint32_t os_time;
static time_t epochTime;
uint32_t HAL_GetTick(void) {
return os_time;
}
time_t time(time_t *t){
return epochTime ;
}
void setTime(time_t t){
epochTime = t;
}
#endif
#ifdef WOLFSSL_CURRTIME_OSTICK
#include <stdint.h>
extern uint32_t os_time;
double current_time(int reset)
{
if(reset) os_time = 0 ;
return (double)os_time /1000.0;
}
#else
#include <stdint.h>
#define DWT ((DWT_Type *) (0xE0001000UL) )
typedef struct
{
uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */
uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */
} DWT_Type;
extern uint32_t SystemCoreClock ;
double current_time(int reset)
{
if(reset) DWT->CYCCNT = 0 ;
return ((double)DWT->CYCCNT/SystemCoreClock) ;
}
#endif
/*----------------------------------------------------------------------------
Main Thread 'main': Run Network
*---------------------------------------------------------------------------*/
#include <stdio.h>
typedef struct func_args {
int argc;
char** argv;
@ -76,22 +177,37 @@ typedef struct func_args {
extern void echoserver_test(func_args * args) ;
int main()
{
func_args args ;
args.argc = 1 ;
int myoptind = 0;
char* myoptarg = NULL;
int main (void) {
static char *argv[] =
{ "server" } ;
static func_args args = { 1, argv } ;
MPU_Config(); /* Configure the MPU */
CPU_CACHE_Enable(); /* Enable the CPU Cache */
HAL_Init(); /* Initialize the HAL Library */
SystemClock_Config(); /* Configure the System Clock */
SystemClock_Config ();
#if !defined(NO_FILESYSTEM)
init_filesystem ();
#endif
netInitialize() ;
osDelay(300) ;
net_initialize ();
#if defined(DEBUG_WOLFSSL)
printf("Turning ON Debug message\n") ;
wolfSSL_Debugging_ON() ;
#endif
printf("echoserver: Started\n") ;
setTime((RTC_YEAR-1970)*365*24*60*60 + RTC_MONTH*30*24*60*60 + RTC_DAY*24*60*60);
osThreadCreate (osThread(net_loop), NULL);
echoserver_test(&args) ;
printf("echoserver: Terminated\n") ;
while(1)
osDelay(1000);
}

View File

@ -0,0 +1,14 @@
LR_IROM1 0x08000000 0x00100000 { ; load region size_region
ER_IROM1 0x08000000 0x00100000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x20010000 0x00040000 { ; RW data
.ANY (+RW +ZI)
}
RW_RETARGET 0x2000FFF0 0x00000010 {
retarget_io.o (+ZI +RW)
}
}

View File

@ -1,23 +1,12 @@
This program is a simple client example with CyaSSL/wolfCrypt library.
wolfSSL example: TLS Client
In order to run this program,
Copy {PACK}\wolfSSL\CyaSSL\{version}\cyassl\certs folder and files to the SD memory.
Set config-SimpleClient.h configuration file for the Callee IP or Port number.
Use Configuration Wizard tab
main.c for remote IP address, port or TLS version
user_settings.h for wolfCrypt or wolfSSL options
For further configuration, refer config-Crypt.h and config-CyaSSL.h.
config-SimpleClient.h is to configure repote callee IP and port.
When testing this client, it is recommended to test against one of the standard
CyaSSL example applications running on a desktop machine. The standard CyaSSL
example applications are located in the CyaSSL root directory under the
<cyassl_root>/examples directory.
For the hardware crypt on config-Crypt.h, download
STSW-STM32062: STM32F2xx standard peripherals library at
http://www.st.com/. Copy Libraries\STM32F2xx_StdPeriph_Driver\{inc,src} to
{PACK}\cyassl\IDE\MDK5-ARM\STM32F2xx_StdPeriph_Lib
For further options, details, see wolfSSL User Manual.
Support
-------
Please send questions or comments to support@wolfssl.com
Please send questions or comments to support@wolfssl.com

View File

@ -1,31 +0,0 @@
/* #define SINGLE_THREADED or define RTOS option */
#define WOLFSSL_CMSIS_RTOS
/* #define NO_FILESYSTEM or define Filesystem option */
#define WOLFSSL_KEIL_FS
#define NO_WOLFSSL_DIR
#define WOLFSSL_NO_CURRDIR
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
#define NO_DEV_RANDOM
/* define your Rand gen for the operational use */
#define WOLFSSL_GENSEED_FORTEST
#define USE_WOLFSSL_MEMORY
#define WOLFSSL_MALLOC_CHECK
#define XVALIDATEDATE(d, f,t) (0)
#define WOLFSSL_USER_CURRTIME /* for benchmark */
#define USE_FAST_MATH
#define TFM_TIMING_RESISTANT
#define BENCH_EMBEDDED
#define NO_WRITEV
#define NO_MAIN_DRIVER
#define WOLFSSL_MDK_SHELL

View File

@ -8,7 +8,7 @@
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj</oExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<pExt>*.plm</pExt>
@ -22,16 +22,16 @@
</DaveTm>
<Target>
<TargetName>STM32F207 Flash</TargetName>
<TargetName>SimpleClient</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>12000000</CLKADS>
<CLKADS>25000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunSim>1</RunSim>
<RunTarget>0</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
@ -45,7 +45,7 @@
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\Object\</ListingPath>
<ListingPath>.\Output\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
@ -78,23 +78,6 @@
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<Books>
<Book>
<Number>0</Number>
<Title>Schematics (MCBSTM32F200)</Title>
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F2xx_DFP\2.2.0\MDK/Boards/Keil/MCBSTM32F200/Documentation/mcbstm32f200-schematics.pdf</Path>
</Book>
<Book>
<Number>1</Number>
<Title>User Manual (MCBSTM32F200)</Title>
<Path>C:\Keil_v5\ARM\PACK\Keil\STM32F2xx_DFP\2.2.0\MDK/Boards/Keil/MCBSTM32F200/Documentation/mcbstm32f200.chm</Path>
</Book>
<Book>
<Number>2</Number>
<Title>MCBSTM32F200 Evaluation Board Web Page (MCBSTM32F200)</Title>
<Path>http://www.keil.com/mcbstm32f200/</Path>
</Book>
</Books>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
@ -117,7 +100,8 @@
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<nTsel>1</nTsel>
<bEvRecOn>1</bEvRecOn>
<nTsel>5</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
@ -127,10 +111,15 @@
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile>.\STM32_SWO.ini</tIfile>
<pMon>BIN\UL2CM3.DLL</pMon>
<tIfile></tIfile>
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-U303030303030303030303031 -O8399 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(5BA02477) -L00(0) -TO27 -TC216000000 -TP21 -TDS806B -TDT0 -TDC1F -TIEFFFFFFFF -TIP9 -FO15 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F756NGHx$CMSIS\Flash\STM32F7x_1024.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
@ -139,18 +128,13 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)</Name>
<Name>(1010=-1,-1,-1,-1,0)(6017=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(6016=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ULP2CM3</Key>
<Name>-UP1135060 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP18 -TDX0 -TDD0 -TDS8000 -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F207IG$CMSIS/Flash/STM32F2xx_1024.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
@ -159,14 +143,46 @@
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>-UM1020ADE -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC120000000 -TP21 -TDS801F -TDT0 -TDC1F -TIE1 -TIP1 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F2xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F207IGHx$CMSIS/Flash/STM32F2xx_1024.FLM)</Name>
<Name>-UV0998FBE -O207 -S10 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(5BA02477) -L00(0) -TO18 -TC216000000 -TP21 -TDS80B8 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20010000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F756NGHx$CMSIS\Flash\STM32F7x_1024.FLM)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>109</LineNumber>
<LineNumber>185</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219474</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\main.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\SimpleClient\main.c\185</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>181</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134219494</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\main.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\SimpleClient\main.c\181</Expression>
</Bp>
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>306</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
@ -180,28 +196,24 @@
<Expression></Expression>
</Bp>
</Breakpoint>
<MemoryWindow1>
<Mm>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<SubType>8</SubType>
<ItemText>port</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<MemoryWindow2>
<Mm>
<WinNumber>2</WinNumber>
<SubType>8</SubType>
<ItemText>0x8004dc8</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow2>
<ItemText>eth_pins</ItemText>
</Ww>
</WatchWindow1>
<ScvdPack>
<Filename>C:\Keil_v5\ARM\PACK\Keil\MDK-Middleware\7.4.1\FileSystem\FileSystem.scvd</Filename>
<Type>Keil.MDK-Middleware.7.4.1</Type>
<SubType>1</SubType>
</ScvdPack>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
@ -220,13 +232,26 @@
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>1</aSer4>
<StkLoc>1</StkLoc>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<DebugDescription>
<Enable>1</Enable>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>2000000</DbgClock>
</DebugDescription>
</TargetOption>
</Target>
@ -241,7 +266,6 @@
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\main.c</PathWithFileName>
@ -249,16 +273,43 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Documentation</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>1</GroupNumber>
<GroupNumber>2</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>1</FileType>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\time-CortexM3-4.c</PathWithFileName>
<FilenameWithoutPath>time-CortexM3-4.c</FilenameWithoutPath>
<PathWithFileName>.\Abstract.txt</PathWithFileName>
<FilenameWithoutPath>Abstract.txt</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Linker Script</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\wolfssl-link.sct</PathWithFileName>
<FilenameWithoutPath>wolfssl-link.sct</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
@ -271,37 +322,10 @@
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\RTE\wolfSSL\config-Crypt.h</PathWithFileName>
<FilenameWithoutPath>config-Crypt.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<GroupNumber>4</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\RTE\wolfSSL\config-wolfSSL.h</PathWithFileName>
<FilenameWithoutPath>config-wolfSSL.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\RTE\wolfSSL\user_settings.h</PathWithFileName>
@ -309,40 +333,14 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>6</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\config-SimpleClient.h</PathWithFileName>
<FilenameWithoutPath>config-SimpleClient.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Dcumentation</GroupName>
<tvExp>1</tvExp>
<GroupName>::Board Support</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>7</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Abstract.txt</PathWithFileName>
<FilenameWithoutPath>Abstract.txt</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<RteFlg>1</RteFlg>
</Group>
<Group>
@ -355,7 +353,7 @@
<Group>
<GroupName>::CMSIS Driver</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
@ -363,7 +361,7 @@
<Group>
<GroupName>::Compiler</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
@ -379,7 +377,7 @@
<Group>
<GroupName>::File System</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
@ -387,7 +385,7 @@
<Group>
<GroupName>::Network</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>

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