18131 Commits

Author SHA1 Message Date
David Garske
d72b401e8e
Merge pull request #5545 from icing/evp_chacha
Add ChaCha20 as available cipher in the EVP API.
2022-09-06 10:42:54 -07:00
Eric Blankenhorn
dcf215d52c Fix warning in DecodeAltNames 2022-09-06 11:33:30 -05:00
David Garske
e2de8f3b6c
Merge pull request #5554 from rizlik/dtls_cid_fix
fix: dtls13: do not negotiate ConnectionID in HelloRetryRequest
2022-09-06 09:28:25 -07:00
David Garske
7b0128f9ac
Merge pull request #5541 from SparkiDev/ecc_sign_k_nondyn
ECC sign_k: don't have it dynamically allocated
2022-09-06 07:52:45 -07:00
David Garske
1a3c34ea99
Merge pull request #5557 from SparkiDev/sp_rsa_max_fix
RSA max and SP_INT_BITS: disabled RSA fix
2022-09-06 07:52:18 -07:00
Juliusz Sosinowicz
a33368f314
Merge pull request #5516 from embhorn/zd14732 2022-09-06 13:51:58 +02:00
Stefan Eissing
5927c4063a Removing FIXME comments after the fixing has been done. doh. 2022-09-06 10:06:02 +02:00
Stefan Eissing
9b319b3782 Remove dependency on POLY1305 on testing CHACHA20 only. 2022-09-06 10:06:02 +02:00
Stefan Eissing
9f47999002 Add ChaCha20 as available cipher in the EVP API.
- wire the wc_ChaCha_* implementation into the EVP API
  as `wolfSSL_EVP_chacha20`
- follow IV conversions of OpenSSL
- add test case
- have QUIC support use this for header protection when
  CHACHA20_POLY1305 has been negotiated in the handshake.
2022-09-06 10:06:02 +02:00
Sean Parkinson
4b12d2f4ec RSA max and SP_INT_BITS: disabled RSA fix
Checking WOLFSSL_MAX_RSA_BITS against SP_INT_BITS even though RSA is
disabled.

