Commit Graph

2281 Commits

Author SHA1 Message Date
dgarske
2c4844d5ef Merge pull request #1146 from ejohnstown/compat
OpenSSL Compatibility Additions and Fixes
2017-09-22 14:19:28 -07:00
Jacob Barthelmeh
80333979a9 fix for wolfSSL_X509_NAME_get_text_by_NID 2017-09-20 17:31:53 -06:00
Jacob Barthelmeh
3763b88397 rename the file io.h to wolfio.h 2017-09-20 10:53:11 -06: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
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
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
932773735b Cleanup the wolfIO_Send function. 2017-09-11 05:48:41 -07:00
Jacob Barthelmeh
f7ea118dd7 downgrade with options set when using opensslextra feature 2017-09-01 13:47:56 -06:00
Jacob Barthelmeh
8807b8af4f additional sanity checks 2017-08-31 16:00:08 -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
Jacob Barthelmeh
3dbe5d2af9 fixes for Windows build 2017-08-29 12:02:24 -06:00
Jacob Barthelmeh
a8417c1078 using memory bio with no filesystem and adjustment for Windows line ending 2017-08-25 15:11:10 -06:00
Jacob Barthelmeh
7918b31cae cast to fix warning on Windows with Visual Studio 2017-08-24 15:22:32 -06:00
Jacob Barthelmeh
4b630b67fa fix advancing memory WOLFSSL_BIO when reading 2017-08-23 11:37:19 -06:00
Takashi Kojo
7892714516 bring up settings.h before #ifdef WOLFSSL_TLS13 2017-08-22 20:13:17 +09:00
David Garske
2b7f4b0903 Adds async blocking support for sniffer tool. 2017-08-21 11:07:13 -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
Jacob Barthelmeh
c6e722170e fix check on ephemeral key type before free'ing 2017-08-18 10:55:38 -06: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
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
toddouska
53e05786da Merge pull request #1101 from dgarske/fix_bench_async
Fixes for async multi-threading
2017-08-16 10:15:55 -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
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
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
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
toddouska
e77e93ef2e Merge pull request #1065 from JacobBarthelmeh/Testing
update DTLS export session version and tests
2017-08-02 11:40:38 -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
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
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
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
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
JacobBarthelmeh
dc7acc0400 Merge pull request #1059 from dgarske/fix_leaks
Fix for PKCS12 dynamic type names
2017-07-26 11:52:42 -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