6566 Commits

Author SHA1 Message Date
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 fd9e41dd993bf31207868dc63a49c2e8b5a3e102. 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