Compare commits

...

685 Commits

Author SHA1 Message Date
toddouska
ee21d33794 Merge pull request #407 from wolfSSL/embOS-port
embOS port
2016-05-05 13:27:27 -07:00
kaleb-himes
4df12e1bd5 Add note for users about embOS directory 2016-05-05 12:29:20 -06:00
toddouska
e5f1ad5702 Merge pull request #410 from kaleb-himes/master
update version to 3.9.1
2016-05-05 10:59:05 -07:00
Chris Conlon
6b8c6cebc7 Merge pull request #409 from dgarske/rowleyfixes
Rowley Crossworks updates/fixes
2016-05-05 11:49:46 -06:00
David Garske
726703e903 Added details on RTC oscillator startup delay and implemented a delay_us function. Added information about NO_INLINE and USE_SLOW_SHOW to example user_settings.h. Moved the USE_SLOW_SHA2 into the SHA512 area. 2016-05-05 09:43:11 -07:00
David Garske
5ee0659e1b Rowley Crossworks updates/fixes. Fixed issue with the RTC init for scenario where TIF is set. Added support for HW RNG only by providing reference custom_rand_generate_block. Updated kinetis_hw.c comments about serial ports on boards. Updated the stack/heap settings. Updated the user_settings.h with a well documented and configurable reference. 2016-05-04 23:11:08 -07:00
kaleb-himes
ca2f0af2e4 Make suggested changes from first review
Add changes to the example user settings noted by david

missed .dep files, exclude these as well

.dep files are necessary

rebase
2016-05-04 17:28:19 -06:00
kaleb-himes
3e19316f8a update version to 3.9.1 2016-05-04 16:45:51 -06:00
toddouska
f9f9546d0e Merge pull request #408 from cconlon/header-fix
fix aes_asm.asm header format
2016-05-04 14:38:23 -07:00
toddouska
84651e97d3 Merge pull request #405 from dgarske/memtrackdebug
Memory tracking cleanup and new debug memory option
2016-05-04 14:01:37 -07:00
kaleb-himes
41d19b49ae Remove WOLFSSL_TRACK_MEMORY 2016-05-04 14:09:45 -06:00
kaleb-himes
6e26cac686 Reworking directories and simplify README 2016-05-04 13:03:05 -07:00
David Garske
822d71431e Moved mem_track.h into wolfssl/wolfcrypt. Added new WOLFSSL_DEBUG_MEMORY option. Added documentation for using mem_track and new debug memory option. 2016-05-04 10:04:38 -07:00
toddouska
ab53d732ce Merge pull request #398 from JacobBarthelmeh/master
update to MYSQL compatibility
2016-05-04 09:10:39 -07:00
toddouska
1b5ed7fb09 Merge pull request #406 from cconlon/starttls
fix type comparison on 32bit for starttls
2016-05-04 09:06:46 -07:00
kaleb-himes
8176c74b3e Merge branch 'embOS-port' of https://github.com/wolfssl/wolfssl into embOS-port 2016-05-04 08:57:06 -07:00
Jacob Barthelmeh
197672d4fc define KEEP_OUR_CERT to set keeping ssl certificate 2016-05-04 09:05:11 -06:00
Chris Conlon
d91ec3ce77 fix aes_asm.asm header format 2016-05-04 09:02:50 -06:00
kaleb-himes
d184f8b1aa wolfSSL embOS port Initialize
self-review complete

Removed autogenerated files
2016-05-03 17:09:55 -06:00
Chris Conlon
4b16600011 fix type comparison on 32bit for starttls, zero tmp buffer 2016-05-03 13:52:04 -06:00
Jacob Barthelmeh
b2325aad6d option to keepCert for ssl lifetime, refactor of ourCert process 2016-05-03 09:22:16 -06:00
Jacob Barthelmeh
d1ab51e10f maintain lighttpd port 2016-05-03 09:22:16 -06:00
Jacob Barthelmeh
05e56b75f6 scan-build, valgrind issues and fix issue with ExtractDate, struct tm 2016-05-03 09:22:16 -06:00
Jacob Barthelmeh
38bbd41f99 add EDH-RSA-AES256-SHA, used in one mysql test 2016-05-03 09:22:16 -06:00
Jacob Barthelmeh
bd4e8ac714 cipher name string format 2016-05-03 09:22:15 -06:00
Jacob Barthelmeh
6613ebb642 persistant X509 struct with ssl session 2016-05-03 09:22:15 -06:00
Jacob Barthelmeh
f88d82375e add function wolfSSL_ASN1_TIME_to_string 2016-05-03 09:22:15 -06:00
Jacob Barthelmeh
f19541ffe5 update to MYSQL compatibility 2016-05-03 09:22:15 -06:00
John Safranek
f9ab61db5d Merge pull request #402 from cconlon/starttls
use send/recv instead of write/read with STARTTLS
2016-05-02 17:19:50 -07:00
Chris Conlon
a94383037c use send/recv instead of write/read with STARTTLS for winsock compatibility 2016-05-02 14:36:59 -06:00
toddouska
52d6fb575b Merge pull request #395 from cconlon/starttls
add STARTTLS support to example client
2016-04-29 14:24:08 -07:00
dgarske
89f15f9393 Merge pull request #400 from ejohnstown/dtls-sanity-check
Fixes DTLS sanity check and bug with DTLS timeout notification deleting the peer's received msg list.
2016-04-29 11:55:40 -07:00
John Safranek
0a1212924e Merge pull request #401 from cconlon/warning-fixes
fix visual studio code analysis warnings
2016-04-28 16:45:08 -07:00
Chris Conlon
46addfb130 move example client STARTTLS into separate funcs 2016-04-28 14:21:33 -06:00
Chris Conlon
78e62eddd7 fix visual studio code analysis warnings 2016-04-28 13:08:50 -06:00
John Safranek
2f05c96004 added braces to else clause for compiler warning differences 2016-04-28 11:33:29 -07:00
John Safranek
e0c7739fd6 fix bug with non-blocking DTLS where the stored peer messages were deleted after a timeout 2016-04-28 10:50:51 -07:00
John Safranek
0511c8cac8 delay check of DTLS handshake message's RH version until the handshake header check 2016-04-28 10:50:51 -07:00
John Safranek
7123b080ed fix issue with missing client key exchange and duplicate change cipher spec messages. 2016-04-28 10:50:51 -07:00
toddouska
a54b0f9d0c Merge pull request #397 from lchristina26/master
VxWorks updates: add pthreads define
2016-04-26 18:17:56 -07:00
Kaleb Himes
b2af02a783 Merge pull request #383 from kojo1/MDK5
fixes for MDK5 compiler
2016-04-26 16:11:59 -06:00
lchristina26
8f8f4129fd VxWorks updates: add pthreads define 2016-04-26 09:36:01 -06:00
toddouska
cc56e1da48 Merge pull request #393 from JacobBarthelmeh/RSA-min
use short for RSA min key size and check casts
2016-04-22 13:56:59 -07:00
Chris Conlon
5abeeff919 add STARTTLS support to example client 2016-04-22 13:46:54 -06:00
Jacob Barthelmeh
77a9343973 use short for RSA min key size and check casts 2016-04-22 12:56:51 -06:00
toddouska
1e821dbd59 Merge pull request #394 from cconlon/sigalgo
Omit NULL parameter in AlgorithmIdentifier encoding for ECDSA OIDs
2016-04-22 11:37:17 -07:00
toddouska
70aa4a99a0 Merge pull request #390 from JacobBarthelmeh/ECC-min
minimum ECC key size check at TLS/SSL level
2016-04-22 11:33:43 -07:00
Chris Conlon
27814ca1df omit NULL AlgorithmIdentifier parameter for ECDSA algoOID types in SetAlgoID 2016-04-21 14:32:28 -06:00
Jacob Barthelmeh
1dac3841ca change type to short for comparision and up default min size 2016-04-20 15:44:45 -06:00
toddouska
86cbabf035 Merge pull request #392 from wolfSSL/aesni-update
AES-NI Update
2016-04-20 14:27:52 -07:00
dgarske
ee8ec1fb1d Merge pull request #391 from JacobBarthelmeh/master
update oid value for secp160r1
2016-04-20 09:02:50 -07:00
Jacob Barthelmeh
659d6c0689 update oid value for secp160r1 2016-04-19 17:01:39 -06:00
Jacob Barthelmeh
3129bb22cd minimum ECC key size check at TLS/SSL level 2016-04-19 15:50:25 -06:00
dgarske
73c830a576 Merge pull request #388 from JacobBarthelmeh/master
fix NID name in openssl compatibility
2016-04-19 13:57:33 -07:00
toddouska
117231c0e3 Merge pull request #387 from JacobBarthelmeh/RSA-min
add check for min RSA key size at TLS/SSL level
2016-04-19 13:57:26 -07:00
Jacob Barthelmeh
e0a9b365cc fix NID name in openssl compatibility 2016-04-19 13:17:32 -06:00
Jacob Barthelmeh
789f346c5f follow verifyNone variable when checking key size 2016-04-19 10:23:01 -06:00
Jacob Barthelmeh
0eb57ccab0 set return error before jumping to end of function 2016-04-18 14:27:34 -06:00
toddouska
0dbdc8eab0 Merge pull request #372 from dgarske/mingwfixes
MinGW fixes
2016-04-18 12:50:13 -07:00
Jacob Barthelmeh
09e4e13958 update comment about MinGW 2016-04-18 12:14:47 -06:00
Jacob Barthelmeh
e15aca4189 static and shared library with MinGW 2016-04-15 16:04:15 -06:00
Kaleb Himes
3ce01192ac Merge pull request #384 from tisb-vikram/master
enable aesgcm and alpn support in TI-RTOS/WolfSSL configuration
2016-04-15 14:56:56 -06:00
toddouska
72bfc2aa09 Merge pull request #382 from JacobBarthelmeh/master
build with asn disabled and opensslextra enabled
2016-04-15 10:12:52 -07:00
toddouska
8cf57845ff Merge pull request #386 from JacobBarthelmeh/RSA-fix
fix check on RSA key size
2016-04-14 17:53:26 -07:00
Jacob Barthelmeh
1e766b23cf check return value of ping.test 2016-04-14 14:42:01 -06:00
Jacob Barthelmeh
c9891567e8 add check for min RSA key size at TLS/SSL level 2016-04-14 13:35:49 -06:00
John Safranek
4506839c6d back out last commit. it was a pain to use. 2016-04-14 11:57:42 -07:00
John Safranek
526606e42f added conditional assembly for the intel-format AES_NI decrypt procedures 2016-04-14 11:30:10 -07:00
John Safranek
5340ea0d79 fixed a missing operand swap in the AES-CBC decrypt by 6 2016-04-14 10:47:14 -07:00
Jacob Barthelmeh
f998851642 fix check on RSA key size 2016-04-14 09:33:25 -06:00
Takashi Kojo
cab1ebf2d6 move MDK5 current_time to test.h 2016-04-14 18:47:16 +09:00
Takashi Kojo
98dffc070a current_time in test.h 2016-04-14 18:32:33 +09:00
Takashi Kojo
35c5353698 fixed current_time argument 2016-04-14 16:26:51 +09:00
John Safranek
6f51c2a8f8 1. Fix bad opcode mnemonics in the intel-format source listing.
2. Update the aes.c file to call both format assembly routines the same
way.
2016-04-13 16:42:58 -07:00
John Safranek
c34944e389 added intel-format translations of new att-format AES-NI decrypt routines 2016-04-13 16:02:18 -07:00
John Safranek
9781fa3dc9 relabel jump points in new code with D (decrypt) mnemonics rather than E (encrypt) 2016-04-13 15:51:19 -07:00
toddouska
d0717c7b76 Merge pull request #385 from cconlon/freertos-fix
Fix typo in FREERTOS_TCP settings.h
2016-04-13 13:28:04 -07:00
John Safranek
57fce85531 modify AES-CBC with AESNI test to check all key sizes for each message size checked 2016-04-13 12:18:59 -07:00
John Safranek
13f002f186 only compile in the AES-CBC decrypt-by-size variant selected by define, default by 8 blocks at a time 2016-04-13 12:00:53 -07:00
John Safranek
451fd878f9 touching whitespace in assembly routines being touched right now 2016-04-13 11:48:25 -07:00
Chris Conlon
d5df119c65 fix typo in FREERTOS_TCP settings.h 2016-04-12 15:03:34 -06:00
Vikram Adiga
c7ad33e5d4 enable aesgcm and alpn support in TI-RTOS/WolfSSL configuration
These macros enable the AES GCM cipher suites and application layer
protocol negotiation in the TLS layer. Adding these macros would
allow connecting to websites with higher security requirements and
also support newer web technologies like HTTP/2 but the drawback is
that they add ~2K increase in memory footprint. Applications not
requiring these features can comment the macros and rebuild the
library to get smaller footprint.

Signed-off-by: Vikram Adiga <vikram.adiga@ti.com>
2016-04-12 12:25:32 -07:00
John Safranek
8524afc56a 1. Rename routine AES_CBC_decrypt_ex as AES_CBC_decrypt_by8
2. Added routine AES_CBC_decrypt_by6 that does six at a time.
3. Setting HAVE_AES_DECRYPT_BY6 or _BY8 (or not setting it) selects
   the 6, 8, or 4 way version of the assembly routine.
4. Modified AES-NI decrypt test to loop checking against the test
   bolus from 1 AES block to the whole 24 blocks.
2016-04-12 10:10:55 -07:00
Takashi Kojo
cfd5af341b fixed test.c compile error and server.c/client.c/ssl.c warnings with MDK5 compiler. 2016-04-12 11:05:30 +09:00
JacobBarthelmeh
4d38813b0c Merge pull request #381 from kaleb-himes/scan-build-psk
scan-build warnings related to enable-psk, disable-asn,rsa,ecc
2016-04-11 14:52:38 -06:00
kaleb-himes
1b7cd5cb06 consolidate handling of dead assignment warnings 2016-04-11 13:39:44 -06:00
Jacob Barthelmeh
23ab4247ea build with asn disabled and opensslextra enabled 2016-04-11 11:56:30 -06:00
kaleb-himes
c6e9021732 scan-build warnings related to enable-psk, disable-asn,rsa,ecc 2016-04-11 11:13:26 -06:00
toddouska
85505b99b9 Merge pull request #380 from cconlon/utasker
uTasker Port
2016-04-08 15:08:39 -07:00
Chris Conlon
7a0f8672e7 Merge pull request #375 from dgarske/stm32hashfixes
Fixes when using the STM32 with STM32F2_HASH defined.
2016-04-08 15:04:46 -06:00
John Safranek
698b1cc7dc update benchmark to show AES-CBC decrypt speed 2016-04-08 13:33:41 -07:00
John Safranek
b75dc127f3 1. Attempting to perform 8 AES-CBC decrypt operations simultaneously.
2. Added code to test large AES-CBC decrypts.
2016-04-08 11:53:40 -07:00
toddouska
c6e4fb8cf8 Merge pull request #378 from JacobBarthelmeh/Testing
autoconf checks on some builds that break, macro for no server, and u…
2016-04-08 11:01:46 -07:00
David Garske
993972162e MinGW fixes, server port assigning cleanup and ping test cleanup. Fixes issue with visibility detection with MinGW. The visibility.m4 script was not actually trying to call the hidden function, which caused MinGW to detect improperly that visibility was supported. Fix for bogusFile on Windows build. Fixes to build warnings for unused variable 'res' and signed/unsigned comparison for sizeof min(). Cleanup of the server side port assignment to allow use with Windows/MinGW/Cygwin. If Windows uses new GetRandomPort() function in test.h to get port in in the 49152 - 65535 range. If *nix then uses the tcp_listen returned port. Otherwise uses the default wolfSSLPort. Refactor of the ping test code to use common file and properly handle ping count differences (Windows "-c" vs. *Nix style "-n"). Workaround for MinGW and cyassl/options.h getting file permissions error. Added non-fatal compile warning if using MinGW that "strtok_s" might be missing along with a link to public domain source that can be used. 2016-04-08 11:48:14 -06:00
David Garske
2aab090c8b Fixes when using the STM32 with STM32F2_HASH defined. 2016-04-08 11:39:15 -06:00
Chris Conlon
46f4be357b uTasker: add note about XTIME to settings.h 2016-04-08 11:20:58 -06:00
Chris Conlon
8d040ad41f uTasker: add initial port, WOLFSSL_UTASKER 2016-04-08 11:12:17 -06:00
toddouska
255d9ecfb3 Merge pull request #377 from JacobBarthelmeh/master
add wc_EccPublicKeyToDer function
2016-04-07 12:20:05 -07:00
Jacob Barthelmeh
5b4f17545b autoconf checks on some builds that break, macro for no server, and user rsa 2016-04-06 15:36:50 -06:00
Jacob Barthelmeh
665fb3076c add trailing zero enum and correct call for export key size 2016-04-06 15:15:56 -06:00
Jacob Barthelmeh
4f8fffbc37 add wc_EccPublicKeyToDer function 2016-04-06 15:15:56 -06:00
Kaleb Himes
a0cd888fbf Merge pull request #379 from JacobBarthelmeh/PSK
fix c89 build on windows
2016-04-06 14:02:55 -07:00
Jacob Barthelmeh
85a9c55048 fix c89 build on windows 2016-04-06 11:16:40 -06:00
toddouska
9f86a91dbd Merge pull request #374 from dgarske/asyncfixes
Fix build issues with new async changes
2016-04-01 16:04:08 -07:00
toddouska
29194bd977 Merge pull request #371 from cconlon/sniffer-fix
Extra cleanup in sniffer.c with ForceZero
2016-04-01 13:39:29 -07:00
David Garske
2d4aa1bbb5 Better fix for scan-build warning regarding possible use of NULL in AddRecordHeader. Scan-build considers paths where output is set to NULL, but ssl->spec.kea is corrupted/changed, which could result in output == NULL (even though it should never happen). So added proper NULL check in SendServerKeyExchange on AddHeader to make sure output isn't NULL. 2016-04-01 12:57:33 -07:00
David Garske
19f0769ec4 Fix for scan-build warning where async changes make it appear like the output buffer could be NULL (even though its not). Added NULL check on the AddRecordHeader function. 2016-04-01 10:55:01 -07:00
David Garske
dd28d53cfb Fix build issues with new async changes. Fixed issue with unused args preSigSz and preSigIdx with PSK enabled and ECC + RSA disabled. Fixed issue with missing qsSz variable in DoClientKeyExchange. Fixed missing DhAgree and DhKeyGen with NO_CERTS and PSK enabled. Fixed a couple scan-build warnings with "Value stored to '' is never read". 2016-04-01 09:23:46 -07:00
Chris Conlon
2939c3ace1 add ssl_FreeZeroDecode() to sniffer.c 2016-03-31 13:25:39 -06:00
toddouska
63b1282e67 Merge pull request #335 from dgarske/asynccrypt
Asynchronous crypto and wolf event support
2016-03-30 20:12:41 -07:00
David Garske
4472152b18 Added new "wolfSSL_poll" which filters event queue by ssl object pointer. Changed wolfSSL_CTX_poll to support using WOLF_POLL_FLAG_PEEK flag to peek at events and return count. Removed "wolfssl_CTX_poll_peek". Switched the examples (test.h AsyncCryptPoll) to use just the WOLFSSL object and call new wolfSSL_poll. Added warning when using the "--enable-asynccrypt" option to make sure users know they need real async.c/.h files. 2016-03-30 15:15:38 -07:00
toddouska
6e5b23e102 Merge pull request #370 from dgarske/stm_aes_gcm_ccm
Enhancement to the STM32F2_CRYPTO port to support AES GCM, AES CCM an…
2016-03-30 13:39:35 -07:00
Chris Conlon
ec9f10d74f extra cleanup in sniffer.c with ForceZero 2016-03-30 10:52:27 -06:00
toddouska
d30f410768 Merge pull request #368 from JacobBarthelmeh/master
Check for compile of misc.c and fix disable inline
2016-03-29 17:26:55 -07:00
toddouska
49e117ebb5 Merge pull request #369 from JacobBarthelmeh/Testing
if using inline do not compile misc.c in iOS XCode builds
2016-03-29 14:41:20 -07:00
Jacob Barthelmeh
e60adfc9da better naming of macro and alter misc.c check 2016-03-29 13:42:40 -06:00
Jacob Barthelmeh
2437e97d70 if using inline do not compile misc.c in iOS XCode builds 2016-03-28 17:33:38 -06:00
JacobBarthelmeh
2733f0a7ca Merge pull request #309 from coletiv/add-tvos-target
Add tvos target to the xcode project
2016-03-28 17:29:32 -06:00
Jacob Barthelmeh
7e90e2e540 misc.c compile warning accounts for FIPS 2016-03-28 17:22:39 -06:00
Jacob Barthelmeh
2665db73a4 check for compiling misc.c when not needed 2016-03-28 16:03:15 -06:00
Jacob Barthelmeh
79a212da8d fix disable inline build 2016-03-28 14:24:12 -06:00
John Safranek
59a84b40c7 Merge pull request #364 from toddouska/ecc-test-free
Fixes to cleanup unnecessary ECC make key, check key and free in ECC vector item test.
2016-03-28 13:15:20 -07:00
toddouska
137f477277 Merge pull request #363 from JacobBarthelmeh/master
sanity check on ssl pased to wolfSSL_set_fd
2016-03-28 11:47:22 -07:00
David Garske
03765ecca7 Fixes to cleanup unnecessary ECC make key, check key and free in ECC vector item test. 2016-03-25 13:22:31 -07:00
Jacob Barthelmeh
67b4d2e2f4 case where memory is exhausted before ctx copied to ssl 2016-03-25 14:19:51 -06:00
Jacob Barthelmeh
696169634e check return value of wolfSSL_set_fd 2016-03-25 13:59:04 -06:00
John Safranek
190d30f336 Merge pull request #362 from dgarske/bench_rng
Added benchmark for the RNG.
2016-03-25 12:12:20 -07:00
toddouska
1649af37be fix ecc curve test in normal math mode, free is needed 2016-03-25 11:33:35 -07:00
Jacob Barthelmeh
57ea1cdcd7 sanity check on ssl pased to wolfSSL_set_fd 2016-03-25 11:32:53 -06:00
David Garske
5569dfe838 Fix with FIPS build and RNG_MAX_BLOCK_LEN define location. 2016-03-25 08:56:11 -07:00
David Garske
f539a60a40 Adjusted the RNG benchmark to split into smaller requests of max allowed RNG size. 2016-03-25 06:59:35 -07:00
David Garske
27e041246f Added benchmark for the RNG. 2016-03-24 08:42:19 -07:00
toddouska
855e42b66a Merge pull request #359 from cconlon/ecc-comment
Fix wc_ecc_import_raw() comment
2016-03-24 08:21:42 -07:00
David Garske
3796fc1322 Enhancement to the STM32F2_CRYPTO port to support AES GCM, AES CCM and AES-Direct (for encrypt only) using combination of software and AES HW acceleration. 2016-03-24 07:08:42 -07:00
toddouska
3509ff0c73 Merge pull request #358 from JacobBarthelmeh/master
fix free of WOLFSSL_METHOD pointer on create ctx fail
2016-03-23 15:35:16 -07:00
Chris Conlon
20285bec01 fix wc_ecc_import_raw comment, public key instead of base point 2016-03-23 15:33:53 -06:00
Jacob Barthelmeh
8f8f7ac152 remove unecessary XFREE 2016-03-23 13:40:45 -06:00
toddouska
2dfc7faa73 Merge pull request #355 from dgarske/EccTestCleanup
wolfCrypt ECC test improvements and code cleanup
2016-03-23 12:18:42 -07:00
toddouska
18961e5620 Merge pull request #351 from dgarske/ChaChaRefactor
Refactor of the ChaCha hard coded variables
2016-03-23 12:17:23 -07:00
Jacob Barthelmeh
620e4fa5ca fix free of WOLFSSL_METHOD pointer on create ctx fail 2016-03-23 09:27:27 -06:00
John Safranek
d8fb4b6ee7 Merge pull request #352 from dgarske/DRBGSmallStack
Fix to reduce stack usage in the hash-based random number generator h…
2016-03-21 12:20:48 -07:00
David Garske
0fc5575b8b Fixed typo with WOLFSSL_VALIDATE_ECC_IMPORT defined. Disable ECC-224 bit compressed key test since it isn't working. Cleanup in accel_fp_mul for KB_SIZE. 2016-03-18 15:41:03 -07:00
David Garske
71683e23e9 Resolve 2nd unused "typeH" warning. 2016-03-18 06:27:42 -07:00
toddouska
51a911c727 Merge pull request #354 from JacobBarthelmeh/master
prepare for release v3.9.0
2016-03-17 16:10:18 -07:00
David Garske
0e43fca1f3 Resolve unused "typeH" warning. 2016-03-17 15:56:51 -07:00
David Garske
369930238a Cleanup of the ecc_test functions to break areas into separate functions providing WC_RNG and key size. Added ECC tests by key size for all enabled curves. Added actual key size on wc_ecc_make_key for the NIST test vectors. Added ECC testing of wc_ecc_verify_hash with digests having 0's and sequence (1,2,3,...) and made sure it runs verify twice. 2016-03-17 15:31:45 -07:00
Jacob Barthelmeh
e99a5b0483 prepare for release v3.9.0 2016-03-17 16:02:13 -06:00
David Garske
e1787fe160 Added "--enable-asynccrypt" option for enabling asynchronous crypto. This includes a refactor of SendServerKeyExchange and DoClientKeyExchange to support WC_PENDING_E on key generation, signing and verification. Currently uses async simulator (WOLFSSL_ASYNC_CRYPT_TEST) if cavium not enabled. All of the examples have been updated to support WC_PENDING_E on accept and connect. A generic WOLF_EVENT infrastructure has been added to support other types of future events and is enabled using "HAVE_WOLF_EVENT". Refactor the ASN OID type (ex: hashType/sigType) to use a more unique name. The real "async.c" and "async.h" files are in a private repo. 2016-03-17 13:31:03 -07:00
toddouska
10e74f7200 Merge pull request #353 from dgarske/EccUnsignedSizeCheckFix
Fixed bug where mp_unsigned_bin_size returning 0 could produce a UINT…
2016-03-17 10:50:01 -07:00
David Garske
19967dd264 Fixed bug where mp_unsigned_bin_size returning 0 could produce a UINT_MAX (based on -1) resulting in invalid index to an array. Added test case for this if FP_ECC is defined. 2016-03-17 09:39:10 -07:00
David Garske
bda69decc1 Fix to reduce stack usage in the hash-based random number generator health tests when WOLFSSL_SMALL_STACK is defined. 2016-03-16 17:04:07 -07:00
toddouska
46a01c29d8 Merge pull request #350 from JacobBarthelmeh/master
check for invalid RSA OAEP with SHA512 test case
2016-03-16 16:25:13 -07:00
Jacob Barthelmeh
2dd5efd969 sanity check for RSA key size and hash digest size 2016-03-16 15:25:52 -06:00
Jacob Barthelmeh
4c3ddac23c catch invalid test case of RSA-OAEP and fix cast 2016-03-16 14:51:25 -06:00
David Garske
473ea567bd Refactor of the ChaCha hard coded variables. 2016-03-16 13:36:44 -07:00
toddouska
7722c4484a Merge pull request #349 from dgarske/CobiPort
Port for Nordic nRF51 RNG, RTC and AES. Added RNG test for wc_RNG_Gen…
2016-03-16 13:36:27 -07:00
David Garske
0683ecb727 Fixed FreeCRL issue with strdup memory. Added additional checks for WOLF_AES_CBC and WOLF_AES_COUNTER. Disabled memory tracker by default for wolfCrypt test and benchmark. Updated README to better document Linux Binutils LD bug workaround. 2016-03-16 09:41:19 -07:00
David Garske
f0ea9d747f Fix possible positive return value for random_rng_test. Removed reference to nrf51_aes_decrypt, which is not supported, and added compile error for it. Corrected ecc_test_raw_vector return code checking. Cleanup in InitMemoryTracker. 2016-03-15 18:33:24 -07:00
David Garske
bf058ef1b9 Fixed Jenkins error reports for mem_track msg, incorrect #ifdef in aes_test and ecc_test_raw_vector response code checking. Fixed C89 compliance with wc_AesSetKey. Fixed nrf_drv_rng_init response checks in RNG code. Reverted comment change in AES. Fixed nRF51 AES CBC Encrypt support. Added response code checking for nrf51_aes_set_key. 2016-03-15 17:18:03 -07:00
David Garske
a38183b816 Port for Nordic nRF51 RNG, RTC and AES. Added RNG test for wc_RNG_GenerateBlock 0's check even if HAVE_HASHDRBG is enabled. Added NIST test vectors for ECC P-256, P-384 and P-521. Added helpful debug message in ECC import if issue finding ecc_sets[] for curve. Moved memory tracker into separate file and added support for it to wolfcrypt test and benchmark. Added Ed255519/Curve25519 options for granular control of sign, verify, shared secret, import and export. Added AES options for max key size (AES_MAX_KEY_SIZE), no decrypt (NO_AES_DECRYPT) and no CBC (NO_AES_CBC). 2016-03-15 13:58:51 -07:00
toddouska
47491e6c22 Merge pull request #332 from JacobBarthelmeh/Certs
Certs
2016-03-14 13:24:03 -07:00
Jacob Barthelmeh
db758dc98b update test script, fall back to cert name search, fix der free 2016-03-12 09:37:32 -07:00
Jacob Barthelmeh
060e278559 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into Certs 2016-03-11 23:48:39 -07:00
JacobBarthelmeh
154f027c54 Merge pull request #347 from dgarske/ScanBuildFix214
Address scan-build issue on build #214 after DerBuffer refactor part 2
2016-03-11 16:53:41 -07:00
David Garske
81b0ccdb1a Address scan-build issue on build #214 after DerBuffer refactor part 2 (ceafb25). 2016-03-11 09:39:13 -08:00
dgarske
98f40fa132 Merge pull request #345 from moisesguimaraes/remove_unnecessary_condition
remove unnecessary condition
2016-03-11 09:27:22 -08:00
Moisés Guimarães
2e1c1ca7f8 remove unnecessary condition 2016-03-10 23:07:36 -03:00
dgarske
0171aefc65 Merge pull request #344 from JacobBarthelmeh/master
K64F RNGA register
2016-03-10 16:05:19 -08:00
toddouska
1bd7de46bb Merge pull request #342 from dgarske/JenkinsFixes20160310
Fixes multiple Jenkins warnings/failures
2016-03-10 14:19:47 -08:00
Jacob Barthelmeh
3976a3e2f2 K64F RNGA register 2016-03-10 14:35:55 -07:00
David Garske
80aa431689 Fixes multiple Jenkins warnings/failures. First is PickHashSigAlgo is required for client builds or if certs are enabled. Fixed scan-build warning with OCSP not recognized ForceZero as cleaning memory and using possible garbage value. Also cleaned up the OCSP functions to use struct buffer* instead of void* for clarity with a little forward declaration. 2016-03-10 09:38:11 -08:00
toddouska
1435a6ce92 Merge pull request #341 from JacobBarthelmeh/master
SEP and CERTEXT, QSH debug
2016-03-10 09:36:25 -08:00
Kaleb Joseph Himes
0a1871e77c Merge pull request #337 from dgarske/WarnDoubleFree
Fixes scan-build warning with "--enable-opensslextra --disable-memory"
2016-03-09 16:28:18 -08:00
Jacob Barthelmeh
6e1c5b3801 disable CERT_EXT policies check when SEP is used instead 2016-03-09 17:22:38 -07:00
Jacob Barthelmeh
49b547db08 make QSH debug compile for C89 2016-03-09 17:15:28 -07:00
toddouska
ceafb25f49 Merge pull request #338 from dgarske/DerBufferRefactor2
Refactor of DerBuffer, so WOLFSSL object doesn't have to grow as a re…
2016-03-09 12:36:22 -08:00
toddouska
2f060dd860 Merge pull request #312 from dgarske/LeanTls
New LeanTLS configure option
2016-03-09 10:13:00 -08:00
David Garske
f17dfa5b03 Moved the x509 XFREE to outside the FreeX509 function. Internally FreeX509 is only used in two places. One is for the ssl->peerCert, which is not dynamic anyways. The second is in the ExternalFreeX509 where it calls FreeX509 if its dynamic and will XFREE there. 2016-03-09 09:15:00 -08:00
David Garske
c863300805 Fixed scan-build error with possibly using a NULL pointer. 2016-03-08 09:34:56 -08:00
David Garske
0f93b86b61 Fixes for PK_CALLBACKS and sniffer after DerBuffer refactor #2. 2016-03-08 08:56:14 -08:00
David Garske
ce9f14f713 Refactor of DerBuffer, so WOLFSSL object doesn't have to grow as a result of additional functionality. Removed InitDer. Changed all DerBuffers to use pointer and pass pointer to DerBuffer* to AllocDer and FreeDer. Result is more efficient code and reduced WOLFSSL object size. AllocDer uses first part of the allocated buffer for the actual DerBuffer. 2016-03-08 08:56:14 -08:00
David Garske
daa1cd634e Fixes scan-build warning with "--enable-opensslextra --disable-memory". Problem was different #if defines on the InitX509 and FreeX509, which caused the static analyzer to think the "x509->dynamicMemory" was always true. 2016-03-08 08:38:02 -08:00
David Garske
0ed26ad262 Updated build for "leantls" to support building only the client, by splitting BUILD_EXAMPLES into 3 parts (BUILD_EXAPLE_SERVERS, BUILD_EXAMPLE_CLIENTS and BUILD_TESTS). This allows the make check to perform the external tests to validate the client only "leantls" configuration option. 2016-03-08 08:35:28 -08:00
David Garske
2891939098 Remove NO_CERT and NO_CODING. Enable building of the client with leantls. 2016-03-08 08:35:28 -08:00
David Garske
8e8ee45828 LeanTLS: Fixed issue with GetCA, GetCAByName and PickHashSigAlgo with HAVE_ECC, NO_RSA and NO_CERTS defined. Added new "--enable-leantls" option, which enables TLS 1.2 client only with ECC256, AES128 and SHA256 (no RSA, DH, DSA, MD4, MD5, SHA, PSK, PWD, CERTS, DES3, Error Strings, ARC4, Coding, Memory or File System). 2016-03-08 08:35:28 -08:00
JacobBarthelmeh
375d85fe9a Merge pull request #336 from dgarske/ASNCertPolicyExtFix
Fixed bug with ASN.1 X509V3 Certificate Policy extension parsing
2016-03-08 08:59:24 -07:00
David Garske
b549c81337 Fix the WOLFSSL_SEP (--enable-sep) build scenario where extCertPoliciesNb is not available. 2016-03-07 14:49:24 -08:00
David Garske
05fb648747 Remove white-space. 2016-03-07 14:33:22 -08:00
David Garske
9b79d8643e Added checks for total length and the cert policy OID len to make sure they don't exceed buffer. 2016-03-07 14:20:37 -08:00
David Garske
dee3645c4e Fixed bug with ASN.1 X509V3 Certificate Policy extension parsing. Bug had to do with parsing when OID contains multiple items such as example 2 below. The wolfssl.com server key now contains a URL in the certificate policy "https://secure.comodo.com/CPS0", which wasn't being parsed over correctly. Also cleanup to use loop instead of duplicate code.
Example 1:
30 12
30 06 06 04 55 1D 20 00
30 08 06 06 67 81 0C 01 02 01

