Commit Graph

7221 Commits

Author SHA1 Message Date
Sean Parkinson
ca11b4e560 siphash: fix assembly so that no register is left behind
Change all assembly so that no register is used explicitly - all
variables.
2023-03-29 09:38:04 +10:00
Chris Conlon
496a15037b Merge pull request #6166 from TakayukiMatsuo/tsip117 2023-03-27 11:49:18 -06:00
JacobBarthelmeh
e0e590f126 Merge pull request #6223 from lealem47/misc_fixes
Async build typos and miscellaneous fixes
2023-03-23 23:55:20 +07:00
David Garske
3ef7db8e1b Merge pull request #6229 from JacobBarthelmeh/Testing
fix for check on ecc public key size with FIPS and compressed keys
2023-03-23 08:25:31 -07:00
JacobBarthelmeh
a121a5c270 Merge pull request #6225 from SparkiDev/memzero_check_fixes_1
MemZero check fixes
2023-03-23 21:04:39 +07:00
JacobBarthelmeh
25577ab96c fix for check on ecc public key size with FIPS and compressed keys 2023-03-23 06:58:03 -07:00
Sean Parkinson
d1e4349661 MemZero check fixes
ForceZero the client and server secret regardless of whether TLS 1.3 as
it may change but have been copied in.
ForceZero the input buffer in wolfSSL_Clear() when encryption was on.

Changed wc_PRF_TLS to only check the parts of data used.
Changed where scatch is added for checking in wc_AesCtrEncrypt.
Change wc_MakeRsaKey to memset p, q, tmp1, tmp2 and tmp3 to all zeros so
that MemZero check works. Memset not needed otherwise.
Changes for new compiler - thinks uninitialized.
2023-03-23 12:27:38 +10:00
Lealem Amedie
c83e899b78 Fix for overlong string warning 2023-03-22 17:29:53 -06:00
Lealem Amedie
a5e7a20c93 Fix for logic gating strerror_r() 2023-03-22 17:29:13 -06:00
Sean Parkinson
1fa75a5503 AES-GCM streaming: EVP needs to set IV with wc_AesGcmInit
Store IV if it is small enough to fit in aes->reg - was a copy of the
aes->reg in the first place.
2023-03-23 09:28:22 +10:00
Sean Parkinson
df4081ea5a Merge pull request #6215 from JacobBarthelmeh/static_analysis
fixes for static analysis reports
2023-03-23 08:37:08 +10:00
David Garske
835e8a18c7 Merge pull request #6216 from JacobBarthelmeh/fuzzing
adjust sanity check for index into URI
2023-03-22 12:52:04 -07:00
JacobBarthelmeh
c11f5d0ee5 fixes for static analysis reports 2023-03-22 12:34:37 -07:00
JacobBarthelmeh
7e8d027a17 Merge pull request #6217 from douzzer/20230321-fixes
20230321-fixes
2023-03-22 10:23:07 -06:00
Daniel Pouzzner
49cd3ff872 wolfssl/internal.h: fixes for -Wpedantic "redefinition of typedef" around typedef ... TLSX and Options;
src/internal.c: fix for -Wdeclaration-after-statement and clang-diagnostic-unreachable-code-break;

tests/api.c: fix for -Wunused-variable and clang-analyzer-deadcode.DeadStores;

olfcrypt/src/pkcs12.c: fixes for cppcheck uselessAssignmentPtrArg and arrayIndexThenCheck, and clang-tidy clang-analyzer-deadcode.DeadStores and clang-analyzer-core.NonNullParamChecker;

wolfssl/src/tls.c: fix for clang-analyzer-deadcode.DeadStores;

wolfcrypt/src/tfm.c: fix for clang-diagnostic-newline-eof;

src/tls13.c: fix for clang-analyzer-core.NonNullParamChecker.
2023-03-21 22:52:56 -05:00
JacobBarthelmeh
180a20d535 adjust sanity check for index into URI 2023-03-21 20:19:08 -07:00
JacobBarthelmeh
147395476f Merge pull request #6213 from SparkiDev/regression_fixes_6
Regression testing fixes
2023-03-21 20:17:30 -06:00
Sean Parkinson
9ec742b11f Regression testing fixes
HAVE_ECH only used by TLS 1.3 add protection around all code.
ssl->options.onlyPskDheKe only available when HAVE_SUPPORTED_CURVES.
CleanupClientTickets() defined when HAVE_SUPPORTED_CURVES.
TLSX_KeyShare_DeriveSecret only defined when HAVE_SUPPORTED_CURVES.
DecodeResponseData - initialize variable single.
New OpenSSL compatibility BN code requires mp_read_radix - turn on in
integer.c, sp_int.c when OPENSSL_EXTRA defined.
rsa.c:_CheckProbablePrime - make sure tmp1 and tmp2 are initialized
before error handling jumps to freeing them.

