Commit Graph

638 Commits

Author SHA1 Message Date
Jacob Barthelmeh 23b271da84 clean up after rebase 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 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 150481699f add BIO_new_file: ssl.c, tests/api.c 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 79ea6b78bb add name entry and fix build without RSA 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 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 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 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
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
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 7da0f50457 tests for added DES functions and fix check on DES key 2018-01-10 09:26:58 -07:00
Jacob Barthelmeh 2b75d0faf3 asn1 string compatibility 2018-01-10 09:26:58 -07:00
Jacob Barthelmeh 0bfa399b6c fix check key pair match with ECC 2018-01-09 16:13:46 -07:00
Chris Conlon e42fea8710 add unit tests for DSA raw key and param import/export functions 2018-01-08 13:36:06 -07:00
Jacob Barthelmeh b22ae9de4c add DH callback to example server and client 2018-01-05 11:56:59 -07:00
Jacob Barthelmeh 915f628bc7 add DH Agree callback 2018-01-03 16:47:15 -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
jrblixt 8a51df9fd8 Spacing issue per Chris. 2017-12-29 09:48:35 -07: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
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
Chris Conlon 2660ff0b93
Merge pull request #1251 from kojo1/openSSL-Compat-201711
openSSL compatibility 201711
2017-12-21 16:25:46 -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
jrblixt 98603d9e74 Sha3 unit test functions.
Code review changes per Chris.
2017-12-20 10:49:24 -07:00
Go Hosohara bfed9f28d3 Modification for compliling application with libsignal-protocol-c. 2017-12-19 13:19:05 +09: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 bbd27b491e Fix for building with --enable-32bit where test assumes time_t is long. 2017-12-18 11:04:40 -08:00
Takashi Kojo 98235f9e36 fix hard tabs 2017-11-30 09:08:59 +09:00
Takashi Kojo b664a1187b fix hard tabs, new line 2017-11-29 07:03:00 +09:00
Takashi Kojo 64caf325f8 add ctx == NULL checks, fix spacing 2017-11-28 10:16:24 +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 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 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
Takashi Kojo dace30cfac Missing X509_STORE_CTX_free(ctx); 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 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 d967129581 add BN_mod_mul 2017-11-24 05:38:24 +09: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
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
Moisés Guimarães a23b65751d enables wolfSSL_SNI_GetRequest() at client side. 2017-11-13 13:58:14 -02: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 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
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 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
Go Hosohara 9c9978ce9f OpenSSL Compatibility functions on PR#942. 2017-11-01 13:00:47 +09: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
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
Jacob Barthelmeh 016f7357d2 increase test buffer size to account for edge case 2017-10-26 16:19:56 -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
David Garske 911b6f95f8 Release v3.12.2 (lib 14.0.0). Updated copywright. 2017-10-22 15:58:35 -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 c9558ee27b Updated a few more old names. Added PR for new configs to Jenkins. 2017-10-18 10:38:27 -07:00
Sean Parkinson f724206e37 Add test for 3072-bit RSA and DH and fix modexp 2017-10-17 08:36:39 +10: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
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
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
Jacob Barthelmeh 8cd0b7dfc7 fix for wolfSSL_ASN1_TIME_print function 2017-09-28 15:30:46 -06: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 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
kaleb-himes 5777b92745 Improved solution 2017-09-20 11:25:51 -06:00
kaleb-himes 60dca94821 Update HASH_DRBG Reseed mechanism and add test case 2017-09-20 10:36:36 -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
David Garske a5eaecaa0e Fix unit API test call to `wolfSSL_CertManagerLoadCA` when building without file system. 2017-09-11 06:51:27 -07:00
Jacob Barthelmeh 61ff3e136a fix memory management in unit test with --disable-fastmath 2017-08-28 16:23:44 -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
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
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 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
jrblixt dd5430d188 Code review changes, Chris. 2017-08-14 16:09:35 -06:00
jrblixt 3c1140d90e Re-order hash functions in unit test. 2017-08-09 15:23:01 -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 af0514704f place macro guard on test of RSA-OAEP with SHA1 dependency 2017-08-01 11:46:49 -06:00
Jacob Barthelmeh e1ccc5acad update DTLS export session version and tests 2017-07-28 14:27:24 -06:00
jrblixt 3560eed52b Add Dsa unit test functions. 2017-07-26 09:01:36 -06:00
dgarske 41e2b236aa Merge pull request #1051 from kaleb-himes/fsanitize-fixes
Fsanitize fixes
2017-07-25 20:57:43 -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
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
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
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
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
jrblixt 5c19b7bfe0 Changes per Chris. 2017-07-19 11:24:56 -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
jrblixt e68f1b2cec api.c fix. 2017-07-18 11:02:19 -06: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 ba48221c41 adjust size of test buffer 2017-07-13 13:21:09 -06: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
jrblixt ced45ced41 Changes requested by Chris. 2017-07-06 13:42:54 -06: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 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
David Garske 47cc3ffdbc Fix build with either `NO_WOLFSSL_SERVER` or `NO_WOLFSSL_CLIENT` defined. 2017-06-26 23:05:32 -07:00
jrblixt a3b21f0394 Aes unit test functions. 2017-06-26 15:16:51 -06:00
Jacob Barthelmeh b0f87fdcf7 update .am files for make dist 2017-06-22 14:14:45 -06:00
dgarske 06fa3de31c Merge pull request #980 from SparkiDev/tls13_0rtt
TLS v1.3 0-RTT
2017-06-22 09:44:41 -07:00
jrblixt 1aee054902 Add Arc4 to unit test. 2017-06-21 17:03:27 -06: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 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
jrblixt c14e2d5888 Add Rabbit unit test functions. 2017-06-20 15:16:12 -06:00
Jacob Barthelmeh c118146803 set return code to TEST_SUCCESS on successful connection 2017-06-19 09:26:16 -06:00
jrblixt 6a2824f199 Add Camellia unit test functions.. 2017-06-16 16:27:03 -06:00
jrblixt 43d6b7a145 Add ChaCha unit test functions. 2017-06-16 13:00:17 -06:00
jrblixt d5a43af751 Code review changes. Reviewer: Chris. 2017-06-15 11:12:01 -06:00
jrblixt 25ce52cd0c Add IDEA unit test functions. 2017-06-14 23:43:00 -06:00
toddouska 55d421d8b6 Merge pull request #964 from SparkiDev/ecc_priv_only
Ecc priv only
2017-06-14 16:42:24 -07:00
Sean Parkinson 13c4fe6cc4 Add test 2017-06-14 09:44:26 +10:00
jrblixt 0ef1129f18 Changes WRT small stack. 2017-06-13 13:44:06 -06:00
Sean Parkinson 613d30bcae ED25519 TLS support 2017-06-08 09:26:49 +10:00
Sean Parkinson 5d5ff56336 External PSK working in TLS13 2017-06-07 17:20:22 +10:00
Sean Parkinson 6b34a94589 Fix NO_DH build issue 2017-06-01 11:56:53 +10:00
jrblixt e345471b21 Logical error fix. 2017-05-26 13:27:27 -06:00
jrblixt 1c0006882a Remove AssertIntEq from within function. 2017-05-26 09:44:12 -06:00
jrblixt edddd05226 Changes per Chris. 2017-05-24 11:50:18 -06:00
jrblixt b47fca5760 Patched and Clean up for PR. 2017-05-24 11:50:13 -06:00
jrblixt fc5a37ac02 Changes per Chris. 2017-05-23 10:01:31 -06:00
David Garske 4edcbc79c1 RipeMd and Sha224 added to unit test. 2017-05-18 09:32:11 -06: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
toddouska f922d3f2d6 Merge pull request #624 from SparkiDev/sha224
SHA224 implementation added
2016-11-15 13:53:34 -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 f06a392764 COMPAT. LAYER : DES set key and malloc/free 2016-11-07 13:21:05 -07:00
Jacob Barthelmeh b686deecbe PKCS12 : Add PKCS12 parsing 2016-10-29 13:12:26 -06: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 88fab67804 add extended master unit tests 2016-09-01 15:15:17 -06: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
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
toddouska 78ca9e7716 Merge pull request #482 from dgarske/async
Asynchronous wolfCrypt RSA and TLS client support
2016-08-25 10:06:18 -07:00
John Blixt a9935cbc28 Made changes found by Jenkins. 2016-08-19 10:23:55 -06: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
John Blixt b068eec96d added wolfSSL_CTX_SetMinVersion 2016-08-17 14:41:37 -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 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
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 ac6635593b Revert "Bio" 2016-06-27 10:53:34 -07:00
Jacob Barthelmeh f6bbe845f5 Merge https://github.com/wolfSSL/wolfssl into bio 2016-06-22 09:14:53 -06:00
Jacob Barthelmeh ea71814518 Merge https://github.com/wolfSSL/wolfssl 2016-06-17 13:58:53 -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
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 2feee8856e revise static memory and update heap hint 2016-06-04 19:03:48 -06:00
Ludovic FLAMENT 5d67bb881e fix memory leaks 2016-05-25 17:44:31 +02:00
Ludovic FLAMENT 99b5aa587f Fix errors (jenkins) 2016-05-23 11:11:57 +02:00
Ludovic FLAMENT ed4f67058a Merge branch 'master' of https://github.com/wolfssl/wolfssl 2016-05-20 21:51:13 +02:00
toddouska b8c0802e3c Merge pull request #414 from JacobBarthelmeh/DTLS-MultiCore
Dtls multi core
2016-05-17 17:39:18 -07: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
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
Jacob Barthelmeh c8576566cc add public wolfSSL_dtls_export and api tests 2016-05-14 12:49:09 -06:00
Jacob Barthelmeh 8c45cb1938 add DTLS session export option 2016-05-10 13:27:45 -06:00
Chris Conlon 8f3e1165a1 add Whitewood netRandom client library support 2016-05-05 15:31:25 -06: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
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 f19541ffe5 update to MYSQL compatibility 2016-05-03 09:22:15 -06: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
Jacob Barthelmeh 696169634e check return value of wolfSSL_set_fd 2016-03-25 13:59:04 -06:00
Jacob Barthelmeh e99a5b0483 prepare for release v3.9.0 2016-03-17 16:02:13 -06:00
Jacob Barthelmeh 060e278559 Merge branch 'master' of https://github.com/wolfSSL/wolfssl into Certs 2016-03-11 23:48:39 -07: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
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 05d2cec7c1 addition to api tests and refactor location of trusted peer cert check 2016-03-02 11:35:03 -07:00
Jacob Barthelmeh dcfec3d2fa check for RSA and ECC before testing RSA signed ECC cert 2016-02-23 17:03:52 -07:00
Jacob Barthelmeh 8073024ee7 fix formatting of .conf file so ephemeral port is used 2016-02-12 13:41:30 -07:00
Jacob Barthelmeh 3e860107f3 remove extra cert and key, plus add new test 2016-02-11 13:49:07 -07:00
toddouska f30ef33d8b Merge pull request #295 from JacobBarthelmeh/master
ECDHE-PSK and added cipher suites
2016-02-09 09:40:13 -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 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
Jacob Barthelmeh d04a7e802a add ECDHE-PSK and cipher suite ECDHE-PSK-NULL-SHA256 2016-02-03 13:44:13 -07:00
Jacob Barthelmeh 93c54c07ea cipher suite ECDHE-ECDSA-NULL-SHA 2016-02-01 14:43:17 -07:00
Jacob Barthelmeh d0f8132cdc forcing sensitive memory to be all zeros when done with it 2016-02-01 10:45:09 -07:00
Jacob Barthelmeh 7d71d756f3 update ChaCha20-Poly1305 to most recent RFCs 2016-01-27 14:03:05 -07:00
Moisés Guimarães 10df002ec5 fixes srp build without sha512 2016-01-12 15:42:58 -03:00
toddouska 157486ce0d fix hint types for misuse of in_buffer and out_buffer 2015-12-29 16:13:09 -08:00
toddouska 22385f2b39 add random ports for all make check scripts, unique ready file 2015-12-22 14:35:34 -08:00
Chris Conlon d2a80ba1bc remove extra NULL check in SetTmpDH_buffer/file_wrapper, fix API tests 2015-11-30 10:25:55 -07:00
Chris Conlon 9c6b52876a add SetTmpDH file/buffer functions to API tests 2015-11-20 13:32:44 -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
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
Ludovic FLAMENT 9ef43910ed Merge branch 'master' of https://github.com/wolfssl/wolfssl 2015-10-16 07:46:51 +02: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
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
Ludovic FLAMENT bf3b0a228d add support for Application-Layer Protocol Name (RFC 7301) in the TLS extensions 2015-10-09 15:18:41 +02:00
toddouska d669fc28c2 add idea benchmark, cleanup 2015-09-23 14:42:48 -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
toddouska 049a4c6460 fix C++ mode warnings 2015-08-17 16:47:39 -07:00
toddouska 46e7e9acf9 disable SSLv3 by default 2015-08-12 16:39:13 -07:00
Moisés Guimarães 12b8445153 adds key generation function callback option. 2015-08-04 13:36:58 -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 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 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
kaleb-himes 273a0dd4d5 re-format test-psk-no-id.conf add README 2015-08-03 11:04:18 -06:00
toddouska 37ba6aeee7 fix psk no identify hint example logic 2015-08-03 09:32:51 -07: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
Jacob Barthelmeh e7dd5c4b8f add setting client cipher list 2015-07-21 16:55:42 -06:00
Jacob Barthelmeh df8b48cd0f NTRU suites from earlier code 2015-07-11 12:52:22 -06:00
Jacob Barthelmeh 14723b7e65 QSH (quantum-safe handshake) extension 2015-07-07 09:55:58 -06: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
John Safranek d6047736e9 added GPL headers to the unit test driver files 2015-07-01 11:12:54 -07: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 86f2b9a98f turn off DTLSv1 functions for disable old tls 2015-04-08 13:29:25 -07:00