Result:
2.5.29.32.0
2.23.140.1.2.1

Example 2:
30 46
30 3A 06 0B 2B 06 01 04 01 B2 31 01 02 02 07
   30 2B 30 29 06 08 2B 06 01 05 05 07 02 01 16 1D 68 74 74 70 73 3A 2F 2F 73 65 63 75 72 65 2E 63 6F 6D 6F 64 6F 2E 63 6F 6D 2F 43 50 53
30 08 06 06 67 81 0C 01 02 01

Result:
1.3.6.1.4.1.6449.1.2.2.7
2.23.140.1.2.1
2016-03-07 13:40:25 -08:00
dgarske
98a72a3f9d Merge pull request #334 from JacobBarthelmeh/master
update wolfssl-ntru vs project and fix warnings
2016-03-03 15:53:52 -08:00
dgarske
8ca1c3935d Merge pull request #322 from ejohnstown/dtls-handshake
DTLS Handshake Update
2016-03-03 14:33:31 -08:00
Jacob Barthelmeh
c98c457b9b update wolfssl-ntru vs project and fix warnings 2016-03-03 14:35:39 -07:00
dgarske
b9ecd9474c Merge pull request #330 from kaleb-himes/CID-66007-coverity
avoid dereference of null pointer if args is null
2016-03-02 18:22:07 -08:00
Jacob Barthelmeh
112cf1f0c9 fix example client help print out 2016-03-02 16:51:57 -07:00
kaleb-himes
7a599c1309 Account for not used case 2016-03-02 16:31:58 -07:00
dgarske
a0f1e1e3ea Merge pull request #331 from kaleb-himes/CID-66006-coverity
Move assignment to after the null check
2016-03-02 15:23:58 -08:00
Jacob Barthelmeh
aab44eb26b adjest example server PSK plus flag 2016-03-02 15:43:17 -07:00
Jacob Barthelmeh
267dc48d95 fixs after testing : hash table, using NO_SKID, sanity check, and freeing dCert 2016-03-02 15:23:50 -07:00
Jacob Barthelmeh
d969e2ba11 automated test for trusted peer certs 2016-03-02 11:42:00 -07:00
kaleb-himes
85215cc174 clean up braces left over from local declaration of ready 2016-03-02 11:39:34 -07:00
Jacob Barthelmeh
05d2cec7c1 addition to api tests and refactor location of trusted peer cert check 2016-03-02 11:35:03 -07:00
kaleb-himes
01cd43c319 Seperate declaration and assignment per c99 standards 2016-03-02 11:31:08 -07:00
Jacob Barthelmeh
7df22ee210 Trusted peer certificate use 2016-03-02 11:22:34 -07:00
kaleb-himes
1f4ddb20df Move assignment to after the null check 2016-03-01 17:00:27 -07:00
kaleb-himes
d15dac04b8 remove unnecessary NULL assignment 2016-03-01 16:33:47 -07:00
kaleb-himes
d473452769 avoid dereference of null pointer if args is null 2016-03-01 16:21:03 -07:00
Kaleb Joseph Himes
7c63ac4f6a Merge pull request #329 from dgarske/BuildErrDerBuf
Fixes build error with new DerBuffer with ASN, ECC and RSA disabled.
2016-02-26 08:44:30 -08:00
David Garske
79ef8e232b Fixes build error with new DerBuffer with ASN, ECC and RSA disabled. 2016-02-26 15:39:30 +01:00
toddouska
0c45a7a028 Merge pull request #317 from dgarske/DerBufferRefactor
Refactor of the DER buffer handling
2016-02-25 09:35:50 -08:00
David Garske
a46fd6612b Changed CopyDecodedToX509 AllocDer error code handing to return MEMORY_E, since that is an explicitly handled case. Also resolves the issue with "warning: Value stored to 'ret' is never read". 2016-02-25 14:35:54 +01:00
dgarske
f549f71912 Merge pull request #325 from kaleb-himes/CID-66016-coverity
Always execute wc_InitRsaKey if we are always going to execute wc_Fre…
2016-02-25 08:45:06 +01:00
dgarske
f0b1d2fd9d Merge pull request #324 from JacobBarthelmeh/master
argument peer can be NULL when macro INADDR_ANY is NULL
2016-02-25 08:40:37 +01:00
John Safranek
aa7eae3294 Merge pull request #320 from moisesguimaraes/fix-ocsp-dependency-check
fixes ocsp dependency check on asn during configure.
2016-02-24 16:21:51 -08:00
kaleb-himes
16dac5597f prevent buffer overflows if sigSz > MAX_ENCODED_SIG_SZ 2016-02-24 16:08:54 -07:00
Moisés Guimarães
fb9697bda6 adds check for missing rsa and ecc at the same time 2016-02-24 18:57:16 -03:00
kaleb-himes
4858a65984 Always execute wc_InitRsaKey if we are always going to execute wc_FreeRsaKey 2016-02-24 14:42:07 -07:00
Jacob Barthelmeh
6ee3c0ae59 argument peer can be NULL when macro INADDR_ANY is NULL 2016-02-24 13:55:44 -07:00
Moisés Guimarães
1824a494d1 adds missing ENABLED_OCSP test 2016-02-24 16:45:07 -03:00
toddouska
35b48250ad Merge pull request #321 from dgarske/FixCryptBenchEdCurve25519
Fixes issue with building crypt benchmark with only ED/Curve25519 ena…
2016-02-24 11:19:30 -08:00
toddouska
12bb050ec9 Merge pull request #323 from JacobBarthelmeh/master
check for RSA and ECC before testing RSA signed ECC cert
2016-02-24 09:34:37 -08:00
David Garske
1227db4e44 Fixed issue with not properly returning memory error in CopyDecodedToX509 after DER refactor. 2016-02-24 07:04:03 +01:00
Jacob Barthelmeh
dcfec3d2fa check for RSA and ECC before testing RSA signed ECC cert 2016-02-23 17:03:52 -07:00
Moisés Guimarães
143b9fda1b adds build dependency check for OCSP 2016-02-23 15:19:04 -03:00
Moisés Guimarães
a92d2d582f Revert "fixes ocsp dependency check on asn during configure."
This reverts commit 46ade8f03f.
2016-02-23 14:13:52 -03:00
John Safranek
69e00a3f97 allow dtls timeout to be 0 in the recvfrom callback, set to 0 if the handshake is done 2016-02-22 21:13:05 -08:00
John Safranek
f621f81fa2 1. Some DTLS code was missing an ifdef.
2. If receiving a handshake message that's already been processed,
    retransmit the previous message flight.