/configure --disable-shared --enable-sp --enable-sp-math --disable-rsa
--disable-dh --enable-ecc
2022-09-06 17:15:22 +10:00
David Garske
483d7189c7
Merge pull request #5512 from SparkiDev/tls13_64bit_milli
Make time in milliseconds 64-bits
2022-09-05 16:19:03 -07:00
David Garske
31b8edd192
Merge pull request #5552 from SparkiDev/ed_make_key_fixes
Ed make public key wasn't checking whether private key set
2022-09-05 16:13:41 -07:00
Sean Parkinson
e7dbb5b375
Merge pull request #5548 from dgarske/whitespace
Whitespace cleanup
2022-09-06 07:54:29 +10:00
Marco Oliverio
aee81764f2 fix: dtls13: do not negotiate ConnectionID in HelloRetryRequest 2022-09-05 17:00:09 +02:00
Stanislav Klima
38781bd7cf added testing for wolfSSL_set_cipher_list_bytes() 2022-09-05 16:57:07 +02:00
Kaleb Himes
e76361d544
Merge pull request #5551 from SparkiDev/sha3_asm_fix
SHA-3: check BMI1 availablity for ASM
2022-09-05 05:03:52 -06:00
Sean Parkinson
f153e65102 SHA-3: check BMI1 availablity for ASM
Added benchmarking of SHAKE128 and SHAK256.
2022-09-05 14:11:02 +10:00
Sean Parkinson
f807c70637 Ed make public key wasn't checking whether private key set
Ed25519 and Ed448 make public key APIs now check whether the private key
was set.
The private key and public key flags setting and clearing also updated.
Testing of unset private key and calling make public key added for
Ed25519 and Ed448.
2022-09-05 12:21:51 +10:00
kaleb-himes
49065373aa Merge branch 'fix_sha256_debug' of github.com:gojimmypi/wolfssl 2022-09-04 19:26:38 -06:00
Sean Parkinson
4ac113d135 ECDSA sign_k allocated when not WOLFSSL_NO_MALLOC
Fix up other WOLFSSL_NO_MALLOC issues.
2022-09-05 10:56:17 +10:00
Sean Parkinson
b95df7529c Improve usage of 64-bit implementation of TimeNowInMilli
Change to use 64-bits for types stored - use WOLFSSL_32BIT_MILLI_TIME if
a 64-bit type is not available.
TimeNowInMill() returns 0 on error instead of GETTIME_ERROR.
2022-09-05 10:47:25 +10:00
David Garske
aa036b6ea4
Merge pull request #5532 from anhu/sphincs
Add sphincs to wolfCrypt.
2022-09-02 11:56:11 -07:00
David Garske
232a750cc2 Whitespace cleanup. 2022-09-02 09:54:17 -07:00
David Garske
4a8a11315b
Merge pull request #5536 from SparkiDev/sha3_x64
SHA-3 improvements
2022-09-02 09:46:14 -07:00
JacobBarthelmeh
8ca63b93a4
Merge pull request #5539 from dgarske/ocsp_async
Fix for async with OCSP non-blocking in `ProcessPeerCerts`
2022-09-02 10:42:09 -06:00
David Garske
11bb8b3dc4
Merge pull request #5543 from SparkiDev/rsa_max_size_fix
RSA max key size checks
2022-09-02 09:26:19 -07:00
Anthony Hu
10ce703d71 Add sphincs to wolfCrypt.
Note that we will not support sphincs in TLS so nothing above wolfcrypt changes.
2022-09-02 11:53:55 -04:00
Sean Parkinson
daadd4a1b7
Merge pull request #5540 from dgarske/socksz
Fixes for building with 32-bit and socket size sign/unsigned mismatch
2022-09-02 16:33:41 +10:00
Hayden Roche
959386422e Migrate async names from "test" to "software."
See async PR 52.
2022-09-01 17:53:18 -07:00
Sean Parkinson
3bf6baf596 RSA max key size checks
Detect when certificate's RSA public key size is too big and fail on
loading of certificate.
Fix unit test to only attempt to use 3072 bit RSA-PSS keys when
RSA_MAX_SIZE supports it.
2022-09-02 10:37:12 +10:00
Sean Parkinson
cef590131a ECC sign_k: don't have it dynamically allocated 2022-09-02 09:18:42 +10:00
Sean Parkinson
23fd6456c2
Merge pull request #5534 from dgarske/zd14420
Fix for async session tickets
2022-09-02 08:50:35 +10:00
Sean Parkinson
ef451d316c Make time in milliseconds 64-bits
Allow for longer session ticket lives.
2022-09-02 08:45:07 +10:00
David Garske
f530101ef1 Fix for async with OCSP non-blocking in ProcessPeerCerts. ZD 14754. 2022-09-01 14:39:52 -07:00
Stefan Eissing
65ca72c5a2
Improve EVP support for CHACHA20_POLY1305 (#5527)
* Add test case for OpenSSLs capability to init a evp context partially in several calls.
* EVP handling of CHACHA20_POLY1305 improvment
- save key at ctx for Init()s without IV
- reuse stored key for Init()s with new IV, reusing ctx
- free and zero key on ctx clenaup
* Adding type cast to XMALLOC to force compiler compatibility.
* EVP: using same DYNAMIC_TYPE in alloc and free of chacha20_poly1305 key.
Co-authored-by: Stefan Eissing <stefan.eissing@greenbytes.de>
2022-09-01 13:23:42 -07:00
David Garske
2695f36642 Fixes for building with 32-bit and socket size sign/unsigned mismatch.
Tested with: `./configure --enable-all CFLAGS="-m32 -DXSOCKLENT=int" LDFLAGS="-m32" && make`
2022-09-01 11:39:34 -07:00
David Garske
ba8ffc765d
Merge pull request #5513 from rizlik/hrr_default
DTLSv1.3: Do HRR Cookie exchange by default
2022-09-01 07:45:18 -07:00
David Garske
0222833f7e
Merge pull request #5535 from douzzer/20220831-analyzer-coddling
20220831-analyzer-coddling
2022-09-01 07:40:11 -07:00
Daniel Pouzzner
8ccef9f0d3
Merge pull request #5531 from embhorn/zd14665
Check return from call to wc_Time
2022-09-01 09:35:49 -05:00
Marco Oliverio
08b89fbef9 server: add optional argument to -J disable hrr cookie 2022-09-01 09:37:35 +02:00
Marco Oliverio
401cfbd8e4 dtls13: enable hrr cookie by default 2022-09-01 09:37:35 +02:00
Marco Oliverio
edd723cc84 ssl: add new wolfSSL_disable_hrr_cookie() API to disable hrr cookie
Add a way to disable hrr cookie so it can be enabled by default for DTLS
connections.
2022-09-01 09:37:34 +02:00
Sean Parkinson
ce8959ea77 SHA-3 improvements
Add x86_64 assembly code:
  - BMI2
  - AVX2 (using ymm, slower than BMI2)
  - AVX2 of 4 similtaneous hashes
Add SHAKE128 functions and tests.
Add Absorb and Squeeze functions for SHAKE128 and SHAK256 and tests.
Add doxygen for SHA-3 and SHAKE functions.
Update other generated x86_64 assembly files to include settings.h.
2022-09-01 17:11:58 +10:00
Daniel Pouzzner
ea3959f2f6 analyzer coddling:
in api.c test_wolfSSL_dtls12_fragments_spammer(), inhibit clang-analyzer-deadcode.DeadStores;

in asn.c ParseCRL_Extensions() old (!WOLFSSL_ASN_TEMPLATE) version, fix bounds check to prevent overshift;

in misc.c ctMaskCopy(), use `*(x + i)`, not x[i], to tiptoe around cppcheck-2.9 objectIndex bug.
2022-08-31 22:56:08 -05:00
David Garske
db6d69143e
Merge pull request #5533 from lealem47/crlPrintFix
Add missing DN nid to work with PrintName()
2022-08-31 18:32:55 -07:00
David Garske
fe583faf32
Merge pull request #5501 from haydenroche5/ecc_non_block
Add support for non-blocking ECC key gen and shared secret gen for P-256/384/521.
2022-08-31 18:31:28 -07:00
David Garske
96ab26e6e9 Fix for async session tickets. ZD14420
```
./configure --enable-all --enable-asynccrypt CFLAGS="-DWOLFSSL_NO_DEF_TICKET_ENC_CB" && make
./examples/server/server -v 4 -r &
./examples/client/client -v 4 -r
```
2022-08-31 15:28:49 -07:00
Lealem Amedie
2df1c25263 Add missing DN nid to work with PrintName() 2022-08-31 15:18:12 -07:00
Hayden Roche
41207f5d9b Add support for non-blocking ECC key gen and shared secret gen for
P-256/384/521.

New functions:

- sp_ecc_make_key_256_nb
- sp_ecc_make_key_384_nb
- sp_ecc_make_key_521_nb
- sp_ecc_secret_gen_256_nb
- sp_ecc_secret_gen_384_nb
- sp_ecc_secret_gen_521_nb

This commit also tweaks the testing for ECDSA testing in test.c. Instead of
testing with one of P-256/384/521, we test with all that are available.
2022-08-31 14:34:26 -07:00
David Garske
38e4ecc27c
Merge pull request #5529 from anhu/wextra
Fix Windows CMakeList compiler options
2022-08-31 14:04:24 -07:00