Commit Graph

11359 Commits

Author SHA1 Message Date
John Safranek c69b6fb6d1 wolfSSL ABI
1. Add a blank #define WOLFSSL_ABI to tag functions as part of the ABI
to remind developers there are rules about those functions specifically.
2. Added allocators and deallocators for WC_RNG objects and ecc_key
objects so they don't have to be used on the stack.
3. Add tests for the new allocators.
2019-11-07 13:03:12 -08:00
Sean Parkinson c06efb6c1f Ensure space for name string. Reset policy count.
Only set the name string in one place, keeping a length of the name type
to copy. Also only move cert data index once.
Reset certificate extension policy number/count in case of malicious
cert with multiple policy extensions.
2019-11-07 13:51:50 +10:00
David Garske 0fe5d40507 Merge pull request #2568 from aaronjense/iar-build-fix
Fix changed sign warning for IAR build
2019-11-06 15:47:15 -08:00
toddouska c137c5a3e0 Merge pull request #2565 from SparkiDev/rsa_kg_sp_math
SP Math and RSA Key Gen working again
2019-11-06 13:08:19 -08:00
toddouska 1becdb9f3b Merge pull request #2563 from SparkiDev/x509_dname_index
Check domain name location index hasn't exceed maximum before setting
2019-11-06 13:07:42 -08:00
toddouska c995417d54 Merge pull request #2554 from SparkiDev/sp_misrac
MISRA-C changes to SP plus cppcheck fixes
2019-11-06 13:06:28 -08:00
toddouska ba34b0d09f Merge pull request #2547 from SparkiDev/rsa_pss_salt_len
Compile options for larger salt lengths in RSA-PSS
2019-11-06 13:03:15 -08:00
tmael 969488434a Merge pull request #2544 from JacobBarthelmeh/SanityChecks
add null checks (QSH and CRYPTOCELL)
2019-11-06 12:18:00 -08:00
Aaron Jense ea77cd743e Fix changed sign warning for IAR build 2019-11-06 09:59:31 -08:00
Sean Parkinson 65cd8a930e SP Math and RSA Key Gen working again 2019-11-06 15:24:12 +10:00
Tesfa Mael a6e4926d2f Init variables 2019-11-05 15:14:47 -08:00
Chris Conlon 77c36b5ea9 Merge pull request #2542 from kojo1/BasicConst
x.509 basic constratint
2019-11-05 15:38:07 -07:00
Sean Parkinson 52f28bd514 Check domain name location index hasn't exceed maximum before setting 2019-11-06 08:31:04 +10:00
Daniele Lacamera 51ea806d8b Allow pwdbased module to compile without ASN 2019-11-05 10:16:46 +01:00
Jacob Barthelmeh 1361e4dbef remove extra setting of ecc key size with CRYPTOCELL build 2019-11-04 23:25:47 -07:00
Sean Parkinson 32f93be0b6 Replace magic PSS salt length numbers with enums 2019-11-05 09:03:30 +10:00
toddouska 5141623f48 Merge pull request #2548 from SparkiDev/rsa_check
Add more checks of RSA key
2019-11-04 13:05:35 -08:00
toddouska 28da0075d1 Merge pull request #2545 from SparkiDev/scrypt_iters
Add scrypt API that takes iterations rather than cost
2019-11-04 13:01:32 -08:00
David Garske e2fb359538 Merge pull request #2549 from JacobBarthelmeh/Testing
fix for macro typo's
2019-11-04 08:05:09 -08:00
David Garske 683658de20 Merge pull request #2553 from miyazakh/fix_esp_buildfail
fix esp build failure
2019-11-04 07:44:01 -08:00
Sean Parkinson f590f6522d MISRA-C changes to SP plus cppcheck fixes 2019-11-04 16:13:48 +10:00
Sean Parkinson 35ec2bc6d4 Compile options for larger salt lengths in RSA-PSS
Salt length larger than the hash size allowed in RSA-PSS.
Passing -2 to PSS pad function uses maximum salt length.
Passing -2 to PSS un-pad function makes it discover salt length.
2019-11-04 14:27:02 +10:00
Hideki Miyazaki 0c8ab5b0e4 fix esp build failure 2019-11-03 12:19:59 +09:00
Takashi Kojo 76404c937e #ifdef guard 2019-11-02 13:01:40 +09:00
David Garske 2084006b61 Merge pull request #2550 from cconlon/mmcau
fix mmCAU classic XFREE on aligned ptr
2019-11-01 15:59:57 -07:00
kaleb-himes ffb80126ff Implement porting efforts from ZD5241 and ZD5815 2019-11-01 16:00:06 -06:00
Chris Conlon e07e07f831 Merge pull request #2537 from JacobBarthelmeh/PKCS7
fix for pkcs7 verify streaming
2019-11-01 10:15:44 -06:00
Chris Conlon be2cb302ea fix mmCAU classic XFREE on aligned ptr 2019-11-01 09:56:28 -06:00
Jacob Barthelmeh efca350cba fix for macro typo's 2019-11-01 09:21:21 -06:00
Sean Parkinson 54c7619f81 Add more checks of RSA key
Check d is in valid range, p*q == n, and dP, dQ and u are valid.
2019-11-01 16:25:57 +10:00
Sean Parkinson 7623777857 Add scrypt API that takes iterations rather than cost
iterations = 1 << cost but matches APIs in other products and standard
2019-11-01 10:15:42 +10:00
toddouska b27c1df348 Merge pull request #2538 from SparkiDev/cppcheck_fixes_2
Fixes for errors using cppcheck
2019-10-31 13:08:19 -07:00
toddouska ac76b4b692 Merge pull request #2541 from SparkiDev/x25519_gcc_avx2
Fix loading and setting using RIP register with GCC
2019-10-31 13:07:27 -07:00
Jacob Barthelmeh 550fbcfff7 add null checks (QSH and CRYPTOCELL) 2019-10-31 10:07:47 -06:00
Takashi Kojo 2ef4d1a16e Keep else to GetBoolean 2019-10-31 17:29:46 +09:00
Takashi Kojo 4f602e02ba accept ASN_INTEGER for compatibility 2019-10-31 12:06:59 +09:00
Sean Parkinson adff4e719a Fix loading and setting using RIP register with GCC 2019-10-31 12:14:05 +10:00
David Garske 28d466cb10 Fix to ensure 4-byte alignment is default for MMCAU with SHA1, SHA256 and MD5. 2019-10-30 13:34:57 -07:00
Sean Parkinson c354b240f2 Fixes for errors using cppcheck 2019-10-30 14:48:21 +10:00
Jacob Barthelmeh a0955f8221 fix for pkcs7 verify streaming 2019-10-29 16:47:30 -06:00
David Garske 7f42b71571 Fix NXP MMCAU when data pointer is not aligned. 2019-10-29 13:45:25 -07:00
David Garske 6bc16a4acb Merge pull request #2532 from aaronjense/mp-public-defines
Fix for configure used in wolfssl-examples/signature/rsa_vfy_only.…
2019-10-29 08:46:03 -07:00
toddouska 140796d2aa Merge pull request #2504 from ejohnstown/sync-octeon
Synchronous OCTEON Sniffer Support
2019-10-28 12:25:57 -07:00
Aaron Jense 34c37c58f4 Fixes for configure used in wolfssl-examples/signature/rsa_vfy_only and fix for wrong WOLFSSL_MP_PUBLIC defines.
./configure CFLAGS=-DWOLFSSL_PUBLIC_MP --disable-asn --disable-filesystem --enable-static --enable-shared --enable-cryptonly --enable-sp=smallrsa2048 --enable-sp-math --disable-dh --disable-ecc --disable-sha224 --enable-rsavfy
2019-10-28 09:50:59 -06:00
David Garske b80b10b980 Merge pull request #2498 from danielinux/stm32wb55
Support for STM32_PKA accelerator
2019-10-24 15:41:08 -07:00
Daniele Lacamera 9f34826173 stm32_pka: fixed remarks from code review 2019-10-24 21:48:35 +02:00
Daniele Lacamera 390b936331 stm32_pka: using XMEMCPY 2019-10-24 20:49:43 +02:00
Daniele Lacamera f97452c859 STM32_PKA: using XMEMSET 2019-10-24 20:46:03 +02:00
Daniele Lacamera 025754e774 Fixed alignment/padding for hash. ECC tests passing on target. 2019-10-24 20:32:47 +02:00
John Safranek 17f44d4d29 OCTEON Sync
1. Add attributes to the OCTEON functions so they aren't optimized.
2. Disable the same test cases for OCTEON as we do QAT in sync.
2019-10-24 10:00:20 -07:00