2016-02-22 14:08:35 -08:00
toddouska
8dbef9b14b Merge pull request #318 from dgarske/BuildErrorNoFileSysWCerts
Fixes build error with NO_FILESYSTEM and !NO_CERTS
2016-02-22 12:12:24 -08:00
David Garske
731e13ecf2 Fixes issue with building crypt benchmark with only ED/Curve25519 enabled with static rng missing. 2016-02-22 16:46:13 +01:00
John Safranek
f6fafe6738 for DTLS, retain the handshake resources until peer sends application data record 2016-02-21 21:52:38 -08:00
Moisés Guimarães
46ade8f03f fixes ocsp dependency check on asn during configure. 2016-02-21 20:54:45 -03:00
David Garske
953a3bd01d Fixes build error with NO_FILESYSTEM and !NO_CERTS where the wolfssl/test.h load_buffer() function is passing non-existent enum value. Was renamed from CYASSL_ to WOLFSSL_. 2016-02-19 13:52:06 -08:00
David Garske
3fe5ee1a7c Refactor of the DER buffer handling. Added new DerBuffer struct that includes the type and heap ptr. Added new InitDer, AllocDer and FreeDer functions. Cleanup of some missing "heap" args on XMALLOC/XFREE. In FreeDer uses ForceZero if type is private key. 2016-02-18 22:42:15 -08:00
dgarske
b72c83e191 Merge pull request #315 from kaleb-himes/fix-no-sha
update for configure option --disable-sha
2016-02-16 13:08:59 -08:00
toddouska
c1ef4d4521 Merge pull request #313 from kaleb-himes/master
wolfssl.com and google.com now differ in pre-reqs for external test
2016-02-16 11:05:55 -08:00
kaleb-himes
24d93c90cd update for configure option --disable-sha 2016-02-16 12:03:37 -07:00
kaleb-himes
46b34c19d0 wolfssl.com and google.com now differ in pre-reqs for external test 2016-02-15 13:30:11 -07:00
toddouska
3d8f91d418 Merge pull request #302 from dgarske/EccOnlyNoSignVerify
New ECC and ASN build options for reduce build size options
2016-02-15 12:13:43 -08:00
toddouska
d7d2a6f565 Merge pull request #307 from JacobBarthelmeh/PSK
New fail with no peer cert behavior and allow RSA signed ECC key certs
2016-02-12 15:27:18 -08:00
JacobBarthelmeh
7de352a0e9 Merge pull request #311 from dgarske/FixSkipObjectIdWarn
Fixes warning with SkipObjectId defined but not used.
2016-02-12 15:04:04 -07:00
toddouska
951fe0a927 Merge pull request #310 from dgarske/CustRngGenBlock
Added new CUSTOM_RAND_GENERATE_BLOCK option that allows override and …
2016-02-12 13:51:06 -08:00
David Garske
a969dd8efd Fixed "error: unused function 'StoreRsaKey'" with NO_ASN_TIME and RSA enabled. 2016-02-12 13:19:58 -08:00
David Garske
aeaac15682 Fixed compile errors in signature.c if ECC on but ECC sign/verify disabled. Added new NO_ASN_TIME option to reduce ASN size for space constrained or missing RTC. Added check to make sure ASN is enabled if ECC sign/verify is enabled. 2016-02-12 13:16:39 -08:00
Jacob Barthelmeh
8073024ee7 fix formatting of .conf file so ephemeral port is used 2016-02-12 13:41:30 -07:00
David Garske
f328c6bdf7 Fixes warning with SkipObjectId defined but not used. 2016-02-12 12:34:22 -08:00
David Garske
08c663a4ac Added new CUSTOM_RAND_GENERATE_BLOCK option that allows override and disabling of the HASHDRBG for customers who have a HW RNG they would like to use instead.
Examples:
"./configure --disable-hashdrbg CFLAGS="-DCUSTOM_RAND_GENERATE_BLOCK= custom_rand_generate_block".
OR
/* RNG */
//#define HAVE_HASHDRBG
extern int custom_rand_generate_block(unsigned char* output, unsigned int sz);
2016-02-12 11:59:51 -08:00
David Garske
4872f2bc33 Added the following ECC optional config defines: HAVE_ECC_SIGN, HAVE_ECC_VERIFY, HAVE_ECC_DHE, HAVE_ECC_KEY_IMPORT and HAVE_ECC_KEY_EXPORT. Still working through issues with using ECC sign/verify with ASN disabled. Added documentation to top of ecc.c for all the ECC define options. 2016-02-12 11:07:50 -08:00
Tiago Duarte
8f5cd98857 Added tvos target to the xcode project 2016-02-12 10:23:23 +01:00
Jacob Barthelmeh
3e860107f3 remove extra cert and key, plus add new test 2016-02-11 13:49:07 -07:00
Jacob Barthelmeh
1197f88c4f add psk.test script for testing 2016-02-11 09:15:04 -07:00
toddouska
09f631238e Merge pull request #306 from kaleb-himes/master
correct logic to allow for static RSA if ECC and no Curves
2016-02-10 16:47:17 -08:00
dgarske
49a5ea18e8 Merge pull request #303 from ejohnstown/sniffer-check
When loading a named key, check that the save buffer mallocs.
2016-02-10 13:19:59 -08:00
dgarske
b0a51a22a1 Merge pull request #304 from cconlon/testh-fix
Check build_addr() arguments for NULL
2016-02-10 13:19:28 -08:00
David Garske
a83ff6aada Updated the configure.ac comments about big int being used for ECC and DH. Moved the checks for ecc/asn and psk/asn until after cryptonly value is set and fixed so those checks work for normal build and are excluded for crypt only builds. 2016-02-10 13:03:53 -08:00
Jacob Barthelmeh
9defe9b42b fix warning of unused variable and adjust debug statements 2016-02-10 13:57:10 -07:00
kaleb-himes
ffe7b38409 correct logic to allow for static RSA if ECC and no Curves
use same coding standards as the rest of the libraries
2016-02-10 13:39:59 -07:00
Jacob Barthelmeh
69fc400d28 add new certs to EXTRA_DIST 2016-02-10 13:26:03 -07:00
Jacob Barthelmeh
2f74706367 allow use of RSA signed ECC key certs 2016-02-10 13:26:03 -07:00
Jacob Barthelmeh
ff7a9d9f78 option for fail on no peer cert except PSK suites 2016-02-10 13:26:03 -07:00
Chris Conlon
3293857834 check build_addr() arguments for NULL before memset 2016-02-10 10:35:48 -07:00
David Garske
8d0d5a3f90 Fixes so ECC only build works. Fixes so ECC enabled with ASN disabled works and will prevent ECC sign/verify. 2016-02-10 08:53:09 -08:00
dgarske
9a5938432b Merge pull request #301 from kaleb-himes/master
if connecting to google.com and using ECC need supported curves
2016-02-10 08:42:28 -08:00
kaleb-himes
bf4d6454b1 if connection to google.com and using ECC need supported curves 2016-02-09 17:06:06 -07:00
John Safranek
ccffee1617 When loading a named key, check that the save buffer mallocs. It calls a library function that checks the pointer, but an application of the library shouldn't depend on side effects. This fixes #300. 2016-02-09 15:17:05 -08:00
Kaleb Joseph Himes
62a2efdacc Merge pull request #298 from kaleb-himes/master
Avoid unnecessary assignments in client example
2016-02-09 09:54:55 -08:00
toddouska
f30ef33d8b Merge pull request #295 from JacobBarthelmeh/master
ECDHE-PSK and added cipher suites
2016-02-09 09:40:13 -08:00
toddouska
66aa1da829 Merge pull request #299 from dgarske/MinGWFixes
Fixes for warnings found using MinGW
2016-02-09 09:32:18 -08:00
Kaleb Joseph Himes
2e88785358 Merge pull request #282 from dgarske/WinUserSettings
Refactor of Visual Studio projects to centralize preprocessors into IDE/WIN/user_settings.h
2016-02-09 09:27:32 -08:00
toddouska
014740eda0 Merge pull request #289 from dgarske/SigHashFixes
Fixes/improvements to the signature and hash wrappers:
2016-02-09 09:23:18 -08:00
David Garske
2af9fb91b3 Use += approach to detect "done" in example client for external tests. Cleaner and code is smaller to accomplish same thing. 2016-02-08 19:54:22 -08:00
David Garske
4ea76b8ac8 Fixes for warnings found using MinGW. Fixes for WOLFSSL_SOCKET_IS_INVALID and WOLFSSL_SOCKET_INVALID to use the SOCKET_T. 2016-02-08 15:44:22 -08:00
Jacob Barthelmeh
53162d5fc4 addjust size according to offset length and add PMS size comment 2016-02-08 15:22:49 -07:00
JacobBarthelmeh
f6bebc1cf4 Merge pull request #297 from dgarske/RemoveExeBitOnCFiles
Removed the execute bit on all .c files
2016-02-08 14:22:05 -07:00
David Garske
2e0d05f727 Fixes issues with new IDE/WIN/user_settings.h and FIPS. Fixed issue with using CYASSL_USER_SETTINGS in ctaocrypt/settings.h with FIPS by moving settings_comp.h to after user_settings.h. Fixed issue with non-existent ctaocrypt/signature.c file being included. Added the user_settings.h file to the FIPS project. 2016-02-08 12:22:20 -08:00
David Garske
09615c01cc Updated the naming for the new encoding DER signature enum and function. 2016-02-08 12:04:38 -08:00
David Garske
97edaf88d4 Added the new IDE/WIN/user_settings.h to the include.am file. Changed the WOLFSSL library to use macro WOLFSSL_LIB for clarity. 2016-02-08 11:28:46 -08:00
David Garske
cb3a9cc348 Removed the execute bit on all .c, .h, and .cs files. 2016-02-08 09:45:31 -08:00
dgarske
a607c5dcc4 Merge pull request #296 from cconlon/freescale-fix
Freescale: USER_TIME fixes, enable ECC and AES-GCM by default
2016-02-08 09:36:53 -08:00
kaleb-himes
c920e6dd30 Avoid unnecessary assignments in client example 2016-02-07 08:27:01 -07:00
David Garske
d5f410523a Fixed possible memory leak on signature wrapper ASN encode and corrected the maximum header size. Added new MAX_ENCODED_HEADER_SZ which is the maximum encoded ASN header size and update asn.c to use it. Added comment about key size sanity check. Renamed wc_SignatureRsaEncode to wc_SignatureAsnEncode. 2016-02-05 16:01:42 -08:00
David Garske
e031d2fa06 Removed the execute bit on all .c files. These were inadvertently set in PR #293 due to editing files through Windows VMWare shared folder. 2016-02-05 14:25:43 -08:00
Chris Conlon
fa4da43655 Freescale: remove USER_TIME after recent time fixes, enable ECC and AES-GCM by default 2016-02-05 14:09:43 -07:00
JacobBarthelmeh
a4f1138e5b Merge pull request #293 from dgarske/WinWarnFixes
Fixes several warnings that were seeing building with Visual Studio 2…
2016-02-05 13:20:22 -07:00
Kaleb Joseph Himes
244bea18b9 Merge pull request #292 from dgarske/WolfRootFindFix
Fixed bug with "ChangeToWolfRoot" that was incorrectly seeking previo…
2016-02-05 11:28:39 -08:00
JacobBarthelmeh
25959bfb62 Merge pull request #279 from dgarske/CustRandGenSeed_OSArg
Added new CUSTOM_RAND_GENERATE_SEED_OS macro
2016-02-05 11:18:18 -07:00
Jacob Barthelmeh
3dc2e01180 warning from windows build with ECDHE-PSK and fix potential memory leak 2016-02-05 09:54:39 -07:00
David Garske
be99fcff43 Fixed typo in wc_SignatureGetSize causing error. 2016-02-05 07:32:47 -08:00
dgarske
ee4b8b2f10 Merge pull request #291 from kaleb-himes/master
Fixes for disabling the crypt test and benchmark. Added new "./configure --disable-crypttests" option. Added new NO_CRYPT_BENCHMARK define.
2016-02-04 17:06:59 -08:00
toddouska
ae19b7a272 Merge pull request #290 from dgarske/PemPubKey_CertExt_Fixes
Public key PEM to DER fixes
2016-02-04 15:19:15 -08:00
JacobBarthelmeh
60668be1c0 Merge pull request #285 from ejohnstown/dtls-hello
DTLS server should be able to receive multiple client hellos without …
2016-02-04 14:27:03 -07:00
David Garske
faf590eb22 Fix for "warning: Value stored to 'ret' is never read". Now explicitly set SIG_TYPE_E in each case. Fixed wc_SignatureGetSize so it will return SIG_TYPE_E for unsupported type scenario. 2016-02-04 12:49:39 -08:00
David Garske
bc059e12c2 Cleanup to remove trailing whitespace and convert tabs to spaces. 2016-02-04 12:31:08 -08:00
David Garske
be4c400d16 Fixes for disabling the crypt test and benchmark. Added new "./configure --disable-crypttests" option. Also made sure use of both NO_CRYPT_BENCHMARK and NO_CRYPT_TEST in "./configure CFLAGS=-D" scenario work correctly. 2016-02-04 12:06:24 -08:00
David Garske
2257c1dcef Fixes several warnings that were seeing building with Visual Studio 2015. Also noticed issue with "struct Options" in internal.h for the bit flags that was causing split due to type difference (byte vs. word16). 2016-02-04 11:30:48 -08:00
David Garske
e63989dcfd Fixed bug with "ChangeToWolfRoot" that was incorrectly seeking previous directories where depth 2 was using ..\..\ and skipping one. This bug applied to both Win and Lin*. For example running ./server from inside examples/server would not find the wolf root. 2016-02-04 11:26:33 -08:00
David Garske
2db6246abc Fixed typo with testsuite preprocessor. Added missing chacha.c, chacha20_poly1305.c, pkcs7.c and poly1305.c. Also added the IDE/WIN/user_settings.h to the project so its easy to find. 2016-02-04 11:19:51 -08:00
kaleb-himes
bf1af39027 benchmark needs a main if NO_CRYPT_BENCHMARK defined 2016-02-04 12:07:39 -07:00
Kaleb Joseph Himes
7936c7a72e Merge pull request #286 from dgarske/DisableBench
Added optional define "NO_CRYPT_BENCHMARK" to allow disabling benchmark
2016-02-04 10:59:55 -08:00
toddouska
d39c6a6e13 Merge pull request #287 from JacobBarthelmeh/fast-rsa
Force Zero of data when done
2016-02-04 10:59:21 -08:00
Jacob Barthelmeh
42219a327a refactor ForceZero of memory to gain performance 2016-02-04 10:31:05 -07:00
Jacob Barthelmeh
3ce64da44c ChaCha20-Poly1305 PSK cipher suites 2016-02-04 09:50:29 -07:00
Jacob Barthelmeh
5a9175a758 add cipher suite ECDHE-PSK-AES128-SHA256 and adjustments to ECDHE-PSK 2016-02-04 09:39:34 -07:00
David Garske
f3399b6578 Fixes/improvements to the signature and hash wrappers:
Fixed output buffer to wc_RsaSSL_Verify so its min size is the key size (needed for inline operations).
Fixed the signature wrapper return codes when using RSA so 0 indicates success.
Fixed signature wrappers use of wc_HashGetDigestSize to return the error code result.
Changed enum wc_HashType and enum wc_SignatureType so all values always exist.
Added new "wc_HashGetOID" which returns the OID for an enum wc_HashType.
Added new "WC_SIGNATURE_TYPE_RSA_W_ENC", that adds the encoded ASN header to the digest using wc_EncodeSignature for RSA signatures.
Added new SIG_TYPE_E and HASH_TYPE_E error types for explicit reporting of sig/hash type not available.
2016-02-03 15:07:56 -08:00
David Garske
a6b7c00c9c Fix so WOLFSSL_CERT_EXT can be defined without WOLFSSL_CERT_GEN. Added new WOLFSSL_PUB_PEM_TO_DER to allow the public key PEM to DER functions to be available without CERT_GEN or CERT_EXT. Fix to add NO_FILESYSTEM check around wolfSSL_PemPubKeyToDer in ssl.h. Cleanup in coding.h for the #if check. 2016-02-03 14:58:46 -08:00
Jacob Barthelmeh
d04a7e802a add ECDHE-PSK and cipher suite ECDHE-PSK-NULL-SHA256 2016-02-03 13:44:13 -07:00
John Safranek
d26ca17efd Merge pull request #288 from moisesguimaraes/add_python_pbkdf2_tests
adds pbkdf_pcscs12 tests
2016-02-03 11:09:28 -08:00
Moisés Guimarães
1ad497177a adds pbkdf_pcscs12 tests 2016-02-02 15:43:48 -03:00
Moisés Guimarães
dc316d13bf Merge pull request #250 from ikudriavtsev/master
Wrapping PBKDF PKCS#12 algorithm.
2016-02-02 15:40:50 -03:00
toddouska
8edf38632b Merge pull request #284 from JacobBarthelmeh/DH
fixed point DH operations
2016-02-02 08:31:30 -08:00
Jacob Barthelmeh
cad6a08f10 comment for clarifying table of DH sizes 2016-02-01 17:11:01 -07:00
Jacob Barthelmeh
f84c0742ad fix clang warning about potentially unset value 2016-02-01 15:23:24 -07:00
Jacob Barthelmeh
93c54c07ea cipher suite ECDHE-ECDSA-NULL-SHA 2016-02-01 14:43:17 -07:00
David Garske
dda0de4baa Added optional define "NO_CRYPT_BENCHMARK" to allow disabling benchmark code. 2016-02-01 13:04:30 -08:00
John Safranek
7fe73c7cbd DTLS server should be able to receive multiple client hellos without advancing state 2016-02-01 11:06:24 -08:00
Jacob Barthelmeh
d0f8132cdc forcing sensitive memory to be all zeros when done with it 2016-02-01 10:45:09 -07:00
John Safranek
b6017c59ba Merge pull request #275 from dgarske/WolfErrorTypo
Fixed spelling errors
2016-02-01 09:00:10 -08:00
John Safranek
6fd5579130 Merge pull request #281 from toddouska/math-rsa-fix
fix normal math off by one loop error in fast_s_mp_mul_high_digs
2016-01-29 16:59:36 -08:00
David Garske
f8876854f4 Spelling fixes in comments and error strings (ALGO_ID_E, ASN_TIME_E and WOLFSSL_ERROR function). 2016-01-29 16:13:09 -08:00
David Garske
41f7cb0482 Forgot to change the testsuite and sslSniffer projects. Now these also use the IDE/WIN/user_settings.h. 2016-01-29 15:07:03 -08:00
David Garske
ebd14a657d Added signature.c to Visual Studio project files. Added new "IDE/WIN/user_settings.h" which contains all the defines for the various Windows Visual Studio projects. Moved the settings into this new file and added the WOLFSSL_USER_SETTINGS and CYASSL_USER_SETTINGS macros and include path to IDE/WIN to all project files. This allows the settings (defines) to be adjusted in a single place for Win VS. 2016-01-29 14:29:31 -08:00
toddouska
3f87d28190 Merge pull request #280 from JacobBarthelmeh/master
Update ChaCha20-Poly1305 cipher suites
2016-01-29 14:12:53 -08:00
toddouska
fa25e5d09d fix normal math off by one loop error in fast_s_mp_mul_high_digs 2016-01-29 13:54:41 -08:00
Jacob Barthelmeh
9a5ad356a6 fixed point DH operations 2016-01-29 10:31:49 -07:00
Jacob Barthelmeh
611e37b3e8 naming for AEAD macros and TLSX with chacha-poly 2016-01-29 09:38:13 -07:00
toddouska
6856e5bbe6 Merge pull request #261 from dgarske/AsnIoCleanup
asm.c time cleanup and io.c include cleanup
2016-01-28 13:25:21 -08:00
David Garske
2bc0ae05b5 Added new CUSTOM_RAND_GENERATE_SEED_OS macro to allow custom random generation, which includes the OS_Seed. Opted to create new macro instead of modifying existing CUSTOM_RAND_GENERATE_SEED. 2016-01-28 09:31:36 -08:00
David Garske
fa64abd83e Fix for deleted USER_TIME gmtime forward declaration. Fix to make sure XGMTIME maps to gmtime just as previous code did. 2016-01-27 13:20:06 -08:00
Jacob Barthelmeh
7d71d756f3 update ChaCha20-Poly1305 to most recent RFCs 2016-01-27 14:03:05 -07:00
David Garske
fadd97de3a Moved the forward declarations until after the struct tm and time_t have been defined. 2016-01-27 11:17:54 -08:00
dgarske
3b6f2b0330 Merge pull request #274 from JacobBarthelmeh/master
Updated comments for adding new error id strings and added missing UNKNOWN_MAX_FRAG_LEN_E.
2016-01-27 09:28:56 -08:00
Jacob Barthelmeh
18f1faa13d check error strings and update comment 2016-01-27 09:50:20 -07:00
Jacob Barthelmeh
71fcc1e478 comment for adding new wolfCrypt error id strings 2016-01-26 17:12:31 -07:00
David Garske
5c4a3462ee Cleanup of the time macros in asn.c to allow expanded use of wolf "struct tm", "time_t" and "gmtime". Cleanup of the io.c socket includes for clarity. Cleanup trailing spaces in io.c and asn.c. 2016-01-26 13:47:01 -08:00
John Safranek
02397623be Merge pull request #273 from toddouska/bump-version
bump dev version
2016-01-26 13:18:11 -08:00
toddouska
ee512cac4a bump dev version 2016-01-25 13:12:45 -08:00
dgarske
18c25b5d04 Merge pull request #272 from cconlon/ksdk-fixes
Update support for Freescale KSDK 1.3.0, fix Freescale+FreeRTOS build
2016-01-25 12:24:01 -08:00
Chris Conlon
0801eeac8d update support for Freescale KSDK 1.3.0 2016-01-25 10:41:26 -07:00
Nickolas Lapp
993ae48502 Merge pull request #271 from JacobBarthelmeh/mysql
function needed for MYSQL compatibility
2016-01-25 09:39:18 -07:00
Jacob Barthelmeh
5df55e053d function needed for MYSQL compatibility 2016-01-22 16:33:54 -07:00
dgarske
e1abf5f623 Merge pull request #270 from JacobBarthelmeh/OAEP
Use type enum wc_HashType rather than int for OAEP functions.
2016-01-21 08:50:00 -08:00
Jacob Barthelmeh
63d1f81fb1 cast XMALLOC to byte pointer 2016-01-21 09:05:19 -07:00
Jacob Barthelmeh
197f25f135 use type enum wc_HashType rather than int 2016-01-20 15:31:08 -07:00
JacobBarthelmeh
3098e09f42 Merge pull request #269 from cconlon/coverity-fix
fix recursive include in wc_port.h
2016-01-20 09:01:09 -07:00
Chris Conlon
122a67139d fix recursive include in wc_port.h 2016-01-19 14:23:47 -07:00
JacobBarthelmeh
f84722bbac Merge pull request #267 from moisesguimaraes/fix_ocspstapling_dtls_typo
Fix ocspstapling dtls typo
2016-01-19 10:34:15 -07:00
Chris Conlon
04a1bf0086 Merge pull request #265 from toddouska/cov-tfm
fix coverity report for fp_mont reduce where m is half max size, not …
2016-01-19 10:30:09 -07:00
toddouska
a7bac3ae9b Merge pull request #266 from JacobBarthelmeh/master
check not CHACHA_BYTE before considering normal suite
2016-01-18 17:55:02 -08:00
Moisés Guimarães
a6a2214306 removes 'end of line' spaces; 2016-01-18 20:51:27 -03:00
Moisés Guimarães
08c67e5cdc fixes typo; 2016-01-18 20:51:27 -03:00
toddouska
33a71fb456 Merge pull request #264 from JacobBarthelmeh/OAEP
help out clang static analyzer
2016-01-18 15:31:18 -08:00
Jacob Barthelmeh
3a65f55bd3 check not CHACHA_BYTE before considering normal suite 2016-01-18 15:33:32 -07:00
toddouska
04b8df09e3 Merge pull request #260 from kaleb-himes/master
system read returns ssize_t, cast to int
2016-01-18 13:55:35 -08:00
toddouska
8e97145682 fix coverity report for fp_mont reduce where m is half max size, not currently called that big but let's allow 2016-01-18 13:53:01 -08:00
John Safranek
93e454f09a Merge pull request #259 from dgarske/UnusedParamError
Fixes unused argument build error seen on CrossWorks (Issue #255).
2016-01-18 09:40:30 -08:00
Jacob Barthelmeh
268515018d help out clang static analyzer 2016-01-18 10:22:12 -07:00
toddouska
1ab9f19541 Merge pull request #256 from JacobBarthelmeh/fast-rsa
fix for size of buffer when reading fast-rsa BN data
2016-01-15 15:47:57 -08:00
kaleb-himes
71741847d3 system read return size_t, cast to int
remove whitespace
2016-01-15 16:03:45 -07:00
John Safranek
014b849af4 Merge pull request #258 from toddouska/no-sha384
resolve issue #257, no sha384 with wolfssl cert chain and external test
2016-01-15 13:29:06 -08:00
toddouska
81d26b83c3 Merge pull request #246 from JacobBarthelmeh/OAEP
RSA OAEP padding
2016-01-15 11:34:37 -08:00
Jacob Barthelmeh
476355b5bf fix potential memory leak on fail 2016-01-14 23:58:30 -07:00
David Garske
07c79f9dc3 Fixes unused argument build error seen on CrossWorks (Issue #255). 2016-01-14 21:09:01 -08:00
toddouska
1d473ab7b5 resolve issue #255, no sha284 with wolfssl cert chain and external test 2016-01-14 20:25:50 -08:00
toddouska
d20b8880f0 Merge pull request #254 from lchristina26/master
Fix formatting to VxWorks README
2016-01-14 16:49:13 -08:00
John Safranek
dec13db1e7 Merge pull request #252 from moisesguimaraes/fix_srp_build
fixes srp build without sha512
2016-01-14 15:48:39 -08:00
Jacob Barthelmeh
3347bea0d5 fix for size of buffer when reading fast-rsa BN data 2016-01-14 15:00:59 -07:00
Jacob Barthelmeh
008612ec70 OAEP w/ smallstack and fixs 2016-01-14 14:26:17 -07:00
dgarske
df0d2e8c3a Merge pull request #248 from JacobBarthelmeh/CSharp
C# wrapper fixes account for null terminator. Added additional read/write overrides for byte[] data.
2016-01-14 08:46:18 -08:00
Leah
c41b5ac3d2 Fix formatting to VxWorks README 2016-01-13 10:42:30 -07:00
Moisés Guimarães
10df002ec5 fixes srp build without sha512 2016-01-12 15:42:58 -03:00
John Safranek
037f4c60ab Merge pull request #251 from ejohnstown/dtls-handshake
fix a sequence number issue with DTLS epoch 0 messages earlier in the…
2016-01-11 11:29:25 -08:00
Iurii Kudriavtsev
03fd89bc45 Wrapping PBKDF PKCS#12 algorithm. 2016-01-10 10:50:02 +01:00
toddouska
db1f321ae3 Merge pull request #249 from lchristina26/master
Updates for VxWorks entropy and README, Arduino functionality
2016-01-08 16:08:13 -08:00
Jacob Barthelmeh
5e0fa1de90 utf8 switched to default and added comments 2016-01-08 16:50:49 -07:00
Leah
86ddeeb110 Add steps for including wolfSSL as an Arduino library 2016-01-08 12:07:35 -07:00
lchristina26
ae92a41512 Update fork to upstream: Merge https://github.com/wolfSSL/wolfssl 2016-01-08 11:59:35 -07:00
lchristina26
f7baf9e392 settings for Arduino functionality 2016-01-08 11:54:46 -07:00
lchristina26
efae688120 add entropy steps for VxWorks 2016-01-08 11:43:05 -07:00
Jacob Barthelmeh
ee1a767332 account for null terminator 2016-01-07 17:39:00 -07:00
John Safranek
5360e22ba5 fix a sequence number issue with DTLS epoch 0 messages earlier in the handshake 2016-01-07 13:18:01 -08:00
toddouska
431951a692 Merge pull request #247 from kaleb-himes/null-pointer-excptn
safeguards to avoid de-referencing a null pointer
2016-01-06 10:25:14 -08:00
kaleb-himes
38392ce56a safeguards to avoid de-referencing a null pointer 2016-01-06 10:12:52 -07:00
John Safranek
251550ea62 Merge pull request #242 from kaleb-himes/scan-build-fixes
avoid unused variable warnings
2016-01-05 15:31:52 -08:00
kaleb-himes
a6ca2c3bdd Avoid un-necessary cast 2016-01-05 14:32:45 -07:00
kaleb-himes
29e6f283cf Implement peer suggestion 2016-01-05 14:19:46 -07:00
John Safranek
ef95000236 Merge pull request #243 from kaleb-himes/scan-build-fixes2
Avoid unused variable warnings with dead store in AES_GCM_decrypt
2016-01-05 12:30:32 -08:00
John Safranek
db55f0f8dd Merge pull request #235 from moisesguimaraes/fix_localhost_ocsp_stapling_tests
Fixes --enable-ocspstapling and --enable-ocspstapling2 Jenkins failures
2016-01-05 12:07:43 -08:00
toddouska
1a16001dac Merge pull request #245 from kaleb-himes/scan-build-fixes4
check err after set
2016-01-05 10:52:53 -08:00
Moisés Guimarães
1fd496a5a7 Merge pull request #244 from kaleb-himes/scan-build-fixes3
Remove unnecessary assignment prior to return
2016-01-05 15:27:26 -03:00
Jacob Barthelmeh
d815affe83 RSA OAEP padding 2016-01-05 10:56:15 -07:00
kaleb-himes
e4c4c5a73a white space change removed 2016-01-05 07:37:31 -07:00
kaleb-himes
699597bb21 execute undef before checking and return 2016-01-05 07:35:28 -07:00
toddouska
3725133592 Merge pull request #240 from kaleb-himes/myStack-init-check
compiler warning about myStack use in unique environment
2016-01-04 16:45:12 -08:00
kaleb-himes
fcfef59c43 check err after set 2016-01-04 17:04:10 -07:00
kaleb-himes
21c972f805 Remove unnecessary assignment prior to return 2016-01-04 16:08:04 -07:00
kaleb-himes
023052eaf1 Avoid unused variable warnings with dead store in AES_GCM_decrypt 2016-01-04 15:40:10 -07:00
kaleb-himes
dd469bb67d avoid unused variable warnings 2016-01-04 15:03:39 -07:00
lchristina26
0718f4b9a3 formatting fixes for VxWorks README 2016-01-04 14:44:08 -07:00
lchristina26
9351f0d2e7 updates to VxWorks README 2016-01-04 14:41:31 -07:00
lchristina26
4834e2d5cf updates for VxWorks simulator entropy 2016-01-04 14:33:30 -07:00
kaleb-himes
15918ebd99 initialize myStack to NULL for the later check against NULL 2016-01-04 13:18:43 -07:00
Moisés Guimarães
858da86c05 restore original certs, without OCSP Authority Information Access; 2016-01-04 17:15:29 -03:00
kaleb-himes
e6398998b1 check for NULL after malloc in posix_memalign 2016-01-04 12:55:35 -07:00
kaleb-himes
723a7fcf90 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into myStack-init-check 2016-01-04 09:17:04 -07:00
Moisés Guimarães
8a47c1d01e Merge pull request #237 from kaleb-himes/32-bit-ocsp
Also account for 32-bit users with ocsp test
2016-01-04 09:33:12 -03:00
Moisés Guimarães
d817f0fbc8 fixes test scripts to avoid bash-isms 2016-01-04 09:27:58 -03:00
toddouska
7bbd93b609 Merge pull request #239 from kaleb-himes/openx-curve-unused
Fix cases that were not detected in Jenkins
2015-12-31 18:35:03 -08:00
kaleb-himes
fa3f0660b6 compiler warning about myStack use 2015-12-31 13:59:11 -07:00
John Safranek
51e365541f Merge pull request #238 from toddouska/aesni-192key
fix aesni 192bit key expansion over read of 64bits
2015-12-31 12:55:28 -08:00
kaleb-himes
b78fb311bb Fix cases that were not detected in Jenkins 2015-12-31 13:18:37 -07:00
toddouska
99539b8875 fix aesni 192bit key expansion over read of 64bits 2015-12-31 11:19:47 -08:00
kaleb-himes
84ae9a9ae5 Also account for 32-bit users 2015-12-31 12:05:45 -07:00
toddouska
71a3555f6f Merge pull request #236 from kaleb-himes/ed-openx-unused
catching up on old jenkins issues that need fixed
2015-12-31 10:29:32 -08:00
kaleb-himes
6a56a53545 catching up on old jenkins issues 2015-12-31 09:33:01 -07:00
Moisés Guimarães
1bef0ba455 cosmetic changes to OCSP Stapling options. 2015-12-30 17:10:25 -03:00
Moisés Guimarães
5fb8ea691a updates ocsp certs with better OCSP Responder URI. 2015-12-30 16:50:22 -03:00
Jacob Barthelmeh
5040820f98 prepare for 3.8.0 release 2015-12-30 12:09:31 -07:00
toddouska
2145eebd1a Merge pull request #234 from JacobBarthelmeh/master
add ocsp needed certs to dist
2015-12-30 10:51:17 -08:00
Jacob Barthelmeh
0c21b67bb6 add ocsp needed certs to dist 2015-12-30 10:19:20 -07:00
JacobBarthelmeh
87e828bf17 Merge pull request #233 from toddouska/hint-types
fix hint types for misuse of in_buffer and out_buffer
2015-12-30 09:34:25 -07:00
toddouska
71218169c1 Merge pull request #232 from kaleb-himes/master
accounts for assumptions with external ocsp stapling test
2015-12-29 18:22:11 -08:00
toddouska
157486ce0d fix hint types for misuse of in_buffer and out_buffer 2015-12-29 16:13:09 -08:00
kaleb-himes
a973eca4b8 accounts for assumptions with external ocsp stapling test 2015-12-29 17:05:51 -07:00
Moisés Guimarães
6ba14fa241 fixes some errors from Jenkins Expected Configurations Build # 111 2015-12-29 10:19:27 -03:00
toddouska
0a14e6f3c6 Merge pull request #230 from cconlon/mcp_time_fix
fix LowResTimer on Microchip ports
2015-12-28 21:56:07 -08:00
Moisés Guimarães
774d335387 Merge branch 'csr' 2015-12-28 19:53:27 -03:00
Moisés Guimarães
ec9d23a9c3 Merge branch 'csr' 2015-12-28 19:38:04 -03:00
Moisés Guimarães
487bb4eb5e fixes before merge 2015-12-28 19:33:06 -03:00
Chris Conlon
a9894e9033 Merge pull request #229 from ejohnstown/dtls-warnings
fix DTLS warnings for Windows
2015-12-28 14:20:03 -07:00
Chris Conlon
47426b1f8d fix LowResTimer on Microchip ports 2015-12-28 13:58:01 -07:00
Moisés Guimarães
2e00b12b69 updates configure.ac with better option naming. 2015-12-28 17:55:41 -03:00
toddouska
91c06736cb Merge pull request #228 from kaleb-himes/typo-corrections
minor typo corrections
2015-12-28 11:56:48 -08:00
toddouska
2d33380abc Merge pull request #225 from JacobBarthelmeh/master
help message to use NTRU key in example server
2015-12-28 11:56:13 -08:00
toddouska
c3df8af997 Merge pull request #223 from cconlon/vswarnings
fix Visual Studio warnings
2015-12-28 11:55:13 -08:00
toddouska
3a1909dab9 Merge pull request #209 from kaleb-himes/master
OpenSSH added support for additional NID types. Update our compatibil…
2015-12-28 11:52:38 -08:00
John Safranek
92cb8eee61 revise the comments about port 0 use in the example client and server 2015-12-24 15:42:52 -08:00
Kaleb Joseph Himes
99797eb4f6 Merge pull request #227 from ejohnstown/example-comments
Example comments
2015-12-23 15:09:54 -07:00
kaleb-himes
cc8633fe7f minor typo corrections 2015-12-23 13:28:45 -07:00
John Safranek
4b836f8476 added note to client and server regarding port 0 2015-12-23 12:20:53 -08:00
John Safranek
d17549f848 update example client ShowVersions() to not show disabled old-tls versions 2015-12-23 12:12:41 -08:00
Kaleb Joseph Himes
558d2566cc Merge pull request #226 from toddouska/ranports-scripts
add random ports for all make check scripts, unique ready file
2015-12-23 12:49:16 -07:00
Chris Conlon
5cbaa9de20 Merge pull request #224 from ejohnstown/windows-fips-segments
add the Windows object ordering tags to wolfCrypt first and last sources
2015-12-22 17:08:57 -07:00
toddouska
22385f2b39 add random ports for all make check scripts, unique ready file 2015-12-22 14:35:34 -08:00
Jacob Barthelmeh
41f50b7a73 NTRU suites considered part of static RSA suites group 2015-12-22 15:19:11 -07:00
Jacob Barthelmeh
0721b79282 help message to use NTRU key in example server 2015-12-22 11:51:26 -07:00
John Safranek
44c4f18d3e fix DTLS warnings for Windows 2015-12-22 09:45:54 -08:00
kaleb-himes
cbf3213c4f correct logic on pre-processor macro 2015-12-21 23:33:33 -07:00
kaleb-himes
0cb2374c69 Ensure configured before assuming message digest is supported 2015-12-21 23:03:45 -07:00
Chris Conlon
b153ac002c fix Visual Studio warnings 2015-12-21 16:11:02 -07:00
John Safranek
d5295edbd1 add the Windows object ordering tags to wolfCrypt first and last sources 2015-12-21 11:01:09 -08:00
Jacob Barthelmeh
37b8e60537 Merge branch 'toddouska-hello-size' 2015-12-18 10:00:00 -07:00
Jacob Barthelmeh
4da1ae3947 Merge branch 'hello-size' of https://github.com/toddouska/wolfssl into toddouska-hello-size 2015-12-18 09:33:13 -07:00
John Safranek
917edc5f18 Merge pull request #218 from toddouska/ssl3-aes256
add aes256 key derivation to ssl3
2015-12-17 18:30:23 -08:00
Chris Conlon
b89354880f switch pragma once uses, causes warnings on some compilers 2015-12-17 13:19:17 -07:00
toddouska
e503b89ca1 allow sniffer build with -v 0 examples to work 2015-12-17 12:10:22 -08:00
toddouska
6c69b7f109 make hello suite size user settable, increase default 2015-12-17 09:57:44 -08:00
kaleb-himes
d395c5aba3 condense to one switch statement for testing of message digests 2015-12-16 11:40:58 -07:00
kaleb-himes
46c4653f60 Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-12-16 11:37:07 -07:00
toddouska
ed8a50ce69 Merge pull request #211 from lchristina26/master
GenerateSeed() Function for VxWorks compatibility
2015-12-15 15:59:20 -08:00
toddouska
94b1df49ae Merge pull request #219 from JacobBarthelmeh/master
install user_rsa.h and fix leading bit function
2015-12-15 15:57:48 -08:00
lchristina26
3113c8db9b update VXWORKS GenerateSeed() - no printf, error return 2015-12-15 16:52:21 -07:00
Jacob Barthelmeh
1cdc6d5edb refactoring dist and install of user/fast-rsa 2015-12-15 16:09:49 -07:00
Jacob Barthelmeh
b87c7fb460 install user_rsa.h and fix leading bit function 2015-12-15 13:50:01 -07:00
toddouska
eed40eb690 add aes256 key derivation to ssl3 2015-12-15 11:54:03 -08:00
toddouska
b9e2ff3055 Merge pull request #217 from NickolasLapp/openssl_version_increase
Add in stub functions for opensslv1.0.1 w/ stunnel and lighttpd
2015-12-15 11:17:52 -08:00
Moisés Guimarães
9688a0f0db fixes API names (marketing wise); 2015-12-14 23:12:08 -03:00
Moisés Guimarães
a15c003211 adds extra certs for ocspstapling tests; 2015-12-14 23:02:49 -03:00
Moisés Guimarães
0ca6a5601e fixes OCSP_MULTI check;
adds root-ca-cert to index0.txt;
adds keyUsage to CA certs;
sets fixed serial to root-ca-cert;
2015-12-14 20:22:48 -03:00
Nickolas Lapp
bf621f1832 Add in stub functions for opensslv1.0.1 w/ stunnel and lighttpd 2015-12-14 15:36:04 -07:00
Moisés Guimarães
196b983b7b adds ocsp test scripts; 2015-12-13 18:06:08 -03:00
John Safranek
a834c2acf6 improved DTLS handshake sequence numbering when retransmitting finished message 2015-12-11 18:41:09 -08:00
lchristina26
6ab9c87f13 add comment to VXWORKS GenerateSeed() 2015-12-11 13:41:05 -07:00
lchristina26
e2456214f4 update random.c for better entropy with VXWORKS 2015-12-11 13:22:33 -07:00
lchristina26
8b99cea5c8 update README with entropy instructions 2015-12-11 13:19:44 -07:00
dgarske
af4eb590a6 Merge pull request #214 from aburks/IS-213-AESFailsWithFreescaleCAU
Issue #213: AES fails with Freescale (mm)CAU
2015-12-10 17:08:52 -08:00
dgarske
838c5297c3 Merge pull request #216 from aburks/IS-215-SignatureUsesOldRNG
Issue #215: Signature module uses old RNG
2015-12-10 17:08:36 -08:00
Andrew Burks
03a643cc35 Issue #215: Signature module uses old RNG. Use the new WC_RNG construct instead in order to prevent conflicts with board support packages. 2015-12-10 17:04:48 -08:00
Andrew Burks
bc54b18cad Issue #213: AES fails with Freescale (mm)CAU. 2015-12-10 16:55:49 -08:00
toddouska
4f0c2177b2 Merge pull request #212 from dgarske/CleanupAsnLeadingZero
Cleanup of the leading zero detection in wc_RsaKeyToDer and wc_DsaKey…
2015-12-10 11:11:58 -08:00
David Garske
89518ad445 Cleanup of the leading zero detection in wc_RsaKeyToDer and wc_DsaKeyToDer to use existing mp_leading_bit function. 2015-12-10 10:48:50 -08:00
Jacob Barthelmeh
1c4b3016e6 set required tls1_2 for when using ChaCha20-Poly1305 suite 2015-12-10 11:45:27 -07:00
toddouska
5c5c7ffaec Merge pull request #210 from dgarske/CheckEccAltwFastMath
Added compile time check for ALT_ECC_SIZE requiring USE_FAST_MATH.
2015-12-10 10:24:20 -08:00
lchristina26
cb73064c10 format changes to VXWORKS GenerateSeed() 2015-12-09 13:22:13 -07:00
lchristina26
38ac17864e added entropy, wc_GenerateSeed() for VxWorks 2015-12-09 13:18:42 -07:00
David Garske
1153c31bbb Added compile time check for ALT_ECC_SIZE requiring USE_FAST_MATH. 2015-12-09 09:53:59 -08:00
kaleb-himes
97dcb5e567 Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-12-08 13:45:25 -08:00
Chris Conlon
5fd4903fde bump version to 3.7.3 2015-12-08 09:32:00 -08:00
kaleb-himes
1d1af6410d OpenSSH added support for additional NID types. Update our compatibility layer 2015-12-08 07:27:43 -08:00
Moisés Guimarães
d30a1be572 adds new certificates for OCSP tests 2015-12-07 19:55:33 -03:00
John Safranek
8756c31a01 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-12-07 12:43:01 -08:00
John Safranek
c7fdc9ba9e DTLS Hello Verify and Server Hello should use the sequence number of the Client Hello 2015-12-07 11:24:14 -08:00
toddouska
4a0c4fbf3f remove fprintf from ecdsa verify fail wrapper 2015-12-07 09:25:19 -08:00
toddouska
beebc87bc8 Merge pull request #208 from JacobBarthelmeh/master
example IO callback and keep memory alive when needed
2015-12-07 09:12:07 -08:00
Jacob Barthelmeh
1600ba7f3d example IO callback and keep memory alive when needed 2015-12-06 14:30:00 -07:00
John Safranek
6c70e3233d fix bug where unknown OIDs were treated as parsing errors rather than ignored 2015-12-05 13:14:29 -08:00
David Garske
89a65b0aa0 Fixed compile error in signature.c with g++. Corrected comment. 2015-12-04 15:22:06 -08:00
toddouska
179f1cab9b Merge branch 'keyex' 2015-12-03 12:38:02 -08:00
toddouska
37bc497f21 fix merge conflict 2015-12-03 12:37:49 -08:00
toddouska
532d1da9c0 Merge pull request #206 from dgarske/FixExtraMalloc_wNotTLS12
Fixed issue with "WOLFSSL_SMALL_STACK" and pre TLS 1.2 in "SendServer…
2015-12-03 11:26:43 -08:00
toddouska
0c9dca3a5f Merge pull request #201 from JacobBarthelmeh/fast-rsa
modification to fast-rsa sign operation and make key
2015-12-03 11:19:02 -08:00
toddouska
1c2a920b8f Merge pull request #203 from dgarske/SendServerHelloRNGCombine
Combined "wc_RNG_GenerateBlock" calls in "SendServerHello".
2015-12-03 11:16:00 -08:00
David Garske
b1d18d8455 Fixed issue with "WOLFSSL_SMALL_STACK" and pre TLS 1.2 in "SendServerKeyExchange" where "encodedSig" is allocated and not used. 2015-12-02 19:43:05 -08:00
Jacob Barthelmeh
fea769816c ed25519 verify function return descriptive error value 2015-12-02 15:55:40 -07:00
toddouska
e08fa67a32 fix clang --disable-memory issues 2015-12-02 14:40:32 -08:00
John Safranek
5cf94166b2 silently drop epoch 0 messages when handshake completed 2015-12-01 14:59:32 -08:00
Jacob Barthelmeh
d673a56c83 change line ending of license to match Windows CR LF 2015-12-01 14:49:16 -07:00
John Safranek
5687562e7b back out change to decryptedCur flag 2015-12-01 13:32:00 -08:00
John Safranek
a5f689168e fix call to IsEncryptionOn for session tickets 2015-12-01 09:18:21 -08:00
Jacob Barthelmeh
bb5de34e5c cast type on XMALLOC with ntru 2015-12-01 09:24:44 -07:00
David Garske
654e17379e Combined "wc_RNG_GenerateBlock" calls in "SendServerHello". 2015-11-30 19:29:20 -08:00
John Safranek
251d0364f8 check DTLS sequence number against window a little earlier 2015-11-30 17:16:47 -08:00
Moisés Guimarães
346dcb0fd9 adds WOLFSSL_CSR2_OCSP_MULTI support; 2015-11-30 21:26:00 -03:00
John Safranek
514aa331f8 wrapped checks for encryptionOn with a function to allow more complicated checks like for epoch 0 being unencrypted 2015-11-30 14:43:03 -08:00
Moisés Guimarães
07356af78e prepares BuildCertificateStatus() to send more than one certificate status; 2015-11-30 18:34:00 -03:00
Chris Conlon
767da41b16 allow 1024 and 2048 example cert buffers to be enabled at same time, gencertbuf.pl 2015-11-30 14:18:17 -07:00
Chris Conlon
d2a80ba1bc remove extra NULL check in SetTmpDH_buffer/file_wrapper, fix API tests 2015-11-30 10:25:55 -07:00
Jacob Barthelmeh
6030970026 perfer local IPP libraries, memory usage and casting 2015-11-29 23:34:58 -07:00
Jacob Barthelmeh
db599bb361 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into fast-rsa 2015-11-29 13:39:45 -07:00
Takashi Kojo
4217ef5475 fixed mdk4 macro control in example server/client, echoserver/client 2015-11-27 11:31:12 +09:00
John Safranek
7f1b9a1e13 storing DTLS handshake messages takes into account overlapping data 2015-11-25 20:25:57 -08:00
toddouska
83f26abdde Merge pull request #198 from JacobBarthelmeh/master
C Sharp wrapper
2015-11-25 14:11:52 -08:00
John Safranek
e4894bfd0b add comments to clarify accept and connect state advancement due to sending fragments 2015-11-25 11:10:42 -08:00
John Safranek
02411ccced add F back into the client command line options scanning 2015-11-25 10:36:51 -08:00
toddouska
1b3254cc47 Merge pull request #202 from NickolasLapp/openssl_test_update
Clarify Openssl.test results messaging
2015-11-25 09:12:52 -08:00
Jacob Barthelmeh
f7fac88e8b Don't error out when calling ippInit to find optimized IPP library, just fall back to use standard 2015-11-24 17:28:43 -07:00
Nickolas Lapp
33eb4b98d3 Clarify Openssl.test results messaging 2015-11-24 15:16:26 -07:00
toddouska
1626ae6287 Merge pull request #200 from lchristina26/master
Update VxWorks README to assume a filesystem, fix typos
2015-11-24 13:31:16 -08:00
Jacob Barthelmeh
c5c9991d11 modification to fast-rsa sign operation and make key 2015-11-24 13:41:04 -07:00
Jacob Barthelmeh
da127dfb17 warrning for unused function in user-crypto / fast-rsa mode 2015-11-24 13:18:39 -07:00
lchristina26
76952d9ea9 updated README to leave out NO_FILESYSTEM 2015-11-24 12:21:01 -07:00
Moisés Guimarães
1fbaf089ae adds support to WOLFSSL_CSR2_OCSP in both DoCertificateStatus() and SendCertificateStatus();
adds contingence plan for status_request_v2;
2015-11-24 00:47:27 -03:00
Moisés Guimarães
f9d6464793 adds basic extension code for CERTIFICATE_STATUS_REQUEST_V2;
fixes EncodeOcspRequestExtensions() length check;
2015-11-23 23:42:05 -03:00
Takashi Kojo
e4bed957b3 #1591: fixed macro control for MDK4 2015-11-24 11:26:08 +09:00
toddouska
91b7cddb7c better error checking on condition variable operations, cleanup 2015-11-23 15:13:36 -08:00
toddouska
b9f0243528 Merge pull request #195 from dgarske/LPCXpresso
Adds LPCXpresso IDE support
2015-11-23 14:47:20 -08:00
toddouska
6c1fd13184 Merge pull request #199 from dgarske/ChangeToWolfRootWarnFix
Fixes "warning: Size argument is greater than the free space in the d…
2015-11-23 14:43:45 -08:00
David Garske
c3b3ba4a2a Fixes "warning: Size argument is greater than the free space in the destination buffer" with XSTRNCAT(). 2015-11-23 14:41:24 -08:00
toddouska
feef035c06 Merge branch 'crl-monitor' 2015-11-23 14:17:27 -08:00
toddouska
32b2d7f9e4 have calling thread wait for crl monitor thread to setup for simpler cleanup 2015-11-23 14:15:12 -08:00
Moisés Guimarães
96e18a8c68 adds next update verification when decoding the OcspResponse;
fixes memleak in GetOcspStatus(); If the status was outdated, the responseBuffer was allocated twice;
consider error in OcspResponseDecode() also a BAD_CERTIFICATE_STATUS_ERROR;
2015-11-23 15:11:51 -03:00
Moisés Guimarães
f3131fb5d6 adds next update time to ocspd.sh 2015-11-23 13:34:27 -03:00
Moisés Guimarães
b820619e6c updates certs;
adds ocsp certs;
2015-11-23 09:56:45 -03:00
Moisés Guimarães
51f5ded392 adds config to generate ocsp certs 2015-11-23 09:44:39 -03:00
Moisés Guimarães
aaad9787db updates box version to trusty64;
fixes provisioning errors;
2015-11-23 09:19:33 -03:00
John Safranek
d248a7660c ASN: when getting OID from stream, check the summed value; added utility to skip OID; setting OID uses same strings as getting, separated NULL tag from the OID 2015-11-21 12:00:34 -08:00
Chris Conlon
9c6b52876a add SetTmpDH file/buffer functions to API tests 2015-11-20 13:32:44 -07:00
Chris Conlon
85373f7b6e move SetTmpDH buffer functions out of NO_FILESYSTEM 2015-11-20 13:30:22 -07:00
Jacob Barthelmeh
7d13fe9017 license heading 2015-11-20 10:19:55 -07:00
Jacob Barthelmeh
39d6992759 logging levels added 2015-11-20 09:59:08 -07:00
Jacob Barthelmeh
b9dae51658 C Sharp wrapper 2015-11-19 20:51:32 -07:00
David Garske
6abfaf6df4 Implemented Wolf version of LPC18XX startup code to eliminate NXP code from our repo. Cleanup of trailing spaces and convert tabs to spaces. 2015-11-19 19:06:40 -08:00
toddouska
14cb082a37 Merge pull request #197 from dgarske/RowleyIDECleanup
Rowley IDE fix to exclude .asm and .s files. Cleanup to remove Rowley…
2015-11-19 18:16:57 -08:00
David Garske
c898c582f9 Corrected filename in include.am and top of file. 2015-11-19 17:56:49 -08:00
David Garske
1894358bec Rowley IDE fix to exclude .asm and .s files. Cleanup to remove Rowley example code, leaving just stubs and Wolf code. 2015-11-19 14:32:45 -08:00
toddouska
6d67ee11b6 Merge pull request #196 from NickolasLapp/SNI_ConditionalCompile
Define SNI func condtionally. Declare var at top of func
2015-11-19 13:18:23 -08:00
Nickolas Lapp
c3cdbf31bb Define SNI func condtionally. Declare var at top of func 2015-11-19 13:49:57 -07:00
toddouska
2698736aaf fix missing XMALLOC/FREE types 2015-11-19 10:20:28 -08:00
David Garske
e51f99a5c3 Adds LPCXpresso IDE support. Tested with the OM13076 (LPCXpresso18S37) board. 2015-11-18 17:16:33 -08:00
toddouska
4da70f9fe9 Merge pull request #193 from dgarske/SigHashFixes
Fixes for build errors with new signature and hash wrapping functions…
2015-11-17 12:19:21 -08:00
toddouska
a2915fbc57 Merge pull request #194 from dgarske/BenchmarkAddHeader
Added benchmark.h to expose the benchmark_test function. Updated a co…
2015-11-17 12:13:08 -08:00
David Garske
cdc830c1cc Fixes for build errors with new signature and hash wrapping functions. Disabled MD2/4 hash wrapping. 2015-11-17 10:15:36 -08:00
David Garske
09793e3206 Added benchmark.h to expose the benchmark_test function. Updated a couple of projects to use the new benchmark header. 2015-11-17 08:52:12 -08:00
toddouska
5e80bf46bf Merge branch 'master' of github.com:wolfssl/wolfssl 2015-11-16 13:20:26 -08:00
toddouska
ca7956b50d update cavium nitrox port to wolfssl 2015-11-16 13:20:19 -08:00
toddouska
4e7935f5f5 Merge pull request #188 from dgarske/HashSignVerifyWrappers
New hash and signature wrapper functions:
2015-11-16 12:16:55 -08:00
David Garske
103f984421 Cleanup of the signature wrapper error cases to be more explicit. 2015-11-16 11:54:23 -08:00
Moisés Guimarães
60b1a0c8be fixes scan-build warnings 2015-11-16 16:16:48 -03:00
Moisés Guimarães
5e4955f689 reuse OcspRequest data in ocsp stapling; 2015-11-16 16:03:48 -03:00
Moisés Guimarães
6d6ca56e4e fixes SendCertificateStatus() loading the CA in the server side to build the OCSP request properly. 2015-11-16 15:31:50 -03:00
Moisés Guimarães
24907fc818 adds buffer logging; 2015-11-15 18:43:29 -03:00
Moisés Guimarães
12802f40c5 finishes SendCertificateStatus(); sending the stored status; 2015-11-15 16:40:47 -03:00
Moisés Guimarães
8ae6bf1641 adds server side Certificate Status Request extension;
missing: Finish SendCertificateStatus();
2015-11-15 00:26:11 -03:00
Moisés Guimarães
cc684f8593 fixes OCSP nonce extension size estimation at client hello message; 2015-11-14 22:28:52 -03:00
Chris Conlon
a38f7bb937 fix jni build enabling ecc on non 64 bit platforms 2015-11-13 16:58:05 -07:00
David Garske
b870bad63e Added new "SIG_VERIFY_E" type for "wc_SignatureVerify" failure. Added argument checking on new signature wrapper functions. Added new "NO_SIG_WRAPPER" to optionally disable wrappers to reduce code size. 2015-11-13 12:22:32 -08:00
Leah
4a853b7318 Update README.md 2015-11-13 10:45:11 -07:00
Leah
bcff81fd64 Update README.md 2015-11-13 10:38:58 -07:00
Leah
9007d4b655 Update README.md 2015-11-13 10:37:46 -07:00
Leah
0994491916 Update README.md 2015-11-13 10:36:36 -07:00
Leah
e5707f0d49 Update README.md 2015-11-13 10:35:13 -07:00
toddouska
0c1a4dfd12 Merge pull request #190 from NickolasLapp/stunnel_session_changes
Implement missing openssl API
2015-11-12 16:11:01 -08:00
Nickolas Lapp
66965759d5 Implement missing openssl API 2015-11-12 16:52:56 -07:00
toddouska
5c96be4d19 fix idea conversion warnings 2015-11-12 15:14:00 -08:00
toddouska
806a2748bf Merge pull request #189 from lchristina26/master
Updates for Wind River WORKBENCH/ VxWorks Compatibility
2015-11-12 13:33:27 -08:00
Leah
307413f11b Update README.md 2015-11-12 13:34:36 -07:00
lchristina26
db6920d372 updates for vxworks compatibility 2015-11-12 13:33:47 -07:00
toddouska
261fedd906 idea_mult() now works on 16,32, AND 64bit systems 2015-11-12 10:32:35 -08:00
toddouska
d9cb1cfbe1 fix idea_mult() for 16 and 32bit systems 2015-11-12 10:22:31 -08:00
Leah
ba92b2db7b Update README.md 2015-11-12 10:47:38 -07:00
David Garske
f692c8cefb New hash and signature wrapper functions:
1. Added new hash wrapper function "wc_Hash". Hash functions support Md# and SHA# using "enum wc_HashType". Added new "wc_HashGetDigestSize" function to get hash size (returns 0 if not supported).
2. Added new signature wrapper functions "wc_SignatureGenerate" and "wc_SignatureVerify" to perform hash then sign/verify of bytes. Signature functions support ECC and RSA using "enum wc_SignatureType". Added new "wc_SignatureGetSize" function to get the signature size using the key (returns 0 if not supported).
2015-11-12 09:36:14 -08:00
Takashi Kojo
302fd05edd Change "//" to "/* */" comment. Removed unreferred functions. 2015-11-12 15:31:58 +09:00
toddouska
866b1517d3 Merge pull request #187 from NickolasLapp/fix_getShutdown
Make get_shutdown return correct results with stunnel
2015-11-11 11:15:22 -08:00
Nickolas Lapp
e49b12c7cc Make get_shutdown return correct results with stunnel 2015-11-11 11:43:38 -07:00
Leah
01e649210d Update README.md 2015-11-11 10:16:48 -07:00
Leah
6cdeebc4da Update README.md 2015-11-11 10:03:49 -07:00
Leah
27e523a85a Update README.md 2015-11-11 10:00:53 -07:00
Leah
d34f2ebc35 Update README.md 2015-11-11 09:30:03 -07:00
Leah
cdea03fdf3 Update README.md 2015-11-11 09:28:59 -07:00
Leah
f9cd90872d Update README.md 2015-11-11 09:21:27 -07:00
Leah
4063fbc2b5 Update README.md 2015-11-11 09:18:00 -07:00
Leah
7d9356ae04 Update README.md 2015-11-11 09:13:04 -07:00
Leah
19ebc5b600 Update README.md 2015-11-11 09:12:10 -07:00
Leah
c3540b2f6e Update README.md 2015-11-11 09:11:14 -07:00
toddouska
28cbe7e7a5 Merge pull request #186 from tisb-vikram/master
add HAVE_ECC to WolfSSL/TI-RTOS settings
2015-11-10 19:58:46 -08:00
Vikram Adiga
196b965be5 add HAVE_ECC to WolfSSL/TI-RTOS settings 2015-11-10 18:06:55 -08:00
toddouska
d076fdf0cd Merge pull request #185 from tisb-vikram/master
fix TI-RTOS makefiles to build wolfSSL from local dir
2015-11-10 17:41:57 -08:00
Vikram Adiga
3211817f59 fix TI-RTOS makefiles to build wolfSSL from local dir
Signed-off-by: Vikram Adiga <vikram.adiga@ti.com>
2015-11-10 17:21:10 -08:00
toddouska
a69d99981f Merge pull request #184 from kaleb-himes/master
allow openssl extra tests if configuration supports
2015-11-10 15:15:30 -08:00
kaleb-himes
c3a249009f allow openssl extra tests if configuration supports 2015-11-10 15:29:05 -07:00
Moisés Guimarães
9b8f26329d improves srp unit test to use random salt; 2015-11-10 17:43:02 -03:00
toddouska
5823485f61 Merge pull request #182 from lchristina26/master
Update the README for VxWORKS
2015-11-10 12:36:59 -08:00
Leah
56e94cb3a9 Update README.md 2015-11-09 22:37:21 -07:00
Leah
9c43e94746 Update README.md 2015-11-09 22:36:00 -07:00
Leah
ebd1e2b35d Update README.md 2015-11-09 22:35:16 -07:00
Leah
a0f3fa1f1a Update README.md 2015-11-09 22:34:53 -07:00
lchristina26
54c5a3a10c update VxWorks readme 2015-11-09 17:23:25 -07:00
toddouska
6efd8e2db0 fix unused PemToDer() vars depending on build options 2015-11-09 14:58:20 -08:00
toddouska
906be9fb20 add printf to logger w/o callbacks w/ WOLFSSL_LOG_PRINTF 2015-11-09 14:55:09 -08:00
toddouska
417f85da86 use gmtime_r if there 2015-11-09 14:48:39 -08:00
toddouska
756feb37f5 Merge pull request #179 from kaleb-himes/master
SAFESEH:NO in DLL Debug|Win32
2015-11-09 14:25:23 -08:00
kaleb-himes
e9348635a0 SAFESEH:NO in DLL Debug|Win32 2015-11-09 15:11:58 -07:00
toddouska
d869279ad5 Merge branch 'custom-seed' 2015-11-06 15:37:26 -08:00
David Garske
099b6bc3df Updated the Rowley Crossworks example so it builds due to new user-crypto. Tested and verified new "CUSTOM_RAND_TYPE" using 8, 16 and 32 bit values. 2015-11-06 09:41:16 -08:00
David Garske
05f4c83b98 Optimizations to improve random number generation performance and provide additional ways to implement custom versions of custom random handlers. Added new "CUSTOM_RAND_TYPE" to define the datatype for the "CUSTOM_RAND_GENERATE" function. Added new "CUSTOM_RAND_GENERATE_SEED" option for anyone who wants to implement their own equivalent "wc_GenerateSeed()" function. Added generic FREESCALE_RNGA and FREESCALE_RNGB options. 2015-11-05 22:20:11 -08:00
Moisés Guimarães
dccbc1cdd4 fixes ocsp nonce extension decoding;
enables use of ocsp nonce extension in the client example.
2015-11-05 11:45:42 -03:00
Moisés Guimarães
62210186c7 fix code logic to single if 2015-11-05 11:45:41 -03:00
toddouska
17c9494a2d fix gfmul intel calling convention 2015-11-04 13:26:38 -08:00
toddouska
124f1f8ce7 switch gfmul to intel syntax in aes_asm.asm 2015-11-04 11:55:04 -08:00
John Safranek
3b102862b1 exclude new AES-GCM test when in FIPS mode 2015-11-03 16:57:38 -08:00
John Safranek
23ba31cbdd 1. Fixed bug where AES-GCM IVs had to only be 12 bytes. Now
accepts any length.
2. Added test case for AES-GCM using an 60 byte IV.
3. AesGcmSetKey doesn't calculate H value in AES-NI mode.
2015-11-03 16:47:42 -08:00
toddouska
427405fff9 Merge branch 'timediff' 2015-11-03 14:21:55 -08:00
toddouska
44165371bc timediff fixup 2015-11-03 14:15:15 -08:00
toddouska
69d5f2e43c Merge branch 'DateFormat' of https://github.com/kojo1/wolfssl into timediff 2015-11-03 14:04:14 -08:00
toddouska
5c9089651a fix github issue #174 , disable des3 with (else if) logic broken 2015-11-03 12:03:35 -08:00
toddouska
8d4d9ebe12 fix jenkins ec 56 2015-11-03 11:30:56 -08:00
toddouska
37f4fbc000 Merge branch 'openssl-script' 2015-11-02 13:27:20 -08:00
toddouska
fbd4f8a6ed fix merge conflict 2015-11-02 13:26:46 -08:00
toddouska
54a0a3370a fix wolfSSL_Init to only call new wolfCrypt_Init() once 2015-11-02 12:35:43 -08:00
toddouska
a1d1155b0c add missing error strings 2015-11-02 12:18:12 -08:00
toddouska
b13ae543ec bump dev version 2015-11-02 11:15:21 -08:00
Moisés Guimarães
3db5a5f2c2 Merge branch csr into 'master' 2015-11-02 15:54:41 -03:00
Moisés Guimarães
21d70636dc Merge branch csr into 'master' 2015-11-02 15:51:01 -03:00
toddouska
1d32ff2c59 Merge branch 'aes-ni-gcm' 2015-11-02 09:42:10 -08:00
toddouska
28dcef2d71 gcm benchmark results format alignment 2015-11-02 09:39:34 -08:00
John Safranek
f8aeac608c 1. Add C NI-intrinsic AES-GCM encrypt and decrypt.
2. Fix error string for wolfcrypt test of GMAC.
3. Add AES-GCM Decrypt to benchmark.
2015-10-30 16:03:26 -07:00
toddouska
5d2d249673 turn on OpenSSL public key type decodes unless explicitly turned off 2015-10-30 13:40:05 -07:00
Takashi Kojo
d741d4cddc Adding UTC Time Differential in ValidateDate 2015-10-30 11:26:54 +09:00
toddouska
e76f95465d Merge pull request #170 from dgarske/master
Fixes initialization of the Crypto HW protection, which could leak a …
2015-10-29 13:56:18 -07:00
Leah
8dfa1af9e9 Merge pull request #169 from lchristina26/master
updates for VxWorks

Update example client/server to be compatible with VxWorks builds
2015-10-29 13:50:13 -06:00
lchristina26
5bcb7e98cb readme updates 2015-10-29 13:47:40 -06:00
lchristina26
1a96ff6766 readme updates 2015-10-29 13:45:58 -06:00
lchristina26
4061346f77 more readme updates 2015-10-29 13:44:22 -06:00
lchristina26
dd99948bcd Workbench readme update 2015-10-29 13:41:17 -06:00
lchristina26
723fc3761b Example client/server compatible with VxWorks 2015-10-29 13:39:02 -06:00
David Garske
dacfd84bea Enhanced "ChangeToWolfRoot" to report error if the root was not found. Also fixed the depth limit. 2015-10-29 10:45:37 -07:00
David Garske
f977caa492 Cleanup of the test code that looks for the WolfSSL root directory. Now it tries to open the certs/ntru-cert.pem file in each directory up (limited to 5) until it opens it. 2015-10-28 23:54:08 -07:00
David Garske
d31cec0df0 Fixes initialization of the Crypto HW protection, which could leak a mutex if two calls to "wolfSSL_CryptHwMutexLock()" occurred at the same time prior to calling "wolfSSL_CryptHwMutexInit()". Fixes #164. 2015-10-28 23:07:52 -07:00
Jacob Barthelmeh
2c41a5b961 adjust wolfssl lib value in rpm spec.in 2015-10-28 17:33:31 -06:00
Jacob Barthelmeh
55a56cac05 Release 3.7.0 2015-10-28 15:07:22 -06:00
Moisés Guimarães
3e9fd1c542 Merge branch 'master' into csr
Conflicts:
	configure.ac
	wolfssl/wolfcrypt/types.h
2015-10-28 14:34:15 -03:00
Moisés Guimarães
071a452bec fix indentation and enum conflict 2015-10-28 12:20:20 -03:00
lchristina26
a914ca74f2 updates for VxWorks 2015-10-27 21:24:21 -06:00
toddouska
542b59d90a Merge pull request #150 from JacobBarthelmeh/master
Intel RSA IPP plug in
2015-10-27 16:57:32 -07:00
Jacob Barthelmeh
8bd228a391 remove libusercrypto.dylib and adjust gitignore 2015-10-27 17:11:31 -06:00
toddouska
5b2fbd9747 Merge pull request #168 from NickolasLapp/uninitWarn
Fixed gcc variable-mayble-uninitialized warning
2015-10-27 16:07:12 -07:00
Nickolas Lapp
b7848481a3 Fixed gcc variable-mayble-uninitialized warning 2015-10-27 16:42:19 -06:00
Moisés Guimarães
cddebfa941 changes --enable-statusrequest to --enable-ocspstapling 2015-10-27 19:27:56 -03:00
toddouska
f477168cf7 make it easier for user to define custom bigint types 2015-10-27 14:52:07 -07:00
Jacob Barthelmeh
fa1a356888 add DYNAMIC_TYPE_USER_CRYPTO tag for malloced memory 2015-10-27 13:26:32 -06:00
Moisés Guimarães
8dc154ff71 adds support for TLS downgrading against buggy TLS servers.
reference: RFC 5246 - TLS 1.2 - Appendix E.1:

   Note: some server implementations are known to implement version
   negotiation incorrectly.  For example, there are buggy TLS 1.0
   servers that simply close the connection when the client offers a
   version newer than TLS 1.0.  Also, it is known that some servers will
   refuse the connection if any TLS extensions are included in
   ClientHello.  Interoperability with such buggy servers is a complex
   topic beyond the scope of this document, and may require multiple
   connection attempts by the client.

   Earlier versions of the TLS specification were not fully clear on
   what the record layer version number (TLSPlaintext.version) should
   contain when sending ClientHello (i.e., before it is known which
   version of the protocol will be employed).  Thus, TLS servers
   compliant with this specification MUST accept any value {03,XX} as
   the record layer version number for ClientHello.

   TLS clients that wish to negotiate with older servers MAY send any
   value {03,XX} as the record layer version number.  Typical values
   would be {03,00}, the lowest version number supported by the client,
   and the value of ClientHello.client_version.  No single value will
   guarantee interoperability with all old servers, but this is a
   complex topic beyond the scope of this document.
2015-10-27 16:10:23 -03:00
Moisés Guimarães
f37ea955ec improves OCSP response signature verification;
reference: RFC 2560 -  Section 4.2.2.2  Authorized Responders:

   The key that signs a certificate’s status information need not be the
   same key that signed the certificate. It is necessary however to
   ensure that the entity signing this information is authorized to do
   so.  Therefore, a certificate’s issuer MUST either sign the OCSP
   responses itself or it MUST explicitly designate this authority to
   another entity.
2015-10-26 19:33:35 -03:00
Moisés Guimarães
a47f98ee19 adds support to nonce extension in OCSP stapling (status request tls extension);
fix nonce encoding, there was a missing ASN.1 OctetString header;
2015-10-26 18:11:38 -03:00
Moisés Guimarães
14fa980dad adds contingence plan (force OCSP check when the server answer the status_request extension but doesn't sends a CertificateStatus message);
adds back status_request to context level;
2015-10-26 18:11:38 -03:00
Moisés Guimarães
42380793c9 adds comparison of OcspRequest and OcspResponse;
removes TLS Extension Status Request at context level as specific data is always needed for each session;
2015-10-26 18:11:38 -03:00
Moisés Guimarães
daf3155d3c adds partial client support to TLS Extension Status Request, a.k.a. OCSP stapling;
missing:
 - compare OcspRequest and OcspResponse;
 - execute contingence plan;
 - add nonce extension;
2015-10-26 18:11:38 -03:00
Moisés Guimarães
82f86adb8e renames TLS Extension types to follow the TLSX_ + "extension name" pattern; using names listed by IANA:
http://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml

fixes ocsp response extensions parsing in asn.c;

fixes dir slashes in .gitignore: replaces '\' with '/';

removes trailing white spaces;
2015-10-26 18:11:38 -03:00
Jacob Barthelmeh
975452f585 configure error out when not finding libraries with fast-rsa 2015-10-26 13:11:11 -06:00
John Safranek
a42308e28a Add function ssl_FreeDecodeBuffer() to release the sniffer allocated data buffer and reset the pointer. 2015-10-26 12:01:21 -07:00
John Safranek
b05332c417 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-10-26 10:17:46 -07:00
Jacob Barthelmeh
dc31b9238f wolfcrypt init 2015-10-23 11:55:17 -06:00
John Safranek
2569cd2ca4 simplify the size check for storing a DTLS handshake message fragment 2015-10-21 15:04:55 -07:00
John Safranek
54e06cd04e added deallocator for DtlsPools 2015-10-21 15:04:55 -07:00
Jacob Barthelmeh
6b3c8e8b79 Merge https://github.com/wolfssl/wolfssl 2015-10-21 10:57:39 -06:00
Jacob Barthelmeh
374e31b211 user crypto memory management 2015-10-20 09:22:43 -06:00
Jacob Barthelmeh
c132f9887e Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-10-19 13:56:39 -06:00
Jacob Barthelmeh
ee5a11b8d9 Add Intel IPP crypto for RSA
add user-crypto makefile

update README for IPP crypto

place user crypto in wolfcrypt and use autotools

adjust distributed files

move openssl compatibility consumption

auto use IPP RSA -- IPP directory containing shared libraries local

return value of wolfSSL_BN and formating of debug

openssh testing

make sure IPP not built when fips is

ipp init to select correct optimizations -- static libraries on linux -- fast-rsa disabled by default

try to only set library once

only use static IPP if fast rsa is enabled

make print out for user crypto more pretty
2015-10-19 13:51:49 -06:00
516 changed files with 58984 additions and 8318 deletions

266
.cproject Normal file
View File

@@ -0,0 +1,266 @@
<?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.crt.advproject.config.lib.debug.1488646311">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.lib.debug.1488646311" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/lib_wolfssl"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/wolfssl"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/lib_wolfssl/Debug"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/wolfssl/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="lib_wolfssl" srcPrefixMapping="" srcRootPath=""/>
<entry flags="RESOLVED" kind="libraryFile" name="wolfssl" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</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"/>
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="Debug build" errorParsers="org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.lib.debug.1488646311" name="Debug" parent="com.crt.advproject.config.lib.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;lib${BuildArtifactFileName}&quot; ; # arm-none-eabi-objdump -h -S &quot;lib${BuildArtifactFileName}&quot; &gt;&quot;${BuildArtifactFileBaseName}.lss&quot;">
<folderInfo id="com.crt.advproject.config.lib.debug.1488646311." name="/" resourcePath="">
<toolChain id="com.crt.advproject.toolchain.lib.debug.1447659825" name="NXP MCU Tools" superClass="com.crt.advproject.toolchain.lib.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.lib.debug.1439843825" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.lib.debug"/>
<builder buildPath="${workspace_loc:/lib_wolfssl}/Debug" id="com.crt.advproject.builder.lib.debug.2117662219" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.lib.debug"/>
<tool id="com.crt.advproject.cpp.lib.debug.915465581" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.lib.debug"/>
<tool id="com.crt.advproject.gcc.lib.debug.1124293510" name="MCU C Compiler" superClass="com.crt.advproject.gcc.lib.debug">
<option id="com.crt.advproject.gcc.arch.1619558061" name="Architecture" superClass="com.crt.advproject.gcc.arch" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.thumb.1295094535" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1815262015" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__REDLIB__"/>
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="__CODE_RED"/>
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
<listOptionValue builtIn="false" value="CORE_M3"/>
</option>
<option id="gnu.c.compiler.option.misc.other.879694681" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections" valueType="string"/>
<option id="gnu.c.compiler.option.include.paths.830741839" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfssl}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfssl/IDE/LPCXPRESSO/lib_wolfssl}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_18xx/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1837/inc}&quot;"/>
</option>
<inputType id="com.crt.advproject.compiler.input.8186130" superClass="com.crt.advproject.compiler.input"/>
</tool>
<tool id="com.crt.advproject.gas.lib.debug.1058960898" name="MCU Assembler" superClass="com.crt.advproject.gas.lib.debug">
<option id="com.crt.advproject.gas.arch.1605272069" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gas.thumb.451376463" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
<option id="gnu.both.asm.option.flags.crt.1769879802" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" value="-c -x assembler-with-cpp -D__REDLIB__ -DDEBUG -D__CODE_RED" valueType="string"/>
<option id="gnu.both.asm.option.include.paths.852974162" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfssl}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfssl/IDE/LPCXPRESSO/lib_wolfssl}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_18xx/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1837/inc}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.899299031" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="com.crt.advproject.assembler.input.93840004" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
</tool>
<tool id="com.crt.advproject.ar.lib.debug.1978241722" name="MCU Archiver" superClass="com.crt.advproject.ar.lib.debug"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="IDE/LPCXPRESSO/wolf_example|tirtos|testsuite|tests|swig|support|sslSniffer|scripts|rpm|mqx|mplabx|mcapi|m4|IDE/WORKBENCH|IDE/WIN|IDE/ROWLEY-CROSSWORKS-ARM|IDE/MYSQL|IDE/MDK-ARM|IDE/MDK5-ARM|IDE/LPCXPRESSO/wolf_demo|IDE/LPCXPRESSO/lpc_chip_18xx|IDE/LPCXPRESSO/lpc_board_nxp_lpcxpresso_1837|IDE/iOS|IDE/IAR-EWARM|examples|Debug|certs|build-aux|Backup|autom4te.cache|wolfcrypt/src/aes_asm.s|wolfcrypt/src/aes_asm.asm|wolfcrypt/user-crypto" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings">
<externalSettings containerId="lpc_board_nxp_lpcxpresso_1837;" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/lpc_board_nxp_lpcxpresso_1837"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/lpc_board_nxp_lpcxpresso_1837/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="lpc_board_nxp_lpcxpresso_1837" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<externalSettings containerId="lpc_chip_18xx;" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/lpc_chip_18xx"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/lpc_chip_18xx/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="lpc_chip_18xx" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
</storageModule>
</cconfiguration>
<cconfiguration id="com.crt.advproject.config.lib.release.1867429683">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.lib.release.1867429683" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/lib_wolfssl"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/wolfssl"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/lib_wolfssl/Release"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/wolfssl/Release"/>
<entry flags="RESOLVED" kind="libraryFile" name="lib_wolfssl" srcPrefixMapping="" srcRootPath=""/>
<entry flags="RESOLVED" kind="libraryFile" name="wolfssl" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</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"/>
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="Release build" errorParsers="org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.lib.release.1867429683" name="Release" parent="com.crt.advproject.config.lib.release" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;lib${BuildArtifactFileName}&quot; ; # arm-none-eabi-objdump -h -S &quot;lib${BuildArtifactFileName}&quot; &gt;&quot;${BuildArtifactFileBaseName}.lss&quot;">
<folderInfo id="com.crt.advproject.config.lib.release.1867429683." name="/" resourcePath="">
<toolChain id="com.crt.advproject.toolchain.lib.release.380660388" name="NXP MCU Tools" superClass="com.crt.advproject.toolchain.lib.release">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.lib.release.1920417960" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.lib.release"/>
<builder buildPath="${workspace_loc:/lib_wolfssl}/Release" id="com.crt.advproject.builder.lib.release.1957065966" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.lib.release"/>
<tool id="com.crt.advproject.cpp.lib.release.991239198" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.lib.release"/>
<tool id="com.crt.advproject.gcc.lib.release.1950313830" name="MCU C Compiler" superClass="com.crt.advproject.gcc.lib.release">
<option id="com.crt.advproject.gcc.arch.971195452" name="Architecture" superClass="com.crt.advproject.gcc.arch" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.thumb.167176352" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.223126135" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__REDLIB__"/>
<listOptionValue builtIn="false" value="NDEBUG"/>
<listOptionValue builtIn="false" value="__CODE_RED"/>
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
<listOptionValue builtIn="false" value="CORE_M3"/>
</option>
<option id="gnu.c.compiler.option.misc.other.637535653" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections" valueType="string"/>
<option id="gnu.c.compiler.option.include.paths.74265565" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/wolfssl}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freertos}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib_wolfssl}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfssl}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/IDE/LPCXPRESSO/lib_wolfssl}&quot;"/>
</option>
<inputType id="com.crt.advproject.compiler.input.1144243950" superClass="com.crt.advproject.compiler.input"/>
</tool>
<tool id="com.crt.advproject.gas.lib.release.364778201" name="MCU Assembler" superClass="com.crt.advproject.gas.lib.release">
<option id="com.crt.advproject.gas.arch.95085806" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gas.thumb.220186241" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
<option id="gnu.both.asm.option.flags.crt.2139190035" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" value="-c -x assembler-with-cpp -D__REDLIB__ -DNDEBUG -D__CODE_RED" valueType="string"/>
<option id="gnu.both.asm.option.include.paths.1581663756" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfssl}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/IDE/LPCXPRESSO/lib_wolfssl/}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfssl}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1598169582" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="com.crt.advproject.assembler.input.842191937" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
</tool>
<tool id="com.crt.advproject.ar.lib.release.962348675" name="MCU Archiver" superClass="com.crt.advproject.ar.lib.release"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="IDE/LPCXPRESSO/wolf_example|tirtos|testsuite|tests|swig|support|sslSniffer|scripts|rpm|mqx|mplabx|mcapi|m4|IDE/WORKBENCH|IDE/WIN|IDE/ROWLEY-CROSSWORKS-ARM|IDE/MYSQL|IDE/MDK-ARM|IDE/MDK5-ARM|IDE/LPCXPRESSO/wolf_demo|IDE/LPCXPRESSO/lpc_board_nxp_lpcxpresso_1837|IDE/iOS|IDE/IAR-EWARM|examples|Debug|certs|build-aux|Backup|autom4te.cache|wolfcrypt/src/aes_asm.s|wolfcrypt/src/aes_asm.asm|wolfcrypt/user-crypto" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="lib_wolfssl.com.crt.advproject.projecttype.lib.158532356" name="Static Library" projectType="com.crt.advproject.projecttype.lib"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="com.crt.config">
<projectStorage>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;TargetConfig&gt;
&lt;Properties property_0="" property_2="LPC18x7_43x7_2x512_BootA.cfx" property_3="NXP" property_4="LPC18S37" property_count="5" version="70200"/&gt;
&lt;infoList vendor="NXP"&gt;&lt;info chip="LPC18S37" flash_driver="LPC18x7_43x7_2x512_BootA.cfx" match_id="0x0" name="LPC18S37" resetscript="LPC18LPC43InternalFLASHBootResetscript.scp" stub="crt_emu_lpc18_43_nxp"&gt;&lt;chip&gt;&lt;name&gt;LPC18S37&lt;/name&gt;
&lt;family&gt;LPC18xx&lt;/family&gt;
&lt;vendor&gt;NXP (formerly Philips)&lt;/vendor&gt;
&lt;reset board="None" core="Real" sys="Real"/&gt;
&lt;clock changeable="TRUE" freq="20MHz" is_accurate="TRUE"/&gt;
&lt;memory can_program="true" id="Flash" is_ro="true" type="Flash"/&gt;
&lt;memory id="RAM" type="RAM"/&gt;
&lt;memory id="Periph" is_volatile="true" type="Peripheral"/&gt;
&lt;memoryInstance derived_from="Flash" id="MFlashA512" location="0x1a000000" size="0x80000"/&gt;
&lt;memoryInstance derived_from="Flash" id="MFlashB512" location="0x1b000000" size="0x80000"/&gt;
&lt;memoryInstance derived_from="RAM" id="RamLoc32" location="0x10000000" size="0x8000"/&gt;
&lt;memoryInstance derived_from="RAM" id="RamLoc40" location="0x10080000" size="0xa000"/&gt;
&lt;memoryInstance derived_from="RAM" id="RamAHB32" location="0x20000000" size="0x8000"/&gt;
&lt;memoryInstance derived_from="RAM" id="RamAHB16" location="0x20008000" size="0x4000"/&gt;
&lt;memoryInstance derived_from="RAM" id="RamAHB_ETB16" location="0x2000c000" size="0x4000"/&gt;
&lt;prog_flash blocksz="0x2000" location="0x1a000000" maxprgbuff="0x400" progwithcode="TRUE" size="0x10000"/&gt;
&lt;prog_flash blocksz="0x10000" location="0x1a010000" maxprgbuff="0x400" progwithcode="TRUE" size="0x70000"/&gt;
&lt;prog_flash blocksz="0x2000" location="0x1b000000" maxprgbuff="0x400" progwithcode="TRUE" size="0x10000"/&gt;
&lt;prog_flash blocksz="0x10000" location="0x1b010000" maxprgbuff="0x400" progwithcode="TRUE" size="0x70000"/&gt;
&lt;peripheralInstance derived_from="V7M_MPU" id="MPU" location="0xe000ed90"/&gt;
&lt;peripheralInstance derived_from="V7M_NVIC" id="NVIC" location="0xe000e000"/&gt;
&lt;peripheralInstance derived_from="V7M_DCR" id="DCR" location="0xe000edf0"/&gt;
&lt;peripheralInstance derived_from="V7M_ITM" id="ITM" location="0xe0000000"/&gt;
&lt;peripheralInstance derived_from="SCT" id="SCT" location="0x40000000"/&gt;
&lt;peripheralInstance derived_from="GPDMA" id="GPDMA" location="0x40002000"/&gt;
&lt;peripheralInstance derived_from="SPIFI" id="SPIFI" location="0x40003000"/&gt;
&lt;peripheralInstance derived_from="SDMMC" id="SDMMC" location="0x40004000"/&gt;
&lt;peripheralInstance derived_from="EMC" id="EMC" location="0x40005000"/&gt;
&lt;peripheralInstance derived_from="USB0" id="USB0" location="0x40006000"/&gt;
&lt;peripheralInstance derived_from="USB1" id="USB1" location="0x40007000"/&gt;
&lt;peripheralInstance derived_from="EEPROM" id="EEPROM" location="0x4000e000"/&gt;
&lt;peripheralInstance derived_from="ETHERNET" id="ETHERNET" location="0x40010000"/&gt;
&lt;peripheralInstance derived_from="ATIMER" id="ATIMER" location="0x40040000"/&gt;
&lt;peripheralInstance derived_from="REGFILE" id="REGFILE" location="0x40041000"/&gt;
&lt;peripheralInstance derived_from="PMC" id="PMC" location="0x40042000"/&gt;
&lt;peripheralInstance derived_from="CREG" id="CREG" location="0x40043000"/&gt;
&lt;peripheralInstance derived_from="EVENTROUTER" id="EVENTROUTER" location="0x40044000"/&gt;
&lt;peripheralInstance derived_from="RTC" id="RTC" location="0x40046000"/&gt;
&lt;peripheralInstance derived_from="CGU" id="CGU" location="0x40050000"/&gt;
&lt;peripheralInstance derived_from="CCU1" id="CCU1" location="0x40051000"/&gt;
&lt;peripheralInstance derived_from="CCU2" id="CCU2" location="0x40052000"/&gt;
&lt;peripheralInstance derived_from="RGU" id="RGU" location="0x40053000"/&gt;
&lt;peripheralInstance derived_from="WWDT" id="WWDT" location="0x40080000"/&gt;
&lt;peripheralInstance derived_from="USART0" id="USART0" location="0x40081000"/&gt;
&lt;peripheralInstance derived_from="USART2" id="USART2" location="0x400c1000"/&gt;
&lt;peripheralInstance derived_from="USART3" id="USART3" location="0x400c2000"/&gt;
&lt;peripheralInstance derived_from="UART1" id="UART1" location="0x40082000"/&gt;
&lt;peripheralInstance derived_from="SSP0" id="SSP0" location="0x40083000"/&gt;
&lt;peripheralInstance derived_from="SSP1" id="SSP1" location="0x400c5000"/&gt;
&lt;peripheralInstance derived_from="TIMER0" id="TIMER0" location="0x40084000"/&gt;
&lt;peripheralInstance derived_from="TIMER1" id="TIMER1" location="0x40085000"/&gt;
&lt;peripheralInstance derived_from="TIMER2" id="TIMER2" location="0x400c3000"/&gt;
&lt;peripheralInstance derived_from="TIMER3" id="TIMER3" location="0x400c4000"/&gt;
&lt;peripheralInstance derived_from="SCU" id="SCU" location="0x40086000"/&gt;
&lt;peripheralInstance derived_from="GPIO-PIN-INT" id="GPIO-PIN-INT" location="0x40087000"/&gt;
&lt;peripheralInstance derived_from="GPIO-GROUP-INT0" id="GPIO-GROUP-INT0" location="0x40088000"/&gt;
&lt;peripheralInstance derived_from="GPIO-GROUP-INT1" id="GPIO-GROUP-INT1" location="0x40089000"/&gt;
&lt;peripheralInstance derived_from="MCPWM" id="MCPWM" location="0x400a0000"/&gt;
&lt;peripheralInstance derived_from="I2C0" id="I2C0" location="0x400a1000"/&gt;
&lt;peripheralInstance derived_from="I2C1" id="I2C1" location="0x400e0000"/&gt;
&lt;peripheralInstance derived_from="I2S0" id="I2S0" location="0x400a2000"/&gt;
&lt;peripheralInstance derived_from="I2S1" id="I2S1" location="0x400a3000"/&gt;
&lt;peripheralInstance derived_from="C-CAN1" id="C-CAN1" location="0x400a4000"/&gt;
&lt;peripheralInstance derived_from="RITIMER" id="RITIMER" location="0x400c0000"/&gt;
&lt;peripheralInstance derived_from="QEI" id="QEI" location="0x400c6000"/&gt;
&lt;peripheralInstance derived_from="GIMA" id="GIMA" location="0x400c7000"/&gt;
&lt;peripheralInstance derived_from="DAC" id="DAC" location="0x400e1000"/&gt;
&lt;peripheralInstance derived_from="C-CAN0" id="C-CAN0" location="0x400e2000"/&gt;
&lt;peripheralInstance derived_from="ADC0" id="ADC0" location="0x400e3000"/&gt;
&lt;peripheralInstance derived_from="ADC1" id="ADC1" location="0x400e4000"/&gt;
&lt;peripheralInstance derived_from="GPIO-PORT" id="GPIO-PORT" location="0x400f4000"/&gt;
&lt;/chip&gt;
&lt;processor&gt;&lt;name gcc_name="cortex-m3"&gt;Cortex-M3&lt;/name&gt;
&lt;family&gt;Cortex-M&lt;/family&gt;
&lt;/processor&gt;
&lt;link href="nxp_lpc18xx_peripheral.xme" show="embed" type="simple"/&gt;
&lt;/info&gt;
&lt;/infoList&gt;
&lt;/TargetConfig&gt;</projectStorage>
</storageModule>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.lib.release.1867429683;com.crt.advproject.config.lib.release.1867429683.;com.crt.advproject.gcc.lib.release.1950313830;com.crt.advproject.compiler.input.1144243950">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.lib.release.1867429683;com.crt.advproject.config.lib.release.1867429683.;com.crt.advproject.gas.lib.release.364778201;com.crt.advproject.assembler.input.842191937">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.lib.debug.1488646311;com.crt.advproject.config.lib.debug.1488646311.;com.crt.advproject.gas.lib.debug.1058960898;com.crt.advproject.assembler.input.93840004">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.lib.debug.1488646311;com.crt.advproject.config.lib.debug.1488646311.;com.crt.advproject.gcc.lib.debug.1124293510;com.crt.advproject.compiler.input.8186130">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
</scannerConfigBuildInfo>
</storageModule>
</cproject>

