David Garske
aee4aea64d
Merge pull request #1748 from JacobBarthelmeh/Testing
...
call hamc init with blake2 software test
2018-08-14 10:07:01 -06:00
toddouska
d4f908c372
Merge pull request #1728 from JacobBarthelmeh/HardwareAcc
...
Add build for AF_ALG
2018-08-13 16:27:51 -07:00
John Safranek
91d2b17139
Scan-Build Fix
...
1. Initialize the sz variable in wc_BerToDer().
2018-08-13 14:37:04 -07:00
Jacob Barthelmeh
b71c2ddf38
call hamc init with blake2 software test
2018-08-13 08:58:01 -06:00
David Garske
93a7b76da5
Fix missing RSA_MIN_SIZE and RSA_MAX_SIZE and case where HAVE_FIPS_VERSION is not defined.
2018-08-13 08:18:51 -06:00
David Garske
80e46253d9
Fix for FIPS v1 CAVP case so the wc_RsaExportKey and wc_CheckProbablePrime functions are available. Cleanup to remove unused ERROR_OUT.
2018-08-13 06:25:55 -06:00
Eric Blankenhorn
bb574d28b2
Support for more cert subject OIDs and raw subject access ( #1734 )
...
* Add businessCategory OID
* Raw subject support methods
* Support for jurisdiction OIDs
* Wrap in WOLFSSL_CERT_EXT
* Adding tests
2018-08-12 12:53:29 -07:00
David Garske
30d6c0c1fc
Merge pull request #1737 from ejohnstown/ocsp-free
...
OCSP Free
2018-08-06 09:08:01 -07:00
Jacob Barthelmeh
30e787b10c
create buffer with structure copy and set fd after close
2018-08-03 16:46:15 -06:00
Jacob Barthelmeh
7726786998
fix comment and remove duplicate free
2018-08-03 15:04:37 -06:00
toddouska
b88d60ecbb
Merge pull request #1665 from ejohnstown/mr
...
Prime Number Testing
2018-08-03 12:50:27 -07:00
John Safranek
368b5b1072
Merge pull request #1729 from kaleb-himes/init-array
...
Initialize array to zero(s)
2018-08-02 16:33:37 -07:00
John Safranek
5ae45436f4
OSCP
...
1. Added a missed attr files for the OSCP status files. Bare minimum attr.
2. Added the attr files to the automake include.
3. Fix out of bounds read with the OCSP URL.
2018-08-02 14:50:59 -07:00
kaleb-himes
93c2f3b170
Initialize array to zero(s)
2018-08-02 09:21:09 -06:00
John Safranek
6527c2a724
DH SP Fix
...
When doing the sp_2048_mod_exp_*() is processed, one of the index
variables is masked with 0x1f when it was updated. Added the masking to
the initial set of the index.
2018-08-01 16:32:22 -07:00
John Safranek
7647d52d77
Prime Number Testing
...
1. Remove a copy-paste error when clearing up the RNG used to test a prime.
2. Tag a some const test values as static in the wolfCrypt test.
2018-08-01 14:49:06 -07:00
JacobBarthelmeh
244d931e75
Merge pull request #1721 from kaleb-himes/cleanup-debug
...
Cleanup debug errors
2018-08-01 15:01:25 -06:00
toddouska
8bc5bc227d
Merge pull request #1634 from ejohnstown/gcc-8-fixes
...
GCC-8 String Fixes
2018-08-01 12:13:10 -07:00
toddouska
da096497e0
Merge pull request #1727 from dgarske/memdocs
...
Documented memory build options
2018-08-01 12:12:34 -07:00
Jacob Barthelmeh
ce5e787afc
formating and sanity check on pointer with test case
2018-08-01 11:57:36 -06:00
JacobBarthelmeh
cb756397b3
inital AES-CBC with af_alg
...
progress on AES-GCM with AF_ALG and add SHA256
add aes-gcm test cases and finish logic of aes-gcm with AF_ALG
formating of tabs and white space
add files to dist
adding ecb and ctr mode with af_alg
make length of buffers for ctr be AES_BLOCK_SIZE
formating and add support for sha256 copy/gethash
sanity checks on arguments
cast return values and valgrind tests
make it easier to use sha256 with af_alg
remove hard tabs
add endif for after rebase
2018-08-01 08:54:20 -06:00
John Safranek
f5b3de6b54
GCC-8 string fixes
...
1. Found one more case where a string is copied, potentially without the null. In wc_ports w.r.t. directory and file names.
2018-07-31 14:02:44 -07:00
John Safranek
7053830628
GCC-8 string fixes
...
Fix for the Windows directory search code.
2018-07-31 14:02:44 -07:00
John Safranek
af89458af0
GCC-8 string fixes
...
1. strncpy needs to include the source string's NULL.
2. Deleted a few redundant string modifications.
2018-07-31 14:02:44 -07:00
John Safranek
2e1a1681ec
GCC-8 string fixes
...
1. strncat() does not like to copy single byte strings with "n = 1", as it won't null-terminate.
2. strncpy()'s len parameter is the size of the dst not the src.
3. Replaced the echoserver HTTP response composition of const strings with a copy of a single string.
2018-07-31 14:02:44 -07:00
John Safranek
50372b7033
Memory Callback
...
1. Allow SetAllocators to use NULL as a callback. Memory wrappers will use default with NULL.
2. Remove the ResetAllocators function. Use SetAllocators with NULL.
3. Modify memory tracker to save the old allocators on init and restore them on cleanup.
2018-07-31 09:30:03 -07:00
David Garske
0e1588f4ad
Documented memory build options. Added logging for normal wolf malloc/free opterations when using WOLFSSL_DEBUG_MEMORY and WOLFSSL_DEBUG_MEMORY_PRINT (previously only worked with WOLFSSL_STATIC_MEMORY and WOLFSSL_TRACK_MEMORY). Changed WOLFSSL_MALLOC_CHECK option to use WOLFSSL_MSG.
2018-07-31 09:03:40 -07:00
kaleb-himes
fe08b98117
Adjust guards following peer review
2018-07-31 09:50:44 -06:00
toddouska
f18351fef5
Merge pull request #1718 from dgarske/memtest
...
New memory testing feature and fixes for null checks
2018-07-31 07:56:29 -07:00
David Garske
0f86494161
* Added support for STM32L4 AES hardware crypto.
...
* Added reference PK callbacks functions for ECC sign, verify and shared secret used by TLS in `wolfcrypt/src/port/st/stsafe.c`.
* Fix for wolfcrypt_test to not require args to be provided.
* Fix for wolfCrypt `ecc_test_buffers` to poperly init ecc_key (resolves devId issue).
* Fix for STM32 AES CBC Decrypt with CubeMX, which was not capturing the first input block for next IV.
* Refactor to combine STM32 hardware init code.
2018-07-30 13:58:19 -07:00
David Garske
4eff7b641b
First pass at bugs found with ./scripts/memtest.sh. Fixes for NULL pointer checks, making sure free'd pointers are reset, making sure pointers are initialized and making sure memory is always free'd. Fix for TicketInit() which was using non-thread safe RNG and key_ctx. Fix for possible double free case in wolfSSL_PEM_read_X509_CRL.
2018-07-30 13:53:54 -07:00
David Garske
2c3475c1d6
Added new build option --enable-memtest or WOLFSSL_FORCE_MALLOC_FAIL_TEST which enables random malloc failures for testing. This test supresses the abort() calls to detect seg faults. A new script ./scripts/memtest.sh starts the test. If an issue is found it can be reviewed with the ./scripts/memtest.txt log and reproduced using the seed printed at top of unit test as --- RNG MALLOC FAIL AT 295--- and rerun using ./tests/unit.test 295.
2018-07-30 13:53:35 -07:00
toddouska
62cb69ded6
Merge pull request #1724 from dgarske/pemtoder
...
Added API's to expose alloc/free of DerBuffer and new unit tests
2018-07-30 13:50:19 -07:00
toddouska
335f467b8c
Merge pull request #1714 from dgarske/pic32hashleak
...
Fixes for PIC32MZ hash memory leak
2018-07-30 13:48:59 -07:00
David Garske
0ef63048a0
Fix for new report in wc_BerToDer with uninitialized derSz.
2018-07-30 11:51:26 -07:00
David Garske
309d7a9d0d
Added API's to expose alloc/free of DerBuffer using wc_AllocDer and wc_FreeDer. Added unit tests for new API's and missing ones for wc_PemToDer and wc_CertPemToDer. ZD 4185.
2018-07-30 11:19:59 -07:00
kaleb-himes
166330030c
Handle case where external unassigned
2018-07-29 06:46:07 -06:00
Naruto TAKAHASHI
861fec1dc6
porting mynewt
2018-07-28 18:03:20 +09:00
kaleb-himes
afb2180e80
Cleanup debug errors
2018-07-27 14:00:19 -06:00
John Safranek
4b2a591a93
Prime Number Testing
...
1. Added calls to wc_DhSetCheckKey() on the client side of TLS.
2. Added an API test to the wolfCrypt test.
3. Fixed a bug in the prime test found with the API test. Misuse of tertiary operator.
2018-07-26 14:43:04 -07:00
David Garske
efbabbfb29
Further improvements to hashing code to make sure wc_*Free is always called including wc_HashFree. Added new defines to disable PIC32MZ hardware features using NO_PIC32MZ_HASH, NO_PIC32MZ_RNG and NO_PIC32MZ_CRYPT.
2018-07-26 14:41:30 -07:00
toddouska
90367df13c
Merge pull request #1710 from SparkiDev/ed25519_only
...
Changes to build with X25519 and Ed25519 only
2018-07-25 14:24:03 -07:00
David Garske
92cb8f06ea
Fixes to make sure hash free is always called (resolves memory leaks with PIC32MZ hashing hardware). Only print Alloc/Free messages with track memory when WOLFSSL_DEBUG_MEMORY_PRINT is defined. Added test for ForceZero with 0 length.
2018-07-25 11:22:03 -07:00
David Garske
beceab2734
Fix for leak with WOLFSSL_PIC32MZ_HASH and TLS. The PIC32 update cache buffer was not always being free'd.
2018-07-25 11:22:03 -07:00
JacobBarthelmeh
74fbd06817
Merge pull request #1686 from cconlon/nucleus-update
...
Nucleus port and PB changes
2018-07-25 09:17:40 -06:00
toddouska
17c7ecb2bc
Merge pull request #1711 from dgarske/memtrack
...
Fix for memory tracking cleanup
2018-07-24 11:53:08 -07:00
toddouska
92bc891713
Merge pull request #1709 from SparkiDev/rsa_low_mem_fix
...
Fix for RSA_LOW_MEM and other configurations
2018-07-23 16:15:28 -07:00
toddouska
e618f34c2f
Merge pull request #1707 from kaleb-himes/ARM_GCC_EX_FIXES
...
Fixes for building without DRBG and ForceZero test
2018-07-23 16:14:43 -07:00
David Garske
ef076a68d3
Added new API wolfSSL_ResetAllocators to allow reset of memory callbacks to defaults. Added new CleanupMemoryTracker which restores memory callback functions. This resolves issue with trying to free memory allocated prior to InitMemoryTracker.
2018-07-23 16:03:08 -07:00
toddouska
ab3ffaa26a
Merge pull request #1706 from SparkiDev/sha384_not_sha512
...
Allow SHA384 to be compiled in without SHA512
2018-07-23 09:47:49 -07:00