Compare commits

...

1330 Commits

Author SHA1 Message Date
3cd5dabd0b Fixes compilation, I have no idea if it still does what it should 2022-06-14 18:23:54 +02:00
3f13b49fa3 Merge pull request #2695 from JacobBarthelmeh/Release
prepare for release v4.3.0
2019-12-20 11:10:34 -08:00
e1433867ce fix for expected nightly config test report 2019-12-20 09:46:12 -07:00
5675a2b3c5 prepare for release v4.3.0 2019-12-20 08:43:34 -07:00
45d55c8f38 Merge pull request #2676 from SparkiDev/sp_cortexm_perf
Improve Cortex-M RSA/DH assembly code performance
2019-12-19 15:03:59 -08:00
51f956490f Merge pull request #2661 from SparkiDev/parse_cert_rel_fixes
Cleanup ParseCertRelative code
2019-12-19 11:03:56 -08:00
3342a19e29 Merge pull request #2578 from cariepointer/ZD-9478-and-9479
Add sanity checks for parameters in wc_scrypt and wc_Arc4SetKey
2019-12-19 10:59:05 -08:00
2aa8fa2de6 Merge pull request #2688 from kaleb-himes/GH2552
use const to declare array rather than variable sz - VS doesn't like …
2019-12-19 08:52:30 -08:00
e10ace21df Merge pull request #2690 from SparkiDev/sp_int_fixes_1
Fix SP to build for different configurations
2019-12-19 08:52:52 -07:00
36f697c93d Fix SP to build for different configurations
Was failing:
  --enable-sp --enable-sp-math
  --enable-sp --enable-sp-math --enable-smallstack
2019-12-19 15:15:19 +10:00
95c0c1f2a5 use const to declare array rather than variable sz - VS doesn't like this 2019-12-18 16:08:26 -08:00
64a1045dc3 Cleanup ParseCertRelative code
Fix for case:
- can't find a signer for a certificate with the AKID
- find it by name
Has to error as the signer's SKID is always set for signer and would
have matched the AKID.
Simplify the path length code - don't look up CA twice.
Don't require the tsip_encRsaKeyIdx field in DecodedCert when
!WOLFSSL_RENESAS_TSIP - use local variable.
2019-12-19 08:53:24 +10:00
6922d7031c Merge pull request #2685 from embhorn/coverity_fixes
Coverity fixes
2019-12-18 14:06:48 -08:00
531fedfbb4 Merge pull request #2687 from ejohnstown/dtls-cap
DTLS Handshake Message Cap
2019-12-18 13:50:52 -08:00
031e78e103 Merge pull request #2606 from kaleb-himes/DOCS_UPDATE_19_NOV_2019
Add dox documentation for wc_ecc_make_key_ex
2019-12-18 13:49:57 -08:00
0057eb16f8 Merge pull request #2686 from ejohnstown/crl-skid
Check name hash after matching AKID for CRL
2019-12-18 13:48:59 -08:00
573d045437 Merge pull request #2682 from SparkiDev/akid_name_check
Check name hash after matching AKID
2019-12-18 13:08:19 -08:00
c054293926 Merge pull request #2684 from JacobBarthelmeh/build-tests
fix for g++ build warning
2019-12-18 12:09:29 -08:00
52893877d7 Fixes from review 2019-12-18 13:25:25 -06:00
6c6d72e4d6 Find CRL Signer By AuthKeyId
When looking up the signer of the CRL by SKID/AKID, also verify that the
CRL issuer name matches the CA's subject name, per RFC 5280 section 4.1.2.6.
2019-12-18 10:17:51 -08:00
2607cf3429 Fix up based on peer feedback 2019-12-18 10:55:20 -07:00
5a04ee0d8b Merge pull request #2640 from dgarske/alt_chain
Fixes for Alternate chain processing
2019-12-18 09:38:45 -08:00
b89121236f Merge pull request #2635 from dgarske/async_date
Fix for async date check issue
2019-12-18 09:34:08 -08:00
74a8fbcff4 Merge pull request #2666 from SparkiDev/b64_dec_fix
Bade64_Decode - check out length (malformed input)
2019-12-18 09:30:41 -08:00
c2e5991b50 Merge pull request #2681 from ejohnstown/crl-skid
Find CRL Signer By AuthKeyId
2019-12-18 09:29:17 -08:00
b5f645ea00 fix for g++ build warning 2019-12-18 10:01:52 -07:00
b126802c36 Clarify logic for skipping call to AddCA. 2019-12-18 06:04:26 -08:00
c1218a541b Check name hash after matching AKID
RFC 5280, Section 4.1.2.6:
If the subject is a CA (e.g., the basic constraints extension, as
discussed in Section 4.2.1.9, is present and the value of cA is TRUE),
then the subject field MUST be populated with a non-empty distinguished
name matching the contents of the issuer field (Section 4.1.2.4) in all
certificates issued by the subject CA.

The subject name must match - even when the AKID matches.
2019-12-18 17:57:48 +10:00
6ccd146b49 Bade64_Decode - check out length (malformed input) 2019-12-18 17:06:58 +10:00
ef6938d2bc DTLS Handshake Message CAP
Cap the incoming DTLS handshake messages size the same way we do for
TLS. If handshake messages claim to be larger than the largest allowed
certificate message, we error out.
2019-12-17 16:55:58 -08:00
7e74d02da5 Merge pull request #2677 from SparkiDev/p12_pbkdf_tmp_fix
PKCS#12 PBKDF - maximum tmp buffer size
2019-12-17 16:48:08 -08:00
ff026efe49 Merge pull request #2670 from SparkiDev/dec_pol_oid_fix
DecodePolicyOID - check out index
2019-12-17 16:47:36 -08:00
892e951c8a Merge pull request #2669 from SparkiDev/name_joi_fix
Decode X.509 name - check input length for jurisdiction
2019-12-17 16:46:30 -08:00
435d4bf427 Merge pull request #2658 from SparkiDev/asn_date_check
Check ASN date characters are valid
2019-12-17 16:39:35 -08:00
f81ce71c25 Merge pull request #2660 from JacobBarthelmeh/Compatibility-Layer
add --disable-errorqueue option
2019-12-17 16:37:02 -08:00
06563ed3fa Merge pull request #2642 from SparkiDev/sp_exptmod
sp_int: support for more values in sp_exptmod
2019-12-17 16:36:12 -08:00
037c319bab Find CRL Signer By AuthKeyId
1. Add parsing of CRL extensions, specifically the Auth Key ID extension.
2. To verify CRL, search for CA signer by AuthKeyId first, then by name.  If NO_SKID is set, just use name.
3. Update the ctaocrypt settings.h for the NO_SKID option with CRL so FIPS builds work.
2019-12-17 15:33:39 -08:00
feeb18600f Merge pull request #2636 from SparkiDev/mp_exptmod_fixes
Handle more values in fp_exptmod
2019-12-17 15:22:24 -08:00
138377f30e Merge pull request #2641 from SparkiDev/sp_c32_lshift
Fix lshift in SP 32-bit C code - FFDHE
2019-12-17 15:17:17 -08:00
5ee9f9c7a2 Merge pull request #2637 from SparkiDev/ecc_cache_resist
Improve wc_ecc_mulmod_ex cache attack resistance
2019-12-17 15:16:16 -08:00
028d9e5443 Merge pull request #2634 from SparkiDev/pkcs7_libz_fix
Fix missing variable declaration
2019-12-17 15:13:13 -08:00
a176789f13 Fix for async issue with "badDate" and "criticalExt" check getting skipped on call to ConfirmSignature with WC_PENDING_E response. Added log message when date failure is skipped. 2019-12-17 15:03:00 -08:00
06e5e81b1b Merge pull request #2663 from embhorn/zd5050
Clarify wolfSSL_shutdown error on subsequent calls
2019-12-17 14:59:35 -08:00
774a758f59 Fixes in test and example code 2019-12-17 15:56:40 -06:00
ab14a26be0 Merge pull request #2650 from dgarske/boot_tpm
Fix API visibility for ED25519 check key
2019-12-17 13:45:39 -08:00
cfd91fb0b8 Add check for length == 0 in wc_Arc4SetKey 2019-12-17 13:28:50 -07:00
e8594daab6 Merge pull request #2678 from tmael/night_valgrind
Fix memory leak detected with Valgrind
2019-12-17 09:11:30 -08:00
88188b79e2 Fix mem leak 2019-12-16 18:03:11 -08:00
8d7d2c74ee PKCS#12 PBKDF - maximum tmp buffer size
Use WC_MAX_BLOCK_SIZE - only an issue if PBKDF is using SHA-3
algorithms.
2019-12-17 09:56:08 +10:00
a71eb11b38 Improve Cortex-M RSA/DH assembly code performance
Performance of modular exponentiation improved by about 30%.
2019-12-17 09:03:34 +10:00
8d8ab655fa Merge pull request #2671 from ejohnstown/maint-conf
Maintenance: Configure
2019-12-16 13:38:02 -08:00
c0716b9e3f Merge pull request #2673 from Naruto/feature/fix_readme_miss
fix spell miss of zephyr README.md
2019-12-16 12:31:55 -07:00
af5c98a6a8 Fixes in wolfCrypt test 2019-12-16 10:22:42 -06:00
7fbadeaa17 fix spell miss of zephyr README.md 2019-12-16 21:36:43 +09:00
0bb8ae8564 Fixes for new defects in wolfCryot and wolfSSL (excluding test code) 2019-12-13 17:17:13 -06:00
f2115b2c2b Merge pull request #2652 from ejohnstown/maintenance-error
Maintenance: Error Strings
2019-12-13 15:03:32 -08:00
0348123261 Maintenance: Configure
1. Remove some redundant AM_CONDITIONAL macros checking for OCSP and CRL.
2. Moved the AM_CONDITIONAL macro setting BUILD_PKCS12 to the other AM_CONDITIONALS.
2019-12-13 15:02:03 -08:00
1a594d92ba Merge pull request #2668 from ejohnstown/maintenance-scanbuild
Fixed a couple initialization issues scan-build indicated
2019-12-13 14:13:48 -07:00
6a2975c742 DecodePolicyOID - check out index 2019-12-13 12:13:38 +10:00
b3cbab4bf3 Decode X.509 name - check input length for jurisdiction 2019-12-13 11:55:15 +10:00
e7af2d2ba9 Fixed a couple initialization issues scan-build indicated. 2019-12-12 16:50:37 -08:00
a3cc2aa6ff Merge pull request #2665 from kaleb-himes/ZD-9590-CCM-Benchmarking
Add CCM Decryption to benchmarking
2019-12-12 16:48:12 -08:00
e063fb1631 sp_int.c: Strip leading zeros in sp_read_radix 2019-12-13 09:08:55 +10:00
0a38d7c178 Add CCM Decryption to benchmarking 2019-12-12 13:53:30 -07:00
51d5abd63f Clarify wolfSSL_shutdown error on subsequent calls 2019-12-12 13:16:52 -06:00
adc14f7552 sp_int: Check size of numbers for overflow 2019-12-12 18:36:23 +10:00
2e5258fe15 add --disable-errorqueue option 2019-12-11 11:19:58 -07:00
dffb59ea52 sp_int: support for more values in sp_exptmod and fix
SP C - fix mont reduce with fast mul_add
2019-12-11 11:10:18 +10:00
093a31ed49 Merge pull request #2655 from kaleb-himes/ZD-9592
Remove forcing NO_SKID on unsuspecting CRL users
2019-12-10 16:33:16 -08:00
05dafd0adb Check ASN date characters are valid 2019-12-11 09:22:26 +10:00
74e54393ab Remove a bitfield indicator from a structure member that didn't require it. 2019-12-10 13:17:30 -08:00
2b66a9f1ec Address reviewed items 2019-12-09 14:44:59 -07:00
e8c7d6f818 Account for ASN disabled 2019-12-07 05:06:41 -07:00
bbdf0d101f Improve Decoded CRL initialization 2019-12-07 04:23:02 -07:00
072fe8fd6d More complete fix for removing NO_SKID condition as default with CRL enabled 2019-12-07 03:39:57 -07:00
8450c4ae39 Merge pull request #2643 from ejohnstown/maintenance-prime
Maintentance: Prime
2019-12-06 18:50:51 -08:00
05e672428d Merge pull request #2645 from cconlon/cmsrsacb
CMS SignedData RSA sign callback for raw digest
2019-12-06 17:13:32 -07:00
6081bdaad6 free PKCS7 before creating new in API test 2019-12-06 12:00:33 -07:00
19a4371d48 Maintenance: Error Strings
1. One of the error string was >80 bytes long. Shortened it.
2. The function that copies an error string to an output array needs to
ensure the string is still null terminated.
3. Added a check to the wolfCrypt test to see that error strings aren't
>= 80 bytes long.
2019-12-06 09:53:39 -08:00
b4f67dabcf Merge pull request #2647 from kojo1/SN-size
EXTERNAL_SERIAL_SIZE to build option
2019-12-06 09:13:07 -07:00
b28f6aeb34 Work to support wolfBoot with wolfTPM. Fix missing visibility marker for wc_ed25519_check_key. 2019-12-06 06:53:23 -08:00
87ec950221 Rollback the define in internal.h 2019-12-06 10:31:28 +09:00
9fd5628148 Merge pull request #2631 from SparkiDev/mp_invmod_fix
mp_invmod handles more inputs
2019-12-05 16:21:33 -08:00
7e391f0fd5 Merge pull request #2629 from SparkiDev/dsa_blinding
Blinding for DSA sign
2019-12-05 16:20:21 -08:00
4b31a180c8 Merge pull request #2626 from SparkiDev/sp_invmod_fixes
Fix sp_invmod to handle more input values
2019-12-05 16:18:55 -08:00
8cc4c62c14 Merge pull request #2625 from SparkiDev/set_ser_num_2
Support 20-byte serial numbers and disallow 0.
2019-12-05 16:17:54 -08:00
bd8a612d6c Merge pull request #2624 from ejohnstown/maintenance-ASN1
Maintenance: ASN.1
2019-12-05 16:16:42 -08:00
7ec448ac0c Merge pull request #2617 from embhorn/zd9553
Fix for vasprintf with AIX
2019-12-05 16:15:24 -08:00
7631fdafa1 Merge pull request #2612 from SparkiDev/sp_div_small_a
sp_div improved to handle when a has less digits than d
2019-12-05 16:14:05 -08:00
6d40c20f2c Merge pull request #2609 from JacobBarthelmeh/Compatibility-Layer
Fix for EVP CipherUpdate decrypt and add test case
2019-12-05 16:12:26 -08:00
312d5c98b3 Merge pull request #2535 from julek-wolfssl/nginx-1.15
Nginx 1.15.0 & 1.16.1
2019-12-05 14:40:45 -08:00
a13ebf5258 Merge pull request #2543 from embhorn/zd5706
Update DoVerifyCallback to check verify param hostName and ipasc
2019-12-05 14:38:47 -08:00
d74a1888bb move it to build option 2019-12-06 06:28:25 +09:00
2c0fda4168 Maintentance: Prime
1. Revisited the option enables around the wolfCrypt prime test. Added a
check for key generation to the check for public MP.
2019-12-05 12:23:42 -08:00
be97444d24 add api test for wc_PKCS7_SetRsaSignRawDigestCb() 2019-12-05 10:33:49 -07:00
2063fa502f add CMS RSA sign callback for raw digest 2019-12-05 10:33:49 -07:00
0552fbc5de Fix lshift in SP 32-bit C code - FFDHE 2019-12-05 09:08:30 +10:00
9b437384de Allow AddCA for root CA's over the wire that do not have the extended key usage cert_sign set. 2019-12-04 14:14:37 -08:00
b01c558adb Fix to not send alert until after the verify cert callback and alternate chain logic has been evaluated. 2019-12-04 12:41:23 -08:00
acd4bc3305 Added logging for SendAlert call. 2019-12-04 11:02:22 -08:00
44fc3e14b1 Maintenance: ASN.1
1. Fix some preprocessor flag checking for function EncodePolicyOID. It
also needs to be available for OpenSSL Compatibility.
2. Fix for a name string for a test that can get left in or out
incorrectly.
2019-12-04 10:26:37 -08:00
3646051434 Fix for alternate chain logic where presented peer's CA could be marked as trusted.
When building with `WOLFSSL_ALT_CERT_CHAINS` a peer's presented CA could be incorrectly added to the certificate manager, marking it as trusted.

Began in PR #1934
ZD 9626
2019-12-04 06:56:36 -08:00
2a0c037f98 Improve wc_ecc_mulmod_ex cache attack resistance 2019-12-04 11:08:28 +10:00
c5f9a601e8 Handle more values in mp_exptmod
Handle prime (modulus) of 0 and 1.
Handle exponent of 0.
Fix for base of 0 in fp_exptmod and hadnle base of 0 in mp_exptmod.
fp_exptmod - Don't modify X's sign during operation when passed in as negative.
2019-12-04 09:32:08 +10:00
fd4fb28a2e Fix missing variable declaration
--enable-scep --with-libz
PKCS#7 decompress code
2019-12-03 11:07:29 +10:00
b9a82204e2 Blinding for DSA sign 2019-12-03 09:36:33 +10:00
7e45ae2ec6 Merge pull request #2621 from JacobBarthelmeh/SanityChecks
sanity check on "a" input to invmod
2019-12-02 10:57:01 -08:00
2efa91632e revert adding import check in configure.ac 2019-12-02 08:56:00 -07:00
bfaa970d84 Merge pull request #2628 from tmael/nightly_valgrind
Fix Valgrind Known Configs Test
2019-11-29 08:59:58 -08:00
204045223f Fix sp_invmod to handle more input values 2019-11-29 11:54:36 +10:00
bd7a572a8f mp_invmod handles more inputs
Value to invert: a
Modulus: b
integer.c - normal math
  - a is one, or a mod b is one
tfm.c - fast math
  - b is -ve (error), or b is zero
  - a is zero or a mod b is zero
2019-11-29 09:08:44 +10:00
f0c070b2cf Merge pull request #2630 from SparkiDev/poly1305_avx2_fix
Poly1305 AVX2 asm fix
2019-11-28 09:28:22 -08:00
06ca07c79f Poly1305 AVX2 asm fix
Missed carry when converting from 26 in 64 bits to 64 in 64 bits.
2019-11-28 16:01:29 +10:00
16ac0d8eb6 Support 20-byte serial numbers and disallow 0. 2019-11-28 10:21:48 +10:00
245a2b7012 sp_int: clamp more results 2019-11-28 10:01:54 +10:00
dadbeff433 sp_int: When setting digit of 0, set used to 0 2019-11-28 10:01:54 +10:00
2ac0ac8776 Fix for sp_div when a > d but same bit length 2019-11-28 10:01:54 +10:00
8315ae892f sp_div improved to handle when a has less digits than d 2019-11-28 10:01:54 +10:00
b396ed0984 Merge pull request #2627 from SparkiDev/rsa_sign_vfy
Change signature generation to verify by default
2019-11-27 14:08:07 -08:00
e1ebb39296 Merge pull request #2618 from ejohnstown/maintenance-prime
Maintenance: Prime
2019-11-27 14:06:23 -08:00
ff85cc7740 Merge pull request #2622 from SparkiDev/ber_to_der_rework
Rework BER to DER to not be recursive
2019-11-27 14:05:36 -08:00
1026c4359d Cast XMALLOC 2019-11-27 14:47:48 -06:00
acdfc514b3 Use memset initialize 2019-11-27 11:09:57 -08:00
cc722468be Maintenance: ASN.1
1. Add an additional check in GetCertHeader() to see that sigIndex is
bounded by maxIdx.
2019-11-27 10:43:51 -08:00
806db8096c Replace use of vasprintf 2019-11-27 11:00:28 -06:00
b06cee333c Add error on EOF 2019-11-27 17:46:15 +01:00
29a8262ea4 Only test X509_NAME_print_ex when defines enabled 2019-11-27 17:46:15 +01:00
0f4a002f4f Formatting 2019-11-27 17:46:15 +01:00
9be1b4cfd8 Remove tabs 2019-11-27 17:46:15 +01:00
944d5e1045 Don't count null char in better way 2019-11-27 17:46:15 +01:00
7c1a1dfd1f Variable declaration at start of scope 2019-11-27 17:46:15 +01:00
308c5f3370 Fix implicit cast 2019-11-27 17:46:15 +01:00
5f39e12b21 Fix leak in SSL_CTX_set0_chain 2019-11-27 17:46:15 +01:00
8dde06bbca Fix compile errors 2019-11-27 17:46:15 +01:00
dd07344499 SSL_SESSION_dup 2019-11-27 17:46:15 +01:00
3c9d191a5b Don't propogate ASN_NO_PEM_HEADER from wolfSSL_load_client_CA_file 2019-11-27 17:46:15 +01:00
1962159d89 more NGINX defines 2019-11-27 17:46:15 +01:00
b71758895e Add support for SSL_CTX_set0_chain 2019-11-27 17:46:15 +01:00
b7913116c0 Remove redeclaration 2019-11-27 17:46:15 +01:00
9fbc167d0c Declare at start of scope 2019-11-27 17:46:15 +01:00
d9ab0c4bcb Check bounds 2019-11-27 17:46:15 +01:00
ea5ac675ed WIP 2019-11-27 17:46:15 +01:00
f0abd4ea82 WIP 2019-11-27 17:45:49 +01:00
9064de1e75 Set proper WOLFSSL_ASN1_TIME in thisupd and nextupd in wolfSSL_OCSP_resp_find_status 2019-11-27 17:45:49 +01:00
31c0abd610 wolfSSL_X509_NAME_print_ex should not put the null terminator in the BIO 2019-11-27 17:45:49 +01:00
de3c11d55c opensslall required 2019-11-27 17:45:49 +01:00
a892f2a95a Changes for nginx 1.15
- ssl.c: add to check to overwrite existing session ID if found
- evp.c: wolfSSL_EVP_DecryptFinal* was checking for wrong value
2019-11-27 17:45:49 +01:00
2e487a2463 Init uninitialised values 2019-11-27 07:46:33 -08:00
23878512c6 Change signature generation to verify by default 2019-11-27 10:47:03 +10:00
776f4af7f6 Rework BER to DER to not be recursive 2019-11-27 10:20:32 +10:00
1b63ab0e73 Merge pull request #2623 from SparkiDev/set_ser_rand
Generating serial number - clear top bit
2019-11-26 16:14:54 -08:00
2de52c7666 Maintenance: Prime
When returning a result from mp_prime_is_prime for normal math, the
result should be MP_YES or MP_NO, not a bare number (1 or 0).
2019-11-26 15:44:30 -08:00
7cb5fe5e2a Merge pull request #2620 from tmael/ALPN_input
Fix alpn buffer overrun
2019-11-26 15:31:56 -08:00
57df5c10c9 Merge pull request #2619 from dgarske/async_mem
Fix for Intel QuickAssist asynchronous build
2019-11-26 15:29:04 -08:00
0d69950d07 Merge pull request #2615 from SparkiDev/mp_exptmod_neg_p
Handle negative modulus with negative exponent in exptmod
2019-11-26 15:20:54 -08:00
95c9dc9fe8 Merge pull request #2614 from ejohnstown/maintenance-OCSP
Maintenance: OCSP
2019-11-26 15:19:27 -08:00
9b7cd6bdfd Merge pull request #2613 from tmael/evp_aes_gcm
Set default IV length for EVP aes gcm
2019-11-26 15:18:27 -08:00
5d41ef171c Merge pull request #2610 from ejohnstown/maintenance-DTLS
Maintenance: DTLS
2019-11-26 15:17:22 -08:00
9ecafa7afe Merge pull request #2557 from tmael/cert_store_ls_x509
Retrieve a stack of X509 certs
2019-11-26 15:16:09 -08:00
55540c6bd3 Replace a compile option check around some filenames for certificate testing. 2019-11-25 16:13:01 -08:00
1ac0b1fc0b Maintenance: ASN.1
1. Undo an earlier change with respect to parsing a long length with
length zero. If BerToDer is disabled, this will be treated as a zero
length. With BerToDer enabled, the conversion will do the right thing.
2019-11-25 16:08:32 -08:00
5e0ca866df Maintenance: ASN.1
1. For certificates, when copying a member of a container, one shouldn't read
beyond the enclosing context.
2019-11-25 16:08:32 -08:00
d389133f33 Maintenance: ASN.1
1. Update the ParseCRL function to always obey the length value of a tag.
2019-11-25 16:08:31 -08:00
9753bf627b Maintenance: ASN.1
1. Remove the function Word32ToString and replace with calls to
XSNPRINTF().
2. Simplify DecodePolicyOID(), which converts an ASN.1 OID to a text
string in the form a.b.ccccc.d... Return an error if it gets too long.
2019-11-25 16:08:26 -08:00
7c3a4a1975 update comment to reflect new sanity check 2019-11-25 10:57:09 -07:00
316b8b0b4d add early return to normal math and WOLFSSL_VALIDATE_ECC_IMPORT to enable-all and enable-fpecc builds 2019-11-25 10:47:08 -07:00
6325269236 Generating serial number - clear top bit
If the top bit is set then the encoding routine will drop a byte of the
serial number.
Better to ensure number is positive, top bit clear, and use as much of
the serial number data as possible.
2019-11-25 15:36:11 +10:00
9a0a48e093 sanity check on "a" input to invmod 2019-11-22 15:47:05 -07:00
8bc3b7df35 Free x509 2019-11-22 14:31:59 -08:00
dc25b79db6 Fix from review 2019-11-22 15:10:13 -06:00
3432a8a1fc Maintenance: Prime
1. Prime test should return NO for 1. (ex function, normal math and fast
math)
2. Call mp_init() on the k value for the primality test case in the
wolfCrypt test.
2019-11-22 13:02:59 -08:00
481da3dcc1 Maintenance: Prime
1. Added a test case for checking "1" as a prime number to the wolfCrypt
test.
2. Allow the wolfCrypt prime test for SP builds.
3. Modify the prime test to use mp_mul rather than mp_mul_d, as the SP
math library doesn't export sp_mul_d.
2019-11-22 11:39:19 -08:00
cf127ec05f Fix buffer overrun 2019-11-22 10:33:17 -08:00
be88bce36d Fix for issues with wolfSSL_OBJ_nid2sn and wc_OBJ_sn2nid and logic finding max item when WOLFSSL_CUSTOM_CURVES and ECC_CACHE_CURVE are defined. Improvements to wolfSSL_EC_get_builtin_curves to avoid using "min" as variable name and eliminate using a local static. 2019-11-22 10:09:10 -08:00
0a924af894 Maintenance: Prime
1. Prime test should return NO for 1. (sp math)
2019-11-22 10:01:21 -08:00
ffb3dfd6ec Fixes for minor test.c build configuration issues. 2019-11-22 07:01:10 -08:00
cdc50d7753 Revert header change in #2504 for asynchronous crypto quickassist_mem.h. 2019-11-22 05:59:57 -08:00
50c4347748 More corner cases in tfm
Handle zero base in fp_exptmod better().
Handle negatives in fp_gcd().
Return FP_OKAY when writing out 0 with mp_toradix().
2019-11-22 09:56:02 +10:00
71943844d6 Maintenance: OCSP
1. Add a couple more bounds checks to wolfIO_HttpProcessResponseBuf().
2019-11-21 14:51:35 -08:00
452ba5b502 Maintenance: Prime
1. Prime test should return NO for 1. (normal math and fast math)
2019-11-21 13:49:26 -08:00
b57294eff7 Fix for vasprintf with AIX 2019-11-21 12:23:15 -06:00
edb07cf68e Merge pull request #2587 from guidovranken/ocsp-resp-decoder-bounds-fix
Properly limit array access in OCSP response decoder
2019-11-21 10:13:49 -08:00
428d51e664 IV is set in the evp ctx level 2019-11-21 09:58:03 -08:00
e883a2f696 Merge pull request #2611 from SparkiDev/sp_int_add_fix
Fix sp_add to handle carries properly
2019-11-21 08:59:09 -08:00
f56a74b6b7 Handle negative modulus with negative exponent in exptmod 2019-11-21 14:55:13 +10:00
6720bc3890 Maintenance: OCSP
1. Add some minimum bounds checking on the HTTP responses as some can
end up being too short.
2019-11-20 17:25:03 -08:00
f95d5eebff Add FreeX509() to clean up when sk stack is empty 2019-11-20 17:02:13 -08:00
6c732725b0 Test evp aes gcm with default IV length 2019-11-20 16:37:15 -08:00
b33ce2207d Merge pull request #2608 from SparkiDev/use_heap
When disabled memory, ensure all heap and types are used
2019-11-20 16:18:07 -08:00
a2d036dcba Merge pull request #2601 from SparkiDev/certs_exts_fix
ProcessPeerCerts allocating memory for exts with OPENSSL_EXTRA properly
2019-11-20 16:17:28 -08:00
a20db0b8ad Fix sp_add to handle carries properly 2019-11-21 09:47:17 +10:00
ce0136e968 Maintenance: Integers
In TFM and Integer, rshb() shouldn't try to shift a value that is 0.
This leads to using a negative offset to a pointer, but isn't used.
2019-11-20 13:55:57 -08:00
6f98d5d348 remove extra parentheses that clang complained about 2019-11-20 14:49:47 -07:00
71690fc73a Maintenance: DTLS
1. Updated the window scrolling. There was a couple off-by-one errors in
the DTLS window handling. They canceled each other out, but there was a
rare case where they would shift too much.
2019-11-20 13:46:23 -08:00
188eb45433 Maintenance: DTLS
Removed redundant sequence increment when sending the Server Hello message.
2019-11-20 13:08:01 -08:00
1eb1755f07 add another evp decrypt test case 2019-11-20 12:29:22 -07:00
9880ad6926 updates to EVP_CipherUpdate for handling storage of last block 2019-11-20 11:57:06 -07:00
19d8ef405c Maintenance: DTLS
When encrypting with AES-GCM, AES-CCM, or PolyChacha, do not increment
the DTLS sequence number. The sequence number should only be incremented
in BuildMessage. This was done because the sequence number used to be
incremented after calculating the HMAC or after the encrypt for AEAD
ciphers. The HMAC has been separated from the sequence increment.
2019-11-20 10:56:56 -08:00
4896a48955 fix EVP_CipherUpdate padding 2019-11-20 11:49:30 -07:00
88fb7efb8c Merge pull request #2602 from SparkiDev/certs_exts_free
ProcessPeerCerts jump to error handling instead of returning
2019-11-20 09:25:48 -08:00
2a7fb69523 Merge pull request #2604 from SparkiDev/disabled_curve_fix
TLS supported curve extension - validate support fix
2019-11-20 09:17:50 -08:00
ccc8a49fcb Merge pull request #2607 from SparkiDev/tls13_serverhello_cs
TLS 1.3 client detects non-TLS 1.3 cipher suite in ServerHello
2019-11-20 09:16:16 -08:00
d5a1adab5d Merge pull request #2605 from SparkiDev/set_ser_num
Added output size to SetSerialNumber
2019-11-20 09:15:36 -08:00
1ba366920c Merge pull request #2581 from SparkiDev/ecc_fixes_add
Add deterministic ECDSA sig gen. Fix corner cases for add point.
2019-11-20 09:12:28 -08:00
f1fbabbb60 Use default 96-bits IV length when unset 2019-11-20 09:09:12 -08:00
d441cee6fb When disabled memory, ensure all heap and types are used 2019-11-20 17:06:42 +10:00
917e5b0405 TLS 1.3 client detects non-TLS 1.3 cipher suite in ServerHello 2019-11-20 12:22:00 +10:00
13c6346158 Check error returns from mp calls 2019-11-20 11:09:50 +10:00
79b35860e0 Added output size to SetSerialNumber
Some internal calls were passing in output size as max number size.
2019-11-20 10:52:48 +10:00
ad3e105303 Add dox documentation for wc_ecc_make_key_ex 2019-11-19 17:06:52 -07:00
c7f7d1b193 TLS supported curve extension - validate support fix
Check curve name is in range before checking for disabled
2019-11-20 09:38:06 +10:00
62eaa27b41 Review comment, avoid double-free 2019-11-19 15:29:48 -08:00
1a3455110e Merge pull request #2599 from dgarske/cleanup_script
Useful script to cleanup test files created
2019-11-19 11:59:50 -08:00
5c4da3e6fa Merge pull request #2598 from dgarske/max_file_sz
Improvements to file size checks
2019-11-19 11:59:21 -08:00
5de27443d0 Merge pull request #2596 from dgarske/mqx_fio_cleanup
Support for MQX 5.0 and cleanup of the MQX includes
2019-11-19 11:49:03 -08:00
7b160a8cf3 Make MAX_WOLFSSL_FILE_SIZE overridable. 2019-11-19 07:46:50 -08:00
9a4614f6e1 Fix for possible uninitialized memSz in bio.c 2019-11-19 05:35:22 -08:00
e7bff37421 Add settings.h build macro note. 2019-11-19 05:33:59 -08:00
1b8f136d29 ProcessPeerCerts jump to error handling instead of returning 2019-11-19 13:17:29 +10:00
f08dfb4afc ProcessPeerCerts allocating memory for exts with OPENSSL_EXTRA properly 2019-11-19 13:03:20 +10:00
e6292eca9c Merge pull request #2597 from ejohnstown/octeon-global
Sync OCTEON Sniffer
2019-11-18 17:06:30 -08:00
c6dac64438 Merge pull request #2594 from ejohnstown/maintenance-BLAKE2
Maintenance BLAKE2
2019-11-18 17:05:01 -08:00
fea1f1d6e5 Maintenance: ASN.1
1. Reject as an error any ASN.1 length value that is multibyte of length 0.
2019-11-18 17:02:19 -08:00
7a5c8f4e07 Merge pull request #2584 from SparkiDev/sp_rsa4096
SP now has support for RSA/DH 4096-bit operations
2019-11-18 15:38:47 -08:00
b646b7258b Merge pull request #2585 from dgarske/webrtc_m79
Support for Google WebRTC (ref m79)
2019-11-18 15:33:49 -08:00
20c82f3c4b Merge pull request #2586 from dgarske/STM32_HW
STM32 Crypto hardware fixes and improvements
2019-11-18 15:22:19 -08:00
90f7a96721 Merge pull request #2593 from ejohnstown/maintenance-DH
Maintenance: DH
2019-11-18 15:18:16 -08:00
12dfe027ed Merge pull request #2595 from dgarske/hmac_devid
Adds PBKDF2 and Hash wrapper heap ctx and crypto callback support
2019-11-18 15:16:19 -08:00
74dd142a51 Review comment 2019-11-18 15:13:59 -08:00
abee442c1e Useful script to cleanup test files created. 2019-11-18 15:08:54 -08:00
6ffd931db1 Merge pull request #2564 from SparkiDev/tlsext_list_fix
Modify linked list traversal - fix for compiler bug
2019-11-18 15:04:26 -08:00
a1e33e7ec9 Maintenance: OCSP
1. Check array index bounds before using them in arrays.
2. When processing an HTTP buffer, check that the new buffer size is
valid before allocating a new one.
2019-11-18 14:15:55 -08:00
48d0b53074 Fix for wolfSSL_cmp_peer_cert_to_file compiler warning with size_t vs long. 2019-11-18 14:01:16 -08:00
ca5549ae91 Improvements for XFTELL return code and MAX_WOLFSSL_FILE_SIZE checking.
Fixes #2527
2019-11-18 13:49:06 -08:00
8347d00bf2 Maintenance BLAKE2
1. Remove the BLAKE2 HMAC from wolfSSL and its testing.
2019-11-18 13:31:15 -08:00
1542482cd5 Cleanup of the MQX file headers for STDIO. Cleanup of fio.h and nio.h includes to use wc_port.h. ZD 9453. 2019-11-18 12:14:34 -08:00
b780982aa4 Adds "devId" crypto device and "heap" context for Hash wrappers and PBKDF
* Adds new hash wrapper init `wc_HashInit_ex`.
* Adds new PBKDF2 API `wc_PBKDF2_ex`.
ZD 9494 (using PBKDF2)
2019-11-18 11:26:56 -08:00
14c986360d Maintenance BLAKE2
1. Remove BLAKE2 support from HMAC.
2. Update doxy header for HMAC with removal of BLAKE2 and addition of SHA-3.
2019-11-18 10:45:30 -08:00
cb9f16d3cb Fix for proper sizing of in-memory buffer for TLS benchmarking (32 is not always the max digest size). 2019-11-18 10:34:15 -08:00
12d2d17d18 Minor cleanups to TLS bench tool configuration. 2019-11-18 10:29:50 -08:00
95b83272dd Implementation for SSL_CTX_add1_chain_cert. 2019-11-18 10:19:48 -08:00
c9f7741dfb Merge pull request #2567 from aaronjense/scan-build-fix
Scan-Build Fixes for PKCS7 and PKCS12
2019-11-18 10:21:14 -07:00
ea04dbede1 Merge pull request #2583 from ejohnstown/rng-ebsnet
RNG-EBSNET
2019-11-18 09:15:30 -08:00
7e17904c54 Fix for AES GCM Decrypt auth tag. ZD 9507 2019-11-18 06:46:50 -08:00
b676c69561 Fix for DES mutex return code. Fix TLS bench thread shutdown. README.md updates. 2019-11-18 06:46:20 -08:00
520a032b71 Add show x509 test 2019-11-15 13:23:08 -08:00
6ca12787ae retrieve a stack of X509 certs in a cert manager and a store ctx 2019-11-15 13:23:08 -08:00
7819fedca7 Update for OpenSTM32 project. Adds TLS benchmarking tool, which test client/server for each cipher suite. 2019-11-15 12:10:09 -08:00
0c2c4fd91b Improvements to tls_bench tool in wolfSSL lib for embedded use. 2019-11-15 12:09:19 -08:00
961f9c4ecc Cleanup for invalid use of NO_SHA512 in api.c unit test. 2019-11-15 12:08:50 -08:00
a7e415d077 Fix for AEC CTR mode with STM32 and CubeMX. 2019-11-15 12:08:25 -08:00
27d95d1dfd Add mutex protection on STM32 RNG, AES/DES and Hashing crypto hardware calls for thread safety. Fixes #2580 2019-11-15 12:08:11 -08:00
2a9449182c * Make the wc_Stm32_Aes_Init API always available for STM32. ZD 9503
* Fix for SHA256 hash context to only be included for `STM32_HASH_SHA2`. ZD 9503
2019-11-15 12:07:08 -08:00
4282346eef Merge pull request #2551 from kaleb-himes/ZD5815-EBSNET
Implement porting efforts from ZD5241 and ZD5815
2019-11-15 09:24:10 -07:00
3cd5a97473 Maintenance
1. When getting the DH public key, initialize the P, G, and Pub pointers
to NULL, then set that we own the DH parameters flag. This allows
FreeSSL to correctly clean up the DH key.
2019-11-14 14:42:58 -08:00
604219f2fc Sync OCTEON fix
1. For OCTEON builds, leave out the "-DCVMX_BUILD_FOR_LINUX_HOST" option
from CFLAGS by default so it makes standalone host builds.
2. Add a check of the variable OCTEON_HOST for linux to add back in the
"-DCVMX_BUILD_FOR_LINUX_HOST" to CFLAGS.
2019-11-14 14:21:44 -08:00
2ace532e45 Sync OCTEON fix
1. The sniffer's global device ID wasn't tagged as global.
2. Make sure the sniffer's global device ID is used.
2019-11-14 14:21:44 -08:00
7c78130f70 Sync OCTEON fix
The preprocessor selection for the WOLFSSL_GLOBAL macro for OCTEON wasn't getting selected.
2019-11-14 14:21:44 -08:00
4a2f8482b5 Remove static RSA setting
Customer confirmed their tests are passing without static rsa enabled.
2019-11-14 15:16:32 -07:00
8c6c4e2432 Add unique error codes to verify failures 2019-11-14 16:02:02 -06:00
22042830d6 Merge pull request #2588 from kojo1/BasicConst2
BasicConstraint, compatibility
2019-11-14 13:16:30 -07:00
dccb2e165e if integer it is valid format with CA = False, 2019-11-14 14:51:58 +09:00
cc880e39ae Add deterministic ECDSA sig gen. Fix corner cases for add point.
In verify, two points are added and they may either be the same point
(different z) or result in infinity.
If they are the same point then a double needs to be performed instead.
Detection of infinity added.
Calculation of wc_ecc_sig_size fixed to handle wehn there are more bits
in the order than in the modulus.
2019-11-14 12:49:45 +10:00
a3fca34471 Properly limit array access in OCSP response decoder 2019-11-14 03:19:07 +01:00
411b130369 Add new 4096-bit cert and key to distribution 2019-11-14 09:13:24 +10:00
8f08f001d2 Update the EBSNET GenerateSeed function with a better seed. It was
reseeding itself every few bytes and failing the simple entropy check.
2019-11-13 14:50:58 -08:00
af142b307b Support for WebRTC (ref m79):
* Fixed `set1_curves_list` API's to use `const char*` for names.
* Fixed `ossl_typ.h` to include `ssl.h` compatibility.
* Added `SSL_CTX_up_ref`.
* Added `wolfSSL_set1_curves_list`
* Added `TLS_method` and `DTLS_method`
* Added `SSL_CIPHER_standard_name`.
* Added `X509_STORE_CTX_get0_cert`
* Added `SSL_CTX_set_cert_verify_callback`.
* Enabled "either" side support when `--enable-opensslall` is used.
* Changed `SSL_CIPHER_get_rfc_name` to use `wolfSSL_CIPHER_get_name` instead of stub.
2019-11-13 12:34:33 -08:00
99292158e4 Merge pull request #2573 from JacobBarthelmeh/staticmemory
handle case to avoid memcpy when staticmemory IO pool gives same buffer
2019-11-13 11:29:13 -08:00
76e7e7349b Merge pull request #2575 from tmael/valgrind_dhtest
Fix memory leak in dh_test
2019-11-13 11:28:04 -08:00
46bc8e092a Merge pull request #2582 from ejohnstown/abi-current
ABI
2019-11-13 11:24:45 -08:00
dab7d09570 Fix the possibility that memory is not free'd when GetLength returns 0 2019-11-13 11:55:45 -07:00
0beeb2356b Fix scan-build not recognizing FlatAttrib array being initialized 2019-11-13 11:50:26 -07:00
e3fb746f1d Merge pull request #2503 from dgarske/openvpn
wolfSSL Compatibility support for OpenVPN
2019-11-13 11:04:08 -07:00
546442c130 Fix for CAVP test issue trying to use AES_128_KEY_SIZE and AES_IV_SIZE. 2019-11-12 09:43:09 -08:00
5221c082f1 SP now has support for RSA/DH 4096-bit operations 2019-11-12 12:04:06 +10:00
d8e40dea3f Fixes from peer review:
* Reduced codesize when building with `OPENSSL_EXTRA_X509_SMALL`.
* Additional argument checks in `wolfSSL_ASN1_BIT_STRING_set_bit`, `wolfSSL_ASN1_STRING_to_UTF8`, `wolfSSL_RSA_meth_new`, `wolfSSL_RSA_meth_set`.
* Fix for compiler warnings in asn.c using strncmp to duplicate string. "specified bound depends on the length of the source argument"
2019-11-11 15:39:23 -08:00
682cf6deac wolfSSL ABI
Hide the RNG and ecc_key allocators from FIPS mode builds.
2019-11-11 15:16:39 -08:00
d17748b1ad Fix for EC_GROUP_order_bits and added unit test. 2019-11-11 14:58:23 -08:00
2bae1d27a1 wolfSSL Compatibility support for OpenVPN
* Adds compatibility API's for:
	* `sk_ASN1_OBJECT_free`
	* `sk_ASN1_OBJECT_num`
	* `sk_ASN1_OBJECT_value`
	* `sk_X509_OBJECT_num`
	* `sk_X509_OBJECT_value`
	* `sk_X509_OBJECT_delete`
	* `sk_X509_NAME_find`
	* `sk_X509_INFO_free`
	* `BIO_get_len`
	* `BIO_set_ssl`
	* `BIO_should_retry` (stub)
	* `X509_OBJECT_free`
	* `X509_NAME_get_index_by_OBJ`
	* `X509_INFO_free`
	* `X509_STORE_get0_objects`
	* `X509_check_purpose` (stub)
	* `PEM_read_bio_X509_CRL`
	* `PEM_X509_INFO_read_bio`
	* `ASN1_BIT_STRING_new`
	* `ASN1_BIT_STRING_free`
	* `ASN1_BIT_STRING_get_bit`
	* `ASN1_BIT_STRING_set_bit`
	* `DES_check_key_parity`
	* `EC_GROUP_order_bits`
	* `EC_get_builtin_curves`
	* `EVP_CIPHER_CTX_cipher`
	* `EVP_PKEY_get0_EC_KEY`
	* `EVP_PKEY_get0_RSA`
	* `EVP_PKEY_get0_DSA` (stub)
	* `HMAC_CTX_new`
	* `HMAC_CTX_free`
	* `HMAC_CTX_reset`
	* `HMAC_size`
	* `OBJ_txt2obj`
	* `RSA_meth_new`
	* `RSA_meth_free`
	* `RSA_meth_set_pub_enc`
	* `RSA_meth_set_pub_dec`
	* `RSA_meth_set_priv_enc`
	* `RSA_meth_set_priv_dec`
	* `RSA_meth_set_init`
	* `RSA_meth_set_finish`
	* `RSA_meth_set0_app_data`
	* `RSA_get_method_data`
	* `RSA_set_method`
	* `RSA_get0_key`
	* `RSA_set0_key`
	* `RSA_flags`
	* `RSA_set_flags`
	* `RSA_bits`
	* `SSL_CTX_set_ciphersuites`
	* `SSL_CTX_set_security_level` (stub)
	* `SSL_export_keying_material` (stub)
	* `DSA_bits` (stub)
* Changes to support password callback trial and NO_PASSWORD. Replaces PR #2505.
* Renamed `wolfSSL_SSL_CTX_get_client_CA_list` to `wolfSSL_CTX_get_client_CA_list`.
* Cleanup of "sk" compatibility.
2019-11-11 14:58:23 -08:00
5a21cec030 wolfSSL ABI
Add ABI tags to the functions wolfSSL_Cleanup() to match wolfSSL_Init(),
wolfSSL_X509_free to match wolfSSL_load_certificate_file() which
allocates memory.
2019-11-11 10:16:58 -08:00
68e4014c3f memset DhKeys 2019-11-11 09:43:10 -08:00
8246e02756 Merge pull request #2502 from cariepointer/gcm-tls10-fix
Return error with AES-GCM and negotiated versions < TLSv1.2
2019-11-08 15:06:54 -08:00
c6fa49d4b4 wolfSSL ABI
Add the ABI tag to the prescribed list of functions in the header and source files.
2019-11-08 15:06:18 -08:00
44552fe707 Merge pull request #2536 from dgarske/nxp_mmcau_align
Fix NXP MMCAU when data pointer is not aligned
2019-11-08 15:02:43 -08:00
801ffd4712 Merge pull request #2571 from SparkiDev/asn1_cert_parse_fix
Ensure space for name string. Reset policy count.
2019-11-08 15:02:02 -08:00
a2cdb87067 Add check for if length is <= 0 in wc_Arc4SetKey 2019-11-08 14:54:39 -07:00
99ee4a407d Fix mem leak for valgrind 2019-11-08 12:09:46 -08:00
39eaaddeae Add tests for AEAD cipher suites with TLSv1.1 and TLSv1.0 2019-11-08 10:04:58 -08:00
e329431bc1 Merge pull request #2572 from kaleb-himes/GH2559
Address logical fallacies and syntax issues in example server, addres…
2019-11-08 10:18:12 -07:00
1d02943658 Sanity check in wc_scrypt for invalid params <= 0 2019-11-08 09:40:07 -07:00
c69b6fb6d1 wolfSSL ABI
1. Add a blank #define WOLFSSL_ABI to tag functions as part of the ABI
to remind developers there are rules about those functions specifically.
2. Added allocators and deallocators for WC_RNG objects and ecc_key
objects so they don't have to be used on the stack.
3. Add tests for the new allocators.
2019-11-07 13:03:12 -08:00
f0d3d5d71c 80-character per-line coding standard format fix 2019-11-07 13:33:38 -07:00
95796c80b7 Add prototype for ebsnet_fseek
Customer confirmed prototype was not present in vfile.h, added prototype to wolfSSL header.
2019-11-07 13:31:02 -07:00
5ce88b5086 seperate sanity checks on size and rnd allocation 2019-11-07 13:12:17 -07:00
fd3e4abb46 handle case to avoid memcpy when staticmemory IO pool gives same buffer 2019-11-07 11:36:20 -07:00
ad192786b1 Remove double assignment to pt caught by scan-build test 2019-11-07 11:35:36 -07:00
e24059691c Address logical fallacies and syntax issues in example server, addresses GH issue #2559 2019-11-07 10:30:12 -07:00
c06efb6c1f Ensure space for name string. Reset policy count.
Only set the name string in one place, keeping a length of the name type
to copy. Also only move cert data index once.
Reset certificate extension policy number/count in case of malicious
cert with multiple policy extensions.
2019-11-07 13:51:50 +10:00
0fe5d40507 Merge pull request #2568 from aaronjense/iar-build-fix
Fix changed sign warning for IAR build
2019-11-06 15:47:15 -08:00
caaab11f60 Update from review 2019-11-06 15:58:50 -06:00
b2270a068f Merge pull request #2566 from SparkiDev/malloc_unused_fix
Fix unused parameter when XMALLOC doesn't use params
2019-11-06 13:08:48 -08:00
c137c5a3e0 Merge pull request #2565 from SparkiDev/rsa_kg_sp_math
SP Math and RSA Key Gen working again
2019-11-06 13:08:19 -08:00
1becdb9f3b Merge pull request #2563 from SparkiDev/x509_dname_index
Check domain name location index hasn't exceed maximum before setting
2019-11-06 13:07:42 -08:00
c995417d54 Merge pull request #2554 from SparkiDev/sp_misrac
MISRA-C changes to SP plus cppcheck fixes
2019-11-06 13:06:28 -08:00
15d4da1e14 Merge pull request #2562 from JacobBarthelmeh/staticmemory
fix for memory management on edge case with staticmemory
2019-11-06 13:04:33 -08:00
ba34b0d09f Merge pull request #2547 from SparkiDev/rsa_pss_salt_len
Compile options for larger salt lengths in RSA-PSS
2019-11-06 13:03:15 -08:00
969488434a Merge pull request #2544 from JacobBarthelmeh/SanityChecks
add null checks (QSH and CRYPTOCELL)
2019-11-06 12:18:00 -08:00
ea77cd743e Fix changed sign warning for IAR build 2019-11-06 09:59:31 -08:00
cd7001904a Merge pull request #2561 from ejohnstown/x509-loss
X.509 and Secure Renegotiation
2019-11-06 10:53:18 -07:00
d4ca48a513 Fix unused parameter when XMALLOC doesn't use params 2019-11-06 15:46:19 +10:00
65cd8a930e SP Math and RSA Key Gen working again 2019-11-06 15:24:12 +10:00
a6e4926d2f Init variables 2019-11-05 15:14:47 -08:00
d2c4798459 Modify linked list traversal - fix for compiler bug
KeyShare and PreSharedKey traverse linked list using a handle.
Customer reported their compiler couldn't handle the assignment, so,
using a temporary.
2019-11-06 08:57:33 +10:00
77c36b5ea9 Merge pull request #2542 from kojo1/BasicConst
x.509 basic constratint
2019-11-05 15:38:07 -07:00
52f28bd514 Check domain name location index hasn't exceed maximum before setting 2019-11-06 08:31:04 +10:00
890eb415b1 fix for memory management on edge case with staticmemory 2019-11-05 15:13:26 -07:00
165105af95 Merge pull request #2558 from danielinux/pwbased-no-asn
Allow pwdbased module to compile without ASN
2019-11-05 13:26:45 -08:00
e48cf88a70 Merge pull request #2556 from embhorn/arm-test-fix
Fix for ARM platforms
2019-11-05 12:25:56 -08:00
c337ce2703 Merge pull request #2560 from cconlon/cavppss
use wc_RsaPSS_CheckPadding() for selftest build instead of extended
2019-11-05 12:09:25 -08:00
72e1afbe99 X.509 and Secure Renegotiation
1. When retaining the handshake resources for a session using resumption, do not delete the peer's certificate. If keeping peer certificates is enabled, the certificate needs to exist so it may be examined.
2. Free the saved peer certificate when receiving a peer certificate during a renegotiation.
2019-11-05 11:03:34 -08:00
e429558166 use wc_RsaPSS_CheckPadding() for selftest build instead of extended 2019-11-05 10:48:36 -07:00
51ea806d8b Allow pwdbased module to compile without ASN 2019-11-05 10:16:46 +01:00
1361e4dbef remove extra setting of ecc key size with CRYPTOCELL build 2019-11-04 23:25:47 -07:00
e2b7bee9c8 Merge pull request #2533 from cariepointer/apache_bio_want_read
Apache: Return WANT_READ in wolfSSLReceive if BIO retry and read flags are set
2019-11-04 16:52:28 -08:00
32f93be0b6 Replace magic PSS salt length numbers with enums 2019-11-05 09:03:30 +10:00
5141623f48 Merge pull request #2548 from SparkiDev/rsa_check
Add more checks of RSA key
2019-11-04 13:05:35 -08:00
28da0075d1 Merge pull request #2545 from SparkiDev/scrypt_iters
Add scrypt API that takes iterations rather than cost
2019-11-04 13:01:32 -08:00
b723acf0f6 Merge pull request #2534 from SparkiDev/pss_1024_sha512_tls12
Pass the length of the RSA key in bits to PSS padding check in TLS
2019-11-04 11:42:55 -08:00
f4afa4bc87 Merge pull request #2540 from SparkiDev/etm_rehand
Fix Encrypt-Then-MAC when rehandshaking
2019-11-04 11:41:44 -08:00
16899b55b2 Fix for ARM platforms 2019-11-04 11:54:36 -06:00
e2fb359538 Merge pull request #2549 from JacobBarthelmeh/Testing
fix for macro typo's
2019-11-04 08:05:09 -08:00
683658de20 Merge pull request #2553 from miyazakh/fix_esp_buildfail
fix esp build failure
2019-11-04 07:44:01 -08:00
f590f6522d MISRA-C changes to SP plus cppcheck fixes 2019-11-04 16:13:48 +10:00
35ec2bc6d4 Compile options for larger salt lengths in RSA-PSS
Salt length larger than the hash size allowed in RSA-PSS.
Passing -2 to PSS pad function uses maximum salt length.
Passing -2 to PSS un-pad function makes it discover salt length.
2019-11-04 14:27:02 +10:00
0c8ab5b0e4 fix esp build failure 2019-11-03 12:19:59 +09:00
76404c937e #ifdef guard 2019-11-02 13:01:40 +09:00
2084006b61 Merge pull request #2550 from cconlon/mmcau
fix mmCAU classic XFREE on aligned ptr
2019-11-01 15:59:57 -07:00
ffb80126ff Implement porting efforts from ZD5241 and ZD5815 2019-11-01 16:00:06 -06:00
6ba3aa88ca fix for build after CI tests 2019-11-01 14:47:50 -06:00
98a2322dd9 Merge pull request #2525 from tmael/open_coexist
Raise an error when opensslcoexist option is used with openssl[all][extra]
2019-11-01 11:32:46 -06:00
e07e07f831 Merge pull request #2537 from JacobBarthelmeh/PKCS7
fix for pkcs7 verify streaming
2019-11-01 10:15:44 -06:00
be2cb302ea fix mmCAU classic XFREE on aligned ptr 2019-11-01 09:56:28 -06:00
54f023ac2c Clarify ipasc parameter usage 2019-11-01 10:33:49 -05:00
efca350cba fix for macro typo's 2019-11-01 09:21:21 -06:00
54c7619f81 Add more checks of RSA key
Check d is in valid range, p*q == n, and dP, dQ and u are valid.
2019-11-01 16:25:57 +10:00
7623777857 Add scrypt API that takes iterations rather than cost
iterations = 1 << cost but matches APIs in other products and standard
2019-11-01 10:15:42 +10:00
6839110507 Update from review 2019-10-31 17:45:33 -05:00
9e852b3867 Merge pull request #2539 from dgarske/mutex_ref
Fixes for cases where mutex was not being free'd
2019-10-31 13:10:04 -07:00
b27c1df348 Merge pull request #2538 from SparkiDev/cppcheck_fixes_2
Fixes for errors using cppcheck
2019-10-31 13:08:19 -07:00
ac76b4b692 Merge pull request #2541 from SparkiDev/x25519_gcc_avx2
Fix loading and setting using RIP register with GCC
2019-10-31 13:07:27 -07:00
626e0efd99 Merge pull request #2530 from SparkiDev/pkcs11_tls_client
Use the public key type as private key type with PKCS #11
2019-10-31 13:06:32 -07:00
fca0705a0b Merge pull request #2526 from aaronjense/libwebsockets-build-fix
libwebsockets build fixes
2019-10-31 13:05:46 -07:00
550fbcfff7 add null checks (QSH and CRYPTOCELL) 2019-10-31 10:07:47 -06:00
58d800fbb7 Adding support for IP address verification 2019-10-31 09:15:22 -05:00
9fc33e461c Check names in verify callback. 2019-10-31 09:15:22 -05:00
2ef4d1a16e Keep else to GetBoolean 2019-10-31 17:29:46 +09:00
4f602e02ba accept ASN_INTEGER for compatibility 2019-10-31 12:06:59 +09:00
adff4e719a Fix loading and setting using RIP register with GCC 2019-10-31 12:14:05 +10:00
4be36ef2bd Fix Encrypt-Then-MAC when rehandshaking
New, encrypted handshakes change over to ETM correctly now.
2019-10-31 09:14:42 +10:00
28d466cb10 Fix to ensure 4-byte alignment is default for MMCAU with SHA1, SHA256 and MD5. 2019-10-30 13:34:57 -07:00
760a90ef5d Fixes for cases where mutex is not being free'd. 2019-10-30 10:11:06 -07:00
c354b240f2 Fixes for errors using cppcheck 2019-10-30 14:48:21 +10:00
a0955f8221 fix for pkcs7 verify streaming 2019-10-29 16:47:30 -06:00
7f42b71571 Fix NXP MMCAU when data pointer is not aligned. 2019-10-29 13:45:25 -07:00
6bc16a4acb Merge pull request #2532 from aaronjense/mp-public-defines
Fix for configure used in wolfssl-examples/signature/rsa_vfy_only.…
2019-10-29 08:46:03 -07:00
eb03e5de1e Pass the length of the RSA key in bits to PSS padding check in TLS 2019-10-29 11:56:35 +10:00
e8db4cc2a0 Apache: Return WANT_READ in wolfSSLReceive if BIO retry and read flags are set 2019-10-28 15:08:00 -07:00
140796d2aa Merge pull request #2504 from ejohnstown/sync-octeon
Synchronous OCTEON Sniffer Support
2019-10-28 12:25:57 -07:00
0aeb87f284 Merge pull request #2529 from SparkiDev/etm_max
Fix check for plaintext length when using Encrypt-Then-MAC
2019-10-28 11:59:32 -07:00
51e8abf126 Merge pull request #2531 from SparkiDev/nginx_unittest
Fix unittest to pass when compiling for NGINX
2019-10-28 11:27:22 -07:00
34c37c58f4 Fixes for configure used in wolfssl-examples/signature/rsa_vfy_only and fix for wrong WOLFSSL_MP_PUBLIC defines.
./configure CFLAGS=-DWOLFSSL_PUBLIC_MP --disable-asn --disable-filesystem --enable-static --enable-shared --enable-cryptonly --enable-sp=smallrsa2048 --enable-sp-math --disable-dh --disable-ecc --disable-sha224 --enable-rsavfy
2019-10-28 09:50:59 -06:00
8a92e1eae6 Fix check for plaintext length when using Encrypt-Then-MAC 2019-10-28 16:28:52 +10:00
ad9522c765 Add WOLFSSL_OLDTLS_AEAD_CIPHERSUITES to allow AEAD cipher suites in TLSv1.0 and TLSv1.1 2019-10-25 09:51:11 -07:00
b80b10b980 Merge pull request #2498 from danielinux/stm32wb55
Support for STM32_PKA accelerator
2019-10-24 15:41:08 -07:00
9f34826173 stm32_pka: fixed remarks from code review 2019-10-24 21:48:35 +02:00
390b936331 stm32_pka: using XMEMCPY 2019-10-24 20:49:43 +02:00
f97452c859 STM32_PKA: using XMEMSET 2019-10-24 20:46:03 +02:00
025754e774 Fixed alignment/padding for hash. ECC tests passing on target. 2019-10-24 20:32:47 +02:00
17f44d4d29 OCTEON Sync
1. Add attributes to the OCTEON functions so they aren't optimized.
2. Disable the same test cases for OCTEON as we do QAT in sync.
2019-10-24 10:00:20 -07:00
3ac4aa5a9b Merge pull request #2524 from cconlon/cau_iar
mmCAU Classic AES key alignment, IAR warnings fixes
2019-10-24 09:23:20 -07:00
3677e4d735 [stm32hal-pka] Fixed after reviews, fix result allocation for sign/mulmod 2019-10-24 16:06:38 +02:00
0b93109b3a throw error when opensslcoexist configured with opensslall or opensslextra 2019-10-23 15:51:19 -07:00
400dcfebba Merge pull request #2516 from danielinux/freescale-ltc-spmath
Fixed Freescale LTC crypto module to compile with SP math
2019-10-23 15:11:43 -07:00
28cc7daa68 Merge pull request #2511 from tmael/BN_bn2hex
Fix for hex digits with fastmath and normal integer
2019-10-23 15:10:40 -07:00
954d1ad13e Sniffer Update
1. Add ssl_SetWatchKeyCallback_ex() which was missing.
2. Fix linking issue with OCTEON libraries.
2019-10-23 15:03:50 -07:00
cb7b4af986 Merge pull request #2523 from JacobBarthelmeh/SanityChecks
fix for selftest build
2019-10-23 15:24:16 -06:00
4135850a32 Merge pull request #2522 from dgarske/rel_async_4.2.0
Fixes for building with async (rel v4.2.0 prep)
2019-10-23 14:33:00 -06:00
5b9e005802 fix for selftest build 2019-10-23 12:09:20 -06:00
b8f4b1a712 QAT Header Hiding
For the sync QAT, the QAT headers are included into the library after it
has been built and is being used. The actual headers should only be used
when building wolfSSL and should be hidden from the user.
1. Most of the functions in the sync QAT and OCTEON headers don't need
to be exported. Move all of that into the source files. Only export the
init and deinit functions.
2. Remove inline from the OCTEON support functions.
3. Remove the AES-ECB files for sync OCTEON as unused.
4. Configure defaults to OCTEON2 build, can be overridden with variable.
2019-10-23 09:58:11 -07:00
1ad23334bf Sync Sniffer API Cleanup
1. Switched the IntelQa sync API back to local.
2. Added two functions to setup and cleanup the IntelQA device.
3. Changed the Octeon functions to match the IntelQa functions.
4. Updated sniffer, wolfcryptest, and benchmark.
2019-10-23 09:58:11 -07:00
b0dafbcd1b Sync Octeon Sniffer
Added back some changes from a dropped commit.
1. The Octeon README should be a stub.
2. Changed the license notice in the octeon sync files back to GPLv2.
3. Added a flag to Aes that needed a build guard around it.
4. Replaced the disable for sniffer session stats.
2019-10-23 09:58:11 -07:00
54f0b1a44a Sync QAT Fixes
1. The QAT callback's worker functions need to copy the IV into the AES IV register. QAT doesn't update it automatically.
2. Update the GMAC test to set its device to INVALID_DEVID.
3. Always allocate NUMA buffers before running crypto operation and store the results.
4. The QAT does not like non-multiple of 4 iv lenths, and aad lengths. Or 0. Remove a few test cases for those.
5. QAT wasn't getting a pointer to store the auth tag for GCM. Then store it.
2019-10-23 09:58:11 -07:00
825f311959 add OCTEON and QAT to wolfCrypt test, update SHA-1 to reset ret when it will do the software sha 2019-10-23 09:58:10 -07:00
41e0712eb0 Synchronous Cavium OCTEON Support for Sniffer
1. Fixes for AES-GCM.
2019-10-23 09:58:10 -07:00
67b11b8ece Fixing some play-nice between sync QAT and sync Octeon. 2019-10-23 09:58:10 -07:00
989c964a95 Synchronous Cavium OCTEON Support for Sniffer
1. Add configure option for sync IntelQA that uses the crypto callback API.
2. Make a synchonous copy of the quickassist files.
3. Tie in the crypto device to the sniffer.
4. When making a sniffer build, define static DH enabled.
5. The readme files in the Cavium were being added to the distro optionally, changed to always add the readme files.
6. Added an include of the cavium_octeon header in the wc_ports.c.
7. Updated the Cavium OCTEON callback for AES-GCM.
8. Add the global tag to the list of crypto callback function pointers.
9. Add an accessor to the OCTEON crypto callback module to return the device ID of the OCTEON device.
10. Add a new version of ssl_SetWatchKeyCallback which takes an additional parameter of a device ID. This ID is used to set up the wolfSSL_CTXs in the sniffer session trackers.
11. Update the benchmark to use sync OCTEON and QAT.
2019-10-23 09:58:10 -07:00
7386bd4df1 Fixes for building with ./configure --enable-asynccrypt --enable-all CFLAGS="-DWC_ASYNC_NO_CRYPT" 2019-10-22 13:37:16 -07:00
48c4b2fedc Merge pull request #2521 from JacobBarthelmeh/Release
prepare for release version 4.2.0
2019-10-22 09:12:33 -07:00
8ce3b3a5e6 Use the public key type as private key type with PKCS #11 2019-10-22 10:34:44 +10:00
a3c09f6794 Fix unittest to pass when compiling for NGINX 2019-10-22 08:47:49 +10:00
1cbc2536cc prepare for release version 4.2.0 2019-10-21 16:32:41 -06:00
32f537cb6c wrap time_t requirement in ssl.h by openssl extra build to fix sgx build 2019-10-21 16:29:31 -06:00
497818525a check on keygen for make rsa key function 2019-10-21 14:54:17 -06:00
9b8f1dadd0 Merge pull request #2520 from JacobBarthelmeh/Testing
Testing
2019-10-21 12:20:53 -07:00
eaa8f2a957 libwebsockets build fixes
1. Add --enable-libwebsockets option
2. Add OPENSSL_NO_EC (used in libwebsockets)
3. Add SSL_MODE_RELEASE_BUFFERS and debug message for when wolfSSL_CTX_set_mode doesn't recognize a mode.
2019-10-21 12:03:18 -06:00
132877ea0b Merge pull request #2519 from ejohnstown/dtls-fips-fix
Fix DTLS+OPENSSLALL+FIPS Failure
2019-10-21 10:00:23 -07:00
09a0859865 fix for fortress and no sha build with encrypted keys 2019-10-21 09:37:24 -06:00
e24787c8e4 add ecc header for fp_ecc cache free 2019-10-21 09:21:46 -06:00
ea45da5fa8 change add_all_* to be evp table init and fix valgrind report 2019-10-20 01:13:43 -06:00
26793359a2 Fix DTLS+OPENSSLALL+FIPS Failure
There was a problem with the combination of DTLS, OpenSSL Compatibility,
and FIPSv2 where the DTLS server would fail out because a HMAC key was
too short. FIPS requires a HMAC key be a minimum size. The DTLS server
uses HMAC to generate the first cookie key when initialized. When using
OpenSSL, the feature for creating a DTLS endpoint with its side being
set late is tested. The DTLS cookie wasn't getting set at init because
the server was "neither" at the time. Added a call to set cookie when
initializing a neither endpoint into a server.
2019-10-18 16:30:27 -07:00
42ddd63952 exclude packed __attribute__ on IAR ICC < 9 2019-10-18 16:33:01 -06:00
c18ff36959 fix uninitialized variable warning in IAR-EWARM 7.50.2 2019-10-18 14:08:23 -06:00
c4afbb3685 align AES key if needed when using MMCAU classic 2019-10-18 14:02:43 -06:00
0eefa80d74 initialize max pathlen to preserve ASN no signer error 2019-10-18 11:30:08 -06:00
a0a572cf3e fix sha256 build on armv8 2019-10-18 11:04:45 -06:00
0e73af8b88 Merge pull request #2515 from JacobBarthelmeh/Testing
Initial pass on test cycle
2019-10-17 16:02:17 -07:00
7135e9e500 Merge pull request #2517 from dgarske/x509_date
Fix to restore notBefore/notAfter functions
2019-10-17 16:59:20 -06:00
fb8d2d4b2f Fix to restore notBefore/notAfter functions that were removed in PR #2462. These are not openssl compatibility functions, but are used by JSSE. 2019-10-17 13:02:00 -07:00
78e1336598 Merge pull request #2514 from dgarske/fix_async_next_iv
Various fixes for asynchronous mode
2019-10-16 13:52:47 -07:00
b7d4c9f839 fix build with no server and enable all 2019-10-16 14:19:50 -06:00
f41f67d231 Fixed Freescale LTC crypto module to compile with SP math 2019-10-16 15:44:58 +02:00
b4a3ad6e2d fix test case for enckeys + des3 with md5 disabled 2019-10-15 17:07:05 -06:00
acd0a55d47 add new certs to extra dist 2019-10-15 14:23:01 -06:00
1267987c31 Review comment 2019-10-15 12:24:57 -07:00
1a18e3bba8 Add leading zero padding for odd hex ASCII digits 2019-10-15 11:54:58 -07:00
5c07391f1b Various fixes for asynchronous mode:
* Fix for AES CBC issue with IV (QAT only).
* Fix for test cases with QAT.
* Remove poorly placed debug for AES CFB.
2019-10-15 11:18:55 -07:00
928eb36b5e Merge pull request #2513 from JacobBarthelmeh/UnitTests
update external test certificate
2019-10-15 11:18:01 -07:00
63e74554a8 fix for warning when using c++ compiler 2019-10-15 10:07:02 -07:00
bb6eeefe26 fix for build with --enable-all and gcc-9 on Linux 2019-10-15 09:56:26 -07:00
4bde06fbe3 fix for pkcs11 found running build_test.pl script 2019-10-15 10:25:46 -06:00
b27504b222 update external test certificate 2019-10-15 10:11:38 -06:00
441f3a7f1f Add leading zero for odd number of hex digits 2019-10-14 16:43:45 -07:00
95c036a08a static analysis tests for memory management 2019-10-14 17:17:46 -06:00
d30e4ac74f Merge pull request #2499 from ejohnstown/sniffer-features
Sniffer Features
2019-10-14 15:35:55 -07:00
c3e99e1394 Merge pull request #2510 from tmael/bio_base64
Fix a return value from wolfSSL_BIO_BASE64_write()
2019-10-14 15:44:14 -06:00
f0dfe5355b Sniffer for IPv6
1. Better length checking on the IPv6 extension headers.
2. Removed the default size update analogous to the IPv4 header check
function. It cannot ever be 0, so the update was unnecessary.
2019-10-14 10:17:37 -07:00
df77088d5c Merge pull request #2461 from kaleb-himes/ZD_5541_PathLenConstraint
addressing non RFC compliance in handling of pathLen constraint
2019-10-14 09:41:09 -07:00
9560b905af Merge pull request #2509 from cconlon/selftest_version
Add CAVP selftest version API prototype
2019-10-14 09:23:16 -07:00
2c3e4a2d18 Merge pull request #2508 from ejohnstown/dtls-fix
DTLS Redundant Check
2019-10-13 10:05:44 -07:00
afb1c5f252 Merge pull request #2431 from JacobBarthelmeh/coldfire
M68K (coldfire MCF5441X) wolfcrypt build and examples
2019-10-13 09:16:03 -07:00
f2a3da94b6 refactor some openssl extra functions for cryptonly use 2019-10-11 16:40:08 -06:00
54b6148259 Add comment 2019-10-11 15:19:02 -07:00
ccc500e13f Correct return value from wolfSSL_BIO_BASE64_write() 2019-10-11 14:52:53 -07:00
9357db4d0c check value of ret in test cases 2019-10-11 15:27:15 -06:00
306b280ccd Add test cases and implement peer suggestions
Fix failing jenkins test cases

Add detection for file size with static memory

Account for cert without pathLen constraint set including test cases

Resolve OCSP case and test where cert->pathLen expected to be NULL
2019-10-11 15:03:38 -06:00
d7fe000cfe M68K (coldfire MCF5441X) wolfcrypt build and examples
fix for make dist and cleanup makefile

add aes file to Makefile

macro guards and entropy warning

add AES to build
2019-10-11 14:56:34 -06:00
fd6328aa8e adjust NETBSD selftest tag in fips-check.sh for CAVP version API 2019-10-11 14:29:41 -06:00
2c6c88266b add prototype for wolfCrypt CAVP version in selftest.h 2019-10-11 14:18:04 -06:00
cd934a95a4 Merge pull request #2445 from JacobBarthelmeh/SanityChecks
sanity check on resulting ecc size
2019-10-11 10:53:20 -07:00
9c5fd165d0 addressing non RFC compliance in handling of pathLen constraint 2019-10-10 16:45:29 -06:00
774c0c5c3c Remove a redundant sequence number check for epoch 0. 2019-10-10 14:21:14 -07:00
fabc6596b3 Merge pull request #2369 from JacobBarthelmeh/Testing
fix for inject clear alert from client test case
2019-10-10 13:25:51 -07:00
d781734b55 Merge pull request #2507 from cariepointer/apache_updates
Apache updates
2019-10-10 12:45:01 -07:00
65d1c3b8ce Merge pull request #2506 from tmael/bio_mem_base64
Fix for BIO and base64 encoding/decoding
2019-10-10 13:41:38 -06:00
1d7f0de5b5 Fixes from review, adds some error checking, and adds const variables 2019-10-10 09:13:35 -07:00
4fa2b71848 Minor changes requested from review 2019-10-09 15:38:26 -07:00
af8968ee5e Add REQUIRES_AEAD and move functionallity for checking AEAD ciphers to CipherRequires() 2019-10-09 14:37:39 -07:00
d137cab427 Update in XSTRCAT call 2019-10-09 13:12:34 -07:00
2312d0e125 Dynamically allocate buffer in wolfSSL_X509V3_EXT_print 2019-10-09 12:54:23 -07:00
e22563ed00 BIO chain test 2019-10-09 11:38:07 -07:00
d89f9ddc42 Update X509V3_EXT_print for different extension types 2019-10-09 11:10:27 -07:00
5adcee9f2c Update testsuite to expect ADH-AES256-GCM-SHA384 to fail with TLSv1.0 and TLSv1.1 2019-10-09 08:36:47 -07:00
99209d78a3 STM32 PKA: added include statement 2019-10-09 13:19:57 +02:00
0dfc64678c STM32 PKA: added function prototype 2019-10-09 13:15:56 +02:00
3465a487d3 STM32 PKA fix: remove reverse array operations 2019-10-09 10:22:04 +02:00
89db0da0aa Synchronous Quick Assist Support for Sniffer
1. Fixed a compiler warnings.
2. Fixed a memory issue when using the storage callback with QAT.
2019-10-08 16:49:38 -07:00
b7fe49c8b4 NULL terminate a character sequence 2019-10-08 15:42:39 -07:00
a84fbeae6b Fix for a memory BIO and handle BIO chains 2019-10-08 12:26:54 -07:00
ff15b3cfaa better display of the IPv6 addresses in the sniffer 2019-10-08 11:34:36 -07:00
136bc45857 Update wolfSSL_X509_NAME_print_ex for printing X509_NAME in reverse order 2019-10-07 11:36:00 -07:00
98b8cd35d8 Add ALT_NAMES_OID to switch in wolfSSL_X509_set_ext and update X509V3_EXT_print 2019-10-07 11:29:35 -07:00
b247b4565c Fixes for build warnings with apache httpd 2019-10-07 11:15:55 -07:00
df22115920 Return error with AES-GCM and negotiated versions < TLSv1.2 2019-10-07 08:28:00 -07:00
625bd121f2 Merge pull request #2495 from JacobBarthelmeh/staticmemory
check on if free'ing ctx/method back to heap hint
2019-10-07 08:10:05 -07:00
8ec90339d9 Change the sniffer testsuite to do the IPv6 test when the "-6" option is
on the command line.
2019-10-05 19:26:41 -07:00
f025f08315 Sniffer touches for Windows. 2019-10-04 17:06:35 -07:00
a467c75390 Change the GPL version back to v2 for the quickassist_sync files. 2019-10-04 14:56:42 -07:00
b6b57154e5 Add the new IPv6 sniffer test file to the automake list. 2019-10-04 14:54:17 -07:00
89ff909d73 Sniffer IPv6
1. Sorted out IPv6 configuration for sniff test.
2. Tests the sniffer using an IPv6 file.
2019-10-04 14:54:17 -07:00
ebd435ae46 skip IPv6 extended headers 2019-10-04 14:54:17 -07:00
a5bfb8a18b Change the IP address wrappers to include the version. Makes comparing
easier. Hard-coded some IPv6 localhost tests.
2019-10-04 14:54:17 -07:00
d1d2eb0edd Add IPv6 to the sniffer. 2019-10-04 14:54:17 -07:00
8b21082abe Use wrapper macros for all touches of the sniffer statistics mutex. 2019-10-04 14:54:17 -07:00
1b057df610 When enabling SHOW_SECRETS one of the array counter variables for a
secret had a type mismatch. Changed the index to a word32 to match the
boundary variable's type.
2019-10-04 14:54:17 -07:00
841e469340 Convert the data the snifftest is about to print into printable text.
Anything that isprint() or isspace() is kept, anything else is changed
to a period.
2019-10-04 14:54:17 -07:00
725243b132 Changed how the sniffer calculates the sslFrame size, sslBytes, and the
end of packet pointer. The end of packet pointer is based on sslFrame
and sslBytes. sslBytes is calculated from the total length in the IP
header, rather than the caplen. The caplen may include things like
Ethernet's FCS, which throws packet processing off.
2019-10-04 14:54:17 -07:00
b2fb6d1a81 Move some stats captures to a different location. 2019-10-04 14:54:17 -07:00
3256fef7f9 Sniffer Chain Buffers
1. Fixed an issue when a TLS record is split across two chain buffers.
The second buffer was being treated as a new record.
2. Fixed an issue with STARTTLS_ALLOWED where the input buffer isn't
getting cleared and the skipped data just builds up blocking TLS
records.
2019-10-04 14:54:17 -07:00
53c7f864b2 Add midding function prototype. 2019-10-04 14:54:17 -07:00
b6ca72549c Sniffer Fixes
Added a flag to disable the normally enabled session stats, WOLFSSL_NO_SESSION_STATS.
2019-10-04 14:54:17 -07:00
dea5e73852 Sniffer Chain Input
Add a new method for handling input records where the input is in the form of an iovec list.
2019-10-04 14:54:17 -07:00
62ac388f55 Store Data Callback
Added a callback and support to allow one to handle storing the data
directly without reallocating the data buffer. Also added an example
that uses this callback if the callback is enabled in the build.
2019-10-04 14:54:17 -07:00
98e94a6f0f Added a preprocessor guard around ssl_GetSessionStats(). 2019-10-04 14:54:17 -07:00
a0ad39cf70 Sniffer Stats
Moved the increment of the resume misses statistic.
2019-10-04 14:54:17 -07:00
73273f4fec Sniffer Memory
1. Modify the sniffer code to use XMALLOC and XFREE.
2. Added some new dynamic memory types for the sniffer.
2019-10-04 14:54:17 -07:00
0e1073f622 Sniffer Statistics
Addded two more statistics, cache hits and cache inserts.
2019-10-04 14:54:17 -07:00
4292936efc wolfSSL Global
1. Renamed the global variable tag to WOLFSSL_GLOBAL.
2. Tagged several more global variables with WOLFSSL_GLOBAL.
2019-10-04 14:54:17 -07:00
bbc208ad33 Updated some more globals in the sniffer and session cache with being shared. 2019-10-04 14:54:17 -07:00
a991cc42f4 Add function wolfSSL_get_cipher_name_iana_from_suite() a wrapper around
internal API GetCipherNameIana().
2019-10-04 14:54:17 -07:00
87a8447f0d 1. Added a tag for global variables in environments where they aren't
shared across threads by default.
2. Set the Trace file and flag up with the shared flag.
2019-10-04 14:54:17 -07:00
743a6ab829 Update the decrypted packet and byte counts. 2019-10-04 14:54:17 -07:00
dd9635d8ff Merge pull request #2469 from embhorn/sk_types
Sk types
2019-10-04 14:44:25 -07:00
30829cec09 Merge pull request #2482 from SparkiDev/cppcheck_fixes_1
Fixes from using cppcheck tool
2019-10-04 14:39:31 -07:00
b213a962e9 Merge pull request #2493 from ejohnstown/sync-qat
Synchronous Quick Assist Support for Sniffer
2019-10-04 11:45:08 -07:00
c26a7ccb68 Fix copy-paste from LTE module 2019-10-04 20:37:38 +02:00
52bf19eefd Added initial support for STM32_PKA ECC accelerator 2019-10-04 20:15:33 +02:00
0d43c1f3d7 Merge pull request #2488 from aaronjense/openssh-fixes
Fix defines that aren't in configure.ac
2019-10-04 10:35:07 -07:00
d48e904c16 Merge pull request #2496 from embhorn/test_ASN1_INTEGER_set
Add conditional check to test_wolfSSL_ASN1_INTEGER_set test case failing for 32-bit platform
2019-10-04 10:33:37 -07:00
48d872187d Synchronous Quick Assist Support for Sniffer
1. Add a HardwareStop for the QAT sync build in wolfCrypt_Cleanup();
2019-10-04 09:01:59 -07:00
a258b84018 Merge pull request #2497 from danielinux/openssl-cleanup
Fix include path issue for openssl compatibility for dh.h.
2019-10-04 08:23:37 -07:00
f47a9c8b20 Add conditional to 64-bit tests 2019-10-04 09:41:48 -05:00
3183ccc0c8 x509.h: include the correct header 2019-10-04 15:04:35 +02:00
5f1dcc3b0c Removed inclusion of openSSL header 2019-10-04 10:22:38 +02:00
82fc96b7f3 adjust onHeap to be a bit field 2019-10-04 08:44:00 +07:00
197b22973b Merge pull request #2490 from dgarske/riscv
Consolidate RISC-V examples and fix `make dist` file error
2019-10-03 15:08:49 -07:00
12bf46296e Consolidate RISC-V examples. Fix make dist file error. 2019-10-03 11:08:50 -07:00
f5a4b82302 Merge pull request #2492 from ejohnstown/titan-cache
Titan Session Cache
2019-10-03 09:52:51 -07:00
177bab84e5 Synchronous Quick Assist Support for Sniffer
1. Add missing deinitializers for the QAT as the sniffer exits.
2019-10-03 09:15:50 -07:00
df2c27af32 check on if free'ing ctx/method back to heap hint 2019-10-03 08:39:18 -07:00
c0a4143942 Titan Session Cache
1. Added a new build option for a TITAN session cache that can hold just over 2 million session entires.
2. Reordered the cache options from largest to smallest.
2019-10-02 14:36:38 -07:00
3b989329cd Merge pull request #2491 from aaronjense/fix-shadow-ret
Fix shadow redeclaration
2019-10-02 12:17:35 -07:00
9a5eb1bb67 Synchronous Quick Assist Support for Sniffer
1. Add configure option for sync IntelQA that uses the crypto callback API.
2. Refactor the IntelQA configure checks so they are usable by both the sync and async options.
3. Make a synchonous copy of the quickassist files.
4. Replace the printfs in the code with a logging macro.
5. Added padding to the AES_KEY structure for WOLF_CRYPTO_CB.
6. Tie in the crypto device to the sniffer.
7. When setting up the symmetric operation, add a build case for the sniffer to use malloc instead of realloc. Sniffer usually uses the middle of another buffer for the input data rather than the beginning of the buffer as it has the TCP/IP data to handle as well.
8. Add the raw key to the DES3 structure.
9. Copy the functions from qa_mem over to qa_sync.
2019-10-02 10:08:46 -07:00
0340b323cd Fix shadow redeclaration 2019-10-02 09:41:06 -06:00
91222bc887 Fix defines that aren't in configure.ac 2019-10-02 09:14:47 -06:00
43e391528d Merge pull request #2489 from ejohnstown/sniffer-etm
Sniffer and Encrypt-Then-Mac
2019-10-02 08:05:25 -07:00
ca817c50aa Merge pull request #2481 from dgarske/nxp_mmcau
Improvements to SHA-1, SHA-256 and MD5 performance
2019-10-01 15:16:50 -06:00
7261ed8b6f Sniffer and Encrypt-Then-Mac
The sniffer doesn't know how to deal with ETM. If the sniffer is enabled, disble ETM.
2019-10-01 13:00:55 -07:00
901ee627fc Fixes from using cppcheck tool
Various fixes for uninitialized variable use.
sniffer.c: close file when seek fails
tls.c: fix QSH_GET_SIZE macro
wolfio.c: uIPGenerateCookie: use the parameter, _ctx, instead of self
referencing.
wolfssl_adds.c: check for equivalent to XBADFILE to indicate error.
SP: change right shift of signed value to unsigned
sp_int.h: define 128-bit types
types.h: change a XMALLOC define to not use (,,) - cppcheck doesn't like
it and is unnecessary.
2019-10-01 09:22:00 +10:00
ea68e146c7 Merge pull request #2487 from JacobBarthelmeh/Fuzzer
fix for infinite loop with CSR2
2019-09-30 10:38:26 -07:00
caa5ba7551 Merge pull request #2411 from ejohnstown/wolfrand
wolfRand
2019-09-30 11:11:18 -06:00
056c374f85 Merge pull request #2486 from miyazakh/update_tisp_readme
update tsip porting readme
2019-09-30 10:07:46 -06:00
e7c2892579 fix for infinite loop with CSR2 2019-09-30 21:32:25 +07:00
5486b535d1 update tsip readme 2019-09-29 17:09:08 +09:00
43476e80d4 Merge pull request #2462 from dgarske/webrtc
Support for Google WebRTC
2019-09-27 14:24:11 -07:00
ab4a78fdae Merge pull request #2485 from aaronjense/HAproxy-defines
Fix defines for HAProxy build
2019-09-27 14:37:42 -06:00
4c89a21d12 Updates from peer review. Refactor to combine some BIO elements into ptr. Revert change to BIO_set_fd. 2019-09-27 11:19:42 -07:00
b47039b7ec Fix for possible unused local32 warning. 2019-09-27 09:22:18 -07:00
bfa20c53b0 Fix defines for HAProxy build 2019-09-27 09:18:27 -06:00
937a344682 Merge pull request #2484 from SparkiDev/armv8-x18-redo
Refix stopping use of x18 register
2019-09-26 18:55:59 -07:00
5bcf54b9e2 Refix stopping use of x18 register 2019-09-27 09:41:54 +10:00
1f393c9dde Merge pull request #2483 from JacobBarthelmeh/BuildOptions
early data and enc-then-mac build fixes
2019-09-27 08:00:53 +10:00
78f6bbcdb8 Adjusted the alignement macro to use WC_HASH_DATA_ALIGNMENT for shared settings across hash algos. 2019-09-26 11:53:24 -07:00
6bfe6761d8 Disable the new hashing aligned build option by default. Does not increase performance... the memcpy is faster than the alignment check on modern CPU's. Embedded systems may benefit from this though, so leaving support for it in place. 2019-09-26 11:49:33 -07:00
4c709f1f2c Improvements to SHA-1, SHA-256 and MD5 performance:
* Added detection for buffer alignment to avoid memcpy.
* Added MD5 and SHA-1 support for XTRANSFORM_LEN to process blocks.
* Cleanups for consistency between algorithms and code commenting.
* Enhancement for NXP MMCAU to process more than one block at a time.
* Improved MMCAU performance: SHA-1 by 35%, SHA-256 by 20% and MD5 by 78%.

```
NXP K64 w/MMCAU after:

MD5                  8 MB took 1.000 seconds,    7.910 MB/s
SHA                  4 MB took 1.005 seconds,    3.644 MB/s
SHA-256              2 MB took 1.006 seconds,    2.306 MB/s

NXP K64 w/MMCAU before:
MD5                  4 MB took 1.004 seconds,    4.450 MB/s
SHA                  3 MB took 1.006 seconds,    2.670 MB/s
SHA-256              2 MB took 1.008 seconds,    1.913 MB/s
```
2019-09-26 11:32:59 -07:00
a1b324f7f8 Adding sk_free support for CONF_VALUE 2019-09-26 11:28:59 -05:00
9571f2fce8 Merge pull request #2447 from SparkiDev/sp_const
Change static globals to const where possible
2019-09-26 09:11:23 -07:00
34e0eb498a Fix for X509_set_subject_name and X509_set_issuer_name API unit test macro enables. 2019-09-26 08:42:35 -07:00
606b76d06e Fix for WPAS certificate size difference. Fix so BIO_METHOD is compatible. Moved BIO stuff into bio.h. 2019-09-26 08:42:35 -07:00
a5f9d38c0d Remove the BIO method custom... its not compat. Fix bio->ptr to be void*. 2019-09-26 08:42:35 -07:00
872d222b59 * Adds the following openssl compatibility API's:
- SSL_CIPHER_get_id
  - SSL_CIPHER_get_rfc_name
  - SSL_get_cipher_by_value
  - X509_print_ex
  - X509_NAME_add_entry_by_NID
  - X509_time_adj
  - X509_time_adj_ex
  - DTLSv1_get_timeout
  - DTLSv1_handle_timeout
  - DTLSv1_set_initial_timeout_duration
  - SSL_CTX_set_current_time_cb
  - PEM_write_bio_RSA_PUBKEY
  - PEM_read_bio_RSA_PUBKEY
  - PEM_write_bio_PUBKEY
  - EVP_PKEY_missing_parameters
  - EVP_PKEY_cmp
  - BN_is_negative
  - BIO_set_retry_write
* Improvements to the notBefore and notAfter date handling.
* Improvements to BIO and BIO_METHOD
  - Moved structure to public area to allow for dereferencing
  - Renamed members to provide compatibility.
  - Added support for custom BIO methods for read/write.
* Added advanced openssl compatibility test cases for key and certificate generation.
* Fix for `ASN1_STRING_set` to allow NULL data.
* Fix to populate public key information on `EVP_PKEY_assign_RSA` and `EVP_PKEY_assign_EC_KEY`.
* Fix naming for `X509_get_notBefore` and `X509_get_notAfter` functions.
* Added `wc_EccPublicKeyDerSize`.
* Improvements to `wc_RsaPublicKeyDerSize`, so dummy memory doesn't have to be allocated.
* Made the `wc_*PublicKeyDerSize` functions public.
* Eliminate use of snprintf for UTC to generalized time conversion in `wolfSSL_ASN1_TIME_to_generalizedtime`.
2019-09-26 08:42:35 -07:00
42d04a36d6 Change static globals to const where possible
Change parameters to functions to be const where possible (and
necessary).
2019-09-26 23:05:02 +10:00
4a6925e2ef Merge pull request #2480 from dgarske/nightly_20190925
Fixes for minor build issues
2019-09-26 17:34:21 +10:00
c6c7f67dfd add check on AEAD only mode with enc-then-mac functions 2019-09-26 12:30:17 +07:00
8139fbd026 early data and enc-then-mac build fixes 2019-09-26 12:12:19 +07:00
f1b68873ef add check on dependencies for tests 2019-09-26 11:43:12 +07:00
02c5d36f72 Fixes for --enable-opensslextra or --enable-opensslall with NO_WOLFSSL_CLIENT or NO_WOLFSSL_SERVER defined. 2019-09-25 20:11:54 -07:00
9d05e9c0b7 Fixes for minor nightly build tests. 2019-09-25 11:07:32 -07:00
bcd8a521f5 Merge pull request #2479 from tmael/aes_gcm
Initialize AES GCM set key
2019-09-20 14:34:25 -07:00
425548565f Fix after rebase 2019-09-20 16:16:10 -05:00
f01e943448 Adding support for STACKOF(CONF_VALUE) 2019-09-20 16:06:13 -05:00
082d0e459d Updates from review 2019-09-20 16:04:14 -05:00
793df114f3 Adding stack object type support to sk_value 2019-09-20 16:02:58 -05:00
74386fd0d0 Initialize GCM AAD in case wc_AesInit() wasn't called 2019-09-20 12:04:33 -07:00
b92509144b Merge pull request #2475 from dgarske/qat_key
Fixes and improvements for async
2019-09-20 10:44:33 -07:00
54cdab8005 Initialize AES GCM set key 2019-09-20 10:17:08 -07:00
8636bac12f Merge pull request #2478 from miyazakh/fix_iar_build
Fix build failure on IAR EWRX
2019-09-20 09:01:56 -06:00
3f10a37eda Merge pull request #2477 from dgarske/keil_sp
Fixes for using Keil with single precision math.
2019-09-20 10:42:46 +10:00
d762d2fa5d Merge pull request #2450 from aaronjense/microsoft-azure-sphere
Visual Studio Solution for Azure Sphere Devices
2019-09-19 17:13:46 -07:00
2dafd2102c Add Apache HTTP Server compatibility and --enable-apachehttpd option (#2466)
* Added Apache httpd support `--enable-apachehttpd`.

* Added `SSL_CIPHER_get_version`, `BIO_new_fp`, `SSL_SESSION_print` and `SSL_in_connect_init` compatibility API's.

* Fix to expose `ASN1_UTCTIME_print` stub.

* Pulled in `wolfSSL_X509_get_ext_count` from QT.

* Added `X509_get_ext_count`, `BIO_set_callback`, `BIO_set_callback_arg` and `BIO_get_callback_arg`.

* Added `wolfSSL_ERR_print_errors`.

* Added `BIO_set_nbio` template.

* Fixes for building with Apache httpd.

* Added DH prime functions required for Apache httpd.

* Fix and move the BN DH prime macros.

* Fix for `SSL_CTX_set_tlsext_servername_arg` to have return code.

* Only add the `BN_get_rfc*_prime_*` macro's if older than 1.1.0.

* Added `ERR_GET_FUNC`, `SSL_CTX_clear_extra_chain_certs` prototypes.

* Added `wolfSSL_CTX_set_client_cert_cb` template and `OPENSSL_load_builtin_modules` stub macro.

* Added `X509_INFO` templates (`X509_INFO_new`, `X509_INFO_free`, `sk_X509_INFO_new_null`, `sk_X509_INFO_num`, `sk_X509_INFO_value`, `sk_X509_INFO_free`). Added `sk_X509_shift`.

* Added BIO_set_callback, BIO_get_callback, BIO_set_callback_arg, BIO_get_callback_arg

* add BIO_set_nbio, ERR_print_errors and tests

* add X509 INFO stack push function

* Add ASN1_UTCTIME_print and unit test

* Add X509_get_ext_count unit test

* initial commit of wolfSSL_PEM_X509_INFO_read_bio

* Added `sk_X509_NAME_new`, `sk_X509_NAME_push`, `sk_X509_NAME_find`, `sk_X509_NAME_set_cmp_func` and `sk_X509_NAME_free`. Grouped `sk_X509_NAME_*` functions.

* Cleanup sk X509 NAME/INFO pop free template.

* Advance openssl compatibility to v1.1.0 for Apache httpd. Added TLS version macros. Implemented sk X509 NAME/INFO pop and pop_free.

* Added `TLS_client_method` support.

* Added `SSL_get_server_tmp_key` and `EC_curve_nid2nist`.

* Added `SSL_CTX_set_min_proto_version` and `SSL_CTX_set_max_proto_version`. Fix for `BN_get_rfc*_prime_*` with the v1.1.0 change.

* add test cases for PEM_X509_INFO_read_bio

* Fixes for `BN_get_rfc*_prime_*` macros. Added template for `SSL_DH_set0_pqg`. Fix for `SSL_OP_NO_` to use Macro's (as is done in openssl). Added `SSL_set_verify_result`. Added stub for `OPENSSL_malloc_init`.

* Apache httpd compatibility functions. BIO setter/getters.

* implement ASN1_TIME_check and add test case

* add SSL_get_client_CA_list

* add initial implementation of wolfSSL_DH_set0_pqg

* Add apache support to OBJ_txt2nid and unit test, add stub for OBJ_create

* add X509_STORE_CTX_get1_chain, sk_free, sk_X509_dup

* Add sk_SSL_COMP_num and SSL_COMP struct

* implement and test of SSL_SESSION_print

* add SSL_CTX_set_client_cert_cb

* expand BIO_printf and add test case

* Added `OCSP_CERTID_dup`. Added `ASN1_TYPE`.

* add implementation for wolfSSL_get_server_tmp_key

* add wolfSSL_BIO_puts and test case

* Add X509_EXTENSION_get_object and X509_EXTENSION_get_data

* add helper for bio flag set and null x509 stack

* add test adn implementation for wolfSSL_i2d_PrivateKey

* Added `ASN1_OTHERNAME`, `ACCESS_DESCRIPTION` and `GENERAL_NAME`. Added `sk_ACCESS_DESCRIPTION_pop_free` and `ACCESS_DESCRIPTION_free` stubs.

* add wolfSSL_PEM_read_bio_ECPKParameters

* add BIO_vfree

* add X509_up_ref

* add X509_STORE_CTX_set_ex_data

* add _GNU_SOURCE macro and wolfSSL_EVP_read_pw_string

* add wolfSSL_EVP_PKEY_ref_up function

* X509_get_ext, X509V3_EXT_print, and d2i_DISPLAYTEXT stubs

* add X509_set_issuer_name

* add wolfSSL_sk_SSL_CIPHER_* functions and tests

* add prototype for sk_X509_EXTENSION and ACCESS_DESCRIPTION

* fix casting to avoid clang warning

* adjust test_wolfSSL_X509_STORE_CTX test case

* Added `OpenSSL_version`

* renegotiate functions and additional stack functions

* add aditional stub functions

* Add Apache httpd requirements for ALPN, CRL, Cert Gen/Req/Ext and SecRen. Fix for `sk_X509_INFO_new_null`.

* add ocsp stub functions

* Proper fix for `sk_X509_INFO_new_null`. Added templates for `X509_get_ext_by_NID` and `X509_add_ext`. Added templates for `ASN1_TIME_diff` and `ASN1_TIME_set`.

* x509 extension stack additions

* Fixed template for `OCSP_id_get0_info`.

* add X509 stub functions

* add X509_STORE_CTX_get0_store() and unit test

* Added `EVP_PKEY_CTX_new_id`, `EVP_PKEY_CTX_set_rsa_keygen_bits`, `EVP_PKEY_keygen_init`, `EVP_PKEY_keygen` and `BN_to_ASN1_INTEGER`.

* x509v3 stubs and req add extensions

* Add OBJ_txt2obj and unit test; add long name to wolfssl_object_info table for use by OBJ_* functions

* wolfSSL_set_alpn_protos implementation

* Added `EVP_SignInit_ex` and `TLS_server_method` implementation. Added stubs for  `RSA_get0_key` and `i2d_OCSP_REQUEST_bio`. Fix typo on `OCSP_response_create`. Fix warning in `wolfSSL_set_alpn_protos`.

* Added `X509_EXTENSION_free` stub. Fixed a few macro typos/adding missing.

* add X509_STORE_CTX_get0_current_issuer and unit test

* add OBJ_cmp and unit test

* add RSA_get0_key and unit test

* add OCSP_check_nonce

* Implement X509_set_notAfter/notBefore/serialNumber/version,X509_STORE_CTX_set_depth,X509V3_set_ctx.

* Modify wolfSSL_X509_set_notAfter/notBefore and add tests for each.

* Add test_wolfSSL_X509_set_version w/ fixes to _set_version and fix _set_notBefore/notAfter tests

* add OCSP_id_get0_info and unit test, move WOLFSSL_ASN1_INTEGER to asn_public.h from ssl.h

* inital implementation of wolfSSL_X509_sign

* add debugging messages and set data for BIO's

* Add i2d_OCSP_REQUEST_bio.

* implementation of some WOLFSSL_BIO_METHOD custom functions

* fix for ASN time structure and remove log node

* initial eNULL support and sanity checks

* fixes after rebasing code

* adjust test cases and ASN1_TIME print

* Various fixes for memory leaks

* Apache compatibility in CTX_set_client_CA_list for X509_NAME use; add X509_NAME_dup as supporting function

* Add initial X509_STORE_load_locations stub for Apache

* Updates to X509_get_ext_d2i to return GENERAL_NAME struct instead of ASN1_OBJECT for alternative names and add supporting GENERAL_NAME functions

* Add X509_STORE_load_locations implementation; add wolfSSL_CertManagerLoadCRL_ex; initial renegotiation fixes/updates

* Fix for freeing peer cert in wolfSSL_Rehandshake instead of FreeHandShakeResources during secure renegotiation

* Add X509_ALGOR and X509_PUBKEY structs for X509_PUBKEY_get0_param and X509_get_X509_PUBKEY implementation

* Initial implementation of wolfSSL_X509_get_X509_PUBKEY and wolfSSL_X509_PUBKEY_get0_param

* Add implementation for X509_get0_tbs_sigalg and X509_ALGOR_get0

* Add OBJ_nid2ln implementation

* Fix compile errors in tests/api.c for some build options

* Updates to X509_STORE_load_locations for non-CRL types; Add additional DETECT_CERT_TYPE enum and logic for detecting certificate type in ProcessFile

* Add X509_STORE_load_locations unit test and minor error handling fixes

* Add unit test for X509_sign

* Set correct alert type for revoked certificates; add/fix a few WOLFSSL_ENTER messages

* Add X509_ALGOR member to X509 struct; refactoring and unit tests for wolfSSL_X509_ALGOR_get0 and wolfSSL_X509_get0_tbs_sigalg

* Add X509_PUBKEY member to X509 struct; refactoring and unit tests for wolfSSL_X509_get_X509_PUBKEY and wolfSSL_X509_PUBKEY_get0_param

* Stack fixes after rebase

* Secure renegotiation refactoring: add ACCEPT_BEGIN_RENEG to AcceptState for use in wolfSSL_SSL_in_connect_init; free old peer cert when receiving new cert to fix memory leak

* Move enc-then-mac enable option in configure.ac for apache httpd compatibility

* Simplify wolfSSL_SSL_in_connect_init logic

* Remove unneeded wolfSSL_CertManagerLoadCRL_ex

* Fixes for jenkins test failures

* SSL_get_secure_renegotiation_support for print statement in Apache
2019-09-19 17:11:10 -07:00
2f818f9508 Fix build failure on IAR EWRX 2019-09-20 09:07:51 +09:00
dfc00bf057 Merge pull request #2476 from dgarske/pkcb_tls13
Fix for TLS v1.3 and PK callbacks
2019-09-20 08:10:43 +10:00
3b6112e317 Fixes for using Keil with single precision math. 2019-09-19 14:34:30 -07:00
c16b02a265 Merge pull request #2471 from dgarske/test_date_override
Fix for verify callback override not adding to trusted CA list
2019-09-19 13:54:24 -07:00
33a83cdba0 Merge pull request #2436 from miyazakh/Renesas_TSIP_Port
Support renesas tsip
2019-09-19 14:44:33 -06:00
2dbf3f81fc Merge pull request #2474 from SparkiDev/sp_int_prime
Add support for prime checking to sp_int.c
2019-09-19 13:44:22 -07:00
fd1d65c4f9 Merge pull request #2470 from SparkiDev/build-fixes
Fixes from overnight build failures
2019-09-19 13:38:25 -07:00
cc452adff1 Merge pull request #2465 from JacobBarthelmeh/Fuzzer
sanity check on length before read
2019-09-19 13:34:42 -07:00
523b1801ed Cleanup of the wc_ecc_sign_hash function to separate the async logic. This improves the ECC r/s local case to appease static analyzers. Fixes https://github.com/wolfSSL/wolfssl/issues/2342. 2019-09-19 13:33:02 -07:00
ab86e78cbe Merge pull request #2458 from JacobBarthelmeh/Certs
macro guards for re-defines
2019-09-19 12:54:26 -07:00
6aecdf59c1 Fixes for async build and tests. 2019-09-19 12:30:05 -07:00
ae25027135 Fix for TLS v1.3 and PK callbacks. 2019-09-19 12:07:14 -07:00
1493b94b27 Eliminate async NUMA allocation for wc_ecc_gen_k. Additional DECLARE_VAR checks. Improve mp_rand to avoid alloc in async case. 2019-09-19 11:34:59 -07:00
f532143094 adjust CheckASNTag to be GetASNTag 2019-09-19 02:09:51 -06:00
5c5aa45a5e addressed review comments
tsip_usable() reconstruction
2019-09-19 14:35:23 +09:00
a37b604da9 addressed review comments 2019-09-19 11:18:52 +09:00
63d61c490d addressed review comments 2019-09-19 11:18:52 +09:00
a6b2d1621b Free memory for a msg buffer when calling wc_ShaxxxFree() 2019-09-19 11:18:52 +09:00
778a2065ab Replaced key information by dummy data 2019-09-19 11:18:52 +09:00
cb0184fe98 update Readme, added file header etc 2019-09-19 11:18:52 +09:00
a292e69d3f update readme 2019-09-19 11:18:52 +09:00
5c6f6fdb7d Renesas TSIP Support
merged from private repo

removed unneccessary #include
make line as 80 characters
added simple tls server
Disable TLS-linked API use when being SERVER SIDE, still use certificate verify API
Added utility tools, generate signature arrays etc
added vars to store tsip hmac keys
fix build failure when disabling dc_printf
2019-09-19 11:18:52 +09:00
0bc16d47e2 Add support for prime checking to sp_int.c
This allows SP to support:
- DH parameter checking
- DH parameter generation
- RSA key generation
Improved performance of sp_mod operation.
Reworked some functions to have one exit point (return statement).
Fixed sp_sub_d().
Changed tests to perform 2048-bit RSA key generation only when using SP
math.

Fixed Intel x86_64 C file to not have DH specific functions available
unless WOLFSSL_HAVE_SP_DH is defined.
Fixed tfm to return an error when t is not the correct size in
fp_isprime_ex().
2019-09-19 09:08:15 +10:00
bdbe0943cf Add function to print network interface and IP Address 2019-09-18 19:57:19 +01:00
4ef8f53c9e PR Review Changes
1. Add more documentation
2. Add cleanup functions for client and server before return
3. Add the ability for client to use a hostname for SERVER_IP
2019-09-17 14:59:43 -06:00
946a0f593f Merge pull request #2472 from SparkiDev/enc_then_mac_fix
Enc-Then-MAC: when message size is less than digest size return error
2019-09-17 08:57:26 -07:00
f0e774d1e1 Merge pull request #2420 from kojo1/KDS-proj
add KDS sample project
2019-09-17 11:53:04 -04:00
bdad0fa53f Merge pull request #2443 from miyazakh/fix_esp_examples
Fixed examples for esp-idf
2019-09-17 11:47:39 -04:00
0e5de0c076 Fix to only AddCA when its CA type and veryNone is not set. 2019-09-17 07:56:02 -07:00
2c2907c2a5 Enc-Then-MAC: when message size is less than digest size return error 2019-09-17 11:23:43 +10:00
b7c08988dc Fix for verify callback override of intermediate CA provided by peer not being added to trusted CA list.
Feature: Added support for testing date override at build-time using `TEST_BEFORE_DATE`.

```
./examples/server/server -H overrideDateErr -A ./certs/ca-cert.pem -k ./certs/server-key.pem -c ./certs/intermediate/server-chain.pem &
./examples/client/client -D -A ./certs/ca-cert.pem -k ./certs/client-key.pem -c ./certs/intermediate/client-chain.pem
```
2019-09-16 14:47:55 -07:00
708556d5c7 adjust sha3 typedef 2019-09-16 10:40:56 -06:00
3b7b81fea7 add local CheckASNTag function 2019-09-15 23:06:11 -06:00
326f02d76d Fix for buffer overrun check logic. 2019-09-15 23:04:13 -06:00
e6c48327c1 sanity check on length before read 2019-09-15 23:04:13 -06:00
000fc64f27 Fixes from overnight build failures
ssl.c: Certificate store fields freed without being NULLed and then
freed again.
integer.c: Compiler complained that a->dp may be NULL in mp_set_bit when
setting bit.
pkcs12.c: ret is zero after GetLength and this is an error but data is
freed only when ret != 0.
pkcs7.c: derArr was not zeroized for full allocated size.
2019-09-16 10:21:08 +10:00
9d69f17f17 Merge pull request #2468 from tmael/RSA_inline
Fix for RSA inline
2019-09-13 13:46:33 -07:00
9d3d170411 Merge pull request #2456 from dgarske/freedom_unleashed
Support for SiFive HiFive Unleashed board
2019-09-13 11:58:11 -07:00
40fc86dfd2 Merge pull request #2464 from SparkiDev/rshift_neg
Use constant time comparison in MaskMac with scanStart and macStart
2019-09-13 11:56:12 -07:00
a2d3da2831 Merge pull request #2463 from ejohnstown/maintenance-dtls
Maintenance DTLS
2019-09-13 11:53:20 -07:00
6894dde4e9 Merge pull request #2460 from dgarske/debug_buffer
Improvements to `WOLFSSL_BUFFER` function
2019-09-13 11:49:20 -07:00
b70f22e21a 1. Use the session deallocator on the deserialized session in the client.
2. Free the flatten session if the size check fails.
2019-09-12 16:04:34 -07:00
09541082d6 Merge pull request #2416 from kojo1/OCSP-error
Detail error code
2019-09-12 16:51:34 -04:00
4e62d1f509 Fix for RSA inline 2019-09-11 22:57:54 -07:00
c27a4b3865 TLS Maintenance
When serializing the WOLFSSL_SESSION, serialize everything.
2019-09-11 16:44:54 -07:00
852d50adcf DTLS Maintenance
To go with the fix for the functions wolfSSL_(i2d|d2i)_SSL_SESSION,
modify the example client to use a serialized session record for
resumption instead of the direct reference into the session cache. This
change only happens when OPENSSL_EXTRA and HAVE_EXT_CACHE are defined.
2019-09-11 15:29:57 -07:00
2a1a9f36cc Use constant time comparison in MaskMac with scanStart and macStart
Right shift of a negative value is undefined.
Add an 'int' return version of constant time greater than equal.
Change equal and not equal to be constant time in more situations.
2019-09-11 10:57:23 +10:00
ed06f34f55 Updated benchmarks running at 1.5GHz (default is 1 GHz). 2019-09-10 16:09:18 -07:00
22c398494e DTLS Maintenance
The options to switch on and off the code to serialize/deserialize items
in the struct need to match the options for the struct.
(ZD5130, ZD5590)
2019-09-10 16:01:48 -07:00
e93e3b60da DTLS Maintenance
Allow the DTLS server to retransmit a stored flight of messages in an additional acccept state.
(ZD5644)
2019-09-10 11:51:38 -07:00
def36ddfe8 Added instructions for installing Debian on Unleashed board. 2019-09-10 09:16:35 -07:00
66b76a4420 Improvements to WOLFSSL_BUFFER function to eliminate recursive call and use snprintf for string safety. Adds support for build-time change of LINE_LEN. 2019-09-10 08:57:35 -07:00
645f8ddd31 Update RISC 64-bit detection to use __riscv_xlen. 2019-09-10 07:47:28 -07:00
eb2aa3dce1 macro guards for re-defines 2019-09-09 19:24:45 -06:00
99252cc936 Merge pull request #2399 from dgarske/ovs
Compatibility changes for OpenVSwitch
2019-09-09 16:02:27 -07:00
95d3289fa2 Merge pull request #2437 from kaleb-himes/ZD_5546_IAR_CC_CHECK
Fix failing IAR builds, thanks to Joseph C. for the report
2019-09-09 11:42:19 -07:00
88036db223 Visual Studio Solution for Azure Sphere Devices 2019-09-09 10:50:56 -06:00
ab5c12fd17 Added parenthesis around types.h pointer size macro. 2019-09-09 09:01:18 -07:00
c0317ad198 Fix to only expose SSL_want when OPENSSL_EXTRA is defined. 2019-09-09 08:07:30 -07:00
342d03a294 Added SSL_want. 2019-09-09 08:07:30 -07:00
2cf26a1353 Compatibility changes for OpenVSwitch. 2019-09-09 08:07:30 -07:00
c52801754c Fips ready (#2422)
* Changes to update stunnel support

* Required additions for building fips-ready with speedups

* Fix SetASNIntRSA
2019-09-09 02:47:02 -07:00
02419e248f Fix clang 3.8 arm (#2449)
* Fix 'value size does not match register size' error in clang with arm assembly

* More readable casting
2019-09-09 02:46:48 -07:00
87d0c70695 erase compiler complaint, not used var 2019-09-09 08:25:02 +09:00
7433b20d43 renamed wolfSSL_CTX_IsPrivatePkSetForkeyType to wolfSSL_IsPrivatePkSet 2019-09-09 08:25:02 +09:00
348be7fb00 Fix jankis test, known customer config. complaining unused var 2019-09-09 08:25:02 +09:00
82d531562c Fixed build warnings due to esp-idf update
Fixed server application TLS communicatio failure
2019-09-09 08:25:02 +09:00
4c88d94d13 Chacha20 and poly1305 without x18 (#2454)
* Remove use of x18 and organize new optimizations

* Fix invalid operand
2019-09-08 16:03:04 -07:00
afb15f6521 Merge pull request #2455 from JacobBarthelmeh/HardwareAcc
change detection of AESNI support to read bit 25 from ECX
2019-09-09 08:29:00 +10:00
ebe99cf5ef Support for SiFive HiFive Unleashed board. 2019-09-06 16:04:34 -07:00
37328544ad Merge pull request #2453 from SparkiDev/armv8_x18
ARM64 assembly - x18 not able to be used
2019-09-06 15:45:02 -07:00
85b123046b Merge pull request #2377 from SparkiDev/sha2_cs_oldtls
Disallow SHA-2 ciphersuites from TLS 1.0 and 1.1 handshakes
2019-09-06 15:41:15 -07:00
3e12d260b8 ARM64 assembly - x18 not able to be used
Fix Curve25519/Ed25519, SHA-512 and SP code to not use x18.
2019-09-06 15:49:24 +10:00
a975ba9e97 Disallow SHA-2 ciphersuites from TLS 1.0 and 1.1 handshakes 2019-09-06 09:31:14 +10:00
171902f1fb change detection of AESNI support to read bit 25 from ECX 2019-09-05 17:02:44 -06:00
1785089798 Merge pull request #2433 from kaleb-himes/ZD_5602_MINGW_XSNPRINTF
Resolve XSNPRINTF unconditional use in asn.c breaking mingw32 builds
2019-09-05 11:37:21 -07:00
d6685edfa0 Merge pull request #2440 from SparkiDev/tlsfuzzer_fixes
Fixes for fuzz testing
2019-09-05 09:01:10 -07:00
eaeaaf12c1 Merge pull request #2446 from SparkiDev/gplusplus_fix_1
Fixes for g++ compilation
2019-09-04 16:28:42 -07:00
bf7296aefb Merge pull request #2438 from SparkiDev/armv8-poly1305-clang
Fix ARMv8 Poly1305 inline assembly code to compile with clang 3.5
2019-09-04 16:28:02 -07:00
56df8162bd Fixes for g++ compilation 2019-09-04 10:09:36 +10:00
b35fd4f1aa Merge pull request #2441 from JacobBarthelmeh/UnitTests
strncpy gcc warning fixes
2019-09-03 15:44:10 -07:00
0927f93b07 Merge pull request #2442 from JacobBarthelmeh/HardwareAcc
build fix for aesccm + devcrypto=cbc + wpas and afalg
2019-09-03 15:42:41 -07:00
b19e785c2c Merge pull request #2418 from dgarske/sha3_keccak256
Added support for older KECCAK256
2019-09-03 15:42:05 -07:00
492ce6ac91 Merge pull request #2414 from dgarske/pkcs8_asn1
Added support for loading a PKCS8 ASN.1 formatted private key
2019-09-03 15:36:31 -07:00
03967d62f4 sanity check on resulting ecc size 2019-09-03 10:54:11 -06:00
46790080a7 Fix ARMv8 Poly1305 inline assembly code to compile with clang 3.5 2019-09-02 09:52:25 +10:00
60befc82c5 Fixes for fuzz testing
Changes
- Don't ignore decryption errors when doing TLS 1.3 and after Client
Finished.
- Put out an alert when TLS 1.3 decryption fails.
- Properly ignore RSA pss_pss algorithms when checking for matching
cipher suite.
- Check X25519 public value before import in TLS v1.2-
- REcognise TLS 1.3 integrity-only cipher suites as not negotiable with
TLS 1.2-.
- Send decode_error alert when bad message data in CertificateVerify.
- Negotiate protocol version in TLS 1.3 using extension and keep
decision when using TLS 1.2 parsing.
- Must have a signature algorithms extension in TLS 1.3 if not doing
PSK.
- More TLS v1.3 alerts.
- MAX_PSK_ID_LEN needs to be modified at compile time for tlsfuzzer to
work.
- change the good ecc public key to be a real public key when compiled
to check imported public keys
- Fix early data in TLS 1.3
- Make max early data size able to be changed at compile time - default
4K but fuzzer sends 16K
- Fix HRR, PSK and message hashes: Don't initialize hashes in parsing
ClientHello as need to keep hash state from previous ClientHello and
HelloRetryRequest
2019-09-02 08:58:14 +10:00
9fd38dc340 build fix for aesccm + devcrypto=cbc + wpas and afalg 2019-08-30 16:15:48 -06:00
2a750cd18d strncpy gcc warning fixes 2019-08-30 13:34:51 -06:00
ef20276ab5 Merge pull request #2424 from SparkiDev/enc_then_mac
Add support for Encrypt-Then-MAC to TLS 1.2 and below
2019-08-30 11:09:04 -07:00
adc548fc61 Merge pull request #2428 from ejohnstown/ecckey-test-fix
Fix ECC key decode test
2019-08-30 11:07:00 -07:00
347a859ffc Merge pull request #2435 from JacobBarthelmeh/SanityChecks
sanity check on ticket encrypt callback
2019-08-30 10:18:58 -07:00
09f80c7f5f Merge pull request #2439 from miyazakh/fix_espidf_issues
Fix build warnings while compiling wolfssl under esp-idf
2019-08-29 16:24:42 -06:00
db2468154f Merge pull request #2434 from tmael/phase2_compatibility_APIs
Adding phase 2 compatibility APIs
2019-08-29 12:26:27 -07:00
b8d2ccee83 Merge branch 'master' into phase2_compatibility_APIs 2019-08-29 09:16:41 -07:00
9034e3a0fe Merge pull request #2432 from embhorn/api_p2
Adding compatibility API phase 2
2019-08-29 09:05:01 -07:00
5f77627857 Fix SetASNIntRSA 2019-08-29 16:24:09 +02:00
d6bac37def Fix build warnings while compiling wolfssl under esp-idf 2019-08-29 17:44:44 +09:00
24e98dd05e Add support for Encrypt-Then-MAC to TLS 1.2 and below
An extension is used to indicate that ETM is to be used.
Only used when doing block ciphers - HMAC performed on encrypted data.
2019-08-29 09:00:30 +10:00
87e876d8c6 Match padding macro values and restore EVP non-AES-GCM 2019-08-28 15:45:07 -07:00
46b4654564 Fix failing IAR builds, thanks to Joseph C. for the report 2019-08-28 12:44:05 -06:00
a76f719aac Fix review comment 2019-08-28 10:42:57 -07:00
411f15bec3 Merge pull request #2429 from cconlon/cmssig
Add internal PKCS7 content digest check
2019-08-28 09:41:10 -06:00
0c9ba1b361 Adding compatibility API phase 2 2019-08-28 09:29:49 -05:00
625c3074b9 Review comments, sanity check 2019-08-27 17:06:36 -07:00
59dddda3a9 Updated with review comments 2019-08-27 15:37:00 -07:00
dc5d11fef4 Updated with review comments 2019-08-27 15:14:58 -07:00
7fcb85b743 ECC-FP Cache Memory Leak
Each test case for ECC should be cleaning up the FP cache if it uses
the cache. Only a couple cases were getting freed.
2019-08-27 14:43:25 -07:00
4ec90be4d6 Added --enable-hashflags option. 2019-08-27 13:28:33 -07:00
a49f447e47 Merge pull request #2413 from dgarske/load_ca_nodate
Refactor of the verify option for processing X.509 files
2019-08-27 13:20:30 -07:00
e6252a94ce check attrib->value and attrib->valueSz before use 2019-08-27 14:18:23 -06:00
f9e364f893 Updated wolfSSL_EVP_Cipher() for AES GCM 2019-08-27 11:36:39 -07:00
10431738c7 sanity check on ticket encrypt callback 2019-08-27 11:41:27 -06:00
208e9f3fcf Fix Windows build 2019-08-27 08:49:27 -07:00
e9d1f32441 Fix Windows build 2019-08-27 08:11:31 -07:00
e8f468e2cf correct ifdef directive 2019-08-26 19:17:41 -07:00
00dadafddb Add HAVE_FAST_RSA around RSA_print() 2019-08-26 16:54:10 -07:00
6f9210d6af Peer review feedback changes
Case ```__GNUC__``` already covered, just check for MINGW or CYGWIN cases now.
2019-08-26 16:53:52 -06:00
b2555d38bc Jenkins PRB enable options test 2019-08-26 15:43:58 -07:00
9b3fee223f Typecast to correct type 2019-08-26 14:17:13 -07:00
6311ae425c RSA_generate_key() needs WOLFSSL_KEY_GEN 2019-08-26 13:47:54 -07:00
0f60ee8a85 Merge pull request #2402 from schlatterbeck/master
Fixes for 16-bit systems
2019-08-26 12:41:47 -07:00
5e28dd94a2 OpenSSL compatible APIs:
ASN1_STRING_type
EVP_aes_128_gcm
EVP_CIPHER_CTX_ctrl
EVP_PKEY_sign
EVP_PKEY_sign_init
RSA_print
RSA_NO_PADDING
RSA_PKCS1_PSS_PADDING
2019-08-26 12:20:18 -07:00
ea4e7b2669 Resolve XSNPRINTF unconditional use in asn.c breaking mingw32 builds 2019-08-26 13:19:53 -06:00
256ac4a515 Merge pull request #2427 from miyazakh/fix_espbuild_failure
fix uninitialized var for esp idf build failure fix
2019-08-26 10:11:44 -06:00
61d01ab7f3 add unit test for PKCS7 invalid detached content 2019-08-26 09:43:20 -06:00
76b9476b9a Remove debug printf. 2019-08-23 16:24:45 -07:00
99329b0fc4 Improvements to the CRL verify handling. 2019-08-23 16:09:39 -07:00
12687e5a2a internally check PKCS7 content digest against messageDigest attribute 2019-08-23 16:40:12 -06:00
2c97b040ff Merge pull request #2419 from dgarske/ctx_sec_reneg
Adds use secure renegotiation at CTX level
2019-08-23 12:55:30 -07:00
1bad2bed3c Merge pull request #2404 from dgarske/strict_cipher
Added strict cipher suite check on client server_hello processing
2019-08-23 12:42:57 -07:00
681de3e41a Merge pull request #2375 from dgarske/stm32_cubemx_halv2
Fixes for STM32F7 and latest CubeMX HAL
2019-08-23 12:28:51 -07:00
6209e8ff24 Merge pull request #2412 from JacobBarthelmeh/PKCS12
adjust wc_i2d_PKCS12 API
2019-08-23 10:30:04 -07:00
63538fedde Required additions for building fips-ready with speedups 2019-08-23 10:22:31 -07:00
54fb08d6df Merge pull request #2426 from JacobBarthelmeh/Fuzzer
sanity check on buffer size before reading short
2019-08-23 10:17:31 -07:00
2ba6c66d44 Fix ECC key load test
When using the configure options '--enable-certgen --enable-certext CPPFLAGS=-DWOLFSSL_VALIDATE_ECC_IMPORT', the ecc_decode_test() will fail the "good" test case. It is using the point (1, 1) in the test, and that fails the key validation. Changed the good key to one of the keys we have in the certs directory. The additional validation checks that the point is on the curve, and is validated in FIPS mode.
2019-08-22 14:18:59 -07:00
8b2a1f13c4 fix uninitialized ver for esp idf build failure fix 2019-08-23 06:08:11 +09:00
0e6bb4717e Merge pull request #2425 from JacobBarthelmeh/SanityChecks
sanity check on buffer size
2019-08-22 12:30:06 -07:00
b83aebafb1 help out static analysis tool 2019-08-22 11:49:10 -06:00
65aeb71d6c sanity check on buffer size before reading short 2019-08-22 11:36:35 -06:00
c6e4aebcdf sanity check on buffer size 2019-08-22 09:23:02 -06:00
cf83561b64 Merge pull request #2417 from SparkiDev/sp_mod_exp_cast_fix
SP Mod exp cast fix
2019-08-22 05:55:27 -07:00
6544b5df88 Merge pull request #2423 from SparkiDev/fe_math_mac
Curve25519/Ed25519 x86_64 assembly working on Mac again
2019-08-22 05:54:49 -07:00
132f60e77f Curve25519/Ed25519 x86_64 assembly working on Mac again 2019-08-22 09:27:39 +10:00
37f1522825 Changes to update stunnel support 2019-08-21 16:18:04 -07:00
05d86ade20 Merge remote-tracking branch 'wolfSSL/master' 2019-08-21 16:17:55 -07:00
e298b3290d Fix to initialize hash flag. 2019-08-21 06:36:37 -07:00
7deab4c54f add KDS sample project 2019-08-21 11:12:09 +09:00
67c3751836 Adds new wolfSSL_CTX_UseSecureRenegotiation API for setting secure renegotiation at the WOLFSSL_CTX level. 2019-08-20 16:43:28 -07:00
a5d222a20e Make public the hash set/get flags functions. 2019-08-20 16:25:48 -07:00
154930d128 Added support for older KECCAK256 used by Ethereum. Uses existing hash flag API's.
To use add build flag `CFLAGS="-DWOLFSSL_HASH_FLAGS"`.

Example:

```c
wc_Sha3_SetFlags(&sha, WC_HASH_SHA3_KECCAK256);
```
2019-08-20 16:14:37 -07:00
24bfea1ad2 Fixes for various build options (!NO_RSA, HAVE_ECC, NO_PKCS8, NO_PKCS12). Added new NO_CHECK_PRIVATE_KEY to allow reduce code size when not required. 2019-08-20 10:38:08 -07:00
644e7a8f45 Fixes for PKCS8 w/wo encryption as DER/ASN.1. Fixes for building with --disable-oldnames. Fix to enable the PKCS8 enc test without openssl comat. Added additional PKCS8 tests. 2019-08-19 16:27:46 -07:00
5530336617 SP Mod exp cast fix 2019-08-20 08:50:57 +10:00
fd0390430d Give error code resolution to wolfSSL_CertManagerCheckOCSPResponse 2019-08-20 07:22:54 +09:00
01a3b59e28 fix cast and initialization of variable 2019-08-19 14:54:53 -06:00
3e1c103c78 Added support for loading a PKCS8 ASN.1 formatted private key (not encrypted). 2019-08-16 16:09:00 -07:00
586b74b05f Refactor of the verify option for processing X.509 files. Adds support for ignoring date checks when loading a CA using the WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY flag on wolfSSL_CTX_load_verify_buffer_ex and wolfSSL_CTX_load_verify_locations_ex. 2019-08-16 15:19:55 -07:00
7d4023f6a1 Merge pull request #2408 from dgarske/coverity
Minor fixes to resolve Coverity static analysis checks
2019-08-16 14:45:13 -07:00
487e66394e adjust wc_i2d_PKCS12 API 2019-08-16 15:19:33 -06:00
3f992ce39d Additional STM32F7 fixes with HALv2. 2019-08-16 12:31:28 -07:00
eb68ad162b Enable strict cipher suite checking by default. Changed to enable by default and can be disabled using WOLFSSL_NO_STRICT_CIPHER_SUITE. 2019-08-16 10:20:25 -07:00
e8986f389f wolfRand
1. Updated fips-check.sh to make an archive for wolfRand.
2. Updated configure.ac to provide a wolfRand build.
2019-08-16 09:33:41 -07:00
dea4f2fb1a Merge pull request #2410 from SparkiDev/poly1305_x64_fix
Fix Poly1305 on Intel AVX2
2019-08-16 09:08:27 -07:00
8454bd1077 Fix Poly1305 on Intel AVX2
Fix define checks for other x86_64 assembly code files
2019-08-16 17:42:19 +10:00
0d13b385ab Fixes for possible cases where DerBuffer is not free'd in AddCA error cases. 2019-08-15 17:01:30 -07:00
aee766e11b Minor fixes for AES GCM with GMAC and STM32 HALv2. 2019-08-15 16:57:38 -07:00
e7f0ed4b98 wolfRand
1. Excluded wc_encrypt.c from the wolfRand build.
2019-08-15 16:22:16 -07:00
9d53e9b6d5 wolfRand
1. Add fips.h to the install if doing a wolfRand build.
2019-08-15 16:22:16 -07:00
63fe2a219e wolfRand
In configure.ac,
1. Change some whitespace in the FIPS enable section.
2. Reorganize the FIPS section a little bit.
3. When enabling wolfRand, also force cryptonly.
4. Treat wolfRand like FIPSv2 at build time.
In the source include.am,
5. Add checks against BUILD_FIPS_RAND as appropriate.
6. Add the SHA-256 assembly to the wolfRand source list.
2019-08-15 16:22:16 -07:00
a229e1e8e4 wolfRand
1. Rearrange some of the macros in the FIPS section to separate out the
different flavors of FIPS with their own flags to set them apart.
2. Add automake flags for FIPSv1 and wolfRand.
2019-08-15 16:22:16 -07:00
0931b574a7 wolfRand
1. Refactored src/include.am to use the new changes in configure for
multiple FIPS versions.
2. Added conditions for wolfRand.
2019-08-15 16:22:16 -07:00
14316f8e24 wolfRand
Refactor the configure.ac script to make adding additional FIPS options
easier.
2019-08-15 16:22:16 -07:00
489af0cd2b Merge pull request #2386 from SparkiDev/tls13_integ_only
TLS 1.3 and Integrity-only ciphersuites
2019-08-15 16:02:12 -07:00
51c31695bd Merge pull request #2391 from SparkiDev/tfm_dh_2
Specialized mod exponentiation for base 2 in tfm.c and integer.c
2019-08-15 15:59:20 -07:00
b06dbf16c2 Merge pull request #2397 from JacobBarthelmeh/PKCS7
updates to CMS and callback functions
2019-08-15 15:56:41 -07:00
089ca6d6e8 Merge pull request #2403 from JacobBarthelmeh/HardwareAcc
build with devcrypto and aesccm
2019-08-15 15:54:41 -07:00
0a1a81ab42 Merge pull request #2407 from embhorn/api_p1_2
Adding phase 1 API from other projects
2019-08-15 14:13:10 -07:00
1b841363cc Adding tests 2019-08-15 12:27:23 -05:00
ed7ac6fb26 Coverity fixes to make static analysis happy. 2019-08-14 15:42:47 -07:00
b2b24a06f3 Adding API 2019-08-14 15:09:17 -05:00
cb33ada380 Merge pull request #2395 from embhorn/api_p1
Adding compatibility API phase 1
2019-08-13 17:19:22 -07:00
e75417fde1 Added build option to enforce check for cipher suite in server_hello from server. Enabled using WOLFSSL_STRICT_CIPHER_SUITE. Some cipher suites could be allowed if they were supported a build-time even though not sent in the cipher suite list in client_hello.
Example log output for test case where `client_hello` sent a cipher suite list and server choose a cipher suite not in the list:

```
wolfSSL Entering DoServerHello
ServerHello did not use cipher suite from ClientHello
wolfSSL Leaving DoHandShakeMsgType(), return -501
wolfSSL Leaving DoHandShakeMsg(), return -501
```

RFC 5246: 7.4.1.3: Server Hello:  `cipher_suite: The single cipher suite selected by the server from the list in ClientHello.cipher_suites.`
2019-08-13 15:56:19 -07:00
48fa6a458c Adding compatibility API phase 1 2019-08-13 17:09:56 -05:00
fa79ef0940 Merge pull request #2396 from tmael/expanding_OpenSSL_compatibility
Phase 1 of the OpenSSL Compatibility APIs
2019-08-13 14:56:09 -07:00
e8e1d35744 build with devcrypto and aesccm 2019-08-13 14:12:45 -06:00
9301cce9ac Check a null pointer dereference 2019-08-13 11:48:20 -07:00
b1ad0525ea cast to correct static analysis issue 2019-08-13 10:45:24 -07:00
b7bd710bc8 Add small stack option 2019-08-13 10:29:37 -07:00
1acd24deb8 Review comment to reduce stack usage 2019-08-13 10:15:57 -07:00
b9ddbb974a perform domain name check on the peer certificate 2019-08-13 09:55:28 -07:00
20d9d5b0da account for KARI bundle without CERT when callback is set 2019-08-12 17:37:09 -06:00
883d5778a3 handle optional parameters with KARI ECC key 2019-08-12 16:41:35 -06:00
f4d9991e3a remove restriction on key wrap type with callback 2019-08-12 15:34:20 -06:00
63c6c47165 Fixes for 16-bit systems
Systems with sizof(int) == 2 default to expressions with that size.
So we have to do some explicit casts or use unigned long constants in
some cases.
In ssl.h the prototype of a function was not matching the definition.
This resulted in a type incompatibility on a 16-bit system.
2019-08-10 18:27:29 +02:00
6054a851ce move decrypt content callback function to more generic spot 2019-08-09 17:38:30 -06:00
e7c6fc221d Fixes to handle byte swapping on Key and IV for STM32F7 with latest CubeMX. 2019-08-09 15:40:26 -07:00
0a4ac0e380 Merge pull request #2401 from SparkiDev/aesni_null_iv
Set the IV to zero when NULL IV and using AESNI
2019-08-09 12:57:48 -07:00
d4cf6e37e8 DH base 2 impl - better error handling 2019-08-09 12:12:59 -06:00
dd48c825ed Constant compare the HMAC result when using NULL cipher and TLS 1.3 2019-08-09 11:50:07 -06:00
34fe643938 Set the IV to zero when NULL IV and using AESNI 2019-08-09 11:23:14 -06:00
1396ca085b Merge pull request #2400 from dgarske/pkcs7_typo
Fix for dynamic type typo in PKCS7
2019-08-09 10:34:41 -06:00
8e4fa1c786 Fix for dynamic type typo in PKCS7. 2019-08-08 20:14:39 -07:00
4bff2b6bef Fixed valgrind issue 2019-08-06 15:49:36 -07:00
1371fc8327 Review comments 2019-08-06 13:23:18 -07:00
c1938969aa Convert to pointer to pass static memory 2019-08-06 10:47:30 -07:00
000c38ae1f Use wolfSSL_PKCS7_free, not wc_PKCS7_Free 2019-08-06 07:46:57 -07:00
eccc85b9fa Add NO_RSA conditional 2019-08-05 17:51:31 -07:00
f5f5947616 New OpenSSL compatible APIs:
wolfSSL_PEM_write_bio_PKCS7
wolfSSL_PKCS7_SIGNED_new
wolfSSL_X509_subject_name_hash
wolfSSL_CTX_use_PrivateKey_ASN1
wolfSSL_get0_param
wolfSSL_X509_VERIFY_PARAM_set1_host
2019-08-05 17:35:37 -07:00
8e83fb2e67 Fix to resolve AES GCM auth calucation for GMAC where no in/out data is used. 2019-08-05 14:03:02 -07:00
99ddf65a96 add decrypt callback to wc_PKCS7_DecodeEnvelopedData 2019-08-05 10:49:15 -06:00
ab4924b86b Merge pull request #2388 from SparkiDev/sp_ccc_table_size
Fix precomputation tables to not include infinity field.
2019-08-05 08:39:58 -07:00
4f714b9788 Add a timing resistant version
Make mod operations work on the same bit size as closely as possible.
Check fp_mod return in first use.
2019-08-05 10:57:40 +10:00
c34657b20f Merge pull request #2390 from dgarske/altname
Fix for scan-build warning with altName->name possible use of NULL
2019-08-02 15:49:13 -07:00
6f54a2ec6b Merge pull request #2389 from dgarske/crypt_init_count
Fixes for wolfCrypt init/cleanup reference count
2019-08-02 15:48:36 -07:00
9acd952ea1 Merge pull request #2374 from dgarske/ecc_params
ECC improvement to get curve param and example curve macro check fix
2019-08-02 15:44:20 -07:00
31461dbfb5 Merge pull request #2373 from dgarske/mpint
Improvements to atoi, mp_int allocations and STSAFE-A100 error handling
2019-08-02 15:43:20 -07:00
da6fa384d4 Merge pull request #2273 from danielinux/Riot-OS-GNRC
RIOT-OS support with GNRC TCP/IP sockets
2019-08-02 15:42:11 -07:00
f5c1c33dba Fixes for newer STM CubeMX HAL for STM32F7. 2019-08-02 15:12:09 -07:00
e83116fc0b Resolution for FIPS/CAVP build errors where wc_ecc_get_curve_params is not present in older wolfSSL versions. 2019-08-02 13:25:11 -07:00
18002d4545 Merge pull request #2387 from JacobBarthelmeh/Benchmark
fix help print out of benchmark
2019-08-02 08:24:47 -07:00
d1fbdb3ddf Added API unit test for wc_ecc_get_curve_params. 2019-08-02 06:20:14 -07:00
0e1d81e63f Added ability to define your own XATOI 2019-08-02 06:16:41 -07:00
b4673344c0 Adds new wc_ecc_get_curve_params API for getting the ecc_set_type params for a curve index. Fix for example client and server using wrong macro for detecting ECC 256-bit enabled. 2019-08-02 05:50:00 -07:00
2a22179068 Specialized mod exponentiation for base 2 in tfm.c and integer.c 2019-08-02 15:50:08 +10:00
51dfc35aac TLS 1.3 and Integrity-only ciphersuites 2019-08-02 11:00:18 +10:00
3cf30f1e96 Fix to allow proper calling with counts for wolfCrypt_Init and wolfCrypt_Cleanup. Old code was not tracking case such as wolfCrypt_Init -> wolfCrypt_Init -> wolfCrypt_Cleanup and was causing cleanup to be performed, when it shouldn't. 2019-08-01 12:44:03 -07:00
fb8fc4d800 Fix for scan-build warning with altName->name possible use of NULL pointer. 2019-08-01 11:54:28 -07:00
4f0fd2c2f9 Merge pull request #2302 from SparkiDev/ecc_pubkey_check
Add checks of public key for ECC and curve25519
2019-08-01 11:50:02 -07:00
7098fdff29 Merge pull request #2382 from SparkiDev/dsa_ct
Use a fixed number of bits with DSA gen and sign
2019-08-01 11:48:53 -07:00
a8d2b6b3c8 Removed exception for EXIT_TEST in RIOT 2019-08-01 15:50:16 +02:00
34b2d257cd [RIOT-OS/GNRC] Renamed GNRC callback functions 2019-08-01 15:50:16 +02:00
e77161ae9a Riot-OS/GNRC support: reworked after reviewers' comments 2019-08-01 15:50:16 +02:00
1db036eb75 RIOT-OS support with GNRC UDP/IP sockets 2019-08-01 15:50:16 +02:00
1792fe34b9 Fix precomputation tables to not include infinity field.
Fixes to ARM code
- put in it instruction before conditional for old compilers.
- fix small code size version of compare
- handle not being able to shift by the full size - want result to be
zero
Casts as required by compiler to reduce bit size explicitly.
2019-08-01 20:53:41 +10:00
6a52e0a138 fix help print out of benchmark 2019-07-31 11:47:26 -06:00
c400c38588 Merge pull request #2381 from SparkiDev/tls13_sv
Check suite size length is valid as well as space for compression
2019-07-30 16:04:00 -07:00
d4ab1c7e86 Merge pull request #2383 from SparkiDev/sp_dh_2
Special implementation of mod exp when base is 2 in SP
2019-07-30 16:02:38 -07:00
dcab47efd8 Improve wc_curve25519_check_public function doc 2019-07-31 08:44:43 +10:00
81a9779fc4 Merge pull request #2385 from dgarske/minor_items
Minor cleanups for spelling and cast warnings
2019-07-30 15:22:29 -07:00
8b8cc41a1a Merge pull request #2384 from JacobBarthelmeh/PKCS7
add aditional sanity checks on buffer
2019-07-30 15:21:09 -07:00
0a60c2bb2c Merge pull request #2379 from JacobBarthelmeh/sessionExport
reduce size of state only save and add option to remove peer info
2019-07-30 15:09:39 -07:00
21c8ad03d3 Merge pull request #2378 from SparkiDev/tls13_nopskdheke_ks_fix
Fix for TLS 1.3 to always send Key Share
2019-07-30 15:08:38 -07:00
f314613fa1 Merge pull request #2376 from SparkiDev/dsa_sign
Generate k for DSA signature as per FIPS 186-4 B.2.2
2019-07-30 15:06:26 -07:00
91251eb319 Fixes for minor compiler cast warnings. 2019-07-29 08:14:27 -07:00
e3653a7a07 Various spelling corrections. 2019-07-29 08:14:07 -07:00
23af4e92f3 Special implementation of mod exp when base is 2 in SP 2019-07-29 12:58:07 +10:00
ec18ae0fbc add aditional sanity checks on buffer 2019-07-28 19:21:09 -06:00
4778dac49f Add checks of public key for ECC and curve25519 2019-07-29 10:42:44 +10:00
d7b893f250 Use a fixed number of bits with DSA gen and sign 2019-07-29 09:33:11 +10:00
741d7bdb67 Check suite size length is valid as well as space for compression 2019-07-29 08:47:45 +10:00
ca87861915 reduce size of state only save and add option to remove peer info 2019-07-26 14:54:44 -06:00
9e26bc40bb Generate k for DSA signature as per FIPS 186-4 B.2.2 2019-07-26 09:08:23 +10:00
8ce2dd4bf7 Additional STSAFE return code cleanups. 2019-07-25 08:22:31 -07:00
fe598fc6fc Improvements to the STSAFE-A100 error code handling. 2019-07-24 09:01:44 -07:00
2cd64c748a Only require XATOI for build-cases that need it. 2019-07-23 15:36:59 -07:00
b658f2e7c3 Refactor for all fp_int and mp_int allocations to use DYNAMIC_TYPE_BIGINT. This allows customers to setup a static pool for these allocations if desired. 2019-07-23 15:36:59 -07:00
b0444bcfa1 Refactor to add XATOI for standard library function. 2019-07-23 15:36:59 -07:00
50fbdb961f Merge pull request #2366 from JacobBarthelmeh/Release
updating readme and prepare for release
2019-07-23 11:03:29 -07:00
77fda069a8 prepare for release version 4.1.0 2019-07-23 09:27:39 -06:00
2befc9d68f fix for build with WOLFSSL_EXTRA 2019-07-23 09:27:39 -06:00
13957e7762 update server-ecc-self.pem before/after dates 2019-07-23 09:27:39 -06:00
589b056ecb update gitignore and location of test cleanup 2019-07-23 09:27:39 -06:00
8f5a0dc66a Merge pull request #2370 from SparkiDev/arm64_fixes
Fix for AARCH64 on Linaro
2019-07-23 09:26:56 -06:00
f8e2285ab8 Fix for AARCH64 on Linaro
Poly1305 using [wx]29 corrupts data - use [wx]30.
WOLFSSL_ARMASM is an ASM flag as well.
2019-07-23 09:56:18 +10:00
7ca9b23b76 Merge pull request #2361 from dgarske/bench_vs
Fixes for wolfCrypt benchmark and test Visual Studio projects
2019-07-22 11:29:33 -07:00
c443116189 Merge pull request #2364 from dgarske/stm32_cube_small_block
Fix for STM32 AES GCM crypto hardware with less than block size
2019-07-22 11:27:04 -07:00
fc918f9052 Merge pull request #2367 from JacobBarthelmeh/PKCS7
fix for initialize PKCS7 structure with signer
2019-07-22 09:41:17 -07:00
db9a17c8a7 fix for inject clear alert from client test case 2019-07-22 10:34:20 -06:00
aec980b803 fix for initialize PKCS7 structure with signer 2019-07-19 16:23:14 -06:00
aed1e433b2 Updates to benchmark/test Visual Studio projects to properly reference x64. Added missing files to VS projects. Example settings for enabling SP and AESNI in Visual Studio in IDE/WIN/user_settings.h. 2019-07-19 13:08:13 -07:00
ab01cd9be1 Merge pull request #2354 from ejohnstown/fixes
Fixes for FIPS
2019-07-19 09:59:21 -07:00
2abcffd4a7 Revert changes to fe_x25519_asm.S. 2019-07-18 12:15:55 -07:00
0bcae86038 Fixes for wolfCrypt benchmark and test Visual Studio projects. Fixes for benchmark.c compile errors in bench_hmac with Visual Studio. Added README.md files for benchmark and test. 2019-07-18 11:39:59 -07:00
45abd67bd1 Merge pull request #2362 from SparkiDev/chacha20_asm_fix
Fix chacha20 AVX1 assembly to not use register RBX
2019-07-18 08:43:44 -07:00
b73c53471c Merge pull request #2363 from JacobBarthelmeh/Testing
Fixes for builds
2019-07-18 08:38:50 -07:00
6fd623248e Add macro checks around new .c/.S files to allow wildcard include of source files (such as in Eclipse). 2019-07-18 06:49:36 -07:00
7db3f8e2c6 Fixes for STM32 CubeMX AES GCM crypto hardware where less than a block size (16) is used. 2019-07-18 06:09:07 -07:00
b399b08df7 Fix for TLS 1.3 to always send Key Share
Even if resuming or using PSK and not performing DHE key exchange, send
key share extension in case full handshake is required.
2019-07-18 11:01:43 +10:00
d1700d3739 Merge pull request #2358 from ejohnstown/rsa-keygen-speedup
RSA Key Generation Speedup
2019-07-17 18:01:38 -07:00
7fe4521083 Fix chacha20 AVX1 assembly to not use register RBX 2019-07-18 09:42:52 +10:00
0555668f2c Merge pull request #2356 from JacobBarthelmeh/OCSP
revert early free of OCSP buffer after finding it is revoked
2019-07-18 08:38:10 +10:00
3aad9a2673 FIPS Macro Fix
In a couple places the label WOLFSSL_FIPS was getting checked. Changed
to the correct HAVE_FIPS instead.
2019-07-17 15:35:12 -07:00
9c245b7fc5 Fixes
When building with GCC-8 and enable-intelasm set, GCC reported a memcpy
from and two the same pointer being possible. Added a check for the same
pointer and skipped the copy if the same.
2019-07-17 15:35:12 -07:00
c3c705f82b FIPS, HMAC, and PKCS8
One of the tests for PKCS8 depended on keys encrypted with a password
that has only 8 letters. HMAC in FIPS mode requires a minimum of 12
bytes. Disabled that test case when FIPS is enabled. All components do
get tested just not all together in that case.
2019-07-17 15:35:12 -07:00
7e79e3a6bf fix for build with disable filesystem 2019-07-17 16:28:58 -06:00
f63656f18b macro guard on test case with disable AES 2019-07-17 15:22:29 -06:00
dc71f957f3 RSA-Key Gen Speedup
1. When doing the test divides on the first few primes, short circuit
out of the loop if the prospective possible prime divides evenly.
2019-07-17 13:43:15 -07:00
8b6e66f095 Merge pull request #2353 from SparkiDev/ecc_nonce
Improve nonce use in ECC mulmod
2019-07-17 11:23:12 -07:00
9a2f4bb8f8 Merge pull request #2333 from kaleb-himes/WCv4.0.1-stable-master
WCv4.0.1-stable changes
2019-07-17 10:14:40 -07:00
af8395b17b revert early free of OCSP buffer after finding it is revoked 2019-07-17 11:08:28 -06:00
8bf8fcca60 Merge pull request #2352 from dgarske/async_v4.1
Fixes for Asynchronous support in v4.1
2019-07-16 17:32:18 -06:00
483f6a5acd Improve nonce use in ECC mulmod 2019-07-17 09:27:29 +10:00
5f3fd3ae86 Merge pull request #2348 from cconlon/scepchanges
Changes to support SCEP Expansion
2019-07-16 15:26:15 -07:00
fdeb65dec8 WCv4.0.1-stable changes
CHAR_BIT to 8, simplify logic from peer review

Update build script
2019-07-16 15:58:56 -06:00
cb2ed60305 Merge pull request #2351 from ejohnstown/watch-chain-deux
Sniffer Watch Cert Chain Part 2
2019-07-16 15:04:32 -06:00
7b021d68c3 Fixes for asynchronous support in v4.1:
* Fixes PK callback null dereference.
* Fixes `DoCertificateVerify` verify handling.
* Fixes build issue with API tests.
2019-07-16 11:56:02 -07:00
5067d1fc10 Merge pull request #2328 from kaleb-himes/ZD-5373-TIRTOS
Updating for TI hardware offload with latest version of wolfSSL
2019-07-16 11:43:56 -07:00
8b8ff2ac34 Merge pull request #2336 from kaleb-himes/ZD-5388-OCSP-STATUS-UNHONORED
Honor the status from peer and do not do internal OCSP lookup regardless
2019-07-16 11:32:34 -07:00
99d3ea9e56 Merge pull request #2350 from SparkiDev/rsa_pss_fix
Don't pick RSA PSS if not compiled in
2019-07-16 11:28:50 -07:00
4b0bb75909 Sniffer Watch Cert Chain Part 2
1. Check the sizes picked up out of the message against the expected
size of the record when looking at the certificate messages.
2. Renamed the cert and certSz in the watch callback with it being a
certChain.
2019-07-16 09:54:45 -07:00
2e308ea82c Merge pull request #2260 from JacobBarthelmeh/PKCS7
PKSC7 firmware revision + callback / get SID
2019-07-16 10:51:38 -06:00
9f1aa1a27c Merge pull request #2349 from ejohnstown/watch-chain
Sniffer Watch Cert Chain
2019-07-16 10:43:37 -06:00
d51b958334 use ForceZero instead of MEMSET in PKCS7 signed attribute handling 2019-07-16 08:13:47 -07:00
8112c1236d Don't pick RSA PSS if not compiled in 2019-07-16 14:59:01 +10:00
9af9941b90 Fixes for TLS 1.3 and OCSP Stapling
Create the OCSP Response for Stapling and TLS 1.3 when parsing.
When parsing OCSP stapling extension with TLS 1.3, use a new extension
object if it was created.
Set the extension size to 0 before writing extensions when sending a TLS
1.3 Certificate message.
2019-07-16 13:52:36 +10:00
d620433d1d Merge pull request #2209 from tmael/maintenanceDefects
Increased ciphers buffer size for testsuite and ECC API for getting curve from dp
2019-07-15 16:49:13 -07:00
4e648dd35f Merge pull request #2347 from JacobBarthelmeh/HardwareAcc
adjust time.h for port due to tm struct change
2019-07-15 15:27:58 -07:00
3cdb4f8bf0 Sniffer Watch Cert Chain
Modifed the sniffer watch callback so it provides a SHA-256 hash of the
peer certificate, as before, and the entire certificate chain sent by
the server in the Certificate handshake message. The chain is taken
directly from the message payload, unprocessed. It'll be a list of pairs
of 24-bit certificate length and a DER encoded certificate, all in
network byte order.
2019-07-15 14:07:22 -07:00
7367da3fb6 sort PKCS7 signed attributes when generating bundle 2019-07-15 13:27:49 -07:00
6e6c93624a free test RSA key after use 2019-07-15 12:32:19 -06:00
cba8a7f155 free buffer when using small stack 2019-07-15 12:32:19 -06:00
4362ce5f6b fix expected size and add sanity checks 2019-07-15 12:32:19 -06:00
a25d04044a save rid for kari callback 2019-07-15 12:32:19 -06:00
60fc9b3a1d add test for manual verify 2019-07-15 12:32:19 -06:00
d33a95352a fix check on ret value and add test case 2019-07-15 12:32:19 -06:00
f79a119c82 add storing sig/digest if no certs in bundle 2019-07-15 12:32:19 -06:00
d7a86de969 add wrap CEK callback, test, and adjustment for fwWrappedFirmwareKey 2019-07-15 12:32:19 -06:00
84653a7fb5 improvements on test code 2019-07-15 12:32:19 -06:00
a7a51d8f33 scan-build warnings / fixes 2019-07-15 12:32:19 -06:00
ab0029f9ac add setter function for ctx and pkcs7 callback, add test cases 2019-07-15 12:32:19 -06:00
2972b1c467 getter for signerinfo SID and decrypt callback 2019-07-15 12:26:11 -06:00
5743a1c80f Merge pull request #2341 from miyazakh/fix_ricoh_buildfailure
fix build failure when enabling MYSQL_COMPATIBLE
2019-07-15 10:10:34 -06:00
9d9495f8b6 allow CSR challenge pass to be encoded as PrintableString 2019-07-12 16:23:48 -07:00
051112a101 adjust time.h for port due to tm struct change 2019-07-12 13:55:04 -06:00
b4765a5c9e Merge pull request #2340 from JacobBarthelmeh/Testing
fsanitize report fixes
2019-07-11 11:18:09 -07:00
88f923a2a1 Merge pull request #2338 from ejohnstown/md5-null-suite
RSA-NULL-MD5 cipher suite
2019-07-11 11:15:48 -07:00
3756a2c8c7 fix build failure when enabling MYSQL_COMPATIBLE 2019-07-11 09:00:03 +09:00
a6cc9af1fc free old peer RSA key in secure renegotiation when getting new one 2019-07-10 17:07:16 -06:00
6c9fac2a71 add wolfSSL_RAND_Cleanup to match wolfSSL_RAND_seed call on init 2019-07-10 16:43:44 -06:00
85ce959031 free peer cert overwritten by secure renegotiation 2019-07-10 16:04:42 -06:00
45b280a53e RSA Null MD5 cipher suite
1. Add the cipher suite TLS_RSA_WITH_NULL_MD5 for use with the sniffer.
2. Added TLS_RSA_WITH_NULL_MD5 to the suite test.
2019-07-10 14:32:14 -05:00
d7b50874f6 Fix leak in dh_test 2019-07-10 13:28:00 -06:00
92bd585f25 Merge pull request #2329 from JacobBarthelmeh/SanityChecks
scan-build fixes
2019-07-10 10:23:39 -07:00
9cd6a992c5 Merge pull request #2295 from kojo1/RSA4096
Static RSA4096
2019-07-10 09:40:41 -06:00
d88458a447 Merge pull request #2322 from SparkiDev/int_is_prime_fix
Fix prime testing to do t iterations of random values in range
2019-07-09 08:03:30 -07:00
9daccb3300 Merge pull request #2320 from SparkiDev/tls_alerts
Send more alerts as per TLS specification
2019-07-09 08:02:32 -07:00
964fd95a43 Merge pull request #2335 from SparkiDev/tls_pss_fix
Fix duplicate definitions in internal.h (new PSS defines)
2019-07-09 08:01:10 -07:00
3e6246af59 Honor the status from peer and do not do internal OCSP lookup regardless
Item 2) Suggestion from Sean implemented: "Limit the message types"

Item 3) Removed a hard tab
2019-07-09 07:09:09 -06:00
e01f9961ac Fix duplicate definitions in internal.h (new PSS defines) 2019-07-09 08:49:04 +10:00
b8c6bc0d7f Changes following peer review, add defines to disable for any HW port 2019-07-08 16:28:35 -06:00
b7986ccb17 Merge pull request #2332 from SparkiDev/poly1305_arm64
Improve perfomance of Poly1305 on ARM64
2019-07-08 15:08:25 -07:00
4d13121de1 Merge pull request #2331 from SparkiDev/sp_c32_fix
Fix for C32 implementation in div
2019-07-08 15:06:16 -07:00
0bb6b388c0 Merge pull request #2312 from kojo1/RAND_bytes_2
RAND_bytes
2019-07-08 15:30:06 -06:00
97a6dc9e7e Merge pull request #2316 from SparkiDev/tls13_ext_fixes
TLS 1.3 extension fixes
2019-07-08 14:13:55 -07:00
1bcec1b9ab Merge pull request #2319 from SparkiDev/tls13_alerts
Improve alert sending in TLS 1.3 code from fuzz testing
2019-07-08 14:11:35 -07:00
efe276414b set internal x509 elements to NULL after free 2019-07-08 15:11:03 -06:00
79165ce8cb Merge pull request #2315 from SparkiDev/tlsx_ext_debug
Print out extension data being parsed when WOLFSSL_DEBUG_TLS defined.
2019-07-08 13:59:11 -07:00
44b8106da6 Merge pull request #2317 from SparkiDev/asn_nofs_fix
Fix for NO_FILESYSTEM builds
2019-07-08 13:32:27 -07:00
bd40a59f3e Merge pull request #2318 from SparkiDev/server_fuzz
Changes to server example for fuzz testing
2019-07-08 13:16:17 -07:00
36920b1469 Merge pull request #2314 from SparkiDev/tls13_fixes
TLS 1.3 ClientHello rework and other fixes
2019-07-08 13:14:37 -07:00
d824b78af0 Merge pull request #2323 from dgarske/various_fixes
Various fixes, improvements to build options for reduced code size and static benchmarks
2019-07-08 13:02:22 -07:00
baf65f4f43 Merge pull request #2327 from JacobBarthelmeh/Compatibility-Layer
add wolfSSL_PEM_write_DHparams implementation
2019-07-08 12:58:10 -07:00
e6ab7d165c Merge pull request #2325 from JacobBarthelmeh/Testing
remove HAVE_CRL macro guard from X509 PEM write function
2019-07-08 12:57:15 -07:00
66db74d827 Merge pull request #2313 from SparkiDev/tls13_reneg
Fix for TLS 1.3 and secure renegotiation
2019-07-08 12:56:02 -07:00
406ff31fc8 Merge pull request #2311 from SparkiDev/tls12_ffdhe_fix
Better support for TLS 1.2 and FFDHE
2019-07-08 12:55:03 -07:00
1070aba5e2 Merge pull request #2308 from SparkiDev/resumption_fix
Don't resume if stored session's ciphersuite isn't in client list
2019-07-08 12:52:59 -07:00
2610d9ce94 Merge pull request #2307 from SparkiDev/pick_hash_sig
Improve hash and signature algorithm selection
2019-07-08 12:51:36 -07:00
74324bb1b5 Merge pull request #2305 from SparkiDev/doalert_fix
Better handling of alerts
2019-07-08 12:50:26 -07:00
60d6d71636 Merge pull request #2304 from SparkiDev/tls_sha224
Support to TLS for RSA SHA-224 signatures
2019-07-08 12:47:56 -07:00
2a4b935e07 Merge pull request #2299 from JacobBarthelmeh/DTLS-MultiCore
DTLS export/import state only
2019-07-08 12:47:13 -07:00
cc453c6c12 Merge pull request #2262 from ejohnstown/sniffer-watch
Sniffer watch
2019-07-08 12:45:35 -07:00
b5a5100068 move location of X509 free 2019-07-05 14:33:35 -06:00
964dac96a7 Merge pull request #2321 from kaleb-himes/ARDUINO-UPDATE
Remove redundent setting WOLFSSL_ARDUINO and add guards
2019-07-05 11:35:30 -07:00
011fa6bafd Added PBKDF2 benchmark. Benchmark improvements to capture results in static buffer (helps benchmarking on systems without printf support). Added benchmark "-print" option to show summary. Added wolfCrypt test version header. 2019-07-05 11:29:14 -07:00
c9f18bfe3b Merge pull request #2326 from SparkiDev/sp_update_1
Changes to other SP implementations based on recent changes
2019-07-05 11:19:01 -07:00
4cf8923838 make wc_DhParamsToDer a static function to avoid DhKey redefenition 2019-07-05 11:58:40 -06:00
8dccecc531 Improve perfomance of Poly1305 on ARM64 2019-07-05 14:41:46 +10:00
61e1491407 Fix for C32 implementation in div
Changes to allow C32 to build on x86_64 when not using fast math.
2019-07-05 10:39:30 +10:00
9b654d25d1 wolfSSL_RAND_seed(NULL, 0); 2019-07-04 18:31:57 +09:00
5dcd421580 scan-build fixes 2019-07-03 17:08:02 -06:00
ab9d89cb31 cast on return and move location of function declaration 2019-07-03 15:20:08 -06:00
02871d5ed4 add test case for wolfSSL_PEM_write_DHparams 2019-07-03 13:32:21 -06:00
0b5ee1b633 Merge pull request #2324 from dgarske/cryptocb_3des
Crypto callback DES3 support
2019-07-03 10:17:23 -07:00
8327984523 fix for leading bit check 2019-07-03 10:35:08 -06:00
f2bb5e8944 implementation of wolfSSL_PEM_write_DHparams 2019-07-02 17:42:33 -06:00
7c393edf49 Changes to other SP implementations based on recent changes 2019-07-03 09:37:31 +10:00
58fe2781f1 Fix for wc_CryptoCb_AesCbcEncrypt with improper find device logic. Fix for HMAC scan-build with ret. Cleanup of HMAC formatting. 2019-07-02 14:08:59 -07:00
a7acacff41 remove HAVE_CRL macro guard from X509 PEM write function 2019-07-02 14:37:33 -06:00
d5f3fa2ff8 Added DES3 Crypto callback support. 2019-07-02 10:15:53 -07:00
01c9fa1830 Added NO_TFM_64BIT option to disable 64-bit for TFM only (also enabled with NO_64BIT. This allows other areas like SHA512/ChaCha20 to still have the 64-bit type, but not use it for TFM. 2019-07-02 09:36:08 -07:00
eba78cd87a Improvements for disabled sections in pwdbased.c, asn.c, rsa.c, pkcs12.c and wc_encrypt.c. Adds --enable-pkcs12, HAVE_PKCS12/NO_PKCS12, HAVE_PKCS8 / NO_PKCS8 and HAVE_PBKDF1 / NO_PBKDF1. 2019-07-02 09:35:46 -07:00
40864da533 Fix prime testing to do t iterations of random values in range 2019-07-02 14:42:03 +10:00
0e33e2d9ee Check PickHashSigAlgo return when doing CerticateRequest
Only check picking the hash and signature algorithm functions return
when a certificate is available to send to peer.
Include the ECC signature and hash algorithms in available list even
when using ECDSA certificates signed with RSA.
List is of capabilities not what is in certificate.
Certificate request sent to peer doesn't have to be an ECDSA certificate
signed with RSA.
Same treatment for RSA.
2019-07-02 11:53:04 +10:00
28aa99c3e3 Always have support for SHA-224 signatures when SHA-224 built-in 2019-07-02 08:27:04 +10:00
21afcf17a8 Sniffer Watch Mode
1. Split the function ssl_SetWatchKey() into ssl_SetWatchKey_file()
which loads the key from a named file and ssl_SetWatchKey_buffer()
which loads the key from a provided buffer. file() uses buffer().
2019-07-01 13:50:28 -07:00
b02e1e8d59 Sniffer Watch Mode
Added some statistics tracking to the watch mode.
2019-07-01 13:50:28 -07:00
8be6c0c08c Sniffer Watch Mode
Add some tests for the Watch mode that will also work with static ECDH.
2019-07-01 13:50:28 -07:00
b61803f165 Sniffer Watch Mode
Added the build option for the Watch mode for the sniffer. Instead of
setting a set of IP addresses and keys, you set a callback function.
When any TLS connection is started, the hook is called and a hash of the
peer certificate is given to the callback function. It has a chance to
load a private key into the sniffer session. Enable this option with the
build flag "WOLFSSL_SNIFFER_WATCH".
2019-07-01 13:50:28 -07:00
fd71618f10 Added warning message if user IO read callback returns negative that is not supported. 2019-07-01 13:41:17 -07:00
b2f919ec13 Fix to include errno.h in tls_bench.c 2019-07-01 13:41:17 -07:00
354ec9cd9d Add useful log message when SP math key size is invalid. 2019-07-01 13:41:17 -07:00
f8e3e63938 Fix for building with USE_STSAFE_VERBOSE to avoid printf use. 2019-07-01 13:41:17 -07:00
3652929573 Merge pull request #2310 from SparkiDev/alpn_sni_parse
ALPN and SNI Extension parsing improvements
2019-07-01 08:57:39 -07:00
4500f2d773 Merge pull request #2309 from SparkiDev/fallback_scsv
Fallback SCSV (Signaling Cipher Suite Value) support on Server only
2019-07-01 08:55:02 -07:00
08bd5000f1 Merge pull request #2306 from SparkiDev/tls_long_msg
Add detection of oversized encrypted data and plaintext
2019-07-01 08:51:20 -07:00
db17fce49a Remove redundent setting WOLFSSL_ARDUINO and add guards 2019-07-01 09:02:21 -06:00
b7e00eea1a Send more alerts as per TLS specification
Requires WOLFSSL_EXTRA_ALERTS or OPENSSL_EXTRA to enable
2019-07-01 17:01:06 +10:00
1fe69992e2 Improve alert sending in TLS 1.3 code from fuzz testing 2019-07-01 14:20:36 +10:00
373bbf6660 Changes to server example for fuzz testing 2019-07-01 13:35:33 +10:00
707156f53b Fix for NO_FILESYSTEM builds 2019-07-01 13:26:28 +10:00
4ff9d951f6 TLS 1.3 ClientHello rework and other fixes
Do version negotiation first. Look for, parse and negotiate with
SupportedVersions extension upfront. Only need to handle TLS 1.3
ClientHello after this.
Any version greater than TLS 1.2 in Legacy Version field is translated
to TLS 1.2.
Fix preMasterSz to when not using PreSharedKey.
Not finsing KeyShare in ClientHello sends a missing_extension alert.
Decoding signature algorithms in new TLS 1.3 range now returns error
when not recognized.
Don't allow RSA PKCS #1.5 signatures to be verified.
Fix accept when downgraded from TLS 1.3 to go to wolfSSL_accept.
Fix server state when sending ChangeCipherSpec for MiddleBox
compatability.
Send a new session ticket even when resuming.
2019-07-01 13:22:21 +10:00
1d05503d20 TLS 1.3 extension fixes
When major version is TLS Draft then this is now ignored.
If version negotitation occurs but none matched then send an alert and
return an error.
Store the rsa_pss_pss_* signature algorithms in the bit mask.
KeyShare Entry parsing returns INVALID_PARAMETER when length is 0 and
results in a different alert being sent.
Check negotiated protocol version is not TLS 1.3 when determing whether
to parse point formats.
2019-07-01 12:20:37 +10:00
4eaabd9be5 Print out extension data being parsed when WOLFSSL_DEBUG_TLS defined. 2019-07-01 11:58:43 +10:00
60af8bdb7c Fix for TLS 1.3 and secure renegotiation 2019-07-01 09:26:05 +10:00
43ce956d9c minor fix 2019-06-29 16:47:39 +09:00
1634d9571c RAND_seed in init, GlobalRNG before tmp. 2019-06-29 09:21:30 +09:00
e96ede65ce Don't resume if stored session's ciphersuite isn't in client list
Turn this check off with NO_RESUME_SUITE_CHECK.
2019-06-28 16:23:41 +10:00
46a2a437d4 Better support for TLS 1.2 and FFDHE
If not FFDHE parameters in list then use existing.
If FFDHE parameters present but none matching then let the ciphersuite
match process fail when DHE must be used.
2019-06-28 16:12:23 +10:00
1592d6f856 ALPN and SNI Extension parsing improvements
SNI will not have more than one type, only one entry in the list per
type and therefore no need to loop.
ALPN error checks improved.
2019-06-28 15:52:51 +10:00
a3e4a2fd6e Fallback SCSV (Signaling Cipher Suite Value) support on Server only 2019-06-28 15:35:56 +10:00
8312ceb14c Improve hash and signature algorithm selection
Return error when no hash-signature algorithm is possible.
2019-06-28 14:31:40 +10:00
5f9a851adb Add detection of oversized encrypted data and plaintext 2019-06-28 12:01:35 +10:00
7d2ac604f5 Better handling of alerts
Better checking of encrypted alerts - check unencrypted data size
correctly before using data.
Send an alert if the alert isn't the right size.
Send an alert if the maximum alert count has been reached - but don't
send it if seeing close_notify alert.
2019-06-28 11:53:33 +10:00
8a0c058782 Support to TLS for RSA SHA-224 signatures 2019-06-28 10:26:48 +10:00
f51a8fffde Merge pull request #2265 from JacobBarthelmeh/Testing
fix check on ret value and add test case
2019-06-27 14:02:01 -06:00
8bea016d69 Merge pull request #2277 from julek-wolfssl/arm-poly1305
ARM Poly1305
2019-06-27 09:21:09 +10:00
c7d1424adf word16 for consistency 2019-06-27 06:38:14 +09:00
e7fd45537d update comments for DEGENERATE_SID use 2019-06-26 11:58:53 -06:00
7520137601 Merge pull request #2297 from miyazakh/esp_random
fix ed25519 sign msg test failure in ESP32
2019-06-26 11:54:34 -06:00
da5357cadd Merge pull request #2301 from SparkiDev/dh_pubval_check
Simple checks of DH public value from peer.
2019-06-26 09:20:49 -07:00
0dbba5f056 Merge pull request #2300 from ejohnstown/fips-hash
FIPS Hash
2019-06-26 09:18:48 -07:00
6478f92e04 Merge pull request #2294 from dgarske/read_fixes
Fixes to improve read error handling
2019-06-26 09:17:20 -07:00
cb4f9afd6d free memory in test case 2019-06-25 15:24:39 -06:00
3a378520c0 FIPS Hash
Add the fips-hash.sh script to the Automake distribution.
2019-06-25 11:38:09 -07:00
53c1a6c264 Merge pull request #2283 from dgarske/extern_c
Fixes for cpp extern c
2019-06-25 11:25:39 -07:00
eceb460cff Merge pull request #2287 from ejohnstown/sniffer-stats
Sniffer Statistics
2019-06-25 11:22:24 -07:00
ef64cd300c Fixes to improve read error handling.
* Improved `GetInputData` handling of non -1 return codes.
* Adds support for handling `WOLFSSL_CBIO_ERR_TIMEOUT` return code in non-DTLS case.
2019-06-25 07:11:14 -07:00
dcdd6d6d6f Cleanup around include of wolfmath.h and shared math macros. Fix for SP math case with WOLFSSL_BIGNUM. 2019-06-25 07:06:33 -07:00
a9fff57063 Add extern "C" to headers. Some files are missing this, which can cause issues with some compilers when using the C++ mode. 2019-06-25 07:05:46 -07:00
ee023c6bf4 Simple checks of DH public value from peer.
Add test for wc_DhCheckPubValue
2019-06-25 11:12:33 +10:00
da6ed416be use len for copy-length instead of sz 2019-06-25 08:39:46 +09:00
26384d4936 Sniffer Stats
Upgrade the sniffer stats to unsigned long ints.
2019-06-24 16:16:05 -07:00
b957415609 Merge pull request #2245 from MKinclRA/coverity-issues
Coverity issues
2019-06-24 16:12:52 -07:00
851a547fd5 FIPS Hash
Add a script that updates the verifyCore value automatically. It isn't
included in the dist like fips-check.sh.
2019-06-24 16:01:05 -07:00
15552be934 Merge pull request #2280 from cconlon/selftestccm
CAVP self test build fixes for AES-CCM and PKCS7
2019-06-24 15:55:18 -07:00
036f6a1177 Merge pull request #2281 from ejohnstown/evp-legacy
Legacy EVP_CipherFinal addition
2019-06-24 15:54:43 -07:00
785d984a3c Merge pull request #2282 from SparkiDev/certvfy_tls13
Free RSA key later in TLS v1.3 CertificateVerify
2019-06-24 15:54:04 -07:00
56d7da3130 Merge pull request #2284 from dgarske/api_test
Fixes for track memory and API unit test cleanup
2019-06-24 15:53:32 -07:00
587e962331 Merge pull request #2288 from SparkiDev/ed25519_string_fix
Fix length of buffer to match string length for g++
2019-06-24 15:39:52 -07:00
2ba89cb7a9 Merge pull request #2289 from SparkiDev/sp_prime_fix
When checking primes call only available SP ModExp functions
2019-06-24 15:39:03 -07:00
c7964b62c0 Merge pull request #2290 from kaleb-himes/ZD-5253-X25519
Support CURVE25519 in `get_curve_name` when HAVE_ECC not defined
2019-06-24 15:37:34 -07:00
358757cd2e Merge pull request #2291 from ejohnstown/random-clean
Random Cleanup
2019-06-24 15:36:00 -07:00
0100159079 Merge pull request #2293 from ejohnstown/aesni-fix
AES-NI Fix
2019-06-24 15:34:12 -07:00
78956534f0 Merge pull request #2298 from SparkiDev/static_rsa
Improve handling of static RSA's decrypted pre-master secret
2019-06-24 15:24:18 -07:00
0e3881d418 add test case for state only export on DTLS session 2019-06-24 16:08:12 -06:00
8439beb525 Sniffer Statistics
1. Moved sslKeyFails.
2. Added sslEphemeralMisses, sslEncryptedConns, sslDecodeFails.
3. Removed the Rehandshake stats as the sniffer does not support rehandshaking.
4. Removed two of the per second stats as they seemed redundant.
5. Added a function to atomically read and reset the sniffer statistics.
2019-06-24 09:54:42 -07:00
0eaccb7259 Removed some redundant comments from the sniffer header. 2019-06-24 09:54:42 -07:00
0203a25b60 Sniffer Statistics
Added stats for encrypted and decrypted bytes and packet counts.
2019-06-24 09:54:42 -07:00
9715431921 Sniffer Statistics
1. Wrapped the added code for statistics in a preprocessor guard.
2. Added a check for the current cipher suite and if it is on the list
of allowed suites. Guarded by the statistics option.
3. Added more statistics from the list.
2019-06-24 09:54:42 -07:00
c600f7659a Sniffer Statistics
Added more of the statistics.
2019-06-24 09:54:42 -07:00
2ee7d05dcc Sniffer Statistics
1. Added a structure for all the statistics to be kept.
2. Added a global to track the statistics.
3. Added a copy function to get a copy of the statistics.
4. Added a reset function for the statistics.
5. Handle the alert messages in statistics.
2019-06-24 09:54:42 -07:00
71fe3313d3 Cleanup poly1305 struct 2019-06-24 09:43:55 +02:00
c826c605a3 Fix problems when building with Make 2019-06-24 09:42:07 +02:00
f42c94e3bc Cleanup code and align labels 2019-06-24 09:42:07 +02:00
0fed159abd Poly1305 ARM64 optimization 2019-06-24 09:42:07 +02:00
f1f6ac9308 Improve handling of static RSA's decrypted pre-master secret 2019-06-24 17:09:22 +10:00
1d9d9e2955 fix ed25519 sing msg test failure
better random number handling
2019-06-24 15:27:29 +09:00
6d04d784c4 pkcsBlockLen in RsaUnPad may be > 256 2019-06-24 07:53:23 +09:00
b236a1c32f add export/import window state only 2019-06-21 15:52:48 -06:00
c114bcaead Addressed peer feedback, avoid double check when HAVE_CURVE25519 not set 2019-06-21 09:40:17 -06:00
49a631996c Check other names when FFDHE returns NULL 2019-06-21 09:27:15 -06:00
fba89ae034 Random Cleanup
1. Remove redundant calls to the generate function when instantiating
and reseeding the DRBG.
2. Added note to the apparently redundant extra call to the generate
function when running the self test. This extra call is there to make
sure the internal state is updating correctly as a part of the KAT.
3. Removed duplicate enable argument clause for rng from configure.ac.
2019-06-20 16:02:35 -07:00
f4548945f7 Merge pull request #2292 from ejohnstown/config-tweak
Autoconf Update
2019-06-21 00:53:02 +02:00
e4e6ed3701 AES-NI Fix
Replace some removed constants for AES-NI. They were removed when the
inline assembly that used that was exported to its own file.
For Windows, we're using the C intrinsic AES-NI functions, and those
still needed those constants.
2019-06-20 15:33:30 -07:00
a28e075290 Autoconf Update
Consolidate all the AM_CONDITIONAL statements in one place in the
configure process. This replaces the set of repeat checks of enable
flags to conditionally check the AM_CONDITIONAL.
2019-06-20 13:37:53 -07:00
7225823f90 Merge pull request #2278 from SparkiDev/cert_asn1
Better length checks when parsing ASN.1 certificates
2019-06-20 11:18:02 -07:00
2460effb0b Merge pull request #2285 from SparkiDev/tlsx_len
Better checking of return values in TLSX for error codes.
2019-06-20 10:10:31 -07:00
ce251417f5 curve25519 in get_curve_name when HAVE_ECC not defined. Thanks to C.B. for the report. 2019-06-20 10:57:07 -06:00
b631670cca Fix for SP math build in OpenSSL bn.h 2019-06-20 21:40:58 +10:00
c82c9b481b When checking primes call only available SP ModExp functions 2019-06-20 18:05:25 +10:00
e1b03aa056 Fix length of buffer to match string length for g++ 2019-06-20 17:01:16 +10:00
e7b3b31d9f Change TLSX functions that return error with length to do so separately 2019-06-20 16:37:34 +10:00
7bde02b3e7 Fix for track memory case where the "prev" wasn't getting initialized for the first malloc. Caused issue on last free with fsantize because pointers are not zero'd by default. 2019-06-19 11:23:37 -07:00
19cb31d429 Merge pull request #2286 from miyazakh/fix_make_dist
fix make dist
2019-06-19 09:38:07 -06:00
4581342fb0 fix make dist 2019-06-19 09:32:56 +09:00
71cb117dda Better length checks when parsing ASN.1 certificates 2019-06-19 10:05:21 +10:00
d378d3c009 Better checking of return values in TLSX for error codes. 2019-06-19 10:02:55 +10:00
dd9dd6306e API unit test fix to remove improperly placed wolfSSL_Cleanup() call in test_for_double_Free. This caused erronous report with fsanitize=address. 2019-06-18 16:22:19 -07:00
c500fd5a86 Free RSA key later in TLS v1.3 CertificateVerify 2019-06-19 08:47:40 +10:00
c2032c64d2 CAVP self test build fixes for AES-CCM and PKCS7 2019-06-18 08:29:49 -07:00
2cf4a74b47 Merge pull request #2279 from SparkiDev/test_fix
Fix for small stack in test.c
2019-06-17 13:36:03 -07:00
36fb4e2f2d Add a legacy version of the wolfSSL_EVP_CipherFinal() function that
performs the decrypt in the old manner before a particular bug was
fixed. The old method didn't add padding when the data to encrypt was
multiple of the block_size in length. The decrypt happened to ignore the
error returned by checkPad.
2019-06-14 14:43:45 -07:00
18ac566f48 Fix AVX2 ChaCha20 assembly 2019-06-14 10:22:27 +10:00
a4bdfbf953 Fix for small stack in test.c 2019-06-14 08:43:36 +10:00
2435ec2d6b Merge pull request #2275 from SparkiDev/sha512_arm32
Add ARM32 NEON code for SHA-512/384
2019-06-12 16:19:20 -07:00
53cac0499f Merge remote-tracking branch 'wolfSSL/master' 2019-06-12 14:42:02 +02:00
102ecac70c Merge pull request #2237 from julek-wolfssl/proper-arm-chacha-poly1305
ARM Chacha20 assembly code
2019-06-12 22:21:47 +10:00
911c8df185 Fix 256 byte assembly slowdown 2019-06-12 00:52:42 +02:00
1f3d9c04c0 Merge pull request #2274 from miyazakh/fix_printstat_tlsbench
minor fix order for printing stats in tls_bench
2019-06-11 16:23:38 -06:00
01ad44feef Merge pull request #2276 from kaleb-himes/BOTH_FIPS_VERSION_TESTING
Adjustment to test.c for merge of WCv4.0.1 changes
2019-06-11 13:21:42 -07:00
24042c973a Merge pull request #2259 from tmael/port_SiFive_RISCV
Added support for RISC-V SiFive HiFive Freedom platforms
2019-06-10 20:38:43 -07:00
48d4ed38ac Include SIFIVE files for distribution 2019-06-10 14:06:42 -07:00
de5ff0acea Merge pull request #2254 from SparkiDev/curve25519_x64_2
Fix and improvements for X25519 x86_64 ASM code
2019-06-10 13:35:43 -07:00
1f0a46331b Merge pull request #2270 from dgarske/stsafe_tls
STSAFE Improvements to support Crypto Callbacks
2019-06-10 13:34:20 -07:00
540c5cdd2f Updated benchmarks with SPI "dual mode" I/O enabled. 2019-06-10 20:33:28 +02:00
a48981c3c6 Chacha20 ARM optimization 2019-06-10 19:21:46 +02:00
cdf0241ed0 Updated benchmark with SHA512 "slow" version, which performs faster with the RISC-V compiler optimizations. 2019-06-09 19:43:55 +02:00
c5aa13021a Adjustment to test.c for merge of WCv4.0.1 changes 2019-06-07 16:09:35 -06:00
d7ab3a6dec Further user_settings.h cleanup / additions. Additional README.md comments. 2019-06-07 13:58:17 -07:00
02c2782e39 Merge pull request #2272 from JacobBarthelmeh/SanityChecks
remove store of last block w/o padding and adjust padding last block case
2019-06-07 10:29:29 -07:00
b4ca2824cb Merge remote-tracking branch 'wolfSSL/master' 2019-06-07 14:55:21 +02:00
efcf06ef7c use tlsv1_2 client method when tls13 is enabled 2019-06-07 19:13:46 +09:00
6a594218bc Add ARM32 NEON code for SHA-512/384
Fix up ARM32 Curve25519 assembly code to use right directives.
Slight improvement to ARM64 SHA-512 assembly code.
Don't return error code from Transform functions - can't fail.
2019-06-07 15:02:48 +10:00
292aa196fb minor fix to print stats in tls_bench 2019-06-07 12:05:19 +09:00
a2f943984f Merge pull request #2268 from kaleb-himes/GH-2263
debug fix + remove outl value check - outl is only written not read
2019-06-06 11:22:19 -07:00
f114932a03 Merge pull request #2271 from miyazakh/fix_nomutexlock_after_free
avoid mutex lock test after freeing it on NetBSD
2019-06-06 09:27:18 -06:00
90228e1275 Merge pull request #2269 from SparkiDev/sp_cast
Fix casting of memory allocation to correct type
2019-06-06 06:14:59 -07:00
87d24f4488 add additional test case for evp 2019-06-06 16:14:00 +07:00
090899e74e remove store of last block w/o padding and adjust padding last block case 2019-06-06 14:43:07 +07:00
fdd01c8c8c Added support for SHA512, ED25519/CURVE25519 and ChaCha20/Poly1305. Enabled ECC Single Precision (SP) support. Updated README.md wolfCrypt test/benchmarks. Pulled in fix "Fix casting of memory allocation to correct type" from Sean. 2019-06-05 20:21:48 -07:00
64b8af728b skip mutex lock after free 2019-06-06 11:06:29 +09:00
4e3004639d Fix casting of memory allocation to correct type 2019-06-06 09:11:19 +10:00
97780149a5 debug fix + remove outl value check - outl is only written not read 2019-06-05 13:38:13 -06:00
25aeb8238e Addressed review comment about id being undefined 2019-06-04 16:05:57 -07:00
9f9155b6f2 Added STSAFE Crypto Callback support. 2019-06-04 15:57:31 -07:00
074e770c98 * Fix to ensure user_settings.h can be included for bio.c and evp.c when IDE or compiler tries to build it directly. Allows for wildcard .c include along with WOLFSSL_IGNORE_FILE_WARN.
* Fix for building SP cortex M without RSA.
* Fix for type-cast warning with STSAFE-A100.
* Improved the RNG seed test to prevent type-case warning.
2019-06-04 15:57:31 -07:00
fee81ce49e Merge pull request #2257 from dgarske/sha256_regs
Added faster SHA256 build options
2019-06-04 14:05:54 -07:00
77248e4e2a Merge pull request #2255 from SparkiDev/sha512_arm
SHA-512 optimised for ARM64
2019-06-04 14:04:33 -07:00
4f80c7c94e Allow main to build when local debug flag is on 2019-06-04 13:12:27 -07:00
19372c8199 Merge pull request #2266 from kaleb-himes/ZD-5154
Check correct allocation assignment. Thanks to R.A. for the report on…
2019-06-04 10:22:09 -04:00
b4571f1f5a Updates to documentation for SHA256 build options. Changed to enable Ch/Maj math based of specification by default.
The `WOLFSSL_SHA256_ALT_CH_MAJ` alternate Ch/Maj performance is the same.
The `SHA256_MANY_REGISTERS` is about 13% slower on 64-bit. On some platforms is slightly faster.
2019-06-03 14:17:47 -07:00
290663f8b2 Feedback changes implemented 2019-06-03 15:13:02 -06:00
7601276411 Merge pull request #2267 from ejohnstown/aesgcm-selftest
NetBSD Selftest, TLSv1.3, and wolfCrypt v4
2019-06-03 14:31:33 -06:00
4367761367 Merge pull request #2261 from kaleb-himes/ZD-5172
PKCS7 w/ FIPS cert 3389 support
2019-06-03 11:28:27 -06:00
978928be83 NetBSD Selftest, TLSv1.3, and wolfCrypt v4
When building for TLSv1.3 and the NetBSD Selftest, need to use the old
pre-wolfCrypt v4 APIs for AES-GCM and AES-CCM.
2019-06-03 09:40:00 -07:00
80dd6cc143 Check correct allocation assignment. Thanks to R.A. for the report on ZD-5154 2019-06-03 08:34:51 -06:00
9fbe471156 fix check on ret value and add test case 2019-06-03 07:52:50 +07:00
e429185535 Make Transform_SHA512_Len API local scope 2019-06-03 08:35:36 +10:00
7624d90590 Merge pull request #2258 from dgarske/no_stdlib
Improvements for no standard lib and no malloc/free builds
2019-05-31 14:59:33 -07:00
7726bbbff2 Fix extra distribution files for ARM port dir 2019-05-31 10:47:42 +10:00
e01ae09809 X25519 when not AVX2 2019-05-31 10:12:46 +10:00
a5fabda5c6 Added compile-time check for DRBG size. Added support for all build variations DRBG size. 2019-05-30 15:59:12 -07:00
19c348b5c7 Merge pull request #2256 from dgarske/blake2s
Adds Blake2s support
2019-05-30 15:08:59 -07:00
33d27a391a Improve SHA-512 and Curve25519 2019-05-30 16:07:06 +10:00
173163d1a3 SHA-512 optimised for ARM64 2019-05-30 16:04:15 +10:00
af9d82963e Add support for increasing CPU clock speed. New benchmarks with HiFive1 RevB hardware at 320MHz. 2019-05-29 12:11:16 -07:00
fea89c52f4 configure with ECC256 only 2019-05-29 10:51:07 -07:00
5601aa4634 PKCS7 w/ FIPS cert 3389 support 2019-05-29 11:12:34 -06:00
f1ecf33d94 Merge pull request #2253 from danielinux/cygwin-build-fix
Fix visibility tags for cygwin build
2019-05-29 06:29:47 -07:00
765b075e50 Updated with review comments 2019-05-28 17:48:36 -07:00
87fb9f73e9 Added RISC-V SiFive FE310 support
Added freedom-e-sdk based makefile
Updated ecc test code to not allocate more memory than requried
Run wolfcrypt and benchmark tests on the SiFive HiFive1 targets
2019-05-28 17:48:36 -07:00
5ea13a09f6 Adds Blake2s support (--enable-blake2s), which provides 32-bit Blake2 support. 2019-05-28 10:30:19 -07:00
d42bdf9c0b Removed unused variable keyQ from _DhSetKey. 2019-05-27 12:44:10 +02:00
263769765c Merge pull request #2246 from ejohnstown/sniffer-logging
Sniffer Logging
2019-05-24 15:36:11 -07:00
f26a9589ff Added support for printf override using XPRINTF for wolfCrypt test/benchmark. Added ability to override snprintf with XSNPRINTF. If STRING_USER is defined no standard lib <string.h> or <stdio.h> will be included. 2019-05-23 22:03:38 -06:00
a89a2839de Fixes for building with WOLFSSL_NO_MALLOC. Fixes for static memory in bench embedded case. Added support for elimination of XMALLOC/XFREE when building with NO_WOLFSSL_MEMORY and WOLFSSL_NO_MALLOC. If used with WOLFSSL_MALLOC_CHECK will trap failures with malloc_check 2019-05-23 22:00:41 -06:00
ebbfe769e3 Added faster SHA256_MANY_REGISTERS support (thanks Sean). The WOLFSSL_SHA256_BY_SPEC option restore old math, the new case is equivalent math, but easier for compiler to optimize. 2019-05-23 21:53:07 -06:00
6564d03369 Fix and improvements for X25519 x86_64 ASM code 2019-05-24 09:43:08 +10:00
86b558300b Sniffer Logging
1. When collecting the key size to log it, use the constant WOLFSSL_BIT_SIZE for the bytes->bits multiply.
2. When converting the size of the ECC key, break the steps out more explicitly. Also update the comment to be more accurate.
2019-05-23 13:02:52 -07:00
9906a1045b Merge pull request #2251 from SparkiDev/sp_c_div_word
SP - div word in C when __div64 or __div128 not available
2019-05-23 11:51:29 -07:00
ac5a5dfd56 Merge pull request #2247 from SparkiDev/psk_once
Use TLS v1.3 PSK callback in extension allow for one call in client
2019-05-23 11:49:40 -07:00
6fe4c3ff34 Merge pull request #2244 from dgarske/psk_pk
Fix for static RSA cipher suite with PK callback and no loaded private key
2019-05-23 11:43:20 -07:00
cab4a8c9b1 Merge pull request #2240 from dgarske/x509small_showcerts
Added support for `SHOW_CERTS` with `OPENSSL_EXTRA_X509_SMALL`
2019-05-23 11:41:32 -07:00
e7fdb1360a Merge pull request #2239 from JacobBarthelmeh/Fuzzer
add sanity check on length of PSK identity
2019-05-23 11:40:13 -07:00
a742cf9bf8 Merge pull request #2234 from JacobBarthelmeh/Testing
add sanity check on buffer index and regression tests
2019-05-23 11:32:38 -07:00
5b5d03d5ac Merge pull request #2232 from SparkiDev/curve25519_arm_2
Add ARM32 asm code for X25519 and Ed25519
2019-05-23 11:30:29 -07:00
6cbe8219a3 Moved opening brace to the same line. 2019-05-23 16:13:34 +02:00
ad8f9c6134 Changed memsetting mp_ints to boolean flag. 2019-05-23 13:22:09 +02:00
38d1e908d6 Fix visibility tags for cygwin build 2019-05-23 08:41:05 +02:00
b53e94b49a Merge pull request #2252 from kaleb-himes/ZD5137
Arduino refactor, default to fastmath and setup user_settings for user
2019-05-22 19:17:26 -04:00
484f7a6c32 Merge pull request #2236 from tmael/sendAlertToTLSServer
send handshake failure alert to a server
2019-05-23 08:27:09 +10:00
d8a3768464 Update README.md 2019-05-22 10:43:54 -06:00
827fc67e52 Arduino refactor, default to fastmath and setup user_settings for user 2019-05-22 10:38:26 -06:00
ec4dad76e2 send protocol_version fatal alert message 2019-05-21 16:15:27 -07:00
295dd4ff21 send protocol_version fatal alert message 2019-05-21 16:08:25 -07:00
cb9e0a1973 SP - div word in C when __div64 or __div128 not available
Use WOLFSSL_SP_DIV_32 when using 32-bit C code.
Use WOLFSSL_SP_DIV_64 when using 64-bit C code.
2019-05-22 08:39:35 +10:00
c77b99a8a4 Merge pull request #2248 from kaleb-himes/ZD-5141
Fix for potential leak on err: Thanks to Chris H. for the report
2019-05-20 16:11:40 -06:00
04f24881cb Fix for potential leak on err: Thanks to Chris H. for the report 2019-05-17 16:48:58 -06:00
be65e31cdc Fixed possible buffer overflow in wc_DerToPemEx. 2019-05-17 19:23:55 +02:00
c85eae1322 Fixed resource leak in mp_gcd. 2019-05-17 18:38:19 +02:00
797dae9d74 Fixed use of uninitialized value in wc_ecc_sig_to_rs. 2019-05-17 18:04:39 +02:00
1ce8e227d2 Use TLS v1.3 PSK callback in extension allow for one call in client
New compile time option WOLFSSL_PSK_ONE_ID. Indicates one identity
available. No need for client to call callback when generating binder -
already cached.
2019-05-17 08:01:40 +10:00
245db5d5ce Expand Sniffer Logging
1. Moved the CopySessionInfo function to a better location for the additions.
2. Added accessors for a callback and application context data.
3. Added a callback that is called from ProcessClientKeyExchange when everything is known about the start of the current session.
4. Added the private key size and the server name indication to the SSLInfo record.
2019-05-16 14:09:20 -07:00
1781a9fd76 Sniffer Logging
1. Capture the SNI in the SSLInfo.
2. Save the private key length and capture it in the SSLInfo.
2019-05-16 10:57:45 -07:00
27a9080ac3 Removed dead code from _DhSetKey. 2019-05-16 16:58:41 +02:00
cae4d400b9 Removed dead code from wolfSSL_d2i_X509_fp_ex. 2019-05-16 16:54:40 +02:00
6ab24a2ca3 Fixed unintentional integer overflow in SetValidity. 2019-05-16 16:45:10 +02:00
3b544b8584 Fixed use of uninitialized value in wc_BufferKeyEncrypt. 2019-05-16 16:41:31 +02:00
7a9d3db514 Fixed use of uninitialized value in wc_BufferKeyDecrypt. 2019-05-16 16:37:31 +02:00
6c713e4b88 Fixed use of uninitialized values in wc_DhGenerateParams. 2019-05-16 16:31:12 +02:00
fd50248139 Fix for static RSA cipher suite (AES128-GCM-SHA256) with PK callbacks and no private key set. ZD 5092 2019-05-15 19:35:30 -07:00
651087ab5a Merge pull request #2241 from ejohnstown/sniffer
Sniffer Update
2019-05-15 18:52:44 -07:00
7a671eb70b Merge pull request #2243 from JacobBarthelmeh/Windows
custom ECC curves on Windows
2019-05-15 18:51:01 -07:00
aca46f42fb Merge pull request #2242 from ejohnstown/micrium
Micrium Updates
2019-05-15 15:43:37 -06:00
b2a5516c63 custom ECC curves on Windows 2019-05-15 11:31:26 -06:00
88bf5d9676 add sanity check on buffer index and regression tests
macro guards on use case and adjustment for memory size

gcc-8 warning fix

adjustement to default memory bucket sizes
2019-05-14 15:55:24 -06:00
3b0a7e679a Add an option for __inline w.r.t. using a GHC compiler. 2019-05-14 13:44:33 -07:00
5b658ebff5 Renamed #sslpro as #error. 2019-05-14 13:44:33 -07:00
0cdaf43a14 Rename the macro "STATIC" as "WC_STATIC" to prevent collisions. 2019-05-14 13:44:33 -07:00
a8b469eb7f Sniffer
1. Refactor `ProcessClientKeyExchange()` so it can be expanded to handle ECC keys for ECDH support.
2. Add support to the sniffer for ECDH based cipher suites.
2019-05-14 13:33:52 -07:00
10dde24363 Added support for SHOW_CERTS with OPENSSL_EXTRA_X509_SMALL for embedded debugging of certs. Minor build warning fixes with OPENSSL_EXTRA and STM32_HASH on IAR. 2019-05-14 09:24:59 -07:00
5aa5f350ba add sanity check on length of PSK identity 2019-05-13 17:16:10 -06:00
9d4d877919 Sniffer
1. Added the null-cipher to the list of supported bulk ciphers.
2019-05-13 11:29:14 -07:00
f923409f1f Merge pull request #2235 from kaleb-himes/ZD-5116
Check appropriate flag for private vs public - Thanks to: E.M.
2019-05-13 10:29:48 -07:00
dbeb5d702f Merge pull request #2231 from JacobBarthelmeh/Fuzzer
sanity check on buffer size
2019-05-10 16:46:38 -07:00
27e243085d Merge remote-tracking branch 'wolfSSL/master' 2019-05-10 13:04:18 +02:00
bf9f912b29 send handshake failure alert to a server 2019-05-09 17:01:36 -07:00
79bf578fd3 Check appropriate flag for private vs public - Thanks to: E.M. 2019-05-09 17:05:34 -06:00
e43e03c30a Merge pull request #2226 from tmael/defectEVP
Verify input parameters of EVP_CipherFinal
2019-05-09 14:35:16 -06:00
1605ab86d2 Verify input arguments and handle incorrect length of a final block 2019-05-09 08:32:52 -07:00
34dc41fe75 Merge pull request #2229 from JacobBarthelmeh/Testing
free any existing ke before updating
2019-05-09 11:48:59 +10:00
4e2e207e67 Add ARM32 asm code for X25519 and Ed25519
Improvements to performance of ARM64 code for X25519 and Ed25519
2019-05-09 09:23:58 +10:00
9205ee70f4 add null check on pointer before passing to XFREE 2019-05-08 16:04:20 -06:00
94d9ce1dfa sanity check on buffer size 2019-05-08 09:33:35 -06:00
ff5bf7aea1 Merge pull request #2230 from dgarske/bench_threads
Added benchmarking `-thread <num>` argument support
2019-05-07 11:21:29 -07:00
dcd6e02de9 Merge pull request #2228 from JacobBarthelmeh/Fuzzer
sanity check on buffer size before copy
2019-05-07 11:20:35 -07:00
a36296a959 Merge pull request #2227 from dgarske/eccsigsz
Fix issue with ECC signature size leaking memory with normal math
2019-05-07 11:17:12 -07:00
ade8f780a9 simplify to not expect null terminated strings 2019-05-07 11:11:41 -07:00
891a645eaa Added benchmarking -thread <num> argument support for asynchronous crypto to allow run-time selection of thread count. ZD 4903. 2019-05-07 07:07:56 -07:00
a130ce2eed free any existing ke before updating 2019-05-06 15:51:42 -06:00
b1442633dd sanity check on buffer size before copy 2019-05-06 15:36:58 -06:00
3c1569dff7 Fix for issue with new wc_ecc_get_curve_order_bit_count function not free'ing memory when used with normal math. Started in https://github.com/wolfSSL/wolfssl/pull/2201 2019-05-06 11:41:50 -07:00
683646e452 Merge pull request #2208 from SparkiDev/curve25519_arm
Curve25519 ARM64 assembly
2019-05-03 11:14:35 -07:00
08531a0f31 Merge pull request #2225 from dgarske/unicode
Remove leading unicode UTF-8 BOM characters
2019-05-03 11:12:06 -07:00
3e7a6054a9 Use the macro instead of sizeof() 2019-05-02 14:13:48 -07:00
06eba2c1e2 Removed a redundant check 2019-05-02 13:58:55 -07:00
1a76f0cd26 Remove leading unicode UTF-8[a] BOM characters (EF BB BF). Searched through repo and atmel.c was only one. 2019-05-02 13:21:43 -07:00
78c6ad4d84 Merge pull request #2217 from tmael/maintenanceOcspResponse
Fix for an OCSP Response signed by issuer
2019-05-02 10:14:01 -07:00
0dd3305f06 Merge pull request #2221 from SparkiDev/rfc8032
Support Ed25519ctx and Ed25519ph sign/verify algorithms
2019-05-01 15:45:03 -07:00
5e343b8e7e Merge pull request #2201 from dgarske/siglen
Improvements to the maximum ECC signature calculations
2019-05-01 15:42:12 -07:00
814c5776fd Merge pull request #2051 from dgarske/build_fixups
Fixes for various build issues
2019-05-01 15:41:14 -07:00
b25177ca6c Include new ARMv8 curve25519 C file in distribution 2019-05-01 13:23:06 +10:00
dc98832757 Add more tests for Ed25519ctx and Ed25519ph 2019-05-01 09:24:08 +10:00
dc313ccf6e Merge pull request #2222 from dgarske/win_dir
Fix for read directory functions with Windows
2019-04-30 15:19:34 -07:00
e00ba1c66a Merge pull request #2090 from vaintroub/fix_clang_cl
Disable MP_64BIT when compiling with clang-cl on Windows.
2019-04-30 13:36:39 -06:00
7cdda4d595 Merge pull request #2218 from abrahamsonn/iar
IAR-EWARM warning removal/formatting
2019-04-30 11:55:29 -07:00
86101468fc Fixes for know wolfSSL build issues in the following cases:
* Fixes for building wolfSSL from GitHub sources download, where .git does exist. The autogen.sh still needs to "touch" files for the build to work.
* Fix for FIPS case where `wc_RsaSetRNG` is not available.
* Added new `./configure --enable-usersettings` option to not populate the Makefile with build options and instead define `WOLFSSL_USER_SETTINGS` and expect a user provided `user_settings.h` file.
* Fix for `HAVE___UINT128_T` to match config.h generated value to eliminate warning.
2019-04-30 11:45:48 -07:00
443fef6a6a Further optimization of the ECC signature size calculation. 2019-04-30 08:50:19 -07:00
9d736898cc Support Ed25519 sign/verify algorithms ctx and ph 2019-04-30 16:57:20 +10:00
8aacd7b802 Fix for read directory functions with Windows (wc_ReadDirFirst and wc_ReadDirNext). Fix to use bit-mask check instead of equality. 2019-04-29 20:47:52 -07:00
b68253c180 Merge branch 'iar' of https://github.com/abrahamsonn/wolfssl into iar 2019-04-26 15:41:27 -06:00
ef29aa94ea Added build option checks to tls.c and tls13.c
Set tls.c and tls13.c to abort if the library is built with TLS 1.3 and not
HAVE_TLS_EXTENSIONS
2019-04-26 15:32:38 -06:00
ea797fd98e Building with just bare TLS 1.3 settings
will produce the error that the wolfSSL struct doesn't have extensions.
2019-04-26 14:08:20 -06:00
bbb72946b7 initialized var. 2019-04-26 11:35:50 -06:00
1830a0a74c Removed trailing whitespaces 2019-04-25 15:50:02 -06:00
45703a8d72 handle OCSP verified certificate which is already loaded as CA 2019-04-25 10:55:12 -07:00
fdabe614f8 Merge pull request #2215 from miyazakh/Renesas_IDE
Clean up user_settings for CS+
2019-04-24 15:55:01 -07:00
dfde631cb2 Free key at the end of the test 2019-04-24 11:49:53 -07:00
12a7c32530 Merge pull request #2170 from tmael/nRF52840CryptoCell
Initial CryptoCell-310 support on nRF52840
2019-04-24 11:09:46 -07:00
547c09e1d7 Merge pull request #2210 from JacobBarthelmeh/Compatibility-Layer-Part2
JSSE additions
2019-04-24 11:04:05 -07:00
a87552b37f Merge pull request #2213 from JacobBarthelmeh/HardwareAcc
add macro guards
2019-04-24 10:59:02 -07:00
edef75c70f Wrapped new unit test API with FIPS macros 2019-04-24 10:02:20 -07:00
6b51f2d5b2 Added unit test for wc_ecc_get_curve_id_from_dp_params 2019-04-23 16:45:52 -07:00
2a6ab9549b add macro guards 2019-04-23 13:51:58 -06:00
3e24212780 add sanity check on buffer size when copying public key 2019-04-23 13:42:49 -06:00
5d2f34aa6d Addressed review comments 2019-04-23 10:04:41 -07:00
34c1d5cba0 Cleanups and fixes for CryptoCell port:
* Protection for .c includes.
* Improved make pub memory issue reporting.
* README.md updates.
* Cleanup of user_settings.h.
2019-04-23 10:04:41 -07:00
6c65550eab Added CryptoCell-310 support
- SHA-256
- AES CBC
- CryptoCell 310 RNG
- RSA sign/verify and RSA key gen
- RSA encrypt/decrypt, decrypt inline
- ECC sign/verify/shared secret
- ECC key import/export and key gen pairs
- Hardware RNG and RTC of nRF52840 for benchmark timing source
- readme doc
2019-04-23 10:04:41 -07:00
90ce5c04dc Clean up user_settings for CS+ 2019-04-23 13:44:05 +09:00
f8c9285b92 Added a WOLFSSL_CIPHER_LIST_MAX_SIZE macro 2019-04-22 16:30:38 -07:00
393ca1b30c Increased test suite ciphers buffer size (ticket #5000))
Enhancement to support ECC domain param HEX string or unsigned bin comparison (ticket #5035)
2019-04-22 10:30:05 -07:00
de299848c1 initialize pubkey size to 0 2019-04-22 10:01:17 -06:00
82796d4b4c remove pubKeyX509 from WOLFSSL_X509 structure 2019-04-19 15:15:02 -06:00
29101a29c9 free key in test case, initialize variables fix, macro guard on iana use 2019-04-19 09:47:15 -06:00
ec2849b885 macro guard on EncodePolicyOID use 2019-04-18 14:56:24 -06:00
efc96e40d1 add test cases 2019-04-18 10:41:51 -06:00
378f5c0d4b Merge pull request #2204 from dgarske/server_fixups
Improvements to TLS write handling in error cases
2019-04-18 09:21:27 -07:00
b291b51988 adjust get pubkey from X509 2019-04-18 09:31:01 -06:00
e1537b2a56 add case CRL_DIST_OID and fix key usage check 2019-04-18 09:31:01 -06:00
e4555b5bf5 add wolfTLSv1_3_method() 2019-04-18 09:31:01 -06:00
abced6c365 place tls 1.3 suites at beginning of list and alter parse on set cipher list 2019-04-18 09:31:01 -06:00
b787465b42 adjust TLS 1.3 capable check 2019-04-18 09:31:01 -06:00
083183e3b1 add get cipher iana list and parse iana list 2019-04-18 09:31:01 -06:00
db1fabbdd4 add WOLFSSL set IO callbacks 2019-04-18 09:31:01 -06:00
6976219b05 add x509 TBS getter function 2019-04-18 09:31:01 -06:00
7da46501cc add certgen and certext to jni, add get timeout function 2019-04-18 09:31:01 -06:00
788443d3cf set initial buffer size 2019-04-18 09:31:01 -06:00
494e469dd2 implement wolfSSL_OBJ_txt2nid for OIDs 2019-04-18 09:31:01 -06:00
72f3329faa add wolfSSL_X509_verify function 2019-04-18 09:31:01 -06:00
bf3d876e6a getter function for X509 public key 2019-04-18 09:31:01 -06:00
0d3541594f Curve25519 ARM64 assembly
Also in a C file but use the assembly code file if possible.
2019-04-18 14:41:57 +10:00
2cf264a9d5 Merge pull request #2207 from ejohnstown/evp-init-fix
EVP Init Fix
2019-04-17 17:16:42 -07:00
3f8e0a67e6 Merge pull request #2206 from miyazakh/Renesas_IDE_CSPlus
Updated Renesas example projects as the latest version of sw use
2019-04-17 17:15:31 -07:00
3bf01072d8 EVP Init Fix
When calling wolfSSL_EVP_DigestInit() with an unsupported string, the
macType should be set to NONE, rather than ignored. In a particular
build combination, functions using that EVP could false the type because
of memory garbage. Just set it in the else case.
2019-04-17 14:04:00 -07:00
1ab5a022c6 updated as the latest version of sw use 2019-04-17 16:30:11 +09:00
5bfc49f63f Changed ECC_MAX_PAD_SZ to be overridable macro for rare case where user might require additional padding. 2019-04-15 14:56:04 -07:00
4ee4cb2068 Improved readability for ECC signature max size calculations. 2019-04-15 11:08:08 -07:00
013e4429da Merge pull request #2202 from SparkiDev/curve25519_asm_file
Curve25519 converted from inline assembly to asm only
2019-04-12 16:31:08 -07:00
3c63f70cde Merge pull request #2203 from dgarske/atmel_typo
Fix for typo in atmel PK callbacks
2019-04-12 15:00:49 -07:00
bd618970c1 Fixed API unit test for wc_ecc_sig_size to allow smaller result. 2019-04-12 12:36:20 -07:00
68390b1ba3 Improvement to wolfSSL_write to not allow for VERIFY_MAC_ERROR or DECRYPT_ERROR errors. This resolves possible end user application implentation issue where a wolfSSL_read failure isn't handled and a wolfSSL_write is done anyways. 2019-04-12 11:29:28 -07:00
364bf50a94 Fixed example server to not try and write on failure. 2019-04-11 11:30:41 -07:00
02500365bf Revert additional atmel.h changes for opaque types in PR #2199. 2019-04-11 06:15:39 -07:00
1d023b344d Fix for typo in atmel PK callbacks from PR #2199. 2019-04-11 06:02:37 -07:00
e5bf2ed1d1 Curve25519 converted from inline assembly to asm only
Fixed large values (top bit set) in tables to be negative as the type is
signed.
Put C++ protection around function prototypes in fe_operations.h.
2019-04-11 16:17:48 +10:00
ae9ef3998c Enable the TFM speedups when used with --enable-ecccustcurves=all and fastmath and x86. 2019-04-10 21:06:17 -07:00
1fffe4a463 Improvements to the maximum ECC signature claculations. The wc_ecc_sig_size function provides actual max based on curve order. The wc_ecc_sig_size_calc has also been adjusted to provide a more accurate maximum size. 2019-04-10 21:05:46 -07:00
b6fcbe8436 Merge pull request #2199 from dgarske/contiki_16bit
Fixes for PK callbacks on 16-bit and ATECC
2019-04-09 14:56:26 -07:00
35654530ba Merge pull request #2198 from SparkiDev/sp_cortex4_iar
Cortex-M code changed to support IAR compiler
2019-04-09 14:41:00 -07:00
173016ef47 Merge pull request #2196 from dgarske/stm32_aes_gcm
Improvement for STM32 GCM performance
2019-04-09 14:31:27 -07:00
13909fc407 Merge pull request #2190 from dgarske/telit
Port for Telit IoT AppZone SDK
2019-04-09 14:26:59 -07:00
a90001581e Fixes for PK callbacks and ATECC. Fixes for PK callbacks on 16-bit system where unsigned int* is used. Fix for ATECC PK callback functions. Fix for atmel_ecc_create_pms to free the used slot. 2019-04-09 08:15:01 -07:00
333b666f6b Fixups updated and IAR defines 2019-04-09 10:59:24 +10:00
9b62141580 Merge pull request #2197 from abrahamsonn/doxygen-update
Updated doxygen script
2019-04-08 15:24:02 -07:00
2c5f268f16 Port for Telit IoT AppZone SDK
* Added new `WOLFSSL_TELIT_M2MB` build option to enable support for RNG, Time, Mutex, FileSystem and Directory.
* Added `XTIME_MS` macro to simplify the tls13.c layer time requirement.
* Cleanup of the wolfCrypt benchmark and test printf remapping.
* Added wolfCrypt optional memory test enabled with `COMPLEX_MEM_TEST`.
* Added wolfCrypt test / benchmark feature for allowing "sleep" between long operations using `TEST_SLEEP()`.
* Fix for extern with `sp_ModExp_2048` when building with `--cpp` option.
2019-04-08 06:43:25 -07:00
4f75d4eea2 Cortex-M code changed to support IAR compiler 2019-04-08 09:03:50 +10:00
c78b0c3a40 Merge pull request #2194 from dgarske/testcerts
Fix for test certs script
2019-04-05 15:13:39 -07:00
bbf8ed408d Fix for LowResTimer function ptoto not matching for 16-bit system. 2019-04-05 14:56:02 -07:00
ce43044426 Improvement for STM32 GCM performance. ZD 4712. 2019-04-05 14:06:23 -07:00
5c8cf9ecd2 Merge pull request #2195 from ejohnstown/vswarn
Fix VS Warning
2019-04-05 13:40:24 -07:00
460556ff45 Updated doxygen script
Changed check_api.sh grep call to be more friendly across machines, prior call
wasn't properly reporting API mismatch on some machines
2019-04-05 13:46:35 -06:00
6a964123a1 Add a pragma to ignore a particular warning when compiling the fast math file for Windows. 2019-04-05 10:08:41 -07:00
f5f1fec840 Merge pull request #2193 from SparkiDev/hash_sha3
SHA-3 support in Hash
2019-04-05 09:04:33 -07:00
2ad80df1c7 Fix for ./certs/gen-testcerts.sh sometimes reporting: "start date is invalid, it should be YYMMDDHHMMSSZ or YYYYMMDDHHMMSSZ". 2019-04-05 09:01:44 -07:00
56d7766ba3 Merge pull request #2192 from SparkiDev/small_server
Fixes for small server build without client code
2019-04-05 06:18:57 -07:00
cc5ba81245 SHA-3 support in Hash 2019-04-05 14:52:23 +10:00
ad857c40d1 Fixes for small server build without client code 2019-04-05 09:38:14 +10:00
9c3cb2fbba Merge pull request #2176 from miyazakh/no_signature_algo
Add macro definition to disable signature algorithms extension
2019-04-04 15:35:00 -07:00
db83e6dd31 Merge pull request #2191 from ejohnstown/aesctr-sameio
AES-CTR In Place
2019-04-04 11:14:06 -07:00
f81446bf69 Fixed compiling error while enabling opensslextra 2019-04-04 10:04:09 +09:00
a59488b299 AES-CTR In Place
Added a temp AES block in case in and out are the same pointer.
2019-04-03 15:02:00 -07:00
b224f6fac9 Merge pull request #2181 from JacobBarthelmeh/Compatibility-Layer
update wolfSSL_i2d_RSAPrivateKey function
2019-04-03 09:16:10 -07:00
e13c903ad2 Merge pull request #2189 from dgarske/various_fixes
Various minor fixes
2019-04-02 09:21:31 -07:00
51251bc421 Fix for ssl23.h include for openssl compat with cyassl. 2019-04-01 11:10:29 -07:00
e4059a65b9 Merge pull request #2177 from dgarske/async_rel_v4
wolfSSL Asynchronous release v4 fixes
2019-04-01 11:07:12 -07:00
c7b5f772aa Add missing cert to include.am for make dist, which is required for ./gencertbuf.pl. 2019-04-01 10:09:34 -07:00
e8afb6ea51 Merge pull request #2174 from embhorn/zd4879
Fixes for static analysis issues
2019-04-01 08:48:40 -07:00
26cbfcdee0 Fix for AES GCM decrypt test with Async. 2019-04-01 05:58:44 -07:00
9ce32e3808 Merge pull request #2184 from ejohnstown/ecc-fix
Fix Clang Static-Analysis Finding
2019-04-01 05:46:22 -07:00
9ad48067f6 Merge pull request #2183 from miyazakh/sess_reuse_unitest
Add unit test for session resumption re-using WOLFSSL obj
2019-04-01 05:45:08 -07:00
817eaa6da4 protect compiling while enabling both WOLFSSL_TLS13 and WOLFSSL_NO_SIGALG 2019-03-30 10:41:57 +09:00
6c0989ba4d no_signature_algo 2019-03-30 10:41:40 +09:00
6d1a11eefb Clang static analysis found a potential issue when checking an ECC key
when the curve cache is enabled. There was a chance it could dereference
NULL. Added some error checks to fix it.
2019-03-29 13:35:27 -07:00
6968797848 fixed jenkins test failure 2019-03-30 01:35:35 +09:00
1c22f14d1c added unit test for session resumption re-using WOLFSSL obj 2019-03-29 20:13:41 +09:00
1906179a1b Fix for HAVE_ECC_CDH wolfCrypt test with async using the wrong size for x and y. With async the sizeof(sharedA) == 8 and it should be ECC_SHARED_SIZE. 2019-03-28 18:48:32 -07:00
b0d65d2a3e Remove remnant debug -Map from --with-intelqa build option. 2019-03-28 17:52:08 -07:00
7e9e50c03b Fix for Async TLS v1.3 wolfSSL_write with AES GCM offload. The args->idx was being incremented on the repeated call with BUILD_MSG_HASH state. 2019-03-28 17:52:08 -07:00
5b21da4dc5 Fix for SHA-3 runtime detection for not supported in hardware using NOT_COMPILED_IN. 2019-03-28 17:52:08 -07:00
d7c6683d9b Fix for latest QAT v1.7 detection. The qat library requires usdm_drv. 2019-03-28 17:52:08 -07:00
b599dc2b9d update wolfSSL_i2d_RSAPrivateKey function 2019-03-28 14:15:57 -06:00
9ea2dbea95 Merge pull request #2172 from dgarske/atecc
Fixes for ATECC support
2019-03-28 10:36:54 -07:00
cffe7eccde Fixes for high impact issues 2019-03-28 12:08:19 -05:00
b1c791dbd9 Merge pull request #2180 from miyazakh/wolfsslclean_fix
Initialized sendVerify when calling wolfSSL_clear
2019-03-27 23:32:41 -07:00
8c6316eb9c Merge pull request #2179 from kojo1/X509_STORE_CTX
X509_STORE_CTX_free compatibility
2019-03-27 17:17:26 -06:00
15c7463150 Merge pull request #2166 from SparkiDev/rsa_vfy_only
Fixes for RSA verify only builds
2019-03-27 12:01:14 -07:00
ed5feaf7ae Merge pull request #2173 from dgarske/custcurves
Added `--enable-ecccustcurves=all` option.
2019-03-27 10:19:08 -07:00
05987ec717 Initialized sendVerify when reseting WOLFSSL object 2019-03-27 10:18:43 +09:00
b40e0888ad Fixes for different build configurations 2019-03-26 08:06:19 +10:00
b24e122a0d Fixes for RSA verify only builds 2019-03-26 08:06:19 +10:00
7aa159ca6d Merge pull request #2157 from kojo1/ocsp_staple
Expose CheckResponse as wolfSSL_CertManagerCheckOCSP_Staple
2019-03-25 13:48:29 -07:00
f493ff859c Merge pull request #2178 from JacobBarthelmeh/Testing
add guard on test case for pkcs7 with no aes
2019-03-25 09:42:54 -07:00
6b325929e5 Merge pull request #2175 from kojo1/BN_init
add BN_init
2019-03-25 09:04:36 -06:00
3e42c6edcd remove sk_X509_free for compatibility 2019-03-24 16:57:08 +09:00
6c9e64129d move #include "ocsp.h" after #define WOLF_STACK_OF(x) 2019-03-23 08:03:45 +09:00
d9e6b8a62d Merge pull request #2168 from aaronjense/master
Remove NULL check before pub and priv have a chance to be set
2019-03-22 16:34:34 -06:00
3d747f7c87 add guard on test case for pkcs7 with no aes 2019-03-22 15:56:05 -06:00
744c247e92 change CheckOCSP_staple to OCSPResponse, move to ssl.h 2019-03-22 13:56:32 +09:00
441fb60679 fix cr 2019-03-22 09:40:55 +09:00
50a854c4cf Added --enable-ecccustcurves=all option. 2019-03-21 13:01:04 -07:00
f7a7a97f8c Fix to include the atmel.h with make install when using --with-cryptoauthlib. 2019-03-21 09:13:39 -07:00
f66aa60385 Fix for build warning with x/y always true when not building with ALT_ECC_SIZE. Fix for build error with undefined wc_ecc_sign_hash_ex when building ATECC and WOLFSSL_PUBLIC_MP. 2019-03-21 09:13:39 -07:00
e07e41d0aa Fix for building ATECC without ATCAPRINTF defined. 2019-03-21 09:13:39 -07:00
fed2bc5f72 Remove NULL check before pub and priv have a chance to be set 2019-03-18 13:18:04 -06:00
384b240ea2 minor fix in test_wolfSSL_BN(), api.c 2019-03-17 13:37:17 +09:00
6a3eccd344 add BN_init, working with tfm, only. 2019-03-17 13:28:04 +09:00
5e0a77704b argument check 2019-02-22 06:17:45 +09:00
801ef2c62c add wolfSSL_CertManagerCheckOCSP_Staple 2019-02-22 05:39:38 +09:00
28d8730948 exporse OcspEntry in asn.h 2019-02-22 05:20:54 +09:00
7328fce60d Disable MP_64BIT when compiling with clang-cl on Windows.
__attribute__ ((mode(TI))) does not really work on clang-cl,
linking would fail with "unresolved external symbol __udivti3",
as reported in https://bugs.llvm.org/show_bug.cgi?id=25305

Fix to use default case with 28bit digits on clang-Windows.
2019-02-14 23:18:51 +01:00
471 changed files with 275887 additions and 65873 deletions

14
.gitignore vendored
View File

@ -78,6 +78,7 @@ tests/unit
testsuite/testsuite.test
tests/unit.test
tests/bio_write_test.txt
test-write-dhparams.pem
testsuite/*.der
testsuite/*.pem
testsuite/*.raw
@ -295,6 +296,7 @@ Backup
UpgradeLog.htm
*.aps
*.VC.db
*.filters
IDE/INTIME-RTOS/Debug_*
IDE/VS-ARM/.vs
@ -321,3 +323,15 @@ doc/pdf
# XCODE Index
IDE/XCODE/Index
# ARM DS-5 && Eclipse
\.settings/
\.cproject
\.project
\.autotools
# Renesas e2studio
/IDE/Renesas/e2studio/Projects/test/src/smc_gen
/IDE/Renesas/e2studio/Projects/test/trash
/IDE/Renesas/e2studio/Projects/test/*.launch
/IDE/Renesas/e2studio/Projects/test/*.scfg

View File

@ -1,3 +1,321 @@
# wolfSSL Release 4.3.0 (12/20/2019)
If you have questions about this release, then feel free to contact us on our info@ address.
Release 4.3.0 of wolfSSL embedded TLS has bug fixes and new features including:
##### New Feature Additions
* Add --enable-libwebsockets option for support of libwebsockets build
* Updated support for NGINX 1.15.0 and added support for 1.16.1
* Add wc_scrypt_ex API which can take in iterations rather than cost
* Updates to RSA-PSS salt lengths. Macro WOLFSSL_PSS_SALT_LEN_DISCOVER allows for discovering the salt length. Passing RSA_PSS_SALT_LEN_DISCOVER value into wc_RsaPSS_Verify_ex attempts to discover salt length and can use larger salt lengths
* Additional OpenSSL compatibility API wolfSSL_CertManagerGetCerts and wolfSSL_X509_STORE_GetCerts for retrieving certificates
* Add support for 4096-bit RSA/DH operations to SP (single precision) build
* Update support for Google WebRTC to branch m79
* Adds new FREESCALE_MQX_5_0 macro for MQX 5.0 support
* Adds a CMS/PKCS#7 callback for signing SignedData raw digests enabled with macro HAVE_PKCS7_RSA_RAW_SIGN_CALLBACK and call to function wc_PKCS7_SetRsaSignRawDigestCb
* Add --disable-errorqueue feature to disable adding debug nodes to queue with --enable-opensslextra build
* After defining WOLFSSL_SHUTDOWNONCE macro the function wolfSSL_shutdown will return a specific error code of SSL_SHUTDOWN_ALREADY_DONE_E, to indicate to the application that the shutdown has already occurred
* Add AES-CCM decryption to benchmarking app bundled with wolfSSL
##### Fixes
* Fixes IAR warnings with IAR-EWARM 7.50.2
* Alignment fixes for mmCAU with AES and hashing algorithms
* Fix check for plaintext length when using Encrypt-Then-MAC
* Fix for unit tests with NGINX and debug mode
* Fix for macro names in test cases (WOLFSSL_PUBLIC_MP) and pkcs7.c (HAVE_AESCCM)
* Fix for Apache want read case with BIO retry flag
* Fix for PKCS7 streaming mode that would error rather than verify bundle
* Fix for freeing mutex for X509 and wolfSSL_EVP_PKEY_free, applies to OPENSSL_EXTRA / --enable-opensslextra builds
* Fix for encrypt then MAC when re-handshaking, encrypted handshakes change over to ETM now
* Fix for curve25519 assembly optimizations with GCC + AVX2
* Fix to hang onto certificate for retrieval if using secure renegotiation and session resumption
* Fixes case where the heap hint is created before WOLFSSL_CTX, when calling wc_LoadStaticMemory instead of wolfSSL_CTX_load_static_memory
* Fix for setting correct return value in PKCS12 parse error case
* Reset certificate extension policy count
* Fix for memcpy with TLS I/O buffers when using staticmemory pools and loading memory as WOLFMEM_IO_POOL_FIXED
* Fixes and updates for STM32 port, including additional mutex protection, AES-GCM decrypt auth tag, AES-CTR mode with CubeMX, update to OpenSTM32 project
* Fix for EVP CipherUpdate decrypt and add a test case
* DTLS fixes including; some DTLS sequence number issues in general where the sequence was incremented twice for each record and some offset values in the DTLS window checking
* Fix sp_add to handle carries properly (--enable-sp-math build)
* Additional sanity check on OCSP response decoder
* Fix for vasprintf with Solaris and AIX builds
* Fix for missing variable declaration with --enable-scep --with-libz build
* Fix for certificate date check with async build
* Sanity check on “out” length with Base64_Decode added
* Decode X.509 name - check input length for jurisdiction
* Additional sanity check on variable out index with DecodePolicyOID
* Fix for PKCS#12 PBKDF buffer size for buffer overflow
* TLS supported curve extension check curve name is in range before checking for disabled
* Sanity check for non TLS 1.3 cipher suite with TLS 1.3 connection
* Poly1305 AVX2 assembly optimization fix for carry with large input values
* Fixes for coverity report including null termination of test case strings and initialization of PKCS7 variables
* Fix for API visibility of wc_ed25519_check_key which resolves a wolfcrypt-py install issue
* Sanity check on max ALPN length accepted
* Additional sanity check when parsing CRLs for copying the structure, fix for bounds checking
* Additional checks on error string length for debug mode and check for null termination
* ProcessPeerCerts allocating memory for exts with OPENSSL_EXTRA properly
* Clear the top bit when generating a serial number
* Sanity check that ASN date characters are valid ASCII characters
* Fix to add deterministic ECDSA and fix corner cases for add point.
* When getting the DH public key, initialize the P, G, and Pub pointers to NULL, then set that we own the DH parameters flag. This allows FreeSSL to correctly clean up the DH key.
##### Improvements/Optimizations
* Added configure error report with using invalid build of --enable-opensslextra and --enable-opensslcoexist together
* Update PKCS11 for determining key type given the private key type
* Update DoVerifyCallback to check verify param hostName and ipasc (--enable-opensslextra builds)
* additional null sanity checks on input arguments with QSH and Cryptocell builds
* Additional checks on RSA key added to the function wc_CheckRsaKey
* Updates for EBSNET support, including fseek, revised macros in settings.h, and realloc support
* MISRA-C updates for SP math code
* Update to allow compiling for pwdbased/PBKDF2 with having NO_ASN defined
* Modify KeyShare and PreSharedKey TLS 1.3 extension linked list advancement to be easier for compilers to handle
* Optimization to parsing certificate extension name strings
* Adjustment to example server -x runtime behavior when encountering an unrecoverable error case
* Remove Blake2b support from HMAC
* Adds new hash wrapper init wc_HashInit_ex and Adds new PBKDF2 API wc_PBKDF2_ex for using heap hints for custom memory pools
* Adding script to cleanup generated test files, scripts/cleanup_testfiles.sh
* Support 20-byte serial numbers and disallow 0
* sp_div improved to handle when a has less digits than d (--enable-sp-math build)
* When decoding a policy OID and turning it into a human readable string use snprintf()
* set the IV length of EVP AES GCM to 96-bits by default
* Allow adding CAs for root CA's over the wire that do not have the extended key usage cert_sign set
* Added logging messages for SendAlert call and update to send alert after verify certificate callback
* updates for synchronous OCTEON support in the Sniffer
* Rework BER to DER functions to not be recursive
* Updates to find CRL by AuthKeyId
* Add a check for subject name hash after matching AKID
* Enhancement to mp_invmod/fp_exptmod/sp_exptmod to handle more inputs
* Remove requirement for macro NO_SKID when CRL use is enabled
* Improvements on XFTELL return code and MAX_WOLFSSL_FILE_SIZE checking
* When checking if value is prime return NO in the case of the value 1
* Improve Cortex-M RSA/DH assembly code performance
* Additional sanity checks on arrays and buffers with OCSP
##### This release of wolfSSL includes a fix for 6 security vulnerabilities.
A fix for having an additional sanity check when parsing certificate domain names was added. This fix checks that the domain name location index is not past the maximum value before setting it. The reported issue affects users that are parsing certificates and have --enable-opensslextra (macro OPENSSL_EXTRA), or build options that turn this on such as --enable-all, when building wolfSSL. The CVE associated with the fix is CVE-2019-18840.
Fix to set a limit on the maximum size of DTLS handshake messages. By default the RFC allows for handshake message sizes of up to 2^24-1 bytes long but in typical field use cases the handshake messages are not this large. Setting a maximum size limit on the handshake message helps avoid a potential DoS attack due to memory being mallocd. The new default max size is set to handle a certificate chain length of approximately 9, 2048 bit RSA certificates. This only effects builds that have DTLS turned on and have applications that are using DTLS.
Fix for a potential hang when ECC caching is enabled (off by default) and --enable-fastmath is used. ECC caching is off by default and is turned on in builds that are using --enable-all or --enable-fpecc. This issue does not affect builds that are using the macro WOLFSSL_VALIDATE_ECC_IMPORT which turns on validating all ECC keys that are imported. To fix this potential hang case a sanity check on the input values to the internal invmod function was added.
To fix a potential fault injection attack on a wrapper function for wolfCrypt RSA signature generations an additional sanity check verifying the signature after its creation was added. This check is already done automatically in current versions of wolfSSL with TLS connections (internal function call of VerifyRsaSign during TLS state machine). The report only affects users making calls to the wolfCrypt function wc_SignatureGenerateHash and does not affect current TLS use cases. Thanks to Daniel Moghimi (@danielmgmi) from Worcester Polytechnic Institute for the report.
Blinding was added for DSA signing operations. The DSA signing uses the BEEA algorithm during modular inversion of the nonce which can potentially leak the nonce through side channels such as cache and power fluctuations. The fix of adding in blinding makes the DSA signing operation more resistant to side channel attacks. Users who have turned on DSA (disabled by default) and are performing signing operations should update. Note that DSA is not used in any TLS connections. Thanks to Daniel Moghimi (@danielmgmi) from Worcester Polytechnic Institute for the report.
Fix to add additional side channel cache attack resistance to the internal ECC function wc_ecc_mulmod_ex. This function by default is used with ECDSA signing operations. Users should update if performing ECDSA singing operations (server side ECC TLS connections, mutual authentication on client side) or calling wolfCrypt ECC sign functions and have the potential for outside users to perform sophisticated monitoring of the cache.Thanks to Daniel Moghimi (@danielmgmi) from Worcester Polytechnic Institute for the report.
For additional vulnerability information visit the vulnerability page at https://www.wolfssl.com/docs/security-vulnerabilities/
See INSTALL file for build instructions.
More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
# wolfSSL Release 4.2.0 (10/22/2019)
If you have questions about this release, then feel free to contact us on our info@ address.
Release 4.2.0 of wolfSSL embedded TLS has bug fixes and new features including:
##### New Feature Additions
* Over 198 OpenSSL compatibility APIs added
* Apache port added for compiling with wolfSSL using --enable-apachehttpd
* Port for using wolfSSL with OpenVSwitch
* Port for Renesas TSIP added
* Visual Studio Solution for Azure Sphere Devices (MT3620 and MT3620-mini) added to the directory IDE/VS-AZURE-SPHERE
* Addition of Coldfire MCF5441X NetBurner example to the directory IDE/M68K/
* Added support for prime checking to SP math build
* Addition of DYNAMIC_TYPE_BIGINT type for tracking mp_int allocations
* Addition of wc_ecc_get_curve_params API for getting ecc_set_type params for a curve
* Adding in TLS_SHA256_SHA256 and TLS_SHA384_SHA384 TLS1.3 cipher suites (null ciphers)
* Added in PKCS7 decryption callbacks for CMS operations
* Added handling for optional ECC parameters with PKCS7 KARI
* Addition to configure.ac for FIPS wolfRand builds
* Adding the flag WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY for ignoring certificate date checks with the functions wolfSSL_CTX_load_verify_buffer_ex and wolfSSL_CTX_load_verify_locations_ex
* Support for PKCS8 keys added to the function wolfSSL_CTX_use_PrivateKey_buffer
* Support for KECCAK hashing. Build with macro WOLFSSL_HASH_FLAGS and call wc_Sha3_SetFlags(&sha, WC_HASH_SHA3_KECCAK256) before the first SHA3 update
* Addition of setting secure renegotiation at CTX level
* Addition of KDS (NXP Kinetis Design Studio) example project to directory IDE/KDS/
* Support for Encrypt-Then-MAC to TLS 1.2 and below
* Added a new build option for a TITAN session cache that can hold just over 2 million session entries (--enable-titancache)
* Synchronous Quick Assist Support for Sniffer
* Added Support for SiFive HiFive Unleashed board
* Support for Google WebRTC added in to compatibility layer build
* Additional Sniffer features; IPv6 sniffer support, Fragment chain input, Data store callback, Various statistics tweaks and other Sniffer fixes
##### Fixes
* Addition of internal content digest checks for PKCS7 SignedData message types that also have signed attributes present. Users could previously check the content digest against the messageDigest attribute, but this adds a default internal check. Its advised that if users are not doing their own checks that they update wolfSSL version.
* A fix for BIO and base64 encoding/decoding
* A fix for memory management of CTX / WOLFSSL_METHOD pointer with staticmemory build
* A fix for detection of AES-NI support to read bit 25 from ECX
* A fix a DTLS handshake message retransmit bug corner case
* Additional fixes to coding style and uninitialized values using cppcheck tool
* Fixes for failing IAR builds, thanks to Joseph C. for the report
* Fixes for ARMv8 Poly1305 inline assembly code to compile with clang 3.5
* Fixes for esp-idf build warnings
* A fix for XSNPRINTF with mingw32 builds
* Fixes for strncpy warnings when compiling with newer versions of GCC
* A fix for using IV of all 0s as default case with AES-NI when no IV passed in
* Fixes for types with 16 bit systems, thanks to Ralf Schlatterbeck
* Fixes for build with devcrypto/afalg and aesccm, thanks to GitHub user cotequeiroz for the report
* Fixes for addressing handling of pathLen constraint when parsing certificate chains
* A DTLS fix for alert packet injection at end of handshake
* Fixes for Poly1305 AArch64 assembly code
* A fix for memory management in error cases when adding a CA, this resolves a coverity report
* A fix for SP math for precomputation tables to not include infinity field
* Fixes for checks on defines with AVX2 and Poly1305 build
* Fixes for CubeMX HAL v1.15 with STM32F7
* A fix for TLS 1.3 to always send Key Share extension
* A fix for a potential buffer over read in TLS 1.3 DoTls13SupportedVersions, thanks to Artem for the report
##### Improvements/Optimizations
* Optimization to SP math, changing variables to const where possible. Thanks to Yair Poleg (yair.poleg@ayyeka.com) of Ayyeka for proposing static declaration of global constant variables in SP code
* Additional fuzz testing and fixes for TLS 1.3 use, including additional TLS 1.3 alert messages (PR#2440 for more information)
* Additional sanity check that ciphersuite from client hello is used in server hello response (check can be removed with the macro WOLFSSL_NO_STRICT_CIPHER_SUITE)
* Improved MMCAU performance: SHA-1 by 35%, SHA-256 by 20% and MD5 by 78%
* By default, disallow SHA-2 cipher suites from being used in TLS 1.0 and 1.1 handshakes (can be ignored with macro WOLFSSL_OLDTLS_SHA2_CIPHERSUITES)
* Optimization of export session buffer size with enable option --enable-sessionexport=nopeer
* Spelling fixes in comments and some cast warnings resolved
* Updates to abstract atoi to XATOI when used, this allows for better portability when making calls to the system function atoi for converting strings to integers
* Improvements to the STSAFE-A100 error code handling, providing better debug information
* Adding a sanity check on TLS 1.3 ticket encrypt callback
* Specialized implementations of mod exp when base is 2
##### This release of wolfSSL includes a fix for 5 security vulnerabilities.
Fix for sanity check on reading TLS 1.3 pre-shared key extension. This fixes a potential for an invalid read when TLS 1.3 and pre-shared keys is enabled. Users without TLS 1.3 enabled are unaffected. Users with TLS 1.3 enabled and HAVE_SESSION_TICKET defined or NO_PSK not defined should update wolfSSL versions. Thanks to Robert Hoerr for the report.
Fix for potential program hang when ocspstapling2 is enabled. This is a moderate level fix that affects users who have ocspstapling2 enabled(off by default) and are on the server side. In parsing a CSR2 (Certificate Status Request v2 ) on the server side, there was the potential for a malformed extension to cause a program hang. Thanks to Robert Hoerr for the report.
Two moderate level fixes involving an ASN.1 over read by one byte. CVE-2019-15651 is for a fix that is due to a potential one byte over read when decoding certificate extensions. CVE-2019-16748 is for a fix on a potential one byte overread with checking certificate signatures. This affects builds that do certificate parsing and do not have the macro NO_SKID defined.Thanks to Yan Jia and the researcher team from Institute of Software, Chinese Academy of Sciences for the report.
High level fix for DSA operations involving an attack on recovering DSA private keys. This fix affects users that have DSA enabled and are performing DSA operations (off by default). All users that have DSA enabled and are using DSA keys are advised to regenerate DSA keys and update wolfSSL version. ECDSA is NOT affected by this and TLS code is NOT affected by this issue. Thanks to Ján Jančár for the report.
For additional vulnerability information visit the vulnerability page at https://www.wolfssl.com/docs/security-vulnerabilities/
See INSTALL file for build instructions.
More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
# wolfSSL Release 4.1.0 (07/22/2019)
Release 4.1.0 of wolfSSL embedded TLS has bug fixes and new features including:
* A fix for the check on return value when verifying PKCS7 bundle signatures, all users with applications using the function wc_PKCS7_VerifySignedData should update
* Adding the function wc_PKCS7_GetSignerSID for PKCS7 firmware bundles as a getter function for the signers SID
* PKCS7 callback functions for unwrapping of CEK and for decryption
* Adding the error value PKCS7_SIGNEEDS_CHECK when no certificates are available in a PKCS7 bundle to verify the signature
* TLS 1.3 fixes including if major version is TLS Draft then it is now ignored and if version negotiation occurs but none were matched then an alert is now sent
* Addition of the WOLFSSL_PSK_ONE_ID macro for indicating that only one identity in TLS 1.3 PSK is available and will be cached
* Adding sanity checks on length of PSK identity from a TLS 1.3 pre-shared key extension
* Additional sanity checks and alert messages added for TLS 1.3
* Adding XTIME_MS macro to simplify the tls13.c time requirement
* Improvements and refactoring of code related to parsing and creating TLS 1.3 client hello packets
* TLS 1.3 version renegotiation now happens before interpreting ClientHello message
* Chacha20 algorithm optimizations on the ARM architecture for performance increase
* Poly1305 algorithm performance enhancements for the ARM architecture using the SIMD NEON extension
* Curve25519 and Ed25519 optimized for ARM architecture for performance increase
* SHA-512/384 optimizations for performance with ARM architecture using the SIMD NEON extension
* Sniffer updates including adding support for the null cipher and static ECDH key exchange and new SSLWatchCb callback
* Cipher suite TLS_RSA_WITH_NULL_MD5 for use with the sniffer (off by default)
* Sniffer statistic print outs with the macro WOLFSSL_SNIFFER_STATS defined
* A fix for wolfSSL_DH_generate_key when WOLFSSL_SMALL_STACK is defined
* wolfSSL_BN_Init implementation for opensslextra builds
* Updates to the function wolfSSL_i2d_RSAPrivateKey and additional automated tests
* Fixes for EVP_CipherFinal edge cases to match behavior desired
* Check for appropriate private vs public flag with ECC key decode in wolfSSL_EC_KEY_LoadDer_ex, thanks to Eric Miller for the report
* Implementation of the function wolfSSL_PEM_write_DHparams
* wolfSSL_RAND_seed is called in wolfSSL_Init now when opensslextra is enabled
* CryptoCell-310 support on nRF52840 added
* Fixes for atmel_ecc_create_pms to free the used slot.
* Fixes for building ATECC with ATCAPRINTF or WOLFSSL_PUBLIC_MP
* Cortex-M code changes to support IAR compiler
* Improvements to STM32 AES-GCM performance
* Fixes for 16-bit systems including PK callbacks, ATECC and LowResTimer function ptoto.
* IAR-EWARM compiler warning fix
* Clean up of user_settings for CS+ port
* Updating Renesas example projects to the latest version
* Micrium updates adjusting STATIC macro name and added inline flag
* Fixes for building with WOLFSSL_CUSTOM_CURVES on Windows
* Updates and refactor to the default build settings with Arduino
* Fixes for visibility tags with Cygwin build
* STSAFE Improvements to support wolfSSL Crypto Callbacks
* Improvements to NetBSD builds and mutex use in test case
* Updating TI hardware offload with WOLFSSL_TI_CRYPT build
* Maintaining Xilinx FreeRTOS port by adjusting time.h include in wolfSSL
* SiFive HiFive E31 RISCV core family port
* Port for Telit IoT AppZone SDK
* OCSP Response signed by issuer with identical SKID fix
* Fix for sending revoked certificate with OCSP
* Honor the status sent over connection with peers and do not perform an internal OCSP lookup
* Adding the build flag `--enable-ecccustcurves=all` to enable all curve types
* Support add for Ed25519ctx and Ed25519ph sign/verify algorithms as per RFC 8032
* Addition of the macro WOLFSSL_NO_SIGALG to disable signature algorithms extension
* wc_AesCtrEncrypt in place addition, where input and output buffer can be the same buffer
* Single shot API added for SHA3; wc_Sha3_224Hash, wc_Sha3_256Hash, wc_Sha3_384Hash, wc_Sha3_512Hash
* Function additions for JSSE support some of which are wolfSSL_get_ciphers_iana and wolfSSL_X509_verify along with expansion of the --enable-jni option
* Macro guards for more modular SHA3 build (i.e. support for 384 size only)
* Benchmarking -thread <num> argument support for asynchronous crypto
* Blake2s support (--enable-blake2s), which provides 32-bit Blake2 support
* Macro SHA256_MANY_REGISTERS addition to potentially speed up SHA256 depending on architecture
* Additional TLS alert messages sent with the macro WOLFSSL_EXTRA_ALERTS defined
* Feature to fail resumption of a session if the sessions cipher suite is not in the clients list, this can be overridden by defining the macro NO_RESUME_SUITE_CHECK
* Fallback SCSV (Signaling Cipher Suite Value) support on Server only (--enable-fallback-scsv)
* DTLS export state only (wolfSSL_dtls_export_state_only) which is a subset of the information exported from previous DTLS export function
* Function wc_DhCheckPubValue added to perform simple validity checks on DH keys
* Support for RSA SHA-224 signatures with TLS added
* Additional option “-print” to the benchmark app for printing out a brief summary after benchmarks are complete
* Adding (--disable-pkcs12) option and improvements for disabled sections in pwdbased.c, asn.c, rsa.c, pkcs12.c and wc_encrypt
* Added DES3 support to the wolfSSL crypto callbacks
* Compile time fixes for build case with SP math and RSA only
* Fixes for Coverity static analysis report including explicit initialization of reported stack variables some additional Coverity fixes added thanks to Martin
* Fixes for scan build warnings (i.e possible null dereference in ecc.c)
* Resetting verify send value with a call to wolfSSL_clear function
* Fix for extern with sp_ModExp_2048 when building with --cpp option
* Fix for typo issue with --enable-sp=cortexm
* Adding #pragma warning disable 4127 for tfm.c when building with Visual Studio
* Improvements to the maximum ECC signature calculations
* Improvements to TLS write handling in error cases which helps user application not go through with a wolfSSL_write attempt after a wolfSSL_read failure
* Fix for read directory functions with Windows (wc_ReadDirFirst and wc_ReadDirNext)
* Sanity check on index before accessing domain component buffer in call to wolfSSL_X509_NAME_get_entry
* Sending fatal alert from client side on version error
* Fix for static RSA cipher suite with PK callback and no loaded private key
* Fix for potential memory leak in error case with the function wc_DsaKeyToDer, thanks to Chris H. for the report
* Adjusting STRING_USER macro to remove includes of standard lib <string.h> or <stdio.h>
* Bug fix for checking wrong allocation assignment in the function wc_PBKDF2 and handling potential leak on allocation failure. This case is only hit when the specific call to malloc fails in the function wc_PBKDF2. Thanks to Robert Altnoeder (Linbit) for the report
* Improved length checks when parsing ASN.1 certificates
* extern "C" additions to header files that were missing them
* Improved checking of return values with TLS extension functions and error codes
* Removing redundant calls to the generate function when instantiating and reseeding DRBG
* Refactoring and improvements to autoconf code with consolidating AM_CONDITIONAL statements
* Improvements for handling error return codes when reading input from transport layer
* Improvements to efficiency of SNI extension parsing and error checking with ALPN parsing
* Macro WOLFSSL_DEBUG_TLS addition for printing out extension data being parsed during a TLS connection
* Adjustment of prime testing with --disable-fastmath builds
This release of wolfSSL includes a fix for 2 security vulnerabilities.
There is a fix for a potential buffer overflow case with the TLSv1.3 PSK extension parsing. This affects users that are enabling TLSv1.3 (--enable-tls13). Thanks to Robert Hoerr for the report. The CVE associated with the report is CVE-2019-11873.
There is a fix for the potential leak of nonce sizes when performing ECDSA signing operations. The leak is considered to be difficult to exploit but it could potentially be used maliciously to perform a lattice based timing attack against previous wolfSSL versions. ECC operations with --enable-sp and --enable-sp-asm are not affected, users with private ECC keys in other builds that are performing ECDSA signing operations should update versions of wolfSSL along with private ECC keys. Thanks to Ján Jančár from Masaryk University for the report.
# wolfSSL Release 4.0.0 (03/20/2019)
Release 4.0.0 of wolfSSL embedded TLS has bug fixes and new features including:

View File

@ -12,9 +12,18 @@ wolfssl/IDE/ARDUINO directory:
`./wolfssl-arduino.sh`
Step 2: Copy the directory wolfSSL that was just created to:
`~/Documents/Arduino/libraries/` directory so the Arduino IDE can find it.
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`.
Step 3: Edit `<arduino-libraries>/wolfSSL/user_settings.h`
If building for Intel Galileo platform add: `#define INTEL_GALILEO`.
Add any other custom settings, for a good start see the below in wolfssl root.
(See wolfssl/IDE/ROWLEY-CROSSWORKS-ARM/user_settings.h)
Step 4: If you experience any issues with custom user_settings.h see the wolfssl
porting guide here for more assistance: https://www.wolfssl.com/docs/porting-guide/
Step 5: If you still have any issues contact support@wolfssl.com for more help.
##### Including wolfSSL in Arduino Libraries (for Arduino version 1.6.6)

View File

@ -6,6 +6,10 @@
DIR=${PWD##*/}
space(){
echo "" >> "$1"
}
if [ "$DIR" = "ARDUINO" ]; then
rm -rf wolfSSL
mkdir wolfSSL
@ -22,14 +26,43 @@ if [ "$DIR" = "ARDUINO" ]; then
mkdir ./wolfSSL/wolfcrypt
mkdir ./wolfSSL/wolfcrypt/src
cp ../../wolfcrypt/src/misc.c ./wolfSSL/wolfcrypt/src
cp ../../wolfcrypt/src/asm.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 "/* 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
echo "/* Generated wolfSSL user_settings.h file for Arduino */" > ./wolfSSL/user_settings.h
echo "#ifndef ARDUINO_USER_SETTINGS_H" >> ./wolfSSL/user_settings.h
echo "#define ARDUINO_USER_SETTINGS_H" >> ./wolfSSL/user_settings.h
space wolfSSL/user_settings.h
echo "/* Platform */" >> ./wolfSSL/user_settings.h
echo "#define WOLFSSL_ARDUINO" >> ./wolfSSL/user_settings.h
space wolfSSL/user_settings.h
echo "/* Math library (remove this to use normal math)*/" >> ./wolfSSL/user_settings.h
echo "#define USE_FAST_MATH" >> ./wolfSSL/user_settings.h
echo "#define TFM_NO_ASM" >> ./wolfSSL/user_settings.h
space wolfSSL/user_settings.h
echo "/* RNG DEFAULT !!FOR TESTING ONLY!! */" >> ./wolfSSL/user_settings.h
echo "/* comment out the error below to get started w/ bad entropy source" >> ./wolfSSL/user_settings.h
echo " * This will need fixed before distribution but is OK to test with */" >> ./wolfSSL/user_settings.h
echo "#error \"needs solved, see: https://www.wolfssl.com/docs/porting-guide/\"" >> ./wolfSSL/user_settings.h
echo "#define WOLFSSL_GENSEED_FORTEST" >> ./wolfSSL/user_settings.h
space wolfSSL/user_settings.h
echo "#endif /* ARDUINO_USER_SETTINGS_H */" >> ./wolfSSL/user_settings.h
cp wolfSSL/wolfssl/wolfcrypt/settings.h wolfSSL/wolfssl/wolfcrypt/settings.h.bak
echo " /* wolfSSL Generated ARDUINO settings */" > ./wolfSSL/wolfssl/wolfcrypt/settings.h
echo "#ifndef WOLFSSL_USER_SETTINGS" >> ./wolfSSL/wolfssl/wolfcrypt/settings.h
echo " #define WOLFSSL_USER_SETTINGS" >> ./wolfSSL/wolfssl/wolfcrypt/settings.h
echo "#endif /* WOLFSSL_USER_SETTINGS */" >> ./wolfSSL/wolfssl/wolfcrypt/settings.h
echo " /* wolfSSL Generated ARDUINO settings: END */" >> ./wolfSSL/wolfssl/wolfcrypt/settings.h
cat ./wolfSSL/wolfssl/wolfcrypt/settings.h.bak >> ./wolfSSL/wolfssl/wolfcrypt/settings.h
else
echo "ERROR: You must be in the IDE/ARDUINO directory to run this script"
fi

116
IDE/CRYPTOCELL/README.md Normal file
View File

@ -0,0 +1,116 @@
# ARM® TrustZone® CryptoCell 310 Port
## Overview
ARM® TrustZone® CryptoCell 310 is a security subsystem which provides root of trust (RoT) and cryptographic services for a device.
You can enable the wolfSSL support for ARM CryptoCell using the `#define WOLFSSL_CRYPTOCELL`, The CryptoCell APIs are distributed as part of the Nordic nRF5 SDKs [here](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fgroup__cryptocell__api.html) .
## Prerequisites
1. Follow the Nordic website [here](https://www.nordicsemi.com/Software-and-Tools/Software/nRF5-SDK) to download the Nordic nRF5-SDK and software tools.
2. Install the SEGGER Embedded Studio IDE.
3. Run a simple blinky application on your Nordic nRF52840 (PCA10056) development board to confirm that your board functions as expected and the communication between your computer and the board works.
## Usage
You can start with a wolfcrypt SEGGER embedded studio (ses) example project to integrate the wolfSSL source code.
wolfSSL supports a compile-time user configurable options in the `IDE/CRYPTOCELL/user_settings.h` file.
The `IDE/CRYPTOCELL/main.c` example application provides a function to run the selected examples at compile time through the following two #defines in user_settings.h. You can define these macro options to disable the test run.
```
- #undef NO_CRYPT_TEST
- #undef NO_CRYPT_BENCHMARK
```
## Supported features
- SHA-256
- AES CBC
- CryptoCell 310 RNG
- RSA sign/verify and RSA key gen
- RSA encrypt/decrypt
- ECC sign/verify/shared secret
- ECC key import/export and key gen pairs
- Hardware RNG
- RTC for benchmark timing source
## Setup
### Setting up Nordic SDK with wolfSSL
1. Download the wolfSSL source code or a zip file from GitHub and place it under your SDK `InstallFolder/external/` directory. You can also copy or simlink to the source.
```
For example,
$cd ~/nRF5_SDK_15.2.0_9412b96/external
$git clone --depth=1 https://github.com/wolfSSL/wolfssl.git
Or, assuming you have already cloned the wolfSSL source code under ~/wolfssl.
$cd ~/nRF5_SDK_15.2.0_9412b96/external
$ln -s ~/wolfssl wolfssl
```
2. Copy the example project from [here](https://github.com/tmael/nRF5_SDK/tree/master/examples/crypto/nrf_cc310/wolfcrypt) into your `nRF5_SDK_15.2.0_9412b96/examples/crypto/nrf_cc310/` directory.
```
$git clone https://github.com/tmael/nRF5_SDK.git
$cd ~/nRF5_SDK_15.2.0_9412b96/examples/crypto/nrf_cc310
$cp -rf ~/nRF5_SDK/examples/crypto/nrf_cc310/wolfcrypt .
OR
$ln -s ~/nRF5_SDK/examples/crypto/nrf_cc310/wolfcrypt wolfcrypt
```
3. Launch the SEGGER Embedded Studio IDE
4. In the main menu, go to File >Open Solutions to open the example solution. Browse to the location containing the wolfcrypt code `/examples/crypto/nrf_cc310/wolfcrypt/pca10056/blank/ses/wolfcrypt_pca10056.emProject` and choose Open.
## Building and Running
In the main menu, go to Build > Rebuild your project, then load and run your image on your nRF52840 target platform. Review the test results on the console output.
### `wolfcrypt_test()`
wolfcrypt_test() prints a message on the target console similar to the following output:
```
wolfCrypt Test Started
error test passed!
base64 test passed!
asn test passed!
SHA test passed!
SHA-256 test passed!
Hash test passed!
HMAC-SHA test passed!
HMAC-SHA256 test passed!
AES test passed!
RANDOM test passed!
RSA test passed!
ECC test passed!
ECC buffer test passed!
logging test passed!
mutex test passed!
wolfCrypt Test Completed
```
### `benchmark_test()`
benchmark_test() prints a message on the target console similar to the following output.
```
Benchmark Test Started
------------------------------------------------------------------------------
wolfSSL version 3.15.7
------------------------------------------------------------------------------
wolfCrypt Benchmark (block bytes 1024, min 1.0 sec each)
RNG 5 MB took 1.000 seconds, 4.858 MB/s
AES-128-CBC-enc 17 MB took 1.001 seconds, 17.341 MB/s
AES-128-CBC-dec 17 MB took 1.000 seconds, 17.285 MB/s
SHA 425 KB took 1.040 seconds, 408.654 KB/s
SHA-256 26 MB took 1.000 seconds, 25.903 MB/s
HMAC-SHA 425 KB took 1.049 seconds, 405.148 KB/s
HMAC-SHA256 24 MB took 1.000 seconds, 23.877 MB/s
RSA 1024 key gen 2 ops took 1.579 sec, avg 789.500 ms, 1.267 ops/sec
RSA 2048 key gen 1 ops took 9.695 sec, avg 9695.000 ms, 0.103 ops/sec
RSA 2048 public 328 ops took 1.001 sec, avg 3.052 ms, 327.672 ops/sec
RSA 2048 private 4 ops took 1.713 sec, avg 428.250 ms, 2.335 ops/sec
ECC 256 key gen 55 ops took 1.017 sec, avg 18.491 ms, 54.081 ops/sec
ECDHE 256 agree 56 ops took 1.017 sec, avg 18.161 ms, 55.064 ops/sec
ECDSA 256 sign 50 ops took 1.004 sec, avg 20.080 ms, 49.801 ops/sec
ECDSA 256 verify 48 ops took 1.028 sec, avg 21.417 ms, 46.693 ops/sec
Benchmark Test Completed
```
## References
The test results were collected from an nRF52840 reference platform target with the following software and tool chains:
- Nordic nRF52840 development board (PCA10056 1.0.0 2018.49 683529999).
- nRF5_SDK_15.2.0_9412b96
- SEGGER Embedded Studio for ARM, Release 4.12 Build 2018112601.37855 Linux x64Segger J-Link software
- gcc-arm-none-eabi-8-2018-q4-major
- wolfssl [latest version](https://github.com/wolfSSL/wolfssl)
For more information or questions, please email [support@wolfssl.com](mailto:support@wolfssl.com)

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/CRYPTOCELL/README.md \
IDE/CRYPTOCELL/main.c \
IDE/CRYPTOCELL/user_settings.h

64
IDE/CRYPTOCELL/main.c Normal file
View File

@ -0,0 +1,64 @@
/* main.c
*
* Copyright (C) 2019 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 <wolfcrypt/test/test.h>
#include <wolfcrypt/benchmark/benchmark.h>
/* wolfCrypt_Init/wolfCrypt_Cleanup to turn CryptoCell hardware on/off */
#include <wolfssl/wolfcrypt/wc_port.h>
/* SEGGER_RTT_Init, you can potential replace it with other serial terminal */
#include "SEGGER_RTT.h"
int main(void)
{
int ret;
SEGGER_RTT_Init();
if ((ret = wolfCrypt_Init()) != 0) {
printf("wolfCrypt_Init failed %d\n", ret);
return -1;
}
#ifndef NO_CRYPT_TEST
printf("\nwolfCrypt Test Started\n");
wolfcrypt_test(NULL);
printf("\nwolfCrypt Test Completed\n");
#endif
#ifndef NO_CRYPT_BENCHMARK
printf("\nBenchmark Test Started\n");
benchmark_test(NULL);
printf("\nBenchmark Test Completed\n");
#endif
if ((ret = wolfCrypt_Cleanup()) != 0) {
printf("wolfCrypt_Cleanup failed %d\n", ret);
return -1;
}
while(1) {
__WFI();
}
return 0;
}

View File

@ -0,0 +1,589 @@
/* user_settings.h
*
* Copyright (C) 2019 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
*/
/* Example Settings for CryptoCell */
#ifndef WOLFSSL_USER_SETTINGS_H
#define WOLFSSL_USER_SETTINGS_H
#ifdef __cplusplus
extern "C" {
#endif
/* ------------------------------------------------------------------------- */
/* CryptoCell */
/* ------------------------------------------------------------------------- */
#if 1
#define WOLFSSL_CRYPTOCELL
#define WOLFSSL_nRF5x_SDK_15_2 /* for benchmark timer */
#define WOLFSSL_CRYPTOCELL_AES /* only CBC mode is supported */
#else
/* run without CryptoCell,
include IDE/GCC-ARM/Source/wolf_main.c for current_time(). */
#endif
#if defined(WOLFSSL_CRYPTOCELL)
#define AES_MAX_KEY_SIZE 128
#endif /* WOLFSSL_CRYPTOCELL*/
/* ------------------------------------------------------------------------- */
/* 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 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 /* use smaller version of code */
#define WOLFSSL_HAVE_SP_RSA
#define WOLFSSL_HAVE_SP_DH
#define WOLFSSL_HAVE_SP_ECC
#define WOLFSSL_SP_CACHE_RESISTANT
//#define WOLFSSL_SP_MATH /* only SP math - eliminates fast math code */
/* Assembly */
//#define WOLFSSL_SP_ASM /* required if using the ASM versions */
//#define WOLFSSL_SP_ARM_CORTEX_M_ASM
#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 */
#undef HAVE_ECC_CDH
//#define HAVE_ECC_CDH
/* Validate import */
#undef WOLFSSL_VALIDATE_ECC_IMPORT
//#define WOLFSSL_VALIDATE_ECC_IMPORT
/* 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 384) + SIZE_OF_MP_DIGIT(32) */
#undef FP_MAX_BITS
#define FP_MAX_BITS (384 + 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
#ifndef HAVE_ECC384
#undef TFM_ECC384
#define TFM_ECC384
#endif
#endif
#endif
/* DH */
#undef NO_DH
#if 0
/* Use table for DH instead of -lm (math) lib dependency */
#if 0
#define WOLFSSL_DH_CONST
#endif
#define HAVE_FFDHE_2048
//#define HAVE_FFDHE_4096
//#define HAVE_FFDHE_6144
//#define HAVE_FFDHE_8192
#else
#define NO_DH
#endif
/* AES */
#undef NO_AES
#if 1
#undef HAVE_AES_CBC
#define HAVE_AES_CBC
/* If you need other than AES-CBC mode, you must undefine WOLFSSL_CRYPTOCELL_AES */
#if !defined(WOLFSSL_CRYPTOCELL_AES)
#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
#endif
#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
#if !defined(WOLFSSL_CRYPTOCELL)
// extern unsigned long my_time(unsigned long* timer);
// #define XTIME my_time
#endif
/* ------------------------------------------------------------------------- */
/* RNG */
/* ------------------------------------------------------------------------- */
#if defined(WOLFSSL_CRYPTOCELL)
// /* Override P-RNG with HW RNG */
#undef CUSTOM_RAND_GENERATE_BLOCK
#define CUSTOM_RAND_GENERATE_BLOCK cc310_random_generate
//#define CUSTOM_RAND_GENERATE_BLOCK nrf_random_generate
//#define WOLFSSL_GENSEED_FORTEST /* for software RNG*/
#else
#define WOLFSSL_GENSEED_FORTEST
#endif
/* ------------------------------------------------------------------------- */
/* Enable Features */
/* ------------------------------------------------------------------------- */
#undef WOLFSSL_TLS13
#if 0
#define WOLFSSL_TLS13
#endif
#undef WOLFSSL_KEY_GEN
#if 1
#define WOLFSSL_KEY_GEN
#endif
/* reduce DH test time */
#define WOLFSSL_OLD_PRIME_CHECK
#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 */

View File

@ -0,0 +1 @@
This folder has moved to `IDE/RISCV/SIFIVE-HIFIVE1`.

View File

@ -0,0 +1,6 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
EXTRA_DIST += \
IDE/ECLIPSE/SIFIVE/README.md

View File

@ -0,0 +1,24 @@
/* config.h - dummy
*
* Copyright (C) 2006-2019 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifndef _CONFIG_H_
#define _CONFIG_H_
#endif

View File

@ -150,6 +150,7 @@ int construct_argv()
/* entry point */
void app_main(void)
{
(void) TAG;
#ifndef NO_CRYPT_BENCHMARK
/* when using atecc608a on esp32-wroom-32se */

View File

@ -2,5 +2,10 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
# (Not part of the boilerplate)
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
# disable the following line if there isn't the directory
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(wolfssl_client)

View File

@ -6,6 +6,7 @@
PROJECT_NAME := wolfssl_client
CFLAGS += -DWOLFSSL_USER_SETTINGS
# if there isn't the directory, please disable the line below.
EXTRA_COMPONENT_DIRS = $(IDF_PATH)/examples/common_components/protocol_examples_common
include $(IDF_PATH)/make/project.mk

View File

@ -131,6 +131,7 @@ void tls_smp_client_task()
size_t len;
struct hostent *hp;
struct ip4_addr *ip4_addr;
const char sndMsg[] = "GET /index.html HTTP/1.0\r\n\r\n";
/* declare wolfSSL objects */
WOLFSSL_CTX *ctx;
@ -257,8 +258,8 @@ void tls_smp_client_task()
if(sendGet){
printf("SSL connect ok, sending GET...\n");
len = 28;
strncpy(buff, "GET /index.html HTTP/1.0\r\n\r\n", 28);
len = XSTRLEN(sndMsg);
strncpy(buff, sndMsg, len);
buff[len] = '\0';
} else {
sprintf(buff, "message from esp32 tls client\n");

View File

@ -21,9 +21,14 @@
#ifndef _TLS_WIFI_H_
#define _TLS_WIFI_H_
#include "esp_idf_version.h"
#include "esp_log.h"
#include "esp_wifi.h"
#if ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 1
#include "esp_event.h"
#else
#include "esp_event_loop.h"
#endif
#define DEFAULT_PORT 11111

View File

@ -27,6 +27,9 @@
#include "lwip/netdb.h"
#include "lwip/apps/sntp.h"
#include "nvs_flash.h"
#if ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 1
#include "protocol_examples_common.h"
#endif
const static int CONNECTED_BIT = BIT0;
static EventGroupHandle_t wifi_event_group;
@ -48,12 +51,13 @@ static void set_time()
time_t now;
struct tm timeinfo;
char strftime_buf[64];
utctime.tv_sec = 1542008020; /* dummy time: Mon Nov 12 07:33:40 2018 */
/* please update the time if seeing unknown failure. */
/* this could cause TLS communication failure due to time expiration */
utctime.tv_sec = 1567125910; /* dummy time: Fri Aug 30 09:45:00 2019 */
utctime.tv_usec = 0;
tz.tz_minuteswest = 0;
tz.tz_dsttime = 0;
settimeofday(&utctime, &tz);
time(&now);
@ -62,9 +66,11 @@ static void set_time()
strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo);
ESP_LOGI(TAG, "The current date/time is: %s", strftime_buf);
#if ESP_IDF_VERSION_MAJOR < 4
/* wait until wifi connect */
xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT,
false, true, portMAX_DELAY);
#endif
/* now we start client tasks. */
tls_smp_client_init();
}
@ -120,6 +126,15 @@ void app_main(void)
tcpip_adapter_init();
/* */
#if ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 1
(void) wifi_event_handler;
ESP_ERROR_CHECK(esp_event_loop_create_default());
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
* Read "Establishing Wi-Fi or Ethernet Connection" section in
* examples/protocols/README.md for more information about this function.
*/
ESP_ERROR_CHECK(example_connect());
#else
wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK(esp_event_loop_init(wifi_event_handler, NULL));
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
@ -141,6 +156,7 @@ void app_main(void)
ESP_LOGI(TAG, "wifi_init_sta finished.");
ESP_LOGI(TAG, "connect to ap SSID:%s password:%s",
TLS_SMP_WIFI_SSID, TLS_SMP_WIFI_PASS);
#endif
ESP_LOGI(TAG, "Set dummy time...");
set_time();
}

View File

@ -2,6 +2,10 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
# (Not part of the boilerplate)
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
# disable the following line if there isn't the directory
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(wolfssl_server)

View File

@ -7,5 +7,8 @@ PROJECT_NAME := tls_server
CFLAGS += -DWOLFSSL_USER_SETTINGS
# if there isn't the directory, please disable the line below.
EXTRA_COMPONENT_DIRS = $(IDF_PATH)/examples/common_components/protocol_examples_common
include $(IDF_PATH)/make/project.mk

View File

@ -1,4 +1,4 @@
/* wifi_connect.h
/* wifi_connect.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
*
@ -21,9 +21,14 @@
#ifndef _TLS_WIFI_H_
#define _TLS_WIFI_H_
#include "esp_idf_version.h"
#include "esp_log.h"
#include "esp_wifi.h"
#if ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 1
#include "esp_event.h"
#else
#include "esp_event_loop.h"
#endif
#define DEFAULT_PORT 11111

View File

@ -133,6 +133,7 @@ void tls_smp_server_task()
size_t len;
int shutdown = 0;
int ret;
const char msg[] = "I hear you fa shizzle!";
/* declare wolfSSL objects */
WOLFSSL_CTX* ctx;
@ -245,7 +246,7 @@ void tls_smp_server_task()
}
/* Write our reply into buff */
memset(buff, 0, sizeof(buff));
memcpy(buff, "I hear ya fa shizzle!", sizeof(buff));
memcpy(buff, msg, sizeof(msg));
len = strnlen(buff, sizeof(buff));
/* Reply back to the client */
if (wolfSSL_write(ssl, buff, len) != len) {

View File

@ -27,6 +27,9 @@
#include "lwip/netdb.h"
#include "lwip/apps/sntp.h"
#include "nvs_flash.h"
#if ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 1
#include "protocol_examples_common.h"
#endif
const static int CONNECTED_BIT = BIT0;
static EventGroupHandle_t wifi_event_group;
@ -45,8 +48,9 @@ static void set_time()
time_t now;
struct tm timeinfo;
char strftime_buf[64];
utctime.tv_sec = 1542008020; /* dummy time: Mon Nov 12 07:33:40 2018 */
/* please update the time if seeing unknown failure. */
/* this could cause TLS communication failure due to time expiration */
utctime.tv_sec = 1567125910; /* dummy time: Fri Aug 30 09:45:00 2019 */
utctime.tv_usec = 0;
tz.tz_minuteswest = 0;
tz.tz_dsttime = 0;
@ -59,9 +63,11 @@ static void set_time()
strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo);
ESP_LOGI(TAG, "The current date/time is: %s", strftime_buf);
#if ESP_IDF_VERSION_MAJOR < 4
/* wait until wifi connect */
xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT,
false, true, portMAX_DELAY);
#endif
/* now we start client tasks. */
tls_smp_server_init();
}
@ -117,6 +123,15 @@ void app_main(void)
tcpip_adapter_init();
/* */
#if ESP_IDF_VERSION_MAJOR >= 4 && ESP_IDF_VERSION_MINOR >= 1
(void) wifi_event_handler;
ESP_ERROR_CHECK(esp_event_loop_create_default());
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
* Read "Establishing Wi-Fi or Ethernet Connection" section in
* examples/protocols/README.md for more information about this function.
*/
ESP_ERROR_CHECK(example_connect());
#else
wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK(esp_event_loop_init(wifi_event_handler, NULL));
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
@ -138,6 +153,7 @@ void app_main(void)
ESP_LOGI(TAG, "wifi_init_sta finished.");
ESP_LOGI(TAG, "connect to ap SSID:%s password:%s",
TLS_SMP_WIFI_SSID, TLS_SMP_WIFI_PASS);
ESP_LOGI(TAG, "Set Dummy time...");
#endif
ESP_LOGI(TAG, "Set dummy time...");
set_time();
}

View File

@ -58,6 +58,7 @@ ${CPDCMD} -r ./wolfssl/*.h ${WOLFSSLLIB_TRG_DIR}/wolfssl/
${CPDCMD} -r ./wolfssl/wolfcrypt ${WOLFSSLLIB_TRG_DIR}/wolfssl/
# user_settings.h
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/user_settings.h ${WOLFSSLLIB_TRG_DIR}/include/
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/dummy_config_h ${WOLFSSLLIB_TRG_DIR}/include/config.h
# unit test app
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/test/* ${WOLFSSLLIB_TRG_DIR}/test/

View File

@ -120,6 +120,6 @@ These settings are located in `Header/user_settings.h`.
* `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....
* `ECC_USER_CURVES`: Allows user to define curve sizes to enable. Default is 256-bit on. To enable others use `HAVE_ECC192`, `HAVE_ECC224`, etc....
* `TFM_ARM`, `TFM_SSE2`, `TFM_AVR32`, `TFM_PPC32`, `TFM_MIPS`, `TFM_X86` or `TFM_X86_64`: These are assembly optimizations available with USE_FAST_MATH.
* Single Precision Math for ARM: See `WOLFSSL_SP`. Optimized math for ARM performance of specific RSA, DH and ECC algorithms.

View File

@ -7,7 +7,7 @@
#define USE_CERT_BUFFERS_2048
#define WOLFSSL_USER_CURRTIME
#define SIZEOF_LONG_LONG 8
#define NO_WOLFSSL_DIR
#define NO_WOLFSSL_DIR
#define WOLFSSL_NO_CURRDIR
#define NO_WOLF_C99
#define NO_MULTIBYTE_PRINT
@ -31,4 +31,4 @@
#define HAVE_ECC
#define HAVE_CURVE25519
#define CURVE25519_SMALL
#define HAVE_ED25519
#define HAVE_ED25519

View File

@ -1,8 +1,8 @@
CyaSSL IAR Project Files
This directory contains project files for IAR EWARM IDE. These
projects have been set up to generic ARM Cortex-M MPUs.
In order to generate project for specific target MPU, take following steps.
CyaSSL IAR Project Files
This directory contains project files for IAR EWARM IDE. These
projects have been set up to generic ARM Cortex-M MPUs.
In order to generate project for specific target MPU, take following steps.
** Note ** regarding Segger Embedded Operating System (embOS)
The directory embOS contains projects specifically for embOS on IAR-EWARM.
@ -10,20 +10,20 @@ In order to generate project for specific target MPU, take following steps.
uses embOS
Included Project Files
-----------------------
1. Workspace: wolfssl.eww
The workspace includes wolfSSL-Lib library and wolfCrypt-test, wolfCrypt-benchmark
Included Project Files
-----------------------
1. Workspace: wolfssl.eww
The workspace includes wolfSSL-Lib library and wolfCrypt-test, wolfCrypt-benchmark
executable projects.
2. wolfSSL-Lib Project: lib/wolfSSL-lib.ewp
generates full set library of wolfCrypt and wolfSSL functions.
generates full set library of wolfCrypt and wolfSSL functions.
3. Test suites Project: test/wolfCrypt-test.ewp
generates test.out test suites executable
3. Test suites Project: test/wolfCrypt-test.ewp
generates test.out test suites executable
4. Benchmark Project: benchmark/wolfCrypt-benchmark.ewp
generates benchmark.out benchmark executable
4. Benchmark Project: benchmark/wolfCrypt-benchmark.ewp
generates benchmark.out benchmark executable
Set Up Steps
------------
@ -33,22 +33,22 @@ Set Up Steps
You can build and download the to the simulator.
Open Terminal I/O window, by "view"->"Terminal I/O", and start execution.
1. Project option settings
For each project,...
General Options: Choose appropriate "Target" options
1. Project option settings
For each project,...
General Options: Choose appropriate "Target" options
2. For executable projects,...
2. For executable projects,...
Add "SystemInit" and "startup" for your MPU
Debugger: Choose your debug "Driver"
Debugger: Choose your debug "Driver"
3. For benchmark project,...
3. For benchmark project,...
Choose option for current_time function.
Or write own "current_time" benchmark timer with WOLFSSL_USER_CURRTIME option.
4. Build and download
Go to "Project->Make" and "Download and Debug" in Menu bar for EWARM build and download.
4. Build and download
Go to "Project->Make" and "Download and Debug" in Menu bar for EWARM build and download.
Support
-------
Please send questions or comments to support@wolfssl.com
Support
-------
Please send questions or comments to support@wolfssl.com

204
IDE/KDS/.cproject Normal file
View File

@ -0,0 +1,204 @@
<?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.1823534755">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1823534755" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<extensions>
<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"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" 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.exe" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1823534755" name="Debug" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug">
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1823534755." name="/" resourcePath="">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug.1219033186" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.debug">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.1889985691" 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.1934974013" 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.1488765487" 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.2137237709" 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.189250506" 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.318329197" 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.379381336" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.1982231667" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="GNU Tools for ARM Embedded Processors" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.982386377" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.357134062" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m3" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.942886942" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.1985384014" 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.980821709" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.741978820" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.644448038" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.1568794824" 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.1663916396" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.644079467" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.1653907508" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="make" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.212411635" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="rm" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.37217667" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.938806288" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.2020299399" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
<builder buildPath="${workspace_loc:/wolfssl-test}/Debug" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1169013041" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1652818945" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1995204633" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.588237282" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1618862980" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.1348561577" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="../../../../wolfssl"/>
<listOptionValue builtIn="false" value=".././config"/>
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1370434476" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1511494824" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.204098874" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1188857255" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.706026125" name="Cross ARM C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.960189587" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.1923669300" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" value="--specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group" valueType="string"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.653534040" name="Cross ARM C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.1864249736" 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.other.1426398559" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value="--specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group" valueType="string"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.907833184" 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.1802905650" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.1296666581" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.913795604" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.1264511626" 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.957974251" 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.2098897888" 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.511113554" 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.3492907" 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.91497735" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.898726007" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.658684795">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.658684795" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<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"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.658684795" name="Release" parent="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release">
<folderInfo id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.658684795." name="/" resourcePath="">
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release.813859650" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.elf.release">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.794819747" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.size" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.1496674696" 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.650429804" 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.1570447896" 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.838509098" 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.662400626" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.1161227121" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.705055087" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="GNU Tools for ARM Embedded Processors" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.506368524" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.612731672" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m3" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.1833413616" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.881134378" 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.2100237234" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.1356336567" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.1525413618" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.1604347618" 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.1779877498" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.911087419" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.1710464795" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="make" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.1501290946" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="rm" valueType="string"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.1999176868" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1190543033" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.30283807" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
<builder buildPath="${workspace_loc:/wolfssl-test}/Release" id="ilg.gnuarmeclipse.managedbuild.cross.builder.394488448" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.441759325" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.594523961" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.250835699" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.377447475" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1965124250" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1682275351" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1092458319" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.1984331723" name="Cross ARM C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.1569599516" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.933648471" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" value="--specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group" valueType="string"/>
</tool>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.1950861502" name="Cross ARM C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.2133729789" 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.other.1119517305" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value="--specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group" valueType="string"/>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.27793787" 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.513801227" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.1231377091" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash"/>
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.89637169" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.2090652470" 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.1819919258" 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.276097013" 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.1578115309" 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.786035502" 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.397820407" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.226153595" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="wolfssl-test.ilg.gnuarmeclipse.managedbuild.cross.target.elf.1253579278" 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.1613256277;ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1613256277.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1198618439;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1181889101">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.658684795;ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.658684795.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.377447475;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1965124250">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1823534755;ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1823534755.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1618862980;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1511494824">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1823534755;ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1823534755.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.204098874;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1188857255">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.658684795;ilg.gnuarmeclipse.managedbuild.cross.config.elf.release.658684795.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1682275351;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1092458319">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1613256277;ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1613256277.;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1931048491;ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.1225137803">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope"/>
</cproject>

394
IDE/KDS/.project Normal file
View File

@ -0,0 +1,394 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>wolfssl-test</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/test.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/test/test.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/aes.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/aes.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/arc4.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/arc4.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/asm.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/asm.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/asn.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/asn.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/blake2b.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/blake2b.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/blake2s.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/blake2s.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/camellia.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/camellia.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/chacha.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/chacha.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/chacha20_poly1305.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/chacha20_poly1305.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/cmac.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/cmac.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/coding.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/coding.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/compress.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/compress.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/cpuid.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/cpuid.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/cryptocb.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/cryptocb.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/curve25519.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/curve25519.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/des3.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/des3.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/dh.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/dh.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/dsa.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/dsa.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/ecc.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/ecc.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/ecc_fp.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/ecc_fp.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/ed25519.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/ed25519.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/error.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/error.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/fe_low_mem.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/fe_low_mem.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/fe_operations.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/fe_operations.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/ge_low_mem.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/ge_low_mem.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/ge_operations.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/ge_operations.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/hash.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/hash.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/hc128.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/hc128.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/hmac.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/hmac.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/idea.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/idea.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/integer.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/integer.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/logging.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/logging.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/md2.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/md2.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/md4.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/md4.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/md5.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/md5.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/memory.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/memory.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/pkcs12.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/pkcs12.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/pkcs7.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/pkcs7.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/poly1305.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/poly1305.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/pwdbased.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/pwdbased.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/rabbit.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/rabbit.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/random.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/random.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/ripemd.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/ripemd.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/rsa.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/rsa.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/sha.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/sha.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/sha256.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/sha256.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/sha3.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/sha3.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/sha512.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/sha512.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/signature.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/signature.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/sp_arm32.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/sp_arm32.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/sp_arm64.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/sp_arm64.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/sp_armthumb.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/sp_armthumb.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/sp_c32.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/sp_c32.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/sp_c64.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/sp_c64.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/sp_cortexm.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/sp_cortexm.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/sp_int.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/sp_int.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/sp_x86_64.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/sp_x86_64.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/srp.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/srp.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/tfm.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/tfm.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/wc_encrypt.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/wc_encrypt.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/wc_pkcs11.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/wc_pkcs11.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/wc_port.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/wc_port.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/wolfevent.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/wolfevent.c</locationURI>
</link>
<link>
<name>src/wolfcrypt-src/wolfmath.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/wolfcrypt/src/wolfmath.c</locationURI>
</link>
<link>
<name>src/wolfssl-src/crl.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/src/crl.c</locationURI>
</link>
<link>
<name>src/wolfssl-src/internal.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/src/internal.c</locationURI>
</link>
<link>
<name>src/wolfssl-src/keys.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/src/keys.c</locationURI>
</link>
<link>
<name>src/wolfssl-src/ocsp.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/src/ocsp.c</locationURI>
</link>
<link>
<name>src/wolfssl-src/ssl.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/src/ssl.c</locationURI>
</link>
<link>
<name>src/wolfssl-src/tls.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/src/tls.c</locationURI>
</link>
<link>
<name>src/wolfssl-src/tls13.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/src/tls13.c</locationURI>
</link>
<link>
<name>src/wolfssl-src/wolfio.c</name>
<type>1</type>
<locationURI>PARENT-2-PROJECT_LOC/src/wolfio.c</locationURI>
</link>
</linkedResources>
</projectDescription>

View File

@ -0,0 +1,32 @@
/* #define NO_MAIN_DRIVER */
#define BENCH_EMBEDDED
#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 NO_MULTIBYTE_PRINT
#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

7
IDE/KDS/include.am Normal file
View File

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

View File

@ -2,15 +2,16 @@
To use, install the NXP LPCXpresso IDE and import the projects in a new workspace.
1. Run LPCXpresso and choose a workspace location.
2. Right click in the project exporer window and choose Inport.
3. Under General choose "Existing Projects into Workspace".
4. Under "Select root directory" click browse and select the wolfSSL root.
5. Check the "Search for nested projects" box.
5. Make sure "wolfssl" and "wolfssl_example" are checked under "Projects:".
6. Click finish.
7. Download the board and chip LPCOpen package for your platform.
8. Import the projects. For example "lpc_board_nxp_lpcxpresso_1837" and "lpc_chip_18xx" are the ones for the LPC18S37.
1. Change names of `LPCExpresso.project` and `LPCExpresso.cproject` files to `.project` and `.cproject`
2. Run LPCXpresso and choose a workspace location.
3. Right click in the project explorer window and choose Import.
4. Under General choose "Existing Projects into Workspace".
5. Under "Select root directory" click browse and select the wolfSSL root.
6. Check the "Search for nested projects" box.
7. Make sure "wolfssl" and "wolfssl_example" are checked under "Projects:".
8. Click finish.
9. Download the board and chip LPCOpen package for your platform.
10. Import the projects. For example "lpc_board_nxp_lpcxpresso_1837" and "lpc_chip_18xx" are the ones for the LPC18S37.
To setup this example to work with different baords/chips you will need to locate the LPCOpen sources for LPCXpresso on the NXP website and import the board and chip projects. Then you will need to update the "wolfssl_example" project properties to reference these projects (C/C++ General -> Paths and Symbols -> References). See the [LPCOpen v2.xx LPCXpresso quickstart guide for all platforms](https://www.lpcware.com/content/project/lpcopen-platform-nxp-lpc-microcontrollers/lpcopen-v200-quickstart-guides/lpcopen-1) for additional information.

91
IDE/M68K/Makefile Normal file
View File

@ -0,0 +1,91 @@
NAME = wolfssl
DEVICE = -m5206e -gdwarf-2 -DMOD5441X -DMCF5441X
OLEVEL = -O2
NBHEADERS = -I"$(NBROOT)/include" -I"$(NBROOT)/MOD5441X/include"
# location to put wolfssl.a created
OUTPUT = $(NBROOT)/lib
CSRCS := ../../wolfcrypt/src/rsa.c \
../../wolfcrypt/src/asn.c \
../../wolfcrypt/src/aes.c \
../../wolfcrypt/src/sha.c \
../../wolfcrypt/src/sha256.c \
../../wolfcrypt/src/sha512.c \
../../wolfcrypt/src/integer.c \
../../wolfcrypt/src/tfm.c \
../../wolfcrypt/src/random.c \
../../wolfcrypt/src/logging.c \
../../wolfcrypt/src/memory.c \
../../wolfcrypt/src/coding.c \
../../wolfcrypt/src/hash.c \
../../wolfcrypt/src/hmac.c \
../../wolfcrypt/src/md5.c \
../../wolfcrypt/src/wc_port.c \
../../wolfcrypt/src/wc_encrypt.c \
../../wolfcrypt/src/wolfmath.c \
../../wolfcrypt/src/sp_c32.c \
../../wolfcrypt/src/sp_int.c \
../../wolfcrypt/src/signature.c \
../../wolfcrypt/src/error.c \
../../src/wolfio.c \
../../src/ssl.c
INC = -I"./" -I"../../"
EXTRACFLAGS = -DWOLFSSL_USER_SETTINGS $(INC) $(DEVICE) $(OLEVEL)
EXTRACFLAGS += -DNBMINGW -Wall -fno-rtti -fno-exceptions -falign-functions=4
EXTRACFLAGS += $(NBHEADERS)
EXTRACXXFLAGS = $(EXTRACFLAGS)
#LDEXTRA =
LIBOBJS = ./rsa.o \
./asn.o \
./aes.o \
./sha.o \
./sha256.o \
./sha512.o \
./integer.o \
./tfm.o \
./random.o \
./logging.o \
./memory.o \
./coding.o \
./hash.o \
./hmac.o \
./md5.o \
./wc_port.o \
./wc_encrypt.o \
./wolfmath.o \
./sp_c32.o \
./sp_int.o \
./signature.o \
./wolfio.o \
./ssl.o \
./error.o
#include $(NBROOT)/make/libmain.mak
all: compile link rmo
# compiling using g++ compiler to avoid mangled name complications if linking
# against other NetBurner libraries
compile:
m68k-elf-g++ $(EXTRACFLAGS) -c $(CSRCS)
link:
m68k-elf-ar -cr $(OUTPUT)/$(NAME).a $(LIBOBJS)
rmo:
rm -f *.o
clean: rmo
rm -f $(OUTPUT)/$(NAME).a
help:
@echo "all : exectue compile, link, rmo"
@echo "compile : create .o files"
@echo "link : create .a library from .o files"
@echo "rmo : remove all .o files"
@echo "clean : remove all .o files and .a library"

46
IDE/M68K/README.md Normal file
View File

@ -0,0 +1,46 @@
This is makefile's for creating a wolfCrypt library using the m68k-elf-gcc
toolchain and example benchmark/testwolfcrypt application linking to it. The
examples and default builds where made to support a MCF5441X board.
Macros to define for use:
WOLFSSL_MCF5441X /* arch settings i.e. sizeof long and endianess */
WOLFSSL_NETBURNER /* for use of NetBurner headers and RNG seed */
To build the wolfssl.a library (settings for wolfCrypt only by default) run
"make" from the directory wolfssl-root/IDE/M68K/.
By default this outputs the wolfssl.a library to be at $(NBROOT)/lib. This can
be adjusted by adjusting the variable OUTPUT in Makefile.
If the macro WOLFSSL_MCF5441X is defined then
wolfssl-root/wolfssl/wolfcrypt/settings.h sets the sizeof long and long long
along with big endian macro.
The configuration for the build is located in wolfssl-root/IDE/M68K/user_settings.h
Along with the defualt build there is 2 others BUILD_B (smaller resource use),
and BUILD_C (faster runtime with more resource use).
RSA speeds of the builds
default:
RSA 2048 public 3.333 ops/sec
RSA 2048 private 0.190 ops/sec
BUILD_B
RSA 2048 public 3.333 ops/sec
RSA 2048 private 0.053 ops/sec
BUILD_C
RSA 2048 public 7.619 ops/sec
RSA 2048 private 0.276 ops/sec
###Building testwolfcryt/benchmark
To build either testwolfcrypt or benchmark first build wolfssl.a, place it in
$(NBROOT)/lib and then cd into the respective directory. Running "make" will
then create a .s19 application that can be ran on the board.
When running either testwolfcrypt or the benchmark app the first thing they do
is loop on calling RandomValid until getting a successful return. This is done
in order to wait for a source of entropy. It could take several moments until
completed.

View File

@ -0,0 +1,11 @@
NAME = benchmark
PLATFORM = MOD5441X
CSRCS := ../../../wolfcrypt/benchmark/benchmark.c
CXXSRCS := ./main.cpp
XTRALIB += $(NBROOT)/lib/wolfssl.a
INC = -I"./../../../" -I"./../"
EXTRACFLAGS = $(INC) -DWOLFSSL_USER_SETTINGS -DUSE_CERT_BUFFERS_2048 -DBENCH_EMBEDDED -DNO_MAIN_DRIVER
EXTRACXXFLAGS = $(EXTRACFLAGS)
include $(NBROOT)/make/main.mak

View File

@ -0,0 +1,79 @@
/* main.c
*
* Copyright (C) 2006-2019 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 <predef.h>
#include <stdio.h>
#include <ctype.h>
#include <startnet.h>
#include <autoupdate.h>
#include <dhcpclient.h>
#include <random.h>
#include <init.h>
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfcrypt/benchmark/benchmark.h>
extern "C" {
void UserMain(void * pd);
}
const char * AppName="benchmark";
typedef struct func_args {
int argc;
char** argv;
int return_code;
} func_args;
void UserMain(void * pd) {
InitializeStack();
GetDHCPAddressIfNecessary();
OSChangePrio(MAIN_PRIO);
EnableAutoUpdate();
init();
iprintf("wolfcrypt benchmark Application started\n");
iprintf("waiting for sufficient entropy before starting...\n\r");
iprintf("looks like NetBurner is using uart/tcp to seed GetRandomX so ..."
" input enough uart characters.\n\r");
{
BYTE b;
do {
b = GetRandomByte();
iprintf(".");
} while (!RandomValid());
iprintf("\n\r");
(void)b;
}
/* run wolfCrypt benchmarks */
{
func_args args;
args.argc = 0;
args.argv = NULL;
benchmark_test(&args);
}
while (1) {
OSTimeDly(TICKS_PER_SECOND);
}
}

11
IDE/M68K/include.am Normal file
View File

@ -0,0 +1,11 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
EXTRA_DIST+= IDE/M68K/README.md
EXTRA_DIST+= IDE/M68K/Makefile
EXTRA_DIST+= IDE/M68K/user_settings.h
EXTRA_DIST+= IDE/M68K/testwolfcrypt/main.cpp
EXTRA_DIST+= IDE/M68K/testwolfcrypt/Makefile
EXTRA_DIST+= IDE/M68K/benchmark/main.cpp
EXTRA_DIST+= IDE/M68K/benchmark/Makefile

View File

@ -0,0 +1,12 @@
NAME = testwolfcyprt
PLATFORM = MOD5441X
CSRCS := ../../../wolfcrypt/test/test.c
CXXSRCS := ./main.cpp
XTRALIB += $(NBROOT)/lib/wolfssl.a
INC = -I"./../../../" -I"./../"
EXTRACFLAGS = $(INC) -DWOLFSSL_USER_SETTINGS -DUSE_CERT_BUFFERS_1024 -DNO_MAIN_DRIVER
EXTRACXXFLAGS = $(EXTRACFLAGS)
include $(NBROOT)/make/main.mak

View File

@ -0,0 +1,82 @@
/* main.c
*
* Copyright (C) 2006-2019 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 <predef.h>
#include <stdio.h>
#include <ctype.h>
#include <startnet.h>
#include <autoupdate.h>
#include <dhcpclient.h>
#include <random.h>
#include <init.h>
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/logging.h>
#include <wolfcrypt/test/test.h>
extern "C" {
void UserMain(void * pd);
}
const char * AppName="testwolfcrypt";
typedef struct func_args {
int argc;
char** argv;
int return_code;
} func_args;
void UserMain(void * pd) {
InitializeStack();
GetDHCPAddressIfNecessary();
OSChangePrio(MAIN_PRIO);
EnableAutoUpdate();
init();
iprintf("wolfcrypt test Application started\n\r");
iprintf("waiting for sufficient entropy before starting...\n\r");
iprintf("looks like NetBurner is using uart/tcp to seed GetRandomX so ..."
" input enough uart characters.\n\r");
{
BYTE b;
do {
b = GetRandomByte();
iprintf(".");
} while (!RandomValid());
iprintf("\n\r");
(void)b;
}
/* run wolfCrypt tests */
{
func_args args;
args.argc = 0;
args.argv = NULL;
wolfcrypt_test(&args);
}
while (1) {
OSTimeDly(TICKS_PER_SECOND);
}
}

87
IDE/M68K/user_settings.h Normal file
View File

@ -0,0 +1,87 @@
#ifndef USER_SETTINGS_H
#define USER_SETTINGS_H
/* Default build with fast math */
/* Slower build but uses less memory */
//#define BUILD_B
/* Performant build but uses more memory */
//#define BUILD_C
/* Used for getting random value for seeding RNG */
#define WOLFSSL_NETBURNER
#define WOLFSSL_MCF5441X
/* environment settings */
#define NO_WRITEV
#define WOLFSSL_NO_SOCK
#define NO_WOLFSSL_DIR
/* with USE_FAST_MATH smallstack is used to fit in the default stack size */
#define WOLFSSL_SMALL_STACK
/* enable features off by default */
#define WOLFSSL_SHA512
// OPENSSL_EXTRA uses a lot more memory but is needed in order to enable
// compatibility layer API
#define OPENSSL_EXTRA
// additional RSA padding schemes
#define WC_RSA_NO_PADDING
#define WC_RSA_PSS
// uncomment and add wolfSSL_Debugging_ON() to app for debug messages
//#define DEBUG_WOLFSSL
/* disable features that are on by default */
#define WOLFCRYPT_ONLY
#define NO_FILESYSTEM
#define SINGLE_THREADED
#define NO_ASN_TIME
#define NO_PWDBASED
#define NO_HC128
#define NO_RABBIT
#define NO_RC4
#define NO_DSA
#define NO_DES3
#define NO_DH
#define NO_MD4
#define USE_FAST_MATH
#ifdef BUILD_B
#define RSA_LOW_MEM
#define USE_SLOW_SHA
#define USE_SLOW_SHA256
#define NO_ERROR_STRINGS
#define USE_FAST_MATH
#endif
#ifdef BUILD_C
#define WOLFSSL_HAVE_SP_RSA
#define SP_WORD_SIZE 32
#endif
/* hardening against side channel attacks */
#if defined(USE_FAST_MATH)
#define TFM_TIMING_RESISTANT
#ifdef HAVE_ECC
#define ECC_TIMING_RESISTANT
#endif
#endif /* USE_FAST_MATH */
#ifndef NO_RSA
/* this slows down RSA operations but increases side channel resistance */
#define WC_RSA_BLINDING
#endif
#endif /* USER_SETTINGS_H */

View File

@ -1,125 +1,299 @@
<?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="fr.ac6.managedbuild.config.gnu.cross.exe.debug.333134738">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.333134738" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<cconfiguration id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<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="org.eclipse.cdt.core.GLDErrorParser" 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.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="elf" artifactName="wolfSTM32" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" 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.exe" cleanCommand="rm -rf" description="" id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.333134738" name="Debug" parent="fr.ac6.managedbuild.config.gnu.cross.exe.debug" postannouncebuildStep="Generating binary and Printing size information:" postbuildStep="arm-none-eabi-objcopy -O binary &quot;${BuildArtifactFileBaseName}.elf&quot; &quot;${BuildArtifactFileBaseName}.bin&quot; &amp;&amp; arm-none-eabi-size &quot;${BuildArtifactFileName}&quot;">
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.333134738." name="/" resourcePath="">
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.843637882" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug">
<option id="fr.ac6.managedbuild.option.gnu.cross.prefix.1949238642" name="Prefix" superClass="fr.ac6.managedbuild.option.gnu.cross.prefix" value="arm-none-eabi-" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.376579966" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu" value="STM32F437IIHx" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.1728284212" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board" value="wolfSTM32" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.instructionSet.1788799131" name="Instruction Set" superClass="fr.ac6.managedbuild.option.gnu.cross.instructionSet" value="fr.ac6.managedbuild.option.gnu.cross.instructionSet.thumbII" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.1457764954" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu" value="fr.ac6.managedbuild.option.gnu.cross.fpu.fpv4-sp-d16" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.1684707596" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi" value="fr.ac6.managedbuild.option.gnu.cross.floatabi.hard" valueType="enumerated"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.774322166" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/wolfSTM32}/Debug" id="fr.ac6.managedbuild.builder.gnu.cross.847313553" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross">
<configuration artifactExtension="elf" artifactName="wolfSTM32" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668" name="Debug" parent="fr.ac6.managedbuild.config.gnu.cross.exe.debug" postannouncebuildStep="Generating binary and Printing size information:" postbuildStep="arm-none-eabi-objcopy -O binary &quot;${BuildArtifactFileBaseName}.elf&quot; &quot;${BuildArtifactFileBaseName}.bin&quot; &amp;&amp; arm-none-eabi-size &quot;${BuildArtifactFileName}&quot;">
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668." name="/" resourcePath="">
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.226036042" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug">
<option id="fr.ac6.managedbuild.option.gnu.cross.prefix.2047016998" name="Prefix" superClass="fr.ac6.managedbuild.option.gnu.cross.prefix" useByScannerDiscovery="false" value="arm-none-eabi-" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.1283068435" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu" useByScannerDiscovery="false" value="STM32F437IIHx" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.5714349" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board" useByScannerDiscovery="false" value="STM32F437I-EVAL" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.instructionSet.930999276" name="Instruction Set" superClass="fr.ac6.managedbuild.option.gnu.cross.instructionSet" useByScannerDiscovery="false" value="fr.ac6.managedbuild.option.gnu.cross.instructionSet.thumbII" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.1751557462" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu" useByScannerDiscovery="false" value="fr.ac6.managedbuild.option.gnu.cross.fpu.fpv4-sp-d16" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.792440355" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi" useByScannerDiscovery="false" value="fr.ac6.managedbuild.option.gnu.cross.floatabi.hard" valueType="enumerated"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.1069430525" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/wolfSTM32}/Debug" id="fr.ac6.managedbuild.builder.gnu.cross.1280969041" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross">
<outputEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Debug"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Release"/>
</outputEntries>
</builder>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.758134809" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
<option defaultValue="gnu.c.optimization.level.none" id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.2077803707" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.size" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.256754301" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.32506161" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.394079005" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
<option defaultValue="gnu.c.optimization.level.none" id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.2057150202" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.5592723" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.default" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.468315258" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="../Inc"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/LwIP/src/include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/LwIP/system"/>
<listOptionValue builtIn="false" value="../Drivers/STM32F4xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32F4xx/Include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/LwIP/src/include/lwip"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/LwIP/src/include/lwip/apps"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/LwIP/src/include/lwip/priv"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/LwIP/src/include/netif"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/LwIP/src/include/netif/ppp"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/LwIP/src/include/netif/ppp/polarssl"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/LwIP/src/include/posix"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/LwIP/src/include/posix/sys"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/LwIP/system/arch"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32F4xx/Include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/wolfSSL"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../..&quot;"/>
<listOptionValue builtIn="false" value="../Debug/"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1556589411" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<option id="gnu.c.compiler.option.preprocessor.def.symbols.440286125" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__weak=&quot;__attribute__((weak))&quot;"/>
<listOptionValue builtIn="false" value="__packed=&quot;__attribute__((__packed__))&quot;"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32F437xx"/>
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
</option>
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.misc.other.220656184" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-fmessage-length=0" valueType="string"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.1396985810" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.982473797" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.misc.other.1827037366" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-fmessage-length=0" valueType="string"/>
<option id="gnu.c.compiler.option.dialect.std.621777790" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata.1859252267" name="Place the data in their own section (-fdata-sections)" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="fr.ac6.managedbuid.gnu.c.compiler.option.misc.other.1549268976" name="Other flags" superClass="fr.ac6.managedbuid.gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-fmessage-length=0" valueType="string"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.2064145507" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.1145657513" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.126736225" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="gnu.cpp.compiler.option.optimization.level.1227596527" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.debugging.level.681841413" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1188277793" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="gnu.cpp.compiler.option.optimization.level.1032925602" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.debugging.level.847199790" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.839339759" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker">
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.script.1396145839" name="Linker Script (-T)" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker.script" value="../STM32F437IIHx_FLASH.ld" valueType="string"/>
<option id="gnu.c.link.option.libs.1850337364" name="Libraries (-l)" superClass="gnu.c.link.option.libs"/>
<option id="gnu.c.link.option.paths.1061728683" name="Library search path (-L)" superClass="gnu.c.link.option.paths"/>
<option id="gnu.c.link.option.ldflags.484312202" name="Linker flags" superClass="gnu.c.link.option.ldflags" value="--specs=nosys.specs --specs=nano.specs -u _printf_float" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.210434878" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1655358960" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker">
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.script.756563115" name="Linker Script (-T)" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker.script" useByScannerDiscovery="false" value="../STM32F437IIHx_FLASH.ld" valueType="string"/>
<option id="gnu.c.link.option.libs.463708451" name="Libraries (-l)" superClass="gnu.c.link.option.libs" useByScannerDiscovery="false"/>
<option id="gnu.c.link.option.paths.1810792623" name="Library search path (-L)" superClass="gnu.c.link.option.paths" useByScannerDiscovery="false"/>
<option id="gnu.c.link.option.ldflags.1972099648" name="Linker flags" superClass="gnu.c.link.option.ldflags" useByScannerDiscovery="false" value="-specs=nosys.specs -specs=nano.specs -u _printf_float" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1992020074" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.1401311113" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker"/>
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.801849405" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.1576695062" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler">
<option id="gnu.both.asm.option.include.paths.2012591676" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value=""/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.131938104" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker"/>
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.1204074507" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.17061128" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler">
<option id="gnu.both.asm.option.include.paths.674794239" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="../Inc"/>
<listOptionValue builtIn="false" value="../Drivers/STM32F4xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32F4xx/Include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/wolfSSL"/>
<listOptionValue builtIn="false" value="../Debug/"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1181863627" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1455097577" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2007353444" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1312743267" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.333134738.1915068927" name="/" resourcePath="Middlewares/Third_Party/wolfMQTT/examples/aws">
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.173956589" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug" unusedChildren="">
<option id="fr.ac6.managedbuild.option.gnu.cross.prefix.1949238642.698225202" name="Prefix" superClass="fr.ac6.managedbuild.option.gnu.cross.prefix.1949238642"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.376579966.2068115060" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu.376579966"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.1728284212.1905622558" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board.1728284212"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.instructionSet.1788799131.1271602884" name="Instruction Set" superClass="fr.ac6.managedbuild.option.gnu.cross.instructionSet.1788799131"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.1457764954.1755766601" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu.1457764954"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.1684707596.2053579499" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi.1684707596"/>
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668.1108777808" name="/" resourcePath="Middlewares/Third_Party/wolfSSL/examples/tpm">
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.1723313935" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug" unusedChildren="">
<option id="fr.ac6.managedbuild.option.gnu.cross.prefix.2047016998.1500281729" name="Prefix" superClass="fr.ac6.managedbuild.option.gnu.cross.prefix.2047016998"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.1283068435.1967838963" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu.1283068435"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.5714349.570776417" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board.5714349"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.instructionSet.930999276.910649936" name="Instruction Set" superClass="fr.ac6.managedbuild.option.gnu.cross.instructionSet.930999276"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.1751557462.1334040427" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu.1751557462"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.792440355.2130494343" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi.792440355"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.542548012" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.758134809">
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.603917146" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.834662647" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.1960690838" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.394079005">
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.404885961" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.1167117093" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1959620380" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.126736225"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.625780673" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker.839339759"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.2035924639" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.1401311113"/>
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.859849169" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver.801849405"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.322401756" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.1576695062">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1288485713" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1780998132" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1395184602" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1188277793"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1366084504" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1655358960"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.80166520" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.131938104"/>
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.377590478" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver.1204074507"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.1528844791" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.17061128">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.341974716" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.573390845" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668.878749329" name="/" resourcePath="Middlewares/Third_Party/wolfssl/examples/tpm">
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.379001942" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug" unusedChildren="">
<option id="fr.ac6.managedbuild.option.gnu.cross.prefix.2047016998.1833350776" name="Prefix" superClass="fr.ac6.managedbuild.option.gnu.cross.prefix.2047016998"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.1283068435.873052784" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu.1283068435"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.5714349.1084980577" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board.5714349"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.instructionSet.930999276.1325195596" name="Instruction Set" superClass="fr.ac6.managedbuild.option.gnu.cross.instructionSet.930999276"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.1751557462.2094575860" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu.1751557462"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.792440355.561356933" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi.792440355"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.603130705" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.394079005">
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.1945497333" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.1873595622" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.184232085" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1188277793"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1958999384" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1655358960"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.1549393360" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.131938104"/>
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.350645234" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver.1204074507"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.886109920" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.17061128">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.171637256" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1837934278" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
<entry excluding="CMSIS/Device/ST/STM32F7xx|STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_timebase_tim_template.c|STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_timebase_rtc_alarm_template.c|STM32F7xx_HAL_Driver|STM32F4xx_StdPeriph_Driver|STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_timebase_rtc_wakeup_template.c|STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_msp_template.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Inc"/>
<entry excluding="Third_Party/wolfSSL/src/bio.c|Third_Party/wolfSSL/wolfcrypt/src/evp.c|Third_Party/wolfSSL/wolfcrypt/src/misc.c|Third_Party/wolfSSL/wrapper|Third_Party/wolfSSL/support|Third_Party/wolfSSL/sslSniffer|Third_Party/wolfSSL/scripts|Third_Party/wolfSSL/rpm|Third_Party/wolfSSL/mcapi|Third_Party/wolfSSL/m4|Third_Party/wolfSSL/lib|Third_Party/wolfSSL/IPP|Third_Party/wolfSSL/examples|Third_Party/wolfSSL/doc|Third_Party/wolfSSL/cyassl|Third_Party/wolfSSL/ctaocrypt|Third_Party/wolfSSL/certs|Third_Party/wolfSSL/build-aux|Third_Party/wolfSSL/autom4te.cache|Third_Party/wolfSSL/IDE|Third_Party/wolfSSL/mplabx|Third_Party/wolfSSL/mqx|Third_Party/wolfSSL/swig|Third_Party/wolfSSL/tests|Third_Party/wolfSSL/testsuite|Third_Party/wolfSSL/tirtos|Third_Party/wolfSSL/wolfcrypt/src/aes_asm.s|Third_Party/wolfSSL/wolfcrypt/src/aes_asm.asm|Third_Party/wolfSSL/wolfcrypt/user-crypto" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Src"/>
<entry excluding="Third_Party/wolfssl/wolfcrypt/src/sp_x86_64_asm.asm|Third_Party/wolfssl/wolfcrypt/src/fe_x25519_asm.S|Third_Party/wolfssl/wolfcrypt/src/sp_x86_64_asm.S|Third_Party/wolfssl/wolfcrypt/src/sha512_asm.S|Third_Party/wolfssl/wolfcrypt/src/sha256_asm.S|Third_Party/wolfssl/wolfcrypt/src/poly1305_asm.S|Third_Party/wolfssl/wolfcrypt/src/chacha_asm.S|Third_Party/wolfssl/wolfcrypt/src/aes_gcm_asm.S|Third_Party/wolfssl/wolfcrypt/src/aes_asm.S|Third_Party/wolfssl/x64|Third_Party/wolfssl/wrapper|Third_Party/wolfssl/tst.dSYM|Third_Party/wolfssl/tests|Third_Party/wolfssl/swig|Third_Party/wolfssl/support|Third_Party/wolfssl/sslSniffer|Third_Party/wolfssl/sign.dSYM|Third_Party/wolfssl/scripts|Third_Party/wolfssl/rpm|Third_Party/wolfssl/mqx|Third_Party/wolfssl/mplabx|Third_Party/wolfssl/mcapi|Third_Party/wolfssl/makecsr.dSYM|Third_Party/wolfssl/m4|Third_Party/wolfssl/lib|Third_Party/wolfssl/IPP|Third_Party/wolfssl/IDE|Third_Party/wolfssl/examples|Third_Party/wolfssl/doc|Third_Party/wolfssl/DLL Release|Third_Party/wolfssl/DLL Debug|Third_Party/wolfssl/Debug|Third_Party/wolfssl/cyassl|Third_Party/wolfssl/ctaocrypt|Third_Party/wolfssl/client.dSYM|Third_Party/wolfssl/certs|Third_Party/wolfssl/build-aux|Third_Party/wolfssl/autom4te.cache|Third_Party/wolfssl/testsuite|Third_Party/wolfssl/tirtos|Third_Party/wolfssl/wolfcrypt/src/aes_asm.s|Third_Party/wolfssl/wolfcrypt/src/aes_asm.asm|Third_Party/wolfssl/wolfcrypt/user-crypto|Third_Party/wolfMQTT/examples/aws|Third_Party/wolfMQTT|Third_Party/wolfSSL/mplabx|Third_Party/wolfSSL/IDE|Third_Party/wolfSSL/testsuite|Third_Party/wolfSSL/tests|Third_Party/wolfMQTT/examples/azure|Third_Party/wolfMQTT/examples/firmware|Third_Party/wolfSSL/wolfcrypt/src/aes_asm.s|Third_Party/wolfSSL/wolfcrypt/user-crypto|Third_Party/wolfSSL/sslSniffer|Third_Party/wolfMQTT/IDE|Third_Party/wolfSSL/mqx|Third_Party/wolfSSL/wolfcrypt/src/aes_asm.asm|Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM7|Third_Party/wolfSSL/serialTest.c|Third_Party/wolfSSL/examples|Third_Party/wolfSSL/swig|Third_Party/wolfSSL/tirtos|Third_Party/wolfSSL/wolfcrypt/src/port|Third_Party/wolfSSL/mcapi" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares/Third_Party/wolfSSL/examples/tpm"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares/Third_Party/wolfssl/examples/tpm"/>
<entry excluding="stm32f7xx_it.c|main_f7.c|lwip.c|stm32f7xx_hal_msp.c|ethernetif.c|stm32f7xx_hal_timebase_TIM.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668.999086508">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668.999086508" moduleId="org.eclipse.cdt.core.settings" name="Release">
<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="org.eclipse.cdt.core.GLDErrorParser" 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="elf" artifactName="wolfSTM32" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668.999086508" name="Release" parent="fr.ac6.managedbuild.config.gnu.cross.exe.debug" postannouncebuildStep="Generating binary and Printing size information:" postbuildStep="arm-none-eabi-objcopy -O binary &quot;${BuildArtifactFileBaseName}.elf&quot; &quot;${BuildArtifactFileBaseName}.bin&quot; &amp;&amp; arm-none-eabi-size &quot;${BuildArtifactFileName}&quot;">
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668.999086508." name="/" resourcePath="">
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.1511615597" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug">
<option id="fr.ac6.managedbuild.option.gnu.cross.prefix.1830214641" name="Prefix" superClass="fr.ac6.managedbuild.option.gnu.cross.prefix" useByScannerDiscovery="false" value="arm-none-eabi-" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.933797075" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu" useByScannerDiscovery="false" value="STM32F437IIHx" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.302340704" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board" useByScannerDiscovery="false" value="STM32F437I-EVAL" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.instructionSet.1191305322" name="Instruction Set" superClass="fr.ac6.managedbuild.option.gnu.cross.instructionSet" useByScannerDiscovery="false" value="fr.ac6.managedbuild.option.gnu.cross.instructionSet.thumbII" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.520278825" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu" useByScannerDiscovery="false" value="fr.ac6.managedbuild.option.gnu.cross.fpu.fpv4-sp-d16" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.1424161239" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi" useByScannerDiscovery="false" value="fr.ac6.managedbuild.option.gnu.cross.floatabi.hard" valueType="enumerated"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.398602714" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/wolfSTM32}/Debug" id="fr.ac6.managedbuild.builder.gnu.cross.15964479" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross">
<outputEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Debug"/>
</outputEntries>
</builder>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.1045328417" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
<option defaultValue="gnu.c.optimization.level.none" id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.285666433" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.size" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.2014127494" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.default" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.1367489491" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="../Inc"/>
<listOptionValue builtIn="false" value="../Drivers/STM32F4xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32F4xx/Include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/wolfSSL"/>
<listOptionValue builtIn="false" value="../Debug/"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.337108576" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__weak=&quot;__attribute__((weak))&quot;"/>
<listOptionValue builtIn="false" value="__packed=&quot;__attribute__((__packed__))&quot;"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32F437xx"/>
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
</option>
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.misc.other.1827037366.595103287" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-fmessage-length=0" valueType="string"/>
<option id="gnu.c.compiler.option.dialect.std.4935072" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata.191119685" name="Place the data in their own section (-fdata-sections)" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="fr.ac6.managedbuid.gnu.c.compiler.option.misc.other.556648201" name="Other flags" superClass="fr.ac6.managedbuid.gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-fmessage-length=0" valueType="string"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.1088929777" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.867727629" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.2123526305" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="gnu.cpp.compiler.option.optimization.level.804977480" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.debugging.level.2014697384" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1421159592" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker">
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.script.978510892" name="Linker Script (-T)" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker.script" useByScannerDiscovery="false" value="../STM32F437IIHx_FLASH.ld" valueType="string"/>
<option id="gnu.c.link.option.libs.1366539145" name="Libraries (-l)" superClass="gnu.c.link.option.libs" useByScannerDiscovery="false"/>
<option id="gnu.c.link.option.paths.2109029951" name="Library search path (-L)" superClass="gnu.c.link.option.paths" useByScannerDiscovery="false"/>
<option id="gnu.c.link.option.ldflags.1990926533" name="Linker flags" superClass="gnu.c.link.option.ldflags" useByScannerDiscovery="false" value="-specs=nosys.specs -specs=nano.specs -u _printf_float" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.655498738" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.1368178260" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker"/>
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.1175732177" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.509423423" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler">
<option id="gnu.both.asm.option.include.paths.225719361" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="../Inc"/>
<listOptionValue builtIn="false" value="../Drivers/STM32F4xx_HAL_Driver/Inc"/>
<listOptionValue builtIn="false" value="../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Include"/>
<listOptionValue builtIn="false" value="../Drivers/CMSIS/Device/ST/STM32F4xx/Include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/include"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS"/>
<listOptionValue builtIn="false" value="../Middlewares/Third_Party/wolfSSL"/>
<listOptionValue builtIn="false" value="../Debug/"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1626448541" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.131658854" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668.999086508.Middlewares/Third_Party/wolfSSL/examples/tpm" name="/" resourcePath="Middlewares/Third_Party/wolfSSL/examples/tpm">
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.1748366852" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug" unusedChildren="">
<option id="fr.ac6.managedbuild.option.gnu.cross.prefix.2047016998.1500281729.1461557509" name="Prefix" superClass="fr.ac6.managedbuild.option.gnu.cross.prefix.2047016998"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.1283068435.1967838963.243025693" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu.1283068435"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.5714349.570776417.1871096581" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board.5714349"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.instructionSet.930999276.910649936.1266381856" name="Instruction Set" superClass="fr.ac6.managedbuild.option.gnu.cross.instructionSet.930999276"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.1751557462.1334040427.1554334974" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu.1751557462"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.792440355.2130494343.992671886" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi.792440355"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.338682581" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.568865635" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.1045328417">
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.1309252386" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.1620607" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.2127182282" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.2123526305"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1896586823" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1421159592"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.1318632543" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.1368178260"/>
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.1192420467" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver.1175732177"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.1012014228" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.509423423">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1734991271" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1747087988" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668.999086508.Middlewares/Third_Party/wolfssl/examples/tpm" name="/" resourcePath="Middlewares/Third_Party/wolfssl/examples/tpm">
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.1373284962" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug" unusedChildren="">
<option id="fr.ac6.managedbuild.option.gnu.cross.prefix.2047016998.1833350776.1589332616" name="Prefix" superClass="fr.ac6.managedbuild.option.gnu.cross.prefix.2047016998"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.1283068435.873052784.53281155" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu.1283068435"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.5714349.1084980577.516262295" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board.5714349"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.instructionSet.930999276.1325195596.1955404771" name="Instruction Set" superClass="fr.ac6.managedbuild.option.gnu.cross.instructionSet.930999276"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.1751557462.2094575860.738911340" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu.1751557462"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.792440355.561356933.1394927989" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi.792440355"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.1542702452" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.443076900" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.1045328417">
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.1575292269" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.679704468" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.496640973" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.2123526305"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.590486421" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1421159592"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.697133251" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.1368178260"/>
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.447929566" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver.1175732177"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.1103209695" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.509423423">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.521549347" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.277310583" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="CMSIS/Device/ST/STM32F7xx|STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_timebase_tim_template.c|STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_timebase_rtc_alarm_template.c|STM32F7xx_HAL_Driver|STM32F4xx_StdPeriph_Driver|STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_timebase_rtc_wakeup_template.c|STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_msp_template.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Inc"/>
<entry excluding="Third_Party/wolfssl/wolfcrypt/src/sp_x86_64_asm.asm|Third_Party/wolfssl/wolfcrypt/src/fe_x25519_asm.S|Third_Party/wolfssl/wolfcrypt/src/sp_x86_64_asm.S|Third_Party/wolfssl/wolfcrypt/src/sha512_asm.S|Third_Party/wolfssl/wolfcrypt/src/sha256_asm.S|Third_Party/wolfssl/wolfcrypt/src/poly1305_asm.S|Third_Party/wolfssl/wolfcrypt/src/chacha_asm.S|Third_Party/wolfssl/wolfcrypt/src/aes_gcm_asm.S|Third_Party/wolfssl/wolfcrypt/src/aes_asm.S|Third_Party/wolfssl/x64|Third_Party/wolfssl/wrapper|Third_Party/wolfssl/tst.dSYM|Third_Party/wolfssl/tests|Third_Party/wolfssl/swig|Third_Party/wolfssl/support|Third_Party/wolfssl/sslSniffer|Third_Party/wolfssl/sign.dSYM|Third_Party/wolfssl/scripts|Third_Party/wolfssl/rpm|Third_Party/wolfssl/mqx|Third_Party/wolfssl/mplabx|Third_Party/wolfssl/mcapi|Third_Party/wolfssl/makecsr.dSYM|Third_Party/wolfssl/m4|Third_Party/wolfssl/lib|Third_Party/wolfssl/IPP|Third_Party/wolfssl/IDE|Third_Party/wolfssl/examples|Third_Party/wolfssl/doc|Third_Party/wolfssl/DLL Release|Third_Party/wolfssl/DLL Debug|Third_Party/wolfssl/Debug|Third_Party/wolfssl/cyassl|Third_Party/wolfssl/ctaocrypt|Third_Party/wolfssl/client.dSYM|Third_Party/wolfssl/certs|Third_Party/wolfssl/build-aux|Third_Party/wolfssl/autom4te.cache|Third_Party/wolfssl/testsuite|Third_Party/wolfssl/tirtos|Third_Party/wolfssl/wolfcrypt/src/aes_asm.s|Third_Party/wolfssl/wolfcrypt/src/aes_asm.asm|Third_Party/wolfssl/wolfcrypt/user-crypto|Third_Party/wolfMQTT/examples/aws|Third_Party/wolfMQTT|Third_Party/wolfSSL/mplabx|Third_Party/wolfSSL/IDE|Third_Party/wolfSSL/testsuite|Third_Party/wolfSSL/tests|Third_Party/wolfMQTT/examples/azure|Third_Party/wolfMQTT/examples/firmware|Third_Party/wolfSSL/wolfcrypt/src/aes_asm.s|Third_Party/wolfSSL/wolfcrypt/user-crypto|Third_Party/wolfSSL/sslSniffer|Third_Party/wolfMQTT/IDE|Third_Party/wolfSSL/mqx|Third_Party/wolfSSL/wolfcrypt/src/aes_asm.asm|Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM7|Third_Party/wolfSSL/serialTest.c|Third_Party/wolfSSL/examples|Third_Party/wolfSSL/swig|Third_Party/wolfSSL/tirtos|Third_Party/wolfSSL/wolfcrypt/src/port|Third_Party/wolfSSL/mcapi" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares/Third_Party/wolfSSL/examples/tpm"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares/Third_Party/wolfssl/examples/tpm"/>
<entry excluding="stm32f7xx_it.c|main_f7.c|lwip.c|stm32f7xx_hal_msp.c|ethernetif.c|stm32f7xx_hal_timebase_TIM.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Src"/>
</sourceEntries>
</configuration>
</storageModule>
@ -131,7 +305,7 @@
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="fr.ac6.managedbuild.config.gnu.cross.exe.debug.333134738;fr.ac6.managedbuild.config.gnu.cross.exe.debug.333134738.;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.758134809;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.1396985810">
<scannerConfigBuildInfo instanceId="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668;fr.ac6.managedbuild.config.gnu.cross.exe.debug.1337151668.;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.394079005;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.2064145507">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<!--scannerConfigBuildInfo instanceId="fr.ac6.managedbuild.config.gnu.cross.exe.release.$(RELEASE_CONFIG_UID);fr.ac6.managedbuild.config.gnu.cross.exe.release.$(RELEASE_CONFIG_UID).;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.$(RELEASE_TOOL_COMPILER_UID);cdt.managedbuild.tool.gnu.c.compiler.input.$(RELEASE_TOOL_COMPILER_INPUT_UID)">
@ -145,4 +319,5 @@
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cproject>

File diff suppressed because it is too large Load Diff

View File

@ -1,105 +0,0 @@
/* Define to prevent recursive inclusion --------------------------------------*/
#ifndef __LWIPOPTS__H__
#define __LWIPOPTS__H__
#include "stm32f4xx_hal.h"
/*-----------------------------------------------------------------------------*/
/* Current version of LwIP supported by CubeMx: 1.5.0_RC0_20160211 -*/
/*-----------------------------------------------------------------------------*/
/* Within 'USER CODE' section, code will be kept by default at each generation */
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
#ifdef __cplusplus
extern "C" {
#endif
/* STM32CubeMX Specific Parameters (not defined in opt.h) ---------------------*/
/* Parameters set in STM32CubeMX LwIP Configuration GUI -*/
/*----- WITH_RTOS enabled (Since FREERTOS is set) -----*/
#define WITH_RTOS 1
/*----- CHECKSUM_BY_HARDWARE disabled -----*/
#define CHECKSUM_BY_HARDWARE 0
/*-----------------------------------------------------------------------------*/
/* LwIP Stack Parameters (modified compared to initialization value in opt.h) -*/
/* Parameters set in STM32CubeMX LwIP Configuration GUI -*/
/*----- Value in opt.h for LWIP_DHCP: 0 -----*/
#define LWIP_DHCP 1
/*----- Value in opt.h for MEM_ALIGNMENT: 1 -----*/
#define MEM_ALIGNMENT 4
/*----- Value in opt.h for MEMP_NUM_SYS_TIMEOUT: (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + (PPP_SUPPORT*6*MEMP_NUM_PPP_PCB) + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0)) -*/
//#define MEMP_NUM_SYS_TIMEOUT 5
/*----- Value in opt.h for LWIP_ETHERNET: LWIP_ARP || PPPOE_SUPPORT -*/
#define LWIP_ETHERNET 1
/*----- Value in opt.h for LWIP_DNS_SECURE: (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT) -*/
#define LWIP_DNS_SECURE 7
/*----- Value in opt.h for TCP_SND_QUEUELEN: (4*TCP_SND_BUF + (TCP_MSS - 1))/TCP_MSS -----*/
#define TCP_SND_QUEUELEN 9
/*----- Value in opt.h for TCP_SNDLOWAT: LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) -*/
#define TCP_SNDLOWAT 1071
/*----- Value in opt.h for TCP_SNDQUEUELOWAT: LWIP_MAX(TCP_SND_QUEUELEN)/2, 5) -*/
#define TCP_SNDQUEUELOWAT 5
/*----- Value in opt.h for TCP_WND_UPDATE_THRESHOLD: LWIP_MIN(TCP_WND/4, TCP_MSS*4) -----*/
#define TCP_WND_UPDATE_THRESHOLD 536
/*----- Value in opt.h for TCPIP_THREAD_STACKSIZE: 0 -----*/
#define TCPIP_THREAD_STACKSIZE 1024
/*----- Value in opt.h for TCPIP_THREAD_PRIO: 1 -----*/
#define TCPIP_THREAD_PRIO 3
/*----- Value in opt.h for SLIPIF_THREAD_STACKSIZE: 0 -----*/
#define SLIPIF_THREAD_STACKSIZE 1024
/*----- Value in opt.h for SLIPIF_THREAD_PRIO: 1 -----*/
#define SLIPIF_THREAD_PRIO 3
/*----- Value in opt.h for DEFAULT_THREAD_STACKSIZE: 0 -----*/
#define DEFAULT_THREAD_STACKSIZE 1024
/*----- Value in opt.h for DEFAULT_THREAD_PRIO: 1 -----*/
#define DEFAULT_THREAD_PRIO 3
/*----- Value in opt.h for LWIP_STATS: 1 -----*/
#define LWIP_STATS 0
/*----- Value in opt.h for CHECKSUM_GEN_IP: 1 -----*/
#define CHECKSUM_GEN_IP 0
/*----- Value in opt.h for CHECKSUM_GEN_UDP: 1 -----*/
#define CHECKSUM_GEN_UDP 0
/*----- Value in opt.h for CHECKSUM_GEN_TCP: 1 -----*/
#define CHECKSUM_GEN_TCP 0
/*----- Value in opt.h for CHECKSUM_GEN_ICMP: 1 -----*/
#define CHECKSUM_GEN_ICMP 0
/*----- Value in opt.h for CHECKSUM_GEN_ICMP6: 1 -----*/
#define CHECKSUM_GEN_ICMP6 0
/*----- Value in opt.h for CHECKSUM_CHECK_IP: 1 -----*/
#define CHECKSUM_CHECK_IP 0
/*----- Value in opt.h for CHECKSUM_CHECK_UDP: 1 -----*/
#define CHECKSUM_CHECK_UDP 0
/*----- Value in opt.h for CHECKSUM_CHECK_TCP: 1 -----*/
#define CHECKSUM_CHECK_TCP 0
/*----- Value in opt.h for CHECKSUM_CHECK_ICMP: 1 -----*/
#define CHECKSUM_CHECK_ICMP 0
/*----- Value in opt.h for CHECKSUM_CHECK_ICMP6: 1 -----*/
#define CHECKSUM_CHECK_ICMP6 0
/*-----------------------------------------------------------------------------*/
/* Parameter(s) not set in STM32CubeMX LwIP Configuration GUI -*/
/* LwIP Parameter(s) not in opt.h -----------------------------*/
#define LWIP_PROVIDE_ERRNO 1
#define LWIP_TIMEVAL_PRIVATE 0
#define LWIP_DEBUG 1
#define LWIP_DNS 1
#define LWIP_SOCKET 1
#define LWIP_RAW 1
#define LWIP_NETCONN 1
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
#ifdef __cplusplus
}
#endif
#endif /*__LWIPOPTS__H_H */

View File

@ -1,3 +1,24 @@
/* user_settings.h
*
* Copyright (C) 2006-2019 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
*/
/* Example wolfSSL user settings for STM32F4 with CubeMX */
#ifndef WOLFSSL_USER_SETTINGS_H
@ -14,7 +35,7 @@ extern "C" {
#define WOLFSSL_GENERAL_ALIGNMENT 4
#undef SINGLE_THREADED
#define SINGLE_THREADED
//#define SINGLE_THREADED
#undef WOLFSSL_SMALL_STACK
#define WOLFSSL_SMALL_STACK
@ -25,19 +46,25 @@ extern "C" {
#undef WOLFSSL_STM32_CUBEMX
#define WOLFSSL_STM32_CUBEMX
#undef FREERTOS
#define FREERTOS
#undef WOLFSSL_USER_IO
#define WOLFSSL_USER_IO
#undef WOLFSSL_NO_SOCK
#define WOLFSSL_NO_SOCK
/* ------------------------------------------------------------------------- */
/* HW Crypto Acceleration */
/* ------------------------------------------------------------------------- */
// See settings.h STM32F4 section
/* Optionally Disable Hardware Hashing Support */
//#define NO_STM32_HASH
//#define NO_STM32_RNG
//#define NO_STM32_CRYPTO
#undef FREERTOS
//#define FREERTOS
#undef WOLFSSL_LWIP
//#define WOLFSSL_LWIP
#define HAVE_LWIP_NATIVE
/* ------------------------------------------------------------------------- */
/* Math Configuration */
@ -56,10 +83,50 @@ extern "C" {
//#define TFM_ASM
#endif
/* Wolf Single Precision Math */
#undef WOLFSSL_SP
#if 0
#define WOLFSSL_SP
#define WOLFSSL_SP_SMALL /* use smaller version of code */
#define WOLFSSL_HAVE_SP_RSA
//#define WOLFSSL_HAVE_SP_DH
#define WOLFSSL_HAVE_SP_ECC
#define WOLFSSL_SP_CACHE_RESISTANT
#define WOLFSSL_SP_MATH /* only SP math - eliminates fast math code */
//#define WOLFSSL_SP_ASM /* required if using the ASM versions */
//#define WOLFSSL_SP_ARM_CORTEX_M_ASM
#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 */
#undef WC_RSA_BLINDING
#define WC_RSA_BLINDING
/* RSA PSS Support (required for TLS v1.3)*/
#if 0
#define WC_RSA_PSS
#endif
#else
#define NO_RSA
#endif
/* ECC */
#if 1
#undef HAVE_ECC
@ -96,42 +163,31 @@ extern "C" {
#define ECC_TIMING_RESISTANT
#ifdef USE_FAST_MATH
/* use reduced size math buffers for ecc points */
#undef ALT_ECC_SIZE
#define ALT_ECC_SIZE
/* optionally override the default max ecc bits */
//#undef FP_MAX_BITS_ECC
//#define FP_MAX_BITS_ECC 512
#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
/* Enable TFM optimizations for ECC */
//#define TFM_ECC192
//#define TFM_ECC224
//#define TFM_ECC256
#define TFM_ECC256
//#define TFM_ECC384
//#define TFM_ECC521
#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
/* Enables blinding mode, to prevent timing attacks */
#undef WC_RSA_BLINDING
#define WC_RSA_BLINDING
/* DH */
#undef NO_DH
#if 0
#define HAVE_DH /* freeRTOS settings.h requires this */
#else
#define NO_RSA
//#define NO_DH
#endif
/* AES */
@ -140,26 +196,34 @@ extern "C" {
#undef HAVE_AESGCM
#define HAVE_AESGCM
#ifdef HAVE_AESGCM
/* GCM with hardware acceleration requires AES counter/direct for unaligned sizes */
#undef WOLFSSL_AES_COUNTER
#define WOLFSSL_AES_COUNTER
#undef WOLFSSL_AES_DIRECT
#define WOLFSSL_AES_DIRECT
#endif
/* GCM Method: GCM_SMALL, GCM_WORD32 or GCM_TABLE */
/* GCM Method: GCM_SMALL, GCM_WORD32 or GCM_TABLE */
#undef GCM_SMALL
#define GCM_SMALL
#undef WOLFSSL_AES_COUNTER
#define WOLFSSL_AES_COUNTER
#undef WOLFSSL_AES_DIRECT
#define WOLFSSL_AES_DIRECT
#undef HAVE_AES_ECB
#define HAVE_AES_ECB
#else
#define NO_AES
#endif
/* DES */
#undef NO_DES3
#if 1
#else
#define NO_DES3
#endif
/* ChaCha20 / Poly1305 */
#undef HAVE_CHACHA
#undef HAVE_POLY1305
#if 0
#if 1
#define HAVE_CHACHA
#define HAVE_POLY1305
@ -197,7 +261,11 @@ extern "C" {
/* Sha256 */
#undef NO_SHA256
#if 1
#if 1
/* not unrolled - ~2k smaller and ~25% slower */
//#define USE_SLOW_SHA256
/* Sha224 */
#if 0
#define WOLFSSL_SHA224
#endif
#else
@ -207,33 +275,27 @@ extern "C" {
/* Sha512 */
#undef WOLFSSL_SHA512
#if 1
/* over twice as small, but 50% slower */
//#define USE_SLOW_SHA512
#define WOLFSSL_SHA512
#define HAVE_SHA512 /* freeRTOS settings.h requires this */
/* 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
/* enabled */
/* enabled */
#else
#define NO_MD5
#endif
/* ------------------------------------------------------------------------- */
/* HW Crypto Acceleration */
/* ------------------------------------------------------------------------- */
// See settings.h STM32F4 section
/* ------------------------------------------------------------------------- */
/* Benchmark / Test */
/* ------------------------------------------------------------------------- */
@ -251,10 +313,10 @@ extern "C" {
/* ------------------------------------------------------------------------- */
/* Debugging */
/* ------------------------------------------------------------------------- */
#undef WOLFSSL_DEBUG
//#define WOLFSSL_DEBUG
#undef DEBUG_WOLFSSL
//#define DEBUG_WOLFSSL
#ifdef WOLFSSL_DEBUG
#ifdef DEBUG_WOLFSSL
/* Use this to measure / print heap usage */
#if 0
#undef USE_WOLFSSL_MEMORY
@ -262,10 +324,13 @@ extern "C" {
#undef WOLFSSL_TRACK_MEMORY
#define WOLFSSL_TRACK_MEMORY
#define WOLFSSL_DEBUG_MEMORY
#define WOLFSSL_DEBUG_MEMORY_PRINT
#endif
#else
#undef NO_WOLFSSL_MEMORY
#define NO_WOLFSSL_MEMORY
//#define NO_WOLFSSL_MEMORY
#undef NO_ERROR_STRINGS
//#define NO_ERROR_STRINGS
@ -285,22 +350,18 @@ extern "C" {
/* RNG */
/* ------------------------------------------------------------------------- */
/* Size of returned HW RNG value */
#define CUSTOM_RAND_TYPE unsigned int
#define NO_OLD_RNGNAME
/* Choose RNG method */
#if 1
#ifndef STM32_RNG
#define WOLFSSL_GENSEED_FORTEST
#endif
/* Use built-in P-RNG (SHA256 based) with HW RNG */
/* P-RNG + HW RNG (P-RNG is ~8K) */
#undef HAVE_HASHDRBG
#define HAVE_HASHDRBG
#if 0
extern unsigned int custom_rand_generate(void);
#undef CUSTOM_RAND_GENERATE
#define CUSTOM_RAND_GENERATE custom_rand_generate
#endif
#else
/* Bypass P-RNG and use only HW RNG */
extern int custom_rand_generate_block(unsigned char* output, unsigned int sz);
@ -312,6 +373,11 @@ extern "C" {
/* ------------------------------------------------------------------------- */
/* Enable Features */
/* ------------------------------------------------------------------------- */
#undef WOLFSSL_TLS13
#if 0
#define WOLFSSL_TLS13
#endif
#undef KEEP_PEER_CERT
//#define KEEP_PEER_CERT
@ -371,12 +437,6 @@ extern "C" {
#undef NO_DSA
#define NO_DSA
#undef NO_DH
#define NO_DH
#undef NO_DES3
#define NO_DES3
#undef NO_RC4
#define NO_RC4
@ -399,7 +459,11 @@ extern "C" {
#define NO_PWDBASED
#undef NO_CODING
#define NO_CODING
//#define NO_CODING
/* bypass certificate date checking, due to lack of properly configured RTC source */
#undef NO_ASN_TIME
#define NO_ASN_TIME
#ifdef __cplusplus

View File

@ -1,13 +1,48 @@
/*
* wolfssl_example.h
/* wolfssl_example.h
*
* Created on: Oct 3, 2016
* Author: davidgarske
* Copyright (C) 2006-2019 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifndef WOLFSSL_EXAMPLE_H_
#define WOLFSSL_EXAMPLE_H_
#include <stm32f4xx_hal.h>
#include <stm32f4xx.h>
#include <cmsis_os.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifndef WOLFSSL_USER_SETTINGS
#include <wolfssl/options.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#include <wolfcrypt/test/test.h>
#include <wolfcrypt/benchmark/benchmark.h>
#ifndef WOLF_EXAMPLES_STACK
#define WOLF_EXAMPLES_STACK (30 * configMINIMAL_STACK_SIZE)
#endif
void wolfCryptDemo(void const * argument);

View File

@ -1,5 +1,12 @@
# wolfSSL STM32F2/F4 Example for Open STM32 Tools System Workbench
# wolfSSL STM32 Example for System Workbench for STM32 (Open STM32 Tools)
This example includes:
* wolfCrypt test
* wolfCrypt benchmark
* wolfSSL TLS client/server test using in-memory transfers
These examples use the CubeMX Hal for STM32. If you'd like to use the older Standard Peripheral library undefine `WOLFSSL_STM32_CUBEMX` in `user_settings.h`.
## Requirements
@ -16,12 +23,36 @@
6. Adjust the micro-controller define in `Project Settings -> C/C++ General -> Paths and Symbols -> Symbols -> GNU C`. Example uses `STM32F437xx`, but should be changed to reflect your micro-controller type.
7. Build and Run
Note: You may need to manually copy over the CubeMX HAL files for `stm32f4xx_hal_cryp.c`, `stm32f4xx_hal_cryp_ex.c`, `stm32f4xx_hal_cryp.h`, `stm32f4xx_hal_cryp_ex.h`. Also uncomment the `#define HAL_CRYP_MODULE_ENABLED` line in `stm32f4xx_hal_conf.h`.
If you hardware support crypto acceleration then:
1. Manually copy over the CubeMX HAL files for `stm32f4xx_hal_cryp.c`, `stm32f4xx_hal_cryp_ex.c`, `stm32f4xx_hal_cryp.h`, `stm32f4xx_hal_cryp_ex.h`.
2. Uncomment the `#define HAL_CRYP_MODULE_ENABLED` line in `stm32f4xx_hal_conf.h`.
## Configuration
The settings for the wolfSTM32 project are located in `<wolfssl-root>/IDE/OPENSTM32/Inc/user_settings.h`.
* To enable STM32F2 support define `WOLFSSL_STM32F2`.
* To enable STM32F4 support define `WOLFSSL_STM32F4`.
* To enable STM32F7 support define `WOLFSSL_STM32F7`.
* To enable STM32L4 support define `WOLFSSL_STM32L4`.
If you are using FreeRTOS make sure your `FreeRTOSConfig.h` has its `configTOTAL_HEAP_SIZE` increased.
The TLS client/server benchmark example requires about 76 KB for allocated tasks (with stack) and peak heap.
## Example Output
```
....MENU
.t. WolfCrypt Test
.b. WolfCrypt Benchmark
.l. WolfSSL TLS Bench
.e. Show Cipher List
Please select one of the above options:
```
## Support
For questions please email [support@wolfssl.com](mailto:support@wolfssl.com)

View File

@ -1,56 +1,56 @@
/* main.c
*
* Copyright (C) 2006-2019 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
*/
/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx.h"
#include "cmsis_os.h"
#include "lwip.h"
#include "wolfssl_example.h"
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private variables ---------------------------------------------------------*/
CRC_HandleTypeDef hcrc;
RNG_HandleTypeDef hrng;
RTC_HandleTypeDef hrtc;
SPI_HandleTypeDef hspi1;
UART_HandleTypeDef huart4;
CRYP_HandleTypeDef CrypHandle;
HASH_HandleTypeDef HashHandle;
osThreadId defaultTaskHandle;
/* USER CODE BEGIN PV */
/* Private variables ---------------------------------------------------------*/
/* USER CODE END PV */
int __errno;
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
void Error_Handler(void);
static void SystemClock_Config(void);
static void Error_Handler(void);
static void MX_GPIO_Init(void);
static void MX_CRC_Init(void);
static void MX_RNG_Init(void);
static void MX_UART4_Init(void);
static void MX_RTC_Init(void);
static void MX_SPI1_Init(void);
static void MX_UART4_Init(void);
/* USER CODE BEGIN PFP */
/* Private function prototypes -----------------------------------------------*/
/* USER CODE END PFP */
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration----------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
@ -59,64 +59,32 @@ int main(void)
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_CRC_Init();
MX_RNG_Init();
MX_UART4_Init();
MX_RTC_Init();
MX_SPI1_Init();
MX_UART4_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* USER CODE BEGIN RTOS_MUTEX */
/* add mutexes, ... */
/* USER CODE END RTOS_MUTEX */
/* USER CODE BEGIN RTOS_SEMAPHORES */
/* add semaphores, ... */
/* USER CODE END RTOS_SEMAPHORES */
/* USER CODE BEGIN RTOS_TIMERS */
/* start timers, add new ones, ... */
/* USER CODE END RTOS_TIMERS */
#ifndef FREERTOS
wolfCryptDemo(NULL);
#else
/* Create the thread(s) */
/* definition and creation of defaultTask */
osThreadDef(defaultTask, wolfCryptDemo, osPriorityNormal, 0, 24000);
osThreadDef(defaultTask, wolfCryptDemo, osPriorityNormal, 0, WOLF_EXAMPLES_STACK);
defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);
/* USER CODE BEGIN RTOS_THREADS */
/* add threads, ... */
/* USER CODE END RTOS_THREADS */
/* USER CODE BEGIN RTOS_QUEUES */
/* add queues, ... */
/* USER CODE END RTOS_QUEUES */
/* Start scheduler */
osKernelStart();
/* We should never get here as control is now taken by the scheduler */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
while (1) {}
#endif
}
/** System Clock Configuration
*/
#define SysTick_IRQn -1
void SystemClock_Config(void)
static void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct;
@ -167,18 +135,6 @@ void SystemClock_Config(void)
HAL_NVIC_SetPriority(SysTick_IRQn, 15, 0);
}
/* CRC init function */
static void MX_CRC_Init(void)
{
hcrc.Instance = CRC;
if (HAL_CRC_Init(&hcrc) != HAL_OK)
{
Error_Handler();
}
}
/* RNG init function */
static void MX_RNG_Init(void)
{
@ -247,6 +203,29 @@ static void MX_RTC_Init(void)
{
Error_Handler();
}
}
/* SPI1 init function */
static void MX_SPI1_Init(void)
{
hspi1.Instance = SPI1;
hspi1.Init.Mode = SPI_MODE_MASTER;
hspi1.Init.Direction = SPI_DIRECTION_2LINES;
hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
hspi1.Init.NSS = SPI_NSS_HARD_OUTPUT;
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_4;
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
hspi1.Init.CRCPolynomial = 10;
if (HAL_SPI_Init(&hspi1) != HAL_OK)
{
Error_Handler();
}
}
@ -302,7 +281,6 @@ void _ttywrch(int ch) {
}
/** Configure pins as
* Analog
* Input
@ -323,9 +301,6 @@ static void MX_GPIO_Init(void)
}
/* USER CODE BEGIN 4 */
/* USER CODE END 4 */
/**
* @brief Period elapsed callback in non blocking mode
@ -337,15 +312,9 @@ static void MX_GPIO_Init(void)
*/
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
/* USER CODE BEGIN Callback 0 */
/* USER CODE END Callback 0 */
if (htim->Instance == TIM1) {
HAL_IncTick();
}
/* USER CODE BEGIN Callback 1 */
/* USER CODE END Callback 1 */
}
/**
@ -353,7 +322,7 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
* @param None
* @retval None
*/
void Error_Handler(void)
static void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler */
/* User can add his own implementation to report the HAL error return state */

File diff suppressed because it is too large Load Diff

View File

@ -12,4 +12,3 @@ EXTRA_DIST+= IDE/OPENSTM32/Src/main.c
EXTRA_DIST+= IDE/OPENSTM32/Src/wolfssl_example.c
EXTRA_DIST+= IDE/OPENSTM32/Inc/user_settings.h
EXTRA_DIST+= IDE/OPENSTM32/Inc/wolfssl_example.h
EXTRA_DIST+= IDE/OPENSTM32/Inc/lwipopts.h

View File

@ -0,0 +1,38 @@
PROGRAM ?= wolfcrypt
# This line must be added in your freedom-e-sdk/scripts/standalone.mk
# RISCV_CFLAGS += -I$(WOLFSSL_SRC_DIR) -I$(WOLFSSL_SRC_DIR)/IDE/ECLIPSE/SIFIVE -DWOLFSSL_USER_SETTINGS
# WOLFSSL_SRC_DIR variable must be set in the environment when GNU make is started.
# export WOLFSSL_SRC_DIR=~/freedom-e-sdk/software/wolfssl
WOLFSSL_CFLAGS += -I$(WOLFSSL_SRC_DIR) \
-I$(WOLFSSL_SRC_DIR)/IDE/ECLIPSE/SIFIVE \
-DWOLFSSL_USER_SETTINGS
SRC_FILES = $(wildcard $(WOLFSSL_SRC_DIR)/src/*.c)
SRC_FILES += $(wildcard $(WOLFSSL_SRC_DIR)/wolfcrypt/src/*.c)
SRC_FILES := $(filter-out %bio.c %misc.c %evp.c, $(SRC_FILES))
SRC =$(WOLFSSL_SRC_DIR)/IDE/ECLIPSE/SIFIVE/main.c \
$(SRC_FILES) \
$(WOLFSSL_SRC_DIR)/wolfcrypt/test/test.c \
$(WOLFSSL_SRC_DIR)/wolfcrypt/benchmark/benchmark.c
OPT_CFLAGS = -specs=nano.specs
#OPT_CFLAGS += -O3 -DTIME -DNOENUM -Wno-implicit -mexplicit-relocs -save-temps
#OPT_CFLAGS += -fno-inline -fno-builtin-printf -fno-common -falign-functions=4
# override the __stack_size and __heap_size default values of 0x400
# SiFive HiFive1 has 16KB of data SRAM
# The __stack_size and __heap_size symbols are defined in the linker metal.default.ld
# script in the freedom-e-sdk.
override CFLAGS += $(OPT_CFLAGS) $(WOLFSSL_CFLAGS) \
-Xlinker --defsym=__stack_size=0x1200 \
-Xlinker --defsym=__heap_size=0x800
$(PROGRAM): $(SRC)
$(CC) $(CFLAGS) $(SRC) $(LDFLAGS) $(LDLIBS) -o $@
clean:
rm -f $(PROGRAM) $(PROGRAM).hex

View File

@ -0,0 +1,199 @@
# SiFive RISC-V HiFive1 Port
## Overview
You can enable the wolfSSL support for RISC-V using the `#define WOLFSSL_SIFIVE_RISC_V`.
## Prerequisites
1. Follow the instructions on the SiFive GitHub [here](https://github.com/sifive/freedom-e-sdk) and SiFive website [here](https://www.sifive.com/) to download the freedom-e-sdk and software tools.
3. Run a simple hello application on your development board to confirm that your board functions as expected and the communication between your computer and the board works.
## Usage
You can start with a wolfcrypt example project to integrate the wolfSSL source code.
wolfSSL supports a compile-time user configurable options in the `IDE/RISCV/SIFIVE-HIFIVE1/user_settings.h` file.
The `IDE/RISCV/SIFIVE-HIFIVE1/main.c` example application provides a function to run the selected examples at compile time through the following two #defines in user_settings.h. You can define these macro options to disable the test run.
```
- #undef NO_CRYPT_TEST
- #undef NO_CRYPT_BENCHMARK
```
## Setup
### Setting up the SDK with wolfSSL
1. Download the wolfSSL source code or a zip file from GitHub and place it under your SDK `$HOME` directory. You can also copy or simlink to the source.
```
For example,
$ cd $HOME
$ git clone --depth=1 https://github.com/wolfSSL/wolfssl.git
```
2. Copy the wolfcrypt example project into your `freedom-e-sdk/software` directory.
```
$ cp -rf ~/wolfssl/IDE/RISCV/SIFIVE-HIFIVE1 ~/freedom-e-sdk/software/wolfcrypt
```
3. Edit your `~/freedom-e-sdk/scripts/standalone.mk` and add the following line after the last RISCV_CFLAGS entry:
```
RISCV_CFLAGS += -I$(WOLFSSL_SRC_DIR) -I$(WOLFSSL_SRC_DIR)/IDE/RISCV/SIFIVE-HIFIVE1 -DWOLFSSL_USER_SETTINGS
```
4. WOLFSSL_SRC_DIR variable must be set in the environment when GNU make is started.
```
$ export WOLFSSL_SRC_DIR=~/wolfssl
```
5. Setup your riscv64 compiler
```
$ export RISCV_OPENOCD_PATH=/opt/riscv-openocd
```
6. (Optional) Setup OpenOCD if your target supports it:
```
$ export RISCV_OPENOCD_PATH=/opt/riscv-openocd
```
## Building and Running
You can build from source or create a static library.
1. Using command-line:
```
$ cd freedom-e-sdk
$ make PROGRAM=wolfcrypt TARGET=sifive-hifive1-revb CONFIGURATION=debug clean software upload
```
This example cleans, builds and uploads the software on the sifive-hifive1-revb target but you can also combine and build for any of the supported targets.
Review the test results on the target console.
2. Building a static library for RISC-V using a cross-compiler:
```
$ cd $WOLFSSL_SRC_DIR
$./configure --host=riscv64-unknown-elf \
CC=riscv64-unknown-elf-gcc \
AR=riscv64-unknown-elf-ar \
AS=riscv64-unknown-elf-as \
RANLIB=$RISCV_PATH/bin/riscv64-unknown-elf-gcc-ranlib \
LD=riscv64-unknown-elf-ld \
CXX=riscv64-unknown-elf-g++ \
--disable-examples --enable-static --disable-shared \
CFLAGS="-march=rv32imac -mabi=ilp32 -mcmodel=medlow -ffunction-sections -fdata-sections -I~/freedom-e-sdk/bsp/sifive-hifive1/install/include -O0 -g -DNO_FILESYSTEM -DWOLFSSL_NO_SOCK -DNO_WRITEV -DWOLFCRYPT_ONLY -DWOLFSSL_SIFIVE_RISC_V"
$make
$sudo make install
```
You can now build and link your software to the wolfSSL libwolfssl.a static library.
### `wolfcrypt_test()`
wolfcrypt_test() prints a message on the target console similar to the following output:
```
SiFive HiFive1 Demo
Setting clock to 320MHz
Actual Clock 320MHz
error test passed!
MEMORY test passed!
base64 test passed!
asn test passed!
SHA test passed!
SHA-256 test passed!
SHA-512 test passed!
Hash test passed!
HMAC-SHA test passed!
HMAC-SHA256 test passed!
HMAC-SHA512 test passed!
GMAC test passed!
Chacha test passed!
POLY1305 test passed!
ChaCha20-Poly1305 AEAD test passed!
AES test passed!
AES192 test passed!
AES256 test passed!
AES-GCM test passed!
RANDOM test passed!
ECC test passed!
ECC buffer test passed!
CURVE25519 test passed!
ED25519 test passed!
logging test passed!
mutex test passed!
Test complete
```
### `benchmark_test()`
benchmark_test() prints a message on the target console similar to the following output.
TARGET=sifive-hifive1-revb:
```
SiFive HiFive1 Demo
Setting clock to 320MHz
Actual Clock 320MHz
------------------------------------------------------------------------------
wolfSSL version 4.0.0
------------------------------------------------------------------------------
wolfCrypt Benchmark (block bytes 1024, min 1.0 sec each)
RNG 250 KB took 1.098 seconds, 227.714 KB/s
AES-128-CBC-enc 50 KB took 1.132 seconds, 44.175 KB/s
AES-128-CBC-dec 50 KB took 1.142 seconds, 43.778 KB/s
AES-192-CBC-enc 50 KB took 1.250 seconds, 40.007 KB/s
AES-192-CBC-dec 50 KB took 1.260 seconds, 39.677 KB/s
AES-256-CBC-enc 50 KB took 1.368 seconds, 36.552 KB/s
AES-256-CBC-dec 50 KB took 1.378 seconds, 36.279 KB/s
AES-128-GCM-enc 25 KB took 1.225 seconds, 20.412 KB/s
AES-128-GCM-dec 25 KB took 1.225 seconds, 20.402 KB/s
AES-192-GCM-enc 25 KB took 1.290 seconds, 19.373 KB/s
AES-192-GCM-dec 25 KB took 1.291 seconds, 19.366 KB/s
AES-256-GCM-enc 25 KB took 1.352 seconds, 18.487 KB/s
AES-256-GCM-dec 25 KB took 1.353 seconds, 18.478 KB/s
CHACHA 1 MB took 1.006 seconds, 1.020 MB/s
CHA-POLY 700 KB took 1.032 seconds, 678.045 KB/s
POLY1305 2 MB took 1.007 seconds, 2.255 MB/s
SHA 2 MB took 1.002 seconds, 1.511 MB/s
SHA-256 525 KB took 1.011 seconds, 519.279 KB/s
SHA-512 275 KB took 1.017 seconds, 270.477 KB/s
HMAC-SHA 1 MB took 1.013 seconds, 1.399 MB/s
HMAC-SHA256 525 KB took 1.019 seconds, 515.020 KB/s
HMAC-SHA512 275 KB took 1.032 seconds, 266.351 KB/s
ECC 256 key gen 2 ops took 1.104 sec, avg 551.834 ms, 1.812 ops/sec
ECDHE 256 agree 2 ops took 1.101 sec, avg 550.400 ms, 1.817 ops/sec
ECDSA 256 sign 2 ops took 1.173 sec, avg 586.502 ms, 1.705 ops/sec
ECDSA 256 verify 2 ops took 2.153 sec, avg 1076.294 ms, 0.929 ops/sec
CURVE 25519 key gen 2 ops took 1.629 sec, avg 814.423 ms, 1.228 ops/sec
CURVE 25519 agree 2 ops took 1.626 sec, avg 813.156 ms, 1.230 ops/sec
ED 25519 key gen 1 ops took 1.436 sec, avg 1436.096 ms, 0.696 ops/sec
ED 25519 sign 2 ops took 2.913 sec, avg 1456.421 ms, 0.687 ops/sec
ED 25519 verify 2 ops took 5.012 sec, avg 2506.012 ms, 0.399 ops/sec
Benchmark complete
```
## Tested Configurations
- P-RNG (NIST DRBG) with SHA-256
- SHA 1/256/512
- AES 128/192/256 CBC/GCM
- ECC 256 sign/verify/shared secret with fast math or Single Precision (SP) library
- ED25519/Curve25519
- HMAC
- ChaCha20/Poly1305
## Known Caveats
- If you find the wolfcrypt test stuck on early_trap_vector error, it is like related to memory issues
- Using the `__stack_size` default value of 0x400 will not be enough for the ECC test to pass.
The `IDE/RISCV/SIFIVE-HIFIVE1/Makefile` overwrites the value with 0x1000 (4 KBytes)
- Enabling RSA will cause the ECC test to fail due to memory shortage.
## References
The test results were collected from a SiFive reference platform target with the following hardware, software and tool chains:
- HiFive1 Rev A/Rev B: HiFive1 Development Board with the Freedom Everywhere SoC, E300
- freedom-e-sdk
- wolfssl [latest version](https://github.com/wolfSSL/wolfssl)
For more information or questions, please email [support@wolfssl.com](mailto:support@wolfssl.com)

View File

@ -0,0 +1,9 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
EXTRA_DIST += \
IDE/RISCV/SIFIVE-HIFIVE1/README.md \
IDE/RISCV/SIFIVE-HIFIVE1/main.c \
IDE/RISCV/SIFIVE-HIFIVE1/Makefile\
IDE/RISCV/SIFIVE-HIFIVE1/user_settings.h

View File

@ -0,0 +1,184 @@
/* main.c
*
* Copyright (C) 2019 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 <wolfcrypt/test/test.h>
#include <wolfcrypt/benchmark/benchmark.h>
/* wolfCrypt_Init/wolfCrypt_Cleanup */
#include <wolfssl/wolfcrypt/wc_port.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifndef __METAL_MACHINE_HEADER
#define __METAL_MACHINE_HEADER "../../../../bsp/sifive-hifive1-revb/metal.h"
#endif
#include <metal/machine.h>
#ifndef NO_CRYPT_BENCHMARK
/*-specs=nano.specs doesnt include support for floating point in printf()*/
asm (".global _printf_float");
#ifndef RTC_FREQ
#define RTC_FREQ 32768UL
#endif
/* CLINT Registers (Core Local Interruptor) for time */
#define CLINT_BASE 0x02000000UL
#define CLINT_REG_MTIME (*((volatile uint32_t *)(CLINT_BASE + 0xBFF8)))
#define WOLFSSL_SIFIVE_RISC_V_DEBUG 0
double current_time(int reset)
{
double now = CLINT_REG_MTIME;
(void)reset;
return now/RTC_FREQ;
}
#endif /* !NO_CRYPT_BENCHMARK */
#if WOLFSSL_SIFIVE_RISC_V_DEBUG
void check(int depth) {
char ch;
char *ptr = malloc(1);
printf("stack at %p, heap at %p\n", &ch, ptr);
if (depth <= 0)
return;
check(depth-1);
free(ptr);
}
void mtime_sleep(uint32_t ticks) {
uint32_t start = CLINT_REG_MTIME;
while((CLINT_REG_MTIME - start) < ticks) {
}
}
void delay(uint32_t sec) {
uint32_t ticks = sec * RTC_FREQ;
mtime_sleep(ticks);
}
#endif /* WOLFSSL_SIFIVE_RISC_V_DEBUG */
/* 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;
uint32_t randReturnSize = sizeof(CUSTOM_RAND_TYPE);
while (i < sz)
{
/* If not aligned or there is odd/remainder */
if((i + randReturnSize) > sz ||
((uint32_t)&output[i] % randReturnSize) != 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 += randReturnSize;
}
}
return 0;
}
#if !defined(NO_CLOCK_SPEEDUP) && !defined(USE_CLOCK_HZ)
/* 320MHz */
#define USE_CLOCK_HZ 320000000UL
#endif
int main(void)
{
int ret;
long clk_Hz = 16000000; /* default */
#if WOLFSSL_SIFIVE_RISC_V_DEBUG
printf("check stack and heap addresses\n");
check(8);
printf("sleep for 10 seconds to verify timer, measure using a stopwatch\n");
delay(10);
printf("awake after sleeping for 10 seconds\n");
#endif
#ifdef USE_CLOCK_HZ
/* Speed up clock */
printf("SiFive HiFive1 Demo\n");
printf("Setting clock to %dMHz\n", USE_CLOCK_HZ/1000000);
clk_Hz = metal_clock_set_rate_hz(
&__METAL_DT_SIFIVE_FE310_G000_PLL_HANDLE->clock, USE_CLOCK_HZ
);
#endif
printf("Actual Clock %dMHz\n", clk_Hz/1000000);
/* Reconfigure the SPI Bus for dual mode */
#define QSPI0_CTRL 0x10014000UL
#define FESPI_REG_FFMT (*((volatile uint32_t *)(QSPI0_CTRL + 0x64)))
FESPI_REG_FFMT = 0xbb1447;
#ifdef DEBUG_WOLFSSL
wolfSSL_Debugging_ON();
#endif
if ((ret = wolfCrypt_Init()) != 0) {
printf("wolfCrypt_Init failed %d\n", ret);
return -1;
}
#ifndef NO_CRYPT_TEST
printf("\nwolfCrypt Test Started\n");
wolfcrypt_test(NULL);
printf("\nwolfCrypt Test Completed\n");
#endif
#ifndef NO_CRYPT_BENCHMARK
printf("\nBenchmark Test Started\n");
benchmark_test(NULL);
printf("\nBenchmark Test Completed\n");
#endif
if ((ret = wolfCrypt_Cleanup()) != 0) {
printf("wolfCrypt_Cleanup failed %d\n", ret);
return -1;
}
return 0;
}

View File

@ -0,0 +1,592 @@
/* user_settings.h
*
* Copyright (C) 2019 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
*/
/* Example Settings for SiFive HiFive1 */
#ifndef WOLFSSL_USER_SETTINGS_H
#define WOLFSSL_USER_SETTINGS_H
#ifdef __cplusplus
extern "C" {
#endif
/* ------------------------------------------------------------------------- */
/* SiFive HiFive */
/* ------------------------------------------------------------------------- */
#undef WOLFSSL_SIFIVE_RISC_V
#define WOLFSSL_SIFIVE_RISC_V
/* ------------------------------------------------------------------------- */
/* 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 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
/* ------------------------------------------------------------------------- */
/* Asymmetric */
/* ------------------------------------------------------------------------- */
/* RSA */
/* Not enabled due to memory constraints on HiFive1 */
#undef NO_RSA
#if 0
#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, FP_MAX_BITS must be adjusted accordingly */
// #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 */
#undef HAVE_ECC_CDH
//#define HAVE_ECC_CDH
/* Validate import */
#undef WOLFSSL_VALIDATE_ECC_IMPORT
//#define WOLFSSL_VALIDATE_ECC_IMPORT
/* 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
/* Disable alternate ECC size, since it uses HEAP allocations.
Heap is limited resource on HiFive1 */
//#define ALT_ECC_SIZE
#endif
#endif
#endif
/* DH */
#undef NO_DH
#if 0
/* Use table for DH instead of -lm (math) lib dependency */
#if 0
#define WOLFSSL_DH_CONST
#endif
#define HAVE_FFDHE_2048
//#define HAVE_FFDHE_4096
//#define HAVE_FFDHE_6144
//#define HAVE_FFDHE_8192
#else
#define NO_DH
#endif
/* Wolf Single Precision Math */
/* Optional ECC SECP256R1 acceleration using optimized C code */
#undef WOLFSSL_SP
#if 1
#define WOLFSSL_SP
#define WOLFSSL_SP_SMALL /* use smaller version of code (requires heap) */
#define SP_WORD_SIZE 32 /* force 32-bit type */
#define WOLFSSL_SP_MATH /* only SP math - eliminates fast math code */
//#define WOLFSSL_SP_DIV_32 /* do not use 64-bit divides */
#ifdef HAVE_ECC
#define WOLFSSL_HAVE_SP_ECC
#endif
#ifndef NO_RSA
#define WOLFSSL_HAVE_SP_RSA
#endif
#endif
/* Ed25519 / Curve25519 */
#undef HAVE_CURVE25519
#undef HAVE_ED25519
#if 1
#define HAVE_CURVE25519
#define HAVE_ED25519 /* ED25519 Requires SHA512 */
/* Optionally use small math (less flash usage, but much slower) */
#if 1
/* Curve and Ed 25519 small */
#define CURVED25519_SMALL
#endif
#endif
/* ------------------------------------------------------------------------- */
/* Symmetric Ciphers */
/* ------------------------------------------------------------------------- */
/* 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
#endif
/* DES3 */
#undef NO_DES3
#if 0
#else
#define NO_DES3
#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
/* ------------------------------------------------------------------------- */
/* Symmetric 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 1
#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
/* Blake2B */
#undef HAVE_BLAKE2
#if 0
#define HAVE_BLAKE2
#endif
/* Blake2S */
#undef HAVE_BLAKE2S
#if 0
#define HAVE_BLAKE2S
#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
/* Static memory */
#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 */
#if defined(WOLFSSL_SIFIVE_RISC_V)
#define WOLFSSL_USER_CURRTIME /* for benchmarks, uses "custom_time()" function */
#define WOLFSSL_GMTIME
#define USER_TICKS
#else
// extern unsigned long my_time(unsigned long* timer);
// #define XTIME my_time
#endif
/* ------------------------------------------------------------------------- */
/* RNG */
/* ------------------------------------------------------------------------- */
#if 0
/* Bypass P-RNG and use only HW RNG */
#define CUSTOM_RAND_TYPE unsigned int
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
#else
#define HAVE_HASHDRBG
/* 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
#endif
/* ------------------------------------------------------------------------- */
/* Enable Features */
/* ------------------------------------------------------------------------- */
#undef WOLFSSL_TLS13
#if 0
#define WOLFSSL_TLS13
#endif
#undef WOLFSSL_KEY_GEN
#if 0
#define WOLFSSL_KEY_GEN
#endif
/* reduce DH test time */
#define WOLFSSL_OLD_PRIME_CHECK
#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 */

View File

@ -0,0 +1,151 @@
# SiFive HiFive Unleashed
Instructions for cross-compiling and running wolfSSL on the HiFive Unleashed board.
## Board SiFive HiFive Unleashed Board
SiFive Freedom U540 SoC at 1.5GHz
Getting started guide:
https://sifive.cdn.prismic.io/sifive%2Ffa3a584a-a02f-4fda-b758-a2def05f49f9_hifive-unleashed-getting-started-guide-v1p1.pdf
Make sure your ethernet is attached and power up board. You can connecct the micro-usb to get a UART console that will display the DHCP IP address. Default login password is "sifive".
## Building Freedom-U-SDK
```sh
git clone https://github.com/sifive/freedom-u-sdk.git
cd freedom-u-sdk
git submodule update --recursive --init
make
```
See `freedom-u-sdk/README.md` file for instructions on updating the SD card U-Boot and Linux image.
### Installing U-Boot
Insert SD card from Unleashed into host and determine the assigned `/dev/sdX` for the media.
From `freedom-u-sdk` directory:
```sh
sudo make DISK=/dev/sdX format-boot-loader
# Copy U-Boot .fit image to first FAT partition (32MB)
sudo mkdir /media/hifiveu_boot
sudo mount -t vfat /dev/sdX1 /media/hifiveu_boot
cp ./work/image-<GITID>.fit /media/hifiveu_boot/hifiveu.fit
sudo umount /media/hifiveu_boot
# Copy Linux FS
sudo dd if=./work/hifive-unleashed-<ID>.gpt of=/dev/sdX2 bs=1M
```
Note: Make sure S1 Switch 5 (MSEL2) is OFF, rest ON (MSEL=1011) to boot from SD
### Installing Debian
Insert SD card from Unleashed into host and determine the assigned character sequence (X) for the media.
From `freedom-u-sdk` directory:
```sh
sudo make DISK=/dev/sdX format-demo-image
```
## Building wolfSSL
Make sure you are using wolfSSL sources based on this PR https://github.com/wolfSSL/wolfssl/pull/2456
The PR 2456 includes a patch to `wolfssl/wolfcrypt/types.h` to detect 64-bit types based on the `__riscv_xlen` macro.
### Cross Compiling
This example assumes the `wolfssl` root directory is along side the `freedom-u-sdk` directory. If not then adjust paths.
```
~\
wolfssl
freedom-u-sdk
```
```sh
./configure --host=riscv64 \
CC="`pwd`/../freedom-u-sdk/work/buildroot_initramfs/host/bin/riscv64-sifive-linux-gnu-gcc" \
--with-sysroot="`pwd`/../freedom-u-sdk/work/buildroot_initramfs_sysroot/" \
--disable-shared \
--enable-sp \
CFLAGS="-mabi=lp64d -march=rv64imafdc"
make
```
Copy files to device (replace IP address):
```sh
scp ./wolfcrypt/test/testwolfcrypt root@192.168.0.144:~
scp ./wolfcrypt/benchmark/benchmark root@192.168.0.144:~
scp ./examples/client/client root@192.168.0.144:~
scp ./examples/server/server root@192.168.0.144:~
# manually `mkdir certs` on target
scp ./certs/* root@192.168.0.144:~/certs
```
### Native Compiler
```sh
./configure --enable-sp
make
```
## Benchmark Results
The following is running the wolfCrypt benchmark at 1.5GHz on a single thread (default CPU speed is 1.0GHz).
```sh
echo 1500000000 > /sys/devices/platform/soc/10000000.prci/rate
./benchmark
------------------------------------------------------------------------------
wolfSSL version 4.1.0
------------------------------------------------------------------------------
wolfCrypt Benchmark (block bytes 1048576, min 1.0 sec each)
RNG 10 MB took 1.165 seconds, 8.585 MB/s
AES-128-CBC-enc 15 MB took 1.346 seconds, 11.141 MB/s
AES-128-CBC-dec 15 MB took 1.380 seconds, 10.867 MB/s
AES-192-CBC-enc 10 MB took 1.002 seconds, 9.983 MB/s
AES-192-CBC-dec 10 MB took 1.020 seconds, 9.805 MB/s
AES-256-CBC-enc 10 MB took 1.100 seconds, 9.091 MB/s
AES-256-CBC-dec 10 MB took 1.117 seconds, 8.952 MB/s
AES-128-GCM-enc 10 MB took 1.809 seconds, 5.528 MB/s
AES-128-GCM-dec 10 MB took 1.810 seconds, 5.524 MB/s
AES-192-GCM-enc 10 MB took 1.911 seconds, 5.233 MB/s
AES-192-GCM-dec 10 MB took 1.911 seconds, 5.232 MB/s
AES-256-GCM-enc 5 MB took 1.013 seconds, 4.935 MB/s
AES-256-GCM-dec 5 MB took 1.014 seconds, 4.933 MB/s
CHACHA 25 MB took 1.181 seconds, 21.168 MB/s
CHA-POLY 20 MB took 1.188 seconds, 16.833 MB/s
MD5 80 MB took 1.025 seconds, 78.066 MB/s
POLY1305 85 MB took 1.032 seconds, 82.357 MB/s
SHA 40 MB took 1.033 seconds, 38.728 MB/s
SHA-256 20 MB took 1.023 seconds, 19.557 MB/s
SHA-384 25 MB took 1.059 seconds, 23.597 MB/s
SHA-512 25 MB took 1.059 seconds, 23.597 MB/s
HMAC-MD5 80 MB took 1.026 seconds, 77.950 MB/s
HMAC-SHA 40 MB took 1.034 seconds, 38.700 MB/s
HMAC-SHA256 20 MB took 1.023 seconds, 19.559 MB/s
HMAC-SHA384 25 MB took 1.059 seconds, 23.598 MB/s
HMAC-SHA512 25 MB took 1.059 seconds, 23.599 MB/s
RSA 2048 public 2000 ops took 1.032 sec, avg 0.516 ms, 1938.304 ops/sec
RSA 2048 private 100 ops took 1.713 sec, avg 17.132 ms, 58.370 ops/sec
DH 2048 key gen 133 ops took 1.003 sec, avg 7.544 ms, 132.552 ops/sec
DH 2048 agree 200 ops took 1.531 sec, avg 7.653 ms, 130.676 ops/sec
ECC 256 key gen 1330 ops took 1.001 sec, avg 0.752 ms, 1329.260 ops/sec
ECDHE 256 agree 400 ops took 1.243 sec, avg 3.107 ms, 321.830 ops/sec
ECDSA 256 sign 1000 ops took 1.043 sec, avg 1.043 ms, 958.539 ops/sec
ECDSA 256 verify 300 ops took 1.104 sec, avg 3.680 ms, 271.766 ops/sec
Benchmark complete
```
## Support
For questions please email us at support@wolfssl.com.

View File

@ -0,0 +1,5 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
EXTRA_DIST+= IDE/RISCV/SIFIVE-UNLEASHED/README.md

6
IDE/RISCV/include.am Normal file
View File

@ -0,0 +1,6 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
include IDE/RISCV/SIFIVE-HIFIVE1/include.am
include IDE/RISCV/SIFIVE-UNLEASHED/include.am

View File

@ -89,7 +89,6 @@
/* Note: You will also need to update the UART clock gate in hw_uart_init (SIM_SCGC1_UART5_MASK) */
/* Note: TWR-K60 is UART3, PTC17 */
/* Note: FRDM-K64 is UART4, PTE24 */
/* Note: FRDM-K64 is UART4, PTE24 or UART0 PTB17 for OpenOCD (SIM_SCGC4_UART0_MASK)*/
/* Note: TWR-K64 is UART5, PTE8 */
/* Note: FRDM-K82F is LPUART0 A2, LPUART4 PTC15 */

View File

@ -65,7 +65,7 @@ void main(void)
test_num++;
} while(args.return_code == 0);
/*Print this again for redundancy*/
/* Print this again for redundancy */
#ifdef WOLFSSL_FRDM_K64_JENKINS
printf("\n&&&&&&&&&&&&&& done &&&&&&&&&&&&&\n");
delay_us(1000000);

View File

@ -208,6 +208,7 @@ extern "C" {
/* MD5 */
#undef NO_MD5
#if 1
#else
#define NO_MD5
#endif

View File

@ -50,7 +50,6 @@
#define USER_TIME
#define XTIME time
#define HAVE_TIME_T_TYPE
#define USE_WOLF_SUSECONDS_T
#define USE_WOLF_TIMEVAL_T
@ -75,22 +74,6 @@
#define HAVE_OCSP
#define HAVE_CERTIFICATE_STATUS_REQUEST
//#define WOLFSSL_KEY_GEN
#define SHOW_GEN
#define WOLFSSL_KEEP_STORE_CERTS
#define WOLFSSL_CIPHER_INTERNALNAME
#define WOLFSSL_GETENV_RANDFILE "ABCDEFG"
#define WOLFSSL_GETENV_HOME "home"
#define CloseSocket(s) {}
#define StartTCP()
#define NO_FILESYSTEM
#define XFILE FILE*
#define XBADFILE NULL
//#define WOLFSSL_USER_KEYFILES /* Substitute key and cert files in test.h with user definitions */
int strncasecmp(const char *s1, const char *s2, unsigned int sz);

View File

@ -1,6 +1,10 @@
wolfSSL/AlphaProject Boad demo setup Guide
This demo is tested with Renesas CS+ v6.01<EFBFBD>AAP-RX71M-0A, wolfSSL 3.15.3.
This demo is tested with the following condition.
Renesas : CS+ v6.01, v8.01
Board : AP-RX71M-0A
wolfSSL : 3.15.3, 4.0.0
Setup process:
1. Download software
@ -12,25 +16,48 @@ Setup process:
- open t4_demo.mtpj and build. This create demo program library.
3. Set up AlphaProject
!!** When you use version 2.0 of a sample program, **!!
!!** please replace _ether_ to _usbfunc_ **!!
- The demo uses ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\
ap_rx71m_0a_ether_sample_cs.mtpj
ap_rx71m_0a_ether_sample_cs.mtpj
- Open and edit ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\AP_RX71M_0A.c
insert wolfSSL_init() in echo_srv_init().
===
sci_init();
can_init();
echo_srv_init();
wolfSSL_init(); <- insert this line
sci_init();
can_init();
echo_srv_init();
wolfSSL_init(); <- insert this line
===
!!** when you use version 2.0 **!!
===
CanInit();
SciInit();
EthernetAppInit();
UsbfInit();
wolfSSL_init(); <- insert this line
===
!!******************************!!
- Modify stack and heap size in ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\r_config
Line 120#pragma stacksize su=0x2000
Line 139 #define BSP_CFG_HEAP_BYTES (0xa000)
<EFBFBD>@- Modify IP address ib Sample\ap_rx71m_0a_ether_sample_cs\src\r_t4_rx\src\config_tcpudp.c
<EFBFBD>@as needed
<EFBFBD>@
!!** when you use version 2.0 **!!
- Modify stack and heap size in ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_usbfunc_sample_cs\src\smc_gen\r_bsp_config.h
Line 154#pragma stacksize su=0x2000
Line 175#define BSP_CFG_HEAP_BYTES (0xa000)
!!******************************!!
- Modify IP address Sample\ap_rx71m_0a_ether_sample_cs\src\r_t4_rx\src\config_tcpudp.c
as needed
!!** when you use version 2.0 **!!
- Modify IP address Sample\ap_rx71m_0a_usbfunc_sample_cs\src\tcp_sample\src\config_tcpudp.c
as needed
!!******************************!!
===
#define MY_IP_ADDR0 192,168,1,200 /* Local IP address */
#define GATEWAY_ADDR0 192,168,1,254 /* Gateway address (invalid if all 0s) */
@ -66,16 +93,16 @@ c: simple client. Specify IP address and port as following.
You can use wolfssl/examples/server and client on your PC for TLS peer test.
PC side<EFBFBD>F
PC side
$ ./examples/server/server -b -d
Board side<EFBFBD>F
Board side
> c <IP Addr> 11111
Board side<EFBFBD>F
Board side
> s
PC side<EFBFBD>F
PC side
$ ./examples/client/client -h <IP Addr> -p 50000
---

View File

@ -1,6 +1,10 @@
wolfSSL/AlphaProject<63>{<7B>[<5B>h<EFBFBD>f<EFBFBD><66><EFBFBD>@<40>Z<EFBFBD>b<EFBFBD>g<EFBFBD>A<EFBFBD>b<EFBFBD>v<EFBFBD>K<EFBFBD>C<EFBFBD>h
<EFBFBD><EFBFBD><EFBFBD>̃f<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Renesas CS+ v6.01<EFBFBD>AAP-RX71M-0A, wolfSSL 3.15.3 <EFBFBD>Ńe<EFBFBD>X<EFBFBD>g<EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B
<EFBFBD><EFBFBD><EFBFBD>̃f<EFBFBD><EFBFBD><EFBFBD>͈ȉ<EFBFBD><EFBFBD>̊‹<EFBFBD><EFBFBD>Ńe<EFBFBD>X<EFBFBD>g<EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><EFBFBD>܂<EFBFBD><EFBFBD>B
Renesas : CS+ v6.01, v8.01
Board : AP-RX71M-0A
wolfSSL : 3.15.3, 4.0.0
<EFBFBD>Z<EFBFBD>b<EFBFBD>g<EFBFBD>A<EFBFBD>b<EFBFBD>v<EFBFBD><EFBFBD>F
@ -9,12 +13,16 @@ wolfSSL/AlphaProject
<EFBFBD>@- <20><><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD>H<EFBFBD><48><EFBFBD>_<EFBFBD>[<5B><><EFBFBD><EFBFBD>wolfssl<73><EFBFBD><EA8EAE><EFBFBD>𓀂<EFBFBD><F0938082>܂<EFBFBD><DC82>B
<EFBFBD>Q<EFBFBD>DwolfSSL<EFBFBD>̃Z<EFBFBD>b<EFBFBD>g<EFBFBD>A<EFBFBD>b<EFBFBD>v
<EFBFBD>@- CS+<2B>ɂ<EFBFBD>wolfssl\IDE\Renesas\cs+\Project<63><74><EFBFBD><EFBFBD>wolfssl\lib.mtpj<70><6A><EFBFBD>J<EFBFBD><4A>
<EFBFBD>@- CS+<2B>ɂ<EFBFBD>wolfssl\IDE\Renesas\cs+\Project<63><74><EFBFBD><EFBFBD>wolfssl\wolfssl_lib.mtpj<70><6A><EFBFBD>J<EFBFBD><4A>
<EFBFBD>@<40>@wolfSSL<53><4C><EFBFBD>C<EFBFBD>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD>[<5B>̃r<CC83><72><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B
<EFBFBD>@- <20><><EFBFBD><EFBFBD><EFBFBD>t<EFBFBD>H<EFBFBD><48><EFBFBD>_<EFBFBD>̉<EFBFBD><CC89><EFBFBD>t4_demo.mtpj<70><6A><EFBFBD>J<EFBFBD><4A><EFBFBD>A<EFBFBD>f<EFBFBD><66><EFBFBD>v<EFBFBD><76><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD>̃r<CC83><72><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B
<EFBFBD>@<40><><EFBFBD>̃v<CC83><76><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD>[<5B>`<60><><EFBFBD>Ńr<C583><72><EFBFBD>h<EFBFBD><68><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B
<EFBFBD>@
<EFBFBD>R<EFBFBD>DAlphaProject<EFBFBD><EFBFBD><EFBFBD>̃Z<EFBFBD>b<EFBFBD>g<EFBFBD>A<EFBFBD>b<EFBFBD>v
!!** <20>T<EFBFBD><54><EFBFBD>v<EFBFBD><76><EFBFBD>v<EFBFBD><76><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD> v2.0 <20><><EFBFBD>g<EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD>́A_ether_ => _usbfunc_ **!!
!!** <20>ƒu<C692><75><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> **!!
<EFBFBD>@<40>f<EFBFBD><66><EFBFBD><EFBFBD>ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs<63>t<EFBFBD>H<EFBFBD><48><EFBFBD>_<EFBFBD><5F><EFBFBD><EFBFBD>
<EFBFBD>@ap_rx71m_0a_ether_sample_cs.mtpj<70>v<EFBFBD><76><EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD>𗘗p<F0979897><70><EFBFBD>܂<EFBFBD><DC82>B
<EFBFBD>@
@ -23,31 +31,53 @@ wolfSSL/AlphaProject
<EFBFBD>@<40>X<EFBFBD>V<EFBFBD>s<EFBFBD>ڂ<EFBFBD>echo_srv_init()<29>̉<EFBFBD><CC89><EFBFBD>wolfSSL_init()<29><><EFBFBD>}<7D><><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B
===
sci_init();
can_init();
echo_srv_init();
wolfSSL_init(); <- <20><><EFBFBD>̍s<CC8D><73><EFBFBD>}<7D><>
sci_init();
can_init();
echo_srv_init();
wolfSSL_init(); <- <20><><EFBFBD>̍s<CC8D><73><EFBFBD>}<7D><>
===
<EFBFBD>@- ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\r_config<69>t<EFBFBD>@<40>C<EFBFBD><43>
!!** <20>T<EFBFBD><54><EFBFBD>v<EFBFBD><76><EFBFBD>v<EFBFBD><76><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD> v2.0 <20><><EFBFBD>g<EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD>́A<CD81><41><EFBFBD>L **!!
===
CanInit();
SciInit();
EthernetAppInit();
UsbfInit();
wolfSSL_init(); <- <20><><EFBFBD>̍s<CC8D><73><EFBFBD>}<7D><>
===
!!**********************************************************************!!
<EFBFBD>@- ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\smc_gen\r_bsp_config.h
<EFBFBD>@<40><><EFBFBD>J<EFBFBD><4A><EFBFBD>A<EFBFBD>X<EFBFBD>^<5E>b<EFBFBD>N<EFBFBD>T<EFBFBD>C<EFBFBD>Y<EFBFBD>ƃq<C683>[<5B>v<EFBFBD>T<EFBFBD>C<EFBFBD>Y<EFBFBD><59><EFBFBD>ȉ<EFBFBD><C889>̂悤<CC82>ɐݒ肵<DD92>܂<EFBFBD><DC82>B
<EFBFBD>@
<EFBFBD>@120<32>s<EFBFBD><73> #pragma stacksize su=0x2000
<EFBFBD>@139<33>s<EFBFBD><73> #define BSP_CFG_HEAP_BYTES (0xa000)
!!** <20>T<EFBFBD><54><EFBFBD>v<EFBFBD><76><EFBFBD>v<EFBFBD><76><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD> v2.0 <20><><EFBFBD>g<EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD>́A<CD81><41><EFBFBD>L **!!
<EFBFBD>@- ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_usbfunc_sample_cs\src\smc_gen\r_bsp_config.h
<EFBFBD>@<40><><EFBFBD>J<EFBFBD><4A><EFBFBD>A<EFBFBD>X<EFBFBD>^<5E>b<EFBFBD>N<EFBFBD>T<EFBFBD>C<EFBFBD>Y<EFBFBD>ƃq<C683>[<5B>v<EFBFBD>T<EFBFBD>C<EFBFBD>Y<EFBFBD><59><EFBFBD>ȉ<EFBFBD><C889>̂悤<CC82>ɐݒ肵<DD92>܂<EFBFBD><DC82>B
<EFBFBD>@154<35>s<EFBFBD><73> #pragma stacksize su=0x2000
<EFBFBD>@175<37>s<EFBFBD><73> #define BSP_CFG_HEAP_BYTES (0xa000)
!!**********************************************************************!!
<EFBFBD>@- IP<49>A<EFBFBD>h<EFBFBD><68><EFBFBD>X<EFBFBD>̃f<CC83>t<EFBFBD>H<EFBFBD><48><EFBFBD>g<EFBFBD>l<EFBFBD>͈ȉ<CD88><C889>̂悤<CC82>ɂȂ<C982><C882>Ă<EFBFBD><C482>܂<EFBFBD><DC82>B
<EFBFBD>@<40>K<EFBFBD>v<EFBFBD><76><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>΁ASample\ap_rx71m_0a_ether_sample_cs\src\r_t4_rx\src\config_tcpudp.c
<EFBFBD>@<40><><EFBFBD><EFBFBD>139<33>s<EFBFBD>ڂ<EFBFBD><DA82><EFBFBD><EFBFBD>̒<EFBFBD><CC92>`<60><><EFBFBD>ύX<CF8D><58><EFBFBD>܂<EFBFBD><DC82>B
<EFBFBD>@
<EFBFBD>@!!** <20>T<EFBFBD><54><EFBFBD>v<EFBFBD><76><EFBFBD>v<EFBFBD><76><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD> v2.0 <20><><EFBFBD>g<EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD>́A<CD81><41><EFBFBD>L **!!
Sample\ap_rx71m_0a_usbfunc_sample_cs\src\tcp_sample\src\config_tcpudp.c
<20><><EFBFBD><EFBFBD>166<36>s<EFBFBD>ڂ<EFBFBD><DA82><EFBFBD><EFBFBD>̒<EFBFBD><CC92>`<60><><EFBFBD>ύX<CF8D><58><EFBFBD>܂<EFBFBD><DC82>B
!!**********************************************************************!!
===
#define MY_IP_ADDR0 192,168,1,200 /* Local IP address */
#define GATEWAY_ADDR0 192,168,1,254 /* Gateway address (invalid if all 0s) */
#define SUBNET_MASK0 255,255,255,0 /* Subnet mask */
===
<EFBFBD>@- CS+<2B><>ap_rx71m_0a_ether_sample_cs.mtpj<70>v<EFBFBD><76><EFBFBD>W<EFBFBD>F<EFBFBD>N<EFBFBD>g<EFBFBD><67><EFBFBD>J<EFBFBD><4A><EFBFBD>AwolfSSL<53>ƃf<C683><66><EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>@<40>o<EFBFBD>^<5E><><EFBFBD>܂<EFBFBD><DC82>BCC-RX(<28>r<EFBFBD><72><EFBFBD>h<EFBFBD>c<EFBFBD>[<5B><>)-><3E><><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD>E<EFBFBD>I<EFBFBD>v<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>^<5E>u-><3E>g<EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD>ȉ<EFBFBD><EFBFBD>̓<EFBFBD><EFBFBD>‚̃t<EFBFBD>@<40>C<EFBFBD><EFBFBD>
<EFBFBD>@<40><><EFBFBD>o<EFBFBD>^<5E><><EFBFBD>܂<EFBFBD><DC82>B
<EFBFBD>@<40>o<EFBFBD>^<5E><><EFBFBD>܂<EFBFBD><DC82>BCC-RX(<28>r<EFBFBD><72><EFBFBD>h<EFBFBD>c<EFBFBD>[<5B><>)-><3E><><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD>E<EFBFBD>I<EFBFBD>v<EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>^<5E>u-><3E>g<EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD>C<EFBFBD>u<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD>@<40>ȉ<EFBFBD><EFBFBD>̓<EFBFBD><EFBFBD>‚̃t<EFBFBD>@<40>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD>o<EFBFBD>^<5E><><EFBFBD>܂<EFBFBD><DC82>B
<EFBFBD>@wolfssl\IDE\Renesas\cs+\Projects\wolfssl_lib\DefaultBuild\wolfssl_lib.lib
<EFBFBD>@wolfssl\IDE\Renesas\cs+\Projects\t4_demo\DefaultBuild\t4_demo.lib

View File

@ -30,7 +30,7 @@ static WOLFSSL_CTX *wolfSSL_sv_ctx;
static WOLFSSL_CTX *wolfSSL_cl_ctx;
static long tick;
static void timeTick(void)
static void timeTick(void *pdata)
{
tick++;
}

View File

@ -22,6 +22,13 @@
<ParentItem>e38de3e6-e537-43bc-9f7d-3958453b991f</ParentItem>
<Property>b113ecd1-816e-459a-afa4-fbc8975bfcb1</Property>
</Instance>
<Instance Guid="eabc01da-7e73-45ba-a18b-0a13ec91d158">
<Name>user_settings.h</Name>
<Type>File</Type>
<RelativePath>..\common\user_settings.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>e38de3e6-e537-43bc-9f7d-3958453b991f</ParentItem>
</Instance>
<Instance Guid="caa2365b-7326-4cbb-bd88-b0ecf296df18">
<Name>crl.c</Name>
<Type>File</Type>
@ -91,13 +98,6 @@
<ParentItem>78a99f10-6945-4b7b-ab83-895a78962b99</ParentItem>
<Property>b3a0ee4c-7893-43ab-aa14-cc84267a24b4</Property>
</Instance>
<Instance Guid="f82110c6-9cf8-4a3f-b96e-6b951ee6b0c8">
<Name>user_settings.h</Name>
<Type>File</Type>
<RelativePath>user_settings.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>78a99f10-6945-4b7b-ab83-895a78962b99</ParentItem>
</Instance>
<Instance Guid="cfc4ddef-2ff8-440d-9135-5e36e230a9d0">
<Name>aes.c</Name>
<Type>File</Type>

View File

@ -12,6 +12,7 @@ test:
- set stack size in stacksct.h
- replace lowlvl.src with sample project's lowlvl.src which you can download below.
https://www.renesas.com/jp/ja/software/D3012028.html
* copy lowlvl.c and lowlvl.h in sample project's above into src directory of test project too.
Build test wolfCrypt
Setting MPU: R5F565MLCxFC
Setting MPU: R5F565MLCxFC or R5F571MLDxFC

View File

@ -31,10 +31,11 @@
#define WOLFSSL_NO_CURRDIR
#define NO_FILESYSTEM
#define WOLFSSL_LOG_PRINTF
/* #define DEBUG_WOLFSSL */
#define OPENSSL_EXTRA
#define WOLFSSL_HAVE_MIN
#define WOLFSSL_HAVE_MAX
#if !defined(min)
#define min(data1, data2) _builtin_min(data1, data2)
#endif
#define WOLFSSL_SMALL_STACK
#define WOLFSSL_DH_CONST
@ -47,15 +48,15 @@
#define USE_WOLF_TIMEVAL_T
#define WOLFSSL_USER_CURRTIME /* for benchmark */
#define WOLFSSL_GENSEED_FORTEST /* Wardning: 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 */
#ifndef SINGLE_THREADED
/* expects use FRERRTOS */
#define FREERTOS
#endif
/* #define NO_DH */
#define HAVE_AESGCM
@ -66,3 +67,20 @@
#define HAVE_ED25519
/* #define NO_WOLFSSL_STUB */
/* #define DEBUG_WOLFSSL */
/* TSIP TLS specific definitions */
#if !defined(WOLFSSL_RENESAS_TSIP)
#define OPENSSL_EXTRA
#define WOLFSSL_GENSEED_FORTEST /* Warning: define your own seed gen */
#else
#if defined(WOLFSSL_RENESAS_RX65N)
/* In the case of Static RSA and AES-CBC use */
#define HAVE_AES_CBC
/* TSIP ver 1.0.6 or lower supports only static RSA as Public-key cryptography. */
#define WOLFSSL_STATIC_RSA
/* for disabling TSIP CRYPT and TSIP TLS */
/* #define NO_RENESAS_TSIP_CRYPT */
/* for disabling only TSIP TLS-linked Common key encryption method */
/* #define NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION */
#endif
#endif

View File

@ -21,7 +21,7 @@
typedef unsigned long time_t;
#define YEAR 2018
#define YEAR 2019
#define MON 5
static int tick = 0;
@ -36,6 +36,6 @@ int strncasecmp(const char *s1, const char * s2, unsigned int sz)
{
for( ; sz>0; sz--)
if(toupper(s1++) != toupper(s2++))
return 1;
return 1;
return 0;
}

View File

@ -8,6 +8,11 @@ EXTRA_DIST+= IDE/Renesas/e2studio/Projects/wolfssl/.project
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/.cproject
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/.project
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/src/test_main.c
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/src/key_data.c
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/src/key_data.h
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/src/wolf_client.c
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/src/wolf_server.c
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/src/wolfssl_demo.h
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/common/wolfssl_dummy.c
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/common/strings.h
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/common/unistd.h

View File

@ -1,8 +1,8 @@
<?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="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.246204984">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.246204984" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<cconfiguration id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1378385971">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1378385971" moduleId="org.eclipse.cdt.core.settings" name="HardwareDebug">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
@ -14,83 +14,407 @@
</storageModule>
<storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
<option id="toolchain.id" value="Renesas_RXC"/>
<option id="toolchain.version" value="v2.08.00"/>
<option id="toolchain.version" value="v3.01.00"/>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="abs" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="Debug" id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.246204984" name="Debug" parent="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration">
<folderInfo id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.246204984." name="/" resourcePath="">
<toolChain id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.toolChain.490516599" name="Renesas CCRX Toolchain" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.debug.toolChain">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform.546125733" osList="win32" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform"/>
<builder buildPath="${workspace_loc:/test}/Debug" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder.864420363" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CCRX Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder"/>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp.398562691" name="DSP Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp">
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo.1671134834" name="デバッグ情報を出力する" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<configuration artifactExtension="abs" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="Debug on hardware" id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1378385971" name="HardwareDebug" parent="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration">
<folderInfo id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1378385971." name="/" resourcePath="">
<toolChain id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.toolChain.1637393351" name="Renesas CCRX Toolchain" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.toolChain">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform.808325012" osList="win32" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform"/>
<builder buildPath="${workspace_loc:/test}/HardwareDebug" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder.65531188" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CCRX Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder"/>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp.1710373085" name="DSP Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp">
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo.390598726" name="デバッグ情報を出力する" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian.2145260692" name="出力するデータ値のエンディアン" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian.big" valueType="enumerated"/>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.common.741650141" name="Common" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.common">
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.1805078695" name="命令セット・アーキテクチャ" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.rxv2" valueType="enumerated"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu.1234136355" name="Has FPU" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu" useByScannerDiscovery="false" value="TRUE" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName.278687847" name="Device Name" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName" useByScannerDiscovery="false" value="R5F571MLCxFC" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand.1991523533" name="Device Command" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand" useByScannerDiscovery="false" value="R5F571ML" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos.1718474165" name="Check RTOS" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos" useByScannerDiscovery="false" value="unusedRtos" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp.1754444988" name="Has DSP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp" useByScannerDiscovery="false" value="false" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily.2135235189" name="Device Family" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily" useByScannerDiscovery="false" value="RX71M" valueType="string"/>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.common.385785132" name="Common" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.common">
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.968417281" name="命令セット・アーキテクチャ" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.rxv2" valueType="enumerated"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.rxArchitecture.1826562770" name="RX Architecture" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.rxArchitecture" useByScannerDiscovery="false" value="rxv2" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns.2015650112" name="浮動小数点演算命令を使用する" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns.yes" valueType="enumerated"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu.1065149525" name="Has FPU" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu" useByScannerDiscovery="false" value="TRUE" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName.1439501151" name="Device Name" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName" useByScannerDiscovery="false" value="R5F565NEHxFP" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory.141103170" name="Device history" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory" useByScannerDiscovery="false" value="non_init;R5F565NEHxFP" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isaHistory.13818145" name="ISA history" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isaHistory" useByScannerDiscovery="false" value="non_init;com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.rxv2" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand.624156745" name="Device Command" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand" useByScannerDiscovery="false" value="R5F565NE" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos.198501700" name="Check RTOS" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos" useByScannerDiscovery="false" value="unusedRtos" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp.898504242" name="Has DSP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp" useByScannerDiscovery="false" value="false" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily.2015079094" name="Device Family" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily" useByScannerDiscovery="false" value="RX65N" valueType="string"/>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler.1005426126" name="Compiler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler">
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.1655116744" name="浮動小数点演算命令を使用する" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.yes" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include.421912226" name="インクルード・ファイルを検索するフォルダ" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include" useByScannerDiscovery="false" valueType="includePath">
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler.220371913" name="Compiler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler">
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.1764475068" name="浮動小数点演算命令を使用する" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.yes" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include.477145288" name="インクルード・ファイルを検索するフォルダ" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="${TCINSTALL}/include"/>
<listOptionValue builtIn="false" value="${ProjDirPath}/../common"/>
<listOptionValue builtIn="false" value="${ProjDirPath}/../../../../../"/>
<listOptionValue builtIn="false" value="${ProjDirPath}/generate"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../common&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../../../../&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_bsp}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx/src/targets/rx231}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx/src/targets/rx66t}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx/src/targets/rx65n}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_cmt_rx}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_cmt_rx/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_ether_rx}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/general}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_pincfg}&quot;"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define.1250794291" name="プリプロセッサ・マクロの定義" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define" useByScannerDiscovery="false" valueType="definedSymbols">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define.511269805" name="プリプロセッサ・マクロの定義" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG_CONSOLE"/>
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
</option>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.286984585" name="Cソース" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.c99" valueType="enumerated"/>
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType.1125458755" name="Compiler Input C" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType"/>
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType.1044037817" name="Compiler Input CPP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userBefore.165256012" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userAfter.850666858" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.897672730" name="Cソース" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.c99" valueType="enumerated"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode.862144636" name="プログラムの文字コード" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode.utf8" valueType="enumerated"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode.48690443" name="出力する文字コード" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode.utf8" valueType="enumerated"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.optimize.1557621233" name="最適化レベル" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.optimize" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.optimize.level2" valueType="enumerated"/>
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType.1722484558" name="Compiler Input C" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType"/>
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType.709788007" name="Compiler Input CPP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType"/>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler.616605202" name="Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler">
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType.889934690" name="Assembler InputType" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType"/>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler.1564576801" name="Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userBefore.1555827005" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userAfter.912893655" name="追加するオプション(すべての指定オプションの後ろに追加)&#10;" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.864537553" name="プログラムの文字コード" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.utf8" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.include.1616986135" name="インクルード・ファイルを検索するフォルダ" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.include" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/general}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_pincfg}&quot;"/>
</option>
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType.502444415" name="Assembler InputType" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType"/>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker.1854484070" name="Linker" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom.1587151897" name="ROMからRAMへマップするセクション" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom" useByScannerDiscovery="false" valueType="stringList">
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker.1333901009" name="Linker" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom.2020069967" name="ROMからRAMへマップするセクション" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value="D=R"/>
<listOptionValue builtIn="false" value="D_1=R_1"/>
<listOptionValue builtIn="false" value="D_2=R_2"/>
</option>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection.1728337952" name="セクション" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection" useByScannerDiscovery="false" value="SU,SI,B_1,R_1,B_2,R_2,B,R/04,PResetPRG,C_1,C_2,C,C$*,D*,W*,L,PIntPRG,P/0FFC00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC" valueType="string"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList.1657015231" name="(リンク順序のリスト)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value="&quot;.\generate\lowlvl.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\generate\dbsct.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\generate\hwsetup.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\generate\intprg.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\generate\lowsrc.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\generate\resetprg.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\generate\sbrk.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\generate\vecttbl.obj&quot;"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection.2043161263" name="セクション" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection" useByScannerDiscovery="false" value="SU,SI,B_1,R_1,B_2,R_2,B,R/04,B_ETHERNET_BUFFERS_1,B_RX_DESC_1,B_TX_DESC_1/020000,C_1,C_2,C,C$*,D*,W*,L,P*/0FFE00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC" valueType="string"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userBefore.1452234640" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userAfter.1724535779" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.vect.47410515" name="可変ベクタテーブルのアドレス未設定ベクタ番号に指定するアドレス" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.vect" useByScannerDiscovery="false" value="_undefined_interrupt_source_isr" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.checkSection.239094904" name="セクションの割り付けアドレスをチェックする" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.checkSection" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType.1942768497" name="アドレス範囲指定方法" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType.autoSpecify" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList.1237940973" name="(リンク順序のリスト)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/general\r_cg_hardware_setup.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/general\r_smc_cgc.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/general\r_smc_cgc_user.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/general\r_smc_interrupt.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/board/generic_rx65n\dbsct.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/board/generic_rx65n\hwsetup.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/board/generic_rx65n\lowlvl.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/board/generic_rx65n\lowsrc.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/board/generic_rx65n\resetprg.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/board/generic_rx65n\sbrk.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/board/generic_rx65n\vecttbl.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/mcu/all\r_bsp_common.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/mcu/rx65n\cpu.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/mcu/rx65n\locking.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/mcu/rx65n\mcu_clocks.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/mcu/rx65n\mcu_init.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/mcu/rx65n\mcu_interrupts.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/mcu/rx65n\mcu_locks.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/mcu/rx65n\mcu_mapped_interrupts.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_bsp/mcu/rx65n\mcu_startup.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_pincfg\Pin.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function000.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function001.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function002.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function100.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function101.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function102.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function103.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function200.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function202.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function205.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function206.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function207.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p00.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p01.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p02.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p03.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p04.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p05.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p06.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p07.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p08.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p0a.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p0b.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p0c.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p0d.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p0e.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p0f.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p10.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p14.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p18.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p1f.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p20.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p21.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p22.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p23.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p26.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p29.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p2a.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p2b.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p31.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p32.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p33.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p34.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p35.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p36.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p37.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p38.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p39.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p3a.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p3b.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p3c.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p3d.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p41.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p42.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p43.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p44.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p45.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p46.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p47.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p48.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p49.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p4a.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p4b.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p4c.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p4d.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p50.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p51.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p52.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p53.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p54.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p56.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p57.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p59.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p60.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p62.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p63.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p71.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p72.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p73.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p74.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p75.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p76.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p77.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p78.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pd5.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pd9.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pda.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pdb.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pdf.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe0.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe1.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe2.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe3.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe4.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe5.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe6.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_subprc01.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_subprc02.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_subprc03.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_subprc04.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_aes_rx.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_md5_rx.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_rsa_rx.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_rx.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_rx_private.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_sha_rx.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_tdes_rx.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_tls_rx.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src\test.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src\test_main.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src\wolfssl_dummy.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\test.lib&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../wolfssl/Debug/wolfssl.lib&quot;"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile.2096473091" name="リンクするリロケータブル・ファイル、ライブラリ・ファイルおよびバイナリ・ファイル" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile" useByScannerDiscovery="false" valueType="stringList">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile.1438206933" name="リンクするリロケータブル・ファイル、ライブラリ・ファイルおよびバイナリ・ファイル" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib/T4_Library_rxv1_ether_little.lib}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../wolfssl/Debug/wolfssl.lib&quot;"/>
</option>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian.977317851" name="Library Generator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian">
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.1234557916" name="浮動小数点演算命令を使用する" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.yes" valueType="enumerated"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.headCtype.42661342" name="ctype.hC89/C99文字操作用ライブラリ" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.headCtype" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.headMath.29506179" name="math.hC89/C99数値計算用ライブラリ" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.headMath" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.headCppString.277930384" name="stringEC++):文字列操作用ライブラリ" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.headCppString" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang.1481899164" name="C言語標準ライブラリ関数の構成" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang.c99" valueType="enumerated"/>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian.1723543812" name="Library Generator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian">
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.1397073307" name="浮動小数点演算命令を使用する" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.yes" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userBefore.1773409552" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userAfter.946493093" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang.338617005" name="C言語標準ライブラリ関数の構成" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang.c99" valueType="enumerated"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.headCtype.1293885198" name="ctype.hC89/C99文字操作用ライブラリ" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.headCtype" useByScannerDiscovery="false" value="true" valueType="boolean"/>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter.1278951147" name="Converter" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter"/>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig.1737524887" name="RTOS Configurator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig"/>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter.1917108303" name="Converter" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userBefore.109845398" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userAfter.289006348" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig.318974000" name="RTOS Configurator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
<entry excluding="ether" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.992474000">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.992474000" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<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="com.renesas.cdt.managedbuild.renesas.core.RenesasCompilerAssemblerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="com.renesas.cdt.managedbuild.core.buildRunnerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
<option id="toolchain.id" value="Renesas_RXC"/>
<option id="toolchain.version" value="v3.01.00"/>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="abs" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="Debug" id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.992474000" name="Debug" parent="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration">
<folderInfo id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.992474000." name="/" resourcePath="">
<toolChain id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.toolChain.1794956243" name="Renesas CCRX Toolchain" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.debug.toolChain">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform.617132481" osList="win32" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform"/>
<builder buildPath="${workspace_loc:/test}/Debug" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder.117543810" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CCRX Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder"/>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp.1744140894" name="DSP Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp">
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo.1464228342" name="デバッグ情報を出力する" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian.733005442" name="出力するデータ値のエンディアン" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian.big" valueType="enumerated"/>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.common.1294844059" name="Common" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.common">
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.644795578" name="命令セット・アーキテクチャ" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.rxv2" valueType="enumerated"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.rxArchitecture.1771586719" name="RX Architecture" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.rxArchitecture" useByScannerDiscovery="false" value="rxv2" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns.1045346284" name="浮動小数点演算命令を使用する" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns.yes" valueType="enumerated"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu.229476184" name="Has FPU" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu" useByScannerDiscovery="false" value="TRUE" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName.748972653" name="Device Name" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName" useByScannerDiscovery="false" value="R5F565NEHxFP" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory.780008434" name="Device history" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory" useByScannerDiscovery="false" value="non_init;R5F565NEHxFP" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isaHistory.783836823" name="ISA history" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isaHistory" useByScannerDiscovery="false" value="non_init;com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.rxv2" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand.1221884092" name="Device Command" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand" useByScannerDiscovery="false" value="R5F565NE" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos.1001057208" name="Check RTOS" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos" useByScannerDiscovery="false" value="unusedRtos" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp.963664750" name="Has DSP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp" useByScannerDiscovery="false" value="false" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily.1280023203" name="Device Family" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily" useByScannerDiscovery="false" value="RX65N" valueType="string"/>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler.278830907" name="Compiler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler">
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.2144484247" name="浮動小数点演算命令を使用する" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.yes" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include.545347560" name="インクルード・ファイルを検索するフォルダ" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include" valueType="includePath">
<listOptionValue builtIn="false" value="${TCINSTALL}/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_bsp}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx/src/targets/rx231}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx/src/targets/rx66t}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx/src/targets/rx65n}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_cmt_rx}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_cmt_rx/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_ether_rx}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/general}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_pincfg}&quot;"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define.935611572" name="プリプロセッサ・マクロの定義" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG_CONSOLE"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userBefore.878126292" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userAfter.443993930" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.47850385" name="Cソース" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.c99" valueType="enumerated"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode.24533273" name="プログラムの文字コード" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode.utf8" valueType="enumerated"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode.542364588" name="出力する文字コード" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode.utf8" valueType="enumerated"/>
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType.1919404628" name="Compiler Input C" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType"/>
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType.293530100" name="Compiler Input CPP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType"/>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler.607581328" name="Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userBefore.622904140" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userAfter.67379527" name="追加するオプション(すべての指定オプションの後ろに追加)&#10;" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.1186358257" name="プログラムの文字コード" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.utf8" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.include.1360045103" name="インクルード・ファイルを検索するフォルダ" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.include" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/general}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_pincfg}&quot;"/>
</option>
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType.1482916460" name="Assembler InputType" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType"/>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker.1516159151" name="Linker" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom.1765662172" name="ROMからRAMへマップするセクション" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value="D=R"/>
<listOptionValue builtIn="false" value="D_1=R_1"/>
<listOptionValue builtIn="false" value="D_2=R_2"/>
</option>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection.1046231838" name="セクション" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection" useByScannerDiscovery="false" value="SU,SI,B_1,R_1,B_2,R_2,B,R/04,C_1,C_2,C,C$*,D*,W*,L,P*/0FFE00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC,B_ETHERNET_BUFFERS_1,B_RX_DESC_1,B_TX_DESC_1/00010000" valueType="string"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userBefore.1651005552" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userAfter.40118921" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.vect.1524833684" name="可変ベクタテーブルのアドレス未設定ベクタ番号に指定するアドレス" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.vect" useByScannerDiscovery="false" value="_undefined_interrupt_source_isr" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.checkSection.1914971075" name="セクションの割り付けアドレスをチェックする" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.checkSection" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType.1670384649" name="アドレス範囲指定方法" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType.autoSpecify" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList.1556433699" name="(リンク順序のリスト)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList" valueType="stringList">
<listOptionValue builtIn="false" value="&quot;.\test.lib&quot;"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile.856176867" name="リンクするリロケータブル・ファイル、ライブラリ・ファイルおよびバイナリ・ファイル" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile" valueType="stringList">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib/T4_Library_rxv1_ether_little.lib}&quot;"/>
</option>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian.1598250045" name="Library Generator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian">
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.665362864" name="浮動小数点演算命令を使用する" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.yes" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userBefore.413642487" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userAfter.322853429" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang.1591825359" name="C言語標準ライブラリ関数の構成" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang.c99" valueType="enumerated"/>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter.175269062" name="Converter" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userBefore.1586351233" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userAfter.900284814" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value=""/>
</option>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig.1118615463" name="RTOS Configurator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="ether" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
@ -98,13 +422,16 @@
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="test.com.renesas.cdt.managedbuild.renesas.ccrx.projectType.1174322677" name="実行可能" projectType="com.renesas.cdt.managedbuild.renesas.ccrx.projectType"/>
<project id="test.com.renesas.cdt.managedbuild.renesas.ccrx.projectType.1611298680" name="実行可能" projectType="com.renesas.cdt.managedbuild.renesas.ccrx.projectType"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="HardwareDebug">
<resource resourceType="PROJECT" workspacePath="/test"/>
</configuration>
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/test"/>
</configuration>

View File

@ -17,6 +17,11 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.renesas.cdt.managedbuild.renesas.misrachecker.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
@ -24,6 +29,16 @@
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
<linkedResources>
<link>
<name>src/benchmark.c</name>
<type>1</type>
<locationURI>$%7BPARENT-5-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.c</locationURI>
</link>
<link>
<name>src/benchmark.h</name>
<type>1</type>
<locationURI>$%7BPARENT-5-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.h</locationURI>
</link>
<link>
<name>src/test.c</name>
<type>1</type>
@ -32,7 +47,13 @@
<link>
<name>src/wolfssl_dummy.c</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/common/wolfssl_dummy.c</locationURI>
<locationURI>$%7BPARENT-1-PROJECT_LOC%7D/common/wolfssl_dummy.c</locationURI>
</link>
</linkedResources>
<variableList>
<variable>
<name>copy_PARENT</name>
<value>$%7BPARENT-3-ECLIPSE_HOME%7D/workspace/wolfssl</value>
</variable>
</variableList>
</projectDescription>

View File

@ -0,0 +1,164 @@
/* key_data.c
*
* Copyright (C) 2006-2019 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 "key_data.h"
#ifdef WOLFSSL_RENESAS_TSIP
/* The following key data is an dummy data. */
/* Please replace them by your own data */
const st_key_block_data_t g_key_block_data =
{
/* uint8_t encrypted_session_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2]; */
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
/* uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE]; */
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
/* uint8_t encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16]; */
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
},
};
const uint32_t s_flash[] =
{
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
};
/* ./ca-cert.der.sign, */
const unsigned char ca_cert_sig[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const int sizeof_ca_cert_sig = sizeof(ca_cert_sig);
/* ./client-cert.der.sign, */
const unsigned char client_cert_der_sign[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const int sizeof_client_cert_der_sign = sizeof(client_cert_der_sign);
uint32_t s_inst1[R_TSIP_SINST_WORD_SIZE] = { 0 };
uint32_t s_inst2[R_TSIP_SINST2_WORD_SIZE]= { 0 };
#endif

View File

@ -0,0 +1,45 @@
/* key_data.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifndef KEY_DATA_H_
#define KEY_DATA_H_
#include <wolfssl/wolfcrypt/settings.h>
#ifdef WOLFSSL_RENESAS_TSIP
#include "r_tsip_rx_if.h"
/** user key datas */
typedef struct key_block_data
{
uint8_t encrypted_session_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2];
uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE];
uint8_t encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16];
} st_key_block_data_t;
extern const st_key_block_data_t g_key_block_data;
extern const uint32_t s_flash[];
extern const unsigned char ca_cert_der[];
extern const int sizeof_ca_cert_der;
extern const unsigned char ca_cert_sig[];
extern const unsigned char client_cert_der_sign[];
#endif /* WOLFSSL_RENESAS_TSIP */
#endif /* KEY_DATA_H_ */

View File

@ -26,6 +26,10 @@
#endif
#include "stdio.h"
#include "stdint.h"
#include <wolfssl/wolfcrypt/settings.h>
#include "wolfssl/wolfcrypt/types.h"
#include "wolfssl_demo.h"
void main(void);
#ifdef __cplusplus
@ -34,6 +38,29 @@ void abort(void);
}
#endif
#if defined(TLS_CLIENT) || defined(TLS_SERVER)
#include "r_t4_itcpip.h"
#include "r_sys_time_rx_if.h"
#include "Pin.h"
#define T4_WORK_SIZE (14800)
static UW tcpudp_work[(T4_WORK_SIZE / 4) + 1];
#if defined(WOLFSSL_RENESAS_TSIP)
#include "key_data.h"
#include <wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h>
extern const st_key_block_data_t g_key_block_data;
#endif
#endif
static long tick;
static void timeTick(void *pdata)
{
tick++;
}
typedef struct func_args {
int argc;
char** argv;
@ -42,13 +69,148 @@ typedef struct func_args {
void wolfcrypt_test(func_args args);
int benchmark_test(void *args);
double current_time(int reset)
{
if(reset) tick = 0 ;
return ((double)tick/FREQ) ;
}
#if defined(TLS_CLIENT) || defined(TLS_SERVER)
int SetTsiptlsKey()
{
#if defined(WOLFSSL_RENESAS_TSIP) && defined(TLS_CLIENT)
tsip_inform_cert_sign((const byte *)ca_cert_sig);
tsip_inform_user_keys((byte*)&g_key_block_data.encrypted_session_key,
(byte*)&g_key_block_data.iv,
(byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key);
#elif defined(WOLFSSL_RENESAS_TSIP) && defined(TLS_SERVER)
tsip_inform_cert_sign((const byte *)client_cert_der_sign);
tsip_inform_user_keys((byte*)&g_key_block_data.encrypted_session_key,
(byte*)&g_key_block_data.iv,
(byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key);
#endif
return 0;
}
int Open_tcp( )
{
ER ercd;
W size;
sys_time_err_t sys_ercd;
char ver[128];
/* cast from uint8_t to char* */
strcpy(ver, (char*)R_t4_version.library);
sys_ercd = R_SYS_TIME_Open();
if (sys_ercd != SYS_TIME_SUCCESS) {
printf("ERROR : R_SYS_TIME_Open() failed\n");
return -1;
}
R_Pins_Create();
/* start LAN controller */
ercd = lan_open();
/* initialize TCP/IP */
size = tcpudp_get_ramsize();
if (size > (sizeof(tcpudp_work))) {
printf("size > (sizeof(tcpudp_work))!\n");
return -1;
}
ercd = tcpudp_open(tcpudp_work);
if (ercd != E_OK) {
printf("ERROR : tcpudp_open failed\n");
return -1;
}
return 0;
}
void Close_tcp()
{
/* end TCP/IP */
tcpudp_close();
lan_close();
R_SYS_TIME_Close();
}
#endif
void main(void)
{
func_args args = {1};
(void)timeTick;
printf("Start wolfCrypt Test\n");
wolfcrypt_test(args);
printf("End wolfCrypt Test\n");
#if defined(CRYPT_TEST) || defined(BENCHMARK)
#if defined(CRYPT_TEST)
int ret;
func_args args = { 0 };
if ((ret = wolfCrypt_Init()) != 0) {
printf("wolfCrypt_Init failed %d\n", ret);
}
printf("Start wolfCrypt Test\n");
wolfcrypt_test(args);
printf("End wolfCrypt Test\n");
if ((ret = wolfCrypt_Cleanup()) != 0) {
printf("wolfCrypt_Cleanup failed %d\n", ret);
}
#endif
#if defined(BENCHMARK)
#include "r_cmt_rx_if.h"
uint32_t channel;
R_CMT_CreatePeriodic(FREQ, &timeTick, &channel);
printf("Start wolfCrypt Benchmark\n");
benchmark_test(NULL);
printf("End wolfCrypt Benchmark\n");
#endif
#elif defined(TLS_CLIENT)
#if defined(WOLFSSL_RENESAS_TSIP)
const char* cipherlist[] = {
/* NULL */
"AES128-SHA",
"AES128-SHA256",
"AES256-SHA",
"AES256-SHA256"
};
const int cipherlist_sz = 4;
#else
const char* cipherlist[] = { NULL };
const int cipherlist_sz = 0;
#endif
int i = 0;
Open_tcp();
#if defined(WOLFSSL_RENESAS_TSIP)
SetTsiptlsKey();
#endif
do {
if(cipherlist_sz > 0 ) printf("cipher : %s\n", cipherlist[i]);
wolfSSL_TLS_client_init(cipherlist[i]);
wolfSSL_TLS_client();
i++;
} while (i < cipherlist_sz);
Close_tcp();
#elif defined(TLS_SERVER)
Open_tcp();
#if defined(WOLFSSL_RENESAS_TSIP)
SetTsiptlsKey();
#endif
wolfSSL_TLS_server_init();
wolfSSL_TLS_server();
Close_tcp();
#endif
}
#ifdef __cplusplus

View File

@ -0,0 +1,205 @@
/* wolf_client.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <stdio.h>
#include <string.h>
#include "r_t4_itcpip.h"
#include "wolfssl/wolfcrypt/settings.h"
#include "wolfssl/ssl.h"
#include "wolfssl/certs_test.h"
#include "key_data.h"
#define SIMPLE_TLSSEVER_IP "192.168.1.45"
#define SIMPLE_TLSSERVER_PORT "11111"
ER t4_tcp_callback(ID cepid, FN fncd , VP p_parblk);
uint32_t g_encrypted_root_public_key[140];
static WOLFSSL_CTX *client_ctx;
static int my_IORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx)
{
int ret;
ID cepid;
if(ctx != NULL)
cepid = *(ID *)ctx;
else
return WOLFSSL_CBIO_ERR_GENERAL;
ret = tcp_rcv_dat(cepid, buff, sz, TMO_FEVR);
if(ret > 0)
return ret;
else
return WOLFSSL_CBIO_ERR_GENERAL;
}
static int my_IOSend(WOLFSSL* ssl, char* buff, int sz, void* ctx)
{
int ret;
ID cepid;
if(ctx != NULL)
cepid = *(ID *)ctx;
else
return WOLFSSL_CBIO_ERR_GENERAL;
ret = tcp_snd_dat(cepid, buff, sz, TMO_FEVR);
if(ret == sz)
return ret;
else
return WOLFSSL_CBIO_ERR_GENERAL;
}
static int getIPaddr(char *arg)
{
int a1, a2, a3, a4;
if(sscanf(arg, "%d.%d.%d.%d", &a1, &a2, &a3, &a4) == 4)
return (a1 << 24) | (a2 << 16) | (a3 << 8) | a4;
else return 0;
}
static int getPort(char *arg)
{
int port;
if(sscanf(arg, "%d", &port) == 1)
return port;
else return 0;
}
void wolfSSL_TLS_client_init(const char* cipherlist)
{
#ifndef NO_FILESYSTEM
#ifdef USE_ECC_CERT
char *cert = "./certs/ca-ecc-cert.pem";
#else
char *cert = "./certs/ca-cert.pem";
#endif
#else
#ifdef USE_ECC_CERT
const unsigned char *cert = ca_ecc_der_256;
#define SIZEOF_CERT sizeof_ca_ecc_der_256
#else
const unsigned char *cert = ca_cert_der_2048;
#define SIZEOF_CERT sizeof_ca_cert_der_2048
#endif
#endif
wolfSSL_Init();
#ifdef DEBUG_WOLFSSL
wolfSSL_Debugging_ON();
#endif
/* Create and initialize WOLFSSL_CTX */
if ((client_ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method_ex((void *)NULL))) == NULL) {
printf("ERROR: failed to create WOLFSSL_CTX\n");
return;
}
#if !defined(NO_FILESYSTEM)
if (wolfSSL_CTX_load_verify_locations(client_ctx, cert, 0) != SSL_SUCCESS) {
printf("ERROR: can't load \"%s\"\n", cert);
return NULL;
}
#else
if (wolfSSL_CTX_load_verify_buffer(client_ctx, cert, SIZEOF_CERT, SSL_FILETYPE_ASN1) != SSL_SUCCESS){
printf("ERROR: can't load certificate data\n");
return;
}
#endif
/* Register callbacks */
wolfSSL_SetIORecv(client_ctx, my_IORecv);
wolfSSL_SetIOSend(client_ctx, my_IOSend);
/* use specific cipher */
if (cipherlist != NULL && wolfSSL_CTX_set_cipher_list(client_ctx, cipherlist) != WOLFSSL_SUCCESS) {
wolfSSL_CTX_free(client_ctx); client_ctx = NULL;
printf("client can't set cipher list 1");
}
}
void wolfSSL_TLS_client( )
{
ID cepid = 1;
ER ercd;
int ret;
WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)client_ctx;
WOLFSSL *ssl;
#define BUFF_SIZE 256
static const char sendBuff[]= "Hello Server\n" ;
char rcvBuff[BUFF_SIZE] = {0};
static T_IPV4EP my_addr = { 0, 0 };
T_IPV4EP dst_addr;
if((dst_addr.ipaddr = getIPaddr(SIMPLE_TLSSEVER_IP)) == 0){
printf("ERROR: IP address\n");
return;
}
if((dst_addr.portno = getPort(SIMPLE_TLSSERVER_PORT)) == 0){
printf("ERROR: IP address\n");
return;
}
if((ercd = tcp_con_cep(cepid, &my_addr, &dst_addr, TMO_FEVR)) != E_OK) {
printf("ERROR TCP Connect: %d\n", ercd);
return;
}
if((ssl = wolfSSL_new(ctx)) == NULL) {
printf("ERROR wolfSSL_new: %d\n", wolfSSL_get_error(ssl, 0));
return;
}
/* set callback context */
wolfSSL_SetIOReadCtx(ssl, (void *)&cepid);
wolfSSL_SetIOWriteCtx(ssl, (void *)&cepid);
if(wolfSSL_connect(ssl) != SSL_SUCCESS) {
printf("ERROR SSL connect: %d\n", wolfSSL_get_error(ssl, 0));
return;
}
if (wolfSSL_write(ssl, sendBuff, strlen(sendBuff)) != strlen(sendBuff)) {
printf("ERROR SSL write: %d\n", wolfSSL_get_error(ssl, 0));
return;
}
if ((ret=wolfSSL_read(ssl, rcvBuff, BUFF_SIZE)) < 0) {
printf("ERROR SSL read: %d\n", wolfSSL_get_error(ssl, 0));
return;
}
rcvBuff[ret] = '\0' ;
printf("Received: %s\n", rcvBuff);
/* frees all data before client termination */
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
wolfSSL_Cleanup();
tcp_sht_cep(cepid);
tcp_cls_cep(cepid, TMO_FEVR);
return;
}

View File

@ -0,0 +1,203 @@
/* wolf_server.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <stdio.h>
#include <string.h>
#include "r_t4_itcpip.h"
#include "wolfssl/wolfcrypt/settings.h"
#include "wolfssl/ssl.h"
#include "wolfssl/certs_test.h"
#include "wolfssl_demo.h"
static WOLFSSL_CTX *server_ctx;
static byte doCliCertCheck;
static int my_IORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx)
{
int ret;
ID cepid;
if(ctx != NULL)
cepid = *(ID *)ctx;
else
return WOLFSSL_CBIO_ERR_GENERAL;
ret = tcp_rcv_dat(cepid, buff, sz, TMO_FEVR);
if(ret == sz)
return ret;
else
return WOLFSSL_CBIO_ERR_GENERAL;
}
static int my_IOSend(WOLFSSL* ssl, char* buff, int sz, void* ctx)
{
int ret;
ID cepid;
if(ctx != NULL)
cepid = *(ID *)ctx;
else
return WOLFSSL_CBIO_ERR_GENERAL;
ret = tcp_snd_dat(cepid, buff, sz, TMO_FEVR);
if(ret == sz)
return ret;
else
return WOLFSSL_CBIO_ERR_GENERAL;
}
void wolfSSL_TLS_server_init(byte doClientCheck)
{
int ret;
#ifndef NO_FILESYSTEM
#ifdef USE_ECC_CERT
char *cert = "./certs/server-ecc-cert.pem";
char *key = "./certs/server-ecc-key.pem";
#else
char *cert = "./certs/server-cert.pem";
char *key = "./certs/server-key.pem";
#endif
char *clientCert = "./certs/client-cert.pem";
#else
#ifdef USE_ECC_CERT
char *cert = serv_ecc_der_256;
int sizeof_cert = sizeof_serv_ecc_der_256;
char *cert = serv_ecc_key_der_256;
int sizeof_key = sizeof_serv_ecc_key_der_256;
#else
const unsigned char *cert = server_cert_der_2048;
#define sizeof_cert sizeof_server_cert_der_2048
const unsigned char *key = server_key_der_2048;
#define sizeof_key sizeof_server_key_der_2048
const unsigned char *clientCert = client_cert_der_2048;
#define sizeof_clicert sizeof_client_cert_der_2048
#endif
#endif
wolfSSL_Init();
#ifdef DEBUG_WOLFSSL
wolfSSL_Debugging_ON();
#endif
/* Create and initialize WOLFSSL_CTX */
if ((server_ctx = wolfSSL_CTX_new(wolfSSLv23_server_method_ex((void *)NULL)))
== NULL) {
printf("ERROR: failed to create WOLFSSL_CTX\n");
return;
}
#if !defined(NO_FILESYSTEM)
ret = wolfSSL_CTX_use_certificate_file(server_ctx, cert, 0);
#else
ret = wolfSSL_CTX_use_certificate_buffer(server_ctx, cert,
sizeof_cert, SSL_FILETYPE_ASN1);
#endif
if (ret != SSL_SUCCESS) {
printf("Error %d loading server-cert!\n", ret);
return;
}
/* Load server key into WOLFSSL_CTX */
#if !defined(NO_FILESYSTEM)
ret = wolfSSL_CTX_use_PrivateKey_file(server_ctx, key, 0);
#else
ret = wolfSSL_CTX_use_PrivateKey_buffer(server_ctx, key, sizeof_key,
SSL_FILETYPE_ASN1);
#endif
if (ret != SSL_SUCCESS) {
printf("Error %d loading server-key!\n", ret);
return;
}
#if defined(WOLFSSL_RENESAS_TSIP)
doCliCertCheck = 1;
#endif
if (doCliCertCheck) {
wolfSSL_CTX_set_verify(server_ctx, WOLFSSL_VERIFY_PEER |
WOLFSSL_VERIFY_FAIL_IF_NO_PEER_CERT, 0);
#if !defined(NO_FILESYSTEM)
if (wolfSSL_CTX_load_verify_locations(server_ctx, clientCert, 0)
!= WOLFSSL_SUCCESS)
#else
if (wolfSSL_CTX_load_verify_buffer(server_ctx, clientCert,
sizeof_clicert,
SSL_FILETYPE_ASN1) != SSL_SUCCESS)
#endif
printf("can't load ca file, Please run from wolfSSL home dir\n");
}
/* Register callbacks */
wolfSSL_SetIORecv(server_ctx, my_IORecv);
wolfSSL_SetIOSend(server_ctx, my_IOSend);
}
void wolfSSL_TLS_server( )
{
ID cepid = 1;
ID repid = 1;
ER ercd;
WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)server_ctx;
WOLFSSL *ssl;
int len;
#define BUFF_SIZE 256
char buff[BUFF_SIZE];
T_IPV4EP dst_addr = {0, 0};
if((ercd = tcp_acp_cep(cepid, repid, &dst_addr, TMO_FEVR)) != E_OK) {
printf("ERROR TCP Accept: %d\n", ercd);
return;
}
if((ssl = wolfSSL_new(ctx)) == NULL) {
printf("ERROR: failed wolfSSL_new\n");
return;
}
wolfSSL_SetIOReadCtx(ssl, (void *)&cepid);
wolfSSL_SetIOWriteCtx(ssl, (void *)&cepid);
if (wolfSSL_accept(ssl) < 0) {
printf("ERROR: SSL Accept(%d)\n", wolfSSL_get_error(ssl, 0));
return;
}
if ((len = wolfSSL_read(ssl, buff, sizeof(buff) - 1)) < 0) {
printf("ERROR: SSL Read(%d)\n", wolfSSL_get_error(ssl, 0));
return;
}
buff[len] = '\0';
printf("Received: %s\n", buff);
if (wolfSSL_write(ssl, buff, len) != len) {
printf("ERROR: SSL Write(%d)\n", wolfSSL_get_error(ssl, 0));
return;
}
wolfSSL_free(ssl);
tcp_sht_cep(cepid);
}

View File

@ -0,0 +1,48 @@
/* wolfssl_demo.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifndef WOLFSSL_DEMO_H_
#define WOLFSSL_DEMO_H_
#define FREQ 10000 /* Hz */
/* Enable wolfcrypt test */
/* can be enabled with benchmark test */
/* #define CRYPT_TEST */
/* Enable benchmark */
/* can be enabled with cyrpt test */
/* #define BENCHMARK */
/* Enable TLS client */
/* cannot enable with other definition */
/* #define TLS_CLIENT */
/* Enable TLS server */
/* cannot enable with other definition */
/* #define TLS_SERVER */
void wolfSSL_TLS_client_init();
void wolfSSL_TLS_client();
void wolfSSL_TLS_server_init();
void wolfSSL_TLS_server();
#endif /* WOLFSSL_DEMO_H_ */

View File

@ -0,0 +1,52 @@
#!/bin/bash
function usage(){
cat << _EOT_
Usage :
$0 [-g] [-]
Description:
Generate 2048 bit Rsa key pair and Display modulus and public exponent
Options:
-g generate rsa key pair, default on
-s only show modulus and public exponent
_EOT_
exit 1
}
FLAG_G="on"
FLAG_S="off"
while getopts gsh OPT
do
case $OPT in
g)
FLAG_G="on"
;;
s)
FLAG_S="on"
FLAG_G="off"
;;
h)
usage
;;
\?)
usage
;;
esac
done
if [ $FLAG_G = "on" ]; then
# generate 2048bit Rsa private key
openssl genrsa 2048 2> /dev/null > private-key.pem
# expose public key
openssl rsa -in private-key.pem -pubout -out public-key.pem 2> /dev/null
fi
if [ $FLAG_S = "on" ]; then
# display modulus and exponent
openssl rsa -modulus < private-key.pem 2>/dev/null | grep Modulus=
openssl rsa -text < private-key.pem 2> /dev/null | grep publicExponent
fi

View File

@ -0,0 +1,89 @@
#!/usr/bin/perl
# genhexbuf.pl
# Copyright (C) 2019 wolfSSL Inc.
#
use strict;
use warnings;
# ---- SCRIPT SETTINGS -------------------------------------------------------
# output C header file to write cert/key buffers to
my $outputFile = "certs_sig_data.h";
# rsa keys and certs to be converted
my @fileList = (
# please add your der file and name of the data for C language
# der file name name of the data
#[ "./yourder.der", "your_der_name_in_C" ],
[ "./ca-cert.der", "ca_cert_der" ],
[ "./ca-cert.der.sign", "ca_cert_der_sign" ],
);
# ----------------------------------------------------------------------------
my $num = @fileList;
# open our output file, "+>" creates and/or truncates
open OUT_FILE, "+>", $outputFile or die $!;
print OUT_FILE "/* certs_sig_data.h */\n\n";
print OUT_FILE "#ifndef WOLFSSL_CERTS_SIG_DATA_H\n";
print OUT_FILE "#define WOLFSSL_CERTS_SIG_DATA_H\n\n";
# convert and print 1024-bit cert/keys
for (my $i = 0; $i < $num; $i++) {
my $fname = $fileList[$i][0];
my $sname = $fileList[$i][1];
print OUT_FILE "/* $fname, */\n";
print OUT_FILE "static const unsigned char $sname\[] =\n";
print OUT_FILE "{\n";
file_to_hex($fname);
print OUT_FILE "};\n";
print OUT_FILE "static const int sizeof_$sname = sizeof($sname);\n\n";
}
print OUT_FILE "#endif /* WOLFSSL_CERTS_SIG_DATA_H */\n\n";
# print file as hex, comma-separated, as needed by C buffer
sub file_to_hex {
my $fileName = $_[0];
open my $fp, "<", $fileName or die $!;
binmode($fp);
my $fileLen = -s $fileName;
my $byte;
for (my $i = 0, my $j = 1; $i < $fileLen; $i++, $j++)
{
if ($j == 1) {
print OUT_FILE " ";
}
if ($j != 1) {
print OUT_FILE " ";
}
read($fp, $byte, 1) or die "Error reading $fileName";
my $output = sprintf("0x%02X", ord($byte));
print OUT_FILE $output;
if ($i != ($fileLen - 1)) {
print OUT_FILE ",";
}
if ($j == 10) {
$j = 0;
print OUT_FILE "\n";
}
}
print OUT_FILE "\n";
close($fp);
}

View File

@ -0,0 +1,34 @@
#!/bin/bash
SIGOPT=rsa_padding_mode:pss
SIGOPT2=rsa_pss_saltlen:-1
function usage() {
cat <<_EOT_
Usage:
$0 <pri key> <pub key> <file name>
pri key : private key for sign/verify
pub key : public key for sign/verify
file name : file name to be signed
_EOT_
exit 1
}
if [ $# -ne 3 ]; then
usage
fi
# $1 private key for sign/verify
# $2 public key for verify
# $3 file for sign/verify
openssl dgst -sha256 -sign $1 -sigopt $SIGOPT -sigopt $SIGOPT2 -out $3.sign $3
echo verify by private key
openssl dgst -sha256 -prverify $1 -sigopt $SIGOPT -sigopt $SIGOPT2 -signature $3.sign $3
echo verifiy by public key
openssl dgst -sha256 -verify $2 -sigopt $SIGOPT -sigopt $SIGOPT2 -signature $3.sign $3

View File

@ -14,7 +14,7 @@
</storageModule>
<storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
<option id="toolchain.id" value="Renesas_RXC"/>
<option id="toolchain.version" value="v2.08.00"/>
<option id="toolchain.version" value="v3.00.00"/>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="lib" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="Debug" id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.13311124" name="Debug" parent="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration">
@ -33,6 +33,7 @@
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos.313687436" name="Check RTOS" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos" useByScannerDiscovery="false" value="unusedRtos" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp.963524125" name="Has DSP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp" useByScannerDiscovery="false" value="false" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily.664031971" name="Device Family" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily" useByScannerDiscovery="false" value="RX71M" valueType="string"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory.1128940076" name="Device history" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory" useByScannerDiscovery="false" value="non_init;R5F571MLCxFC" valueType="string"/>
</tool>
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler.958103973" name="Compiler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler">
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.1276851320" name="浮動小数点演算命令を使用する" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.yes" valueType="enumerated"/>
@ -40,11 +41,16 @@
<listOptionValue builtIn="false" value="${ProjDirPath}/../common"/>
<listOptionValue builtIn="false" value="${ProjDirPath}//../../../../../"/>
<listOptionValue builtIn="false" value="${TCINSTALL}/include"/>
<listOptionValue builtIn="false" value="${ProjDirPath}/../test/src/smc_gen/"/>
<listOptionValue builtIn="false" value="${ProjDirPath}/../test/src/smc_gen/r_bsp"/>
<listOptionValue builtIn="false" value="${ProjDirPath}/../test/src/smc_gen/r_config"/>
<listOptionValue builtIn="false" value="${ProjDirPath}/../test/src/smc_gen/r_tsip_rx"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define.687020263" name="プリプロセッサ・マクロの定義" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
</option>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.1494793389" name="Cソース" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.c99" valueType="enumerated"/>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.optimize.573554071" name="最適化レベル" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.optimize" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.optimize.level2" valueType="enumerated"/>
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType.971510512" name="Compiler Input C" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType"/>
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType.948214383" name="Compiler Input CPP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType"/>
</tool>
@ -59,7 +65,7 @@
<listOptionValue builtIn="false" value="D_2=R_2"/>
</option>
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection.1739258398" name="セクション" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection" useByScannerDiscovery="false" value="SU,SI,B_1,R_1,B_2,R_2,B,R/04,PResetPRG,C_1,C_2,C,C$*,D*,W*,L,PIntPRG,P/0FFC00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC" valueType="string"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList.1344120748" name="(リンク順序のリスト)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList" valueType="stringList">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList.1344120748" name="(リンク順序のリスト)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList" useByScannerDiscovery="false" valueType="stringList">
<listOptionValue builtIn="false" value="&quot;.\src\sample3.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src\sample1.obj&quot;"/>
<listOptionValue builtIn="false" value="&quot;.\src\sample2.obj&quot;"/>

View File

@ -69,6 +69,21 @@
<type>1</type>
<locationURI>PARENT-5-PROJECT_LOC/src/wolfio.c</locationURI>
</link>
<link>
<name>wolfcrypt/port/renesas_tsip_aes.c</name>
<type>1</type>
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c</locationURI>
</link>
<link>
<name>wolfcrypt/port/renesas_tsip_sha.c</name>
<type>1</type>
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c</locationURI>
</link>
<link>
<name>wolfcrypt/port/renesas_tsip_util.c</name>
<type>1</type>
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_util.c</locationURI>
</link>
<link>
<name>wolfcrypt/src/aes.c</name>
<type>1</type>

View File

@ -0,0 +1,145 @@
wolfSSL for Microsoft Azure Sphere Devices
==========================================
## Description
This directory contains the Visual Studio projects targeted for Azure Sphere.
The example projects include a client, server and wolfCrypt Library Test.
Each of these projects relies on the wolfSSL static library project.
Each project uses `user_settings.h` for to enable and disable features.
### Set Up Steps
0. Setup your Azure Sphere device.
[Install Azure Sphere](https://docs.microsoft.com/en-us/azure-sphere/install/install)
[Set up an account](https://docs.microsoft.com/en-us/azure-sphere/install/azure-directory-account)
[Claim your device](https://docs.microsoft.com/en-us/azure-sphere/install/claim-device)
[Configure networking](https://docs.microsoft.com/en-us/azure-sphere/install/configure-wifi)
1. Open the wolfssl Microsoft Visual Studio Solution
2. Build All the Projects
+ Right Click: `Solution 'wolfssl' (4 of 4 projects)`
+ Click: `Build Solution`
3. Connect your Azure Sphere MT3620 Development Board using USB.
4. Run the wolfCrypt Library Test
+ Right Click: `wolfcrypt_test (Azure Sphere)`
+ Click: `Debug->'Start new instance'.`
5. Wait for the wolfCrypt Library Test to finish.
6. Test the client.
+ Run client(Azure Sphere) using: `Debug->'Start new instance'`
It's OK if the HTTP GET request returns an error.
The TLS connection was successful.
7. Test the server.
+ Run server(Azure Sphere) using: `Debug->'Start new instance'`
+ Run the following wolfSSL example client command inside wolfssl directory.
```
./examples/client/client -h "Server IP Address" -p 11111 -A ./certs/ca-cert.pem
```
### Client
The client project has defines in `user_settings.h` for:
`SERVER_IP`, `CERT`, `SIZEOF_CERT`, `DEFAULT_PORT` and `msg`.
These are set by default to connect to `www.wolfssl.com`.
If `CUSTOM_SERVER_CONNECTION` is defined then the client would be ready to connect
to a example server at an IP address of `192.168.1.200`.
The example server could be started with the following command:
```
./examples/server/server -b -d -p 11111 -c ./certs/server-cert.pem -k ./certs/server-key.pem
```
Server Options Explanation:
` -b Bind to any interface instead of localhost only`
` -c <file> Certificate file, default ./certs/server-cert.pem`
` -d Disable client cert check`
` -k <file> Key file, default ./certs/server-key.pem`
` -p <num> Port to listen on, not 0, default 11111`
` -? <num> Help, print this usage`
This command assumes that you're in the base directory of 'wolfssl' and it has
been configured and compiled on a computer with an IP address of `192.168.1.200`.
Change `SERVER_IP` under `CUSTOM_SERVER_CONNECTION` in `user_settings.h`
accordingly.
If you would like to connect to a website on the internet other then
`www.wolfssl.com` then you would need to put it's corresponding CA certificate
in `client.h` similarly to `wolfssl_website_root_ca`.
The `CERT` and `SIZEOF_CERT` array could be created using the `dertoc.pl`
script under `wolfssl/scripts/dertoc.pl`.
Usage Example:
```
./scripts/dertoc.pl ./certs/server-cert.der server_cert_der_2048 dertoc.c
```
You would then copy the generated output from `dertoc.c` into `client.h` and set
CERT and `SIZEOF_CERT` accordingly inside `user_settings.h`.
The IP address of the server to connect to also needs to be added to the client's
`app_manifest.json` under 'AllowedConnections'. There are IP addresses in the
default `app_manifest.json` for testing purposes and can be removed if not needed.
### Server
The Server application will wait for any incoming client connections once built
and uploaded to the MT3620 Development board.
The following wolfSSL example client can connect to a server on the MT3620 board:
```
./examples/client/client -h "Server IP Address" -p 11111 -A ./certs/ca-cert.pem
```
Client Options Explanation:
` -A <file> Certificate Authority file, default ./certs/ca-cert.pem`
` -h <host> Host to connect to, default 127.0.0.1`
` -p <num> Port to listen on, not 0, default 11111`
` -? <num> Help, print this usage`
### wolfCrypt Test
This tests the wolfCrypt Library.
This is a good test to run if you change the options in `user_settings.h`.
### Troubleshooting
* Ensure your Azure Sphere MT3620 Development Board was set up using the
instructions using the Azure Sphere Documentation (See Link Below).
This includes claiming your device, updating device, setting up networking,
and prepping for debug.
* The commands for the example client/server assumes it is being run from the
base directory of wolfssl.
[Azure Sphere Documentation](https://docs.microsoft.com/en-us/azure-sphere/)
[Support Forum](https://www.wolfssl.com/forums/)
[Support Email](support@wolfssl.com)
### Resources
[wolfSSL Website](https://www.wolfssl.com/)
[wolfSSL Wiki](https://github.com/wolfSSL/wolfssl/wiki)
[wolfSSL Manual](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-toc.html)
[wolfSSL API Reference]
(https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html)
[wolfCrypt API Reference]
(https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-wolfcrypt-api-reference.html)
[TLS 1.3](https://www.wolfssl.com/docs/tls13/)

View File

@ -0,0 +1,17 @@
{
"SchemaVersion": 1,
"Name": "wolfSSL_Client",
"ComponentId": "00000000-0000-0000-0000-000000000002",
"EntryPoint": "/bin/app",
"CmdArgs": [],
"Capabilities": {
"AllowedConnections": [
"www.wolfssl.com",
"192.168.1.128",
"192.168.1.150",
"192.168.1.200",
"192.168.1.225"
]
},
"ApplicationType": "Default"
}

View File

@ -0,0 +1,133 @@
/* client.c
*
* Copyright (C) 2006-2019 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-1301, USA
*/
#include "client.h"
/* the usual suspects */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/* socket includes */
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <unistd.h>
/* utility functions shared between client and server */
#include <shared/util.h>
/* wolfSSL */
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/ssl.h>
#include <wolfssl/certs_test.h>
/* Azure Sphere */
#include <applibs/networking.h>
int main(int argc, char** argv)
{
bool isNetworkingReady = false;
SOCKET_T sockfd = 0;
char buff[256];
size_t len;
int ret;
/* declare wolfSSL objects */
WOLFSSL_CTX* ctx = NULL;
WOLFSSL* ssl = NULL;
util_PrintIfAddr();
/* Check if the Azure Sphere Dev Board has network connectivity. */
if ((Networking_IsNetworkingReady(&isNetworkingReady) < 0) || !isNetworkingReady) {
fprintf(stderr, "ERROR: network is not up.\n");
return -1;
}
ret = wolfIO_TcpConnect(&sockfd, SERVER_IP, DEFAULT_PORT, 0);
if ((ret != 0) || ((int)sockfd < 0)) {
fprintf(stderr, "ERROR: failed to create socket.");
return -1;
}
/* Initialize wolfSSL */
wolfSSL_Init();
/* Create and initialize WOLFSSL_CTX */
ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method());
if (ctx == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
util_Cleanup(sockfd,ctx,ssl);
return -1;
}
/* Load client certificates into WOLFSSL_CTX */
ret = wolfSSL_CTX_load_verify_buffer(ctx, CERT, SIZEOF_CERT, WOLFSSL_FILETYPE_ASN1);
if (ret != SSL_SUCCESS) {
fprintf(stderr, "ERROR: failed to load client certificate, "
"please check the buffer.\n");
util_Cleanup(sockfd,ctx,ssl);
return -1;
}
/* Create a WOLFSSL object */
if ((ssl = wolfSSL_new(ctx)) == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL object\n");
util_Cleanup(sockfd,ctx,ssl);
return -1;
}
/* Attach wolfSSL to the socket */
wolfSSL_set_fd(ssl, sockfd);
/* Connect to wolfSSL on the server side */
if (wolfSSL_connect(ssl) != SSL_SUCCESS) {
fprintf(stderr, "ERROR: failed to connect to wolfSSL\n");
util_Cleanup(sockfd,ctx,ssl);
return -1;
}
/* Get length of message for server. */
printf("\nMessage for server: %s\n",msg);
len = strnlen(msg, sizeof(msg));
/* Send the message to the server */
if (wolfSSL_write(ssl, msg, (int)len) != len) {
fprintf(stderr, "ERROR: failed to write\n");
util_Cleanup(sockfd,ctx,ssl);
return -1;
}
/* Read the server data into our buff array */
memset(buff, 0, sizeof(buff));
if (wolfSSL_read(ssl, buff, sizeof(buff) - 1) == -1) {
fprintf(stderr, "ERROR: failed to read\n");
util_Cleanup(sockfd,ctx,ssl);
return -1;
}
/* Print to stdout any data the server sends */
printf("Server Reply: %s\n", buff);
/* Cleanup and return */
util_Cleanup(sockfd,ctx,ssl);
return 0; /* Return reporting a success */
}

View File

@ -0,0 +1,119 @@
/* client.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifndef WOLFSSL_CLIENT_H
#define WOLFSSL_CLIENT_H
static const unsigned char wolfssl_website_root_ca[] =
{
0x30, 0x82, 0x03, 0x75, 0x30, 0x82, 0x02, 0x5D, 0xA0, 0x03,
0x02, 0x01, 0x02, 0x02, 0x0B, 0x04, 0x00, 0x00, 0x00, 0x00,
0x01, 0x15, 0x4B, 0x5A, 0xC3, 0x94, 0x30, 0x0D, 0x06, 0x09,
0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x05,
0x00, 0x30, 0x57, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55,
0x04, 0x06, 0x13, 0x02, 0x42, 0x45, 0x31, 0x19, 0x30, 0x17,
0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x10, 0x47, 0x6C, 0x6F,
0x62, 0x61, 0x6C, 0x53, 0x69, 0x67, 0x6E, 0x20, 0x6E, 0x76,
0x2D, 0x73, 0x61, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55,
0x04, 0x0B, 0x13, 0x07, 0x52, 0x6F, 0x6F, 0x74, 0x20, 0x43,
0x41, 0x31, 0x1B, 0x30, 0x19, 0x06, 0x03, 0x55, 0x04, 0x03,
0x13, 0x12, 0x47, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x53, 0x69,
0x67, 0x6E, 0x20, 0x52, 0x6F, 0x6F, 0x74, 0x20, 0x43, 0x41,
0x30, 0x1E, 0x17, 0x0D, 0x39, 0x38, 0x30, 0x39, 0x30, 0x31,
0x31, 0x32, 0x30, 0x30, 0x30, 0x30, 0x5A, 0x17, 0x0D, 0x32,
0x38, 0x30, 0x31, 0x32, 0x38, 0x31, 0x32, 0x30, 0x30, 0x30,
0x30, 0x5A, 0x30, 0x57, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03,
0x55, 0x04, 0x06, 0x13, 0x02, 0x42, 0x45, 0x31, 0x19, 0x30,
0x17, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x10, 0x47, 0x6C,
0x6F, 0x62, 0x61, 0x6C, 0x53, 0x69, 0x67, 0x6E, 0x20, 0x6E,
0x76, 0x2D, 0x73, 0x61, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03,
0x55, 0x04, 0x0B, 0x13, 0x07, 0x52, 0x6F, 0x6F, 0x74, 0x20,
0x43, 0x41, 0x31, 0x1B, 0x30, 0x19, 0x06, 0x03, 0x55, 0x04,
0x03, 0x13, 0x12, 0x47, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x53,
0x69, 0x67, 0x6E, 0x20, 0x52, 0x6F, 0x6F, 0x74, 0x20, 0x43,
0x41, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A,
0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00,
0x03, 0x82, 0x01, 0x0F, 0x00, 0x30, 0x82, 0x01, 0x0A, 0x02,
0x82, 0x01, 0x01, 0x00, 0xDA, 0x0E, 0xE6, 0x99, 0x8D, 0xCE,
0xA3, 0xE3, 0x4F, 0x8A, 0x7E, 0xFB, 0xF1, 0x8B, 0x83, 0x25,
0x6B, 0xEA, 0x48, 0x1F, 0xF1, 0x2A, 0xB0, 0xB9, 0x95, 0x11,
0x04, 0xBD, 0xF0, 0x63, 0xD1, 0xE2, 0x67, 0x66, 0xCF, 0x1C,
0xDD, 0xCF, 0x1B, 0x48, 0x2B, 0xEE, 0x8D, 0x89, 0x8E, 0x9A,
0xAF, 0x29, 0x80, 0x65, 0xAB, 0xE9, 0xC7, 0x2D, 0x12, 0xCB,
0xAB, 0x1C, 0x4C, 0x70, 0x07, 0xA1, 0x3D, 0x0A, 0x30, 0xCD,
0x15, 0x8D, 0x4F, 0xF8, 0xDD, 0xD4, 0x8C, 0x50, 0x15, 0x1C,
0xEF, 0x50, 0xEE, 0xC4, 0x2E, 0xF7, 0xFC, 0xE9, 0x52, 0xF2,
0x91, 0x7D, 0xE0, 0x6D, 0xD5, 0x35, 0x30, 0x8E, 0x5E, 0x43,
0x73, 0xF2, 0x41, 0xE9, 0xD5, 0x6A, 0xE3, 0xB2, 0x89, 0x3A,
0x56, 0x39, 0x38, 0x6F, 0x06, 0x3C, 0x88, 0x69, 0x5B, 0x2A,
0x4D, 0xC5, 0xA7, 0x54, 0xB8, 0x6C, 0x89, 0xCC, 0x9B, 0xF9,
0x3C, 0xCA, 0xE5, 0xFD, 0x89, 0xF5, 0x12, 0x3C, 0x92, 0x78,
0x96, 0xD6, 0xDC, 0x74, 0x6E, 0x93, 0x44, 0x61, 0xD1, 0x8D,
0xC7, 0x46, 0xB2, 0x75, 0x0E, 0x86, 0xE8, 0x19, 0x8A, 0xD5,
0x6D, 0x6C, 0xD5, 0x78, 0x16, 0x95, 0xA2, 0xE9, 0xC8, 0x0A,
0x38, 0xEB, 0xF2, 0x24, 0x13, 0x4F, 0x73, 0x54, 0x93, 0x13,
0x85, 0x3A, 0x1B, 0xBC, 0x1E, 0x34, 0xB5, 0x8B, 0x05, 0x8C,
0xB9, 0x77, 0x8B, 0xB1, 0xDB, 0x1F, 0x20, 0x91, 0xAB, 0x09,
0x53, 0x6E, 0x90, 0xCE, 0x7B, 0x37, 0x74, 0xB9, 0x70, 0x47,
0x91, 0x22, 0x51, 0x63, 0x16, 0x79, 0xAE, 0xB1, 0xAE, 0x41,
0x26, 0x08, 0xC8, 0x19, 0x2B, 0xD1, 0x46, 0xAA, 0x48, 0xD6,
0x64, 0x2A, 0xD7, 0x83, 0x34, 0xFF, 0x2C, 0x2A, 0xC1, 0x6C,
0x19, 0x43, 0x4A, 0x07, 0x85, 0xE7, 0xD3, 0x7C, 0xF6, 0x21,
0x68, 0xEF, 0xEA, 0xF2, 0x52, 0x9F, 0x7F, 0x93, 0x90, 0xCF,
0x02, 0x03, 0x01, 0x00, 0x01, 0xA3, 0x42, 0x30, 0x40, 0x30,
0x0E, 0x06, 0x03, 0x55, 0x1D, 0x0F, 0x01, 0x01, 0xFF, 0x04,
0x04, 0x03, 0x02, 0x01, 0x06, 0x30, 0x0F, 0x06, 0x03, 0x55,
0x1D, 0x13, 0x01, 0x01, 0xFF, 0x04, 0x05, 0x30, 0x03, 0x01,
0x01, 0xFF, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04,
0x16, 0x04, 0x14, 0x60, 0x7B, 0x66, 0x1A, 0x45, 0x0D, 0x97,
0xCA, 0x89, 0x50, 0x2F, 0x7D, 0x04, 0xCD, 0x34, 0xA8, 0xFF,
0xFC, 0xFD, 0x4B, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48,
0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x05, 0x00, 0x03, 0x82,
0x01, 0x01, 0x00, 0xD6, 0x73, 0xE7, 0x7C, 0x4F, 0x76, 0xD0,
0x8D, 0xBF, 0xEC, 0xBA, 0xA2, 0xBE, 0x34, 0xC5, 0x28, 0x32,
0xB5, 0x7C, 0xFC, 0x6C, 0x9C, 0x2C, 0x2B, 0xBD, 0x09, 0x9E,
0x53, 0xBF, 0x6B, 0x5E, 0xAA, 0x11, 0x48, 0xB6, 0xE5, 0x08,
0xA3, 0xB3, 0xCA, 0x3D, 0x61, 0x4D, 0xD3, 0x46, 0x09, 0xB3,
0x3E, 0xC3, 0xA0, 0xE3, 0x63, 0x55, 0x1B, 0xF2, 0xBA, 0xEF,
0xAD, 0x39, 0xE1, 0x43, 0xB9, 0x38, 0xA3, 0xE6, 0x2F, 0x8A,
0x26, 0x3B, 0xEF, 0xA0, 0x50, 0x56, 0xF9, 0xC6, 0x0A, 0xFD,
0x38, 0xCD, 0xC4, 0x0B, 0x70, 0x51, 0x94, 0x97, 0x98, 0x04,
0xDF, 0xC3, 0x5F, 0x94, 0xD5, 0x15, 0xC9, 0x14, 0x41, 0x9C,
0xC4, 0x5D, 0x75, 0x64, 0x15, 0x0D, 0xFF, 0x55, 0x30, 0xEC,
0x86, 0x8F, 0xFF, 0x0D, 0xEF, 0x2C, 0xB9, 0x63, 0x46, 0xF6,
0xAA, 0xFC, 0xDF, 0xBC, 0x69, 0xFD, 0x2E, 0x12, 0x48, 0x64,
0x9A, 0xE0, 0x95, 0xF0, 0xA6, 0xEF, 0x29, 0x8F, 0x01, 0xB1,
0x15, 0xB5, 0x0C, 0x1D, 0xA5, 0xFE, 0x69, 0x2C, 0x69, 0x24,
0x78, 0x1E, 0xB3, 0xA7, 0x1C, 0x71, 0x62, 0xEE, 0xCA, 0xC8,
0x97, 0xAC, 0x17, 0x5D, 0x8A, 0xC2, 0xF8, 0x47, 0x86, 0x6E,
0x2A, 0xC4, 0x56, 0x31, 0x95, 0xD0, 0x67, 0x89, 0x85, 0x2B,
0xF9, 0x6C, 0xA6, 0x5D, 0x46, 0x9D, 0x0C, 0xAA, 0x82, 0xE4,
0x99, 0x51, 0xDD, 0x70, 0xB7, 0xDB, 0x56, 0x3D, 0x61, 0xE4,
0x6A, 0xE1, 0x5C, 0xD6, 0xF6, 0xFE, 0x3D, 0xDE, 0x41, 0xCC,
0x07, 0xAE, 0x63, 0x52, 0xBF, 0x53, 0x53, 0xF4, 0x2B, 0xE9,
0xC7, 0xFD, 0xB6, 0xF7, 0x82, 0x5F, 0x85, 0xD2, 0x41, 0x18,
0xDB, 0x81, 0xB3, 0x04, 0x1C, 0xC5, 0x1F, 0xA4, 0x80, 0x6F,
0x15, 0x20, 0xC9, 0xDE, 0x0C, 0x88, 0x0A, 0x1D, 0xD6, 0x66,
0x55, 0xE2, 0xFC, 0x48, 0xC9, 0x29, 0x26, 0x69, 0xE0
};
static const int sizeof_wolfssl_website_root_ca = sizeof(wolfssl_website_root_ca);
#endif /* WOLFSSL_CLIENT_H */

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{fbf6f097-b2bf-49ac-a70b-dba6036a395d}</ProjectGuid>
<Keyword>AzureSphere</Keyword>
<RootNamespace>client</RootNamespace>
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
<ApplicationType>Linux</ApplicationType>
<ApplicationTypeRevision>1.0</ApplicationTypeRevision>
<TargetLinuxPlatform>Generic</TargetLinuxPlatform>
<LinuxProjectType>{D51BCBC9-82E9-4017-911E-C93873C4EA2B}</LinuxProjectType>
<DebugMachineType>Device</DebugMachineType>
<PlatformToolset>GCC_AzureSphere_1_0</PlatformToolset>
<ProjectPublicIncludePath>$(MSBuildProjectDirectory)\Inc\Public</ProjectPublicIncludePath>
<PublicIncludePath>$(MSBuildProjectDirectory)\Inc\Public</PublicIncludePath>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<TargetSysroot>2</TargetSysroot>
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<TargetSysroot>2</TargetSysroot>
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<OutDir>$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<TargetName>$(ProjectName)</TargetName>
<TargetExt>.out</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<TargetExt>.out</TargetExt>
<OutDir>$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalOptions>-Werror=implicit-function-declaration %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">..\..\..;../;$(ProjectDir);$(SysRootIncludePath);%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">WOLFSSL_USER_SETTINGS;_POSIX_C_SOURCE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">..\..\..;$(ProjectDir);$(SysRootIncludePath);%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">WOLFSSL_USER_SETTINGS;_POSIX_C_SOURCE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<LibraryDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">applibs;pthread;gcc_s;c;wolfssl</LibraryDependencies>
<ShowProgress Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ShowProgress>
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(SolutionDir)$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<CustomBuildStep>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">192.168.35.1</Command>
</CustomBuildStep>
<Link>
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(SolutionDir)$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<LibraryDependencies Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">applibs;pthread;gcc_s;c;wolfssl</LibraryDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="client.c" />
<ClInclude Include="client.h" />
</ItemGroup>
<ItemGroup>
<None Include="app_manifest.json" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>

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/VS-AZURE-SPHERE/README.md
EXTRA_DIST+= IDE/VS-AZURE-SPHERE/user_settings.h
EXTRA_DIST+= IDE/VS-AZURE-SPHERE/wolfssl.sln
EXTRA_DIST+= IDE/VS-AZURE-SPHERE/wolfssl.vcxproj
EXTRA_DIST+= IDE/VS-AZURE-SPHERE/client/app_manifest.json
EXTRA_DIST+= IDE/VS-AZURE-SPHERE/client/client.c
EXTRA_DIST+= IDE/VS-AZURE-SPHERE/client/client.h
EXTRA_DIST+= IDE/VS-AZURE-SPHERE/client/client.vcxproj
EXTRA_DIST+= IDE/VS-AZURE-SPHERE/server/app_manifest.json
EXTRA_DIST+= IDE/VS-AZURE-SPHERE/server/server.c
EXTRA_DIST+= IDE/VS-AZURE-SPHERE/server/server.h
EXTRA_DIST+= IDE/VS-AZURE-SPHERE/server/server.vcxproj
EXTRA_DIST+= IDE/VS-AZURE-SPHERE/wolfcrypt_test/app_manifest.json
EXTRA_DIST+= IDE/VS-AZURE-SPHERE/wolfcrypt_test/wolfcrypt_test.vcxproj

View File

@ -0,0 +1,11 @@
{
"SchemaVersion": 1,
"Name": "wolfSSL_Server",
"ComponentId": "00000000-0000-0000-0000-000000000001",
"EntryPoint": "/bin/app",
"CmdArgs": [],
"Capabilities": {
"AllowedTcpServerPorts": [ 11111 ]
},
"ApplicationType": "Default"
}

View File

@ -0,0 +1,208 @@
/* server.c
*
* Copyright (C) 2006-2019 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
*
* 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-1301, USA
*/
#include "server.h"
/* the usual suspects */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/* socket includes */
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <unistd.h>
/* <shared/util.h> includes */
#include <shared/util.h>
/* wolfSSL */
#include <wolfssl/ssl.h>
#include <wolfssl/certs_test.h>
/* Azure Sphere */
#include <applibs/log.h>
#include <applibs/networking.h>
#define BIND_PORT 11111
#define CERT_BUF server_cert_der_2048
#define SIZEOF_CERT_BUF sizeof_server_cert_der_2048
#define KEY_BUF server_key_der_2048
#define SIZEOF_KEY_BUF sizeof_server_key_der_2048
int main(void)
{
bool isNetworkingReady = false;
int sockfd;
int connd;
struct sockaddr_in servAddr;
struct sockaddr_in clientAddr;
socklen_t size = sizeof(clientAddr);
char buff[256];
size_t len;
int shutdown = 0;
int ret;
const char* reply = "I hear ya fa shizzle!\n";
/* declare wolfSSL objects */
WOLFSSL_CTX* ctx = NULL;
WOLFSSL* ssl = NULL;
util_PrintIfAddr();
/* Check if the Azure Sphere Dev Board has network connectivity. */
if ((Networking_IsNetworkingReady(&isNetworkingReady) < 0) || !isNetworkingReady) {
fprintf(stderr,"Error: Network is not up.\n");
return -1;
}
/* Initialize wolfSSL */
wolfSSL_Init();
/* Create a socket that uses an internet IPv4 address,
* Sets the socket to be stream based (TCP),
* 0 means choose the default protocol. */
if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
fprintf(stderr, "ERROR: failed to create the socket\n");
util_Cleanup(sockfd, ctx, ssl);
return -1;
}
/* Create and initialize WOLFSSL_CTX */
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method())) == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL_CTX\n");
util_Cleanup(sockfd, ctx, ssl);
return -1;
}
/* Load server certificates into WOLFSSL_CTX */
if (wolfSSL_CTX_use_certificate_buffer(ctx, CERT_BUF, SIZEOF_CERT_BUF, SSL_FILETYPE_ASN1)
!= SSL_SUCCESS) {
fprintf(stderr, "ERROR: failed to load %s, please check the file.\n",
CERT_BUF);
util_Cleanup(sockfd, ctx, ssl);
return -1;
}
/* Load server key into WOLFSSL_CTX */
if (wolfSSL_CTX_use_PrivateKey_buffer(ctx, KEY_BUF, SIZEOF_KEY_BUF, SSL_FILETYPE_ASN1)
!= SSL_SUCCESS) {
fprintf(stderr, "ERROR: failed to load %s, please check the file.\n",
KEY_BUF);
util_Cleanup(sockfd, ctx, ssl);
return -1;
}
/* Initialize the server address struct with zeros */
memset(&servAddr, 0, sizeof(servAddr));
/* Fill in the server address */
servAddr.sin_family = AF_INET; /* using IPv4 */
servAddr.sin_port = htons(BIND_PORT); /* on BIND_PORT */
servAddr.sin_addr.s_addr = INADDR_ANY; /* from anywhere */
/* Bind the server socket to our port */
if (bind(sockfd, (struct sockaddr*)&servAddr, sizeof(servAddr)) == -1) {
fprintf(stderr, "ERROR: failed to bind\n");
util_Cleanup(sockfd, ctx, ssl);
return -1;
}
/* Listen for a new connection, allow 5 pending connections */
if (listen(sockfd, 5) == -1) {
fprintf(stderr, "ERROR: failed to listen\n");
util_Cleanup(sockfd, ctx, ssl);
return -1;
}
/* Continue to accept clients until shutdown is issued */
while (!shutdown) {
printf("Waiting for a connection...\n");
/* Accept client connections */
if ((connd = accept(sockfd, (struct sockaddr*)&clientAddr, &size))
== -1) {
fprintf(stderr, "ERROR: failed to accept the connection\n\n");
util_Cleanup(sockfd, ctx, ssl);
return -1;
}
/* Create a WOLFSSL object */
if ((ssl = wolfSSL_new(ctx)) == NULL) {
fprintf(stderr, "ERROR: failed to create WOLFSSL object\n");
util_Cleanup(sockfd, ctx, ssl);
return -1;
}
/* Attach wolfSSL to the socket */
wolfSSL_set_fd(ssl, connd);
/* Establish TLS connection */
ret = wolfSSL_accept(ssl);
if (ret != SSL_SUCCESS) {
fprintf(stderr, "wolfSSL_accept error = %d\n",
wolfSSL_get_error(ssl, ret));
util_Cleanup(sockfd, ctx, ssl);
return -1;
}
printf("Client connected successfully\n");
/* Read the client data into our buff array */
memset(buff, 0, sizeof(buff));
if (wolfSSL_read(ssl, buff, sizeof(buff)-1) == -1) {
fprintf(stderr, "ERROR: failed to read\n");
util_Cleanup(sockfd, ctx, ssl);
return -1;
}
/* Print to stdout any data the client sends */
printf("Client: %s\n", buff);
/* Check for server shutdown command */
if (strncmp(buff, "shutdown", 8) == 0) {
printf("Shutdown command issued!\n");
shutdown = 1;
}
/* Write our reply into buff */
memset(buff, 0, sizeof(buff));
memcpy(buff, reply, strlen(reply));
len = strnlen(buff, sizeof(buff));
/* Reply back to the client */
if (wolfSSL_write(ssl, buff, (int)len) != len) {
fprintf(stderr, "ERROR: failed to write\n");
util_Cleanup(sockfd, ctx, ssl);
return -1;
}
/* Cleanup after this connection */
wolfSSL_free(ssl); /* Free the wolfSSL object */
close(connd); /* Close the connection to the client */
}
printf("Shutdown complete\n");
/* Cleanup and return */
util_Cleanup(sockfd, ctx, ssl);
return 0; /* Return reporting a success */
}

View File

@ -0,0 +1,27 @@
/* server.h
*
* Copyright (C) 2006-2019 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifndef WOLFSSL_SERVER_H
#define WOLFSSL_SERVER_H
#endif /* WOLFSSL_SERVER_H */

View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F005DF72-46F4-4989-BCB4-3ACDA323D569}</ProjectGuid>
<Keyword>AzureSphere</Keyword>
<RootNamespace>client</RootNamespace>
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
<ApplicationType>Linux</ApplicationType>
<ApplicationTypeRevision>1.0</ApplicationTypeRevision>
<TargetLinuxPlatform>Generic</TargetLinuxPlatform>
<LinuxProjectType>{D51BCBC9-82E9-4017-911E-C93873C4EA2B}</LinuxProjectType>
<DebugMachineType>Device</DebugMachineType>
<PlatformToolset>GCC_AzureSphere_1_0</PlatformToolset>
<ProjectPublicIncludePath>$(MSBuildProjectDirectory)\Inc\Public</ProjectPublicIncludePath>
<PublicIncludePath>$(MSBuildProjectDirectory)\Inc\Public</PublicIncludePath>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<TargetSysroot>2</TargetSysroot>
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<TargetSysroot>2</TargetSysroot>
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<OutDir>$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<TargetName>$(ProjectName)</TargetName>
<TargetExt>.out</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<OutDir>$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<TargetExt>.out</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalOptions>-Werror=implicit-function-declaration %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">..\..\..;../;$(ProjectDir);$(SysRootIncludePath);%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">WOLFSSL_USER_SETTINGS;_POSIX_C_SOURCE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">..\..\..;$(ProjectDir);$(SysRootIncludePath);%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">WOLFSSL_USER_SETTINGS;_POSIX_C_SOURCE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<LibraryDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">applibs;pthread;gcc_s;c;wolfssl</LibraryDependencies>
<ShowProgress Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ShowProgress>
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(SolutionDir)$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<CustomBuildStep>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">192.168.35.1</Command>
</CustomBuildStep>
<Link>
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(SolutionDir)$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<LibraryDependencies Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">applibs;pthread;gcc_s;c;wolfssl</LibraryDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="server.h" />
</ItemGroup>
<ItemGroup>
<None Include="app_manifest.json" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="server.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>

View File

@ -0,0 +1,61 @@
#ifndef _UTIL_H_
#define _UTIL_H_
#include <stdio.h>
#include <wolfssl/ssl.h>
#include <ifaddrs.h>
#include <applibs/log.h>
#define _GNU_SOURCE /* defines NI_NUMERICHOST */
#ifndef NI_MAXHOST
#define NI_MAXHOST 256
#endif
static void util_Cleanup(int sockfd, WOLFSSL_CTX* ctx, WOLFSSL* ssl)
{
wolfSSL_free(ssl); /* Free the wolfSSL object */
wolfSSL_CTX_free(ctx); /* Free the wolfSSL context object */
wolfSSL_Cleanup(); /* Cleanup the wolfSSL environment */
close(sockfd); /* Close the connection to the server */
}
/* Displays each AF_INET interface and it's IP Address
* Return: WOLFSSL_SUCCESS if print is successful else WOLFSSL_FAILURE
*/
static int util_PrintIfAddr(void)
{
char host[NI_MAXHOST];
struct ifaddrs* ifaddr, * nxt;
int family, info, n;
/* Get a linked list of 'struct ifaddrs*' */
if (getifaddrs(&ifaddr) != 0) {
fprintf(stderr, "ERROR: Getting network interface and IP address");
return WOLFSSL_FAILURE;
}
printf("\nInterface IP Address\n");
/* Traverse ifaddr linked list using nxt */
for (nxt = ifaddr; nxt != NULL; nxt = nxt->ifa_next) {
if (nxt->ifa_addr == NULL)
continue;
family = nxt->ifa_addr->sa_family;
/* Display the address of each AF_INET* interface */
if (family == AF_INET) {
info = getnameinfo(nxt->ifa_addr, sizeof(struct sockaddr_in),
host, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
if (info != 0) {
fprintf(stderr, "Failed to getnameinfo");
freeifaddrs(ifaddr);
return WOLFSSL_FAILURE;
}
/* Determine amount of space, n, to justify IP Address */
n = (int)strlen("Interface ") - (int)strlen(nxt->ifa_name);
n = (n > 0) ? n : 1; /* Set space to 1 if n is negative */
printf("%s %*c%s>\n", nxt->ifa_name, n, '<', host);
}
}
printf("\n");
freeifaddrs(ifaddr);
return WOLFSSL_SUCCESS;
}
#endif

View File

@ -0,0 +1,70 @@
#ifndef _USER_SETTINGS_H_
#define _USER_SETTINGS_H_
#define WOLFSSL_AZSPHERE
/* Client connects to the server with these details. */
#ifdef CUSTOM_SERVER_CONNECTION
#ifndef SERVER_IP
#define SERVER_IP "192.168.1.200" /* Local Test Server IP */
#endif
#ifndef DEFAULT_PORT
#define DEFAULT_PORT 11111
#endif
#define CERT ca_cert_der_2048
#define SIZEOF_CERT sizeof_ca_cert_der_2048
static const char msg[] = "Are you listening wolfSSL Server?";
#else
#ifndef SERVER_IP
#define SERVER_IP "www.wolfssl.com"
#endif
#ifndef DEFAULT_PORT
#define DEFAULT_PORT 443
#endif
#define CERT wolfssl_website_root_ca
#define SIZEOF_CERT sizeof_wolfssl_website_root_ca
static const char msg[] = "GET /index.html HTTP/1.1\r\n\r\n";
#endif
/* Math: Normal (!USE_FAST_MATH) */
#define SIZEOF_LONG_LONG 8
#define WC_RSA_BLINDING
#define ECC_TIMING_RESISTANT
/* Enable options */
#define HAVE_CHACHA
#define HAVE_POLY1305
#define HAVE_ECC
#define HAVE_SUPPORTED_CURVES
#define HAVE_TLS_EXTENSIONS
#define HAVE_ONE_TIME_AUTH
#define HAVE_TRUNCATED_HMAC
#define HAVE_EXTENDED_MASTER
#define HAVE_ALPN
#define HAVE_SNI
#define HAVE_OCSP
#define HAVE_AESGCM
/* Disable options */
#define NO_PWDBASED
#define NO_DSA
#define NO_DES3
#define NO_RABBIT
#define NO_RC4
#define NO_MD4
/* Benchmark / Testing */
#define BENCH_EMBEDDED
#define USE_CERT_BUFFERS_2048
#define USE_CERT_BUFFERS_256
/* OS */
#define SINGLE_THREADED
/* Filesystem */
#define NO_FILESYSTEM
/* Debug */
#define printf Log_Debug
#define WOLFIO_DEBUG
#endif /* _USER_SETTINGS_H_ */

View File

@ -0,0 +1,10 @@
{
"SchemaVersion": 1,
"Name": "wolfCrypt_Test",
"ComponentId": "00000000-0000-0000-0000-000000000003",
"EntryPoint": "/bin/app",
"CmdArgs": [],
"Capabilities": {
},
"ApplicationType": "Default"
}

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{CD96C02B-1FC9-424E-88BE-816BE143A1C3}</ProjectGuid>
<Keyword>AzureSphere</Keyword>
<RootNamespace>echoclient</RootNamespace>
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
<ApplicationType>Linux</ApplicationType>
<ApplicationTypeRevision>1.0</ApplicationTypeRevision>
<TargetLinuxPlatform>Generic</TargetLinuxPlatform>
<LinuxProjectType>{D51BCBC9-82E9-4017-911E-C93873C4EA2B}</LinuxProjectType>
<DebugMachineType>Device</DebugMachineType>
<PlatformToolset>GCC_AzureSphere_1_0</PlatformToolset>
<ProjectPublicIncludePath>$(MSBuildProjectDirectory)\Inc\Public</ProjectPublicIncludePath>
<PublicIncludePath>$(MSBuildProjectDirectory)\Inc\Public</PublicIncludePath>
<ProjectName>wolfcrypt_test</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<TargetSysroot>2</TargetSysroot>
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<TargetSysroot>2</TargetSysroot>
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<TargetName>$(ProjectName)</TargetName>
<TargetExt>.out</TargetExt>
<OutDir>$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<IncludePath>$(SysRootIncludePath);$(IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<OutDir>$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<TargetExt>.out</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalOptions>-Werror=implicit-function-declaration %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">..\..\..;../;$(ProjectDir);$(SysRootIncludePath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">WOLFSSL_USER_SETTINGS;_POSIX_C_SOURCE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CAdditionalWarning Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">strict-prototypes;%(CAdditionalWarning);deprecated-declarations</CAdditionalWarning>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">TurnOffAllWarnings</WarningLevel>
<Verbose Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</Verbose>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">..\..\..;$(ProjectDir);$(SysRootIncludePath);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">WOLFSSL_USER_SETTINGS;_POSIX_C_SOURCE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<Link>
<LibraryDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">applibs;pthread;gcc_s;c;wolfssl</LibraryDependencies>
<SharedLibrarySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(SharedLibrarySearchPath)</SharedLibrarySearchPath>
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(SolutionDir)$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ShowProgress Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</ShowProgress>
</Link>
<Link>
<AdditionalLibraryDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(SolutionDir)$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<LibraryDependencies Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">applibs;pthread;gcc_s;c;wolfssl</LibraryDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\wolfcrypt\test\test.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\wolfcrypt\test\test.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\certs\ecc-key.der" />
<None Include="app_manifest.json" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>

View File

@ -0,0 +1,52 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29201.188
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wolfssl", "wolfssl.vcxproj", "{EAED6D0C-D9C8-4901-B7D8-F8610AFCEAE6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wolfcrypt_test", "wolfcrypt_test\wolfcrypt_test.vcxproj", "{CD96C02B-1FC9-424E-88BE-816BE143A1C3}"
ProjectSection(ProjectDependencies) = postProject
{EAED6D0C-D9C8-4901-B7D8-F8610AFCEAE6} = {EAED6D0C-D9C8-4901-B7D8-F8610AFCEAE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "client\client.vcxproj", "{FBF6F097-B2BF-49AC-A70B-DBA6036A395D}"
ProjectSection(ProjectDependencies) = postProject
{EAED6D0C-D9C8-4901-B7D8-F8610AFCEAE6} = {EAED6D0C-D9C8-4901-B7D8-F8610AFCEAE6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server\server.vcxproj", "{F005DF72-46F4-4989-BCB4-3ACDA323D569}"
ProjectSection(ProjectDependencies) = postProject
{EAED6D0C-D9C8-4901-B7D8-F8610AFCEAE6} = {EAED6D0C-D9C8-4901-B7D8-F8610AFCEAE6}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Release|ARM = Release|ARM
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EAED6D0C-D9C8-4901-B7D8-F8610AFCEAE6}.Debug|ARM.ActiveCfg = Debug|ARM
{EAED6D0C-D9C8-4901-B7D8-F8610AFCEAE6}.Debug|ARM.Build.0 = Debug|ARM
{EAED6D0C-D9C8-4901-B7D8-F8610AFCEAE6}.Release|ARM.ActiveCfg = Release|ARM
{EAED6D0C-D9C8-4901-B7D8-F8610AFCEAE6}.Release|ARM.Build.0 = Release|ARM
{CD96C02B-1FC9-424E-88BE-816BE143A1C3}.Debug|ARM.ActiveCfg = Debug|ARM
{CD96C02B-1FC9-424E-88BE-816BE143A1C3}.Debug|ARM.Build.0 = Debug|ARM
{CD96C02B-1FC9-424E-88BE-816BE143A1C3}.Release|ARM.ActiveCfg = Release|ARM
{CD96C02B-1FC9-424E-88BE-816BE143A1C3}.Release|ARM.Build.0 = Release|ARM
{FBF6F097-B2BF-49AC-A70B-DBA6036A395D}.Debug|ARM.ActiveCfg = Debug|ARM
{FBF6F097-B2BF-49AC-A70B-DBA6036A395D}.Debug|ARM.Build.0 = Debug|ARM
{FBF6F097-B2BF-49AC-A70B-DBA6036A395D}.Release|ARM.ActiveCfg = Release|ARM
{FBF6F097-B2BF-49AC-A70B-DBA6036A395D}.Release|ARM.Build.0 = Release|ARM
{F005DF72-46F4-4989-BCB4-3ACDA323D569}.Debug|ARM.ActiveCfg = Debug|ARM
{F005DF72-46F4-4989-BCB4-3ACDA323D569}.Debug|ARM.Build.0 = Debug|ARM
{F005DF72-46F4-4989-BCB4-3ACDA323D569}.Release|ARM.ActiveCfg = Release|ARM
{F005DF72-46F4-4989-BCB4-3ACDA323D569}.Release|ARM.Build.0 = Release|ARM
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {13BC142A-0A4E-42D5-BB84-347B5D44153E}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\bio.c" />
<ClCompile Include="..\..\src\crl.c" />
<ClCompile Include="..\..\src\internal.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="..\..\src\tls13.c" />
<ClCompile Include="..\..\src\wolfio.c" />
<ClCompile Include="..\..\wolfcrypt\src\aes.c" />
<ClCompile Include="..\..\wolfcrypt\src\arc4.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\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\evp.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\pkcs7.c" />
<ClCompile Include="..\..\wolfcrypt\src\poly1305.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\sha3.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_pkcs11.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" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{eaed6d0c-d9c8-4901-b7d8-f8610afceae6}</ProjectGuid>
<Keyword>AzureSphere</Keyword>
<RootNamespace>wolfssl</RootNamespace>
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
<ApplicationType>Linux</ApplicationType>
<ApplicationTypeRevision>1.0</ApplicationTypeRevision>
<TargetLinuxPlatform>Generic</TargetLinuxPlatform>
<LinuxProjectType>{D51BCBC9-82E9-4017-911E-C93873C4EA2B}</LinuxProjectType>
<DebugMachineType>Device</DebugMachineType>
<PlatformToolset>GCC_AzureSphere_1_0</PlatformToolset>
<ProjectPublicIncludePath>$(MSBuildProjectDirectory)\Inc\Public</ProjectPublicIncludePath>
<PublicIncludePath>$(MSBuildProjectDirectory)\Inc\Public</PublicIncludePath>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<TargetSysroot>2</TargetSysroot>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<TargetSysroot>2</TargetSysroot>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<TargetExt>.a</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalOptions>-Werror=implicit-function-declaration %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">NO_MAIN_DRIVER;WOLFSSL_USER_SETTINGS;WOLFSSL_LIB;_POSIX_C_SOURCE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">..\..;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CAdditionalWarning Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">strict-prototypes;%(CAdditionalWarning);deprecated-declarations</CAdditionalWarning>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">WOLFSSL_USER_SETTINGS;WOLFSSL_LIB;_POSIX_C_SOURCE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">..\..;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">TurnOffAllWarnings</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">TurnOffAllWarnings</WarningLevel>
</ClCompile>
<Link>
<LibraryDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">applibs;pthread;gcc_s;c</LibraryDependencies>
</Link>
<Lib>
<Verbose Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</Verbose>
</Lib>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>

View File

@ -47,6 +47,22 @@
#define HAVE_ECC
#define ECC_SHAMIR
#define ECC_TIMING_RESISTANT
/* Optional Performance Speedups */
#if 0
/* AESNI on x64 */
#ifdef _WIN64
#define HAVE_INTEL_RDSEED
#define WOLFSSL_AESNI
#endif
/* Single Precision Support for RSA/DH 1024/2048/3072 and ECC P-256 */
#define WOLFSSL_SP
#define WOLFSSL_HAVE_SP_ECC
#define WOLFSSL_HAVE_SP_DH
#define WOLFSSL_HAVE_SP_RSA
#endif
#else
/* The servers and clients */
#define OPENSSL_EXTRA

View File

@ -14,13 +14,18 @@ include IDE/ARDUINO/include.am
include IDE/INTIME-RTOS/include.am
include IDE/OPENSTM32/include.am
include IDE/VS-ARM/include.am
include IDE/VS-AZURE-SPHERE/include.am
include IDE/GCC-ARM/include.am
include IDE/CSBENCH/include.am
include IDE/ECLIPSE/DEOS/include.am
include IDE/ECLIPSE/MICRIUM/include.am
include IDE/ECLIPSE/SIFIVE/include.am
include IDE/mynewt/include.am
include IDE/Renesas/cs+/Projects/include.am
include IDE/Renesas/e2studio/Projects/include.am
include IDE/WICED-STUDIO/include.am
include IDE/CRYPTOCELL/include.am
include IDE/M68K/include.am
include IDE/RISCV/include.am
EXTRA_DIST+= IDE/IAR-EWARM IDE/MDK-ARM IDE/MDK5-ARM IDE/MYSQL IDE/LPCXPRESSO IDE/HEXIWEAR IDE/Espressif IDE/zephyr

View File

@ -18,8 +18,8 @@ It provides the following zephyr code.
## How to setup
### delopy wolfssl source to mynewt project
Specify the path of the mynewt project and execute `wolfssl/IDE/mynewt/setup.sh`.
### delopy wolfssl source to zephyr project
Specify the path of the zephyr project and execute `wolfssl/IDE/zephyr/setup.sh`.
```bash
./IDE/zephyr/setup.sh /path/to/zephyrproject

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