33
.gitignore vendored
View File

@@ -39,6 +39,8 @@ cyassl.sublime*
fips.c
fips_test.c
fips
src/async.c
wolfssl/async.h
ctaocrypt/benchmark/benchmark
ctaocrypt/test/testctaocrypt
wolfcrypt/benchmark/benchmark
@@ -69,6 +71,7 @@ ntru-cert.pem
ntru-key.raw
key.der
key.pem
ecc-public-key.der
ecc-key.der
ecc-key.pem
certreq.der
@@ -112,11 +115,11 @@ cov-int
cyassl.tgz
*.log
*.trs
IDE\MDK-ARM\Projects/
IDE\MDK-ARM\STM32F2xx_StdPeriph_Lib/inc
IDE\MDK-ARM\STM32F2xx_StdPeriph_Lib/src
IDE\MDK-ARM\LPC43xx\Drivers/
IDE\MDK-ARM\LPC43xx\LPC43xx/
IDE/MDK-ARM/Projects/
IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/inc
IDE/MDK-ARM/STM32F2xx_StdPeriph_Lib/src
IDE/MDK-ARM/LPC43xx/Drivers/
IDE/MDK-ARM/LPC43xx/LPC43xx/
*.gcno
*.gcda
*.gcov
@@ -152,3 +155,23 @@ mqx/wolfcrypt_test/SaAnalysispointsManager.apconfig
mqx/wolfcrypt_benchmark/.settings
mqx/wolfcrypt_benchmark/.cwGeneratedFileSetLog
mqx/wolfcrypt_benchmark/SaAnalysispointsManager.apconfig
# User Crypto example build
wolfcrypt/user-crypto/aclocal.m4
wolfcrypt/user-crypto/config.guess
wolfcrypt/user-crypto/autom4te.cache
wolfcrypt/user-crypto/config.log
wolfcrypt/user-crypto/config.status
wolfcrypt/user-crypto/config.sub
wolfcrypt/user-crypto/depcomp
wolfcrypt/user-crypto/install-sh
wolfcrypt/user-crypto/libtool
wolfcrypt/user-crypto/ltmain.sh
wolfcrypt/user-crypto/m4
wolfcrypt/user-crypto/missing
wolfcrypt/user-crypto/Makefile.in
wolfcrypt/user-crypto/lib/libusercrypto.*
*.hzs
# wolfSSL CSharp wrapper
wrapper/CSharp/x64/

