Compare commits

...

7325 Commits

Author SHA1 Message Date
toddouska
1179969dcf Merge pull request #1630 from embhorn/zd3963
Add support for C99 tools without strings.h and add option to disable C99
2018-06-21 18:00:23 -07:00
toddouska
8e78623123 Merge pull request #1632 from JacobBarthelmeh/Release
prepare for release v3.15.3
2018-06-21 15:37:32 -07:00
Jacob Barthelmeh
8fd18e06f7 prepare for release v3.15.3 2018-06-21 12:22:27 -06:00
Jacob Barthelmeh
518c987c61 update CA for ocsp test 2018-06-21 12:13:33 -06:00
toddouska
9d86d323ef Merge pull request #1628 from JacobBarthelmeh/Fuzzer
sanity check on hashing size
2018-06-20 17:46:38 -07:00
Jacob Barthelmeh
bf63003237 sanity check before reading word16 from buffer 2018-06-20 16:48:40 -06:00
Jacob Barthelmeh
2f43d5eece update size to be used with fuzzing 2018-06-20 15:29:05 -06:00
Eric Blankenhorn
0dc9a19835 Remove check to include strings.h 2018-06-20 10:40:03 -05:00
Jacob Barthelmeh
777c89a257 sanity check on pointer 2018-06-20 09:37:36 -06:00
Jacob Barthelmeh
61655ef56d comment on sz value and sanity check before fuzzing 2018-06-20 09:21:56 -06:00
Jacob Barthelmeh
83324f39d7 update IO callback function names with CSharp wrapper 2018-06-20 09:10:19 -06:00
Eric Blankenhorn
07810eb21e Merge branch 'master' into zd3963 2018-06-20 10:05:20 -05:00
Eric Blankenhorn
6d3237a0b4 Add support for C99 tools withoutstrings.h and add option to disable C99 checking. 2018-06-20 09:49:33 -05:00
toddouska
c1362cca60 Merge pull request #1629 from JacobBarthelmeh/Certs
disable CRL with additional cn/alt test certs
2018-06-19 14:42:21 -07:00
toddouska
d481a3fb92 Merge pull request #1625 from JacobBarthelmeh/Testing
memory management with test cases
2018-06-19 14:41:18 -07:00
Jacob Barthelmeh
d8e278b6b3 revert free on sig and add comment 2018-06-18 18:15:26 -06:00
toddouska
e348522353 Merge pull request #1627 from ejohnstown/pkcs7-verify
Fix PKCS7 Sign Verify
2018-06-18 15:32:18 -07:00
toddouska
4e6a88caf9 Merge pull request #1626 from JacobBarthelmeh/UnitTests
fix for implicit declaration error
2018-06-18 15:30:06 -07:00
Jacob Barthelmeh
d3cd0b6b2e disable CRL with additional cn/alt test certs 2018-06-18 16:10:45 -06:00
Jacob Barthelmeh
38f916a798 sanity check on hashing size 2018-06-18 15:50:44 -06:00
John Safranek
2fd000532a A length value was set to zero in a situation where the existing value was needed. 2018-06-18 11:48:45 -07:00
Jacob Barthelmeh
c98aca32c4 static analysis report fixes 2018-06-15 17:00:45 -06:00
Jacob Barthelmeh
bade35bd76 update return value 2018-06-15 16:25:09 -06:00
Jacob Barthelmeh
0f9063d2a9 fix for implicit declaration error 2018-06-15 16:14:22 -06:00
Jacob Barthelmeh
a1295b3148 memory management with test cases 2018-06-15 15:43:42 -06:00
toddouska
c78a552eb3 Merge pull request #1598 from JacobBarthelmeh/Nucleus
wolfCrypt only Nucleus
2018-06-15 14:23:54 -07:00
toddouska
0d0aa74444 Merge pull request #1623 from dgarske/fix_atecc508a
Fixes for build with `WOLFSSL_ATECC508A` defined
2018-06-15 11:06:33 -07:00
toddouska
55945acd55 Merge pull request #1622 from cconlon/cavp-selftest-fix
fix CAVP self test build with newer raw hash functions
2018-06-15 11:02:15 -07:00
Jacob Barthelmeh
b90fa909ef add warning for source of entropy 2018-06-15 11:40:05 -06:00
toddouska
495e3552d2 Merge pull request #1624 from JacobBarthelmeh/Testing
move location of wolfSSL_d2i_RSA_PublicKey to fix x509 small build
2018-06-15 10:39:08 -07:00
Jacob Barthelmeh
c03c10e1d4 move location of wolfSSL_d2i_RSA_PublicKey to fix x509 small build 2018-06-14 14:38:15 -06:00
toddouska
139a08a98e Merge pull request #1621 from SparkiDev/tls13_no_cs
Allow NO_WOLFSSL_CLIENT/SERVER to compile and pass tests
2018-06-14 09:08:13 -07:00
David Garske
5b2bb44bc8 Fixes for build with WOLFSSL_ATECC508A defined. 2018-06-13 20:10:01 -07:00
toddouska
aa01fd8adf Merge pull request #1619 from JacobBarthelmeh/HardwareAcc
RAW hash function APIs not supported with ARMv8 build
2018-06-13 16:07:53 -07:00
toddouska
15348d4936 Merge pull request #1612 from dgarske/fixmatchdomainname
Fixes for `MatchDomainName` to properly detect failures
2018-06-13 13:13:52 -07:00
David Garske
61056829c5 Added success test cases for domain name match (SNI) in common name and alternate name. 2018-06-13 09:26:54 -07:00
Chris Conlon
1db5d6ebd6 fix CAVP self test build with newer raw hash functions 2018-06-13 09:55:16 -06:00
Sean Parkinson
a03c15e598 Allow NO_WOLFSSL_CLIENT/SERVER to compile and pass tests 2018-06-13 11:42:16 +10:00
toddouska
e60262cbf1 Merge pull request #1604 from TimParrish/addAMDFunk
Update cpuid.c to optimize intelasm for performance on AMD processors
2018-06-12 16:19:33 -07:00
David Garske
8fa1592542 Fix to use SHA256 for the self-signed test certificates. 2018-06-12 16:12:29 -07:00
Jacob Barthelmeh
9dc560dd01 RAW hash function APIs not supported with ARMv8 build 2018-06-12 16:45:38 -06:00
David Garske
1f16b36402 Fixes for MatchDomainName to properly detect failures:
* Fix `MatchDomainName` to also check for remaining len on success check.
* Enhanced `DNS_entry` to include actual ASN.1 length and use it thoughout (was using XSTRLEN).

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

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

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

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

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

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

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

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

Fix KeyUpdate to derive keys properly

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Made requested changes to printf where 0 == 0.
2017-01-17 13:51:17 -07:00
toddouska
a00bdb0de7 Merge pull request #714 from wolfSSL/fix_intelasm_debug
Fixed issue with intelasm and debug with SHA256
2017-01-17 12:50:17 -08:00
Jacob Barthelmeh
e84528205e chacha20_poly1305 function expects a key size of 32 bytes 2017-01-17 13:39:26 -07:00
toddouska
2281560f1a Merge pull request #710 from JacobBarthelmeh/staticmemory
pass heap hint to temporary public ECC key
2017-01-17 12:15:45 -08:00
toddouska
2e60330796 Merge pull request #703 from JacobBarthelmeh/SGX
wolfcrypt only build with Windows
2017-01-17 12:13:37 -08:00
toddouska
c7ecf23c85 Merge pull request #696 from JacobBarthelmeh/Testing
fix possible memory leak on error case with ASN1 INTEGER to BN function
2017-01-17 12:10:21 -08:00
David Garske
a0dc8dc8f9 Fix build with NO_ASN_TIME. Kaleb, add to future build options tests. 2017-01-17 10:35:48 -08:00
Moisés Guimarães
bb97e03a44 initial server tests 2017-01-16 19:40:46 -02:00
Moisés Guimarães
089387906e updates tests 2017-01-16 18:52:34 -02:00
Moisés Guimarães
715d6afeda updates tox config 2017-01-16 18:48:01 -02:00
Moisés Guimarães
0a9f66338c adds coverity tests 2017-01-15 12:51:09 -02:00
Moisés Guimarães
2d56f09320 adds accept() behavior to SSLSocket; Migrates tests to pytest. 2017-01-15 12:26:22 -02:00
David Garske
1aeab91828 Fixed issue with intelasm and debug with SHA256 due to stack variable W_K alignment. Removed obsolete DEBUG_XMM code. 2017-01-13 15:50:04 -08:00
Moisés Guimarães
56091e267f moving source code into src 2017-01-12 19:27:36 -02:00
Chris Conlon
00fed61d36 Merge pull request #709 from JacobBarthelmeh/PKCS12
heap hint with PKCS7
2017-01-12 09:34:20 -07:00
Jacob Barthelmeh
75e3b5a297 pass heap hint to temporary public ECC key 2017-01-12 09:10:25 -07:00
Moisés Guimarães
86a3039e0b fixes CA matching when using NO_SKID 2017-01-12 13:56:38 -02:00
Sean Parkinson
ba1315a499 Fixes from failure testing 2017-01-12 16:22:35 +10:00
Chris Conlon
f6647fbf84 add ECC export raw, sig to (R,S), helper functions 2017-01-11 17:08:35 -07:00
Jacob Barthelmeh
36d34ce069 free WOLFSSL_BN in SetIndividualExternal error case and simplify mpi_clear call 2017-01-11 14:53:32 -07:00
toddouska
fc8ab42612 Merge pull request #671 from dgarske/ecc_curve_cache
New ECC curve cache feature to improve performance
2017-01-11 13:34:32 -08:00
toddouska
575ac7b9d3 Merge pull request #707 from JacobBarthelmeh/master
fix location in tfm.c that could result in potential cache attack
2017-01-11 12:35:22 -08:00
Jacob Barthelmeh
bafddd1ba8 heap hint with PKCS7 2017-01-11 11:38:21 -07:00
Jacob Barthelmeh
e3277c19b7 fix location in tfm.c that could result in potential cache attack 2017-01-10 15:00:00 -07:00
dgarske
8954de40ff Merge pull request #706 from JacobBarthelmeh/Windows
open test file in binary mode
2017-01-10 11:54:47 -08:00
JacobBarthelmeh
c191a19a77 Merge pull request #705 from cconlon/pkcs7rng
fix RNG to WC_RNG typo in pkcs7.c
2017-01-10 10:15:05 -07:00
Jacob Barthelmeh
6732961e0d open test file in binary mode 2017-01-10 09:57:29 -07:00
Chris Conlon
993e6298ac fix RNG to WC_RNG typo in pkcs7.c 2017-01-09 16:59:42 -07:00
David Garske
3338ea9ef7 Added ecc.c documentation for WOLFSSL_VALIDATE_ECC_IMPORT. Note: Add this define to enable checks for Jenkins (after this is merged). 2017-01-09 15:01:17 -08:00
David Garske
0722f4d20f Fixes to reduce stack usage with ECC_CACHE_CURVE disabled (same as previous code). Added USE_ECC_B_PARAM macro (enabled with ECC_CACHE_CURVE or HAVE_COMP_KEY). Fixed bug with WOLFSSL_VALIDATE_ECC_KEYGEN defined and args to ecc_check_pubkey_order. Fixed counts for DECLARE_CURVE_SPECS(). Fixed wc_ecc_import_point_der to use curve cache. Enhance wc_ecc_check_key to support ECC_CACHE_CURVE for b or load using read_radix. Enhance to expose wc_ecc_is_point with all required mp_int* args directly. 2017-01-09 11:15:13 -08:00
Jacob Barthelmeh
6edb639d9d wolfcrypt only build with Windows 2017-01-09 10:33:46 -07:00
dgarske
af00ad7683 Merge pull request #700 from JacobBarthelmeh/master
run peek last error line test only when NO_OLD_TLS is not defined
2017-01-07 11:37:27 -08:00
Jacob Barthelmeh
4be5f624e8 include logging.h in test.c 2017-01-06 16:40:19 -07:00
Jacob Barthelmeh
dcb9ef6651 better compatibility with printing errors to a file 2017-01-06 14:29:16 -07:00
dgarske
274ac21450 Merge pull request #699 from kaleb-himes/FREERTOS_TCP
Remove toolchain level define from OS_TCP section
2017-01-06 13:23:22 -08:00
Jacob Barthelmeh
d3604f1061 run peek last error line test only when NO_OLD_TLS is not defined 2017-01-06 13:22:49 -07:00
kaleb-himes
2b49f4205f Remove toolchain level define from OS level define section 2017-01-06 11:44:04 -07:00
jrblixt
08f188ab44 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into unitTest_api_dev 2017-01-06 11:26:06 -07:00
jrblixt
2c87f8d33c merge with wolfSSL master. 2017-01-06 11:06:01 -07:00
David Garske
050ba9d6e0 unit test md5, sha, sha256, sha384, sha512
Memory leak fix.
2017-01-06 10:57:50 -07:00
toddouska
c20a35f1db Merge pull request #697 from JacobBarthelmeh/master
adjust dynamic types with PKCS12 parse
2017-01-05 14:39:17 -08:00
Jacob Barthelmeh
1afb7e20db fix for freeing copy of mpi in the case of not using fastmath 2017-01-05 13:49:07 -07:00
Jacob Barthelmeh
147a7d5096 adjust dynamic types with PKCS12 parse 2017-01-05 10:21:14 -07:00
Jacob Barthelmeh
1a55309207 fix possible memory leak on error case with ASN1 INTEGER to BN function 2017-01-05 10:00:17 -07:00
JacobBarthelmeh
ea47d76bf7 Merge pull request #695 from dgarske/openssl_compat_enums
Additional openssl compatibility enums for X509_V_ERR and SSL_CB
2017-01-04 16:35:09 -07:00
David Garske
cb0cc92ff2 Fixes for building with CRL monitor when not linux, OS X or FreeBSD and --enable-distro set. Cleanup of the crl.c HAVE_CRL_MONITOR checks for OS and make sure if StopMonitor preprocessor is defined the function will also be defined. 2017-01-04 15:27:15 -07:00
David Garske
2f3ec778bd For distro build don't install options.h (conflicts with multi-arch). Fix for BUILD_DISTRO excludes with indent. 2017-01-04 15:27:15 -07:00
David Garske
d3195d0b75 Pulled in patches from Debian package. 2017-01-04 15:27:15 -07:00
David Garske
fc6217e4f6 Added stubs for the set_msg_callback functions. Cleanup of the SSL_ST_* and SSL_CB_* enums. 2017-01-04 12:14:09 -08:00
David Garske
7c7b1233f7 Additional enums needed for compatibility with openssl for paho c mqtt client SSLSocket.c layer. 2017-01-04 11:00:08 -08:00
toddouska
f25416d424 Merge pull request #689 from dgarske/fix_iar_arm
Fixes for compiler warnings with IAR EWARM 8
2017-01-03 15:46:12 -08:00
John Safranek
916e58b93c Merge pull request #694 from moisesguimaraes/fixes-ocsp-nonce-check
removes request->nonceSz check to fully validate response->nonce.
2017-01-03 13:04:24 -08:00
John Safranek
dd737ca103 Merge pull request #618 from kojo1/openssl-ex
Openssl Extra
2017-01-03 12:40:51 -08:00
dgarske
11775acb86 Merge pull request #691 from JacobBarthelmeh/Windows
random port for MinGW with unit tests
2017-01-03 11:46:33 -08:00
Moisés Guimarães
c82372cf78 removes request->nonceSz check to fully validate response->nonce. 2017-01-02 14:59:00 -02:00
David Garske
07ce995b12 Fix issue with imported key not having a reset key->r, key->s and key->state, which was causing wc_ecc_encrypt to fail. 2016-12-30 12:24:03 -08:00
Moisés Guimarães
762064c292 fixes certificate status parsing, adds behavior for unknown status type. 2016-12-29 22:29:46 -02:00
Erik M. Bray
e3ec769107 Adds an --enable-aesctr flag to the configure script to explicitly compile with -DWOLFSSL_AES_COUNTER and -DWOLFSSL_AES_DIRECT
If --enable-fortress or --enable-mcapi are used they effectively force --enable-aesctr
2016-12-29 21:26:34 +01:00
toddouska
073aa95496 Merge pull request #678 from dgarske/cleanup_macros
Cleanup min(), TRUE, FALSE, ALIGN16 and ALIGN32
2016-12-29 11:19:05 -08:00
toddouska
0decefed11 Merge pull request #679 from dgarske/wolfmath
Combine generic math functions into new wolfmath.c/.h
2016-12-29 11:17:44 -08:00
toddouska
fab72ed163 Merge pull request #688 from JacobBarthelmeh/master
fix C++ compiler warnings for distro build
2016-12-29 11:06:47 -08:00
toddouska
f550172fd4 Merge pull request #687 from JacobBarthelmeh/Testing
update Windows FIPS build
2016-12-29 11:06:11 -08:00
Jacob Barthelmeh
5abfe9d1cf random port for MinGW with unit tests 2016-12-29 11:05:10 -07:00
David Garske
19ee499c96 Fix to improve fp_copy performance without ALT_ECC_SIZE defined. This change is required for async because we can’t memcpy/memset the entire fp_int. 2016-12-28 16:47:14 -08:00
David Garske
e75fddd49e Moving macType below hash in WOLFSSL_EVP_MD_CTX (instead of ALIGN16) to resolve 16-bit alignment crash I was seeing on CentOS due to size change of “WOLFSSL_Hasher”. 2016-12-28 16:31:41 -08:00
David Garske
a854320a96 Revert changes to aes.c roll_auth. 2016-12-28 16:28:02 -08:00
Jacob Barthelmeh
6c90f097ca remove extra white space 2016-12-28 15:40:34 -07:00
Takashi Kojo
c77a18f0ec add EVP_CIPHER_CTX_mode 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
f60cb08c29 macro and tests for get_passwd_cb functions 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
4f317a9a1d wolfSSL_EVP_CipherInit_ex handle ENGINE argument and add a sanity check 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
1326fe1b0d return values of DES set key and return block size for EVP block_size getter function 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
ccc72d72c2 change argument to pointer. In most cases NULL is used for this argument, as was the case in previous ports 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
95ea74a91e sanity checks and one function return type for better compatibility 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
091fc10147 adjust read ahead, some sanity checks and rebase 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
724e50c4fd cast flag to byte type from int 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
aabe456592 sanity checks, remove some magic numbers, TLS read ahead 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
ed5ff77e4f account for BIO with no filesystem and rebase commits 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
f7737fdc55 expand BIO compatibility 2016-12-28 14:45:29 -07:00
Takashi Kojo
a2d1db4b73 Merge branch 'openssl-ex' of https://github.com/kojo1/wolfssl into openssl-ex 2016-12-28 14:45:29 -07:00
Takashi Kojo
5a2794fe9c add EVP_MD_CTX_md, EVP_MD_type 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
2b3438e11b pem x509 read from bio and bio set fd 2016-12-28 14:45:29 -07:00
Takashi Kojo
80efc366df add wolfSSL_EVP_MD_CTX_new/free 2016-12-28 14:45:29 -07:00
Takashi Kojo
b377125ad1 add alias to EVP_get_cipher/digestbyname 2016-12-28 14:45:29 -07:00
Takashi Kojo
c57803a4a5 add test EVP_CIPHER_CTX_new/free 2016-12-28 14:45:29 -07:00
Takashi Kojo
a774f26613 add EVP_get_cipherbyname 2016-12-28 14:45:29 -07:00
Takashi Kojo
2ef85e3d4d EVP_CIPHER_CTX_new/free, EVP_get_digestbyname 2016-12-28 14:45:29 -07:00
Takashi Kojo
0c742654dc EVP_add_digest 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
64a3333870 adjust wolfSSL_set_options and test case 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
2daeecdb90 BIO s_socket and BN mod exp 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
e741a24089 add get last error and line function, fix ASN1 object redeclaration 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
1d0fc83d40 function to add X509 to cert chain 2016-12-28 14:45:29 -07:00
Takashi Kojo
280f5cb542 fix int long type mismatch 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
1704a8d683 expand compatibility layer with write bio function 2016-12-28 14:45:29 -07:00
Takashi Kojo
778680116e HMAC_cleanup, MD5xxx for bsd 2016-12-28 14:45:29 -07:00
Takashi Kojo
570486b90c add SL_CTX_need/set_tmp_RSA 2016-12-28 14:45:29 -07:00
Takashi Kojo
4baf494ddd add EVP_CipherUpdate/Final 2016-12-28 14:45:29 -07:00
Takashi Kojo
869529642d Add #define EVP_DigestInit_ex 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
781c7d0055 check for user RSA 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
7e91838d4a memory management and add to compatibility layer 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
ff05c8a7a5 expanding compatibility layer 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
9d1cb18616 add function X509_get_ext_d2i 2016-12-28 14:45:29 -07:00
Jacob Barthelmeh
5f3fa171cd templates wolfSSL_ctrl and wolfSSL_CTX_ctrl 2016-12-28 14:44:05 -07:00
Jacob Barthelmeh
79472e11a1 add bio.c to dist and implement wolfSSL_check_private_key , wolfSSL_get_server_random 2016-12-28 14:44:05 -07:00
Jacob Barthelmeh
fed4ed40a9 compatibility functions for X509 2016-12-28 14:44:05 -07:00
Jacob Barthelmeh
0d7c259282 compatibility functions for ssl cert and private key 2016-12-28 14:44:05 -07:00
Takashi Kojo
d8d3cd5269 staub: SSL_get_server_random 2016-12-28 14:44:05 -07:00
Takashi Kojo
3946931320 stubs: SSL_get_server_random/verify_result/session/set_accept_state 2016-12-28 14:44:05 -07:00
Takashi Kojo
a09a761d07 stubs: PEM_read_bio_DSAparams/X509_AUX/PrivateKey,SSL_CTX_get_default_passwd_cb/userdata 2016-12-28 14:44:05 -07:00
Takashi Kojo
ee86325ae4 template: ERR_peek_last_error_line/print_errors_fp, EVP_add_digest 2016-12-28 14:44:05 -07:00
Takashi Kojo
63dcacb437 templates: ENGINE_cleanup, BN_mod_exp 2016-12-28 14:44:05 -07:00
Takashi Kojo
f3435eefbd templates: ASN1_INTEGER_to_BN, BN_mod_exp, CONF_modules_free/unload, DSA_dup_DH 2016-12-28 14:44:05 -07:00
Jacob Barthelmeh
f2f52c3ec9 add more compatiblity functions 2016-12-28 14:44:05 -07:00
Jacob Barthelmeh
6520a77fac DES ECB prototypes 2016-12-28 14:44:05 -07:00
Jacob Barthelmeh
526b602ebd AESNI support with EVP AES 2016-12-28 14:44:05 -07:00
Jacob Barthelmeh
8554912d68 COMPAT. LAYER : jenkins warnings and build configurations 2016-12-28 14:44:05 -07:00
Jacob Barthelmeh
464543df26 COMPAT. LAYER : jenkins warnings and spacing around if statements 2016-12-28 14:44:05 -07:00
Takashi Kojo
8844554fca Templates BIO/SSL/SSL_CTX_ctrl 2016-12-28 14:44:05 -07:00
Takashi Kojo
86014fb0d0 add BIO_ctrl and other BIO templates 2016-12-28 14:44:05 -07:00
Takashi Kojo
8ed0b83c21 Test on EVP_Cipher AES Counter 2016-12-28 14:44:05 -07:00
Takashi Kojo
de91e7df03 add EVP_Cipher with AES Counter 2016-12-28 14:44:05 -07:00
Takashi Kojo
aed9b2d3bb add EVP_CIPHER_CTX_block_size/mode/set_flags/set_padding 2016-12-28 14:44:05 -07:00
Takashi Kojo
bb400789b8 add EVP_Cipher with EVP_aes_256_ecb() 2016-12-28 14:44:05 -07:00
Takashi Kojo
0fd50cd57a Added AES_set_encrypt/decrypt_key, AES_ecnrypt/decrypt 2016-12-28 14:44:05 -07:00
David Garske
b57e576abd Fixes for compiler warnings with IAR EWARM 8.
* Fix “wc_PKCS7_DecodeUnprotectedAttributes” return prior to free in GetSet error case.
* Fix “wc_PKCS7_KariGenerateKEK” type mismatch for kdfType.
* Fix aes.c roll_auth use of inSz over 24-bit.
* Fix ecc “build_lut”, “accel_fp_mul” and “accel_fp_mul2add” use of err as unsigned.
* Fix “wc_HKDF” use of un-initialized “myHmac” for heap.
* Fix undefined reference to __REV for IAR due to missing intrinsics.h.
* Fix build error for “wolfSSL_CTX_set_tmp_dh” if OPENSSL_EXTRA not defined and “HAVE_LIGHTY || HAVE_STUNNEL || WOLFSSL_MYSQL_COMPATIBLE”.
* Cleanup of “wolfSSL_get_chain_X509” brace..
* Cleanup SSL_CtxResourceFree use of `i` and define comments.
* Added “SIZEOF_LONG_LONG” to IAR-EWARM user_settings.h to support word64 (required for SHA512, etc).
2016-12-28 11:18:41 -08:00
JacobBarthelmeh
a40a3cb142 Merge pull request #686 from jay/fix_poly1305_ADD_macros
poly1305: fix ADD macros for multi-line
2016-12-27 17:52:53 -07:00
Jacob Barthelmeh
511f41b0e4 fix C++ compiler warnings for distro build 2016-12-27 14:38:14 -07:00
Jacob Barthelmeh
fb49dbd083 update Windows FIPS build 2016-12-27 10:34:13 -07:00
Jay Satiro
3b6dac9751 poly1305: fix ADD macros for multi-line 2016-12-24 02:46:35 -05:00
JacobBarthelmeh
2cf7785068 Merge pull request #682 from JacobBarthelmeh/Release
prepare for release 3.10.0
2016-12-23 09:10:35 -07:00
David Garske
c4af58b973 Refined the FIPS “min” logic. 2016-12-22 18:11:25 -08:00
David Garske
fc16890641 Fix “min” with ctaocrypt FIPS. 2016-12-22 14:01:05 -08:00
Jacob Barthelmeh
7752f9ad05 prepare for release 3.10.0 2016-12-22 14:23:41 -07:00
JacobBarthelmeh
784b24eebc Merge pull request #680 from ejohnstown/dtls-sctp-fix
DTLS-SCTP fix
2016-12-22 13:10:29 -07:00
Moisés Guimarães
53d4c171c8 adds more client tests 2016-12-22 17:58:13 -02:00
Moisés Guimarães
35f03eb00a fixes docs. 2016-12-22 16:59:50 -02:00
Moisés Guimarães
1c9147a41e adds supported curves to context; fixes compatibility issues with py27 2016-12-22 15:01:58 -02:00
Moisés Guimarães
9b58ab0211 renames exceptions file 2016-12-22 15:01:58 -02:00
Moisés Guimarães
4b75d11164 fixes socket calls 2016-12-22 15:01:58 -02:00
Moisés Guimarães
f3c1522608 always treat native_object as a pointer 2016-12-22 15:01:58 -02:00
Moisés Guimarães
b9934695fb pretest version of SSLSocket 2016-12-22 15:01:58 -02:00
Moisés Guimarães
567dfd76b3 adds initial code for SSLSocket 2016-12-22 15:01:58 -02:00
Moisés Guimarães
2cbdd45e8f adds negotiate() to ssl interface 2016-12-22 15:01:58 -02:00
Moisés Guimarães
07072ef266 moving SSLContext and SSLSocket to __init__ to avoid ciclic includes 2016-12-22 15:01:58 -02:00
Moisés Guimarães
baeba53527 adds wrap_socket to the context 2016-12-22 15:01:58 -02:00
Moisés Guimarães
445e375daa adds ssl interface to ffi 2016-12-22 15:01:58 -02:00
Moisés Guimarães
52eb0becf0 adds set_ciphers to context 2016-12-22 15:01:58 -02:00
Moisés Guimarães
368f2baf88 adds verify_mode to context 2016-12-22 15:01:58 -02:00
Moisés Guimarães
8eec3cb874 adds initial code for SSLSocket 2016-12-22 15:01:58 -02:00
Moisés Guimarães
0ed0672b16 fixes pylint warnings 2016-12-22 15:01:58 -02:00
Moisés Guimarães
c0b59a585b adds support for buffered ca certificates 2016-12-22 15:01:58 -02:00
Moisés Guimarães
015ffecbab fixes unicode quotes and adds load_cert_chain test. 2016-12-22 15:01:58 -02:00
Moisés Guimarães
760ddd14f5 fixes pylint warnings;
adds more tests to load_verify_locations;
fixes data type when calling C functions;
fixes result verification when calling C functions.
2016-12-22 15:01:58 -02:00
Moisés Guimarães
7201435f2d adds initial context tests. 2016-12-22 15:01:58 -02:00
Moisés Guimarães
bd14611879 adds load_verify_locations and load_cert_chain implementations. 2016-12-22 15:01:58 -02:00
Moisés Guimarães
c8ae6abb43 adds context functions. 2016-12-22 15:01:58 -02:00
Moisés Guimarães
e1c01378c7 fixes ssl version in test to maintain backward compatibility. 2016-12-22 15:01:58 -02:00
Moisés Guimarães
20cfbe399c fixes integer comparison and adds virtual env to ignored files. 2016-12-22 15:01:58 -02:00
Moisés Guimarães
e06b17e170 adds methods and client tests;
adds context creation;
adds memory module;
removes init and cleanup functions.
2016-12-22 15:01:58 -02:00
Moisés Guimarães
0df897d4b9 adds methods 2016-12-22 15:01:58 -02:00
Moisés Guimarães
7b884ad72a removes non-ASCII chars from docs. 2016-12-22 15:01:58 -02:00
Moisés Guimarães
8b0edafef3 adds build_ffI.py 2016-12-22 15:01:58 -02:00
Moisés Guimarães
f4d6890b51 adds basic files and exception classes. 2016-12-22 15:01:58 -02:00
toddouska
d6a6226c8e Merge pull request #681 from JacobBarthelmeh/Testing
static analysis check of null dereference and memory management
2016-12-22 08:43:55 -08:00
toddouska
93c87eb777 Merge pull request #677 from ejohnstown/dtls-prevseq
DTLS Previous Epoch Sequence Number Update
2016-12-22 08:42:56 -08:00
Jacob Barthelmeh
1c17b8eed6 static analysis check of null dereference and memory management 2016-12-21 16:20:18 -07:00
John Safranek
40800d8065 DTLS-SCTP fix
1. Add the SCTP suite test file to the include.am.
2. Skip the sequence number increment for client_hello messages in
   DTLS, but do the increment for SCTP.
2016-12-21 14:24:20 -08:00
David Garske
338cc9e873 Added wolfevent.c and wolfmath.c to ltc project. 2016-12-21 14:09:19 -08:00
David Garske
3bec816f97 Cleanup min(), TRUE, FALSE, ALIGN16 and ALIGN32. Replace only use of BYTE3_LEN with OPAQUE24_LEN. Replace “ “ with “\t” (saves bytes and is consistent). Fix align issue with “WOLFSSL_EVP_MD_CTX” hash. 2016-12-21 14:05:00 -08:00
David Garske
d73338851d Combine generic math functions into new wolfmath.c/.h. Cleanup of the !ALT_ECC_SIZE code so fp_int always has size. This is in prep for async changes for new WC_BIGINT type for hardware crypto. 2016-12-21 13:39:33 -08:00
David Garske
6cc1fd293e Fixed issue with stack increase with curve cache disabled. Fixed issue with missing wc_ecc_curve_free() in wc_ecc_verify_hash_ex() causing mem leak. Changed ecc_curve_spec_cache to be allocated per curve. Added new wc_ecc_curve_cache_free() API to release all curve cache memory. Moved ecc_curve_spec struct and ecc_curve_load_mask enum to ecc.c. Add missing wc_ecc_fp_free() to wolfCrypt test. Added ecc.c comment for FP_ECC. 2016-12-21 12:31:02 -08:00
John Safranek
ac27d6d7ca DTLS Sequence Number update
1. Set the prevSeq to nextSeq on CCS.
2. Fully clear nextSeq on CCS.
2016-12-20 09:30:46 -08:00
toddouska
1a5c5d0011 Merge pull request #676 from cconlon/fortify
address fortify high issues
2016-12-19 20:03:24 -08:00
toddouska
07e7521f34 Merge pull request #674 from JacobBarthelmeh/Testing
Bug fix for cache attack
2016-12-19 18:31:04 -08:00
Kaleb Himes
125cfcacc3 Merge pull request #675 from JacobBarthelmeh/SGX
fix make dist with SGX project
2016-12-19 17:06:14 -07:00
Chris Conlon
46f3b2a367 address fortify high issues 2016-12-19 15:50:11 -07:00
Jacob Barthelmeh
345df93978 Bug fix for cache attack 2016-12-19 14:51:42 -07:00
toddouska
6cefca6a49 Merge pull request #672 from cconlon/pkcs7fix
PKCS#7: fixes for building with AES disabled, smallstack
2016-12-19 13:46:35 -08:00
toddouska
dca57bf2f0 Merge pull request #673 from cconlon/fortify
address fortify critical issues
2016-12-19 13:42:11 -08:00
Jacob Barthelmeh
4d637146d7 fix make dist with SGX project 2016-12-19 14:03:07 -07:00
Chris Conlon
060ff5e5ef address fortify critical issues 2016-12-19 11:53:14 -07:00
toddouska
168203ff9d Merge pull request #649 from dgarske/distro
Linux Distro Patches
2016-12-16 16:03:16 -08:00
toddouska
c313d97579 Merge pull request #622 from SparkiDev/sha384
SHA384
2016-12-16 15:57:40 -08:00
toddouska
50cf1df8da Merge pull request #669 from SparkiDev/scrypt
Implementation of scrypt
2016-12-16 15:53:48 -08:00
toddouska
c73ddf3f8a Merge pull request #670 from dgarske/executebit
Removed the execute bit on the new port files.
2016-12-16 15:52:26 -08:00
Chris Conlon
c5fbf96557 PKCS#7: fixes for building with AES disabled, smallstack 2016-12-16 15:58:18 -07:00
David Garske
57571cb45e Fix merge issues with ECC HAVE_COMP_KEY after rebase. 2016-12-16 14:20:00 -08:00
David Garske
f990775451 Fix issue with ECC_SHAMIR disabled due to curve->b remnant from async branch. 2016-12-16 11:53:33 -08:00
David Garske
cbc3cc6e91 Removed the execute bit on the new port files. 2016-12-16 11:35:40 -08:00
David Garske
f1ead30987 New ECC curve cache feature to improve performance. Disabled by default and enabled using ./configure CFALGS="-DECC_CACHE_CURVE" or #define ECC_CACHE_CURVE. Added internal ECC states. Combined wc_ecc_mulmod_ex versions for timing rest / not. Tested with all math, timing, FP variants and NXP LTC and ECC508A hardware. Pulled in from latest async branch. Added new ECC_MAX_SIG_SIZE enum to help with sizing the sign buffer.
Performance Increases with ECC_CACHE_CURVE enabled:
* Key Gen 4.2%
* Key Agree, 4.0%
* Sign 6.8%
* Verify 5.8%
2016-12-16 11:32:59 -08:00
toddouska
a9e7c4081f Merge pull request #660 from ejohnstown/win-renegotiation
Enable secure renegotiation by default for Windows library build.
2016-12-15 16:17:15 -08:00
Kaleb Himes
7b948fe04d Merge pull request #667 from JacobBarthelmeh/SGX
add Windows build for SGX
2016-12-15 16:23:29 -07:00
toddouska
ec90d72412 Merge pull request #666 from cconlon/chachafix
fix CertificateRequest cert type for ECDSA ChaCha suites
2016-12-15 12:08:08 -08:00
toddouska
01d8201284 Merge pull request #665 from cconlon/certs
add missing certs and keys to certs/include.am
2016-12-15 12:03:12 -08:00
toddouska
d0533c6dad Merge pull request #664 from cconlon/pkcs7
PKCS#7/CMS expansion
2016-12-15 12:01:00 -08:00
dgarske
9d94474133 Merge pull request #668 from ejohnstown/handshake-size
Fail on redundant handshake message data
2016-12-15 11:41:53 -08:00
toddouska
6959c21fdd Merge pull request #663 from dgarske/stm32_iar
Fixes to build STM32 with IAR
2016-12-15 11:26:43 -08:00
John Safranek
be65f26dd2 If there is a badly formed handshake message with extra data at the
end, but the correct size with the extra data, send a decode_error
alert and fail the handshake.
2016-12-14 16:02:29 -08:00
Chris Conlon
33f21e8b8d set correct cert type in CertificateRequest when using ChaCha suite with ECDSA 2016-12-14 11:34:10 -07:00
Jacob Barthelmeh
e16f2c0722 add Windows build for SGX 2016-12-14 10:41:52 -07:00
Chris Conlon
41f6863970 add missing certs and keys to certs/include.am 2016-12-14 09:46:41 -07:00
Chris Conlon
55554b79a9 PKCS#7: fix use after free in wc_DecodeKtri 2016-12-14 09:15:45 -07:00
Sean Parkinson
20887a8c35 Implementation of scrypt
Tests and benchmarking added.
Configure with --enable-scrypt and requires --enable-pwdbased
2016-12-14 16:57:41 +10:00
Chris Conlon
e5d1e3ae10 PKCS#7: only output test bundles when PKCS7_OUTPUT_TEST_BUNDLES is defined 2016-12-13 15:27:46 -07:00
Sean Parkinson
22ecd55964 Don't ForceZero in assembly optimized versions. 2016-12-14 08:22:05 +10:00
Sean Parkinson
a1b92dc809 Tidy up CPU Id check not not reference SHA384 2016-12-14 08:22:05 +10:00
Sean Parkinson
24cfba4276 Fix ForceZero calls 2016-12-14 08:22:05 +10:00
Sean Parkinson
0e4aa233ba Use ForceZero in all implementations of Transform 2016-12-14 08:22:05 +10:00
Sean Parkinson
fd21023823 Share code between SHA512 and SHA384 2016-12-14 08:22:05 +10:00
Sean Parkinson
811be0eb9e Faster zeroize on x86_64 2016-12-14 08:22:05 +10:00
David Garske
f70860a9af Make sure NO_64BIT is defined. 2016-12-13 12:18:21 -08:00
David Garske
fd9a94b2bd Fixes to build STM32 with IAR. 2016-12-13 10:24:55 -08:00
Chris Conlon
dad0cfda92 add EnvelopedData ECC support, refactor pkcs7 2016-12-13 09:40:54 -07:00
dgarske
483e461c49 Merge pull request #647 from kaleb-himes/RIOT_OS
RIOT OS support, test scripts will be submitted to RIOT-OS repository
2016-12-10 19:13:19 -08:00
kaleb-himes
6c7e1785aa EXIT_TEST macro added for cleaner implementation and maintenance 2016-12-09 19:39:36 -07:00
kaleb-himes
1748045d52 use NO_WRITEV for portability 2016-12-09 19:12:25 -07:00
Chris Conlon
5006306bb8 PKCS#7: add support for optional unprotectedAttributes with EncryptedData 2016-12-09 17:02:57 -07:00
Chris Conlon
abf18858a8 refactor PKCS#7 functionality into separate functions for Enveloped and EncryptedData 2016-12-09 17:02:57 -07:00
Chris Conlon
b5eb8dce2f add PKCS#7/CMS EncryptedContent support 2016-12-09 16:57:31 -07:00
John Safranek
e80331e03a fix Windows debug build warning with secure renegotiation 2016-12-09 14:31:21 -08:00
John Safranek
7fa825fde0 Enable secure renegotiation by default for Windows library build. 2016-12-09 13:39:00 -08:00
kaleb-himes
e3b57211d5 undo whitespace modification 2016-12-09 14:36:06 -07:00
kaleb-himes
fc9d689bc6 fastmath works with RIOT_OS if defined TFM_NO_ASM 2016-12-09 14:34:14 -07:00
toddouska
b0b80bed78 Merge pull request #657 from cconlon/x963kdf
add ANSI-X9.63-KDF support [SEC1]
2016-12-09 13:29:41 -08:00
toddouska
ad2b0810c6 Merge pull request #648 from cconlon/keywrap
add AES key wrap support, RFC 3394
2016-12-09 13:23:39 -08:00
kaleb-himes
7a76baa83e restore .am and gitignore 2016-12-09 13:13:43 -07:00
kaleb-himes
c957107d76 merge with master and remove RIOT_Make directory, keep changes for working on Mac OS X 2016-12-09 13:11:45 -07:00
kaleb-himes
9e17b2b0aa Merge branch 'master' of https://github.com/wolfssl/wolfssl into RIOT_OS 2016-12-09 13:09:25 -07:00
John Safranek
8b1a6d4c70 Merge pull request #658 from kaleb-himes/sniffer
Prevent forcezero from running on freed memory
2016-12-09 09:04:01 -08:00
Chris Conlon
33e840b01b add AES key wrap support, RFC 3394 2016-12-09 09:30:56 -07:00
dgarske
fdbb142699 Merge pull request #659 from toddouska/distcheck
fix nxp distcheck filename typo
2016-12-09 08:04:02 -08:00
toddouska
d2ed611757 fix nxp distcheck filename typo 2016-12-08 16:52:12 -08:00
toddouska
6cfb8e30b2 Merge pull request #591 from dgarske/STM32_CUBEMX
STM32 F2/F4 CubeMX and Std Peripheral Library hardware crypto support
2016-12-08 16:36:43 -08:00
toddouska
ab7849be0d Merge pull request #655 from JacobBarthelmeh/ARMv8
ARMv8
2016-12-08 16:34:19 -08:00
Chris Conlon
2db7bf0dc0 use static digest for X9.63 KDF, add smallstack support 2016-12-08 17:28:53 -07:00
toddouska
5da564d03c Merge pull request #656 from SparkiDev/hashes
Get the hash of the handshake messages rather than finalize.
2016-12-08 16:23:28 -08:00
kaleb-himes
d2b5a9538d Prevent forcezero from running on freed memory 2016-12-08 15:11:41 -07:00
Sean Parkinson
289acd088a Remove state save and restore 2016-12-08 15:21:04 +10:00
Sean Parkinson
ea1a03d538 Get the hash of the handshake messages rather than finalize.
Inconsistency between SHA256 and SHA384/SHA512 when getting hash.
More handshake messages can be added after this operation.
2016-12-08 15:21:04 +10:00
Chris Conlon
a5b267087f add ANSI-X9.63-KDF support [SEC1] 2016-12-07 20:26:09 -07:00
toddouska
2a3f3433e7 Merge pull request #652 from ejohnstown/autoconf-size-check
Move autoconf size checks
2016-12-07 15:23:25 -08:00
toddouska
3dec222969 Merge pull request #523 from dgarske/atmel_pr
Support for Atmel ATECC508A
2016-12-07 15:01:08 -08:00
toddouska
074741aabf Merge pull request #651 from dgarske/ksdk_dup_dec
Remove obsolete duplicate declaration for wc_RsaFunction in the KSDK header
2016-12-07 13:48:53 -08:00
toddouska
a1bd2c8b35 Merge pull request #654 from dgarske/smallstackfixes
Fixes for build with WOLFSSL_SMALL_STACK defined
2016-12-07 13:41:45 -08:00
kaleb-himes
da4a46ddf6 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into RIOT_OS 2016-12-07 14:16:34 -07:00
dgarske
477ec3c3d1 Merge pull request #2 from NickolasLapp/STM32_CUBEmX
Fix DES3 on STM32 CUBEMX
2016-12-07 11:27:24 -08:00
Nickolas Lapp
82c12fb7be Fix DES3 on STM32 CUBEMX 2016-12-07 10:20:46 -07:00
David Garske
5c59ccdeb9 Fix scan-build warning. Updated "side" variable failure case to return proper error code. 2016-12-07 07:57:55 -08:00
David Garske
4dd393077f Updated EccSharedSecret callback to use ecc_key* peer directly. Passes examples with "-P" tests and new pkcallback test script. 2016-12-07 07:57:55 -08:00
David Garske
45d26876c8 Moved wolfSSL_GetEccKey logic to internal.c and use only for PK_CALLBACK. Added other ECC key info to the EccSharedSecretCb. Cleanup of the "if (ssl->ctx->EccSharedSecretCb == NULL)" logic to revert indent so changes are minimized. Removed new wolfSSL_GetEccKey API. 2016-12-07 07:57:55 -08:00
David Garske
eaca90db28 New Atmel support (WOLFSSL_ATMEL) and port for ATECC508A (WOLFSSL_ATECC508A). Adds wolfCrypt support for ECC Hardware acceleration using the ATECC508A. Adds new PK callback for ECC shared secret. Fixed missing "wc_InitRng_ex" when using "CUSTOM_RAND_GENERATE_BLOCK". Added ATECC508A RNG block function for P-RNG bypass ability. Added internal "wolfSSL_GetEccPrivateKey" function for getting reference to private key for ECC shared secret (used in test.h for testing PK_CALLBACK mode). Added README.md for using the Atmel ATECC508A port. 2016-12-07 07:57:55 -08:00
David Garske
9399cc05cb Fixes for building with CRL monitor when not linux, OS X or FreeBSD and --enable-distro set. Cleanup of the crl.c HAVE_CRL_MONITOR checks for OS and make sure if StopMonitor preprocessor is defined the function will also be defined. 2016-12-07 07:07:27 -08:00
John Safranek
fdc297f6bd Moved the check for the size of long, long long, and __m128 to before
the checks for libraries. In some combination of autotools, making a
32-bit build, the autoconf test code can't link libnetwork and crashes,
leaving those sizes all set to 0.
2016-12-06 16:15:45 -08:00
dgarske
55b1ced783 Merge pull request #653 from toddouska/pkcallbacks
add pkcallbacks script test
2016-12-06 15:15:50 -08:00
Jacob Barthelmeh
944e5fba03 ARMv8 : load pointer to AES key and counter into a register along with pointer to SHA256 K table to handle tight optimized loops on function call with -flto 2016-12-06 21:42:15 +00:00
toddouska
ed8e0132a7 do_cleanup on pkcallbacks.test 2016-12-06 13:04:12 -08:00
David Garske
c0e006d42c Fixes for build with small stack enabled. 2016-12-06 12:38:05 -08:00
toddouska
80cc737ffa add pkcallbacks script test 2016-12-06 11:27:05 -08:00
David Garske
9fcb6e4e3c Remove obsolete duplicate declaration for wc_RsaFunction in the KSDK port header. 2016-12-06 10:25:56 -08:00
David Garske
932199c5e9 Fix build warning about unused static functions wc_AesEncrypt and wc_AesDecrypt with STM32. 2016-12-05 14:22:59 -08:00
David Garske
4a7651a09a STM32 F2/F4 CubeMX and Std Peripheral Library hardware crypto support for RNG, AES, SHA1, DES3 and MD5. Adds new WOLFSSL_STM32_CUBEMX and WOLFSSL_STM32F4 defines. Tested on STM32F437II. 2016-12-05 14:22:59 -08:00
toddouska
f3816a4dc5 Merge pull request #597 from dgarske/NXPLTC
NXP (K82) LTC math hardware acceleration support
2016-12-05 13:50:31 -08:00
David Garske
1d14ac5ff3 Fixes to include.am and sha256.c after master rebase. Retested on NXP K82 with and without HW accel (all tests/benchmarks pass). 2016-12-05 09:15:58 -08:00
Martin Latal
877ea7011c Fix for LTC RSA-4096. Use original wolfSSL code for RSA operation, reduce in LTC port layer. 2016-12-05 09:01:59 -08:00
David Garske
0611c45869 Attempt to fix sha.c error with older visual studio compiler. 2016-12-05 09:01:59 -08:00
David Garske
08b8af5f83 Fix for forced software crypto build. 2016-12-05 09:01:59 -08:00
David Garske
c35daa877e Fix to allow disabling MMCAU/LTC for software only test (moved preprocessor defines to Kinetis). Updated K82 software benchmark with actual values. 2016-12-05 09:01:59 -08:00
David Garske
ae75842021 Fix build issues with rebase for ECC and RSA. Changed user_settings.h example when LTC is enabled to disable Shamir and ECC-521. Cleanup to add USE_NXP_MMCAU and USE_NXP_LTC for the example user_settings.h, so the project file can automatically configure. 2016-12-05 09:01:59 -08:00
David Garske
a6b96b17ff Fixes to include path for NXP ksdk_port. Fixes for time USER/OVERRIDES so their #ifdef's are checked first. Fix to initialize LTC via new "ksdk_port_init" function. Cleanup of the ksdk_port.c for formatting, macros, statics and line length. Cleanup of the AES code for key size. Cleanup of the wolfCrypt sha.c for readability. Added support for the KSDK bare metal drivers to the IDE Rowley CrossWorks example. Updated the settings.h to allow for overrides in Freescale section. Updated README with info for using LTC. 2016-12-05 09:01:59 -08:00
David Garske
8e64d564dc NXP/Freescale K8X MMCAU / LTC core support for RSA, ECC, Ed/Curve25519, AES, DSA, DES3, MD5, RNG, SHA and SHA2. 2016-12-05 09:01:59 -08:00
kaleb-himes
ddeb9da502 warning on empty translation units ignored, move cflags to Makefile 2016-12-03 11:55:24 -07:00
kaleb-himes
d2aef9a82a README update 2016-12-03 11:03:17 -07:00
kaleb-himes
43525343fc add RIOT tests to dist and make sure Makefiles are not excluded by .gitignore 2016-12-02 17:30:57 -07:00
kaleb-himes
162294e3e5 added benchmark app for RIOT and updated test error handling 2016-12-02 14:39:37 -07:00
kaleb-himes
684f9bad22 RIOT OS build and test scripts, build instructions 2016-12-02 13:53:05 -07:00
toddouska
4317141260 Merge pull request #646 from JacobBarthelmeh/master
remove fPIE flag
2016-12-01 12:56:56 -08:00
Jacob Barthelmeh
d32af7e44b remove fPIE flag : fPIE is suitable for use with executables and not when creating libraries 2016-12-01 12:01:38 -07:00
toddouska
92377140b7 Merge pull request #520 from dgarske/compat_fixes
Add user cert chain DER support and OpenSSL compatibility fixes/improvements
2016-12-01 09:23:49 -08:00
David Garske
650ddb8d23 Fixes so make check works with NO_FILESYSTEM and FORCE_BUFFER_TEST. Example: ./configure CFLAGS="-DNO_FILESYSTEM -DFORCE_BUFFER_TEST" 2016-11-30 16:27:24 -08:00
David Garske
039aedcfba Added "wolfSSL_use_certificate_chain_buffer_format". Added "wolfSSL_SESSION_CIPHER_get_name" to get cipher suite name using WOLFSSL_SESSION*. Moved the "wolfSSL_get_cipher_name_from_suite" function to internal.c. Added new server-cert-chain.der, which is combination of ca-cert.der and server-cert.der. Enhanced load_buffer to detect format using file extension. Can test use of DER cert chain with NO_FILESYSTEM defined using "./examples/server/server -c ./certs/server-cert-chain.der -k ./certs/server-key.der". 2016-11-30 16:26:02 -08:00
David Garske
3d920b23a0 Fix for building with NO_ERROR_STRINGS. 2016-11-30 16:26:02 -08:00
David Garske
7a35d904c2 Added new API "wolfSSL_CIPHER_get_name_from_suite" to allow use of the cipherSuite and cipherSuite0 args directly to get cipher suite name. Changed "wolfSSL_CIPHER_get_name" to call new API (based on original). ASN change to allow ToTraditional and SetName for OPENSSL_EXTRA. 2016-11-30 16:26:02 -08:00
David Garske
c3c3419138 Added processing of user cert chain in DER format. Added arg check on "wolfSSL_get_certificate" to fix NULL dereference if certificate not yet set via "wolfSSL_use_certificate_buffer" or "wolfSSL_use_certificate_file". Added "wolfSSL_CTX_use_certificate_chain_buffer_format" to expose way to import certificate chain buffer as ASN1 (since "wolfSSL_CTX_use_certificate_chain_buffer" assumes PEM) . Changed ProcessFile from static and added as local in internal.h. 2016-11-30 16:26:01 -08:00
John Safranek
cfc5de8c5a Merge pull request #645 from toddouska/fds
allow separate set fds for read/write, helpful for DTLS multicast
2016-11-30 13:17:58 -08:00
toddouska
8f89d4922f allow separate set fds for read/write, helpful for DTLS multicast 2016-11-30 11:15:57 -08:00
David Garske
a2dc01413c For distro build don't install options.h (conflicts with multi-arch). Fix for BUILD_DISTRO excludes with indent. 2016-11-29 13:29:19 -08:00
toddouska
235060eff2 Merge pull request #644 from cconlon/return_fix
correct MEMORY_E returns in asn.c
2016-11-28 10:58:06 -08:00
Chris Conlon
a9936cf3ee correct MEMORY_E returns in asn.c 2016-11-28 10:39:07 -07:00
Jacob Barthelmeh
2cbc6ed673 ARMv8 : handle aggressive optimizers 2016-11-23 15:44:53 -07:00
toddouska
7dab97fb01 Merge pull request #641 from dgarske/verifycb_peer_cert_chain
Add the peer cert buffer and count to X509_STORE_CTX for verify callback
2016-11-23 12:59:00 -08:00
David Garske
1240014fab Fix OCSP to use public buffer type (now WOLFSSL_BUFFER_INFO). 2016-11-22 19:33:40 -08:00
Sean Parkinson
8a8274d403 Merge pull request #643 from dgarske/fix_hmac_224
Fix wc_HmacSizeByType for SHA224.
2016-11-23 13:28:37 +10:00
David Garske
50131b410d Added new "WOLFSSL_BUFFER_INFO" type to represent internal "buffer" type and the "WOLFSSL_X509_STORE_CTX" certs. Added "VERIFY_CALLBACK_SHOW_PEER_CERTS" to print peer certs pointer and length. 2016-11-22 19:24:54 -08:00
toddouska
ff16ecda5e Merge pull request #642 from dgarske/ecc_custcurve_speedup
ECC performance increase with custom curves enabled
2016-11-22 16:05:57 -08:00
JacobBarthelmeh
a540169b72 Merge pull request #638 from ejohnstown/dtls-window-update
DTLS Sequence Window Tracking Update
2016-11-22 16:53:04 -07:00
David Garske
16907de633 Fix wc_HmacSizeByType for SHA224. 2016-11-22 14:45:10 -08:00
David Garske
13cf313001 ECC performance increase with custom curves enabled (WOLFSSL_CUSTOM_CURVES) when A param is 3. 2016-11-22 13:43:18 -08:00
David Garske
5b76a37234 Add the peer cert buffer and count to the X509_STORE_CTX used for the verify callback. Fixes #627. 2016-11-22 11:45:00 -08:00
David Garske
13bdcc518d Pulled in patches from Debian package. 2016-11-22 11:25:40 -08:00
John Safranek
2d9d3aeb91 DTLS Window Update: fixes and changes 2016-11-22 10:12:18 -08:00
Kaleb Himes
b61e6e1219 Merge pull request #639 from moisesguimaraes/fixes-srp-priv-key-size
fixes random keys size ('a' and 'b')
2016-11-21 15:59:32 -07:00
Moisés Guimarães
64fc68920d fixes random keys size ('a' and 'b') 2016-11-21 18:08:19 -03:00
John Safranek
ec6fec452d Update session export with the new sequence number windows. 2016-11-21 09:16:53 -08:00
John Safranek
2507c4da8a DTLS Sequence Window Tracking Update
1. Modify the DTLS sequence window to use an array of word32 instead
   of a word32 or word64 depending on the availability of word64.
2. One can change the array size to have a bigger window.
2016-11-18 11:52:43 -08:00
toddouska
b380eef3e2 Merge pull request #637 from JacobBarthelmeh/master
PKCS12 : return on memory error
2016-11-18 11:03:57 -08:00
Jacob Barthelmeh
ac5436b462 PKCS12 : return on memory error 2016-11-18 09:40:26 -07:00
toddouska
1289e66641 Merge pull request #636 from dgarske/fix-ti-hash-mem-leak
Fix memory leak issue in ti-hash.c with small stack
2016-11-17 16:19:37 -08:00
toddouska
f167fe3d4a Merge pull request #625 from dgarske/tls_nosha256
Fix to allow TLS with NO_SHA256
2016-11-17 16:14:28 -08:00
David Garske
bfd0a1b405 Fix to allow SHA384 cipher suite with NO_SHA256 defined. Without this fix the BUILD_AESGCM wasn't getting defined. 2016-11-17 10:29:48 -08:00
David Garske
b01952ea40 Cleanup the hash free in FreeHandshakeResources. 2016-11-17 09:34:31 -08:00
David Garske
de1ee91863 Fix memory leak issue with WOLFSSL_SMALL_STACK defined and using TI hardware accelerated hashing. 2016-11-17 09:24:56 -08:00
dgarske
f275331e44 Merge pull request #634 from toddouska/sha512-length
Sha512 length
2016-11-16 15:06:20 -08:00
toddouska
5c3bd7e1a0 Merge pull request #635 from cconlon/pkcs7signed
fix wc_PKCS7_EncodeSignedData with no signed attributes
2016-11-16 14:07:58 -08:00
Chris Conlon
8cea6ad148 fix wc_PKCS7_EncodeSignedData when used with empty or no signed attributes 2016-11-16 13:35:57 -07:00
toddouska
44a23b072f fix mcapi with size change 2016-11-16 09:39:21 -08:00
toddouska
afc54c3dff change sha512 hi/loLen to 64bits 2016-11-16 09:30:35 -08:00
toddouska
f922d3f2d6 Merge pull request #624 from SparkiDev/sha224
SHA224 implementation added
2016-11-15 13:53:34 -08:00
toddouska
98b57e045a Merge pull request #629 from SparkiDev/rsa-crt
Make RSA CRT constant time
2016-11-15 13:36:32 -08:00
toddouska
f27159f2db Merge pull request #633 from cconlon/renegotiation_info
add server side empty renegotiation_info support
2016-11-15 11:11:17 -08:00
Chris Conlon
a10ec0ff91 adjust suiteSz and use SUITE_LEN in FindSuite() 2016-11-15 10:49:37 -07:00
dgarske
ee53853d2f Merge pull request #632 from toddouska/init_multi
fix non ecc_make_key init_mulit potential problems
2016-11-14 19:34:14 -08:00
toddouska
cbb2ce6baf Merge pull request #626 from dgarske/fix_ecc_make_rngfail
Fix for "wc_ecc_make_key_ex" if call to rng fails
2016-11-14 17:35:15 -08:00
Chris Conlon
49978d1417 server side empty renegotiation_info support 2016-11-14 15:33:36 -07:00
toddouska
1a7fe0d4c5 fix non ecc_make_key init_mulit potential problems 2016-11-14 12:49:42 -08:00
David Garske
82e8210208 Support for building without SHA256 with NO_OLD_TLS and SHA384/512. Although TLS 1.2 default digest for certs is SHA256 and our test cert signatures use SHA256, so make check will fail. Also requires disabling the P-RNG which uses SHA256. Added missing "wc_InitRng_ex" when using "CUSTOM_RAND_GENERATE_BLOCK". Cleanup of the BuildCertHashes, DoRounds, HashInput, HashOutput and HashOutputRaw return codes. 2016-11-14 12:47:24 -08:00
David Garske
cee321323a Better handle "mp_init_multi" failure in "wc_ecc_make_key_ex". 2016-11-14 12:38:01 -08:00
toddouska
fa816f0460 Merge pull request #631 from dgarske/ecc_privkey_import_oid
Fix for "wc_EccPrivateKeyDecode" to handle custom curve OID.
2016-11-14 11:52:48 -08:00
toddouska
047b6df1a2 Merge pull request #630 from JacobBarthelmeh/master
remove include of ec.h in ecc.c
2016-11-14 11:51:15 -08:00
toddouska
ecc5fccf07 Merge pull request #628 from JacobBarthelmeh/Testing
revert AESNI padding and handle the case in aes.c
2016-11-14 11:50:35 -08:00
David Garske
a2d29e4c71 Further improve the "wc_EccPrivateKeyDecode" to use the CheckCurve return code, which is the curve_id in the success case. Fixes scan-build warning. 2016-11-14 10:06:20 -08:00
David Garske
07efd88e4d Fix for "wc_EccPrivateKeyDecode" to handle custom curve OID. 2016-11-14 09:53:31 -08:00
Jacob Barthelmeh
dad628cb0d remove include of ec.h in ecc.c 2016-11-14 10:03:19 -07:00
Sean Parkinson
2023b65f4c Make RSA CRT constant time
Identifying which part of the CRT failed, through timing, reveals
information useful to an attacker.
2016-11-14 08:57:28 +10:00
David Garske
6d5485b88f Fix to "mp_init_multi" so failure ensures a later "mp_clear" won't free on un-initialized pointer. Applies to !USE_FAST_MATH only. No measurable benchmark difference. 2016-11-11 20:03:58 -08:00
Sean Parkinson
9b0d53ba50 Fixes from review
Remove ForceZero changes (better version in another pull request)
Remove SHA-224 APIs for FIPS (algorithm not avaialable in FIPS.
2016-11-12 09:52:07 +10:00
Jacob Barthelmeh
0b3d9cbccd revert AESNI padding and handle the case in aes.c 2016-11-11 16:26:29 -07:00
toddouska
cc303a3035 Merge pull request #623 from SparkiDev/ecc
ECC improvements/fixes
2016-11-11 12:53:12 -08:00
Sean Parkinson
478f279b3c Fix logic 2016-11-11 16:38:28 +10:00
Sean Parkinson
abcd6af512 Disable SHA-224 in FIPS 2016-11-11 16:29:34 +10:00
Sean Parkinson
9e81261f1e Fixes 2016-11-11 16:11:16 +10:00
Sean Parkinson
8a7bb3fad4 Z will be 0 not 1 2016-11-11 12:53:48 +10:00
Sean Parkinson
71259113b2 ECC improvements/fixes
When checking for 1 actually check for 1 and not the digit count.
When checking for negative use a macro - for speed.
2016-11-11 12:41:25 +10:00
Sean Parkinson
45983c3b32 Fix SHA224 enum in HMAC code 2016-11-11 12:17:32 +10:00
toddouska
a0ee159fa5 Merge pull request #617 from JacobBarthelmeh/Compatibility-Layer
Compatibility layer
2016-11-10 11:47:42 -08:00
David Garske
1aca9a6079 Fix for "wc_ecc_make_key_ex" if call to rng fails. Issue only applies to !USE_FAST_MATH case on failure response from call to "wc_RNG_GenerateBlock". 2016-11-10 11:39:29 -08:00
John Safranek
eb0de32aa2 Merge pull request #621 from JacobBarthelmeh/Testing
adjust alignment of arrays used for case with AESNI
2016-11-10 10:00:54 -08:00
Sean Parkinson
fdfc177254 SHA224 implementation added
Added SHA24 implementation and tetss.
Added HMAC-SHA224 implementation and tests.
Added RSA-SHA224 and ECDSA-SHA224.
Added MGF1-SHA224
Added OpenSSL APIs for SHA224
Configuration option to enable SHA224 and it is on by default for x86_64
2016-11-10 15:52:26 +10:00
Jacob Barthelmeh
55401fceb8 adjust alignment of arrays used for case with AESNI 2016-11-09 15:03:26 -07:00
Chris Conlon
af44b2527a Merge pull request #620 from JacobBarthelmeh/PKCS12
PKCS12 : visibility of structs and guards
2016-11-09 08:59:31 -07:00
toddouska
e9cda7b93f Merge pull request #619 from JacobBarthelmeh/ARMv8
ARMv8
2016-11-08 16:21:01 -08:00
Jacob Barthelmeh
fa48bca262 PKCS12 : visibility of structs and guards 2016-11-08 16:49:09 -07:00
Jacob Barthelmeh
c122558810 COMPAT. LAYER : fix missing return value and alignment 2016-11-08 14:16:02 -07:00
Jacob Barthelmeh
208f747a47 ARMv8 : add armv8-aes.c to EXTRA_DIST 2016-11-08 10:28:01 -07:00
John Safranek
d4b45c4299 Merge pull request #616 from moisesguimaraes/fixes-wolfcrypt-py
Fixes wolfcrypt py
2016-11-08 09:07:21 -08:00
Moisés Guimarães
5f6cf282b1 fixes include.am comments 2016-11-07 21:15:23 -03:00
Moisés Guimarães
88df983251 moves include.am into wolfcrypt-py folder 2016-11-07 21:09:08 -03:00
JacobBarthelmeh
46dee9e792 ARMv8 : clang 32 bit build 2016-11-07 15:48:06 -08:00
JacobBarthelmeh
668af9b32f POLY1305 : clang 32 bit warning about macros 2016-11-07 15:28:30 -08:00
Jacob Barthelmeh
f7a951709f COMPAT. LAYER : get SSL client random bytes 2016-11-07 13:21:35 -07:00
Jacob Barthelmeh
f06a392764 COMPAT. LAYER : DES set key and malloc/free 2016-11-07 13:21:05 -07:00
Moisés Guimarães
b50914f2c7 Drops 3DES and adds int wc_RsaSetRNG(RsaKey* key, WC_RNG* rng); for RSA blinding 2016-11-07 16:06:35 -03:00
Moisés Guimarães
08f6d23e84 moves wolfcrypt-py implementation to wrapper/python/wolfcrypt 2016-11-07 16:02:41 -03:00
toddouska
68c43e4344 Merge pull request #615 from ejohnstown/dtls-verify-retry-fix
Fix dropped DTLS Hello Verify retransmit
2016-11-04 15:52:13 -07:00
toddouska
70b227011d Merge pull request #604 from JacobBarthelmeh/PKCS12
Pkcs12
2016-11-04 15:50:50 -07:00
John Safranek
c271806936 Merge pull request #614 from toddouska/scr-verify
add SCR client and server verify data check
2016-11-04 10:11:05 -07:00
John Safranek
ada2573009 Increment the expected handshake number if the call to the handhsake
message processing function is successful, but not if the handshake
message is the client_hello. Process client hello clears that counter
and incrementing it breaks the handshake. Fixes issue #612.
2016-11-03 14:49:21 -07:00
toddouska
87e3f45f52 add SCR client and server verify data check 2016-11-03 14:45:24 -07:00
toddouska
356c3a37aa Merge pull request #613 from JacobBarthelmeh/Testing
MODE : change source file mode back to 644
2016-11-03 13:16:59 -07:00
Jacob Barthelmeh
0839925797 PKCS12 : visibility, check on key match, sanity check on malloc 2016-11-03 11:14:29 -06:00
Jacob Barthelmeh
668e9a8e08 MODE : change source file mode back to 644 2016-11-03 10:08:13 -06:00
toddouska
3780f452e8 Merge pull request #609 from JacobBarthelmeh/ARMv8
ARMv8 : clang build with ARMv8
2016-11-03 09:02:20 -07:00
toddouska
8e0ab18924 Merge pull request #611 from cconlon/pkcs7
allow PKCS#7 to be compiled with AES disabled
2016-11-03 09:00:46 -07:00
Chris Conlon
9a735fc873 allow PKCS#7 to be compiled with AES disabled 2016-11-02 12:18:45 -06:00
toddouska
d4b8320226 Merge pull request #606 from ejohnstown/dtls-pool
DTLS Pool Change
2016-11-02 10:54:53 -07:00
John Safranek
a3ea8378ec Cap the size of the transmit and receive DTLS message lists at 255. 2016-11-02 09:15:05 -07:00
JacobBarthelmeh
6f06b60bc0 ARMv8 : clang build with ARMv8 2016-11-01 13:38:01 -07:00
toddouska
624ec3d492 Merge pull request #607 from cconlon/pkcs7
add AES content encryption support to PKCS#7 EnvelopedData
2016-11-01 12:03:24 -07:00
dgarske
22c5e22698 Merge pull request #608 from JacobBarthelmeh/master
Option to disable RNG (WC_NO_RNG or --disable-rng). If RNG is disabled and building in crypto that makes calls to RNG functions the build will fail with linker undefined symbol errors.
2016-11-01 11:53:53 -07:00
John Safranek
ffe905afbf Moved the checks for the new session ticket and certificate verify
messages from the change cipher spec handler to the sanity check
handshake message function. It provides support for DTLS missing
and duplicate messages.
2016-11-01 09:53:53 -07:00
John Safranek
3075269326 Replace the DTLS MsgPool for saving transmit handshake messages with
the DTLS MsgList.
2016-11-01 09:53:53 -07:00
John Safranek
3065bb2178 Merge pull request #588 from steweg/fix_dtls_retranmission
Adjust DTLS retranmission logic
2016-11-01 09:29:30 -07:00
Jacob Barthelmeh
70e7e34c87 RNG : change to --disable-rng, non-autoconf scenario, help msg 2016-11-01 10:21:29 -06:00
Jacob Barthelmeh
09c32de412 RNG : option to not use RNG 2016-10-31 16:51:02 -06:00
Chris Conlon
50464d4aef gitignore PKCS#7 test files, delete on make clean 2016-10-31 14:46:03 -06:00
Chris Conlon
fa9a9175d0 add AES-256-CBC to PKCS#7 Encode/DecodeEnvelopedData 2016-10-31 14:45:57 -06:00
Chris Conlon
8c23c3cdd0 add AES-192-CBC to PKCS#7 Encode/DecodeEnvelopedData 2016-10-31 14:27:21 -06:00
Chris Conlon
17c184e720 add AES-128-CBC to PKCS#7 Encode/DecodeEnvelopedData 2016-10-31 14:27:14 -06:00
Jacob Barthelmeh
b686deecbe PKCS12 : Add PKCS12 parsing 2016-10-29 13:12:26 -06:00
JacobBarthelmeh
79cba75925 Merge pull request #603 from ejohnstown/aes-ctr
expand the AES-CTR test to 4 blocks for 192 and 256 bit cases
2016-10-28 13:52:50 -06:00
John Safranek
849ae72d3a expand the AES-CTR test to 4 blocks for 192 and 256 bit cases 2016-10-27 15:54:22 -07:00
dgarske
7ef037af0f Merge pull request #602 from kaleb-himes/forums-support-case-user-sp
IAR compiler for ARM 7.70.2.11706 - unitialized warning
2016-10-26 20:04:02 -07:00
kaleb-himes
2122ee2eb5 IAR compiler for ARM 7.70.2.11706 - unitialized warning 2016-10-26 09:33:15 -06:00
Stefan Gula
59fdd98f1d Adjust DTLS retranmission logic
This patch adjust DTLS retranmission logic
in order to avoid message floods between client
and server
2016-10-26 10:37:23 +02:00
dgarske
703d504b58 Merge pull request #600 from kaleb-himes/scan-build-async
Check for sigLen size to resolve scan-build warning.
2016-10-25 11:08:14 -07:00
kaleb-himes
bc1fca5620 modified handler to return error on invalid condition post review
update
2016-10-25 11:07:35 -06:00
kaleb-himes
33ab901b3f prevent allocation of size 0 2016-10-24 16:44:43 -06:00
toddouska
b8aa335dd6 Merge pull request #598 from dgarske/ecc_cacheres_w_altsize
Fix for ECC with ALT_ECC_SIZE and cache resistance enabled
2016-10-17 15:01:43 -07:00
David Garske
d2a6c6838e Fix for ECC with !WC_NO_CACHE_RESISTANT and ALT_ECC_SIZE causing invalid mp_int*. An ecc_point with ALT_ECC_SIZE is "mp_int* x" vs. "mp_int x[1]". The resulting pointer for &M[0]->x is not valid in the ALT_ECC_SIZE case. This was found while testing ECC on a Cortex M4 (32-bit) and caused a hard fault. 2016-10-14 16:44:57 -07:00
toddouska
2ecf7090ca Merge pull request #595 from JacobBarthelmeh/Testing
static analysis : Fix warnings with wc_AesCcmSetKey
2016-10-12 11:27:29 -07:00
toddouska
88a82f519e Merge pull request #594 from JacobBarthelmeh/DTLS-MultiCore
session export : Increment DTLS export version with serialization cha…
2016-10-12 11:25:23 -07:00
toddouska
ffb2a8ff12 Merge pull request #593 from JacobBarthelmeh/ARMv8
ARMv8 : sanity checks
2016-10-12 11:23:27 -07:00
toddouska
11102b6726 Merge pull request #585 from NickolasLapp/master
Rename *Mutex Functions with wc_ prefix. Expose these functions for Stunnel.
2016-10-12 11:19:32 -07:00
toddouska
9cf4d7ca8e Merge pull request #584 from kaleb-himes/aes-gcm-bo
sanity check on memcpy and xorbuf
2016-10-12 11:18:03 -07:00
Jacob Barthelmeh
54c51ec4a0 static analysis : Fix warnings with wc_AesCcmSetKey 2016-10-12 10:02:53 -06:00
Jacob Barthelmeh
3c03aa453b session export : Increment DTLS export version with serialization changes 2016-10-11 14:01:38 -06:00
Nickolas Lapp
86bf50ea70 Ensure dh->q is nulled on init and free 2016-10-10 16:21:30 -06:00
Jacob Barthelmeh
eb9161d8a7 ARMv8 : sanity checks 2016-10-10 15:08:59 -06:00
dgarske
395972e6a8 Merge pull request #592 from cconlon/eccfix
fix ecc_check_privkey_gen() parameters with WOLFSSL_VALIDATE_ECC_IMPORT
2016-10-07 14:30:06 -07:00
Chris Conlon
ab966a72da fix ecc_check_privkey_gen() parameters with WOLFSSL_VALIDATE_ECC_IMPORT 2016-10-07 14:14:50 -06:00
kaleb-himes
05fcbb001a move sanity check and remove silent truncation 2016-10-06 15:01:16 -06:00
keton
ef5f55f6e4 Optimize memory usage for ARM Cortex M and similar embedded systems (#578)
* Changed ge_precomp data to const to reduce RAM usage on embedded systems.
* Add configuration option "WOLFSSL_NRF5x" for Nordic nRF5x platform in settings.h
2016-10-06 12:49:14 -07:00
toddouska
f4c654dd6e Merge pull request #590 from JacobBarthelmeh/ARMv8
ARMv8 additions
2016-10-06 10:04:07 -07:00
Nickolas Lapp
4181b744ab stunnel 5.36 requires des3. Enable by default 2016-10-05 13:17:26 -06:00
Jacob Barthelmeh
d07746de09 ARMv8 : Remove dependency on load 2016-10-05 11:02:51 -06:00
Nickolas Lapp
69483366fb Fixes for fips compatibility 2016-10-05 10:20:13 -06:00
Nickolas Lapp
89aec2c565 Add cast for g++ compiler 2016-10-05 09:37:44 -06:00
Jacob Barthelmeh
21dd236ef2 ARMv8 : increase performance 2016-10-05 09:04:18 -06:00
dgarske
1e028c3566 Merge pull request #589 from cconlon/ipproto
Wrap IPPROTO_SCTP use with WOLFSSL_SCTP in test.h
2016-10-04 19:48:32 -07:00
Chris Conlon
29cf90a425 protect IPPROTO_SCTP with WOLFSSL_SCTP in test.h 2016-10-04 16:42:53 -06:00
dgarske
81a8ad0a48 Merge pull request #587 from ejohnstown/seq64
64-bit Sequence Number
2016-10-04 06:01:26 -07:00
Nickolas Lapp
1792eba1a2 Rename *Mutex Functions with wc_ prefix. Expose these functions for
Stunnel. Various other changes to enable stunnel compling
2016-10-03 16:36:05 -06:00
John Safranek
12ac0346f5 change magic numbers to constants, rename verify parameter of WriteSEQ() and subfunctions 2016-10-03 13:51:10 -07:00
John Safranek
a839b61e81 initialize temp sequence number 2016-10-02 13:02:20 -07:00
John Safranek
575785db3e Fixes for DTLS sequence number checking. 2016-10-02 12:03:44 -07:00
John Safranek
ab371365b9 updated sequence number window 2016-09-30 17:02:05 -07:00
John Safranek
62d58a7084 updated session import/export for seq number 2016-09-29 23:09:42 -07:00
John Safranek
4522fa335e Fixing DTLS for 64-bit sequence numbering
1. Simplify away the DtlsState record.
2. Adding in high order bits for the DTLS sequence number.
3. For DTLS, separated copying the sequence number from incrementing it.
2016-09-29 15:51:33 -07:00
kaleb-himes
a630fda509 Sanity check on memcpy and xorbuf
Sanity check on memcpy and xorbuf
2016-09-29 13:26:50 -06:00
Kaleb Himes
1a7f1d3b26 Merge pull request #583 from JacobBarthelmeh/CSharp
C# Wrapper : TCP check connection termination
2016-09-28 16:31:29 -06:00
Jacob Barthelmeh
1ed06b53df C# Wrapper : TCP check connection termination 2016-09-28 15:00:30 -06:00
Jacob Barthelmeh
6f4b704552 ARMv8 : Aarch32 support, SHA256 speedup 2016-09-28 10:22:27 -06:00
Chris Conlon
be86308a33 Merge pull request #556 from danielinux/frosted-fix
Fix compilation on Frosted
2016-09-26 12:53:39 -06:00
Kaleb Himes
124a8c0c1f Merge pull request #582 from ejohnstown/lean-psk
Fixes for building the library for Lean PSK
2016-09-24 10:59:54 -06:00
Kaleb Himes
af5d790aea Merge pull request #581 from ejohnstown/tlsx
Fixes for building the library with a C++ compiler with TLSX enabled
2016-09-24 10:45:33 -06:00
John Safranek
8d1aa2238b Fixes for building the library for Lean PSK
1. Needed to enable static PSK when using Lean PSK
2. Fixed complaints about unused variables.
2016-09-24 00:18:36 -07:00
John Safranek
5e852dc1a1 Fixes for building the library with a C++ compiler with TLSX enabled
1. Add many typecasts for malloc() data to proper pointer type.
2. Add many typecasts for constants in tertiary operators.
3. ECC to use local copy of wc_off_on_addr instead of extern copy.
2016-09-23 23:22:58 -07:00
John Safranek
5ec5b9b07d Merge pull request #580 from JacobBarthelmeh/Testing
NTRU : warning of variable size as argument
2016-09-23 15:52:48 -07:00
Jacob Barthelmeh
02b3aa51bd NTRU : warning of variable size as argument 2016-09-23 15:30:33 -06:00
Kaleb Himes
fb01cf7e1b Merge pull request #579 from ejohnstown/release-v3.9.10
Prepare release v3.9.10
2016-09-23 15:05:21 -06:00
John Safranek
6895803f2b Prepare release v3.9.10 2016-09-23 12:19:24 -07:00
John Safranek
049956d852 Merge pull request #577 from kaleb-himes/fix-typos
Fixing typos
2016-09-23 12:18:23 -07:00
kaleb-himes
4fc0c6c646 fix unused parameter build time error
fix unused parameter build time error
2016-09-23 12:23:26 -06:00
kaleb-himes
3bd86d3f87 Fixing typos 2016-09-23 10:45:29 -06:00
Jacob Barthelmeh
91580552bc ARMv8 : AES-GCM encryption speed ups 2016-09-23 10:20:52 -06:00
JacobBarthelmeh
78246e0fc2 Merge pull request #575 from ejohnstown/fix-option
move an ifndef NO_AES for one more configure disable/enable combination
2016-09-22 16:15:49 -06:00
JacobBarthelmeh
98841e8b47 Merge pull request #576 from toddouska/dsa_zero
add dsa sign sanity check on r/s
2016-09-22 15:14:43 -06:00
John Safranek
e4b8e6a447 Merge pull request #574 from JacobBarthelmeh/Testing
Static Analysis : fix a warning of unused variable
2016-09-22 14:09:46 -07:00
toddouska
d9163e4554 add dsa sign sanity check on r/s 2016-09-22 12:04:48 -07:00
John Safranek
ba6e2b1037 move an ifndef NO_AES for one more configure disable/enable combination 2016-09-22 11:41:16 -07:00
JacobBarthelmeh
c43fd150e9 Static Analysis : fix a warning of unused variable 2016-09-22 09:31:26 -07:00
JacobBarthelmeh
18944dacbf Merge pull request #573 from toddouska/dsa_pad
fix dsa pre padding
2016-09-22 09:42:23 -06:00
toddouska
9e4e08d7a7 fix dsa pre padding 2016-09-21 18:51:11 -07:00
toddouska
2368d49678 Merge pull request #572 from ejohnstown/pathlen
CA Certificate Path Length Checking
2016-09-21 14:36:24 -07:00
John Safranek
b8704d2dfe Merge pull request #571 from toddouska/new_rng
Fix Jenkins build 389 single-threaded issue
2016-09-21 12:59:06 -07:00
John Safranek
74002ce66a Add the new path length test certs to include.am. 2016-09-21 12:34:01 -07:00
JacobBarthelmeh
ab887b88dc Merge pull request #570 from ejohnstown/des3-disable-fix
Disable DES3 compiler warning fix
2016-09-21 13:25:00 -06:00
John Safranek
de81c81eae Fixed unused variable complaints when OPENSSL_EXTRA and MD5 are enabled
and when AES is disabled.
2016-09-21 10:21:03 -07:00
toddouska
489345f0d4 move CTX new_rng out of with certs block 2016-09-21 09:02:38 -07:00
John Safranek
95acd9c907 Fixed unused variable complaints when KEYGEN and OPENSSL_EXTRA are enabled
and when AES and MD5 are disabled. It was in the same encrypt function as
before and in the paired decrypt function.
2016-09-21 07:32:17 -07:00
John Safranek
a42bd30278 CA Certificate Path Length Checking
1. Check the path length between an intermediate CA cert and its
   signer's path length.
2. Always decode the path length if present and store it in the decoded
   certificate.
3. Save the path length into the signer list.
4. Path length capped at 127.
5. Added some test certs for checking CA path lengths.
2016-09-20 21:36:37 -07:00
John Safranek
ef7183dcf7 delete redundant #else 2016-09-20 15:59:08 -07:00
toddouska
d9862c1c1a Merge pull request #569 from kaleb-himes/CUSTOMER_REQUEST
addition to previous customer request
2016-09-20 12:09:15 -07:00
John Safranek
65a7978dec Merge pull request #567 from toddouska/rng
RDSEED enhancements
2016-09-20 12:09:01 -07:00
John Safranek
df1d8200ef Fixed unused variable complaint when KEYGEN and OPENSSL_EXTRA are enabled
and when AES and DES3 are disabled.
2016-09-20 12:07:58 -07:00
toddouska
67a112773e fix secure renegotiation 2016-09-19 17:31:20 -07:00
toddouska
21726d5ae4 64bit sequence tls proof of concept, dlts needs some work 2016-09-19 16:02:27 -07:00
kaleb-himes
4214f52d77 addition to previous customer request 2016-09-19 16:01:24 -06:00
toddouska
0718aba655 fix comment typo 2016-09-19 13:28:14 -07:00
toddouska
485d814aed Merge pull request #563 from JacobBarthelmeh/ARMv8
ARMv8 : AES-GCM constraint fix
2016-09-19 09:30:08 -07:00
toddouska
e0b8e55198 Merge pull request #553 from ejohnstown/disable-des3
Disable DES3 by default
2016-09-19 09:27:32 -07:00
toddouska
b4b0b2433e Merge pull request #555 from ejohnstown/autogen-tweak
Autogen tweak for git worktrees
2016-09-19 09:26:06 -07:00
toddouska
4c295cd13d Merge pull request #564 from kaleb-himes/CUSTOMER_REQUEST
Implement requested change from customer
2016-09-19 09:24:43 -07:00
toddouska
1bab8822a9 Merge pull request #565 from ejohnstown/enable-ecccurveext
Enable the ECC Supported Curves extension by default
2016-09-19 09:24:05 -07:00
toddouska
afd039d2e1 Merge pull request #566 from JacobBarthelmeh/master
Benchmark App : fixed some invalid set key sizes
2016-09-19 09:23:12 -07:00
Jacob Barthelmeh
6d73175b22 Benchmark App : fixed some invalid set key sizes 2016-09-17 15:07:38 -06:00
toddouska
c51444bec5 update rdseed to 64bit get, more retries, fallback to /dev/urandom on failure 2016-09-16 18:54:47 -07:00
Kaleb Himes
3f95bac55f Merge pull request #562 from ejohnstown/pre-release3.9.9
Bump version for pre-release REDUX
2016-09-16 15:07:00 -06:00
kaleb-himes
67c7e7c8de Implement requested change from customer
Implement requested change from customer
2016-09-16 14:38:33 -06:00
toddouska
f191cf206e allow single threaded mode to share an RNG at WOLFSSL_CTX level 2016-09-16 13:35:29 -07:00
John Safranek
781e800486 1. Enable the extension ECC Supported Curves by default.
2. Force the extention disabled if ECC is disabled.
2016-09-16 13:26:56 -07:00
Jacob Barthelmeh
f755591316 ARMv8 : AES-GCM constraint fix 2016-09-16 19:43:47 +00:00
John Safranek
7a7f2fbe78 Bump version for pre-release. 2016-09-16 10:58:31 -07:00
John Safranek
ef0cd908ea Merge pull request #557 from kaleb-himes/arduino-updates
fix distribution issue
2016-09-16 10:55:48 -07:00
toddouska
c85b3b84d9 Merge pull request #554 from JacobBarthelmeh/ARMv8
ARMv8 : AES-CTR/CBC/GCM speed ups and refactor AES
2016-09-16 09:34:24 -07:00
John Safranek
03ebb4825e Merge pull request #552 from toddouska/aesca
prevent compiler from optimzing out PreFetch Td4
2016-09-16 09:16:07 -07:00
kaleb-himes
14a7065f6e fix distribution issue 2016-09-16 10:04:50 -06:00
Daniele Lacamera
b869641de6 Merge branch 'master' into frosted-fix 2016-09-16 11:46:01 +02:00
Daniele Lacamera
890bcde1cd Don't include <sys/uio.h> when running on Frosted 2016-09-16 11:43:34 +02:00
John Safranek
4087f6904c Treat project directory as in version control if .git is
either directory or file.
2016-09-15 16:09:27 -07:00
Jacob Barthelmeh
6d82cba29c ARMv8 : AES-CTR/CBC/GCM speed ups and refactor AES 2016-09-15 22:50:00 +00:00
John Safranek
ef9c4bf5c9 Add client-ca.pem to the automake include for dist. 2016-09-15 15:38:41 -07:00
John Safranek
bad6be5c76 1. Updated sniffer to allow DES3 to be disabled.
2. Fixed an unused variable in OpenSSL Extras when DES3 is disabled.
3. Force DES3 enabled when enabling MCAPI.
2016-09-15 14:53:28 -07:00
John Safranek
e92f0e32b0 Undo making the ECC supported curves extension default to enabled. 2016-09-15 13:15:49 -07:00
dgarske
78c0f98ea9 Merge pull request #551 from kaleb-himes/arduino-updates
Updates to make building for ARDUINO more intuitive
2016-09-15 13:01:42 -07:00
John Safranek
0ee7d7cc17 1. Add DES3 enable to full commit test.
2. Added DES3 to the list of FIPS prereqs.
2016-09-15 12:19:32 -07:00
John Safranek
e3bb4c29e2 Fix openssl.test with the lean-TLS option
1. Make new CA cert for test that is both client-cert.pem andr
   client-ecc-cert.pem.
2. Use the new client-ca.pem cert in the test script.
3. Update renewcerts script to generate client-ca.pem.
2016-09-15 11:39:30 -07:00
toddouska
c1ac0c0f8c Merge pull request #545 from ejohnstown/ems
Extended Master Secret
2016-09-15 11:25:41 -07:00
John Safranek
2d4757b446 Disable DES3 by default. Force it enabled when it is a prereq for
another option. (SCEP and PKCS7)
2016-09-15 11:23:36 -07:00
John Safranek
19434e285a Update the resume test to rerun itself with the "-n" option to disable
extended master secret if the option is enabled.
2016-09-15 10:13:31 -07:00
toddouska
8cdaa06127 prevent compiler from optimzing out PreFetch Td4 2016-09-15 10:02:30 -07:00
kaleb-himes
9d49fae600 Updates to make building for ARDUINO more intuitive
NO_INLINE not necessary, update README
2016-09-14 17:01:35 -06:00
JacobBarthelmeh
01be5cdc07 Merge pull request #550 from toddouska/rsainit
make sure rsa rng is null on init
2016-09-14 16:31:07 -06:00
toddouska
dc337946d5 make sure rsa rng is null on init 2016-09-14 14:33:08 -07:00
John Safranek
8b713adcfd Extended Master Secret Peer Review Changes
1. Checked the returns on the hash functions in the sniffer,
   return new error if any fail.
2. Removed the SHA-512 hash from the sniffer's collection of
   hashes. Never used in a cipher suite.
3. Added some logging messages in the EMS support in wolfSSL.
2016-09-14 13:43:02 -07:00
John Safranek
7410b5784f Merge pull request #548 from toddouska/nocache
add WC_NO_CACHE_RESISTANT option for old code paths
2016-09-14 10:24:29 -07:00
toddouska
e039fcefc0 Merge pull request #549 from JacobBarthelmeh/master
aes.c : check ILP32 macro defined
2016-09-14 09:58:19 -07:00
Jacob Barthelmeh
109642fef4 aes.c : check ILP32 macro defined 2016-09-14 09:33:48 -06:00
toddouska
b6937626b4 don't require uneeded temp with WC_NO_CACHE_RESISTANT 2016-09-13 17:01:50 -07:00
toddouska
7b3fc558ec add WC_NO_CACHE_RESISTANT option for old code path 2016-09-13 16:45:15 -07:00
John Safranek
b77c350153 Merge pull request #547 from toddouska/mathca
Remove timing resistant cache key bit monitor leaks
2016-09-13 14:34:23 -07:00
toddouska
05d78dc2ce Merge pull request #544 from cconlon/rsafix
include MAX_RSA_INT_SZ in wc_RsaKeyToPublicDer(), for 4096-bit keys
2016-09-13 11:24:03 -07:00
toddouska
46a0ee8e69 switch ecc timising resistant mulmod double to use temp instead of leaking key bit to cache monitor 2016-09-13 11:10:10 -07:00
John Safranek
0477d5379e Merge pull request #546 from toddouska/aesca
AES T table cache preload.
2016-09-13 11:05:28 -07:00
toddouska
6ef9e79ff5 switch timing resistant exptmod to use temp for square instead of leaking key bit to cache monitor 2016-09-13 09:13:39 -07:00
toddouska
6ae1a14c9f do aes cache line stride by bytes, not word32s 2016-09-12 21:09:08 -07:00
John Safranek
77cf700657 Update to allow resumption with session tickets and extended master secret. 2016-09-12 16:06:51 -07:00
toddouska
c6256211d6 compress aes last round decrypt table, prefetch Td tables before aes decrypt rounds, prefecth compressed table before last round 2016-09-12 13:04:30 -07:00
toddouska
97a64bcc7c remove unique aes last round Te table, pre fetch Te tables during software aes encrypt 2016-09-12 12:03:37 -07:00
John Safranek
c1136a30e9 1. Enabled the extended master secret in the Windows IDE user_settings.h
file by default.
2. Fixed scan-build warning about an assignment to a variable that isn't
used again in the function. Commented out the line.
2016-09-12 09:42:42 -07:00
John Safranek
b994244011 Revising the Extended Master Secret support. Removing the dynamic
TLSX support for the extention and treating it like the Signature
and Hash algorithms extension. It is to be enabled by default and
the user can turn it off at run time or build time.
2016-09-11 18:05:44 -07:00
Chris Conlon
a149d83bff include MAX_RSA_INT_SZ in wc_RsaKeyToPublicDer(), for 4096-bit keys 2016-09-09 16:11:56 -06:00
John Safranek
68e48e84fd Merge pull request #541 from toddouska/comp
detect server forcing compression on client w/o support
2016-09-09 13:00:22 -07:00
toddouska
fc54c53f38 Merge pull request #543 from JacobBarthelmeh/ARMv8
ARMv8 : increase performance with SHA256
2016-09-09 10:23:44 -07:00
Jacob Barthelmeh
3ec66dd662 ARMv8 : sanity checks and change constraint type 2016-09-09 00:27:40 +00:00
dgarske
bd3e40d2fc Merge pull request #542 from JacobBarthelmeh/master
verify case with unexpected input
2016-09-08 16:07:28 -07:00
Jacob Barthelmeh
f4e604dec3 verify case with unexpected input 2016-09-08 15:32:09 -06:00
toddouska
0c21d76ce3 detect client not sending any compression types 2016-09-08 12:06:22 -07:00
John Safranek
4fb1431727 Added support for the extended master secret extension to the sniffer. 2016-09-08 11:25:02 -07:00
Jacob Barthelmeh
79af4d30e0 ARMv8 : increase performance with SHA256 2016-09-08 18:00:24 +00:00
toddouska
3e80d966d2 Merge pull request #540 from dgarske/fix_noprng_nosha2
Fix to allow disabling P-RNG and SHA256 with CUSTOM_RAND_GENERATE_BLOCK
2016-09-07 16:33:32 -07:00
toddouska
3aefc42f04 have TLS server side verify no compression is in list if not using compression 2016-09-07 15:28:30 -07:00
David Garske
f6b786cfb5 Updated the random.h source inline comments to clarify SHA256 and RC4. 2016-09-07 09:23:43 -07:00
toddouska
baebec4ca4 Merge pull request #538 from JacobBarthelmeh/ARMv8
initial ARMv8 instructions
2016-09-07 09:20:14 -07:00
toddouska
a5db13cd01 detect server forcing compression on client w/o support 2016-09-07 09:17:14 -07:00
David Garske
8d6ea61a4f Fix to allow disabling P-RNG and SHA256 when CUSTOM_RAND_GENERATE_BLOCK is used. Added inline documentation to describe RNG source options. Example: ./configure --enable-cryptonly --disable-hashdrbg CFLAGS="-DNO_SHA256 -DCUSTOM_RAND_GENERATE_BLOCK" 2016-09-06 16:42:53 -07:00
Jacob Barthelmeh
09b29cb1d4 ARMv8 AES: remove extra memcpy during encrypt/decrypt 2016-09-02 22:55:17 +00:00
JacobBarthelmeh
33f24ebaa8 Merge pull request #537 from ejohnstown/ocsp-issuerKeyHash
OCSP Fixes
2016-09-02 14:57:07 -06:00
Jacob Barthelmeh
8e4ccd355c refactor ALIGN16 macro to types.h 2016-09-01 21:24:03 +00:00
Chris Conlon
0f0e0ca9a5 add extended master to example client 2016-09-01 15:17:46 -06:00
Chris Conlon
88fab67804 add extended master unit tests 2016-09-01 15:15:17 -06:00
Chris Conlon
e4f527a332 initial extended master secret support 2016-09-01 15:12:54 -06:00
Chris Conlon
5bf8806655 add wc_Sha384/512GetHash() functions 2016-09-01 15:05:27 -06:00
Jacob Barthelmeh
41912b92c6 initial ARMv8 instructions 2016-09-01 18:10:06 +00:00
John Safranek
963b9d4c4d OCSP Fixes
1. When using Cert Manager OCSP lookup, the issuer key hash wasn't
being set correctly. This could lead to unknown responses from lookup.
2. Default OCSP lookup callback could get blocked waiting for server
to close socket.
2016-09-01 09:58:34 -07:00
Chris Conlon
a0b02236b8 Merge pull request #527 from danielinux/master
Support for Frosted OS
2016-08-31 10:07:25 -06:00
toddouska
092916c253 Merge pull request #536 from ejohnstown/dtls-sctp
DTLS over SCTP
2016-08-30 13:09:40 -07:00
John Safranek
e0a035a063 DTLS-SCTP Tests
1. Added a check to configure for SCTP availablility.
2. Added DTLS-SCTP to the cipher suite test.
2016-08-29 15:24:51 -07:00
JacobBarthelmeh
de3f66b946 Merge pull request #515 from dgarske/cryptonly_static_mem
Added support for static memory with wolfCrypt
2016-08-29 15:23:28 -06:00
David Garske
ddff90ea26 Fix duplicate declaration of "wolfSSL_init_memory_heap" (errors after rebase). 2016-08-29 11:50:43 -07:00
David Garske
6a70403547 Fix for "not used" devId in benchmark. 2016-08-29 11:01:16 -07:00
David Garske
2ecd80ce23 Added support for static memory with wolfCrypt. Adds new "wc_LoadStaticMemory" function and moves "wolfSSL_init_memory_heap" into wolfCrypt layer. Enhanced wolfCrypt test and benchmark to use the static memory tool if enabled. Added support for static memory with "WOLFSSL_DEBUG_MEMORY" defined. Fixed issue with have-iopool and XMALLOC/XFREE. Added check to prevent using WOLFSSL_STATIC_MEMORY with HAVE_IO_POOL, XMALLOC_USER or NO_WOLFSSL_MEMORY defined. 2016-08-29 10:38:06 -07:00
John Safranek
05a35a8332 fix scan-build warning on the simple SCTP example server 2016-08-26 20:33:05 -07:00
John Safranek
aed68e1c69 1. Needed to tell the client to use sctp.
2. Creating the example sockets needed the IPPROTO type.
2016-08-26 19:58:36 -07:00
John Safranek
46e92e0211 DTLS-SCTP example client and server
1. Update the example client and server to test DTLS-SCTP.
2. Modify the test.h functions for setting up connections to allow
for a SCTP option.
3. Update other examples to use the new test.h functions.
4. Removed some prototypes in the client header file were some functions
that should have been static to the client.c file and made them static.
2016-08-26 19:58:36 -07:00
John Safranek
6d5df3928f SCTP-DTLS examples
1. Added the set SCTP mode command to client and server.
2. Added a 4K buffer test case.
2016-08-26 19:58:36 -07:00
John Safranek
bab071f961 1. Implemented the SCTP MTU size changes for transmit.
2. Simplified the MAX_FRAGMENT size when calling SendData().
2016-08-26 19:58:36 -07:00
John Safranek
a6c0d4fed7 1. Added missing -DWOLFSSL_SCTP to configure.ac.
2. Don't do hello verify requests in SCTP mode.
3. Implemented the SCTP MTU size changes.
4. Simplified the MAX_FRAGMENT size when calling ReceiveData().
2016-08-26 19:58:36 -07:00
John Safranek
52e2f1a7ab typecasts to clear static analysis warnings on SCTP examples 2016-08-26 19:58:36 -07:00
John Safranek
f3dca48e99 Fix polarity on the DTLS-SCTP check. 2016-08-26 19:58:36 -07:00
John Safranek
7b3255b5bb 1. Simplified the IsDtlsSctpMode() check.
2. Checked IsDtlsSctpMode() to skip saving messages to retransmit and
skip retransmissions.
2016-08-26 19:57:09 -07:00
John Safranek
c1970434d1 simplify the SCTP options 2016-08-26 19:43:52 -07:00
John Safranek
b7a35eabd2 Add simple SCTP example tools 2016-08-26 19:40:50 -07:00
John Safranek
ebbf5ec72b add new options and accessors for SCTP 2016-08-26 19:40:50 -07:00
John Safranek
2d9b6cf27a added SCTP to configure.ac 2016-08-26 19:40:50 -07:00
dgarske
d7ac7af4b0 Merge pull request #532 from toddouska/sb-aiaddr
make sure static analysis realizes err_sys does exit()
2016-08-26 16:29:20 -07:00
dgarske
930c692598 Merge pull request #535 from toddouska/ecc521-no64
fix normal math 16bit digit_bit for all ecc sizes
2016-08-26 14:59:01 -07:00
toddouska
bd312cb766 Merge pull request #533 from dgarske/dg_fixes
Fixes for HMAC/small stack heap and disable RSA warnings
2016-08-26 14:30:55 -07:00
toddouska
401463a983 Merge pull request #534 from dgarske/ecc_cust_fix
Fixed issue with "wc_ecc_set_custom_curve" function and ECC test improvements
2016-08-26 14:25:15 -07:00
toddouska
efabbcf305 fix normal math 16bit digit_bit for all ecc sizes 2016-08-26 13:47:53 -07:00
David Garske
bf23b2f9d1 Fix issue with "wc_ecc_set_custom_curve" function not setting index as "ECC_CUSTOM_IDX". Cleanup of the ECC tests to return actual error code (when available) and make sure keys are free'd. Some trailing whitespace cleanup. 2016-08-26 12:35:47 -07:00
David Garske
925e5e3484 Fixes typo issue with heap in hmac and small stack enabled. Fixed "never read" scan-build warnings with typeH and verify when RSA is disabled. 2016-08-26 10:33:01 -07:00
toddouska
86e889a7fa only force exit() in all cases with gcc since we know noreturn attribute there 2016-08-26 10:20:58 -07:00
toddouska
dd7f9b618d make sure static analysis realizes err_sys does exit() 2016-08-25 12:23:57 -07:00
toddouska
78ca9e7716 Merge pull request #482 from dgarske/async
Asynchronous wolfCrypt RSA and TLS client support
2016-08-25 10:06:18 -07:00
toddouska
07345579ec Merge pull request #531 from cconlon/distro
Add "--enable-distro" build option
2016-08-23 14:31:23 -07:00
David Garske
a9278fe492 Added check for GetLength result in asn GetIntRsa function. Fixed return code in random.c for "wolfAsync_DevCtxInit" due to copy/paste error. Added RSA wc_RsaCleanup to make sure allocated tmp buffer is always free'd. Eliminated invalid RSA key type checks and "RSA_CHECK_KEYTYPE". 2016-08-23 11:31:15 -07:00
Chris Conlon
91ccf1bd86 do not enable ARC4 or sniffer in distro build 2016-08-22 15:33:45 -06:00
Chris Conlon
45c8ed1436 remove -X from ocsp stapling tests that are not external 2016-08-22 14:18:35 -06:00
toddouska
ebba0efaa4 Merge pull request #528 from jrblixt/tests_api_develop
Added Functions to wolfSSL/test/api.c
2016-08-22 09:38:23 -07:00
Chris Conlon
1a94c0bbdd add distro build option 2016-08-22 10:00:37 -06:00
Chris Conlon
6f0239441b Merge pull request #530 from ejohnstown/dtls-ticket
DTLS and Session Ticket fix
2016-08-22 09:37:28 -06:00
John Blixt
a9935cbc28 Made changes found by Jenkins. 2016-08-19 10:23:55 -06:00
John Safranek
fa1989b729 fix building the new session ticket message for DTLS, take into account the additional header sizes 2016-08-18 17:51:25 -07:00
John Blixt
813a9b05b5 Clean up and Chris check added the changes. 2016-08-18 15:07:07 -06:00
John Blixt
f61c045e65 Changes to the Assert Macros used and added wolfSSL_CTX_use_certificate_buffer() 2016-08-18 10:03:33 -06:00
Daniele Lacamera
3d3f8c9dd3 Support for Frosted OS 2016-08-18 14:56:14 +02:00
John Blixt
b068eec96d added wolfSSL_CTX_SetMinVersion 2016-08-17 14:41:37 -06:00
John Blixt
73089200bf Merge branch 'master' of https://github.com/wolfSSL/wolfssl into tests_api_develop 2016-08-17 14:12:43 -06:00
John Blixt
cddc771829 Added wolfSSL_SetMinVersion 2016-08-17 14:05:37 -06:00
John Blixt
584733b138 Chris looked at functions added for correctness. 2016-08-17 11:27:14 -06:00
John Blixt
65b2b14a0f added test functions for wolfCrypt_Init and OCSP stapling v1 and v2 2016-08-17 10:32:03 -06:00
David Garske
3e6be9bf2c Fix in "wc_InitRsaKey_ex" for normal math so mp_init isn't called to defer allocation. 2016-08-15 14:07:16 -06:00
David Garske
17a34c5899 Added asynchronous wolfCrypt RSA, TLS client and Cavium Nitrox V support. Asynchronous wolfSSL client support for "DoServerKeyExchange", "SendClientKeyExchange", "SendCertificateVerify" and "DoCertificateVerify". Fixes for async DTLS. Refactor of the wolf event and async handling for use in wolfCrypt. Refactor of the async device support so its hardware agnostic. Added Cavium Nitrox V support (Nitrox tested using SDK v0.2 CNN55XX-SDK with new configure "--with-cavium-v=/dir" option). Moved Nitrox specific functions to new port file "port/cavium/cavium_nitrox.c". RSA refactor to handle async with states. RSA optimization for using dpraw for private key decode. Use double linked list in wolf event for faster/cleaner code. Use typedef for wolf event flag. Cleanup of the async error codes. wolfCrypt test and benchmark support for async RSA. Asynchronous mode enabled using "./configure --enable-asynccrypt". If no async hardware is defined then the internal async simulator (WOLFSSL_ASYNC_CRYPT_TEST) is used. Note: Using async mode requires async.c/h files from wolfSSL. If interested in using asynchronous mode please send email to info@wolfssl.com. 2016-08-15 13:59:41 -06:00
Chris Conlon
5347e32d63 Merge pull request #526 from toddouska/fm64-types
don't setup 64bit typedef with fastmath if not needed
2016-08-15 13:14:59 -06:00
Chris Conlon
d1d6571575 Merge pull request #525 from toddouska/session
add resume session string script check, make GetDeepCopySession stati…
2016-08-15 13:11:53 -06:00
toddouska
527c375884 don't setup 64bit typedef with fastmath if not needed 2016-08-15 11:02:06 -07:00
toddouska
d74fa8299a add resume session string script check, make GetDeepCopySession static local and check reutrn code 2016-08-15 09:32:36 -07:00
dgarske
b38218a0b9 Merge pull request #524 from kaleb-himes/certs-buffs-and-tests
cert updates, new buffers, new test with buffers
2016-08-14 08:39:37 -07:00
kaleb-himes
da18e463ed remove constraints on inclusion of certs_test.h 2016-08-12 17:00:22 -06:00
kaleb-himes
03295ec6d7 update certs, extend ntru to 1000 days, add der formatted ecc, new ecc buffer test
changes from first review

move to 256 bit defines
2016-08-12 13:00:52 -06:00
toddouska
7cf13f84b7 Merge pull request #522 from JacobBarthelmeh/master
help static analysis tools
2016-08-10 16:37:16 -07:00
Jacob Barthelmeh
b502d9dcf7 help static analysis tools 2016-08-10 14:23:27 -06:00
JacobBarthelmeh
fd9f8125e3 Merge pull request #521 from dgarske/improve_inline_misc
Change misc.c error to warning when trying to be compiled and inline enabled
2016-08-09 13:09:20 -06:00
toddouska
a8b2ced588 Merge pull request #519 from dgarske/fix_compat_wo_ecc
Fix for openssl compatibility without ECC
2016-08-08 13:46:58 -07:00
David Garske
317a7f2662 Change misc.c error to warning and exclude the misc.c code from being compiled. Most people include all .c files and by default inlining is allowed, which in turn causes an #error in misc.c and it must be excluded. Since we know its already been properly included there is no reason to throw error here. Instead, show warning and exclude code in .c file. 2016-08-08 13:13:59 -07:00
David Garske
b0e4acaac1 Fix for openssl compatibility without ECC. Disable "wolf_OBJ_nid2sn", "wolf_OBJ_sn2nid" and "wolf_OBJ_obj2nid" when "OPENSSL_EXTRA" defined and "HAVE_ECC" is not defined. 2016-08-08 10:29:58 -07:00
toddouska
76e8438059 Merge pull request #518 from dgarske/fix_build_w_callbacks
Fix build with "WOLFSSL_CALLBACKS" defined.
2016-08-06 10:11:53 -07:00
toddouska
49fb0d56b0 Merge pull request #516 from dgarske/fix_asn_wo_hmac
Fix build issue with ASN enabled and no HMAC
2016-08-06 10:07:00 -07:00
toddouska
c8cfe1ffa1 Merge pull request #511 from dgarske/openssl_compat_fixes
Various improvements to support openssl compatibility
2016-08-06 09:59:31 -07:00
toddouska
dd03af2cf4 Merge pull request #512 from dgarske/fix_crl_pad
Fixed issue with CRL check and zero pad
2016-08-06 09:56:59 -07:00
dgarske
cc462e2c50 Merge pull request #513 from kojo1/Der2Pem
Adds "wc_DerToPem" CRL_TYPE support
2016-08-05 14:35:15 -07:00
David Garske
d8c63b8e66 Various improvements to support openssl compatibility.
* Fixed bug with "wolfSSL_get_cipher_name_internal" for loop using incorrect max length for "cipher_name_idx" (this caused fault when library built with NO_ERROR_STRINGS and calling it).
* Adds new "GetCipherNameInternal" function to get cipher name using internal "cipherSuite" index only (for scenario where WOLFSSL object does not exist).
* Implements API's for "wolf_OBJ_nid2sn" and "wolf_OBJ_sn2nid". Uses the ecc.c "ecc_sets" table to locate NID (ECC ID and NID are same).
* Added "WOLFSSL*" to HandShakeInfo.
* Allowed "SetName" to be exposed.
* Added "wolfSSL_X509_load_certificate_buffer". Refactor "wolfSSL_X509_load_certificate_file" to use new function (no duplicate code).
2016-08-05 14:15:47 -07:00
David Garske
32b0303beb Fix build with "WOLFSSL_CALLBACKS" defined. 2016-08-05 14:06:58 -07:00
David Garske
6b1ff8e9d7 Only try and return serial number or check padding if the serial number size is greater than 1. 2016-08-05 12:53:26 -07:00
David Garske
a17bc2a42e Fix build issue with ASN enabled and no HMAC (missing MAX_DIGEST_SIZE). Switch to using WC_MAX_DIGEST_SIZE from hash.h, which is always available. Added small stack option for digest in MakeSignature. Fixed build error with unused "testVerifyCount" if "NO_ECC_SIGN" or "NO_ECC_VERIFY". 2016-08-05 12:19:30 -07:00
toddouska
eeb506b8c0 Merge pull request #514 from dgarske/fix_arm_cc_warn
Fixes for warnings when cross-compiling with GCC ARM.
2016-08-05 10:07:32 -07:00
David Garske
96da2df7ec Additional max index and serial number size checks in "GetSerialNumber". 2016-08-03 17:04:44 -07:00
David Garske
2c1309ffc7 Fixes for warnings when cross-compiling with GCC ARM. 2016-08-03 16:53:53 -07:00
Takashi Kojo
e01dcb671d eliminate tail nl 2016-08-03 11:12:10 +09:00
Takashi Kojo
ed4cd2438f CRL_Type to wc_DerToPem 2016-08-03 10:53:54 +09:00
David Garske
9ddfe93c43 Fixed issue with CRL check and zero pad (the GetRevoked function was not trimming pad). Added new ASN "GetSerialNumber" function and implemented it in three places in asn.c. 2016-08-02 16:47:21 -07:00
toddouska
67d607324a Merge pull request #509 from JacobBarthelmeh/Release
prepare for release 3.9.8
2016-07-28 18:47:39 -07:00
Jacob Barthelmeh
32c0b6d97a prepare for release 3.9.8 2016-07-28 15:46:45 -06:00
JacobBarthelmeh
dcc0f87ce6 Merge pull request #506 from toddouska/del_point
fix remaining non fpecc ecc_del_point w/o heap
2016-07-27 18:54:46 -06:00
dgarske
303561c1a1 Merge pull request #505 from toddouska/timing
fix scan-build warning on ecc memory alloc failure
2016-07-27 15:52:01 -07:00
toddouska
a94f34c8e2 fix remaining non fpecc ecc_del_point w/o heap 2016-07-27 14:24:34 -07:00
toddouska
6cd4acbdba Merge pull request #504 from dgarske/oid_unknown_fix
Fix for "OID Check Failed"
2016-07-27 14:16:04 -07:00
toddouska
20c991717f Merge pull request #503 from JacobBarthelmeh/mysql
change priority of cipher suite TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
2016-07-27 12:13:47 -07:00
toddouska
7cf0b8fe85 fix scan-build warning on ecc memory alloc failure 2016-07-27 11:20:08 -07:00
David Garske
b0e72dd692 Fix for "OID Check Failed". This restores behavior to what it was prior to commit "7a1acc7". If an OID is not known internally skip the verify and return success and the OID sum. 2016-07-27 10:39:42 -07:00
Jacob Barthelmeh
37b84abe0b change priority of cipher suite TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA 2016-07-27 09:36:16 -06:00
toddouska
c834216cca Merge pull request #501 from ejohnstown/key-usage
only check server's cert key encipher on client for RSA key exchange
2016-07-26 15:45:38 -07:00
John Safranek
0265b0f4bb only check server's cert key encipher on client for RSA key exchange 2016-07-26 13:32:54 -07:00
John Safranek
993838153e Merge pull request #487 from moisesguimaraes/fix-ocspstapling-getca
fixes ocsp signer lookup in the cert manager.
2016-07-26 12:42:47 -07:00
John Safranek
edbec4db20 Merge pull request #500 from dgarske/ocsp2_asn_fix
Fix for failing OID check with "ocspstapling2" enabled
2016-07-26 12:41:50 -07:00
toddouska
242d26eba2 Merge pull request #488 from cconlon/sig_algo
leave off SHA1-RSA/ECDSA signature algorithms when NO_OLD_TLS is defined
2016-07-26 11:05:24 -07:00
David Garske
c80f1805f0 Fix for failing OID check with "ocspstapling2" enabled. Found OID type in "ToTraditional" that should be keyType, not sigType. Added optional OID decode function and optional OID info dump in "GetObjectId" (both off by default). 2016-07-26 10:35:40 -07:00
dgarske
5bb250583e Merge pull request #499 from toddouska/timing
add --enable-harden swtich for timing resistance and blinding, on by …
2016-07-26 10:14:20 -07:00
toddouska
fc6a5c0702 fix mcapi w/o harden 2016-07-26 09:06:46 -07:00
toddouska
a274386693 fix user rsa no error codes? 2016-07-25 19:19:46 -07:00
toddouska
51042e166f fix mcapi with blinding API addition 2016-07-25 15:57:38 -07:00
toddouska
cd5486a4e6 fix user_rsa with blinding API addition 2016-07-25 15:33:28 -07:00
John Safranek
ea683f493a Merge pull request #498 from kaleb-himes/cert-updates
update certs pre-release: NTRU certs expired in mid june
2016-07-25 15:19:34 -07:00
toddouska
16336e37ec fix blinding with fips 2016-07-25 13:47:53 -07:00
toddouska
88f847de90 add --enable-harden swtich for timing resistance and blinding, on by default 2016-07-25 13:24:36 -07:00
kaleb-himes
4121667586 update certs pre-release: NTRU certs expired in mid june 2016-07-25 13:05:52 -06:00
toddouska
096e3f9b8b Merge pull request #496 from JacobBarthelmeh/staticmemory
add helper functions for choosing static buffer size
2016-07-21 16:17:34 -07:00
Jacob Barthelmeh
e8f7d78fc4 add helper functions for choosing static buffer size 2016-07-21 12:11:15 -06:00
toddouska
b81e687bf3 Merge pull request #490 from JacobBarthelmeh/master
Static Memory Fixes
2016-07-20 20:27:03 -07:00
toddouska
8f2af608a7 Merge pull request #492 from JacobBarthelmeh/staticmemory
set heap hint for ctx
2016-07-20 20:25:38 -07:00
dgarske
e920e6cee0 Merge pull request #495 from toddouska/rng-redef
fix WC_RNG redeclare
2016-07-20 19:22:08 -07:00
toddouska
2c92fee59f fix WC_RNG redeclare 2016-07-20 17:18:58 -07:00
dgarske
b265666174 Merge pull request #491 from toddouska/rsab-fixes
fix rsablind other builds
2016-07-20 15:22:19 -07:00
toddouska
81526f8384 move wolfSSL Get RNG out of ifdef in header 2016-07-20 11:35:57 -07:00
toddouska
1b980867d6 fix rsablind other builds 2016-07-20 11:35:57 -07:00
Jacob Barthelmeh
5d8a78be30 set heap hint for ctx 2016-07-20 11:47:36 -06:00
Jacob Barthelmeh
1f5b6d4e66 sanity check on buffer size 2016-07-20 11:44:22 -06:00
Jacob Barthelmeh
01ecc64052 avoid race condition with IO and handshake counter 2016-07-20 11:44:22 -06:00
Jacob Barthelmeh
17207ff61b account for when FreeHandshakeResources is not called 2016-07-20 11:44:22 -06:00
toddouska
8423ad0e96 Merge pull request #493 from dgarske/ecc_fixes
ECC fixes with Shamir disabled
2016-07-20 10:40:14 -07:00
David Garske
e0f2bbd1b4 Added comment about why 0's test is disabled. ECC without Shamir fails with fast or normal math. 2016-07-19 19:12:45 -07:00
David Garske
5e2502fa95 ECC without Shamir has issues testing all zero's digest, so disable this test if not using Shamir method. Fixed comment about "NO_ECC_SECP". 2016-07-19 14:34:32 -07:00
toddouska
7a419ba6d8 Merge pull request #472 from dgarske/ecc_brainpool_koblitz
ECC and TLS support for all SECP, Koblitz and Brainpool curves
2016-07-19 11:44:53 -07:00
toddouska
bdbf972d42 Merge pull request #486 from cconlon/openssl-script
openssl.test, switch -Verify to -verify to accomodate ADH cipher suites
2016-07-19 11:38:52 -07:00
dgarske
32a2bd3863 Merge pull request #489 from toddouska/rsablind
Adds WC_RSA_BLINDING for RSA Private Operations
2016-07-19 09:03:09 -07:00
toddouska
f88f501923 add unique RNG missing error 2016-07-18 18:10:38 -07:00
Moisés Guimarães
e866b55bb7 removes fallback. 2016-07-18 22:02:41 -03:00
toddouska
1c71fb4ad1 scope tmpa/b with blinding, document RSA options 2016-07-18 17:37:03 -07:00
toddouska
c2b55f69fa fix 32bit mp_add_d need 2016-07-18 12:49:31 -07:00
toddouska
d235a5f0cc add WC_RSA_BLINDING, wc_RsaSetRNG() for RSA Private Decrypt which doesn't have an RNG 2016-07-18 11:57:47 -07:00
Chris Conlon
d3f7ddc486 leave off SHA1-RSA/ECDSA signature algorithms when NO_OLD_TLS is defined 2016-07-15 14:32:24 -06:00
Moisés Guimarães
dd329ac97b fixes ocsp signer lookup in the cert manager. 2016-07-15 17:12:04 -03:00
Chris Conlon
e75642f011 openssl.test, switch -Verify to -verify to accomodate ADH cipher suites 2016-07-15 13:39:32 -06:00
Chris Conlon
c47f5f404c Merge pull request #480 from toddouska/noecho
don't echo session id on blank ticket if we're going to create a new …
2016-07-15 13:12:27 -06:00
Chris Conlon
b1de4dcbbb Merge pull request #481 from wolfSSL/fix_anon_cipher
Anonymous cipher fix
2016-07-15 13:05:32 -06:00
dgarske
9a6f66a093 Merge pull request #484 from JacobBarthelmeh/master
add ARM 64bit type macro
2016-07-15 09:50:39 -07:00
David Garske
aa9b1e964c Fix for possible seg fault with anonymous cipher mode enabled. Do not perform signature/verify when using anon_cipher. 2016-07-14 15:58:35 -07:00
Jacob Barthelmeh
515bf5e135 add ARM 64bit type macro 2016-07-14 15:29:32 -06:00
toddouska
c7b969b5b4 don't echo session id on blank ticket if we're going to create a new ticket 2016-07-13 18:45:10 -07:00
Chris Conlon
9a9a98ac82 Merge pull request #479 from toddouska/idlen
allow bogus client sessoinID of non 32 bytes with session ticket
2016-07-13 14:57:33 -06:00
toddouska
5f21f93c61 allow bogus sessionID when ticket callback rejects ticket 2016-07-13 12:47:59 -06:00
dgarske
c20551cc56 Merge pull request #478 from toddouska/flatten-fix
fix rsa flatten eSz check
2016-07-13 08:50:39 -07:00
toddouska
7b76c3ab36 allow bogus client sessoinID of non 32 bytes with session ticket 2016-07-13 09:47:49 -06:00
toddouska
b6aefad568 Merge pull request #477 from JacobBarthelmeh/master
remove hard tabs and replace with spaces
2016-07-12 16:31:13 -06:00
toddouska
7a906e47ed fix rsa flatten eSz check 2016-07-12 16:28:59 -06:00
toddouska
97f60bc831 Merge pull request #476 from dgarske/fix_lpcxpresso
Fixes for LPCXpresso eclipse project
2016-07-12 15:23:09 -06:00
Jacob Barthelmeh
92341292c7 remove hard tabs and replace with spaces 2016-07-12 14:12:44 -06:00
David Garske
8a20f7a909 Fix to exclude misc.c by default to eliminate #error about inline. 2016-07-12 13:07:08 -07:00
David Garske
1c9f013c09 Include the .project and .cproject files in distribution. Fix issue with adding wolfssl to existing project, so the <name> is "wolfssl", not "lib_wolfssl". 2016-07-12 13:03:47 -07:00
Kaleb Himes
1b149d3941 Merge pull request #474 from ejohnstown/dtls-ver
One last fix of the DTLS version numbers
2016-07-11 12:35:27 -07:00
John Safranek
3dc09ae0fb one last fix of the DTLS version numbers 2016-07-08 17:20:56 -07:00
dgarske
24ad3f7f3e Merge pull request #473 from toddouska/ecc-timing-fix
Fix ecc timming missing variable. Fix fpecc thread local storage size with clang. Don't include comba includes if FP_SIZE is too small for index.
2016-07-08 15:08:58 -07:00
David Garske
acc5389f9a Fixed possible issue with OID pointer returned from "wc_ecc_get_oid" if "HAVE_OID_ENCODING" enabled. Was previously returning static pointer, which was shared for all OID's. Now uses cache for each OID, which also improves performance on subsequent calls to the same OID. 2016-07-08 14:22:21 -07:00
David Garske
19db78fc76 Moved the ECC OID's into separate static const array to reduce ecc_sets size. Added "ecc_oid_t" typedef to determine "oid" size based on HAVE_OID_ENCODING option. Reduced the encoded variable size to word16. 2016-07-08 14:15:54 -07:00
toddouska
8da8c87fa4 don't include comba includes if FP_SIZE is too small for index 2016-07-08 12:29:38 -07:00
toddouska
c7318c8576 fix fpecc thread local storage size with clang 2016-07-08 12:01:52 -07:00
toddouska
68d66d12d6 fix ecc timming missing variable 2016-07-08 11:57:24 -07:00
David Garske
7a1acc7e56 Added TLS support for all SECP and Brainpool curves. Added ECC curve specs for all Brainpool, Koblitz and R2/R3. Adds new "HAVE_ECC_BRAINPOOL", "HAVE_ECC_KOBLITZ", "HAVE_ECC_SECPR2" and "HAVE_ECC_SECPR3" options. ECC refactor to use curve_id in _ex functions. NID and ECC Id's match now. Added ability to encode OID (HAVE_OID_ENCODING), but leave off by default and will use pre-encoded value for best performance. 2016-07-07 10:59:45 -07:00
toddouska
0f25ee703d Merge pull request #468 from JacobBarthelmeh/master
option to use test.h without gettimeofday
2016-07-06 18:48:18 -07:00
Jacob Barthelmeh
5fbab0e6a7 option to use test.h without gettimeofday
revert parameter passed to current_time with TIRTOS
2016-07-01 16:57:49 -06:00
toddouska
00cd0a3146 Merge pull request #471 from dgarske/fixdoubleinit
Remove double call to "wolfCrypt_Init()" in test.c
2016-06-30 19:32:52 -07:00
toddouska
df87ee810f Merge pull request #469 from cconlon/bug-fixes
update README with CU bug fix note
2016-06-30 19:31:58 -07:00
toddouska
000f1a19e5 Merge pull request #470 from JacobBarthelmeh/Testing
sanity checks
2016-06-30 19:30:28 -07:00
David Garske
dcdc28e014 Remove double call to "wolfCrypt_Init()" in test.c. Appears to have been added in static memory merge on 6/10. 2016-06-30 16:51:13 -07:00
Jacob Barthelmeh
8bba628f3f sanity check in function GetInputData and when shrinking buffer 2016-06-30 13:42:38 -06:00
toddouska
f194c216c0 Merge pull request #466 from JacobBarthelmeh/mutex
free ctx in case of InitMutex fail
2016-06-30 12:05:06 -07:00
Jacob Barthelmeh
cf522314ce sanity checks 2016-06-30 11:41:22 -06:00
Chris Conlon
a2bd4719ee update README with CU bug fix note 2016-06-29 16:54:25 -06:00
Jacob Barthelmeh
3f36a914da remove cast from enum to int 2016-06-29 14:28:36 -06:00
toddouska
c17830e5c7 Merge pull request #467 from dgarske/stdlib_macro_cleanup
Cleanup of stdlib function calls
2016-06-29 12:14:09 -07:00
David Garske
5b3a72d482 Cleanup of stdlib function calls in the wolfSSL library to use our cross-platform "X*" style macros in types.h. 2016-06-29 11:11:25 -07:00
toddouska
eb072e0344 Merge pull request #463 from JacobBarthelmeh/master
update mysql port
2016-06-28 14:56:57 -07:00
toddouska
981cf9cbcb Merge pull request #462 from cconlon/bug-fixes
PemToDer Bug Fixes
2016-06-28 09:58:18 -07:00
Jacob Barthelmeh
0589fe0d39 free ctx in case of InitMutex fail 2016-06-28 09:29:28 -06:00
dgarske
7da797dd4c Merge pull request #464 from wolfSSL/revert-461-bio
Revert "Bio"
2016-06-27 14:50:50 -07:00
Jacob Barthelmeh
f18ff8bfa4 update mysql patch 2016-06-27 15:44:52 -06:00
toddouska
ac6635593b Revert "Bio" 2016-06-27 10:53:34 -07:00
Chris Conlon
9c7bea46d2 fix out of bounds read in PemToDer with 0 size der buffer, CU #4 2016-06-27 10:53:19 -06:00
Chris Conlon
92e501c8e4 fix possible out of bound read in PemToDer header, CU #3 2016-06-27 10:53:19 -06:00
Chris Conlon
2951e167b5 check return code of PemToDer in wolfSSL_CertManagerVerifyBuffer, CU #2 2016-06-27 10:23:22 -06:00
Chris Conlon
8fac3fffea fix possible out of bounds read in PemToDer, CU #1 2016-06-27 10:23:22 -06:00
toddouska
3a18b057d7 Merge pull request #460 from dgarske/DerBufMemcpyCleanup
Cleanup of DerBuffer duplication
2016-06-24 14:51:30 -07:00
toddouska
fbef3c2523 Merge pull request #461 from JacobBarthelmeh/bio
Bio
2016-06-24 14:50:52 -07:00
Jacob Barthelmeh
49934a5c91 Merge https://github.com/wolfSSL/wolfssl into bio 2016-06-24 14:22:14 -06:00
Ludovic FLAMENT
d0e832bda9 change file name from compat-wolfssl to compat-wolfcrypt 2016-06-24 19:10:39 +02:00
Ludovic FLAMENT
033f308a08 change file name from compat-wolfssl to compat-wolfcrypt 2016-06-24 19:00:39 +02:00
Kaleb Himes
19da114c0c Merge pull request #454 from ejohnstown/dtls-version
DTLS Hello Verify Request Version Number
2016-06-24 08:44:55 -07:00
Ludovic FLAMENT
4215182945 fix macro error 2016-06-24 13:27:49 +02:00
Ludovic FLAMENT
0c43123a01 Fix BIO based on review 2016-06-24 10:54:58 +02:00
JacobBarthelmeh
379af941a8 Merge pull request #459 from ejohnstown/aes-cmac-fixes
AES-CMAC Fixes
2016-06-23 22:10:26 -06:00
David Garske
b0f7d819bd Cleanup of DerBuffer duplication that was using memcpy still after refractor and should be direct pointer copy. 2016-06-23 18:14:22 -07:00
John Safranek
ffb537c33f removed dependency on AES-NI for the AES-direct test 2016-06-23 15:34:09 -06:00
John Safranek
0d031fcbd7 added parameter checking to Generate and Verify 2016-06-23 15:34:09 -06:00
toddouska
746ae2f4e5 Merge pull request #458 from JacobBarthelmeh/master
fix secure renegotiation build
2016-06-23 13:34:39 -07:00
Jacob Barthelmeh
0b91e000bb fix secure renegotiation build 2016-06-23 13:10:39 -06:00
toddouska
02ef518a75 Merge pull request #456 from dgarske/FixEccCompKey
Fixes for ECC compressed keys
2016-06-22 14:47:42 -07:00
Jacob Barthelmeh
f6bbe845f5 Merge https://github.com/wolfSSL/wolfssl into bio 2016-06-22 09:14:53 -06:00
David Garske
47c1f4e68f Fix possible use of ForceZero with NULL pointer. Improve init of "kb" when small stack disabled, so memset isn't performed twice. 2016-06-22 07:22:30 -07:00
David Garske
69db94d668 Fix build error for un-initialized "kb" variable when built with fixed point cache and small stack enabled. 2016-06-22 07:06:07 -07:00
David Garske
d294dc363e Fix scan-build warning with "redundant redeclaration of 'fp_isprime'". Changed "fp_isprime" and "fp_isprime_ex" to local static only. Also made "fp_gcd", "fp_lcm", and "fp_randprime" static functions. 2016-06-21 19:35:25 -07:00
David Garske
1db880b6bf Fixed issue with compressed keys and custom curves. The inLen adjustment for compressed curves was only be done for built-in curves. 2016-06-21 15:55:17 -07:00
David Garske
dd52af0872 ECC cleanup / fixes. Improvements to ECC with fast math enabled to avoid mp_clear on stack variables. Refactor of ECC failure cleanup (fixes possible mem leaks with small stack enabled). Refactor of "fp_is*" response checks to use FP_YES or FP_NO. Pulled libtom enhancement/cleanup of fp_isprime. Fix for compressed keys import with custom curves (still having some issues though). 2016-06-21 15:27:51 -07:00
David Garske
aa1a405dd1 Fixes for compressed keys. Fix to fast math "mp_cnt_lsb" to return proper value, which fixes "mp_jacobi", which fixes "mp_sqrtmod_prime", which fixes compressed keys for 224-bit key. Removed workarounds for compressed keys. Added new configure option "--enable-compkey". Fixed issue with normal math and custom curves where "t2" could be free'd and used. Fixed issue with mp_dump in integer.c, with not allocating correctly sized buffer for toradix. 2016-06-21 14:06:02 -07:00
dgarske
5fa80a2667 Merge pull request #455 from toddouska/version
bump dev version
2016-06-20 22:07:18 -07:00
toddouska
f4473edfb1 bump dev version 2016-06-20 16:20:18 -07:00
toddouska
335865a5b2 Merge pull request #447 from ejohnstown/dtls-retx
DTLS Retransmit Fix
2016-06-20 15:46:55 -07:00
toddouska
79e2af8c15 Merge pull request #445 from ejohnstown/dtls-alert
DTLS bad MAC alert
2016-06-20 15:36:18 -07:00
toddouska
a859cf189d Merge pull request #443 from ejohnstown/new-ccm-suite
Add cipher suite ECDHE-ECDSA-AES128-CCM
2016-06-20 15:34:55 -07:00
John Safranek
6d520e0da9 hello verify request handshake version number to match server hello version number 2016-06-20 11:08:45 -06:00
toddouska
de4448c59b Merge pull request #452 from dgarske/fixeccscanbuildwarning
Fixes scan-build warning in ecc.c line 2208
2016-06-20 09:09:21 -07:00
David Garske
3789d9913c Fixes scan-build warning "wolfcrypt/src/ecc.c:2208:6: warning: Use of memory after it is freed". This is due to a rebase issue with static memory changes after the new ECC custom curves changes. The precomp[] is init to NULL at top so cleanup can always be done at end (shouldn't be done in middle). 2016-06-18 22:35:52 -07:00
toddouska
9173ecdc04 Merge pull request #450 from dgarske/NidFix
Fix for NID names on NIST prime 192 and 256 curves
2016-06-18 16:14:04 -07:00
David Garske
eb1d8d5df6 Fix for NID names on NIST prime 192 and 256 curves. Cleanup of the memcpy/memset in .i files to use portable names. 2016-06-17 15:59:25 -07:00
Jacob Barthelmeh
ffee1eafd9 add test_bio.txt to .getignore 2016-06-17 16:20:54 -06:00
JacobBarthelmeh
b8e00a3448 Merge pull request #449 from moisesguimaraes/fix-ocsp-stapling-tests
fixes ocsp stapling tests ignoring CRL
2016-06-17 15:16:39 -06:00
Jacob Barthelmeh
ea71814518 Merge https://github.com/wolfSSL/wolfssl 2016-06-17 13:58:53 -06:00
toddouska
e8c4950a83 Merge pull request #446 from cconlon/cleanup
Remove unimplemented function prototypes
2016-06-17 12:57:55 -07:00
toddouska
4fc07a2e9e Merge pull request #415 from dgarske/customcurve-mathupdate
Support for custom ECC curves and math lib updates
2016-06-17 12:56:52 -07:00
Moisés Guimarães
db7aab5e37 fixes ocsp stapling tests ignoring CRL 2016-06-17 08:19:57 -03:00
JacobBarthelmeh
16b85cee8f Merge pull request #448 from cconlon/winfix
Fix windows example echoserver
2016-06-16 18:18:32 -06:00
Chris Conlon
a7c7407406 fix windows example echoserver 2016-06-16 16:39:18 -06:00
David Garske
6da166d83b Enhancement / cleanup of the "wc_ecc_make_key_ex" API so it can be used with "keysize" or "dp" and allows compatibility with existing "wc_ecc_make_key". Note: "wc_ecc_make_key_ex" was not previously public, so changing it at this point is okay. 2016-06-16 10:38:15 -07:00
David Garske
d55663eaee Added ECC API's for using custom curves that are not in the "ecc_sets" list. Added wolfCrypt test to validate/demonstrate custom curve using BRAINPOOL256R1. Exposed "wc_ecc_make_key_ex" and added "wc_ecc_import_x963_ex" / "wc_ecc_import_raw_ex" API's that accept "const ecc_set_type*" for custom curve. Internally use "ECC_CUSTOM_IDX" (-1) to define custom curve is used. Added "--enable-ecccustcurves" option to configure.ac. 2016-06-16 10:09:41 -07:00
David Garske
69b6ac504f Fixes for ecc heap errors after rebase. 2016-06-16 06:46:22 -07:00
John Safranek
8f3c56c03f Fix where the last flight was getting retransmit on timeout notification. 2016-06-15 18:44:25 -07:00
Chris Conlon
31908b7263 remove unused protos for wc_Sha384Free and wc_Sha512Free, not impmlemented by ti-hash.c 2016-06-15 11:34:29 -06:00
Chris Conlon
3fec69d3f8 remove unused proto for wc_SetCertificatePolicies 2016-06-15 10:50:41 -06:00
David Garske
237193fdee Fixed scan-build warning about "len" being used un-initialized in ecc_mul2add. Cleanup of the "mu" variable handling. 2016-06-15 08:41:51 -07:00
David Garske
7c5483ba0b Performance improvements in fp_mulmod, fp_submod and fp_submod to handle ALT_ECC_SIZE better. Revert fp_clear to fp_add_d, since it isn't required and slows it down. 2016-06-15 08:41:51 -07:00
David Garske
5703e5eadb ECC changes to support custom curves. Added new "WOLFSSL_CUSTOM_CURVES" option to support non-standard ECC curves in ecc_is_point and ecc_projective_dbl_point. Refactor to load and pass curve "a" parameter down through ECC functions. Relocated mp_submod and added mp_addmod. Refactor to pass mp variable directly (not pointer) for montgomery variable. Fix in mp_jacobi to also handle case of a == 0. Cleanup of *_ecc_mulmod and wc_ecc_make_key_ex error handling. Cleanup of ecc_map for handling normal, fast and alt_ecc math for optimization of performance and allowing reduced ecc_size. 2016-06-15 08:41:51 -07:00
David Garske
bb17bac018 Updated the naming for the ECC curve sets. Additional comments for each curve parameter. 2016-06-14 16:56:22 -07:00
David Garske
87c00eb3f3 Math updates from libtom. Fixes in mp_read_radix for to include char 36 and clear the destination before checks. Fix to clear tmp value on fp_sub_d and fp_add_d. Fixes in assembly for x86-32 INNERMUL, PPC32 INNERMUL and PROPCARRY and x86-64 SQRADD. Added mp_isneg. Refactor of mp_iszero, mp_iseven, mp_isodd and mp_isneg to check using MP_YES or MP_NO. Changed fp_read_unsigned_bin "b" arg to const. Removal of the "register" on stack variables to let compiler determine best optimization. 2016-06-14 16:56:22 -07:00
dgarske
7a3cb23af9 Merge pull request #444 from JacobBarthelmeh/master
prepare for version 3.9.6
2016-06-14 15:51:01 -07:00
John Safranek
35f43f9216 In DTLS, if a mac or decrypt error is detected, just drop the datagram and don't send an alert 2016-06-14 14:36:08 -07:00
Jacob Barthelmeh
03de8e3464 prepare for version 3.9.6 2016-06-14 14:35:12 -06:00
John Safranek
2f9c9b9a22 Add cipher suite ECDHE-ECDSA-AES128-CCM
1. Added the usual cipher suite changes for the new suite.
2. Added a build option, WOLFSSL_ALT_TEST_STRINGS, for testing
   against GnuTLS. It wants to receive strings with newlines.
3. Updated the test configs for the new suite.

Tested against GnuTLS's client and server using the options:

    $ gnutls-cli --priority "NONE:+VERS-TLS-ALL:+AEAD:+ECDHE-ECDSA:+AES-128-CCM:+SIGN-ALL:+COMP-NULL:+CURVE-ALL:+CTYPE-X509" --x509cafile=./certs/server-ecc.pem --no-ca-verification -p 11111 localhost
    $ gnutls-serv --echo --x509keyfile=./certs/ecc-key.pem --x509certfile=./certs/server-ecc.pem --port=11111 -a --priority "NONE:+VERS-TLS-ALL:+AEAD:+ECDHE-ECDSA:+AES-128-CCM:+SIGN-ALL:+COMP-NULL:+CURVE-ALL:+CTYPE-X509"

To talk to GnuTLS, wolfSSL also needed the supported curves option
enabled.
2016-06-13 14:39:41 -07:00
dgarske
2752f3f9c9 Merge pull request #442 from toddouska/mcapi-aes
fix mcapi aes size with heap
2016-06-11 12:52:59 -07:00
toddouska
02985b16ac fix mcapi aes size with heap 2016-06-11 09:29:20 -07:00
toddouska
a156cedabc Merge pull request #435 from JacobBarthelmeh/staticmemory
Staticmemory
2016-06-10 17:03:49 -07:00
Jacob Barthelmeh
707714dd38 threaded fixes with static memory 2016-06-10 15:35:02 -06:00
Jacob Barthelmeh
3d3591a227 typdef gaurd / error out on bad mutex init / handle no maxHa or maxIO set 2016-06-10 14:13:27 -06:00
Chris Conlon
cbefaef6bc Merge pull request #440 from toddouska/output-size
Output size
2016-06-10 11:33:31 -06:00
Jacob Barthelmeh
2bda6c6449 16 byte aligned static memory 2016-06-10 11:15:54 -06:00
Chris Conlon
620ea41191 Merge pull request #439 from kaleb-himes/update-cert-buffers
update certificate buffers per github issue #422
2016-06-10 10:08:25 -06:00
toddouska
dede05db9e Merge pull request #441 from dgarske/time_base64enc
Public "wc_GetTime" API and "configure --enable-base64encode"
2016-06-10 08:47:08 -07:00
Jacob Barthelmeh
ea3d1f8e17 extended method function 2016-06-09 23:41:51 -06:00
David Garske
b3068ffef5 Added new public "wc_GetTime" API for getting seconds from the asn.c XTIME. Added new "./configure --enable-base64encode" to enable Base64 encoding (now enabled by default for "x86_64"). 2016-06-09 16:26:39 -07:00
toddouska
6551c9fcab add getter for max output size 2016-06-09 14:51:07 -07:00
kaleb-himes
76d960c4c0 update certificate buffers per github issue #422 2016-06-09 13:47:33 -06:00
Jacob Barthelmeh
7943f68f2a run allocation tool on ocsp and check for mallocs 2016-06-09 12:03:28 -06:00
dgarske
367b519407 Merge pull request #424 from kojo1/MDK5
updated MDK5 projects
2016-06-09 10:47:04 -07:00
Jacob Barthelmeh
8be5409bc5 static method func / ocsp callbacks / heap test / alpn free func / remove timing resistant constraint 2016-06-09 11:36:31 -06:00
Jacob Barthelmeh
664d2190ba session ticket extension fix with static memory heap hint 2016-06-08 10:50:20 -06:00
toddouska
a2d7ba0dd9 add output size getter 2016-06-08 09:32:34 -07:00
Jacob Barthelmeh
e214086dce tlsx with static memory / account for session certs size 2016-06-08 09:18:43 -06:00
toddouska
c48db891d1 Merge pull request #433 from ejohnstown/aes-cmac
Aes cmac
2016-06-07 16:48:46 -07:00
dgarske
c1c1990247 Merge pull request #437 from tisb-vikram/master
Enable ECC features for TI devices
2016-06-07 16:00:20 -07:00
Vikram Adiga
57675dc51d add ALT_ECC_SIZE for TI build to reduce memory usage 2016-06-07 14:05:35 -07:00
Jacob Barthelmeh
738373038b clean up staticmemory with crl 2016-06-06 17:50:54 -06:00
Jacob Barthelmeh
e1edadafe1 ocsp with static memory, remove unused function 2016-06-06 16:19:33 -06:00
toddouska
9f7e8a6f4b Merge pull request #436 from JacobBarthelmeh/master
fix index to check for sperator value
2016-06-06 14:52:20 -07:00
Vikram Adiga
4ba77a7059 add HAVE_SUPPORTED_CURVES to TI-RTOS wolfSSL configuration 2016-06-06 13:50:14 -07:00
Jacob Barthelmeh
db90594909 adjust pointer cast, ssl rng with fips and unused param 2016-06-06 14:32:49 -06:00
Jacob Barthelmeh
e085be9485 fix index to check for sperator value 2016-06-06 10:34:35 -06:00
dgarske
a25df5b78e Merge pull request #434 from toddouska/crlbuffer
add wolfSSL and wolfSSL_CTX LoadCRLBuffer()
2016-06-06 09:01:25 -07:00
toddouska
38d5480256 Merge pull request #432 from JacobBarthelmeh/DTLS-MultiCore
import / export of peer connection information
2016-06-06 08:51:24 -07:00
Jacob Barthelmeh
2feee8856e revise static memory and update heap hint 2016-06-04 19:03:48 -06:00
Jacob Barthelmeh
104ff12e76 add staticmemory feature 2016-06-04 19:01:23 -06:00
toddouska
3f205d19f4 add wolfSSL and wolfSSL_CTX LoadCRLBuffer() 2016-06-03 15:13:16 -07:00
John Safranek
d05754f9db Merge pull request #404 from moisesguimaraes/wolfcrypt-py
wolfcrypt Python wrapper
2016-06-03 08:24:12 -07:00
Moisés Guimarães
7f71c526f6 adds python3 support 2016-06-03 10:37:41 -03:00
Moisés Guimarães
6736ffe10e adds links to wolfssl.com 2016-06-02 22:08:57 -03:00
Moisés Guimarães
a76291c2e2 adds tox instructions 2016-06-02 21:38:34 -03:00
Jacob Barthelmeh
046b987324 callbacks for setting and getting peer ip/port/family 2016-06-02 09:23:12 -06:00
Kaleb Himes
5be916e336 Merge pull request #403 from ejohnstown/dtls-fix
when dropping a DTLS message, drop the whole datagram
2016-05-30 17:26:25 -06:00
Jacob Barthelmeh
73328ac4bc import / export of peer connection information 2016-05-26 16:26:08 -06:00
toddouska
a4fa4d5253 Merge pull request #431 from JacobBarthelmeh/master
sanity checks on wolfSSL_dtls_get_peer arguments
2016-05-26 14:46:58 -07:00
dgarske
806a0bbaa7 Merge pull request #430 from toddouska/sesstick_type_typo
fix dynamic type session ticket typos
2016-05-26 11:35:46 -07:00
John Safranek
61801e06df add benchmark for AES-CMAC 2016-05-25 16:12:19 -07:00
John Safranek
1b9b7f52c9 1. Reformat a couple of #ifdefs around if(dtls) checks.
2. Move fuzz update for DTLS GetRecordHeader to be like the TLS case.
3. DtlsCheckWindow only allows current epoch and last epoch.
4. ProcessReply only retransmits flight on a CCS out of sequence when
   still retaining the handshake data.
2016-05-25 15:44:06 -07:00
Jacob Barthelmeh
5e1f06ce52 sanity checks on wolfSSL_dtls_get_peer arguments 2016-05-25 10:57:00 -06:00
toddouska
669cdfc357 fix dynamic type session ticket typos 2016-05-25 09:47:54 -07:00
John Safranek
ae093ded8f add standalone AES-CMAC generate and verify functions 2016-05-25 09:22:39 -07:00
Ludovic FLAMENT
5d67bb881e fix memory leaks 2016-05-25 17:44:31 +02:00
Ludovic FLAMENT
bb754bb46a Fix Win32 warnings 2016-05-25 13:49:06 +02:00
John Safranek
9bf4598772 use constant for Cmac type 2016-05-24 16:46:04 -07:00
John Safranek
dbfd5dffaf added parameter checks 2016-05-24 11:21:06 -07:00
John Safranek
b3d068dc40 Merge pull request #418 from toddouska/dyntickets
Dyntickets
2016-05-24 11:00:14 -07:00
Ludovic FLAMENT
1d675ed1e6 Fix va_copy error for Win32 build and AES-NI segfault 2016-05-24 18:17:26 +02:00
John Safranek
c0cbc97b06 add AES-CMAC 2016-05-23 17:50:36 -07:00
Moisés Guimarães
07ce928bf3 adds installation testing with vagrant 2016-05-23 21:10:44 -03:00
Moisés Guimarães
04d5ca41df adds --enable-Sha512 to make sure it is always present 2016-05-23 20:33:11 -03:00
toddouska
9ab5ec4a36 Merge pull request #428 from dgarske/eccmathfixes
Fixed bug with "ecc_projective_add_point"
2016-05-23 11:46:54 -07:00
toddouska
61f0af5cf3 Merge pull request #429 from dgarske/wolfcryptinit
Added missing wolfCrypt_Init() to wolfCrypt test application
2016-05-23 09:23:42 -07:00
Ludovic FLAMENT
ab1d6c91bf fix errors (win32, met leak) 2016-05-23 13:46:26 +02:00
Ludovic FLAMENT
99b5aa587f Fix errors (jenkins) 2016-05-23 11:11:57 +02:00
David Garske
5eb7768d00 Added missing wolfCrypt_Init() to wolfCrypt tests. 2016-05-22 18:18:06 -07:00
David Garske
15cd06b7ca Fixed bug with "ecc_projective_add_point" that was not protecting the case where Q == R and using the R variable directly for the result. Now if Q == R then swap P and Q and using a local x,y,z, is only required when used with ALT_ECC_SIZE. 2016-05-22 17:31:36 -07:00
John Safranek
7c93912f1d reject messages that are too far from the future 2016-05-22 16:10:47 -07:00
JacobBarthelmeh
eb6153f028 Merge pull request #425 from shihrer/master
Fixed scripts/benchmark.test, replaced == with -eq
2016-05-20 14:49:43 -06:00
JacobBarthelmeh
f369f8a434 Merge pull request #426 from jrblixt/master
Changes to date
2016-05-20 14:48:04 -06:00
Ludovic FLAMENT
ed4f67058a Merge branch 'master' of https://github.com/wolfssl/wolfssl 2016-05-20 21:51:13 +02:00
John Blixt
f1860d6263 Changes to date 2016-05-20 09:48:03 -06:00
Michael Shihrer
fa94f5ffe9 Replaced == with -eq to fix benchmark.test scripting error 2016-05-20 09:43:30 -06:00
Moisés Guimarães
fcc0eb7a6a fixes install instructions 2016-05-20 03:55:57 -03:00
Takashi Kojo
217ccd8b6a updated MDK5 projects for 3.9.0. Eliminated files for older versions 2016-05-20 13:32:23 +09:00
toddouska
504081e602 Merge pull request #421 from ejohnstown/limit-country-code
Limit Country Name size
2016-05-19 16:05:15 -07:00
toddouska
1bb5c48080 Merge pull request #423 from dgarske/bench-ecc-encrypt-decrypt
Added a benchmark for ECC encrypt/decrypt
2016-05-19 14:47:03 -07:00
David Garske
c1507957c4 Added a benchmark for ECC encrypt/decrypt when enabled via "HAVE_ECC_ENCRYPT" or "--enable-eccencrypt --enable-hkdf". 2016-05-19 11:42:00 -07:00
John Safranek
bae0fe9b63 MakeCertReq() was not checking return codes correctly for the SetFoo()
functions.
2016-05-18 15:14:23 -07:00
John Safranek
5c8daa0ac6 1. SetName() should return error if country code isn't 2 bytes.
2. MakeCert() was not checking return codes correctly for the SetFoo()
    functions.
3. Added error code for invalid country code length.
2016-05-18 15:04:40 -07:00
John Safranek
03e6f7cca3 RFC 5280 Appendix A.1 states that the Country Name in a certificate
shall have a size of 2 octets. Restrict country name length to 2 or 0.
2016-05-18 10:39:18 -07:00
toddouska
b8c0802e3c Merge pull request #414 from JacobBarthelmeh/DTLS-MultiCore
Dtls multi core
2016-05-17 17:39:18 -07:00
Moisés Guimarães
47a1dd8cc4 fixes install steps 2016-05-17 14:15:17 -03:00
Ludovic FLAMENT
9fe6ca3130 remove XSNPRINTF
add a full BIO client/server test
2016-05-17 17:49:30 +02:00
Jacob Barthelmeh
1b278edfd0 fix unused functions, make WOLFSSL first parameter, add comments 2016-05-16 23:48:26 -06:00
Moisés Guimarães
a000ee4db3 remove empty dirs 2016-05-16 22:17:09 -03:00
Moisés Guimarães
dc080694b4 reorder installation steps 2016-05-16 21:55:31 -03:00
Moisés Guimarães
2851f7d6a1 remove unnecessary dependency 2016-05-16 20:37:42 -03:00
Moisés Guimarães
2a0adc74a0 fixes wrapper path 2016-05-16 20:13:26 -03:00
Moisés Guimarães
347d80e879 removes folders from include.am 2016-05-16 15:49:32 -03:00
Moisés Guimarães
40cf30a13d adds .gitignore to include.am 2016-05-16 15:31:51 -03:00
Ludovic FLAMENT
4017e0f8dd fix BIO issues :
- remove unrequited tests
- fix compilations for lighty, stunned, openssh
- wc_BioGetAcceptSocket IPv4 / IPv6 support
- remove <stdio.h> from bio.h
- add NO_STDIO_FILESYSTEM for BIO_printf
- memset -> XMEMSET
- strlen -> XSTRLEN
2016-05-15 20:22:19 +02:00
Moisés Guimarães
d76d74d6c5 updates Linux deps on README 2016-05-15 15:08:16 -03:00
Jacob Barthelmeh
c8576566cc add public wolfSSL_dtls_export and api tests 2016-05-14 12:49:09 -06:00
toddouska
185e60ad19 based on pr#316; turns isDynamic ticket off on some failure cases, move an XFREE out of a Lock that isn't required 2016-05-13 14:11:46 -07:00
toddouska
1ea01a7ad8 Merge branch 'master' of https://github.com/NickolasLapp/wolfssl into dyntickets 2016-05-13 09:07:55 -07:00
Jacob Barthelmeh
3897f78073 truncated hmac export and sanity checks 2016-05-13 09:11:38 -06:00
toddouska
67ab30088b Merge pull request #416 from dgarske/mathmemleakfix
Fix mem leak with fast math disabled due to recent ecc_projective_add_point changes
2016-05-12 15:23:19 -07:00
David Garske
2ad9d41641 Performance improvement for fast math mp_clear to use fp_zero (memset) instead of fp_clear(ForceZero). Added new mp_forcezero function for clearing/free'ing sensitive private key data. Changed ECC and RSA to use mp_forcezero to explicitly handle private key clearing. 2016-05-12 11:50:34 -07:00
Jacob Barthelmeh
8d66ba2923 refactor export/import of cipher specs struct 2016-05-12 10:06:15 -06:00
Jacob Barthelmeh
fbf39a761a refactor export/import of key struct 2016-05-12 09:23:38 -06:00
Jacob Barthelmeh
f9ce2f2677 verify cipher suite is valid on import 2016-05-12 09:09:07 -06:00
John Safranek
39833768cf Merge pull request #417 from toddouska/stdio
make sure stdio.h can be swtiched off if not available
2016-05-11 14:55:05 -07:00
toddouska
cc16a543dd make sure stdio.h can be swtiched off if not available 2016-05-11 10:11:25 -07:00
David Garske
440956f8d4 Fixed new issue with ecc_projective_add_point not free'ing the local x, y, z if fast math was disabled. Formatting cleanup in integer.c. 2016-05-11 08:47:30 -07:00
toddouska
3bff6f10e3 Merge pull request #411 from dgarske/mathfixes
Math fixes
2016-05-10 14:45:20 -07:00
Jacob Barthelmeh
8c45cb1938 add DTLS session export option 2016-05-10 13:27:45 -06:00
David Garske
2fb4506922 iFixes to FP_MAX_BITS_ECC calculation. Alignment check against digit_bits is based on max ecc bits times two. If alignment check fails we add a digit_bit to make sure we have enough room. 2016-05-10 12:20:39 -07:00
Moisés Guimarães
9659505260 updates python docs 2016-05-09 18:46:01 -03:00
David Garske
d71d0f2cb4 Fix with fast math disabled so ecc_projective_add_point uses temp local variable for x,y,z result. 2016-05-09 13:29:25 -07:00
Moisés Guimarães
412141198e drops 'import about' requirement 2016-05-09 15:25:18 -03:00
David Garske
8f6352725a Fixed math for FP_MAX_BITS_ECC calculations. Error in alignment check. Altered non-aligned formula to be (max bits * 2) + digit, then 8-bit aligned. Cleanup of the example user_settings.h. 2016-05-09 10:34:37 -07:00
David Garske
8c9b8a596a Fixed calculation of max ECC bits with ALT_ECC_SIZE defined so it only allocates what is required. For 8-bit aligned curve sizes its double the max bits. For un-aligned curves sized, like ECC521, its 521 8-bit aligned, doubled, plus digit bit. 2016-05-09 09:51:11 -07:00
David Garske
44b1f98b39 Fixed issue with ALT_ECC_SIZE and default value for FP_MAX_BITS_ECC so its based on max enabled ECC curve bits. 2016-05-09 09:51:11 -07:00
David Garske
880b2e454b Refactor of the ecc_projective_add_point and ecc_projective_dbl_point functions to eliminate duplicate versions. Modified new single functions to work with normal, fast and alt_ecc_size math options. Careful use of mp_clear to retain original performance. 2016-05-09 09:51:11 -07:00
David Garske
fe58db2a07 Fixed typo with new "eccshamir" configure option. 2016-05-09 09:51:11 -07:00
David Garske
1b602d783c Fast math correction of "sizeof" to use (). Updates to tfm and ecc comments. 2016-05-09 09:51:11 -07:00
David Garske
5cbc4bdf29 Added new "WOLFSSL_DEBUG_MATH", which enables use of "mp_dump" to display information about an mp_int. 2016-05-09 09:51:11 -07:00
David Garske
a4782fcf01 Fix in fast math version of ecc_projective_dbl_point to use a local for x,y,z since ecc_point fp_int's are reduced size and cause math issues with ALT_ECC_SIZE enabled. Added local stack variable cleanups for ecc_projective_add_point. 2016-05-09 09:51:11 -07:00
David Garske
0ddbe0e60e Enhancement to RSA math function "_fp_exptmod" (non timing resistant version) to support WOLFSSL_SMALL_STACK, which moves the allocation of the 64 fp_int's from the stack to the heap. 2016-05-09 09:51:11 -07:00
David Garske
fa5dd01001 Fixes/improvements to the wolfCrypt ECC tests. Fixed bug with sharedA/sharedB being too small when BENCH_EMBEDDED is used and curve size over 256 bit. Added error message for ECC test failures, to show the curve size used. Fix to wc_ecc_verify_hash test to use digest that is not all zeros as that doesn't work correctly for non-Shamir ECC math. Changed return code for wc_ecc_check_check so its unique. 2016-05-09 09:51:11 -07:00
David Garske
a5d27853fa Fixes to fp_mul and fp_div to clear any excess digits on the destination. Added compile-time check to confirm FP_SIZE is compatible with TFM_ acceleration defines enabled. Updated comments in other places where excess digits are cleared. 2016-05-09 09:51:11 -07:00
David Garske
7c3fbd7644 Fix for fp_copy() when used with ALT_ECC_SIZE so any excess digits on the destination that we didn't write to are set to zero. 2016-05-09 09:51:11 -07:00
David Garske
9001036e09 Fixes memory leak in the wc_RsaFunction if failure happens when using normal math (not fast math) and RSA_LOW_MEM is not defined. 2016-05-09 09:51:11 -07:00
David Garske
9f0fa7500f Added configure "--disable-eccshamir" option. 2016-05-09 09:51:11 -07:00
Ludovic FLAMENT
f438e7ac65 Fix for Fedora 32/64 2016-05-09 08:13:17 +02:00
Ludovic FLAMENT
03b571cde4 fix some bugs, add Windows support 2016-05-07 21:12:08 +02:00
Nickolas Lapp
ecba5161ac default copyInto static instead of dynamic 2016-05-06 13:15:21 -06:00
toddouska
1c664ae710 Merge pull request #412 from cconlon/netRandom
add support for Whitewood netRandom
2016-05-06 07:31:18 -07:00
Chris Conlon
3449990374 add example netRandom config file 2016-05-05 15:34:52 -06:00
Chris Conlon
8f3e1165a1 add Whitewood netRandom client library support 2016-05-05 15:31:25 -06:00
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
Moisés Guimarães
b0c23ceafa fixes about 2016-05-05 12:48:47 -03:00
Ludovic FLAMENT
5d1de3bb33 One file for all BIO functions in wolfcrypt
move required functions from wolfssl to wolfcrypt
add client/server tests for BIO
2016-05-05 12:58:21 +02: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
Moisés Guimarães
9e9fd24d68 updates metadata; drops py26 tests 2016-05-04 21:38:27 -03: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
Moisés Guimarães
3181731404 adds docs 2016-05-03 00:49:56 -03: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
John Safranek
ddcf47eadd when dropping a DTLS message, drop the whole datagram 2016-05-02 15:18:08 -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
Moisés Guimarães
69ac477976 updates docs template 2016-04-29 16:25:53 -03:00
Moisés Guimarães
1efd1343ee initial docs 2016-04-29 16:13:38 -03: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
Nickolas Lapp
00737d1e82 Ensure that tmpBuff gets assigned null after free. 2016-04-29 09:45:44 -06:00
Ludovic FLAMENT
1bd65cc8a9 First version for OpenSSL BIO compatibility 2016-04-29 16:34:11 +02: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
Moisés Guimarães
66d41eee36 updates python README 2016-04-28 13:36:41 -03:00
Moisés Guimarães
d8309ab624 adds python ignored files 2016-04-28 13:26:59 -03:00
Moisés Guimarães
7e661ab866 importing wolfcrypt-py repo 2016-04-28 13:20:10 -03: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
Nickolas Lapp
ccee49978b Fix scan-build warning 2016-04-25 11:00:56 -06:00
Nickolas Lapp
1c9bf483ec Reorder check for thread modified in addSession. Make sure tick assigned
correctly in non dynamic case
2016-04-25 11:00:56 -06:00
Nickolas Lapp
5f12b4c2ae Add check to see if thread modified session in AddSession 2016-04-25 11:00:56 -06:00
Nickolas Lapp
5f9c1ffca6 Initial support for deep copying of session 2016-04-25 11:00:42 -06:00
Nickolas Lapp
f27aca0956 Remove redundant dynTicket pointer. Reorder struct for packing/alignment 2016-04-25 11:00:31 -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
Nickolas Lapp
0eb59d5c35 Fix rand num generation on MacOS, Improve organization with tic storage 2016-04-22 10:35:44 -06:00
Nickolas Lapp
c8b20d9090 Add support for dynamic session tickets, add openssl.test to testuiste 2016-04-22 10:35:44 -06: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
toddouska
f99d3067c9 sniffer dynamic buffer release 2015-10-23 16:56:17 -07:00
toddouska
ab68f38236 have allocate extra byte in case user wants to null terminate returned plaintext 2015-10-23 16:38:59 -07:00
toddouska
d53b6a9132 handle sniffer realloc failure w/o leak 2015-10-23 16:19:26 -07:00
toddouska
880ec8cb09 sniffer owns data buffer now, user free(s) after use 2015-10-23 14:12:45 -07:00
toddouska
c90d0d9607 Merge branch 'sniffer' 2015-10-23 14:10:51 -07:00
toddouska
73f6666fc2 pre 3.7 2015-10-23 11:18:44 -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
f64f326ab3 work on cyassl -> wolfssl compatibility 2015-10-20 15:25:00 -06:00
toddouska
87668e7acd make external script test optional with env variable as CA changes more frequent than release 2015-10-20 11:56:46 -07:00
toddouska
d2bdea9d96 add new ca to wolfssl website 2015-10-20 11:28:25 -07:00
toddouska
66d8dc0c71 fix README candidiate typo 2015-10-20 11:22:10 -07:00
toddouska
1b311eb8e6 Merge pull request #166 from dgarske/master
Updated the INSTALL file with section for building with Rowley CrossW…
2015-10-20 11:18:45 -07:00
David Garske
f26a9f8a70 Updated the INSTALL file with section for building with Rowley CrossWorks and updated the prerequisites for building with *nix. 2015-10-20 09:44:04 -07:00
Jacob Barthelmeh
374e31b211 user crypto memory management 2015-10-20 09:22:43 -06:00
toddouska
7499175bdb fix jenkins sniffer changes 2015-10-19 15:09:36 -07: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
John Safranek
14d893aeb0 Add decrypt of AES-GCM to the sniffer. 2015-10-19 11:28:25 -07:00
toddouska
e1b0c0ac3d fix jenkins build#69 2015-10-16 15:12:37 -07:00
toddouska
c93c6c9bf4 add wolfSSL_new() pointer return check on all calls in example client 2015-10-16 14:12:38 -07:00
toddouska
1253c86c95 Merge branch 'alpn' 2015-10-16 14:06:33 -07:00
toddouska
4141ea8f83 example server to use cstd free for all build options 2015-10-16 14:05:37 -07:00
Ludovic FLAMENT
1bfc7c7921 Merge branch 'master' of https://github.com/wolfssl/wolfssl
Conflicts:
	examples/server/server.c
	src/ssl.c
	src/tls.c
	tests/api.c
	wolfssl/internal.h
	wolfssl/ssl.h
2015-10-16 08:01:29 +02:00
Ludovic FLAMENT
9ef43910ed Merge branch 'master' of https://github.com/wolfssl/wolfssl 2015-10-16 07:46:51 +02:00
David Garske
10eab5047a Fixed compile issues with example server/client. Fixed issue with using XMALLOC/XFREE being used in examples. Fixed issue with "int select_ret" declaration scope. Fixed issue with test.h HAVE_SESSION_TICKET "static rng" name. 2015-10-15 13:42:41 -07:00
Chris Conlon
d3584979a0 add JNI object storage in WOLFSSL struct 2015-10-15 13:30:03 -06:00
Chris Conlon
bfc8240dc5 Update --enable-jni to enable PSK, define WOLFSSL_JNI 2015-10-15 13:27:43 -06:00
David Garske
78bdaedad2 Fixed issues in example server with uninitialized variable and resume test. 2015-10-15 10:18:26 -07:00
toddouska
74e981093d fix merge conflict misses on alpn example letter change 2015-10-15 09:48:07 -07:00
Ludovic FLAMENT
d4f3419758 ALPN : add function to get in a server the list of supported protocols sent by the client. 2015-10-15 14:59:35 +02:00
David Garske
32171997e7 Updated Rowley CrossWorks README.md for enabling FREESCALE_MMCAU. Added sample benchmark output with MMCAU enabled. 2015-10-14 19:19:13 -07:00
David Garske
fdab3943be Added throughput benchmarking for client/server examples and added helper script "scripts/benchmark.test". Added example client option: "-B <num>" Benchmarking throughput. Added example server options: "-B <num>" Benchmark throughput, "-e" Echo data, "-i" Loop / Accept multiple connections. Cleanup of the include.am for examples. Cleanup of tcp_connect with DTLS enabled. Cleanup of the valid socket checking. Cleanup trailing whitespace. 2015-10-14 19:13:45 -07:00
Ludovic FLAMENT
ee8537fb6d Merge branch 'master' of https://github.com/wolfssl/wolfssl 2015-10-14 20:53:30 +02:00
toddouska
d6cb203210 fix tlsx library proper build with NO_SERVER or NO_CLIENT 2015-10-14 11:16:22 -07:00
toddouska
f2959168c9 Merge branch 'read-key' 2015-10-14 10:50:37 -07:00
toddouska
56af895c68 make sure pubkey in ecc private key has size 2015-10-14 10:48:37 -07:00
Jacob Barthelmeh
d2cc582939 fips related macros for configurations using AES direct and DES ECB 2015-10-14 10:51:39 -06:00
toddouska
52cdf85e26 move touch fips files for non fips distribution to autogen.sh for cleaner autoconf handling 2015-10-14 09:18:05 -07:00
toddouska
d7772dd254 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-10-13 15:00:59 -07:00
toddouska
a0a4386504 fix alpn example client merge command options 2015-10-13 15:00:53 -07:00
John Safranek
1359674fa7 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-10-13 14:52:20 -07:00
John Safranek
c0210491d9 don't try to defragment handshake messages outside the handshake 2015-10-13 14:21:39 -07:00
toddouska
dfc733a304 switch example client max fragment arg to -F to make -L open on both client and server 2015-10-13 14:13:12 -07:00
David Garske
67861bb222 Added crypto hardware mutex capabilities to wolfcrypt/wc_port. Added optional define "WOLFSSL_CRYPT_HW_MUTEX" to override use of hardware mutex. Enabled hardware mutex protection for Freescale MMCAU. Cleanup of the AES FREESCALE_MMCAU implementation to use wc_AesEncrypt/wc_AesDecrypt wrappers. Fixes #154. 2015-10-13 12:36:24 -07:00
Ludovic FLAMENT
10f5154389 ALPN : add option to continue in case of client/server protocol mismatch (like OpenSSL) 2015-10-13 09:38:40 +02:00
toddouska
8595890c51 change sniffer decode data to pointer to pointer 2015-10-12 18:10:24 -07:00
toddouska
3a0e25637e Merge branch 'mdk5-update' 2015-10-12 09:33:10 -07:00
Jacob Barthelmeh
c7264ff6d7 enable ecc with stunnel 2015-10-12 09:25:54 -06:00
John Safranek
2840fb47ef fix bounds check of handshake messages in TLS 2015-10-11 21:32:13 -07:00
toddouska
d18339f5f7 Merge pull request #162 from kaleb-himes/master
Modified scope for ChangeDirToRoot
2015-10-10 09:32:56 -07:00
kaleb-himes
7364884a69 Modified scope for ChangeDirToRoot 2015-10-09 22:04:41 -06:00
toddouska
ea1040cfe4 Merge branch 'fix-asn' 2015-10-09 17:00:48 -07:00
toddouska
92c222798e Merge branch 'master' of https://github.com/kaleb-himes/wolfssl into fix-asn 2015-10-09 16:56:53 -07:00
kaleb-himes
91e7d433f8 expected_configure test fixes. Squash for review.
fix for --enable-certservice --disable-md5

fix for --disable-md5 --enable-fortress

update macros to reflect referencing code logic for --disable-asn fix
2015-10-09 16:05:36 -06:00
toddouska
cf605f32dd Merge branch 'MDK5-3.6.9' of https://github.com/kojo1/wolfssl into mdk5-update 2015-10-09 10:39:15 -07:00
David Garske
6e61a095c7 Added new Xcode project for test suite. Added Xcode workspace file. Added library support for iOS and OS X targets. Updated project files to Xcode 7. Updated README. Added shared user_settings.h. Cleanup of the test.h "ChangeDirBack" function. Cleanup of duplicate ChangeDirBack() code in testsuite.c and adjusted for new Xcode build location. 2015-10-09 10:25:40 -07:00
Chris Conlon
7e5be2f313 fix resource cleanup in testsuite and wolfcrypt test 2015-10-09 10:57:55 -06:00
Ludovic FLAMENT
266936db93 fix warning on Windows 2015-10-09 16:00:53 +02:00
Ludovic FLAMENT
826034315e Merge branch 'master' of https://github.com/wolfssl/wolfssl 2015-10-09 15:23:41 +02:00
Ludovic FLAMENT
bf3b0a228d add support for Application-Layer Protocol Name (RFC 7301) in the TLS extensions 2015-10-09 15:18:41 +02:00
Takashi Kojo
26ca093c76 fixed errno with errno.h 2015-10-09 09:49:38 +09:00
Takashi Kojo
7e1d0ccb11 removed CyaSSL-Full project, replaced with wolfSSL-Full 2015-10-08 16:10:42 +09:00
Takashi Kojo
78ed5d96df echoclient for MDK fgets 2015-10-08 15:39:14 +09:00
Takashi Kojo
e242d3eea3 Change project name cyassl to wolfssl 2015-10-07 14:55:34 +09:00
Takashi Kojo
a80653f464 Eliminate local copies of examples/test/benchmark fro example projects 2015-10-07 14:52:18 +09:00
Takashi Kojo
504d3337de Catching up updated mMDK middleware packs 2015-10-07 14:46:11 +09:00
Takashi Kojo
cc2460b4a0 refactor options in test.h, eliminate cyassl_MDK_ARM.[ch] coupler functions, cert_data.[ch] 2015-10-07 14:39:23 +09:00
Takashi Kojo
cdc3d61b97 Refactoring WOLFSSL_MDK, MDK5 to KEIL_TCP_NET, KEIL_FS 2015-10-07 14:06:19 +09:00
John Safranek
9f6b07aec2 Merge branch 'defrag' 2015-10-06 20:21:06 -07:00
John Safranek
a7ae5155ce fix defragment of handshake messages in TLS 2015-10-06 20:18:55 -07:00
toddouska
6d49c308b7 require WOLFSSL_OPENSSL_TEST set for scripts/openssl.test to run, also disable in ipv6 test case because openssl s_server doesn't accept ipv6 2015-10-06 17:02:31 -07:00
David Garske
adb9d27e9e Fixed release distribution of the Rowley IDE example. Added section in README for required library functions. 2015-10-06 16:11:28 -07:00
David Garske
16ba3138a1 Added support for the Rowley CrossWorks for ARM IDE. Added new "WOLFSSL_ROWLEY_ARM" setting define. Added a sample solution (wolfssl.hzp) for building the WolfSSL library and sample test/benchmark applications. The sample applications are written for the Freescale Kinetis K64, but easily be customized for any Kinetis or further extended to support other ARM micro-controllers. 2015-10-06 10:45:46 -07:00
toddouska
3dda2965bd fix bash bracket string contains 2015-10-05 15:43:38 -07:00
toddouska
750302dd2e Merge branch 'script-openssl-test' 2015-10-05 15:34:38 -07:00
toddouska
236df9257b add openssl script suite test
switch to bash for 'read -ra <<<' for now
2015-10-05 15:33:37 -07:00
John Safranek
d6a5bfb53d Revert "revert defragment of handshake messages in TLS"
This reverts commit 6d21d328fb.
2015-10-05 15:31:39 -07:00
John Safranek
f06c08718c bump version for sniffer release 2015-10-05 10:14:07 -07:00
toddouska
b1c5f3b299 add show every cipher suite to examples/client 2015-10-02 16:26:20 -07:00
John Safranek
8c24fa1e66 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-10-02 15:59:15 -07:00
John Safranek
50d340c261 Merge branch 'sniffer-recovery' 2015-10-02 15:58:57 -07:00
John Safranek
0f6f404938 delete debugging breadcrumb 2015-10-02 15:55:40 -07:00
toddouska
ad51d4ba09 make sure fast invmod lowers result in too big case 2015-10-02 15:38:22 -07:00
John Safranek
9fe5401630 sniffer skips partially received record when fixing an ACK fault 2015-10-02 15:13:02 -07:00
John Safranek
1237b35bb8 add option to sniffer to try to restart decoding after an ACK fault 2015-10-02 11:26:45 -07:00
toddouska
27450aca7d increment explicit iv and zero nonce even on GCM/CCM failure 2015-10-02 11:24:32 -07:00
Jacob Barthelmeh
10276944d3 return value on AES CCM encrypt 2015-10-02 11:40:47 -06:00
toddouska
08771518a7 Merge branch 'freertos' 2015-10-02 10:28:10 -07:00
kaleb-himes
67e08e48c5 Github Issue #130 (XMALLOC_USER, NO_WOLFSSL_MEMORY) with FREERTOS 2015-10-02 10:56:19 -06:00
Jacob Barthelmeh
dd262fe939 fix on AES CCM nonce size 2015-10-01 17:42:03 -06:00
toddouska
8f32604542 Merge branch 'vxworks' 2015-09-29 11:59:29 -07:00
toddouska
3d110516f4 fixup WORKBENCH autoconf 2015-09-29 11:57:52 -07:00
toddouska
628a4e5ac2 Merge branch 'master' of https://github.com/lchristina26/wolfssl into vxworks 2015-09-29 11:55:06 -07:00
Leah
350fe922b9 Update README.md 2015-09-29 12:53:43 -06:00
Leah
914ed31ff2 Update README.md 2015-09-29 12:53:10 -06:00
Leah
389bbc94eb Update README.md 2015-09-29 12:51:03 -06:00
toddouska
f4250006b3 Merge branch 'vxworks' 2015-09-29 11:49:32 -07:00
lchristina26
46cd3a915b VxWorks README 2015-09-29 12:49:24 -06:00
toddouska
208f0eeb8e fix trailing whitespace 2015-09-29 11:48:46 -07:00
toddouska
799dfadf44 Merge branch 'master' of https://github.com/lchristina26/wolfssl into vxworks 2015-09-29 11:46:18 -07:00
lchristina26
7c9490844a fix formatting for vxworks commits 2015-09-29 12:22:03 -06:00
lchristina26
3c2712da31 vxworks compatibility additions 2015-09-29 12:12:35 -06:00
toddouska
d94321ecfb Merge branch 'freertos-tcp' 2015-09-28 16:16:14 -07:00
toddouska
b403036c77 Merge branch 'FreeRTOS_TCP' of https://github.com/kojo1/wolfssl into freertos-tcp 2015-09-28 16:13:21 -07:00
toddouska
77b1649638 Merge branch 'idea' 2015-09-28 15:25:43 -07:00
toddouska
28912621ec switch idea invmod too big to subtraction 2015-09-28 15:24:32 -07:00
toddouska
292e05dc75 switch memset / memcpy to XMEM in src and wolfcrypt/src proper 2015-09-28 11:37:00 -07:00
toddouska
a8b5c57dd2 make sure external tests have a valid cipher 2015-09-28 09:47:59 -07:00
toddouska
cab37ef24e Merge https://github.com/lfcrypto/wolfssl into idea 2015-09-28 09:32:55 -07:00
Ludovic FLAMENT
c7193672a5 fix IDEA modular inverse, add CBC tests with random values 2015-09-27 15:05:01 +02:00
Takashi Kojo
0a530c1b70 #pragma worning for Visual Studio 2015-09-26 08:49:03 +09:00
Takashi Kojo
f450ac0684 settings.h: GenSeed for test only option 2015-09-26 08:03:49 +09:00
toddouska
ab269b277e Merge branch 'master' into idea 2015-09-25 15:48:00 -07:00
toddouska
8c01c8d8e1 Merge branch 'master' of https://github.com/lfcrypto/wolfssl into idea 2015-09-25 15:42:31 -07:00
toddouska
ac79effa42 Merge branch 'ca-continue' 2015-09-25 15:40:04 -07:00
Ludovic FLAMENT
71576aef14 fix bad computed values 2015-09-25 23:52:08 +02:00
toddouska
3451ab2f5d Merge branch 'CA_continue' of https://github.com/NickolasLapp/wolfssl into ca-continue 2015-09-25 14:18:16 -07:00
Takashi Kojo
0c95a5e940 Adding FreeRTOS TCP support, FREERTOS_TCP option 2015-09-25 10:51:35 +09:00
Ludovic FLAMENT
ae6b4be135 fix idea_mult
move reg and tmp buffer to word32
2015-09-24 22:55:11 +02:00
toddouska
42d94a0f7f wolfssl.com now requires ECDHE or static RSA 2015-09-24 12:19:38 -07:00
toddouska
465622d4e0 wolfssl.com now uses old chacha-poly, detect for external test 2015-09-24 12:13:01 -07:00
Nickolas Lapp
755e844f05 CA parsing to continue after failure when possible 2015-09-24 11:14:07 -06:00
Chris Conlon
edc9a24681 fix hard tabs in icerts/1024/include.am 2015-09-24 10:03:27 -06:00
Chris Conlon
86bdeaf490 add new 1024 certs/keys to include.am 2015-09-24 10:00:32 -06:00
Ludovic FLAMENT
86d74efc37 return IdeaCbc{Encrypt/Decrypt} error code 2015-09-24 08:13:43 +02:00
toddouska
9848701dab make sure options.h captures user CFLAGS now too 2015-09-23 16:27:48 -07:00
toddouska
dc1baabd27 update wolfssl website ca 2015-09-23 16:19:55 -07:00
toddouska
d669fc28c2 add idea benchmark, cleanup 2015-09-23 14:42:48 -07:00
Chris Conlon
aa3780f6b0 add example 1024-bit server/CA certs and keys for testing 2015-09-23 13:37:34 -06:00
toddouska
c4e1bdcb29 Merge branch 'master' of https://github.com/lfcrypto/wolfssl into idea 2015-09-23 12:03:58 -07:00
toddouska
2ded079e95 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-09-23 11:21:38 -07:00
toddouska
7393b0eea0 allow user to free x509 object in static case (no op) 2015-09-23 11:20:40 -07:00
toddouska
31439e2baa remove unneeded tmp from plain DES cbc decrypt 2015-09-23 11:01:22 -07:00
Ludovic FLAMENT
f68400da40 add IDEA cipher (ECB and CBC mode)
add support of SSL_RSA_WITH_IDEA_CBC_SHA cipher suite (SSLv3, TLS v1.0 and TLSv1.1)
2015-09-23 16:16:39 +02:00
Chris Conlon
207859cde8 fix typos in README, ssl.c 2015-09-22 15:40:46 -06:00
John Safranek
2c87cfa983 initialize CFLAGS in configure as empty, remove erasing it when hardening CFLAGS 2015-09-17 16:36:53 -07:00
toddouska
8ba207e477 Release 3.6.8 prep 2015-09-16 14:57:43 -07:00
Jacob Barthelmeh
6d21d328fb revert defragment of handshake messages in TLS 2015-09-16 11:57:58 -06:00
John Safranek
329e6a6207 update the example server and echoserver to correctly generate the DTLS cookie 2015-09-15 17:23:52 -07:00
Jacob Barthelmeh
578ea44e1e check on return values of QSH 2015-09-15 17:46:45 -06:00
toddouska
764fadeb3b add sanity checks to internal RsaVerifySign inputs 2015-09-15 16:16:04 -07:00
toddouska
e0bdaf8146 Merge pull request #138 from kaleb-himes/VS_fix
fix for sniffer link error in vcproj
2015-09-15 14:40:25 -07:00
kaleb-himes
7858d412b9 fix for sniffer link error in vcproj 2015-09-15 15:34:47 -06:00
toddouska
906cc84f94 Merge pull request #137 from kaleb-himes/VS_fix
fix link error in sniffer
2015-09-15 14:07:10 -07:00
kaleb-himes
2a3863058f fix link error in sniffer 2015-09-15 14:37:27 -06:00
toddouska
797bcb6340 Fix Visual Studio warning/errors 2015-09-15 12:13:11 -07:00
toddouska
cdacb50336 Merge pull request #136 from NickolasLapp/master
Fix GCC Compiler warning, fix stunnel naming conflict
2015-09-14 18:56:06 -07:00
toddouska
9bdcd59338 fix dtls cookie leak 2015-09-14 17:13:16 -07:00
Nickolas Lapp
d70e0422a7 Fix naming conflict in stunnel psk_XXX_callback 2015-09-14 18:00:38 -06:00
Nickolas Lapp
274be55679 Fix GCC compiler warning 2015-09-14 17:57:24 -06:00
John Safranek
9ceb89b114 Merge branch 'dtls-cookie' 2015-09-14 16:13:49 -07:00
John Safranek
b62e5d57fe 1. improved DTLS cookie generation, uses HMAC and parts of Client Hello
message
2. add function to set the cookie Hmac key
3. removed server state for hello verify message
2015-09-14 16:05:30 -07:00
toddouska
98603b1547 fix +keygen +dsa +opensslextra -filesystem build 2015-09-14 14:18:25 -07:00
toddouska
097250755a Merge branch 'ludovic' 2015-09-14 13:30:10 -07:00
toddouska
91fdc67571 fix cert_ext statics not used with sep 2015-09-14 13:25:15 -07:00
toddouska
de04565c1e fix cert_ext test memory leak 2015-09-14 13:15:53 -07:00
toddouska
7391fc7e89 Merge https://github.com/lfcrypto/wolfssl into ludovic 2015-09-14 13:01:53 -07:00
toddouska
d8905a0110 move XSTRTOK to STRING_USER where it belongs 2015-09-14 13:00:26 -07:00
Ludovic FLAMENT
10165e966c remove OPENSSL_EXTRA requirement 2015-09-14 21:14:01 +02:00
Ludovic FLAMENT
0ecd6435e9 remove CERT_EXT from enable-bump
cortex test are only done if openssl extra is set
2015-09-14 18:45:14 +02:00
Ludovic FLAMENT
08d1f33d30 remove snprintf
use strtok thread safe version
add output size for sanity checks in some functions
2015-09-12 23:17:53 +02:00
toddouska
de64092a70 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-09-11 15:53:26 -07:00
toddouska
dbe08087e9 Merge branch 'ludovic' 2015-09-11 15:52:44 -07:00
toddouska
989f5ffb24 handle gmtime failures 2015-09-11 15:49:55 -07:00
toddouska
29270d88a4 remove another stdio.h assumption, breaks NO_FILESYSTEM 2015-09-11 15:13:47 -07:00
toddouska
c0f15b9326 DEBUG_WOLFSSL can't assume C standard headers, fix 2015-09-11 14:12:27 -07:00
toddouska
088467d312 fix autoconf with new certext files 2015-09-11 14:10:11 -07:00
toddouska
5654d4beee fix no_filesystem with certext 2015-09-11 14:04:40 -07:00
toddouska
21cf0e437e add --enable-cryptonly build option 2015-09-10 16:24:25 -07:00
John Safranek
a53d05c8bd updated sniffer statistics for missed sessions and reassembly buffer usage 2015-09-10 11:06:48 -07:00
toddouska
4785cbf616 fix opensslextra with debug without filesystem 2015-09-09 12:47:45 -07:00
toddouska
b6b385fe11 fix opensslextra with no filesystem 2015-09-09 12:38:28 -07:00
toddouska
80c5fecdb2 user CA adds use same policy as Context Verify for verification 2015-09-09 12:19:53 -07:00
toddouska
5bbcda3c79 add TLS signature fault checks indpendent of build options, plugins, callbacks, etc 2015-09-09 09:59:10 -07:00
toddouska
108679970a allow cert_ext to work w/o openssl extra 2015-09-08 16:44:13 -07:00
toddouska
2f70f27adc Merge branch 'master' of https://github.com/lfcrypto/wolfssl into ludovic 2015-09-08 14:46:53 -07:00
toddouska
7e2906de52 add new sniffer APIs, framework 2015-09-08 14:31:32 -07:00
Jacob Barthelmeh
10ad789c6f set inital value in NTRU rsa_test 2015-09-08 10:27:44 -06:00
Ludovic FLAMENT
25f24ed34f fix to build on Fedora 32bits and Windows 2015-09-08 08:49:29 +02:00
Ludovic FLAMENT
b685dfb2e7 Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-09-07 10:23:46 +02:00
Ludovic FLAMENT
d2ea6f7ef0 Add support for :
- PEM public key loading
  - set/get KeyUsage in CSR and X.509
  - set/get SKID in CSR and X.509
  - set/get AKID in X.509
  - set/get two Certificate Policies OID in X.509
2015-09-07 09:51:21 +02:00
toddouska
6041b117d6 fix fips-check freertos help string 2015-09-04 11:05:53 -07:00
John Safranek
58a36566cb allow for DTLS1.0 version record headers for client hello and hello verify 2015-09-03 15:35:01 -07:00
John Safranek
6dd85815bf added freertos build to fips-check script 2015-09-03 14:05:09 -07:00
Moisés Guimarães
316302cec3 fixes SRP documentation. 2015-09-03 12:21:22 -03:00
Moisés Guimarães
12bf9b4430 fixes conflict with reserver names used as variable names;
adds NOT_COMPILED_IN error when trying to use SRP with a hash not compiled in.
2015-09-03 12:06:56 -03:00
John Safranek
c34082b7ba updated fips-check script with proper win versions 2015-09-01 17:57:37 -07:00
Takashi Kojo
aaaebf6213 pkcs7 rolling back static values to auto 2015-09-02 08:59:04 +09:00
Chris Conlon
be5ac590b7 Freescale: Add KSDK FreeRTOS build, using fastmath 2015-09-01 15:37:11 -06:00
toddouska
e604ca1d3c Merge branch 'kojo-mdk5' 2015-09-01 13:35:47 -07:00
toddouska
ebea6145f6 change generice define to more specific for pkcs7 digest size 2015-09-01 13:33:26 -07:00
toddouska
31500d0d12 Merge branch 'MDK5' of https://github.com/kojo1/wolfssl into kojo-mdk5 2015-09-01 11:35:58 -07:00
toddouska
05bef43c1e bump dev version 2015-09-01 11:31:46 -07:00
Takashi Kojo
3b468bc1ef internal.c: declaration after exection statements 2015-09-01 09:40:08 +09:00
Takashi Kojo
efb06e2559 rolling back internal.c for master conflict 2015-09-01 09:29:44 +09:00
toddouska
928d2b7caa add build optional skip crl next date if missing 2015-08-31 17:02:15 -07:00
toddouska
a56a8a22e5 add idrect dev time 2015-08-31 15:02:41 -07:00
toddouska
6969453d06 allow CRL with NO_FILESYSTEM 2015-08-31 14:57:23 -07:00
toddouska
553fc283c9 add Buffer Load CRL 2015-08-31 14:23:50 -07:00
toddouska
f8445193a4 add idirect generate seed 2015-08-31 13:55:56 -07:00
toddouska
1368ae1fb1 add SHA512 signature creation 2015-08-31 13:51:52 -07:00
toddouska
756cff4cb4 add Rsa Public Key To Der, non FIPS mode 2015-08-31 13:29:22 -07:00
toddouska
cf38d1c022 detect SetSSL_CTX requirements and error out early 2015-08-31 11:57:30 -07:00
Takashi Kojo
2f3b7d3567 mdk portability, fixed declaration after executing statements 2015-08-30 13:38:52 +09:00
Takashi Kojo
18383d286a fixed uITRON, uTKernel option 2015-08-30 10:25:09 +09:00
Takashi Kojo
dc68832dba TIRTOS Semaphore_create error check 2015-08-30 08:36:33 +09:00
Takashi Kojo
122b2e9753 pkcs7: rolling back to static values 2015-08-29 22:02:23 +09:00
Takashi Kojo
f5ee6d616c Merge remote-tracking branch 'origin/MDK5' into MDK5 2015-08-29 21:24:44 +09:00
Takashi Kojo
cf80a6f639 pkcs7: avoid initial value of pointer to auto value for embedded compilers 2015-08-29 21:22:30 +09:00
Takashi Kojo
572a8cfc11 hmac.c: fixed warning, statement is unreachable 2015-08-29 18:04:57 +09:00
Takashi Kojo
6ff9f96809 inline to INLINE 2015-08-29 14:07:55 +09:00
Takashi Kojo
539bc81682 blake2b: declaration after execution statements, for embedded compiler 2015-08-29 12:30:40 +09:00
Takashi Kojo
2a141f6a82 ed25519: fixed initial data to auto values for embedded compilers 2015-08-29 12:08:52 +09:00
Takashi Kojo
df2216d092 Fixed file access mode 2015-08-29 11:32:30 +09:00
Takashi Kojo
e459bb2e23 Fixed file access mode 2015-08-29 11:08:07 +09:00
toddouska
1ba1acb8f7 Merge branch 'nlapp' 2015-08-28 16:08:16 -07:00
Nickolas Lapp
10b2cf4f2f turn on ecc with Stunnel 2015-08-27 17:44:55 -06:00
Nickolas Lapp
42428f10ad Remove uneccessary defines from compat. layer 2015-08-27 13:27:33 -06:00
Nickolas Lapp
d336268caa Turns on PSK when compiling for stunnel 2015-08-27 12:57:43 -06:00
Ada Lovelace
565f2ce1d7 Stunnel with psk compiles against 2015-08-27 12:57:43 -06:00
Nickolas Lapp
0b72b28b13 reorganize InitSSL. Rename forcekeep->cacheOnly. Free instead of decrement 2015-08-27 12:57:43 -06:00
Nickolas Lapp
122b94ea6e Stunnel needs sni and tlsext 2015-08-27 12:57:43 -06:00
Nickolas Lapp
1787e04b23 Enum should be int, not byte 2015-08-27 12:57:43 -06:00
Nickolas Lapp
90ad5336fc Fix uninitialized warning 2015-08-27 12:57:43 -06:00
Nickolas Lapp
900edc04e5 Adding sni to mimic openssl functionality 2015-08-27 12:57:43 -06:00
toddouska
30067d4f59 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-08-27 11:36:43 -07:00
toddouska
5e26a5c8fc fix alt_ecc_size exptmod with negative numbers 2015-08-27 11:18:06 -07:00
Chris Conlon
5e95740d93 Freescale: Add KSDK Bare Metal build, TRNG support 2015-08-27 11:45:40 -06:00
toddouska
1ee27f7a04 Merge branch 'ecc-keygen' 2015-08-27 10:32:21 -07:00
toddouska
3814871f71 merge pull request #82, suite b ecc key-gen 2015-08-27 10:31:22 -07:00
toddouska
3c614b5ba7 manual merge pull request #83, ALT_ECC_SIZE fix 2015-08-27 10:18:00 -07:00
toddouska
e8c17ed2bb fix defrag member layout, add comments 2015-08-26 12:13:07 -07:00
toddouska
f2db01bef2 fix defrag memory errors 2015-08-26 12:10:10 -07:00
John Safranek
cc216d5079 InitSuites to disallow stream ciphers for DTLS sessions 2015-08-26 14:16:13 -04:00
John Safranek
5a1a076131 update README(.md) typo 2015-08-26 12:27:28 -04:00
John Safranek
7d067dfec6 defragment the handshake messages in TLS 2015-08-25 21:09:19 -04:00
toddouska
cb51432dc8 update README.md ia32 register note 2015-08-25 16:11:26 -07:00
toddouska
e02f177c10 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-08-25 14:58:23 -07:00
toddouska
9ee88b54f8 add ia32 fastmath register note about --without-pic and fPIE 2015-08-25 14:58:05 -07:00
John Safranek
bd65b06459 remove name decorator from wolfcrypt error reporting function prototypes 2015-08-21 21:49:43 -07:00
John Safranek
5ce39e147d clean up sniffer packet overlap issue 2015-08-20 18:54:16 -07:00
John Safranek
a93aa8972e fix sniffer crash with reassembly processing 2015-08-20 18:54:16 -07:00
toddouska
a47af476d1 add REAMDE note about static cipher suites disabled and compiler error detection 2015-08-20 17:11:00 -07:00
Ludovic FLAMENT
d49499df4c Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-08-20 13:40:12 +02:00
Ludovic FLAMENT
66e91beb2d Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-08-20 13:22:30 +02:00
toddouska
2f1836d985 fix snifftest bsd build 2015-08-19 16:52:16 -07:00
toddouska
dfb8d34d0b 3.6.6 release notes 2015-08-19 14:18:48 -07:00
John Safranek
b3aa98147a fix description text for enable-sslv3 configure option 2015-08-19 12:29:20 -07:00
Ludovic FLAMENT
c6ef29ac4c Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-08-19 08:18:05 +02:00
Ludovic FLAMENT
33595a0b3c Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-08-19 08:08:49 +02:00
John Safranek
b0d90918f9 fix issue between certificate fragmentation and secure renegotiation 2015-08-18 21:00:17 -07:00
toddouska
c1d663f22d Merge branch 'kojo-ti' 2015-08-18 12:32:25 -07:00
toddouska
3b9ec2c119 add extern C to hash.h 2015-08-18 12:31:34 -07:00
toddouska
15995d1b2c Merge branch 'TI_hash' of https://github.com/kojo1/wolfssl into kojo-ti 2015-08-18 12:27:57 -07:00
Takashi Kojo
82aaff9e43 Eliminate hash free in DoRound with non-TI case 2015-08-18 11:22:51 +09:00
John Safranek
5cffea7aac clean static analysis report in cert fragmentation 2015-08-17 17:27:29 -07:00
toddouska
049a4c6460 fix C++ mode warnings 2015-08-17 16:47:39 -07:00
toddouska
c812379924 fix shadow decl in DsaKeyToDer() 2015-08-17 14:39:40 -07:00
Takashi Kojo
6376736129 HashFree for TI hash memory leak 2015-08-15 16:51:23 +09:00
John Safranek
4fb0519b37 clean up GCC and VS build warnings 2015-08-14 15:06:12 -07:00
toddouska
09b2da799f Merge pull request #125 from kojo1/MDK4
MDK4 name change
2015-08-14 14:59:25 -07:00
Chris Conlon
34ac1a33f3 Freescale: Add support for KSDK (FREESCALE_KSDK_MQX) 2015-08-14 15:21:23 -06:00
toddouska
a4cbc3b943 fix google external test w/o ecdhe 2015-08-14 12:58:00 -07:00
toddouska
8374a461d0 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-08-14 12:50:14 -07:00
toddouska
7fa4302a80 disable static PSK cipher suites by default 2015-08-14 12:49:30 -07:00
John Safranek
d12308a053 SendCertificate fragments the message based on max_fragment setting for TLS and DTLS. 2015-08-14 11:06:42 -07:00
Jacob Barthelmeh
0f9f4ea7e0 add macro blocks to make it easier on embedded devices and fix declaration after executable code 2015-08-14 09:58:44 -06:00
Takashi Kojo
e6ab7de923 TI hardware hash driver memory leak in dummy rounds 2015-08-14 07:44:13 +09:00
John Safranek
8cc9c62911 skip past the pad and mac when skipping a finished message in DTLS 2015-08-13 14:29:56 -07:00
toddouska
b5ac17539e Merge pull request #127 from kaleb-himes/master
Dynamic Libraries for windows-fips project
2015-08-13 12:46:50 -07:00
toddouska
fb35dc61db disable static rsa cipher suites in non max strength build by default 2015-08-13 11:05:07 -07:00
unknown
6e2dcdbb73 reset to vs 2010 toolset in .sln file 2015-08-13 12:04:06 -06:00
unknown
e9f63f0e17 Release-32 working 2015-08-13 12:03:42 -06:00
Ludovic FLAMENT
838a873cf1 Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-08-13 10:20:47 +02:00
toddouska
4eafff0c21 Merge pull request #126 from NickolasLapp/scan_build_errs
Changes to remove scan-build warnings when compiling with full build
2015-08-12 16:42:47 -07:00
toddouska
deb5d8ab08 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-08-12 16:41:41 -07:00
toddouska
46e7e9acf9 disable SSLv3 by default 2015-08-12 16:39:13 -07:00
Jacob Barthelmeh
f6c5231e68 fix shadowed declaration on power pc (shadowed asn.h Oid_Types enum) 2015-08-12 14:30:12 -06:00
Nickolas Lapp
910fd79a1d Changes to remove scan-build warnings when compiling with full build 2015-08-12 13:58:23 -06:00
Takashi Kojo
2b35a8242e MKD file reference path 2015-08-12 19:49:30 +09:00
Takashi Kojo
3af082de39 Remove unused file 2015-08-12 17:58:49 +09:00
Takashi Kojo
9af596dfff add config files 2015-08-12 17:55:18 +09:00
Takashi Kojo
6b1e351d4d Merge branch 'master' into MDK4 2015-08-12 17:30:47 +09:00
Takashi Kojo
30f6bc1e27 MDK4, wolfSSL name change 2015-08-12 16:45:40 +09:00
unknown
b0bc9e0f0d Remove hard tabs, update DLL-x64-Release 2015-08-11 15:14:19 -06:00
toddouska
ffa75d40e0 disable static dh cipher suites in non max strength build by default 2015-08-11 12:25:40 -07:00
toddouska
4cf78a2dab Merge pull request #124 from jay/fix-mixed-declarations
fix mixed declarations by moving them to their block start
2015-08-10 14:31:05 -07:00
Jacob Barthelmeh
241e375b34 add wc_encrypt and hash to the MYSQL cmake 2015-08-10 13:30:57 -06:00
John Safranek
d367f7ac93 Add wc_encrypt.c to the iOS Xcode project files. 2015-08-10 11:59:19 -07:00
unknown
c4cbcff6e0 remove hard tabs 2015-08-10 10:27:24 -06:00
unknown
51b9d2bf9d DLL-Debug-x64 working 2015-08-10 10:25:00 -06:00
Chris Conlon
4b74e96542 remove stdio.h from dsa.c 2015-08-10 09:34:16 -06:00
Jay Satiro
e179da07d0 fix mixed declarations by moving them to their block start
In Visual Studio <= 2012 C99 mixed declarations aren't supported.
2015-08-10 01:54:25 -04:00
John Safranek
106abb873f skip the sanity check on a duplicate change cipher spec message in DTLS mode, they are allowed 2015-08-08 23:57:02 -07:00
Takashi Kojo
e16ff73273 Added wc_encrypt.c and other *.c files. 2015-08-08 10:12:05 +09:00
John Safranek
8b0d7cc8da don't let sniffer try to parse handshake messages after the handshake has completed, new error for secure renegotiation not supported 2015-08-07 15:48:04 -07:00
Chris Conlon
0cd893a51b Freescale: Use new I/O where applicable 2015-08-07 16:22:31 -06:00
Chris Conlon
a80777179b update MPLABX README 2015-08-07 14:36:47 -06:00
Chris Conlon
5d40c5f566 Rename RNG to WC_RNG for Freescale, add NO_OLD_RNGNAME define to completely remove RNG type usage 2015-08-07 11:53:19 -06:00
toddouska
ca41d52f68 Merge pull request #123 from lchristina26/master
move MBED GenerateSeed() due to duplicated code
2015-08-07 09:52:19 -07:00
toddouska
490caf87c3 Merge pull request #122 from kaleb-himes/no-md5-with-hc128
fix for test failure with --enable-hc128 --disable-md5
2015-08-07 09:52:07 -07:00
toddouska
d3c8ff3488 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-08-07 09:42:07 -07:00
toddouska
50fd2538ff Merge branch 'srp' 2015-08-07 09:41:44 -07:00
toddouska
0a037d39ff fix srp request; forcezero, check mp_init(), no leaks 2015-08-07 09:37:22 -07:00
lchristina26
9397b9e10f move MBED GenerateSeed() due to duplicated code 2015-08-06 16:40:36 -06:00
kaleb-himes
08111ab59f fix for test failure with --enable-hc128 --disable-md5 2015-08-06 10:43:55 -06:00
Chris Conlon
716ab20afa Update MPLABX project files, define WOLFSSL_HAVE_MIN in MICROCHIP_PIC32 2015-08-06 10:25:47 -06:00
Jacob Barthelmeh
590f3e1ca0 Merge pull request #113 from lfcrypto/wolfssl
add check of ret value
2015-08-06 09:01:12 -07:00
Ludovic FLAMENT
aa0852bf71 Fix Curve25519 test 2015-08-06 08:51:41 -07:00
Ludovic FLAMENT
d050c10581 add support for curve 25519 and Ed25519 in OpenSSH
refactor curve25519 and Ed25519 code
fix warning in PEM_xxx_mem_xxx functions
2015-08-06 08:51:41 -07:00
unknown
865d88ce3e rewind tool version 2015-08-05 15:55:05 -06:00
unknown
42a50d2caf Release x64 tested and working 2015-08-05 15:41:46 -06:00
unknown
f45ef26977 DLL-x64 and Debug-x64 removed x86 constraint 2015-08-05 11:28:07 -06:00
unknown
92b725dfd7 DLL-Debug-32 tested and linking properly 2015-08-05 11:16:21 -06:00
toddouska
ba83b54616 Merge branch 'master' into srp 2015-08-04 15:49:04 -07:00
toddouska
f30a11f5ce Merge branch 'kaleb' 2015-08-04 15:33:05 -07:00
toddouska
ae397a0b7c Merge branch 'fix_logic' of https://github.com/kaleb-himes/wolfssl into kaleb 2015-08-04 15:30:27 -07:00
toddouska
ca66b59815 Merge pull request #120 from kaleb-himes/update_window_projects
updated existing projects to include wc_encrypt.c
2015-08-04 15:28:18 -07:00
kaleb-himes
b15e5b1747 updated existing projects to include wc_encrypt.c 2015-08-04 15:31:40 -06:00
kaleb-himes
121a24ba15 update logic for ECC FASTMATH KEY-GEN and COMP-KEY 2015-08-04 15:11:01 -06:00
Moisés Guimarães
114e3edc27 add srp example to test.c 2015-08-04 16:02:44 -03:00
Moisés Guimarães
690cb14746 makes sure random values are safe. 2015-08-04 15:31:18 -03:00
Moisés Guimarães
12b8445153 adds key generation function callback option. 2015-08-04 13:36:58 -03:00
Moisés Guimarães
f31c32bea2 adds docs using doxygen style. 2015-08-04 01:07:24 -03:00
Moisés Guimarães
1d99bd3339 removes u from srp struct. 2015-08-04 01:07:24 -03:00
Moisés Guimarães
53224281d2 adds proof getter and verifier for both sides. 2015-08-04 01:07:24 -03:00
Moisés Guimarães
490d063dec adds key computation.
removes unnecessary fields from the srp struct.
2015-08-04 01:07:24 -03:00
Moisés Guimarães
ba0c75011b adds secret computation. 2015-08-04 01:07:24 -03:00
Moisés Guimarães
6ee788277f adds tests to SrpSetPassword(), SrpSetVerifier(), SrpGetVerifier();
adds SrpGenPublic() and SrpSetPrivate() with unit tests;
fixes k with left pad at g;
adds new error SRP_CALL_ORDER_E to force the functions to be called in the right order.
2015-08-04 01:07:24 -03:00
Moisés Guimarães
6d5efccc55 finishes SrpSetPassword(), SrpSetVerifier(), SrpGetVerifier();
updates client_proof during SrpSetParams();
2015-08-04 01:07:24 -03:00
Moisés Guimarães
8b23b86659 Adds hash type directly inside SrpHash and removes temp hash from Srp struct. 2015-08-04 01:07:24 -03:00
Moisés Guimarães
119dd0250e fixes field types in SRP structure;
adds new memory allocation type (DYNAMIC_TYPE_SRP);
improves wc_SrpInit;
adds wc_SrpTerm(), wc_SrpSetUsername(), wc_SrpSetParams(), wc_SrpSetPassword();
2015-08-04 01:07:24 -03:00
Moisés Guimarães
dfa956d227 adds wc_SrpInit() with unit tests. 2015-08-04 01:07:24 -03:00
Moisés Guimarães
6d7b5bd2f8 adds srp files to build process. 2015-08-04 01:07:24 -03:00
Moisés Guimarães
daf01977a1 adds SRP client and server structures. 2015-08-04 01:07:24 -03:00
toddouska
08959624f2 fix ed25519 with external hash functions 2015-08-03 15:30:07 -07:00
toddouska
b330bca4b7 Merge pull request #114 from lchristina26/master
updates to FREERTOS settings
2015-08-03 10:59:36 -07:00
toddouska
6c02a9acb7 Merge pull request #115 from kaleb-himes/master
re-format test-psk-no-id.conf add README
2015-08-03 10:56:42 -07:00
kaleb-himes
273a0dd4d5 re-format test-psk-no-id.conf add README 2015-08-03 11:04:18 -06:00
toddouska
ad39c6137c Merge branch 'kaleb' 2015-08-03 09:33:40 -07:00
toddouska
37ba6aeee7 fix psk no identify hint example logic 2015-08-03 09:32:51 -07:00
toddouska
5adda01e98 Merge https://github.com/kaleb-himes/wolfssl into kaleb 2015-08-03 09:19:45 -07:00
lchristina26
f8feb339fc updates to FREERTOS settings 2015-08-03 10:13:42 -06:00
Ludovic FLAMENT
281ba1c4c5 Fix Curve25519 test 2015-08-03 09:05:02 +02:00
Ludovic FLAMENT
409126a97c add support for curve 25519 and Ed25519 in OpenSSH
refactor curve25519 and Ed25519 code
fix warning in PEM_xxx_mem_xxx functions
2015-08-01 18:28:18 +02:00
kaleb-himes
303fb2bb62 Option for no PSK Id Hint and test cases
update comment file reference
2015-07-31 22:00:28 -06:00
toddouska
2ade35c65a expose have 128bit type to options flags 2015-07-31 16:43:59 -07:00
toddouska
3fb10301f6 fix build 267, case 743 blak2b w/o md5 2015-07-31 16:29:35 -07:00
toddouska
16b0120028 fix build 267, base 1361 fp ecc w/ no memory 2015-07-31 11:57:35 -07:00
toddouska
409b044ec7 fix build 267, case 1299 ocsp + iopool (no stdlib) 2015-07-31 11:44:09 -07:00
toddouska
c14398cb7a fix build 267 case 1197, pwdbases -des3 warning 2015-07-31 11:40:14 -07:00
toddouska
59e894d6a4 fix build 267 case 1044, dhe + psk w/o aes 2015-07-31 11:35:16 -07:00
toddouska
75b9d809b3 fix build 267 case 932, certgen w/o sha 2015-07-31 11:24:34 -07:00
toddouska
1470789ac6 fix build 483 with wc_encrypt 2015-07-31 11:13:05 -07:00
toddouska
342b19496d Merge branch 'master' of github.com:wolfssl/wolfssl 2015-07-30 16:46:27 -07:00
toddouska
cc604d23be fix psk no server hint sanity check 2015-07-30 16:45:31 -07:00
John Safranek
5d7388f879 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-07-30 16:38:06 -07:00
John Safranek
95db44def3 remove autogen clone of fips repo; pre-push runs fips-check if fips directory exists 2015-07-30 16:33:14 -07:00
toddouska
97853dc3c2 keep resume script from endless loop on bad startup 2015-07-30 16:31:14 -07:00
John Safranek
27371263b7 move variable declaration to beginning of block 2015-07-30 14:47:52 -07:00
John Safranek
bcaa8cde06 fix pre-push calling fips-check with unimplemented option 2015-07-30 14:32:16 -07:00
John Safranek
e1513c30d2 added a pre-push hook. move fips test to pre-push check 2015-07-30 14:24:45 -07:00
toddouska
2cbb30745e bump dev version 2015-07-30 12:59:17 -07:00
toddouska
78cc76b3cd move DES oneshot APIs out of des.[hc] 2015-07-30 12:51:33 -07:00
toddouska
011fdc1103 move AES oneshot calls out of aes.[hc] 2015-07-30 12:42:25 -07:00
toddouska
6d172fce32 hash.h should pull in types before checking defines 2015-07-29 14:40:57 -07:00
toddouska
12ffa1b778 fix small stack with hash changes 2015-07-29 10:43:54 -07:00
toddouska
b8fac462cd No oneshot Hash() in FIPS c files anymore 2015-07-28 16:55:58 -07:00
toddouska
e97a60c647 move wc_Sha512/384 Hash() outside of sha512.[hc] 2015-07-28 16:41:32 -07:00
toddouska
9d2b711796 add wc_Sha256Hash() outside of sha256.[hc] 2015-07-28 16:34:23 -07:00
toddouska
2f3b7b05ba move wc_ShaHash() outside of sha.[hc] 2015-07-28 16:30:10 -07:00
toddouska
480bab467d fix warning 2015-07-28 09:35:28 -07:00
toddouska
388d023df6 put rsa non public enums back into c file for FIPS 2015-07-28 09:29:47 -07:00
toddouska
8ff692b772 Merge pull request #109 from NickolasLapp/master
Fixed bug when getting PEM encoded sz of cert chain. Add idx check
2015-07-27 15:05:39 -07:00
toddouska
38fb8caec8 restore FIPS des3 build w/o opensslextra 2015-07-27 14:56:26 -07:00
Nickolas Lapp
b85637e06b Fixed bug when getting PEM encoded sz. Add idx check 2015-07-27 10:43:49 -06:00
toddouska
e363848ecc fix jenkins build #465 with kegen changes 2015-07-24 19:19:53 -07:00
toddouska
4ba57a609c Merge branch 'ludovic' 2015-07-24 15:39:54 -07:00
toddouska
0a975eaff9 fix valgrind warning mp_add_d 2015-07-24 15:34:56 -07:00
Nickolas Lapp
5780f4d5f7 stub notices. edited b64 encode size. err cert depth/sn 2015-07-24 16:30:16 -06:00
Chris Conlon
9038ea018a Freescale/RTCS fixes for io.c 2015-07-24 15:06:58 -06:00
toddouska
45ef61e46f fix warnings 2015-07-24 12:43:26 -07:00
toddouska
aaf7f63eef Merge https://github.com/lfcrypto/wolfssl into ludovic 2015-07-24 12:14:28 -07:00
Ludovic FLAMENT
9c2a85d9f6 fix compilation for 32 bits OS 2015-07-24 11:17:06 +02:00
Ludovic FLAMENT
78a936a4fd remove debug info
fix potential memory leaks
comments the size used
2015-07-24 10:58:17 +02:00
Ludovic FLAMENT
8d7d803e58 add wc_DerToPemEx to restore compatibility API with wc_DerToPem 2015-07-24 07:50:29 +02:00
kaleb-himes
bf4be3f02b comment updates only for crl-revoked.test 2015-07-23 21:54:52 -06:00
toddouska
ddb638d020 Merge branch 'crl-revoked' 2015-07-23 16:40:30 -07:00
toddouska
9f7209b484 add new certs to include.am 2015-07-23 16:37:37 -07:00
kaleb-himes
1a0a9de9c6 changes post review
crl-revoked dash compliant. revoked-cert has unique fields

new print statements
2015-07-23 17:05:25 -06:00
John Safranek
03a50c128a update WIN IDE readme 2015-07-23 15:27:46 -07:00
Ludovic FLAMENT
0054fe4a25 Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-07-23 14:37:58 +02:00
Ludovic FLAMENT
8951d72f03 Merge branch 'master' of https://github.com/wolfSSL/wolfssl
Fix DSA key generation
2015-07-23 13:24:20 +02:00
kaleb-himes
1bb76a54c9 Merge branch 'master' of https://github.com/kaleb-himes/wolfssl 2015-07-22 15:14:00 -06:00
Nickolas Lapp
f9def1431f Adding support for crl testing via make check.
includes modifying crl.pem/revoked
    Adding a revoked server cert/key pair.
    Adding a script to test with a revoked cert (scripts/crl.test)
2015-07-22 15:08:29 -06:00
toddouska
5fe7a1b89a have fastmath use negative error codes for consistent <0 error detection 2015-07-22 13:32:56 -07:00
John Safranek
4cdece20fb change SetCurve return type to int, as used 2015-07-22 11:52:42 -07:00
John Safranek
e1a2458bb4 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-07-22 11:25:47 -07:00
John Safranek
c169a113ae for Windows build, clean up warnings and a couple variable declarations 2015-07-22 11:20:45 -07:00
Nickolas Lapp
3732d31955 Fixed file cleanup in gencrls, finished support for crl.test update crls sign revoked cert 2015-07-22 10:37:24 -06:00
kaleb-himes
f73c6a5ea9 new crl test using server and client instead 2015-07-22 10:05:39 -06:00
kaleb-himes
d2de4719eb added way to gen revoked without running renewcerts 2015-07-22 09:31:23 -06:00
Ludovic FLAMENT
349edd40c2 Add support for OpenSSH ssh-keygen tools
refactor existing code
2015-07-22 14:18:07 +02:00
Nickolas Lapp
27202912e8 Adjusted gencrls and renewcerts to add a revoked server cert 2015-07-21 17:17:41 -06:00
Jacob Barthelmeh
e7dd5c4b8f add setting client cipher list 2015-07-21 16:55:42 -06:00
kaleb-himes
4743dfe813 add a uniquely, always revoked server-cert for testing 2015-07-21 15:35:24 -06:00
kaleb-himes
37211d4636 crl script initialize 2015-07-21 13:56:47 -06:00
toddouska
8499f816c6 fix potential resource leaks 2015-07-21 11:10:28 -07:00
toddouska
4916ae72bc custom release notes 2015-07-20 16:47:03 -07:00
toddouska
922df2cfb3 allow bigger rsa key gen w/o sanity check error on invmod() 2015-07-20 16:08:55 -07:00
toddouska
c50f6ba693 Merge pull request #105 from NickolasLapp/master
Changes to remove last warnings from Stunnel
2015-07-20 14:04:59 -07:00
Nickolas Lapp
03172818a1 Changes to remove last warnings from Stunnel 2015-07-20 14:37:57 -06:00
toddouska
a0b907f0b3 Merge pull request #104 from NickolasLapp/master
Fix stunnel warning
2015-07-20 08:13:08 -07:00
Jacob Barthelmeh
a4c7b8eb07 version number to use with Lighttpd compatibility 2015-07-17 18:19:36 -06:00
Nickolas Lapp
6d619ade13 Fix stunnel warning 2015-07-17 17:28:17 -06:00
toddouska
51f177fdb7 bump dev version 2015-07-17 15:41:51 -07:00
toddouska
2d021489b3 fix SetMinDhKey_Sz() implementation defines 2015-07-17 15:37:15 -07:00
toddouska
262f5f87cb remove auto timing resistant with stunnel 2015-07-17 14:52:03 -07:00
toddouska
be54b40d94 Merge pull request #102 from NickolasLapp/master
Configure options to allow stunnel to use fastmath
2015-07-17 14:50:19 -07:00
Nickolas Lapp
cb3873ea03 Configure options to allow stunnel to use fastmath 2015-07-17 15:05:04 -06:00
JacobBarthelmeh
7d44ed3989 Merge pull request #97 from jschanck-si/libntruencrypt
Use updated drbg ntru functions from stable libntruencrypt api
2015-07-17 14:18:27 -06:00
toddouska
bae8c6fd50 add openssh ./configure build 2015-07-17 09:14:58 -07:00
toddouska
d443c03dcc Merge pull request #101 from kaleb-himes/fortress_requires_aes
fortress relies on aes disallowed pair
2015-07-17 08:48:37 -07:00
kaleb-himes
11f1159e30 fortress relies on aes disallowed pair 2015-07-17 09:30:25 -06:00
toddouska
101aac5720 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-07-16 16:47:17 -07:00
toddouska
9b81e41856 merge pull request 96 2015-07-16 16:46:37 -07:00
John Safranek
5409c171e4 In wolfSSL_BN_mod_word, typecast error code to a unsigned output like in emulated function. 2015-07-16 16:38:48 -07:00
toddouska
a0a8a52f6c Merge branch '98' 2015-07-16 14:55:55 -07:00
toddouska
e61022b498 Merge https://github.com/lchristina26/wolfssl into 98 2015-07-16 14:52:57 -07:00
toddouska
9c7fd0b15e Merge pull request #99 from kaleb-himes/eccencrypt_without_aes
Ecc_encrypt + hkdf requires aes
2015-07-16 14:51:44 -07:00
kaleb-himes
e698c12530 ecc_encrypt + hkdf requires aes 2015-07-16 15:31:36 -06:00
kaleb-himes
85907397d3 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-07-16 15:15:55 -06:00
lchristina26
c6003c33bb fix disable filesystem errors 2015-07-16 14:19:11 -06:00
John M. Schanck
53fb9188e7 Use ntru functions from stable libntruencrypt api
ntru_crypto_external_drbg_instantiate has been renamed
to ntru_crypto_drbg_external_instantiate in the 1.0.0
release of libntruencrypt. Made various other small changes
to build against libntruencrypt.
2015-07-16 15:43:50 -04:00
toddouska
5a00e4b72b use full ivSz with ecc encrypt 2015-07-16 10:18:08 -07:00
toddouska
7f155d64d5 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-07-15 16:36:58 -07:00
toddouska
84a5087bd7 resume script cleans up /tmp ready file 2015-07-15 16:35:23 -07:00
John Safranek
8cb1949203 fix some build warnings from VS 2015-07-15 16:27:50 -07:00
toddouska
ffb73bc3d5 fix no newline in openssl/ecdsa.h 2015-07-15 16:25:49 -07:00
toddouska
8eaac3de47 fix clang redef 2015-07-15 15:01:48 -07:00
toddouska
c1dfa16f91 Merge pull request #95 from lchristina26/enable_mcapi_with_libz
New AES structure size increased, update mcapi context to encompass
2015-07-15 14:56:32 -07:00
kaleb-himes
bffecfbc2d New AES structure size increased, update mcapi context to encompass 2015-07-15 15:33:49 -06:00
toddouska
3ad3334bce Merge branch 'master' of github.com:wolfssl/wolfssl 2015-07-15 13:57:10 -07:00
toddouska
1c5eb291e8 Merge branch 'nick' 2015-07-15 13:56:56 -07:00
toddouska
0b3bc289ae fix enable stunnel help alignment 2015-07-15 13:44:09 -07:00
Jacob Barthelmeh
763e9370bf WOLFSSL_STUB log for debug message 2015-07-15 13:48:31 -06:00
toddouska
db932acca5 Merge https://github.com/NickolasLapp/wolfssl into nick 2015-07-15 11:05:06 -07:00
Chris Conlon
55677aa5ae fix BLAKE2b cyassl compat header includes 2015-07-15 11:56:14 -06:00
John Safranek
4b1e87f9d0 update the wolfSSL FIPS VS IDE project files and README 2015-07-14 21:17:20 -07:00
Nickolas Lapp
96cf16848c Stunnel Base Commit 2015-07-14 14:56:26 -06:00
Jacob Barthelmeh
7fba0d25f9 variable declaration location for VS and avoid empty struct 2015-07-14 14:33:00 -06:00
JacobBarthelmeh
67fd0ebbd4 wolfssl enter msgs on lighty stubs and create a new BN when given a null argument 2015-07-13 17:26:04 -06:00
kaleb-himes
bd81a3336f Merge branch 'master' of ssh://github.com/wolfSSL/wolfssl 2015-07-13 11:34:04 -06:00
kaleb-himes
1750fe698e Name change to LICENSING 2015-07-13 11:32:59 -06:00
Jacob Barthelmeh
df8b48cd0f NTRU suites from earlier code 2015-07-11 12:52:22 -06:00
toddouska
e6d8ab0d45 add enable lighty 2015-07-09 09:14:33 -06:00
toddouska
ea7f955bd4 Merge branch 'lighty' 2015-07-08 17:35:41 -06:00
toddouska
e41ebcf5d4 remove c++ comments, switch ASN1 string back to first spot 2015-07-08 17:33:15 -06:00
Ada Lovelace
1383a0f1b5 Uptodate wolfssl works with lighttpd-1.4.x (one warning), working on making lighttpd-1.4.35 work. 2015-07-08 16:39:52 -06:00
Jacob Barthelmeh
d68eb12ee6 use macros in TLSX Write with QSH 2015-07-07 22:10:26 -06:00
toddouska
dafb5a80e7 recommit invalid free w/o smallstack 2015-07-07 09:23:02 -07:00
Jacob Barthelmeh
14723b7e65 QSH (quantum-safe handshake) extension 2015-07-07 09:55:58 -06:00
toddouska
01da9aacb0 Merge branch 'ludovic' 2015-07-06 17:13:01 -07:00
toddouska
acdeb3d536 Merge https://github.com/lfcrypto/wolfssl into ludovic 2015-07-06 17:09:41 -07:00
Jacob Barthelmeh
304982a597 Big Endian System ChaCha20 counter, auto tests added for ChaCha20 counter 2015-07-06 15:29:53 -06:00
Ludovic FLAMENT
702dbcf570 align return code, coding style (tab-> space, line with 80 char), curve_idx validity 2015-07-05 20:10:43 +02:00
toddouska
88fa36e3c0 fix enable dsa w/o opensslextra or keygen 2015-07-03 20:53:55 -07:00
toddouska
1a853d277d fix opensslextra w/o ecc ssh 2015-07-03 09:58:42 -07:00
toddouska
9b0c1499c3 fix opensslextra w/ dsa additions 2015-07-03 09:53:48 -07:00
toddouska
e2689a0656 fix opensslextra small stack invalid free 2015-07-03 09:50:16 -07:00
toddouska
6355bb4daf remove C++ comments 2015-07-02 13:52:37 -07:00
toddouska
b183bdc009 fix ALT_ECC_SIZE in ssh mode 2015-07-02 13:48:58 -07:00
toddouska
d2f34c11d3 Merge branch 'master' into ssh 2015-07-01 16:37:33 -07:00
Moisés Guimarães
ca01cebd28 adds SNI abort option to turn SNI mandatory for WebSocket (RFC6455 page 17).
@see WOLFSSL_SNI_ABORT_ON_ABSENCE and the xxxSNI_SetOptions() functions for further details.
2015-07-01 19:21:18 -03:00
Moisés Guimarães
e121d01206 TLSX and SNI code maintenance:
* improves docs;
 * fixes indentation;
 * Extracts TLSX_New() from TLSX_Push();
 * Replaces TLSX_SNI_Append() with TLSX_SNI_New();
 * Adds missing STK_VALIDATE_REQUEST() in TLSX_WriteRequest();
 * Moves TLSX_SetResponse() to the right position inside TLSX_SNI_Parse().
2015-07-01 19:11:13 -03:00
toddouska
74245dcc1c bump dev version 2015-07-01 14:43:58 -07:00
toddouska
9452d6cfb4 don't leak on bad verify decoding with extended API 2015-07-01 13:28:10 -07:00
toddouska
e164173562 fix null deference potential on new API 2015-07-01 12:51:19 -07:00
toddouska
1d663d3bff merge conflict 2015-07-01 12:24:11 -07:00
John Safranek
afde172f28 added buffer version of CertManagerLoadCABuffer 2015-07-01 11:42:54 -07:00
John Safranek
d6047736e9 added GPL headers to the unit test driver files 2015-07-01 11:12:54 -07:00
John Safranek
91b3959063 fix uninitialized decoded cert in CertManagerVerify() 2015-06-26 11:56:21 -06:00
John Safranek
8b324b94e9 removed some unused code due to an always true comparison 2015-06-25 11:21:33 -06:00
Moisés Guimarães
61c50b26d0 makes wolfSSL_SNI_GetFromBuffer() return SNI_UNSUPPORTED instead of BUFFER_ERROR for SSL v2.0 client hello buffers. 2015-06-25 12:48:11 -03:00
toddouska
7fcbee54e4 Merge pull request #81 from tisb-vikram/master
add IAR compiler option to ignore EWOULDBLOCK/EAGAIN warning for TI-RTOS
2015-06-24 21:51:46 -07:00
Vikram Adiga
0525575fbf add IAR compiler option to ignore EWOULDBLOCK/EAGAIN warning for TI-RTOS 2015-06-24 17:41:02 -07:00
John Safranek
36748fb62b Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-06-24 11:21:38 -06:00
John Safranek
5ba35b1f64 force HAVE_HASHDRBG enabled in settings.h unless WOLFSSL_FORCE_RC4_DRBG flag set 2015-06-24 11:16:18 -06:00
toddouska
39015f51ab Merge pull request #80 from kojo1/TI_temp
Resolving type mismatches in TI-hash/crypt
2015-06-24 07:34:18 -07:00
Takashi Kojo
309aadd3f3 TI-des3.c, type mismatch 2015-06-24 14:12:40 +09:00
Takashi Kojo
1feac72b62 check InitMutex 2015-06-24 11:47:58 +09:00
Takashi Kojo
a910daa886 fixed arm-none-eabi-gcc type check on AESIVSet, AESKey1Set 2015-06-24 11:06:38 +09:00
Takashi Kojo
c6e2591711 Remove wornings 2015-06-23 17:39:15 +09:00
toddouska
d334b05596 Merge pull request #79 from kojo1/TI_crypt
missed CCM Init in wc_xxxHash
2015-06-22 17:29:22 -07:00
John Safranek
57128a82ab update README.md for v3.6.0 2015-06-22 15:35:21 -06:00
John Safranek
4b5cc6ebb3 add hash.c to the iOS project files 2015-06-22 13:21:35 -06:00
kaleb-himes
9889dfb2fb README edits 2015-06-22 11:31:02 -06:00
John Safranek
075370a39c update automake includes to limit which files are added from the IDE sub-directories 2015-06-20 14:57:31 -07:00
John Safranek
b54dc09971 updated fips-check to cover all builds 2015-06-19 22:21:27 -07:00
Takashi Kojo
45a3838433 missed wolfSSL_TI_CCMInit in wc_xxxHash 2015-06-20 10:59:08 +09:00
toddouska
48a42e1a75 prepare release 2015-06-18 16:58:59 -07:00
toddouska
eee50cf42e update rpm version 2015-06-18 11:21:13 -07:00
toddouska
fe39cd34b9 bump version 2015-06-18 11:18:51 -07:00
toddouska
86403a270a Merge branch 'master' of github.com:wolfssl/wolfssl 2015-06-18 11:13:29 -07:00
toddouska
6cad1949b4 if NO_SHA don't run external script tests 2015-06-18 11:12:35 -07:00
toddouska
34ed64c5ce Merge branch 'leah' 2015-06-18 11:04:44 -07:00
toddouska
52072ab5e4 Merge https://github.com/lchristina26/wolfssl into leah 2015-06-18 11:00:34 -07:00
toddouska
f47398fff9 Merge branch 'tisb' 2015-06-18 10:50:13 -07:00
toddouska
63e2b29a08 update ti-rtos package for pull request file renames 2015-06-18 10:49:08 -07:00
toddouska
183b54a10d Merge https://github.com/tisb-vikram/wolfssl into tisb 2015-06-18 10:39:02 -07:00
toddouska
d49a35597f Merge branch 'master' of github.com:wolfssl/wolfssl 2015-06-18 10:16:06 -07:00
toddouska
ba63bc0d3e Merge branch 'kojo-ti' 2015-06-18 10:15:53 -07:00
toddouska
fa9d6428fc add hash.c to vcprojs 2015-06-18 10:14:55 -07:00
toddouska
9e7cb81d5a Merge branch 'TI_hash' of https://github.com/kojo1/wolfssl into kojo-ti 2015-06-18 09:05:13 -07:00
Takashi Kojo
ae749f727d IAR_ARM block in settings.h 2015-06-18 14:27:52 +09:00
Takashi Kojo
7ef85d1894 Add RestorePos 2015-06-18 14:27:15 +09:00
Takashi Kojo
4e546d92d9 BuildMD5/SHA for GetHash, RestorePos 2015-06-18 14:25:48 +09:00
John Safranek
e61592b9d8 Added ECC test certificate for having keyUsage without digitalSignature. 2015-06-17 13:46:09 -07:00
John Safranek
7d9a1ccf42 allow storage of out of order zero length DTLS handshake messages 2015-06-17 12:37:10 -07:00
lchristina26
11f0ae47af fix redeclaration of RsaKeyToDer() with FIPS 2015-06-17 09:51:38 -06:00
John Safranek
19cad21a46 fix bug when defragmenting out of order DTLS handshake messages 2015-06-16 21:49:01 -07:00
toddouska
55de33f493 Merge branch 'TI_hash' of https://github.com/kojo1/wolfssl into kojo-ti 2015-06-16 11:38:04 -07:00
toddouska
67dc53f84e Merge branch 'master' of github.com:wolfssl/wolfssl 2015-06-16 11:30:14 -07:00
toddouska
a62589f3fc add wc_ecc_check_key(), import validate option too 2015-06-16 11:29:27 -07:00
John Safranek
8fa258c657 fix scan-build warning 2015-06-15 17:52:30 -07:00
Takashi Kojo
86a9b1734a TI hash option control in hash.c 2015-06-16 09:30:56 +09:00
John Safranek
f2d9eb2994 1. Disable randomized base address on FIPS test project.
2. Fixed setting for disabling whole program optimization on file fips.c
in the windows project file.
2015-06-15 15:47:40 -07:00
Vikram Adiga
f358aab845 update TI-RTOS build scripts to add hardware accelerator lib build 2015-06-15 14:58:53 -07:00
John Safranek
c40dc11ce3 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-06-15 09:46:13 -07:00
John Safranek
c98fde3d43 updated wolfssl fips project files so test harness will run. added a readme 2015-06-15 09:46:07 -07:00
John Safranek
5976296a77 removed a comment from random.c 2015-06-15 07:37:05 -07:00
Takashi Kojo
a634d0e345 including hash.h in hash.c 2015-06-15 12:28:05 +09:00
Takashi Kojo
d976256816 TI-RTOS adjustment in test.h 2015-06-15 10:13:14 +09:00
Takashi Kojo
c2818ed87c DIGEST_SIZE fixed in Sha256GetHash 2015-06-15 09:59:34 +09:00
Takashi Kojo
89d39a6073 GetHash in SendBuffered, BuildTlsFinished. HashFinal in FreeHandshakeResources. 2015-06-15 09:46:16 +09:00
toddouska
203786dc25 add ecc keygen validate option 2015-06-12 13:11:07 -07:00
toddouska
6d9fece9f4 bump dev version 2015-06-12 09:39:03 -07:00
toddouska
89d9accc4d switch user ticket encrypt ctx to WOLFSSL_CTX 2015-06-10 18:13:13 -07:00
toddouska
47af6459d8 add user context to session ticket encrypt callback 2015-06-10 16:32:43 -07:00
toddouska
53bf8ed7cb fix scan-build warnings 2015-06-10 15:24:24 -07:00
toddouska
ce583552ce fix resumte.test script warning 2015-06-10 14:22:35 -07:00
toddouska
f76af05abf change autoconf scripts to /bin/sh, no -i on ping for portability 2015-06-10 14:11:36 -07:00
toddouska
44db140076 move client-test.sh to scripts/google.test 2015-06-09 08:51:55 -07:00
toddouska
8afa6fe08f Merge pull request #74 from NickolasLapp/master
Fixing bug in wc_ecc_sig_size not handling error code
2015-06-09 08:42:22 -07:00
toddouska
0426adaa1b document current scripts 2015-06-09 08:37:55 -07:00
Takashi Kojo
d9ccc51f58 Fix TI driver API to ROM_xxx 2015-06-09 07:02:21 +09:00
toddouska
13b0d632b2 add WOLFSSL_VXWORKS setting 2015-06-08 14:44:02 -07:00
Nickolas Lapp
9f8862888e Fixing bug in wc_ecc_sig_size not handling error code 2015-06-08 14:40:15 -06:00
John Safranek
067f11ff34 Added a known answer test inside the HashDRBG that is called when
creating a new instance of a DRBG, at reseed time.
Added a check that the freed DRBG's state actually gets cleared.
2015-06-05 14:46:48 -07:00
Jacob Barthelmeh
e461bc72b8 curve25519 and ed25519 low memory 2015-06-05 15:39:37 -06:00
toddouska
96a298018d simplify padcheck compare 2015-06-05 09:42:10 -07:00
Takashi Kojo
7433dcb95c Adding hash.c 2015-06-05 13:26:32 +09:00
Takashi Kojo
7584af3d36 Adding hash.c 2015-06-05 13:23:54 +09:00
toddouska
670c325f29 Merge pull request #72 from wolfSSL/smallstack
dummy buffer replacement in timing resistant functions.
2015-06-04 11:38:50 -07:00
Chris Conlon
defd1f9f94 add configure option for wolfSSL JNI, --enable-jni 2015-06-02 21:58:23 -06:00
Takashi Kojo
13185574d2 Merge branch 'EWARM' into TI_hash 2015-06-01 20:07:16 +09:00
Takashi Kojo
fe3253e618 IAR/EWARM wolfSSL name change 2015-06-01 20:02:20 +09:00
Takashi Kojo
644f7a4cdb ti-hash.c included in wc_port.c 2015-06-01 14:32:36 +09:00
Moisés Guimarães
3d41595ed4 internal.c: refactoring TimingPadVerify to reduce stack usage:
--- variable dummy replaced with ssl object (~250 bytes saved)

internal.c: refactoring VerifyMac to reduce stack usage:
--- variable dummy replaced with ssl object (~250 bytes saved)
2015-05-30 10:44:14 -03:00
Moisés Guimarães
ed65565390 integer.c: refactoring mp_exptmod_fast to reduce stack usage:
--- variable M moved to the heap (512 bytes saved)
2015-05-28 18:29:17 -03:00
Moisés Guimarães
a7a00a4bd5 remove trailing spaces. 2015-05-28 18:29:17 -03:00
John Safranek
77fe4f3a2e Fixes #71. Disable SHA works with TLS, PWDBASED, testing. 2015-05-28 10:25:41 -07:00
Takashi Kojo
e4580c3461 adding hash.h to include.am 2015-05-28 20:50:22 +09:00
Takashi Kojo
d67168d539 aes.c cleaned. ti-has.c, ti-aes.c, ti-des3.c are included in each respective algorithm source file. 2015-05-28 20:40:53 +09:00
Takashi Kojo
902799ef75 adding ti hash/crypt to include.am 2015-05-27 19:34:11 +09:00
Takashi Kojo
559404137e moving xxxGetHash to hash.c 2015-05-27 18:37:19 +09:00
Chris Conlon
b4a6ed1d7f Merge pull request #68 from tass-belgium/master
Improved support for PicoTCP on embedded devices
2015-05-26 13:47:45 -06:00
Moisés Guimarães
67a93a5999 fixes trailing white spaces.
adds port mapping in Vagrantfile.
2015-05-22 20:09:01 -03:00
Takashi Kojo
aaa1fe813a Added aes.c/des3.c 2015-05-22 09:55:49 +09:00
John Safranek
8fbcd7d74b added upper bound check on DH min bit size for configure forced default 2015-05-21 10:30:54 -07:00
John Safranek
64602d1969 added check for allowed minimum DH key size 2015-05-21 10:11:21 -07:00
Takashi Kojo
5bcce85de4 md5.h cleaned 2015-05-21 18:34:51 +09:00
Takashi Kojo
ce8b4e0cdc Added ti-hash.c 2015-05-21 18:26:35 +09:00
Takashi Kojo
d24c7f070c files cleaned 2015-05-21 18:12:43 +09:00
Takashi Kojo
527013ec1e corrected NL code 2015-05-21 14:16:09 +09:00
Takashi Kojo
b5654092ec Added Md5GetHash for BuildCertHashes 2015-05-21 13:42:02 +09:00
Takashi Kojo
1a315fd89e Initial TI crypt/hash 2015-05-21 13:31:02 +09:00
John Safranek
50a80bbcd2 update Windows FIPS preprocessor flags in project file 2015-05-19 14:37:03 -07:00
John Safranek
9a10210a2a replaced always-true comparison in PrintSessionStats with preprocessor checks 2015-05-19 09:52:30 -07:00
toddouska
bbec7011d4 add session ticket hint interval setter 2015-05-18 13:15:13 -07:00
toddouska
8b52330877 add key name compare for session ticket callback example 2015-05-18 09:48:15 -07:00
toddouska
e730aa571c add sanity checks to user session ticket encrypt callback 2015-05-18 09:29:25 -07:00
toddouska
8ff17b66f3 add session tickets to echoserver example too 2015-05-18 09:13:34 -07:00
toddouska
ebf73fab5d Merge branch 'tickets' 2015-05-15 16:13:09 -07:00
toddouska
cedd41432c fix windows session ticket warnings 2015-05-15 16:10:38 -07:00
toddouska
74cc2274fa add tiket key cleanup to help valgrind 2015-05-15 15:30:29 -07:00
toddouska
2212381925 add session ticket key returns for reject and use but create 2015-05-15 14:58:16 -07:00
toddouska
f6d12bfc37 initial server side session ticket support 2015-05-15 12:51:44 -07:00
John Safranek
660e0b868b added check for window's api's min macro 2015-05-14 11:40:23 -07:00
John Safranek
dcd6602293 misc.c can now only be included once 2015-05-13 15:10:05 -07:00
John Safranek
5e083eafb4 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-05-13 14:55:16 -07:00
John Safranek
4e482a348e wrapped the min() inline functions with better preprocessor checks 2015-05-13 14:53:11 -07:00
John Safranek
48034b56c5 update the VS solution and project files for FIPS build 2015-05-13 13:10:03 -07:00
John Safranek
b6e540b005 new VS solution and project files for FIPS build 2015-05-12 16:36:38 -07:00
John Safranek
69b4b37e86 modify ossl-extra HMAC testcase to use longer password 2015-05-12 16:16:44 -07:00
John Safranek
0b1ea204b7 cleaned up Windows build warnings 2015-05-12 11:59:07 -07:00
toddouska
513b43baae update CUSTOM_RAND_GENERATE to not include dev random files 2015-05-11 12:03:53 -07:00
toddouska
dde4b29462 add handshake done callback with ability to end connection 2015-05-09 11:04:47 -07:00
toddouska
d2c53c3229 reduce wolfcrypt test stack use, curve25519 2015-05-07 15:25:20 -07:00
toddouska
d4982bb988 add dsa verify input check, not used at TLS or default 2015-05-07 15:10:33 -07:00
toddouska
8f8fb3834a reduce benchmark stack use, reduce max variable sizes 2015-05-07 14:24:58 -07:00
toddouska
4fe04c6bed detect build cases where external script test case doesn't make sense 2015-05-07 12:50:27 -07:00
toddouska
914a27ad9f Merge branch 'kaleb' 2015-05-07 12:33:44 -07:00
toddouska
357ab1df14 Merge https://github.com/kaleb-himes/wolfssl into kaleb 2015-05-07 12:19:34 -07:00
toddouska
c52b7160e9 fix ipv6 external test case 2015-05-07 12:15:58 -07:00
kaleb-himes
173b1147b5 updated certs 2015-05-07 12:21:50 -06:00
toddouska
7a90f60a9c add rsafunction mp_exptmod_e debug message 2015-05-07 10:33:23 -07:00
toddouska
08b6e66ea8 add external site script test to make check 2015-05-07 10:02:43 -07:00
kaleb-himes
fc24885f17 updated subject matter for server-ecc.pem 2015-05-06 11:57:32 -06:00
John Safranek
20851c62f9 modify Encrypt and Decrypt switch statements for single return 2015-05-05 14:45:43 -07:00
toddouska
1571ced095 update python example to TLSv1.2 against example server 2015-05-03 10:19:02 -07:00
toddouska
6db33051d3 better detection of invalid ecc keys 2015-05-01 14:44:43 -07:00
toddouska
46eca67336 make certs_test buffers static in case multiple files need 2015-04-30 17:14:04 -07:00
toddouska
114fc18c33 add alignment to benchmark key/iv 2015-04-30 17:10:33 -07:00
toddouska
1771fea17d fix ecc_make_key cleanup on rng failure 2015-04-30 16:50:02 -07:00
toddouska
162214924f simplify build verify hashes to one spot 2015-04-30 09:22:25 -07:00
toddouska
ada5ff876a allow example client to do resume with scr 2015-04-29 17:06:57 -07:00
toddouska
c04de5ba82 add resume to example client benchmarking 2015-04-28 18:04:11 -07:00
toddouska
47ba1368c2 add wolfssl website ca, go daddy class2 CA 2015-04-28 14:15:31 -07:00
toddouska
d927aa4334 add resume test to example server and script test 2015-04-28 12:21:54 -07:00
Daniele Lacamera
96bb6e8cd7 Improved support for PicoTCP on embedded devices 2015-04-23 12:35:05 +02:00
toddouska
1e9647023c add snifftest script check to make check 2015-04-18 08:35:47 -07:00
John Safranek
99a9d221bc in sniffer, free handshake resources in the right order 2015-04-17 13:42:08 -07:00
toddouska
7536cec0d6 fix github issue #65, ignore sys options 2015-04-17 09:23:43 -07:00
toddouska
281decae46 fix github issue #65, don't undef with arg to options.h 2015-04-16 10:36:51 -07:00
toddouska
05b8e1274d add WOLFSSL_SESSION_STATS and optionally WOLFSSL_PEAK_SESSIONS which will slow down servers under load 2015-04-15 13:17:33 -07:00
kaleb-himes
3a6f08b04a update old CYASSL comment 2015-04-14 13:48:57 -06:00
toddouska
1f8701540d change SESSION_STATS to PRINT_SESSION_STATS, will add WOLFSSL_SESSION_STATS 2015-04-14 12:35:24 -07:00
toddouska
ceeb3d007e fix github issue #65, don't output (N)DEBUG to options.h 2015-04-13 12:01:21 -07:00
toddouska
7e9a5fb8ee remove poly/chacha from fips build 2015-04-12 11:01:16 -07:00
toddouska
7d213011c1 fix fips make dist for misc.c 2015-04-11 08:47:13 -07:00
toddouska
ecfcc533c8 add library version getters 2015-04-10 10:38:31 -07:00
toddouska
d40fbd58f4 fix pkcs7 warning 2015-04-10 10:37:25 -07:00
John Safranek
c1adae2fe4 moved FOURK_BUF constant to top of file 2015-04-10 08:06:59 -07:00
toddouska
edd6b91b56 on send dhe server_key_exchange only do hash(es) required 2015-04-09 09:58:16 -07:00
toddouska
86f2b9a98f turn off DTLSv1 functions for disable old tls 2015-04-08 13:29:25 -07:00
toddouska
0722e79627 Merge branch 'kojo-intel' 2015-04-08 11:38:27 -07:00
toddouska
b9767fdac6 Merge branch 'IntelAsm' of https://github.com/kojo1/wolfssl into kojo-intel 2015-04-08 11:23:48 -07:00
toddouska
b59d922d51 on send echde server_key_exchange only do hash(es) required 2015-04-08 11:22:22 -07:00
Takashi Kojo
9ae434a87b Merge branch 'Staging' of https://github.com/kojo1/wolfssl into Staging 2015-04-08 14:00:07 +09:00
Takashi Kojo
97f3336fae Merge branch 'master' of https://github.com/wolfSSL/wolfssl into Staging 2015-04-08 13:56:23 +09:00
Takashi Kojo
3ff5e54025 rollback files 2015-04-08 13:46:27 +09:00
Takashi Kojo
079c9908a3 Merged with 3.4.8 2015-04-08 11:09:57 +09:00
Takashi Kojo
6728a18d7c cpuflag ADX for Intel MULX in asm.c, BMI2 in sha256/512.c 2015-04-08 10:14:45 +09:00
John Safranek
af0204a069 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-04-07 16:02:25 -07:00
John Safranek
ea585e9b19 Updated iOS readme. Turned off unused wolfCrypt options in iOS FIPS build. 2015-04-07 16:00:12 -07:00
toddouska
2c73fa20a5 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-04-07 14:58:25 -07:00
toddouska
cf95bc23bb on process server_key_exchange only do hash(es) required 2015-04-07 14:57:40 -07:00
John Safranek
875ad2dc8e forced iphone os deployment version to 8.1 in FIPS project 2015-04-07 13:41:29 -07:00
toddouska
b115e4d898 Merge branch 'IntelAsm' of https://github.com/kojo1/wolfssl into kojo-intel 2015-04-07 09:49:17 -07:00
Takashi Kojo
015b68e6fb cpuflag BMI2 for Intel MULX 2015-04-07 10:21:26 +09:00
John Safranek
e17d452f9b Updated Xcode projects for missing headers 2015-04-06 16:12:50 -07:00
John Safranek
aef879dc20 Updated iOS FIPS project, bump version 2015-04-06 15:06:56 -07:00
toddouska
98231f4504 Merge branch 'IntelAsm' of https://github.com/kojo1/wolfssl into kojo-intel 2015-04-06 11:43:12 -07:00
toddouska
0519085c69 add SOCKET_PEER_CLOSED_E vs general SOCKET_E for case where peer closes underlying transport w/o close notify 2015-04-06 11:40:51 -07:00
Chris Conlon
4e6f619302 Merge pull request #46 from jay/add-dll-config-to-vcxproj
build: Add DLL configurations to wolfssl64.sln and all vcxproj files
2015-04-06 09:05:06 -06:00
Takashi Kojo
d8a6d9cffc runtime cpuflag for Intel MULX, cleaned in tfm.c 2015-04-06 10:34:07 +09:00
Takashi Kojo
3a372aebe3 Merge commit 'd67a031132b87fc01f0808f161eda0e3101dbba7' into IntelAsm 2015-04-06 10:22:33 +09:00
Takashi Kojo
ebedd64c5f Merge commit 'b9aa7621e716267f310aec0010c5240270b75cce' into IntelAsm 2015-04-06 10:21:54 +09:00
toddouska
d67a031132 fix scr gcm mode 2015-04-05 09:13:11 -07:00
toddouska
a7d004e47d add sha512 sig_algo processing for server_key_exchange and cert_verify messages 2015-04-04 09:49:34 -07:00
toddouska
44a3011328 fix STREAM_ALIGN consistency 2015-04-03 13:25:51 -07:00
toddouska
e39abffc5e add GNU ld bug error and solution 2015-04-03 12:11:29 -07:00
Jacob Barthelmeh
10f853ae4d adjustment to chacha for big endian 2015-04-03 12:19:40 -06:00
John Safranek
523775fcd6 updated the iOS readme 2015-04-03 09:54:15 -07:00
toddouska
b1316796f9 allow CTX set tmp dh w/o asn and certs too 2015-04-02 11:54:16 -07:00
toddouska
7552764fbb turn off chacha on big endian 2015-04-02 11:34:17 -07:00
toddouska
9437a3a303 fix tirtos distcheck 2015-04-02 11:26:55 -07:00
toddouska
d2c816f322 fix github issue #63, intelasm checkin broke MMCAU sha256 2015-04-02 10:52:58 -07:00
toddouska
ee4b063b42 remove double define 2015-04-02 10:01:09 -07:00
toddouska
a54c916c8f fix chacha on bigendian, touchups 2015-04-02 09:40:22 -07:00
toddouska
e1beca3e60 fix with ecc w/o dh functions 2015-04-02 08:14:48 -07:00
Takashi Kojo
b9aa7621e7 Intel MULX run time check in tfm.c 2015-04-02 15:42:38 +09:00
toddouska
09310a853d Merge branch 'ti' 2015-04-01 20:09:38 -07:00
toddouska
2fbab2f8d6 Merge https://github.com/tisb-vikram/wolfssl into ti 2015-04-01 20:06:20 -07:00
John Safranek
327a5c6dc2 added compile time check for Max Strength that all the requirements aren't disabled 2015-04-01 19:38:03 -07:00
Vikram Adiga
4a5912c754 fix tirtos build for wolfssl name change 2015-04-01 16:52:11 -07:00
Vikram Adiga
ad29c262d4 use Seconds APIs instead of MYTIME APIs for TI-RTOS 2015-04-01 16:51:54 -07:00
John Safranek
50e829ea79 when keeping peer cert, alt names were getting lost for the peer name check 2015-04-01 15:36:55 -07:00
John Safranek
afbd517838 fix issue with --enable-maxstrength --disable-ecc losing AES-GCM 2015-04-01 14:32:17 -07:00
John Safranek
2b5de9bd15 move MAX_STRENGTH and IPHONE in settings.h per pattern 2015-04-01 14:14:56 -07:00
John Safranek
b5a1cd186f Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-04-01 13:39:30 -07:00
John Safranek
3039d16e09 1. HAVE_AEAD and HAVE_PFS should be set in internal.h, not CFLAGS
2. Added WOLFSSL_MAX_STRENGTH as option in settings.h for non-autoconf
3. When selecting max-strength cipher suites, ECDHE is only dependent on
   ECC, not DH
2015-04-01 13:35:13 -07:00
toddouska
8dd1afb49c have ./configure error out on maxstrength + sniffer 2015-04-01 12:30:46 -07:00
toddouska
869aeee6cb allow sniffer play nice in ecc build 2015-04-01 12:14:48 -07:00
toddouska
11f65346bc Merge branch 'master' of github.com:wolfssl/wolfssl 2015-04-01 12:04:29 -07:00
toddouska
cc804b110f allow example client to talk with echoserver in ecc mode w/o switch 2015-04-01 12:03:27 -07:00
John Safranek
5ecbe14d2c Added --enable-maxstrength configure build to only
allow TLSv1.2, PFS, and AEAD ciphers.
2015-04-01 11:55:49 -07:00
Chris Conlon
34700642fa Merge pull request #47 from jay/ignore-vs-files
Ignore Visual Studio Intellisense files
2015-04-01 10:52:35 -06:00
toddouska
5ed451a29d Merge branch 'master' of github.com:wolfssl/wolfssl 2015-04-01 09:39:10 -07:00
toddouska
3abf1952c8 fix leanpsk default changes 2015-04-01 09:37:41 -07:00
Chris Conlon
1d4187e168 add local struct tm for XGMTIME with TIME_OVERRIDES, fixes issue #55 2015-04-01 10:02:02 -06:00
Takashi Kojo
3aeedcf092 fixed --enable-debug issue on Intel MULX, asm.c 2015-04-01 16:19:29 +09:00
Jay Satiro
b8b13ad9e9 build: Revert using MSBuild property files to auto-detect platform toolset
Prior to this change I had added a .props file for each .vcxproj to
use MSBuild's $(DefaultPlatformToolset) as the the default for
$(PlatformToolset). Typically that configuration allows for the
appropriate toolset to be used no matter which version of VS2010+
the wolfssl64.sln and project files are opened in. Problem is when an
MSBuild was used from the command line to build the solution it got the
$(DefaultPlatformToolset) from a property file based on the solution
header (currently "Format Version 12.00" which maps to Visual Studio
2012) instead. Another side effect was it set the VisualStudioVersion
to 11.0 (n - 1; n in this case 12.0) which was incorrect.

To remedy the above this change reverts back to the old PlatformToolset
method where the v110 toolset (Visual Studio 2012) is specified in every
configuration in every vcxproj. The user will have to specify explicitly
a different toolset to override it (either via command line or the GUI)
if they are not using VS2012.

VS2010 example:
msbuild -p:Configuration="Debug" wolfssl64.sln -p:PlatformToolset=v100
2015-04-01 02:05:15 -04:00
John Safranek
748c5ac128 update configure help strings for AESGCM and DH 2015-03-31 16:23:28 -07:00
toddouska
d84ff83689 fix leanpsk w/ new defaults 2015-03-31 15:55:39 -07:00
toddouska
a5f42cc9ca fix opensslextra time shadow on some systems 2015-03-31 13:56:12 -07:00
toddouska
5319eb8f38 fix github issue #56, have tls layer use time_overrides for ticks if available and not using explicit user_ticks 2015-03-31 13:41:10 -07:00
toddouska
24102eb95f on x86_64 enable sha512, ecc, and increase max_bits by default 2015-03-31 13:28:49 -07:00
John Safranek
175fd5ce17 updated rpm/spec.in 2015-03-31 10:24:57 -07:00
John Safranek
00b335d71a Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-03-31 09:54:27 -07:00
John Safranek
0458e21211 1. In the sniffer, replace call to strnlen with strlen and
accounted for size differences (fixes issue #60)
2. fixed overrun with long SNI names in hello messages
2015-03-31 09:51:55 -07:00
Chris Conlon
a24a22670c fix configure help string for arc4, chacha, poly1305 2015-03-31 09:42:32 -06:00
toddouska
1c19b67885 update lib version 2015-03-30 13:07:59 -07:00
toddouska
8588bb8b10 fix README typo 2015-03-30 12:52:59 -07:00
toddouska
e917df4c59 prepare 3.4.6 release 2015-03-30 12:28:12 -07:00
toddouska
c47acc7f24 Merge branch 'kojo-intel' 2015-03-30 11:11:28 -07:00
toddouska
5d4c4d36e5 Merge branch 'IntelAVX' of https://github.com/kojo1/wolfssl into kojo-intel 2015-03-30 11:07:11 -07:00
Takashi Kojo
6243c6244a fixed ftm/Intel MULX -O0 option, register usage 2015-03-30 14:49:53 +09:00
toddouska
69b4e982c8 fix tmp output files lingering around, remove() was called in bad spot 2015-03-29 19:32:48 -07:00
Takashi Kojo
a895a606e7 sha256.c, eliminate platform dependent code. 2015-03-30 07:55:05 +09:00
toddouska
3ca0bc0d66 fix windows warning 2015-03-29 14:31:09 -07:00
toddouska
e73b76c8ca fix warning for compilers that don't understand bitfield size 2015-03-29 14:18:52 -07:00
toddouska
500ee73be4 fix opensslextra set_timeout assumes long > int 2015-03-29 12:00:04 -07:00
toddouska
c90977c7a5 fix windows build 2015-03-29 11:51:05 -07:00
toddouska
4332acbeaa leanpsk doesn't need new gcm, poly, chacah defaults 2015-03-29 11:30:05 -07:00
toddouska
b12a1bb2e3 switch pkcs12 encrypted key to 3des since arc4 now off by default 2015-03-29 11:10:21 -07:00
toddouska
defc66f8db update client encrypt key to 2048 bit version 2015-03-29 10:53:21 -07:00
toddouska
72be4d91d0 Merge branch 'kojo-intel' 2015-03-29 10:34:28 -07:00
toddouska
fc4e0dfd6d Merge branch 'IntelAVX' of https://github.com/kojo1/wolfssl into kojo-intel 2015-03-29 09:48:13 -07:00
Takashi Kojo
57d766f1eb fixed ftm/MULX crash with --enable-debug, missing register def in inline asm destroying registers 2015-03-29 19:50:32 +09:00
Takashi Kojo
bd5fc1712f fixed sha256/AVX1 crash with --enable-debug: missing register def in inline asm destroy register
rorx removed when non-AVX2 build . cleaned set_Transform
2015-03-29 19:39:03 +09:00
Takashi Kojo
a83e85b91e Intel mulx/adcx/adox 2015-03-29 10:20:30 +09:00
toddouska
02ffb563d6 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-03-28 14:59:20 -07:00
toddouska
9ba62a2c52 allow examples build if no-sha but psk is on 2015-03-28 14:58:17 -07:00
toddouska
d090721730 fix cycles per byte format is cycles > 100 2015-03-28 14:38:29 -07:00
toddouska
27faf15678 add intelasm ./configure option 2015-03-28 14:34:39 -07:00
toddouska
905e5801f8 fix benchmark format, GB/s won't misalign output 2015-03-27 21:36:35 -07:00
toddouska
1fc3aa100b aes gcm/ccm require aes, duh 2015-03-27 21:30:27 -07:00
toddouska
c9a0c9a797 fix some psk warnings 2015-03-27 19:20:31 -07:00
toddouska
7f621f0637 Merge branch 'kojo-intel' 2015-03-27 15:42:55 -07:00
toddouska
3b8009bfd4 Merge branch 'IntelAVX' of https://github.com/kojo1/wolfssl into kojo-intel 2015-03-27 15:41:02 -07:00
toddouska
32c9f00189 only alloc poly auth size if cipher suite needs it 2015-03-27 15:38:01 -07:00
toddouska
e66aa9885f fix linux warning 2015-03-27 15:20:28 -07:00
toddouska
c92e4bd908 remove save file 2015-03-27 14:32:44 -07:00
toddouska
495fbe087e allow dh to be used w/o certs and asn 2015-03-27 14:28:05 -07:00
toddouska
4b8583168b add our strsep to msvc build 2015-03-27 12:14:14 -07:00
toddouska
ff11df2c14 enable chacha - poly by default 2015-03-27 11:22:42 -07:00
toddouska
af1fd4719a enable gcm by default 2015-03-27 11:12:42 -07:00
toddouska
c5f7c7ce57 enable dh by default 2015-03-27 10:23:15 -07:00
toddouska
d655fb9d74 remove rc4 from default build 2015-03-27 10:17:22 -07:00
toddouska
e4ac398d98 fix snifftest bad include on windows 2015-03-27 09:55:54 -07:00
toddouska
ac4b6af823 make attrib align compiler neutral for sha256 2015-03-27 09:40:53 -07:00
Takashi Kojo
ef6e08dc01 static to static const in sha256/512.c 2015-03-27 20:19:43 +09:00
toddouska
9adbf41baa Merge branch 'master' of github.com:wolfssl/wolfssl 2015-03-26 14:28:16 -07:00
toddouska
2935234484 Merge branch 'kojo-intel' 2015-03-26 14:27:12 -07:00
toddouska
22afce8609 fixup intel avx request 2015-03-26 14:26:25 -07:00
Chris Conlon
d4a3e83582 fix OPENSSL_EXTRA + NO_MD5 build, fixes issue #26 2015-03-26 13:52:06 -06:00
John Safranek
0f4216360e fix StoreExternalIV and SetInternalIV for 3DES 2015-03-26 11:09:36 -07:00
Chris Conlon
b5cac58845 fix pwdbased + NO_MD5 build 2015-03-26 11:50:15 -06:00
toddouska
4bd5dfe04a Merge branch 'IntelAVX' of https://github.com/kojo1/wolfssl into kojo-intel 2015-03-26 10:28:53 -07:00
Jacob Barthelmeh
699aae25a0 remove extra comments 2015-03-25 18:09:06 -06:00
Takashi Kojo
9ddf775afa Intel RdSeed, no Rand with hash DRBG 2015-03-26 09:08:02 +09:00
toddouska
b99b91ed99 :Merge branch 'IntelAVX' of https://github.com/kojo1/wolfssl into kojo-intel 2015-03-25 13:08:26 -07:00
Takashi Kojo
3c55971ffa Removed Intel RD from Hash DRBG 2015-03-25 18:31:08 +09:00
Takashi Kojo
994ffa96e0 sha256/512 removed static values for thread safe 2015-03-25 18:26:46 +09:00
toddouska
4b5a34e378 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-03-24 11:57:37 -07:00
toddouska
8f6d7a1ce7 rename ecc25519 to curve25519, less confusing with ed25519 now in play too 2015-03-24 11:56:40 -07:00
John Safranek
54b2f423bc clear unused variable build warning for OCSP 2015-03-24 11:16:50 -07:00
Takashi Kojo
28109b01f7 Intel rdrand/rdseed: fixed error check, separated rdrand and rdseed 2015-03-24 15:13:11 +09:00
John Safranek
fe303c97c6 refactor CRL/OCSP lookup for peer cert. add option to allow checking all certs in peer cert chain. 2015-03-23 17:35:56 -07:00
Takashi Kojo
572214ebb4 cpuid_flags, thread safe in sha256.c/sha512.c 2015-03-24 06:24:09 +09:00
toddouska
66a65f84bd add a few ForceZeros to ecc fp 2015-03-23 11:44:33 -07:00
toddouska
b841bc66c3 fix github issue #43, ecc_point uses DYNAMIC_TYPE ECC instead of BIGINT 2015-03-23 11:23:31 -07:00
Takashi Kojo
7e3c310ec9 random.c, runtime switch between Intel RD and software version 2015-03-23 19:40:35 +09:00
Takashi Kojo
2a2bf81c15 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into IntelAVX 2015-03-23 18:43:01 +09:00
Jay Satiro
a5072d09ae Ignore Visual Studio Intellisense files 2015-03-23 02:21:34 -04:00
Jay Satiro
6e14362940 build: Add DLL configurations to wolfssl64.sln and all vcxproj files
- Remove extern from declspec in WOLFSSL_API macro.

- Add a property file to *.vcxproj so that $(DefaultPlatformToolset) is
available.

- Remove the specified platform toolset (VS 2012) in *.vcxproj.

This change allows the projects to use $(DefaultPlatformToolset) so that
they will be built using the default platform toolset for whatever
version of Visual Studio 2010+ that loads them.

- Add DLL Release and DLL Debug configurations to *.vcxproj except for
sslSniffer.vcxproj.

The sniffer uses internal library components that aren't exposed in the
wolfSSL DLL so it can only be built by linking to CyaSSL's static lib.

- Change intermediate output directory of obj files to
<current-dir-setting>\obj\.

The purpose of this change is to separate the output files from the
intermediate files because sometimes they can end up in the same dir.
2015-03-23 02:12:01 -04:00
John Safranek
9f2454fc78 Added a noop function wc_FreeRng() for when not using the HashDRBG to keep
the calls to InitRng and FreeRng simple and balanced.
2015-03-20 14:19:35 -07:00
Chris Conlon
0afd09d900 fix OPENSSL_EXTRA + NO_AES build 2015-03-20 11:25:22 -06:00
Chris Conlon
6c963c8d8e fix OPENSSL_EXTRA + NO_DES3 build 2015-03-20 10:59:54 -06:00
toddouska
2e7d3a9121 cleanup ed benchmark 2015-03-19 13:00:20 -07:00
toddouska
b54c29487d Merge branch 'jacob-ed' 2015-03-19 12:52:15 -07:00
toddouska
478a8bb059 adjust ./configure format, change ed sign/verify to msg from hash 2015-03-19 12:48:32 -07:00
Jacob Barthelmeh
d89d524570 initial ed25519 implementation 2015-03-19 11:40:41 -06:00
Chris Conlon
5577555ce3 adjust test.c CERT_GEN for Freescale MFS examples 2015-03-18 18:21:52 -06:00
Chris Conlon
605ca8eaf6 update Freescale CodeWarrior project files to wolfSSL 2015-03-18 18:18:09 -06:00
toddouska
8e82806c01 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-03-18 15:48:22 -07:00
toddouska
555eb66292 fix github issue #40, export Base64_Decode, allow user to export Base64_Encode w/o other options 2015-03-18 15:47:19 -07:00
Chris Conlon
1d4cc928c6 fix Freescale MQX gmtime, cert generation 2015-03-18 16:15:56 -06:00
toddouska
eb0d980779 Merge branch 'IntelAVX' of https://github.com/kojo1/wolfssl into kojo-intel 2015-03-18 14:39:54 -07:00
toddouska
bb47dece1f Merge branch 'kaleb-master' 2015-03-18 14:27:53 -07:00
toddouska
8e4b24d6e4 note msvc is complaining compiler 2015-03-18 14:27:07 -07:00
toddouska
64d83c39a0 Merge https://github.com/kaleb-himes/wolfssl into kaleb-master 2015-03-18 14:25:31 -07:00
toddouska
f7c99cec3e obey user ecc choices at TLS layer 2015-03-18 14:12:23 -07:00
toddouska
f398b20bcc have ecc SetCurve() and CheckCurve() obey user ecc choices 2015-03-18 13:52:21 -07:00
toddouska
0316dd2ef6 fix github issue #35, allow user to pick ecc curves with ECC_USER_CURVES and separate HAVE_ECCxxx defines 2015-03-18 13:36:07 -07:00
toddouska
145123ff64 fix github issue #38, +sha512 -sha384 +aes-gcm redefinition 2015-03-18 11:44:39 -07:00
kaleb-himes
fd772bb434 MSVS warning fixes for all solutions 2015-03-18 10:42:10 -06:00
Chris Conlon
913240f6e4 add comments to RSA funcs, fix 80 char line limits 2015-03-18 10:06:48 -06:00
toddouska
6b0bfa1b2c bump dev version 2015-03-17 14:59:01 -07:00
toddouska
0b6c03ad06 snifftest.c needs socket.h included for AIX, john cyassl commit #a8803e1e16f23 2015-03-17 14:52:42 -07:00
toddouska
eba98a9ec2 removed some AC_REQUIRE statements for macros, ksh, John cyassl commit #46d9037d26dc 2015-03-17 14:47:44 -07:00
toddouska
e9cdfe84ce Merge branch 'master' of github.com:wolfssl/wolfssl 2015-03-17 14:26:43 -07:00
toddouska
24ad168acf put memset back before ecdsa sig decode for failure case 2015-03-17 14:25:57 -07:00
Takashi Kojo
16f0b603c3 a comment line cleaned 2015-03-17 21:56:12 +09:00
Takashi Kojo
7d6f169e29 random.c for Intel rdseed/rdrand 2015-03-17 21:48:59 +09:00
Takashi Kojo
77145a1f3e eliminate unsed macro in sha256.c 2015-03-17 21:46:57 +09:00
Takashi Kojo
78375db73b sha256/384/512 for Intel AVX1/2 2015-03-17 21:19:31 +09:00
John Safranek
33e767a1b4 sniffer should fail a session missing a RSA key 2015-03-16 18:13:51 -07:00
John Safranek
db51c88e25 added cert status trace message to win resource file 2015-03-16 11:30:43 -07:00
John Safranek
4d62389389 added Certificate Status handshake message to sniffer 2015-03-16 11:19:16 -07:00
toddouska
023f44bacf fix github issue #31, allow time overrides for all time uses 2015-03-13 12:44:25 -07:00
toddouska
4c2bf4ea34 add SetMinVersion at context level 2015-03-13 12:20:39 -07:00
John Safranek
84edbd1ff2 cleanup some configure help text 2015-03-12 12:25:39 -07:00
John Safranek
dbe6ecedf8 fix enable-sniffer option in configure.ac 2015-03-12 12:07:48 -07:00
toddouska
3daa8369c7 allow XTOUPPER to work with macros that don't like signed types 2015-03-11 17:52:11 -07:00
John Safranek
b02622d1d0 optimize hashDRBG internal state 2015-03-10 18:16:44 -07:00
toddouska
ab874d70db make suites at context level on demand only 2015-03-10 16:09:16 -07:00
toddouska
7e2931e5fa make sure DHE / client certs freed during handshake free 2015-03-09 22:13:34 -07:00
Chris Conlon
edfe8b8a87 fix sha256.h copyright 2015-03-09 12:06:51 -07:00
toddouska
2c00e2c7a4 Merge branch 'master' of github.com:wolfssl/wolfssl 2015-03-09 11:59:11 -07:00
toddouska
64705acf94 optimize cert_manager layout 2015-03-09 10:08:04 -07:00
toddouska
e9db5cca74 fix saveArrays check in free handshake resources 2015-03-09 09:54:29 -07:00
toddouska
c201239d02 missed 2 now redundant inits on CTX 2015-03-09 09:39:50 -07:00
toddouska
e6c369e026 use memset on Init SSL for 0,NULL defaults 2015-03-09 09:34:38 -07:00
toddouska
8e6f8d8693 use memset for 0,NULL defaults on CTX init 2015-03-09 09:21:04 -07:00
Jacob Barthelmeh
8822d670b3 rename function parameter to remove global shadow possibility 2015-03-09 10:08:56 -06:00
toddouska
7d4faf7c90 make handshake hashes dynamic part of ssl, can be freed after handshake 2015-03-09 09:05:06 -07:00
toddouska
b7b655b8bf fix example server memory tracker 2015-03-07 12:00:27 -08:00
toddouska
44b6ca9597 use bitfield for basic options struct 2015-03-07 11:17:22 -08:00
toddouska
8e7d8e8a55 optimize session layout 2015-03-07 10:53:08 -08:00
toddouska
22899019b4 optimzie Buffers layout 2015-03-07 10:37:22 -08:00
toddouska
742278a305 optimize basic SSL layout 2015-03-07 10:32:35 -08:00
toddouska
f48298cbd5 move bio fds to openssl extra 2015-03-07 10:16:26 -08:00
toddouska
31a2acd9c3 optimzie cipherSpecs layout 2015-03-07 10:08:34 -08:00
toddouska
dc5faebb8d optimize buffer layout 2015-03-07 10:05:36 -08:00
toddouska
3d971bb885 optimzie bufferStatic layout 2015-03-07 10:04:15 -08:00
toddouska
28d5d50000 optimize Arrays layout 2015-03-07 10:00:37 -08:00
toddouska
4bf74da2f3 optimize Suites layout 2015-03-07 09:57:14 -08:00
toddouska
ef0a918072 optimize hash-drbg layout, save 12 bytes on 64bit 2015-03-07 09:46:14 -08:00
toddouska
da208e8629 fix github issue #28, allow FREERTOS user in settings to turn on DH or SHA-512 2015-03-07 08:59:36 -08:00
toddouska
7caf0499d6 bump version 2015-03-06 13:39:57 -08:00
toddouska
7a87ce54ca fix hash size mismatch on HashSession() 2015-03-06 11:33:06 -08:00
John Safranek
874fa8c1f9 fix freeing a failed RNG 2015-03-06 09:51:29 -08:00
toddouska
d5975e39f8 fix github issue #27, better help on fips not working w/o license 2015-03-06 09:15:33 -08:00
Jacob Barthelmeh
7ef362d4ba format of curve25519 key 2015-03-05 15:38:07 -07:00
toddouska
450ccea7ee delay peer RSA key alloc/init until needed 2015-03-05 12:38:34 -08:00
toddouska
818d5c4bf3 fix github issue #25, delay ecc key allocs/init until needed 2015-03-05 12:15:10 -08:00
toddouska
11e15188bf fix github issue #24, settings first before ifdef checks on 25519_fe files 2015-03-04 12:15:23 -08:00
toddouska
18e710ce9a make sure external X509 free uses internal free 2015-03-03 14:14:33 -08:00
John Safranek
9f37133e67 removed top-level iOS/iPhone projects in favor of the IDE/iOS projects 2015-03-02 12:02:29 -08:00
toddouska
c14bd2dddd Merge branch 'kojo-itron' 2015-02-28 11:30:39 -08:00
toddouska
1caaeb8355 tiddy whitespace 2015-02-28 11:29:42 -08:00
Takashi Kojo
6f08459264 uITRON and uT-Kernel, wc-prot.c 2015-02-28 11:24:16 +09:00
toddouska
b7db43a189 make ConstantCompare available outside of internal.c 2015-02-26 17:31:47 -08:00
toddouska
6cced22256 add INSTALL, basic build instructions and locations for more info 2015-02-26 13:48:57 -08:00
toddouska
e25dc7b16c update README.md 2015-02-26 13:27:54 -08:00
toddouska
c7a72a2c00 Merge branch 'jacob-master' 2015-02-26 12:37:45 -08:00
toddouska
681fc85bc8 Merge branch 'master' of https://github.com/JacobBarthelmeh/wolfssl into jacob-master 2015-02-26 12:36:42 -08:00
toddouska
9913edd7a5 fix github issue #20, allow user to use settings.h at app level as well for building wolfssl. verified types.h (which includes settings.h) or settings.h is included b4 definition checks at wolfssl and wolcrypt header levels 2015-02-26 12:29:15 -08:00
Jacob Barthelmeh
30cbadc38d changes for MYSQL port 2015-02-26 10:40:32 -07:00
Jacob Barthelmeh
67e81f534a mac compare in chacha-poly AEAD and remove unneeded null check 2015-02-26 08:04:15 -07:00
toddouska
ac979d49ab fix sni yassl tests 2015-02-25 20:34:50 -08:00
toddouska
c04a6d2d0e update README names 2015-02-25 20:29:34 -08:00
toddouska
1395c88ec4 Merge pull request #14 from lchristina26/master
fix STM32 bug in benchmark.c
2015-02-25 13:39:49 -08:00
toddouska
473a120ba2 remove more stale cyassl headers 2015-02-25 13:34:29 -08:00
toddouska
dbaac4da12 remvoe stale cyassl headers from openssl layer 2015-02-25 12:34:54 -08:00
toddouska
ef87043495 fix github issue #16, stale cyassl header 2015-02-25 12:16:52 -08:00
toddouska
2b9b3dd395 fix github issue #15, stale cyassl headers 2015-02-25 12:14:11 -08:00
lchristina26
f04b042c73 fix STM32 bug in benchmark.c 2015-02-25 11:43:30 -07:00
John Safranek
795a32446b fix github issue #13, DRBG type-punning 2015-02-24 16:47:00 -08:00
toddouska
787e73d818 Merge pull request #11 from kaleb-himes/master
ntru neo.lib -> NtruEncrypt_DLL.lib
2015-02-24 15:22:40 -08:00
toddouska
6d691e1b9f fix github issue #12, cyassl_mutex leftovers 2015-02-24 15:03:24 -08:00
toddouska
8ee361a0d4 fix scan-build warning 2015-02-24 12:46:53 -08:00
kaleb-himes
40d51f13ce ntru neo.lib -> NtruEncrypt_DLL.lib 2015-02-24 13:44:15 -07:00
toddouska
501d1cd934 Merge branch 'aburks-chapoly' 2015-02-24 12:35:08 -08:00
toddouska
9d20e712bf add autoconf support for chapoly-aead, wipe temp polykey, minor whitespace adjusts 2015-02-24 12:33:52 -08:00
Andrew Burks
0e5f879d0b Added documentation and benchmarks. 2015-02-24 10:00:39 -08:00
Andrew Burks
8c3410d6c2 Added wolfcrypt API for the ChaCha20-Poly1305 AEAD. 2015-02-24 09:15:11 -08:00
Andrew Burks
14b6254e6e Fixed dependency chain issue with integer.h since one of the function prototypes uses mp_int. 2015-02-23 15:40:39 -08:00
toddouska
bbe4a3815f release README update 2015-02-23 13:04:23 -08:00
toddouska
9e2c02d47a wolfcrypt examples build option for build tests 2015-02-23 12:23:16 -08:00
kaleb-himes
db8619cc76 compatibility layer psk updates 2015-02-23 09:45:22 -07:00
toddouska
608da64ece add ForceZero() to force memset(0) 2015-02-20 15:51:21 -08:00
John Safranek
732a0dd39a removed redundant mp_init of r and s in ecc verify hash 2015-02-20 13:54:30 -08:00
toddouska
c3f73018a0 fix scan-build warnings 2015-02-20 12:38:29 -08:00
toddouska
2f20376704 Merge branch 'kojo-pic32' 2015-02-19 18:00:19 -08:00
toddouska
43918fa0dc Merge branch 'pic32mz' of https://github.com/kojo1/wolfssl into kojo-pic32 2015-02-19 17:58:21 -08:00
Takashi Kojo
1af158ea23 Add configurations.xml under mplabx/mcaip 2015-02-20 10:54:53 +09:00
toddouska
d11158431f Merge branch 'jacob-master' 2015-02-19 16:08:58 -08:00
toddouska
420668c1f9 tiddy up 25519 2015-02-19 16:07:13 -08:00
toddouska
cc642fbaf6 tiddy up 25519 2015-02-19 16:06:24 -08:00
Takashi Kojo
9a96da72eb Change mplabx/mcapi path names in .gitignore 2015-02-20 08:04:42 +09:00
Takashi Kojo
2746a69882 Add Makefile for mplabx, mcapi projects 2015-02-20 07:55:24 +09:00
toddouska
f6bcb6cf17 Merge https://github.com/JacobBarthelmeh/wolfssl into jacob-master 2015-02-19 14:45:59 -08:00
toddouska
d5b249754b make sure poly1305 and chacha defined for chacha-poly aead mode 2015-02-19 14:33:21 -08:00
Chris Conlon
42b58bd05b cleanup conditional header inclusion 2015-02-19 14:02:23 -07:00
Jacob Barthelmeh
4babd2cf2d added in curve25519 crypto 2015-02-19 10:59:05 -07:00
Takashi Kojo
6827e4b8f4 update Makefile.am for mplabx/pcapi 2015-02-19 22:07:10 +09:00
Takashi Kojo
267063e0f9 adjusted mplabx/mcapi projects/include.am to wolfssl 2015-02-19 21:00:54 +09:00
Takashi Kojo
b8f476192d Eliminating unnecessary files under mplabx projects 2015-02-19 14:10:55 +09:00
Takashi Kojo
255f7381a4 buffering hash message, pic32mz-hash.c 2015-02-19 14:08:33 +09:00
toddouska
17ed9e147f fix SLOW_WORD name change 2015-02-18 15:47:50 -08:00
kaleb-himes
2a068ff025 final powerPC support modification 2015-02-18 08:02:05 -07:00
kaleb-himes
de2115b140 shutdown shadows global in sys/socket.h line 576 renamed wc_shutdown 2015-02-18 08:00:25 -07:00
Takashi Kojo
0b695f683f pic32mz crypt engine, pic32mz-hash.c 2015-02-18 16:25:19 +09:00
Takashi Kojo
963ba3fe41 sha512 rollback 2015-02-18 07:46:11 +09:00
Takashi Kojo
1e3fa1fac3 adjusting pic32mz code to wolfssl 2015-02-18 07:38:41 +09:00
kaleb-himes
3a150da10f final powerPC support modification 2015-02-17 14:26:01 -07:00
kaleb-himes
8d5bba7962 shutdown shadows global in sys/socket.h line 576 renamed wc_shutdown 2015-02-17 14:24:31 -07:00
kaleb-himes
317e7fdb08 Merge branch 'master' of ssh://github.com/wolfSSL/wolfssl 2015-02-17 14:20:53 -07:00
kaleb-himes
c516c42c9a reduce footprint size removing compatibility layer where no longer needed 2015-02-17 14:20:10 -07:00
toddouska
de7c9da363 Merge branch 'leah-master' 2015-02-16 14:24:28 -08:00
toddouska
5f3b1d90b6 fix shutdown returns 2015-02-16 14:23:33 -08:00
toddouska
518bdd3a65 Merge branch 'master' of https://github.com/lchristina26/wolfssl into leah-master 2015-02-16 13:43:36 -08:00
John Safranek
ff79e646e1 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-02-16 11:36:23 -08:00
John Safranek
16e468b05f updated PBKDF2 test to use longer password 2015-02-16 11:33:06 -08:00
toddouska
4dbb74b9ea Merge branch 'master' of github.com:wolfssl/wolfssl 2015-02-16 09:55:51 -08:00
toddouska
0efdabb9a0 move pwdbased lower in config for openssl manual sets 2015-02-16 09:54:55 -08:00
Moisés Guimarães
b9e5b5f90c add libevent installation on the vagrant box 2015-02-15 13:34:56 -03:00
John Safranek
0aa48498b9 1. Added new iOS IDE project
2. Added new iOS IDE project for FIPS
3. Added a readme for the iOS projects
4. Added error codes for FIPS local storage
2015-02-14 12:22:51 -08:00
toddouska
a92d4c5719 fix server-keyPkcs8Enc.pem name change error, password, and add ecc pkcs8 encrypted file 2015-02-11 17:24:15 -08:00
kaleb-himes
297e1751b2 return line options.h being read literally by debian, fixed 2015-02-11 14:10:06 -07:00
lchristina26
4c7b076cea updates to shutdown and mymktemp 2015-02-11 09:37:54 -07:00
Leah
b26b5f1b51 Merge pull request #1 from wolfSSL/master
update to current wolfssl version
2015-02-11 16:33:44 +00:00
lchristina26
1ef9d7852c fixes from scan-build output in test.c 2015-02-06 08:42:37 -07:00
toddouska
c8b9c84178 fix c++ build 2015-02-05 17:23:53 -08:00
toddouska
d3b15e4d50 Merge branch 'master' of https://github.com/lchristina26/wolfssl into leah-master 2015-02-05 11:19:32 -08:00
toddouska
c2ed94958c Merge branch 'kaleb-himes-master' 2015-02-05 10:27:00 -08:00
toddouska
d37abe4363 Merge branch 'master' of https://github.com/kaleb-himes/wolfssl into kaleb-himes-master 2015-02-05 10:22:48 -08:00
toddouska
430f95e4f1 fix ecc compressed with alt size 2015-02-05 10:17:29 -08:00
kaleb-himes
c539393ca4 updated all certs 2015-02-04 23:34:04 -07:00
kaleb-himes
b7ba495924 all certs in renewcerts.sh -> 1000 days 2015-02-04 23:29:56 -07:00
lchristina26
ed80732957 add mymktemp function for random output file name in test.h 2015-02-04 11:52:37 -07:00
kaleb-himes
b98cf6826e Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-02-04 10:49:51 -07:00
John Safranek
4bc2743b55 changed port.c to wc_port.c in Xcode iOS project 2015-02-03 14:21:20 -08:00
kaleb-himes
9261aa1d6d crls updated 2015-02-02 11:24:30 -07:00
kaleb-himes
c840c0ba3e endif comment update 2015-02-02 09:19:00 -07:00
kaleb-himes
55d30ca277 new client-ecc-cert.pem/renewcerts updates/certs relavent name changes 2015-02-02 09:10:07 -07:00
John Safranek
7cff22c4b0 moved the buffers, key, and iv around in the file so lean-psk would still build 2015-01-30 10:43:31 -08:00
John Safranek
dcebbe4445 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-01-30 09:56:35 -08:00
John Safranek
f75329aa2e 1. Changed a memset to 0 of some mp_ints with mp_inits()
2. For alt-ecc, implemented the function fp_init_copy()
3. Added an fp_init() for the temp fp_int in fp_sub_d()
2015-01-30 09:03:44 -08:00
lchristina26
29be69b92b change CYASSL_DEBUG to DEBUG_CYASSL for compatibility 2015-01-30 09:11:42 -07:00
lchristina26
db5a95b370 add option for bidirectional shutdown 2015-01-30 08:41:34 -07:00
Moisés Guimarães
fe26b86207 fixes for vagrant scripts due to name changing:
update name to wolfssl.
add question before sync.
2015-01-29 12:17:08 -03:00
toddouska
0e4c008247 add pic32mz header to distribution 2015-01-28 15:30:41 -08:00
toddouska
c5b495c44e fix HASH-DRBG memory leak in benchmark 2015-01-28 12:29:53 -08:00
toddouska
7ac337a21e Merge branch 'master' of github.com:wolfssl/wolfssl 2015-01-28 10:33:12 -08:00
toddouska
a26630eec0 remove unused ecc_timing variables 2015-01-28 10:32:12 -08:00
kaleb-himes
81b6c7ff7a encrypt shadowing global in unistd.h fix 2015-01-28 11:18:13 -07:00
kaleb-himes
7dba293fbb global declaration being shadowed in pwdbased.h 2015-01-28 10:38:10 -07:00
kaleb-himes
14eaa69eae version git diff fix 2015-01-27 11:42:25 -07:00
toddouska
d6d56c8532 fix missing function argument to get_intel_cycles() 2015-01-26 16:49:28 -08:00
toddouska
a682d53f67 add cycles per byte to gcc + x86_64 benchmarks 2015-01-26 16:33:30 -08:00
toddouska
466d8a970c bump version 2015-01-26 14:02:57 -08:00
John Safranek
4c97531d6a added comment about ALT_ECC_SIZE to ecc.h 2015-01-26 11:08:49 -08:00
John Safranek
6ba6ca7435 fix pointer issue with ECC cache 2015-01-26 09:20:22 -08:00
John Safranek
2bcd55226f Merge branch 'ecc2' 2015-01-23 10:37:55 -08:00
John Safranek
2e6d118a50 allow different sized fast math for both RSA and ECC
add C_EXTRA_FLAGS "-DALT_ECC_SIZE" to enable, and set
size with "-DFP_MAX_BITS_ECC=512", default is 512
2015-01-23 10:26:41 -08:00
kaleb-himes
3393c3a4b4 CYASSL_DEBUG in compatibility layer 2015-01-23 11:06:01 -07:00
toddouska
74790fa265 fix gcc 4.9 warning for idx on fpecc 2015-01-20 15:35:58 -08:00
kaleb-himes
402bbe0321 32 bit implicit cast 2015-01-20 13:44:35 -07:00
kaleb-himes
b0e88e32ff Error printouts name changed 2015-01-20 12:36:20 -07:00
Jacob Barthelmeh
859c22f2c2 update to asn compatibility 2015-01-19 21:18:35 -07:00
Moisés Guimarães
75fa8af5f6 Merge branch 'master' of https://github.com/wolfSSL/wolfssl 2015-01-19 14:55:52 -03:00
Moisés Guimarães
9e667c15c7 fix tolower typecast on CYGWIN, gcc-arm-none-eabi (gnuarmeclipse toolchain) and possible future ports. 2015-01-19 14:53:54 -03:00
kaleb-himes
780d01afc6 tirtos compatibility 2015-01-19 09:07:13 -07:00
kaleb-himes
d591716060 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-01-19 08:46:13 -07:00
kaleb-himes
e735ba1357 formatting and lone API removed 2015-01-19 08:45:09 -07:00
Jacob Barthelmeh
3345293ad7 debugging the debugging function in benchmark 2015-01-14 17:01:44 -07:00
John Safranek
1bd80b20d6 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-01-14 10:03:20 -08:00
kaleb-himes
8fe965cf24 ntru wc_ fixes 2015-01-14 09:52:33 -07:00
kaleb-himes
3229a96bb3 pre-commit to use wolfssl/options 2015-01-13 16:22:21 -07:00
kaleb-himes
53d65de105 visual studio project paths updated 2015-01-13 15:30:57 -07:00
kaleb-himes
b9a70ce3ca wc_ in src/ssl.c 2015-01-13 14:01:10 -07:00
kaleb-himes
b849d1ca8b visual c name change 2015-01-13 13:42:49 -07:00
Jacob Barthelmeh
03345f1024 catch cyassl_sniffer macro 2015-01-13 13:40:53 -07:00
kaleb-himes
288d9a039d legacy defines and updates 2015-01-13 13:27:01 -07:00
Jacob Barthelmeh
7f3184b0ed header file includes for compatibility and macros added to cyassl/ssl.h 2015-01-12 14:45:21 -07:00
John Safranek
c4c32221a9 update download URL in the rpm/spec template to new location 2015-01-12 09:24:28 -08:00
kaleb-himes
f138faa565 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-01-09 16:03:07 -07:00
kaleb-himes
1ebaf41808 random.c updated, conflict with TIRTOS 2015-01-09 16:01:22 -07:00
Jacob Barthelmeh
e6a84243ee chacha-poly aead test 2015-01-09 15:18:20 -07:00
Jacob Barthelmeh
6c9abe06f9 remove compatibility include 2015-01-09 14:28:26 -07:00
John Safranek
733cfde318 updated RPM build spec for wolfSSL 2015-01-09 11:49:44 -08:00
John Safranek
2be9d8f5c6 Merge branch 'master' of github.com:wolfSSL/wolfssl 2015-01-09 11:22:38 -08:00
John Safranek
e5734d5ef5 wolfssl is a new library, reset libtool version number to 0:0:0 2015-01-09 11:20:41 -08:00
kaleb-himes
aff7669cad make distcheck and sniffer comment removed 2015-01-09 11:43:17 -07:00
kaleb-himes
6b1484ef2f sniffer underscore 2015-01-09 11:33:40 -07:00
kaleb-himes
d6dcaab89e sniffer added to compatibility layer 2015-01-09 11:31:31 -07:00
kaleb-himes
9dfd47648b real README.md 2015-01-09 11:18:09 -07:00
kaleb-himes
7b6c17037c initial wolfSSL 2015-01-09 11:09:43 -07:00
kaleb-himes
be35f0df47 3.3.3 2015-01-09 10:37:42 -07:00
kaleb-himes
74749b2b6a tirtos name change 2015-01-09 10:09:54 -07:00
kaleb-himes
819a303a79 version update 2015-01-09 10:08:43 -07:00
Jacob Barthelmeh
9af457f8c3 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2015-01-09 10:07:54 -07:00
Jacob Barthelmeh
f2dea4812a add includes to compatibility 2015-01-09 10:06:50 -07:00
kaleb-himes
b7aa0e1057 Johns changes in cyassl/cyassl 2015-01-08 16:51:59 -07:00
kaleb-himes
bb92d41e8d xcode projects, merge Chriss latest 2015-01-08 16:27:40 -07:00
Jacob Barthelmeh
2d3c607acd handel poly1305 warning and clean up commented out compatibility layer includes 2015-01-08 15:33:44 -07:00
kaleb-himes
2951ef5b97 swig updated, tested, and working 2015-01-08 14:47:41 -07:00
Jacob Barthelmeh
492bae7afe Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2015-01-08 10:44:00 -07:00
Jacob Barthelmeh
d366599285 adding comment to header and _fips to c files 2015-01-08 10:42:01 -07:00
kaleb-himes
48fd041c40 no longer user compatibility layer 2015-01-08 10:02:07 -07:00
kaleb-himes
7e5cac6c43 support dir update 2015-01-08 09:56:06 -07:00
kaleb-himes
878c1889b3 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2015-01-08 09:40:17 -07:00
kaleb-himes
a389620a29 Copyright (C) updates 2015-01-08 09:39:04 -07:00
Jacob Barthelmeh
0721d575f6 correction on rename of struct 2015-01-07 15:56:02 -07:00
Jacob Barthelmeh
6195ae1db2 placement of poly1305 in test file 2015-01-07 15:37:55 -07:00
Jacob Barthelmeh
1c4b4a2d1e ripemd in function call fixed 2015-01-07 15:26:09 -07:00
Jacob Barthelmeh
e3826d26c5 refactor settings_comp to respective .h files 2015-01-07 15:03:54 -07:00
Jacob Barthelmeh
bdb37d0da9 adjustment to compatibility in random.h file 2015-01-07 14:45:11 -07:00
Jacob Barthelmeh
252390a476 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2015-01-07 14:32:31 -07:00
Jacob Barthelmeh
455db9f84b adjust cyassl headders 2015-01-07 14:30:28 -07:00
kaleb-himes
8d98db7593 cyassl/options.h backwards compatibile 2015-01-07 14:30:02 -07:00
Jacob Barthelmeh
02f16b9232 going through wolfcrypt 2015-01-07 13:36:11 -07:00
kaleb-himes
7e9c8028b2 more macros, fips test passes 2015-01-07 13:33:10 -07:00
kaleb-himes
639637278d CYASSL -> WOLFSSL macros 2015-01-07 13:17:57 -07:00
kaleb-himes
33fff07eee Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2015-01-07 13:14:26 -07:00
Jacob Barthelmeh
f516bcf1ce old cyassl header files adjusted 2015-01-07 13:11:37 -07:00
kaleb-himes
e256291511 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2015-01-07 10:19:53 -07:00
Jacob Barthelmeh
4008bec496 remove assembly files from ctaocrypt and adjustment to visibility 2015-01-07 10:16:52 -07:00
kaleb-himes
99d0e80248 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2015-01-07 08:58:02 -07:00
Jacob Barthelmeh
95aad35e41 prunning on ctaocrypt files 2015-01-06 22:23:20 -07:00
Jacob Barthelmeh
310347f623 prunning on ctaocrypt files 2015-01-06 15:18:36 -07:00
kaleb-himes
4872ec52f9 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2015-01-06 15:02:10 -07:00
kaleb-himes
e84f429ed4 white space configure.ac 2015-01-06 15:00:38 -07:00
Jacob Barthelmeh
161a90aeae error crypt header adjusted and removed from ctaocrypt 2015-01-06 14:45:07 -07:00
Jacob Barthelmeh
6f17e5ecd0 prune ctaocrypt, alter cyassl headers and catch wolfssl rsa header 2015-01-06 14:26:13 -07:00
Jacob Barthelmeh
27e7038c00 cyassl coding header and asthetics to settings macros 2015-01-06 14:02:43 -07:00
Jacob Barthelmeh
8315e76f32 update to function calls in ecc c file 2015-01-06 13:43:46 -07:00
kaleb-himes
11a563aa91 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2015-01-06 13:42:50 -07:00
kaleb-himes
ce65bef5a8 enable-fpecc enable-ecc 2015-01-06 13:42:02 -07:00
Jacob Barthelmeh
f5ec8489b8 dummy files for autoconf 2015-01-06 13:38:16 -07:00
kaleb-himes
a990a5cebf missed tfm.h 2015-01-06 13:09:14 -07:00
kaleb-himes
369a5f04a9 library wide licence update 2015-01-06 12:14:15 -07:00
kaleb-himes
0790f53f04 remove wolfssl/options.h 2015-01-06 11:31:18 -07:00
kaleb-himes
067b85877d full commit passing 2015-01-06 11:29:05 -07:00
kaleb-himes
0dbdb35222 enable-md4, enable-hkdf, disable-memory 2015-01-06 10:41:47 -07:00
Jacob Barthelmeh
42f3ec73eb ripemd debug 2015-01-06 10:36:35 -07:00
Jacob Barthelmeh
bc48c83147 blake2 debug and settings refactor 2015-01-06 10:16:56 -07:00
kaleb-himes
e8af870e37 distribution fix 2015-01-05 16:58:28 -07:00
kaleb-himes
4d2b620d23 Merge branch 'master' of https://github.com/cyassl/cyassl 2015-01-05 16:38:27 -07:00
Jacob Barthelmeh
9e2ae79c8a include in tfm and compatability for random and sha256 2015-01-05 16:36:24 -07:00
John Safranek
090a8830ee fix math problem with configure on ksh88 2015-01-05 15:27:20 -08:00
Jacob Barthelmeh
159afeae14 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2015-01-05 15:00:50 -07:00
Jacob Barthelmeh
15554342c2 change of some header file macros 2015-01-05 14:59:48 -07:00
kaleb-himes
a4ce557263 Licencing update 2015-01-05 14:54:43 -07:00
lchristina26
b84b0401a9 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2015-01-05 14:50:41 -07:00
lchristina26
3cbed90cb9 name change for client.c 2015-01-05 14:48:43 -07:00
kaleb-himes
53ddf53a45 compatibility layer update 2015-01-05 14:38:16 -07:00
Jacob Barthelmeh
37deb65371 aes reverse compat. 2015-01-05 14:16:28 -07:00
Jacob Barthelmeh
e204c41768 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2015-01-05 13:42:22 -07:00
Jacob Barthelmeh
5d377b7bc5 for make dist and also aes compatibility 2015-01-05 13:40:26 -07:00
kaleb-himes
dcbfae1c31 Anon added to compatibility layer 2015-01-05 11:21:40 -07:00
kaleb-himes
cf3ba3f0e8 disable-asn, disable-rsa, enable-psk fixed 2015-01-05 11:06:04 -07:00
kaleb-himes
e09d14f6f8 remove wc_ from non-public functions 2015-01-05 10:50:33 -07:00
kaleb-himes
15f021c074 --enable-bump fixed 2015-01-05 10:41:22 -07:00
Jacob Barthelmeh
db7f7c39e1 comment in testsuite, adjustment to src include and wolfssl ssl 2015-01-05 10:32:51 -07:00
kaleb-himes
4ba12c86cb fastmath, maxfragment, md5, iopool, certreq, certgen 2015-01-05 09:53:00 -07:00
Jacob Barthelmeh
accfaf17af update to comment headers 2015-01-05 09:48:43 -07:00
Jacob Barthelmeh
966ca9c97e clean up comments on c files and fix duplicate in chacah header 2015-01-04 23:26:26 -07:00
Jacob Barthelmeh
e6ebbf4fc2 pre-commit pass and update to name change files 2015-01-03 23:33:14 -07:00
Jacob Barthelmeh
2520973b73 update to c files for name change and pwdbased along with debugging src function calls 2015-01-03 19:09:48 -07:00
Jacob Barthelmeh
144798c962 update to md functions and blake for hmac 2015-01-03 17:24:51 -07:00
Jacob Barthelmeh
f64d76257e readjust c files, autoconf, and some header files 2015-01-02 14:56:58 -07:00
Jacob Barthelmeh
b91934f065 change to header files and update of function calls in src folder 2015-01-01 14:48:33 -07:00
Jacob Barthelmeh
5365bdb06c debugging on name change 2015-01-01 07:33:07 -07:00
kaleb-himes
98fa85ed83 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2014-12-31 17:03:33 -07:00
kaleb-himes
aa08c17dc1 sha.c updated 2014-12-31 17:03:07 -07:00
Jacob Barthelmeh
38e129fd24 cleaning up some cyassl 2014-12-31 17:01:27 -07:00
kaleb-himes
87431aa744 version 2014-12-31 16:05:43 -07:00
kaleb-himes
5cff32e271 backing up 2014-12-31 16:04:42 -07:00
Jacob Barthelmeh
e3c82842a5 rsa des3 random : update 2014-12-31 15:31:50 -07:00
kaleb-himes
e6cebf1246 fips preservation update 2014-12-31 15:20:53 -07:00
kaleb-himes
a50af85e95 autoconf, libversioning, .gitignore updated 2014-12-31 14:06:01 -07:00
Jacob Barthelmeh
f81ee9e4d3 addition to aes and alteration to md files 2014-12-31 13:54:57 -07:00
kaleb-himes
88e32c6c5a compatability and sniffer.c 2014-12-31 13:41:30 -07:00
kaleb-himes
2f15d38dc0 fips MD5 checksum preservation 2014-12-31 13:37:51 -07:00
kaleb-himes
b569165ad8 configure.ac updates 2014-12-31 13:04:03 -07:00
Jacob Barthelmeh
3483816f9f fix to test.c and asthetics fo asn_public.h 2014-12-31 11:00:38 -07:00
Jacob Barthelmeh
78e7ffdfa9 rm old asn.c and adjust function calls in new asn.c 2014-12-31 10:42:03 -07:00
kaleb-himes
924abb2d12 accounting for WOLFSSL in md5.h 2014-12-31 10:33:51 -07:00
Jacob Barthelmeh
d1e48e2364 progress on asn 2014-12-31 10:28:13 -07:00
kaleb-himes
59eb83c6e9 auto-tools and wc_ updates 2014-12-31 10:01:32 -07:00
kaleb-himes
62a5548009 compatibility layer additions for wolfssl/ssl.h 2014-12-30 16:19:50 -07:00
kaleb-himes
e8d8f97c64 src/ssl.c, cyassl/ssl.h 2014-12-30 15:48:01 -07:00
Jacob Barthelmeh
e1db640cd5 test for command line utility 2014-12-30 15:37:12 -07:00
kaleb-himes
c0302b4b2c wc_ removed from internal method 2014-12-30 15:19:59 -07:00
Jacob Barthelmeh
3b49b72436 debugging on asn and internal.c 2014-12-30 15:14:27 -07:00
kaleb-himes
0d4a65cd6f pwdbased updated 2014-12-30 14:41:49 -07:00
kaleb-himes
c57609acc3 wc_ udates in src/ directory 2014-12-30 14:13:57 -07:00
Jacob Barthelmeh
7a3fdbc07f debugging for test script 2014-12-30 13:50:40 -07:00
Jacob Barthelmeh
3511454bce Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2014-12-30 13:05:48 -07:00
Jacob Barthelmeh
26a2688f0e debuging test script 2014-12-30 13:05:24 -07:00
kaleb-himes
1c75a6e74f tests/api.c updated 2014-12-30 12:41:26 -07:00
kaleb-himes
23368a2bca ctaocrypt -> wolfcrypt 2014-12-30 11:57:58 -07:00
kaleb-himes
7da867135f wolfssl/openssl/ headers updated 2014-12-30 11:52:21 -07:00
Jacob Barthelmeh
8594ccf2df working on commit tests 2014-12-30 11:00:18 -07:00
kaleb-himes
9f3de72055 src/include.am update 2014-12-30 10:38:41 -07:00
Jacob Barthelmeh
5eef118ff5 test and debug of poly-chacha suites 2014-12-30 10:30:54 -07:00
Jacob Barthelmeh
da2c78026c changes to integer.h 2014-12-30 09:28:25 -07:00
kaleb-himes
bf9d41cbcc src/include.am updated 2014-12-30 09:09:42 -07:00
kaleb-himes
adfa2348ba cleanup 2014-12-29 17:06:45 -07:00
Jacob Barthelmeh
76249dd8ee Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2014-12-29 16:38:47 -07:00
Jacob Barthelmeh
174e2b23c2 ecc check and adjustment to visibility 2014-12-29 16:38:13 -07:00
kaleb-himes
1078106c65 output file specified LIBWOLFSSL_VERSION 2014-12-29 16:33:47 -07:00
kaleb-himes
64d06580c1 examples not seeing WOLFSSL_API 2014-12-29 16:30:26 -07:00
Jacob Barthelmeh
cbbdfc7b96 wolfcrypt api testwolfcrypt update 2014-12-29 14:35:46 -07:00
Jacob Barthelmeh
67858df5e0 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2014-12-29 13:00:07 -07:00
Jacob Barthelmeh
894b888291 update to misc.c integer.c and tfm.c 2014-12-29 12:59:14 -07:00
kaleb-himes
bd1ff08aa9 certs name changes 2014-12-29 11:53:25 -07:00
kaleb-himes
edf53a1ed0 new changes 2014-12-29 10:27:03 -07:00
Jacob Barthelmeh
db383fbbac Merge branch 'master' of https://github.com/cyassl/cyassl 2014-12-22 09:20:57 -07:00
Kaleb Himes
2ab4f6e2f0 echoclient, server, libwolfssl updates 2014-12-22 09:01:53 -07:00
Moisés Guimarães
98cefa88c4 Fixes #136 2014-12-22 12:17:11 -03:00
Moisés Guimarães
64b456df59 Fixes #137 2014-12-22 12:11:00 -03:00
Kaleb Himes
a37fb63c0c examples 2014-12-19 16:53:49 -07:00
Jacob Barthelmeh
279f149828 adjustments to reverse compatibility 2014-12-19 16:31:01 -07:00
Jacob Barthelmeh
77f167790d progress on name change 2014-12-19 15:43:19 -07:00
Jacob Barthelmeh
5107c6c12b debugging linking error 2014-12-19 15:30:07 -07:00
Kaleb Himes
626a4f318e removed ifdef 2014-12-19 15:13:15 -07:00
Kaleb Himes
86ea853eab header and compatibility layer updates 2014-12-19 15:09:20 -07:00
Kaleb Himes
4f15949bd6 compatibility updates 2014-12-19 13:06:42 -07:00
Kaleb Himes
8212f5df46 src and compatability layer updates 2014-12-19 12:50:30 -07:00
Kaleb Himes
c97db6ba6e src updated, CTaoCrypt -> wc_ 2014-12-19 11:27:01 -07:00
Jacob Barthelmeh
42e5c8fb35 sync up 2014-12-19 10:47:38 -07:00
Kaleb Himes
10c4dd7b4c src/include.am fips updates 2014-12-19 10:46:58 -07:00
Kaleb Himes
d6f37bd34f shell files for autotools 2014-12-19 10:19:29 -07:00
Jacob Barthelmeh
a5529b124d moving over more files 2014-12-19 09:56:51 -07:00
Kaleb Himes
f944bf88b0 src/include.am 2014-12-19 09:26:22 -07:00
Kaleb Himes
b70f0938d0 include.am updates 2014-12-19 09:06:27 -07:00
Jacob Barthelmeh
d958a2f3d6 close to build test with --disable-examples option 2014-12-18 15:40:09 -07:00
Jacob Barthelmeh
d2a97b035d header files for des3, hmac, random and rsa 2014-12-18 14:58:09 -07:00
Kaleb Himes
7bab3a9564 headers 2014-12-18 14:53:27 -07:00
Jacob Barthelmeh
e6a629118c api calls to crypt library in portibality layer 2014-12-18 14:23:33 -07:00
Kaleb Himes
2867920d62 Merge branch 'master' of https://github.com/cyassl/cyassl 2014-12-18 14:12:19 -07:00
Kaleb Himes
a073730c38 compatibility layer includes 2014-12-18 14:06:27 -07:00
Jacob Barthelmeh
4898047aca visibility 2014-12-18 13:17:09 -07:00
Kaleb Himes
09a09f80bd wolfssl/wolfcrypt/memory.h 2014-12-18 13:04:32 -07:00
Jacob Barthelmeh
324177a4a8 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2014-12-18 11:57:13 -07:00
Jacob Barthelmeh
ddae6974e3 header files for poly, rabbit, and ripemd 2014-12-18 11:57:05 -07:00
Kaleb Himes
0ce0a7b558 wolfssl/wolfcrypt/visibility.h 2014-12-18 11:52:35 -07:00
Jacob Barthelmeh
557e969b3b Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2014-12-18 11:44:56 -07:00
Jacob Barthelmeh
607760f829 header files for aes, arc4, camellia, chacha, dh, and dsa 2014-12-18 11:44:48 -07:00
Kaleb Himes
fc1ddf117f header updates 2014-12-18 11:40:51 -07:00
Jacob Barthelmeh
d7a3585a96 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2014-12-18 11:11:09 -07:00
Jacob Barthelmeh
50eee6afdf wolf c files for des, hmac, random, and rsa 2014-12-18 11:10:55 -07:00
Kaleb Himes
8c70593da6 header updates 2014-12-18 11:08:12 -07:00
Chris Conlon
c300d77c55 fix PRQA-C level 6 warnings 2014-12-18 09:50:15 -07:00
Jacob Barthelmeh
aa0d339b05 Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2014-12-17 15:48:37 -07:00
Jacob Barthelmeh
664a40844c c files for pkcs, poly, rabbit and ripemd 2014-12-17 15:47:00 -07:00
Kaleb Himes
cf8cf779c5 headers and include.ams 2014-12-17 15:33:22 -07:00
Kaleb Himes
0da381e019 mem.h in wolfcrypt, compatibility layer 2014-12-17 14:59:19 -07:00
Jacob Barthelmeh
6e1a0befdc md's c files 2014-12-17 14:57:56 -07:00
Jacob Barthelmeh
473d1d18a6 chacha, dh, dsa, hc128 c files 2014-12-17 14:37:13 -07:00
Kaleb Himes
0957d275b3 latest 2014-12-17 13:55:34 -07:00
Jacob Barthelmeh
d3acb121ff Merge branch 'master' of https://github.com/kaleb-himes/cyassl 2014-12-17 11:00:07 -07:00
Jacob Barthelmeh
ea3bf1649d in process of shiffting many files 2014-12-17 10:59:27 -07:00
Kaleb Himes
17c37ae208 moved cyassl -> wolfssl 2014-12-17 10:29:35 -07:00
Jacob Barthelmeh
881c0b941a progress on name change, arc4, aes, camilea 2014-12-17 10:28:35 -07:00
Kaleb Himes
53057f0b0d name changes kaleb push 2014-12-17 10:00:17 -07:00
Jacob Barthelmeh
813ad2e102 name change progress 2014-12-17 09:58:11 -07:00
toddouska
34633617f7 fix ecc 64bit cast for systems where long is 32bits 2014-12-11 21:20:39 -08:00
Moisés Guimarães
513ea4d38a add SNI_UNSUPPORTED for better handling SSL 3.0 buffers on CyaSSL_SNI_GetFromBuffer() 2014-12-08 17:31:37 -03:00
Chris Conlon
1ada0dfa31 update README.md for 3.3.0 release 2014-12-05 10:48:27 -07:00
toddouska
15bffb2a1e prepare 3.3.0 release 2014-12-05 09:37:19 -08:00
toddouska
51ffb84e11 fix build errors when compiler is C++ 2014-12-04 17:16:39 -08:00
John Safranek
8105b9efa2 fix bug in sniffer with SNI using the key from ctx rather than the session 2014-12-04 14:16:39 -08:00
toddouska
7aed412512 fix SMALL_STACK typo 2014-12-04 13:44:33 -08:00
toddouska
8ef04a8cde remove exit as goto label 2014-12-04 13:30:30 -08:00
toddouska
e499b8f828 fix dh_test drbg memory leak 2014-12-04 12:46:50 -08:00
toddouska
66f14c8a9a add dh to commit tests 2014-12-04 12:42:39 -08:00
toddouska
5f9660b23e fix aes gcm set key return 2014-12-04 11:51:19 -08:00
toddouska
da5f235d75 Merge branch 'master' of github.com:cyassl/cyassl 2014-12-04 11:25:59 -08:00
toddouska
53cb50761d fix hash hrbg memory leaks 2014-12-04 11:24:38 -08:00
John Safranek
9dc6084e3e Merge branch 'master' of github.com:cyassl/cyassl 2014-12-04 11:22:44 -08:00
John Safranek
9fff57839f fixed saving ServerKeyExchange message in DTLS for most key exchange types 2014-12-04 11:21:19 -08:00
toddouska
7fbf8359e2 fix coverity tell < 0 and store fread bytes issues 2014-12-04 10:53:29 -08:00
John Safranek
a9d9ff8b58 fix sanity check for DHE-PSK cipher suite handshake 2014-12-04 10:27:00 -08:00
toddouska
d3eec77294 fix SMALL Stack change error 2014-12-03 16:10:05 -08:00
toddouska
3f53d9f229 fix sniffer coverity problem 2014-12-03 16:06:28 -08:00
toddouska
a4a3ebb567 use input stream record end for sniffer multi msg 2014-12-03 14:44:18 -08:00
toddouska
d552390b39 allow sniffer muliple msgs per record to handle encrypted msgs too 2014-12-03 14:12:13 -08:00
toddouska
264e180147 allow sniffer to handle bundled record layer messages 2014-12-03 11:58:50 -08:00
toddouska
f1c6e901a4 allow user to set sniffer cache timeout at compile time w/ CYASSL_SNIFFER_TIMEOUT 2014-12-02 10:33:10 -08:00
toddouska
09d290f552 allow user to set session timeout at compile time w/ CYASSL_SESSION_TIMEOUT 2014-12-02 10:28:47 -08:00
toddouska
1688fd1670 help static anaylsis 2014-12-01 16:35:04 -08:00
toddouska
52c2c126c1 turncate hashSigAlgoSz to max buffer size 2014-12-01 15:53:59 -08:00
toddouska
09aeda2162 fix SetCipherList() possible 1 byte overrun 2014-12-01 14:34:48 -08:00
toddouska
295e65ca02 add sanity size check to iv fill in case block size is bad 2014-12-01 14:23:10 -08:00
toddouska
4954043def release lock on client side cache bad hash 2014-12-01 14:11:32 -08:00
John Safranek
1742e0ddb6 Merge in the ADH-AES128-SHA changes and add a check for it during the
packet order sanity checking.
2014-12-01 11:44:32 -08:00
toddouska
b2f9d62852 make HASH-DRBG default RNG w/ autoconf 2014-12-01 09:12:26 -08:00
toddouska
fe81c2855d sanity size check on handshake headers 2014-12-01 08:58:52 -08:00
toddouska
1f8d84553c add server_ready file to externally monitor example server for ready to accept, -r option 2014-11-26 12:13:47 -08:00
John Safranek
438cb515d5 added a make clean after updating the verify hash when running the fips check 2014-11-24 15:52:47 -08:00
John Safranek
98db39a913 fixed the check in commit-tests to see if FIPS test should run 2014-11-24 13:33:14 -08:00
John Safranek
f7235819d2 bugfix in the FIPS check script 2014-11-24 12:50:55 -08:00
toddouska
a352908c61 fix optimized fastmath read digit for explicit 32bit digits 2014-11-24 10:00:13 -08:00
John Safranek
65c0dd4f8a Added fips-check script when running commit-tests. 2014-11-19 12:00:04 -08:00
toddouska
17a4cc8239 fix ctaocrypt test RNG leak when using HASH-DRBG 2014-11-18 16:52:37 -08:00
toddouska
f1ab188949 disallow client to fast forward handshake messages 2014-11-18 16:27:39 -08:00
toddouska
25362268db Merge pull request #132 from tisb/master
Fix for TI-RTOS CyaSSL build errors
2014-11-17 17:16:11 -08:00
Vikram Adiga
9fd6e680a2 Removed extra comma to avoid TI compiler warnings. 2014-11-17 15:58:19 -08:00
Vikram Adiga
e0bec88f76 fixed build errors for TI-RTOS. 2014-11-17 15:58:05 -08:00
toddouska
59e62b7c49 Merge pull request #131 from lchristina26/master
add braces around empty if statements
2014-11-17 15:30:14 -08:00
toddouska
57522d217b disallow basic server fast forwards during handshake 2014-11-17 15:25:49 -08:00
toddouska
31858d2a34 move gotChangeCipher from options into msgsReceived 2014-11-17 13:11:45 -08:00
toddouska
5318b243ba add messages received framework, disallow duplicates 2014-11-17 12:55:07 -08:00
lchristina26
b3b0c8d1fc Add braces around empty if statements 2014-11-17 11:10:23 -07:00
toddouska
de388bf37f version 3.2.6 2014-11-14 11:49:14 -08:00
John Safranek
2c85756130 fixed carry error on array add in HashDRBG 2014-11-13 18:08:23 -08:00
toddouska
6c2a238c9b bump version 2014-11-13 10:19:03 -08:00
toddouska
730cede82d add HAVE_FORCE_FIPS_FAILURE for operational testing 2014-11-12 17:09:16 -08:00
John Safranek
6944eb69f6 added error code for AESGCM FIPS KAT test error 2014-11-10 15:38:41 -08:00
Chris Conlon
654c421441 fix benchmark error with NO_AES, jenkins found 2014-11-10 10:13:23 -07:00
John Safranek
eb59597fed fix bug in sniffer when using old client hellos where large hello message may
be ignored
2014-11-07 17:11:38 -08:00
John Safranek
54f678b9ee Merge branch 'master' of github.com:cyassl/cyassl 2014-11-07 17:06:04 -08:00
John Safranek
12a6978401 refactored HashDRBG to remove some redundant code 2014-11-07 17:05:18 -08:00
toddouska
eda2103dc3 add size check to fips core hash gen 2014-11-07 16:43:32 -08:00
toddouska
e6e24d92fb Merge branch 'master' of github.com:cyassl/cyassl 2014-11-07 16:23:56 -08:00
toddouska
81fd594c9f add fips get status functions 2014-11-07 16:23:19 -08:00
Chris Conlon
4d819dea87 fix hashType warning on Linux 2014-11-07 17:19:11 -07:00
John Safranek
138ce50bae Merge branch 'master' of github.com:cyassl/cyassl 2014-11-07 15:36:49 -08:00
John Safranek
00965d44dc fix sniffer bug with detecting old client hello 2014-11-07 15:35:36 -08:00
Chris Conlon
71da84122f expose EncodeSignature() for DER-encoded comparisons 2014-11-07 16:33:38 -07:00
John Safranek
a45a8f2cd8 Merge branch 'master' of github.com:cyassl/cyassl 2014-11-07 14:40:21 -08:00
John Safranek
d829b5f93b Allow sniffer to follow ports using STARTTLS. 2014-11-07 14:37:00 -08:00
Chris Conlon
233bca3346 add RsaPublicKeyDecodeRaw() to load key from existing n, e 2014-11-07 15:24:02 -07:00
toddouska
b36f823da5 only do fips verify core check on fips files 2014-11-07 13:09:32 -08:00
John Safranek
4441e3be1a HashDRBG continuity failure passed up to caller 2014-11-07 12:08:26 -08:00
John Safranek
3130145213 Added note to SSL_ResourceFree() 2014-11-06 16:07:05 -08:00
John Safranek
580289375c Fix memory leak in CyaSSL when using Hash DRBG 2014-11-06 15:44:24 -08:00
toddouska
f11d2c435d add fips continuous test error code/msg 2014-11-06 14:56:11 -08:00
toddouska
202a1a152d fix jenkins report for smallstack derive tls keys 2014-11-04 15:39:54 -08:00
toddouska
322f79f521 allow user to set minimum downgrade version with v23 methods() 2014-11-03 15:12:48 -08:00
toddouska
d9f5ada772 add external wrappers for TLS Master Secret generation and Key Expansion 2014-11-03 09:56:40 -08:00
toddouska
02f7c71222 Merge branch 'master' of github.com:cyassl/cyassl 2014-10-31 13:24:29 -07:00
toddouska
0f641e07a2 remove old client hello processing by default, can turn on with OLD_HELLO_ALLOWED, add sanity checks before size front alloc 2014-10-31 13:23:50 -07:00
Chris Conlon
2fe0d9b38d update RNG_HealthTest to output generated bits 2014-10-31 14:05:13 -06:00
John Safranek
bb8853aa50 fix memory leak when resetting the peer address on a DTLS session 2014-10-30 16:23:25 -07:00
John Safranek
56c12c9716 For sniffer with SNI, refactored ssl_SetPrivateKey and
ssl_SetNamedPrivateKey so they can be called in any order
for a particular server.
2014-10-30 14:08:45 -07:00
toddouska
1e7b579777 sniffer signals got change cipher 2014-10-29 14:14:32 -07:00
toddouska
7fed36b09d explicit check for change cipher before finished instead of encryptionOn implicit 2014-10-29 14:07:41 -07:00
toddouska
a4228740f5 add FIPS pos errors and messages, better output for in core check and how to fix 2014-10-28 14:21:55 -07:00
toddouska
247bef6be3 add fips pos cb for fail codes, generated hash 2014-10-28 14:03:58 -07:00
toddouska
c982dd2281 allow aes gcm fips wrappers, no void returns 2014-10-27 15:52:22 -07:00
John Safranek
bf718a7d51 Added a callback function to set the master secret on the client 2014-10-24 15:26:47 -07:00
Moisés Guimarães
6138ce720c internal.c: refactoring SendServerKeyExchange to reduce stack usage:
--- variable md5 moved to the heap (sizeof(Md5) saved)
--- variable sha moved to the heap (sizeof(Sha) saved)
--- variable hash moved to the heap (36 bytes saved)
--- variable sha256 moved to the heap (sizeof(Sha256) saved)
--- variable hash256 moved to the heap (32 bytes saved)
--- variable sha384 moved to the heap (sizeof(sha384) saved)
--- variable hash256 moved to the heap (48 bytes saved)
--- variable encodedSig moved to the heap (512 bytes saved)
*** the variables above appear twice in the code
2014-10-24 13:51:58 -03:00
Moisés Guimarães
dc90935fc7 internal.c: refactoring SendServerKeyExchange to reduce stack usage:
--- variable exportBuf moved to the heap (256 bytes saved)
--- indentation fixes
2014-10-24 13:29:18 -03:00
Moisés Guimarães
0e43240180 trims trailing white spaces. 2014-10-24 10:33:24 -03:00
John Safranek
62f0c9f661 Merge branch 'master' of github.com:cyassl/cyassl 2014-10-23 14:08:11 -07:00
John Safranek
4d7f26af8d Add continuous block test to Hash DRBG 2014-10-23 14:07:31 -07:00
Chris Conlon
6108f9cd45 add LICENSING file 2014-10-22 14:26:20 -06:00
Chris Conlon
b64b864431 Merge pull request #130 from tass-belgium/master
Updated picoTCP support, based on newer HTTPS demo
2014-10-22 14:10:57 -06:00
Daniele Lacamera
fde4d56845 Updated picoTCP support, based on newer HTTPS demo 2014-10-22 12:11:31 +02:00
Moisés Guimarães
a60332d9a3 internal.c: refactoring DoServerKeyExchange to reduce stack usage:
--- using goto to centralize resources deallocation.
2014-10-21 20:23:50 -03:00
Moisés Guimarães
5056ebe829 internal.c: refactoring DoServerKeyExchange to reduce stack usage:
--- variable hash256 moved to the heap (32 bytes saved)
--- variable hash384 moved to the heap (48 bytes saved)
--- variable hash moved to the heap (36 bytes saved)
--- variable messageVerify moved to the heap (612 bytes saved)
--- variable encodedSig moved to the heap (512 bytes saved)
2014-10-21 20:23:50 -03:00
Moisés Guimarães
0447bf7551 internal.c: refactoring DoServerKeyExchange to reduce stack usage:
--- variable md5 moved to the heap (sizeof(Md5) saved)
--- variable sha moved to the heap (sizeof(Sha) saved)
--- variable sha256 moved to the heap (sizeof(Sha256) saved)
--- variable sha384 moved to the heap (sizeof(Sha384) saved)
2014-10-21 20:23:50 -03:00
Moisés Guimarães
7f836cd6b3 internal.c: refactoring SendClientKeyExchange to reduce stack usage:
--- variable encSecret moved to the heap (1027 bytes saved)
--- variables priv moved to the heap (1024 bytes saved)
2014-10-21 20:23:50 -03:00
Moisés Guimarães
949094cfbc internal.c: refactoring DoCertificateVerify to reduce stack usage:
--- variable encodedSig moved to the heap (512 bytes saved)
2014-10-21 20:23:50 -03:00
Moisés Guimarães
9368c8d1e8 internal.c: refactoring SendCertificateVerify to reduce stack usage:
--- variable encodedSig moved to the heap (512 bytes saved)
2014-10-21 20:23:50 -03:00
Moisés Guimarães
845e49781f internal.c: refactoring DoServerHello to reduce stack usage:
--- variable clSuites removed (sizeof(Suites) saved)

ps.: TLSX_Parse() does not requires the suites parameter at client side.
2014-10-21 20:23:50 -03:00
Moisés Guimarães
a7e585b63d internal.c: refactoring BuildMessage to reduce stack usage:
--- variable hmac moved to the heap (up to 64 bytes saved)
2014-10-21 20:23:50 -03:00
Moisés Guimarães
5ef9a21eaa internal.c: refactoring DoCertificate to reduce stack usage:
--- variable domain moved to the heap (256 bytes saved)
--- variable dCert moved to the heap (sizeof(DecodedCert) saved)
--- variable store moved to the heap (sizeof(CYASSL_X509_STORE_CTX) saved)
2014-10-21 20:23:49 -03:00
Moisés Guimarães
37c1627234 internal.c: refactoring BuildFinished to reduce stack usage:
--- variable md5 moved to the heap (sizeof(Md5) saved)
--- variable sha moved to the heap (sizeof(Sha) saved)
--- variable sha256 moved to the heap (sizeof(Sha256) saved)
--- variable sha384 moved to the heap (sizeof(Sha384) saved)
2014-10-21 20:23:49 -03:00
Chris Conlon
50a00d4ff0 add PicoTCP support 2014-10-21 15:43:43 -06:00
John Safranek
e35e02a283 Added SNI named keys to the sniffer. 2014-10-21 12:22:12 -07:00
John Safranek
35bcc98948 Added a callback when receiving a NewSessionTicket handshake message. 2014-10-20 09:25:14 -07:00
John Safranek
60790ee4ae Merge branch 'master' of github.com:cyassl/cyassl 2014-10-16 22:01:55 -07:00
John Safranek
b2f25cd91c 1. Added accessors for session tickets.
2. Fixed client case when server doesn't want to resume session with ticket.
2014-10-16 22:00:13 -07:00
Moisés Guimarães
c2ade678e1 Adds use of ssl->session.sessionIDSz during SendClientHello(). 2014-10-13 23:16:11 -03:00
Moisés Guimarães
b10fdbf1f0 Adds storage of ssl->arrays->sessionIDSz in SessionCache at AddSession();
Adds storage of ssl->arrays->sessionIDSz in ssl->session at FreeArrays();
2014-10-13 23:16:11 -03:00
Moisés Guimarães
6956d146d1 Adds capture of ssl->arrays->sessionIDSz at DoServerHello. 2014-10-13 23:16:11 -03:00
Moisés Guimarães
e98eb1ba4d Adds sessionIDSz to CYASSL_SESSION and Arrays. 2014-10-13 23:16:11 -03:00
toddouska
08cdf91761 bump version 2014-10-13 14:44:39 -07:00
toddouska
d457ff8d71 don't set GetLength input value to negative in error case, shouldn't matter if return value checked 2014-10-10 10:25:42 -07:00
toddouska
159abadd73 add NO_FORCE_SCR_SAME_SUITE flag for scr 2014-10-09 11:10:40 -07:00
toddouska
5019eab073 Merge branch 'master' of github.com:cyassl/cyassl 2014-10-07 15:51:38 -07:00
toddouska
54049c6000 allow dhe 4096bit for ssl key exchange 2014-10-07 15:50:33 -07:00
Moisés Guimarães
557f19db0b Adds support to session IDs of size 1 to 31 bytes.
Only session IDs of size 0 or 32 bytes was allowed before, now the session ID size may be from 0 to 32 bytes.
A size of zero bytes means that is no session ID provided by the server.
2014-10-07 13:02:59 -03:00
toddouska
c65b14a891 add scr check against subject hash, only allow explicit session ticket resupmtion during scr 2014-10-06 16:12:45 -07:00
toddouska
214eba0325 fix session ticket get size 2014-10-06 14:52:05 -07:00
John Safranek
7c67a9261c trimmed some unused code for session tickets 2014-10-06 12:44:52 -07:00
John Safranek
954740e2a8 Added check for expected session ticket 2014-10-04 12:41:51 -07:00
John Safranek
b95b2a8463 Merge branch 'master' of github.com:cyassl/cyassl 2014-10-03 13:27:22 -07:00
John Safranek
80a474ebad 1. Fixed encoding of session ticket hello extension.
2. Session tickets used as alternative resumption.
2014-10-03 13:19:59 -07:00
toddouska
24bfade874 catch user error with write() after WANT_WRITE with short size 2014-10-03 12:03:20 -07:00
toddouska
3f01f097e7 allow scr sessoin ticket 2014-10-02 10:43:06 -07:00
toddouska
668fed4796 don't allow scr and fake indication together 2014-10-02 10:18:11 -07:00
John Safranek
9dbc1d2d00 Parse the NewSessionTicket handshake message 2014-10-01 16:28:01 -07:00
toddouska
2f5520d14c fix potential resource leaks with scr and normal math on key reuse 2014-10-01 11:15:36 -07:00
toddouska
8e96234513 Merge branch 'master' of github.com:cyassl/cyassl 2014-10-01 09:45:57 -07:00
toddouska
41647e441a preview scr 2014-10-01 09:44:24 -07:00
Moisés Guimarães
ee68797cf1 Adds a flag to tell the handshake framework to expect a session ticket. 2014-09-30 18:50:19 -03:00
toddouska
eb42494ddd check scr cipher suite for changes 2014-09-30 12:55:15 -07:00
toddouska
29d4148637 handle bunlded scr messages 2014-09-30 11:52:21 -07:00
Moisés Guimarães
a937040087 Adds Session Ticket TLS Extension handling.
New Session Ticket Handshake Message handling is still needed for Session Tickets to work.
2014-09-30 09:30:23 -03:00
Moisés Guimarães
6a75c8d144 fix TURN_ON mask
adds --enable-session-ticket configure option
2014-09-30 09:30:23 -03:00
toddouska
f81f22799a separate allow scr and force client scr in example client 2014-09-29 15:32:41 -07:00
toddouska
dcde28db51 add server initiated scr 2014-09-29 14:48:49 -07:00
toddouska
d3db4546ec allow client auth with scr 2014-09-29 13:38:56 -07:00
toddouska
369b7559c5 fix session ticket warnings 2014-09-26 16:16:11 -07:00
Moisés Guimarães
c340d78c93 adds SESSION_TICKET extension id.
adds HAVE_TLS_EXTENSIONS as a dependency to HAVE_SECURE_RENEGOTIATION
reduces tlsx semaphore from 16 to 8 bytes (128 flags to 64 flags).
refactors ConvertExtType() to TLSX_ToSemaphore() for a better name and behavior. Now the overflowing flags are set backwards from the end of the flags to avoid collisions.
2014-09-26 16:01:50 -03:00
toddouska
95585e93df scr session resumption example 2014-09-26 10:47:57 -07:00
toddouska
a260171e23 add scr for ephemeral keys 2014-09-26 10:27:14 -07:00
Jacob Barthelmeh
f5a95a9f62 struct for one time authentication ciphers 2014-09-25 16:19:50 -06:00
toddouska
0c20584ed3 add client side initiated secure r, same specs 2014-09-24 18:48:23 -07:00
toddouska
74c6f35766 new handShakeDone flag to allow app data during scr 2014-09-24 13:10:01 -07:00
toddouska
21f46373f3 delay SetKeys() with SetKeysSide() until last possible moment, needed for scr 2014-09-24 11:27:13 -07:00
toddouska
ed1beafdfc allow SetKeys() to be called with encrypt or decrypt, or both 2014-09-24 10:12:22 -07:00
Moisés Guimarães
596148840d adds braces requested by commit_tests.sh on linux 2014-09-22 13:17:05 -03:00
Moisés Guimarães
613337cf89 ssl: refactoring PemToDer to reduce stack usage:
--- variable header moved to the heap (80 bytes saved)
--- variable footer moved to the heap (80 bytes saved)
--- variable password moved to the heap (80 bytes saved)

fixes memory leak in CyaSSL_RAND_bytes
2014-09-22 11:37:36 -03:00
Moisés Guimarães
d9472d65da ssl: refactoring ProcessBuffer to reduce stack usage:
--- variable password moved to the heap (80 bytes saved)
--- variable key moved to the heap (32 bytes saved)
--- variable iv moved to the heap (16 bytes saved)
--- variable Des moved to the heap (sizeof(Des) saved)
--- variable Des3 moved to the heap (sizeof(Des3) saved)
--- variable Aes moved to the heap (sizeof(Aes) saved)
--- variable RsaKey moved to the heap (sizeof(RsaKey) saved)

Utility functions added to Des, Des3 and Aes for easier decryption.
2014-09-22 11:37:36 -03:00
Moisés Guimarães
df3ea53494 replaces tabs with spaces. 2014-09-22 11:37:35 -03:00
Moisés Guimarães
e9af29e3e3 ssl: refactoring CyaSSL_CTX_load_verify_locations to reduce stack usage:
--- variable name moved to the heap (256 bytes saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
cb9dafca26 ssl: refactoring CyaSSL_SetTmpDH_buffer_wrapper to reduce stack usage:
--- variable p moved to the heap (513 bytes saved)
--- variable p moved to the heap (513 bytes saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
3281e0dfcf ssl: refactoring CyaSSL_RAND_bytes to reduce stack usage:
--- variable tmpRNG moved to the heap (sizeof(RNG) saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
7cafb11791 ssl: refactoring CyaSSL_BN_rand to reduce stack usage:
--- variable decoded moved to the heap (1024 bytes saved)
--- variable tmpRNG moved to the heap (sizeof(RNG) saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
68063874dc ssl: refactoring CyaSSL_BN_hex2bn to reduce stack usage:
--- variable decoded moved to the heap (1024 bytes saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
4b783b3d80 ssl: refactoring SetDhInternal to reduce stack usage:
--- variable p moved to the heap (1024 bytes saved)
--- variable g moved to the heap (1024 bytes saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
5605a24e4f ssl: refactoring CyaSSL_DH_generate_key to reduce stack usage:
--- variable tmpRNG moved to the heap (sizeof(RNG) saved)
--- variable pub moved to the heap (1024 bytes saved)
--- variable priv moved to the heap (1024 bytes saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
6b7dbb9f2a ssl: refactoring CyaSSL_DH_compute_key to reduce stack usage:
--- variable pub moved to the heap (1024 bytes saved)
--- variable priv moved to the heap (1024 bytes saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
cab23472be ssl: refactoring CyaSSL_RSA_generate_key_ex to reduce stack usage:
--- variable rng moved to the heap (sizeof(RNG) saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
c325504de7 ssl: refactoring CyaSSL_DSA_do_sign to reduce stack usage:
--- variable tmpRNG moved to the heap (sizeof(RNG) saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
3f459591c6 ssl: refactoring CyaSSL_RSA_sign to reduce stack usage:
--- variable tmpRNG moved to the heap (sizeof(RNG) saved)
--- variable encodedSig moved to the heap (512 bytes saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
961bf710bc Removes unnecessary indentation. Since we use 80 characters line wrap, every space is important. 2014-09-22 11:37:35 -03:00
Moisés Guimarães
79dfb3a3c3 ssl: refactoring CyaSSL_HMAC to reduce stack usage:
--- variable hmac moved to the heap (sizeof(Hmac) saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
8eeadc01b9 ssl: refactoring HashSession to reduce stack usage:
--- variable md5 moved to the heap (sizeof(Md5) saved)
--- variable sha moved to the heap (sizeof(Sha) saved)
--- variable sha256 moved to the heap (sizeof(Sha256) saved)

ssl: refactoring CyaSSL_EVP_BytesToKey to reduce stack usage:
--- variable md5 moved to the heap (sizeof(Md5) saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
19516cf5fd ssl: refactoring AddCA to reduce stack usage:
--- variable cert moved to the heap (sizeof(DecodedCert) saved)

ssl: refactoring ProcessBuffer to reduce stack usage:
--- variable cert moved to the heap (sizeof(DecodedCert) saved)

ssl: refactoring CyaSSL_CertManagerCheckOCSP to reduce stack usage:
--- variable cert moved to the heap (sizeof(DecodedCert) saved)

ssl: refactoring CyaSSL_CertManagerCheckCRL to reduce stack usage:
--- variable cert moved to the heap (sizeof(DecodedCert) saved)

ssl: refactoring CyaSSL_X509_d2i to reduce stack usage:
--- variable cert moved to the heap (sizeof(DecodedCert) saved)

ssl: refactoring CyaSSL_X509_load_certificate_file to reduce stack usage:
--- variable cert moved to the heap (sizeof(DecodedCert) saved)

ssl: refactoring CyaSSL_get_chain_X509 to reduce stack usage:
--- variable cert moved to the heap (sizeof(DecodedCert) saved)
2014-09-22 11:37:35 -03:00
Moisés Guimarães
b2b5179392 fix indentation -- no code changed. 2014-09-22 11:37:35 -03:00
Moisés Guimarães
b22e3abfff ssl: refactoring CyaSSL_PemCertToDer to have a single return point. 2014-09-22 11:37:35 -03:00
Moisés Guimarães
958ec5d578 ssl: refactoring ProcessBuffer to reduce stack usage:
--- variable staticBuffer moved to the heap (1023 bytes saved)

ssl: refactoring CyaSSL_PemCertToDer to reduce stack usage:
--- variable staticBuffer moved to the heap (1023 bytes saved)

ssl: refactoring CyaSSL_X509_load_certificate_file to reduce stack usage:
--- variable staticBuffer moved to the heap (1023 bytes saved)

ssl: refactoring CyaSSL_cmp_peer_cert_to_file to reduce stack usage:
--- variable staticBuffer moved to the heap (1023 bytes saved)

ssl: refactoring ProcessFile to reduce stack usage:
--- variable staticBuffer moved to the heap (1023 bytes saved)

ssl: refactoring CyaSSL_CertManagerVerify to reduce stack usage:
--- variable staticBuffer moved to the heap (1023 bytes saved)

ssl: refactoring CyaSSL_SetTmpDH_file_wrapper to reduce stack usage:
--- variable staticBuffer moved to the heap (1023 bytes saved)

ssl: refactoring CyaSSL_writev to reduce stack usage:
--- variable staticBuffer moved to the heap (1023 bytes saved)
2014-09-22 11:37:34 -03:00
Moisés Guimarães
82d2aca505 ssl: refactoring CyaSSL_CertManagerVerifyBuffer to reduce stack usage:
--- variable cert moved to the heap (sizeof(DecodedCert) saved)
2014-09-22 11:37:34 -03:00
Moisés Guimarães
d264a8f890 ssl: refactoring ProcessBuffer to reduce stack usage:
--- variable info moved to the heap (sizeof(EncryptedInfo) saved)

ssl: refactoring CyaSSL_CertManagerVerifyBuffer to reduce stack usage:
--- variable info moved to the heap (sizeof(EncryptedInfo) saved)

ssl: refactoring CyaSSL_PemCertToDer to reduce stack usage:
--- variable info moved to the heap (sizeof(EncryptedInfo) saved)

ssl: refactoring CyaSSL_X509_load_certificate_file to reduce stack usage:
--- variable info moved to the heap (sizeof(EncryptedInfo) saved)

ssl: refactoring CyaSSL_cmp_peer_cert_to_file to reduce stack usage:
--- variable info moved to the heap (sizeof(EncryptedInfo) saved)
2014-09-22 11:37:34 -03:00
Moisés Guimarães
97548cc842 ssl: refactoring CyaSSL_CertPemToDer to reduce stack usage:
--- variable info moved to the heap (sizeof(EncryptedInfo) saved)

ssl: refactoring CyaSSL_KeyPemToDer to reduce stack usage:
--- variable info moved to the heap (sizeof(EncryptedInfo) saved)
2014-09-22 11:37:34 -03:00
Chris Conlon
27ad083dbf add CodeWarrior wolfCrypt benchmark project files 2014-09-19 11:25:08 -06:00
Chris Conlon
d284225b7e add SHA-384 benchmark 2014-09-19 11:07:30 -06:00
Moisés Guimarães
d61af5d9ae adds record_overflow alert used by max_fragment_length tls extension. 2014-09-18 21:53:10 -03:00
Chris Conlon
63a90d9cb6 fix CodeWarrior wolfCrypt test debug configuration 2014-09-18 15:53:13 -06:00
Chris Conlon
231bfd5b85 update MQX example project README 2014-09-17 16:59:10 -06:00
Chris Conlon
cfa71e82cc update .gitignore for CodeWarrior files 2014-09-17 16:55:02 -06:00
Chris Conlon
ecc6ef19d1 update cyassl_client CodeWarrior project files 2014-09-17 16:53:53 -06:00
Chris Conlon
b4e58a4105 update wolfcrypt_test CodeWarrior project files 2014-09-17 16:50:45 -06:00
Chris Conlon
53b5d7d7f4 update util_lib CodeWarrior project files 2014-09-17 16:39:15 -06:00
Chris Conlon
c1bfdeeb81 update cyassl CodeWarrior project files 2014-09-17 16:35:45 -06:00
toddouska
75657aad40 secure r extensions, sizes correct 2014-09-17 13:49:51 -07:00
toddouska
110a65d41a fix secure r extensions send/recv 2014-09-16 18:56:32 -07:00
toddouska
a735a52608 switch to extensions secure r state 2014-09-16 17:26:57 -07:00
Moisés Guimarães
d80e820654 Renames TLSX_Append to TLSX_Push, adding data param and making sure the list doesn't holds duplicate extensions.
Adds SecureRenegotiation functions
2014-09-16 20:33:17 -03:00
Moisés Guimarães
89b972d946 Renames TLSX_Append to TLSX_Push, adding data param and making sure the list doesn't holds duplicate extensions.
Adds SecureRenegotiation functions
2014-09-16 20:21:29 -03:00
Moisés Guimarães
32cea012d9 Adds secure renegotiation TLSX_Type, structure and enabler function. 2014-09-16 20:21:29 -03:00
toddouska
91e4545441 use new name under tlsx for secure r flags 2014-09-16 16:19:22 -07:00
Chris Conlon
496f1481ab fixes for Freescale MQX, CodeWarrior GCC 2014-09-16 15:43:51 -06:00
toddouska
4bb20612a1 move secure r inside of tls extensions 2014-09-16 12:42:13 -07:00
toddouska
9a90a0c113 save secure r verify data 2014-09-16 11:51:13 -07:00
toddouska
2e6b472ace init secure r state 2014-09-15 15:22:13 -07:00
toddouska
996418c383 add secure reneg state variables 2014-09-15 15:18:01 -07:00
toddouska
f45ffe4a38 fix clang analyzer warning 2014-09-12 11:14:23 -07:00
Chris Conlon
7ed180a04b update README.md 2014-09-10 18:01:13 -06:00
Chris Conlon
7ea5d6c509 bump version to 3.2.0 2014-09-10 16:46:39 -06:00
Chris Conlon
0a96557102 update README 2014-09-10 16:43:37 -06:00
Chris Conlon
c2c9922380 fix Visual Studio warning, scan-build issue 2014-09-10 16:17:13 -06:00
Chris Conlon
8d902637b2 add ctaocrypt_test() return value to fix err_sys() on IAR 2014-09-10 11:10:51 -06:00
John Safranek
91214ad5a6 Fixed issue with ECDH-ECDSA cipher suites rejecting certificates without
the DigitalSignature key usage.
2014-09-09 17:49:38 -07:00
John Safranek
ddeb1bb9f7 Verify RSA type 1 padding. 2014-09-09 15:35:54 -07:00
toddouska
6175a2a20c cleanup fp cache on examples with thread local storage 2014-09-09 10:14:32 -07:00
toddouska
2c595139db fix tirtos merge 2014-09-08 19:40:03 -07:00
toddouska
3a0837ffd5 sanity size checks on ecc private key import 2014-09-08 12:14:58 -07:00
toddouska
ca3f879907 Merge branch 'master' of github.com:cyassl/cyassl 2014-09-08 11:35:06 -07:00
toddouska
9e40e967a0 add ecc key to DER, make sure ctaocrypt test errors always caught at make check level 2014-09-08 11:33:06 -07:00
Moisés Guimarães
d6b4f85d7c Makes TLS_EMPTY_RENEGOTIATION_INFO_SCSV suite optional if using SetCipherList() 2014-09-08 15:03:30 -03:00
Moisés Guimarães
a905d3f877 add libpq-dev (bump dependency) 2014-09-08 14:29:55 -03:00
toddouska
f8f9008c96 simplify hello_request padSz calc with cached value 2014-09-05 16:18:10 -07:00
toddouska
c8d67670f3 fix hello_request processing w/ mac-verify at upper layer 2014-09-05 14:29:18 -07:00
Chris Conlon
422a2b8be8 change word type to cyassl_word to prevent conflicts with some toolchains 2014-09-05 10:17:24 -06:00
Moisés Guimarães
ffd7dd3555 fix github issue #126
api tests refectory with ifdef and prototypes cleaning + use of asserts. Now, if the tests fails, it will point the line error and expected behavior like this:

ERROR - tests/api.c line 715 failed with:

    test:   server_args.return_code is true

    result: server_args.return_code => FALSE
2014-09-04 14:17:55 -03:00
John Safranek
ce0df18c58 Merge branch 'master' of github.com:cyassl/cyassl 2014-09-03 23:10:53 -07:00
John Safranek
1a88e9fbdc Added function to flatten the RSA public key to a pair of byte arrays 2014-09-03 23:10:10 -07:00
toddouska
907670f89a fix github issue #127 2014-09-03 16:56:49 -07:00
Moisés Guimarães
8bb52380a8 TLS_EMPTY_RENEGOTIATION_INFO_SCSV added on SetCipherList.
Function InitSuitesHashSigAlgo() extracted from InitSuites and SetCipherList.
2014-09-01 18:35:30 -03:00
Moisés Guimarães
7f18a39b7a ignore .vagrant folder created by Vagrant 2014-09-01 13:53:45 -03:00
toddouska
e30a06329b fix scan-build issues 2014-08-29 18:35:54 -07:00
toddouska
b02b648c4d fix mp_val non prime issue 2014-08-29 18:09:18 -07:00
toddouska
658f3ec073 fix memory leaks on todays pushes 2014-08-29 15:15:42 -07:00
toddouska
03800a9df4 Merge branch 'keycomp' 2014-08-29 14:34:44 -07:00
toddouska
dbfe2aa242 fix raw import inits 2014-08-29 14:33:48 -07:00
toddouska
3072edb696 add compressed key support 2014-08-29 14:25:58 -07:00
Chris Conlon
7e7cbdc715 add raw ECC key import functionality and tests 2014-08-29 10:46:25 -06:00
John Safranek
2362dfdfa8 Fixed minor typecasting bugs for OCSP 2014-08-28 16:04:51 -07:00
toddouska
b6345d654a delay ssl server from creating ecdhe key until really needed 2014-08-27 10:48:19 -07:00
toddouska
d5d3292ba7 break out of case correctly at end 2014-08-26 16:59:34 -07:00
John Safranek
496228e5b0 Merge branch 'master' of github.com:cyassl/cyassl 2014-08-19 22:38:42 -07:00
John Safranek
100f0e8a96 Don't allow sniffer to decrypt records if the key hasn't been setup. (Possible with misbehaving client.) 2014-08-19 22:38:04 -07:00
Chris Conlon
72be4a31ef Add AES-GCM/CCM/Direct support for mmCAU, rearrange aes.c to better accommodate hardware crypto 2014-08-18 13:27:53 -06:00
toddouska
87564bdffe get_cipher fixes 2014-08-15 10:56:38 -07:00
toddouska
aaf4e74453 Merge https://github.com/ShaneIsrael/cyassl into shane 2014-08-15 10:03:50 -07:00
toddouska
e975c36988 Merge pull request #121 from kaleb-himes/master
All suites build initially
2014-08-15 09:55:42 -07:00
toddouska
7752fe0331 Merge pull request #122 from JacobBarthelmeh/master
Fuzzer callbacks with fuzzer ctx pointer
2014-08-15 09:43:31 -07:00
John Safranek
7e6b3a86d5 Added more bounds checking when saving a DTLS message fragment. 2014-08-14 15:14:29 -07:00
Shane Israel
11bc26d839 Update README.md 2014-08-14 11:37:30 -06:00
Shane Israel
ae1153a721 Update README.md 2014-08-14 11:36:24 -06:00
Shane Israel
6e45a79eb0 Update README.md 2014-08-14 11:33:12 -06:00
Shane Israel
e0c5d797a2 Update README.md 2014-08-14 11:15:51 -06:00
Shane Israel
be296edea0 Update README.md 2014-08-14 11:11:47 -06:00
ShaneIsrael
aedbb299b1 added README.md 2014-08-14 11:01:08 -06:00
JacobBarthelmeh
1a4c7811a6 Merge remote-tracking branch 'upstream/master' 2014-08-14 09:04:29 -06:00
Kaleb Himes
a7c0f66813 all suites build initially 2014-08-13 13:06:04 -06:00
Kaleb Himes
a23e0c3f5a all suites build initially 2014-08-13 12:59:28 -06:00
ShaneIsrael
57f2affe20 Added GetCipherName() which takes an index 2014-08-13 09:46:13 -06:00
ShaneIsrael
f043b90a7f fixed line comment 2014-08-12 16:30:51 -06:00
JacobBarthelmeh
856aab7f30 add fuzzer CYASSL* and fuzzer ctx 2014-08-12 16:25:58 -06:00
ShaneIsrael
bb9696c9f2 Added CyaSSL_get_ciphers() and necessary functions 2014-08-12 16:17:36 -06:00
toddouska
9d4fb79009 add ecc timing mulmod 2014-08-12 12:21:00 -07:00
JacobBarthelmeh
6620df2e4e Merge remote-tracking branch 'upstream/master' 2014-08-12 13:03:55 -06:00
toddouska
20e8e4e0a2 Merge pull request #117 from kaleb-himes/master
All encryptions work. settings.h generic, allow end user mod
2014-08-12 11:02:02 -07:00
JacobBarthelmeh
a18602951b record header fuzz 2014-08-12 11:56:20 -06:00
Kaleb Himes
20f8493046 All encryptions work. settings.h generic, allow end user mod 2014-08-12 10:41:11 -06:00
JacobBarthelmeh
58caf70dc9 Merge remote-tracking branch 'upstream/master' 2014-08-12 10:38:12 -06:00
JacobBarthelmeh
5c72bf6272 fuzzer callbacks 2014-08-11 16:29:19 -06:00
Moisés Guimarães
1a8d06a0e3 keys: fixing DeriveKeys:
--- variables md5InputSz, shaInputSz and keyDataSz removed

keys: refactoring MakeSslMasterSecret to reduce stack usage:
--- variable shaOutput moved to the heap (20 bytes saved)
--- variable md5Input moved to the heap (532 bytes saved)
--- variable shaInput moved to the heap (579 bytes saved)
--- variable md5 moved to the heap (sizeof(Md5) saved)
--- variable sha moved to the heap (sizeof(Sha) saved)
2014-08-11 14:17:44 -07:00
Moisés Guimarães
cc6b11c95b vagrant recipe to get a linux machine for testing.
The virtual machine is provided by hashicorp (the company that makes vagrant) and is an Ubuntu Precise 64

The provisioning script that runs in the first boot of the machine will copy and setup a synchronize script so you don't have to run ./autogen.sh and ./configure every time to build in a different OS and you can also build and run on both (guest and host) at the same time.

The ./pull_to_vagrant.sh script should be called at least once before building cyassl so you get all the changes from you host machine.
2014-08-11 11:31:36 -07:00
toddouska
0919a2927c fix digest sizes in internal.h 2014-08-06 06:53:24 -07:00
Moisés Guimarães
39c167710f keys: refactoring DeriveKeys to reduce stack usage:
--- variable shaOutput moved to the heap (20 bytes saved)
--- variable md5Input moved to the heap (68 bytes saved)
--- variable shaInput moved to the heap (119 bytes saved)
--- variable keyData moved to the heap (112 bytes saved)
--- variable md5 moved to the heap (sizeof(Md5) saved)
--- variable sha moved to the heap (sizeof(Sha) saved)
2014-08-05 15:28:30 -07:00
Moisés Guimarães
32847ee78e tls: refactoring CyaSSL_make_eap_keys to reduce stack usage:
--- variable seed moved to the heap (up to 64 bytes saved)
2014-08-05 15:28:30 -07:00
Moisés Guimarães
04dd56df79 tls: refactoring MakeTlsMasterSecret to reduce stack usage:
--- variable seed moved to the heap (up to 64 bytes saved)
2014-08-05 15:28:30 -07:00
Moisés Guimarães
c74440b27e tls: refactoring DeriveTlsKeys to reduce stack usage:
--- variable seed moved to the heap (up to 64 bytes saved)
--- variable key_data moved to the heap (up to 224 bytes saved)
2014-08-05 15:28:30 -07:00
Moisés Guimarães
0283a917e8 tls: refactoring doPRF to reduce stack usage:
--- variable md5_hash moved to the heap (up to 256 bytes saved)
--- variable sha_hash moved to the heap (up to 256 bytes saved)
--- variable labelSeed moved to the heap (up to 128 bytes saved)
--- variable md5_result moved to the heap (up to 224 bytes saved)
--- variable sha_result moved to the heap (up to 224 bytes saved)

tls: refactoring PRF to reduce stack usage:
--- variable labelSeed moved to the heap (up to 128 bytes saved)
2014-08-05 15:28:30 -07:00
Moisés Guimarães
e3db86753c tls: refactoring p_hash to reduce stack usage:
--- variable previous moved to the heap (up to 48 bytes saved)
--- variable current moved to the heap (up to 48 bytes saved)
--- variable hmac moved to the heap (sizeof(Hmac) bytes saved)
2014-08-05 15:28:30 -07:00
toddouska
9429f07a8a add MD5_DIGEST_SZ to NO_MD5 for non no-old-tls build types that still need it 2014-08-05 13:41:55 -07:00
Kaleb Himes
63b8460210 tirtos build fix: port.c renamed wc_port.c 2014-08-01 10:24:40 -06:00
toddouska
e99c7c2870 don't copy ntru-cert.der into certs/ 2014-07-31 16:45:30 -07:00
toddouska
3cc648f56d Merge branch 'master' of https://github.com/kaleb-himes/cyassl into certs 2014-07-31 16:33:46 -07:00
toddouska
dffd5e09bf make dist adds for tirtos files 2014-07-29 16:34:12 -07:00
toddouska
7a95bc452d Merge branch 'master' into ti 2014-07-29 16:20:57 -07:00
John Safranek
e9297f092d updated HashDRBG so private data not available via struct declaration in header file 2014-07-29 15:19:51 -07:00
John Safranek
5a175450e8 Merge branch 'JonasNorling-master' 2014-07-28 15:15:07 -07:00
Jonas Norling
277598e34a Use same sequence number calculation in tls.c and internal.c
The DTLS sequence number used when decrypting CCM/GCM was taken from
the internal state, instead of from the actual message record.

If any DTLS messages were dropped, the expectation of the next
sequence number was wrong. This lead to a failed MAC check on the next
message to arrive, and an alert was generated.
2014-07-28 15:10:17 -07:00
toddouska
aba16ae239 Merge branch 'master' into ti 2014-07-24 20:15:18 -07:00
toddouska
4ebd5a0717 remove hard tabs 2014-07-24 20:12:10 -07:00
JacobBarthelmeh
3f2ee0801a declaration locations for ARM 2014-07-24 18:59:39 -06:00
Kaleb Himes
f51bba0a43 line 221 fix, portability improvements 2014-07-23 15:58:09 -06:00
toddouska
0c6a961e35 Merge branch 'master' into ti 2014-07-23 14:20:58 -07:00
Moisés Guimarães
c20fdb037e io: refactoring EmbedOcspLookup:
--- single return point
--- changed stack reduction MEMORY_E to -1 to match XMALLOC fail at httpBuf
--- variable written removed
--- variable ocspRespSz renamed to ret (initialized with -1  and set only once with process_http_response result)
2014-07-23 13:20:23 -03:00
Moisés Guimarães
7dfb9e2d5f io: refactoring EmbedGenerateCookie to reduce stack usage:
--- use ShaHash instead of InitSha, ShaUpdate and ShaFinal (sizeof(Sha) saved)

io: refactoring EmbedOcspLookup to reduce stack usage:
--- variable domainName moved to the heap (80 bytes saved)
--- variable path moved to the heap (80 bytes saved)
2014-07-23 12:28:54 -03:00
toddouska
ec0fd7e969 Merge branch 'master' into ti 2014-07-22 13:55:59 -07:00
toddouska
01ef6c3390 Merge pull request #111 from kojo1/MDK5
mdk5 pack for CyaSSL 3.1.0
2014-07-22 13:53:03 -07:00
Takashi Kojo
b2a1b08660 Eliminate license, manual file from mdk5 pack 2014-07-22 20:18:38 +09:00
Takashi Kojo
bc3942e34f MDK5 software pack update for CyaSSL 3.1.0 2014-07-22 20:08:18 +09:00
Moisés Guimarães
2245204685 crl: refactoring LoadCRL to reduce stack usage:
--- variable name moved to the heap (256 bytes saved)
2014-07-21 22:52:06 -03:00
Moisés Guimarães
3ae9105b05 crl: refactoring DoMonitor to reduce stack usage:
--- variable buff moved to the heap (8192 bytes saved)
2014-07-21 22:52:05 -03:00
Moisés Guimarães
108b21e36f crl: refactoring SwapLists to reduce stack usage:
--- variable tmp moved to the heap (sizeof(CYASS_CRL) saved)
2014-07-21 22:52:05 -03:00
Moisés Guimarães
6e0c6551ff crl: refactoring BufferLoadCRL to reduce stack usage:
--- variable dcrl moved to the heap (sizeof(DecodedCRL) saved)
2014-07-21 22:52:05 -03:00
Moisés Guimarães
fb3e706d69 ocsp: refactoring CheckCertOCSP to reduce stack usage:
--- variable newStatus moved to the heap (sizeof(CertStatus) saved)
--- variable ocspRequest moved to the heap (sizeof(OcspRequest) saved)
--- variable ocspResponse moved to the heap (sizeof(OcspResponse) saved)
2014-07-21 22:52:05 -03:00
toddouska
063e5cec80 Merge branch 'master' into ti 2014-07-21 16:38:38 -07:00
toddouska
c214f0cc1b fixup ntru encrypt benchmark 2014-07-21 16:37:41 -07:00
toddouska
4fab7e9884 Merge branch 'master' of https://github.com/ShaneIsrael/cyassl 2014-07-21 16:32:07 -07:00
toddouska
cc72a50cee bump dev version 2014-07-21 16:28:57 -07:00
toddouska
a73a160aaf Merge branch 'master' into ti 2014-07-21 16:26:39 -07:00
toddouska
3bfd0bbf3b fixup some chacah-poly suite things including a valgrind error 2014-07-21 16:20:17 -07:00
JacobBarthelmeh
48e3ef1c31 Update ctaocrypt.vcproj 2014-07-21 15:26:04 -06:00
Kaleb Himes
2f18af2f5f added --override-ntru, -h, -help, and error checking 2014-07-21 15:13:37 -06:00
JacobBarthelmeh
ff58f65418 merge 2014-07-21 15:12:12 -06:00
JacobBarthelmeh
3c27deb9d0 merge 2014-07-21 13:50:22 -06:00
JacobBarthelmeh
9a44fc4012 Merge branch 'master', remote-tracking branch 'upstream/master' 2014-07-21 11:35:36 -06:00
toddouska
c0ef346073 Merge branch 'master' into ti 2014-07-18 19:27:04 -07:00
JacobBarthelmeh
726cc3e3a4 sanity check and recent cyassl release 2014-07-18 14:42:45 -06:00
JacobBarthelmeh
7cb65d8b3d asthetics 2014-07-17 15:33:48 -06:00
JacobBarthelmeh
b77a1fdbbb refactoring 2014-07-17 15:00:40 -06:00
John Safranek
307e5f3bff fix build warnings with lean-psk mode 2014-07-16 14:40:41 -07:00
JacobBarthelmeh
7eb8f571ed reverse compatibility 2014-07-16 14:55:38 -06:00
toddouska
a26f9b9068 Merge branch 'master' into ti 2014-07-16 13:55:31 -07:00
toddouska
99f6fd8450 have explicit Rsa Padding error 2014-07-16 13:52:31 -07:00
Shane Israel
beec798d4d Added a basic NTRU Encrypt and Decrypt benchmark 2014-07-16 13:20:16 -06:00
Chris Conlon
e76c5cc59e Update formatting for HAVE_COLDFIRE_SEC in aes.c, 80 char line limit 2014-07-16 11:11:41 -06:00
Chris Conlon
237bde7918 bump version to 3.1.0 2014-07-15 10:50:45 -06:00
Chris Conlon
6297490f88 update README 2014-07-15 10:49:19 -06:00
Chris Conlon
54b02c3979 fix order of variables in myDateCb for Windows/VS 2014-07-15 09:39:37 -06:00
John Safranek
9c9499584d remove client-test.sh from make check 2014-07-14 15:19:31 -07:00
JacobBarthelmeh
5b08cb35d7 updated sequence number in AD and unit tests 2014-07-14 16:13:24 -06:00
toddouska
161fe4894b update ntru cert key w/ new ca 2014-07-11 15:22:16 -07:00
John Safranek
fa5b68d56e Merge pull request #99 from kaleb-himes/master
updated certs
2014-07-11 15:10:31 -07:00
JacobBarthelmeh
4250955003 arg error checking and CHACHA_AEAD_TEST update 2014-07-11 16:06:29 -06:00
Kaleb Himes
ba34ba0f0f crls to sha1 from sha256 2014-07-11 14:41:57 -06:00
Kaleb Himes
4972e0a70b updated certs 2014-07-11 14:14:53 -06:00
Kaleb Himes
15f432c521 updated certs 2014-07-11 13:55:10 -06:00
JacobBarthelmeh
e62fbdd49f added ECDSA and DHE_RSA support for chacha-poly 2014-07-10 16:35:56 -06:00
toddouska
8a9c1ce2fb Merge branch 'master' into ti 2014-07-10 11:48:39 -07:00
toddouska
4d969d2850 reduce ntru benchmark stack use 2014-07-10 11:47:05 -07:00
toddouska
1264c0742c make sure ntru benchmark pub key size init 2014-07-10 11:14:22 -07:00
JacobBarthelmeh
c322cb05ad uses most recent version of cyassl 2014-07-10 11:18:49 -06:00
toddouska
7c608af579 Merge branch 'master' into ti 2014-07-09 17:48:35 -07:00
toddouska
1c7eb61017 ntru keygen is indepedent of additional cyassl keygen, use cyassl types, correct ntru benchmark output 2014-07-09 16:18:55 -07:00
toddouska
b134894eb8 Merge branch 'master' of https://github.com/ShaneIsrael/cyassl 2014-07-09 15:58:15 -07:00
toddouska
8462ed0653 fix issue #94, keygen w/ normal math 2014-07-09 15:47:37 -07:00
JacobBarthelmeh
0a2a56db57 fixed casting issue caught when using clang 2014-07-09 16:33:25 -06:00
Shane Israel
1f6dcd94ba Fixed NTRU param issue in asn.c and added an NTRU keygen benchmark 2014-07-09 16:10:10 -06:00
JacobBarthelmeh
da0876c474 Merge branch 'cipher-suite' of https://github.com/JacobBarthelmeh/cyassl into cipher-suite 2014-07-09 15:49:29 -06:00
JacobBarthelmeh
fb25db9c28 progress on suite 2014-07-09 15:48:40 -06:00
Moisés Guimarães
9ffc44a01f ecc_free should be called only upon ecc_import_x963 success. 2014-07-08 13:41:42 -03:00
Moisés Guimarães
d6f5f57452 remove unnecessary check on pubKey 2014-07-08 13:03:12 -03:00
Moisés Guimarães
f8cf3bf853 remove stack reduction macros 2014-07-08 10:51:27 -03:00
Moisés Guimarães
ff59078053 remove stack reduction macros from hash functions 2014-07-08 10:51:10 -03:00
toddouska
4ed9b3fa33 Merge branch 'master' into ti 2014-07-07 10:32:52 -07:00
Moisés Guimarães
b7acbc090f asn: refactoring EccPrivateKeyDecode to reduce stack usage (199 bytes - pointer sizes saved):
--- variable priv moved to the heap (66 bytes saved)
--- variable pub moved to the heap (133 bytes saved)
2014-07-04 12:03:56 -03:00
Moisés Guimarães
2913aa89d4 asn: refactoring SetAltNamesFromCert to reduce stack usage:
--- variable decoded moved to the heap (sizeof(DecodedCert) bytes saved)

asn: refactoring SetDatesFromCert to reduce stack usage:
--- variable decoded moved to the heap (sizeof(DecodedCert) bytes saved)

asn: refactoring SetNameFromCert to reduce stack usage:
--- variable decoded moved to the heap (sizeof(DecodedCert) bytes saved)
2014-07-04 11:35:11 -03:00
Moisés Guimarães
85dcc8e5e2 asn: refactoring MakeAnyCert to reduce stack usage:
--- variable der moved to the heap (sizeof(DerCert) bytes saved)

asn: refactoring MakeCertReq to reduce stack usage:
--- variable der moved to the heap (sizeof(DerCert) bytes saved)
2014-07-04 11:06:34 -03:00
Moisés Guimarães
1739aea535 asn: refactoring SignCert to reduce stack usage: 512 bytes - pointers size moved to the heap.
--- variable sig moved to the heap (1152 bytes saved)
2014-07-04 10:45:09 -03:00
Moisés Guimarães
30977adc84 asn: refactoring MakeSignature to reduce stack usage:
--- variable encSig moved to the heap (98 bytes saved)
--- variable md5 moved to util function (sizeof(Md5) bytes saved)
--- variable sha moved to util function (sizeof(Sha) bytes saved)
--- variable sha256 moved to util function (sizeof(Sha256) bytes saved)

add cast to variables that may not be used in some builds.
fix - put RSA code inside #ifndef NO_RSA
2014-07-04 09:40:19 -03:00
Moisés Guimarães
de14fac069 add hash utility functions to promote cleaner code, smaller footprint, centralized logs and error handling. 2014-07-04 09:17:18 -03:00
Moisés Guimarães
a281c6bc6c asn: refactoring ConfirmSignature to reduce stack usage:
--- variable digest moved to the heap (20..64 bytes saved)
--- variable pubKey moved to the heap (sizeof(RsaKey) bytes saved)
--- variable encodedSig moved to the heap (512 bytes saved)
--- variable plain moved to the heap (512 bytes saved)
--- variable pubKey moved to the heap (sizeof(ecc_key) bytes saved)
--- variable md2 moved to the heap (sizeof(Md2) bytes saved)
--- variable md5 moved to the heap (sizeof(Md5) bytes saved)
--- variable sha moved to the heap (sizeof(Sha) bytes saved)
--- variable sha256 moved to the heap (sizeof(Sha256) bytes saved)
--- variable sha384 moved to the heap (sizeof(Sha384) bytes saved)
--- variable sha512 moved to the heap (sizeof(Sha512) bytes saved)

fix - In some cases, the function was returning error codes, that could be interpreted as a false positive.
2014-07-04 09:17:17 -03:00
Moisés Guimarães
b875f6f631 add stack reduction macros 2014-07-04 09:17:17 -03:00
Moisés Guimarães
8dd4589650 asn: refactoring SetName to reduce stack usage: 1152 bytes - pointers size moved to the heap.
--- variable names moved to the heap (1152 bytes saved)
2014-07-04 09:17:17 -03:00
Moisés Guimarães
1cd81c1bb6 asn: refactoring SetRsaPublicKey to reduce stack usage: 553 bytes - pointers size moved to the heap.
--- variable n moved to the heap (517 bytes saved)
--- variable e moved to the heap (16 bytes saved)
--- variable algo moved to the heap (20 bytes saved)
2014-07-04 09:17:17 -03:00
Moisés Guimarães
4aab92c982 asn: refactoring SetEccPublicKey to reduce stack usage: 296 bytes - pointers size moved to the heap.
--- variable algo moved to the heap (20 bytes saved)
--- variable curve moved to the heap (20 bytes saved)
--- variable pub moved to the heap (256 bytes saved)
2014-07-04 09:17:17 -03:00
Moisés Guimarães
171d7bf920 asn: refactoring DerToPem to reduce stack usage: 160 bytes - pointers size moved to the heap.
--- variable header moved to the heap (80 bytes saved)
--- variable footer moved to the heap (80 bytes saved)
2014-07-04 09:17:16 -03:00
Moisés Guimarães
e077cd067b asn: refactoring GetKey to reduce stack usage: 610 bytes - pointers size moved to the heap.
--- variable keyBlob moved to the heap (610 bytes saved)
2014-07-04 09:17:16 -03:00
Moisés Guimarães
8c1a4a4944 asn: refactoring ToTraditionalEnc to reduce stack usage: 128 bytes - pointers size moved to the heap.
--- variable salt moved to the heap (64 bytes saved)
--- variable cbcIv moved to the heap (64 bytes saved)
2014-07-04 09:17:16 -03:00
Moisés Guimarães
96aa460d03 asn: refactoring DecryptKey to reduce stack usage: 64 bytes - pointer size moved to the heap.
--- variable key moved to the heap (64 bytes saved)
2014-07-04 09:17:16 -03:00
Moisés Guimarães
40ef0c8daa asn: refactoring GetCertHeader to reduce stack usage: ~ sizeof(mp_int) bytes moved to the heap.
--- variable mpi moved to the heap (~ sizeof(mp_int) bytes saved)
2014-07-04 09:17:16 -03:00
John Safranek
adf5ba96e6 tie in the client test script to check target 2014-07-03 12:18:03 -07:00
toddouska
8a3b3b03d2 fix crl problem error out if verify peer disabled 2014-07-03 12:13:41 -07:00
toddouska
61e989ed99 Merge branch 'master' into ti 2014-07-03 11:34:15 -07:00
toddouska
2d63c559cc dh now disabled by default but can be enabled w/o opensslextra 2014-07-03 11:32:24 -07:00
toddouska
cc74206f9c Merge branch 'master' into ti 2014-07-02 20:06:49 -07:00
toddouska
cac799f683 add optional ecc ctx info 2014-07-02 16:59:45 -07:00
toddouska
6817e3cd2e Merge branch 'master' into ti 2014-07-02 16:31:55 -07:00
JacobBarthelmeh
18119610fb Update tls.c 2014-07-02 16:06:41 -06:00
toddouska
b7baf024ab add expired-ca for testing as well 2014-07-02 12:21:52 -07:00
toddouska
0272d51ce4 remove C++ comments from cyassl proper 2014-07-02 12:11:01 -07:00
toddouska
be402277e0 add override cert date example for bad clock testing 2014-07-02 12:07:25 -07:00
JacobBarthelmeh
0c30053f52 Merge branch 'cipher-suite' of https://github.com/JacobBarthelmeh/cyassl into cipher-suite 2014-07-02 12:53:59 -06:00
JacobBarthelmeh
a1e8eb0802 progress on suite 2014-07-02 12:49:14 -06:00
toddouska
0950b19da8 Merge branch 'master' into ti 2014-07-02 10:49:22 -07:00
toddouska
4aac37bff9 move CipherRequires() to both client and server, VerifyClientSuite() to client only 2014-07-02 10:48:04 -07:00
JacobBarthelmeh
91af14544f Update poly1305.c 2014-07-01 16:14:57 -06:00
JacobBarthelmeh
53c63dd257 progress on suite 2014-07-01 16:08:52 -06:00
JacobBarthelmeh
6c366a1863 progress on suite 2014-07-01 15:19:55 -06:00
JacobBarthelmeh
bcb31dcb4b progress on suite 2014-07-01 14:18:21 -06:00
JacobBarthelmeh
5bf411f345 progress on suite 2014-07-01 14:16:44 -06:00
toddouska
599da85d9e Merge branch 'master' into ti 2014-07-01 12:00:15 -07:00
toddouska
e145e978e1 Merge branch 'master' into ti 2014-07-01 11:58:46 -07:00
toddouska
1122f2a399 master merge resolve 2014-07-01 11:58:33 -07:00
Chris Conlon
d875931a3f hook new DER files into include.am 2014-07-01 11:20:39 -06:00
toddouska
4eebba8162 Merge branch 'master' of github.com:cyassl/cyassl 2014-07-01 09:28:40 -07:00
toddouska
c957e9a909 make default I/O callbacks external for user to base/wrap if desired 2014-07-01 09:27:31 -07:00
Chris Conlon
ee0d989c24 add sizeof ints back to certs_test.h, fix cert buffer usage in benchmark.c 2014-07-01 09:38:12 -06:00
Chris Conlon
5e09ca669b update gencertbuf.pl to generate sizeof ints 2014-07-01 09:36:27 -06:00
Chris Conlon
3ea0f7b4ab add key/cert buffers for CA cert, server key/cert 2014-07-01 08:58:47 -06:00
toddouska
f2de04ae46 Merge branch 'master' into ti 2014-06-26 08:57:35 -06:00
Moisés Guimarães
9339d7d5b1 add support to TLS extensions in DTLS 2014-06-25 13:26:42 -03:00
toddouska
16d64104db Merge branch 'master' into ti 2014-06-25 09:32:27 -06:00
toddouska
eb56afdbf6 remove spaces 2014-06-25 09:28:44 -06:00
Moisés Guimarães
e2a6d68abf fix - add missing FreeDecodeCert on success. 2014-06-24 20:03:52 -03:00
Moisés Guimarães
f2c8826e16 fix missing FreeRsaKey on error. 2014-06-23 15:28:57 -03:00
toddouska
a6ea32461d Merge branch 'master' into ti 2014-06-20 14:48:53 -07:00
Moisés Guimarães
edb94557e9 pkcs7: refactoring PKCS7_EncodeEnvelopedData to reduce stack usage: ~ 1300 bytes moved to the heap.
--- variable contentKeyEnc moved to the heap (512 bytes saved)
--- variable recip moved to the heap (~800 bytes saved)
2014-06-20 14:52:16 -03:00
Moisés Guimarães
46d0f68097 pkcs7: refactoring PKCS7_DecodeEnvelopedData to reduce stack usage: ~ 9 * sizeof(mp_int) bytes + 512 bytes moved to the heap.
--- variable privKey moved to the heap (more than 8 * sizeof(mp_int) bytes saved)
--- variable encryptedKey moved to the heap (512 bytes saved)
--- variable serialNum moved to the heap (sizeof(mp_int) bytes saved)
2014-06-20 14:52:16 -03:00
Moisés Guimarães
21982b50db pkcs7: refactoring CreateRecipientInfo to reduce stack usage: ~ 8 * sizeof(mp_int) bytes + ~935 bytes moved to the heap.
--- variable pubKey moved to the heap (more than 8 * sizeof(mp_int) bytes saved)
--- variable decoded moved to the heap (sizeof(DecodedCert) ~= 880 bytes saved)
--- variable serial moved to the heap (35 bytes saved)
--- variable keyAlgArray moved to the heap (20 bytes saved)
2014-06-20 14:52:16 -03:00
Moisés Guimarães
90e9696ad6 pkcs7: refactoring PKCS7_InitWithCert to reduce stack usage: ~ 880 bytes moved to the heap.
--- variable dCert moved to the heap (sizeof(DecodedCert) ~= 880 bytes saved)
2014-06-20 14:52:16 -03:00
Moisés Guimarães
eacff3ba83 pkcs7: refactoring PKCS7_VerifySignedData to reduce stack usage: ~ 50 bytes + 8 * sizeof(mp_int) bytes moved to the heap.
--- variable key moved to the heap (more than 8 * sizeof(mp_int) bytes saved)
--- variable digest moved to the heap (50 bytes saved)
2014-06-20 14:52:15 -03:00
Moisés Guimarães
60b2495f47 pkcs7: refactoring PKCS7_EncodeSignedData to reduce stack usage: ~1300 bytes + ~ 8 * sizeof(mp_int) bytes moved to the heap.
--- variable esd moved to the heap (1264 bytes saved)
--- variable digestInfo moved to the heap (50 bytes saved)
--- variable privKey moved to the heap (more than 8 * sizeof(mp_int) bytes saved)
2014-06-20 14:52:15 -03:00
toddouska
e6d9151f47 add user cert chain functionality at SSL level instead of just CTX 2014-06-20 10:49:21 -07:00
toddouska
a319354e92 Merge branch 'master' into ti 2014-06-20 09:24:11 -07:00
toddouska
0c12f7c9ac Merge branch 'master' of github.com:cyassl/cyassl 2014-06-20 09:23:30 -07:00
toddouska
6371b3c262 send ecdsa_sign for client cert request type is sig algo ecdsa 2014-06-20 09:22:40 -07:00
Chris Conlon
544c86b8e4 update taoCerts.txt to use 1024 RSA by default, SHA1 instead of MD5 2014-06-20 10:16:07 -06:00
toddouska
4fe938cf3a Merge branch 'master' into ti 2014-06-19 16:01:35 -07:00
toddouska
9642902c07 fix disable rsa w/ opensslextra 2014-06-19 15:59:24 -07:00
Moisés Guimarães
ae073cb1f9 fix pkcs7 memory leaks and XMALLOC result verification. 2014-06-18 14:32:20 -03:00
toddouska
00abb2d90e Merge branch 'master' into ti 2014-06-17 09:17:17 -07:00
Moisés Guimarães
8eae068000 fix error codes checking to use enum value from error-ssl.h 2014-06-16 17:57:47 -03:00
toddouska
59196df818 Merge branch 'master' into ti 2014-06-16 12:31:24 -07:00
toddouska
8350d91780 fix PemToDer encrypted key search start position for bundled files 2014-06-16 12:30:04 -07:00
toddouska
9a180b0ec8 Merge branch 'master' into ti 2014-06-16 11:05:20 -07:00
John Safranek
acb3b1afb2 fix bug with DTLS and IO Pools 2014-06-15 17:26:18 -07:00
John Safranek
33fb679334 fix small config bug between AES-GCM and AES-CCM 2014-06-15 13:59:33 -07:00
Moisés Guimarães
a3687a200a fix tests based on Wolfcrypt error codes. 2014-06-13 15:30:30 -03:00
toddouska
675f99294b Merge branch 'master' into ti 2014-06-12 16:02:37 -07:00
toddouska
0223708ac4 make crl monitor watch init -1 2014-06-12 16:01:34 -07:00
toddouska
233d4f422b Merge branch 'master' into ti 2014-06-12 16:00:33 -07:00
toddouska
b14bf25881 merge master 2014-06-12 16:00:25 -07:00
toddouska
ceafd298f3 fix linux crl monitor newer gcc warning 2014-06-12 15:56:44 -07:00
toddouska
e30e1c40f7 Merge branch 'master' into ti 2014-06-11 11:57:11 -07:00
toddouska
ddf5924b3b add error code for hmac min key len in new error range 2014-06-11 11:56:17 -07:00
toddouska
b3abbbb0ce make more room for wolfCrypt error range 2014-06-11 11:50:14 -07:00
toddouska
aad204428f fips mode hmac min key length for 2014 requirements 2014-06-11 11:43:17 -07:00
toddouska
8237319d80 merge with master 2014-06-10 15:19:45 -07:00
Moisés Guimarães
9c905b6519 fix on TLSX_SNI_GetFromBuffer - > should be >= so extensions of length 0 get inside the while.
added test to cover case.
2014-06-10 16:56:45 -03:00
Moisés Guimarães
ba36c24fc1 fix on TLSX_SNI_GetFromBuffer - undo last fix and return 0 when there is no SNI extension. Now the return is the same when there is no extensions at all. 2014-06-10 15:28:29 -03:00
Moisés Guimarães
064483035c fix on TLSX_SNI_GetFromBuffer - set inOutSz value to zero when there is no SNI extension in the client hello buffer. 2014-06-09 17:31:32 -03:00
toddouska
c6740feee7 Merge branch 'master' into ti 2014-06-09 12:57:43 -07:00
toddouska
e0c5c89bf6 add sanity check on send callback sent value 2014-06-09 12:55:17 -07:00
toddouska
f4c96c68c9 Merge branch 'master' into ti 2014-06-05 17:55:56 -07:00
toddouska
257959bcde fix intel asm comment and xmm stack size needed 2014-06-05 17:37:39 -07:00
Chris Conlon
ae6fe9397c check NTRU DRBG uninstantiate ret value in test.c 2014-06-05 17:07:19 -06:00
John Safranek
ee45558810 fixes #85, --enable-debug=no and --disable-debug to actually disable debug 2014-06-05 14:39:05 -07:00
Chris Conlon
a86e710fc1 make clean to remove generated certs/keys 2014-06-05 15:06:59 -06:00
Chris Conlon
7e5287e578 update NTRU support, with help from thesourcerer8 2014-06-05 14:42:15 -06:00
toddouska
2a54de002f Merge branch 'master' into ti 2014-06-04 15:21:59 -07:00
toddouska
665bda3ce6 ecb encrypt asm restore correct registers 2014-06-04 15:20:04 -07:00
toddouska
81a5bdc6f9 fix intel syntax backwards 2014-06-04 15:15:29 -07:00
toddouska
d728474ef3 store non volatile xmm6-15 for aesni on microsoft 2014-06-04 15:00:42 -07:00
toddouska
bc3cbee2b6 Merge branch 'master' into ti 2014-06-04 09:59:07 -07:00
toddouska
2494217a87 add sanity check on output buffer size for BuildMessage() 2014-06-04 09:58:15 -07:00
toddouska
e4c33cb51e Merge branch 'master' into ti 2014-06-04 08:08:52 -07:00
John Safranek
d301ab001c fix Windows compile warnings 2014-06-03 23:11:18 -07:00
toddouska
0c2c8c7fa3 Merge pull request #83 from jspada/max-altname-buffer-len
Increased max AltName buffer size (for cert generation)
2014-06-03 14:37:14 -07:00
Joseph Spadavecchia
3d94a41740 Increased max AltName buffer size (for cert generation) 2014-06-03 10:58:22 +01:00
toddouska
6ae76721f2 Merge branch 'master' into ti 2014-06-02 11:24:32 -07:00
toddouska
24b556689f fix psk define w/ opensslextra 2014-06-02 11:22:47 -07:00
toddouska
65ad0c987b Merge branch 'master' into ti 2014-05-30 17:06:36 -07:00
toddouska
66eb3caac5 bump dev version 2014-05-30 17:02:30 -07:00
toddouska
a920795665 Merge branch 'master' into ti 2014-05-30 16:57:15 -07:00
toddouska
5b7a5fe0bb Merge branch 'master' of github.com:cyassl/cyassl 2014-05-30 16:56:28 -07:00
toddouska
0f311adb2c if icc doesn't have 128bit type on x64 don't use it 2014-05-30 16:54:09 -07:00
John Safranek
61ca922c46 Updated for v3.0.2 2014-05-30 16:01:02 -07:00
John Safranek
b60a61fa94 DHE-PSK cipher suites
1. fixed the AES-CCM-16 suites
2. added DHE-PSK as a key-exchange algorithm type
3. Added infrastructure for new suites:
 * TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
 * TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
 * TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
 * TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
 * TLS_DHE_PSK_WITH_NULL_SHA256
 * TLS_DHE_PSK_WITH_NULL_SHA384
 * TLS_DHE_PSK_WITH_AES_128_CCM
 * TLS_DHE_PSK_WITH_AES_256_CCM
4. added test cases for new suites
5. set DHE parameters on test server when using PSK and a custom cipher
suite list
6. updated half premaster key size
2014-05-30 11:26:48 -07:00
toddouska
086b987efe Merge branch 'master' into ti 2014-05-28 17:49:34 -07:00
toddouska
4c9fa39d34 fix icc aesni warning where claims to be gcc 2014-05-28 17:48:08 -07:00
toddouska
71a5aeeb81 Merge branch 'master' into ti 2014-05-28 17:37:48 -07:00
toddouska
e11dd9803a fix icc v14 warnings 2014-05-28 17:36:21 -07:00
toddouska
8a0fbcb83e Merge branch 'master' into ti 2014-05-28 13:06:51 -07:00
Chris Conlon
fe88e925cd update MPLABX generated project files, formatting 2014-05-28 10:30:47 -06:00
Chris Conlon
7e13e414cb rename port.c/.h to wc_port.c/.h to prevent FreeRTOS conflicts 2014-05-28 10:28:01 -06:00
toddouska
21ebf9485d Merge branch 'master' into ti 2014-05-28 08:39:11 -07:00
Moisés Guimarães
263d3439d9 DecodedCert:
* add structure fields to persist encoding format of subject parts;
* set default encoding formats at InitDecodedCert;
* retrieve encoding format from buffer at GetName;
* copy encoding format from DecodedCert to CertName at SetNameFromCert.
2014-05-23 15:48:50 -03:00
Moisés Guimarães
e517459f89 CertName:
* add structure fields to persist encoding format;
 * set default encoding formats at InitCert;
 * add function to retrieve encoding format of a specific field based on it's id.
2014-05-23 11:11:46 -03:00
toddouska
6eeba7f50c Merge branch 'master' into ti 2014-05-20 17:18:31 -07:00
toddouska
3fa50ca3ea fix intel syntax comment 2014-05-20 17:17:35 -07:00
toddouska
e373b083bf Merge branch 'master' into ti 2014-05-20 14:33:14 -07:00
toddouska
15d3d3f790 fix visual studio 64 warnings 2014-05-20 14:31:26 -07:00
John Safranek
b46b8516ae Merge branch 'master' of github.com:cyassl/cyassl 2014-05-20 14:11:58 -07:00
John Safranek
12841e6093 fix integration bugs with new suites 2014-05-20 14:07:08 -07:00
toddouska
fc084e9978 Merge branch 'master' into ti 2014-05-20 13:46:27 -07:00
toddouska
3d803653c6 add visual studio 64 project files to autoconf, fix distclcean 2014-05-20 13:45:11 -07:00
toddouska
8ac8e0f687 forgot one vcxproj 2014-05-20 13:30:57 -07:00
toddouska
0d2471b2f7 Merge branch 'master' of https://github.com/cyassl/cyassl 2014-05-20 13:27:29 -07:00
toddouska
744590c868 add visual studio 64bit solution for vs2012+ with custom build step for aesni 2014-05-20 13:27:03 -07:00
toddouska
eed5360155 fix volatile registers rdi,rsi by saving to rax,r11 and restore 2014-05-20 13:25:28 -07:00
John Safranek
b889191992 Merge branch 'master' of github.com:cyassl/cyassl 2014-05-19 21:52:00 -07:00
John Safranek
74712b4e71 1. Added the following cipher suites:
* TLS_PSK_WITH_AES_128_GCM_SHA256
 * TLS_PSK_WITH_AES_256_GCM_SHA384
 * TLS_PSK_WITH_AES_256_CBC_SHA384
 * TLS_PSK_WITH_NULL_SHA384
2. Fixed CyaSSL_CIPHER_get_name() for AES-CCM cipher suites.
2014-05-19 21:44:04 -07:00
toddouska
6d3a46ebec Merge branch 'master' into ti 2014-05-19 17:08:51 -07:00
toddouska
842ff6f24d Merge branch 'master' of github.com:cyassl/cyassl 2014-05-19 17:08:27 -07:00
toddouska
df81401cf0 add debugging output to benchmark 2014-05-19 17:06:56 -07:00
John Safranek
7a5dd55eb9 Merge branch 'dtls' 2014-05-19 14:44:11 -07:00
toddouska
8f4e65276d Merge branch 'master' into ti 2014-05-19 14:34:46 -07:00
toddouska
ac73e1b508 fix visual studio cpuid arg warning 2014-05-19 14:33:15 -07:00
toddouska
2083b4f1b1 Merge branch 'master' into ti 2014-05-19 13:57:22 -07:00
toddouska
b9d9371aed add aesni intel asm syntax for aesni, abstract cpuid and asm linkage better for msvc 2014-05-19 13:55:42 -07:00
John Safranek
da5b042d21 AEAD additional data for encrypt and decrypt should be AEAD_AUTH_DATA_SZ 2014-05-19 09:14:10 -07:00
John Safranek
4a511fe36d Added epoch to sequence number for AES-GCM with DTLS encrypt/decrypt. 2014-05-19 09:14:10 -07:00
toddouska
d7a08de9de Merge branch 'master' into ti 2014-05-17 16:24:44 -07:00
Moisés Guimarães
6e5f800555 change behavior when OPTIONAL field keyIdentifier is not present. Not erring out. 2014-05-17 16:03:39 -03:00
toddouska
91df5e52a6 Merge branch 'master' into ti 2014-05-16 09:13:21 -07:00
John Safranek
628e7b4d72 adjust SendData() output buffer check for DTLS header size 2014-05-15 15:55:32 -07:00
toddouska
fd84098db4 Merge branch 'master' into ti 2014-05-15 10:41:16 -07:00
toddouska
2bc066a116 change first output line to cyassl/options gen 2014-05-15 10:39:54 -07:00
toddouska
e024c8af41 Merge branch 'master' into ti 2014-05-15 10:37:15 -07:00
John Safranek
5ab2ccfa96 Added FIPS wrappers for the DRBG and improved CTaoCrypt test. 2014-05-14 15:25:55 -07:00
toddouska
f9a78b7e20 Merge branch 'master' into ti 2014-05-14 15:07:47 -07:00
toddouska
ce39ef62ef update const error strings for newly added ones 2014-05-14 15:05:20 -07:00
toddouska
519820133d Merge branch 'const_errorstrings' of https://github.com/rofl0r/cyassl into errstr 2014-05-14 14:51:40 -07:00
toddouska
e31382ee4d Merge branch 'master' into ti 2014-05-14 09:22:57 -07:00
toddouska
c90c90557b make sure logging available in all des3 build cases 2014-05-14 09:22:09 -07:00
toddouska
6ea8f6cb17 Merge branch 'master' into ti 2014-05-13 16:05:51 -07:00
toddouska
aa5234ae0e fix des return values for ecb and plain cbc, allow errors 2014-05-13 16:04:52 -07:00
toddouska
d92869067c Merge branch 'master' into ti 2014-05-13 15:52:33 -07:00
toddouska
0a8804b3f8 add freescale mmcau hardware crypto alignment requirement, error out if not met 2014-05-13 15:51:35 -07:00
toddouska
28b6c5b998 Merge branch 'master' into ti 2014-05-12 14:02:22 -07:00
toddouska
7f938f3bdf Merge pull request #80 from kojo1/MDK5
MDK5 sw pack 3.0.0
2014-05-12 14:01:42 -07:00
toddouska
b19a7e2238 2nd merge fix 2014-05-12 14:00:29 -07:00
toddouska
a3a12a7010 merge resolution in io.c 2014-05-12 13:36:20 -07:00
toddouska
8c9c257921 Merge pull request #79 from kojo1/IAR
sample projects for IAR EWARM

Why is SINGLE_THREADED assumed for IAR with ARM?
2014-05-12 13:28:02 -07:00
toddouska
aae56394aa Merge branch 'master' into ti 2014-05-12 09:40:26 -07:00
Moisés Guimarães
cffcf3512c Making small stack usage disabled by default 2014-05-12 08:38:35 -03:00
Takashi Kojo
746ab39367 Remove license.txt 2014-05-12 08:58:09 +09:00
Takashi Kojo
fe94cca3d5 Add settings.h to projects 2014-05-12 08:57:38 +09:00
toddouska
4c8d94023b Merge branch 'master' into ti 2014-05-09 14:50:44 -07:00
toddouska
7fcaa03436 Merge pull request #75 from kojo1/ColdFire
ColdFire SEC, PIC32 updates
2014-05-09 14:41:40 -07:00
toddouska
aae718f155 Merge branch 'master' of github.com:cyassl/cyassl into ti 2014-05-09 14:38:10 -07:00
toddouska
77aa8a86eb remove extra spaces from comments 2014-05-09 11:57:41 -07:00
toddouska
34f2e51415 remove extra spaces from ti cyassl proper files 2014-05-09 11:55:59 -07:00
toddouska
ec5f3cc681 Merge branch 'master' of https://github.com/tisb/cyassl into ti 2014-05-09 11:38:40 -07:00
Vikram Adiga
f643ca5f48 Added TI-RTOS support for CyaSSL tests 2014-05-08 15:52:20 -07:00
Vikram Adiga
5146f3dd94 Initial commit of CyaSSL port for TI-RTOS 2014-05-08 15:50:55 -07:00
toddouska
e57d5d1d2f Merge branch 'master' of github.com:cyassl/cyassl 2014-05-08 10:27:54 -07:00
toddouska
abbfcde0dc add fips in core first/last files for code/data hashing 2014-05-08 10:26:31 -07:00
John Safranek
72e9ea8e4b added Hash DRBG as configure option 2014-05-07 11:54:12 -07:00
John Safranek
ac18ce03df DRBG Update
1. picked better values for entropy and nonce sizes based on
   security strength
2. changed output block length to be the SHA-256 digest size
3. use constant drbgReseed when reseeding
4. renamed the "drgb" type constants from "dbrg"
5. removed the small stack change due to buffer size changes
6. internal helper function Hash_DRBG_Instantiate now also
   takes a pointer to a nonce and a personalization string
7. the InitRng gathers enough bits from GenerateSeed() to
   supply the entropy input and a nonce
8. lowered the reseed interval to 1 million
2014-05-06 14:05:52 -07:00
Takashi Kojo
371d2efa2c remove SWO.ini files 2014-05-06 21:03:10 +09:00
Takashi Kojo
cdf8ab295c current_time, generic to CortexM 2014-05-06 11:16:43 +09:00
John Safranek
d6b98c1fab moved OCSP config code outside NO_FILESYSTEM fence 2014-05-05 16:13:08 -07:00
John Safranek
ec13f65ef0 made OCSP callback not dependent on stdio 2014-05-05 16:11:02 -07:00
Takashi Kojo
6ac7b056ee Pic benchmark, clock config 2014-05-05 16:41:07 +09:00
Takashi Kojo
cb09e266c3 CMSIS-core based current_time 2014-05-05 15:33:04 +09:00
Takashi Kojo
3063c7d663 Update component version in option files 2014-05-05 12:13:34 +09:00
Takashi Kojo
52144ee9ca Update component version in project files to 3.0.0 2014-05-05 11:34:36 +09:00
Takashi Kojo
eeb2e28f54 Sync with 3.0.0 2014-05-05 09:45:25 +09:00
Takashi Kojo
238e7b9458 Remove files 2014-05-05 09:39:59 +09:00
John Safranek
2f39b50063 fixed DateLessThan()
It was returning true on less-than or equal-to.
2014-05-03 16:46:56 -07:00
John Safranek
fd707ebafb Hash_DRBG refactoring
1. Renamed everything that had DBRG with the correct DRBG
2. Changed word64 reseed_ctr to word32 reseedCtr
3. Changed reseed interval to 0xFFFFFFFF
2014-05-02 15:35:10 -07:00
toddouska
fbe09780ca remove deadcode redundant length check 2014-05-02 11:40:36 -07:00
toddouska
697f77bef5 help coverity with max size issue on unsigned addition 2014-05-02 11:06:59 -07:00
toddouska
4104b74c40 fix resource leak on bad user cert chain big buffer 2014-05-02 10:30:07 -07:00
toddouska
3e62da0bc9 add linux crl monitor clean shutdown 2014-05-02 10:14:40 -07:00
Takashi Kojo
35d5b66d2c Merge remote-tracking branch 'CyaSSL-master/master' into IAR 2014-05-02 09:32:55 +09:00
Takashi Kojo
b680e62832 set up Simulator 2014-05-02 09:31:22 +09:00
toddouska
912ec25a0f fix linux crl monitor build 2014-05-01 09:34:16 -07:00
toddouska
14c978ca67 remove space 2014-05-01 09:30:17 -07:00
toddouska
5ff0336491 add custom kqueue event for crl monitor shutdown 2014-05-01 09:28:33 -07:00
Takashi Kojo
f225714e75 io.c, #include 2014-05-01 17:09:28 +09:00
Takashi Kojo
fb00110b77 CyaSSL library project and README 2014-05-01 17:03:01 +09:00
Takashi Kojo
2069394386 benchmark.c: cert file name 2014-05-01 15:26:55 +09:00
Takashi Kojo
3448610f9d remove icf 2014-05-01 15:14:20 +09:00
Takashi Kojo
3de36b106e Merge remote-tracking branch 'CyaSSL-master/master' into IAR 2014-05-01 14:33:49 +09:00
Takashi Kojo
5217d9ca98 Remove unused file 2014-05-01 14:32:02 +09:00
Takashi Kojo
169c0eee20 IAR EWARM project: test, benchmark 2014-05-01 14:29:09 +09:00
John Safranek
fb5200aa95 1. Added more options to the full commit test.
2. Cleanups from static analysis.
2014-04-30 15:01:10 -07:00
John Safranek
85d453f2d1 fix const issue with PK callbacks 2014-04-30 10:15:15 -07:00
John Safranek
09a7a087a2 fix static analysis warnings 2014-04-29 14:52:42 -07:00
John Safranek
2cf3564d1e added fips_test.h to rpm/spec.in 2014-04-29 11:23:27 -07:00
John Safranek
838d9ea780 bump dev version, update README for v3.0.0 2014-04-29 10:45:01 -07:00
John Safranek
70dee7e190 Added the directoryName comparison to the name constraint checks. 2014-04-28 13:29:44 -07:00
John Safranek
68878d33d9 Merge branch 'frankencert' 2014-04-28 11:10:37 -07:00
John Safranek
618d282d94 Decodes the Name Constraints certificate extension on the CA cert
and checks the names on the peer cert, rejecting it if invalid
based on the name.
2014-04-28 11:03:24 -07:00
Takashi Kojo
20f12af8ec crypto.h 2014-04-28 15:05:44 +09:00
Takashi Kojo
6cf1c8149b AesCbcEncrypt/Decrypt return value 2014-04-28 10:52:35 +09:00
Takashi Kojo
f9ad1888cb Fixed pic32mx/mz clock for benchmark 2014-04-28 10:51:18 +09:00
toddouska
2b34153c6a remove microchip header for their API use, we'll try to get them to put in standard place and we'll include it instead 2014-04-25 14:32:11 -07:00
Takashi Kojo
6e3bbd135e des3.h 2014-04-25 14:21:28 +09:00
Takashi Kojo
cb70631512 aes.c indentation 2014-04-25 14:18:23 +09:00
Takashi Kojo
2460679718 des3.h 2014-04-25 14:11:56 +09:00
Takashi Kojo
11aff767fd corrected pic32mz header path 2014-04-25 13:50:12 +09:00
Takashi Kojo
e3becc3a65 des3 parity. internal.h to ctaocrypt/types.h 2014-04-25 13:35:35 +09:00
Chris Conlon
f20b25b510 add RSA_DECODE_EXTRA to RsaPublicKeyDecode() to handle OpenSSL-generated keys 2014-04-23 15:53:20 -06:00
Moisés Guimarães
30b63bda6f random: InitRng and RNG_GenerateBlock to reduce stack usage: (up to 512 bytes - pointer sizes) moved to the heap.
with ARC4
--- InitRng: entropy variable moved to the heap; (256 bytes)
--- RNG_GenerateBlock: entropy variable moved to the heap; (256 bytes)
without ARC4
--- InitRng: key variable moved to the heap; (32 bytes)
--- InitRng: junk variable moved to the heap; (256 bytes)
2014-04-23 16:06:14 -03:00
Moisés Guimarães
6e3349f8ec fix code format, only spaces added, no code has been modified. 2014-04-23 11:58:44 -03:00
Moisés Guimarães
ce655f61c5 ecc: ecc_make_key_ex, ecc_export_x963, accel_fp_mul, accel_fp_mul2add, ecc_encrypt and ecc_decrypt refactory to reduce stack usage: (1350 bytes - pointer sizes) moved to the heap.
--- ecc_make_key_ex: buf variable moved to the heap; (66 bytes)
--- ecc_export_x963: buf variable moved to the heap; (256 bytes)
--- accel_fp_mul: kb variable moved to the heap; (128 bytes)
--- accel_fp_mul2add: kb variable moved to the heap; (256 bytes)
--- ecc_encrypt: sharedSecret and keys variables moved to the heap; (66 + 256 bytes)
--- ecc_decrypt: sharedSecret and keys variables moved to the heap; (66 + 256 bytes)
2014-04-23 11:44:54 -03:00
Takashi Kojo
a67cb1207b ColdFire SEC for aes, des3: Eliminated type mismatch 2014-04-23 20:45:19 +09:00
Takashi Kojo
41199a480d ColdFire SEC, fix cache control in aes, des3 driver 2014-04-23 16:56:37 +09:00
Takashi Kojo
1ba30b1eb6 des3 parity 2014-04-23 16:55:18 +09:00
Moisés Guimarães
fc24dca12d fix code format, only spaces added, no code has been modified. 2014-04-21 14:55:43 -03:00
Moisés Guimarães
eaaf0a7c28 pwdbased: PBKDF2 refactory to reduce stack usage: (up to 64 bytes - pointer size) moved to the heap.
--- buffer variable moved to the heap; (up to 64 bytes)
--- returns changed to breaks

pwdbased: PKCS12_PBKDF refactory to reduce stack usage: (up to 1023 + 128 bytes - pointer sizes) moved to the heap.
--- staticBuffer variable changed to have size = 1 byte (1023 bytes saved)
--- Ai variable moved to the heap; (up to 64 bytes)
--- B variable moved to the heap; (up to 64 bytes)

hmac: HKDF refactory to restore previous behavior inside while loop.
2014-04-21 14:45:07 -03:00
Moisés Guimarães
6d0fbfe7e9 hmac: HKDF refactory to reduce stack usage: (up to 128 bytes - pointer sizes) moved to the heap.
--- tmp variable moved to the heap; (up to 64 bytes)
--- prk variable moved to the heap; (up to 64 bytes)
2014-04-21 11:31:42 -03:00
Moisés Guimarães
d7e5b604f5 removing NO_CYASSL_SMALL_STACK from configure 2014-04-16 18:18:28 -03:00
Moisés Guimarães
ac56927e20 CYASSL_SMALL_STACK build option (default enabled) 2014-04-16 13:25:51 -03:00
Moisés Guimarães
48af915a35 fix camellia memory leak 2014-04-15 14:06:13 -03:00
Moisés Guimarães
69890dd023 blake2b: blake2b_init_key and blake2b_compress refactory to reduce stack usage: (384 bytes - pointer sizes) moved to the heap.
--- block variable moved to the heap; (128 bytes)
--- m and w variables moved to the heap; (256 bytes)
--- chain of dependency updated to propagate the error.
2014-04-15 12:46:43 -03:00
Moisés Guimarães
8d8fca67c3 SHA256, SHA384 and SHA512 error propagation. Major impact on random functions with error propagation. 2014-04-14 21:39:14 -03:00
Moisés Guimarães
32e2d7016f SHA256, SHA384 and SHA512 error propagation. Major impact on Hmac functions with error propagation. 2014-04-14 21:36:04 -03:00
Moisés Guimarães
644bb9c524 SHA256, SHA384 and SHA512 error propagation. Minor impact on some of internal.c static functions. 2014-04-14 21:28:23 -03:00
Moisés Guimarães
45f9f3cdc2 SHA256, SHA384 and SHA512 error verification on test files. 2014-04-14 21:28:22 -03:00
Moisés Guimarães
329cd0b241 sha256: XTRANSFORM refactory to reduce stack usage: (256 bytes - pointer size) moved to the heap.
--- W variable moved to the heap;
--- return type changed to int, returning 0 for success;
--- chain of dependency updated to propagate the error in Sha256Update and Sha256Final functions.

sha512: Transform and Transform384 refactory to reduce stack usage: (128 bytes - pointer size) moved to the heap in each function
--- W variable moved to the heap;
--- return type changed to int, returning 0 for success;
--- chain of dependency updated to propagate the error in Sha512Update, Sha512Final, Sha384Update and Sha384Final functions.
2014-04-14 21:28:22 -03:00
Moisés Guimarães
41cc5f06e4 camellia_setup128 and camellia_setup256 refactory to reduce stack usage:
--- subL and subR variables moved to the heap;
--- return type changed to int, returning 0 for success;
--- chain of dependency updated to propagate the error in CamelliaSetKey function.
2014-04-14 21:28:22 -03:00
John Safranek
d7eff191ce Merge branch 'master' of github.com:cyassl/cyassl 2014-04-14 10:35:39 -07:00
John Safranek
ede2aa9c91 allow key use extension errors to be overriden with verify callback 2014-04-14 10:29:29 -07:00
Chris Conlon
be65f5d518 update FSF address, wolfSSL copyright 2014-04-11 15:58:58 -06:00
John Safranek
421c08fc61 Merge branch 'frankencert' 2014-04-11 10:01:03 -07:00
Takashi Kojo
b712380a60 Sync MDK5 Software Pack with 2.9.4 2014-04-11 16:20:12 +09:00
John Safranek
603192f153 Removed an incorrect key use check. 2014-04-10 23:31:43 -07:00
John Safranek
e79ce42ef4 Added checking of the key usage and extended key usage extensions in the
certificates.
2014-04-10 16:50:14 -07:00
toddouska
4a99031b8d fix psk requires with different first byte 2014-04-10 14:58:15 -07:00
toddouska
e40bc9b72d remove extra spaces 2014-04-10 14:13:18 -07:00
toddouska
5de34bf987 add client suite verify, detect mismatch early 2014-04-10 14:11:30 -07:00
toddouska
78ebc49bd2 bump dev version 2014-04-10 13:53:01 -07:00
toddouska
a44fb0596a update ecc ccm8 suites to approved cipher suite numbers 2014-04-10 13:18:31 -07:00
Chris Conlon
b05dd361f8 fix MDK5 CyaSSL license file name 2014-04-09 14:59:04 -06:00
Chris Conlon
84c3beebb9 update README for 2.9.4 2014-04-09 11:34:38 -06:00
toddouska
eaf7b4e5ea Merge branch 'master' of github.com:cyassl/cyassl 2014-04-09 09:52:47 -07:00
toddouska
06faa47001 version bump 2014-04-09 09:51:11 -07:00
John Safranek
2c97d38c2c Removed previous change. Fixed it in the Sanity check instead. 2014-04-08 17:00:21 -07:00
John Safranek
52503c713c fix calls to AesGcmDecrypt and AesCcmDecrypt 2014-04-08 16:35:26 -07:00
toddouska
b59b3d7c36 remove unused blake2b helper f()s 2014-04-07 11:35:13 -07:00
Chris Conlon
e84487d121 fix SHA384 define 2014-04-07 10:29:16 -06:00
toddouska
6be3094494 remove debug logging macro left in 2014-04-06 12:45:41 -07:00
toddouska
5a70aba3bc fix InitSha 2014-04-04 15:37:04 -07:00
toddouska
1863af0762 remove CYASSL_MSG undef 2014-04-04 15:13:44 -07:00
toddouska
562b017776 user settings, custom rand gen, by tyto diff 2014-04-04 15:10:08 -07:00
Chris Conlon
c4f483aaa2 Fix order of GenerateSeed() when MQX is used with leanPSK 2014-04-04 12:37:22 -06:00
Chris Conlon
9e02937389 minor EROAD settings adjustments 2014-04-04 12:35:41 -06:00
toddouska
6504d605a0 fix des malloc cast 2014-04-01 14:02:36 -07:00
toddouska
e0534da461 mp Harmony 0.80 beta fix 2014-04-01 13:49:30 -07:00
toddouska
c210600d93 RSA fips mode 2014-04-01 13:08:48 -07:00
toddouska
348f50b4b1 bump dev version 2014-04-01 12:08:18 -07:00
toddouska
4ba587b18a Merge branch 'master' of github.com:cyassl/cyassl 2014-04-01 12:06:48 -07:00
John Safranek
1f3bc9263d error to have v1 or v2 certificates with extensions 2014-03-28 11:25:05 -07:00
John Safranek
b5a27b0f41 Add compile flag to disable Cert Sign key usage flag check. 2014-03-28 11:21:07 -07:00
John Safranek
4b22986e74 Check for Certificate Sign key usage bit on intermediate CAs. 2014-03-28 10:10:22 -07:00
Moisés Guimarães
bbc9c53b90 fix error include 2014-03-28 14:01:10 -03:00
Moisés Guimarães
6b9f711de0 DesSetKey refactory to reduce stack usage:
--- buffer variable moved to the heap;
--- return type changed to int, returning 0 for success;
--- chain of dependency updated to propagate the error.
2014-03-28 12:59:39 -03:00
toddouska
05b132ce1c HMAC fips mode 2014-03-27 15:43:54 -07:00
toddouska
7dd265cf2e SHA384 fips mode 2014-03-27 14:37:37 -07:00
toddouska
e873d7998b SHA512 fips mode 2014-03-27 14:03:12 -07:00
Chris Conlon
74a6916606 remove fips file stubs 2014-03-27 12:47:38 -06:00
Chris Conlon
59c1adaf0e version 2.9.2 release 2014-03-27 10:35:57 -06:00
Chris Conlon
4677f2f2c1 fix windows warnings, ignore empty file ones 2014-03-27 10:09:14 -06:00
Chris Conlon
62b8abafc5 fix variable shadow warning in asn.c 2014-03-26 23:43:44 -06:00
Chris Conlon
9d74775934 add fips file placeholders 2014-03-26 23:40:07 -06:00
toddouska
5bbd36c860 update README for 2.9.2 2014-03-26 14:47:26 -07:00
toddouska
7e9be23628 fix item 5 from report by Ivan Fratric of the Google Security Team 2014-03-26 13:54:16 -07:00
toddouska
717f3adb47 fix item 9 from report by Ivan Fratric of the Google Security Team 2014-03-26 13:28:19 -07:00
toddouska
86ebc48032 fix for item 7 report by Ivan Fratric of the Google Security Team 2014-03-26 13:16:43 -07:00
toddouska
23300a201f Merge branch 'master' of github.com:cyassl/cyassl 2014-03-26 12:15:04 -07:00
toddouska
43909ac725 fix sslv3 verify mac pad check, item 6 by report from Ivan Fratric of the Google Security Team 2014-03-26 12:14:18 -07:00
John Safranek
dd61daef70 When saving the signature from a DecodedCert to a CYASSL_X509 only copy
the signature if it exists.
2014-03-26 12:01:26 -07:00
toddouska
d5be4c4663 SHA-256 fips mode 2014-03-25 17:11:15 -07:00
toddouska
18d178f325 add ShaFinal fips mode 2014-03-25 16:20:03 -07:00
toddouska
b41186a6dd Merge branch 'master' of github.com:cyassl/cyassl 2014-03-25 16:02:12 -07:00
toddouska
3607db9077 add SHA1 fips mode 2014-03-25 16:01:17 -07:00
Chris Conlon
67672171c1 udpate .gitignore, ignore MPLABX generated files 2014-03-25 16:20:24 -06:00
Chris Conlon
0d25d6f11d update MCAPI projects to use zlib 1.2.8 2014-03-25 16:18:55 -06:00
Chris Conlon
746fd7d74d increase MCAPI CRYPT_AES_CTX to hold Aes 2014-03-25 16:16:44 -06:00
Chris Conlon
73e0ef76f7 fix unclosed MPLABX ifdef 2014-03-25 15:39:37 -06:00
toddouska
0fd8ca5409 NO_MAIN_DRIVER for settings 2014-03-25 14:10:07 -07:00
toddouska
b6fc109c1d add ecc_ctx_reset() so user can reuse ctx w/o init/free 2014-03-25 12:48:25 -07:00
toddouska
43c6ae3691 no C++ comments 2014-03-25 11:44:00 -07:00
toddouska
fb6d671629 resolve pull request merge conflict 2014-03-25 11:39:07 -07:00
toddouska
8c5d958a8b add Aes SetIV fips mode 2014-03-24 14:01:36 -07:00
toddouska
0ea10a4388 add 3DES fips mode 2014-03-24 13:37:52 -07:00
toddouska
8889e17489 Merge branch 'master' of github.com:cyassl/cyassl 2014-03-21 14:50:52 -07:00
toddouska
9fe9276236 finish fips aes w/ tests 2014-03-21 14:49:49 -07:00
John Safranek
e19e2a801d Ext Key Usage
1. Store reference to raw EKU OIDs in the DecodedCert.
2. Fixed usage of the anyEKU.
2014-03-21 09:37:10 -07:00
John Safranek
08ae775406 Merge branch 'master' of github.com:cyassl/cyassl 2014-03-21 09:34:08 -07:00
toddouska
a0d4c34900 allow snifftest to handle jumbo frames + potential partial 16k record from previous data packet on the stack 2014-03-20 15:34:20 -07:00
toddouska
98c6e3f3af have Base16 Decode on for FIPS tests 2014-03-20 11:38:14 -07:00
toddouska
c934f6b4b5 linux doesn't suport -o ping, -i 0.2 is more compatible 2014-03-20 11:05:03 -07:00
toddouska
ef8458f754 return right away after valid ping response, use TLSv1.2 for google 2014-03-20 10:37:53 -07:00
toddouska
0e9f2b5996 Merge branch 'master' of github.com:cyassl/cyassl 2014-03-20 10:32:50 -07:00
toddouska
8bc6bf9424 add lower case support to Base16 decode for better known answer test support, export 2014-03-20 10:31:52 -07:00
John Safranek
1e041abf04 decode Extended Key Usage extension 2014-03-20 10:07:47 -07:00
John Safranek
5c41acb6be Merge branch 'master' of github.com:cyassl/cyassl 2014-03-19 21:31:15 -07:00
John Safranek
acfa8fb966 Added a test script to perform a client/webserver connection. 2014-03-19 21:20:43 -07:00
toddouska
58885b36eb add AesCbc fips mode 2014-03-19 16:43:52 -07:00
toddouska
388436c53e add AesSetKey fips mode 2014-03-19 13:56:11 -07:00
toddouska
faecf7f849 require thread local storage for power on self thread check 2014-03-19 10:19:08 -07:00
toddouska
be9451fbc5 rm --cahced didn't work to stop tracking 2014-03-19 09:55:20 -07:00
toddouska
8bbc30f3e1 add fips enable switch 2014-03-19 09:43:57 -07:00
toddouska
90b08761c4 fix benchmark output with 3 decimals 2014-03-18 12:28:54 -07:00
John Safranek
ac452eebdc in DecodeAltNames, skip unknown name types, don't treat as error 2014-03-18 09:24:07 -07:00
John Safranek
1ea620cece Merge branch 'master' of github.com:cyassl/cyassl 2014-03-14 16:02:38 -07:00
John Safranek
bcd7f03495 X.509
1. Added stubs for the Extended Key Usage and Inhibit anyPolicy
   extensions.
2. Key Usage extension is decoded normally.
3. Certificate Policy extension is noted normally.
2014-03-14 15:48:33 -07:00
Chris Conlon
a28d0dd276 add EROAD settings 2014-03-14 15:54:21 -06:00
Chris Conlon
5a1d420652 move CyaSSL_dtls() and CyaSSL_get_using_nonblock() out of #ifndef CYASSL_LEANPSK for use of leanPSK with standard I/O 2014-03-14 15:33:49 -06:00
toddouska
692cbf111f remove -Wunreachable becuase older clang is buggy and gcc always was when it had it 2014-03-14 11:47:39 -07:00
toddouska
4ac70de055 Merge branch 'master' of github.com:cyassl/cyassl 2014-03-13 18:56:07 -07:00
toddouska
b56ecd1842 add enable-iopool , simple I/O pool example using memory overrides 2014-03-13 18:54:51 -07:00
Moisés Guimarães
0a5b758de3 Boundaries check for DoCertificate .
-- added size in the function parameters;
-- BUFFER_ERROR returned in case of message overflow (piece larger than the hello size);
-- OPAQUE24_LEN used whenever 3 bytes are needed;
-- removed unnecessary variable i;
-- Moved BUFFER_E check outside of the while, check against certSz is not needed, in this case the problem is a malformed packet since certSz can never be bigger than listSz.
2014-03-13 19:15:26 -03:00
Moisés Guimarães
2d2d1341cf Boundaries check for DoCertificateVerify.
-- added size in the function parameters;
-- BUFFER_ERROR returned in case of message overflow (piece larger than the hello size);
-- ENUM_LEN and OPAQUE8_LEN used whenever 1 byte is needed;
-- OPAQUE16_LEN used whenever 2 bytes are needed;
-- removed unnecessary variables (signature, sigLen);
-- removed unnecessary #ifdef HAVE_ECC.
2014-03-13 19:14:13 -03:00
Moisés Guimarães
eba36226dc Boundaries check for DoCertificateRequest.
-- added size in the function parameters;
-- BUFFER_ERROR returned in case of message overflow (piece larger than the message size);
-- OPAQUE16_LEN used where 2 bytes are needed.
2014-03-13 19:14:13 -03:00
Moisés Guimarães
7630b1d222 Boundaries check for DoHelloVerifyRequest.
-- added size in the function parameters;
-- BUFFER_ERROR returned in case of message overflow (piece larger than the message size);
-- OPAQUE16_LEN used where 2 bytes are needed.
2014-03-13 19:14:13 -03:00
Moisés Guimarães
881de67196 Boundaries check for DoHelloRequest.
-- added size and totalSz in the function parameters;
-- BUFFER_ERROR returned in case of message overflow (piece larger than the message size);
-- INCOMPLETE_DATA returned in case of buffer overflow (piece smaller than the expected size);
-- removed unnecessary variable mac;
2014-03-13 19:14:13 -03:00
Moisés Guimarães
244e335e81 Boundaries check for DoFinished.
-- added size and totalSz in the function parameters;
-- BUFFER_ERROR returned in case of message overflow (piece larger than the message size);
-- INCOMPLETE_DATA returned in case of buffer overflow (piece smaller than the expected size);
-- removed unnecessary variable idx;
-- fixed the sniffer to adapt to the changes.
2014-03-13 19:14:13 -03:00
Moisés Guimarães
4821b5d5fe Boundaries check for DoCertificateVerify.
-- switched from totalSz to size in the function parameters;
-- BUFFER_ERROR returned in case of message overflow (piece larger than the hello size);
-- ENUM_LEN used whenever 1 byte is needed;
-- OPAQUE16_LEN used whenever 2 bytes are needed;
-- removed unnecessary variables;
-- removed unnecessary #ifdef HAVE_ECC and #ifndef NO_RSA.
2014-03-13 19:14:13 -03:00
toddouska
cd8e80e391 Merge branch 'master' of github.com:cyassl/cyassl 2014-03-13 11:37:49 -07:00
toddouska
2b8ee45a18 change default static buffer size to record header size to prevent memory fragmentation, only adds 8 bytes to SSL 2014-03-13 11:35:14 -07:00
John Safranek
54bf1f8d94 added new test certificates for failure cases 2014-03-13 11:19:54 -07:00
John Safranek
4724c23a05 added critical extension error to error strings 2014-03-13 11:15:16 -07:00
John Safranek
1c35e5929a Merge branch 'master' of github.com:cyassl/cyassl 2014-03-12 15:41:40 -07:00
John Safranek
dc14fafb2e reversed a change to clear a warning, replaced some tabs 2014-03-12 14:32:02 -07:00
John Safranek
dcb39d5554 bug fixes 2014-03-12 05:50:37 -07:00
John Safranek
92c31d81f9 X.509 with unsupported critical extensions should be rejected 2014-03-11 11:50:45 -07:00
John Safranek
65475fdfe3 Merge branch 'PIC32MZ' of github.com:kojo1/cyassl-test into kojo1-PIC32MZ
Conflicts:
	ctaocrypt/benchmark/benchmark.c
2014-03-11 09:54:36 -07:00
John Safranek
6f55549fed fixes for Xcode 5.1, clang 503.0.38 stricter with some warnings 2014-03-11 09:38:36 -07:00
Takashi Kojo
974abca729 mplabx/benchmark_main.c 2014-03-11 13:59:37 +09:00
Takashi Kojo
e02fa2c571 random.c, indentation 2014-03-11 13:53:37 +09:00
Takashi Kojo
5dbe391d92 sha256.c, mplabx/test_main.c 2014-03-11 13:43:24 +09:00
Takashi Kojo
5a6e2482da Eliminate unused file. 2014-03-11 12:00:53 +09:00
Takashi Kojo
6235c949b3 PIC32MZ 2014-03-11 11:32:16 +09:00
Takashi Kojo
a9ca608030 Sync with CyaSSL master 2014-03-11 11:22:39 +09:00
Takashi Kojo
6463d34fe7 Roll back native LwIP 2014-03-11 10:59:09 +09:00
Takashi Kojo
3e41d8cecb Merge branch 'PIC32MZ-HWCrypt'
Conflicts:
	configure.ac
	ctaocrypt/benchmark/benchmark.c
	ctaocrypt/src/asn.c
	ctaocrypt/src/coding.c
	ctaocrypt/src/des3.c
	ctaocrypt/src/md5.c
	ctaocrypt/src/random.c
	ctaocrypt/src/sha.c
	ctaocrypt/src/sha256.c
	cyassl/ctaocrypt/aes.h
	cyassl/ctaocrypt/settings.h
	cyassl/ssl.h
	cyassl/version.h
	examples/server/server.c
	m4/ax_debug.m4
	m4/ax_tls.m4
	mplabx/benchmark_main.c
	mplabx/ctaocrypt_test.X/nbproject/configurations.xml
	mplabx/test_main.c
	src/io.c
	src/ocsp.c
	src/ssl.c
	src/tls.c
	testsuite/testsuite.c
2014-03-11 10:11:36 +09:00
Takashi Kojo
8ea2eec773 Merge https://github.com/cyassl/cyassl 2014-03-11 09:55:57 +09:00
Takashi Kojo
a12fe60723 Add AES-Counter to benchmark.c 2014-03-10 10:46:40 +09:00
John Safranek
ceb4a8f568 port 0 hack for the API unit test 2014-03-09 15:08:18 -07:00
toddouska
c671f1c663 reverse suite test dependency 2014-03-07 14:29:37 -08:00
John Safranek
18f60966f4 force make tests to run serially 2014-03-06 21:34:33 -08:00
John Safranek
ad93bc3510 Merge branch 'master' of github.com:cyassl/cyassl 2014-03-05 13:24:46 -08:00
toddouska
b0d255ed40 fix IE session tickets, they don't have sessionIDs like Chrome, Safari, and Firefox do 2014-03-05 13:12:42 -08:00
Takashi Kojo
65dc202356 settings.h for Harmony 2014-03-04 22:57:51 +09:00
Takashi Kojo
e5a51ca516 PIC32MZ Crypt Engine 2014-03-04 22:10:19 +09:00
Takashi Kojo
f5922255b0 Catching up 2.9.0 2014-03-04 22:09:38 +09:00
toddouska
f1597c86b1 fix clang -Wconversion except -Wsign-conversion 2014-03-03 16:46:48 -08:00
John Safranek
1bb09fb97a Added epoch to sequence number for AES-CCM with DTLS encrypt/decrypt. 2014-03-03 14:51:57 -08:00
toddouska
1fd6245600 fix all clang warnings except Wpadded (diagnostic), Wconversion which inludes Wsign-conversion (implicit conversions part of standard) 2014-03-03 13:27:52 -08:00
toddouska
c39cdbea54 make sure enable-webserver (HAVE_WEBSERVER) can handle password callbacks as well as opensslextra unless NO_PWDBASED defined 2014-03-03 12:18:26 -08:00
John Safranek
ec7c79c12e fix a couple more uninitialized variables 2014-03-02 18:38:12 -08:00
toddouska
a50d2e1e21 fix -Wcast-align 2014-03-02 11:47:43 -08:00
toddouska
f0f6497526 fix -Wconditional-uninitialized 2014-03-02 11:11:39 -08:00
toddouska
7b00374930 fix -Wmissing-variable-declarations 2014-03-02 11:06:41 -08:00
toddouska
9c5ee66c8c fix -Wunused-macros 2014-03-02 10:59:03 -08:00
toddouska
c4fd159860 Merge branch 'master' of github.com:cyassl/cyassl 2014-02-25 14:37:00 -08:00
toddouska
ac7cb3c8aa add -Wunreachable-code 2014-02-24 11:15:22 -08:00
Moisés Guimarães
d26b3bb445 Boundaries check for DoClientKeyExchange.
-- switched from totalSz to size in the function parameters
-- BUFFER_ERROR returned in case of message overflow (piece larger than the hello size)
-- OPAQUE16_LEN used whenever 2 bytes are needed.
2014-02-24 12:41:50 -03:00
Moisés Guimarães
78bab91615 removed duplicated check for INCOMPLETE_DATA
added new size enums
2014-02-24 11:26:55 -03:00
Moisés Guimarães
76c8146bf1 moving available data length check to DoHandShakeMsgType 2014-02-24 11:10:54 -03:00
Moisés Guimarães
95bc954273 Boundaries check for server hello parsing.
-- added totalSz to the function parameters
-- INCOMPLETE DATA checked only once with hello size against buffer size
-- BUFFER_ERROR returned in case of message overflow (piece larger than the hello size)
-- OPAQUE16_LEN used whenever 2 bytes are needed.
-- Session id checking improved.
2014-02-24 11:10:54 -03:00
Moisés Guimarães
c03263ae70 fixing HAVE_MAX_FRAGMENT ifdef 2014-02-24 11:10:54 -03:00
John Safranek
cf2f657036 In AX_HARDEN, delete extra comma when appending no-strict-aliasing. 2014-02-21 22:26:10 -08:00
John Safranek
77403c7ee2 Sniffer should ignore MATCH_SUITE_ERRORs when processing old client
hello messages.
2014-02-21 16:33:47 -08:00
Takashi Kojo
7cd238efd2 tcp-conn-nb.c, fixing stat 2014-02-20 16:03:12 +09:00
Takashi Kojo
75864e6e9c Merging into master 2014-02-20 15:58:03 +09:00
Takashi Kojo
5d5a8dbabd client.c for LwIP native socket, v0.2 2014-02-20 15:38:35 +09:00
Takashi Kojo
cca013b6d9 client.c for LwIP native socket 2014-02-20 13:36:42 +09:00
toddouska
12a1b2faed more settings 2014-02-18 17:46:08 -08:00
toddouska
5421990c80 add ARM to settings 2014-02-18 17:01:27 -08:00
toddouska
45859e97bf fix arm thumb mode assembly 2014-02-18 16:45:43 -08:00
John Safranek
24dcddb216 Update autoconf scripts
1. Add patch to AX_TLS to let it work with AC v2.63.
2. AX_TLS() call needs a no-op in the false case.
3. Move AX_HARDEN call back to its original position.
4. Print CC rather than CC_VERSION in configuration
   summary.
2014-02-17 15:33:07 -08:00
Takashi Kojo
2e69313eb3 Multiple callbacks, fixed initialize ssl->lwipCtx, io.c 2014-02-17 17:40:42 +09:00
John Safranek
260c37acec Update autoconf scripts
1. Since AX_HARDEN is called always, moved the few items
   set in configure for gcc-hardening to AX_HARDEN.
2. Dropped the macros that AX_DEBUG was setting that we
   haven't been using and aren't using now.
2014-02-14 15:59:59 -08:00
Chris Conlon
85a47b4596 add NO_STDIO_FILESYSTEM to exclude FILE usage from non standard filesystems 2014-02-14 14:57:43 -07:00
Chris Conlon
bc3fc658bb move filesystem abstraction to port.h 2014-02-14 14:46:49 -07:00
toddouska
7959239fb0 bump dev version 2014-02-13 15:15:49 -08:00
toddouska
1a075e3629 use host_cpu instead of target_cpu to determine cpu to run on, target is now only for cross compilation tools 2014-02-13 09:33:30 -08:00
toddouska
02858ab40b Merge branch 'master' of github.com:cyassl/cyassl 2014-02-13 08:54:56 -08:00
toddouska
757db12917 add to certservice requirements 2014-02-13 08:53:12 -08:00
John Safranek
a57da7c44b Merge pull request #69 from BrianAker/master
Updates for building rpm.
2014-02-12 16:23:15 -08:00
Brian Aker
cfdb76215b Updates for building rpm. 2014-02-12 13:55:31 -08:00
Chris Conlon
e3f8b74181 update tyto settings.h 2014-02-12 14:18:23 -07:00
Chris Conlon
cf6eaf219a tyto build - add GenerateSeed, exclude ctype.h, test.h 2014-02-12 13:39:38 -07:00
John Safranek
b6d4f10222 Reenabled examples when building single-threaded.
Changed testsuite and unit tests to leave out tests cases
that require threading.
2014-02-11 18:59:20 -08:00
John Safranek
ba1cbdd8bc When NTRU enabled, testsuite should use NTRU cipher suites for testing. 2014-02-11 17:56:59 -08:00
John Safranek
6bc3009544 fix minor configure error for debug builds redux
1. Backed out change from commit 8178acfe.
2. AX_DEBUG calling AX_ADD_AM_MACRO incorrectly. Syntax should be
   AX_ADD_AM_MACRO( VAR += value ), not AX_ADD_AM_MACRO( value, VAR ).
2014-02-11 17:49:19 -08:00
John Safranek
4842538fde Merge branch 'master' of github.com:cyassl/cyassl 2014-02-11 14:48:21 -08:00
Moisés Guimarães
2ff78b7fda Boundaries check for client hello parsing.
-- INCOMPLETE DATA checked only once with hello size against buffer size
-- BUFFER_ERROR returned in case of message overflow (piece larger than the hello size)
-- OPAQUE16_LEN used whenever 2 bytes are needed.
-- Session id checking improved.

TLS extensions return codes fixed.
2014-02-11 18:10:52 -03:00
toddouska
1cf884dccc add enable-certservice, ease of use 2014-02-11 13:08:12 -08:00
John Safranek
8178acfe13 fix minor configure error for debug builds 2014-02-11 10:21:16 -08:00
toddouska
fd44cb056f allow badly reassembled sniffer packets to try on full length vs zero length 2014-02-10 16:27:44 -08:00
John Safranek
f1c2250652 fix static analysis warning, g++ compile warning 2014-02-07 14:52:44 -08:00
John Safranek
594feec68b v2.9.0 release 2014-02-07 12:28:41 -08:00
John Safranek
9a275fbe8b updated CRLs for a year 2014-02-07 12:17:01 -08:00
John Safranek
4a0afa19bf Reinitialize the index when processing stored DTLS handshake messages. 2014-02-04 07:36:59 -08:00
Takashi Kojo
78b897a07c LwIP, native tcp socket, user sent callback 2014-02-04 23:15:34 +09:00
Takashi Kojo
99216c0226 LwIP, native tcp socket, user sent callback 2014-02-04 23:14:43 +09:00
Takashi Kojo
1234ec6142 LwIP, native tcp socket, v2.1 2014-02-04 16:49:21 +09:00
Takashi Kojo
15e92f78fb LwIP, native tcp socket, v0.2 2014-02-04 16:44:00 +09:00
Takashi Kojo
23bc584caf LwIP, native TCP socket, ver 2 2014-02-04 16:37:50 +09:00
Takashi Kojo
52e661df05 Clean ups 2014-02-04 10:07:01 +09:00
Moisés Guimarães
468e26a3a2 fixed error catching on TLSX_EllipticCurve_Parse
fixed unsupported curves handling
2014-02-03 21:54:31 -03:00
John Safranek
f669e73c8d Merge branch 'master' of github.com:cyassl/cyassl 2014-02-03 14:49:38 -08:00
John Safranek
2758f40a09 For OCSP, when decoding X.509 Auth Info Access record, find the first
OCSP responder, rather than only looking at the first item.
2014-02-03 14:39:41 -08:00
Moisés Guimarães
36b5bf0df1 Renaming Elliptic Curves to Supported Curves for better extension representation and avoid confusion. 2014-02-03 16:14:35 -03:00
Takashi Kojo
459df7a7d2 minor fix 2014-02-03 10:44:21 +09:00
Takashi Kojo
e39308f059 Take LwIP native TCP socket into io.c 2014-02-03 09:18:48 +09:00
Takashi Kojo
80cf1b20b3 Merge https://github.com/cyassl/cyassl
Conflicts:
	configure.ac
	ctaocrypt/src/asn.c
	cyassl/ctaocrypt/asn.h
	cyassl/ctaocrypt/settings.h
	src/internal.c
	src/io.c
2014-02-03 09:01:50 +09:00
Takashi Kojo
168985ed9f LwIP native TCP Socket 2014-02-02 18:09:25 +09:00
toddouska
51b3b1cb6c fix pkCurveOID c files, doesn't require openssl extra 2014-02-01 12:14:41 -08:00
toddouska
c14bc1a45c fix ecc w/o openssl extra 2014-02-01 11:37:08 -08:00
John Safranek
909b9258d6 Thread safe OCSP. 2014-01-31 16:59:13 -08:00
Moisés Guimarães
5616450a4b fixed return codes
added protection for missing HAVE_TLS_EXTENSIONS
2014-01-31 16:52:15 -03:00
Moisés Guimarães
30e2b4aa11 writing curves in the right order. (reverse)
improved curve validation.
2014-01-31 16:52:14 -03:00
Moisés Guimarães
9490c0dbaf validating curves 2014-01-31 16:52:14 -03:00
Moisés Guimarães
de6a537896 exporting pkCurve info to ctx and ssl 2014-01-31 16:52:14 -03:00
Moisés Guimarães
70e3d6ddb0 removing missing extensions 2014-01-31 16:52:13 -03:00
Moisés Guimarães
afd38d11cd removing unused curve names. 2014-01-31 16:52:13 -03:00
Moisés Guimarães
ae6d593096 added curve names extension to all extensions 2014-01-31 16:52:13 -03:00
Moisés Guimarães
7d2a6800f7 added Elliptic Curves Extensions implementation and configuration. 2014-01-31 16:52:13 -03:00
Moisés Guimarães
179836ad43 added api tests for Elliptic Curves Extensions. 2014-01-31 16:52:13 -03:00
Moisés Guimarães
75ae9dc973 added external api for Elliptic Curves Extension. 2014-01-31 16:52:13 -03:00
toddouska
b2ebfe9004 determine if openssl command line tool available for testing with ocsp, if so, HAVE_OPENSSL_CMD define is set 2014-01-31 10:37:11 -08:00
Takashi Kojo
07af9913c3 LwIP native TCP 2014-01-31 08:49:39 +09:00
Takashi Kojo
e28d256197 CyaSSL master, 2.8.6 2014-01-31 08:44:42 +09:00
John Safranek
12e9309618 fix Windows function name conflict 2014-01-28 12:30:01 -08:00
John Safranek
2fe8477679 fix make distcheck 2014-01-28 12:22:16 -08:00
John Safranek
631cfbcf27 fix output size check bug 2014-01-28 11:57:49 -08:00
Chris Conlon
42ad70591a prevent XFREE from freeing NULL pointer under Freescale MQX 2014-01-28 10:28:19 -07:00
toddouska
60cddecd9c remove mcheck from --enable-debug, not thread safe 2014-01-27 20:04:14 -08:00
toddouska
2084e9869d fix pkcs7 leaks with normal math 2014-01-27 16:29:15 -08:00
toddouska
e040e0ba7a fix scep 32 2014-01-27 12:50:29 -08:00
John Safranek
cfa9007199 1. Bumped release version in configure.ac.
2. Added enable option for SCEP. Enables prereqs.
3. Added CyaSSL_wolfSCEP() for ac to test for CyaSSL SCEP.
2014-01-27 11:35:43 -08:00
toddouska
c0f9780c70 fix challenge pwd init bug 2014-01-24 14:08:14 -08:00
toddouska
21c9eb7b22 fix forgotten leading 0 on SetRsaPublicKey 2014-01-24 13:58:20 -08:00
toddouska
5945723d87 linux pkcs7 build fixes 2014-01-24 13:15:26 -08:00
John Safranek
1dac5d28e3 Allow PKCS7_VerifyDecodedData to have an empty set of SignerInfos. Save first certificate. 2014-01-24 12:14:53 -08:00
John Safranek
595fe0b445 Merge branch 'master' of github.com:cyassl/cyassl 2014-01-23 21:48:37 -08:00
toddouska
18365df209 add non block length test case, including test again, to aes ctr 2014-01-23 15:18:42 -08:00
Chris Conlon
43199cd573 PKCS7_DecodeEnvelopedData, only do ParseCert once in PKCS7_InitWithCert 2014-01-23 14:48:18 -07:00
toddouska
45c05ffd30 add non block size AesCtr support 2014-01-23 12:34:27 -08:00
John Safranek
0972fbbf9d PKCS7_VerifySignedMessage() decodes more of the
message and performs an RSA verify on it.
2014-01-23 11:24:50 -08:00
Chris Conlon
9f8dcccc61 PKCS7_DecodeEnvelopedData, RsaPrivateDecryptInline can return 0 upon error 2014-01-22 15:26:43 -07:00
John Safranek
38c2373c4f PKCS7_VerifySignedData() also saves pointer to signed data. 2014-01-21 22:11:21 -08:00
John Safranek
15f94b2f98 1. Resized sample PKCS7 signed data attribute.
2. Removed unnecessary PKCS7 signed data attribute.
2014-01-21 11:45:15 -08:00
Moisés Guimarães
8541c2cc97 added renegotiation indication SCSV sending on client hello. 2014-01-21 11:38:59 -03:00
John Safranek
c35a635fd7 Added initial PKCS7_VerifySignedData(). Only saves
the first included certificate if available.
2014-01-20 15:52:41 -08:00
John Safranek
2187955fe9 Merge branch 'master' of github.com:cyassl/cyassl 2014-01-20 10:53:14 -08:00
John Safranek
28f3a2dc21 Added deallocator function for PKCS7 initializer data. 2014-01-20 10:51:26 -08:00
Chris Conlon
ce7fe56de5 adjust next PKCS#7 envelopedData recipient check 2014-01-20 11:42:45 -07:00
John Safranek
c4eb5642b1 1. Sign the PKCS#7 with a supplied private key, not
the single cert's public key.
2. Rename PKCS7 Envelope Data function as
   `PKCS7_EncodeEnvelopedData()`.
3. Encode signed data to check input parameters.
2014-01-17 14:07:40 -08:00
Chris Conlon
e9b82d8174 place PKCS#7 IV in AlgoID optional params, resolve merge conflicts 2014-01-16 17:46:28 -07:00
Chris Conlon
366f42a91b remove NULL tag from block cipher AlgoId, IV there instead 2014-01-16 17:45:10 -07:00
John Safranek
eb2e987a29 Split two PKCS7 tests into two functions. 2014-01-16 16:29:33 -08:00
John Safranek
cf22e49117 Merge branch 'master' of github.com:cyassl/cyassl 2014-01-16 16:19:34 -08:00
John Safranek
264ce75041 1. Split SetTagged into SetExplicit and SetImplicit.
2. Updated code using SetTagged to use new functions.
2014-01-16 16:17:17 -08:00
Chris Conlon
a75b95facc more comments to PKCS#7 files 2014-01-16 13:29:37 -07:00
Chris Conlon
590dde753a only store issuer into issuerRaw 2014-01-16 10:45:52 -07:00
John Safranek
36f78c5e1d 1. Bug fix for taking the size of something.
(Used wrong variable name.)
2. Renamed PKCS7 signed data test output file.
3. Added PKCS7 data test output files to gitignore.
2014-01-15 15:42:27 -08:00
John Safranek
cd44227945 Cleaned up warnings when using sizeof() in math. 2014-01-15 14:25:15 -08:00
John Safranek
85c5c29e7a Merge branch 'master' of github.com:cyassl/cyassl
Conflicts:
	ctaocrypt/test/test.c
	cyassl/ctaocrypt/pkcs7.h
2014-01-15 13:23:26 -08:00
John Safranek
c33a8a890e Added encoding PKCS#7 signed data messages. 2014-01-15 12:31:51 -08:00
Chris Conlon
46a03daf5f initial PKCS#7 crypto test 2014-01-15 11:05:18 -07:00
Moisés Guimarães
d58add7e97 added protection to test_CyaSSL_client_server
fixed min macro
2014-01-15 10:56:49 -03:00
Chris Conlon
9f7e33e7e1 add PKCS7_DecodeEnvelopedData() 2014-01-14 22:57:55 -07:00
Chris Conlon
d63c58864f expose more ASN.1 helper functions with CYASSL_LOCAL 2014-01-14 22:48:55 -07:00
Chris Conlon
80c19aaf33 add PKCS7 error codes 2014-01-14 22:46:54 -07:00
toddouska
8a1971d52b add CyaSSL_CertPemToDer for certs, ca certs, and cert reqs 2014-01-14 15:13:43 -08:00
toddouska
3152c28650 add escape for 64encdoe + and = too 2014-01-14 09:36:21 -08:00
Chris Conlon
f072d92ed8 Merge branch 'master' of github.com:cyassl/cyassl 2014-01-13 13:20:29 -07:00
Chris Conlon
69ffa3a481 add PKCS7_EncodeEnvelopeData() 2014-01-13 13:19:44 -07:00
toddouska
bb6b2e86c6 add base64 encode with esacped line ending, keep existing api intact 2014-01-13 12:17:12 -08:00
John Safranek
ef9cfc2172 Added method to encode PKCS7 data type messages. 2014-01-13 10:58:01 -08:00
Chris Conlon
3a984990c2 update pkcs7.h 2014-01-10 16:17:02 -07:00
Chris Conlon
71e13a3c3a expose ASN.1 helper fns, add blkType 2014-01-10 16:13:56 -07:00
Chris Conlon
0024db221f fix --enable-pkcs7 configure.ac 2014-01-10 16:11:17 -07:00
Chris Conlon
1d67d9217e initial PKCS#7 stubs, tie into ./configure 2014-01-10 15:17:03 -07:00
John Safranek
9e55d71ccc Added enable-certgen to configure.ac. 2014-01-10 11:50:55 -08:00
John Safranek
4a975e8d00 SetRsaPublicKey() to support ASN.1 unsigned intergers correctly. 2014-01-10 11:29:08 -08:00
John Safranek
f9e73a8aeb Added setting the cert req challenge password. 2014-01-09 14:17:55 -08:00
John Safranek
f545a33e77 Cert Req
1. Added support for the cert req attributes.
2. Added setting the Basic Constraints extenstion request.
3. Added error checking for the cert req attribs.
2014-01-08 16:26:42 -08:00
John Safranek
7b4cf370d0 In test: Cert req now signed by correct key. Removed loading of CA key. 2014-01-08 11:47:59 -08:00
John Safranek
f0a7d94c48 Cert Request
1. Added setting the request's version.
2. Added certreq test code to the ctaocrypt test.
3. Added the certreq test outputs to gitignore.
2014-01-08 10:57:46 -08:00
John Safranek
4de6a6d902 Cert Request
1. Added function to make simple DER format cert reqs.
2. Added cert req type to DerToPem.
2014-01-07 17:25:46 -08:00
toddouska
d6ad10f027 add USE_SLOW_SHA2 for sha384 and sha512, over twice as small code but over 50% slower too 2014-01-03 12:32:14 -08:00
toddouska
9d0e991e41 fix 32bit no asm combos 2014-01-02 16:58:54 -08:00
Chris Conlon
99ac08cf3d lower case mp_sqr() parameters, missed in previous commit 2014-01-02 13:37:11 -07:00
Chris Conlon
9f4ea7d059 update TYTO settings, FREESCALE_MMCAU AES check for NULL 2014-01-02 13:13:18 -07:00
Chris Conlon
7cc9ab3d6f use lower case variables, prevent conflict with some toolchain defines 2014-01-02 13:11:27 -07:00
John Safranek
7b04b7ab84 DTLS IO and cookie callbacks are IPv4/IPv6 agnostic. 2013-12-30 10:39:12 -08:00
John Safranek
420ca9e6e3 Merge branch 'ocsp' 2013-12-27 16:14:47 -08:00
John Safranek
896b16a7df Fixed off-by-one error in OCSP 2013-12-27 16:13:52 -08:00
John Safranek
d46c68ba10 Moved OCSP into the CertManager like the CRL. 2013-12-27 12:11:47 -08:00
Moisés Guimarães
3e24a446b9 fixing SNI_GetFromBuffer return code on success. 2013-12-24 15:34:17 -03:00
John Safranek
4ce2e59adf For Atomic user:
1. Added a getter for the session's IV size.
2. The HMAC size getter should return 0 for AEAD ciphers
   and the hash length for the others.
2013-12-23 22:32:08 -08:00
John Safranek
14aa114854 Trimmed unused includes and defines from OCSP source. 2013-12-23 14:33:44 -08:00
Chris Conlon
64912b37f6 adjust key buffer length when using ToTraditional() or ToTraditionalEnc() 2013-12-23 14:07:58 -07:00
toddouska
29c41da818 do size check on user password input 2013-12-23 12:24:03 -08:00
toddouska
3c706b4645 only set up tmp ctx if using password 2013-12-23 12:15:55 -08:00
toddouska
db71460bb8 add password functionality to CyaSSL_KeyPemToDer() 2013-12-23 12:07:20 -08:00
toddouska
0ee34c961e make sure passwd_cb called before load private key in server example 2013-12-23 11:19:21 -08:00
toddouska
dff54942a2 xcode5 paths for examples 2013-12-19 15:23:57 -08:00
rofl0r
a36c18c27f implement CyaSSL_ERR_reason_error_string
this has several advantages:
- we can provide a replacement for openssl's ERR_reason_error_string,
  which makes porting simpler,
- code shrink due to removal of excessive strcpy call
- all error strings are const anyway so there's no point to force the
  user to supply storage for them and copying them around.
2013-12-19 19:40:48 +01:00
toddouska
7a19cc377f Merge branch 'master' of github.com:cyassl/cyassl 2013-12-18 16:18:07 -08:00
toddouska
ea5b7ca9d1 allow testsuite to run in xcode 5 if custom build location 2013-12-18 16:16:35 -08:00
John Safranek
4ffc92a4d6 Use OCSP override URL enable in both example client and server. 2013-12-18 12:34:40 -08:00
John Safranek
75e6ac534e Force Cygwin to use function tolower() rather than macro version 2013-12-18 10:58:10 -08:00
John Safranek
fe4f10418f OCSP lookups are IPv4/IPv6 agnostic. 2013-12-17 18:30:42 -08:00
John Safranek
003446a5cd Using OCSP override URL should enable OCSP url overriding. 2013-12-17 18:26:29 -08:00
Chris Conlon
6c43a008ab update README 2013-12-17 16:33:56 -07:00
Chris Conlon
8c8a1b0db8 add Freescale K60 mmCAU AES, DES, 3DES support 2013-12-17 16:29:21 -07:00
Chris Conlon
c466fac597 add Freescale K60 mmCAU MD5, SHA, SHA256 support 2013-12-17 16:28:08 -07:00
toddouska
9db9f52c9c don't install internal.h, not for public consumption 2013-12-16 15:24:02 -08:00
Moisés Guimarães
ffd58e27ef removing deprecated TRUNCATED_HMAC_SIZE 2013-12-12 21:05:31 -03:00
toddouska
5efbf98f31 separate sniffer / snifftest ./configure build 2013-12-12 14:20:56 -08:00
John Safranek
9d6182d279 Merge branch 'master' of github.com:cyassl/cyassl 2013-12-12 11:06:21 -08:00
John Safranek
26a26fa19d 1. Fixed a build warning.
2. Fixed an initialization bug when decoding old-style client hellos.
2013-12-12 10:45:19 -08:00
Chris Conlon
5909f5c2c0 Merge branch 'master' of github.com:cyassl/cyassl 2013-12-11 16:20:43 -08:00
Chris Conlon
8c7f5817ac NO_FILESYSTEM fix for CyaSSL_X509_load_certificate_file 2013-12-11 16:19:09 -08:00
toddouska
ba95c33ed4 more clang warnings 2013-12-11 15:47:40 -08:00
toddouska
e5b0000ee4 switch enable-sniffer w/o libpcap to error out again 2013-12-11 14:59:46 -08:00
toddouska
b41d09b1a2 fix newer clang warnings 2013-12-11 12:03:09 -08:00
toddouska
9e56ad262c fix snifftest pcap frees on file mode, close TraceFile on ssl_Free 2013-12-10 16:17:43 -08:00
John Safranek
0d85a85d59 Bumped version for point release. 2013-12-10 12:05:55 -08:00
toddouska
3051c8e900 make sure Arrays elemets all set to 0 2013-12-09 18:21:43 -08:00
toddouska
276a9c871e eccfp warning fix 2013-12-06 08:58:06 -08:00
John Safranek
9fe165e8f8 1. Added a couple missing checks for NULL pointers in DTLS code.
2. Fixed compiler warning under Windows.
3. DTLS sliding window packet filter.
2013-12-03 15:11:00 -08:00
Chris Conlon
fc97174fb8 tie Microchip files into autoconf system 2013-12-02 15:31:48 -07:00
toddouska
986e2b5694 Merge branch 'master' of github.com:cyassl/cyassl 2013-12-02 12:07:17 -08:00
toddouska
cf545ca692 fix mcapi test on unix 2013-12-02 12:04:22 -08:00
Moisés Guimarães
0c1e02ddd0 added truncated_hmac handing on SanityCheckCipherText, VerifyMac and BuildMessage 2013-12-02 16:19:52 -03:00
Moisés Guimarães
384cc9d3da adding truncated_hmac to tlsx 2013-12-02 16:19:51 -03:00
toddouska
4c62e7ef9e Merge pull request #57 from kojo1/PIC32MZ-Cleaned
MPLABX. Eliminating unused files
2013-12-02 11:10:00 -08:00
Moisés Guimarães
f8b30b3379 changing variable names to build on Ubuntu. 2013-12-02 15:50:21 -03:00
Takashi Kojo
234f8382cc mplabx, cleaned 2013-11-28 12:21:10 +09:00
Takashi Kojo
a492be99c1 MDK5, eliminated unused files 2013-11-28 09:25:54 +09:00
Takashi Kojo
1bcd61f134 Eliminating unused files 2013-11-28 09:05:33 +09:00
toddouska
6294102760 fix wrong NO_DES flags for requirements 2013-11-27 11:59:23 -08:00
Takashi Kojo
9a67901081 Eliminate unused files 2013-11-28 00:16:49 +09:00
Moisés Guimarães
7dfb3c6b29 Fixing length adjustment on both while loops
added test for client hello without SNI extension
2013-11-25 21:05:40 -03:00
Moisés Guimarães
0f2f9b6982 added more tests with code refactoring. 2013-11-21 21:25:43 -03:00
Moisés Guimarães
ba18f8b03e added new function to retrieve SNI from a buffer. 2013-11-21 21:25:42 -03:00
John Safranek
6bdbc83924 Merge branch 'master' of github.com:cyassl/cyassl 2013-11-21 10:54:56 -08:00
John Safranek
dda5413ae2 moved some #defines around to fix sessioncerts-only build 2013-11-21 10:48:45 -08:00
toddouska
6e7c9fb8de Merge branch 'master' of github.com:cyassl/cyassl 2013-11-20 17:07:33 -08:00
toddouska
8bf18d31c9 fix smartos warnings 2013-11-20 17:03:19 -08:00
Chris Conlon
2f7970ab65 add FREERTOS current_time() to benchmark.c 2013-11-20 17:03:58 -07:00
toddouska
864b25843e Merge branch 'master' of github.com:cyassl/cyassl 2013-11-20 15:13:14 -08:00
toddouska
10a3f8ead3 make cert names more consistent with str type that openssl uses 2013-11-20 15:12:33 -08:00
John Safranek
67b1b00a2c OCSP Nonces are not critical extensions. Allow a response to be missing the nonce. 2013-11-20 13:46:46 -08:00
toddouska
c545202de0 don't allow inplace DerToPem, not supported 2013-11-20 13:17:39 -08:00
toddouska
7585e92fee allow cert signing w/o Cert object, buffer only 2013-11-19 16:56:49 -08:00
John Safranek
74c9ddcffb bump dev version 2013-11-19 16:25:18 -08:00
John Safranek
4377996d87 Saved original SKID and AKID from certificate for later use with X.509 functions. 2013-11-19 16:20:18 -08:00
John Safranek
0fd6aed9b6 Save more decoded data from certificate for later use with X.509 functions. 2013-11-19 14:44:55 -08:00
Chris Conlon
c0007ad6b3 move Coldfire SEC specific DES/3DES header sections into define 2013-11-19 14:34:05 -07:00
toddouska
e92860bda7 ecc enc/dec offset init fix 2013-11-19 11:17:23 -08:00
John Safranek
321d215e57 Added ecc, blake, crl, ocsp to the VS project 2013-11-16 21:53:57 -08:00
toddouska
d91e8ab38e add cert gen for ecc certs 2013-11-14 20:34:39 -08:00
toddouska
a7bcca84c3 add ecdsa cert signing 2013-11-14 15:00:22 -08:00
Chris Conlon
7a1fb428d1 fix ecc_set_type member name conflict 2013-11-14 11:10:29 -07:00
toddouska
cf4230b073 add ecc encrypt secure message exchange, hide ecEncCtx 2013-11-13 17:53:11 -08:00
toddouska
2e9e372875 Merge branch 'master' of github.com:cyassl/cyassl 2013-11-11 17:01:39 -08:00
toddouska
0ef44329ef add thread local storage to ecc fp cache, no locking required but cache is per thread, higher conncurrent performance but more memory needed 2013-11-11 17:00:35 -08:00
Takashi Kojo
b54b92bc2a benchmark.c conflicts resolved 2013-11-12 08:21:41 +09:00
Takashi Kojo
5a9140fd13 For PIC32MZ 2013-11-12 08:12:01 +09:00
John Safranek
8c20ff2d97 Merge branch 'master' of github.com:cyassl/cyassl 2013-11-11 11:31:35 -08:00
John Safranek
dabb8058c4 1. Updated README Note 2. The error code described for no signer
errors is -188. (The error code -155 is for the signature
   confirmation failing.)
2. Fixed bug in copying the signature from a DecodedCert to a
   CYASSL_X509 record.
2013-11-11 11:19:35 -08:00
Takashi Kojo
0048c20fe5 PIC32MZ RNG 2013-11-11 12:15:19 +09:00
Takashi Kojo
23cada35ba Catch up master 2013-11-10 21:06:34 +09:00
Takashi Kojo
240565cdba README for MZ 2013-11-10 20:52:12 +09:00
Takashi Kojo
a4e61cbdbb For PIC32MZ 2013-11-10 20:42:21 +09:00
toddouska
3e072c8dda random.c missing settings include fix 2013-11-08 10:56:50 -08:00
toddouska
c2f9064ae4 Merge branch 'master' of github.com:cyassl/cyassl 2013-11-07 16:00:34 -08:00
toddouska
554adff672 add basic ecc encrypt/decrypt 2013-11-07 15:59:31 -08:00
toddouska
7866d51ee9 fix benchmark pull changes 2013-11-07 11:00:56 -08:00
Takashi Kojo
16bda74536 For MDK5 Pack 2013-11-07 10:29:01 +09:00
John Safranek
42f82ce9cc Merge branch 'master' of github.com:cyassl/cyassl 2013-11-06 15:54:01 -08:00
John Safranek
20e6ac7104 Added public key type to PKEY copy 2013-11-06 14:16:21 -08:00
John Safranek
4dc30fcde5 Added X.509 accessor for signature. 2013-11-06 11:49:49 -08:00
Takashi Kojo
25e2117a84 NL code fix 2013-11-06 11:26:26 +09:00
Takashi Kojo
f26cf50ff2 Merge branch 'master' of https://github.com/cyassl/cyassl into MDK5 2013-11-06 10:22:21 +09:00
Takashi Kojo
31891942b9 default options for MDK5 pack 2013-11-06 10:14:15 +09:00
Chris Conlon
fb8c3e0c75 fix gcc warning with enable-ocsp 2013-11-04 15:36:08 -07:00
John Safranek
9d5d1cbbc9 bump dev version 2013-11-04 11:39:53 -08:00
John Safranek
913e200cd0 X.509 Additions:
* CyaSSL_X509_d2i()
* CyaSSL_X509_d2i_fp()
* CyaSSL_X509_version()
* CyaSSL_X509_get_notBefore()
* CyaSSL_X509_get_notAfter()
* CyaSSL_X509_STORE_new()
* CyaSSL_X509_STORE_free()
* CyaSSL_X509_STORE_add_cert()
* CyaSSL_X509_STORE_set_default_paths()
* CyaSSL_X509_get_pubkey()
* CyaSSL_EVP_PKEY_free()
* CyaSSL_X509_NAME_get_text_by_NID()
* CyaSSL_X509_NAME_entry_count()
* CyaSSL_X509_verify_cert()
* CyaSSL_X509_STORE_CTX_new()
* CyaSSL_X509_STORE_CTX_init()
* CyaSSL_X509_STORE_CTX_free()
2013-11-04 11:02:17 -08:00
toddouska
5e00d62ea3 add HMAC-KDF 2013-10-31 18:03:00 -07:00
toddouska
c88d0d5739 fix mplab harmony random ifdef 2013-10-31 10:47:03 -07:00
toddouska
cc323fb4cc ecc shamir requires bigger LUT in fp mode 2013-10-31 10:43:48 -07:00
toddouska
12b074fbe9 add worst case estimate to ecc_sign_size() 2013-10-30 13:33:23 -07:00
toddouska
3d19604bfb make sure to always check mp_to_*, normal math could fail 2013-10-29 17:38:12 -07:00
toddouska
f402d7eed9 add ecc export pirvate only 2013-10-29 16:44:33 -07:00
toddouska
b377a60596 add packet# length to snifftest output 2013-10-29 15:41:05 -07:00
toddouska
de6b9bc6be fix sniffer with new decrypt/verify code 2013-10-28 17:18:41 -07:00
toddouska
5c57df8227 Merge branch 'master' of github.com:cyassl/cyassl 2013-10-28 13:23:17 -07:00
toddouska
071338bf39 fix fpecc normal math init/free issue 2013-10-28 13:17:33 -07:00
John Safranek
26d72360c5 Improvement to M4 scripts to check for clang when building under Darwin. 2013-10-28 12:27:56 -07:00
toddouska
9438d0d41b add Microchip MPLAB Harmony support 2013-10-28 11:03:50 -07:00
Takashi Kojo
849bbdefae Updates for MDK4 2013-10-26 17:18:18 +09:00
Takashi Kojo
33ccf62ff5 MDK5 support 2013-10-25 15:49:39 +09:00
toddouska
8c7715ee33 remove CBC naming from HC-128 suites 2013-10-24 12:10:09 -07:00
toddouska
f833674171 remove CBC from RABBIT suite naming 2013-10-24 11:52:21 -07:00
toddouska
4c04b6e714 add AES Blake2b 256 basic suites for speed tests 2013-10-24 11:30:51 -07:00
Takashi Kojo
b4a03de8ee port.h for MDK5 2013-10-24 20:55:21 +09:00
Takashi Kojo
558735c862 port.[ch] for MDK5 2013-10-24 20:33:36 +09:00
Takashi Kojo
f3f3a5abb0 cyassl/IDE/MDK5-ARM files for MDK5 support 2013-10-24 19:55:40 +09:00
Takashi Kojo
2f98233825 For MDK5 2013-10-24 18:50:26 +09:00
Takashi Kojo
3ed2085e77 ctaocrypt/{benchmark,src,test} files fro MDK5 2013-10-24 17:20:12 +09:00
Takashi Kojo
e4a3599a6b cyassl/src file updates for MDK5 2013-10-24 16:52:17 +09:00
toddouska
b45370a599 remove test output 2013-10-23 17:17:47 -07:00
toddouska
c039b0106a add HC-128 Blake2b 256 cipher suite for speed test 2013-10-23 17:13:54 -07:00
John Safranek
14f4162180 bump dev version 2013-10-23 16:22:10 -07:00
John Safranek
846511376c added x.509 text dump to the server-ecc.pem cert 2013-10-22 10:16:50 -07:00
John Safranek
fca8d03d4c New server-ecc.pem. Old copy expired today. 2013-10-21 21:07:28 -07:00
Chris Conlon
f45d0709b3 case insensitivity fix for domain name check 2013-10-18 15:17:19 -06:00
John Safranek
8295d8bb4a 1. Reject DSA certificates instead of ignoring them.
2. Resolved potential crash when trying to calculate a Subject Key
   ID when the public key is missing from a certificate.
2013-10-16 10:16:04 -07:00
Chris Conlon
dba488ba70 add option to always call verify callback with CYASSL_ALWAYS_VERIFY_CB 2013-10-14 15:04:26 -06:00
toddouska
0126a39d68 fix shamir speed up init buffer 2013-10-10 18:47:25 -07:00
toddouska
6c654bba3d fix camellia memory leak 2013-10-10 16:50:35 -07:00
John Safranek
51c485f523 1. Added a couple missing checks for NULL pointers in DTLS code.
2. Fixed compiler warning under Windows.
2013-10-08 14:59:59 -07:00
John Safranek
33bcc76a07 Merge branch 'master' of github.com:cyassl/cyassl 2013-10-02 15:27:10 -07:00
Chris Conlon
3e12f43342 add CyaSSL_GetHmacMaxSize for JNI wrapper 2013-09-25 14:20:36 -06:00
Chris Conlon
17b220e9c7 add Freescale MQX time functionality 2013-09-24 20:12:48 -06:00
toddouska
27078bb89c use to detect x86_64 for fastmath default 2013-09-24 12:15:28 -07:00
toddouska
363f157f50 fix sniffer build w/o fastmath 2013-09-23 13:37:04 -07:00
toddouska
bdb8b9396c Merge branch 'master' of github.com:cyassl/cyassl 2013-09-20 10:37:16 -07:00
toddouska
d1fcce2f73 more settings 2013-09-20 10:36:05 -07:00
toddouska
8e5dab1ef3 clang can't use pthread(s) flag 2013-09-20 10:34:29 -07:00
toddouska
a2189d2f55 Merge branch 'master' of https://github.com/BrianAker/cyassl 2013-09-19 14:06:51 -07:00
John Safranek
5e4ca53496 clean up Windows build issues with OCSP 2013-09-18 14:47:51 -07:00
John Safranek
49d3e74fde Fixed a Windows build warning in the benchmark 2013-09-17 22:15:59 -07:00
John Safranek
b0f94a34e6 Deleted stray semicolon from struct Des definition 2013-09-17 16:42:52 -07:00
Chris Conlon
ee78b108cf CTaoCrypt test mods for MQX 2013-09-16 15:48:36 -06:00
Chris Conlon
abff02532d add Freescale K53 RNGB support 2013-09-16 14:43:33 -06:00
John Safranek
e564b614bf Decode the serialNumber field in the X.509 names 2013-09-15 22:10:58 -07:00
Brian Aker
db20b61e51 Update autoconf rules. Fixes bug url to point to github issues. 2013-09-15 00:13:30 -07:00
John Safranek
49f82c4717 Added two more GMAC test cases 2013-09-12 14:10:57 -07:00
John Safranek
c5f3eace7d DTLS timeout init wasn't initializing the timeout until after the first timeout. 2013-09-11 14:28:01 -07:00
John Safranek
978bb7374d added port.c to the iOS project 2013-09-11 10:58:18 -07:00
toddouska
74e7ba8536 fix Kojo-san pull errors 2013-09-11 10:07:33 -07:00
kojo
0869da34a0 Coldfire SEC 2013-09-11 17:06:28 +09:00
kojo
7e609028bd add port.c to MDK projects 2013-09-11 12:55:15 +09:00
kojo
742f286827 add port.c to MDK projects 2013-09-11 12:16:30 +09:00
kojo
44be8df9ef Merge branch 'master' of https://github.com/kojo1/cyassl-test 2013-09-11 12:04:40 +09:00
kojo
bfc448b90c add port.c 2013-09-11 12:03:14 +09:00
kojo
99b26705ce add prot.c 2013-09-11 11:56:18 +09:00
John Safranek
03d7c694e8 Merge branch 'master' of github.com:cyassl/cyassl 2013-09-10 16:49:40 -07:00
John Safranek
d3db1a42de Added GMAC wrapper functions around AES-GCM 2013-09-10 16:47:39 -07:00
toddouska
bab790ab87 add port.c to visual studio builds 2013-09-09 13:48:28 -07:00
John Safranek
0ae966b350 fix shadow warning 2013-09-08 17:46:29 -07:00
toddouska
44ba0af192 free fp ecc resources on cleanup 2013-09-06 17:08:57 -07:00
toddouska
6e05d4317f add proper locking to fp ecc 2013-09-06 16:53:33 -07:00
toddouska
a14af5f0b0 move mutex to port layer at crypto level 2013-09-06 16:38:27 -07:00
toddouska
782cb0e077 Merge branch 'master' of github.com:cyassl/cyassl 2013-09-06 14:25:51 -07:00
toddouska
46be3b8508 add fixed point ecc cache, --enable-fpecc, add locking down to crypt level next 2013-09-06 14:24:31 -07:00
Moisés Guimarães
d7a08b1a76 centralizing MAX_DIGEST_SIZE definition in hmac.h 2013-09-06 15:53:46 -03:00
John Safranek
f2c75a9e87 ECDSA signatures need a zero padding for the ASN.1 storage of the R and S values 2013-09-05 15:00:01 -07:00
toddouska
08c9f61f16 add accelerated ecc_proj* and ECC SHAMIR to speed up ecdsa verify 2013-09-04 13:13:10 -07:00
toddouska
e93a0640f1 break up huge math into individual parts so can add piece by piece, e.g., ECC256 2013-09-03 13:13:13 -07:00
toddouska
f813182efd release update 2013-08-30 12:34:26 -07:00
toddouska
b9540bf579 check NULL to match docs 2013-08-29 08:25:14 -07:00
John Safranek
78b8da9949 Initialize the AEAD explicit IV to 0. 2013-08-27 10:44:04 -07:00
John Safranek
9764970b8a Added gcov's extensions to gitignore 2013-08-27 10:16:16 -07:00
toddouska
e8fcf35098 add Rsa Public/Private client key exchange callbacks, examples 2013-08-26 17:14:19 -07:00
toddouska
f3f80bd66e add Rsa Sign/Verify callbacks, client/server examples 2013-08-26 16:27:29 -07:00
toddouska
664c6de5d5 send blank cert on client if TLS instead of TLSv1.2, more accept this now and some even incorrectly require it 2013-08-26 12:34:39 -07:00
John Safranek
081a3a57d4 move variable declaration before function code 2013-08-23 10:26:42 -07:00
John Safranek
33a7a7f762 initialize return variable 2013-08-23 10:20:39 -07:00
John Safranek
0002ba4ee8 Merge branch 'master' of github.com:cyassl/cyassl 2013-08-23 10:12:17 -07:00
John Safranek
d734c86c72 cleanup build warnings
1. Change `CyaSSL_OCSP_set_options()` to return `SSL_SUCCESS`
   or `SSL_FAILURE` as `int` like rest of API.
2. Fix data narrowing warning in file io.c function
   `process_http_response()`.
3. Fix global variable shadowed warning in file ssl.c function
   `CyaSSL_GetSessionAtIndex()`
4. Fix data narrowing warning in file internal.c functions
   `Encrypt()` and `Decrypt()`. Passed in a word32 size parameter
   that was provided a word16 and used as a word16.
5. Removed unreachable code from file tls.c function
   `CyaSSL_GetHmacType()`.
6. Fix data narrowing warnings in file aes.c functions
   `AesCcmEncrypt()` and `AesCcmDecrypt()`.
2013-08-23 10:09:35 -07:00
toddouska
e98f5f95c2 add public key callbacks for ecc sign/verify, examples 2013-08-22 18:19:39 -07:00
toddouska
bc958f5798 C comments only 2013-08-22 10:35:46 -07:00
John Safranek
64ba0587a3 Merge branch 'master' of github.com:cyassl/cyassl 2013-08-21 22:42:15 -07:00
John Safranek
957cf90118 Added function to read certificate from file into CYASSL_X509 buffer. 2013-08-21 22:36:43 -07:00
toddouska
54a2f8b9aa add useratomic DecryptVerify Callbacks, example 2013-08-21 16:55:34 -07:00
John Safranek
9f07a7dd2b modified SEP X509 functions to behave like the NAME_oneline function 2013-08-20 16:47:38 -07:00
John Safranek
442886a207 Added x509 accessors for the SEP build certificate additions. 2013-08-17 09:01:15 -07:00
toddouska
19f7053f1d Merge branch 'master' of github.com:cyassl/cyassl 2013-08-09 17:28:14 -07:00
toddouska
65f0e9f6b9 add atomic user macencrypt cb 2013-08-09 17:27:15 -07:00
toddouska
840e958ae5 add ecc verify to benchmark 2013-08-09 17:06:02 -07:00
toddouska
16db0c234e bump dev version 2013-08-06 15:08:05 -07:00
toddouska
3378f8f25e add DTLS cookie ctx geter 2013-08-06 15:06:33 -07:00
toddouska
5c5cee0789 use external CYASSL_MAX_ERROR_SZ for buffer size 2013-08-06 11:48:00 -07:00
toddouska
427a421ec5 fix rpm with .pc install, from Brian 2013-08-06 11:29:37 -07:00
John Safranek
831d9cf640 SEP Profile
1. Changed session index shift values to constants.
2. Added bounds checking when retrieving a session.
3. Added function to retrieve the peer cert chain from
   a CYASSL_SESSION record.
2013-08-02 16:03:41 -07:00
toddouska
3b4ff94931 add paramter validation to SSL I/O calls 2013-08-02 12:12:51 -07:00
John Safranek
1357cdb0e4 SEP Profile
1. Add session cache index to CYASSL structure.
2. Add accessor for cache index in CYASSL structure.
3. Add copy function for session cache item.
2013-07-28 17:11:22 -07:00
toddouska
505b1a8a67 fix ecc sign/hash truncation with odd bit sizes when hash length is longer than key size 2013-07-25 15:59:09 -07:00
Moisés Guimarães
55401c13dd Truncated HMAC first part (protocol). Extension processing will be coded later. 2013-07-23 15:42:43 -03:00
toddouska
14b100fee6 fix savecert with no_skid, gcc warnings 2013-07-22 14:30:35 -07:00
toddouska
37a9a7a457 add IOCb Ctx getters 2013-07-22 11:01:00 -07:00
toddouska
1b5bc04e4a Merge pull request #47 from kojo1/master
RTX aware flag for MDK-ARM projects
2013-07-18 08:49:36 -07:00
kojo
d04c915227 MKD-ARM proj name fixed 2013-07-18 09:39:20 +09:00
kojo
e6c80f0725 RTX aware flag for MDK-ARM projects 2013-07-18 09:25:49 +09:00
toddouska
5e633ea6fd Merge pull request #45 from kojo1/master
MDK-ARM LCP43xx project fixed
2013-07-16 18:24:52 -07:00
kojo
37c5ba26bf MDK-ARM LCP43xx project fixed 2013-07-17 09:34:06 +09:00
toddouska
7db3116ae4 update rpm version 2013-07-11 16:33:27 -07:00
Chris Conlon
f3a707724b README typo fixes 2013-07-11 10:17:29 -06:00
John Safranek
43f320d5e2 SEP Extensions
1. Added configure option to enable SEP extensions.
2. Enabled KEEP_PEER_CERT for the SEP configuration.
3. Copy the Certificate Policy extension into the cert as the
   device type.
4. Copy an other type Alt Name extension into the cert as the
   hwType and hwSerialNumber, if the alt name has a
   hardwareModuleName OID.
2013-07-09 13:23:56 -07:00
toddouska
99b6c1d3c3 fix GCC warning 2013-07-09 09:57:55 -07:00
toddouska
f9bf003718 allow NULL IVs for CBC mode, same as all zero IV 2013-07-08 11:52:00 -07:00
John Safranek
b66cb11cb8 Fixed bug in DecodeAltNames() where idx wasn't advanced past the length. 2013-07-05 10:10:38 -07:00
toddouska
705aa0f453 fix user malloc define w/ opensslextra 2013-07-05 09:42:49 -07:00
John Safranek
226f018829 Fixed memory leak of http buffer in OCSP lookup. 2013-07-02 17:35:30 -07:00
toddouska
b3d99f2d32 only have fastmath on by default on x86_64 2013-07-01 12:10:59 -07:00
Moisés Guimarães
593e466a44 limiting max_fragment API for client side only. 2013-07-01 10:13:43 -03:00
toddouska
98e6ad3ee9 add comverge switch for settings 2013-06-27 10:28:58 -07:00
toddouska
307c71d9cb add CyaSSL_UnloadCertsKeys to free SSL certs and keys after handshake 2013-06-27 10:26:04 -07:00
John Safranek
773d0da1bc Fixed issue with the DTLS EmbedReceiveFrom() callback using IPv6. 2013-06-26 17:40:21 -07:00
toddouska
fdb2416e49 Merge branch 'master' of github.com:cyassl/cyassl 2013-06-26 17:06:49 -07:00
toddouska
d0c2e9b7a2 switch comverge settings to ecc by default 2013-06-26 17:05:30 -07:00
John Safranek
29b32e582a DTLS IPv6 Hello Cookie Update
1. Add support for IPv6 addresses when calculating DTLS Cookie.
2. Simplify cookie calculation.
2013-06-26 16:32:01 -07:00
John Safranek
0d0fc27e42 Fixed DecodeAuthKeyId fail case not returning. 2013-06-26 11:16:17 -07:00
toddouska
ed82f06382 Merge branch 'master' of github.com:cyassl/cyassl 2013-06-26 11:05:00 -07:00
toddouska
60c2388ae7 fix potential NetX packet memory leak 2013-06-26 11:03:54 -07:00
John Safranek
f3af0124e4 Fixed DecodeAltNames extension falling through to next case. 2013-06-25 13:37:43 -07:00
John Safranek
7fd3b8a993 Fixed error string for example server private key file failure. 2013-06-25 13:14:24 -07:00
toddouska
87eb94b7c4 Merge branch 'master' of github.com:cyassl/cyassl 2013-06-24 14:02:40 -07:00
toddouska
b51d6f3b8f add NetX default IO context handling 2013-06-24 14:00:48 -07:00
toddouska
c3cb9b3b43 add IDE files to distribution 2013-06-24 12:00:21 -07:00
John Safranek
0c34ecb451 OCSP Updates
1. Add option to example server and client to check the OCSP responder.
2. Add option to example server and client to override the URL to use
   when checking the OCSP responder.
3. Copy the certificate serial number correctly into OCSP request.
   Add leading zero only if MS bit is set.
4. Fix responder address used when Auth Info extension is present.
5. Update EmbedOcspLookup callback to better handle the HTTP
   response and obtain the complete OCSP response.
2013-06-24 10:47:24 -07:00
John Safranek
e0a84521c5 Make alert description and level enumerations public. 2013-06-21 14:56:42 -07:00
John Safranek
17ab84eb07 Update call to DoAlert()
When handling the alerts, the return code wasn't checked for error codes. A corrupted alert message could cause a control flow issue.
2013-06-19 15:01:13 -07:00
John Safranek
42a0f3500f Update AES-GCM and AES-CCM to use AES-NI
1. Added the assembly functions to do AES-ECB.
2. Updated AesEncrypt and AesDecrypt to use the assembly functions
   if available.
3. Modified the AES-GCM and AES-CCM key setup functions to use the
   the AES-NI key setup if availble.
4. Added tests for the AES-ECB encrypt and decrypt.
5. Only include stdio.h for AES when DEBUG_AESNI is enabled
6. If using local key setup, skip using AES-NI for basic Encrypt
   and Decrypt.
2013-06-19 14:52:58 -07:00
Moisés Guimarães
affbb3ef27 Merge branch 'master' of https://github.com/cyassl/cyassl 2013-06-19 17:20:48 -03:00
Moisés Guimarães
4502716fc4 Merge branch 'master' of https://github.com/cyassl/cyassl 2013-06-19 17:04:43 -03:00
toddouska
b5ba31501c make stacksize more portable 2013-06-19 12:56:25 -07:00
Moisés Guimarães
25e910a0a9 max fragment length tests and fixes 2013-06-19 16:38:57 -03:00
Moisés Guimarães
5f3ee80407 added:
- max fragment length extension;
 - CyaSSL_SNI_GetRequest() to get client's request at server side;
 - Automated tests for SNI;
2013-06-19 15:45:06 -03:00
toddouska
85d25798a5 update ntru cert expires dates, update crls while at it, don't turn on skid for crls since openssl/firefox don't use by default and cyassl needs crl extension parsing 2013-06-17 14:48:51 -07:00
toddouska
d02af46256 windows build warning fixes 2013-06-17 12:26:21 -07:00
toddouska
a1f25a9299 release 2.7.0 init 2013-06-17 12:06:37 -07:00
toddouska
8c70b11528 add newSession flag to SetServerID to do full handshake w/ new session 2013-06-14 15:29:18 -07:00
toddouska
7f7c595d10 differentiate between THREADX and RTP_SYS 2013-06-14 13:45:25 -07:00
toddouska
9559f09028 warning fixes 2013-06-13 12:13:46 -07:00
John Safranek
b40c2c0b1f Fixed issue with no_server/no_client optional compile losing two functions 2013-06-06 21:59:05 +02:00
toddouska
33a7d7481d Merge branch 'master' of github.com:cyassl/cyassl 2013-06-03 14:57:40 -07:00
toddouska
ae84982777 add STACK_TRAP to track stack use on client, will seqfault if exceed limit to see where use is too high, doesn't work with pthread_create() 2013-06-03 14:56:37 -07:00
Moisés Guimarães
f1d1898ddf Added new option to SNI: CYASSL_SNI_ANSWER_ON_MISMATCH
Added new function to SNI API: CyaSSL_SNI_Matched()
2013-06-03 17:55:06 -03:00
Moisés Guimarães
cb2082edee changed CYASSL_SNI_ABORT_ON_MISMATCH to CYASSL_SNI_CONTINUE_ON_MISMATCH 2013-06-03 10:04:49 -03:00
John Safranek
4ad91673ca fixed description for filesystem configure option to match default 2013-05-31 17:57:08 -07:00
John Safranek
ebd03368c7 for DTLS handshakes, put change cipher spec and finished messages in same datagram 2013-05-31 13:48:49 -07:00
Moisés Guimarães
79fad81c32 shrinking function names 2013-05-30 15:40:10 -03:00
Moisés Guimarães
5c665fe614 Added options to SNI (now it is possible to choose whether or not to abort on a SNI Host Name mismatch)
Exposed SNI Type at ssl.h
2013-05-30 15:26:41 -03:00
toddouska
baa012b1d9 change = to space for user options defines with = value 2013-05-29 15:03:27 -07:00
toddouska
b2ef938cbe fix CYASSL_MALLOC_CHECK hard tabs and extra function not needed 2013-05-29 11:18:16 -07:00
toddouska
af48800c58 Merge branch 'MDK.STM.LPC' of https://github.com/kojo1/cyassl-test 2013-05-28 11:59:52 -07:00
Jasper Spaans
2b59554245 fix cipherSuite0 byte in sniffer, so ECC is recognised correctly. 2013-05-28 10:56:13 +02:00
kojo
cf25dfb16e Config-BARE-METAL default 2013-05-26 14:02:58 +09:00
kojo
1680b47ac6 Release for STM/LPC 2013-05-26 12:17:06 +09:00
kojo
e4a95342f1 Merging cyassl/master and STM.LPC 2013-05-26 10:05:35 +09:00
kojo
9382f74f2e Marging cyassl/master and STM.LPC 2013-05-26 09:47:51 +09:00
kojo
4b9c3d3512 Merge remote-tracking branch 'cyassl/master' into STM.LPC
Conflicts:
	IDE/MDK-ARM/MDK-ARM/CyaSSL/config-FS.h
	IDE/MDK-ARM/MDK-ARM/CyaSSL/config-RTX-TCP-FS.h
	IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.c
	IDE/MDK-ARM/MDK-ARM/CyaSSL/cyassl_MDK_ARM.h
	IDE/MDK-ARM/MDK-ARM/CyaSSL/main.c
	IDE/MDK-ARM/MDK-ARM/CyaSSL/shell.c
	IDE/MDK-ARM/MDK-ARM/CyaSSL/ssl-dummy.c
	IDE/MDK-ARM/MDK-ARM/config/File_Config.c
	IDE/MDK-ARM/MDK-ARM/config/RTX_Conf_CM.c
	IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvopt
	IDE/MDK-ARM/Projects/MDK-ARM-STM32F2xx.uvproj
	ctaocrypt/src/random.c
	src/internal.c
2013-05-26 09:27:06 +09:00
John Safranek
9753e46721 minor OCSP update
1. When doing the HTTP transaction, use recv() and send().
2. When a cert doesn't have an Auth Info extension, and not using
   an override server, it is considered good.
3. decode_url() should return -1 in case of error.
4. When decoding HTTP response, process all the headers, skipping all
   of those that are not-processed.
2013-05-24 17:23:07 -07:00
toddouska
616e4a66dd Merge branch 'master' of github.com:cyassl/cyassl 2013-05-23 15:57:00 -07:00
toddouska
8b90414f2a add POSITIVE_EXP_ONLY for fastmath stack reduction when positive exponents only 2013-05-23 15:55:22 -07:00
Moisés Guimarães
2030bab8d8 fixed shift, cast and name for extensions semaphore. 2013-05-23 17:02:39 -03:00
John Safranek
4ed2cf4b6e Earlier DTLS transmit patch, moved local variable definition to top of block 2013-05-22 18:36:13 -07:00
toddouska
8df0e43384 fix merge differences from this week 2013-05-22 15:50:13 -07:00
John Safranek
acaa2c02bf Fixed unencrypted TLS alerts having extra data, ssn12 2013-05-21 18:21:22 -07:00
John Safranek
80225e58aa updated the formatting from the patch 2013-05-21 17:39:11 -07:00
John Safranek
c325436712 Merge branch 'master' of git://github.com/JonasNorling/cyassl into JonasNorling-master 2013-05-21 17:27:11 -07:00
John Safranek
abed4cf669 Fix DTLS server memory leak, ssn11 2013-05-21 16:21:49 -07:00
toddouska
d2003bb8b7 merge in sni 2013-05-21 14:37:50 -07:00
John Safranek
b347df8d9a DTLS rx size check, ssn10
Allows for receiving datagrams larger than the MTU that are reassembled
by the IP stack.
2013-05-21 13:52:22 -07:00
kojo
a243281ca9 MDK-ARM for LPC/STM 2013-05-21 19:14:14 +09:00
kojo
4b3c3c92b3 MDK-ARM for LCP/STM 2013-05-21 19:02:34 +09:00
kojo
ff68942ce4 MDK-ARM ready for LCP/STM 2013-05-21 18:47:54 +09:00
kojo
082f5643ed OK for LCP43xx project 2013-05-21 17:13:12 +09:00
kojo
7252b7ecd4 additional files for MDK-ARM/LPC43xx, STM32F2xx 2013-05-21 09:58:56 +09:00
toddouska
fd5937b599 MDK-ARM updates 2013-05-20 17:56:27 -07:00
kojo
da342ea079 initial attempt for MDK-ARM/LPC43xx: 2013-05-21 09:39:09 +09:00
toddouska
7693b4282a turn on large static buffers for callbacks, easier for user 2013-05-20 12:46:54 -07:00
toddouska
10e6e7fbb5 check error_string_n size and truncate if too short 2013-05-20 10:36:06 -07:00
takashikojo
c2a82bce3d make up for MDK-ARM 2013-05-19 11:36:55 +09:00
takashikojo
926a62b458 make up for MDK-ARM 2013-05-19 11:22:08 +09:00
takashikojo
04c6a447ab make up #3 for MDK-ARM 2013-05-19 10:56:42 +09:00
takashikojo
d3ceb89fb0 make up #2 for MDK-ARM 2013-05-19 10:47:35 +09:00
takashikojo
b430a14032 make up for MDK-ARM release 2013-05-19 10:33:32 +09:00
takashikojo
55763ef318 Commit 2.6.2 2013-05-19 10:02:13 +09:00
toddouska
8f5e98486f fix MPLAB X windows warnings 2013-05-17 11:13:47 -07:00
Chris Conlon
a4c6ed0dda add support for Microchip TCP/IP 6.0 beta 2013-05-17 10:59:18 -06:00
toddouska
dcf88daae7 fix KEIL warnings 2013-05-17 09:49:46 -07:00
Jonas Norling
2051ee49b7 Increment record layer sequence number when retransmitting DTLS packets (as per the RFC). Send the Finished message in the next epoch, but don't commit to using the next epoch until the other end indicates that the CCS message has been received.
Tested against an OpenSSL server, this change makes it a bit happier.
2013-05-17 16:47:55 +02:00
toddouska
4dbb2d6d3b fix valgrind prog check, catch more failures 2013-05-16 16:20:51 -07:00
toddouska
cfdfa7b2b3 pull in Kojo MDK-ARM projects, changes 2013-05-16 09:47:27 -07:00
John Safranek
05f11c4bca DTLS Finished send duplication
1. Only add the encrypted Finished message to DTLS retransmit pool.
2. Don't increment the epoch or sequence number when retransmitting.
2013-05-15 10:31:42 -07:00
Chris Conlon
091c7a7ef3 separate STM32F2 hardware hash support, disable by default 2013-05-15 10:48:35 -06:00
John Safranek
ac716c96d3 Output buffer size check when sending transmit pool.
1. Added a call to CheckAvailableSize() when sending the DTLS transmit pool.
2. Rename CheckAvailableSize().
2013-05-13 12:32:47 -07:00
toddouska
9905787f4a update make rpm per Brian's changes 2013-05-13 11:24:28 -07:00
Chris Conlon
2a741ba469 Merge branch 'master' of github.com:cyassl/cyassl 2013-05-10 17:34:32 -06:00
Chris Conlon
f5c3458795 fix typos 2013-05-10 17:31:50 -06:00
toddouska
61bf080290 fix serverhello extensions idx bug 2013-05-10 15:52:32 -07:00
toddouska
871c116395 fix enable inline default message to enabled 2013-05-10 12:34:00 -07:00
toddouska
32705fb380 make sure pwdbased w/o fastmath works like fastmath define wise 2013-05-10 11:00:37 -07:00
toddouska
d7e74d0383 allow sniffer to sniff known testsuite, no port 0 2013-05-09 18:42:24 -07:00
toddouska
07407bbdaa rename sniffer bornOn to lastUsed to reflect new usage 2013-05-09 17:58:48 -07:00
toddouska
712b3dd17c remove some not compiled ins 2013-05-09 15:33:37 -07:00
toddouska
8f0b695249 fix leanpsk build with keep cert / session cert 2013-05-09 15:29:25 -07:00
toddouska
83b96d748e external API use SSL_FATAL_ERROR instead of -1 cases 2013-05-09 13:17:07 -07:00
toddouska
ca4b2b3f90 keep sniffer sessions alive as used, and prevent remove stale from removing active ones 2013-05-09 11:48:02 -07:00
Chris Conlon
f4c379cb96 minor typo fix 2013-05-09 11:23:07 -06:00
toddouska
47b468d14f add dtls recv timeout max user setting too 2013-05-08 12:49:55 -07:00
toddouska
8cb5f6d5d4 add user setting for dtls recv timeout init value 2013-05-07 16:14:26 -07:00
toddouska
9c9c59cec3 update sevrver session cert w/ old client hello too 2013-05-06 18:11:14 -07:00
John Safranek
9505f92bd1 restore session certs when resuming session 2013-05-06 17:25:50 -07:00
toddouska
018d1684c9 add camellia to sniffer 2013-05-06 15:37:58 -07:00
toddouska
fa35353e75 cleaup memsave cert cache 2013-05-02 12:23:49 -07:00
toddouska
a7228d0463 Merge branch 'master' of github.com:cyassl/cyassl 2013-05-02 11:35:56 -07:00
toddouska
a0c630b4ee add cert cache persistence 2013-05-02 11:34:26 -07:00
Chris Conlon
a56544c8b8 update README 2013-05-02 09:58:29 -06:00
Chris Conlon
a0dc1b6f47 update README with Mingw note 2013-05-01 14:29:31 -06:00
Chris Conlon
864f0468aa Cygwin/Mingw64 fixes 2013-05-01 14:17:11 -06:00
toddouska
bc1a6282eb bump dev version 2013-04-30 12:56:28 -07:00
toddouska
5104f4ea7a fix typos 2013-04-29 20:17:43 -07:00
toddouska
57512c46e8 Merge branch 'master' of github.com:cyassl/cyassl 2013-04-29 20:09:24 -07:00
toddouska
1e6119bb0d always try most recent used session on row first for match 2013-04-29 20:08:21 -07:00
John Safranek
42b937b8f3 Merge branch 'master' of github.com:cyassl/cyassl 2013-04-29 17:09:58 -07:00
John Safranek
d2d25b9b83 refine the SKID/AKID support 2013-04-29 17:09:15 -07:00
toddouska
8c1310e376 fix mem save/restore size with clientcache 2013-04-29 16:56:30 -07:00
toddouska
aebd926472 better endif ids 2013-04-29 14:52:28 -07:00
toddouska
8e64f9903d fix typos 2013-04-29 14:48:03 -07:00
toddouska
5a1886656a Merge branch 'master' of github.com:cyassl/cyassl 2013-04-29 14:23:22 -07:00
toddouska
5c4fdb30ad add client session table lookup based on serverID, use CyaSSL_SetServerID to set/store with serverid 2013-04-29 14:22:32 -07:00
John Safranek
87048698e5 use subject key id and authentication key id to ID CA certs in the signers list instead of subject name hashes. 2013-04-29 12:08:16 -07:00
toddouska
791767e026 make sure unloadcas works w/o filesystem 2013-04-26 10:28:30 -07:00
toddouska
411a096b2b add memory versions of session cache save/restore 2013-04-25 17:23:58 -07:00
toddouska
05dd84598b turn CA signer list into CA signer hash table, defaults CA_TABLE_SIZE to 11 2013-04-25 15:36:33 -07:00
toddouska
9dbf6a5e10 fix Signer hash size w/o SHA, fix GetCA caList b4 lock 2013-04-25 14:47:09 -07:00
toddouska
98b7ed9d47 more consistent SSL_SUCCESS for external SSL() returns 2013-04-25 11:36:38 -07:00
toddouska
942480e6ba fix save cache file problem, version id, and match cache separarte error 2013-04-24 14:17:50 -07:00
toddouska
477129b53e fix conversion warning 2013-04-24 13:35:28 -07:00
toddouska
158029752c only reset session cache with lock 2013-04-24 11:20:54 -07:00
toddouska
f12ba533e2 Merge branch 'master' of github.com:cyassl/cyassl 2013-04-24 11:16:35 -07:00
toddouska
956ac08cab add persistent session cache, ssn9 2013-04-24 11:10:23 -07:00
John Safranek
8e5532eb42 Merge branch 'master' of github.com:cyassl/cyassl 2013-04-24 10:37:55 -07:00
John Safranek
c27ebe546d find the subject id and authority subject id extentions when decoding a certificate 2013-04-24 10:37:11 -07:00
toddouska
65913b0d6c error out earlier in get_chain_X509 2013-04-23 13:21:00 -07:00
toddouska
bad1c32df2 add session cert conversion to x509, and free x509 for dynamic variety 2013-04-23 11:50:06 -07:00
toddouska
4491de3b77 add UnloadCAs ability for CTX or CertManager 2013-04-22 13:18:08 -07:00
toddouska
8c0ee8a6f7 make sure all external APIs at SSL level return SSL_SUCCESS instead of sometimes 0 from old CyaSSL API 2013-04-22 12:43:57 -07:00
toddouska
11d81b86de change windows low res timer return 2013-04-22 10:52:38 -07:00
toddouska
b5ac92bcd1 commit tests basic turns off fastmath since default now 2013-04-19 13:51:53 -07:00
toddouska
24ec09ef7a change big int cast in comparison after 64/128 changes 2013-04-19 13:49:26 -07:00
toddouska
702c1b044d add fewerPacket/group messages to example client/server and disalbe client cert/key load 2013-04-19 13:10:19 -07:00
toddouska
d665e16bd8 add user ctx to verify callback with CyaSSL_SetCertCbCtx 2013-04-18 10:37:10 -07:00
toddouska
729fc1e603 add discardSessionCerts flag for verify callback 2013-04-18 09:11:35 -07:00
toddouska
71a1abebf5 break up sig confirm errors into no sig, crl, and ocsp specific 2013-04-18 08:38:28 -07:00
toddouska
f8ba117cef cleanup 64/128bit type decls for big int libs 2013-04-17 17:26:33 -07:00
toddouska
e38b4d5868 free CyaSSL CTX count mutex 2013-04-17 13:25:02 -07:00
toddouska
38dec0b932 bump dev version 2013-04-17 09:41:43 -07:00
toddouska
1f09e35ccd Merge branch 'master' of github.com:cyassl/cyassl 2013-04-17 09:39:05 -07:00
toddouska
dafcd8782a add altnames check to domain match 2013-04-17 09:37:57 -07:00
Chris Conlon
62a071262c move CYASSL_USER_IO back to MICROCHIP_PIC32 2013-04-17 10:19:18 -06:00
toddouska
d50b388a33 add wildcard check to domain name match 2013-04-17 09:07:26 -07:00
toddouska
b806ca3c2f help compiler with fp_div cast to 32bit 2013-04-16 15:29:03 -07:00
John Safranek
fe13b4b6c6 moved and renamed the CBIO error codes so they are publically available 2013-04-16 12:32:55 -07:00
John Safranek
d279695314 changed ENDIAN_* to *_ENDIAN_ORDER 2013-04-16 12:12:49 -07:00
toddouska
8eee0b1d4c add blake2 headers to dist 2013-04-15 13:22:11 -07:00
toddouska
79432d9017 fix README typos, minor additions 2013-04-15 11:49:33 -07:00
toddouska
f29da112c6 version.h update for non autoconf 2013-04-15 11:23:14 -07:00
toddouska
4da114354b release 2.6.0 README 2013-04-15 11:20:57 -07:00
toddouska
7c003c5755 add sanity check on cleanup for possible no init 2013-04-12 17:07:00 -07:00
toddouska
fe0cd26b1e make clear where options.h came from 2013-04-12 16:50:16 -07:00
toddouska
991a9094e6 trying moving options save earlier, autogen sometimes 2013-04-12 13:18:53 -07:00
toddouska
b90d0d305d add wolfSSL header to configure generated options.h 2013-04-12 12:56:44 -07:00
toddouska
3cfb270a4d make sure commit tests don't overwrite options.h 2013-04-12 12:19:46 -07:00
toddouska
0b7e18040c generate cyassl/options.h based on ./configure flags/settings for user app use 2013-04-12 11:21:38 -07:00
toddouska
f6edc37549 change fastmath opt to 2 instead of 3, causes potential confilicts with aesni on non-aesni systems with gcc 4.6.3 2013-04-12 09:29:31 -07:00
toddouska
ba3e089596 add USE_ANY_ADDR for bind to any with echoserver 2013-04-11 21:51:17 -07:00
toddouska
8a6bd081c4 Merge branch 'master' of github.com:cyassl/cyassl 2013-04-11 15:00:42 -07:00
toddouska
997d6dccf3 fix windows ipv6 test w/ getaddrinfo 2013-04-11 14:52:04 -07:00
John Safranek
6d49631170 Merge branch 'master' of github.com:cyassl/cyassl 2013-04-11 14:10:32 -07:00
John Safranek
a74ac2b22c added case to DerToPem() to add EC header and footer to the PEM output 2013-04-11 14:03:18 -07:00
toddouska
12f00a7acc change ipv6 tests to use getaddrinfo for better scope id % handling, inet_pton doesn't always work depending on system 2013-04-11 12:30:09 -07:00
toddouska
b5c43d8ad4 don't default to loopback only for ipv6 tests, if inet_pton available allow lookups 2013-04-11 10:12:15 -07:00
toddouska
576cb10732 fix port 0 hack for unit tests with ipv6 2013-04-10 17:09:53 -07:00
toddouska
a2bd6e786d fix leanpsk NO_SHA build 2013-04-10 12:42:51 -07:00
toddouska
f535e5428e make sure all tests/examples *.c use settings.h correctly 2013-04-10 12:17:23 -07:00
toddouska
97e0ec073f make sure all lib proper *.c files have config.h then settings.h then checks for defines in case user using settings.h for lib config 2013-04-10 11:04:29 -07:00
toddouska
185331f007 fix shadow on decl 2013-04-10 10:24:33 -07:00
toddouska
1ff98154e5 remove serial-tests and downgrade automake/autoconf version requirements 2013-04-10 10:21:56 -07:00
Chris Conlon
27d6c727e0 add MICROCHIP_TCPIP 2013-04-10 09:16:11 -06:00
John Safranek
0edc19feb2 converting DerToPem, readjust output buffer size to account for size of header and footer when calling Base64_Encode 2013-04-09 19:03:21 -07:00
John Safranek
e98193000a KEEP_PEER_CERT includes the function CyaSSL_X509_get_subjectCN 2013-04-09 09:45:25 -07:00
John Safranek
bea9084071 Merge branch 'master' of github.com:cyassl/cyassl 2013-04-08 16:03:27 -07:00
John Safranek
b0dca8ea69 updated SHOW_SIZES, opionally adds sizes as available, added flag to example client to print sizes 2013-04-08 16:01:52 -07:00
John Safranek
9b0ffa0249 brought CYASSL_CALLBACK code up to current standard 2013-04-08 15:34:54 -07:00
Chris Conlon
eeb8cdccde s_fp_sub() bug fix 2013-04-05 13:44:53 -06:00
John Safranek
2dd22938d6 rearranged the HMAC header to tolerate having missing hash types 2013-04-03 17:33:50 -07:00
John Safranek
bf69de7054 if using SHA-512 but not SHA-384, fix so that HMAC still works 2013-04-03 16:41:44 -07:00
John Safranek
786e4d9462 fixed leak of method when ctx malloc fails; implemented get_shutdown 2013-04-03 16:35:19 -07:00
John Safranek
217254b533 check CBIOCookie for NULL before trying to call it 2013-04-02 16:36:07 -07:00
Chris Conlon
f73585eec8 HP/UX fixes, strsep impl 2013-04-02 16:27:53 -06:00
toddouska
0480b2b60e update test crls 2013-04-01 15:55:03 -07:00
toddouska
1224d3d907 Merge branch 'master' of github.com:cyassl/cyassl 2013-04-01 15:52:23 -07:00
toddouska
0005b4cbe4 move pthread flags/libs to autoconf defines so available to library proper and external tests/examples 2013-04-01 15:50:13 -07:00
John Safranek
13fb56d88e add SHA-384/512 to the full test case 2013-04-01 15:42:57 -07:00
John Safranek
e9bc868dbb AES-GCM does not require SHA-384, but will use it if enabled in build; reorder some of the requirement checks to regroup some NO_RSA suite checks 2013-04-01 14:25:20 -07:00
John Safranek
7004b2eafc certs still use SHA hash for names 2013-04-01 13:49:21 -07:00
John Safranek
30553a43ed when disabling arc4, ignores contents of arc4.c 2013-04-01 13:42:41 -07:00
John Safranek
9975d1d675 Merge branch 'master' of github.com:cyassl/cyassl 2013-04-01 13:39:09 -07:00
John Safranek
44352b5673 don't return closed alert if peer sends fatal alert; respond to closed alert with closed alert 2013-04-01 13:37:25 -07:00
toddouska
4b90474581 move CM VerifyBuffer out of no filesystem 2013-04-01 11:59:17 -07:00
toddouska
367429410f Merge branch 'master' of github.com:cyassl/cyassl 2013-03-29 14:07:41 -07:00
toddouska
f8848aaa1b lower example client/server stack buffer sizes 2013-03-29 14:06:36 -07:00
John Safranek
a572967017 when checking for DTLS, only need to compare against major version 2013-03-28 13:28:12 -07:00
toddouska
332fd68347 add lowmem to stacksize build 2013-03-28 11:38:27 -07:00
toddouska
c5385f902c Merge branch 'master' of github.com:cyassl/cyassl 2013-03-28 11:30:10 -07:00
toddouska
ee0595f543 add --enable-stacksize to print out stack use info with pthreads for example client/server 2013-03-28 11:28:38 -07:00
John Safranek
b6d49c5725 when using clang, dropped a compile flag that was causing errors on link 2013-03-28 11:07:43 -07:00
Chris Conlon
6aaf484b90 add mcapi MPLAB X project files 2013-03-28 11:12:19 -06:00
toddouska
f396de1191 add DTLS support for alignment 2013-03-27 16:58:27 -07:00
toddouska
3db8935093 configure switch to enable_static on if shared off when hardsetting for valgrind or cavium 2013-03-27 15:17:21 -07:00
toddouska
8a2936ebd4 Merge branch 'master' of github.com:cyassl/cyassl 2013-03-27 15:12:44 -07:00
toddouska
82e3c00075 add CYASSL_GENERAL_ALIGNMENT detection and setting for TLS alignment attempt 2013-03-27 15:11:49 -07:00
John Safranek
4a5a251e80 Merge branch 'master' of github.com:cyassl/cyassl 2013-03-27 13:36:07 -07:00
toddouska
6d8246e98c fix scan-build 272 warnings 2013-03-27 12:32:22 -07:00
John Safranek
8732fcddd9 replaced the serial-tests in configure.ac for now 2013-03-27 12:12:16 -07:00
John Safranek
2f6636559d Merge branch 'master' of github.com:cyassl/cyassl 2013-03-27 10:22:56 -07:00
John Safranek
547872683f adjustments to the example tests for Windows 2013-03-27 10:22:50 -07:00
John Safranek
7d287a6ba9 modified test port number to allow concurrent testing 2013-03-26 22:00:39 -07:00
toddouska
7d82bec7fc do rabbit/hc128 alignment at crypto layer for non intel 2013-03-26 18:16:15 -07:00
toddouska
14b4bb3b0f change rabbit and hc128 to return values for key and process, will add error rets for alignment issues 2013-03-26 14:42:09 -07:00
toddouska
f601b7bfda move aesni cbc encrypt align check down to crypto layer 2013-03-26 14:13:01 -07:00
toddouska
6bc7ba1592 change AesCBC end/dec to return status, will add failure cases with align checks 2013-03-26 12:36:39 -07:00
toddouska
8e53c7a62e fix inline type spot 2013-03-25 11:50:15 -07:00
toddouska
72926b1eed make sure blake2 calls denote it's the 'b' version, blake2b 2013-03-25 11:35:33 -07:00
John Safranek
7279d3bf85 passed the -d and -N flags into the test executor 2013-03-25 08:41:44 -07:00
toddouska
9d77ca744f fix C++ cast problem on make_eap 2013-03-24 13:06:22 -07:00
toddouska
cb311e5708 explain C aesni asm naming fix in code too 2013-03-24 12:59:30 -07:00
toddouska
8a924244c5 change aesni asm function name to explicit asm for ABI underscore conflicts with clang/gcc differences 2013-03-24 12:53:35 -07:00
toddouska
80e3c85737 change inline assembly to more generic condition code in clobber list, clang likes it better this way 2013-03-24 11:09:58 -07:00
toddouska
75bb1a8fa7 only 1 LT_INIT in configure.ac, pass options there w/ prereq check 2013-03-23 12:15:02 -07:00
toddouska
2c452b305f Merge branch 'master' of github.com:cyassl/cyassl 2013-03-23 12:03:42 -07:00
toddouska
d33f180760 blake2 32bit build warning fix 2013-03-23 12:02:14 -07:00
John Safranek
436a51a0d7 Merge branch 'ccm' 2013-03-22 17:29:30 -07:00
toddouska
d7c01be8bb blake2 ctc api, test vecs 2013-03-22 13:30:44 -07:00
toddouska
d8b85da693 remove c++ comments, switch to c 2013-03-22 12:10:53 -07:00
John Safranek
f65f86bb88 improvements to CCM, ssn6 2013-03-22 11:30:12 -07:00
toddouska
d6deb690e6 Merge branch 'master' into blake2 2013-03-22 10:20:01 -07:00
Chris Conlon
7522550cbf add plib.h to mcapi test, optimize MPLAB ctaocrypt_test project 2013-03-22 10:45:19 -06:00
toddouska
ace69d1c77 bump dev branch 2013-03-21 19:27:29 -07:00
toddouska
359803fc7d add mcapi test performance tune, chris 2013-03-21 19:13:49 -07:00
toddouska
4d5712ca93 add mcapi pointer arg sanity checks 2013-03-21 13:39:13 -07:00
toddouska
e63fa491aa add mcapi ecc with tests 2013-03-21 13:20:23 -07:00
toddouska
4210716c22 add mcapi rsa with test 2013-03-21 10:28:55 -07:00
toddouska
965b70c32f add mcapi aes direct with tests 2013-03-21 08:49:12 -07:00
toddouska
3ecab06841 add mcapi aes ctr with test 2013-03-21 08:33:02 -07:00
toddouska
ea9784b32b cast size_t for printf mem output, c99 may not be available 2013-03-21 07:58:53 -07:00
toddouska
c4714f71db add mcapi aes-cbc 2013-03-20 19:21:04 -07:00
toddouska
46442075f4 add mcapi tdes with tests 2013-03-20 18:35:26 -07:00
toddouska
a6d29aa628 enable mc dbinit for mcapi test, chris 2013-03-20 15:54:08 -07:00
toddouska
dc55de007d add mcapi rng with test 2013-03-20 15:02:03 -07:00
toddouska
ae9265fa44 add macpi huffman 2013-03-20 14:37:05 -07:00
toddouska
7d7a72f2a6 add hmac sha512 2013-03-20 12:26:55 -07:00
toddouska
3af1275f5d Merge branch 'master' of github.com:cyassl/cyassl 2013-03-20 12:00:28 -07:00
toddouska
2d72bfe0eb macpi hmac with tests 2013-03-20 11:59:27 -07:00
John Safranek
2360c038be Merge branch 'master' of github.com:cyassl/cyassl 2013-03-20 11:29:31 -07:00
John Safranek
02581a3da2 added control of compress memory usage via build setting 2013-03-20 11:28:45 -07:00
toddouska
e19c65da8b Merge branch 'master' of github.com:cyassl/cyassl 2013-03-20 10:21:05 -07:00
toddouska
8564014983 add mcapi hash with tests 2013-03-20 10:14:06 -07:00
John Safranek
692dc09d10 Merge branch 'compress' 2013-03-20 10:05:49 -07:00
John Safranek
615f652bd0 filled out our Compress and DeCompress functions, updated the test case 2013-03-20 09:58:31 -07:00
toddouska
72c5a92bde add ecc to commit tests, fastmath now on by default 2013-03-20 09:19:59 -07:00
toddouska
f878dbcef2 fix ecc key load w/ no rsa, ssn5 2013-03-20 09:18:05 -07:00
toddouska
0f8111fc77 zero out psk keys asap, ssn4 2013-03-20 09:12:00 -07:00
John Safranek
e8b9651075 hid the internal compress functions from the cryptlib versions 2013-03-19 16:44:50 -07:00
John Safranek
fc928e7725 added stubs and a test for ctaocrypt compress 2013-03-19 16:25:58 -07:00
toddouska
4f9e915bc1 add KEEP_PEER_CERT flag for non opensslextra peer cert storage, ssn3 2013-03-19 12:18:52 -07:00
toddouska
a5d9005ac7 change autconf system to default to fastmath now 2013-03-18 15:32:04 -07:00
toddouska
88938390ba fix track memroy overread on realloc example problem 2013-03-18 11:17:34 -07:00
John Safranek
b5d3613946 added new iOS project to automake include list 2013-03-18 09:49:23 -07:00
John Safranek
fa520f753d Merge branch 'master' of github.com:cyassl/cyassl 2013-03-18 09:37:26 -07:00
John Safranek
6ba3ae51f9 added Xcode v4.6 project for iOS v6.1 to build CyaSSL 2013-03-18 09:27:38 -07:00
toddouska
e3f72effb2 fix memory track free return warning 2013-03-15 15:30:03 -07:00
toddouska
8e3f83e152 bump dev branch version 2013-03-15 15:13:08 -07:00
toddouska
6ba7743fb3 fix fastmath no asm casts to shorter sizes 2013-03-15 15:11:21 -07:00
toddouska
31b03c8a2d dtls defaults to no static buffers now, fix valgrind errors with dtls 2013-03-15 14:21:36 -07:00
toddouska
ae63878700 fix unused memory tracker warning is disable-memory 2013-03-15 13:22:35 -07:00
toddouska
0bcaf12bf4 Merge branch 'master' of github.com:cyassl/cyassl 2013-03-15 13:17:58 -07:00
toddouska
543108bdcc add memory tracker to example client and server if using default memory cbs 2013-03-15 13:17:05 -07:00
Chris Conlon
e12f947c4f fix TRUE/FALSE clash in asn.c 2013-03-15 11:50:45 -06:00
toddouska
dd4be2496a client example shouldn't use set_verify w/ no certs 2013-03-14 17:13:11 -07:00
toddouska
2d9ed696c6 fix USER_TIME casts 2013-03-14 10:51:06 -07:00
toddouska
4e99c7ac99 check TRUE/FALSE and move after all includes in ssl.c 2013-03-14 09:34:29 -07:00
toddouska
bb103561ae fix non DTLS USER_IO cb 2013-03-14 09:16:47 -07:00
toddouska
2e980423ec hash session IDs since some aren't random afterall 2013-03-13 17:19:36 -07:00
toddouska
2dfec3c6f1 add CYASSL prefix to WORD/BIT enums 2013-03-13 16:49:20 -07:00
toddouska
e515638503 make EmbedGenerateCookie a callback, USER_IO can install their own or default to ours 2013-03-13 16:41:50 -07:00
toddouska
b9a7407d31 make sure FreeRTOS defines aren't redefs 2013-03-13 13:14:01 -07:00
toddouska
30b9033216 switch enable names to no uppercase to match others 2013-03-13 12:58:50 -07:00
toddouska
129de03da0 switch --enable-noInline to enable/disable-inline to match all others 2013-03-13 12:25:34 -07:00
toddouska
975ffe693b switch --enable-noFilesystem to --enable-filesystem / --disable-filesystem to match others 2013-03-13 12:14:05 -07:00
toddouska
7cabbb4b54 add --enable-oldtls, build and leanpsk check 2013-03-13 11:49:11 -07:00
toddouska
99ef1a8d7e add --enable-errorstrings and build check 2013-03-13 11:27:14 -07:00
toddouska
0a63898f5b make sure stat uses full path for REG check 2013-03-13 11:17:14 -07:00
toddouska
f0c48fba45 bump version for tag download 2013-03-13 10:14:06 -07:00
toddouska
e482c00cb1 only setup precommit hook for git, github allows non git downloads through tags and zips 2013-03-13 10:06:08 -07:00
toddouska
25b4fed7b3 add --enable-null 2013-03-12 18:49:59 -07:00
toddouska
d0e16d25b4 add error message for correct snifftest dir to run from 2013-03-12 16:32:16 -07:00
toddouska
11ffca451a make readdir file type check more generic 2013-03-12 16:21:07 -07:00
toddouska
dbe83c7405 fix typos 2013-03-12 15:56:58 -07:00
toddouska
a868451d72 add NO_64BIT flag to normal and fastmath to use a 32 bit accumulator for multiply when 64 bit actually slows it down 2013-03-12 15:52:47 -07:00
toddouska
a4c8d0e76c make sure no asn doesn't build big int 2013-03-12 15:14:03 -07:00
toddouska
ec0a4d45cb add --enable-memory, build, disable runtime memory cbs, check leanpsk 2013-03-12 13:31:14 -07:00
toddouska
4774f1b285 add --enable-coding, build, leanpsk check 2013-03-12 13:12:10 -07:00
toddouska
e8ce0b7f51 add --enable-dh, build, checks w/o asn 2013-03-12 13:03:42 -07:00
toddouska
9a1b32d830 add --enable-asn, build, and checks for rsa / psk w/o asn 2013-03-12 12:48:41 -07:00
toddouska
86f7d48c7e fix comment set but unused new gcc warning 2013-03-12 09:52:16 -07:00
toddouska
6773287895 add --enable-des3 and build, no strnstr in tests 2013-03-12 09:46:15 -07:00
toddouska
1628b6f83f add --enable-sha and build, disables examples for now since certs still use sha, when add --disable-certs add more thorough check 2013-03-11 17:53:38 -07:00
toddouska
7914938e60 --enable-md5 and build, needs NO_OLD_TLS, suite test version check 2013-03-11 17:37:08 -07:00
toddouska
894a35a0f2 add --enable-arc4 and build 2013-03-11 17:13:24 -07:00
toddouska
5a0d108cd9 add --enable-aes and build 2013-03-11 17:07:37 -07:00
toddouska
f232ff84b4 add --enable-pwdbased and build, opensslextra needs 2013-03-11 17:01:05 -07:00
toddouska
7719cd9faa add --enable-dsa 2013-03-11 16:39:06 -07:00
toddouska
2ab409df96 add --enable-md4 2013-03-11 16:26:08 -07:00
toddouska
49e62f0858 fix general NO_SHA NO_ASN NO_CERTS NO_SESSION_CACHE builds/examples 2013-03-11 16:07:46 -07:00
toddouska
285ca36ca2 fix normal psk no rsa examples 2013-03-11 13:19:43 -07:00
toddouska
895944c04a fix distcheck 2013-03-11 12:53:38 -07:00
toddouska
87ad65d33f add --disable-rsa, bump dev version 2013-03-11 12:49:59 -07:00
toddouska
9210395c57 init alert history state 2013-03-11 12:28:17 -07:00
toddouska
6b67d5e931 even cleaner output 2013-03-11 12:12:04 -07:00
toddouska
ebf25c5c4b cleanup suite test output 2013-03-11 12:09:49 -07:00
toddouska
d1277b1343 cleanup not supported suite test output to 1 warning 2013-03-11 12:02:22 -07:00
toddouska
71f9ee4f2e remove non blocking suite test cases since now automatic 2013-03-11 11:53:40 -07:00
toddouska
b24f7f502c consolidate suite tests into normal and dtls files 2013-03-11 11:46:28 -07:00
toddouska
3f4c570aa1 have suite tests self repeat non blocking 2013-03-11 11:07:46 -07:00
toddouska
7ce9315173 Merge branch 'master' of github.com:cyassl/cyassl 2013-03-11 11:00:47 -07:00
toddouska
47e7e27bb2 add cipher suite check to suite tests to make adding test cases easier 2013-03-11 10:59:08 -07:00
John Safranek
ec3d060691 fixed a cygwin bug for the build test. recv() was returning an unexpected error code for non-blocking sockets. 2013-03-08 18:09:52 -08:00
John Safranek
20e4889092 Merge branch 'dtls'
Conflicts:
	src/ssl.c
2013-03-08 17:45:35 -08:00
John Safranek
73f0395ca9 added psk-dtls test cases 2013-03-08 17:35:03 -08:00
John Safranek
e1a73c1769 added more dtls test cases 2013-03-08 17:19:04 -08:00
toddouska
01a5368ffc rest of ECC no error strings for cipher names 2013-03-08 12:11:49 -08:00
John Safranek
43ed4a7424 added test cases and fixed a bug with AEAD ciphers with DTLSv1.2. 2013-03-07 22:52:51 -08:00
toddouska
f65dcd1378 fix NO_RSA ecc command line examples default certs 2013-03-07 18:20:29 -08:00
toddouska
6b3a80366f NO_RSA with ecc build fixes 2013-03-07 18:10:18 -08:00
toddouska
85b3346bbf NO_RSA build, cipher suite tests need work for this build optoin, ssn2 2013-03-07 17:44:40 -08:00
toddouska
23d6c70d3e allow for extra bytes in sig encoding for conforming signed big int, patch ssn1 2013-03-07 10:47:01 -08:00
John Safranek
591e1fc772 DTLSv1.2, fixed DTLS socket timeout 2013-03-06 23:02:33 -08:00
John Safranek
49e67487e7 Merge branch 'master' of github.com:cyassl/cyassl 2013-03-04 17:16:32 -08:00
John Safranek
01e9a246cd added build test cases for ECC-SHA384 test suites. 2013-03-04 17:14:19 -08:00
John Safranek
b9ab09a5a6 added test cases for SHA-256 cipher suites, fixed a bug in ECDH-RSA-AES128-SHA256 picking 2013-03-04 16:16:34 -08:00
John Safranek
d52fe96063 added AES-CBC-SHA256 and SHA384 cipher suites. 2013-03-04 13:25:46 -08:00
toddouska
43b8300896 windows shadow fix 2013-03-04 12:30:36 -08:00
toddouska
12371d1c3b fix windows build warnings 2013-03-04 12:18:21 -08:00
toddouska
2667b8b542 fix base64 decode white space loop 2013-03-04 11:36:07 -08:00
toddouska
98e766e770 our type changes 2013-02-28 17:51:35 -08:00
toddouska
3319ed9921 Merge branch 'master' into blake2 2013-02-28 16:50:45 -08:00
John Safranek
b4584e0a93 added missing test config files to the configure include list 2013-02-28 11:39:33 -08:00
toddouska
cc9ac1846d fix ecc w/ no rsa send cert verify and server flag for missing cert verify 2013-02-26 22:24:34 -08:00
toddouska
b397f89b27 better inits for sniffer use 2013-02-26 09:00:46 -08:00
toddouska
f3a16e56c7 help static analysis 2013-02-25 10:47:55 -08:00
toddouska
4fe2a1ec42 fix sigAlgo unused-but-set gcc 4.6 warning 2013-02-25 10:42:51 -08:00
toddouska
e947c86e67 add license, bring up to date 2013-02-22 15:52:20 -08:00
toddouska
48303918c2 Merge branch 'master' into blake2 2013-02-22 15:22:02 -08:00
John Safranek
88ba790930 added an additional failure case log output to InitSSL() for the RNG initialize failing 2013-02-22 09:51:07 -08:00
John Safranek
6ff39cffe4 Merge branch 'dtls'
Conflicts:
	cyassl/ctaocrypt/types.h
2013-02-20 17:08:22 -08:00
toddouska
f4082f83e5 sb fixes for certgen + keygen 2013-02-20 15:45:10 -08:00
toddouska
b2b45d3f4a sb fixes for crl and ocsp 2013-02-20 15:26:22 -08:00
John Safranek
ffc67892a4 allow for 0 length handshake messages, still need to store the message header 2013-02-20 10:43:50 -08:00
John Safranek
598043dd6f drains the DTLS message store once an in-order message is received. 2013-02-20 09:28:09 -08:00
John Safranek
2c1ed7c11c removed old defragmentation code. fixed new defragment code. 2013-02-20 08:35:33 -08:00
toddouska
04d0c581b1 set output test size to real size, no strlen, make sure input strlens don't have 0x00 2013-02-19 16:16:40 -08:00
John Safranek
bdadeab342 added storing of out-of-order and fragmented message, missing processing of the stored list 2013-02-19 16:06:02 -08:00
toddouska
07baa27b20 fix scan build for fastmath, dtls, ecc, psk, sha512 2013-02-19 12:53:58 -08:00
John Safranek
116f2403d0 updated the list for storing out of order messages 2013-02-19 12:51:02 -08:00
John Safranek
7e29b8d2a6 Merge branch 'master' of github.com:cyassl/cyassl 2013-02-18 15:20:25 -08:00
toddouska
59af8944cb fix opensslextra sb issue 2013-02-18 15:11:33 -08:00
John Safranek
abe921d703 Merge branch 'tls12' 2013-02-18 14:42:53 -08:00
John Safranek
87cad7a966 merge branch tls12 into master 2013-02-18 14:36:50 -08:00
toddouska
a8f6baf37c repeat each cipher suite test with client cert request off 2013-02-18 14:12:03 -08:00
John Safranek
d9a9982bc8 length check the hello extensions 2013-02-18 12:52:08 -08:00
John Safranek
df011b2e40 Server and client tell each other which sig/hash algos they support, peers pick from the list and use it indicating which one they used as appropriate. 2013-02-18 11:54:23 -08:00
John Safranek
0acd8f0670 added sig_algo for rsa for missing cases in SetCipherSpecs() 2013-02-15 12:16:19 -08:00
toddouska
dfa1553548 3rd scan build fixes 2013-02-14 16:23:48 -08:00
toddouska
9ea3371079 2nd round scan build 2013-02-14 16:00:45 -08:00
toddouska
cdc651a75a coverity ignores 2013-02-14 14:13:19 -08:00
toddouska
62ef5de25c scan build fixes 2013-02-14 14:09:41 -08:00
John Safranek
657b10c8b2 client sends sig/hash hello extension to server, server sends a selection (hardcoded) back, and both use the selection 2013-02-13 15:30:46 -08:00
John Safranek
d65e5ef3e4 bug fix 2013-02-13 12:05:56 -08:00
John Safranek
afb0cb3e20 Fixed merge conflict with stashed code 2013-02-12 14:57:39 -08:00
John Safranek
5f7359be7e Builds the hash/sig algorithm extension list based on the available cipher suites and hashes 2013-02-12 13:47:13 -08:00
toddouska
8ace08499b make sure example CyaSSL_read()s that fill buffer don't overrun by 1 byte if trying to output with null terminator 2013-02-08 11:21:48 -08:00
John Safranek
982b72796e added list for DTLS handshake datagram reordering 2013-02-07 11:26:02 -08:00
John Safranek
30004498c5 For TLSv1.2, cert and key messages use SHA-256 or SHA-384 as expected. 2013-02-06 13:08:28 -08:00
toddouska
44e0d7543c change copyright name with name change 2013-02-05 12:44:17 -08:00
Joakim Soderberg
834ebe5bd8 BUGFIX: Fixed segmentation fault on CyaSSL_BIO_free().
In CyaSSL_BIO_new_socket() bio->mem is never initialized. This will cause freeing of unallocated memory in CyaSSL_BIO_free:

if (bio->mem)
  XFREE(bio->mem, 0, DYNAMIC_TYPE_OPENSSL);

since bio->mem is not NULL, resulting in a crash.
2013-02-05 11:22:36 +00:00
toddouska
f4f13371f9 update copyright date 2013-02-04 14:51:41 -08:00
toddouska
36f62a5707 fix CyaSSL_write memory error return, bump dev version 2013-02-04 14:11:20 -08:00
toddouska
543d81ba97 release 2.5.0 2013-02-04 13:11:21 -08:00
Todd Ouska
24e22d4b6e add cavium notes and free ssl cavium ciphers 2013-02-01 16:26:42 -08:00
Todd Ouska
44b6593fe5 add cavium ciphers to SSL, and example client 2013-02-01 12:21:38 -08:00
Todd Ouska
defe5b4e31 Merge branch 'master' of github.com:cyassl/cyassl 2013-01-31 15:55:42 -08:00
Todd Ouska
01703281cc add cavium RSA to ctaocrypt 2013-01-31 15:55:29 -08:00
Chris Conlon
ba26b4b4e2 fix to prevent --disable-debug from enabling it 2013-01-31 13:44:38 -07:00
Chris Conlon
d799898a36 update README 2013-01-31 11:14:17 -07:00
Chris Conlon
a3caa03381 tie MQX directory into automake, update docs 2013-01-31 10:20:29 -07:00
Chris Conlon
7f4b0d1d3a add missing MPLAB X project files 2013-01-30 22:13:42 -07:00
Chris Conlon
5d29bf1e49 add MPLAB X projects, PIC32 GenerateSeed() 2013-01-30 18:02:18 -07:00
Chris Conlon
b3ffcbd5b4 fix DH key size output in benchmark 2013-01-30 16:54:43 -07:00
Chris Conlon
2fc54ad751 add PIC32 current_time() to benchmark 2013-01-30 16:29:15 -07:00
Chris Conlon
95e7226447 add BENCH_EMBEDDED flag to CTaoCrypt benchmark app 2013-01-30 16:19:19 -07:00
Chris Conlon
b91f3c7c6d add NO_MAIN_DRIVER to CTaoCrypt benchmark 2013-01-30 10:20:39 -07:00
Chris Conlon
3ff842168e add cert/key buffer flags in CTaoCrypt benchmark for RSA, DH 2013-01-30 10:13:56 -07:00
Todd Ouska
6edfb2a601 Merge branch 'master' of github.com:cyassl/cyassl 2013-01-29 16:25:35 -08:00
Todd Ouska
91b800ea46 no sha384 for cavium now 2013-01-29 16:25:09 -08:00
Todd Ouska
a361f5c4bf initial cavium, crypto only, no rsa 2013-01-29 16:22:49 -08:00
Chris Conlon
532f0aaee7 add ability to use cert/key buffers in CTaoCrypt test app 2013-01-28 17:15:28 -07:00
toddouska
ef644d4de0 fix libz warning 2013-01-25 13:06:44 -08:00
John Safranek
b17b81ef43 added sanity check on return from recv callback 2013-01-24 14:44:08 -08:00
John Safranek
6616975f81 added AES-CCM-8 ECC cipher suites, and more test cases 2013-01-21 15:19:45 -08:00
John Safranek
0e3a093cc5 renamed the Camellia cipher suites, dropped CBC and RSA from the strings 2013-01-21 11:10:11 -08:00
toddouska
9f77aea1f8 Merge branch 'master' into blake2 2013-01-21 10:56:46 -08:00
John Safranek
a453ccba57 Added TLS support for Camellia 2013-01-21 10:53:42 -08:00
John Safranek
2e2de4cf4d added the cammelia cipher, updated the test cases 2013-01-18 17:26:49 -08:00
John Safranek
b8b968d77f added tests for setting Camellia key and IV 2013-01-18 13:48:30 -08:00
John Safranek
f65b0fc092 brought the camellia interface to match AES's more 2013-01-18 09:57:41 -08:00
John Safranek
d5bf944630 enabled the proper Camellia test, but mocked the encrypt and decrypt functions to pass the test 2013-01-17 22:09:55 -08:00
John Safranek
425d418dee added stubs, tests, and benchmark for Camellia to ctaocrypt 2013-01-17 21:52:31 -08:00
toddouska
fe0772bcbf Merge branch 'master' into blake2 2013-01-17 16:08:47 -08:00
toddouska
dfca5f82dd Merge branch 'master' of github.com:cyassl/cyassl 2013-01-17 06:51:59 -08:00
toddouska
86c20f0e38 fix dtls server example to bind to any when specified 2013-01-17 06:51:37 -08:00
John Safranek
3f77a2c8c9 fixed bug where alerts sent during DTLS handshaking are malformed. check for out of order Server Hello Done during DTLS 2013-01-16 17:25:20 -08:00
John Safranek
b327925a1b Merge branch 'ccm' 2013-01-15 16:37:37 -08:00
John Safranek
c7b5fbe552 fixed a bug involving const nonces for CCM. Added AES-CCM to the full commit test case. 2013-01-15 16:16:48 -08:00
John Safranek
ccff37f4b1 added TLS support for AES-CCM-8 2013-01-15 15:20:30 -08:00
toddouska
1139ad76aa automake really needs 1.12, autoconf works with 2.65 2013-01-15 14:33:29 -08:00
toddouska
6993bc58b1 require automake 1.11 for serial-tests 2013-01-15 14:08:49 -08:00
toddouska
9053a8c0ec uninstall generic config for distcheck 2013-01-15 13:21:26 -08:00
toddouska
4567e05851 require newer autconf 2013-01-15 11:50:23 -08:00
John Safranek
eb221238c2 separated TLS-AEAD and AES-GCM so TLS-AEAD can also use AES-CCM 2013-01-14 15:59:53 -08:00
toddouska
209e64ea79 Merge branch 'master' of github.com:cyassl/cyassl 2013-01-14 15:49:29 -08:00
John Safranek
d9a8bfbb80 Merge branch 'master' into ccm 2013-01-14 15:22:00 -08:00
toddouska
5889b5d96d fix rsa benchmark decrypt buffer 2013-01-14 15:14:46 -08:00
John Safranek
59e381d9db updated automake options to disable parallel-tests 2013-01-14 15:12:30 -08:00
John Safranek
c75d738531 added a failure test case to the AES-CCM test 2013-01-11 09:15:15 -08:00
John Safranek
fa9126c2be added AES-CCM as a configure option 2013-01-10 16:46:47 -08:00
John Safranek
d1515f8ee6 Merge branch 'ccm' 2013-01-10 16:42:03 -08:00
John Safranek
05165bc09e Added AES-CCM encrypt/decrypt, test fuction, benchmark function. 2013-01-10 16:38:52 -08:00
John Safranek
e85caee845 added tests, prototypes, and stubs for AES-CCM 2013-01-08 12:16:53 -08:00
toddouska
51c56051fb use dynamic buffer for AES-NI encrypt 2013-01-07 14:11:52 -08:00
toddouska
7f701ca194 align RSA benchmark buffer 2013-01-07 14:08:56 -08:00
toddouska
eeb11a6e51 fix rabbit and hc128 CTaoCrypt test buffers for aligned access only, allow TLS on intel w/o aligned stream buffers, otherwise align 2013-01-07 14:06:58 -08:00
toddouska
f3a0d311a0 don't output debug messages in testsuite if valgrind on 2013-01-04 15:52:46 -08:00
John Safranek
f756573401 Merge branch 'ocsp-test' 2013-01-04 14:11:47 -08:00
John Safranek
ac885c40f0 fix a memory leak when OCSP lookup fails 2013-01-04 13:13:20 -08:00
John Safranek
3b6ba7935d default ocsp lookup callback returns an error if unable to connect to a responder 2013-01-04 10:34:29 -08:00
John Safranek
a695599667 bug fix in default ocsp lookup function 2013-01-03 17:58:45 -08:00
John Safranek
ac227910f1 modify OCSP to use a replacable callback to perform the OCSP transaction 2013-01-03 17:19:56 -08:00
toddouska
53e4c2ed72 fix pvs studio warnings 2013-01-02 11:39:12 -08:00
toddouska
0c363a17f1 init blake2 2012-12-31 13:10:47 -08:00
toddouska
acb3e446ab typo 2012-12-29 13:33:13 -08:00
toddouska
27a7cf609b only do Init once per compression rounds 2012-12-29 13:30:23 -08:00
toddouska
3d88d8851a sslv3 may have bad padding, can't verify 2012-12-29 13:11:31 -08:00
toddouska
640a0cb0e3 fix stream hmac check on multi data 2012-12-28 18:55:18 -08:00
toddouska
44bf986827 no DTLS streaming checks 2012-12-28 17:54:19 -08:00
toddouska
4c453d4d69 have server side reply unexpected_message for hello_request 2012-12-28 14:36:19 -08:00
toddouska
f073f49ead make sure handshake complete before sending encrypted alert 2012-12-28 14:29:15 -08:00
toddouska
6d3728fe61 fix ripemd compression round 2012-12-28 14:19:28 -08:00
toddouska
4c9595c419 bump version 2012-12-28 14:07:49 -08:00
toddouska
23ff36075b check RSA explicit size 2012-12-28 12:28:25 -08:00
toddouska
09ea7169d7 use exisiting dummy data for compression round 2012-12-28 11:48:30 -08:00
John Safranek
7ac6a21af5 updated comment for aead in SanityCheckCipherText() 2012-12-27 19:51:06 -08:00
toddouska
561906cffd Merge branch 'master' of github.com:cyassl/cyassl 2012-12-27 16:36:48 -08:00
toddouska
f0bc61a5d3 add more robust pad/verify checks 2012-12-27 16:35:43 -08:00
John Safranek
724297a127 asn should use the validate date macro, not call the function directly. 2012-12-27 11:57:41 -08:00
John Safranek
e70838e984 Merge branch 'ecc' 2012-12-27 11:41:20 -08:00
John Safranek
581f91b984 Merge branch 'master' of github.com:cyassl/cyassl 2012-12-27 11:40:17 -08:00
John Safranek
03f9cafa4b ecc_verify_hash was leaking two mp_ints 2012-12-27 11:18:29 -08:00
John Safranek
0cfa423566 fixed mp_add_d overflow 2012-12-27 10:08:44 -08:00
Chris Conlon
60f4919ee6 add STM32 to README 2012-12-27 10:16:08 -07:00
Chris Conlon
254d53bb18 add CYASSL_STM32F2 define, LwIP errno.h 2012-12-27 10:06:29 -07:00
John Safranek
d993ee1969 Merge branch 'master' of github.com:cyassl/cyassl 2012-12-26 21:53:20 -08:00
John Safranek
baf9bef8a3 Revert "changed polarity on ocsp thisDate check to allow very timely responses"
This reverts commit afbc34f0e0.
2012-12-26 21:41:12 -08:00
John Safranek
cf114b92df made the ecc keys in the CYASSL struct dynamic 2012-12-26 16:39:19 -08:00
Chris Conlon
ea3dc3d834 add STM32F2 AES, DES, 3DES support 2012-12-26 15:18:57 -07:00
Chris Conlon
a7e0f4e483 add STM32F2 SHA1, MD5 support 2012-12-26 15:16:39 -07:00
Chris Conlon
acf1d07eea add STM32F2 RNG support 2012-12-26 15:08:33 -07:00
John Safranek
6913a46331 Merge branch 'master' of github.com:cyassl/cyassl 2012-12-26 10:40:28 -08:00
toddouska
59419bef89 non block type ciphertext sanity checks 2012-12-26 10:11:15 -08:00
John Safranek
5bc976ee0f free ecc keys at the end of handshaking 2012-12-26 09:49:53 -08:00
toddouska
dc88a7e8eb Merge branch 'timing' 2012-12-24 15:41:23 -08:00
toddouska
9c58f70e29 add ciphertext size sanity checks 2012-12-24 15:40:09 -08:00
toddouska
6b15443a3b fix clang using -pthreads flags on lion or greater 2012-12-24 14:37:03 -08:00
toddouska
76bbcbb7b2 fix clang warning on api test 2012-12-20 18:38:48 -08:00
toddouska
66a66c8905 valgrind needs .sh 2012-12-20 18:29:25 -08:00
John Safranek
831c760edc Merge branch 'ocsp'
Fixes some bugs in the ocsp code, and adds a new option to skip nonces.
2012-12-20 16:26:49 -08:00
John Safranek
afbc34f0e0 changed polarity on ocsp thisDate check to allow very timely responses 2012-12-20 15:56:57 -08:00
John Safranek
5164c15216 fixed missed initialization when not using ocsp nonces 2012-12-20 15:29:15 -08:00
toddouska
541deaa0c0 release 2.4.6 2012-12-20 13:25:32 -08:00
toddouska
902069783e allow leanpsk dist to build 2012-12-20 11:46:25 -08:00
John Safranek
51787db76b changed ocsp lookup to use dynamic mem for request rather than stack 2012-12-19 18:09:05 -08:00
John Safranek
26cf98c878 removed check against producedAt date in ocsp, check not required 2012-12-19 11:28:33 -08:00
John Safranek
4e657debfc added the ability to disable OCSP nonces 2012-12-19 10:18:11 -08:00
toddouska
96cc05b7b1 fix shadow warning 2012-12-18 11:40:45 -08:00
John Safranek
b36bc55197 Merge branch 'ocsp' 2012-12-17 22:23:31 -08:00
John Safranek
359e86adf6 1. When OCSP and CRL enabled, checks CRL if unable to contact OCSP responder
and OCSP was enabled.
2. Fixed a couple string typos.
3. Only check OCSP if cert successfully parsed.
2012-12-17 22:19:20 -08:00
toddouska
b25061844c remove hmac array initializers to 0 when non full because of reported compiler weirdness from user 2012-12-14 16:47:03 -08:00
John Safranek
c314dc3940 Merge branch 'master' into ocsp 2012-12-14 14:23:53 -08:00
toddouska
f82324a081 README typo 2012-12-12 20:06:55 -08:00
toddouska
0e67cd17d6 clang opensslExtra fix 2012-12-12 20:04:10 -08:00
toddouska
726d686b07 fix clang scan-build problems 2012-12-12 18:03:32 -08:00
toddouska
a108c5565e get release 2.4.4 ready 2012-12-12 17:13:33 -08:00
toddouska
c49e7a85f7 fix configure.ac quoting 2012-12-12 14:33:21 -08:00
toddouska
3a98eb7578 fix for current working directory, relative path instead of absolute, suggestion from SpamapS 2012-12-12 10:57:05 -08:00
John Safranek
831e643a24 fixed file name in comment 2012-12-12 10:14:38 -08:00
John Safranek
977ff51ad5 Merge branch 'master' of github.com:cyassl/cyassl 2012-12-12 09:42:21 -08:00
John Safranek
ed39a1652c deleted a stray index increment throwing off DecodeResposeData processing 2012-12-12 09:21:57 -08:00
John Safranek
ac1890922b removed unused variable from lookup cert 2012-12-12 08:53:51 -08:00
toddouska
7e8438b7b4 fix pvs studio warnings 2012-12-11 11:33:49 -08:00
John Safranek
e925fbdbd6 check correct pointer before freeing when done looking up cert 2012-12-07 15:49:43 -08:00
toddouska
87fbf7df80 fix libtool leftovers for distclen when shared mode 2012-12-06 17:52:36 -08:00
toddouska
da8eba2603 fix distcheck pathing, cyassl-config distclean 2012-12-06 10:01:01 -08:00
toddouska
5ecca5a89d user no longer has to call CyaSSL_Init 2012-12-06 09:26:59 -08:00
toddouska
ca7e5d2463 valgrind config output 2012-12-05 10:50:04 -08:00
toddouska
067f10ae8e add enable-valgrind 2012-12-04 21:28:18 -08:00
John Safranek
9005d2b54b removed XMALLOC_USER from the leanpsk compile flags 2012-11-30 16:43:03 -08:00
John Safranek
f71376a42b Merge branch 'master' of github.com:cyassl/cyassl 2012-11-30 15:48:56 -08:00
John Safranek
8c97675979 Lean PSK trimming
1. leave out memory and io callback functions, expect user supplied
2. leave out cert and DTLS related functions
3. SHA-1 compile option to use slower, rolled-up transform
2012-11-30 15:45:43 -08:00
toddouska
f23013b8a7 remove runtime memory callback use for leanpsk 2012-11-30 15:41:01 -08:00
toddouska
c50f73b4cb fix valgrind leanpsk read error 2012-11-29 17:18:41 -08:00
toddouska
ea3dc2361d fix rpm license description 2012-11-29 14:58:22 -08:00
toddouska
92c5167327 commit tests no longer need make clean after configure 2012-11-29 12:07:32 -08:00
toddouska
584520fbc1 hide make clean output 2012-11-29 12:05:34 -08:00
toddouska
8c1d342715 Merge branch 'master' of github.com:cyassl/cyassl 2012-11-29 11:51:10 -08:00
toddouska
5e4c0c426c update test CRLs 2012-11-29 11:49:57 -08:00
John Safranek
0c9fe151de added configure option --disable-examples to remove example code build, configure runs make clean at the end, sniffer test isn't built if sniffer disabled 2012-11-29 11:31:57 -08:00
toddouska
6e4d33eb00 move ProtocolVersion struct members directly into RecordLayerHeader 2012-11-28 16:34:41 -08:00
toddouska
6280aa9c91 make sure converted errors are handled by string output 2012-11-28 11:54:25 -08:00
John Safranek
77bf77dfd7 Merge branch 'master' of github.com:cyassl/cyassl 2012-11-27 22:19:01 -08:00
John Safranek
66a3ce2ec1 added SHA-256 based RNG when setting NO_RC4 compile flag 2012-11-27 22:17:25 -08:00
toddouska
4af555b502 unused no_session_cache fix 2012-11-27 15:39:40 -08:00
toddouska
faa7283ff3 fix crl resource leaks 2012-11-27 11:36:36 -08:00
toddouska
f5590f0abd crl unused fix 2012-11-27 11:13:28 -08:00
John Safranek
7d4a5a6ec8 added a missed break to a switch case 2012-11-26 21:49:31 -08:00
John Safranek
f8f7f69f48 compile option to leave out MD5 and SSL code 2012-11-26 18:40:43 -08:00
John Safranek
b828ac047a Merge branch 'master' of github.com:cyassl/cyassl 2012-11-26 16:32:20 -08:00
John Safranek
f046e1d0be Merge branch 'new-random' 2012-11-26 16:31:33 -08:00
John Safranek
8b8c6bfa0f optionally remove MD5 benchmark 2012-11-26 16:28:22 -08:00
toddouska
e5266f6640 remove -floop-parallelize-all, causes x64 optimization problem with RSA verify 2012-11-26 15:39:38 -08:00
John Safranek
7459b5b892 removed the use psk identity hint from the test client code 2012-11-22 21:11:34 -08:00
John Safranek
699b794a4a Added tests for HMAC-SHA256 and HMAC-SHA384 2012-11-21 14:30:20 -08:00
John Safranek
b96f0c6386 added HMAC-SHA test cases, made the HMAC-MD5 test cases conditional on NO_MD5 flag 2012-11-21 14:02:47 -08:00
John Safranek
78c1d592cc Merge branch 'master' of github.com:cyassl/cyassl 2012-11-20 14:54:59 -08:00
John Safranek
a89398fdbc added the cipher suites PSK-NULL-SHA256 and PSK-AES128-CBC-SHA256 2012-11-20 14:52:17 -08:00
toddouska
da386691a1 allow no end of line on last line of PEMs 2012-11-20 12:45:24 -08:00
toddouska
d4035e5f62 add freebsd crl-monitor support 2012-11-16 13:25:45 -08:00
toddouska
dd259b12c7 add CyaSSL_peek() 2012-11-16 12:16:00 -08:00
toddouska
5d912d4c2b shadow crl-monitor linux fix 2012-11-16 10:54:36 -08:00
toddouska
9ac2eaa3d6 fix ipv6 unused warning, add os check for crl monitor 2012-11-16 10:47:13 -08:00
toddouska
4a7e56442a bump dev version 2012-11-14 17:57:27 -08:00
toddouska
3130f0da28 allow ecc.c to read settings 2012-11-14 17:55:20 -08:00
toddouska
5767db4cb5 minor warnings fixes 2012-11-13 18:32:13 -08:00
Chris Conlon
54a7740cfe substitue posix.h for errno.h in MQX build 2012-11-12 14:25:59 -07:00
toddouska
53c14bdf1f fix XMALLOC_USER typos 2012-11-07 17:10:34 -08:00
John Safranek
d6c4b37112 Merge branch 'nopb' 2012-11-06 14:33:56 -08:00
John Safranek
d4c99ae663 added the rabbit and null cipher test configs to the dist build 2012-11-06 14:30:52 -08:00
Chris Conlon
557c2ae469 add CodeWarrior MQX example projects 2012-11-05 15:55:08 -07:00
toddouska
21768d9626 test cert tmp fix 2012-11-05 14:15:38 -08:00
toddouska
4a007a2fa0 make MAX_CHAIN_DEPTH a build time define and default to 9 2012-11-05 10:40:06 -08:00
John Safranek
b8c9247769 for lean-psk build: remove big int math, MD4, error strings 2012-11-02 16:49:31 -07:00
Chris Conlon
11c8e5afb8 add support for Kinetis K70 HW RNGA 2012-11-02 17:49:30 -06:00
John Safranek
917bc83c60 Merge branch 'master' of github.com:cyassl/cyassl 2012-11-01 16:52:26 -07:00
John Safranek
e2ac17deb6 added ctaocrypt error.c to Windows projects 2012-11-01 16:49:12 -07:00
John Safranek
a8c0351fe4 added pragma to new errors.c to hush a warning in Windows build 2012-11-01 16:40:59 -07:00
Chris Conlon
b21bf90e1b update CTaoCrypt test for MQX example 2012-11-01 17:08:07 -06:00
John Safranek
5e48dcbeeb fixed build warning with Fortress build 2012-11-01 15:59:13 -07:00
John Safranek
9aa8b71525 Merge branch 'nocerts' 2012-11-01 15:47:02 -07:00
John Safranek
90e6a4dd8c linux build warnings fix 2012-11-01 15:27:05 -07:00
John Safranek
134c6b8b1b cleaning warnings in OCSP build 2012-11-01 15:03:29 -07:00
toddouska
ae905d70c4 crl warning fixes 2012-11-01 14:14:40 -07:00
John Safranek
85e8f1988a leanpsk build removes cert code, moved ctaocrypt error strings to own file 2012-11-01 12:36:47 -07:00
toddouska
0e2c236e77 fix x64 windows warnings, make sure word is 64bit 2012-11-01 12:21:47 -07:00
Chris Conlon
dc83cc6a0e fix VS2008 asn.c warning, CTaoCrypt RSA test 2012-11-01 11:29:11 -06:00
Chris Conlon
f6304ae37a add support for Freescale MQX 2012-11-01 11:23:42 -06:00
toddouska
a4220120ba remove memset for setcokopt uninit 2012-10-31 15:43:08 -07:00
toddouska
d732a2ef07 make suite test file name input arg longer 2012-10-31 15:25:39 -07:00
toddouska
6348f3f2c7 fix valgrind uninit warning on dtls setsockopt 2012-10-31 13:26:03 -07:00
toddouska
905cf9c018 fix valgrind warnings from yesterday changes 2012-10-31 12:54:56 -07:00
toddouska
01138a5c53 fix stack-check warnings for newer versions but fastmath still has some so take away warning for now 2012-10-30 17:35:12 -07:00
toddouska
f175bd302d bump dev version 2012-10-30 16:23:59 -07:00
John Safranek
a6b201c051 added the PSK Null cipher test script to the release build 2012-10-30 15:09:31 -07:00
John Safranek
9871b13480 build test covers leanpsk 2012-10-30 12:51:14 -07:00
John Safranek
174618ebfb added build option for leanPSK 2012-10-29 15:39:42 -07:00
toddouska
cf1f1f3ae7 turn jobserver back on 2012-10-26 15:38:37 -07:00
toddouska
335de43333 Merge https://github.com/BrianAker/cyassl 2012-10-26 15:29:36 -07:00
Brian Aker
ce297f67af Add in missing files for JOBSERVER. 2012-10-26 15:10:42 -07:00
toddouska
35b4f08049 add CyaSSL_send()/recv() with flags parameter 2012-10-26 15:09:58 -07:00
Brian Aker
91f075a5cf Add in m4/ax_print_to_file.m4 2012-10-26 15:20:44 -04:00
toddouska
a1e8cd532d disable jobserver for now, is broken on some systems 2012-10-26 10:36:20 -07:00
Brian Aker
994fc1f8e3 This add the generic structure required to have pkgconfig work.
I also fixed autogen.sh to do some magic on warnings/errors based on whether code comes from github or not.
2012-10-26 02:06:06 -04:00
Brian Aker
767b452d61 This dramatically speeds up the time taken to compile cyassl (assuming you have multiple cores...). 2012-10-26 00:35:52 -04:00
Brian Aker
60f28f322e Fixes install issue with rpm (I didn't notice that I got the install wrong until I tried to use it...). 2012-10-25 23:53:21 -04:00
toddouska
d4d5243f4d add user ability to set IO read/write flags 2012-10-25 14:17:11 -07:00
toddouska
01ae0696af shorten64 fixes for key-gen/cert-gen 2012-10-25 12:31:11 -07:00
toddouska
0bbbea20be switch sniffer buffers to dynamic, reduce holding memory if large number of sessions cached 2012-10-24 17:37:57 -07:00
toddouska
3e7619c785 make sure sniffer frees handhsake resources early 2012-10-24 14:51:04 -07:00
toddouska
f969bc3645 if sniffer sees ACK for missing packet(s) set to error, can't recover 2012-10-24 13:33:11 -07:00
toddouska
bb5280d0e4 remove mktime check since takes forever on some systems 2012-10-24 12:09:53 -07:00
toddouska
0b4ed2c633 change to C_EXTRA_FLAGS for user addtions to CFLAGS since CFLAGS may contain -g -O2 even if user doesn't override, no way to tell 2012-10-24 12:01:11 -07:00
toddouska
6737f5beb9 Brian changes 2012-10-24 11:53:33 -07:00
John Safranek
ba2a7f2627 Merge branch 'master' of github.com:cyassl/cyassl 2012-10-24 11:27:05 -07:00
John Safranek
936d0ff7a9 fixed off-by-one dtls cookie size check. fixed some warnings when disabling features 2012-10-24 11:05:50 -07:00
toddouska
2885d66b17 remove fatal sniffer error sessions right away 2012-10-23 16:32:47 -07:00
toddouska
1cb2f28308 align rabbit test keys and ivs 2012-10-23 13:48:16 -07:00
toddouska
57c6d46ea7 add more features output to end of configure 2012-10-22 17:39:50 -07:00
toddouska
4d719897a5 Merge branch 'master' of github.com:cyassl/cyassl 2012-10-22 17:29:19 -07:00
toddouska
aef97af361 make rabbit optional with configure option 2012-10-22 17:28:46 -07:00
John Safranek
5a421c04e7 Merge branch 'master' of github.com:cyassl/cyassl 2012-10-22 14:50:02 -07:00
John Safranek
d78770c1e5 change null cipher to allow different buffers 2012-10-22 14:48:27 -07:00
toddouska
3461c12083 Brian's c++/clang fixes, minor adjustments 2012-10-22 11:37:46 -07:00
toddouska
cb08eb672e Merge branch 'master' of https://github.com/BrianAker/cyassl 2012-10-22 10:56:53 -07:00
toddouska
10306013bb Merge branch 'master' of github.com:cyassl/cyassl 2012-10-22 10:37:58 -07:00
toddouska
b09d902ef4 add in ecc impl 2012-10-22 10:37:40 -07:00
Brian Aker
ac998a0f7c Remove version (it is a generated file), also updated how visibility is done. 2012-10-20 21:24:28 -04:00
Brian Aker
db8bd91488 Fix for some platforms that didn't want to insert the harden LIB in some cases. 2012-10-20 20:07:30 -04:00
Brian Aker
1be873533e This adds support for "make rpm" 2012-10-20 04:42:34 -04:00
John Safranek
a92b639155 add optional null cipher support for RSA 2012-10-19 20:52:22 -07:00
Brian Aker
f3b14343a5 Add support for correctly compiling on darwin12 2012-10-19 20:21:35 -07:00
Brian Aker
b883cc55a4 Fix rules around pthread usage to fix clang warning. 2012-10-19 20:09:17 -07:00
Brian Aker
1bc0dc53f9 Fixes for hardening flags.
Additional fixes for using C++ compiler to compile.

Include file pcap.h now gates sniffer for build.
2012-10-19 22:00:17 -04:00
toddouska
a5d7a3ea8f fix opensslExtra with psk server example, add psk to commit tests 2012-10-19 12:54:15 -07:00
toddouska
c974d77213 add shorten 64 to 32 warnings back on with fixes 2012-10-19 12:44:23 -07:00
toddouska
ba4d058ba7 commit Brian Aker configure stuff plus remove old debug.m4 and switch -g to only debug and turn off -O2 without since we use -Os and -O3 instead 2012-10-19 11:44:16 -07:00
toddouska
218ae522c6 Merge https://github.com/BrianAker/cyassl 2012-10-19 11:17:42 -07:00
John Safranek
114436e587 Merge branch 'master' of github.com:cyassl/cyassl 2012-10-19 10:40:59 -07:00
John Safranek
346a52a58c add optional null cipher support for PSK 2012-10-19 10:37:21 -07:00
toddouska
a89ec1ac91 show server read/write block message in server example 2012-10-19 10:14:26 -07:00
Brian Aker
afe043ee6c This should fix the issue around compiling cyassl with a C++ compiler. 2012-10-19 00:30:21 -04:00
toddouska
32dd1ab006 fix example/client non-blocking usage flag to big N 2012-10-17 14:06:50 -07:00
toddouska
e3f54f332e Merge branch 'master' of github.com:cyassl/cyassl 2012-10-17 13:38:58 -07:00
toddouska
cc0c89b02d psk test warning fixes 2012-10-17 13:38:49 -07:00
John Safranek
454bfa4abd Merge branch 'master' of github.com:cyassl/cyassl 2012-10-17 13:14:34 -07:00
John Safranek
fe632a3f77 added non-blocking and session resume as example server and client command line options 2012-10-17 13:13:58 -07:00
toddouska
ef47f1a25e fix with libz dynamic type 2012-10-17 10:09:28 -07:00
toddouska
c11620f9b4 Merge branch 'master' of github.com:cyassl/cyassl 2012-10-17 10:05:05 -07:00
toddouska
dc708f4f5b turn on webserver build for some settings 2012-10-17 10:04:44 -07:00
John Safranek
d99c5d8e06 fixed aes-ctr test case 2012-10-10 14:07:10 -07:00
John Safranek
8760e6ac3e fixed build warnings & aes-gcm/ni conflict 2012-10-10 12:15:13 -07:00
John Safranek
a503f13321 update readme and version number 2012-10-10 08:55:53 -07:00
John Safranek
6c0d473027 Merge branch 'master' of github.com:cyassl/cyassl 2012-10-09 16:20:53 -07:00
John Safranek
e673b1852a fixed windows build warnings 2012-10-09 16:13:05 -07:00
toddouska
6abadd2f2a fix ecc warnings 2012-10-09 14:04:27 -07:00
toddouska
b76c42da7b fix bump test warnings 2012-10-09 11:33:09 -07:00
John Safranek
400b1f1ae6 test client and server use select in non-blocking mode 2012-10-08 15:49:30 -07:00
toddouska
4a739f6bc7 sniffer handshake state fix for sanity checks 2012-10-05 13:39:11 -07:00
toddouska
57e7e28d6d Merge branch 'master' of github.com:cyassl/cyassl 2012-10-03 17:10:05 -07:00
toddouska
9ca07d1f4d dtls may have different first handshake message 2012-10-03 17:09:45 -07:00
John Safranek
0d80343073 Merge branch 'master' of github.com:cyassl/cyassl 2012-10-03 16:53:55 -07:00
toddouska
257d10a69f sanity check for out of order handshake messages 2012-10-03 16:44:08 -07:00
toddouska
66c95b0c15 DoAppData sanity check for handshake complete 2012-10-03 16:36:00 -07:00
John Safranek
397fbb743f Merge branch 'master' of github.com:cyassl/cyassl 2012-10-03 15:33:23 -07:00
John Safranek
95a30e3f0a windows bug fix on dtls retry 2012-10-03 15:29:28 -07:00
toddouska
e970cdfbc0 init cipher specs, check client key exchange state b4 process 2012-10-03 11:57:20 -07:00
John Safranek
f7c740df8f Merge branch 'master' of github.com:cyassl/cyassl 2012-10-03 09:36:43 -07:00
toddouska
5f598e2649 SIGPIPE ignore if no SO_NOSIGPIPE 2012-10-02 22:02:50 -07:00
John Safranek
9bbca6acfb Merge branch 'master' of github.com:cyassl/cyassl 2012-10-02 14:42:06 -07:00
John Safranek
829126f04d fix the client resume test case for DTLS 2012-10-02 14:41:28 -07:00
John Safranek
6d1e485ef4 DTLS to use recvfrom and sendto in embed recv and send callbacks. Added support for storing dtls peer address. 2012-10-02 09:15:50 -07:00
toddouska
36eeab927b fix sniffer assert comparison on newer gcc 2012-10-01 13:16:37 -07:00
toddouska
e0413df92a add key setup flag for malicious or misbehaving handshake messages with new memory system 2012-10-01 11:32:05 -07:00
toddouska
e5c04e70a7 make sure existing nonblocking users still work 2012-09-28 15:10:35 -07:00
toddouska
2c25481e7d add AesSetKeyDirect for Ctr and Direct when also using aesni 2012-09-28 15:01:07 -07:00
toddouska
dd421ebb7d cleaner sniffer mem fix 2012-09-28 11:04:20 -07:00
toddouska
30bec6c193 fix sniffer out of memory potential problem 2012-09-28 10:58:33 -07:00
John Safranek
bd849ea9d7 Merge branch 'master' of github.com:cyassl/cyassl 2012-09-27 14:40:28 -07:00
John Safranek
c9617e86d6 fix bug with aesgcm and aesni conflict 2012-09-27 14:38:48 -07:00
toddouska
0fc6c8a07d fix nonblocking setters 2012-09-27 13:38:45 -07:00
John Safranek
07c37ed50c Merge branch 'master' of github.com:cyassl/cyassl 2012-09-27 11:42:57 -07:00
toddouska
d5d24df32a nonblocking warning fixes 2012-09-27 10:31:38 -07:00
John Safranek
f044fbc1fe Merge branch 'master' of github.com:cyassl/cyassl 2012-09-26 13:02:20 -07:00
toddouska
51a8901f6a update sslSniffer/Test windows projects 2012-09-26 12:21:16 -07:00
John Safranek
dfb84dff37 added accessors for CYASSL members for use in send/recv callbacks 2012-09-25 15:51:56 -07:00
toddouska
d0affb0d0e fix snifftest and aesni with new warnings 2012-09-25 11:14:21 -07:00
toddouska
2c0e7fd8e9 Merge branch 'master' of github.com:cyassl/cyassl 2012-09-24 12:43:49 -07:00
toddouska
d3b01f9c56 remove automatic O2 opts for non debug, could be Os or O3, remove simple debug m4 2012-09-24 12:43:32 -07:00
John Safranek
cd0226924a Merge branch 'master' of github.com:cyassl/cyassl 2012-09-21 16:37:34 -07:00
John Safranek
9643e58dad fixed bug for Windows build 2012-09-21 16:36:48 -07:00
toddouska
4e19c234f4 fix new warnings on linux64 2012-09-21 13:29:04 -07:00
John Safranek
ce2c76fd42 Merge branch 'master' of github.com:cyassl/cyassl 2012-09-21 09:36:34 -07:00
John Safranek
c3aedc940f improved dtls retry on connect 2012-09-21 09:36:01 -07:00
toddouska
4433fde099 c++ warning fix 2012-09-20 15:42:18 -07:00
toddouska
7716da0881 warn fix 2012-09-20 15:39:15 -07:00
toddouska
bd0f508a0f don't turn on warnings as erros before old-style because tests use main() 2012-09-20 12:22:19 -07:00
toddouska
19e50cd46a fix old-style warnings 2012-09-20 12:11:42 -07:00
toddouska
3ef8f65229 remove sasl and put black vcs_checkout if on same line for older autoconf 2012-09-20 11:13:27 -07:00
Brian Aker
5fce4edb68 This adds more compiler hardening flags (and fixes all of the issues
found in the process).
2012-09-19 23:38:41 -07:00
toddouska
1cfd4e01cb Merge branch 'master' of github.com:cyassl/cyassl 2012-09-19 10:24:58 -07:00
toddouska
afb559fddb allow huge Cert Names, just don't copy into name buffer past max 2012-09-19 10:24:34 -07:00
John Safranek
08a3423f43 changed error return code for dtls functions to NOT_COMPILED_IN 2012-09-19 09:09:27 -07:00
John Safranek
059db7f69c check the return code of DtlsPoolSave() 2012-09-18 16:00:30 -07:00
John Safranek
d1068d25d1 fixed another compile warning 2012-09-18 12:05:16 -07:00
John Safranek
68cb6044cb Merge branch 'master' of github.com:cyassl/cyassl 2012-09-18 11:41:25 -07:00
John Safranek
989d7f4aad fixed windows build warning 2012-09-18 11:11:45 -07:00
toddouska
206f565820 add password to snifftest command line 2012-09-18 09:34:45 -07:00
toddouska
f6c5bf032d update sniffer more memory changes 2012-09-18 09:08:40 -07:00
John Safranek
d1baa9f541 Merge branch 'master' of github.com:cyassl/cyassl 2012-09-18 08:46:11 -07:00
toddouska
53ccbddd01 allow meta PEM data at end of file too 2012-09-17 17:25:38 -07:00
John Safranek
88bba146ae fixed bug with handshake defragmentation and ordering 2012-09-17 11:32:36 -07:00
John Safranek
40eb5b3cc5 DTLS resend allocates only enough buffer when needed 2012-09-17 09:52:20 -07:00
John Safranek
e9c7cbf803 fixing merge 2012-09-14 21:35:39 -07:00
John Safranek
40972868ce fix merge conflicts 2012-09-14 21:19:06 -07:00
John Safranek
7899252104 dtls handshake improvement 2012-09-14 19:30:50 -07:00
toddouska
b160f8c486 make peerRsaKey dynamic, free at end of handshake 2012-09-14 16:52:39 -07:00
toddouska
cfd5a20e48 make static buffers length 1 (zero may not be supported) unless LARGE_STATIC, SNIFFER, or DTLS 2012-09-14 16:14:38 -07:00
toddouska
66bbb44f44 make arrays temporary, freed at end of handshake unless user calls KeepArrays for get_keys or psk hints 2012-09-14 15:22:51 -07:00
John Safranek
56ee2eaba8 added dtls message retry 2012-09-14 09:35:34 -07:00
John Safranek
97ca8439a4 Merge branch 'master' of github.com:cyassl/cyassl 2012-09-07 08:30:03 -07:00
John Safranek
407397e8be adding DTLS retry timeout, added CYASSL pointer to recv/send callbacks 2012-09-06 22:41:55 -07:00
toddouska
8c32a5a2ed make RNG in ssl dynamic, release after hs if stream or < tls1.1 2012-09-05 16:18:29 -07:00
toddouska
9ddf43268d use dynamic memory for ssl ciphers, only use what needed 2012-09-05 12:30:51 -07:00
toddouska
c47afaf84f make suites object dynamic, only use during handshake 2012-09-05 10:17:48 -07:00
toddouska
56960ef1cc cyassl object size debug output 2012-09-05 09:02:51 -07:00
toddouska
43a0a21fb6 add GetOjbectSize for CYASSL* 2012-09-05 08:26:08 -07:00
toddouska
982526ed13 go straight to p_hash in TLS 1.2 to remove PRF stack use 2012-09-04 16:34:26 -07:00
toddouska
0ee22d8f94 don't use SSL Master Secret stack space in TLS mode 2012-09-04 16:03:45 -07:00
toddouska
6943229f87 reduce client key exchange stack use in non NTRU mode 2012-09-04 15:56:52 -07:00
toddouska
b1e603ae6b opensslextra clang static fixes 2012-09-04 15:47:40 -07:00
toddouska
1ba8aff525 don't allow corrupted change cipher (fix by antoxa), don't allow multiple decryptions of corrupted messages 2012-09-04 11:37:47 -07:00
toddouska
2bee126062 clang scan-build fixes 2012-09-04 10:48:26 -07:00
toddouska
f8b106601b fix sniffer cipher suite tests with user override 2012-08-31 13:28:07 -07:00
John Safranek
3361f7b7fe Merge branch 'master' of github.com:cyassl/cyassl 2012-08-30 14:27:56 -07:00
toddouska
69afab58a5 don't include stdio.h unless debug output 2012-08-28 16:46:27 -07:00
John Safranek
6ce42706fe Merge branch 'master' of github.com:cyassl/cyassl 2012-08-28 15:58:38 -07:00
toddouska
bdac618c3a track version.h for pure windows build 2012-08-28 12:48:19 -07:00
John Safranek
820d934ae8 Merge branch 'master' of github.com:cyassl/cyassl 2012-08-28 09:37:02 -07:00
John Safranek
c9625789cd allow early DTLS datagrams, but drop late ones. 2012-08-28 08:55:31 -07:00
toddouska
30a264eb65 make sure mp_init return always checked 2012-08-27 11:30:22 -07:00
toddouska
0534d44c9e don't assume non-Intel CodeWarrior BigEndian anymore 2012-08-23 17:05:58 -07:00
John Safranek
98bc1f8c46 fix build warning 2012-08-23 16:28:24 -07:00
John Safranek
457e214777 Merge branch 'master' of github.com:cyassl/cyassl 2012-08-23 16:05:09 -07:00
John Safranek
561a7fc35d drop out of order dtls packets 2012-08-23 15:50:56 -07:00
toddouska
2db5d29893 Merge branch 'master' of github.com:cyassl/cyassl 2012-08-23 09:49:48 -07:00
toddouska
f8ffb086ec tcp errno for SafeRTOS/lwip 2012-08-23 09:45:23 -07:00
John Safranek
f6cca6049f Merge branch 'master' of github.com:cyassl/cyassl 2012-08-22 16:16:49 -07:00
John Safranek
79c14dc825 Merge branch 'master' of github.com:cyassl/cyassl 2012-08-22 15:36:07 -07:00
John Safranek
31d036178e fix DTLS cookies and session resumption 2012-08-22 14:06:08 -07:00
toddouska
87762e9012 SafeRTOS client test fixes 2012-08-22 11:07:40 -07:00
John Safranek
501c6a67e7 client to use non-blocking sockets in resume test if enabled 2012-08-20 17:02:25 -07:00
toddouska
7a12fb3e6b IAR inlining and enum warning off 2012-08-20 16:58:11 -07:00
toddouska
e2ae36f149 add multi job support to first precommit make test 2012-08-20 16:40:41 -07:00
toddouska
f1ed3cefc4 SafeRTOS memory macros 2012-08-20 16:38:43 -07:00
John Safranek
c20eb88d3d Merge branch 'master' of github.com:cyassl/cyassl 2012-08-17 14:21:17 -07:00
toddouska
690938ffd4 lsr fs macros 2012-08-17 13:45:31 -07:00
toddouska
03356be00b fix verify_callback local declaration after beginning 2012-08-17 12:51:37 -07:00
toddouska
4b8fdb4371 fix examples client DTLS resume 2012-08-17 12:43:36 -07:00
toddouska
925ddb6626 Merge branch 'master' of github.com:cyassl/cyassl 2012-08-15 17:00:34 -07:00
toddouska
05692e1d6a IAR fixes, SafeRTOS port, better LWIP support 2012-08-15 17:00:11 -07:00
John Safranek
c42792e0f1 fix compiler warnings 2012-08-14 13:51:56 -07:00
Chris Conlon
198e48fa94 minor RTIP adjustments 2012-08-14 13:10:27 -06:00
John Safranek
9d912970c8 Merge branch 'master' of github.com:cyassl/cyassl 2012-08-13 17:33:20 -07:00
Chris Conlon
7ec04c16b6 EBSnet RTIP support 2012-08-13 17:10:05 -06:00
John Safranek
c08debf236 Merge branch 'master' of github.com:cyassl/cyassl 2012-08-13 16:04:41 -07:00
John Safranek
bfd510b919 cleaned up the cookie generator for Windows and IPv4 only 2012-08-13 15:05:28 -07:00
toddouska
4c66c4c3b5 use XBADFILE for init in bad state 2012-08-13 10:59:34 -07:00
toddouska
a39f540c5a increment dev version 2012-08-13 10:57:07 -07:00
toddouska
220bd66a63 allow XFILE to work with non pointer types 2012-08-13 10:53:47 -07:00
John Safranek
1c2a3eddc1 Merge branch 'master' of github.com:cyassl/cyassl 2012-08-10 14:15:31 -07:00
toddouska
d5fdb74d9a fix small build proper 2012-08-10 12:40:22 -07:00
John Safranek
8b968d234a Merge branch 'master' of github.com:cyassl/cyassl 2012-08-10 11:44:25 -07:00
toddouska
15fe7f4d94 update CRLs switch to 120 days, add gen script 2012-08-10 11:02:46 -07:00
John Safranek
3d90c359cd Merge branch 'master' of github.com:cyassl/cyassl 2012-08-10 10:26:24 -07:00
John Safranek
70552ef8e1 added DTLS handshake message defragmentation 2012-08-10 10:24:31 -07:00
toddouska
8343317e1b make domain name cert check an option on client 2012-08-10 10:15:37 -07:00
toddouska
ecd007b287 2.3.0 release 2012-08-10 09:38:56 -07:00
John Safranek
8d2dc095dd Merge branch 'master' of github.com:cyassl/cyassl 2012-08-09 17:48:39 -07:00
toddouska
aafe14ebc4 add pre-commit hook and tests, put into autogen 2012-08-09 16:42:18 -07:00
John Safranek
11df1d25d4 fixed the dtls handshake header handling 2012-08-09 13:27:30 -07:00
John Safranek
93c89ccc35 Merge branch 'master' of github.com:cyassl/cyassl 2012-08-09 11:02:27 -07:00
John Safranek
6722022201 splitting off dtls handshake header to be handled differently 2012-08-09 11:02:21 -07:00
toddouska
80326fa1fa pub EmbedGenerateCookie around dtls for now 2012-08-08 17:21:03 -07:00
toddouska
73349ec0d3 add DTLS basic cipher suite tests 2012-08-08 17:09:09 -07:00
toddouska
18c3679444 fix DLTS cookieSz init problem 2012-08-08 16:56:19 -07:00
toddouska
16ac91e6de add aesgcm ecc cipher suite tests 2012-08-08 15:57:18 -07:00
toddouska
17a92e76d3 add aesgcm openssl, and fix requires to use our local enum for aesgcm 2012-08-08 15:37:00 -07:00
toddouska
6defed64cd add basic aescgm cipher suite tests 2012-08-08 15:22:41 -07:00
toddouska
08ff33894f add ECDH static cipher suite tests including RSA signed ECDH, clean up code with haveECDSA -> haveECDSAsig 2012-08-08 15:09:26 -07:00
John Safranek
bbde70c6fc Merge branch 'master' of github.com:cyassl/cyassl 2012-08-08 11:52:31 -07:00
John Safranek
dac47627b8 added the clang output files to gitignore 2012-08-08 11:51:13 -07:00
toddouska
e601b37a32 fix --enable-debug warning 2012-08-08 11:47:44 -07:00
toddouska
d494254864 Merge branch 'master' of github.com:cyassl/cyassl 2012-08-08 11:36:08 -07:00
toddouska
eedc2f3e47 fix SESSION_CERTS and SHOW_CERTS example with CyaSSL API 2012-08-08 11:35:39 -07:00
John Safranek
3747246133 added the generation, verification, and client usage of DTLS handshake cookies 2012-08-08 10:38:12 -07:00
toddouska
169331cf81 add ecc dhe cipher suite tests, static next 2012-08-07 18:09:03 -07:00
toddouska
c4674c0cc3 add ntru cipher suite tests 2012-08-07 17:18:56 -07:00
toddouska
a7aaf4fcaf add psk cipher suite tests 2012-08-07 17:01:59 -07:00
toddouska
8bfd6c0e7e add hc128 cipher suite tests 2012-08-07 16:53:50 -07:00
toddouska
d66722af15 all opensslExtra only SSLv3-TLSv1.2 cipher suites tests 2012-08-07 15:36:06 -07:00
toddouska
435c1ae76c add all basic build SSLv3 - TLSv1.2 cipher suite test 2012-08-07 15:27:46 -07:00
toddouska
efb6932d8e add client test harness parsing, may use different certs/keys/CAs etc 2012-08-07 15:06:53 -07:00
toddouska
820edc0299 fix make dist unit test path 2012-08-06 19:08:16 -07:00
toddouska
706bd8a910 add cipher suite client/server driver 2012-08-06 17:14:31 -07:00
toddouska
cf4ea232e3 Merge branch 'master' of github.com:cyassl/cyassl 2012-08-06 09:53:02 -07:00
toddouska
ba0d887369 fix non-blocking example client compile 2012-08-06 09:52:43 -07:00
John Safranek
b83e1765da adding scriptable suite test to the unit test 2012-08-03 23:19:24 -07:00
toddouska
644726a3fc fix clang warnings on test.h 2012-08-02 17:37:08 -07:00
toddouska
802d62513f fix debug build 2012-08-02 13:41:40 -07:00
toddouska
901730e86e make sure client GET reads as much as possible 2012-08-02 12:15:42 -07:00
toddouska
bdf11587c2 Merge branch 'master' of github.com:cyassl/cyassl 2012-08-02 11:55:07 -07:00
toddouska
90446c3c5f add -u for DTLS UPD command line client/server examples 2012-08-02 11:54:49 -07:00
Chris Conlon
afa27f0021 FreeRTOS threads support, windows simulator support 2012-08-02 09:54:41 -06:00
toddouska
90385bb4b3 fix windows build with command line examples 2012-08-01 17:33:49 -07:00
toddouska
aecdb33e4e Merge branch 'master' of github.com:cyassl/cyassl 2012-08-01 12:55:32 -07:00
toddouska
68e5124644 change example client to command line options too, same as server 2012-08-01 12:55:13 -07:00
John Safranek
b8b5e7b873 Merge branch 'master' of github.com:cyassl/cyassl 2012-07-31 18:42:44 -07:00
toddouska
a5af2e3d51 add altname retrieval from peer cert 2012-07-31 17:45:48 -07:00
John Safranek
ab570a2130 aes-gcm wrap two new aes-gcm code bits with ifdef option 2012-07-31 16:26:17 -07:00
John Safranek
368afbb815 Merge branch 'master' of github.com:cyassl/cyassl 2012-07-31 10:11:21 -07:00
John Safranek
e716380bad fixed a bug where aes-gcm required opensslExtra at build configure 2012-07-31 10:07:33 -07:00
John Safranek
9b8c5fb40e aes-gcm: modified to use sequence number rather that a random explicit IV 2012-07-31 09:32:29 -07:00
toddouska
45dde2da89 better error checking on server example 2012-07-30 18:15:08 -07:00
toddouska
3401bba8a2 Merge branch 'master' of github.com:cyassl/cyassl 2012-07-30 11:59:11 -07:00
toddouska
f904c598ed make server example more generic with short command opts 2012-07-30 11:58:57 -07:00
toddouska
e0328ef78a allow zero legnth asn names, remove weird subjectcn len as zero means we own, use stored flag instead 2012-07-27 16:51:46 -07:00
toddouska
85889f7fb9 add md2 signature hash support 2012-07-27 14:01:02 -07:00
toddouska
e2eb1b78cc Merge branch 'master' of github.com:cyassl/cyassl 2012-07-27 12:32:42 -07:00
toddouska
6e84ab1271 add max chain depth unique error, increase depth to 6 2012-07-27 12:32:22 -07:00
John Safranek
3cd231bdfc Merge branch 'master' of github.com:cyassl/cyassl 2012-07-24 15:04:16 -07:00
John Safranek
cf7e8baa19 moved aes-gcm cipher suites around in the list to follow the existing suites 2012-07-23 15:15:40 -07:00
toddouska
aa164e5266 make compression more standard, no size prefix, default zlib comp, check verify before overwrite w/ decomp... still needs FIN and ALERT processing 2012-07-23 13:47:30 -07:00
toddouska
6d3c7d8c59 allow bigger MTU record for sniffer 2012-07-20 13:04:03 -07:00
John Safranek
489fbf17fe Merge branch 'master' of github.com:cyassl/cyassl 2012-07-19 17:22:16 -07:00
John Safranek
07ca2bce56 added endinanness protection to AES-GCM 2012-07-19 17:19:39 -07:00
John Safranek
cb178856a8 added 64-bit (default), 32-bit version, and 8-bit table based AES-GCM for faster operation. Selection made at configure. 2012-07-19 14:44:08 -07:00
toddouska
6f2b1b90a9 move check_priv for libdrizzle 2012-07-17 15:55:20 -07:00
toddouska
d408f01863 add mystrnstr for buffer searching of PEM with no null terminator 2012-07-17 12:01:37 -07:00
toddouska
d607ffaf02 fix MAX_MSG_EXTRA for SHA-256 digest with IV with dynamic buffers 2012-07-17 11:52:13 -07:00
John Safranek
ac79d3b145 replaced magic numbers with named constants, renamed some constants 2012-07-17 10:00:45 -07:00
toddouska
c9a4e9d56b fix DHE client side leak 2012-07-13 16:54:31 -07:00
toddouska
4ffb3bbaae make sure ssl init does all inits before erroring out 2012-07-13 12:31:15 -07:00
John Safranek
87a8cfadd3 Used consistent constants. 2012-07-12 15:20:56 -07:00
John Safranek
aaad893804 fixed merge conflict 2012-07-12 08:39:57 -07:00
toddouska
1f0a32a7e3 use internal enum for cipher requires, move external enums back to starting at zero 2012-07-11 17:00:16 -07:00
John Safranek
bdacd5e8c4 cleaned up lots-o-warnings build 2012-07-09 10:33:05 -07:00
John Safranek
1ac6db9d1d added basic hello extension support for TLSv1.2, renumbered the algorithm enumerations to match RFC 2012-07-09 10:02:34 -07:00
John Safranek
56d2180cf3 use CyaSSLv23_client_method() rather than TLSv1_1_client_method() to parallel echoserver.c 2012-07-09 09:50:26 -07:00
John Safranek
fe64523480 backed out an earlier change pending more research 2012-07-02 12:36:28 -07:00
John Safranek
1f6c24f15a added aes-gcm to the benchmark tests 2012-06-30 16:55:29 -07:00
John Safranek
eb302b91b0 Merge branch 'master' of github.com:cyassl/cyassl 2012-06-30 16:29:10 -07:00
John Safranek
be4ce974d0 Updated to use TLSv1.2. Changed the string scanning to play better with other echo servers. 2012-06-30 15:51:18 -07:00
John Safranek
b1e39f66a3 fixed a cipher suite name typo, changed the selection of the ECDH-RSA ciphers in InitSuites() 2012-06-30 15:50:25 -07:00
toddouska
638c095737 better error output for temp keys or compression on sniffer 2012-06-29 10:59:48 -07:00
John Safranek
5dc0303dee cipher suite setup oversight fixes 2012-06-28 23:09:13 -07:00
John Safranek
2ce28d0328 clean up from lots-o-warnings build 2012-06-28 15:13:41 -07:00
toddouska
22cb11f304 add hello_request and session_ticket handling to sniffer 2012-06-28 13:37:19 -07:00
John Safranek
9295917ef2 Separated out the AES-GCM test as its own test case. 2012-06-28 11:28:41 -07:00
John Safranek
6cdd8f46fa needed a bigger handshake hash array for SHA-384 cipher suites 2012-06-28 09:06:24 -07:00
John Safranek
00cda6ab72 tied SHA-384 into TLSv1.2 as appropriate 2012-06-27 14:41:16 -07:00
John Safranek
c2cf1fb708 added HMAC-SHA-384 2012-06-27 10:34:43 -07:00
John Safranek
4e3d7f494b AES-GCM: fixed the encryption/decryption bug 2012-06-26 15:51:40 -07:00
John Safranek
3a9a195683 Initial draft of AES GCM cipher suites. Missing SHA-384 support. 2012-06-26 09:30:48 -07:00
John Safranek
737cd127e8 Changed AesGcmEncrypt and Decrypt to allow the same pointer to write and read buffers. 2012-06-26 09:29:48 -07:00
John Safranek
918ea3a074 added the library framework for handling aes-gcm in TLS 2012-06-18 15:57:37 -07:00
John Safranek
4e73ad8547 AES-GCM requires SHA-384, configure adds it automatically 2012-06-18 14:31:46 -07:00
John Safranek
eecdfe1648 added test case for AES-GCM 2012-06-15 16:05:47 -07:00
John Safranek
e39e27bb5b implemented AES-GCM Decrypt 2012-06-15 15:12:56 -07:00
John Safranek
bac34015cc implemented AES-GCM Encrypt 2012-06-15 14:38:11 -07:00
John Safranek
76bb3b2558 added stubs for AES-GCM processing and build option 2012-06-13 21:31:32 -07:00
toddouska
31bf833239 have separate --enable-crl-monitor 2012-06-05 11:31:00 -07:00
John Safranek
59e4c346f0 Merge branch 'master' of github.com:cyassl/cyassl 2012-06-05 10:38:46 -07:00
John Safranek
c08486e5e2 bump library version number 2012-06-05 10:38:39 -07:00
John Safranek
8f30850840 CRL fix label in debug output 2012-06-05 10:35:30 -07:00
toddouska
cb3d998301 asn checks 2012-06-01 15:55:41 -07:00
toddouska
3d91a55b88 tls sanity check 2012-06-01 15:37:51 -07:00
toddouska
ba2d7f590e internal sanity checks on memcmp 2012-06-01 15:25:46 -07:00
toddouska
217053a780 integer comba array sanity check 2012-06-01 14:49:07 -07:00
toddouska
32fc5daf43 64 decoding sanity checks 2012-06-01 14:37:59 -07:00
toddouska
8a52cd3780 byte warning casts 2012-06-01 14:37:39 -07:00
toddouska
7edd1bd843 don't use -Warray-bounds except on linux with lots-o-warnings 2012-06-01 12:14:30 -07:00
John Safranek
87b3df8621 Merge branch 'master' of github.com:cyassl/cyassl 2012-06-01 11:57:09 -07:00
John Safranek
6120f03173 ocsp response date checking 2012-06-01 11:57:03 -07:00
toddouska
6dd7eff1a8 add 64 bit misc prototypes for NO_INLINE 2012-06-01 11:07:29 -07:00
John Safranek
ca7bf0d01e Merge branch 'master' of github.com:cyassl/cyassl 2012-05-31 17:29:41 -07:00
John Safranek
6d76b2f247 dynamic allocation of OCSP responses, response signature check 2012-05-31 17:29:32 -07:00
toddouska
fbc5c8d6dc add SSL set version, different from ctx version 2012-05-31 15:24:25 -07:00
toddouska
a1157da304 move HAVE_OCSP to top of source for different build envs 2012-05-30 14:40:25 -07:00
toddouska
458302f9fe warning cast 2012-05-30 10:03:05 -07:00
toddouska
f528f5a7d3 add CertManager Verify with Buffer 2012-05-29 12:04:48 -07:00
John Safranek
4b8bb6cdfe fixed merge conflicts 2012-05-29 09:19:53 -07:00
John Safranek
9818fe4f55 changed DN hashing to cover the whole DER encoding per OCSP-RFC, OCSP changes towards dynamic storage of responses 2012-05-29 09:11:37 -07:00
John Safranek
c2292c31b0 fixed ASN.1 decoding bug in the basic ca constraint certificate extension 2012-05-25 16:32:10 -07:00
toddouska
28fb9fb0f7 new dev version 2012-05-25 14:43:36 -07:00
1285 changed files with 580239 additions and 38887 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="src/bio.c|wolfcrypt/src/evp.c|wolfcrypt/src/misc.c|IDE/LPCXPRESSO/wolf_example|tirtos|testsuite|tests|swig|support|sslSniffer|scripts|rpm|mqx|mplabx|mcapi|m4|IDE/WORKBENCH|IDE/WIN|IDE/ROWLEY-CROSSWORKS-ARM|IDE/MYSQL|IDE/MDK-ARM|IDE/MDK5-ARM|IDE/LPCXPRESSO/wolf_demo|IDE/LPCXPRESSO/lpc_chip_18xx|IDE/LPCXPRESSO/lpc_board_nxp_lpcxpresso_1837|IDE/iOS|IDE/IAR-EWARM|examples|Debug|certs|build-aux|Backup|autom4te.cache|wolfcrypt/src/aes_asm.s|wolfcrypt/src/aes_asm.asm|wolfcrypt/user-crypto" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<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>

179
.gitignore vendored
View File

@@ -1,21 +1,33 @@
ctaocrypt/src/src/
*.swp
*.lo
*.la
*.o
*.patch
*.deps
*.libs
*.cache
.dirstamp
*.user
config*
configure
config.*
*Debug/
*Release/
*.ncb
*.suo
*.sdf
*.opensdf
ipch/
build-aux/
rpm/spec
*.rpm
stamp-h
cyassl/options.h
wolfssl/options.h
libtool.m4
aclocal.m4
aminclude.am
lt*.m4
INSTALL
Makefile.in
Makefile
depcomp
@@ -23,28 +35,89 @@ missing
libtool
tags
.tags*
cyassl-config
wolfssl-config
cyassl.sublime*
fips.h
fips.c
fipsv2.c
fips_test.c
fips
selftest.c
src/async.c
wolfssl/async.h
wolfcrypt/src/async.c
wolfssl/wolfcrypt/async.h
wolfcrypt/src/port/intel/quickassist.c
wolfcrypt/src/port/intel/quickassist_mem.c
wolfcrypt/src/port/cavium/cavium_nitrox.c
wolfssl/wolfcrypt/port/intel/quickassist.h
wolfssl/wolfcrypt/port/intel/quickassist_mem.h
wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h
ctaocrypt/benchmark/benchmark
ctaocrypt/test/testctaocrypt
wolfcrypt/benchmark/benchmark
wolfcrypt/test/testwolfcrypt
examples/benchmark/tls_bench
examples/client/client
examples/echoclient/echoclient
examples/echoserver/echoserver
examples/server/server
examples/sctp/sctp-server
examples/sctp/sctp-server-dtls
examples/sctp/sctp-client
examples/sctp/sctp-client-dtls
server_ready
snifftest
output
mcapi/test
testsuite/testsuite
tests/unit
testsuite/testsuite.test
tests/unit.test
tests/bio_write_test.txt
testsuite/*.der
testsuite/*.pem
testsuite/*.raw
cert.der
cert.pem
certecc.der
certecc.pem
othercert.der
othercert.pem
certeccrsa.der
certeccrsa.pem
ntru-cert.der
ntru-cert.pem
ntru-key.raw
key.der
key.pem
ecc-public-key.der
ecc-key-pkcs8.der
ecc-key.der
ecc-key.pem
certreq.der
certreq.pem
pkcs7cert.der
pkcs7signedData_RSA_SHA.der
pkcs7signedData_RSA_SHA_noattr.der
pkcs7signedData_RSA_SHA224.der
pkcs7signedData_RSA_SHA256.der
pkcs7signedData_RSA_SHA384.der
pkcs7signedData_RSA_SHA512.der
pkcs7signedData_ECDSA_SHA.der
pkcs7signedData_ECDSA_SHA_noattr.der
pkcs7signedData_ECDSA_SHA224.der
pkcs7signedData_ECDSA_SHA256.der
pkcs7signedData_ECDSA_SHA384.der
pkcs7signedData_ECDSA_SHA512.der
pkcs7envelopedDataDES3.der
pkcs7envelopedDataAES128CBC.der
pkcs7envelopedDataAES192CBC.der
pkcs7envelopedDataAES256CBC.der
diff
sslSniffer/sslSnifferTest/tracefile.txt
tracefile.txt
*.gz
*.zip
*.bak
@@ -61,11 +134,109 @@ cyassl*rc*
autoscan.log
TAGS
.DS_Store
support/libcyassl.pc
cyassl/version.h
support/cyassl.pc
support/wolfssl.pc
cyassl/ctaocrypt/stamp-h1
swig/_cyassl.so
swig/_wolfssl.so
swig/cyassl.py
swig/wolfssl.py
swig/cyassl.pyc
swig/wolfssl.pyc
swig/cyassl_wrap.c
swig/wolfssl_wrap.c
stamp-h1
clang_output_*
internal.plist
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/
*.gcno
*.gcda
*.gcov
# MPLAB Generated Files (OS X)
mcapi/wolfcrypt_mcapi.X/nbproject/Makefile-*
mcapi/wolfcrypt_mcapi.X/nbproject/Package-default.bash
mcapi/wolfcrypt_test.X/nbproject/Makefile-*
mcapi/wolfcrypt_test.X/nbproject/Package-default.bash
mcapi/wolfssl.X/nbproject/Makefile-*
mcapi/wolfssl.X/nbproject/Package-default.bash
mcapi/zlib.X/nbproject/Makefile-*
mcapi/zlib.X/nbproject/Package-default.bash
mplabx/wolfcrypt_benchmark.X/nbproject/Makefile-*
mplabx/wolfcrypt_benchmark.X/nbproject/Package-default.bash
mplabx/wolfcrypt_test.X/nbproject/Makefile-*
mplabx/wolfcrypt_test.X/nbproject/Package-default.bash
mplabx/wolfssl.X/nbproject/Makefile-*
mplabx/wolfssl.X/nbproject/Package-default.bash
mplabx/wolfssl.X/nbproject/private
mplabx/wolfcrypt_test.X/nbproject/private
mplabx/wolfcrypt_benchmark.X/nbproject/private
mplabx/wolfssl.X/dist/default/
mplabx/wolfcrypt_test.X/dist/default/
mplabx/wolfcrypt_benchmark.X/dist/default/
*.dSYM
# Vagrant folder
.vagrant/
# CodeWarrior Generated Files (Windows)
mqx/cyassl/.settings
mqx/cyassl_client/.settings
mqx/cyassl_client/.cwGeneratedFileSetLog
mqx/cyassl_client/SaAnalysispointsManager.apconfig
mqx/util_lib/.settings
mqx/wolfcrypt_test/.settings
mqx/wolfcrypt_test/.cwGeneratedFileSetLog
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/
# Visual Studio Code Workspace Files
*.vscode
*.userprefs
IDE/INTIME-RTOS/Debug_*
IDE/VS-ARM/.vs
# Hexiwear
IDE/HEXIWEAR/wolfSSL_HW/Debug
# Linux-SGX
IDE/LINUX-SGX/*.a
# Binaries
wolfcrypt/src/port/intel/qat_test
/mplabx/wolfssl.X/dist/default/
/mplabx/wolfcrypt_test.X/dist/default/
# Arduino Generated Files
/IDE/ARDUINO/wolfSSL

28
.project Normal file
View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>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>

41
COPYING
View File

@@ -1,12 +1,12 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@@ -303,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

1932
ChangeLog.md Normal file

File diff suppressed because it is too large Load Diff

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

@@ -0,0 +1,26 @@
### 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 `IDE/ARDUINO/wolfSSL`
directory and creates a stub header file called `wolfssl.h`.
Step 1: To configure wolfSSL with Arduino, enter the following from within the
wolfssl/IDE/ARDUINO directory:
`./wolfssl-arduino.sh`
Step 2: Edit `<wolfssl-root>/IDE/ARDUINO/wolfSSL/wolfssl/wolfcrypt/settings.h` uncomment the define for `WOLFSSL_ARDUINO`
If building for Intel Galileo platform also uncomment the define for `INTEL_GALILEO`.
#####Including wolfSSL in Arduino Libraries (for Arduino version 1.6.6)
1. In the Arduino IDE:
- In `Sketch -> Include Library -> Add .ZIP Library...` and choose the
`IDE/ARDUNIO/wolfSSL` folder.
- In `Sketch -> Include Library` choose wolfSSL.
An example wolfSSL client INO sketch exists here: `sketches/wolfssl_client/wolfssl_client.ino`

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/wolfssl_client.ino
EXTRA_DIST+= IDE/ARDUINO/wolfssl-arduino.sh

View File

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

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

@@ -0,0 +1,35 @@
#!/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
rm -rf wolfSSL
mkdir wolfSSL
cp ../../src/*.c ./wolfSSL
cp ../../wolfcrypt/src/*.c ./wolfSSL
mkdir wolfSSL/wolfssl
cp ../../wolfssl/*.h ./wolfSSL/wolfssl
mkdir wolfSSL/wolfssl/wolfcrypt
cp ../../wolfssl/wolfcrypt/*.h ./wolfSSL/wolfssl/wolfcrypt
# support misc.c as include in wolfcrypt/src
mkdir ./wolfSSL/wolfcrypt
mkdir ./wolfSSL/wolfcrypt/src
cp ../../wolfcrypt/src/misc.c ./wolfSSL/wolfcrypt/src
# put bio and evp as includes
mv ./wolfSSL/bio.c ./wolfSSL/wolfssl
mv ./wolfSSL/evp.c ./wolfSSL/wolfssl
echo "/* Generated wolfSSL header file for Arduino */" >> ./wolfSSL/wolfssl.h
echo "#include <wolfssl/wolfcrypt/settings.h>" >> ./wolfSSL/wolfssl.h
echo "#include <wolfssl/ssl.h>" >> ./wolfSSL/wolfssl.h
else
echo "ERROR: You must be in the IDE/ARDUINO directory to run this script"
fi

183
IDE/CSBENCH/.cproject Normal file
View File

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

33
IDE/CSBENCH/.project Normal file
View File

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

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

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

View File

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

View File

@@ -0,0 +1,454 @@
/* user_settings.h
*
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/* Custom wolfSSL user settings for GCC ARM */
#ifndef WOLFSSL_USER_SETTINGS_H
#define WOLFSSL_USER_SETTINGS_H
#ifdef __cplusplus
extern "C" {
#endif
/* ------------------------------------------------------------------------- */
/* Platform */
/* ------------------------------------------------------------------------- */
#undef WOLFSSL_GENERAL_ALIGNMENT
#define WOLFSSL_GENERAL_ALIGNMENT 4
#undef SINGLE_THREADED
#define SINGLE_THREADED
#undef WOLFSSL_SMALL_STACK
#define WOLFSSL_SMALL_STACK
#undef WOLFSSL_USER_IO
#define WOLFSSL_USER_IO
/* ------------------------------------------------------------------------- */
/* Math Configuration */
/* ------------------------------------------------------------------------- */
#undef USE_FAST_MATH
#define USE_FAST_MATH
#undef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG 8
#ifdef USE_FAST_MATH
#undef TFM_TIMING_RESISTANT
#define TFM_TIMING_RESISTANT
/* Optimizations (on M0 UMULL is not supported, need another assembly solution) */
//#define TFM_ARM
#endif
/* ------------------------------------------------------------------------- */
/* Crypto */
/* ------------------------------------------------------------------------- */
/* RSA */
#undef NO_RSA
#if 1
#ifdef USE_FAST_MATH
/* Maximum math bits (Max RSA key bits * 2) */
#undef FP_MAX_BITS
#define FP_MAX_BITS 4096
#endif
/* half as much memory but twice as slow */
#undef RSA_LOW_MEM
//#define RSA_LOW_MEM
/* Enables blinding mode, to prevent timing attacks */
#if 1
#undef WC_RSA_BLINDING
#define WC_RSA_BLINDING
#else
#undef WC_NO_HARDEN
#define WC_NO_HARDEN
#endif
/* RSA PSS Support */
#if 0
#define WC_RSA_PSS
#endif
#else
#define NO_RSA
#endif
/* 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
/* Use alternate ECC size for ECC math */
#ifdef USE_FAST_MATH
#ifdef NO_RSA
/* if not using RSA set FP_MAX_BITS to 256*2 */
#undef FP_MAX_BITS
#define FP_MAX_BITS 512
#else
#undef ALT_ECC_SIZE
#define ALT_ECC_SIZE
#endif
#ifndef NO_ECC256
#undef TFM_ECC256
#define TFM_ECC256
#endif
#endif
#endif
/* AES */
#undef NO_AES
#if 1
#undef HAVE_AES_CBC
#define HAVE_AES_CBC
#undef HAVE_AESGCM
#define HAVE_AESGCM
#undef HAVE_AESCCM
#define HAVE_AESCCM
/* 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 0
#define HAVE_CHACHA
#define HAVE_POLY1305
/* Needed for Poly1305 */
#undef HAVE_ONE_TIME_AUTH
#define HAVE_ONE_TIME_AUTH
#endif
/* Ed25519 / Curve25519 */
#undef HAVE_CURVE25519
#undef HAVE_ED25519
#if 0
#define HAVE_CURVE25519
#define HAVE_ED25519 /* ED25519 Requires SHA512 */
/* Optionally use small math (less flash usage, but much slower) */
#if 1
#define CURVED25519_SMALL
#endif
#endif
/* ------------------------------------------------------------------------- */
/* Hashing */
/* ------------------------------------------------------------------------- */
/* Sha */
#undef NO_SHA
#if 1
/* 1k smaller, but 25% slower */
//#define USE_SLOW_SHA
#else
#define NO_SHA
#endif
/* Sha256 */
#undef NO_SHA256
#if 1
/* not unrolled - ~2k smaller and ~25% slower */
#define USE_SLOW_SHA256
#else
#define NO_SHA256
#endif
/* Sha512 */
#undef WOLFSSL_SHA512
#if 0
#define WOLFSSL_SHA512
/* Sha384 */
#undef WOLFSSL_SHA384
#if 0
#define WOLFSSL_SHA384
#endif
/* over twice as small, but 50% slower */
#define USE_SLOW_SHA512
#endif
/* MD5 */
#undef NO_MD5
#if 1
#else
#define NO_MD5
#endif
#undef WOLFSSL_SHA3
#if 0
#define WOLFSSL_SHA3
#else
#endif
/* HKDF */
#undef HAVE_HKDF
#if 0
#define HAVE_HKDF
#else
#endif
/* ------------------------------------------------------------------------- */
/* Benchmark / Test */
/* ------------------------------------------------------------------------- */
/* Use reduced benchmark / test sizes */
#undef BENCH_EMBEDDED
#define BENCH_EMBEDDED
#undef USE_CERT_BUFFERS_2048
#define USE_CERT_BUFFERS_2048
//#undef USE_CERT_BUFFERS_1024
//#define USE_CERT_BUFFERS_1024
#undef USE_CERT_BUFFERS_256
#define USE_CERT_BUFFERS_256
/* ------------------------------------------------------------------------- */
/* Debugging */
/* ------------------------------------------------------------------------- */
#undef DEBUG_WOLFSSL
//#define DEBUG_WOLFSSL
/* Use this to measure / print heap usage */
#if 0
#undef USE_WOLFSSL_MEMORY
#define USE_WOLFSSL_MEMORY
#undef WOLFSSL_TRACK_MEMORY
//#define WOLFSSL_TRACK_MEMORY
#undef WOLFSSL_DEBUG_MEMORY
//#define WOLFSSL_DEBUG_MEMORY
#else
#undef NO_WOLFSSL_MEMORY
#define NO_WOLFSSL_MEMORY
#endif
#ifndef DEBUG_WOLFSSL
#undef NO_ERROR_STRINGS
#define NO_ERROR_STRINGS
#endif
/* ------------------------------------------------------------------------- */
/* Port */
/* ------------------------------------------------------------------------- */
/* Override Current Time */
/* Allows custom "custom_time()" function to be used for benchmark */
#define WOLFSSL_USER_CURRTIME
#define USER_TICKS
extern unsigned long my_time(unsigned long* timer);
#define XTIME my_time
/* ------------------------------------------------------------------------- */
/* RNG */
/* ------------------------------------------------------------------------- */
/* Size of returned HW RNG value */
#define CUSTOM_RAND_TYPE unsigned int
/* Seed source */
extern unsigned int custom_rand_generate(void);
#undef CUSTOM_RAND_GENERATE
#define CUSTOM_RAND_GENERATE custom_rand_generate
/* Choose RNG method */
#if 0
/* Use built-in P-RNG (SHA256 based) with HW RNG */
/* P-RNG + HW RNG (P-RNG is ~8K) */
#undef HAVE_HASHDRBG
#define HAVE_HASHDRBG
#else
#undef WC_NO_HASHDRBG
#define WC_NO_HASHDRBG
/* Bypass P-RNG and use only HW RNG */
extern int custom_rand_generate_block(unsigned char* output, unsigned int sz);
#undef CUSTOM_RAND_GENERATE_BLOCK
#define CUSTOM_RAND_GENERATE_BLOCK custom_rand_generate_block
#endif
/* ------------------------------------------------------------------------- */
/* Enable Features */
/* ------------------------------------------------------------------------- */
#if 0
#undef WOLFSSL_TLS13
#define WOLFSSL_TLS13
#endif
#undef KEEP_PEER_CERT
//#define KEEP_PEER_CERT
#undef HAVE_COMP_KEY
//#define HAVE_COMP_KEY
#undef HAVE_TLS_EXTENSIONS
#define HAVE_TLS_EXTENSIONS
#undef HAVE_SUPPORTED_CURVES
#define HAVE_SUPPORTED_CURVES
#undef WOLFSSL_BASE64_ENCODE
#define WOLFSSL_BASE64_ENCODE
/* TLS Session Cache */
#if 0
#define SMALL_SESSION_CACHE
#else
#define NO_SESSION_CACHE
#endif
/* ------------------------------------------------------------------------- */
/* Disable Features */
/* ------------------------------------------------------------------------- */
#undef NO_WOLFSSL_SERVER
//#define NO_WOLFSSL_SERVER
#undef NO_WOLFSSL_CLIENT
//#define NO_WOLFSSL_CLIENT
#undef NO_CRYPT_TEST
//#define NO_CRYPT_TEST
#undef NO_CRYPT_BENCHMARK
//#define NO_CRYPT_BENCHMARK
#undef WOLFCRYPT_ONLY
//#define WOLFCRYPT_ONLY
/* In-lining of misc.c functions */
/* If defined, must include wolfcrypt/src/misc.c in build */
/* Slower, but about 1k smaller */
#undef NO_INLINE
//#define NO_INLINE
#undef NO_FILESYSTEM
#define NO_FILESYSTEM
#undef NO_WRITEV
#define NO_WRITEV
#undef NO_MAIN_DRIVER
#define NO_MAIN_DRIVER
#undef NO_DEV_RANDOM
#define NO_DEV_RANDOM
#undef NO_DSA
#define NO_DSA
#undef NO_DH
#define NO_DH
#undef NO_DES3
#define NO_DES3
#undef NO_RC4
#define NO_RC4
#undef NO_OLD_TLS
#define NO_OLD_TLS
#undef NO_HC128
#define NO_HC128
#undef NO_RABBIT
#define NO_RABBIT
#undef NO_PSK
#define NO_PSK
#undef NO_MD4
#define NO_MD4
#undef NO_PWDBASED
#define NO_PWDBASED
#undef NO_CODING
//#define NO_CODING
#undef NO_ASN_TIME
//#define NO_ASN_TIME
#undef NO_CERTS
//#define NO_CERTS
#undef NO_SIG_WRAPPER
//#define NO_SIG_WRAPPER
#ifdef __cplusplus
}
#endif
#endif /* WOLFSSL_USER_SETTINGS_H */

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

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

View File

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

View File

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

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

@@ -0,0 +1,108 @@
# Set to @ if you want to suppress command echo
CMD_ECHO =
# Important directories
BUILD_DIR = ./Build
# Toolchain location and prefix
TOOLCHAIN = /opt/gcc-arm-none-eabi/bin/arm-none-eabi-
INC = -I./Header \
-I./Source \
-I../..
# Memory Map
SRC_LD = -T./linker.ld
# Defines
DEF = -DWOLFSSL_USER_SETTINGS
# Compiler and linker flags
ARCHFLAGS = -mcpu=cortex-m0 -mthumb -mabi=aapcs
DBGFLAGS = -ggdb
ASFLAGS = $(ARCHFLAGS)
# CC: Place functions and data into separate sections to allow dead code removal
# by the linker (-f*-sections). Enable link time optimization (-flto)
CFLAGS = $(ARCHFLAGS) -std=gnu99 -Wall -Wno-cpp \
-ffunction-sections -fdata-sections \
-Os -flto $(DBGFLAGS)
# LD: Remove unused sections
LDFLAGS = $(ARCHFLAGS) -Wl,--gc-sections
# LD: Link with newlib-nano implementation
LDFLAGS += --specs=nano.specs --specs=nosys.specs
# LD: generate map
LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(BIN).map $(DBGFLAGS)
# LD: Entry point
LDFLAGS += -Wl,-ereset_handler
# Math lib (for DH)
LIBS = -lm
SRC_C += ./Source/armtarget.c
SRC_C += $(wildcard ../../src/*.c ../../wolfcrypt/src/*.c ../../wolfcrypt/benchmark/*.c ../../wolfcrypt/test/*.c)
FILENAMES_C = $(notdir $(SRC_C))
FILENAMES_C := $(filter-out evp.c, $(FILENAMES_C))
OBJS_C = $(addprefix $(BUILD_DIR)/, $(FILENAMES_C:.c=.o))
vpath %.c $(dir $(SRC_C))
# Tools selection
CC = $(TOOLCHAIN)gcc
AS = $(TOOLCHAIN)gcc
LD = $(TOOLCHAIN)gcc
AR = $(TOOLCHAIN)ar
NM = $(TOOLCHAIN)nm
OBJCOPY = $(TOOLCHAIN)objcopy
OBJDUMP = $(TOOLCHAIN)objdump
SIZE = $(TOOLCHAIN)size
build_hex: $(BUILD_DIR) $(BUILD_DIR)/$(BIN).hex
@echo ""
$(CMD_ECHO) @$(SIZE) $(BUILD_DIR)/$(BIN).elf
build_static: $(BUILD_DIR) $(BUILD_DIR)/$(BIN).a
@echo ""
$(CMD_ECHO) @$(SIZE) $(BUILD_DIR)/$(BIN).a
$(BUILD_DIR):
$(CMD_ECHO) mkdir -p $(BUILD_DIR)
$(BUILD_DIR)/$(BIN).hex: $(BUILD_DIR)/$(BIN).elf
@echo "Generating HEX binary: $(notdir $@)"
$(CMD_ECHO) $(OBJCOPY) -O ihex $< $@
$(BUILD_DIR)/%.o: %.s
@echo "Compiling ASM file: $(notdir $<)"
$(CMD_ECHO) $(AS) $(ASFLAGS) $(DEF) $(INC) -c -o $@ $<
$(BUILD_DIR)/%.o: %.c
@echo "Compiling C file: $(notdir $<)"
$(CMD_ECHO) $(CC) $(CFLAGS) $(DEF) $(INC) -c -o $@ $<
$(BUILD_DIR)/$(BIN).elf: $(OBJS_ASM) $(OBJS_C)
@echo "Linking ELF binary: $(notdir $@)"
$(CMD_ECHO) $(LD) $(LDFLAGS) $(SRC_LD) -o $@ $^ $(LIBS)
@echo "Generating name list: $(BIN).sym"
$(CMD_ECHO) $(NM) -n $@ > $(BUILD_DIR)/$(BIN).sym
@echo "Generating disassembly: $(BIN).disasm"
$(CMD_ECHO) $(OBJDUMP) -S $@ > $(BUILD_DIR)/$(BIN).disasm
$(BUILD_DIR)/$(BIN).a: $(OBJS_ASM) $(OBJS_C)
@echo "Building static library: $(notdir $@)"
$(CMD_ECHO) $(AR) -r $@ $^
@echo "Generating name list: $(BIN).sym"
$(CMD_ECHO) $(NM) -n $@ > $(BUILD_DIR)/$(BIN).sym
@echo "Generating disassembly: $(BIN).disasm"
$(CMD_ECHO) $(OBJDUMP) -S $@ > $(BUILD_DIR)/$(BIN).disasm
clean:
rm -f $(BUILD_DIR)/*.elf $(BUILD_DIR)/*.hex $(BUILD_DIR)/*.map
rm -f $(BUILD_DIR)/*.o $(BUILD_DIR)/*.a $(BUILD_DIR)/*.sym $(BUILD_DIR)/*.disasm

View File

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

View File

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

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

@@ -0,0 +1,67 @@
# Example Project for GCC ARM
This example is for Cortex M series, but can be adopted for other architectures.
## Design
* All library options are defined in `Header/user_settings.h`.
* The memory map is located in the linker file in `linker.ld`.
* Entry point function is `reset_handler` in `armtarget.c`.
* The RTC and RNG hardware interface needs implemented for real production applications in `armtarget.c`
## Building
1. Make sure you have `gcc-arm-none-eabi` installed.
2. Modify the `Makefile.common`:
* Use correct toolchain path `TOOLCHAIN`.
* Use correct architecture 'ARCHFLAGS' (default is cortex-m0 / thumb). See [GCC ARM Options](https://gcc.gnu.org/onlinedocs/gcc-4.7.3/gcc/ARM-Options.html) `-mcpu=name`.
3. Use `make` and it will build the static library and wolfCrypt test/benchmark and wolfSSL TLS client targets as `.elf` and `.hex` in `/Build`.
### Building for Raspberry Pi
Example `Makefile.common` changes for Rasperry Pi with Cortex-A53:
1. Change ARCHFLAGS to `ARCHFLAGS = -mcpu=cortex-a53 -mthumb -mabi=aapcs` to specify Cortex-A53.
2. Comment out `SRC_LD`, since custom memory map is not applicable.
3. Clear `TOOLCHAIN`, so it will use default `gcc`. Set `TOOLCHAIN = `
4. Comment out `LDFLAGS += --specs=nano.specs --specs=nosys.specs` to disable newlib-nano.
Note: To comment out a line in a Makefile use place `#` in front of line.
### Example Build
```
make clean && make
text data bss dec hex filename
50076 2508 44 52628 cd94 ./Build/WolfCryptTest.elf
text data bss dec hex filename
39155 2508 60 41723 a2fb ./Build/WolfCryptBench.elf
text data bss dec hex filename
70368 464 36 70868 114d4 ./Build/WolfSSLClient.elf
```
## Performace Tuning Options
These settings are located in `Header/user_settings.h`.
* `DEBUG_WOLFSSL`: Undefine this to disable debug logging.
* `NO_ERROR_STRINGS`: Disables error strings to save code space.
* `NO_INLINE`: Disabling inline function saves about 1KB, but is slower.
* `WOLFSSL_SMALL_STACK`: Enables stack reduction techniques to allocate stack sections over 100 bytes from heap.
* `USE_FAST_MATH`: Uses stack based math, which is faster than the heap based math.
* `ALT_ECC_SIZE`: If using fast math and RSA/DH you can define this to reduce your ECC memory consumption.
* `FP_MAX_BITS`: Is the maximum math size (key size * 2). Used only with `USE_FAST_MATH`.
* `ECC_TIMING_RESISTANT`: Enables timing resistance for ECC and uses slightly less memory.
* `ECC_SHAMIR`: Doubles heap usage, but slightly faster
* `RSA_LOW_MEM`: Half as much memory but twice as slow. Uses Non-CRT method for private key.
AES GCM: `GCM_SMALL`, `GCM_WORD32` or `GCM_TABLE`: Tunes performance and flash/memory usage.
* `CURVED25519_SMALL`: Enables small versions of Ed/Curve (FE/GE math).
* `USE_SLOW_SHA`: Enables smaller/slower version of SHA.
* `USE_SLOW_SHA256`: About 2k smaller and about 25% slower
* `USE_SLOW_SHA512`: Over twice as small, but 50% slower
* `USE_CERT_BUFFERS_1024` or `USE_CERT_BUFFERS_2048`: Size of RSA certs / keys to test with.
* `BENCH_EMBEDDED`: Define this if using the wolfCrypt test/benchmark and using a low memory target.
* `ECC_USER_CURVES`: Allows user to defines curve sizes to enable. Default is 256-bit on. To enable others use `HAVE_ECC192`, `HAVE_ECC224`, etc....

View File

@@ -0,0 +1,281 @@
/* armtarget.c
*
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/random.h> /* for CUSTOM_RAND_TYPE */
#include <stdint.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
/* Test to determine if ARM Cortex M */
#if defined(__arm__) && defined(__ARM_ARCH) && (__ARM_ARCH == 6 || __ARM_ARCH == 7)
#define CORTEX_M_SERIES
#endif
#ifdef CORTEX_M_SERIES
/* Memory initialization */
extern uint32_t __data_load_start__[];
extern uint32_t __data_start__[];
extern uint32_t __data_end__[];
extern uint32_t __bss_start__[];
extern uint32_t __bss_end__[];
extern uint32_t __stack_process_end__[];
extern uint32_t __heap_start__[];
extern uint32_t __heap_end__[];
/* Copy memory: src=Source, dst_beg=Destination Begin, dst_end=Destination End */
void memcpy32(uint32_t* src, uint32_t* dst_beg, uint32_t* dst_end)
{
while (dst_beg < dst_end) {
*dst_beg++ = *src++;
}
}
/* Zero address in range */
void meminit32(uint32_t* start, uint32_t* end)
{
while (start < end) {
*start++ = 0;
}
}
#endif /* CORTEX_M_SERIES */
/* Entry Point */
void reset_handler(void)
{
#ifdef CORTEX_M_SERIES
/* Init sections */
memcpy32(__data_load_start__, __data_start__, __data_end__);
meminit32(__bss_start__, __bss_end__);
/* Init heap */
__heap_start__[0] = 0;
__heap_start__[1] = ((uint32_t)__heap_end__ - (uint32_t)__heap_start__);
#endif /* CORTEX_M_SERIES */
/* Start main */
extern int main(void);
main();
/* Application has ended, so busy wait */
while(1);
}
#ifdef CORTEX_M_SERIES
// Vector Exception/Interrupt Handlers
static void Default_Handler(void)
{
/* If we get here then need to implement real IRQ handler */
while(1);
}
__attribute__((section(".sys"))) __attribute__ ((used))
void HardFault_HandlerC( uint32_t *hardfault_args )
{
/* These are volatile to try and prevent the compiler/linker optimizing them
away as the variables never actually get used. If the debugger won't show the
values of the variables, make them global my moving their declaration outside
of this function. */
volatile uint32_t stacked_r0;
volatile uint32_t stacked_r1;
volatile uint32_t stacked_r2;
volatile uint32_t stacked_r3;
volatile uint32_t stacked_r12;
volatile uint32_t stacked_lr;
volatile uint32_t stacked_pc;
volatile uint32_t stacked_psr;
volatile uint32_t _CFSR;
volatile uint32_t _HFSR;
volatile uint32_t _DFSR;
volatile uint32_t _AFSR;
volatile uint32_t _BFAR;
volatile uint32_t _MMAR;
stacked_r0 = ((uint32_t)hardfault_args[0]);
stacked_r1 = ((uint32_t)hardfault_args[1]);
stacked_r2 = ((uint32_t)hardfault_args[2]);
stacked_r3 = ((uint32_t)hardfault_args[3]);
stacked_r12 = ((uint32_t)hardfault_args[4]);
stacked_lr = ((uint32_t)hardfault_args[5]);
stacked_pc = ((uint32_t)hardfault_args[6]);
stacked_psr = ((uint32_t)hardfault_args[7]);
// Configurable Fault Status Register
// Consists of MMSR, BFSR and UFSR
_CFSR = (*((volatile uint32_t *)(0xE000ED28)));
// Hard Fault Status Register
_HFSR = (*((volatile uint32_t *)(0xE000ED2C)));
// Debug Fault Status Register
_DFSR = (*((volatile uint32_t *)(0xE000ED30)));
// Auxiliary Fault Status Register
_AFSR = (*((volatile uint32_t *)(0xE000ED3C)));
// Read the Fault Address Registers. These may not contain valid values.
// Check BFARVALID/MMARVALID to see if they are valid values
// MemManage Fault Address Register
_MMAR = (*((volatile uint32_t *)(0xE000ED34)));
// Bus Fault Address Register
_BFAR = (*((volatile uint32_t *)(0xE000ED38)));
printf ("\n\nHard fault handler (all numbers in hex):\n");
printf ("R0 = %lx\n", stacked_r0);
printf ("R1 = %lx\n", stacked_r1);
printf ("R2 = %lx\n", stacked_r2);
printf ("R3 = %lx\n", stacked_r3);
printf ("R12 = %lx\n", stacked_r12);
printf ("LR [R14] = %lx subroutine call return address\n", stacked_lr);
printf ("PC [R15] = %lx program counter\n", stacked_pc);
printf ("PSR = %lx\n", stacked_psr);
printf ("CFSR = %lx\n", _CFSR);
printf ("HFSR = %lx\n", _HFSR);
printf ("DFSR = %lx\n", _DFSR);
printf ("AFSR = %lx\n", _AFSR);
printf ("MMAR = %lx\n", _MMAR);
printf ("BFAR = %lx\n", _BFAR);
// Break into the debugger
__asm("BKPT #0\n");
}
__attribute__((section(".sys"))) __attribute__( ( naked ) )
void HardFault_Handler(void)
{
__asm volatile
(
" movs r0,#4 \n" /* load bit mask into R0 */
" mov r1, lr \n" /* load link register into R1 */
" tst r0, r1 \n" /* compare with bitmask */
" beq _MSP \n" /* if bitmask is set: stack pointer is in PSP. Otherwise in MSP */
" mrs r0, psp \n" /* otherwise: stack pointer is in PSP */
" b _GetPC \n" /* go to part which loads the PC */
"_MSP: \n" /* stack pointer is in MSP register */
" mrs r0, msp \n" /* load stack pointer into R0 */
"_GetPC: \n" /* find out where the hard fault happened */
" ldr r1,[r0,#20] \n" /* load program counter into R1. R1 contains address of the next instruction where the hard fault happened */
" ldr r2, =HardFault_HandlerC \n"
" bx r2 \n"
" bx lr \n" /* decode more information. R0 contains pointer to stack frame */
);
}
// Vectors
typedef void (*vector_entry)(void);
const vector_entry vectors[] __attribute__ ((section(".vectors"),used)) =
{
/* Interrupt Vector Table Function Pointers */
// Address Vector IRQ Source module Source description
(vector_entry)__stack_process_end__, // ARM core Initial Supervisor SP
reset_handler, // 0x0000_0004 1 - ARM core Initial Program Counter
Default_Handler, // 0x0000_0008 2 - ARM core Non-maskable Interrupt (NMI)
HardFault_Handler, // 0x0000_000C 3 - ARM core Hard Fault
Default_Handler, // 0x0000_0010 4 -
HardFault_Handler, // 0x0000_0014 5 - ARM core Bus Fault
HardFault_Handler, // 0x0000_0018 6 - ARM core Usage Fault
Default_Handler, // 0x0000_001C 7 -
Default_Handler, // 0x0000_0020 8 -
Default_Handler, // 0x0000_0024 9 -
Default_Handler, // 0x0000_0028 10 -
Default_Handler, // 0x0000_002C 11 - ARM core Supervisor call (SVCall)
Default_Handler, // 0x0000_0030 12 - ARM core Debug Monitor
Default_Handler, // 0x0000_0034 13 -
Default_Handler, // 0x0000_0038 14 - ARM core Pendable request for system service (PendableSrvReq)
Default_Handler, // 0x0000_003C 15 - ARM core System tick timer (SysTick)
/* remainder go below */
};
#endif /* CORTEX_M_SERIES */
/* TIME CODE */
/* TODO: Implement real RTC */
static int gTimeMs;
static int hw_get_time_sec(void)
{
return ++gTimeMs;
}
unsigned long my_time(unsigned long* timer)
{
(void)timer;
return hw_get_time_sec();
}
unsigned int LowResTimer(void)
{
return hw_get_time_sec();
}
double current_time(int reset)
{
double time;
int timeMs = gTimeMs;
(void)reset;
time = (timeMs / 1000); // sec
time += (double)(timeMs % 1000) / 1000; // ms
return time;
}
/* RNG CODE */
/* TODO: Implement real RNG */
static int gCounter;
int hw_rand(void)
{
return ++gCounter;
}
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;
}

View File

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

View File

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

View File

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

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

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

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

@@ -0,0 +1,30 @@
MEMORY
{
FLASH (wx) : ORIGIN = 0x00000000, LENGTH = 256K
RAM (wx) : ORIGIN = 0x20000000, LENGTH = 64K
}
SECTIONS
{
__vectors_start__ = .;
.vectors : { *(.vectors) } > FLASH
__vectors_end__ = __vectors_start__ + 0x400;
.sys : { *(.sys*) } > FLASH
.text : { *(.text*) } > FLASH
.rodata : { *(.text*) } > FLASH
__data_load_start__ = .;
__data_start__ = .;
.data : { *(.data*) } > RAM
__data_end__ = __data_start__ + SIZEOF(.data);
__bss_start__ = .;
.bss : { *(.bss*) } > RAM
__bss_end__ = __bss_start__ + SIZEOF(.bss);
__heap_start__ = .;
.heap : { *(.heap*) } > RAM
__heap_end__ = __heap_start__ + SIZEOF(.heap);
end = .;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,43 @@
/* benchmark-main.c
*
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfcrypt/benchmark/benchmark.h>
typedef struct func_args {
int argc;
char** argv;
int return_code;
} func_args;
func_args args = { 0 } ;
extern double current_time(int reset) ;
main(void) {
benchmark_test(&args) ;
return 0;
}

View File

@@ -0,0 +1,73 @@
/* current-time.c
*
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#ifdef WOLFSSL_TI_CURRTIME
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>
#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "inc/hw_timer.h"
#include "driverlib/rom.h"
#include "driverlib/sysctl.h"
#include "driverlib/timer.h"
void InitTimer(void) {
uint32_t ui32SysClock = ROM_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN |
SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);
printf("Clock=%dMHz\n", ui32SysClock/1000000) ;
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
ROM_TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC);
ROM_TimerLoadSet(TIMER0_BASE, TIMER_A, -1);
ROM_TimerEnable(TIMER0_BASE, TIMER_A);
}
static int initFlag = false ;
double current_time(int reset)
{
if(!initFlag)InitTimer() ;
initFlag = true ;
if(reset)ROM_TimerLoadSet(TIMER0_BASE, TIMER_A, -1);
return (double)(-(int)ROM_TimerValueGet(TIMER0_BASE, TIMER_A ))/120000000.0 ;
}
#else
/* dummy */
double current_time(int reset) {
static double t;
t += 1.0; /* for avoid infinit loop of waiting time */
if(reset)t = 0.0;
return t ;
}
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,979 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<project>
<fileVersion>2</fileVersion>
<configuration>
<name>Debug</name>
<toolchain>
<name>ARM</name>
</toolchain>
<debug>1</debug>
<settings>
<name>General</name>
<archiveVersion>3</archiveVersion>
<data>
<version>22</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>ExePath</name>
<state>ewarm\Exe</state>
</option>
<option>
<name>ObjPath</name>
<state>ewarm\Obj</state>
</option>
<option>
<name>ListPath</name>
<state>ewarm\List</state>
</option>
<option>
<name>Variant</name>
<version>21</version>
<state>40</state>
</option>
<option>
<name>GEndianMode</name>
<state>0</state>
</option>
<option>
<name>Input variant</name>
<version>3</version>
<state>6</state>
</option>
<option>
<name>Input description</name>
<state>No specifier n, no float nor long long, no scan set, no assignment suppressing.</state>
</option>
<option>
<name>Output variant</name>
<version>2</version>
<state>2</state>
</option>
<option>
<name>Output description</name>
<state>Full formatting, without multibyte support.</state>
</option>
<option>
<name>GOutputBinary</name>
<state>0</state>
</option>
<option>
<name>FPU</name>
<version>4</version>
<state>6</state>
</option>
<option>
<name>OGCoreOrChip</name>
<state>0</state>
</option>
<option>
<name>GRuntimeLibSelect</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>GRuntimeLibSelectSlave</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>RTDescription</name>
<state>Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.</state>
</option>
<option>
<name>OGProductVersion</name>
<state>5.11.0.50579</state>
</option>
<option>
<name>OGLastSavedByProductVersion</name>
<state>7.40.1.8463</state>
</option>
<option>
<name>GeneralEnableMisra</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraVerbose</name>
<state>0</state>
</option>
<option>
<name>OGChipSelectEditMenu</name>
<state>Default None</state>
</option>
<option>
<name>GenLowLevelInterface</name>
<state>1</state>
</option>
<option>
<name>GEndianModeBE</name>
<state>1</state>
</option>
<option>
<name>OGBufferedTerminalOutput</name>
<state>0</state>
</option>
<option>
<name>GenStdoutInterface</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>GeneralMisraVer</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
<option>
<name>RTConfigPath2</name>
<state>$TOOLKIT_DIR$\INC\c\DLib_Config_Normal.h</state>
</option>
<option>
<name>GFPUCoreSlave</name>
<version>21</version>
<state>40</state>
</option>
<option>
<name>GBECoreSlave</name>
<version>21</version>
<state>40</state>
</option>
<option>
<name>OGUseCmsis</name>
<state>0</state>
</option>
<option>
<name>OGUseCmsisDspLib</name>
<state>0</state>
</option>
<option>
<name>GRuntimeLibThreads</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>ICCARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>31</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CCDefines</name>
<state>ewarm</state>
<state>WOLFSSL_USER_SETTINGS</state>
</option>
<option>
<name>CCPreprocFile</name>
<state>0</state>
</option>
<option>
<name>CCPreprocComments</name>
<state>0</state>
</option>
<option>
<name>CCPreprocLine</name>
<state>0</state>
</option>
<option>
<name>CCListCFile</name>
<state>0</state>
</option>
<option>
<name>CCListCMnemonics</name>
<state>0</state>
</option>
<option>
<name>CCListCMessages</name>
<state>0</state>
</option>
<option>
<name>CCListAssFile</name>
<state>0</state>
</option>
<option>
<name>CCListAssSource</name>
<state>0</state>
</option>
<option>
<name>CCEnableRemarks</name>
<state>0</state>
</option>
<option>
<name>CCDiagSuppress</name>
<state>Pa050</state>
</option>
<option>
<name>CCDiagRemark</name>
<state></state>
</option>
<option>
<name>CCDiagWarning</name>
<state></state>
</option>
<option>
<name>CCDiagError</name>
<state></state>
</option>
<option>
<name>CCObjPrefix</name>
<state>1</state>
</option>
<option>
<name>CCAllowList</name>
<version>1</version>
<state>11111110</state>
</option>
<option>
<name>CCDebugInfo</name>
<state>1</state>
</option>
<option>
<name>IEndianMode</name>
<state>1</state>
</option>
<option>
<name>IProcessor</name>
<state>1</state>
</option>
<option>
<name>IExtraOptionsCheck</name>
<state>0</state>
</option>
<option>
<name>IExtraOptions</name>
<state></state>
</option>
<option>
<name>CCLangConformance</name>
<state>0</state>
</option>
<option>
<name>CCSignedPlainChar</name>
<state>1</state>
</option>
<option>
<name>CCRequirePrototypes</name>
<state>0</state>
</option>
<option>
<name>CCMultibyteSupport</name>
<state>0</state>
</option>
<option>
<name>CCDiagWarnAreErr</name>
<state>0</state>
</option>
<option>
<name>CCCompilerRuntimeInfo</name>
<state>0</state>
</option>
<option>
<name>IFpuProcessor</name>
<state>1</state>
</option>
<option>
<name>OutputFile</name>
<state>$FILE_BNAME$.o</state>
</option>
<option>
<name>CCLibConfigHeader</name>
<state>1</state>
</option>
<option>
<name>PreInclude</name>
<state></state>
</option>
<option>
<name>CompilerMisraOverride</name>
<state>0</state>
</option>
<option>
<name>CCIncludePath2</name>
<state>$PROJ_DIR$\..\..\..\..</state>
<state>$PROJ_DIR$\..</state>
<state>$PROJ_DIR$\..\..\..\..\..</state>
</option>
<option>
<name>CCStdIncCheck</name>
<state>0</state>
</option>
<option>
<name>CCCodeSection</name>
<state>.text</state>
</option>
<option>
<name>IInterwork2</name>
<state>0</state>
</option>
<option>
<name>IProcessorMode2</name>
<state>1</state>
</option>
<option>
<name>CCOptLevel</name>
<state>3</state>
</option>
<option>
<name>CCOptStrategy</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>CCOptLevelSlave</name>
<state>3</state>
</option>
<option>
<name>CompilerMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>CompilerMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
<option>
<name>CCPosIndRopi</name>
<state>0</state>
</option>
<option>
<name>CCPosIndRwpi</name>
<state>0</state>
</option>
<option>
<name>CCPosIndNoDynInit</name>
<state>0</state>
</option>
<option>
<name>IccLang</name>
<state>0</state>
</option>
<option>
<name>IccCDialect</name>
<state>1</state>
</option>
<option>
<name>IccAllowVLA</name>
<state>0</state>
</option>
<option>
<name>IccCppDialect</name>
<state>1</state>
</option>
<option>
<name>IccExceptions</name>
<state>1</state>
</option>
<option>
<name>IccRTTI</name>
<state>1</state>
</option>
<option>
<name>IccStaticDestr</name>
<state>1</state>
</option>
<option>
<name>IccCppInlineSemantics</name>
<state>1</state>
</option>
<option>
<name>IccCmsis</name>
<state>1</state>
</option>
<option>
<name>IccFloatSemantics</name>
<state>0</state>
</option>
<option>
<name>CCOptimizationNoSizeConstraints</name>
<state>0</state>
</option>
<option>
<name>CCNoLiteralPool</name>
<state>0</state>
</option>
<option>
<name>CCOptStrategySlave</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>CCGuardCalls</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>AARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>9</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>AObjPrefix</name>
<state>1</state>
</option>
<option>
<name>AEndian</name>
<state>1</state>
</option>
<option>
<name>ACaseSensitivity</name>
<state>1</state>
</option>
<option>
<name>MacroChars</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>AWarnEnable</name>
<state>0</state>
</option>
<option>
<name>AWarnWhat</name>
<state>0</state>
</option>
<option>
<name>AWarnOne</name>
<state></state>
</option>
<option>
<name>AWarnRange1</name>
<state></state>
</option>
<option>
<name>AWarnRange2</name>
<state></state>
</option>
<option>
<name>ADebug</name>
<state>1</state>
</option>
<option>
<name>AltRegisterNames</name>
<state>0</state>
</option>
<option>
<name>ADefines</name>
<state>ewarm</state>
</option>
<option>
<name>AList</name>
<state>0</state>
</option>
<option>
<name>AListHeader</name>
<state>1</state>
</option>
<option>
<name>AListing</name>
<state>1</state>
</option>
<option>
<name>Includes</name>
<state>0</state>
</option>
<option>
<name>MacDefs</name>
<state>0</state>
</option>
<option>
<name>MacExps</name>
<state>1</state>
</option>
<option>
<name>MacExec</name>
<state>0</state>
</option>
<option>
<name>OnlyAssed</name>
<state>0</state>
</option>
<option>
<name>MultiLine</name>
<state>0</state>
</option>
<option>
<name>PageLengthCheck</name>
<state>0</state>
</option>
<option>
<name>PageLength</name>
<state>80</state>
</option>
<option>
<name>TabSpacing</name>
<state>8</state>
</option>
<option>
<name>AXRef</name>
<state>0</state>
</option>
<option>
<name>AXRefDefines</name>
<state>0</state>
</option>
<option>
<name>AXRefInternal</name>
<state>0</state>
</option>
<option>
<name>AXRefDual</name>
<state>0</state>
</option>
<option>
<name>AProcessor</name>
<state>1</state>
</option>
<option>
<name>AFpuProcessor</name>
<state>1</state>
</option>
<option>
<name>AOutputFile</name>
<state>$FILE_BNAME$.o</state>
</option>
<option>
<name>AMultibyteSupport</name>
<state>0</state>
</option>
<option>
<name>ALimitErrorsCheck</name>
<state>0</state>
</option>
<option>
<name>ALimitErrorsEdit</name>
<state>100</state>
</option>
<option>
<name>AIgnoreStdInclude</name>
<state>0</state>
</option>
<option>
<name>AUserIncludes</name>
<state>$PROJ_DIR$\..\..\..\..</state>
</option>
<option>
<name>AExtraOptionsCheckV2</name>
<state>0</state>
</option>
<option>
<name>AExtraOptionsV2</name>
<state></state>
</option>
<option>
<name>AsmNoLiteralPool</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>OBJCOPY</name>
<archiveVersion>0</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>OOCOutputFormat</name>
<version>2</version>
<state>2</state>
</option>
<option>
<name>OCOutputOverride</name>
<state>0</state>
</option>
<option>
<name>OOCOutputFile</name>
<state>wolfCrypt-benchmark.bin</state>
</option>
<option>
<name>OOCCommandLineProducer</name>
<state>1</state>
</option>
<option>
<name>OOCObjCopyEnable</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>CUSTOM</name>
<archiveVersion>3</archiveVersion>
<data>
<extensions></extensions>
<cmdline></cmdline>
<hasPrio>0</hasPrio>
</data>
</settings>
<settings>
<name>BICOMP</name>
<archiveVersion>0</archiveVersion>
<data/>
</settings>
<settings>
<name>BUILDACTION</name>
<archiveVersion>1</archiveVersion>
<data>
<prebuild></prebuild>
<postbuild></postbuild>
</data>
</settings>
<settings>
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>16</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>IlinkLibIOConfig</name>
<state>1</state>
</option>
<option>
<name>XLinkMisraHandler</name>
<state>0</state>
</option>
<option>
<name>IlinkInputFileSlave</name>
<state>0</state>
</option>
<option>
<name>IlinkOutputFile</name>
<state>benchmark.out</state>
</option>
<option>
<name>IlinkDebugInfoEnable</name>
<state>1</state>
</option>
<option>
<name>IlinkKeepSymbols</name>
<state></state>
</option>
<option>
<name>IlinkRawBinaryFile</name>
<state></state>
</option>
<option>
<name>IlinkRawBinarySymbol</name>
<state></state>
</option>
<option>
<name>IlinkRawBinarySegment</name>
<state></state>
</option>
<option>
<name>IlinkRawBinaryAlign</name>
<state></state>
</option>
<option>
<name>IlinkDefines</name>
<state></state>
</option>
<option>
<name>IlinkConfigDefines</name>
<state></state>
</option>
<option>
<name>IlinkMapFile</name>
<state>1</state>
</option>
<option>
<name>IlinkLogFile</name>
<state>0</state>
</option>
<option>
<name>IlinkLogInitialization</name>
<state>0</state>
</option>
<option>
<name>IlinkLogModule</name>
<state>0</state>
</option>
<option>
<name>IlinkLogSection</name>
<state>0</state>
</option>
<option>
<name>IlinkLogVeneer</name>
<state>0</state>
</option>
<option>
<name>IlinkIcfOverride</name>
<state>1</state>
</option>
<option>
<name>IlinkIcfFile</name>
<state>$PROJ_DIR$\..\common\wolfssl.icf</state>
</option>
<option>
<name>IlinkIcfFileSlave</name>
<state></state>
</option>
<option>
<name>IlinkEnableRemarks</name>
<state>0</state>
</option>
<option>
<name>IlinkSuppressDiags</name>
<state></state>
</option>
<option>
<name>IlinkTreatAsRem</name>
<state></state>
</option>
<option>
<name>IlinkTreatAsWarn</name>
<state></state>
</option>
<option>
<name>IlinkTreatAsErr</name>
<state></state>
</option>
<option>
<name>IlinkWarningsAreErrors</name>
<state>0</state>
</option>
<option>
<name>IlinkUseExtraOptions</name>
<state>0</state>
</option>
<option>
<name>IlinkExtraOptions</name>
<state></state>
</option>
<option>
<name>IlinkLowLevelInterfaceSlave</name>
<state>1</state>
</option>
<option>
<name>IlinkAutoLibEnable</name>
<state>1</state>
</option>
<option>
<name>IlinkAdditionalLibs</name>
<state></state>
</option>
<option>
<name>IlinkOverrideProgramEntryLabel</name>
<state>1</state>
</option>
<option>
<name>IlinkProgramEntryLabelSelect</name>
<state>0</state>
</option>
<option>
<name>IlinkProgramEntryLabel</name>
<state>__iar_program_start</state>
</option>
<option>
<name>DoFill</name>
<state>0</state>
</option>
<option>
<name>FillerByte</name>
<state>0xFF</state>
</option>
<option>
<name>FillerStart</name>
<state>0x0</state>
</option>
<option>
<name>FillerEnd</name>
<state>0x0</state>
</option>
<option>
<name>CrcSize</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>CrcAlign</name>
<state>1</state>
</option>
<option>
<name>CrcPoly</name>
<state>0x11021</state>
</option>
<option>
<name>CrcCompl</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CrcBitOrder</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CrcInitialValue</name>
<state>0x0</state>
</option>
<option>
<name>DoCrc</name>
<state>0</state>
</option>
<option>
<name>IlinkBE8Slave</name>
<state>1</state>
</option>
<option>
<name>IlinkBufferedTerminalOutput</name>
<state>1</state>
</option>
<option>
<name>IlinkStdoutInterfaceSlave</name>
<state>1</state>
</option>
<option>
<name>CrcFullSize</name>
<state>0</state>
</option>
<option>
<name>IlinkIElfToolPostProcess</name>
<state>0</state>
</option>
<option>
<name>IlinkLogAutoLibSelect</name>
<state>0</state>
</option>
<option>
<name>IlinkLogRedirSymbols</name>
<state>0</state>
</option>
<option>
<name>IlinkLogUnusedFragments</name>
<state>0</state>
</option>
<option>
<name>IlinkCrcReverseByteOrder</name>
<state>0</state>
</option>
<option>
<name>IlinkCrcUseAsInput</name>
<state>1</state>
</option>
<option>
<name>IlinkOptInline</name>
<state>0</state>
</option>
<option>
<name>IlinkOptExceptionsAllow</name>
<state>1</state>
</option>
<option>
<name>IlinkOptExceptionsForce</name>
<state>0</state>
</option>
<option>
<name>IlinkCmsis</name>
<state>1</state>
</option>
<option>
<name>IlinkOptMergeDuplSections</name>
<state>0</state>
</option>
<option>
<name>IlinkOptUseVfe</name>
<state>1</state>
</option>
<option>
<name>IlinkOptForceVfe</name>
<state>0</state>
</option>
<option>
<name>IlinkStackAnalysisEnable</name>
<state>0</state>
</option>
<option>
<name>IlinkStackControlFile</name>
<state></state>
</option>
<option>
<name>IlinkStackCallGraphFile</name>
<state></state>
</option>
<option>
<name>CrcAlgorithm</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>CrcUnitSize</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>IlinkThreadsSlave</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>IARCHIVE</name>
<archiveVersion>0</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>IarchiveInputs</name>
<state></state>
</option>
<option>
<name>IarchiveOverride</name>
<state>0</state>
</option>
<option>
<name>IarchiveOutput</name>
<state>###Unitialized###</state>
</option>
</data>
</settings>
<settings>
<name>BILINK</name>
<archiveVersion>0</archiveVersion>
<data/>
</settings>
</configuration>
<group>
<name>Config</name>
<file>
<name>$PROJ_DIR$\..\user_settings.h</name>
</file>
</group>
<group>
<name>Lib</name>
<file>
<name>$PROJ_DIR$\..\lib\ewarm\Exe\wolfSSL-Lib.a</name>
</file>
</group>
<group>
<name>Source</name>
<file>
<name>$PROJ_DIR$\benchmark-main.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\benchmark\benchmark.c</name>
</file>
<file>
<name>$PROJ_DIR$\current_time.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\common\minimum-startup.c</name>
</file>
</group>
</project>

View File

@@ -0,0 +1,53 @@
/* minimum-startup.c
*
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#include <stdint.h>
#pragma language=extended
extern void __iar_program_start(void);
static void Reset(void)
{
__iar_program_start();
}
static void Nmi (void){ while(1) ; }
static void Fault(void){ while(1) ; }
static unsigned long long Stack[256*4*16] @ ".noinit";
typedef union
{
void (*Handler)(void);
uint32_t Ptr;
} Vector;
__root const Vector __vector_table[100] @ ".intvec" =
{
{ .Ptr = (uint32_t)Stack + sizeof(Stack) },
// stack top
Reset, // reset
Nmi, // NMI
Fault, // hard fault
Fault, // MPU fault
Fault, // bus fault
Fault, // usage fault
};

View File

@@ -0,0 +1,11 @@
define memory mem with size = 4G;
define region FLASH = mem:[from 0x00000000 to 0x000fffff];
define region SRAM = mem:[from 0x20000000 to 0x2003ffff];
define block HEAP with alignment = 8, size = 0x00010000 { };
initialize by copy { readwrite };
do not initialize { section .noinit };
place at start of FLASH { readonly section .intvec };
place in FLASH { readonly };
place at start of SRAM { section VTABLE };
place in SRAM { readwrite, block HEAP };

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,38 @@
/* test-main.c
*
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
typedef struct func_args {
int argc;
char** argv;
int return_code;
} func_args;
func_args args = { 0 } ;
extern int wolfcrypt_test(void *args) ;
main(void) {
wolfcrypt_test(&args) ;
return 0;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,976 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<project>
<fileVersion>2</fileVersion>
<configuration>
<name>Debug</name>
<toolchain>
<name>ARM</name>
</toolchain>
<debug>1</debug>
<settings>
<name>General</name>
<archiveVersion>3</archiveVersion>
<data>
<version>22</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>ExePath</name>
<state>ewarm\Exe</state>
</option>
<option>
<name>ObjPath</name>
<state>ewarm\Obj</state>
</option>
<option>
<name>ListPath</name>
<state>ewarm\List</state>
</option>
<option>
<name>Variant</name>
<version>21</version>
<state>40</state>
</option>
<option>
<name>GEndianMode</name>
<state>0</state>
</option>
<option>
<name>Input variant</name>
<version>3</version>
<state>6</state>
</option>
<option>
<name>Input description</name>
<state>No specifier n, no float nor long long, no scan set, no assignment suppressing.</state>
</option>
<option>
<name>Output variant</name>
<version>2</version>
<state>4</state>
</option>
<option>
<name>Output description</name>
<state>No specifier a, A, without multibyte support.</state>
</option>
<option>
<name>GOutputBinary</name>
<state>0</state>
</option>
<option>
<name>FPU</name>
<version>4</version>
<state>6</state>
</option>
<option>
<name>OGCoreOrChip</name>
<state>0</state>
</option>
<option>
<name>GRuntimeLibSelect</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>GRuntimeLibSelectSlave</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>RTDescription</name>
<state>Use the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.</state>
</option>
<option>
<name>OGProductVersion</name>
<state>5.11.0.50579</state>
</option>
<option>
<name>OGLastSavedByProductVersion</name>
<state>7.40.1.8463</state>
</option>
<option>
<name>GeneralEnableMisra</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraVerbose</name>
<state>0</state>
</option>
<option>
<name>OGChipSelectEditMenu</name>
<state>Default None</state>
</option>
<option>
<name>GenLowLevelInterface</name>
<state>1</state>
</option>
<option>
<name>GEndianModeBE</name>
<state>1</state>
</option>
<option>
<name>OGBufferedTerminalOutput</name>
<state>0</state>
</option>
<option>
<name>GenStdoutInterface</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>GeneralMisraVer</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
<option>
<name>RTConfigPath2</name>
<state>$TOOLKIT_DIR$\INC\c\DLib_Config_Normal.h</state>
</option>
<option>
<name>GFPUCoreSlave</name>
<version>21</version>
<state>40</state>
</option>
<option>
<name>GBECoreSlave</name>
<version>21</version>
<state>40</state>
</option>
<option>
<name>OGUseCmsis</name>
<state>0</state>
</option>
<option>
<name>OGUseCmsisDspLib</name>
<state>0</state>
</option>
<option>
<name>GRuntimeLibThreads</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>ICCARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>31</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CCDefines</name>
<state>ewarm</state>
<state>WOLFSSL_USER_SETTINGS</state>
</option>
<option>
<name>CCPreprocFile</name>
<state>0</state>
</option>
<option>
<name>CCPreprocComments</name>
<state>0</state>
</option>
<option>
<name>CCPreprocLine</name>
<state>0</state>
</option>
<option>
<name>CCListCFile</name>
<state>0</state>
</option>
<option>
<name>CCListCMnemonics</name>
<state>0</state>
</option>
<option>
<name>CCListCMessages</name>
<state>0</state>
</option>
<option>
<name>CCListAssFile</name>
<state>0</state>
</option>
<option>
<name>CCListAssSource</name>
<state>0</state>
</option>
<option>
<name>CCEnableRemarks</name>
<state>0</state>
</option>
<option>
<name>CCDiagSuppress</name>
<state>Pa050</state>
</option>
<option>
<name>CCDiagRemark</name>
<state></state>
</option>
<option>
<name>CCDiagWarning</name>
<state></state>
</option>
<option>
<name>CCDiagError</name>
<state></state>
</option>
<option>
<name>CCObjPrefix</name>
<state>1</state>
</option>
<option>
<name>CCAllowList</name>
<version>1</version>
<state>11111110</state>
</option>
<option>
<name>CCDebugInfo</name>
<state>1</state>
</option>
<option>
<name>IEndianMode</name>
<state>1</state>
</option>
<option>
<name>IProcessor</name>
<state>1</state>
</option>
<option>
<name>IExtraOptionsCheck</name>
<state>0</state>
</option>
<option>
<name>IExtraOptions</name>
<state></state>
</option>
<option>
<name>CCLangConformance</name>
<state>0</state>
</option>
<option>
<name>CCSignedPlainChar</name>
<state>1</state>
</option>
<option>
<name>CCRequirePrototypes</name>
<state>0</state>
</option>
<option>
<name>CCMultibyteSupport</name>
<state>0</state>
</option>
<option>
<name>CCDiagWarnAreErr</name>
<state>0</state>
</option>
<option>
<name>CCCompilerRuntimeInfo</name>
<state>0</state>
</option>
<option>
<name>IFpuProcessor</name>
<state>1</state>
</option>
<option>
<name>OutputFile</name>
<state>$FILE_BNAME$.o</state>
</option>
<option>
<name>CCLibConfigHeader</name>
<state>1</state>
</option>
<option>
<name>PreInclude</name>
<state></state>
</option>
<option>
<name>CompilerMisraOverride</name>
<state>0</state>
</option>
<option>
<name>CCIncludePath2</name>
<state>$PROJ_DIR$\..\..\..\..</state>
<state>$PROJ_DIR$\..\</state>
<state>$PROJ_DIR$\..\..\..\..\..</state>
</option>
<option>
<name>CCStdIncCheck</name>
<state>0</state>
</option>
<option>
<name>CCCodeSection</name>
<state>.text</state>
</option>
<option>
<name>IInterwork2</name>
<state>0</state>
</option>
<option>
<name>IProcessorMode2</name>
<state>1</state>
</option>
<option>
<name>CCOptLevel</name>
<state>3</state>
</option>
<option>
<name>CCOptStrategy</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>CCOptLevelSlave</name>
<state>3</state>
</option>
<option>
<name>CompilerMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>CompilerMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
<option>
<name>CCPosIndRopi</name>
<state>0</state>
</option>
<option>
<name>CCPosIndRwpi</name>
<state>0</state>
</option>
<option>
<name>CCPosIndNoDynInit</name>
<state>0</state>
</option>
<option>
<name>IccLang</name>
<state>0</state>
</option>
<option>
<name>IccCDialect</name>
<state>1</state>
</option>
<option>
<name>IccAllowVLA</name>
<state>0</state>
</option>
<option>
<name>IccCppDialect</name>
<state>1</state>
</option>
<option>
<name>IccExceptions</name>
<state>1</state>
</option>
<option>
<name>IccRTTI</name>
<state>1</state>
</option>
<option>
<name>IccStaticDestr</name>
<state>1</state>
</option>
<option>
<name>IccCppInlineSemantics</name>
<state>1</state>
</option>
<option>
<name>IccCmsis</name>
<state>1</state>
</option>
<option>
<name>IccFloatSemantics</name>
<state>0</state>
</option>
<option>
<name>CCOptimizationNoSizeConstraints</name>
<state>0</state>
</option>
<option>
<name>CCNoLiteralPool</name>
<state>0</state>
</option>
<option>
<name>CCOptStrategySlave</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>CCGuardCalls</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>AARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>9</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>AObjPrefix</name>
<state>1</state>
</option>
<option>
<name>AEndian</name>
<state>1</state>
</option>
<option>
<name>ACaseSensitivity</name>
<state>1</state>
</option>
<option>
<name>MacroChars</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>AWarnEnable</name>
<state>0</state>
</option>
<option>
<name>AWarnWhat</name>
<state>0</state>
</option>
<option>
<name>AWarnOne</name>
<state></state>
</option>
<option>
<name>AWarnRange1</name>
<state></state>
</option>
<option>
<name>AWarnRange2</name>
<state></state>
</option>
<option>
<name>ADebug</name>
<state>1</state>
</option>
<option>
<name>AltRegisterNames</name>
<state>0</state>
</option>
<option>
<name>ADefines</name>
<state>ewarm</state>
</option>
<option>
<name>AList</name>
<state>0</state>
</option>
<option>
<name>AListHeader</name>
<state>1</state>
</option>
<option>
<name>AListing</name>
<state>1</state>
</option>
<option>
<name>Includes</name>
<state>0</state>
</option>
<option>
<name>MacDefs</name>
<state>0</state>
</option>
<option>
<name>MacExps</name>
<state>1</state>
</option>
<option>
<name>MacExec</name>
<state>0</state>
</option>
<option>
<name>OnlyAssed</name>
<state>0</state>
</option>
<option>
<name>MultiLine</name>
<state>0</state>
</option>
<option>
<name>PageLengthCheck</name>
<state>0</state>
</option>
<option>
<name>PageLength</name>
<state>80</state>
</option>
<option>
<name>TabSpacing</name>
<state>8</state>
</option>
<option>
<name>AXRef</name>
<state>0</state>
</option>
<option>
<name>AXRefDefines</name>
<state>0</state>
</option>
<option>
<name>AXRefInternal</name>
<state>0</state>
</option>
<option>
<name>AXRefDual</name>
<state>0</state>
</option>
<option>
<name>AProcessor</name>
<state>1</state>
</option>
<option>
<name>AFpuProcessor</name>
<state>1</state>
</option>
<option>
<name>AOutputFile</name>
<state>$FILE_BNAME$.o</state>
</option>
<option>
<name>AMultibyteSupport</name>
<state>0</state>
</option>
<option>
<name>ALimitErrorsCheck</name>
<state>0</state>
</option>
<option>
<name>ALimitErrorsEdit</name>
<state>100</state>
</option>
<option>
<name>AIgnoreStdInclude</name>
<state>0</state>
</option>
<option>
<name>AUserIncludes</name>
<state>$PROJ_DIR$\..\..\..\..</state>
</option>
<option>
<name>AExtraOptionsCheckV2</name>
<state>0</state>
</option>
<option>
<name>AExtraOptionsV2</name>
<state></state>
</option>
<option>
<name>AsmNoLiteralPool</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>OBJCOPY</name>
<archiveVersion>0</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>OOCOutputFormat</name>
<version>2</version>
<state>2</state>
</option>
<option>
<name>OCOutputOverride</name>
<state>0</state>
</option>
<option>
<name>OOCOutputFile</name>
<state>wolfCrypt-test.bin</state>
</option>
<option>
<name>OOCCommandLineProducer</name>
<state>1</state>
</option>
<option>
<name>OOCObjCopyEnable</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>CUSTOM</name>
<archiveVersion>3</archiveVersion>
<data>
<extensions></extensions>
<cmdline></cmdline>
<hasPrio>0</hasPrio>
</data>
</settings>
<settings>
<name>BICOMP</name>
<archiveVersion>0</archiveVersion>
<data/>
</settings>
<settings>
<name>BUILDACTION</name>
<archiveVersion>1</archiveVersion>
<data>
<prebuild></prebuild>
<postbuild></postbuild>
</data>
</settings>
<settings>
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>16</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>IlinkLibIOConfig</name>
<state>1</state>
</option>
<option>
<name>XLinkMisraHandler</name>
<state>0</state>
</option>
<option>
<name>IlinkInputFileSlave</name>
<state>0</state>
</option>
<option>
<name>IlinkOutputFile</name>
<state>test.out</state>
</option>
<option>
<name>IlinkDebugInfoEnable</name>
<state>1</state>
</option>
<option>
<name>IlinkKeepSymbols</name>
<state></state>
</option>
<option>
<name>IlinkRawBinaryFile</name>
<state></state>
</option>
<option>
<name>IlinkRawBinarySymbol</name>
<state></state>
</option>
<option>
<name>IlinkRawBinarySegment</name>
<state></state>
</option>
<option>
<name>IlinkRawBinaryAlign</name>
<state></state>
</option>
<option>
<name>IlinkDefines</name>
<state></state>
</option>
<option>
<name>IlinkConfigDefines</name>
<state></state>
</option>
<option>
<name>IlinkMapFile</name>
<state>1</state>
</option>
<option>
<name>IlinkLogFile</name>
<state>0</state>
</option>
<option>
<name>IlinkLogInitialization</name>
<state>0</state>
</option>
<option>
<name>IlinkLogModule</name>
<state>0</state>
</option>
<option>
<name>IlinkLogSection</name>
<state>0</state>
</option>
<option>
<name>IlinkLogVeneer</name>
<state>0</state>
</option>
<option>
<name>IlinkIcfOverride</name>
<state>1</state>
</option>
<option>
<name>IlinkIcfFile</name>
<state>$PROJ_DIR$\..\common\wolfssl.icf</state>
</option>
<option>
<name>IlinkIcfFileSlave</name>
<state></state>
</option>
<option>
<name>IlinkEnableRemarks</name>
<state>0</state>
</option>
<option>
<name>IlinkSuppressDiags</name>
<state></state>
</option>
<option>
<name>IlinkTreatAsRem</name>
<state></state>
</option>
<option>
<name>IlinkTreatAsWarn</name>
<state></state>
</option>
<option>
<name>IlinkTreatAsErr</name>
<state></state>
</option>
<option>
<name>IlinkWarningsAreErrors</name>
<state>0</state>
</option>
<option>
<name>IlinkUseExtraOptions</name>
<state>0</state>
</option>
<option>
<name>IlinkExtraOptions</name>
<state></state>
</option>
<option>
<name>IlinkLowLevelInterfaceSlave</name>
<state>1</state>
</option>
<option>
<name>IlinkAutoLibEnable</name>
<state>1</state>
</option>
<option>
<name>IlinkAdditionalLibs</name>
<state></state>
</option>
<option>
<name>IlinkOverrideProgramEntryLabel</name>
<state>1</state>
</option>
<option>
<name>IlinkProgramEntryLabelSelect</name>
<state>0</state>
</option>
<option>
<name>IlinkProgramEntryLabel</name>
<state>__iar_program_start</state>
</option>
<option>
<name>DoFill</name>
<state>0</state>
</option>
<option>
<name>FillerByte</name>
<state>0xFF</state>
</option>
<option>
<name>FillerStart</name>
<state>0x0</state>
</option>
<option>
<name>FillerEnd</name>
<state>0x0</state>
</option>
<option>
<name>CrcSize</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>CrcAlign</name>
<state>1</state>
</option>
<option>
<name>CrcPoly</name>
<state>0x11021</state>
</option>
<option>
<name>CrcCompl</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CrcBitOrder</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>CrcInitialValue</name>
<state>0x0</state>
</option>
<option>
<name>DoCrc</name>
<state>0</state>
</option>
<option>
<name>IlinkBE8Slave</name>
<state>1</state>
</option>
<option>
<name>IlinkBufferedTerminalOutput</name>
<state>1</state>
</option>
<option>
<name>IlinkStdoutInterfaceSlave</name>
<state>1</state>
</option>
<option>
<name>CrcFullSize</name>
<state>0</state>
</option>
<option>
<name>IlinkIElfToolPostProcess</name>
<state>0</state>
</option>
<option>
<name>IlinkLogAutoLibSelect</name>
<state>0</state>
</option>
<option>
<name>IlinkLogRedirSymbols</name>
<state>0</state>
</option>
<option>
<name>IlinkLogUnusedFragments</name>
<state>0</state>
</option>
<option>
<name>IlinkCrcReverseByteOrder</name>
<state>0</state>
</option>
<option>
<name>IlinkCrcUseAsInput</name>
<state>1</state>
</option>
<option>
<name>IlinkOptInline</name>
<state>0</state>
</option>
<option>
<name>IlinkOptExceptionsAllow</name>
<state>1</state>
</option>
<option>
<name>IlinkOptExceptionsForce</name>
<state>0</state>
</option>
<option>
<name>IlinkCmsis</name>
<state>1</state>
</option>
<option>
<name>IlinkOptMergeDuplSections</name>
<state>0</state>
</option>
<option>
<name>IlinkOptUseVfe</name>
<state>1</state>
</option>
<option>
<name>IlinkOptForceVfe</name>
<state>0</state>
</option>
<option>
<name>IlinkStackAnalysisEnable</name>
<state>0</state>
</option>
<option>
<name>IlinkStackControlFile</name>
<state></state>
</option>
<option>
<name>IlinkStackCallGraphFile</name>
<state></state>
</option>
<option>
<name>CrcAlgorithm</name>
<version>0</version>
<state>1</state>
</option>
<option>
<name>CrcUnitSize</name>
<version>0</version>
<state>0</state>
</option>
<option>
<name>IlinkThreadsSlave</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>IARCHIVE</name>
<archiveVersion>0</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>IarchiveInputs</name>
<state></state>
</option>
<option>
<name>IarchiveOverride</name>
<state>0</state>
</option>
<option>
<name>IarchiveOutput</name>
<state>###Unitialized###</state>
</option>
</data>
</settings>
<settings>
<name>BILINK</name>
<archiveVersion>0</archiveVersion>
<data/>
</settings>
</configuration>
<group>
<name>Config</name>
<file>
<name>$PROJ_DIR$\..\user_settings.h</name>
</file>
</group>
<group>
<name>Lib</name>
<file>
<name>$PROJ_DIR$\..\lib\ewarm\Exe\wolfSSL-Lib.a</name>
</file>
</group>
<group>
<name>Source</name>
<file>
<name>$PROJ_DIR$\..\common\minimum-startup.c</name>
</file>
<file>
<name>$PROJ_DIR$\test-main.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\wolfcrypt\test\test.c</name>
</file>
</group>
</project>

View File

@@ -0,0 +1,32 @@
#define NO_MAIN_DRIVER
#define BENCH_EMBEDDED
#define NO_WRITEV
#define WOLFSSL_USER_IO
#define NO_DEV_RANDOM
#define USE_CERT_BUFFERS_2048
#define WOLFSSL_USER_CURRTIME
#define SIZEOF_LONG_LONG 8
#define NO_WOLFSSL_DIR
#define WOLFSSL_NO_CURRDIR
#define XVALIDATEDATE(d, f,t) (0)
#define WOLFSSL_USER_CURRTIME /* for benchmark */
#define WOLFSSL_GENSEED_FORTEST /* Wardning: define your own seed gen */
#define TFM_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
#define WC_RSA_BLINDING
#define SINGLE_THREADED /* or define RTOS option */
/* #define WOLFSSL_CMSIS_RTOS */
#define NO_FILESYSTEM
/* #define NO_DH */
#define HAVE_AESGCM
#define WOLFSSL_SHA512
#define HAVE_ECC
#define HAVE_CURVE25519
#define CURVE25519_SMALL
#define HAVE_ED25519

View File

@@ -0,0 +1,224 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<workspace>
<project>
<path>$WS_DIR$\benchmark\wolfCrypt-benchmark.ewp</path>
</project>
<project>
<path>$WS_DIR$\test\wolfCrypt-test.ewp</path>
</project>
<project>
<path>$WS_DIR$\lib\wolfSSL-Lib.ewp</path>
</project>
<batchBuild>
<batchDefinition>
<name>All Examples</name>
<member>
<project>driverlib</project>
<configuration>Debug</configuration>
</member>
<member>
<project>grlib</project>
<configuration>Debug</configuration>
</member>
<member>
<project>usblib</project>
<configuration>Debug</configuration>
</member>
<member>
<project>aes128_cbc_decrypt</project>
<configuration>Debug</configuration>
</member>
<member>
<project>aes128_cbc_encrypt</project>
<configuration>Debug</configuration>
</member>
<member>
<project>aes128_ccm_decrypt</project>
<configuration>Debug</configuration>
</member>
<member>
<project>aes128_ccm_encrypt</project>
<configuration>Debug</configuration>
</member>
<member>
<project>aes128_cmac</project>
<configuration>Debug</configuration>
</member>
<member>
<project>aes128_ecb_decrypt</project>
<configuration>Debug</configuration>
</member>
<member>
<project>aes128_ecb_encrypt</project>
<configuration>Debug</configuration>
</member>
<member>
<project>aes128_gcm_decrypt</project>
<configuration>Debug</configuration>
</member>
<member>
<project>aes128_gcm_encrypt</project>
<configuration>Debug</configuration>
</member>
<member>
<project>bitband</project>
<configuration>Debug</configuration>
</member>
<member>
<project>blinky</project>
<configuration>Debug</configuration>
</member>
<member>
<project>boot_demo_uart</project>
<configuration>Debug</configuration>
</member>
<member>
<project>boot_demo_usb</project>
<configuration>Debug</configuration>
</member>
<member>
<project>calibrate</project>
<configuration>Debug</configuration>
</member>
<member>
<project>crc32</project>
<configuration>Debug</configuration>
</member>
<member>
<project>enet_io</project>
<configuration>Debug</configuration>
</member>
<member>
<project>enet_lwip</project>
<configuration>Debug</configuration>
</member>
<member>
<project>enet_uip</project>
<configuration>Debug</configuration>
</member>
<member>
<project>fontview</project>
<configuration>Debug</configuration>
</member>
<member>
<project>gpio_jtag</project>
<configuration>Debug</configuration>
</member>
<member>
<project>grlib_demo</project>
<configuration>Debug</configuration>
</member>
<member>
<project>hello</project>
<configuration>Debug</configuration>
</member>
<member>
<project>hello_widget</project>
<configuration>Debug</configuration>
</member>
<member>
<project>hibernate</project>
<configuration>Debug</configuration>
</member>
<member>
<project>interrupts</project>
<configuration>Debug</configuration>
</member>
<member>
<project>lang_demo</project>
<configuration>Debug</configuration>
</member>
<member>
<project>mpu_fault</project>
<configuration>Debug</configuration>
</member>
<member>
<project>qs_weather</project>
<configuration>Debug</configuration>
</member>
<member>
<project>scribble</project>
<configuration>Debug</configuration>
</member>
<member>
<project>sd_card</project>
<configuration>Debug</configuration>
</member>
<member>
<project>sha1_hash</project>
<configuration>Debug</configuration>
</member>
<member>
<project>sha1_hmac</project>
<configuration>Debug</configuration>
</member>
<member>
<project>synth</project>
<configuration>Debug</configuration>
</member>
<member>
<project>tamper</project>
<configuration>Debug</configuration>
</member>
<member>
<project>tdes_cbc_decrypt</project>
<configuration>Debug</configuration>
</member>
<member>
<project>tdes_cbc_encrypt</project>
<configuration>Debug</configuration>
</member>
<member>
<project>timers</project>
<configuration>Debug</configuration>
</member>
<member>
<project>uart_echo</project>
<configuration>Debug</configuration>
</member>
<member>
<project>udma_demo</project>
<configuration>Debug</configuration>
</member>
<member>
<project>usb_dev_bulk</project>
<configuration>Debug</configuration>
</member>
<member>
<project>usb_dev_keyboard</project>
<configuration>Debug</configuration>
</member>
<member>
<project>usb_dev_msc</project>
<configuration>Debug</configuration>
</member>
<member>
<project>usb_host_hub</project>
<configuration>Debug</configuration>
</member>
<member>
<project>usb_host_msc</project>
<configuration>Debug</configuration>
</member>
<member>
<project>usb_otg_mouse</project>
<configuration>Debug</configuration>
</member>
<member>
<project>usb_stick_demo</project>
<configuration>Debug</configuration>
</member>
<member>
<project>usb_stick_update</project>
<configuration>Debug</configuration>
</member>
<member>
<project>watchdog</project>
<configuration>Debug</configuration>
</member>
</batchDefinition>
</batchBuild>
</workspace>

54
IDE/IAR-EWARM/README Normal file
View File

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

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.

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

@@ -0,0 +1,32 @@
# Static Library: Building libwolfssl.sgx.static.lib.a for use with SGX Enclaves
### Requirements:
This code was created to use Intel's SGX hardware. It is expected that the user has gone through the steps of both turning on the hardware in bios if needed and has installed the necesary software from Intel to make use of the hardware. (https://software.intel.com/en-us/sgx) If these steps have not been done then it is expected that the user is familure with simulation software being used in place of hardware.
### Overview and Build:
This project creates a static library to then link with Enclaves. A simple example of an Enclave linking to the created wolfSSL library can be found in wolfssl-examples on github. This project has been tested with gcc 5.4.0 on Ubuntu 16.04.
To create the static library, simply call make:
`make -f sgx_t_static.mk all`
To clean the static library and compiled objects use the provided clean script:
`clean.sh`
This will create a local static library, libwolfssl.sgx.static.lib.a, that can be linked with SGX enclaves to access wolfSSL APIs using SGX hardware.
### Customization:
To enable wolfssl debug, add CFLAGS=-DDEBUG_WOLFSSL.
To enable wolfssl benchmark tests with enclave, specify: HAVE_WOLFSSL_BENCHMARK at build
To enable wolfcrypt testsuite with enclave, specify: HAVE_WOLFSSL_TEST at build
For example, to enable all three:
`make -f sgx_t_static.mk CFLAGS=-DDEBUG_WOLFSSL HAVE_WOLFSSL_BENCHMARK=1 HAVE_WOLFSSL_TEST=1`
NOTE: This more customized step has been provided for easier execution in the
script `build.sh`
### Limitations:
Single Threaded (multiple threaded applications have not been tested)
AES-NI use with SGX has not been added in yet

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

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

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

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

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

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

View File

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

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

@@ -0,0 +1,167 @@
/* time.c
*
* Copyright (C) 2006-2017 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/*-----------------------------------------------------------------------------
* initialize RTC
*----------------------------------------------------------------------------*/
#include <stdio.h>
#include "lpc43xx_rtc.h"
#include "lpc43xx_cgu.h"
static void init_RTC()
{
/* Enable GPIO register interface clock */
LPC_CCU1->CLK_M4_GPIO_CFG |= 1;
while (!(LPC_CCU1->CLK_M4_GPIO_STAT & 1)) ;
/* RTC Block section ------------------------------------------------------ */
/* Init RTC module */
RTC_Init(LPC_RTC);
/* Set ALARM time for second */
RTC_SetAlarmTime (LPC_RTC, RTC_TIMETYPE_SECOND, 30);
/* Set the AMR for 30s match alarm interrupt */
RTC_AlarmIntConfig (LPC_RTC, RTC_TIMETYPE_SECOND, ENABLE);
/* Set the CIIR for minute counter interrupt*/
RTC_CntIncrIntConfig (LPC_RTC, RTC_TIMETYPE_MINUTE, ENABLE);
/* Enable rtc (starts increase the tick counter and second counter register) */
RTC_Cmd(LPC_RTC, ENABLE);
}
/*-----------------------------------------------------------------------------
* initialize TIM
*----------------------------------------------------------------------------*/
#include "lpc43xx_timer.h"
static void init_TIM()
{
TIM_TIMERCFG_Type TIM_ConfigStruct;
/* Initialize timer 0, prescale count time of 1uS */
TIM_ConfigStruct.PrescaleOption = TIM_PRESCALE_TICKVAL;
TIM_ConfigStruct.PrescaleValue = 204; /* 204MHz */
/* Set configuration for Tim_config and Tim_MatchConfig */
TIM_Init(LPC_TIMER2, TIM_TIMER_MODE,&TIM_ConfigStruct);
TIM_ResetCounter(LPC_TIMER2);
/* To start timer 2 */
TIM_Cmd(LPC_TIMER2,ENABLE);
}
double current_time()
{
return (double)LPC_TIMER2->TC/1000000.0;
}
void init_time(void) {
init_RTC() ;
init_TIM() ;
}
#include <time.h>
struct tm *Cyassl_MDK_gmtime(const time_t *c)
{
static struct tm date ;
RTC_TIME_Type RTCFullTime;
RTC_GetFullTime (LPC_RTC, &RTCFullTime);
date.tm_year = RTCFullTime.YEAR + 100 ;
date.tm_mon = RTCFullTime.MONTH - 1 ;
date.tm_mday = RTCFullTime.DOM ;
date.tm_hour = RTCFullTime.HOUR ;
date.tm_min = RTCFullTime.MIN ;
date.tm_sec = RTCFullTime.SEC ;
#if defined(DEBUG_CYASSL)
{
extern void CYASSL_MSG(char *msg) ;
char msg[100] ;
sprintf(msg, "Debug::Cyassl_KEIL_gmtime(DATE=/%4d/%02d/%02d TIME=%02d:%02d:%02d)\n",
RTCFullTime.YEAR+2000, RTCFullTime.MONTH, RTCFullTime.DOM,
RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ;
CYASSL_MSG(msg) ;
}
#endif
return(&date) ;
}
typedef struct func_args {
int argc;
char** argv;
int return_code;
} func_args;
#include <stdio.h>
void time_main(void *args)
{
char * datetime ;
int year ;
RTC_TIME_Type RTCFullTime;
if( args == NULL || ((func_args *)args)->argc == 1) {
RTC_GetFullTime (LPC_RTC, &RTCFullTime);
printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n",
RTCFullTime.MONTH, RTCFullTime.DOM, RTCFullTime.YEAR+2000,
RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ;
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-' &&
((func_args *)args)->argv[1][1] == 'd' ) {
datetime = ((func_args *)args)->argv[2];
sscanf(datetime, "%d/%d/%d",
(int *)&RTCFullTime.MONTH, (int *)&RTCFullTime.DOM, &year) ;
RTCFullTime.YEAR = year - 2000 ;
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_MONTH, RTCFullTime.MONTH);
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_YEAR, RTCFullTime.YEAR);
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_DAYOFMONTH, RTCFullTime.DOM);
} else if(((func_args *)args)->argc == 3 &&
((func_args *)args)->argv[1][0] == '-' &&
((func_args *)args)->argv[1][1] == 't' ) {
RTC_GetFullTime (LPC_RTC, &RTCFullTime);
datetime = ((func_args *)args)->argv[2];
sscanf(datetime, "%d:%d:%d",
(int *)&RTCFullTime.HOUR,
(int *)&RTCFullTime.MIN,
(int *)&RTCFullTime.SEC
) ;
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_SECOND, RTCFullTime.SEC);
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_MINUTE, RTCFullTime.MIN);
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_HOUR, RTCFullTime.HOUR);
} else printf("Invalid argument\n") ;
}

View File

@@ -0,0 +1,263 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <rt_sys.h>
#include <File_Config.h>
#pragma import(__use_no_semihosting_swi)
/* The following macro definitions may be used to translate this file:
STDIO - use standard Input/Output device
(default is NOT used)
*/
/* Standard IO device handles. */
#define STDIN 0x8001
#define STDOUT 0x8002
#define STDERR 0x8003
/* Standard IO device name defines. */
const char __stdin_name[] = "STDIN";
const char __stdout_name[] = "STDOUT";
const char __stderr_name[] = "STDERR";
struct __FILE { int handle; /* Add whatever you need here */ };
#ifdef STDIO
extern int SER_GetChar (void);
extern int SER_PutChar (int ch);
/*-----------------------------------------------------------------------------
Write character to the Serial Port
*----------------------------------------------------------------------------*/
int sendchar (int c)
{
if (c == '\n') {
SER_PutChar ('\r');
}
SER_PutChar (c);
return (c);
}
/*-----------------------------------------------------------------------------
Read character from the Serial Port
*----------------------------------------------------------------------------*/
int getkey (void)
{
int ch = SER_GetChar();
#if defined (HAVE_KEIL_RTX)
os_itv_wait ();
#endif
if (ch < 0) {
return 0;
}
return ch;
}
#endif
/*--------------------------- _ttywrch ---------------------------------------*/
void _ttywrch (int ch)
{
#ifdef STDIO
sendchar (ch);
#endif
}
/*--------------------------- _sys_open --------------------------------------*/
#ifndef NO_FILESYSTEM
static int KEIL_FS_open(const char *name, int openmode)
{
int i ; int ret ;
#define PATHSIZE 100
char path[PATHSIZE] ; char *p ;
if(strlen(name) > PATHSIZE)return(-1) ;
for(i = 0; i<= strlen(name); i++) {
if(name[i] == '/')path[i] = '\\' ;
else path[i] = name[i] ;
}
if(path[0] == '.' && path[1] == '\\') p = path + 2 ;
else p = path ;
ret = __sys_open (p, openmode) ;
return(ret) ;
}
#endif
FILEHANDLE _sys_open (const char *name, int openmode)
{
/* Register standard Input Output devices. */
if (strcmp(name, "STDIN") == 0) {
return (STDIN);
}
if (strcmp(name, "STDOUT") == 0) {
return (STDOUT);
}
if (strcmp(name, "STDERR") == 0) {
return (STDERR);
}
#ifndef NO_FILESYSTEM
return (KEIL_FS_open(name, openmode));
#else
return(0) ;
#endif
}
/*--------------------------- _sys_close -------------------------------------*/
int _sys_close (FILEHANDLE fh)
{
if (fh > 0x8000) {
return (0);
}
#ifndef NO_FILESYSTEM
return (__sys_close (fh));
#else
return(0) ;
#endif
}
/*--------------------------- _sys_write -------------------------------------*/
int _sys_write (FILEHANDLE fh, const U8 *buf, U32 len, int mode)
{
#ifdef STDIO
if (fh == STDOUT) {
/* Standard Output device. */
for ( ; len; len--) {
sendchar (*buf++);
}
return (0);
}
#endif
if (fh > 0x8000) {
return (-1);
}
#ifndef NO_FILESYSTEM
return (__sys_write (fh, buf, len));
#else
return(0) ;
#endif
}
/*--------------------------- _sys_read --------------------------------------*/
int _sys_read (FILEHANDLE fh, U8 *buf, U32 len, int mode)
{
#ifdef STDIO
if (fh == STDIN) {
/* Standard Input device. */
int sz ;
while((buf[0] = getkey()) == 0) ;
;
for (sz = 0 ; sz <= len ; sz ++ ) {
if(buf[sz] == 0) break ;
else sz++ ;
buf[sz] = getkey ();
}
return (sz);
}
#endif
if (fh > 0x8000) {
return (-1);
}
#ifndef NO_FILESYSTEM
return (__sys_read (fh, buf, len));
#else
return(0) ;
#endif
}
/*--------------------------- _sys_istty -------------------------------------*/
int _sys_istty (FILEHANDLE fh)
{
if (fh > 0x8000) {
return (1);
}
return (0);
}
/*--------------------------- _sys_seek --------------------------------------*/
int _sys_seek (FILEHANDLE fh, long pos)
{
if (fh > 0x8000) {
return (-1);
}
#ifndef NO_FILESYSTEM
return (__sys_seek (fh, pos));
#else
return(0) ;
#endif
}
/*--------------------------- _sys_ensure ------------------------------------*/
int _sys_ensure (FILEHANDLE fh)
{
if (fh > 0x8000) {
return (-1);
}
#ifndef NO_FILESYSTEM
return (__sys_ensure (fh));
#else
return(0) ;
#endif
}
/*--------------------------- _sys_flen --------------------------------------*/
long _sys_flen (FILEHANDLE fh)
{
if (fh > 0x8000) {
return (0);
}
#ifndef NO_FILESYSTEM
return (__sys_flen (fh));
#else
return(0) ;
#endif
}
/*--------------------------- _sys_tmpnam ------------------------------------*/
int _sys_tmpnam (char *name, int sig, unsigned maxlen)
{
return (1);
}
/*--------------------------- _sys_command_string ----------------------------*/
char *_sys_command_string (char *cmd, int len)
{
return (cmd);
}
/*--------------------------- _sys_exit --------------------------------------*/
void _sys_exit (int return_code)
{
#ifdef WOLFSSL_MDK_SHELL
return ;
#else
/* Endless loop. */
while (1);
#endif
}

View File

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

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