Commit Graph

7630 Commits

Author SHA1 Message Date
Chris Conlon
27a59761b9 Merge pull request #6520 from miyazakh/tsip_cryptonly
Support TSIP crypt only
2023-08-01 10:13:18 -06:00
JacobBarthelmeh
4b80dcf733 Merge pull request #6617 from SparkiDev/aes_gcm_win_asm_fix
AES-GCM x86_64 MSVC ASM: XMM6-15 are non-volatile
2023-07-31 09:15:42 -06:00
Dimitri Papadopoulos
6d9c85a762 Fix typos found by codespell 2023-07-27 23:38:44 +02:00
billphipps
10adca1a45 Add CryptoCb features (#6636)
* Update to support invoking cryptocb during un/register.
2023-07-27 13:16:43 -07:00
Sean Parkinson
67913b5800 Merge pull request #6603 from JacobBarthelmeh/xilinx
fix for AES-GCM use with petalinux
2023-07-27 07:38:03 +10:00
Hideki Miyazaki
02ec92a3b9 Support TSIP crypt only
- Aes, sha,
  - rsa
     MakeRsaKey, sign/verify

fix compile error when not enabled TSIP
2023-07-27 06:23:34 +09:00
JacobBarthelmeh
8d77090ad9 Merge pull request #6650 from DimitriPapadopoulos/spaces
Fix tab/space inconsistencies
2023-07-26 14:17:31 -06:00
JacobBarthelmeh
3e5e16f1ff Merge pull request #6641 from julek-wolfssl/gh/6555
Dtls13GetRnMask: Correctly get chacha counter on BE systems
2023-07-26 11:29:39 -06:00
JacobBarthelmeh
681a75da24 fix for AES-GCM use with petalinux 2023-07-25 22:08:20 -06:00
Sean Parkinson
cfac603ee1 AES-GCM x86_64 MSVC ASM: XMM6-15 are non-volatile
Put XMM6-15, when used, on the stack at start of function and restore at
end of function.
2023-07-26 08:22:58 +10:00
Daniel Pouzzner
cebb4da307 fixes and workarounds for cppcheck 2.11 with uninitvar checks reactivated, and legacyUninitvar suppressed globally (as before):
src/internal.c:wolfSSL_DtlsUpdateWindow(): shiftTooManyBitsSigned and integerOverflowCond (true positive, fixed);

src/ssl.c:wolfSSL_GetSessionFromCache(): autoVariables (true positive, intentional and now suppressed);

wolfcrypt/src/asn.c: several uninitvars in EccSpecifiedECDomainDecode(), wc_EccPrivateKeyDecode(), DecodeSingleResponse(), and DecodeResponseData() (false positives due to bug in cppcheck short circuit eval analysis, mitigated by refactoring && expressions to nested-if constructs that are semantically identical);

src/ssl.c:wolfSSL_GetSessionFromCache(): nullPointer (false positive due to bug in cppcheck value flow analysis, workarounded).
2023-07-25 11:31:01 -05:00
Dimitri Papadopoulos
4ff99a6780 Fix tab/space inconsistencies 2023-07-24 20:10:57 +02:00
JacobBarthelmeh
1285ae7816 Merge pull request #6506 from DimitriPapadopoulos/codespell
Fix typos found by codespell
2023-07-24 10:34:29 -06:00
Juliusz Sosinowicz
56fc5bbf87 Dtls13GetRnMask: Correctly get chacha counter on BE systems
The issue was that BIG_ENDIAN is defined in endian.h (on linux). Our define is BIG_ENDIAN_ORDER.
2023-07-24 09:13:10 +02:00
JacobBarthelmeh
d3202600a4 Merge pull request #6525 from lealem47/san
Improve subjectAltName extension parsing and printing
2023-07-22 08:19:54 -06:00
Lealem Amedie
acac3fe479 Add testing and make jenkins happy 2023-07-21 13:57:45 -06:00
Lealem Amedie
0cd5a293ca Fix for parsing pkcs9_contentType 2023-07-21 13:57:45 -06:00
Sean Parkinson
9b2345dc8e SM3 ASM file: protect with check for WOLFSSL_SM3
Protect sm3_asm.S with check for WOLFSSL_SM3.
Change configure.ac to define WOLFSSL_SM3 in ASM flags when SM3 enabled
and enabling intelasm.
2023-07-21 09:57:53 +10:00
Lealem Amedie
16058ce168 Address review comments 2023-07-19 12:01:01 -06:00
Sean Parkinson
dceb7c0122 SM2 and SP_MATH: don't enable SM2 with SP_MATH
No implementation of SM2 with SP so can't use SM2 with SP MATH.
2023-07-19 12:39:59 +10:00
JacobBarthelmeh
8065ba18f9 Merge pull request #6620 from douzzer/20230714-WC_DO_NOTHING
20230714-WC_DO_NOTHING
2023-07-18 17:04:02 -06:00
Sean Parkinson
fd13d376a8 Merge pull request #6630 from JacobBarthelmeh/spelling
spelling fixes
2023-07-19 08:48:03 +10:00
JacobBarthelmeh
58318f9528 Merge pull request #6628 from dgarske/stm32_date
Fix for STM32 `HAL_RTC_GetDate` year
2023-07-18 10:28:35 -06:00
JacobBarthelmeh
67d35ea48e Merge pull request #6622 from philljj/zd16426
tfm fp_exptmod_nct: set result to zero when base is zero
2023-07-17 14:29:01 -06:00
JacobBarthelmeh
b74a7f8e87 spelling fixes 2023-07-17 13:21:44 -07:00
David Garske
da9541551d Fix for STM32 HAL_RTC_GetDate year. Fixes #6618. 2023-07-17 10:30:47 -07:00
JacobBarthelmeh
31aac92635 Merge pull request #6614 from dgarske/silabs_aes
Fix for SiLabs HW acceleration unused function in aes.c
2023-07-17 10:53:20 -06:00
David Garske
37be7a4800 Merge pull request #6567 from JacobBarthelmeh/vcpkg
fix warning for build with vcpkg
2023-07-17 08:47:15 -07:00
jordan
df58c4dea7 tfm fp_exptmod_nct: handle special cases better 2023-07-15 10:00:50 -05:00
JacobBarthelmeh
a026d843cf Merge pull request #6564 from philljj/add_lms_hooks
Add LMS/HSS wolfCrypt hooks.
2023-07-14 14:33:25 -06:00
jordan
1afc0df83d tfm fp_exptmod_nct: set result to zero when base is zero 2023-07-14 13:57:29 -05:00
jordan
a747e7773c LMS: comments, SMALL_STACK, cleanup, etc. 2023-07-14 11:27:59 -05:00
JacobBarthelmeh
20115f0e23 Merge pull request #6619 from douzzer/20230714-asn-DecodeAuthKeyId-Wconversion-fix
20230714-asn-DecodeAuthKeyId-Wconversion-fix
2023-07-14 10:11:46 -06:00
JacobBarthelmeh
7361332c87 Merge pull request #6616 from SparkiDev/sm2_sp_not_avail
ECC and SM2: SP implementation not available yet
2023-07-14 09:58:43 -06:00
Daniel Pouzzner
e2833f99a3 wolfcrypt/src/asn.c: fix merge conflict between 648f474d83 and 2c9609039d, re -Wconversion in DecodeAuthKeyId(). 2023-07-14 09:53:54 -05:00
Daniel Pouzzner
f6f8d2eda3 add WC_DO_NOTHING macro to wolfssl/wolfcrypt/types.h, with default expansion "do {} while (0)", and globally refactor to use the macro where appropriate, annotating intended-null macros-with-args with "/* null expansion */";
tweak several #includes of settings.h to include types.h instead (all of these are for clarity, as types.h is indirectly included by later #includes), and add #include <wolfssl/wolfcrypt/types.h> where missing;

remove trailing semicolons from PRAGMA*() macro invocations as they are unneeded and can be harmful (inducing frivolous -Wdeclaration-after-statement etc.).
2023-07-14 09:50:01 -05:00
Sean Parkinson
a96983e6d3 Merge pull request #6612 from dgarske/entropy_memuse_win32
Add support for MemUse Entropy on Windows.
2023-07-14 10:54:51 +10:00
Sean Parkinson
377417e668 ECC and SM2: SP implementation not available yet
ecc.c: Keep code, but don't compile in until implementation for SM2
added to SP.
ssl.c: Fix warning for when ECC_MINSIZE is zero and sz is unsigned.
2023-07-14 08:04:00 +10:00
David Garske
4862b57415 Simplify Windows Entropy_TimeHiRes, which just needs a precision timer to differentiate, not specific time. 2023-07-13 14:30:58 -07:00
David Garske
00add89deb Fix for unused AesDecrypt in aes.c with SiLabs AES acceleration enabled (WOLFSSL_SILABS_SE_ACCEL). ZD15874 2023-07-13 13:50:15 -07:00
David Garske
761a976d0c Add support for MemUse Entropy on Windows. 2023-07-13 12:56:13 -07:00
JacobBarthelmeh
4bf642283c Merge pull request #6597 from SparkiDev/mp_test_div_fix
test.c: fix protection around calling mp_test_div
2023-07-13 13:37:27 -06:00
JacobBarthelmeh
11d26797d2 Merge pull request #6601 from SparkiDev/type_conversion_fixes_2
Type conversion fixes: make explicit
2023-07-13 13:33:58 -06:00
JacobBarthelmeh
8c012b5df5 Merge pull request #6599 from SparkiDev/heapmath_mp_exptmod_fix
Heap Math exptmod: fixes for valid modulus checks
2023-07-12 16:57:51 -06:00
JacobBarthelmeh
cf15789c7f Merge pull request #6598 from SparkiDev/sm_update_3
EVP SM3: fix cast
2023-07-12 16:56:35 -06:00
JacobBarthelmeh
b889b27b8c Merge pull request #6585 from cconlon/x509Ext
Fixes for WOLFSSL_X509 cert gen, WOLFSSL_ALT_NAMES to --enable-jni
2023-07-12 16:55:08 -06:00
Sean Parkinson
2c9609039d Type conversion fixes: make explicit
Changed to types and casting so that there are no implcit conversion
warnings (gcc -Wconversion) in these files.
2023-07-13 08:36:02 +10:00
Chris Conlon
ea7ea356a0 Fixes for WOLFSSL_X509 cert generation with key usage, extended key usage, and basic constraints 2023-07-12 14:33:42 -06:00
Daniel Pouzzner
648f474d83 configure.ac:
if ENABLED_LINUXKM_PIE, add -DWOLFSSL_NO_OCSP_ISSUER_CHECK to gate out backward dependency in asn.c;

  if ENABLE_LINUXKM, don't error on FIPS without thread_ls_on;

  for --enable-curl, set ENABLED_MD4="yes", and move --enable-md4 AC_ARG_ENABLE() clause up to a position adjacent to des3 handling;

scripts/sniffer-gen.sh: fix illegal exit code (SC2242);

src/internal.c: fix clang-analyzer-core.NonNullParamChecker in CreateTicket();

src/ocsp.c: fix readability-redundant-preprocessor;

src/tls.c: fix empty-body in TLSX_PskKeModes_Parse() and clang-diagnostic-unreachable-code-break in ALPN_Select();

tests/api.c: fix several clang-analyzer-core.NullDereference related to Expect*() refactor;

wolfcrypt/src/asn.c:

  fix -Wconversions in DecodeAuthKeyId() and ParseCertRelative();

  fix readability-redundant-declaration re GetCA() and GetCAByName();

  gate inclusion of wolfssl/internal.h on !defined(WOLFCRYPT_ONLY);

wolfssl/internal.h: add macro-detection gating around GetCA() and GetCAByName() prototypes matching gates in wolfcrypt/src/asn.c;

tests/utils.c: in create_tmp_dir(), use one-arg variant of mkdir() if defined(__CYGWIN__) || defined(__MINGW32__).
2023-07-12 13:47:40 -05:00
Sean Parkinson
8e89e31f70 test.c: fix protection around calling mp_test_div
Caller of mp_test_div() had different #ifdef protection declaration.
Made them the same.
2023-07-12 10:55:50 +10:00