28
.project Normal file
View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>lib_wolfssl</name>
<comment></comment>
<projects>
<project>lpc_board_nxp_lpcxpresso_1837</project>
<project>lpc_chip_18xx</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

19
IDE/ARDUINO/README.md Normal file
View File

@@ -0,0 +1,19 @@
### wolfSSL with Arduino
##### Reformatting wolfSSL as a compatible Arduino Library
This is a shell script that will re-organize the wolfSSL library to be
compatible with Arduino projects. The Arduino IDE requires a library's source
files to be in the library's root directory with a header file in the name of
the library. This script moves all src/ files to the root wolfssl directory and
creates a stub header file called wolfssl.h.
To configure wolfSSL with Arduino, enter the following from within the
wolfssl/IDE/ARDUINO directory:
./wolfssl-arduino.sh
#####Including wolfSSL in Arduino Libraries (for Arduino version 1.6.6)
1. Copy the wolfSSL directory into Arduino/libraries (or wherever Arduino searches for libraries).
2. In the Arduino IDE:
- Go to ```Sketch > Include Libraries > Manage Libraries```. This refreshes your changes to the libraries.
- Next go to ```Sketch > Include Libraries > wolfSSL```. This includes wolfSSL in your sketch.

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

@@ -0,0 +1,8 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
EXTRA_DIST+= IDE/ARDUINO/README.md
EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_client.ino
EXTRA_DIST+= IDE/ARDUINO/wolfssl-arduino.sh

View File

@@ -0,0 +1,145 @@
/* wolfssl_client.ino
*
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <wolfssl.h>
#include <wolfssl/ssl.h>
#include <Ethernet.h>
const char host[] = "192.168.1.148"; // server to connect to
int port = 11111; // port on server to connect to
int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx);
int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx);
int reconnect = 10;
EthernetClient client;
WOLFSSL_CTX* ctx = 0;
WOLFSSL* ssl = 0;
WOLFSSL_METHOD* method = 0;
void setup() {
Serial.begin(9600);
method = wolfTLSv1_2_client_method();
if (method == NULL) {
Serial.println("unable to get method");
return;
}
ctx = wolfSSL_CTX_new(method);
if (ctx == NULL) {
Serial.println("unable to get ctx");
return;
}
// initialize wolfSSL using callback functions
wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
wolfSSL_SetIOSend(ctx, EthernetSend);
wolfSSL_SetIORecv(ctx, EthernetReceive);
return;
}
int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx) {
int sent = 0;
sent = client.write((byte*)msg, sz);
return sent;
}
int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx) {
int ret = 0;
while (client.available() > 0 && ret < sz) {
reply[ret++] = client.read();
}
return ret;
}
void loop() {
int err = 0;
int input = 0;
int sent = 0;
int total_input = 0;
char msg[32] = "hello wolfssl!";
int msgSz = (int)strlen(msg);
char errBuf[80];
char reply[80];
WOLFSSL_CIPHER* cipher;
if (reconnect) {
reconnect--;
if (client.connect(host, port)) {
Serial.print("Connected to ");
Serial.println(host);
ssl = wolfSSL_new(ctx);
if (ssl == NULL) {
err = wolfSSL_get_error(ssl, 0);
wolfSSL_ERR_error_string(err, errBuf);
Serial.print("Unable to get SSL object. Error = ");
Serial.println(errBuf);
}
Serial.print("SSL version is ");
Serial.println(wolfSSL_get_version(ssl));
if ((wolfSSL_write(ssl, msg, strlen(msg))) == msgSz) {
cipher = wolfSSL_get_current_cipher(ssl);
Serial.print("SSL cipher suite is ");
Serial.println(wolfSSL_CIPHER_get_name(cipher));
Serial.print("Server response: ");
while (client.available() || wolfSSL_pending(ssl)) {
input = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
total_input += input;
if ( input > 0 ) {
reply[input] = '\0';
Serial.print(reply);
} else if (input < 0) {
err = wolfSSL_get_error(ssl, 0);
wolfSSL_ERR_error_string(err, errBuf);
Serial.print("wolfSSL_read failed. Error: ");
Serial.println(errBuf);
} else {
Serial.println();
}
}
} else {
Serial.println("SSL_write failed");
}
if (ssl != NULL)
wolfSSL_free(ssl);
client.stop();
Serial.println("Connection complete.");
reconnect = 0;
} else {
Serial.println("Trying to reconnect...");
}
}
delay(1000);
}

15
IDE/ARDUINO/wolfssl-arduino.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
# this script will reformat the wolfSSL source code to be compatible with
# an Arduino project
# run as bash ./wolfssl-arduino.sh
DIR=${PWD##*/}
if [ "$DIR" == "ARDUINO" ]; then
cp ../../src/*.c ../../
cp ../../wolfcrypt/src/*.c ../../
echo "/* stub header file for Arduino compatibility */" >> ../../wolfssl.h
else
echo "ERROR: You must be in the IDE/ARDUINO directory to run this script"
fi

View File

@@ -1,8 +1,8 @@
/* benchmark-main.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,14 +16,16 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfcrypt/benchmark/benchmark.h>
typedef struct func_args {
int argc;
@@ -34,11 +36,8 @@ typedef struct func_args {
func_args args = { 0 } ;
extern double current_time(int reset) ;
extern int benchmark_test(void *args) ;
main(void) {
benchmark_test(&args) ;
return 0;
}

View File

@@ -1,8 +1,8 @@
/* current-time.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

View File

@@ -1,8 +1,8 @@
/* minimum-startup.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <stdint.h>
#pragma language=extended

View File

@@ -1,8 +1,8 @@
/* test-main.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,10 +16,11 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
typedef struct func_args {
int argc;
char** argv;

View File

@@ -4,6 +4,11 @@ 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.
Only use this directory if you are building an IAR Workbench project that
uses embOS
Included Project Files
-----------------------

6
IDE/IAR-EWARM/embOS/.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
*.bat
*.xcl
*.crun
*.dbgdt
*.dni

View File

@@ -0,0 +1,28 @@
#-----------------------------------------------------------------------------#
wolfSSL + embOS + IAR Workbench
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
For building the existing examples on a SAMV71_Explained_Ultra with Cortex M7
#-----------------------------------------------------------------------------#
See SAMV71_XULT\<example>\README_<example>
I.E. SAMV71_XULT\embOS_wolfcrypt_lib_SAMV71_XULT\README_wolfcrypt_lib
#-----------------------------------------------------------------------------#
For building wolfssl on a new CPU that is supported by embOS in IAR Workbench
#-----------------------------------------------------------------------------#
See custom_port\README_custom_port
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
Thank you for choosing wolfSSL if you ever have any questions please contact us!
support@wolfssl.com
info@wolfssl.com
Copyright © 2016 wolfSSL Inc. All rights reserved.

View File

@@ -0,0 +1,14 @@
Each example project here has it's own README please follow them in detail.
embOS_wolfcrypt_benchmark_SAMV71_XULT\README_wolfcrypt_benchmark
embOS_wolfcrypt_lib_SAMV71_XULT\README_wolfcrypt_lib
embOS_wolfcrypt_test_SAMV71_XULT\README_wolfcrypt_test
Thank you for using this guide and we hope this is helpful to you. If you have
any suggestions / feedback for us please contact us:
support@wolfssl.com
info@wolfssl.com
Copyright © 2016 wolfSSL Inc. All rights reserved.

View File

@@ -0,0 +1,33 @@
/*
* A simple example for evaluation purposes written from scratch by wolfSSL Inc
*/
/*###ICF### ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x00400000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_RAM_start__ = 0x20400000;
define symbol __ICFEDIT_region_RAM_end__ = 0x20459999;
define symbol __ICFEDIT_region_ROM_start__ = 0x00400000;
define symbol __ICFEDIT_region_ROM_end__ = 0x00599999;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
define symbol __ICFEDIT_size_heap__ = 0x13000;
/**** ###ICF###*/
define memory mem with size = 4G;
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
initialize by copy { readwrite };
do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region { readonly };
place in RAM_region { readwrite, block CSTACK, block HEAP };

View File

@@ -0,0 +1,67 @@
#ifndef _EMBOS_USER_SETTINGS_H_
#define _EMBOS_USER_SETTINGS_H_
#undef WOLFSSL_EMBOS
#define WOLFSSL_EMBOS
#undef WOLFCRYPT_ONLY
#define WOLFCRYPT_ONLY
#undef NO_64BIT
#define NO_64BIT
#undef SIZEOF_LONG
#define SIZEOF_LONG 4
#undef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG 8
#undef USE_FAST_MATH
#define USE_FAST_MATH
#undef HAVE_CHACHA
#define HAVE_CHACHA
#undef HAVE_POLY1305
#define HAVE_POLY1305
#undef ECC_SHAMIR
#define ECC_SHAMIR
#undef HAVE_ECC
#define HAVE_ECC
#undef ECC_USER_CURVES
#define ECC_USER_CURVES
#undef ECC_ALT_SIZE
#define ECC_ALT_SIZE
#undef FP_MAX_BITS_ECC
#define FP_MAX_BITS_ECC 528
#undef TFM_TIMING_RESISTANT
#define TFM_TIMING_RESISTANT
#undef WOLFSSL_SHA512
#define WOLFSSL_SHA512
#undef WOLFSSL_SHA384
#define WOLFSSL_SHA384
#undef HAVE_AESGCM
#define HAVE_AESGCM
#undef NO_INLINE
#define NO_INLINE
#undef BENCH_EMBEDDED
#define BENCH_EMBEDDED
#undef WOLFSSL_SMALL_STACK
#define WOLFSSL_SMALL_STACK
#undef USE_WOLFSSL_MEMORY
#define USE_WOLFSSL_MEMORY
#endif /* _EMBOS_USER_SETTINGS_H_ */

View File

@@ -0,0 +1,43 @@
#ifndef _EMBOS_USER_SETTINGS_H_
#define _EMBOS_USER_SETTINGS_H_
#undef WOLFCRYPT_ONLY
#define WOLFCRYPT_ONLY
#undef NO_64BIT
#define NO_64BIT
#undef SIZEOF_LONG
#define SIZEOF_LONG 4
#undef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG 8
#undef HAVE_CHACHA
#define HAVE_CHACHA
#undef HAVE_POLY1305
#define HAVE_POLY1305
#undef ECC_SHAMIR
#define ECC_SHAMIR
#undef HAVE_ECC
#define HAVE_ECC
#undef WOLFSSL_SHA512
#define WOLFSSL_SHA512
#undef WOLFSSL_SHA384
#define WOLFSSL_SHA384
#undef HAVE_AESGCM
#define HAVE_AESGCM
#undef NO_INLINE
#define NO_INLINE
#undef BENCH_EMBEDDED
#define BENCH_EMBEDDED
#endif /* _EMBOS_USER_SETTINGS_H_ */

View File

