Commit Graph

7259 Commits

Author SHA1 Message Date
JacobBarthelmeh
1468d77e50 Merge pull request #6644 from julek-wolfssl/zd/16441
TLSX_CA_Names_Parse: Verify the length of the extension
2023-07-31 16:03:23 -06:00
Juliusz Sosinowicz
854ae0dcdb Code review 2023-07-31 15:16:59 +02:00
Juliusz Sosinowicz
a495bb4e7f TLSX_CA_Names_Parse: make sure to do cleanup when smallstack is on 2023-07-28 16:34:35 +02:00
Dimitri Papadopoulos
6d9c85a762 Fix typos found by codespell 2023-07-27 23:38:44 +02:00
David Garske
c529b2f3aa Merge pull request #6627 from jpbland1/ocsp-nonce-usage-fix
fix bad & statement that was setting ocspSendNonce
2023-07-27 09:22:08 -07:00
JacobBarthelmeh
7c11c0f201 conversion warning flagged on Windows test builds 2023-07-26 13:48:33 -07: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
48434f7814 Merge pull request #6653 from julek-wolfssl/kerberos-update
Updates for Kerberos 5 1.21.1
2023-07-26 11:26:57 -06:00
Juliusz Sosinowicz
4a175ba280 Updates for Kerberos 5 1.21.1
- wolfssl_ec_point_mul: fix parameters being passed into ec_mul2add
- Compile in compressed ecc key parsing for OPENSSLALL
- Improve debugging around compat layer ecc operations
- wolfSSL_BN_div: dv can be NULL
- Add spake like computation test
- Add CI krb5 testing
- Add timeouts to CI
2023-07-26 16:40:38 +02:00
Juliusz Sosinowicz
5947c9ae8c TLSX_CA_Names_Parse: Verify the length of the extension 2023-07-26 13:32:37 +02:00
Juliusz Sosinowicz
5cf42244f0 Add comment back in 2023-07-26 12:04:11 +02:00
gojimmypi
31dfdf8360 TLS SM2, SM3, SM4-CBC: hash details for SM3 2023-07-25 17:25:11 -07: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
David Garske
c0b4cde6df Merge pull request #6632 from jpbland1/ocsp-want-read-error
OCSP_WANT_READ mishandled re-run
2023-07-25 08:23:46 -07:00
John Bland
a9c9662124 fix bad & statement that was setting ocspSendNonce
to 1 when WOLFSSL_OCSP_NO_NONCE was selected
related to but doesn't solve zd 16377
2023-07-24 16:51:10 -04: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
ab560aa6b8 Fix ClientHello parsing when no extensions are present 2023-07-24 09:14:21 +02: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
JacobBarthelmeh
2acc4a6dd5 Merge pull request #6561 from lealem47/zd16348
Fix for adding pkcs9 contentType entry name
2023-07-21 17:04:47 -06:00
JacobBarthelmeh
c2a3f5316d Merge pull request #6591 from embhorn/zd16296
Add CRL_REPORT_LOAD_ERRORS option
2023-07-21 17:00:23 -06:00
John Bland
2e4b651b87 update tls13 to handle an OCSP_WANT_READ, update
async client test to retry connect on OCSP_WANT_READ instead of timing out
2023-07-21 16:24:59 -04:00
Lealem Amedie
0cd5a293ca Fix for parsing pkcs9_contentType 2023-07-21 13:57:45 -06:00
Lealem Amedie
4821859bbc Fix for adding pkcs9 contentType entry name 2023-07-21 13:57:45 -06:00
Kareem
4bb907522b Fix wolfSSL_SMIME_write_PKCS7 not removing NULL characters between sections. 2023-07-21 11:08:15 -07:00
Eric Blankenhorn
f9cb9560c4 Add CRL_REPORT_LOAD_ERRORS option 2023-07-21 10:06:35 -05:00
Lealem Amedie
ec49e6b44d Avoid clash b/n two surname entries 2023-07-19 17:10:23 -06:00
Lealem Amedie
ec4527c789 address more feedback 2023-07-19 16:27:03 -06:00
Lealem Amedie
16058ce168 Address review comments 2023-07-19 12:01:01 -06: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
John Bland
9ea681030f change conditional compile to use WOLFSSL_NONBLOCK_OCSP
instead of HAVE_OCSP
2023-07-18 17:56:43 -04:00
John Bland
e12f1f44b4 make OCSP error entry conditional to cut down on size 2023-07-18 14:55:16 -04:00
John Bland
7ee38350c0 undo supressing the OCSP_WANT_READ error, instead
add it to the list of non-fatal errors so that a socket close alert wont be sent out but the caller still won't block and will instead get OCSP_WANT_READ as an error back from wolfSSL_connect
2023-07-18 14:05:16 -04:00
John Bland
80bc547853 in the event of a OCSP_WANT_READ, set the ssl->error
so that the re-run of DoHandShakeMsgType knows not to hash the certificate twice and won't send an alert to the server as it was when OCSP_WANT_READ instead of setting ret to 0
2023-07-18 13:00:53 -04: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
JacobBarthelmeh
517138806a Merge pull request #6613 from anhu/GENERAL_NAME_set0_value
Adding wolfSSL_GENERAL_NAME_set0_value() compat layer API.
2023-07-14 14:18:58 -06:00
Anthony Hu
933dae393e Make PRBs happy 2023-07-14 14:33:43 -04:00
Anthony Hu
31a02f194e Address review comments. 2023-07-14 12:09:14 -04: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
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
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
e3e0b4505c Fix for building ED25519 with WOLFSSL_NO_CLIENT_AUTH or NO_ED25519_CLIENT_AUTH set:
```
/wolfssl/src/ssl.c:6744:33: error: 'Options' has no member named 'cacheMessages'
 6744 |                     ssl->options.cacheMessages = 1;
      |
```
2023-07-13 13:53:04 -07:00
Anthony Hu
4ccd6dfbe1 Adding wolfSSL_GENERAL_NAME_set0_value() compat layer API. 2023-07-13 16:09:47 -04: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
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
Lealem Amedie
1329543b62 Other miscellaneous fixes 2023-07-11 13:27:37 -06:00
David Garske
8f36f78e6c Merge pull request #6400 from bandi13/ARIA-cipher
Aria cipher
2023-07-11 09:50:42 -07:00