test_remove_hs_message uses 1024-bit DH key which is not supported when
using SP math with SP.
2023-03-22 08:57:20 +10:00
Sean Parkinson
1eeb54e981 Merge pull request #6208 from JacobBarthelmeh/fuzzing
handle failing RNG init when creating PKEY
2023-03-22 08:55:38 +10:00
TakayukiMatsuo
7d2a9136b6 Add support for TSIP v1.17 2023-03-21 11:28:07 +09:00
Sean Parkinson
4eeb792a05 AES ARMASM <ARMV7: fix load order
Loading from memory based on register that is overwritten in ldrd.
When ldrd split out for older processors, register overwritten before
second load.
Switch order of loads in this case.
2023-03-21 10:53:47 +10:00
JacobBarthelmeh
72e53ca1a4 handle failing RNG init when creating PKEY 2023-03-20 07:17:25 -07:00
jordan
2fe473cf9f Fix out-of-bounds read in CRL parsing 2023-03-17 22:33:35 -05:00
JacobBarthelmeh
9e331aa6d5 Merge pull request #6195 from embhorn/zd15836
Fix type conv error in logging
2023-03-17 14:46:54 -06:00
JacobBarthelmeh
06d970c999 Merge pull request #6181 from kareem-wolfssl/zd15767
Fix not ignoring date errors when VERIFY_SKIP_DATE is set
2023-03-17 10:53:41 -06:00
JacobBarthelmeh
042ceff08e Merge pull request #6160 from lealem47/indefPKCS12
Adding support for indefinite length PKCS12
2023-03-17 10:45:46 -06:00
Sean Parkinson
21c5ecc371 Merge pull request #6179 from tim-weller-wolfssl/zd14527-pemtoder-return-size
zd14527 - Update `PubKey` and `Key` PEM-to-DER APIs to support return of needed DER size
2023-03-17 08:37:51 +10:00
John Safranek
db166e5e5a Merge pull request #6198 from kaleb-himes/140-3-iOS-early-stage
Add a base-line user_settings.h for use with FIPS 140-3 in xCode example app
2023-03-16 15:20:15 -07:00
Kareem
cc51b2d52e Add additional fix for absolute URN issue from PR #5964 and add test. 2023-03-16 14:56:44 -07:00
Kareem
4c12c334cf Allow alternative absolute URI syntax in certificate general name. 2023-03-16 14:25:42 -07:00
Kareem
2bb8eeae85 Fix not ignoring date errors when VERIFY_SKIP_DATE is set 2023-03-16 14:25:41 -07:00
kaleb-himes
e1d1f0790e Fixup uninitialized warnings detected by xCode 2023-03-16 15:18:00 -06:00
tim-weller-wolfssl
5659bd6036 Prevent out-of-bound read in ASN parsing logic by erroring out. 2023-03-16 06:11:34 -05:00
JacobBarthelmeh
7f6811a731 Merge pull request #6146 from kareem-wolfssl/zd15324
Fixes various warnings
2023-03-15 16:59:00 -06:00
Kareem
aaad3980a0 Various warning fixes. ESP32S3 include and build fixes. Added optional slot support for STSAFE shared secret using WOLFSSL_STSAFE_TAKES_SLOT. 2023-03-15 13:34:02 -07:00
JacobBarthelmeh
0486db8a2e Merge pull request #6188 from SparkiDev/aes_gcm_streaming_long_nonce
AES-GCM streaming: fix IV caching
2023-03-15 11:39:37 -06:00
Eric Blankenhorn
7c918255b9 Fix type conv error in logging 2023-03-15 07:46:22 -05:00
Sean Parkinson
3b5310d186 AES-GCM streaming: fix IV caching
AES-GCM stremaing was caching IV even when larger than buffer copying
into.
Instead, require calls to wc_AesGcmSetIV() or wc_AesGcmSetExtIV() to
cache IV.
wc_AesGcmInit() now uses passed in IV or retrieves from cache.
2023-03-15 07:52:06 +10:00
tim-weller-wolfssl
52105a10c9 Add means to get size of DER buffer size needed for PEM-to-DER conversion to Key and PubKey APis 2023-03-14 06:33:12 -05:00
Sean Parkinson
1d0b04bfb3 ASN template: compile option to allow leading zeros
DER/BER encoding requires positive numbers to not have leading zeros.

Sometimes customer's have examples that break the rules.
In those cases define: WOLFSSL_ASN_INT_LEAD_0_ANY
Define used in original ASN.1 implementation.
2023-03-14 09:23:15 +10:00
Lealem Amedie
1c9fa5c5ae Set some freed data to NULL 2023-03-10 13:40:25 -07:00
John Safranek
907a29ab9e RNG Tweak
1. Remove a redundant test. The duplicate data test is not required and
   is checking for something that potentially can happen normally,
   albeit rarely.
2023-03-10 11:08:35 -08:00
David Garske
90f1c26211 Merge pull request #6162 from gojimmypi/Espressif_fix_6148
compiler appeasement initialization
2023-03-09 20:08:24 -08:00
gojimmypi
30106d82ea replace fp_init_copy to appease some compilers 2023-03-08 20:37:19 -08:00
Chris Conlon
d03347d79c fix GetAsnTimeString() to correctly increment data_ptr, fixes PKCS#7 signedData signingTime attribute 2023-03-08 16:39:49 -07:00
Lealem Amedie
13867dab12 Fix leak and address more feedback 2023-03-08 13:14:16 -07:00
Sean Parkinson
6e58ca3bc4 Merge pull request #6171 from JacobBarthelmeh/Testing
build checks on mp_read_radix
2023-03-08 10:36:19 +10:00
Sean Parkinson
842b22858b Merge pull request #6168 from anhu/WOLFSSL_RELAXED_ASN_PARSING
Relaxed parsing of explicit ECC public key
2023-03-08 08:20:04 +10:00
Jacob Barthelmeh
eb0bf7cd03 build checks on mp_read_radix 2023-03-07 13:55:10 -07:00
Anthony Hu
f1757b1bae WOLFSSL_NO_ASN_STRICT 2023-03-07 07:24:25 -05:00