@@ -0,0 +1,191 @@
#ifndef _EMBOS_USER_SETTINGS_H_
#define _EMBOS_USER_SETTINGS_H_
/* ------------------------------------------------------------------------- */
/* Platform */
/* ------------------------------------------------------------------------- */
#undef NO_INLINE
#define NO_INLINE
#undef SINGLE_THREADED
#define SINGLE_THREADED
#undef WOLFSSL_SMALL_STACK
#define WOLFSSL_SMALL_STACK
/* ------------------------------------------------------------------------- */
/* Math Configuration */
/* ------------------------------------------------------------------------- */
#undef NO_64BIT
#define NO_64BIT
#ifndef SIZEOF_LONG
#define SIZEOF_LONG 4
#endif
#ifndef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG 8
#endif
#undef USE_FAST_MATH
#define USE_FAST_MATH
#ifdef USE_FAST_MATH
#undef TFM_TIMING_RESISTANT
// #define TFM_TIMING_RESISTANT
/* Optimizations (TFM_ARM, TFM_ASM or none) */
#undef TFM_ARM
// #define TFM_ARM
#undef TFM_ASM
//#define TFM_ASM
#endif
/* ------------------------------------------------------------------------- */
/* Crypto */
/* ------------------------------------------------------------------------- */
#undef WOLFCRYPT_ONLY
#define WOLFCRYPT_ONLY
/* ECC */
#if 1
#undef HAVE_ECC
#define HAVE_ECC
/* Manually define enabled curves */
#undef ECC_USER_CURVES
#define ECC_USER_CURVES
#define HAVE_ECC192
#define HAVE_ECC224
#undef NO_ECC256
#define HAVE_ECC384
#define HAVE_ECC521
/* Fixed point cache (speeds repeated operations against same private key) */
#undef FP_ECC
//#define FP_ECC
#ifdef FP_ECC
/* Bits / Entries */
#undef FP_ENTRIES
#define FP_ENTRIES 2
#undef FP_LUT
#define FP_LUT 4
#endif
/* Optional ECC calculation method */
/* Note: doubles heap usage, but slightly faster */
#undef ECC_SHAMIR
#define ECC_SHAMIR
/* Reduces heap usage, but slower */
#undef ECC_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
#ifdef USE_FAST_MATH
/* Max ECC bits (curve size * 8). ECC521 is (66*8) = 528. */
#undef ALT_ECC_SIZE
#define ALT_ECC_SIZE
#undef FP_MAX_BITS_ECC
#define FP_MAX_BITS_ECC 528
/* Enable TFM optimizations for ECC */
#define TFM_ECC192
#define TFM_ECC224
#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
#else
#define NO_RSA
#endif
/* AES */
#undef NO_AES
#if 1
#undef HAVE_AESGCM
#define HAVE_AESGCM
/* GCM Method: GCM_SMALL, GCM_WORD32 or GCM_TABLE */
#undef GCM_SMALL
#define GCM_SMALL
#else
#define NO_AES
#endif
/* ChaCha20 / Poly1305 */
#undef HAVE_CHACHA
#undef HAVE_POLY1305
#if 1
#define HAVE_CHACHA
#define HAVE_POLY1305
/* Needed for Poly1305 */
#undef HAVE_ONE_TIME_AUTH
#define HAVE_ONE_TIME_AUTH
#endif
/* ------------------------------------------------------------------------- */
/* Hashing */
/* ------------------------------------------------------------------------- */
/* Sha */
#undef NO_SHA
#if 1
#else
#define NO_SHA
#endif
/* Sha256 */
#undef NO_SHA256
#if 1
/* over twice as small, but 50% slower */
//#define USE_SLOW_SHA2
#else
#define NO_SHA256
#endif
/* Sha512 */
#undef WOLFSSL_SHA512
#if 1
#define WOLFSSL_SHA512
/* Sha384 */
#undef WOLFSSL_SHA384
#if 1
#define WOLFSSL_SHA384
#endif
#endif
/* MD5 */
#undef NO_MD5
#if 1
#define NO_MD5
#endif
/* ------------------------------------------------------------------------- */
/* Benchmark / Test */
/* ------------------------------------------------------------------------- */
/* Use reduced benchmark / test sizes */
#undef BENCH_EMBEDDED
#define BENCH_EMBEDDED
#undef USE_CERT_BUFFERS_2048
#define USE_CERT_BUFFERS_2048
#endif /* _EMBOS_USER_SETTINGS_H_ */

View File

@@ -0,0 +1,29 @@
#include "RTOS.h"
#include "BSP.h"
#include <stdio.h>
#include <wolfcrypt/benchmark/benchmark.h>
static OS_STACKPTR int WLFSTACK[20000]; /* Stack Size for Task */
static OS_TASK WLFTASK; /* Task */
static void wolfTask(void) {
printf("Begin Benchmark Tests\n");
benchmark_test(NULL);
printf("Benchmark Tests Complete\n");
while (1) {
BSP_ToggleLED(1);
OS_Delay(200);
}
}
int main(void) {
OS_IncDI(); /* Disable interrupts */
OS_InitKern(); /* Initialize OS */
OS_InitHW(); /* Initialize Hardware */
BSP_Init(); /* Initialize LED ports */
/* You need to create at least one task before calling OS_Start() */
OS_CREATETASK(&WLFTASK, "Tests task", wolfTask, 100, WLFSTACK);
OS_Start(); /* Start the OS */
return 0;
}

View File

@@ -0,0 +1,70 @@
Steps taken to evaluate wolfSSL with the following:
Required Software for this guide:
IAR Embedded Workbench IDE - ARM v7.60.1 (or similar version)
embOS v4.16 (for Cortex-M and IAR compiler)
wolfssl (latest version)
Required items (Hardware) for this guide:
Atmel SAM V71 Xplained Ultra (Or equivelent Cortex-M Evaluation Board)
Note: Must have J-Trace adapter (SWD or SWD + ETM)
j-Trace for ARM Cortex-M Processors
Note: You can see here: https://www.segger.com/j-trace-for-cortex-m.html
Note: You can also purchase other models, we used one from IAR v3.2
20 pin target ribbon cable
USB Cable with j-Trace adapter end
Micro usb cable
#--!! NOTE !!--#
For this guide "**SAMV71_DIR" will signify the directory:
C:\<path-to>\wolfssl\IDE\IAR-EWARM\embOS\SAMV71_XULT\
#----------------------------------------------------------------------------#
# Setup file system to evaluate wolfssl in embOS project:
# (If you have not already done so)
#----------------------------------------------------------------------------#
1. In wolfssl you will notice the directory:
wolfssl\IDE\IAR-EWARM\embOS\extract_trial_here
2. go to embOS website and download a trial for your platform
https://www.segger.com/downloads/embos ->
embOS trial for Cortex-M and IAR compiler
3. Extract (unzip) the download to
C:\<path-to>\wolfssl\IDE\IAR-EWARM\embOS\extract_trial_here\
(Note: you do not need to do anything further in this directory, the
wolfSSL evaluation projects will simply link against it)
#----------------------------------------------------------------------------#
# Evaluate wolfcrypt_benchmarks in embOS project:
#----------------------------------------------------------------------------#
1. In IAR Workbench go to Project -> Add Existing Project
a. Browse to **SAMV71_DIR\embOS_wolfcrypt_benchmark_SAMV71_XULT\
b. Choose wolfcrypt_benchmark.ewp and click "Open"
2. Go to Project -> Rebuild All
3. Connect your SAMV71 Xplained Ultra to your PC with micro USB in the "Debug"
port for power and the J-Link hooked up to SWD pins and your PC
4. Go to Project -> Download and Debug
5. Once the "Debug" environment has loaded go to: View -> Terminal I/O
(This is where the printf's will be directed to)
6. Hit "Go" (Debug option with 3 right arrows "→→→")
7. You should observe the benchmark times for the configured algorithms.
#----------------------------------------------------------------------------#
#----------------------------------------------------------------------------#
Thank you for using this guide and we hope this was helpful to you. If you have
any suggestions / feedback for us please contact us:
support@wolfssl.com
info@wolfssl.com
Copyright © 2016 wolfSSL Inc. All rights reserved.

View File

@@ -0,0 +1,39 @@
[BREAKPOINTS]
ForceImpTypeAny = 0
ShowInfoWin = 1
EnableFlashBP = 2
BPDuringExecution = 0
[CFI]
CFISize = 0x00
CFIAddr = 0x00
[CPU]
MonModeVTableAddr = 0xFFFFFFFF
MonModeDebug = 0
MaxNumAPs = 0
LowPowerHandlingMode = 0
OverrideMemMap = 0
AllowSimulation = 1
ScriptFile=""
[FLASH]
CacheExcludeSize = 0x00
CacheExcludeAddr = 0x00
MinNumBytesFlashDL = 0
SkipProgOnCRCMatch = 1
VerifyDownload = 1
AllowCaching = 1
EnableFlashDL = 2
Override = 1
Device="ATSAMV71Q21"
[GENERAL]
WorkRAMSize = 0x00
WorkRAMAddr = 0x00
RAMUsageLimit = 0x00
[SWO]
SWOLogFile=""
[MEM]
RdOverrideOrMask = 0x00
RdOverrideAndMask = 0xFFFFFFFF
RdOverrideAddr = 0xFFFFFFFF
WrOverrideOrMask = 0x00
WrOverrideAndMask = 0xFFFFFFFF
WrOverrideAddr = 0xFFFFFFFF

View File

@@ -0,0 +1,44 @@
Steps taken to evaluate wolfSSL with the following:
Required Software for this guide:
IAR Embedded Workbench IDE - ARM v7.60.1 (or similar version)
embOS v4.16 (for Cortex-M and IAR compiler)
wolfssl (latest version)
Required items (Hardware) for this guide:
Atmel SAM V71 Xplained Ultra (Or equivelent Cortex-M Evaluation Board)
Note: Must have J-Trace adapter (SWD or SWD + ETM)
j-Trace for ARM Cortex-M Processors
Note: You can see here: https://www.segger.com/j-trace-for-cortex-m.html
Note: You can also purchase other models, we used one from IAR v3.2
20 pin target ribbon cable
USB Cable with j-Trace adapter end
Micro usb cable
#--!! NOTE !!--#
For this guide "**SAMV71_DIR" will signify the directory:
C:\<path-to>\wolfssl\IDE\IAR-EWARM\embOS\SAMV71_XULT\
#----------------------------------------------------------------------------#
# Create wolfcrypt_lib.a
#----------------------------------------------------------------------------#
1. Open IAR Workbench -> Project -> Add Existing Project
a. Browse to **SAMV71_DIR\embOS_wolfcrypt_lib
c. Choose wolfcrypt_lib.ewp and click "Open"
2. Go to Project -> Rebuild All
3. Verify the library built, you should now have:
**SAMV71_DIR\embOS_wolfcrypt_lib\Debug\Bin\wolfcrypt_lib.a
#----------------------------------------------------------------------------#
#----------------------------------------------------------------------------#
Thank you for using this guide and we hope this was helpful to you. If you have
any suggestions / feedback for us please contact us:
support@wolfssl.com
info@wolfssl.com
Copyright © 2016 wolfSSL Inc. All rights reserved.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,29 @@
#include "RTOS.h"
#include "BSP.h"
#include <stdio.h>
#include <wolfcrypt/test/test.h>
static OS_STACKPTR int WLFSTACK[20000]; /* Stack Size for Task */
static OS_TASK WLFTASK; /* Task */
static void wolfTask(void) {
printf("Begin wolfcrypt tests\n");
wolfcrypt_test(NULL);
printf("wolfcrypt tests complete.\n");
while (1) {
BSP_ToggleLED(1);
OS_Delay(200);
}
}
int main(void) {
OS_IncDI(); /* Disable interrupts */
OS_InitKern(); /* Initialize OS */
OS_InitHW(); /* Initialize Hardware for OS */
BSP_Init(); /* Initialize LED ports */
/* You need to create at least one task before calling OS_Start() */
OS_CREATETASK(&WLFTASK, "Tests task", wolfTask, 100, WLFSTACK);
OS_Start(); /* Start the OS */
return 0;
}

View File

@@ -0,0 +1,69 @@
Steps taken to evaluate wolfSSL with the following:
Required Software for this guide:
IAR Embedded Workbench IDE - ARM v7.60.1 (or similar version)
embOS v4.16 (for Cortex-M and IAR compiler)
wolfssl (latest version)
Required items (Hardware) for this guide:
Atmel SAM V71 Xplained Ultra (Or equivelent Cortex-M Evaluation Board)
Note: Must have J-Trace adapter (SWD or SWD + ETM)
j-Trace for ARM Cortex-M Processors
Note: You can see here: https://www.segger.com/j-trace-for-cortex-m.html
Note: You can also purchase other models, we used one from IAR v3.2
20 pin target ribbon cable
USB Cable with j-Trace adapter end
Micro usb cable
#--!! NOTE !!--#
For this guide "**SAMV71_DIR" will signify the directory:
C:\<path-to>\wolfssl\IDE\IAR-EWARM\embOS\SAMV71_XULT\
#----------------------------------------------------------------------------#
# Setup file system to evaluate wolfssl in embOS project:
# (If you have not already done so)
#----------------------------------------------------------------------------#
1. In wolfssl you will notice the directory:
wolfssl\IDE\IAR-EWARM\embOS\extract_trial_here
2. go to embOS website and download a trial for your platform
https://www.segger.com/downloads/embos ->
embOS trial for Cortex-M and IAR compiler
3. Extract (unzip) the download to
C:\<path-to>\wolfssl\IDE\IAR-EWARM\embOS\extract_trial_here\
(Note: you do not need to do anything further in this directory, the
wolfSSL evaluation projects will simply link against it)
#----------------------------------------------------------------------------#
# Evaluate wolfcrypt_tests in embOS project:
#----------------------------------------------------------------------------#
1. In IAR Workbench go to Project -> Add Existing Project
a. Browse to **SAMV71_DIR\embOS_wolfcrypt_test_SAMV71_XULT\
b. Choose wolfcrypt_test.ewp and click "Open"
2. Go to Project -> Rebuild All
3. Connect your SAMV71 Xplained Ultra to your PC with micro USB in the "Debug"
port for power and the J-Link hooked up to SWD pins and your PC
4. Go to Project -> Download and Debug
5. Once the "Debug" environment has loaded go to: View -> Terminal I/O
(This is where the printf's will be directed to)
6. Hit "Go" (Debug option with 3 right arrows "→→→")
7. You should observe the tests run and pass.
#----------------------------------------------------------------------------#
#----------------------------------------------------------------------------#
Thank you for using this guide and we hope this was helpful to you. If you have
any suggestions / feedback for us please contact us:
support@wolfssl.com
info@wolfssl.com
Copyright © 2016 wolfSSL Inc. All rights reserved.

View File

@@ -0,0 +1,39 @@
[BREAKPOINTS]
ForceImpTypeAny = 0
ShowInfoWin = 1
EnableFlashBP = 2
BPDuringExecution = 0
[CFI]
CFISize = 0x00
CFIAddr = 0x00
[CPU]
MonModeVTableAddr = 0xFFFFFFFF
MonModeDebug = 0
MaxNumAPs = 0
LowPowerHandlingMode = 0
OverrideMemMap = 0
AllowSimulation = 1
ScriptFile=""
[FLASH]
CacheExcludeSize = 0x00
CacheExcludeAddr = 0x00
MinNumBytesFlashDL = 0
SkipProgOnCRCMatch = 1
VerifyDownload = 1
AllowCaching = 1
EnableFlashDL = 2
Override = 1
Device="ATSAMV71Q21"
[GENERAL]
WorkRAMSize = 0x00
WorkRAMAddr = 0x00
RAMUsageLimit = 0x00
[SWO]
SWOLogFile=""
[MEM]
RdOverrideOrMask = 0x00
RdOverrideAndMask = 0xFFFFFFFF
RdOverrideAddr = 0xFFFFFFFF
WrOverrideOrMask = 0x00
WrOverrideAndMask = 0xFFFFFFFF
WrOverrideAddr = 0xFFFFFFFF

View File

@@ -0,0 +1,222 @@
Steps taken to evaluate wolfSSL with the following:
Required Software for this guide:
IAR Embedded Workbench IDE - ARM v7.60.1 (or similar version)
embOS (version that supports your CPU)
wolfssl (latest version)
#----------------------------------------------------------------------------#
# SECTION 1:
# Setting up the file system
#----------------------------------------------------------------------------#
1. Browse to wolfssl/IDE/IAR-EWARM/embOS/
a. copy/paste the directory custom_port and re-name it to the CPU
you intend to target. For now we will just use the term CUSTOM_DIR
to signify a copy of the custom_port directory
#----------------------------------------------------------------------------#
# SECTION 2:
# Create wolfcrypt_lib.a
#----------------------------------------------------------------------------#
1. Open IAR Workbench -> Project -> Create New Project -> Empty Project
c. Browse to CUSTOM_DIR/wolfcrypt_lib_custom_port/ (from section 1)
d. Called it "wolfcrypt_lib" and hit "Save"
2. Go to Project -> Add Group...
a. call group wolfcrypt_sources
3. Right click on wolfcrypt_sources group -> Add -> Add Files...
4. Browse to wolfssl/wolfcrypt/src directory and select the following files:
#---------------------------------------------#
# aes.c memory.c #
# asn.c misc.c #
# chacha.c poly1305.c #
# chacha20_poly1305.c pwdbased.c #
# coding.c rabbit.c #
# des3.c random.c #
# dh.c rsa.c #
# dsa.c sha.c #
# ecc.c sha256.c #
# hash.c sha512.c #
# hmac.c tfm.c #
# md4.c wc_encrypt.c #
# md5.c wc_port.c #
#---------------------------------------------#
5. Once those are all added go to
Project -> Properties C/C++ Compiler -> Preprocessor (Tab)
a. In the field "Defined symbols:" add WOLFSSL_USER_SETTINGS
b. In the field "Additional include directories:"
put in this line: $PROJ_DIR$\..\..\..\..\..\
and this line: $PROJ_DIR$\..\custom_port_user_settings
#---------------------------------------------
#(Or alternately you can use the browse option to navigate to
#C:\<path-to>\wolfssl and
#C:\<path-to>\wolfssl\IDE\IAR-EWARM\CUSTOM_DIR\
# custom_port_user_settings\)
#(If you ever need to change or customize your build settings this
#is the file that should be modified:
#CUSTOM_DIR\custom_port_user_settings\user_settings.h)
#---------------------------------------------
7. In Project -> Options -> General Options -> Output (Tab)
Check the option for "Library" instead of "Executable"
Click "OK"
8. Go to Project -> Rebuild all (The library should build)
9. Confirm the library is now located here:
C:\<path to>\wolfssl\IDE\IAR-EWARM\CUSTOM_DIR\wolfcrypt_lib_custom_port\
Debug\Exe\wolfcrypt_lib.a
We are now set to link to this library in the evaluation project
#----------------------------------------------------------------------------#
# SECTION 3:
# Evaluate wolfcrypt tests in embOS project:
#----------------------------------------------------------------------------#
1. go to embOS website and download a trial for your platform
https://www.segger.com/downloads/embos ->
embOS trial for Cortex-M and IAR compiler
2. After downloading, extract the zip to:
C:\<path-to>\wolfssl\IDE\IAR-EWARM\embOS\extract_trial_here\
3. Open IAR Workbench -> Project -> Create New Project -> Empty Project
c. Browse to CUSTOM_DIR\wolfcrypt_test_custom_port\ (from section 1)
d. Called it "wolfcrypt_test" and hit "Save"
4. Go to Project -> Options -> C/C++ Compiler -> Preprocessor (Tab)
a. Add these to the field "Defined symbols:"
DEBUG=1
__CPU-YOU-ARE-TARGETING__ (For example: __SAMV71Q21__)
WOLFSSL_USER_SETTINGS
b. Now in the field "Additional include directories:"
$PROJ_DIR$\..\..\..\..\..\
$PROJ_DIR$\..\custom_port_user_settings
#---------------------------------------------
#(Or alternately you can use the browse option to navigate to
#C:\<path-to>\wolfssl and
#C:\<path-to>\wolfssl\IDE\IAR-EWARM\CUSTOM_DIR\
# custom_port_user_settings\)
#---------------------------------------------
5. Go to Project -> Options -> Linker -> Library (Tab)
Add to the field "Additonal libraries:"
$PROJ_DIR$\..\embOS_wolfcrypt_lib_SAMV71_XULT\Debug\Exe\wolfcrypt_lib.a
$PROJ_DIR$\..\..\extract_trial_here\Start\Lib\os7m_tlv_dp.a
6. The main project file is located here:
CUSTOM_DIR\wolfcrypt_test_custom_port\Application\runWolfcryptTests.c
7. Right Click the project name: Add -> Add Group
add a group called "Application"
8. Right Click that group and Add -> Add files
browse to the main project file in step 5 above
9. Create Groups and add files for your CPU's support. These will be .c
files found in the extracted directory in two places:
extract_trial_here\Start\BoardSupport\<vendor>\<CPU>\DeviceSupport
extract_trial_here\Start\BoardSupport\<vendor>\<CPU>\Setup
#---------------------------------------------
# For example:
# extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\
# DeviceSupport
# extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup
#---------------------------------------------
10. To get Logging working for seeing test results:
a. Go to Project -> Options -> General Options -> Library Configuration
b. In the field "Library low-level interface implementation"
Check the radio button for Semihosted
Then in the inner field marked "stdout/stderr"
Check the radio button for "Via semihosting" and click "OK"
11. Now we're ready to build and debug the project.
a. Project -> Options -> Debugger
In the field marked "Driver" Select drop-down and choose J-Link/J-Trace
Click "OK"
b. Project -> Rebuild All
c. Connect your Cortex-M evaluation board to j-Trace and j-Trace to PC
d. Connect the micro-USB to the debug port of the Cortex-M and PC for power
e. Project -> Download and Debug
12. Once the Debug environment spawns go to View -> Terminal I/O
This is where the "printf" to stdout will be directed
13. In the Debug Menu bar look for the little square with three arrows pointing
to the right. When you mouse over it should say "GO"
Click this option and in the Terminal I/O Window you should see something
like this (depends on which functionality you set in user_settings.h)
SEE NOTE 1 BELOW IF YOU OBSERVE AN ERROR (-40) IN RSA TEST
Begin wolfcrypt tests
MD5 test passed!
MD4 test passed!
SHA test passed!
SHA-256 test passed!
SHA-384 test passed!
SHA-512 test passed!
HMAC-MD5 test passed!
HMAC-SHA test passed!
HMAC-SHA256 test passed!
HMAC-SHA384 test passed!
HMAC-SHA512 test passed!
GMAC test passed!
HC-128 test passed!
Rabbit test passed!
Chacha test passed!
POLY1305 test passed!
ChaCha20-Poly1305 AEAD test passed!
DES test passed!
DES3 test passed!
AES test passed!
AES-GCM test passed!
RANDOM test passed!
RSA test passed!
DH test passed!
DSA test passed!
PWDBASED test passed!
ECC test passed!
wolfcrypt tests complete.
#----------------------------------------------------------------------------#
# SECTION 4:
# Evaluate benchmark tests in embOS project:
#----------------------------------------------------------------------------#
Follow the steps from section 3 only using
CUSTOM_DIR\wolfcrypt_benchmark_custom_port\
#----------------------------------------------------------------------------#
#----------------------------------------------------------------------------#
Thank you for using this guide and we hope this was helpful to you. If you have
any suggestions / feedback for us please contact us:
support@wolfssl.com
info@wolfssl.com
/* --------------------------------------------------------------------------*/
#### NOTE 1: ####
If you are working off of a base example project and you observe memory errors
when malloc is called, make sure that the linker script has set the HEAP high
enough.
Project -> Options -> Linker -> (Config Tab) -> Linker configuration file
Check this file for __size_heap__ it is typically set to 0x200 by default.
There are places in wolfSSL that malloc as much as 4k at a time and peak usage
can be as high as 29K if using full functionality.
/* --------------------------------------------------------------------------*/
Copyright © 2016 wolfSSL Inc. All rights reserved.

View File

@@ -0,0 +1,33 @@
/*
* A simple example for evaluation purposes written from scratch by wolfSSL Inc
*/
/*###ICF### ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x00400000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_RAM_start__ = 0x20400000;
define symbol __ICFEDIT_region_RAM_end__ = 0x20459999;
define symbol __ICFEDIT_region_ROM_start__ = 0x00400000;
define symbol __ICFEDIT_region_ROM_end__ = 0x00599999;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
define symbol __ICFEDIT_size_heap__ = 0x13000;
/**** ###ICF###*/
define memory mem with size = 4G;
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
initialize by copy { readwrite };
do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region { readonly };
place in RAM_region { readwrite, block CSTACK, block HEAP };

View File

@@ -0,0 +1,64 @@
#ifndef _EMBOS_USER_SETTINGS_H_
#define _EMBOS_USER_SETTINGS_H_
#undef WOLFSSL_EMBOS
#define WOLFSSL_EMBOS
#undef WOLFCRYPT_ONLY
#define WOLFCRYPT_ONLY
#undef NO_64BIT
#define NO_64BIT
#undef SIZEOF_LONG
#define SIZEOF_LONG 4
#undef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG 8
#undef HAVE_CHACHA
#define HAVE_CHACHA
#undef HAVE_POLY1305
#define HAVE_POLY1305
#undef ECC_SHAMIR
#define ECC_SHAMIR
#undef HAVE_ECC
#define HAVE_ECC
#undef ECC_USER_CURVES
#define ECC_USER_CURVES
#undef ECC_ALT_SIZE
#define ECC_ALT_SIZE
#undef FP_MAX_BITS_ECC
#define FP_MAX_BITS_ECC 528
#undef TFM_TIMING_RESISTANT
#define TFM_TIMING_RESISTANT
#undef WOLFSSL_SHA512
#define WOLFSSL_SHA512
#undef WOLFSSL_SHA384
#define WOLFSSL_SHA384
#undef HAVE_AESGCM
#define HAVE_AESGCM
#undef NO_INLINE
#define NO_INLINE
#undef BENCH_EMBEDDED
#define BENCH_EMBEDDED
#undef WOLFSSL_SMALL_STACK
#define WOLFSSL_SMALL_STACK
#undef USE_WOLFSSL_MEMORY
#define USE_WOLFSSL_MEMORY
#endif /* _EMBOS_USER_SETTINGS_H_ */

View File

@@ -0,0 +1,29 @@
#include "RTOS.h"
#include "BSP.h"
#include <stdio.h>
#include <wolfcrypt/benchmark/benchmark.h>
static OS_STACKPTR int WLFSTACK[20000]; /* Stack Size for Task */
static OS_TASK WLFTASK; /* Task */
static void wolfTask(void) {
printf("Begin benchmark tests\n");
wolfcrypt_test(NULL);
printf("benchmark tests complete.\n");
while (1) {
BSP_ToggleLED(1);
OS_Delay(200);
}
}
int main(void) {
OS_IncDI(); /* Disable interrupts */
OS_InitKern(); /* Initialize OS */
OS_InitHW(); /* Initialize Hardware */
BSP_Init(); /* Initialize LED ports */
/* You need to create at least one task before calling OS_Start() */
OS_CREATETASK(&WLFTASK, "Tests task", wolfTask, 100, WLFSTACK);
OS_Start(); /* Start the OS */
return 0;
}

View File

@@ -0,0 +1,30 @@
#include "RTOS.h"
#include "BSP.h"
#include <stdio.h>
#include <wolfcrypt/test/test.h>
static OS_STACKPTR int WLFSTACK[20000]; /* Stack Size for Task */
static OS_TASK WLFTASK; /* Task */
static void wolfTask(void) {
printf("Begin wolfcrypt tests\n");
wolfcrypt_test(NULL);
printf("wolfcrypt tests complete.\n");
while (1) {
BSP_ToggleLED(1);
OS_Delay(200);
}
}
int main(void) {
OS_IncDI(); /* Disable interrupts */
OS_InitKern(); /* Initialize OS */
OS_InitHW(); /* Initialize Hardware for OS */
BSP_Init(); /* Initialize LED ports */
/* You need to create at least one task before calling OS_Start() */
OS_CREATETASK(&WLFTASK, "Tests task", wolfTask, 100, WLFSTACK);
OS_Start(); /* Start the OS */
return 0;
}

View File

@@ -0,0 +1,32 @@
An empty directory used when extracting segger trial.
*** For SAMV71_XULT project ***
This trial can be found here:
https://www.segger.com/downloads/embos
Look for the Download for IAR compiler and Cortex M
The title should be: "embOS trial for Cortex-M and IAR compiler"
*** For custom port ***
The trial will still be located at: https://www.segger.com/downloads/embos
However you will need to identify and download the correct project for your
target CPU
Thank you for using this guide and we hope this is helpful to you. If you have
any suggestions / feedback for us please contact us:
support@wolfssl.com
info@wolfssl.com
Copyright © 2016 wolfSSL Inc. All rights reserved.

32
IDE/LPCXPRESSO/README.md Normal file
View File

@@ -0,0 +1,32 @@
# WolfSSL Example using the OM13076 (LPCXpresso18S37) board
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.
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.
## WolfSSL example projects:
1. `wolf_example`. It has console options to run the Wolf tests and benchmarks ('t' for the WolfSSL Tests and 'b' for the WolfSSL Benchmarks).
## Static libraries projects:
1. `wolfssl` for WolfSSL. The WolfSSL port for the LPC18XX platform is located in `IDE/LPCXPRESSO/lpc_18xx_port.c`. This has platform specific functions for `current_time` and `rand_gen`. The `WOLF_USER_SETTINGS` define is set which allows all WolfSSL settings to exist in the `user_settings.h` file (see this file for all customizations used).
## Important Files
1. `IDE/LPCXPRESSO/user_settings.h`. This provides a reference for library settings used to optimize for this embedded platform.
2. `IDE/LPCXPRESSO/lpc_18xx_port.c`. This defines the required time and random number functions for the WolfSSL library.
3. `IDE/LPCXPRESSO/wolf_example/wolf_example.c`. This shows use of the WolfSSL tests and benchmarks.

View File

@@ -0,0 +1,109 @@
/* lpc_18xx_port.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include "board.h"
#include "otp_18xx_43xx.h" /* For RNG */
#include "timer_18xx_43xx.h"
static uint32_t mTimeInit = 0;
#define TIMER_SCALER 1000000
static void init_time(void)
{
if(mTimeInit == 0) {
uint32_t timerFreq;
/* Set current time for RTC 2:00:00PM, 2012-10-05 */
RTC_TIME_T FullTime;
Chip_RTC_Init(LPC_RTC);
FullTime.time[RTC_TIMETYPE_SECOND] = 0;
FullTime.time[RTC_TIMETYPE_MINUTE] = 0;
FullTime.time[RTC_TIMETYPE_HOUR] = 14;
FullTime.time[RTC_TIMETYPE_DAYOFMONTH] = 5;
FullTime.time[RTC_TIMETYPE_DAYOFWEEK] = 5;
FullTime.time[RTC_TIMETYPE_DAYOFYEAR] = 279;
FullTime.time[RTC_TIMETYPE_MONTH] = 10;
FullTime.time[RTC_TIMETYPE_YEAR] = 2012;
Chip_RTC_SetFullTime(LPC_RTC, &FullTime);
/* Enable RTC (starts increase the tick counter and second counter register) */
Chip_RTC_Enable(LPC_RTC, ENABLE);
/* Enable timer 1 clock and reset it */
Chip_TIMER_Init(LPC_TIMER2);
Chip_RGU_TriggerReset(RGU_TIMER2_RST);
while (Chip_RGU_InReset(RGU_TIMER2_RST)) {}
/* Get timer peripheral clock rate */
timerFreq = Chip_Clock_GetRate(CLK_MX_TIMER2);
/* Timer setup */
Chip_TIMER_Reset(LPC_TIMER2);
Chip_TIMER_PrescaleSet(LPC_TIMER2, timerFreq/TIMER_SCALER);
Chip_TIMER_Enable(LPC_TIMER2);
mTimeInit = 1;
}
}
double current_time()
{
//RTC_TIME_T FullTime;
uint32_t timerMs;
init_time();
timerMs = Chip_TIMER_ReadCount(LPC_TIMER2);
//Chip_RTC_GetFullTime(LPC_RTC, &FullTime);
//(double)FullTime.time[RTC_TIMETYPE_SECOND]
return (double)timerMs/TIMER_SCALER;
}
/* Memory location of the generated random numbers (for total of 128 bits) */
static volatile uint32_t* mRandData = (uint32_t*)0x40045050;
static uint32_t mRandInit = 0;
static uint32_t mRandIndex = 0;
uint32_t rand_gen(void)
{
uint32_t rand = 0;
uint32_t status = LPC_OK;
if(mRandIndex == 0) {
if(mRandInit == 0) {
Chip_OTP_Init();
mRandInit = 1;
}
status = Chip_OTP_GenRand();
}
if(status == LPC_OK) {
rand = mRandData[mRandIndex];
}
else {
printf("GenRand Failed 0x%x\n", status);
}
if(++mRandIndex > 4) {
mRandIndex = 0;
}
return rand;
}

View File

@@ -0,0 +1,81 @@
#include <stdint.h>
/* Configuration */
#define WOLFSSL_USER_IO
#define WOLFSSL_GENERAL_ALIGNMENT 4
#define WOLFSSL_SMALL_STACK
#define WOLFSSL_BASE64_ENCODE
#define WOLFSSL_SHA512
#define HAVE_ECC
#define HAVE_AESGCM
#define HAVE_CURVE25519
#define HAVE_HKDF
#define HAVE_HASHDRBG
#define HAVE_CHACHA
#define HAVE_POLY1305
#define HAVE_ONE_TIME_AUTH
#define HAVE_TLS_EXTENSIONS
#define HAVE_SUPPORTED_CURVES
#define HAVE_ERRNO_H
#define HAVE_LWIP_NATIVE
#define FP_LUT 4
#define FP_MAX_BITS 2048 /* 4096 */
#define FP_MAX_BITS_ECC 512
#define ALT_ECC_SIZE
#define USE_FAST_MATH
#define SMALL_SESSION_CACHE
#define CURVED25519_SMALL
#define RSA_LOW_MEM
#define GCM_SMALL
#define ECC_SHAMIR
#define USE_SLOW_SHA2
#define MP_LOW_MEM
#define TFM_TIMING_RESISTANT
//#define TFM_ARM
/* Remove Features */
#define NO_DEV_RANDOM
#define NO_FILESYSTEM
#define NO_WRITEV
#define NO_MAIN_DRIVER
#define NO_WOLFSSL_MEMORY
#define NO_DEV_RANDOM
#define NO_MD4
#define NO_RABBIT
#define NO_HC128
#define NO_DSA
#define NO_PWDBASED
#define NO_PSK
#define NO_64BIT
#define NO_WOLFSSL_SERVER
#define NO_OLD_TLS
#define ECC_USER_CURVES /* Disables P-112, P-128, P-160, P-192, P-224, P-384, P-521 but leaves P-256 enabled */
#define NO_DES3
#define NO_MD5
#define NO_RC4
#define NO_DH
#define NO_SHA
/* Benchmark / Testing */
#define BENCH_EMBEDDED
#define USE_CERT_BUFFERS_1024
/* Custom functions */
extern uint32_t rand_gen(void);
#define CUSTOM_RAND_GENERATE rand_gen
#define CUSTOM_RAND_TYPE uint32_t
extern double current_time(int reset);
#define WOLFSSL_USER_CURRTIME
/* Debugging - Optional */
#if 0
#define fprintf(file, format, ...) printf(format, ##__VA_ARGS__)
#define DEBUG_WOLFSSL
#endif

View File

@@ -0,0 +1,314 @@
<?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.crt.advproject.config.exe.debug.1392194113">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.debug.1392194113" 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"/>
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="Debug build" errorParsers="org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.exe.debug.1392194113" name="Debug" parent="com.crt.advproject.config.exe.debug" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;${BuildArtifactFileName}&quot;; # arm-none-eabi-objcopy -v -O binary &quot;${BuildArtifactFileName}&quot; &quot;${BuildArtifactFileBaseName}.bin&quot; ; # checksum -p ${TargetChip} -d &quot;${BuildArtifactFileBaseName}.bin&quot;; ">
<folderInfo id="com.crt.advproject.config.exe.debug.1392194113." name="/" resourcePath="">
<toolChain id="com.crt.advproject.toolchain.exe.debug.269547500" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.exe.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.exe.debug.178620013" name="ARM-based MCU (Debug)" superClass="com.crt.advproject.platform.exe.debug"/>
<builder buildPath="${workspace_loc:/periph_aes}/Debug" id="com.crt.advproject.builder.exe.debug.1103441586" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.exe.debug"/>
<tool id="com.crt.advproject.cpp.exe.debug.1779678200" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.exe.debug"/>
<tool id="com.crt.advproject.gcc.exe.debug.66420591" name="MCU C Compiler" superClass="com.crt.advproject.gcc.exe.debug">
<option id="com.crt.advproject.gcc.arch.1636223398" name="Architecture" superClass="com.crt.advproject.gcc.arch" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.thumb.22102082" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.100262489" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="__CODE_RED"/>
<listOptionValue builtIn="false" value="__USE_LPCOPEN"/>
<listOptionValue builtIn="false" value="__REDLIB__"/>
<listOptionValue builtIn="false" value="CORE_M3"/>
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
</option>
<option id="gnu.c.compiler.option.misc.other.1584633080" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections" valueType="string"/>
<option id="com.crt.advproject.gcc.hdrlib.1349463484" name="Library headers" superClass="com.crt.advproject.gcc.hdrlib" value="Redlib" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.1496746959" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfssl}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_18xx}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1837}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_18xx/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1837/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfssl/IDE/LPCXPRESSO/lib_wolfssl}&quot;"/>
</option>
<inputType id="com.crt.advproject.compiler.input.1034801598" superClass="com.crt.advproject.compiler.input"/>
</tool>
<tool id="com.crt.advproject.gas.exe.debug.81526022" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.debug">
<option id="com.crt.advproject.gas.arch.1700683015" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gas.thumb.1440788533" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
<option id="gnu.both.asm.option.flags.crt.1089029715" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" value="-c -x assembler-with-cpp -DDEBUG -D__CODE_RED -D__REDLIB__" valueType="string"/>
<option id="com.crt.advproject.gas.hdrlib.245714003" name="Library headers" superClass="com.crt.advproject.gas.hdrlib" value="Redlib" valueType="enumerated"/>
<option id="gnu.both.asm.option.include.paths.10041507" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfssl}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_18xx/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1837/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfssl/IDE/LPCXPRESSO/lib_wolfssl}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.490789676" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="com.crt.advproject.assembler.input.381304950" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
</tool>
<tool id="com.crt.advproject.link.cpp.exe.debug.269159921" name="MCU C++ Linker" superClass="com.crt.advproject.link.cpp.exe.debug"/>
<tool id="com.crt.advproject.link.exe.debug.1027515786" name="MCU Linker" superClass="com.crt.advproject.link.exe.debug">
<option id="com.crt.advproject.link.gcc.multicore.master.userobjs.347382571" name="Slave Objects (not visible)" superClass="com.crt.advproject.link.gcc.multicore.master.userobjs" valueType="userObjs"/>
<option id="com.crt.advproject.link.arch.1009411462" name="Architecture" superClass="com.crt.advproject.link.arch" value="com.crt.advproject.link.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.link.thumb.546852255" name="Thumb mode" superClass="com.crt.advproject.link.thumb" value="true" valueType="boolean"/>
<option id="com.crt.advproject.link.script.2057008305" name="Linker script" superClass="com.crt.advproject.link.script" value="&quot;wolf_example_Debug.ld&quot;" valueType="string"/>
<option id="com.crt.advproject.link.manage.429568983" name="Manage linker script" superClass="com.crt.advproject.link.manage" value="true" valueType="boolean"/>
<option id="gnu.c.link.option.nostdlibs.472954815" name="No startup or default libs (-nostdlib)" superClass="gnu.c.link.option.nostdlibs" value="true" valueType="boolean"/>
<option id="gnu.c.link.option.other.1883049936" name="Other options (-Xlinker [option])" superClass="gnu.c.link.option.other" valueType="stringList">
<listOptionValue builtIn="false" value="-Map=&quot;${BuildArtifactFileBaseName}.map&quot;"/>
<listOptionValue builtIn="false" value="--gc-sections"/>
</option>
<option id="com.crt.advproject.link.gcc.hdrlib.2083914317" name="Library" superClass="com.crt.advproject.link.gcc.hdrlib" value="com.crt.advproject.gcc.link.hdrlib.codered.nohost" valueType="enumerated"/>
<option id="gnu.c.link.option.libs.1062640389" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="wolfssl"/>
<listOptionValue builtIn="false" value="lpc_board_nxp_lpcxpresso_1837"/>
<listOptionValue builtIn="false" value="lpc_chip_18xx"/>
</option>
<option id="gnu.c.link.option.paths.1267290263" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfssl/Debug}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_18xx/Debug}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1837/Debug}&quot;"/>
</option>
<option id="com.crt.advproject.link.gcc.multicore.slave.1774732693" name="Multicore configuration" superClass="com.crt.advproject.link.gcc.multicore.slave"/>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.214986153" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings">
<externalSettings containerId="lpc_board_nxp_lpcxpresso_1837;" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/lpc_board_nxp_lpcxpresso_1837"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/lpc_board_nxp_lpcxpresso_1837/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="lpc_board_nxp_lpcxpresso_1837" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<externalSettings containerId="lpc_chip_18xx;" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/lpc_chip_18xx"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/lpc_chip_18xx/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="lpc_chip_18xx" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<externalSettings containerId="wolfssl;" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/lib_wolfssl"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/wolfssl"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/lib_wolfssl/Debug"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/wolfssl/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="lib_wolfssl" srcPrefixMapping="" srcRootPath=""/>
<entry flags="RESOLVED" kind="libraryFile" name="wolfssl" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
</storageModule>
</cconfiguration>
<cconfiguration id="com.crt.advproject.config.exe.release.1867143408">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.crt.advproject.config.exe.release.1867143408" 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"/>
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="axf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="Release build" errorParsers="org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="com.crt.advproject.config.exe.release.1867143408" name="Release" parent="com.crt.advproject.config.exe.release" postannouncebuildStep="Performing post-build steps" postbuildStep="arm-none-eabi-size &quot;${BuildArtifactFileName}&quot;; # arm-none-eabi-objcopy -v -O binary &quot;${BuildArtifactFileName}&quot; &quot;${BuildArtifactFileBaseName}.bin&quot; ; # checksum -p ${TargetChip} -d &quot;${BuildArtifactFileBaseName}.bin&quot;; ">
<folderInfo id="com.crt.advproject.config.exe.release.1867143408." name="/" resourcePath="">
<toolChain id="com.crt.advproject.toolchain.exe.release.536172938" name="Code Red MCU Tools" superClass="com.crt.advproject.toolchain.exe.release">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF" id="com.crt.advproject.platform.exe.release.1036462619" name="ARM-based MCU (Release)" superClass="com.crt.advproject.platform.exe.release"/>
<builder buildPath="${workspace_loc:/periph_aes}/Release" id="com.crt.advproject.builder.exe.release.56266263" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="com.crt.advproject.builder.exe.release"/>
<tool id="com.crt.advproject.cpp.exe.release.41154765" name="MCU C++ Compiler" superClass="com.crt.advproject.cpp.exe.release"/>
<tool id="com.crt.advproject.gcc.exe.release.1544905822" name="MCU C Compiler" superClass="com.crt.advproject.gcc.exe.release">
<option id="com.crt.advproject.gcc.arch.719158708" name="Architecture" superClass="com.crt.advproject.gcc.arch" value="com.crt.advproject.gcc.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gcc.thumb.155945396" name="Thumb mode" superClass="com.crt.advproject.gcc.thumb" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.418999860" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="NDEBUG"/>
<listOptionValue builtIn="false" value="__CODE_RED"/>
<listOptionValue builtIn="false" value="__USE_LPCOPEN"/>
<listOptionValue builtIn="false" value="__REDLIB__"/>
<listOptionValue builtIn="false" value="CORE_M3"/>
</option>
<option id="gnu.c.compiler.option.misc.other.272000735" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections" valueType="string"/>
<option id="com.crt.advproject.gcc.hdrlib.25535373" name="Library headers" superClass="com.crt.advproject.gcc.hdrlib" value="Redlib" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.226349045" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_18xx/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1837/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}_aes/wolfssl}&quot;"/>
</option>
<inputType id="com.crt.advproject.compiler.input.1744383012" superClass="com.crt.advproject.compiler.input"/>
</tool>
<tool id="com.crt.advproject.gas.exe.release.1699519623" name="MCU Assembler" superClass="com.crt.advproject.gas.exe.release">
<option id="com.crt.advproject.gas.arch.1123396472" name="Architecture" superClass="com.crt.advproject.gas.arch" value="com.crt.advproject.gas.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.gas.thumb.2100866524" name="Thumb mode" superClass="com.crt.advproject.gas.thumb" value="true" valueType="boolean"/>
<option id="gnu.both.asm.option.flags.crt.1806449413" name="Assembler flags" superClass="gnu.both.asm.option.flags.crt" value="-c -x assembler-with-cpp -DNDEBUG -D__CODE_RED -D__REDLIB__" valueType="string"/>
<option id="com.crt.advproject.gas.hdrlib.1996275203" name="Library headers" superClass="com.crt.advproject.gas.hdrlib" value="Redlib" valueType="enumerated"/>
<option id="gnu.both.asm.option.include.paths.960906264" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}_aes/wolfssl}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.338022624" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="com.crt.advproject.assembler.input.4154826" name="Additional Assembly Source Files" superClass="com.crt.advproject.assembler.input"/>
</tool>
<tool id="com.crt.advproject.link.cpp.exe.release.1471941871" name="MCU C++ Linker" superClass="com.crt.advproject.link.cpp.exe.release"/>
<tool id="com.crt.advproject.link.exe.release.1371066567" name="MCU Linker" superClass="com.crt.advproject.link.exe.release">
<option id="com.crt.advproject.link.gcc.multicore.master.userobjs.577629279" name="Slave Objects (not visible)" superClass="com.crt.advproject.link.gcc.multicore.master.userobjs" valueType="userObjs"/>
<option id="com.crt.advproject.link.arch.248852868" name="Architecture" superClass="com.crt.advproject.link.arch" value="com.crt.advproject.link.target.cm3" valueType="enumerated"/>
<option id="com.crt.advproject.link.thumb.2023190156" name="Thumb mode" superClass="com.crt.advproject.link.thumb" value="true" valueType="boolean"/>
<option id="com.crt.advproject.link.script.829888725" name="Linker script" superClass="com.crt.advproject.link.script" value="&quot;wolf_example_Release.ld&quot;" valueType="string"/>
<option id="com.crt.advproject.link.manage.1603413806" name="Manage linker script" superClass="com.crt.advproject.link.manage" value="true" valueType="boolean"/>
<option id="gnu.c.link.option.nostdlibs.1533889102" name="No startup or default libs (-nostdlib)" superClass="gnu.c.link.option.nostdlibs" value="true" valueType="boolean"/>
<option id="gnu.c.link.option.other.1538644196" name="Other options (-Xlinker [option])" superClass="gnu.c.link.option.other" valueType="stringList">
<listOptionValue builtIn="false" value="-Map=&quot;${BuildArtifactFileBaseName}.map&quot;"/>
<listOptionValue builtIn="false" value="--gc-sections"/>
</option>
<option id="com.crt.advproject.link.gcc.hdrlib.1171310191" name="Library" superClass="com.crt.advproject.link.gcc.hdrlib" value="com.crt.advproject.gcc.link.hdrlib.codered.nohost" valueType="enumerated"/>
<option id="gnu.c.link.option.libs.499818807" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
<listOptionValue builtIn="false" value="lpc_board_nxp_lpcxpresso_1837"/>
<listOptionValue builtIn="false" value="lpc_chip_18xx"/>
</option>
<option id="gnu.c.link.option.paths.78373300" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_chip_18xx/Release}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lpc_board_nxp_lpcxpresso_1837/Release}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.217525865" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="example"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="periph_aes.com.crt.advproject.projecttype.exe.432786573" name="Executable" projectType="com.crt.advproject.projecttype.exe"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="com.crt.config">
<projectStorage>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;TargetConfig&gt;
&lt;Properties property_0="" property_2="LPC18x7_43x7_2x512_BootA.cfx" property_3="NXP" property_4="LPC1837" property_count="5" version="70200"/&gt;
&lt;infoList vendor="NXP"&gt;&lt;info chip="LPC1837" flash_driver="LPC18x7_43x7_2x512_BootA.cfx" match_id="0x0" name="LPC1837" resetscript="LPC18LPC43InternalFLASHBootResetscript.scp" stub="crt_emu_lpc18_43_nxp"&gt;&lt;chip&gt;&lt;name&gt;LPC1837&lt;/name&gt;
&lt;family&gt;LPC18xx&lt;/family&gt;
&lt;vendor&gt;NXP (formerly Philips)&lt;/vendor&gt;
&lt;reset board="None" core="Real" sys="Real"/&gt;
&lt;clock changeable="TRUE" freq="20MHz" is_accurate="TRUE"/&gt;
&lt;memory can_program="true" id="Flash" is_ro="true" type="Flash"/&gt;
&lt;memory id="RAM" type="RAM"/&gt;
&lt;memory id="Periph" is_volatile="true" type="Peripheral"/&gt;
&lt;memoryInstance derived_from="Flash" id="MFlashA512" location="0x1a000000" size="0x80000"/&gt;
&lt;memoryInstance derived_from="Flash" id="MFlashB512" location="0x1b000000" size="0x80000"/&gt;
&lt;memoryInstance derived_from="RAM" id="RamLoc32" location="0x10000000" size="0x8000"/&gt;
&lt;memoryInstance derived_from="RAM" id="RamLoc40" location="0x10080000" size="0xa000"/&gt;
&lt;memoryInstance derived_from="RAM" id="RamAHB32" location="0x20000000" size="0x8000"/&gt;
&lt;memoryInstance derived_from="RAM" id="RamAHB16" location="0x20008000" size="0x4000"/&gt;
&lt;memoryInstance derived_from="RAM" id="RamAHB_ETB16" location="0x2000c000" size="0x4000"/&gt;
&lt;prog_flash blocksz="0x2000" location="0x1a000000" maxprgbuff="0x400" progwithcode="TRUE" size="0x10000"/&gt;
&lt;prog_flash blocksz="0x10000" location="0x1a010000" maxprgbuff="0x400" progwithcode="TRUE" size="0x70000"/&gt;
&lt;prog_flash blocksz="0x2000" location="0x1b000000" maxprgbuff="0x400" progwithcode="TRUE" size="0x10000"/&gt;
&lt;prog_flash blocksz="0x10000" location="0x1b010000" maxprgbuff="0x400" progwithcode="TRUE" size="0x70000"/&gt;
&lt;peripheralInstance derived_from="V7M_MPU" determined="infoFile" id="MPU" location="0xe000ed90"/&gt;
&lt;peripheralInstance derived_from="V7M_NVIC" determined="infoFile" id="NVIC" location="0xe000e000"/&gt;
&lt;peripheralInstance derived_from="V7M_DCR" determined="infoFile" id="DCR" location="0xe000edf0"/&gt;
&lt;peripheralInstance derived_from="V7M_ITM" determined="infoFile" id="ITM" location="0xe0000000"/&gt;
&lt;peripheralInstance derived_from="SCT" determined="infoFile" id="SCT" location="0x40000000"/&gt;
&lt;peripheralInstance derived_from="GPDMA" determined="infoFile" id="GPDMA" location="0x40002000"/&gt;
&lt;peripheralInstance derived_from="SPIFI" determined="infoFile" id="SPIFI" location="0x40003000"/&gt;
&lt;peripheralInstance derived_from="SDMMC" determined="infoFile" id="SDMMC" location="0x40004000"/&gt;
&lt;peripheralInstance derived_from="EMC" determined="infoFile" id="EMC" location="0x40005000"/&gt;
&lt;peripheralInstance derived_from="USB0" determined="infoFile" id="USB0" location="0x40006000"/&gt;
&lt;peripheralInstance derived_from="USB1" determined="infoFile" id="USB1" location="0x40007000"/&gt;
&lt;peripheralInstance derived_from="EEPROM" determined="infoFile" id="EEPROM" location="0x4000e000"/&gt;
&lt;peripheralInstance derived_from="ETHERNET" determined="infoFile" id="ETHERNET" location="0x40010000"/&gt;
&lt;peripheralInstance derived_from="ATIMER" determined="infoFile" id="ATIMER" location="0x40040000"/&gt;
&lt;peripheralInstance derived_from="REGFILE" determined="infoFile" id="REGFILE" location="0x40041000"/&gt;
&lt;peripheralInstance derived_from="PMC" determined="infoFile" id="PMC" location="0x40042000"/&gt;
&lt;peripheralInstance derived_from="CREG" determined="infoFile" id="CREG" location="0x40043000"/&gt;
&lt;peripheralInstance derived_from="EVENTROUTER" determined="infoFile" id="EVENTROUTER" location="0x40044000"/&gt;
&lt;peripheralInstance derived_from="RTC" determined="infoFile" id="RTC" location="0x40046000"/&gt;
&lt;peripheralInstance derived_from="CGU" determined="infoFile" id="CGU" location="0x40050000"/&gt;
&lt;peripheralInstance derived_from="CCU1" determined="infoFile" id="CCU1" location="0x40051000"/&gt;
&lt;peripheralInstance derived_from="CCU2" determined="infoFile" id="CCU2" location="0x40052000"/&gt;
&lt;peripheralInstance derived_from="RGU" determined="infoFile" id="RGU" location="0x40053000"/&gt;
&lt;peripheralInstance derived_from="WWDT" determined="infoFile" id="WWDT" location="0x40080000"/&gt;
&lt;peripheralInstance derived_from="USART0" determined="infoFile" id="USART0" location="0x40081000"/&gt;
&lt;peripheralInstance derived_from="USART2" determined="infoFile" id="USART2" location="0x400c1000"/&gt;
&lt;peripheralInstance derived_from="USART3" determined="infoFile" id="USART3" location="0x400c2000"/&gt;
&lt;peripheralInstance derived_from="UART1" determined="infoFile" id="UART1" location="0x40082000"/&gt;
&lt;peripheralInstance derived_from="SSP0" determined="infoFile" id="SSP0" location="0x40083000"/&gt;
&lt;peripheralInstance derived_from="SSP1" determined="infoFile" id="SSP1" location="0x400c5000"/&gt;
&lt;peripheralInstance derived_from="TIMER0" determined="infoFile" id="TIMER0" location="0x40084000"/&gt;
&lt;peripheralInstance derived_from="TIMER1" determined="infoFile" id="TIMER1" location="0x40085000"/&gt;
&lt;peripheralInstance derived_from="TIMER2" determined="infoFile" id="TIMER2" location="0x400c3000"/&gt;
&lt;peripheralInstance derived_from="TIMER3" determined="infoFile" id="TIMER3" location="0x400c4000"/&gt;
&lt;peripheralInstance derived_from="SCU" determined="infoFile" id="SCU" location="0x40086000"/&gt;
&lt;peripheralInstance derived_from="GPIO-PIN-INT" determined="infoFile" id="GPIO-PIN-INT" location="0x40087000"/&gt;
&lt;peripheralInstance derived_from="GPIO-GROUP-INT0" determined="infoFile" id="GPIO-GROUP-INT0" location="0x40088000"/&gt;
&lt;peripheralInstance derived_from="GPIO-GROUP-INT1" determined="infoFile" id="GPIO-GROUP-INT1" location="0x40089000"/&gt;
&lt;peripheralInstance derived_from="MCPWM" determined="infoFile" id="MCPWM" location="0x400a0000"/&gt;
&lt;peripheralInstance derived_from="I2C0" determined="infoFile" id="I2C0" location="0x400a1000"/&gt;
&lt;peripheralInstance derived_from="I2C1" determined="infoFile" id="I2C1" location="0x400e0000"/&gt;
&lt;peripheralInstance derived_from="I2S0" determined="infoFile" id="I2S0" location="0x400a2000"/&gt;
&lt;peripheralInstance derived_from="I2S1" determined="infoFile" id="I2S1" location="0x400a3000"/&gt;
&lt;peripheralInstance derived_from="C-CAN1" determined="infoFile" id="C-CAN1" location="0x400a4000"/&gt;
&lt;peripheralInstance derived_from="RITIMER" determined="infoFile" id="RITIMER" location="0x400c0000"/&gt;
&lt;peripheralInstance derived_from="QEI" determined="infoFile" id="QEI" location="0x400c6000"/&gt;
&lt;peripheralInstance derived_from="GIMA" determined="infoFile" id="GIMA" location="0x400c7000"/&gt;
&lt;peripheralInstance derived_from="DAC" determined="infoFile" id="DAC" location="0x400e1000"/&gt;
&lt;peripheralInstance derived_from="C-CAN0" determined="infoFile" id="C-CAN0" location="0x400e2000"/&gt;
&lt;peripheralInstance derived_from="ADC0" determined="infoFile" id="ADC0" location="0x400e3000"/&gt;
&lt;peripheralInstance derived_from="ADC1" determined="infoFile" id="ADC1" location="0x400e4000"/&gt;
&lt;peripheralInstance derived_from="GPIO-PORT" determined="infoFile" id="GPIO-PORT" location="0x400f4000"/&gt;
&lt;/chip&gt;
&lt;processor&gt;&lt;name gcc_name="cortex-m3"&gt;Cortex-M3&lt;/name&gt;
&lt;family&gt;Cortex-M&lt;/family&gt;
&lt;/processor&gt;
&lt;link href="nxp_lpc18xx_peripheral.xme" show="embed" type="simple"/&gt;
&lt;/info&gt;
&lt;/infoList&gt;
&lt;/TargetConfig&gt;</projectStorage>
</storageModule>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.1392194113;com.crt.advproject.config.exe.debug.1392194113.;com.crt.advproject.gas.exe.debug.81526022;com.crt.advproject.assembler.input.381304950">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.release.1867143408;com.crt.advproject.config.exe.release.1867143408.;com.crt.advproject.gcc.exe.release.1544905822;com.crt.advproject.compiler.input.1744383012">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.debug.1392194113;com.crt.advproject.config.exe.debug.1392194113.;com.crt.advproject.gcc.exe.debug.66420591;com.crt.advproject.compiler.input.1034801598">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="com.crt.advproject.config.exe.release.1867143408;com.crt.advproject.config.exe.release.1867143408.;com.crt.advproject.gas.exe.release.1699519623;com.crt.advproject.assembler.input.4154826">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
</scannerConfigBuildInfo>
</storageModule>
</cproject>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>wolf_example</name>
<comment></comment>
<projects>
<project>lpc_chip_18xx</project>
<project>lpc_board_nxp_lpcxpresso_1837</project>
<project>wolfssl</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,7 @@
wolfSSL example
Target board LPC43S37 Xpresso board
The board communicates to the PC terminal through UART0 at 115200.
This example builds the wolfSSL library, test and benchmark examples.
Use 't' to launch the WolfSSL Test
Use 'b' to launch the WolfSSL Benchmark

View File

@@ -0,0 +1,353 @@
/* lpc_18xx_startup.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include "board.h"
#include <stdint.h>
#include <stdio.h>
/* Top of stack location */
extern void _vStackTop(void);
/* Memory locations */
extern unsigned int __data_section_table;
extern unsigned int __data_section_table_end;
extern unsigned int __bss_section_table;
extern unsigned int __bss_section_table_end;
/* Copy memory: src=Source, dst_beg=Destination Begin, dst_end=Destination End */
__attribute__ ((section(".after_vectors")))
void memcpy32(uint32_t* src, uint32_t* dst_beg, uint32_t len)
{
unsigned int i;
for (i = 0; i < len; i += sizeof(uint32_t)) {
*dst_beg++ = *src++;
}
}
/* Zero address in range */
__attribute__ ((section(".after_vectors")))
void meminit32(uint32_t* start, uint32_t len)
{
unsigned int i;
for (i = 0; i < len; i += sizeof(uint32_t)) {
*start++ = 0;
}
}
/* Reset Entry Point */
void ResetISR(void)
{
unsigned int irqPendLoop;
unsigned int *SectionTableAddr;
unsigned int LoadAddr, ExeAddr, SectionLen;
unsigned int *RESET_CONTROL = (unsigned int *) 0x40053100;
volatile unsigned int *NVIC_ICPR = (unsigned int *) 0xE000E280;
/* Chip cleanup/reset */
__asm volatile ("cpsid i"); /* Disable interrupts */
/* Write to LPC_RGU->RESET_CTRL0 */
*(RESET_CONTROL+0) = 0x10DF0000;
/* GPIO_RST|AES_RST|ETHERNET_RST|SDIO_RST|DMA_RST|
* USB1_RST|USB0_RST|LCD_RST */
/* Write to LPC_RGU->RESET_CTRL1 */
*(RESET_CONTROL+1) = 0x00DFF7FF;
/* CAN0_RST|CAN1_RST|I2S_RST|SSP1_RST|SSP0_RST|
* I2C1_RST|I2C0_RST|UART3_RST|UART1_RST|UART1_RST|UART0_RST|
* DAC_RST|ADC1_RST|ADC0_RST|QEI_RST|MOTOCONPWM_RST|SCT_RST|
* RITIMER_RST|TIMER3_RST|TIMER2_RST|TIMER1_RST|TIMER0_RST */
/* Clear all pending interrupts in the NVIC */
for (irqPendLoop = 0; irqPendLoop < 8; irqPendLoop++) {
*(NVIC_ICPR + irqPendLoop) = 0xFFFFFFFF;
}
__asm volatile ("cpsie i"); /* Re-enable interrupts */
/* Init sections */
SectionTableAddr = &__data_section_table;
/* Copy the data sections from flash to SRAM */
while (SectionTableAddr < &__data_section_table_end) {
LoadAddr = *SectionTableAddr++;
ExeAddr = *SectionTableAddr++;
SectionLen = *SectionTableAddr++;
memcpy32((uint32_t*)LoadAddr, (uint32_t*)ExeAddr, SectionLen);
}
/* Zero fill the bss segment */
while (SectionTableAddr < &__bss_section_table_end) {
ExeAddr = *SectionTableAddr++;
SectionLen = *SectionTableAddr++;
meminit32((uint32_t*)ExeAddr, SectionLen);
}
#if defined(__FPU_PRESENT) && __FPU_PRESENT == 1
fpuInit();
#endif
/* Board specific SystemInit */
Board_SystemInit();
/* Start main */
#if defined (__REDLIB__)
/* Call the Redlib library, which in turn calls main() */
extern void __main(void);
__main() ;
#else
extern void main(void);
main();
#endif
/* Application has ended, so busy wait */
while(1) {};
}
/* Vector Exception/Interrupt Handlers */
__attribute__ ((section(".after_vectors")))
static void Default_Handler(void)
{
/* Loop forever */
while(1);
}
void HardFault_HandlerC( uint32_t *hardfault_args )
{
/* These are volatile to try and prevent the compiler/linker optimizing them
away as the variables never actually get used. If the debugger won't show the
values of the variables, make them global my moving their declaration outside
of this function. */
volatile uint32_t stacked_r0;
volatile uint32_t stacked_r1;
volatile uint32_t stacked_r2;
volatile uint32_t stacked_r3;
volatile uint32_t stacked_r12;
volatile uint32_t stacked_lr;
volatile uint32_t stacked_pc;
volatile uint32_t stacked_psr;
volatile uint32_t _CFSR;
volatile uint32_t _HFSR;
volatile uint32_t _DFSR;
volatile uint32_t _AFSR;
volatile uint32_t _BFAR;
volatile uint32_t _MMAR;
stacked_r0 = ((uint32_t)hardfault_args[0]);
stacked_r1 = ((uint32_t)hardfault_args[1]);
stacked_r2 = ((uint32_t)hardfault_args[2]);
stacked_r3 = ((uint32_t)hardfault_args[3]);
stacked_r12 = ((uint32_t)hardfault_args[4]);
stacked_lr = ((uint32_t)hardfault_args[5]);
stacked_pc = ((uint32_t)hardfault_args[6]);
stacked_psr = ((uint32_t)hardfault_args[7]);
/* Configurable Fault Status Register */
/* Consists of MMSR, BFSR and UFSR */
_CFSR = (*((volatile uint32_t *)(0xE000ED28)));
/* Hard Fault Status Register */
_HFSR = (*((volatile uint32_t *)(0xE000ED2C)));
/* Debug Fault Status Register */
_DFSR = (*((volatile uint32_t *)(0xE000ED30)));
/* Auxiliary Fault Status Register */
_AFSR = (*((volatile uint32_t *)(0xE000ED3C)));
/* Read the Fault Address Registers. These may not contain valid values. */
/* Check BFARVALID/MMARVALID to see if they are valid values */
/* MemManage Fault Address Register */
_MMAR = (*((volatile uint32_t *)(0xE000ED34)));
/* Bus Fault Address Register */
_BFAR = (*((volatile uint32_t *)(0xE000ED38)));
printf ("\n\nHard fault handler (all numbers in hex):\n");
printf ("R0 = %x\n", stacked_r0);
printf ("R1 = %x\n", stacked_r1);
printf ("R2 = %x\n", stacked_r2);
printf ("R3 = %x\n", stacked_r3);
printf ("R12 = %x\n", stacked_r12);
printf ("LR [R14] = %x subroutine call return address\n", stacked_lr);
printf ("PC [R15] = %x program counter\n", stacked_pc);
printf ("PSR = %x\n", stacked_psr);
printf ("CFSR = %x\n", _CFSR);
printf ("HFSR = %x\n", _HFSR);
printf ("DFSR = %x\n", _DFSR);
printf ("AFSR = %x\n", _AFSR);
printf ("MMAR = %x\n", _MMAR);
printf ("BFAR = %x\n", _BFAR);
/* Break into the debugger */
__asm("BKPT #0\n");
}
__attribute__( ( naked, section(".after_vectors") ) )
void HardFault_Handler(void)
{
__asm volatile
(
" tst lr, #4 \n"
" ite eq \n"
" mrseq r0, msp \n"
" mrsne r0, psp \n"
" ldr r1, [r0, #24] \n"
" ldr r2, handler2_address_const \n"
" bx r2 \n"
" handler2_address_const: .word HardFault_HandlerC \n"
);
}
/* Forward declaration of IRQ handlers */
#define ALIAS(f) __attribute__ ((weak, alias (#f)))
void NMI_Handler(void) ALIAS(Default_Handler);
void MemManage_Handler(void) ALIAS(Default_Handler);
void BusFault_Handler(void) ALIAS(Default_Handler);
void UsageFault_Handler(void) ALIAS(Default_Handler);
void SVC_Handler(void) ALIAS(Default_Handler);
void DebugMon_Handler(void) ALIAS(Default_Handler);
void PendSV_Handler(void) ALIAS(Default_Handler);
void SysTick_Handler(void) ALIAS(Default_Handler);
void DAC_IRQHandler(void) ALIAS(Default_Handler);
void DMA_IRQHandler(void) ALIAS(Default_Handler);
void FLASHEEPROM_IRQHandler(void) ALIAS(Default_Handler);
void ETH_IRQHandler(void) ALIAS(Default_Handler);
void SDIO_IRQHandler(void) ALIAS(Default_Handler);
void LCD_IRQHandler(void) ALIAS(Default_Handler);
void USB0_IRQHandler(void) ALIAS(Default_Handler);
void USB1_IRQHandler(void) ALIAS(Default_Handler);
void SCT_IRQHandler(void) ALIAS(Default_Handler);
void RIT_IRQHandler(void) ALIAS(Default_Handler);
void TIMER0_IRQHandler(void) ALIAS(Default_Handler);
void TIMER1_IRQHandler(void) ALIAS(Default_Handler);
void TIMER2_IRQHandler(void) ALIAS(Default_Handler);
void TIMER3_IRQHandler(void) ALIAS(Default_Handler);
void MCPWM_IRQHandler(void) ALIAS(Default_Handler);
void ADC0_IRQHandler(void) ALIAS(Default_Handler);
void I2C0_IRQHandler(void) ALIAS(Default_Handler);
void I2C1_IRQHandler(void) ALIAS(Default_Handler);
void ADC1_IRQHandler(void) ALIAS(Default_Handler);
void SSP0_IRQHandler(void) ALIAS(Default_Handler);
void SSP1_IRQHandler(void) ALIAS(Default_Handler);
void UART0_IRQHandler(void) ALIAS(Default_Handler);
void UART1_IRQHandler(void) ALIAS(Default_Handler);
void UART2_IRQHandler(void) ALIAS(Default_Handler);
void UART3_IRQHandler(void) ALIAS(Default_Handler);
void I2S0_IRQHandler(void) ALIAS(Default_Handler);
void I2S1_IRQHandler(void) ALIAS(Default_Handler);
void SPIFI_IRQHandler(void) ALIAS(Default_Handler);
void SGPIO_IRQHandler(void) ALIAS(Default_Handler);
void GPIO0_IRQHandler(void) ALIAS(Default_Handler);
void GPIO1_IRQHandler(void) ALIAS(Default_Handler);
void GPIO2_IRQHandler(void) ALIAS(Default_Handler);
void GPIO3_IRQHandler(void) ALIAS(Default_Handler);
void GPIO4_IRQHandler(void) ALIAS(Default_Handler);
void GPIO5_IRQHandler(void) ALIAS(Default_Handler);
void GPIO6_IRQHandler(void) ALIAS(Default_Handler);
void GPIO7_IRQHandler(void) ALIAS(Default_Handler);
void GINT0_IRQHandler(void) ALIAS(Default_Handler);
void GINT1_IRQHandler(void) ALIAS(Default_Handler);
void EVRT_IRQHandler(void) ALIAS(Default_Handler);
void CAN1_IRQHandler(void) ALIAS(Default_Handler);
void ATIMER_IRQHandler(void) ALIAS(Default_Handler);
void RTC_IRQHandler(void) ALIAS(Default_Handler);
void WDT_IRQHandler(void) ALIAS(Default_Handler);
void CAN0_IRQHandler(void) ALIAS(Default_Handler);
void QEI_IRQHandler(void) ALIAS(Default_Handler);
/* Vectors */
extern void (* const g_pfnVectors[])(void);
__attribute__ ((used,section(".isr_vector")))
void (* const g_pfnVectors[])(void) =
{
// Core Level - CM3
&_vStackTop, // The initial stack pointer
ResetISR, // The reset handler
NMI_Handler, // The NMI handler
HardFault_Handler, // The hard fault handler
MemManage_Handler, // The MPU fault handler
BusFault_Handler, // The bus fault handler
UsageFault_Handler, // The usage fault handler
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
SVC_Handler, // SVCall handler
DebugMon_Handler, // Debug monitor handler
0, // Reserved
PendSV_Handler, // The PendSV handler
SysTick_Handler, // The SysTick handler
// Chip Level - LPC18
DAC_IRQHandler, // 16
0, // 17
DMA_IRQHandler, // 18
0, // 19
FLASHEEPROM_IRQHandler, // 20
ETH_IRQHandler, // 21
SDIO_IRQHandler, // 22
LCD_IRQHandler, // 23
USB0_IRQHandler, // 24
USB1_IRQHandler, // 25
SCT_IRQHandler, // 26
RIT_IRQHandler, // 27
TIMER0_IRQHandler, // 28
TIMER1_IRQHandler, // 29
TIMER2_IRQHandler, // 30
TIMER3_IRQHandler, // 31
MCPWM_IRQHandler, // 32
ADC0_IRQHandler, // 33
I2C0_IRQHandler, // 34
I2C1_IRQHandler, // 35
0, // 36
ADC1_IRQHandler, // 37
SSP0_IRQHandler, // 38
SSP1_IRQHandler, // 39
UART0_IRQHandler, // 40
UART1_IRQHandler, // 41
UART2_IRQHandler, // 42
UART3_IRQHandler, // 43
I2S0_IRQHandler, // 44
I2S1_IRQHandler, // 45
SPIFI_IRQHandler, // 46
SGPIO_IRQHandler, // 47
GPIO0_IRQHandler, // 48
GPIO1_IRQHandler, // 49
GPIO2_IRQHandler, // 50
GPIO3_IRQHandler, // 51
GPIO4_IRQHandler, // 52
GPIO5_IRQHandler, // 53
GPIO6_IRQHandler, // 54
GPIO7_IRQHandler, // 55
GINT0_IRQHandler, // 56
GINT1_IRQHandler, // 57
EVRT_IRQHandler, // 58
CAN1_IRQHandler, // 59
0, // 60
0, // 61
ATIMER_IRQHandler, // 62
RTC_IRQHandler, // 63
0, // 64
WDT_IRQHandler, // 65
0, // 66
CAN0_IRQHandler, // 67
QEI_IRQHandler, // 68
};

View File

@@ -0,0 +1,95 @@
#include "board.h"
#include <string.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/ssl.h>
#include <wolfcrypt/test/test.h>
#include <wolfcrypt/benchmark/benchmark.h>
/*****************************************************************************
* Private types/enumerations/variables
****************************************************************************/
/* UART definitions */
#define LPC_UART LPC_USART0
#define UARTx_IRQn USART0_IRQn
/*****************************************************************************
* Public types/enumerations/variables
****************************************************************************/
typedef struct func_args {
int argc;
char** argv;
int return_code;
} func_args;
const char menu1[] = "\r\n"
"\tt. WolfSSL Test\r\n"
"\tb. WolfSSL Benchmark\r\n";
/*****************************************************************************
* Private functions
****************************************************************************/
/*****************************************************************************
* Public functions
****************************************************************************/
int main(void)
{
int opt = 0;
uint8_t buffer[1];
func_args args;
SystemCoreClockUpdate();
Board_Init();
Board_UART_Init(LPC_UART);
Chip_UART_Init(LPC_UART);
Chip_UART_SetBaud(LPC_UART, 115200);
Chip_UART_ConfigData(LPC_UART, UART_LCR_WLEN8 | UART_LCR_SBS_1BIT); /* Default 8-N-1 */
Chip_UART_TXEnable(LPC_UART);
Chip_UART_SetupFIFOS(LPC_UART, (UART_FCR_FIFO_EN | UART_FCR_RX_RS |
UART_FCR_TX_RS | UART_FCR_DMAMODE_SEL | UART_FCR_TRG_LEV0));
Chip_UART_IntEnable(LPC_UART, (UART_IER_ABEOINT | UART_IER_ABTOINT));
NVIC_SetPriority(UARTx_IRQn, 1);
NVIC_EnableIRQ(UARTx_IRQn);
Chip_OTP_Init();
while (1) {
DEBUGOUT("\r\n\t\t\t\tMENU\r\n");
DEBUGOUT(menu1);
DEBUGOUT("Please select one of the above options: ");
opt = 0;
while (opt == 0) {
opt = Chip_UART_Read(LPC_UART, buffer, sizeof(buffer));
}
switch (buffer[0]) {
case 't':
memset(&args, 0, sizeof(args));
printf("\nCrypt Test\n");
wolfcrypt_test(&args);
printf("Crypt Test: Return code %d\n", args.return_code);
break;
case 'b':
memset(&args, 0, sizeof(args));
printf("\nBenchmark Test\n");
benchmark_test(&args);
printf("Benchmark Test: Return code %d\n", args.return_code);
break;
// All other cases go here
default: DEBUGOUT("\r\nSelection out of range\r\n"); break;
}
}
}

View File

@@ -1,8 +1,8 @@
/* time.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* certs_test.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

View File

@@ -1,8 +1,8 @@
/* config-BEREFOOT.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,10 +16,11 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/**** wolfSSL for KEIL-RL Configuration ****/
#define __CORTEX_M3__

View File

@@ -1,8 +1,8 @@
/* config-FS.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,10 +16,11 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/**** wolfSSL for KEIL-RL Configuration ****/
#define __CORTEX_M3__

View File

@@ -1,8 +1,8 @@
/* config-RTX-TCP-FS.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,11 +16,12 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/**** wolfSSL for MDK-RTX-TCP-FS Configuration ****/
#define __CORTEX_M3__

View File

@@ -1,8 +1,8 @@
/* config.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifndef MDK_CONFIG_H__
#define MDK_CONFIG_H__
/**** wolfSSL for KEIL-RL Configuration ****/

View File

@@ -1,8 +1,8 @@
/* main.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/*shell.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/*** tiny Shell for wolfSSL apps ***/

View File

@@ -1,8 +1,8 @@
/* time-STM32F2.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* time-dummy.c.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

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

View File

@@ -1,8 +1,8 @@
/* wolfssl_KEIL_RL.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/******************************************************************************/
/** This file is for defining types, values for specific to KEIL-MDK-ARM. **/
/******************************************************************************/

View File

@@ -1,8 +1,8 @@
/* main.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* config-Crypt.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,10 +16,11 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
// <<< Use Configuration Wizard in Context Menu >>>
// <h> wolfCrypt Configuration

View File

@@ -1,8 +1,8 @@
/* config.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#define __CORTEX_M3__
#if defined(MDK_CONF_full)

View File

@@ -1,8 +1,8 @@
/* settings.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/* Place OS specific preprocessor flags, defines, includes here, will be
included into every file because types.h includes it */

View File

@@ -1,8 +1,8 @@
/* main.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* time-STM32F2.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* time-dummy.c.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* settings.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/* Place OS specific preprocessor flags, defines, includes here, will be
included into every file because types.h includes it */

View File

@@ -1,8 +1,8 @@
/* main.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* time-dummy.c.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* settings.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/* Place OS specific preprocessor flags, defines, includes here, will be
included into every file because types.h includes it */

View File

@@ -1,8 +1,8 @@
/* config-RTX-TCP-FS.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,11 +16,12 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
// <<< Use Configuration Wizard in Context Menu >>>
// <h> Build Target: Simple Client
// <s.15>Callee IP Address

View File

@@ -1,8 +1,8 @@
/* main.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* time-dummy.c.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* settings.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/* Place OS specific preprocessor flags, defines, includes here, will be
included into every file because types.h includes it */

View File

@@ -1,8 +1,8 @@
/* main.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* time-dummy.c.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* settings.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/* Place OS specific preprocessor flags, defines, includes here, will be
included into every file because types.h includes it */

View File

@@ -1,8 +1,8 @@
/* config-RTX-TCP-FS.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,10 +16,11 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/**** CyaSSL for KEIL-RL Configuration ****/
#define __CORTEX_M3__

View File

@@ -1,8 +1,8 @@
/* main.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* time-STM32F2.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* time-STM32F2.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* time-dummy.c.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* settings.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/* Place OS specific preprocessor flags, defines, includes here, will be
included into every file because types.h includes it */

View File

@@ -1,8 +1,8 @@
/* config-RTX-TCP-FS.h
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,11 +16,12 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
// <<< Use Configuration Wizard in Context Menu >>>
// <h> Build Target: Simple Server
// <s.15>Listen Port Number

View File

@@ -1,8 +1,8 @@
/* main.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* time-dummy.c.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* main.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/*shell.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/*** tiny Shell for wolfSSL apps ***/

View File

@@ -1,8 +1,8 @@
/* time-STM32F2.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,8 +16,9 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@@ -1,8 +1,8 @@
/* ssl-dummy.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

View File

@@ -27,7 +27,7 @@ SET(WOLFCRYPT_SOURCES src/aes.c src/arc4.c src/asn.c src/blake2b.c
src/camellia.c src/chacha.c src/coding.c src/compress.c src/des3.c
src/dh.c src/dsa.c src/ecc.c src/error.c src/hc128.c src/hmac.c
src/integer.c src/logging.c src/md2.c src/md4.c src/md5.c src/memory.c
src/misc.c src/pkcs7.c src/poly1305.c src/pwdbased.c src/rabbit.c
src/pkcs7.c src/poly1305.c src/pwdbased.c src/rabbit.c
src/random.c src/ripemd.c src/rsa.c src/sha.c src/sha256.c src/sha512.c
src/tfm.c src/wc_port.c src/wc_encrypt.c src/hash.c
../wolfssl/wolfcrypt/aes.h ../wolfssl/wolfcrypt/arc4.h ../wolfssl/wolfcrypt/asn.h ../wolfssl/wolfcrypt/blake2.h
@@ -39,6 +39,7 @@ SET(WOLFCRYPT_SOURCES src/aes.c src/arc4.c src/asn.c src/blake2b.c
../wolfssl/wolfcrypt/tfm.h ../wolfssl/wolfcrypt/wc_port.h ../wolfssl/wolfcrypt/wc_encrypt.h
../wolfssl/wolfcrypt/hash.h
)
# misc.c is not compiled in since using INLINE
ADD_CONVENIENCE_LIBRARY(wolfcrypt ${WOLFCRYPT_SOURCES})
RESTRICT_SYMBOL_EXPORTS(wolfcrypt)

View File

@@ -1,8 +1,8 @@
/* arm_startup.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include "hw.h"
#include <stdio.h>

View File

@@ -1,8 +1,8 @@
/* benchmark_main.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,14 +16,16 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfcrypt/benchmark/benchmark.h>
#include <stdio.h>
typedef struct func_args {
@@ -34,8 +36,7 @@ typedef struct func_args {
static func_args args = { 0 } ;
extern double current_time(int reset) ;
extern int benchmark_test(void *args) ;
extern double current_time(int reset);
void main(void)
{

View File

@@ -1,4 +1,7 @@
#pragma once
#ifndef WOLFSSL_ROWLEY_HW_H
#define WOLFSSL_ROWLEY_HW_H
#include <__cross_studio_io.h>
#include <__libc.h>
@@ -10,4 +13,11 @@ uint32_t hw_get_time_sec(void);
uint32_t hw_get_time_msec(void);
void hw_uart_printchar(int c);
void hw_watchdog_disable(void);
int hw_rand(void);
uint32_t hw_rand(void);
// Delay functions
void delay_us(uint32_t microseconds);
#endif /* WOLFSSL_ROWLEY_HW_H */

View File

@@ -10,6 +10,6 @@ EXTRA_DIST+= IDE/ROWLEY-CROSSWORKS-ARM/Kinetis_MemoryMap.xml
EXTRA_DIST+= IDE/ROWLEY-CROSSWORKS-ARM/Kinetis_FlashPlacement.xml
EXTRA_DIST+= IDE/ROWLEY-CROSSWORKS-ARM/README.md
EXTRA_DIST+= IDE/ROWLEY-CROSSWORKS-ARM/test_main.c
EXTRA_DIST+= IDE/ROWLEY-CROSSWORKS-ARM/user_libc.c
EXTRA_DIST+= IDE/ROWLEY-CROSSWORKS-ARM/retarget.c
EXTRA_DIST+= IDE/ROWLEY-CROSSWORKS-ARM/user_settings.h
EXTRA_DIST+= IDE/ROWLEY-CROSSWORKS-ARM/wolfssl.hzp

View File

@@ -1,8 +1,8 @@
/* kinetis_hw.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,9 +16,10 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include "hw.h"
#if defined(FREESCALE) && defined(K_SERIES)
@@ -44,17 +45,29 @@
#define FLASH_CLK_DIV 4 /* Flash clock divisor */
// UART TX Port, Pin, Mux and Baud
#define UART_PORT UART5 /* UART Port */
#define UART_PORT UART4 /* UART Port */
#define UART_TX_PORT PORTE /* UART TX Port */
#define UART_TX_PIN 8 /* UART TX Pin */
#define UART_TX_PIN 24 /* UART TX Pin */
#define UART_TX_MUX 0x3 /* Kinetis UART pin mux */
#define UART_BAUD 115200 /* UART Baud Rate */
/* 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: TWR-K64 is UART5, PTE8 */
/***********************************************/
// Private functions
static uint32_t mDelayCyclesPerUs = 0;
#define NOP_FOR_LOOP_INSTRUCTION_COUNT 6
static void delay_nop(uint32_t count)
{
int i;
for(i=0; i<count; i++) {
__asm volatile("nop");
}
}
static void hw_mcg_init(void)
{
/* Adjust clock dividers (core/system=div/1, bus=div/2, flex bus=div/2, flash=div/4) */
@@ -88,7 +101,7 @@ static void hw_uart_init(void)
uint8_t temp;
/* Enable UART core clock */
SIM->SCGC1 |= SIM_SCGC1_UART5_MASK;
SIM->SCGC1 |= SIM_SCGC1_UART4_MASK;
/* Configure UART TX pin */
UART_TX_PORT->PCR[UART_TX_PIN] = PORT_PCR_MUX(UART_TX_MUX);
@@ -116,9 +129,37 @@ static void hw_uart_init(void)
static void hw_rtc_init(void)
{
/* Init nop delay */
mDelayCyclesPerUs = (SYS_CLK_KHZ / 1000 / NOP_FOR_LOOP_INSTRUCTION_COUNT);
/* Enable RTC clock and oscillator */
SIM->SCGC6 |= SIM_SCGC6_RTC_MASK;
RTC->CR |= RTC_CR_OSCE_MASK;
if (RTC->SR & RTC_SR_TIF_MASK) {
/* Resets the RTC registers except for the SWR bit */
RTC->CR |= RTC_CR_SWR_MASK;
RTC->CR &= ~RTC_CR_SWR_MASK;
/* Set TSR register to 0x1 to avoid the TIF bit being set in the SR register */
RTC->TSR = 1;
}
/* Disable RTC Interrupts */
RTC_IER = 0;
/* Enable OSC */
if ((RTC->CR & RTC_CR_OSCE_MASK) == 0) {
int i;
/* Turn on */
RTC->CR |= RTC_CR_OSCE_MASK;
/* Wait RTC startup delay 1000 us */
delay_us(1000);
}
/* Enable counter */
RTC->SR |= RTC_SR_TCE_MASK;
}
static void hw_rand_init(void)
@@ -167,12 +208,18 @@ void hw_uart_printchar(int c)
UART_PORT->D = (uint8_t)c; /* Send the character */
}
int hw_rand(void)
uint32_t hw_rand(void)
{
while((RNG->SR & RNG_SR_OREG_LVL(0xF)) == 0) {}; /* Wait until FIFO has a value available */
return RNG->OR; /* Return next value in FIFO output register */
}
void delay_us(uint32_t microseconds)
{
delay_nop(mDelayCyclesPerUs * microseconds);
}
// Watchdog
void hw_watchdog_disable(void)
{

View File

@@ -1,8 +1,8 @@
/* user_libc.c
/* retarget.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,47 +16,57 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include "hw.h"
#include "user_settings.h"
double current_time(int reset)
{
double time;
(void)reset;
time = hw_get_time_sec();
time += (double)hw_get_time_msec() / 1000;
return time;
}
int custom_rand_generate(void)
unsigned int custom_rand_generate(void)
{
return hw_rand();
}
int custom_rand_generate_block(unsigned char* output, unsigned int sz)
{
uint32_t i = 0;
while (i < sz)
{
/* If not aligned or there is odd/remainder */
if( (i + sizeof(CUSTOM_RAND_TYPE)) > sz ||
((uint32_t)&output[i] % sizeof(CUSTOM_RAND_TYPE)) != 0
) {
/* Single byte at a time */
output[i++] = (unsigned char)custom_rand_generate();
}
else {
/* Use native 8, 16, 32 or 64 copy instruction */
*((CUSTOM_RAND_TYPE*)&output[i]) = custom_rand_generate();
i += sizeof(CUSTOM_RAND_TYPE);
}
}
return 0;
}
// Debug print handler
int __putchar(int c, __printf_tag_ptr ctx)
{
hw_uart_printchar(c);
}
// Rowley CrossWorks, runtime support.
//
// Copyright (c) 2001-2015 Rowley Associates Limited.
//
// This file may be distributed under the terms of the License Agreement
// provided with this software.
//
// THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#include <__libc.h>
#if defined(__CROSSWORKS_ARM) || defined(__SES_ARM)
extern unsigned char __stack_process_start__[];
unsigned char * __aeabi_read_tp(void)
{
// thread-local storage addressing refers to the thread pointer
@@ -64,15 +74,7 @@ unsigned char * __aeabi_read_tp(void)
return (__stack_process_start__);
}
#elif defined(__CROSSWORKS_AVR) || defined(__CROSSWORKS_MSP430)
unsigned char * __RAL_read_tp(void)
{
return 0;
}
#endif
/* Stubs */
void __heap_lock(void)
{
}

View File

@@ -1,8 +1,8 @@
/* test_main.c
*
* Copyright (C) 2006-2015 wolfSSL Inc.
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
* 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
@@ -16,10 +16,11 @@
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

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