Daniel Pouzzner
239b85c804
Merge pull request #8323 from JacobBarthelmeh/release
...
prepare for release 5.7.6
2024-12-31 11:58:22 -06:00
JacobBarthelmeh
70e41d1ed1
prepare for release 5.7.6
2024-12-31 08:27:53 -07:00
Daniel Pouzzner
d40698a103
Merge pull request #8322 from JacobBarthelmeh/coverity
...
fix for dead code warning CID444417
2024-12-30 17:56:28 -06:00
JacobBarthelmeh
c9bcbd8c52
fix for dead code warning CID444417
2024-12-30 16:14:28 -07:00
David Garske
8d7c60017c
Merge pull request #8263 from JacobBarthelmeh/rsa_pss
...
account for rsa_pss_rsae vs rsa_pss_pss type
2024-12-28 13:47:30 -08:00
JacobBarthelmeh
af4b5c2097
only run RSA-PSS interop test if cipher suites with ephemeral keys are available
2024-12-28 11:34:17 -08:00
JacobBarthelmeh
1ae0f7c66f
do not do resume with new test case
...
add wolfssl_no_resume flag to openssl.test
check for version of openssl testing against
check if RSA is supported for test case
guard on test case for TLS versions supported
2024-12-28 02:09:49 -08:00
David Garske
2e8f0176c9
Merge pull request #8316 from JacobBarthelmeh/x509ref
...
Up X509 refrence count and add test case
2024-12-27 10:37:28 -08:00
JacobBarthelmeh
3ee08d81db
fix for check on number of objects when free'ing and add test case
2024-12-27 08:09:03 -08:00
David Garske
5c6fdb52f1
Merge pull request #8319 from philljj/fix_coverity
...
coverity: correct lock message, check fd value.
2024-12-26 12:53:36 -08:00
JacobBarthelmeh
f57f044b39
Merge pull request #8318 from dgarske/CID444418
...
Fix for finishedSz checking with TLSv1.3 and `WOLFSSL_HAVE_TLS_UNIQUE` (CID444418)
2024-12-24 15:41:25 -07:00
jordan
c71392bb7e
coverity: correct lock message, check fd value.
2024-12-24 16:31:16 -06:00
David Garske
e1baf27831
CID444418. Fix for finishSz checking with TLSv1.3 and WOLFSSL_HAVE_TLS_UNIQUE.
2024-12-24 13:38:57 -08:00
JacobBarthelmeh
17c17cde13
Merge pull request #8317 from night1rider/CID_444416
...
Free Val and Oid before returning error
2024-12-24 10:38:26 -07:00
JacobBarthelmeh
838fe22e61
Merge pull request #8314 from SparkiDev/aarch64_no_crypto_fallback
...
Aarch64 ASM: check CPU features before hw crypto instr use
2024-12-24 10:15:23 -07:00
JacobBarthelmeh
98d212d60b
Merge pull request #8315 from SparkiDev/regression_fixes_16
...
Regression testing fixes
2024-12-24 09:56:20 -07:00
msi-debian
545257e498
CID 444416
2024-12-24 09:35:40 -07:00
JacobBarthelmeh
3aa2881cd4
account for rsa_pss_rsae vs rsa_pss_pss type
2024-12-23 23:45:33 -07:00
Sean Parkinson
cad2ebde04
Regression testing fixes
...
test.c: Dilithium private key not available in cert_test.h unless
signing is enabled.
./configure --disable-shared --enable-dilithium=make,44,65,87
./configure --disable-shared --enable-dilithium=make,sign,44,65,87
./configure --disable-shared --enable-dilithium=make,verify,44,65,87
test.c: Dilithium doesn't have decode/encode when
WOLFSSL_DILITHIUM_NO_ASN1 is defined.
./configure --disable-shared --enable-dilithium=yes
CFLAGS=-DWOLFSSL_DILITHIUM_NO_ASN1
2024-12-24 13:55:21 +10:00
Sean Parkinson
e1851cd482
Aarch64 ASM: check CPU features before hw crypto instr use
...
For SHA-256, SHA-512 and SHA3, get the CPU features to see if hardware
crypto is available. If not then fallback to an alternate
implementation.
2024-12-24 12:08:12 +10:00
Sean Parkinson
93812e4286
Merge pull request #8289 from JacobBarthelmeh/harden
...
add option for additional sanity checks
2024-12-24 09:17:08 +10:00
JacobBarthelmeh
ee9b88541f
change default to no for --enable-faultharden
2024-12-23 13:51:30 -07:00
Daniel Pouzzner
a13d0fdd86
Merge pull request #8311 from SparkiDev/aarch64_cpuid_fix
...
Aarch64 CPU id: fix for privilege instruction detection
2024-12-23 11:52:14 -06:00
JacobBarthelmeh
2409971b14
Merge pull request #8224 from julek-wolfssl/dtls-server-demux
...
DTLS: Add server side stateless and CID QoL API
2024-12-23 10:01:01 -07:00
JacobBarthelmeh
36d5342f6b
Merge pull request #8310 from douzzer/20241221-wolfCrypt-more-AES_BLOCK_SIZE
...
20241221-wolfCrypt-more-AES_BLOCK_SIZE
2024-12-23 09:26:05 -07:00
Sean Parkinson
e7d7e47e07
Aarch64 CPU id: fix for privilege instruction detection
...
AES/PMULL is in four bits 4-7.
When value is 0b0010, this indicates both AES and PMULL. Fix code to set
both.
2024-12-23 11:23:14 +10:00
David Garske
2bcad989da
Merge pull request #8309 from douzzer/20241221-fix-CEscape-bounds-check
...
20241221-fix-CEscape-bounds-check
2024-12-21 14:51:46 -08:00
Daniel Pouzzner
50a0773c09
Merge pull request #8285 from LinuxJedi/gaisler
...
Add initial support for Gaisler-BCC with Sparc
2024-12-21 11:03:39 -06:00
Daniel Pouzzner
ed18bf3deb
In wolfcrypt/src/port/ and IDE/, replace remaining uses of AES_BLOCK_SIZE with WC_AES_BLOCKSIZE for compatibility with OPENSSL_COEXIST.
...
Automated replacement with
```
git ls-files -z wolfcrypt/src/port/ IDE/ | xargs -0 pcre2grep -l '[^_]AES_BLOCK_SIZE' | xargs sed --regexp-extended --in-place 's/([^_])AES_BLOCK_SIZE/\1WC_AES_BLOCK_SIZE/g'
```
Checked for mis-transformations with
```
git ls-files -z | xargs -0 pcre2grep '[^-[()+*/[:space:]]WC_AES_BLOCK_SIZE' | less
```
Checked for residual hits with
```
git ls-files -z | xargs -0 pcre2grep '[^_]AES_BLOCK_SIZE' | less
```
Deliberately excluded:
* ChangeLog.md -- do not alter history.
* doc/ -- do not confuse documentation with newly prefixed macro, because AES_BLOCK_SIZE is available unless -DOPENSSL_COEXIST.
* tests/api.c -- the unit tests deliberately use compatibility names, and are not compatible with -DOPENSSL_COEXIST.
* wrapper/CSharp/wolfSSL_CSharp/wolfCrypt.cs -- false positive hits on C# names.
* wrapper/CSharp/wolfCrypt-Test/wolfCrypt-Test.cs -- false positive hits on C# names.
* reference in wolfssl/wolfcrypt/aes.h that defines AES_BLOCK_SIZE when -UOPENSSL_COEXIST.
* reference in wolfssl/wolfcrypt/settings.h that defines WC_AES_BLOCK_SIZE for old FIPS when -UWC_AES_BLOCK_SIZE.
2024-12-21 10:28:18 -06:00
Daniel Pouzzner
4ff73b9024
wolfssl/wolfcrypt/aes.h: fix stray reference to AES_BLOCK_SIZE in def for GHASH_ONE_BLOCK().
2024-12-21 10:08:17 -06:00
Daniel Pouzzner
33a47c1c04
Merge pull request #8265 from JacobBarthelmeh/armasm
...
armasm with opensslcoexist build
2024-12-21 10:06:27 -06:00
Daniel Pouzzner
b07f2cb461
wolfcrypt/src/coding.c: fix incorrect array bounds check in CEscape(), introduced in 8bbe8a7c8a (before which there was no bounds check at all).
2024-12-21 09:47:07 -06:00
Andrew Hutchings
231cea34ef
Add initial support for Gaisler-BCC with Sparc
...
Slight modifications and documentation to get wolfSSL working with
Gaisler Sparc CPUs and their cross-compilers.
2024-12-21 09:19:58 +00:00
Daniel Pouzzner
ad20593569
Merge pull request #8279 from LinuxJedi/sk_push_comments
...
Fix code comments for some x509.c functions
2024-12-21 00:09:18 -06:00
Daniel Pouzzner
67800c3a22
Merge pull request #8292 from JacobBarthelmeh/xsocktlen
...
set dk-s7g2 socklent
2024-12-21 00:01:33 -06:00
Daniel Pouzzner
5ef4732745
Merge pull request #8299 from JacobBarthelmeh/cert_regen
...
end of year test certificate renewal
2024-12-20 17:41:33 -06:00
Daniel Pouzzner
9d3e477b63
src/ssl.c: gate wolfSSL_dtls_set_pending_peer() on !defined(WOLFSSL_NO_SOCK), not just defined(WOLFSSL_DTLS_CID).
...
tests/api.c: in test_dtls12_basic_connection_id(), omit chacha20 suites if defined(HAVE_FIPS), and fix gate on DHE-PSK-NULL-SHA256.
2024-12-20 17:24:13 -06:00
Daniel Pouzzner
afc7e0eb8c
Merge pull request #8308 from cconlon/sessTickLenCheck
...
Remove dead code in TLSX_PopulateExtensions() around MAX_PSK_ID_LEN check
2024-12-20 16:41:09 -06:00
JacobBarthelmeh
961453b5ee
fix for free'ing up memory after use
2024-12-20 14:58:57 -07:00
JacobBarthelmeh
b273bff4e9
regenerate certs_test.h with raw dilithium keys
2024-12-20 11:50:11 -07:00
JacobBarthelmeh
67f3343a5d
Merge pull request #8306 from SparkiDev/kyber_no_avx2_fix
...
ML-KEM/Kyber: fix kyber_prf() for when no AVX2
2024-12-20 11:40:46 -07:00
JacobBarthelmeh
7cebe95138
Merge pull request #8304 from SparkiDev/regression_fixes_15
...
Regression testing: fixes
2024-12-20 11:29:15 -07:00
JacobBarthelmeh
3dd9f4631d
Merge pull request #8305 from kareem-wolfssl/zd19044
...
Fix a couple of missing bounds checks found via code analyzer.
2024-12-20 11:20:19 -07:00
JacobBarthelmeh
19e68ea71a
add a faketime test and update cert buffers
2024-12-20 10:35:58 -07:00
Chris Conlon
f68f99b000
Remove dead code in TLSX_PopulateExtensions() around MAX_PSK_ID_LEN check
2024-12-20 09:48:01 -07:00
Sean Parkinson
e507c466d5
ML-KEM/Kyber: fix kyber_prf() for when no AVX2
...
When no AVX2 available, kyber_prf() is called to produce more than one
SHAKE-256 blocks worth of ouput. Otherwise only one block is needed.
Changed function to support an outlen of greater than one block.
2024-12-20 11:03:58 +10:00
Kareem
8bbe8a7c8a
Fix a couple of missing bounds checks found via code analyzer.
2024-12-19 17:01:25 -07:00
Sean Parkinson
b7c1e1cf35
Regression testing: fixes
...
src/x509.c: wolfssl_x509_name_entry_set() ne->object is freed if call to
wolfSSL_OBJ_nid2obj_ex() fails. Always assign directly back to
ne->object.
wolfcrypt/test/test.c: aes_ctr_test() doesn't need AES decrypt
./configure '--disable-shared' '--enable-cryptonly'
'CFLAGS=-DNO_AES_DECRYPT' '--disable-aescbc' '--disable-aesofb'
'--disable-aescfb' '--disable-aesgcm' '--disable-aesccm'
'--enable-aesctr' '--disable-aesxts' '--disable-aeseax'
tests/api.c: test_X509_STORE_InvalidCa() only defined when !NO_RSA
./configure '--disable-shared' '--enable-opensslall' '--disable-rsa'
tests/api.c: test_wolfSSL_GENERAL_NAME_print() free ridObj if not
assigned into gn.
2024-12-20 09:25:03 +10:00
Sean Parkinson
00f83facb2
Merge pull request #8302 from cconlon/sessTickLenCheck
...
Loosen MAX_PSK_ID_LEN check in TLSX_PopulateExtensions() to only server side
2024-12-20 08:44:10 +10:00
JacobBarthelmeh
8ca790218c
certs_test.h is using raw dilithium keys
2024-12-19 15:23:37 -07:00
Daniel Pouzzner
ad8f74b650
examples/client/client.c and examples/client/client.c: use XSTRLCPY() to assure proper null termination.
2024-12-19 16:14:59 -06:00
JacobBarthelmeh
8fa238e554
Merge pull request #8301 from douzzer/20241219-gating-fixes
...
20241219-gating-fixes
2024-12-19 14:38:55 -07:00
JacobBarthelmeh
5b6ffe0795
add *.revoked to codespell skip
2024-12-19 14:35:43 -07:00
JacobBarthelmeh
abc87f9c6f
add regression test for gencertbuf.pl
2024-12-19 14:32:46 -07:00
Chris Conlon
1101841b95
Loosen MAX_PSK_ID_LEN check in TLSX_PopulateExtensions() to only server side
2024-12-19 14:26:22 -07:00
JacobBarthelmeh
e66905aaf6
fix for gencertbuf script and add dilithium public key
2024-12-19 14:25:12 -07:00
Daniel Pouzzner
994f218fcb
src/ssl.c and wolfssl/internal.h: gate in wolfSSL_get_ciphers_compat() in OPENSSL_EXTRA builds, so that --with-sys-crypto-policy works with OPENSSL_EXTRA but without OPENSSL_ALL.
...
configure.ac: more fixes for FIPS v6 armasm settings, re ENABLED_ARMASM_CRYPTO.
2024-12-19 14:29:39 -06:00
Juliusz Sosinowicz
ca4b1667ee
strcpy -> strncpy
2024-12-19 11:19:47 +01:00
Juliusz Sosinowicz
feff68d4fd
Increase buffer to make room for \0
2024-12-19 11:01:27 +01:00
Daniel Pouzzner
836ee1cbd5
Merge pull request #8298 from lealem47/zd18920
...
Printing the rfc822Mailbox x509 attribute
2024-12-18 22:19:32 -06:00
Daniel Pouzzner
ed76d8ea10
Merge pull request #8297 from miyazakh/ra_jankins
...
Fix RA6M4 jankins failure
2024-12-18 22:18:43 -06:00
Daniel Pouzzner
be2e779280
Merge pull request #8205 from philljj/fedora_crypto_policy
...
fedora crypto-policies: initial support.
2024-12-18 20:54:36 -06:00
JacobBarthelmeh
a5f9ec67c9
Merge pull request #8251 from gojimmypi/pr-post-release-bdd62314-espressif
...
Espressif Managed Component wolfSSL 5.7.4 post-release update
2024-12-18 16:45:33 -07:00
JacobBarthelmeh
df3897d39f
adjust tests after cert renewal
2024-12-18 16:19:51 -07:00
JacobBarthelmeh
e998dda1db
update test certs to have v3
2024-12-18 16:12:08 -07:00
JacobBarthelmeh
4ed14af331
if no extensions are present a v1 certificate was generated, add a SKID extension to avoid that
2024-12-18 16:11:18 -07:00
jordan
b5c47d27e0
fedora crypto-policies: initial support.
2024-12-18 16:56:36 -06:00
JacobBarthelmeh
bf6ef15be4
update test certificates in header file
2024-12-18 14:27:26 -07:00
JacobBarthelmeh
28184dd8cc
update certificates in certs directory
2024-12-18 14:26:15 -07:00
David Garske
afff48f0d6
Merge pull request #8253 from douzzer/20241204-more-C89-expansion
...
20241204-more-C89-expansion
2024-12-18 10:44:18 -08:00
Daniel Pouzzner
122502e2b1
wolfCrypt -Wconversion expansion: fix numerous warnings, all benign, from -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion.
2024-12-18 11:51:06 -06:00
Juliusz Sosinowicz
9cb75ef5f8
fixup! DTLS: Add server side stateless and CID QoL API
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
fe9a5fcd42
fixup! Code review and jenkins fixes
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
faa7b8dfaa
wolfSSLReceive: Error return on interrupted connection
...
Interrupted connection should return control to the user since they may want to handle the signal that caused the interrupt. Otherwise, we might never give back control to the user (the timeout would error out but that causes a big delay).
socat.yml: in test 475, the test would send a SIGTERM after 3 seconds. We would continue to ignore this signal and continue to call `recvfrom`. Instead we should error out and give control back to the user.
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
a1ee953411
Protect peer access when WOLFSSL_RW_THREADED
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
4795e0d920
Refactor dtls pending peer processing
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
3ded2bc05d
Code review and jenkins fixes
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
71337d2959
Client TLS: Set traffic decrypt keys when parsing Finished
2024-12-18 09:31:25 +01:00
Juliusz Sosinowicz
daa57c492d
DTLS: Add server side stateless and CID QoL API
...
- wolfDTLS_accept_stateless - statelessly listen for incoming connections
- wolfSSL_inject - insert data into WOLFSSL object
- wolfSSL_SSL(Enable|Disable)Read - enable/disable reading from IO
- wolfSSL_get_wfd - get the write side file descriptor
- wolfSSL_dtls_set_pending_peer - set the pending peer that will be upgraded to regular peer when we successfully de-protect a DTLS record
- wolfSSL_dtls_get0_peer - zero copy access to the peer address
- wolfSSL_is_stateful - boolean to check if we have entered stateful processing
- wolfSSL_dtls_cid_get0_rx - zero copy access to the rx cid
- wolfSSL_dtls_cid_get0_tx - zero copy access to the tx cid
- wolfSSL_dtls_cid_parse - extract cid from a datagram/message
2024-12-18 09:31:24 +01:00
Sean Parkinson
ba050d6a3f
Merge pull request #8296 from douzzer/20241217-FIPS-v6-ENABLED_ARMASM_CRYPTO-fixes
...
20241217-FIPS-v6-ENABLED_ARMASM_CRYPTO-fixes
2024-12-18 15:27:08 +10:00
Lealem Amedie
651dab3dbf
Printing the rfc822Mailbox x509 attribute
2024-12-17 15:39:23 -07:00
Hideki Miyazaki
39c11c269f
Fix RA6M jankins failure
2024-12-18 07:37:21 +09:00
Daniel Pouzzner
60afdb557d
Merge pull request #8273 from dgarske/no_tls
...
Enable support for no TLS while allowing certificate manager
2024-12-17 16:24:57 -06:00
JacobBarthelmeh
613c1aa16d
fix for no malloc build
2024-12-17 14:47:45 -07:00
David Garske
356889a528
Add --disable-tls option that can be used with --enable-all to disable TLS features and set NO_TLS. Useful for allowing certificate manager and crypto compatibility API's only.
2024-12-17 13:40:03 -08:00
Daniel Pouzzner
f23a2f2f48
wolfcrypt/src/aes.c: add missing WOLFSSL_ARMASM gate clause around wolfCrypt_FIPS_aes_ro_sanity, necessitated by 514a92d6ee/#8293.
2024-12-17 14:17:52 -06:00
JacobBarthelmeh
87ae31b48f
some additional sanity checks with harden build
2024-12-17 12:47:42 -07:00
Daniel Pouzzner
7b57ef4912
configure.ac: fix faulty logic in FIPS v6 feature calculation re ENABLED_ARMASM_CRYPTO, originally added in 6e0a90190f.
2024-12-17 12:21:47 -06:00
David Garske
6151160e58
Further fixes with NO_TLS to support use with compatibility layer.
2024-12-17 09:24:38 -08:00
Kaleb Himes
fcbea85ded
Merge pull request #8291 from douzzer/20241213-fips-check-refactor-assoc-arrays
...
20241213-fips-check-refactor-assoc-arrays
2024-12-17 10:23:51 -07:00
David Garske
a2b5da8651
Fix nested NO_TLS.
2024-12-17 08:33:33 -08:00
David Garske
16b2884cf1
Fix issues in test_tls13_apis with no filesystem or no RSA/ECC.
2024-12-17 08:33:33 -08:00
David Garske
14e3372826
Enable support for using certificate manager only. Fixes for building without TLS enabled (NO_TLS). ZD 19054. Tested using ./configure --disable-tlsv12 --disable-tls13 CFLAGS="-DNO_TLS" && make check
2024-12-17 08:33:32 -08:00
Daniel Pouzzner
22e95081cd
Merge pull request #8181 from gojimmypi/dev-compiler-message
...
Initialize vars & change types to appease Windows/VS
2024-12-16 23:19:05 -06:00
Daniel Pouzzner
058138eb00
Merge pull request #8286 from julek-wolfssl/hostap-action-update
...
Use source hostap repo
2024-12-16 23:07:05 -06:00
Daniel Pouzzner
5aeabbfa3c
Merge pull request #8245 from julek-wolfssl/mbed-interop
...
Add CID interop with mbedtls
2024-12-16 23:04:19 -06:00
Daniel Pouzzner
9d7c02589f
Merge pull request #8276 from SparkiDev/ed448_muladd_full_reduce
...
EdDSA Ed448: sc_muladd now does full reduction
2024-12-16 20:29:49 -06:00
Daniel Pouzzner
a1035cf8df
Merge pull request #8294 from LinuxJedi/test_compile_issue
...
Fix compile issue with NO_WOLFSSL_DIR
2024-12-16 19:26:24 -06:00
Daniel Pouzzner
b5935f38d7
Merge pull request #8282 from SparkiDev/iphone_no_sha3_instrs
...
MacOS: allow SHA-3 instructions to be explicitly not used
2024-12-16 16:55:09 -06:00
Daniel Pouzzner
fd22bfc0b7
Merge pull request #8293 from SparkiDev/aarch64_no_crypto
...
Aarch64: make code compile when no hardware crypto avail
2024-12-16 14:57:53 -06:00
philljj
c5c607bc87
Merge pull request #8295 from douzzer/20241216-linuxkm-export-ns-quotes
...
20241216-linuxkm-export-ns-quotes
2024-12-16 12:37:21 -06:00
Daniel Pouzzner
6fbc18f0dc
linuxkm/Kbuild and linuxkm/module_exports.c.template: on kernel >=6.13, add quotes around the namespace arg to EXPORT_SYMBOL_NS_GPL() (upstream change actually made in 6.13-rc2).
2024-12-16 11:43:26 -06:00
Andrew Hutchings
61cb5b479f
Fix compile issue with NO_WOLFSSL_DIR
...
`test_wolfSSL_CTX_load_system_CA_certs()` would try to use DIR functions
when `NO_WOLFSSL_DIR` was used.
2024-12-16 17:23:49 +00:00
Sean Parkinson
514a92d6ee
Aarch64: make code compile when no hardware crypto avail
...
Detects availability of instructions for Aarch64.
2024-12-16 17:46:08 +10:00
Sean Parkinson
e3876fcab7
Merge pull request #8287 from JacobBarthelmeh/sigfault
...
fix for sig fault harden build
2024-12-16 09:04:29 +10:00
Daniel Pouzzner
7c5451c742
fips-check.sh fixes + enhancements:
...
* change default WOLFSSL_REPO to the canonical upstream.
* refactor tag calculation without bash associative arrays, for backward compat.
* add support for fetching FIPS tags/branches into a persistent fips repo if one is found at ../fips.
* use --shared in git clones where applicable.
* always check out the master FIPS branch, for its tooling, and always make sure it's up to date with $FIPS_REPO.
* after each fetch for a previously unknown tag, explicitly associate the tag with the FETCH_HEAD.
2024-12-13 21:36:40 -06:00
Daniel Pouzzner
4bdccac584
Merge pull request #8290 from wolfSSL/revert-8277-aarch64_no_crypto
...
Revert "Aarch64: make code compile when no hardware crypto avail"
2024-12-13 20:43:01 -06:00
JacobBarthelmeh
ad03518aa8
armasm with opensslcoexist build
2024-12-13 17:11:32 -07:00
JacobBarthelmeh
6442689d22
set dk-s7g2 socklent
2024-12-13 17:01:58 -07:00
David Garske
71325a2a32
Revert "Aarch64: make code compile when no hardware crypto avail"
2024-12-13 13:52:53 -08:00
JacobBarthelmeh
f0f50f1837
add option for additional sanity checks
2024-12-13 14:42:51 -07:00
JacobBarthelmeh
d7e40e7413
Merge pull request #8264 from dgarske/various_20241206
...
Various cleanups and fixes
2024-12-13 13:48:10 -07:00
JacobBarthelmeh
68e85ef33a
Merge pull request #8252 from anhu/use_srtp_retcode
...
wolfSSL_CTX_set_tlsext_use_srtp() should return 1 on failure and 0 up…
2024-12-13 13:35:49 -07:00
JacobBarthelmeh
e76e0e33fd
Merge pull request #8283 from rlm2002/enableAlwaysKeepSNI
...
WOLFSSL_ALWAYS_KEEP_SNI enabled by default with --enable-jni
2024-12-13 13:32:47 -07:00
JacobBarthelmeh
a22176af40
fix for sig fault harden build
2024-12-13 10:34:23 -07:00
Juliusz Sosinowicz
3407f21e69
Use source hostap repo
2024-12-13 17:12:23 +01:00
David Garske
79d9b2d6c3
Merge pull request #8277 from SparkiDev/aarch64_no_crypto
...
Aarch64: make code compile when no hardware crypto avail
2024-12-12 15:49:57 -08:00
Sean Parkinson
24bb2b7fab
Aarch64: make code compile when no hardware crypto avail
...
Detects availability of instructions for Aarch64.
2024-12-13 09:16:11 +10:00
Ruby Martin
b34a39a6bc
WOLFSSL_ALWAYS_KEEP_SNI enabled by default with --enable-jni
2024-12-12 15:49:47 -07:00
Sean Parkinson
2aacc7cd87
MacOS: allow SHA-3 instructions to be explicitly not used
...
Some iPads and iPhones don't support SHA-3 instructions.
Allow SHA-3 instructions to explicitly not be used for these devices.
2024-12-13 08:25:39 +10:00
Sean Parkinson
65fc8f8d77
Merge pull request #8280 from kareem-wolfssl/zd19046
...
Add support for the RFC822 Mailbox attribute.
2024-12-13 08:07:46 +10:00
Kareem
d4af181593
Add support for the RFC822 Mailbox attribute.
2024-12-12 12:37:32 -07:00
Andrew Hutchings
8ecbd3479e
Fix code comments for some x509.c functions
...
The return of `wolfSSL_sk_push` was changed, but some of the functions
that use it did not have their return comments updated appropriately.
2024-12-12 16:21:16 +00:00
Daniel Pouzzner
dd3012682a
Merge pull request #8278 from JacobBarthelmeh/settings
...
adjustments on sanity check of build
2024-12-11 17:04:58 -06:00
Daniel Pouzzner
1f1e985d73
Merge pull request #8268 from bandi13/fixMemleak
...
Fix memory leak
2024-12-11 16:35:38 -06:00
Sean Parkinson
c9c28335ae
EdDSA Ed448: sc_muladd now does full reduction
...
sc_muladd was reducing to word boundary and not to order.
Now reduces to order as last step.
2024-12-12 08:33:35 +10:00
Daniel Pouzzner
d825b08e16
Merge pull request #8275 from SparkiDev/aarch64_poly1305_fix
...
Aarch64 Poly1305: fix corner case
2024-12-11 16:24:36 -06:00
Daniel Pouzzner
88241f1a2c
Merge pull request #8267 from ColtonWilley/pkcs11_cert_support
...
PKCS11 cert support
2024-12-11 16:04:58 -06:00
Daniel Pouzzner
ee4366acc5
Merge pull request #8162 from redbaron/find-threads
...
CMAKE: look for pthreads when importing wolfSSL if required
2024-12-11 14:36:04 -06:00
Colton Willey
2039d6371f
Remove redundant NULL check
2024-12-11 12:25:35 -08:00
Daniel Pouzzner
2ea2e6bf59
Merge pull request #8233 from ColtonWilley/x509_store_add_cert_ref_count
...
Use proper ref count handling when adding to x509 store
2024-12-11 11:54:29 -06:00
JacobBarthelmeh
2749884fdc
defining custom config avoids warning of library builds pulling in options.h
2024-12-11 09:50:52 -07:00
JacobBarthelmeh
45992164d6
make new sanity check be a warning
2024-12-11 09:46:39 -07:00
Sean Parkinson
c0f3b433b2
Aarch64 Poly1305: fix corner case
...
Don't mask top 26 bits as it may have next bit set as reduction step was
only approximate.
2024-12-11 12:49:21 +10:00
Anthony Hu
762c36687f
Add a test.
2024-12-10 21:21:41 -05:00
Sean Parkinson
7ef328548d
Merge pull request #8274 from douzzer/20241210-update-wolfssl_known_macro_extras
...
20241210-update-wolfssl_known_macro_extras
2024-12-11 10:45:11 +10:00
JacobBarthelmeh
59ea24f915
Merge pull request #8225 from gojimmypi/pr-espressif-improve-sha-msg
...
Improve Espressif SHA HW/SW mutex messages
2024-12-10 17:30:03 -07:00
Daniel Pouzzner
6a05ba7cce
.wolfssl_known_macro_extras: regenerate
2024-12-10 17:20:24 -06:00
JacobBarthelmeh
1208a7499b
Merge pull request #8272 from douzzer/20241210-fixes
...
20241210-fixes
2024-12-10 13:35:09 -07:00
Daniel Pouzzner
d257a59087
add support for WOLFSSL_NO_OPTIONS_H:
...
* activate WOLFSSL_NO_OPTIONS_H in linuxkm/Kbuild for in-module test.o and benchmark.o.
* refine explanatory comments in settings.h re WOLFSSL_USE_OPTIONS_H, WOLFSSL_NO_OPTIONS_H, and WOLFSSL_CUSTOM_CONFIG.
* add safety catch to options.h/options.h.in to inhibit inclusion if defined(WOLFSSL_NO_OPTIONS_H).
* for good measure, add explicit check for WOLFSSL_NO_OPTIONS_H to wolfcrypt/benchmark/benchmark.c and wolfcrypt/test/test.c.
2024-12-10 13:02:37 -06:00
Colton Willey
00386c76bf
No redundant NULL check on free
2024-12-10 09:43:03 -08:00
JacobBarthelmeh
e443366748
Merge pull request #8270 from julek-wolfssl/actions-ubuntu-22.04
...
Revert to ubuntu-22.04
2024-12-10 09:14:00 -07:00
Juliusz Sosinowicz
1d2acd9de6
Revert to ubuntu-22.04
2024-12-10 16:27:41 +01:00
JacobBarthelmeh
0772cf692d
Merge pull request #8262 from embhorn/zd18968
...
Add sanity check for configuration method
2024-12-09 21:22:54 -07:00
Colton Willey
0c20a20acc
Use char instead of sword8, sanity length check on CKA_VALUE
2024-12-09 16:09:04 -08:00
Daniel Pouzzner
ba59f1af19
wolfssl/wolfcrypt/settings.h: use #warning, not #error, for "No configuration for wolfSSL detected, check header order", to avoid unnecessary breakage of old projects with nonstandard custom settings.
2024-12-09 17:04:38 -06:00
gojimmypi
7bc026540b
Improve Espressif SHA HW/SW mutex messages
2024-12-09 14:51:18 -08:00
Colton Willey
0cda59e00e
Add support for cert format in get cert crypto callback
2024-12-09 14:32:02 -08:00
David Garske
c4e319b092
Cleanup the gating for WOLFSSL_NO_AES_CFB_1_8.
2024-12-09 13:51:51 -08:00
Andras Fekete
ff66998575
Fix memory leak
2024-12-09 16:24:38 -05:00
Colton Willey
c83c9e68c9
Updates per review comments
2024-12-09 13:10:32 -08:00
Daniel Pouzzner
e248d8499a
move !defined(EXTERNAL_OPTS_OPENVPN) assert from src/internal.c to wolfssl/wolfcrypt/types.h with refinements; refine logic+message of assert in wolfssl/wolfcrypt/settings.h re "wolfssl/options.h included in compiled wolfssl library object..".
2024-12-09 15:02:41 -06:00
Colton Willey
324b87614e
Initial implementation for using PKCS11 to retrieve certificate for SSL CTX
2024-12-09 12:15:41 -08:00
Eric Blankenhorn
fcce09a4d3
Fix from review
2024-12-09 12:59:37 -06:00
Eric Blankenhorn
c77bea6691
Disable hitch OSP test
2024-12-09 12:45:54 -06:00
Eric Blankenhorn
3d0cc250b9
Add sanity check for configuration method
2024-12-09 12:03:25 -06:00
JacobBarthelmeh
67fb29a6f6
Merge pull request #8255 from julek-wolfssl/nss-interop
...
Add nss interop
2024-12-09 09:52:07 -07:00
David Garske
314f7575fa
Fixes for macro names.
2024-12-09 08:30:47 -08:00
Juliusz Sosinowicz
aa662ad50a
fix redirect order
2024-12-09 13:38:07 +01:00
Juliusz Sosinowicz
a3be826895
use unique key
2024-12-09 13:38:07 +01:00
Juliusz Sosinowicz
3275ebf54b
add shebang
2024-12-09 13:37:20 +01:00
Juliusz Sosinowicz
0961be7711
Add CID interop with mbedtls
2024-12-09 13:37:18 +01:00
Juliusz Sosinowicz
ba4d1e6815
Add nss interop
2024-12-09 12:42:32 +01:00
Juliusz Sosinowicz
0e8320347c
CID also supported in DTLS 1.2
2024-12-09 12:09:54 +01:00
David Garske
017f931f8b
Various cleanups and fixes:
...
* Fix to properly set configure.ac LMS/XMSS enables and build of those code files.
* Remove duplicate aes.c `wc_AesSetKeyLocal` call to `wc_AesSetIV`. Moved earlier in function in commit a10260ca5f .
* Benchmark missing time.h with NO_ASN_TIME.
* Added option to support disabling AES CFB 1/8 `WOLFSSL_NO_AES_CFB_1_8`.
* Fixes for building with combinations of `WOLFSSL_RSA_VERIFY_ONLY` and `WOLFSSL_RSA_PUBLIC_ONLY`.
* Fix for building `--enable-stacksize=verbose` with single threaded.
* Various tab and formatting cleanups.
ZD 18996
2024-12-06 16:45:33 -08:00
JacobBarthelmeh
f764dbeee1
Merge pull request #8254 from douzzer/20241204-WOLF_AGG_DUMMY_MEMBER
...
20241204-WOLF_AGG_DUMMY_MEMBER
2024-12-06 14:07:32 -07:00
Daniel Pouzzner
0ad072a34b
src/internal.c: in HashSkeData(), remove unneeded logically faulty nullness check around XFREE(ssl->buffers.digest.buffer, ...).
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
0381a47d7e
peer review: refactor HAVE_ANONYMOUS_INLINE_AGGREGATES and HAVE_EMPTY_AGGREGATES to conform to wolfssl convention -- defined() for true, !defined() for false -- while retaining ability for user override-off by passing in explicit 0 definition.
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
447d5ea6ee
fips-check.sh: add support for WOLFSSL_REPO and noautogen option; tweak git fetching to keep wolfssl and fips tags distinct, and fetch all needed tags by name to assure availability for checkout. also, hide stdout noise from pushd/popd.
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
aec0345f90
update fips-check.sh for cert #4718 : remap linuxv5 as an alias for linuxv5.2.1, and add linuxv5-RC12.
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
27e0df040f
src/ssl_crypto.c: revert FIPS gate threshold in wolfSSL_AES_decrypt() changed in d85c108952 -- original value was correct, misdiagnosed by faulty test.
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
3dcc12b30a
wolfssl/wolfcrypt/types.h and wolfssl/wolfcrypt/hash.h: define WOLF_AGG_DUMMY_MEMBER, pivoting on HAVE_EMPTY_AGGREGATES, and use WOLF_AGG_DUMMY_MEMBER in wc_Hashes.
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
37acac2eb3
configure.ac: fix SC1105 ("Shells disambiguate (( differently or not at all.").
2024-12-06 13:01:40 -06:00
Daniel Pouzzner
66c874bded
configure.ac: add --enable-fips=cert4718 alias for v5, and make --enable-fips=v5 set FIPS to 5.2.1; set DEF_FAST_MATH and DEF_SP_MATH to "no" when "yes" would conflict with user-supplied arguments.
2024-12-06 13:01:40 -06:00
JacobBarthelmeh
86b24ef6fa
Merge pull request #8261 from julek-wolfssl/libspdm-action
...
Add libspdm action
2024-12-06 11:44:14 -07:00
Juliusz Sosinowicz
6cede13478
Add libspdm action
...
Depends on https://github.com/wolfSSL/osp/pull/217
2024-12-06 17:12:06 +01:00
David Garske
0ed187e16d
Merge pull request #8256 from LinuxJedi/ADA-7461
...
Fix broken verify on Ada wrapper
2024-12-06 07:59:01 -08:00
Andrew Hutchings
158d62591f
Fix broken verify on Ada wrapper
...
The Ada wrapper had an `&` operator for the verification mode. This
effectively caused the verification mode to equal `0`.
The operator has been switched to `or` now, in addition, a getter has
been added to the API. This allows for the test I've added to the server
code to verify that it is being set correctly.
`OPENSSL_ALL` flag added to Ada so that the verify mode getter function
is compiled in.
Fixes #7461
Thanks to @dalybrown for reporting it.
2024-12-06 12:44:15 +00:00
gojimmypi
06c0c09940
Espressif Managed Component wolfSSL 5.7.4 post-release update
2024-12-05 21:46:33 -08:00
JacobBarthelmeh
20643577e6
Merge pull request #8258 from dgarske/get_verify
...
Expose compatibility get_verify functions with openssl_extra
2024-12-05 17:08:59 -07:00
David Garske
56ed6762d8
Expose compatibility get_verify functions with openssl_extra.
2024-12-05 12:10:51 -08:00
JacobBarthelmeh
1bfbdb6c7f
Merge pull request #8257 from dgarske/settings_h
...
Fix issue with wc_lms_impl.c or wc_lms not including settings.h
2024-12-05 11:43:43 -07:00
David Garske
1e9607b65e
Fixes for ML-DSA and LMS cast warnings and spelling errors.
2024-12-05 08:34:58 -08:00
JacobBarthelmeh
aa32027c26
Merge pull request #8236 from philljj/zephyr_thread_type
...
wc_port: change zephyr struct k_thread tid member to pointer.
2024-12-05 09:29:30 -07:00
David Garske
19b486e1f7
Fix issue with wc_lms_impl.c or wc_lms not including settings.h. Caused issue enabling LMS from user_settings.h.
2024-12-05 08:15:11 -08:00
Anthony Hu
ab384ee945
wolfSSL_CTX_set_tlsext_use_srtp() should return 1 on failure and 0 upon success.
...
Same with wolfSSL_set_tlsext_use_srtp().
See https://docs.openssl.org/1.1.1/man3/SSL_CTX_set_tlsext_use_srtp/
2024-12-05 10:40:40 -05:00
David Garske
bbf1a86c45
Merge pull request #8238 from anhu/dsa_win
...
build dsa in visual studio
2024-12-04 16:00:35 -08:00
JacobBarthelmeh
bdbaa525c8
Merge pull request #8248 from lealem47/comp_key_fips
...
Fix for Compressed Keys with FIPS
2024-12-04 13:51:06 -07:00
Colton Willey
c192cbabe8
Free x509 on fail to push
2024-12-04 10:33:58 -08:00
Daniel Pouzzner
35e50742db
Merge pull request #8249 from julek-wolfssl/sessionIDSz-fix
...
Add size checks to sessionID
2024-12-04 10:06:25 -06:00
Juliusz Sosinowicz
8ff79dc26e
Add size checks to sessionID
2024-12-04 11:56:16 +01:00
Lealem Amedie
3476425967
Fix for Compressed Keys with FIPS
2024-12-03 14:56:30 -07:00
David Garske
f7a55c6e76
Merge pull request #8247 from bandi13/fixEspressifTests
...
Fix test environment
2024-12-03 13:09:42 -08:00
Andras Fekete
03ece60fe3
Fix test environment
2024-12-03 15:13:53 -05:00
David Garske
fa6df90518
Merge pull request #8246 from douzzer/20241203-wolfSSL_CTX_flush_sessions-sessionIDSz
...
20241203-wolfSSL_CTX_flush_sessions-sessionIDSz
2024-12-03 11:26:15 -08:00
Colton Willey
c5acceca5d
Dont use specific free function
2024-12-03 09:55:43 -08:00
Colton Willey
20e8ecec75
Merge branch 'master' of github.com:ColtonWilley/wolfssl into x509_store_add_cert_ref_count
2024-12-03 09:52:34 -08:00
Daniel Pouzzner
547cdeac11
src/ssl_sess.c: in wolfSSL_CTX_flush_sessions(), add missing check of s->sessionIDSz, similar to the fix to TlsSessionCacheGetAndLock() in #8182 ( ef67b1c06a). also, add missing macro to .wolfssl_known_macro_extras.
2024-12-03 11:38:58 -06:00
Colton Willey
5684e56e0e
Always keep original x509 pointer with proper refcounts even for self signed trusted CA
2024-12-02 12:15:33 -08:00
JacobBarthelmeh
42afede3fc
Merge pull request #8235 from dgarske/fix_sp_rsa_publiconly
...
Fixes for building with SP RSA small and RSA Public only
2024-12-02 10:39:08 -07:00
JacobBarthelmeh
015d47b9cd
Merge pull request #8231 from LinuxJedi/STM32MP13
...
Add STM32MP13 HAL support for more SHA types
2024-12-02 10:18:38 -07:00
David Garske
ade917a977
Merge pull request #8241 from LinuxJedi/STM32MP13-Cube
...
Add STM32MP13 to Cube IDE
2024-11-29 08:37:02 -08:00
Andrew Hutchings
fbdb34a6e0
Add STM32MP13 to Cube IDE
2024-11-29 11:35:38 +00:00
Anthony Hu
3737c68797
build dsa in visual studio
2024-11-28 13:11:14 -05:00
David Garske
cf450a3f37
Fix STM32 example broken in #8143 .
2024-11-27 14:06:20 -08:00
jordan
a18f71c27b
wc_port: change zephyr struct k_thread tid member to pointer.
2024-11-27 16:05:48 -06:00
David Garske
9bec6da2ff
Merge pull request #8213 from JacobBarthelmeh/compat
...
adjustments to x509.h macro list
2024-11-27 13:35:14 -08:00
David Garske
57e1bf9fba
Fixes for building with SP RSA small and RSA Public only. ZD 18996
2024-11-27 13:26:45 -08:00
Colton Willey
c5df3cb6b6
Use proper ref count handling when adding to x509 store
2024-11-27 10:38:32 -08:00
JacobBarthelmeh
fbaabbe2e9
Merge pull request #8230 from douzzer/20241126-FIPS-OPENSSL_COEXIST
...
20241126-FIPS-OPENSSL_COEXIST
2024-11-27 11:33:06 -07:00
Andrew Hutchings
f15dbb9110
Add STM32MP13 HAL support for more SHA types
...
This adds STM32 HAL support for:
* SHA384
* SHA512 (with -224 and -256)
* SHA3 (all variants apart from SHAKE)
The partial FIFO block calculations have been adjusted based in the
STM32 code to support the larger hash sizes.
This should work with other chips such as the STM32U5xx, but is not
enabled for that yet.
2024-11-27 15:04:45 +00:00
Juliusz Sosinowicz
e9a4f7de5f
Merge pull request #8226 from ColtonWilley/x509_store_fix_get_objects
...
Fix wolfSSL_X509_STORE_get0_objects to handle no CA
2024-11-27 10:29:06 +01:00
Daniel Pouzzner
b65d3fff56
fixes for OPENSSL_COEXIST with FIPS and with/without TEST_OPENSSL_COEXIST.
2024-11-26 19:38:32 -06:00
JacobBarthelmeh
5e13fc2c84
Merge pull request #7410 from SparkiDev/sp_arm_big_endian
...
SP: big-endian support
2024-11-26 17:05:53 -07:00
JacobBarthelmeh
d620e937f0
Merge pull request #8229 from bigbrett/pqc-macro-protection-quickfix
...
PQC macro protection quickfixes
2024-11-26 17:02:17 -07:00
András Fekete
e7d801e8d0
Merge pull request #8228 from douzzer/20241126-WC_NO_COMPAT_AES_BLOCK_SIZE
...
20241126-WC_NO_COMPAT_AES_BLOCK_SIZE
2024-11-26 15:48:41 -05:00
JacobBarthelmeh
70d595478c
Merge pull request #8227 from douzzer/20241125-linuxkm-aarch64-pie
...
20241125-linuxkm-aarch64-pie
2024-11-26 13:31:01 -07:00
Brett Nicholas
1283325f65
wolfhsm-mldsa-fixes
2024-11-26 12:26:01 -08:00
Daniel Pouzzner
c6df620f81
wolfssl/wolfcrypt/aes.h: #define WC_NO_COMPAT_AES_BLOCK_SIZE in OPENSSL_COEXIST builds. see comment in source code with usage instructions.
2024-11-26 13:09:39 -06:00
David Garske
29dc0f5d0b
Merge pull request #8223 from LinuxJedi/STM32MP1
...
Initial support for STM32MP13 HAL
2024-11-26 09:34:04 -08:00
Andrew Hutchings
5d0ee8c9f3
Initial support for STM32MP13 HAL
...
This adds support for the STM32MP13 HAL, tested on the STM32MP135F MPU.
Using the HAL this modifies our previous RNG, AES-CBC, AES-GCM, HASH,
ECDSA and DES3 ST HAL acceleration to work with the MPU. It also works
around bugs found in the AES-GCM code of the HAL.
The HAL does not appear to have support for MD5 HASH at the moment, so
this has been given a flag to disable it on this MPU.
2024-11-26 14:15:57 +00:00
Daniel Pouzzner
7dcec3e62f
linuxkm: work around aarch64 dependency on alt_cb_patch_nops for enable-linuxkm-pie (FIPS support).
2024-11-26 00:12:29 -06:00
JacobBarthelmeh
ea8c7c8322
Merge pull request #8214 from bandi13/fixDockerWarnings
...
Use proper capitalization
2024-11-25 16:43:24 -07:00
JacobBarthelmeh
02432990dc
Merge pull request #8210 from night1rider/devcrypto-authtag-error
...
/dev/crypto auth error fix/adjustment for benchmark
2024-11-25 16:42:58 -07:00
Colton Willey
5460ba815b
Fix wolfSSL_X509_STORE_get0_objects to handle case where no CA has been loaded
2024-11-25 14:51:29 -08:00
David Garske
71abfa3b15
Merge pull request #8216 from douzzer/20241122-opensslcoexist-expansion
...
20241122-opensslcoexist-expansion
2024-11-25 14:22:03 -08:00
night1rider
02e6ec0c86
devcrypto auth error fix/adjustment
2024-11-25 14:43:12 -07:00
Daniel Pouzzner
fc7ba562d7
Merge pull request #8215 from kaleb-himes/SRTP-KDF-SCRIPT
...
Add SRTP-KDF (v6.0.0) to checkout scipt
2024-11-25 13:07:05 -06:00
kaleb-himes
8fbff480d7
Pickup asm changes since 5.7.4 release
2024-11-25 10:58:04 -07:00
David Garske
40154e18ab
Merge pull request #8219 from gojimmypi/pr-arduino-5.7.4
...
Update Arduino files for wolfssl 5.7.4
2024-11-25 09:37:21 -08:00
gojimmypi
560d89ed44
Update Arduino files for wolfssl 5.7.4
2024-11-23 13:26:46 -08:00
Daniel Pouzzner
bfeb0ad48e
expand opensslcoexist to all low level crypto APIs.
2024-11-22 19:27:56 -06:00
kaleb-himes
6791d3f759
Add SRTP-KDF (v6.0.0) to checkout scipt
2024-11-22 14:01:24 -07:00
Andras Fekete
93f865f2d4
Use proper capitalization
2024-11-22 15:39:57 -05:00
JacobBarthelmeh
033a2a08e9
Merge pull request #8212 from bandi13/fixTestFailure
...
Fix Renesas test
2024-11-22 10:42:21 -07:00
JacobBarthelmeh
2b11bd40b3
adjustments to x509.h macro list
2024-11-22 10:40:14 -07:00
JacobBarthelmeh
6dd00abb74
Merge pull request #7771 from aidangarske/InitSuites_Orderadj
...
`InitSuites` changes to order making `BUILD_TLS_AES_256_GCM_SHA384` be prioritized over `BUILD_TLS_AES_128_GCM_SHA256`
2024-11-22 10:15:32 -07:00
JacobBarthelmeh
c5d7dc3df6
Merge pull request #8211 from douzzer/20241121-fixes
...
20241121-fixes
2024-11-22 09:49:59 -07:00
David Garske
401a64d112
Improve stdarg.h around uses of var_arg. Cleanup warning for XFREE/XMALLOC redef.
2024-11-22 08:11:32 -08:00
Andras Fekete
942c3a07ee
Fix Renesas test
...
In PR #8182 this line was accidentally wrapped in `#ifdef OPENSSL_EXTRA`
2024-11-22 09:57:55 -05:00
Daniel Pouzzner
d85c108952
wolfssl/wolfcrypt/error-crypt.h, wolfcrypt/src/error.c: add WC_FAILURE ("wolfCrypt generic failure") with value -1, for traceable error return of -1 in wolfCrypt.
...
configure.ac: add OPENSSL_EXTRA to --enable-wolfsentry.
linuxkm/linuxkm_wc_port.h, linuxkm/module_hooks.c, wolfssl/ssl.h: accommodate backward dependencies for wolfSSL_X509_NAME_add_entry_by_NID, wolfSSL_X509_NAME_free, and wolfSSL_X509_NAME_new_ex.
linuxkm/lkcapi_glue.c: if CONFIG_CRYPTO_MANAGER, assert match of CONFIG_CRYPTO_FIPS and HAVE_FIPS.
src/ssl_crypto.c, wolfcrypt/src/wc_lms.c, wolfcrypt/src/wc_lms_impl.c, wolfcrypt/src/wc_xmss.c, wolfcrypt/test/test.c: add missing casts for XMALLOC()s.
src/ssl_crypto.c: in wolfSSL_AES_decrypt(), fix gate for wc_AesDecryptDirect() return type.
wolfcrypt/test/test.c: smallstack refactor in test_dilithium_decode_level().
tests/api.c: fix uninited vars and "embedding a directive within macro arguments is not portable" in test_wc_dilithium_der().
2024-11-21 21:59:26 -06:00
Daniel Pouzzner
92f587c84f
Merge pull request #8209 from gasbytes/patch-wc-no-err-trace
...
Adding missing checks missing initialization of sp_int/mp_int
2024-11-21 18:34:11 -06:00
JacobBarthelmeh
03bafdfa36
Merge pull request #8208 from dgarske/engine_compat
...
Fixes from compatibility header decoupling (make install)
2024-11-21 16:40:15 -07:00
Reda Chouk
378519d7fb
Adding missing checks missing initialization of sp_int/mp_int initialization (
...
in case of MEMORY_E).
removed printf (added for previous debugging)
2024-11-21 23:55:34 +01:00
David Garske
3444d5c526
Fixes from compatibility header decoupling PR #8182 . Fixes issue with wolfEngine and wolfProvider. Change behavior for openssl compatibility headers to be installed unless --enable-opensslextra=noinstall is used. Removed dependency on X509 small with SESSION_CERTS, KEEP_PEER_CERTS and KEEP_OUR_CERT.
2024-11-21 12:09:57 -08:00
David Garske
39d4832b0b
Merge pull request #8207 from bigbrett/dilithium-nightly-fixes
...
dilithium fixes for FIPS 204 draft mode
2024-11-21 11:41:52 -08:00
Brett Nicholas
cceeb776f7
gate dilithium OID autodetection on FIPS 204 draft mode
2024-11-21 09:38:11 -08:00
Brett Nicholas
30f372ce16
add autogenerated error trace headers to gitignore
2024-11-21 09:38:11 -08:00
Brett Nicholas
e31b15875b
fix buffer overflow due to uninitialized idx variable
2024-11-21 09:38:11 -08:00
JacobBarthelmeh
04932dd97d
Merge pull request #8206 from dgarske/rx_tsip
...
Fixes for RSA TSIP RSA Sign/Verify
2024-11-21 09:30:48 -07:00
Daniel Pouzzner
2710b57df8
Merge pull request #8204 from JacobBarthelmeh/socket
...
change optval type to match system
2024-11-21 09:57:10 -06:00
JacobBarthelmeh
c06f65a8ac
Merge pull request #8182 from dgarske/no_compat_headers
...
Support for building without wolfssl/openssl header files
2024-11-20 21:33:18 -07:00
David Garske
6be70f9230
Fix for size increase on X509 small. Fix for CRL test with NO_RSA.
2024-11-20 15:54:02 -08:00
David Garske
96a0619d70
Enable compat layer with HAVE_WEBSERVER (--enable-webserver).
2024-11-20 14:24:11 -08:00
David Garske
c5e43280b9
Fix for RX TSIP AES GCM 128 unit test resultP/C sizes causing failure.
2024-11-20 13:48:05 -08:00
David Garske
7bf0533c48
Fix for building with HAVE_SECRET_CALLBACK only.
2024-11-20 13:33:10 -08:00
David Garske
d109f38cbd
Fixes for RSA TSIP RSA Sign/Verify. Tested on RX72N EnvisionKit. Added THREADX threading support.
...
```
Start wolf tsip crypt Test
simple crypt test by using TSIP
sha_test() passed
sha256_test() passed
tsip_aes_cbc_test() passed
tsip_aes256_test() passed
tsip_rsa_test(2048) passed
tsip_rsa_SignVerify_test(2048) passed
End wolf tsip crypt Test
```
2024-11-20 13:08:26 -08:00
JacobBarthelmeh
be70bea687
Merge pull request #8202 from LinuxJedi/fix-cryptodev-debug
...
Fix cryptodev debug output
2024-11-20 14:00:05 -07:00
David Garske
ef67b1c06a
Support for building without wolfssl/openssl header files. ZD 18465
...
* Fix for `TlsSessionCacheGetAndLock` that was not checking the sessionIDSz, so could return a pointer to an invalid session (if 0's). Resolves issue with `test_wolfSSL_CTX_sess_set_remove_cb` test.
* Fix cast warning with `HAVE_EX_DATA` in Windows VS.
* Fix openssl_extra without PKCS12.
* Refactor the EX data crypto and session API's to gate on `HAVE_EX_DATA_CRYPTO`.
* Grouped the EX data API's in ssl.h
* Moved API's in ssl.h to separate the compatibility ones from ours.
2024-11-20 12:32:32 -08:00
JacobBarthelmeh
b3e8fa7922
change optval type to match system
2024-11-20 09:34:11 -07:00
Andrew Hutchings
f5e6e17c7c
Fix cryptodev debug output
...
Cryptodev has two sections for the session info struct, cipher and hash.
Our debug mode was using hash for the output even if we were using
cipher, so would output random data. Simple 'if' statement to do the
correct thing.
2024-11-20 06:41:58 +00:00
JacobBarthelmeh
42825e82d2
Merge pull request #8200 from anhu/crl-orig
...
Fix for github issue 8198
2024-11-19 09:35:59 -07:00
David Garske
18f52b2573
Merge pull request #8177 from bigbrett/dilithium-get-algo-from-der
...
ML-DSA/Dilithium: obtain security level from DER when decoding
2024-11-19 07:32:39 -08:00
David Garske
261ddc13ad
Merge pull request #8006 from ColtonWilley/crl_update_cb
...
CRL improvements and update callback
2024-11-18 20:11:37 -08:00
Brett Nicholas
26d3b00a9c
added DER size macros to libOQS build
2024-11-18 17:53:12 -07:00
Brett Nicholas
48dcbe9caf
fix typo in comment
2024-11-18 16:50:35 -07:00
Brett Nicholas
9815fcd3ea
make inOutKeyType parameter mandatory for DecodeAsymKey_Assign
2024-11-18 16:46:10 -07:00
Brett Nicholas
d50fb63071
add macros for dilithium DER export buffer sizes
2024-11-18 16:14:26 -07:00
Brett Nicholas
63deea57e0
properly protect test.c calls to dilithium public/private API
2024-11-18 15:47:00 -07:00
Anthony Hu
237bb24f87
Fix for github issue 8198
2024-11-18 17:33:13 -05:00
aidan garske
43cea3e964
fix xmemset
2024-11-18 14:27:33 -08:00
aidan garske
6625d90f7f
reverted xmemset changes already done
2024-11-18 14:20:14 -08:00
aidan garske
337a34246e
xmemset fix for init suites changes
2024-11-18 13:54:38 -08:00
Colton Willey
d65c17b7ad
Update variable name from new to avoid g++ name clash
2024-11-18 11:16:39 -08:00
aidan garske
b79423fae9
Merge remote-tracking branch 'origin/master' into InitSuites_Orderadj
2024-11-18 10:07:10 -08:00
Colton Willey
55be5035a0
Merge branch 'master' of github.com:ColtonWilley/wolfssl into crl_update_cb
2024-11-18 09:52:51 -08:00
David Garske
c111bb87c9
Merge pull request #8196 from SparkiDev/pqc_kem_priv_key_fix
...
KeyShareEntry: include private key fields for KYBER
2024-11-18 09:46:08 -08:00
David Garske
5dabeb590c
Merge pull request #8192 from bandi13/fixSocat
...
Simple fix for 1.8.0.0 socat regressions
2024-11-18 07:26:15 -08:00
gojimmypi
5d86031f57
Initialize vars & change types to appease Windows/VS
2024-11-17 17:50:17 -08:00
Sean Parkinson
10e8f6887e
SP ARM: big-endian support
...
Handle reading and writing from big-endian byte array when compiling for
big endian.
Rework little endian to be more effiecient too.
2024-11-18 10:29:04 +10:00
Sean Parkinson
5d61ca94c0
KeyShareEntry: include private key fields for KYBER
...
Originallt HAVE_PQC and then changed to HAVE_FALCON and HAVE_DILITHIUM.
The KEM PQC algorithm is actually KYBER.
2024-11-18 08:29:16 +10:00
David Garske
5afa0566b4
Merge pull request #8195 from douzzer/20241116-fixes
...
20241116-fixes
2024-11-17 09:12:38 -08:00
Daniel Pouzzner
18cc3e0c92
add .wolfssl_known_macro_extras;
...
src/wolfio.c: #include <errno.h> if necessary;
wolfcrypt/src/asn.c: gate WOLFSSL_MSG_EX() uses on defined(DEBUG_WOLFSSL), for pedantic C89 compatibility (no variadic macros);
wolfssl/wolfcrypt/wc_port.h: refine setup for XFENCE().
2024-11-16 18:23:11 -06:00
Daniel Pouzzner
ae0d73d9fd
Merge pull request #8122 from miyazakh/tsip_rsa_private_enc
...
Implement TSIP RSA Public Enc/Private Dec
2024-11-16 16:12:51 -06:00
Daniel Pouzzner
ff680994ba
Merge pull request #8146 from julek-wolfssl/dtls13-ooo-app-data
...
DTLS 1.3: Don't error out on app data before finishing handshake
2024-11-16 14:56:21 -06:00
Daniel Pouzzner
49393eca3c
Merge pull request #8060 from miyazakh/qt_jenkins_failure
...
Not add a cert to CA cache if it doesn't set "CA:TRUE" as basic constraints
2024-11-16 13:38:41 -06:00
Daniel Pouzzner
40148d3c0e
Merge pull request #8170 from kaleb-himes/OE8-sync
...
OS_Seed declarations with legacy compilers using correct header tags
2024-11-16 12:03:11 -06:00
Daniel Pouzzner
18a72fb38c
Merge pull request #7896 from kareem-wolfssl/wolfIoLogging
...
Log error code in TranslateIoReturnCode.
2024-11-16 11:12:02 -06:00
David Garske
649b78f460
Merge pull request #8193 from douzzer/20241115-macro-fixes
...
20241115-macro-fixes
2024-11-15 15:58:57 -08:00
David Garske
ada922be00
Merge pull request #8166 from philljj/fix_holder_entityname
...
acert: fix holder entityName parsing.
2024-11-15 14:49:00 -08:00
Andras Fekete
962b101db9
Add flaky tests to the exclusion list
2024-11-15 16:34:51 -05:00
Daniel Pouzzner
ebfde75d91
fixes for misspelled/malformed macro names, and add missing BUILD_AESCCM setup in wolfssl/internal.h
2024-11-15 15:33:51 -06:00
jordan
c71fdc3ca2
acert: review cleanup.
2024-11-15 13:48:17 -06:00
David Garske
c33d97b1ab
Merge pull request #8187 from douzzer/20241114-wolfSSL_CTX_UnloadIntermediateCerts-thread-safety
...
20241114-wolfSSL_CTX_UnloadIntermediateCerts-thread-safety
2024-11-15 11:35:45 -08:00
Brett Nicholas
07e2715f0c
update test in api.c to handle new dilithium security level DER parsing
2024-11-15 11:59:17 -07:00
Daniel Pouzzner
a95b759ffa
peer review for #8187 and unrelated bug fixes:
...
return error code from wolfSSL_RefWithMutexUnlock() to expose result to caller;
fix endianness bug in src/x509.c:wolfSSL_X509_add_ext() (fixes failing test_wolfSSL_X509_add_ext on BE targets);
fix possible file handle leak in tests/api.c:test_wolfSSL_d2i_X509_REQ() (reported by clang-tidy);
in wolfssl/ssl.h, define CONST_NUM_ERR_WOLFSSL_SUCCESS, so that WOLFSSL_SUCCESS can be benignly miswrapped in WC_NO_ERR_TRACE().
2024-11-15 12:52:50 -06:00
Daniel Pouzzner
595f55eceb
add struct wolfSSL_RefWithMutex, wolfSSL_RefWithMutexLock, and wolfSSL_RefWithMutexUnlock, and change WOLFSSL_CTX.ref from wolfSSL_Ref to wolfSSL_RefWithMutex.
...
in in wc_port.c, rename mutexful implementations of wolfSSL_Ref*() to wolfSSL_RefWithMutex*(), and build them even if defined(WOLFSSL_ATOMIC_OPS).
refactor wolfSSL_CTX_UnloadIntermediateCerts() to wrap the refcount check and deallocation with wolfSSL_RefWithMutexLock()...wolfSSL_RefWithMutexUnlock().
move port-specific setup for WARN_UNUSED_RESULT, WC_MAYBE_UNUSED, and WC_INLINE, from types.h to wc_port.h, to make them usable by port-specific definitions later in wc_port.h.
when defined(SINGLE_THREADED) and !defined(WOLFSSL_NO_ATOMICS), typedef int wolfSSL_Atomic_Int, so that access to wolfSSL_Atomic_Ints in SINGLE_THREADED builds is easy.
refactor fallback definitions of wolfSSL_Atomic_Int_FetchAdd and wolfSSL_Atomic_Int_FetchSub as WC_INLINE functions to avoid -Wunused-result.
2024-11-15 12:35:41 -06:00
Andras Fekete
3268df33f2
Simple fix for 1.8.0.0 socat regressions
...
Future versions probably won't need this.
2024-11-15 13:12:48 -05:00
Kareem
bb82be3911
Log error code in TranslateIoReturnCode.
2024-11-15 11:00:25 -07:00
David Garske
e1116e8e6b
Merge pull request #8161 from ColtonWilley/update_ssl_doxy
...
Update doxygen to use proper types in sample code
2024-11-15 09:43:38 -08:00
David Garske
3674980387
Merge pull request #8173 from kojo1/man
...
add API doc: wc_ecc_set_curve
2024-11-15 09:42:12 -08:00
jordan
622fc70d1e
acert: fix holder entityName parsing, light cleanup, better testing.
2024-11-15 11:38:19 -06:00
Brett Nicholas
2207791aab
removed DecodeAsymKeyXXX_Assign_ex function, functionality now included in original _Assign function
2024-11-15 10:25:10 -07:00
David Garske
55d2012139
Merge pull request #8189 from gojimmypi/pr-espressif-setup
...
remove trailing exit code
2024-11-15 08:37:20 -08:00
David Garske
5f06a7f732
Merge pull request #8188 from douzzer/20241114-wc_mp_sign_t
...
20241114-wc_mp_sign_t
2024-11-15 08:36:42 -08:00
David Garske
3b8373226a
Merge pull request #8191 from bandi13/fixTest
...
Fix missing cast
2024-11-15 08:35:55 -08:00
Andras Fekete
d99a1c6a13
Fix another compilation issue
...
In file included from ./wolfssl/error-ssl.h:27,
from ./wolfssl/ssl.h:35,
from ./wolfssl/internal.h:28,
from src/ssl.c:36:
./src/x509_str.c: In function 'int X509StoreLoadCertBuffer(WOLFSSL_X509_STORE*, byte*, word32, int)':
./wolfssl/wolfcrypt/error-crypt.h:336:37: error: 'CONST_NUM_ERR_WOLFSSL_SUCCESS' was not declared in this scope; did you mean 'CONST_NUM_ERR_WOLFSSL_UNKNOWN'?
336 | #define WC_NO_ERR_TRACE(label) (CONST_NUM_ERR_ ## label)
| ^~~~~~~~~~~~~~
./src/x509_str.c:1456:15: note: in expansion of macro 'WC_NO_ERR_TRACE'
1456 | int ret = WC_NO_ERR_TRACE(WOLFSSL_SUCCESS);
| ^~~~~~~~~~~~~~~
2024-11-15 10:12:13 -05:00
Andras Fekete
ca8b465dbf
Fix missing cast
...
Introduced in PR#8176.
2024-11-15 09:17:41 -05:00
gojimmypi
4cce3db0d5
remove trailing exit code
2024-11-15 06:05:04 +01:00
David Garske
e22d17c09f
Merge pull request #8185 from SparkiDev/kyber_fixes_4
...
Kyber: Fix wolfSSL_get_curve_name()
2024-11-14 17:57:24 -08:00
David Garske
fcfd3be160
Merge pull request #8186 from SparkiDev/tfm_mask_cast
...
TFM: explicit cast of -1 to fp_digit
2024-11-14 17:57:00 -08:00
David Garske
c06b5fadc1
Merge pull request #8180 from JacobBarthelmeh/staticmemory
...
wc_UnloadStaticMemory should be used to free mutex
2024-11-14 17:54:56 -08:00
David Garske
21bfcaf666
Merge pull request #8136 from anhu/csr_version
...
Fix for setting wrong version in CSRs.
2024-11-14 17:52:58 -08:00
David Garske
54bdb39454
Merge pull request #8176 from SparkiDev/x509_coverage
...
X509: improve testing coverage
2024-11-14 17:49:33 -08:00
David Garske
8b1e9211b1
Merge pull request #8149 from SparkiDev/asn_getshortint
...
Make GetShortInt available with WOLFSSL_ASN_EXTRA
2024-11-14 17:47:11 -08:00
David Garske
8fe7d1076d
Merge pull request #8184 from douzzer/20241113-WC_THREADSHARED
...
20241113-WC_THREADSHARED
2024-11-14 17:46:19 -08:00
Daniel Pouzzner
469c410393
src/sniffer.c: remove build-time assert on HAVE_THREAD_LS || SINGLE_THREADED, as it breaks existing build tests. fix more later.
2024-11-14 18:22:42 -06:00
Daniel Pouzzner
154c5f0b56
rename mp_sign_t to wc_mp_sign_t and mp_size_t to wc_mp_size_t.
2024-11-14 18:14:45 -06:00
Daniel Pouzzner
4ad0dce84e
src/sniffer.c: revert refactor pending proper fixes.
2024-11-14 18:00:52 -06:00
Daniel Pouzzner
dd9f6378cb
rename WOLFSSL_GLOBAL to WC_THREADSHARED, and refactor mutex handling in src/sniffer.c for consistency and correctness, also adding gating on !SINGLE_THREADED for efficiency;
...
add wc_static_assert in wolfcrypt/test/test.h to assure that WC_TEST_RET_ENC() can correctly handle all error codes.
2024-11-14 16:35:04 -06:00
Sean Parkinson
9d8a3cc352
TFM: explicit cast of -1 to fp_digit
...
When -1 is needed as an fp_digit, as a mask. cast to fp_digit.
2024-11-15 08:25:44 +10:00
Sean Parkinson
b98af853f2
Kyber: Fix wolfSSL_get_curve_name()
...
Fix protection around Kyber hybrid strings when compiling for original
with wolfSSL implementation.
2024-11-15 08:17:02 +10:00
Daniel Pouzzner
6af54d3de2
Merge pull request #8183 from SparkiDev/kyber_fixes_3
...
Kyber: fixes to configure and wolfSSL_get_curve_name
2024-11-14 12:47:09 -06:00
Sean Parkinson
886f5b0a5b
Kyber: fixes to configure and wolfSSL_get_curve_name
...
Remote original-only option for kyber in configure.ac.
Default is ML-KEM only.
original is Kyber only.
ml-lem is ML-KEM.
to have both: all,original,ml-kem.
Use WOLFSSL_NO_ML_KEM* instead of WOLFSSL_WC_ML_KEM_* which requires the
inclusion of kyber headers.
2024-11-14 16:25:41 +10:00
Brett Nicholas
f672105d55
- Move automatic OID detection from Dilithium code into ASN code
2024-11-13 15:31:59 -07:00
David Garske
c8f56f035f
Merge pull request #8169 from douzzer/20241108-WOLFSSL_CLEANUP_THREADSAFE
...
20241108-WOLFSSL_CLEANUP_THREADSAFE
2024-11-13 12:45:33 -08:00
Daniel Pouzzner
0ebd86d668
add second wolfCrypt error code span, and add DEADLOCK_AVERTED_E.
2024-11-13 13:01:00 -06:00
JacobBarthelmeh
f74e73e8ce
wc_UnloadStaticMemory should be used to free mutex
2024-11-13 11:51:53 -07:00
Daniel Pouzzner
524f0f5799
peer review on "WOLFSSL_CLEANUP_THREADSAFE":
...
* add WOLFSSL_ATOMIC_INITIALIZER() to wc_port.h;
* rename feature macro to WOLFSSL_CLEANUP_THREADSAFE_BY_ATOMIC_OPS for clarity;
* remove spin lock logic in wolfSSL_Init() and instead return DEADLOCK_AVERTED_E on contended initialization;
* unless WOLFSSL_CLEANUP_THREADSAFE_BY_ATOMIC_OPS is user-defined to 0, automatically enable it when appropriate.
2024-11-12 23:57:35 -06:00
Hideki Miyazaki
fdb889303a
fix qt unit test qsslcertificate
...
fix trusted peer cert cache
2024-11-13 08:38:51 +09:00
Daniel Pouzzner
b8aeaf4fa8
src/ssl.c: implement WOLFSSL_CLEANUP_THREADSAFE in wolfSSL_Init() / wolfSSL_Cleanup().
2024-11-12 17:37:45 -06:00
Sean Parkinson
86ad96ca29
X509: improve testing coverage
2024-11-13 09:10:22 +10:00
Brett Nicholas
6b1b6ece00
guard use of dilithium_key->params on WC implementation
2024-11-12 16:08:11 -07:00
Anthony Hu
b1ccbbc7fa
Addressing review comments from dgarske
2024-11-12 16:36:12 -05:00
Brett Nicholas
0e6ac11d15
- Add ability to obtain Dilithium security level (parameters) from a DER
...
encoded key based on the algorithm type OID
- Add test coverage for decoding DER keys without level specified
2024-11-12 14:19:12 -07:00
Juliusz Sosinowicz
cf80eb8788
DTLS 1.3: Don't error out on app data before finishing handshake
...
Check epoch for early data
2024-11-12 12:19:02 +01:00
Daniel Pouzzner
878cf3afaa
Merge pull request #8155 from JacobBarthelmeh/x509_req
...
fix for memory leak due to missed WOLFSSL_GENERAL_NAME capability cha…
2024-11-11 23:03:52 -06:00
Daniel Pouzzner
c5f1acf960
Merge pull request #8172 from SparkiDev/kyber_bench_fix
...
Kyber benchmark: allow ML-KEM and Kyber
2024-11-11 23:00:51 -06:00
JacobBarthelmeh
ce935fddad
cast return of XMALLOC
2024-11-11 09:57:33 -07:00
JacobBarthelmeh
4996aed166
Merge pull request #8117 from rizlik/static_mem_fix_types
...
memory: fix types in wc_LoadStaticMemory_ex()
2024-11-11 09:48:25 -07:00
Takashi Kojo
718b3d46b2
add API doc: wc_ecc_set_curve
2024-11-11 16:38:38 +09:00
Sean Parkinson
cadafffb71
Kyber benchmark: allow ML-KEM and Kyber
...
Fix benchmark to use ML-KEM/Kyber depending on how code is built.
2024-11-11 10:34:32 +10:00
Daniel Pouzzner
c08bbf0333
Merge pull request #8168 from bandi13/fixCMakeTests
...
Use only one or the other
2024-11-09 00:43:15 -06:00
Daniel Pouzzner
9361603d8b
Merge pull request #8071 from JacobBarthelmeh/static
...
display heap pointer with debug enabled
2024-11-09 00:20:32 -06:00
Daniel Pouzzner
165b4afbeb
Merge pull request #8143 from SparkiDev/kyber_plus_mlkem
...
Kyber/ML-KEM: make both available
2024-11-09 00:09:51 -06:00
Daniel Pouzzner
23f46a1c3e
Merge pull request #8140 from dgarske/wildcard
...
Fix for building sources (wildcard *.c). Add macro guard on new files.
2024-11-08 23:36:00 -06:00
Hideki Miyazaki
2831eb3ca7
Fix TSIP TLS. Call rsa_pad crypt cb in the case of TSIP
2024-11-09 14:23:57 +09:00
kaleb-himes
309c0a8218
OS_Seed declarations with legacy compilers using correct header tags
2024-11-08 15:10:50 -07:00
Andras Fekete
a295aef0b2
Use only one or the other
2024-11-08 14:34:16 -05:00
David Garske
c868c3ecff
Merge pull request #8164 from douzzer/20241105-c89-expansion-etc
...
20241105-c89-expansion-etc
2024-11-08 10:15:00 -08:00
Daniel Pouzzner
469b9efc9e
wolfssl/test.h: revert heap shim refactor -- api.c relies on these being native heap allocations.
2024-11-08 01:03:44 -06:00
Daniel Pouzzner
aa18bbca55
assorted cleanups and refactors for C89 conformance, codespell and check-source-text, and consistent heap shim usage.
...
.github/workflows/codespell.yml: remove */README_jp.txt from "skip" list.
IDE/Renesas/cs+/Projects/t4_demo/README_jp.txt: convert from SHIFT_JIS to UTF-8.
cmake/options.h.in: use "#cmakedefine HAVE_PTHREAD 1" to avoid conflict with config.h.
configure.ac: add --enable-c89, and remove !ENABLED_OPENSSLEXTRA dependency from AM_CONDITIONAL([BUILD_CRYPTONLY],...).
wolfcrypt/src/asn.c: refactor SetOthername() for efficiency, and add PRAGMA_GCC to suppress false positive -Wstringop-overflow associated with -fstack-protector.
wolfssl/wolfcrypt/rsa.h: add WC_ prefixes to RSA_PKCS1_PADDING_SIZE and RSA_PKCS1_OAEP_PADDING_SIZE, and define unprefixed compat aliases only if !OPENSSL_COEXIST.
wolfssl/wolfcrypt/types.h:
#ifdef WOLF_C89, #define WC_BITFIELD unsigned;
enhance WOLF_ENUM_DUMMY_LAST_ELEMENT() to include the line number, to construct unique labels given a per-filename argument, to accommodate anonymous enums.
examples/asn1/asn1.c:
examples/client/client.c:
examples/pem/pem.c:
examples/server/server.c:
wolfcrypt/src/sp_dsp32.c:
wolfcrypt/src/wc_port.c:
wolfssl/test.h:
use XMALLOC/XREALLOC/XFREE consistently, not malloc/realloc/free.
wolfcrypt/benchmark/benchmark.c:
wolfcrypt/src/memory.c:
wolfcrypt/test/test.c:
wolfssl/wolfcrypt/mem_track.h:
wolfssl/wolfcrypt/settings.h:
wolfssl/wolfcrypt/types.h:
annotate intentional native heap access with "/* native heap */".
wolfcrypt/src/asn.c:
wolfssl/callbacks.h:
wolfssl/openssl/ec.h:
wolfssl/openssl/ssl.h:
wolfssl/wolfcrypt/hpke.h:
wolfssl/wolfcrypt/types.h:
fix enum trailing commas.
wolfssl/openssl/ec.h:
wolfssl/openssl/evp.h:
wolfssl/openssl/rsa.h:
wolfssl/openssl/ssl.h:
use WC_BITFIELD in bitfield elements, not byte or word16, to allow for pedantic C89 conformant builds.
wolfssl/openssl/ec.h:
wolfssl/openssl/evp.h:
wolfssl/openssl/pem.h:
wolfssl/openssl/ssl.h:
wolfssl/wolfcrypt/logging.h:
avoid variadic macros wherever possible, and where unavoidable, #ifdef WOLF_NO_VARIADIC_MACROS, define them with empty arg lists, rather than ..., to support Watcom compiler.
wolfssl/wolfcrypt/settings.h: if defined(__WATCOMC__), define WOLF_NO_VARIADIC_MACROS.
2024-11-07 22:36:24 -06:00
Maxim Ivanov
0319eb098d
CMAKE: look for pthreads when importing wolfSSL if required
...
All required dependencies of a package must also be found in the
package configuration file. Consumers of wolfSSL can't know
if it was built with or without threads support. This change
adds find_package(Threads) lookup in the file used for
find_package(wolfssl) if wolfSSL was built with threads support.
2024-11-07 21:42:11 +00:00
Colton Willey
dbec1b2b0d
Update doxygen to use proper types in sample code
2024-11-07 12:50:55 -08:00
David Garske
b648d35449
Merge pull request #8138 from JacobBarthelmeh/wolfclu_config
...
wolfCLU added support for PKCS7
2024-11-07 12:44:06 -08:00
David Garske
364cd107ff
Merge pull request #8151 from SparkiDev/test_fixes_3
...
Testing fixes
2024-11-07 12:43:12 -08:00
David Garske
79d9aab5bd
Merge pull request #8159 from philljj/spelling_cleanup
...
spelling: tiny cleanup.
2024-11-07 12:00:04 -08:00
David Garske
1061518876
Merge pull request #8153 from LinuxJedi/Pi-pico
...
Add support for Raspberry Pi Pico
2024-11-07 11:59:34 -08:00
Andrew Hutchings
1d2c78e3be
Add support for Raspberry Pi Pico
...
This adds improved support for the Raspberry Pi Pico range of
microcontrollers.
Benchmark now compiles, and added support for the RNG functions of the
Pico SDK. This gives a ~2x RNG performance improvement on the RP2040 and
over 3x improvement on the RP2350.
The accelerated SHA256 in the RP2350 unfortunately cannot be used with
wolfSSL.
2024-11-07 17:26:51 +00:00
jordan
b4e8e57b59
spelling: tiny cleanup.
2024-11-07 07:40:02 -06:00
JacobBarthelmeh
a896c16ebd
fix for memory leak due to missed WOLFSSL_GENERAL_NAME capability changes
2024-11-06 17:10:54 -07:00
Anthony Hu
0508151ddf
Quick fix
2024-11-06 16:07:18 -05:00
Daniel Pouzzner
c577ad78df
Merge pull request #8154 from bandi13/fipsCheckAddFlag
...
Ability to bypass './configure' as some tests/scripts run it anyway
2024-11-06 15:07:17 -06:00
Andras Fekete
cbf4f014cd
Fix false positive error on gcc 9.4.0
...
"error: ‘nameSz’ may be used uninitialized in this function", but it's not actually going to be used uninitialized.
2024-11-06 14:54:02 -05:00
David Garske
43879f961d
Fix RSA TSIP to return the actual cipher or plain length on success. Fix crypto callback to properly support PKCSv1.5 sign/verify and encrypt/decrypt based on padding info.
2024-11-06 10:37:03 -08:00
Andras Fekete
b4f0789ce5
Ability to bypass './configure' as some tests/scripts run it anyway
2024-11-06 08:39:23 -05:00
Sean Parkinson
256c6708e0
Testing fixes
...
Fix header inclusion: settings.h after options.h.
pkcs8_encode(): dh is not available if NO_DH is defined.
2024-11-06 15:23:49 +10:00
David Garske
3179a2ff00
Cleanup the import function declarations.
2024-11-05 14:14:25 -08:00
David Garske
02c2f445d9
Cleanup unused variables and function (void).
2024-11-05 09:45:01 -08:00
David Garske
6b02d7879a
Add public decrypt and private encrypt. Cleanups.
2024-11-05 09:24:00 -08:00
András Fekete
7e291992c0
Merge pull request #8150 from douzzer/20241104-fixes
...
20241104-fixes
2024-11-05 11:00:20 -05:00
Daniel Pouzzner
0f31f5bad9
codespell fixes.
2024-11-05 00:19:07 -06:00
Daniel Pouzzner
a540c6ade5
configure.ac: activate opensslextra for --enable-curl even if ENABLED_OPENSSLCOEXIST; tests/api.c: in test_wolfSSL_SESSION(), use WOLFSSL_SUCCESS, not SSL_SUCCESS, in HAVE_SESSION_TICKET span reachable in non-OPENSSL_EXTRA builds.
2024-11-05 00:15:18 -06:00
Daniel Pouzzner
8ecf064314
Merge pull request #8098 from dgarske/x86_notwindows_2
...
More fixes for building x86 in Visual Studio for non-windows OS
2024-11-05 00:13:13 -06:00
David Garske
92f7e91655
Merge pull request #8120 from SparkiDev/asn_templ_doc
...
ASN template documentation: adding basics for decoding
2024-11-04 15:25:18 -08:00
Sean Parkinson
36515e8daf
Make GetShortInt available with WOLFSSL_ASN_EXTRA
...
Customers may need to use GetShortInt when doing custom ASN.1 parsing.
Was only available when !NO_PWDBASED.
GetShortInt is still an internal API.
2024-11-05 08:46:34 +10:00
Daniel Pouzzner
95b47714d5
Merge pull request #8147 from bandi13/regenScripts
...
Regen scripts
2024-11-04 16:37:24 -06:00
David Garske
aad0f6e08d
Peer review feedback: Improve workaround for variadic macros and cast warnings.
2024-11-04 11:15:00 -08:00
Andras Fekete
4083afe353
Ignore file with non-UTF-8 characters
2024-11-04 13:56:07 -05:00
David Garske
9757aa0adf
Merge pull request #8113 from philljj/tiny_dilithium_fix
...
dilithium: expose wc_MlDsaKey_GetX functions as API.
2024-11-04 10:52:30 -08:00
David Garske
8f2516c4be
Merge pull request #8141 from douzzer/20241102-fixes
...
20241102-fixes
2024-11-04 10:47:53 -08:00
Andras Fekete
f7691febd3
Update generated code from scripts
2024-11-04 13:46:37 -05:00
Marco Oliverio
dce9b2e7bd
memory: fix types in static memory functions
2024-11-04 16:21:04 +00:00
Sean Parkinson
7d42ddae48
Kyber/ML-KEM: make both available
...
Make Kyber and ML-KEM individually available as well as at the same
time.
Modified TLS layer to support both Kyber and ML-KEM.
Added new identifiers in TLS layer for ML-KEM.
2024-11-04 23:51:51 +10:00
Daniel Pouzzner
6f7c968c56
rename MAX_CERT_VERIFY_SZ to WC_MAX_CERT_VERIFY_SZ, and move its setup from wolfssl/internal.h to wolfssl/wolfcrypt/asn.h.
...
rename WOLFSSL_MAX_RSA_BITS to WC_MAX_RSA_BITS, and move its setup from wolfssl/internal.h to wolfssl/wolfcrypt/asn.h, preceding setup for WC_MAX_CERT_VERIFY_SZ.
configure.ac: restore opensslextra-linuxkm assertion, with a twist: "--enable-opensslextra with --enable-linuxkm-pie and without --enable-cryptonly is incompatible with --enable-linuxkm."
wolfcrypt/src/asn.c: fix trailing comma in enum.
wolfcrypt/src/port/arm/armv8-aes.c: fix wc_AesCcmEncrypt() and wc_AesCcmDecrypt() for test_wolfssl_EVP_aes_ccm_zeroLen().
2024-11-02 23:50:34 -05:00
Daniel Pouzzner
6119c52802
Merge pull request #8043 from bandi13/addCodespell
...
Add Codespell test to PRs
2024-11-01 21:20:29 -05:00
David Garske
836b741402
Merge pull request #8132 from douzzer/20241024-opensslcoexist-opensslextra
...
20241024-opensslcoexist-opensslextra
2024-11-01 14:34:11 -07:00
David Garske
671f93135b
Fixes for consistency in ASSERT_SAVED_VECTOR_REGISTERS and RESTORE_VECTOR_REGISTERS.
2024-11-01 14:24:30 -07:00
David Garske
ca6d49da97
Merge pull request #8139 from douzzer/20241031-fixes
...
20241031-fixes
2024-11-01 14:03:48 -07:00
David Garske
99daac3974
Improvement for SAVE_VECTOR_REGISTERS
2024-11-01 13:57:02 -07:00
David Garske
f95c4d7b67
Fix for building sources (wildcard *.c). Add macro guard on new files.
2024-11-01 10:46:40 -07:00
Daniel Pouzzner
b41ce0427c
src/pk.c: in pem_read_bio_key(), fix invalid read (ZD#18875).
2024-11-01 12:43:08 -05:00
Andras Fekete
0915012b72
Fix new spelling errors
2024-11-01 13:00:59 -04:00
Andras Fekete
8612f15d2e
Don't modify Renesas config files
2024-11-01 12:59:01 -04:00
Andras Fekete
34298e8ada
More spelling fixes
2024-11-01 12:59:01 -04:00
Andras Fekete
e14abbdc79
Cleanup spelling
2024-11-01 12:59:01 -04:00
Andras Fekete
9082baabd3
Change the name of the file.
2024-11-01 12:59:01 -04:00
Andras Fekete
e28316027e
Cleaner way to exclude words that are considered 'misspelled'
2024-11-01 12:59:01 -04:00
Andras Fekete
552968bd5d
Add explanations for excluded files
2024-11-01 12:59:01 -04:00
Andras Fekete
b8f9ac6fa5
Eliminate some UTF-8 errors
2024-11-01 12:59:01 -04:00
Andras Fekete
31d0dfb981
Add in some common code to keep Actions to a minimum
2024-11-01 12:59:01 -04:00
Andras Fekete
f4dae7cbaf
Few more spelling mistakes
2024-11-01 12:59:01 -04:00
Andras Fekete
c0cb206a80
Suspicious that codespell is not checking spelling
2024-11-01 12:59:01 -04:00
Andras Fekete
8b81d6e099
Simple word fix
2024-11-01 12:59:01 -04:00
Andras Fekete
099c6e0e1f
Fix multiple filenames
2024-11-01 12:59:01 -04:00
Andras Fekete
b8253ac4c5
Final set of spelling fixes
2024-11-01 12:59:01 -04:00
Andras Fekete
8ecfe311d8
More spelling fixes
2024-11-01 12:59:01 -04:00
Andras Fekete
6c4b403fa4
More exceptions
2024-11-01 12:59:01 -04:00
Andras Fekete
b3fe71d9d9
Spelling fixes
2024-11-01 12:59:01 -04:00
Andras Fekete
88d4b4c815
Few more exceptions
2024-11-01 12:59:01 -04:00
Andras Fekete
97998d0713
Spellcheck on assembly
2024-11-01 12:59:01 -04:00
Andras Fekete
631eafacb8
Fix some spelling
2024-11-01 12:59:01 -04:00
Andras Fekete
57acf721d4
Minor fixes
2024-11-01 12:59:01 -04:00
Andras Fekete
725e4323e2
Use ignore words list instead of file
2024-11-01 12:59:01 -04:00
Andras Fekete
19e9e31b7c
Add Codespell test to PRs
2024-11-01 12:59:01 -04:00
Daniel Pouzzner
9db74dc128
configure.ac: add AM_MAINTAINER_MODE([disable]);
...
add config-time assert for "dual-alg-certs is incompatible with --enable-cryptonly.";
remove obsolete config-time check for "--enable-opensslextra without --enable-cryptonly is incompatible with --enable-linuxkm.";
linuxkm/linuxkm_wc_port.h: add fallback definitions for INT32_MAX and UINT32_MAX;
linuxkm/module_exports.c.template: add wolfssl/openssl/fips_rand.h;
wolfssl/wolfcrypt/settings.h: add #undef HAVE_ATEXIT to WOLFSSL_LINUXKM settings;
wolfssl/wolfcrypt/types.h: fix trailing comma in the DYNAMIC_TYPE_* enum.
2024-11-01 11:57:36 -05:00
Daniel Pouzzner
6b78726f13
Merge pull request #8134 from dgarske/ge448
...
Fix GE448 conversion warning
2024-11-01 11:55:01 -05:00
JacobBarthelmeh
13ad54cf46
wolfCLU added support for PKCS7
2024-11-01 09:44:46 -06:00
Anthony Hu
d959d9de7f
cast 1 to long
2024-11-01 11:34:22 -04:00
Sean Parkinson
24003b265a
Merge pull request #8129 from bigbrett/curve25519-generic-keyparsing
...
Curve25519 generic keyparsing
2024-11-01 09:04:50 +10:00
Sean Parkinson
76e421b557
Merge pull request #8118 from bigbrett/wc-test-ecc-zero-digest-disable
...
wolfcrypt tests: disable ecc sign/verify of all zero digest
2024-11-01 09:03:39 +10:00
David Garske
6e3f83d19e
Sync with script.
2024-10-31 15:54:05 -07:00
David Garske
652f7059ce
Merge pull request #8061 from wolfSSL/NDS_fix
...
Libnds : Added more descriptive README for IDE/NDS and MelonDS C-flag
2024-10-31 14:53:22 -07:00
Anthony Hu
2254ec89d3
Fix for setting wrong version in CSRs.
2024-10-31 17:08:42 -04:00
Brett Nicholas
aafd07d79a
remove ECC_SHAMIR macro protection for ECC sign/verify of zero digest
2024-10-31 14:20:57 -06:00
Brett Nicholas
325221707c
address review feedback
2024-10-31 13:02:21 -06:00
Daniel Pouzzner
950ee40111
additional fixes and enhancements for -DOPENSSL_EXTRA -DOPENSSL_COEXIST:
...
configure.ac:
* add --enable-all-osp to separate OSP meta-feature sets from --enable-all, allowing --enable-all --disable-all-osp --disable-opensslall (e.g. for testing OPENSSL_COEXIST).
* fix enable_all_crypto=yes in enable-all to be conditional on "$enable_all_crypto" = "".
* move enable_rsapss=yes from enable-all to enable-all-crypto.
examples/ and testsuite/: #undef OPENSSL_COEXIST unconditionally rather than only if defined(OPENSSL_EXTRA), to capture -DOPENSSL_EXTRA_X509_SMALL or any other such variants.
2024-10-31 13:42:04 -05:00
David Garske
0d495702e5
Fix GE448 conversion warning:
...
`error: conversion from ‘word32’ {aka ‘unsigned int’} to ‘byte’ {aka ‘unsigned char’} may change value`
2024-10-31 10:34:19 -07:00
Brett Nicholas
17c7b6cc3a
moved some macro logic from test.c to settings.h
2024-10-31 10:51:51 -06:00
David Garske
429e7c79e3
Merge pull request #8133 from SparkiDev/asm_no_uint_t
...
ASM: generated code not using uint*_t types
2024-10-31 07:42:12 -07:00
Daniel Pouzzner
39e8cb55bb
additional fixes and peer review for -DOPENSSL_EXTRA -DOPENSSL_COEXIST: cover -DWOLFSSL_QUIC, fix -DNO_ASN, rename WOLFSSL_ASN1_TYPE_* to WOLFSSL_V_ASN1_*, completed nativization of NID_*, and switch to prefix WC_NID_ rather than wc_NID_.
2024-10-31 00:10:21 -05:00
Daniel Pouzzner
a2bcbf7ecf
additional fixes and peer review for -DOPENSSL_EXTRA -DOPENSSL_COEXIST: cover -DWOLFSSL_QUIC, fix -DNO_ASN, rename WOLFSSL_ASN1_TYPE_* to WOLFSSL_V_ASN1_*, completed nativization of NID_*, and switch to prefix WC_NID_ rather than wc_NID_.
2024-10-31 00:10:21 -05:00
Daniel Pouzzner
ca9d012a24
wolfssl/ssl.h: remove OPENSSL_EXTRA gate on definitions for WOLFSSL_ASN1_TYPE_* -- some are used in non-OPENSSL_EXTRA builds, e.g. when -DWOLFSSL_X509_NAME_AVAILABLE.
2024-10-31 00:10:21 -05:00
Daniel Pouzzner
cf95fdc071
Globally remap & refactor conflicting symbols to allow -DOPENSSL_EXTRA -DOPENSSL_COEXIST, or equivalently, --enable-opensslextra --enable-opensslcoexist.
...
No functional changes.
Several compat symbols that were formerly enums are now macros.
All library source is refactored to use only native symbols in all code gated in with --enable-all-crypto --enable-opensslextra.
wolfcrypt/test/test.c is similarly refactored to use only native symbols.
examples/ and tests/ are unmodified except for header setup to disable OPENSSL_COEXIST and TEST_OPENSSL_COEXIST.
2024-10-31 00:10:21 -05:00
Sean Parkinson
dcd75df852
ASN template documentation: adding basics for decoding
...
First draft of ASN template documentation that helps with writing
parsing code.
2024-10-31 12:08:22 +10:00
Sean Parkinson
89d2964320
Merge pull request #8115 from miyazakh/ocsp_tls13_client
...
Check Intermediate cert OCSP when using tls1.3 for client side
2024-10-31 11:13:01 +10:00
Daniel Pouzzner
4b8c9bbb6d
Merge pull request #8130 from anhu/cks_tlsver_downgrade
...
Consider downgrade to TLS 1.2 when parsing CKS.
2024-10-30 19:20:24 -05:00
Sean Parkinson
26312141d8
ASM: generated code not using uint*_t types
...
Don't use uint*_t types as they may not be available.
2024-10-31 10:14:00 +10:00
Sean Parkinson
614a0e3f09
Merge pull request #8123 from dgarske/armasm
...
Fix issue with error: conflicting types for 'BlockSha3'
2024-10-31 09:37:26 +10:00
David Garske
544a7d93e1
Merge pull request #8103 from bandi13/addUncommonUtilities
...
Add less frequently used tools that are handy to have
2024-10-30 15:24:25 -07:00
David Garske
807975c864
Merge pull request #8127 from anhu/percentd
...
added a missing %d
2024-10-30 15:21:15 -07:00
David Garske
d147968aed
Merge pull request #8125 from philljj/fix_acert_test_defined_not_used
...
tests api: fix inconsistent do_acert_verify_test guards.
2024-10-30 15:21:04 -07:00
David Garske
fc56060873
Merge pull request #8102 from embhorn/topic2203
...
Fix docs for invalid hash requirements.
2024-10-30 15:15:19 -07:00
Anthony Hu
69f2529aa5
Consider downgrade to TLS 1.2 when parsing CKS.
2024-10-30 16:50:59 -04:00
JacobBarthelmeh
bc56129ed8
display heap pointer with debug enabled
2024-10-30 14:39:12 -06:00
Brett Nicholas
20cf6b74c1
fix curve25519 test sanitizer errors
2024-10-30 14:02:38 -06:00
Brett Nicholas
589bcaa12a
added doxygen for curve25519 DER functions
2024-10-30 12:56:14 -06:00
Brett Nicholas
62d7e90352
added additional curve25519 generic test
2024-10-30 12:56:10 -06:00
Anthony Hu
54dc8320d2
added a missing %d
2024-10-30 14:53:21 -04:00
David Garske
0669ba82c4
Avoid stdint types.
2024-10-30 10:28:45 -07:00
jordan
90648b1e79
tests api: fix inconsistent do_acert_verify_test guards.
2024-10-30 11:06:54 -05:00
Brett Nicholas
97a370ed08
added generic curve25519 encode/decode functions that can handle combined keypairs
2024-10-30 09:37:16 -06:00
David Garske
c557c6f2bd
Fix issue with error: conflicting types for 'BlockSha3'.
...
```
[CC-AARCH64] lib/wolfssl/wolfcrypt/src/port/arm/armv8-sha3-asm_c.o
lib/wolfssl/wolfcrypt/src/port/arm/armv8-sha3-asm_c.c:212:6: error: conflicting types for 'BlockSha3'; have 'void(long unsigned int *)'
212 | void BlockSha3(unsigned long* state)
| ^~~~~~~~~
In file included from lib/wolfssl/wolfcrypt/src/port/arm/armv8-sha3-asm_c.c:35:
lib/wolfssl/wolfssl/wolfcrypt/sha3.h:224:20: note: previous declaration of 'BlockSha3' with type 'void(word64 *)' {aka 'void(long long unsigned int *)'}
224 | WOLFSSL_LOCAL void BlockSha3(word64 *s);
| ^~~~~~~~~
```
2024-10-29 16:56:50 -07:00
Hideki Miyazaki
b409967f3b
fix spaces
2024-10-30 07:47:40 +09:00
David Garske
72306b9a67
Merge pull request #7973 from bandi13/fixSniffer
...
Fix sniffer
2024-10-29 15:21:41 -07:00
Hideki Miyazaki
b07a372b52
Fix spaces and tabs
2024-10-30 06:42:07 +09:00
David Garske
b982314ac6
Merge pull request #8101 from miyazakh/tsip_ca_add
...
Check Root CA by TSIP before adding it to ca-table
2024-10-29 14:23:47 -07:00
JacobBarthelmeh
2b8d43cef2
Merge pull request #8119 from dgarske/async_20241028
...
Fixes for asynchronous release - SHA3/HMAC devId
2024-10-29 15:11:43 -06:00
Andras Fekete
2cdecd85a2
If we have a capture on device 'any', then we need to handle the offset
...
Detect reading of packet errors
--enable-all and --enable-sniffer exposed this issue
Don't need variable
Rework argument parsing
Need a way to allow arguments to be supplied more granularly. Partucilarly, I needed a "-tracefile" argument without requiring the use of a PCAP file
Fix error prints to STDERR
Fix setting of port filtering
Fix 80 char limit
Not actually a bad packet when there are no more packets
Fix strcat size
Allow the sniffer to print the trace to STDOUT
Fix indexing
Take out superfluous error which is handled later
Set default port to 11111
Single return point
Combine chain to one contiguous memory block
Fix return
Add in error handling for XMALLOC
Add in debugging output when --enable-debug
It makes no sense to allocate a ton of small buffers to process chains
Ultimately, the code is slower because of the several small memcpy instead of a single large contiguous memcpy
Pass in a device name
Fix unused variable
Fix cast
Addressing PR comments
Add new flags to --help
2024-10-29 16:55:20 -04:00
Daniel Pouzzner
0ded8ba0c7
Merge pull request #8074 from bandi13/revertGithubFix
...
Revert "Merge pull request #8072 from rizlik/github-fix"
2024-10-29 15:17:50 -05:00
Daniel Pouzzner
5b07d47e7b
Merge pull request #8095 from embhorn/coverity-workflow
...
Add more configs to Coverity scan schedule.
2024-10-29 15:02:15 -05:00
David Garske
84b5d6613d
More fixes for building x86 in Visual Studio for non-windows OS (Watcom C compiler). Followup to PR #7884 . Fixes ZD 18465
...
* Consolidate the USE_WINDOWS_API to a single place.
* Expand the `WOLFSSL_NOT_WINDOWS_API` improvement for intrinsics and word sizes.
* Fix for macro variadic `...` when no variables are used (some compilers like Watcom C have issue with this).
* Fix for Watcom C compiler "long long" -> "__int64".
* Fix a couple of minor cast warnings reported from VS.
2024-10-29 11:50:24 -07:00
Hideki Miyazaki
32c1f8bbd7
implement TSIP RSA Public Enc/Private Dec
2024-10-29 20:09:22 +09:00
Daniel Pouzzner
57a5895d0e
Merge pull request #8110 from philljj/fix_infer
...
infer: fix uninit values in pkcs8_encode.
2024-10-29 01:16:04 -05:00
Sean Parkinson
202822c655
Merge pull request #8114 from douzzer/20241025-fixes
...
20241025-fixes
2024-10-29 09:55:03 +10:00
David Garske
ea35b98005
Fixed SHA3 issue with possible uninitialized devId when building with async. Fixed HMAC set key issue with devId/heap getting lost.
2024-10-28 11:30:05 -07:00
Brett Nicholas
cac11e3d09
add non-feature-specific macro to disable ECC sign/verify of all-zero digest
2024-10-28 12:22:10 -06:00
Hideki Miyazaki
79a9e0a709
intermediate cert check when using tls1.3 for client side
2024-10-26 14:09:58 +09:00
Daniel Pouzzner
6f87f57d7a
fixes for gating and ARM32 alignment defects:
...
wolfcrypt/src/port/arm/armv8-aes.c: in the WOLFSSL_ARMASM_NO_HW_CRYPTO version of wc_AesSetKey(), copy the supplied userKey to a properly aligned buffer if necessary before calling AES_set_encrypt_key();
src/dtls13.c: in Dtls13GetRnMask(), if defined(WOLFSSL_LINUXKM)), return retval of wc_AesEncryptDirect();
wolfcrypt/src/misc.c: add readUnalignedWord32(), writeUnalignedWord32(), readUnalignedWords32(), and writeUnalignedWords32();
wolfcrypt/src/siphash.c: use readUnalignedWord64(), readUnalignedWord32(), and writeUnalignedWord64(), to avoid unaligned access faults, and fix cast in byte-reversing version of GET_U32().
2024-10-25 23:52:32 -05:00
jordan
9d8c5a293f
dilithium: expose wc_MlDsaKey_GetX functions as API.
2024-10-25 13:29:06 -05:00
Daniel Pouzzner
bdd62314f0
Merge pull request #8111 from JacobBarthelmeh/release
...
prepare for release 5.7.4
2024-10-24 16:00:03 -05:00
JacobBarthelmeh
dd2b191c36
update version listed in wolfssl-fips.rc and Ada wrapper
2024-10-24 14:19:17 -06:00
JacobBarthelmeh
8c5e188dd4
remove trailing white space in README
2024-10-24 13:04:00 -06:00
JacobBarthelmeh
8604024b95
prepare for release 5.7.4
2024-10-24 11:32:33 -06:00
Daniel Pouzzner
3f651a8dd0
Merge pull request #8109 from JacobBarthelmeh/coverity
...
Recent coverity warnings
2024-10-23 21:18:44 -05:00
jordan
ce31b15608
infer: fix uninit values in pkcs8_encode.
2024-10-23 20:11:51 -05:00
Hideki Miyazaki
a14d7db58c
move trailing space
2024-10-24 09:31:00 +09:00
JacobBarthelmeh
52ba700eb3
CID 426426 code maintainability warning, stored NULL value overwritten before used
2024-10-23 18:05:12 -06:00
JacobBarthelmeh
077b070132
CID 426427 remove duplicate null checks
2024-10-23 17:57:14 -06:00
JacobBarthelmeh
9af8716e85
Merge pull request #8087 from ColtonWilley/x509_store_rewrite
...
Initial rewrite of X509 STORE to replicate openssl behavior
2024-10-23 17:14:40 -06:00
Daniel Pouzzner
e7e20532eb
Merge pull request #8097 from julek-wolfssl/zd/18822
...
Fix TLS v1.2 session resumption edge cases
2024-10-23 18:01:35 -05:00
JacobBarthelmeh
830c5dace6
Merge pull request #8106 from douzzer/20241023-fixes
...
20241023-fixes
2024-10-23 16:44:09 -06:00
David Garske
25e32c2539
Fix for TLS v1.2 session resumption with tickets where the server decides to do a full handshake. The wrong sessionIDSz was being checked and should be the arrays one since it get set from the server_hello.
2024-10-23 15:14:05 -07:00
Daniel Pouzzner
cab20fbdd2
add and use WOLFSSL_PARTIAL_CHAIN as native bitmask macro for compat layer X509_V_FLAG_PARTIAL_CHAIN;
...
in src/x509_str.c, fix several C++ "invalid conversion" errors in X509StoreFreeObjList() and wolfSSL_X509_STORE_get0_objects().
2024-10-23 16:57:58 -05:00
Colton Willey
6f0bcac737
Address review comments, rename WOLFSSL_INTER_CA, use up_ref for get issuer
2024-10-23 16:55:34 -05:00
Colton Willey
ee4e1b6262
Properly omit self signed CA from untrusted intermediates, handle memory leak for SSL case with proper flow
2024-10-23 16:55:34 -05:00
Colton Willey
95f8d74202
Fix loop to decrement
2024-10-23 16:55:34 -05:00
Colton Willey
96138e70f8
Restore proper error code handling for self signed CA in non-trusted intermediates
2024-10-23 16:55:34 -05:00
Colton Willey
4c63668295
Small changes per review comments
2024-10-23 16:55:34 -05:00
Colton Willey
3fc3a84a6b
Move X509_STORE_CTX_set_flags under OPENSSL_EXTRA
2024-10-23 16:55:34 -05:00
Colton Willey
1ddb2ce435
Properly implement set flags for X509_V_FLAG_PARTIAL_CHAIN
2024-10-23 16:55:34 -05:00
Colton Willey
87ce96527a
Changes for various failing build configs
2024-10-23 16:55:34 -05:00
Colton Willey
1afbf55a80
Fix new build error after refactor
2024-10-23 16:55:34 -05:00
Colton Willey
6607314dc6
Address code comments, rewrite get issuer internals, use better internal names, get rid of all lines over 80 chars
2024-10-23 16:55:34 -05:00
Colton Willey
f0fae6506f
Fix windows warnings
2024-10-23 16:55:34 -05:00
Colton Willey
98eb6b398c
Fix for windows builds
2024-10-23 16:55:34 -05:00
Colton Willey
f7bfa71d9f
Implement support for verify flag X509_V_FLAG_PARTIAL_CHAIN
2024-10-23 16:55:34 -05:00
Colton Willey
12f4f69fb4
Allow intermediate CA certs without keycertsign when added through X509 STORE
2024-10-23 16:55:34 -05:00
Colton Willey
38c7de1707
Fixes for CI build errors
2024-10-23 16:55:34 -05:00
Colton Willey
17c9e92b7f
Initial rewrite of X509 STORE to replicate openssl behavior
2024-10-23 16:55:34 -05:00
Daniel Pouzzner
82273094e0
Merge pull request #8107 from JacobBarthelmeh/aesgcm
...
fix for state of aes.gcm.H on re-use
2024-10-23 16:52:42 -05:00
JacobBarthelmeh
1d25e0f89b
Merge pull request #8104 from gojimmypi/pr-vs2022-wolfssl-name
...
Name VS2022 binary output wolfssl via project name
2024-10-23 15:36:55 -06:00
JacobBarthelmeh
8fbf6a59bc
Merge pull request #8105 from kareem-wolfssl/zd18825
...
Fix 256-bit ECC conditional in ecc_map_ex.
2024-10-23 15:19:50 -06:00
JacobBarthelmeh
d0f5778429
fix for state of aes.gcm.H on re-use
2024-10-23 15:04:06 -06:00
Andras Fekete
7cee9faa73
Addressing PR comments
2024-10-23 16:53:10 -04:00
Andras Fekete
19d738cecf
Revert "Don't need to upload/download artifacts"
...
This reverts commit b215398bd4 .
2024-10-23 14:28:24 -04:00
Kareem
8986a9dae0
Fix 256-bit ECC conditional in ecc_map_ex.
2024-10-23 11:12:48 -07:00
Daniel Pouzzner
afa5b0168e
fix HAVE_SHA* configurations in IDE/iotsafe/user_settings.h to also set WOLFSSL_SHA*, and in IDE/STM32Cube/default_conf.ftl, IDE/iotsafe/user_settings.h, and examples/configs/user_settings_stm32.h, comment HAVE_SHA* as "old freeRTOS settings.h requires this".
2024-10-23 12:46:32 -05:00
gojimmypi
e3c9c07393
Name VS2022 binary output wolfssl via project name
2024-10-23 09:51:18 -07:00
Daniel Pouzzner
6e14889758
Merge pull request #8094 from JacobBarthelmeh/coverity
...
minor fixes for Coverity reports
2024-10-23 11:26:33 -05:00
JacobBarthelmeh
beeda7bc6f
Merge pull request #8100 from douzzer/20241022-cleanups
...
20241022-cleanups
2024-10-23 10:08:57 -06:00
Andras Fekete
cf6975b603
Add less frequently used tools that are handy to have
2024-10-23 11:23:46 -04:00
Eric Blankenhorn
f20f96c8a2
Fix docs for invalid hash requirements.
2024-10-23 08:43:00 -05:00
Juliusz Sosinowicz
031656ee7a
Send a new ticket when rejecting a ticket and tickets enabled
2024-10-23 13:12:46 +02:00
Hideki Miyazaki
ba1cd85934
check Root CA by TSIP before adding it to ca-table
2024-10-23 18:02:56 +09:00
Daniel Pouzzner
ea491b80ef
tests/api.c: gate test_GENERAL_NAME_set0_othername() on OPENSSL_ALL, not OPENSSL_EXTRA, as it fails with --enable-all-crypto --enable-opensslextra, and is commented to require --enable-opensslall.
2024-10-23 00:02:29 -05:00
Daniel Pouzzner
3bbd00f918
wolfcrypt/src/asn.c: tweak retval handling in MakeSignature() CERTSIGN_STATE_DO section for the benefit of WOLFSSL_DEBUG_TRACE_ERROR_CODES.
2024-10-23 00:02:29 -05:00
Daniel Pouzzner
508555c927
configure.ac: add several missing low level crypto algorithms to all-crypto that are already included indirectly in enable-all.
2024-10-23 00:02:29 -05:00
Daniel Pouzzner
30181f2ced
configure.ac: for reproducible-build, use --build-id=sha1, not --build-id=none, to support users relying on build-id in the linked object.
2024-10-23 00:02:29 -05:00
Daniel Pouzzner
bffcfb7efc
wolfcrypt/src/ecc.c: in wc_ecc_get_curve_id_from_oid(), deconditionalize guard against zero-length len added in 03a6eed037, to fix test_wc_ecc_get_curve_id_from_oid() failing in cross-mingw-all-crypto.
2024-10-23 00:02:29 -05:00
Daniel Pouzzner
6429315216
fix references to misnamed HAVE_SHA224, HAVE_SHA384, HAVE_SHA512 (correct names have WOLFSSL_ prefixes).
2024-10-23 00:02:28 -05:00
JacobBarthelmeh
43fe46cf24
Merge pull request #8099 from dgarske/armasm_aes
...
Fix issue with ARM ASM with AES CFB/OFB not initializing the "left" member
2024-10-22 17:29:45 -06:00
David Garske
5a0bb3a3ed
Fix issue with ARM ASM with AES CFB/OFB not initializing the "left" member. ZD 18841.
2024-10-22 14:30:54 -07:00
JacobBarthelmeh
f21a763ae9
return out of test function if failing RNG init
2024-10-22 14:22:46 -06:00
Andras Fekete
d981cd5b36
Revert "Test using my branch"
...
This reverts commit 5a1da526da .
2024-10-22 12:22:08 -04:00
Andras Fekete
6255859925
Fix package name
2024-10-22 10:56:42 -04:00
Andras Fekete
5a1da526da
Test using my branch
2024-10-22 10:27:38 -04:00
Juliusz Sosinowicz
2847cbfbad
Simplify TLS 1.2 session ID logic
...
Optimize entropy use. Only generate the exact amount of random data that we will actually keep.
Refactor done as part of work on ZD18822
2024-10-22 14:31:46 +02:00
JacobBarthelmeh
18150a11aa
CID 426062,426063 initialization and free check
2024-10-22 00:24:29 -06:00
JacobBarthelmeh
27267d7d2e
CID 426066 fix check if null before free
2024-10-22 00:21:26 -06:00
Daniel Pouzzner
846ef1570d
Merge pull request #8096 from philljj/fix_coverity_more
...
Fix more coverity errors.
2024-10-21 23:57:56 -05:00
Daniel Pouzzner
f8fc31e134
Merge pull request #8090 from gojimmypi/pr-visual-studio-2022
...
Add Visual Studio 2022 Project Files for wolfSSL, Test, & Benchmark
2024-10-21 23:56:57 -05:00
Daniel Pouzzner
805eaa90cc
Merge pull request #7797 from julek-wolfssl/softhsm
...
Init SoftHSMv2 support
2024-10-21 23:56:12 -05:00
jordan
5fd9e99bbd
coverity: don't overwrite obj in wolfSSL_X509_get_ext_d2i.
2024-10-21 20:49:34 -05:00
JacobBarthelmeh
b535d9f752
Merge pull request #8093 from philljj/fix_coverity
...
Fix coverity
2024-10-21 16:45:51 -06:00
Eric Blankenhorn
4aa3d5f8ce
Add more configs to Coverity scan schedule.
2024-10-21 17:29:07 -05:00
gojimmypi
ee24446bee
Add Visual Studio 2022 Project Files for wolfSSL, Test, & Benchmark
2024-10-21 14:05:51 -07:00
jordan
5690af82dc
wolfcrypt test: fix double free.
2024-10-21 15:57:24 -05:00
jordan
35def11781
coverity: fix error, and cleanup.
2024-10-21 14:59:32 -05:00
JacobBarthelmeh
104c805b82
Merge pull request #8092 from douzzer/20241021-wc_FreeRsaKey-WOLFSSL_XILINX_CRYPT
...
20241021-wc_FreeRsaKey-WOLFSSL_XILINX_CRYPT
2024-10-21 13:26:55 -06:00
Daniel Pouzzner
38c337967e
Merge pull request #8086 from bandi13/addDependency
...
Need 'libfile' for license.pl
2024-10-21 14:20:42 -05:00
Daniel Pouzzner
25da3bfe5f
Merge pull request #8070 from JacobBarthelmeh/testing_static_memory
...
use heap hint with wolfSSL_CTX_check_private_key
2024-10-21 13:57:55 -05:00
JacobBarthelmeh
8a71c3b3db
Merge pull request #8066 from gojimmypi/pr-espressif-wolfcrypt
...
Apply various Espressif compatibility updates
2024-10-21 11:36:24 -06:00
Daniel Pouzzner
f24b987f59
wolfcrypt/src/rsa.c: fix wc_FreeRsaKey() WOLFSSL_XILINX_CRYPT XFREE() call to pass key->heap as before.
2024-10-21 12:26:29 -05:00
gojimmypi
187a9b5b4d
Apply various Espressif compatibility updates
2024-10-21 09:20:32 -07:00
JacobBarthelmeh
bc0a2c43e6
avoid warning for unused parameter with certain build configurations
2024-10-21 10:04:26 -06:00
JacobBarthelmeh
efff8e096c
Merge pull request #8076 from gojimmypi/pr-update-espressif-examples
...
Update Espressif Examples
2024-10-21 09:57:29 -06:00
Juliusz Sosinowicz
901384e704
Init SoftHSMv2 support
...
- wolfSSL_EVP_PKEY_set1_DH: If both private and public present, output private key
- ToTraditionalInline_ex2: Add DH checking
- wc_ecc_get_curve_id: check index is not negative
- Fix i2d_PKCS8_PRIV_KEY_INFO to actually output pkcs8 instead of just der
- wolfSSL_EVP_PKEY2PKCS8: Create duplicate to avoid double free
- wolfSSL_DH_generate_key: Fix case where not enough buffer was allocated for 128 bit case
- pkcs8_encode: Add DSA and DH support
- wolfSSL_d2i_PKCS8_PKEY: Correctly advance buffer
- RSA_LOW_MEM: export all integers in compat layer
- Add softhsm action
- Define
- OPENSSL_DH_MAX_MODULUS_BITS
- OPENSSL_DSA_MAX_MODULUS_BITS
- OPENSSL_RSA_MAX_MODULUS_BITS
- Implement
- BN_mul_word
- i2d_ECPKParameters
- PEM_write_bio_PKCS8_PRIV_KEY_INFO
- PEM_read_bio_PKCS8_PRIV_KEY_INFO
- i2d_PKCS8_PRIV_KEY_INFO
- RSA_padding_add_PKCS1_PSS_mgf1
- RSA_verify_PKCS1_PSS_mgf1
2024-10-21 17:26:42 +02:00
JacobBarthelmeh
8fda4ce147
use heap hint with wolfSSL_CTX_check_private_key
2024-10-21 08:53:15 -06:00
JacobBarthelmeh
ef063aac2f
Merge pull request #8091 from julek-wolfssl/openvpn-action-update
...
openvpn action: remove v2.6.0 as certs have expired
2024-10-21 08:50:53 -06:00
Juliusz Sosinowicz
e1aba52e51
openvpn action: remove v2.6.0 as certs have expired
2024-10-21 13:50:36 +02:00
philljj
ea3a79e216
Merge pull request #8089 from douzzer/20241017-wc-delete-methods
...
20241017-wc-delete-methods
2024-10-19 11:07:19 -05:00
Daniel Pouzzner
996986d0c1
refactor wc_AesDelete, wc_curve25519_delete, wc_ed25519_delete, wc_HashDelete, and wc_DeleteRsaKey to take two arguments, the first a required pointer to the object, the second an optional pointer to the pointer to be zeroed upon successful deletion, for the benefit of calling from C# without unsafe code.
...
wrapper/CSharp/wolfSSL_CSharp/wolfCrypt.cs: update for new calling conventions around wc_AesNew, wc_curve25519_new, wc_ed25519_new, wc_HashNew, and wc_NewRsaKey, and the corresponding delete functions.
2024-10-18 21:13:38 -05:00
Daniel Pouzzner
f44d12026a
wolfssl/wolfcrypt/{aes.h,curve25519.h,ed25519.h,hash.h,rsa.h}: remove unneeded .isAllocated member from struct definitions, and add int *result_code argument to constructor prototypes;
...
wolfssl/wolfcrypt/aes.h: add Aes.streamData_sz;
src/tls13.c: fix devId passed to wc_HmacInit() in CreateCookieExt() and TlsCheckCookie();
src/keys.c: in SetKeys(), call wc_HmacInit() on hmacs only if newly allocated;
wolfcrypt/src/aes.c:
* in wc_Gmac(), wc_GmacVerify(), and AesSivCipher(), use wc_AesNew() and wc_AesDelete();
* in wc_AesInit(), zero the object on entry, and remove superseded piecemeal initializations to zero;
* in wc_AesFree(), zero aes->streamData, and zero the entire object as final cleanup;
wolfcrypt/src/curve25519.c: in wc_curve25519_free(), zero the entire object rather than zeroing piecemeal;
wolfcrypt/test/test.c:
* add fallback implementations (for old FIPS) of wc_HashNew(), wc_HashDelete(), wc_curve25519_new(), wc_curve25519_delete(), wc_ed25519_new(), and wc_ed25519_delete();
* update constructor calls throughout for new semantics;
* refactor ed25519_test() for proper cleanup and error encoding.
2024-10-18 17:49:28 -05:00
Daniel Pouzzner
984d16b727
refactor wolfcrypt constructors:
...
add delete APIs, matching recently added wc_AesNew, wc_curve25519_new, wc_ed25519_new, wc_HashNew, and wc_NewRsaKey:
* wc_AesDelete()
* wc_HashDelete()
* wc_DeleteRsaKey()
* wc_curve25519_delete()
* wc_ed25519_delete()
* remove handling in corresponding preexisting free APIs for recently added .isAllocated member -- this restores preexisting semantics;
* add WC_NO_CONSTRUCTORS gate, and auto-activate it when NO_WOLFSSL_MEMORY && WOLFSSL_NO_MALLOC (unless preempted by XMALLOC_USER or XMALLOC_OVERRIDE);
* exclude recently added .isAllocated members from wolfcrypt structs when defined(WC_NO_CONSTRUCTORS);
* adjust wolfcrypt/test/test.c for consistency with the above, and fix cleanup codes/dynamics in several tests.
2024-10-17 18:48:07 -05:00
Andras Fekete
b215398bd4
Don't need to upload/download artifacts
2024-10-17 16:49:27 -04:00
philljj
61b726fae7
Merge pull request #8088 from douzzer/20241016-dtls13-cleanup
...
20241016-dtls13-cleanup
2024-10-17 15:58:07 -04:00
Andras Fekete
752b2c075c
Add exception to forked repos
2024-10-17 15:09:03 -04:00
Andras Fekete
8ed406c69d
Fix test issues
2024-10-17 12:08:21 -04:00
Daniel Pouzzner
06de22e72b
api.c:test_wolfSSL_dtls_stateless_maxfrag(): add missing condition (clang-analyzer-core.NullDereference).
2024-10-17 10:57:19 -05:00
Daniel Pouzzner
fa65da7bb0
analyzer-driven cleanups of --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch:
...
Dtls13HashClientHello(): fix wc_HashType handling;
Dtls13SendFragment(): fix identicalConditionAfterEarlyExit;
GetDtlsRecordHeader(): fix error handling around GetDtls13RecordHeader() (incorrectLogicOperator);
test_wolfSSL_dtls_stateless_maxfrag(): fix a clang-analyzer-core.NullDereference,
test_dtls_frag_ch(): fix a clang-diagnostic-embedded-directive,
test_AEAD_limit_client(): fix an united-data defect found by valgrind.
2024-10-17 00:06:32 -05:00
Daniel Pouzzner
abc6edf4c7
Merge pull request #7796 from SparkiDev/dtls_read_write_threaded
...
SSL asynchronous read/write and encrypt
2024-10-17 00:05:47 -05:00
Daniel Pouzzner
8803f3dd70
Merge pull request #8085 from philljj/fix_coverity
...
Fix coverity errors
2024-10-16 17:18:31 -05:00
Daniel Pouzzner
cc421ddace
Merge pull request #8075 from night1rider/MAX-HW-SHA-FIX
...
Fixing CB needing HAVE_AES_ECB and SHA struct issue for MAX32666/5 port
2024-10-16 17:17:01 -05:00
Daniel Pouzzner
0c640eb3c5
Merge pull request #8081 from SparkiDev/arm32_thumb2_asm_fix
...
Thumb2 ASM: indicated by WOLFSSL_ARMASM_THUMB2
2024-10-16 17:00:01 -05:00
Daniel Pouzzner
49ad2d5c46
Merge pull request #8079 from SparkiDev/arm32_asm_regen
...
ARM32 ASM: regeneration after scripts changes
2024-10-16 16:45:28 -05:00
Andras Fekete
4ca0176668
Need 'libfile' for license.pl
2024-10-16 17:37:17 -04:00
Daniel Pouzzner
9665434694
Merge pull request #8080 from SparkiDev/coverity_fix_5
...
Unit test: fix coverity issue
2024-10-16 16:31:27 -05:00
Daniel Pouzzner
4ed3c00b29
Merge pull request #8078 from SparkiDev/sp_c_cast_and
...
SP C: cast after and with constant
2024-10-16 16:30:15 -05:00
jordan
554ebc2e9e
coverity: fix double free of encryptedContent.
2024-10-16 16:27:44 -05:00
Daniel Pouzzner
a833d6e9b2
Merge pull request #8084 from anhu/kyber_levels
...
Correct kyber levels. Was copy and paste error.
2024-10-16 15:54:18 -05:00
jordan
115507e0c0
coverity: null check.
2024-10-16 13:08:06 -05:00
Anthony Hu
db6df887a6
Correct kyber levels. Was copy and paste error.
2024-10-16 13:39:57 -04:00
jordan
d6fe15af8c
coverity: check mp_sub_d return values.
2024-10-16 11:23:33 -05:00
philljj
2abbab2fd8
Merge pull request #8082 from SparkiDev/bn_bin2bn_fix
...
BN API: fix BN_bin2bn to handle NULL data properly
2024-10-16 12:00:41 -04:00
Sean Parkinson
64a9e6f7c4
BN API: fix BN_bin2bn to handle NULL data properly
...
BN_bin2bn was freeing the BN and returning it.
Added test for this.
2024-10-16 14:08:55 +10:00
Sean Parkinson
1ce90cc8a5
Thumb2 ASM: indicated by WOLFSSL_ARMASM_THUMB2
...
Detecting ARM or Thumb2 is not simple so making our own define that will
work: WOLFSSL_ARMASM_THUMB2 to indicate to use Thumb2 assembly code.
2024-10-16 13:56:44 +10:00
Sean Parkinson
b8d3b990ea
Unit test: fix coverity issue
...
test_wolfSSL_i2d_ASN1_TYPE: don't use str after freeing it.
2024-10-16 12:40:02 +10:00
gojimmypi
a13f48aea0
Update Espressif Examples
2024-10-15 18:36:28 -07:00
Sean Parkinson
db6a2ccdca
Merge pull request #8077 from douzzer/20241015-C89-pedantic-fixes
...
20241015-C89-pedantic-fixes
2024-10-16 10:47:54 +10:00
Sean Parkinson
fb8d2fc42f
ARM32 ASM: regeneration after scripts changes
...
Scripts changed to make generated code not go over 80 characters per
line but SP not updated.
Fix input register formatting in all ARM32 C assembly code.
2024-10-16 10:25:16 +10:00
Sean Parkinson
e4a661ff6e
SSL asynchronous read/write and encrypt
...
Add support for being able to read and write in different threads with
same SSL object.
Add support for encrypt in threads.
2024-10-16 10:14:21 +10:00
Sean Parkinson
a81aa287a5
SP C: cast after and with constant
...
Always cast to sp_digit after and with a constant that would convert
value to integer.
2024-10-16 09:48:10 +10:00
Daniel Pouzzner
ffc07215a4
clean up wolfcrypt code base for -std=c89 -pedantic: add WC_BITFIELD macro to avoid -Wpedantics for "type of bit-field ... is a GCC extension", with overrideable default definition "byte", and replace parent types of all bitfields with WC_BITFIELD;
...
fix numerous trailing commas in enums, mostly by removing them, but one (in asn.h, enum Extensions_Sum) using WOLF_ENUM_DUMMY_LAST_ELEMENT();
rearrange bitfields in struct ed25519_key for contiguity;
always define WOLFSSL_SP_NO_DYN_STACK when defined(WOLF_C89).
2024-10-15 18:24:03 -05:00
Daniel Pouzzner
4fd33b6b5d
Merge pull request #8014 from SparkiDev/lms_sha256_192
...
LMS: SHA-256/192 parameters
2024-10-15 17:24:46 -05:00
Sean Parkinson
ae46f52a66
LMS: SHA-256/192 parameters
...
Add support for parameter sets with SHA-256/192.
2024-10-16 07:15:18 +10:00
philljj
6cde74436e
Merge pull request #8065 from douzzer/20241010-WOLFSSL_NO_MALLOC
...
20241010-WOLFSSL_NO_MALLOC
2024-10-15 17:03:25 -04:00
Daniel Pouzzner
cd8d158964
Merge pull request #8073 from philljj/fix_infer_issues
...
infer: fix dead store, and uninitialized value errors.
2024-10-15 15:42:48 -05:00
Daniel Pouzzner
c7146640f9
Merge pull request #8055 from rizlik/ocsp-cb-ret-propagate
...
ocsp: propagate ocsp cb return error
2024-10-15 15:38:09 -05:00
night1rider
1449f4f4d7
Fixing CB needing HAVE_AES_ECB and SHA struct issue for MAX3266X Hardware
2024-10-15 14:18:07 -06:00
jordan
f5074772da
infer: fix more uninitialized value errors.
2024-10-15 12:41:09 -05:00
Daniel Pouzzner
3e1f365e75
Merge pull request #8064 from SparkiDev/regression_fixes_14
...
Regression test fixes
2024-10-15 11:47:37 -05:00
Andras Fekete
a5331d406c
Revert "Merge pull request #8072 from rizlik/github-fix"
...
This reverts commit 0f8b4dbc63 , reversing
changes made to 743a78dc85 .
2024-10-15 12:39:01 -04:00
Marco Oliverio
724fdae7d7
ocsp: propagate ocsp cb return error
2024-10-15 10:03:15 +00:00
jordan
e3c2c650aa
infer: fix dead store, and uninitialized value errors.
2024-10-14 22:45:17 -05:00
Daniele Lacamera
cc7ccf951a
Move heap variable to all sha implementations
2024-10-14 14:21:29 -05:00
Daniel Pouzzner
260a0dee47
examples/client/client.c: fix numbering annotations, and fix string literal grouping for "-H".
2024-10-14 14:21:29 -05:00
Daniel Pouzzner
0d5d05d44d
more WOLFSSL_NO_MALLOC fixes:
...
wolfcrypt/src/dh.c: in wc_DhGenerateParams(), use named constant for buf size, and only XFREE it if !WOLFSSL_NO_MALLOC;
wolfcrypt/src/ecc.c and wolfssl/wolfcrypt/ecc.h: in wc_ecc_new_point_ex(), remove !WOLFSSL_NO_MALLOC gate around XMALLOC(), and if XMALLOC()ed, set ecc_point.isAllocated, then in wc_ecc_del_point_ex, XFREE() iff ecc_point.isAllocated;
wolfcrypt/src/pkcs7.c: in wc_PKCS7_RsaVerify(), when WOLFSSL_NO_MALLOC, jumbo-size the digest buffer to cope with in-place dynamics in RsaUnPad();
wolfcrypt/test/test.c: add !WOLFSSL_NO_MALLOC gates around various XFREE()s of objects that are on the stack in WOLFSSL_NO_MALLOC builds;
wolfssl/wolfcrypt/types.h: add an unconditional include of memory.h (itself guarded against multiple inclusion) to assure availability of WC_DEBUG_CIPHER_LIFECYCLE prototypes/macros.
2024-10-14 14:21:29 -05:00
Daniel Pouzzner
9312f3cb86
wolfssl/wolfcrypt/types.h: define USE_WOLF_STRDUP for the fallback definition of XSTRDUP regardless of WOLFSSL_NO_MALLOC (wc_strdup_ex() uses XMALLOC(), which may be a user or static pool allocator).
2024-10-14 14:21:29 -05:00
Daniel Pouzzner
0665ff9de7
wolfcrypt/src/asn.c: revert earlier WOLFSSL_NO_MALLOC changes (not needed, after proper gating in test.c).
2024-10-14 14:21:29 -05:00
Daniel Pouzzner
551eb3f44b
wolfcrypt/src/ed25519.c and wolfcrypt/src/hash.c: remove gating around isAllocated XFREE()s in wc_ed25519_free() and wc_HashFree().
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
dc2a8118de
Revert "Allow compiling aes.c with WOLFSSL_NO_MALLOC"
...
This reverts commit 56a96ba609 .
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
ee92f38f88
Revert "fix unused variables"
...
This reverts commit 06195a2e2a .
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
2ca3e1100e
Revert "Move heap variable to all sha implementations"
...
This reverts commit a3f6babfdc .
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
886ebb6ec0
fixes for enable-all-crypto enable-cryptonly WOLFSSL_NO_MALLOC:
...
wolfcrypt/src//asn.c: add stack buffer codepaths in ParseKeyUsageStr(), SetKeyIdFromPublicKey(), and EncodePolicyOID;
wolfcrypt/src/dh.c: add stack buffer codepath in wc_DhGenerateParams();
wolfcrypt/src/ecc.c: add always-fail codepath to find_hole() to preempt heap allocation attempts;
wolfcrypt/test/test.c: gate out several heap-dependent subtests when defined(WOLFSSL_NO_MALLOC), and add a stack buffer codepath in ed448_test();
wolfssl/wolfcrypt/types.h: harmonize macro definitions of XFREE() to use do { ... } while (0) wrappers to assure syntactic indivisibility.
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
0f8b4dbc63
Merge pull request #8072 from rizlik/github-fix
...
ci: github: fix ubuntu version to 22.04
2024-10-14 13:47:44 -05:00
Marco Oliverio
5d3f7c2528
ci: github: fix ubuntu version to 22.04
2024-10-14 16:46:45 +00:00
Juliusz Sosinowicz
743a78dc85
Merge pull request #8046 from embhorn/zd18758
...
Clear ctx in wolfSSL_EVP_DigestInit
2024-10-14 14:35:20 +02:00
Daniel Pouzzner
caf920100c
Merge pull request #8051 from cconlon/eccOidCacheLock
...
Add lock around static ECC ecc_oid_cache
2024-10-11 17:34:54 -05:00
Daniel Pouzzner
dfd8ead95e
Merge pull request #8050 from philljj/fix_acert_defines
...
Fix acert defines, add more tests, cleanup.
2024-10-11 16:22:34 -05:00
Daniel Pouzzner
f8da04d8b0
Merge pull request #7766 from miyazakh/zd18141_tls13_ocsp
...
Add OCSP response for intermediate cert into Certificate extension on TLS1.3
2024-10-11 15:49:19 -05:00
Sean Parkinson
65742c4a7a
ARM32 ASM: regenerated with fixes
...
Fix thumb interwork def check to be consistent and update #endif.
Remove duplicate check in generated C files.
2024-10-11 09:07:57 +02:00
Sean Parkinson
5f1ddadf71
Regression test fixes
...
Fix unit tests to not compile when NO_RSA is defined and RSA used.
test_wc_PKCS7_EncodeSignedData: only RSA supported with streaming.
test_wolfSSL_RSA when SP math and SP: CRT parameters required.
test_wolfSSL_OCSP_REQ_CTX to compile with NO_ASN_TIME.
test_wolfSSL_IMPLEMENT_ASN1_FUNCTIONS: make sure all objects freed even
on memory allocation failure.
test_wolfSSL_error_cb: don't use bio if is NULL.
test_wolfSSL_BN_enc_dec: don't free a twice on memory allocation error.
test_wc_dilithium_der: remove debug printing
test_othername_and_SID_ext: make sid_oid NULL after free to ensure no
double free on later memory allocation failure.
test_wolfSSL_RSA: don't leak when BN_dup fails.
test_wolfSSL_i2d_ASN1_TYPE: free ASN1 string whn no ASN1 type to put it
into.
test_tls13_rpk_handshake: don't leak on failure
test_dtls_client_hello_timeout_downgrade: only move memory when test is
wolfSSL_certs_clear, wolfSSL_set_SSL_CTX, SetSSL_CTX: Check return from
AllocCopyDer.
d2i_generic: make sure impBuf is only freed once.
wolfSSL_BIO_write: don't dereference front unless it is not NULL.
wolfssl_dns_entry_othername_to_gn: don't free obj twice
wolfSSL_X509_REQ_add1_attr_by_NID: don't access reqAttributes if NULL.
succeeding.
2024-10-11 11:49:01 +10:00
Sean Parkinson
9c4960f3fa
Merge pull request #8035 from danielinux/armv8-armasm-ARMv7-A
...
Allow armv8-asm on ARMv7-A with -mthumb-interwork
2024-10-11 09:49:31 +10:00
Daniel Pouzzner
daef866313
Merge pull request #8053 from danielinux/fix-no-malloc
...
Allow building with WOLFSSL_NO_MALLOC again
2024-10-10 16:27:28 -05:00
JacobBarthelmeh
c49f571a79
Merge pull request #8059 from douzzer/20241010-WOLFCRYPT_TEST_LINT
...
20241010-WOLFCRYPT_TEST_LINT
2024-10-10 14:16:51 -06:00
Jack Tjaden
864eaaeef9
Added more discriptive README for NDS and MelonDS C-flag
2024-10-10 12:50:09 -06:00
Daniel Pouzzner
bcc65a09ca
wolfcrypt/test/test.c: harmonize gating for hpke_test() and berder_test(), so that --enable-all-crypto passes -DWOLFCRYPT_TEST_LINT.
2024-10-10 01:06:05 -05:00
Daniel Pouzzner
b5475f3d81
wolfcrypt/test/test.c: add WOLFSSL_WOLFCRYPT_TEST_LINT, allowing testing for -Wunused-function in enable-all configurations. No functional changes, but several missing or inconsistent gates fixed.
2024-10-10 00:25:39 -05:00
Daniel Pouzzner
8b2a26a691
Merge pull request #8054 from bandi13/fixUncalledTest
...
Test was never called
2024-10-10 00:00:07 -05:00
John Safranek
8d3ed05272
Merge pull request #8058 from douzzer/20241009-wolfcrypt_test-FIPS-SMALL_STACK
...
20241009-wolfcrypt_test-FIPS-SMALL_STACK
2024-10-09 17:52:52 -07:00
Daniel Pouzzner
12ba4355d2
configure.ac and wolfssl/wolfcrypt/settings.h: define WOLFSSL_FIPS_READY for fips=ready, WOLFSSL_FIPS_DEV for fips=dev, and add predefined override FIPS version values when defined(WOLFSSL_FIPS_READY) || defined(WOLFSSL_FIPS_DEV).
2024-10-09 17:58:31 -05:00
Daniel Pouzzner
74d14d9687
wolfcrypt/test/test.c: fix for FIPS <6.0.0 with WOLFSSL_SMALL_STACK.
2024-10-09 16:40:48 -05:00
Aidan Garske
64a359c501
Merge pull request #8057 from gojimmypi/workflow-update
2024-10-09 13:41:28 -07:00
Chris Conlon
7b805d7a7d
Add lock around static ECC ecc_oid_cache
2024-10-09 14:35:14 -06:00
gojimmypi
e81ae7bcb6
Run win-csharp-test only for wolfssl owner
2024-10-09 11:14:28 -07:00
Daniel Pouzzner
10e449dc00
Merge pull request #8056 from bandi13/fixCoverity
...
Add several fixes to coverity scan
2024-10-09 10:59:41 -05:00
Andras Fekete
c8840a53ad
Add several fixes to coverity scan
2024-10-09 11:51:56 -04:00
Andras Fekete
d3f143aa2a
Test was never called
2024-10-09 09:20:17 -04:00
Daniele Lacamera
a3f6babfdc
Move heap variable to all sha implementations
2024-10-09 15:11:42 +02:00
Daniele Lacamera
06195a2e2a
fix unused variables
2024-10-09 14:06:38 +02:00
Daniele Lacamera
56a96ba609
Allow compiling aes.c with WOLFSSL_NO_MALLOC
2024-10-09 13:55:42 +02:00
Daniele Lacamera
43574e2255
Allow building with WOLFSSL_NO_MALLOC again
2024-10-09 13:44:03 +02:00
Daniele Lacamera
a23d384e06
Improve guards to build with -mthumb-interwork
2024-10-09 12:41:55 +02:00
jordan
244fff844f
acert: pacify c++ style comment warning.
2024-10-08 21:21:25 -05:00
jordan
bed680a96c
acert: line length.
2024-10-08 20:47:49 -05:00
jordan
deda512598
acert: fix unused store error.
2024-10-08 17:05:53 -05:00
jordan
410e2f148c
Missing free call.
2024-10-08 16:17:16 -05:00
jordan
052cf77233
acert: fix defines, cleanup, more testing.
2024-10-08 16:11:46 -05:00
Daniel Pouzzner
ce9d0e236c
Merge pull request #8047 from ColtonWilley/x509_store_free_ref
...
Free X509 store ref on store free
2024-10-08 15:25:16 -05:00
Daniel Pouzzner
e6dac68ce3
Merge pull request #7966 from cconlon/x509CheckHostLeftWildcardOnly
...
Add left-most wildcard matching support to X509_check_host()
2024-10-08 15:17:27 -05:00
Daniel Pouzzner
4a37947d8f
Merge pull request #3166 from dgarske/csharp_wolfcrypt
...
wolfCrypt CSharp Wrapper
2024-10-08 14:52:40 -05:00
David Garske
e4f4274b4a
Fix AesSivCipher heap hint on cleanup.
2024-10-08 12:11:15 -07:00
David Garske
4753e1c32e
Use byte for isAllocated bit-field. Cleanup some of the "heap" hint logic.
2024-10-08 10:37:45 -07:00
Chris Conlon
f878220b81
add WOLFSSL_LEFT_MOST_WILDCARD_ONLY support to X509_check_host()
2024-10-08 10:38:14 -06:00
Colton Willey
b4146bad18
Free X509 store ref on store free
2024-10-07 13:09:47 -07:00
Eric Blankenhorn
cd5ddeb1c5
Clear ctx in wolfSSL_EVP_DigestInit
2024-10-07 14:20:50 -05:00
David Garske
bf29b68600
Merge pull request #8045 from rizlik/sniffer-fix
...
sniffer: set ssl->curSize before invoking Do* routines
2024-10-07 07:38:27 -07:00
Marco Oliverio
92faa915e4
sniffer: set ssl->curSize before invoking Do* routines
...
commit 99a99e3d6e changes DoApplication to
use ssl->curSize as the size of the current decrypted record. Fix
sniffer code to set this value.
2024-10-07 08:56:35 +00:00
David Garske
59389a0ef5
Fix possible AES leaks detected with sanitizer and clang-tidy.
2024-10-05 11:52:22 -07:00
David Garske
b9de3bbf1a
Fixes for memory leaks in test.c with wc_AesNew and wc_HashNew.
2024-10-05 11:44:59 -07:00
David Garske
dbd3484fdc
Fix for issue with wc_HashAlg being a union.
2024-10-05 11:44:59 -07:00
David Garske
0bb41e1eb4
Resolve hash new leak due to improper heap hint check. Make sure isAllocated is initialized to 0.
2024-10-05 11:44:58 -07:00
David Garske
7989dd8713
Refactor the AES ECB/Direct, CBC and CTR tests.
2024-10-05 11:44:58 -07:00
Aidan Garske
e10c943bf3
wolfCrypt CSharp Wrapper:
...
* Adds RNG, ECC(ECIES and ECDHE), RSA, ED25519/Curve25519, AES-GCM, and Hashing to the CSharp wrapper.
* Adds GitHub action for building the CSharp wrapper solution and running wolfCrypt test and a TLS server/client example.
* Adds "new" API's for wolfCrypt for platforms that cannot tolerate the structs directly.
* Fixes for several scan-build warnings.
2024-10-05 11:44:58 -07:00
David Garske
c230e10f4a
Merge pull request #8044 from douzzer/20241004-wc_static_assert
...
20241004-wc_static_assert
2024-10-05 09:11:11 -07:00
Hideki Miyazaki
5105082a1f
addressed review comments
2024-10-05 15:25:34 +09:00
Hideki Miyazaki
b84a4e1c8d
fix pr unit test
2024-10-05 15:25:34 +09:00
Hideki Miyazaki
7a1d0e0dc8
addressed review comment
2024-10-05 15:25:34 +09:00
Juliusz Sosinowicz
16dc67f421
SendTls13Certificate: set variables directly instead of incrementing
2024-10-05 15:25:32 +09:00
Juliusz Sosinowicz
29e27889ee
TLSX_CSR_InitRequest_ex: decrement csr->requests when reusing
2024-10-05 15:25:08 +09:00
Hideki Miyazaki
dab764a08e
fix pr test
2024-10-05 15:25:08 +09:00
Hideki Miyazaki
69e390f8b9
works OCSP Stapling with TLS1.3 like OCSPv2Multi
2024-10-05 15:25:03 +09:00
Daniel Pouzzner
e944967731
wolfssl/wolfcrypt/types.h: add WC_NO_STATIC_ASSERT path, and add C89-compatible live fallback definition for wc_static_assert().
...
wolfssl/internal.h: refactor WOLFSSL_ASSERT_EQ() and WOLFSSL_ASSERT_SIZEOF_GE() to use wc_static_assert(), and drop unused WOLFSSL_ASSERT_TEST() and WOLFSSL_ASSERT_SIZEOF_TEST().
src/ssl_crypto.c and wolfcrypt/src/evp.c: refactor ad hoc asserts in wolfSSL_DES_ecb_encrypt(), wolfSSL_CRYPTO_cts128_decrypt(), and wolfSSL_EVP_DigestInit(), to use wc_static_assert().
2024-10-04 21:11:25 -05:00
Daniel Pouzzner
a25c0244a7
wolfssl/wolfcrypt/types.h: refactor static_assert*() as wc_static_assert*() to avoid conflicts with target-native static_assert(), and add additional coverage for C23 and MSVC C11.
...
wolfcrypt/test/test.c: in render_error_message(), in tests for strerror_r(), test for __USE_GNU.
2024-10-04 16:41:33 -05:00
András Fekete
4962180a93
Merge pull request #7726 from embhorn/coverity-workflow
...
Add Coverity scan workflow
2024-10-04 14:06:01 -04:00
Eric Blankenhorn
f4b603fa4e
test cron 2xd
2024-10-04 12:37:27 -05:00
Eric Blankenhorn
032ab3b57e
Add Coverity scan workflow
2024-10-04 12:37:26 -05:00
JacobBarthelmeh
898815f11b
Merge pull request #8042 from douzzer/20241004-WOLFSSL_ARM_ARCH_7M
...
20241004-WOLFSSL_ARM_ARCH_7M
2024-10-04 10:15:41 -06:00
Daniel Pouzzner
7ff3b9b79d
wolfssl/wolfcrypt/settings.h: add setup for WOLFSSL_ARM_ARCH_7M.
2024-10-04 10:04:30 -05:00
Daniel Pouzzner
2e539ef70c
Merge pull request #7983 from philljj/tiny_dilithium_cleanup
...
dilithium: small cleanup to support wolfboot.
2024-10-03 23:37:11 -05:00
Daniel Pouzzner
f1e6dd2bac
Merge pull request #8037 from gojimmypi/pr-espressif-benchmark
...
Improve benchmark for Espressif devices
2024-10-03 23:36:27 -05:00
Daniel Pouzzner
ea4d6c00f6
Merge pull request #8040 from SparkiDev/kyber_arm32_asm_base
...
Kyber ARM32 ASM: add assembly using base instructions
2024-10-03 23:24:45 -05:00
Sean Parkinson
f7afc47d98
Kyber ARM32 ASM: add assembly using base instructions
...
Support ARMv4 up to ARMv8.
Base instructions only - faster implemenation will use NEON.
2024-10-04 11:06:18 +10:00
jordan
c3410f2cb8
dilithium: support building dilithium with wolfboot.
2024-10-03 16:38:12 -05:00
David Garske
d0d802a2df
Merge pull request #8038 from SparkiDev/sp_math_ppc_li_fix
...
SP Maths: PowerPC ASM fix
2024-10-03 11:03:31 -07:00
David Garske
afe5209427
Merge pull request #7706 from SparkiDev/kyber_thumb2_asm
...
Kyber ASM ARMv7E-M/ARMv7-M: added assembly code
2024-10-03 10:56:42 -07:00
Sean Parkinson
0668c6ea5d
Merge pull request #8039 from douzzer/20241002-fix-for-cppcheck-force-source
...
20241002-fix-for-cppcheck-force-source
2024-10-03 20:57:09 +10:00
Sean Parkinson
d2047986d9
Kyber ASM ARMv7E-M/ARMv7-M: added assembly code
...
Improved performance by reworking kyber_ntt, kyber_invtt,
kyber_basemul_mont, kyber_basemul_mont_add, kyber_rej_uniform_c to be
in assembly.
Replace WOLFSSL_SP_NO_UMAAL with WOLFSSL_ARM_ARCH_7M
2024-10-03 18:11:31 +10:00
Daniel Pouzzner
b81cc50a70
src/internal.c: in ProcessReplyEx() in the verifyMessage case, refactor some gating/conditionalization around ATOMIC_USER, HAVE_ENCRYPT_THEN_MAC, atomicUser, and ssl->options.startedETMRead, to avoid "Logical disjunction always evaluates to true" from cppcheck incorrectLogicOperator (via multi-test cppcheck-force-source) (warned code introduced by 99a99e3d6e).
2024-10-02 19:19:39 -05:00
Sean Parkinson
695914ed33
SP Maths: PowerPC ASM fix
...
The instruction 'li' is a pseduo instruction for 'load immediate'.
With some compilers, the immediate was interpretted R0[0].
Change to use XOR instead.
2024-10-03 09:00:06 +10:00
Daniel Pouzzner
e814d1baea
Merge pull request #8016 from SparkiDev/dilithium_draft_final_fix
...
Dilithium: Final and draft available in one build
2024-10-02 14:02:00 -05:00
Daniel Pouzzner
24d1b11993
Merge pull request #7988 from gasbytes/fix-conversion
...
Fix Wconversion in the tls* and api/test* files
2024-10-02 12:26:38 -05:00
gojimmypi
cd6bea852b
Improve benchmark for Espressif devices
2024-10-02 09:54:48 -07:00
Reda Chouk
ea852c1c67
missing argument
2024-10-02 17:21:50 +02:00
Reda Chouk
10f0885d88
Merge branch 'master' into fix-conversion
2024-10-02 17:14:06 +02:00
Sean Parkinson
50bbdbbe42
Dilithium: Final and draft available in one build
...
Make draft version of ML-DSA compiled in with final.
Use WC_ML_DSA_44_DRAFT, WC_ML_DSA_65_DRAFT and WC_ML_DSA_87_DRAFT for
the level to get the draft implementation.
2024-10-02 22:23:25 +10:00
Daniel Pouzzner
925fbf3bf7
Merge pull request #8034 from philljj/acert_fix_staticmem_build
...
acert: correct XFREE call.
2024-10-01 23:09:21 -05:00
jordan
1690ad7366
acert: correct XFREE call.
2024-10-01 21:57:53 -04:00
Sean Parkinson
ac788ec40d
Merge pull request #7995 from julek-wolfssl/dtls12-cid
...
Implement DTLS 1.2 Connection ID (CID)
2024-10-02 09:00:59 +10:00
Sean Parkinson
b8dff12e06
Merge pull request #8033 from douzzer/20241001-fixes
...
20241001-fixes
2024-10-02 07:50:40 +10:00
Daniel Pouzzner
a04871f153
examples/pem/pem.c: fix double-free introduced in 65853a41b9;
...
configure.ac and src/include.am: add ENABLED_ARM_THUMB, BUILD_ARM_THUMB, BUILD_ARM_NONTHUMB, ENABLED_ARM_64, BUILD_ARM_64, ENABLED_ARM_32. and BUILD_ARM_32, and use them to gate building of ARM asm files, to fix "ISO C forbids an empty translation unit" warnings (the warning only affects inline asm files, but the gating is deployed more widely).
2024-10-01 16:03:37 -05:00
Reda Chouk
666e658398
trailing spaces and overlong lines fixes
2024-10-01 16:28:31 +02:00
David Garske
59279515f4
Merge pull request #8030 from gojimmypi/pr-fix-thread_local_start
...
Espressif _thread_local_start and _thread_local_end fix
2024-10-01 06:49:06 -07:00
Reda Chouk
3193ecb2c3
fixed Wconversion in the api.c file
2024-10-01 15:07:59 +02:00
Sean Parkinson
f15700f1f6
Merge pull request #8031 from douzzer/20240930-clang-tidy
...
20240930-clang-tidy
2024-10-01 22:38:18 +10:00
gojimmypi
75a676bc7e
Espressif _thread_local_start and _thread_local_end fix
2024-10-01 03:19:31 -07:00
Marco Oliverio
7e69c2049b
dtls cid: address reviewer's comments
2024-10-01 06:45:37 +00:00
Daniel Pouzzner
65853a41b9
fixes, coddling, and suppressions for clang-tidy complaints:
...
examples/pem/pem.c: fix stdio stream leaks.
src/ssl.c and src/ssl_load.c: suppress concurrency-mt-unsafe around getenv(). getenv() is threadsafe as long as no threads putenv() or setenv().
wolfssl/openssl/asn1.h: add parentheses to fix bugprone-macro-parentheses in ASN1_EX_TEMPLATE_TYPE(), and suppress misfiring bugprone-macro-parentheses around IMPLEMENT_ASN1_FUNCTIONS().
2024-09-30 23:19:49 -05:00
JacobBarthelmeh
984dd9146f
Merge pull request #8005 from ColtonWilley/copy_key_option
...
New option to always copy over key to SSL object
2024-09-30 14:20:07 -06:00
JacobBarthelmeh
ee7f02bbd6
Merge pull request #8004 from SparkiDev/dilithium_fixes_1
...
Dilithium: fixes
2024-09-30 10:01:16 -06:00
JacobBarthelmeh
113a61c11e
Merge pull request #8025 from douzzer/20240927-fixes2
...
20240927-fixes2
2024-09-30 09:43:12 -06:00
David Garske
2db2bedd5f
Merge pull request #8027 from SparkiDev/kyber_original_fix
...
Kyber original: fix to work
2024-09-30 07:58:30 -07:00
David Garske
47add7e9e2
Merge pull request #8020 from SparkiDev/arm32_base_chacha20_poly1305
...
ARM32 ChaCha20, Poly1305: assembly code
2024-09-30 06:53:37 -07:00
Sean Parkinson
bb67069e4a
Kyber original: fix to work
...
Encapsulate the message (hash of rand) for original.
Final of FIPS 203 uses rand.
2024-09-30 22:05:26 +10:00
Sean Parkinson
e4301bc554
ARM32 generated files: fix line lengths
...
Generated ARM32 assembly files no longer have lines with more than 80
characters.
2024-09-30 08:50:31 +10:00
Daniel Pouzzner
60c2499602
wolfssl/wolfcrypt/types.h: when defining fallback do-nothing SAVE_VECTOR_REGISTERS2(), also define SAVE_VECTOR_REGISTERS2_DOES_NOTHING, and likewise for fallback CAN_SAVE_VECTOR_REGISTERS, define CAN_SAVE_VECTOR_REGISTERS_ALWAYS_TRUE;
...
wolfcrypt/src/aes.c:
* when SAVE_VECTOR_REGISTERS2_DOES_NOTHING, define do-nothing VECTOR_REGISTERS_PUSH and VECTOR_REGISTERS_POP, to mollify Coverity CONSTANT_EXPRESSION_RESULT;
* in AesGcmDecryptUpdate_aesni(), omit " && (c != NULL)" clause from computation of endA argument to AesGcmAadUpdate_aesni(), to mollify Coverity FORWARD_NULL (impermissible nullness is already checked and BAD_FUNC_ARGed by the sole caller, wc_AesGcmDecryptUpdate());
wolfcrypt/src/misc.c: add readUnalignedWord64(), writeUnalignedWord64(), readUnalignedWords64(), and writeUnalignedWords64(), for safe word64 access to possibly-unaligned data;
wolfcrypt/src/wc_kyber_poly.c: use readUnalignedWords64() and readUnalignedWord64() to mitigate sanitizer-reported "load of misaligned address".
2024-09-27 17:15:53 -05:00
JacobBarthelmeh
b96e73f9ed
Merge pull request #7936 from gojimmypi/pr-add-espressif-esp-tls-cert-bundle
...
Add wolfSSL esp-tls and Certificate Bundle Support
2024-09-27 15:22:49 -06:00
JacobBarthelmeh
3178ce60c6
Merge pull request #8022 from douzzer/20240927-fixes
...
20240927-fixes
2024-09-27 10:48:27 -06:00
Daniel Pouzzner
794f0d8d19
src/pk.c: add missing "keySz = padded_keySz" in _DH_compute_key() ct cleanup path.
...
wolfcrypt/src/wc_kyber_poly.c: add SAVE_VECTOR_REGISTERS2()...RESTORE_VECTOR_REGISTERS() wrappers for AVX2 implementations.
src/bio.c and src/ssl.c: add several missing WC_NO_ERR_TRACE()s, and tweak several returns to generate error traces.
2024-09-27 00:28:45 -05:00
Colton Willey
3d9a4ccddc
Use GetShortInt instead for CRL number extension parsing
2024-09-26 15:43:30 -07:00
JacobBarthelmeh
dd2186f68a
Merge pull request #8021 from bigbrett/cmake-curl-uintptr_t-fix
...
fix cmake build error for curl builds
2024-09-26 15:31:07 -06:00
Colton Willey
6414cf61a7
Update comments for new flags in settings.h
2024-09-26 13:18:06 -07:00
David Garske
2285c02f1c
Merge pull request #7998 from SparkiDev/kyber_aarch64_asm
...
Kyber Aarch64: assembly implementations of functions
2024-09-26 11:59:06 -07:00
Brett Nicholas
32ebaea158
add uintptr_t to config.h fixing curl cmake build error
2024-09-26 10:31:31 -06:00
András Fekete
a1a3a0b04f
Merge pull request #7871 from gojimmypi/pr-repo-owner-check
...
Add conditional repository_owner to workflow
2024-09-26 12:18:58 -04:00
David Garske
46f6a60c9e
Merge pull request #8019 from JacobBarthelmeh/nds
...
minor adjustments for NDS port
2024-09-26 08:58:43 -07:00
Sean Parkinson
2323a5cf59
ARM32 ChaCha20, Poly1305: assembly code
...
Add assembly code for ChaCha20 and Poly1305 on ARM32 when no NEON
available.
2024-09-26 20:24:58 +10:00
gojimmypi
2a354905cb
Add wolfSSL esp-tls and Certificate Bundle Support, improve esp32_mp RSA
2024-09-25 19:42:21 -07:00
Sean Parkinson
de657787cf
Kyber Aarch64: assembly implementations of functions
...
Aarch64 assembly implementation of Kyber functions.
SHA-3 assembly implementations when not hardware crypto.
2024-09-26 09:10:05 +10:00
David Garske
e26ac5e122
Merge pull request #8018 from JacobBarthelmeh/ci
...
initialize values for -Og test
2024-09-25 15:25:03 -07:00
JacobBarthelmeh
45b88048c2
make macro unique to wolfSSL
2024-09-25 15:59:57 -06:00
JacobBarthelmeh
4893017005
feature support will be listed in the next release notes
2024-09-25 15:54:59 -06:00
JacobBarthelmeh
d72c0b372c
Merge pull request #7990 from buchstabenwurst/master
...
Add support for (DevkitPro)libnds
2024-09-25 15:52:34 -06:00
JacobBarthelmeh
bea285c8ef
initialize values for -Og test
2024-09-25 14:57:09 -06:00
JacobBarthelmeh
efd4127b84
Merge pull request #8013 from douzzer/20240924-static_assert-MSVC
...
20240924-static_assert-MSVC
2024-09-25 11:55:05 -06:00
JacobBarthelmeh
79b5ec86f6
Merge pull request #8015 from gojimmypi/pr-mp_read_radix
...
gate test mp_read_radix on OPENSSL_EXTRA or !NO_DSA or HAVE_ECC
2024-09-25 11:35:57 -06:00
JacobBarthelmeh
2328a7e407
Merge pull request #8017 from philljj/misc_cleanup
...
misc cleanup: extra spaces, typos.
2024-09-25 11:26:31 -06:00
JacobBarthelmeh
4db1605914
Merge pull request #8012 from rizlik/dtls13-either-side
...
dtls13: support either side DTLSv1_3 method
2024-09-25 11:25:19 -06:00
JacobBarthelmeh
67b0c4d03f
Merge pull request #8009 from philljj/asn_cleanup
...
asn: cleanup around edPubKeyASN.
2024-09-25 10:09:40 -06:00
jordan
e5109b3f41
misc cleanup: extra spaces, typos.
2024-09-25 09:51:48 -05:00
Brett Nicholas
7592241a46
Merge pull request #8007 from billphipps/fix_cmac_cryptocb
...
Update to separate CMAC and AES conditional compiles. Correct update.
2024-09-25 08:43:27 -06:00
gojimmypi
393072037a
gate test mp_read_radix on OPENSSL_EXTRA || !NO_DSA || HAVE_ECC
2024-09-24 17:23:04 -07:00
Bill Phipps
60dbe38226
Update cmac.c to eliminate extra spaces
2024-09-24 18:34:19 -04:00
Bill Phipps
13b26bc46b
Update cryptocb.c to fix comment
2024-09-24 18:27:58 -04:00
Bill Phipps
60e1c03e46
Update cmac.h to move CmacType down for build compatibility
2024-09-24 18:23:26 -04:00
Daniel Pouzzner
267add1fb3
wolfssl/wolfcrypt/types.h: in static_assert setup section, test for _MSVC_LANG >= 201103L alongside __cplusplus >= 201103L.
2024-09-24 17:14:33 -05:00
JacobBarthelmeh
72711b4e15
Merge pull request #8010 from res0nance/win-arm64-support
...
Add ARM64 to Visual Studio Project
2024-09-24 14:34:42 -06:00
Daniel Pouzzner
f3e41aaf3a
Merge pull request #8011 from ejohnstown/revert-small-stack-fp
...
Revert "FP SmallStack Fix"
2024-09-24 15:24:22 -05:00
JacobBarthelmeh
6b806f8bda
Merge pull request #8008 from bandi13/fixFipsCheck
...
Fix '--depth=1' repos
2024-09-24 13:30:12 -06:00
Brett Nicholas
967dc443fa
remove trailing whitespace
2024-09-24 12:58:01 -06:00
jordan
c6124d573a
asn: tiny peer review cleanup.
2024-09-24 13:01:13 -05:00
Bill Phipps
8aa63e3aad
One more time to quiet clang tidy
2024-09-24 13:43:56 -04:00
Bill Phipps
5e1db686e1
Update logic to avoid clang-tidy warning.
2024-09-24 13:14:00 -04:00
Marco Oliverio
76f71a31f1
dtls13: support either side DTLSv1_3 method
2024-09-24 16:56:02 +00:00
Bill Phipps
35442d27b5
Fixed overlong lines. Thanks clang-tidy
2024-09-24 12:48:54 -04:00
Joshua Okeleke
6c5b174e51
Replace dummy iovec with #define NO_WRITEV
2024-09-24 18:37:10 +02:00
John Safranek
17261467a6
Revert "FP SmallStack Fix"
...
This reverts commit 47e51400bb .
Turns out we don't want to put those fp_ints on the stack unless
absolutely necessary.
2024-09-24 09:19:43 -07:00
Bill Phipps
0d158fc663
Updates due to peer review
2024-09-24 12:06:19 -04:00
Joshua Okeleke
1896b47399
Change comment style
2024-09-24 16:35:29 +02:00
Marco Oliverio
9dccd66a3a
address review: better guarding in test
2024-09-24 12:54:15 +00:00
res0nance
62c6a3d892
ci: add Win32 and ARM64 windows CI
2024-09-24 19:35:39 +08:00
res0nance
34224d84d3
win: add arm64 to wolfssl64.sln
2024-09-24 19:26:05 +08:00
res0nance
665fd89c55
win: add arm64 to sslsnifftest.vcxproj
2024-09-24 18:18:10 +08:00
res0nance
4f856773cf
win: add arm64 to server.vcxproj
2024-09-24 18:15:40 +08:00
res0nance
8bf196f32c
win: add arm64 to client.vcxproj
2024-09-24 18:11:42 +08:00
res0nance
45d51bfe49
win: add arm64 to echoserver.vcxproj
2024-09-24 18:07:41 +08:00
res0nance
28cebe8c7e
win: add arm64 to echoclient.vcxproj
2024-09-24 18:04:07 +08:00
res0nance
f599a0a7c3
win: add arm64 to sslsniffer.vcxproj
2024-09-24 17:59:00 +08:00
res0nance
6735fcf695
win: add arm64 to testsuite.vcxproj
2024-09-24 17:55:44 +08:00
res0nance
112a4ddbad
win: add arm64 to wolfssl.vcxproj
2024-09-24 17:25:26 +08:00
jordan
0f646b6e4b
asn: cleanup around edPubKeyASN.
2024-09-23 23:24:36 -05:00
Colton Willey
720e24209a
Updates for doxygen and review comments
2024-09-23 13:29:41 -07:00
Andras Fekete
09b5362ed8
Fix '--depth=1' repos
...
When the repo was checked out as a shallow copy, we need to unshallow so FIPS builds can successfully find all the required tags and branches.
2024-09-23 16:21:50 -04:00
Bill Phipps
c16ebaeb47
Update to seperate CMAC and AES conditional compiles. Correct update.
2024-09-23 15:33:52 -04:00
Colton Willey
e5022e3ef0
Fix broken endif
2024-09-23 12:11:04 -07:00
Colton Willey
183aef241c
CRL improvements, add parsing for CRL number, do not allow CRL duplicates, add callback for when CRL entry is updated.
2024-09-23 11:52:39 -07:00
Colton Willey
1a4b821c64
Add pthread link for liboqs testing
2024-09-23 11:46:19 -07:00
gojimmypi
27adc66cca
Add conditional repository_owner to workflow, remove socat strategy
2024-09-23 11:30:58 -07:00
Colton Willey
cad2bbd7a7
Add NULL checks on key copy
2024-09-23 10:18:23 -07:00
Colton Willey
634e547fba
Initial implementation of new option to always copy over key to SSL ctx
2024-09-23 10:04:33 -07:00
Sean Parkinson
67528f91b3
Dilithium: fixes
...
Fixes to hint error dectection.
Fix public key decode to fail when DER length is zero for the public key
data.
2024-09-23 09:05:17 +10:00
Daniel Pouzzner
bc6881974d
Merge pull request #8001 from ejohnstown/ecc-test-fix
...
ECC Test Fix
2024-09-20 20:53:28 -05:00
John Safranek
735c0f6b3a
ECC Test Fix
...
The ECC key generation test was failing due not using large enough of a
buffer. Fixed to use a better size.
1. Set the shared digest/sig buffer size in
_ecc_pairwise_consistency_test() to the maximum possible based on the
math in wc_ecc_sig_sz().
2024-09-20 17:25:21 -07:00
David Garske
a9cc880f65
Merge pull request #7993 from miyazakh/renesas_rx65n_rsk_update
...
Update TSIP driver version to v1.21 for RX65N RSK
2024-09-20 17:07:21 -07:00
David Garske
3c67abc664
Merge pull request #7954 from JacobBarthelmeh/pkcs7
...
add option to set custom SKID with PKCS7 bundle creation
2024-09-20 17:05:44 -07:00
JacobBarthelmeh
554d52b069
Merge pull request #7777 from night1rider/MAX32666-port
...
MAX32665 and MAX32666 TPU HW and ARM ASM Crypto Callback Support
2024-09-20 17:14:34 -06:00
JacobBarthelmeh
9781c1fea4
Merge pull request #7999 from douzzer/20240920-fixes
...
20240920-fixes
2024-09-20 17:01:11 -06:00
Hideki Miyazaki
3f0a17b331
Update TSIP driver version to v1.21
...
Use ASN_TEMPLATE
Extracting YEAR and MONTH from __DATE__
2024-09-21 06:23:59 +09:00
ZackLabPC
1ffcf4000b
Making HW Mutex Functions Private Api
2024-09-20 15:21:27 -06:00
JacobBarthelmeh
baab3348f4
Merge pull request #7997 from dgarske/stm32g4
...
Support for STM32G4
2024-09-20 14:05:43 -06:00
Daniel Pouzzner
55cd8a800f
FIPS v5 gating fixes:
...
configure.ac:
* fix logic in "Forcing off" test expressions, first flubbed in 19106a9510;
* fix auto-enable of compkey to exclude v5 even if v5-dev.
src/tls13.c: fix gating for HKDF _ex() variants (>=6.0, not >=5.3).
wolfcrypt/src/error.c: snip out stray spaces at start of several ECC error message strings.
wolfcrypt/test/test.c:
* in render_error_message(), use wolfSSL_ERR_reason_error_string() if available rather than wc_GetErrorString(), to render non-wolfcrypt error strings;
* in ecc_test_deterministic_k(), ecc384_test_deterministic_k(), ecc521_test_deterministic_k(), on FIPS <6.0, gate out SHA384 and SHA512 tests (FIPS v5 only supports SHA256 in wc_ecc_gen_deterministic_k());
* in cmac_test(), gate use of wc_AesCmacGenerate_ex() and wc_AesCmacVerify_ex() on >=6.0, not >=5.3.
2024-09-20 13:53:36 -05:00
ZackLabPC
9881edfabe
Crypto Callback Support for ARM ASM: AES-ECB/CBC, SHA-1/256/384/512 + Fix SP SHA CB Bug
2024-09-20 09:42:53 -06:00
night1rider
1cb324affa
Expanding mutexing and Adding in AES Callbacks for HW
2024-09-20 09:42:53 -06:00
night1rider
a7ef540344
Making so hw mutex define is not needed
2024-09-20 09:42:53 -06:00
night1rider
8f8b4e6665
Addressing Feedback, Adding Null Checks and Mutex Around TRNG
2024-09-20 09:42:53 -06:00
night1rider
fe7987f241
Adding SHA-384/512 support, Null Checks, RNG Health Test for HW, and MAA call update for MAX3266X Port.
2024-09-20 09:42:52 -06:00
night1rider
d714e55a2b
Addressing PR comments typos and cleanup and support HAVE_AES_ECB, Sha1, and Sha224
2024-09-20 09:42:52 -06:00
msi-debian
2e8cf39feb
Initial PR for MAX32665 and MAX32666 TPU HW Support
2024-09-20 09:42:52 -06:00
JacobBarthelmeh
8017c816bb
check on RNG init return with test, and make input const
2024-09-20 08:34:28 -07:00
JacobBarthelmeh
5adad7d869
fix for sanity check of null input
2024-09-20 08:34:28 -07:00
JacobBarthelmeh
ca3b1a1412
add test case
2024-09-20 08:34:28 -07:00
JacobBarthelmeh
7a23cff27f
add PKCS7 set custom SKID
2024-09-20 08:34:28 -07:00
JacobBarthelmeh
d796d8c107
Merge pull request #7994 from miyazakh/renesas_ra6m4_update
...
Update FSP version to v5.4.0 for RA6M4
2024-09-20 09:27:56 -06:00
JacobBarthelmeh
bddb83b62a
Merge pull request #7992 from ejohnstown/ecc-pct-ss
...
Small Stack ECC Pairwise Consistency Test
2024-09-20 09:13:21 -06:00
András Fekete
005a57f745
Merge pull request #7989 from billphipps/atomic_fence
...
Update to use memory_order_seq_cst instead of GCC internal for C11
2024-09-20 09:46:27 -04:00
Juliusz Sosinowicz
cf96ab22ba
Address code review
2024-09-20 15:31:01 +02:00
Juliusz Sosinowicz
99a99e3d6e
Implement DTLS 1.2 Connection ID (CID)
2024-09-20 15:31:01 +02:00
András Fekete
bbbc40dacc
Merge pull request #7996 from julek-wolfssl/move-mymemmem
...
memmem is only being used in testing so move it there
Failing test is disabled in: 5be198fa0e
2024-09-20 09:08:44 -04:00
Sean Parkinson
8768c55579
Merge pull request #7991 from douzzer/20240917-fixes
...
20240917-fixes
2024-09-20 15:20:51 +10:00
Daniel Pouzzner
5be198fa0e
.github/workflows/packaging.yml: disable broken RedHat/Fedora rpm packaging tests.
2024-09-19 17:44:27 -05:00
Daniel Pouzzner
af8feed531
Revert "wolfssl/wolfcrypt/ecc.h: fixes for more linker relocation errors in Fedora packaging test: always export ECC_API functions, but when !WOLFSSL_PUBLIC_ECC_ADD_DBL, remap them with wc_ prefixes."
...
This reverts commit a31e914b98 .
2024-09-19 17:44:08 -05:00
Daniel Pouzzner
a31e914b98
wolfssl/wolfcrypt/ecc.h: fixes for more linker relocation errors in Fedora packaging test: always export ECC_API functions, but when !WOLFSSL_PUBLIC_ECC_ADD_DBL, remap them with wc_ prefixes.
2024-09-19 17:30:44 -05:00
Daniel Pouzzner
da1b8358dc
wolfcrypt/benchmark/benchmark.c: add RSA3072 to keygen bench.
2024-09-19 17:07:19 -05:00
Daniel Pouzzner
212708e3b4
wolfssl/wolfcrypt/ecc.h and wolfcrypt/src/ecc.c: refactor ecc_sets and ecc_sets_count using accessor functions, to fix linker relocation errors in Fedora packaging test.
2024-09-19 17:03:07 -05:00
David Garske
9d24480379
Fix WOLF_CONF_AESGCM=2.
2024-09-19 14:19:39 -07:00
Daniel Pouzzner
510d6a07bf
wolfssl/wolfcrypt/types.h: dial in the __static_assert() gating+definitions, and add static_assert2().
2024-09-19 13:10:47 -05:00
David Garske
9815d9bd03
Support for STM32G4. ZD 18675
2024-09-19 10:54:29 -07:00
Juliusz Sosinowicz
d7303664b5
memmem is only being used in testing so move it there
2024-09-19 15:54:20 +02:00
Daniel Pouzzner
fbbb2b876b
wolfssl/wolfcrypt/types.h: add static_assert() definitions;
...
wolfssl/internal.h: add DTLS13_HANDSHAKE_HEADER_SZ;
src/tls13.c: in EchHashHelloInner(), use falseHeader[DTLS13_HANDSHAKE_HEADER_SZ] to fix buffer overrun;
src/dtls13.c: add static assert for DTLS13_HANDSHAKE_HEADER_SZ.
2024-09-19 01:15:42 -05:00
Hideki Miyazaki
1e0c2604dd
Update FSP version to v5.4.0 for RA6M4
...
add example keys for signing CA
Update READNE
2024-09-19 14:19:05 +09:00
Daniel Pouzzner
263cb5bf78
tests/api.c:test_Sha512_Family_Final(): fix unreachable null pointer deref reported by clang-tidy in FIPS/Async configs.
2024-09-18 17:42:05 -05:00
John Safranek
a81efc0f6f
Small Stack ECC Pairwise Consistency Test
...
1. Update the ECC PCT to use the key's heap to allocate any buffers for
the test. This is similar to how RSA does it.
2. Put the buffers on the stack if not using small stack option.
2024-09-18 15:14:52 -07:00
Daniel Pouzzner
072c5311a5
m4/ax_atomic.m4: fixes for C++ compatibility.
...
wolfssl/wolfcrypt/wc_port.h: add WOLFSSL_API attribute to wolfSSL_Atomic_Int_Init, wolfSSL_Atomic_Int_FetchAdd, and wolfSSL_Atomic_Int_FetchAdd, and add fallback definitions for them, allowing elimination of SINGLE_THREADED implementations of wolfSSL_Ref*(), and allowing ungated use of wolfSSL_Atomic_* calls in api.c.
wolfcrypt/src/dh.c: in wc_DhAgree_ct(), remove frivolous XMEMSET() and stray semicolon.
wolfcrypt/benchmark/benchmark.c: fix bench_rsaKeyGen() to skip tests of key sizes below RSA_MIN_SIZE, and add 4096 bit benchmark if RSA_MAX_SIZE is big enough.
tests/unit.h:
* adopt definitions of TEST_FAIL, TEST_SUCCESS, and TEST_SKIPPED from unit.c, remap TEST_SKIPPED from -7777 to 3, and add TEST_SUCCESS_NO_MSGS, TEST_SKIPPED_NO_MSGS, EXPECT_DECLS_NO_MSGS(), and EXPECT_FAILURE_CODEPOINT_ID, to support existing and future expected-particular-failure test cases without log noise.
* rename outer gate from CyaSSL_UNIT_H to TESTS_UNIT_H.
tests/api.c:
* use EXPECT_DECLS_NO_MSGS() in test_ssl_memio_setup(), test_ssl_memio_read_write(), and test_wolfSSL_client_server_nofail_memio(), and globally update affected expected error codes to correspond.
* use atomics for {client,server}SessRemCount{Malloc,free} to fix races in SessRemCtxCb() and SessRemSslSetupCb().
2024-09-18 16:25:26 -05:00
Joshua Okeleke
337456cc1e
Add support for (DevkitPro)libnds
2024-09-18 21:27:53 +02:00
Bill Phipps
7122001dd6
Update to use memory_order_seq_cst instead of GCC internal for C11
2024-09-18 13:48:26 -04:00
JacobBarthelmeh
b9908409d4
Merge pull request #7987 from bandi13/betterEngineFlagsFix
...
FIPS defines RSA_MIN_SIZE and users may want to override
2024-09-18 11:18:24 -06:00
JacobBarthelmeh
87dc45b938
Merge pull request #7986 from julek-wolfssl/crl-cb
...
Add crl error override callback
2024-09-18 10:43:37 -06:00
JacobBarthelmeh
46f2b21abf
Merge pull request #7985 from julek-wolfssl/curl-ci
...
Use nproc not nproc+1 threads
2024-09-18 10:35:08 -06:00
JacobBarthelmeh
ffd0fb23f7
Merge pull request #7979 from SparkiDev/sp_x86_64_no_avx_fix
...
SP x86_64 asm: check for AVX2 support
2024-09-18 10:23:12 -06:00
JacobBarthelmeh
ec8a1ba956
Merge pull request #7962 from embhorn/zd18558
...
Add cmake support for WOLFSSL_CUSTOM_CURVES
2024-09-18 10:18:38 -06:00
JacobBarthelmeh
fcb8d3ffc5
Merge pull request #7887 from kojo1/crl-pss
...
allow sigParamsSz is zero and malloc(0) to return NULL
2024-09-18 10:04:29 -06:00
JacobBarthelmeh
fb2144d290
Merge pull request #7951 from julek-wolfssl/dtls13-cid-fixes
...
DTLS 1.3 CID fixes
2024-09-18 09:38:15 -06:00
Reda Chouk
949565f156
Merge branch 'wolfSSL:master' into fix-conversion
2024-09-18 17:16:48 +02:00
Reda Chouk
be88ddda15
more Wconversion fixes: api/test* block
2024-09-18 16:53:39 +02:00
Andras Fekete
bd77ee4f37
FIPS defines RSA_MIN_SIZE and users may want to override
2024-09-18 10:28:10 -04:00
Juliusz Sosinowicz
ae6c872797
Add crl error override callback
2024-09-18 11:58:53 +02:00
Juliusz Sosinowicz
84c80b4c0f
make mymemmem available for linking
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
1e75a2367c
Address code review
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
74ac2cd07d
dtls 1.3: pad plaintext when too short for record header protection
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
29f51b6245
CheckcipherList: Check Cipher minor to detect TLS 1.3 ciphersuite
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
4a26af0dfa
dtls 1.3: Add cid size to output buffer length
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
ee2b77c0bd
Move manual memio to api.c
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
6d5fefde4a
dtls 1.3: Check header length before copying
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
8ce6f17144
Add dtls 1.3 cid api test
2024-09-18 10:35:29 +02:00
Juliusz Sosinowicz
c166b9dd77
Use nproc not nproc+1 threads
2024-09-18 10:28:28 +02:00
JacobBarthelmeh
c3900470aa
Merge pull request #7982 from bandi13/fixEngineFlags
...
Engine needs to have a RSA_MIN_SIZE=1024
2024-09-17 17:03:11 -06:00
Daniel Pouzzner
ef6f1562d6
Merge pull request #7980 from ejohnstown/small-stack-fp
...
FP SmallStack Fix
2024-09-17 17:28:46 -05:00
Andras Fekete
41b3a729d2
Engine needs to have a RSA_MIN_SIZE=1024
2024-09-17 17:36:37 -04:00
John Safranek
47e51400bb
FP SmallStack Fix
...
The function _fp_exptmod_nct() is using WOLFSSL_NO_MALLOC to guard
using stack allocation vs malloc. It's twin function _fp_exptmod_ct()
is using WOLFSSL_SMALL_STACK for this. This is causing inappropriate use
of malloc() in a small stack environment. The no-malloc case will also
be kept so static memory and no-malloc fix still works.
1. Change the guards for `#ifndef WOLFSSL_NO_MALLOC` in the function
`_fp_exptmod_nct()` to `#if defined(WOLFSSL_SMALL_STACK) &&
!defined(WOLFSSL_NO_MALLOC)`.
2024-09-17 10:55:11 -07:00
Sean Parkinson
aa41e09937
SP x86_64 asm: check for AVX2 support
...
Check for AVX2 as well as BMI2 and ADX.
Some virtual machines may not have AVX2 with the others.
2024-09-17 14:14:27 +10:00
Sean Parkinson
5ef617a75a
Merge pull request #7978 from douzzer/20240916-wc_DhAgree_ct-sp-math
...
20240916-wc_DhAgree_ct-sp-math
2024-09-17 09:38:07 +10:00
Daniel Pouzzner
04c781ad9b
wolfcrypt/src/dh.c: in wc_DhAgree_ct(), implement failsafe constant-time key size fixup, to work around sp-math constant-time key clamping.
...
also fix a -Wunused in src/ssl_load.c:DataToDerBuffer() teased out by configuration permutations.
2024-09-16 17:33:25 -05:00
András Fekete
9666394b73
Merge pull request #7977 from billphipps/have_rsa_fix
...
Update to remove HAVE_RSA references. Correct NO_MALLOC RSA test bug.
2024-09-16 16:26:26 -04:00
Bill Phipps
b4a491de12
Add missing guard to api.c
2024-09-16 14:03:31 -04:00
Bill Phipps
92f3a808b0
Update to remove HAVE_RSA references. Correct NO_MALLOC RSA test bug.
2024-09-16 13:29:38 -04:00
Sean Parkinson
e6b466dd71
Merge pull request #7923 from embhorn/rsa2048_min
...
Set RSA_MIN_SIZE default to 2048 bits
2024-09-16 21:38:19 +10:00
Daniel Pouzzner
52030f182b
Merge pull request #7972 from miyazakh/renesas_tsip_update_
...
Renesas TSIP version update
2024-09-14 00:41:19 -05:00
Daniel Pouzzner
990d38a068
Merge pull request #7974 from dgarske/noasn
...
Support for NO_ASN when wildcard *.c is used
2024-09-14 00:34:15 -05:00
Daniel Pouzzner
80f3b0d3d8
Merge pull request #7926 from philljj/x509_acert_support
...
x509 attribute cert support
2024-09-14 00:30:29 -05:00
Daniel Pouzzner
4545a9b4a2
Merge pull request #7960 from night1rider/mmcau-DesEcb
...
DES ECB using mmcau HW Library, and DES ECB basic test
2024-09-14 00:07:18 -05:00
David Garske
0d5659ff2d
Merge pull request #7975 from douzzer/20240913-fixes
...
20240913-fixes
2024-09-13 17:20:36 -07:00
Daniel Pouzzner
84f0800b96
configure.ac:
...
* set DEFAULT_ENABLED_ALL_ASM=no if enable_afalg or ENABLED_32BIT;
* omit enable_srtp_kdf from enable-all-crypto if enable_afalg.
linuxkm: add GetCAByAKID to wolfssl_linuxkm_pie_redirect_table.
src/x509.c: in GenerateDNSEntryIPString(), use XMEMSET() to initialize tmpName, not = {0}, to avoid unmaskable compiler emission of memset() call.
wolfssl/openssl/ssl.h: add OPENSSL_EXTRA to an existing OPENSSL_ALL-gated section, consistent with gating of correspinding section in wolfssl/ssl.h.
wolfssl/wolfcrypt/settings.h: adopt setup for WOLFSSL_SP_NO_UMAAL from wolfssl/wolfcrypt/sp_int.h now that it's used by wolfcrypt/src/port/arm/thumb2-poly1305-asm.S.
2024-09-13 18:01:11 -05:00
Eric Blankenhorn
91e411b4b9
Set RSA_MIN_SIZE default to 2048 bits
2024-09-13 16:02:05 -05:00
David Garske
8cea8283db
Support for NO_ASN when wildcard *.c is used. Added STM32H743xx support.
2024-09-13 13:52:21 -07:00
jordan
7df446bf4e
cleanup: fix cast warning, and small cleanup.
2024-09-13 09:26:19 -05:00
jordan
7faed6cded
X509 attribute cert (acert) support.
2024-09-13 08:03:55 -05:00
Hideki Miyazaki
c49f1e22bd
Update TSIP version for RX72N and GR-ROSE
...
fix readme
2024-09-13 14:12:39 +09:00
Sean Parkinson
4fa20cb770
Merge pull request #7965 from ColtonWilley/pkcs12_use_indef_len
...
Use context specific for PKCS7 encrypted data encoding
2024-09-13 12:17:08 +10:00
Colton Willey
b0ddccc802
Change PKCS7 encrypted content encoding to use ASN_CONTEXT_SPECIFIC
2024-09-12 16:46:35 -07:00
Daniel Pouzzner
5b337e69d9
Merge pull request #7961 from philljj/fips_pkcallback
...
Update HAVE_FIPS define guard in test.h.
2024-09-12 18:18:48 -05:00
Sean Parkinson
171ab4b13a
Merge pull request #7967 from douzzer/20240910-configure-enable-all-asm-and-sp-cleanup
...
20240910-configure-enable-all-asm-and-sp-cleanup
2024-09-13 09:18:37 +10:00
Daniel Pouzzner
f6d40ad229
Merge pull request #7955 from gojimmypi/pr-espressif-port-updates
...
Update Espressif sha, util, mem, time helpers
2024-09-12 18:15:25 -05:00
Daniel Pouzzner
95c94f52d9
Merge pull request #7953 from gojimmypi/pr-espressif-settings
...
Update wolfcrypt settings.h for Espressif ESP-IDF, template update
2024-09-12 18:11:34 -05:00
Daniel Pouzzner
e9d820b730
Merge pull request #7799 from anhu/fips_macro_guard
...
Better macro guarding fix undeclared var error
2024-09-12 17:56:00 -05:00
Daniel Pouzzner
b736d78950
Merge pull request #7948 from anhu/MATCH_SUITE
...
Convert MATCH_SUITE_ERROR to OpenSSL error in wolfSSL_get_error()
2024-09-12 17:50:35 -05:00
David Garske
de3c45a02c
Merge pull request #7971 from douzzer/20240912-gating-tweaks
...
20240912-gating-tweaks
2024-09-12 15:30:11 -07:00
Daniel Pouzzner
e3301b06f6
OpenSSL coexistence tweaks
2024-09-12 16:37:41 -05:00
Daniel Pouzzner
ad7c25b409
Merge pull request #7823 from cconlon/rsaPssSignPkCallbackNoPrehashTls13
...
PK callbacks: add build option to give full data to TLS 1.3 RSA-PSS sign callback instead of hash
2024-09-12 15:40:59 -05:00
Daniel Pouzzner
eb53a95f57
wolfcrypt/src/asn.c:DecodeSingleResponse(): fix gating for "at" working var, by refactoring gating for WOLFSSL_OCSP_PARSE_STATUS sections for clarity.
2024-09-12 14:38:50 -05:00
Daniel Pouzzner
3fac3b71ca
configure.ac:
...
* move leanpsk and asn option processing early to make their results available to existing math back end selector logic;
* add -DWOLFSSL_ASN_ALL to enable-all-crypto;
* tweak asn option processing to preserve "original" value in case later configure logic wants to pivot on that.
2024-09-12 13:29:02 -05:00
Daniel Pouzzner
53c4c0095a
wolfcrypt/src/sp_cortexm.c: update from scripts#423.
2024-09-12 13:29:02 -05:00
Daniel Pouzzner
98a51029f8
configure.ac: in --enable-all-asm handler, support only x86_64 and aarch64, and enable sp-asm only for them, to avoid "ASM not available for CPU" error from sp-asm handler.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
8d0047fedf
SP: fixes for several bugprone-macro-parentheses and -Wconversions.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
428e15816f
configure.ac:
...
* in handling for enable-all-asm, add check for full Gnu C and don't auto-enable all-asm unless full Gnu C and enable-all-crypto, among other sanity checks.
* in enable-all and enable-all-crypto, correctly conditionalize several FIPS-v6-only features/algorithms.
* in FIPS v5 setup, force off SRTP and SRTP-KDF (with warnings).
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
e227b2ad7d
wolfcrypt/src/sp_int.c: fix bugprone-too-small-loop-variable in _sp_mul().
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
5b8e9e692f
wolfcrypt/src/siphash.c: fixes for bugprone-macro-parentheses.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
1b0ef048ba
configure.ac: move handling for enable-all-asm to precede handling for enable-all-crypto, and compute DEFAULT_ENABLED_ALL_ASM appropriately.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
430d104430
configure.ac: render warnings when FIPS setup forces off options supplied to configure.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
723d8efd1c
configure.ac: consolidate enable-all-crypto settings in one place.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
cf8f9a80fc
configure.ac: add --enable-all-asm, and add it to --enable-all and --enable-all-crypto.
2024-09-12 13:29:01 -05:00
Daniel Pouzzner
3cb66ad18a
configure.ac: update help and error messages re fastmath.
2024-09-12 13:29:01 -05:00
David Garske
20e2e33e25
Merge pull request #7939 from SparkiDev/thumb2_poly1305
...
undefined
2024-09-12 11:15:53 -07:00
András Fekete
75c6633039
Merge pull request #7970 from night1rider/XILINX-AFLAG-Fix
...
Fixing Redefine Errors/Warnings for --enable-afalg=xilinx
2024-09-12 13:04:29 -04:00
night1rider
c88f1c4d54
Fixing Redefine Errors/Warnings
2024-09-12 09:54:03 -06:00
Siert Wieringa
9e2a7b3653
Feature/multiple aes siv ads ( #7911 )
...
* Proposed new interface for AesSivEncrypt with number of ADs != 1.
* Implement AES SIV S2V computation with a number of ADs not equal to 1.
* Add Example A.1 from RFC5297 to AES SIV test vectors.
* Add tests for new AES SIV interface, and add test vectors for examples given in RFC5297.
* Include the nonce in count of maximum number of ADs.
* Addressing review comments.
* Addressing review comments: Use uppercase 'U' suffix on unsigned constant.
* Rename local variables named 'ad0' to 'ad', since the zero makes no sense, especially since in the RFC 5297 document they're actually counting the ADs from 1.
2024-09-12 07:55:29 -07:00
JacobBarthelmeh
088dfab22a
Merge pull request #7968 from douzzer/20240911-fix-whitespace
...
20240911-fix-whitespace
2024-09-11 22:18:36 -06:00
Daniel Pouzzner
4159ba0a95
.github/workflows/openldap.yml: fix whitespace.
2024-09-11 23:01:42 -05:00
Daniel Pouzzner
974506db28
Merge pull request #7933 from julek-wolfssl/openldap-action
...
Add openldap action
2024-09-11 22:54:31 -05:00
Sean Parkinson
27033c225f
Thumb-2 ChaCha, Poly1305: implemention in assembly
...
Implementation of ChaCha algorithm for ARM Thumb-2.
Implementation of Poly1305 algorithm for ARM Thumb-2.
2024-09-12 10:59:01 +10:00
Sean Parkinson
d23bfd2eb9
Merge pull request #7963 from anhu/p11nopin
...
Check for PIN before saving it.
2024-09-12 10:20:47 +10:00
Colton Willey
88d1ed7393
Modify pkcs8 pbe encryption to use indefinite length encoding, making it consistent with both old ASN code and openssl
2024-09-11 15:55:05 -07:00
Anthony Hu
246228e410
Check for PIN before saving it.
2024-09-11 14:39:03 -04:00
Eric Blankenhorn
a75c73cdef
Add cmake support for WOLFSSL_CUSTOM_CURVES
2024-09-11 10:45:21 -05:00
jordan
ea57e82395
Update HAVE_FIPS define guard in test.h.
2024-09-11 08:20:15 -05:00
Sean Parkinson
1c8f1e6921
Merge pull request #7802 from douzzer/20240725-wc_DhAgree_ct
...
20240725-wc_DhAgree_ct
2024-09-11 08:06:58 +10:00
Reda Chouk
79d3b955ed
tls.c type conversion fixed.
2024-09-10 13:51:21 +02:00
Daniel Pouzzner
213ac1ac0a
Merge pull request #7959 from billphipps/sgx_c99_fix
...
Update to use C99 instead of C11 because of lack of SGX support
2024-09-10 00:39:40 -05:00
Sean Parkinson
10c1fa2088
Merge pull request #7931 from barracuda156/powerpc-darwin
...
Fixes for PowerPC
2024-09-10 10:34:09 +10:00
Sean Parkinson
500a3b41e4
Merge pull request #7932 from barracuda156/dispatch
...
Fixes for earlier macOS
2024-09-10 10:29:45 +10:00
night1rider
e912aff7e5
DES ECB using mmcau HW Library, and DES ECB basic test
2024-09-09 15:32:21 -06:00
Daniel Pouzzner
49a680540c
add constant time DH key agreement APIs:
...
* adds wc_DhAgree_ct().
* adds wolfSSL_DH_compute_key_padded(), using wc_DhAgree_ct() if available, with fallback fixup code.
* adds unit test coverage in api.c:test_wolfSSL_DH() for expected-success calls to wolfSSL_DH_compute_key() and wolfSSL_DH_compute_key_padded().
2024-09-09 16:24:07 -05:00
Bill Phipps
232314039d
Update to use C99 instead of C11 because of lack of SGX support
2024-09-09 12:10:53 -04:00
David Garske
dbfebeac43
Merge pull request #7956 from douzzer/20240906-errcode-fixups
...
20240906-errcode-fixups
2024-09-09 08:42:46 -07:00
Reda Chouk
884b51151b
Merge branch 'fix-conversion' of github.com:gasbytes/wolfssl into fix-conversion
2024-09-09 16:06:16 +02:00
Reda Chouk
65db4b15d6
api type conversion errors, first half of tls* files
2024-09-09 16:05:15 +02:00
Daniel Pouzzner
c81c9be9ce
error code fixes:
...
* fix TLS layer to consistently use WOLFSSL_FATAL_ERROR for error retvals, rather than literal -1.
* add WC_NO_ERR_TRACE() wrapper around LENGTH_ONLY_E (it does not signify an error condition).
* refactor errcode handling for traceability in wolfSSL_DSA_do_sign(), wolfSSL_DH_size(), wolfSSL_EC_KEY_get_conv_form(), wolfSSL_d2i_DSA_SIG(), wolfSSL_DSA_do_sign(), SetDhInternal(), and wolfSSL_EC_KEY_get_conv_form().
2024-09-06 19:33:48 -05:00
gojimmypi
b57fcd0bd8
Update Espressif sha, util, mem, time helpers
2024-09-06 16:33:04 -07:00
JacobBarthelmeh
398f8c90e2
Merge pull request #7952 from douzzer/20240906-GetCAByKeyHash-wolfssl_linuxkm_pie_redirect_table
...
20240906-GetCAByKeyHash-wolfssl_linuxkm_pie_redirect_table
2024-09-06 15:37:37 -06:00
gojimmypi
282e559113
Update wolfcrypt settings.h for Espressif ESP-IDF
2024-09-06 14:24:38 -07:00
Daniel Pouzzner
e708ef3b56
Merge pull request #7946 from gasbytes/fix-conversion
...
Fix conversion in ssl* files and in internal.c
2024-09-06 16:13:55 -05:00
Anthony Hu
9e204dc023
Convert MATCH_SUITE_ERROR to OpenSSL error in wolfSSL_get_error()
2024-09-06 16:29:30 -04:00
Anthony Hu
4bd39aa52e
Better macro guarding fix undeclared var error
2024-09-06 15:15:34 -04:00
Daniel Pouzzner
87aef05f16
linuxkm: add GetCAByKeyHash to wolfssl_linuxkm_pie_redirect_table.
2024-09-06 14:15:19 -05:00
David Garske
80a63a3fce
Merge pull request #7924 from anhu/pqm4_purge
...
Get rid of pqm4 in favour our own Kyber/MLDSA implementation
2024-09-06 12:00:26 -07:00
Daniel Pouzzner
945f97636a
Merge pull request #7945 from ColtonWilley/no_external_network_test_option
...
Add option to skip all tests requiring an internet connection
2024-09-06 10:48:33 -05:00
Sean Parkinson
5f40f9a140
Thumb-2 ChaCha: implemention in assembly
...
Implementation of ChaCha algorithm for ARM Thumb-2.
2024-09-06 10:16:45 +10:00
Sean Parkinson
96e2c51f07
Merge pull request #7907 from ColtonWilley/rsa_pad_crypto_cb
...
Add new crypto callback for RSA with padding.
2024-09-06 08:48:36 +10:00
Sean Parkinson
6fc9dcae07
Merge pull request #7947 from douzzer/20240905-mp_sign_t
...
20240905-mp_sign_t
2024-09-06 08:46:23 +10:00
Colton Willey
9ad4e565fe
Restore original comments
2024-09-05 15:10:50 -07:00
Daniel Pouzzner
dcaff9dff4
Merge pull request #7944 from JacobBarthelmeh/pkcs12
...
add parsing over optional PKCS8 attributes
2024-09-05 16:55:44 -05:00
David Garske
887c5abcb1
Merge pull request #7949 from douzzer/20240905-whitespace-and-utf8-cleanup
...
20240905-whitespace-and-utf8-cleanup
2024-09-05 14:38:19 -07:00
Daniel Pouzzner
9f6a75cdfd
Merge pull request #7934 from rizlik/ocsp-get-ca-keyhash-fix
...
ocsp: search CA by key hash instead of ext key id
2024-09-05 15:03:54 -05:00
Daniel Pouzzner
a3fb5029f8
clean up trailing whitespace and misplaced CRLFs, add missing final newlines, remove stray UTF8 nonprintables (BOMs) and ASCIIfy stray homoglyphs (spaces and apostrophes), guided by expanded coverage in wolfssl-multi-test check-source-text.
2024-09-05 14:52:18 -05:00
Reda Chouk
73786112ec
review addressed
2024-09-05 20:55:00 +02:00
Daniel Pouzzner
603c03c0be
MPI: add mp_sign_t and sp_sign_t.
2024-09-05 10:37:02 -05:00
Marco Oliverio
6114691fd6
ocsp: try lookup certificate using keyHash as KeyId
...
try to lookup the certificate using the key hash as key identifier
first. If we can't find a certificate, it means that the certificate
uses another method to compute the key identifier so we need to fallback
to linear search.
2024-09-05 09:49:01 +00:00
Daniel Pouzzner
a3fea482db
Merge pull request #7914 from julek-wolfssl/gh/7825
...
Fix failing test_dtls_frag_ch
2024-09-04 19:35:06 -05:00
Colton Willey
f749ca387d
Rewrite to use test to make old mac sh versions happy
2024-09-04 16:34:09 -07:00
Colton Willey
8661cf6fee
Update no network test option to overload meaning of existing WOLFSSL_EXTERNAL_TEST instead of using new flag
2024-09-04 16:09:16 -07:00
JacobBarthelmeh
9a8573afc9
touch up pkcs8 create function and test case warning
2024-09-04 15:48:44 -06:00
Colton Willey
8aa5f463b1
Add option to skip all tests requiring an internet connection.
2024-09-04 14:48:25 -07:00
JacobBarthelmeh
2a1165460e
add parsing over optional PKCS8 attributes
2024-09-04 15:15:53 -06:00
David Garske
1c8767b4d3
Merge pull request #7942 from douzzer/20240904-fix-test_wolfSSL_EVP_sm3
...
20240904-fix-test_wolfSSL_EVP_sm3
2024-09-04 12:40:51 -07:00
Daniel Pouzzner
a31733db85
Merge pull request #7909 from SparkiDev/dilithium_fips204_draft
...
Dilithium: Support FIPS 204 Draft
2024-09-04 14:34:59 -05:00
Daniel Pouzzner
7e16016311
tests/api.c: fix expected retval from EVP_DigestInit() in test_wolfSSL_EVP_sm3() -- before 2c9a3c5c1c, EVP_DigestInit() incorrectly returned BAD_FUNC_ARG when passed a null ctx.
2024-09-04 14:04:29 -05:00
Daniel Pouzzner
53aec861a4
Merge pull request #7938 from billphipps/atomic_fence
...
Modernized memory fence support for C11 and clang
2024-09-04 13:17:26 -05:00
Daniel Pouzzner
c9ff15da21
Merge pull request #7901 from SparkiDev/memusage_8
...
Memory usage improvements
2024-09-04 12:34:44 -05:00
Colton Willey
3b5d0aa85a
Fix up whitespace changes from editor autoformat
2024-09-04 10:25:20 -07:00
Colton Willey
f9af463db1
Update RSA verify documentation to specify that the output should be compared with the original plaintext
2024-09-04 10:13:40 -07:00
András Fekete
fb86818251
Merge pull request #7930 from mpsuzuki/fix-ocsp-test
...
[scripts/ocsp.test] Remove ${SCRIPT_DIR} from the pathname to ca-google-root.pem.
2024-09-04 12:59:25 -04:00
David Garske
0580c1a83a
Merge pull request #7889 from miyazakh/renesas_rx65n_update
...
Update rx64n support on gr-rose
2024-09-04 08:08:49 -07:00
David Garske
7c7de235d8
Merge pull request #7937 from douzzer/20240903-missing-WC_NO_ERR_TRACEs
...
20240903-missing-WC_NO_ERR_TRACEs
2024-09-04 08:07:19 -07:00
David Garske
990b4d62ea
Merge pull request #7940 from Irvise/master
...
Ada binding: correct Alire manifest and fix build
2024-09-04 08:05:58 -07:00
Sean Parkinson
88c3e0af22
Memory usage improvements
...
kdf.c: wc_PRF() - No need for previous, reuse current.
sha256.c: Transform_Sha256() - Add slow but small version for many
register implementation.
sp_int.h: Change 'used' and 'size' fields to 16-bit types when possible.
sp_int.c: Fixes for 16-bit used.
2024-09-04 22:51:31 +10:00
Irvise
2a96981dbe
Ada binding: correct Alire manifest and fix build
2024-09-04 09:42:24 +02:00
Daniel Pouzzner
b26fa6cf59
Merge pull request #7918 from SparkiDev/type_conversion_fixes_3
...
Type conversion fixes
2024-09-03 20:18:00 -05:00
Daniel Pouzzner
121b8c52f8
Merge pull request #7869 from julek-wolfssl/libspdm-x509
...
libspdm x509 parts
2024-09-03 20:09:31 -05:00
Bill Phipps
ae939e9e6a
Modernized memory fence support for C11 and clang
2024-09-03 21:09:30 -04:00
Daniel Pouzzner
806df85477
backfill more missing WC_NO_ERR_TRACE()s on error code operands, and refactor away the obsolete GEN_MEM_ERR macro mechanism in wolfcrypt/src/ecc.c.
2024-09-03 17:44:11 -05:00
Sean Parkinson
ec6c7051a8
Merge pull request #7928 from dgarske/riscv_fixes
...
Fixes for building on RISC-V
2024-09-04 08:03:45 +10:00
David Garske
b7a6c6c314
Fixes for building RISCV ASM with enable-all.
...
* Fix type warning for SHA512 ByteReverseWords call
* Fix issue with riscv-asm and xchacha.
2024-09-03 09:37:01 -07:00
Reda Chouk
a80a2cdcff
Addressed type conversion error in internal.c
2024-09-03 16:26:32 +02:00
Reda Chouk
b237730dad
fix type conversion in ssl* files
2024-09-02 18:08:14 +02:00
Marco Oliverio
293719c168
ocsp: search CA by key hash instead of ext key id
2024-09-02 15:25:53 +00:00
Juliusz Sosinowicz
9254e270be
Add openldap action
2024-09-02 13:29:18 +02:00
Sean Parkinson
ed7beb4e0e
Type conversion fixes
...
Changes to get compilation with -Wconversion passing on the files.
2024-09-02 19:19:23 +10:00
Juliusz Sosinowicz
2c9a3c5c1c
Missing libspdm features
...
- RsaFunctionPrivate: detect when only n,e,d are available
- wolfSSL_EVP_add_digest: return success
- wolfSSL_EVP_add_cipher: return success
- wolfSSL_BN_bin2bn: accept NULL data if len is 0 (checked in mp_read_unsigned_bin)
- wolfssl_read_bio: advance correct bio
- wolfSSL_X509_set_ext: return raw extension data for BASIC_CA_OID
- Implement
- sk_X509_EXTENSION_free
- d2i_EC_PUBKEY_bio
- d2i_RSA_PUBKEY_bio
- d2i_X509_REQ_INFO
- X509_REQ_INFO_free
- ASN1_TIME_set_string_X509
2024-09-02 10:01:12 +02:00
Sergey Fedorov
70caed572a
crl.c: use EV_TRIGGER when NOTE_TRIGGER unavailable
2024-09-01 21:03:18 +08:00
Sergey Fedorov
2ddfe15c4f
Fix libdispatch usage condition
2024-09-01 21:03:18 +08:00
Sergey Fedorov
94478cb208
wc_port.h: fix macros for powerpc
2024-09-01 20:17:11 +08:00
Sergey Fedorov
ef2424336c
sp_int.c: fix ppc asm for macOS
2024-09-01 20:17:11 +08:00
Sergey Fedorov
b6bfae9c24
asm.c: fix ppc asm for macOS
2024-09-01 20:17:11 +08:00
Sergey Fedorov
765e5d1689
types.h: add powerpc macros
2024-09-01 20:17:11 +08:00
suzuki toshiya
2fa0da74e4
[scripts/ocsp.test] Remove ${SCRIPT_DIR} from the pathname to ca-google-root.pem.
2024-08-31 18:22:20 +09:00
Daniel Pouzzner
4d837e74c4
Merge pull request #7303 from Irvise/master
...
[Ada] Initial library support
2024-08-31 00:26:29 -05:00
Colton Willey
2bcfff3497
Expand testing to include SW implementation of RSA with padding callback, code cleanup to address review comments.
2024-08-30 13:41:51 -07:00
David Garske
72fc08ede8
Merge pull request #7927 from douzzer/20240830-wolfSSL_ERR_reason_error_string-EnumCastOutOfRange
...
20240830-wolfSSL_ERR_reason_error_string-EnumCastOutOfRange
2024-08-30 13:17:32 -07:00
Daniel Pouzzner
126df1d9ee
src/internal.c: in wolfSSL_ERR_reason_error_string(), return "unknown error number" when error==0 and !OPENSSL_EXTRA, to avoid provoking clang-analyzer-optin.core.EnumCastOutOfRange.
2024-08-30 14:32:56 -05:00
David Garske
13ec0f0694
Merge pull request #7916 from SparkiDev/riscv-sha3-asm
...
RISC-V ASM: SHA-3
2024-08-30 09:06:36 -07:00
Juliusz Sosinowicz
b67fd6f29c
Fix failing test_dtls_frag_ch
...
- Add option to disable ECH
- InitSuites: clean up DTLS paths
- wolfSSL_parse_cipher_list: remove WOLFSSL_MAX_SUITE_SZ setting
- wolfSSL_parse_cipher_list: add rationale for keeping ciphersuites
- test_dtls_frag_ch: ECH and ciphersuites were pushing the ClientHello message over the fragmentation limit. Disabling ECH and limiting ciphersuites fixes the test.
2024-08-30 09:56:52 +02:00
Sean Parkinson
d475ecc8d3
Merge pull request #7917 from douzzer/20240828-WOLFSSL_DEBUG_TRACE_ERROR_CODES-TLS
...
20240828-WOLFSSL_DEBUG_TRACE_ERROR_CODES-TLS
2024-08-30 14:12:20 +10:00
Sean Parkinson
0df8a0f88c
Merge pull request #7925 from JacobBarthelmeh/readme
...
update CVE listed in changelog
2024-08-30 14:11:17 +10:00
Daniel Pouzzner
2dcd04668b
src/internal.c: in wolfSSL_ERR_reason_error_string(), restore handling for -WOLFSSL_X509_V_ERR_*, but separated from handling for the proper wolfSSL_ErrorCodes.
2024-08-29 21:28:02 -05:00
Daniel Pouzzner
255465a757
src/internal.c: in wolfSSL_ERR_reason_error_string(), remove handling for -WOLFSSL_X509_V_ERR_*, and make corresponding changes in wolfssl/error-ssl.h and tests/api.c.
2024-08-29 20:02:42 -05:00
JacobBarthelmeh
26756da925
update CVE listed in changelog
2024-08-29 16:45:23 -06:00
Daniel Pouzzner
4b4000bf61
Merge pull request #7903 from SparkiDev/ecc_sigalgo_params_null
...
Certificates: ECC signature algorithm parameter
2024-08-29 16:16:08 -05:00
Daniel Pouzzner
fab5c9f864
Merge pull request #7880 from ColtonWilley/tls13_send_cert_use_signed_len
...
Use signed variable for length calculation in SendTls13Certificate
2024-08-29 16:12:41 -05:00
Daniel Pouzzner
ef4ea53570
Merge pull request #7912 from julek-wolfssl/gh/7686
...
DTLS 1.3: check size including headers
2024-08-29 16:09:53 -05:00
Daniel Pouzzner
41449fac48
Merge pull request #7895 from embhorn/zd18433
...
Use verify callback before checking dates
2024-08-29 15:52:04 -05:00
Daniel Pouzzner
5e1bf9d4f2
Merge pull request #7908 from anhu/no_stdio
...
Don't include stdio.h if not needed.
2024-08-29 15:33:41 -05:00
Daniel Pouzzner
f670400183
Merge pull request #7921 from gasbytes/oss-fuzz-70747
...
added missing wolfSSL_X509_NAME_free(dName)
2024-08-29 15:15:52 -05:00
Daniel Pouzzner
17870d4159
src/internal.c: in wolfSSL_ERR_reason_error_string(), add missing error string for SCR_DIFFERENT_CERT_E.
...
wolfssl/ssl.h, wolfssl/error-ssl.h, wolfssl/wolfcrypt/error-crypt.h, wolfcrypt/src/error.c, and src/internal.c:
* fix values of WOLFSSL_ERROR_SSL and WOLFSSL_ERROR_WANT_X509_LOOKUP to match OpenSSL values;
* move legacy CyaSSL compat layer error codes from ssl.h to error-ssl.h and renumber them to conform to existing sequence;
* move enum IOerrors from ssl.h to error-ssl.h to get picked up by support/gen-debug-trace-error-codes.sh;
* add to enum wolfSSL_ErrorCodes negative counterparts for several positive error return constants;
* include error-ssl.h from ssl.h;
* add label (wolfCrypt_ErrorCodes) to error-crypt.h enum, and in wc_GetErrorString(), use switch ((enum wolfCrypt_ErrorCodes)error) to activate switch warnings for missing enums;
* in wolfSSL_ERR_reason_error_string(), use switch((enum wolfSSL_ErrorCodes)error) to activate switch warnings for missing enums;
* in ssl.h, add special-case WOLFSSL_DEBUG_TRACE_ERROR_CODES macros for WOLFSSL_FAILURE;
* in error-crypt.h, add missing WOLFSSL_API attribute to wc_backtrace_render(); and
* harmonize gating of error codes, ssl.h / error-ssl.h / internal.c:wolfSSL_ERR_reason_error_string() / api.c:error_test().
tests/api.c:
* add error_test() adapted from wolfcrypt/test/test.c, checking all error strings for expected presence/absence and length, called from existing test_wolfSSL_ERR_strings().
* in post_auth_version_client_cb(), add missing !NO_ERROR_STRINGS gating.
add numerous WC_NO_ERR_TRACE()s to operand error code uses, cleaning up error traces in general, and particularly when WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS.
* crypto lib (36),
* crypto test&benchmark (20),
* TLS lib (179),
* examples (122),
* linuxkm (3),
* tests/api.c (2272).
2024-08-29 14:22:56 -05:00
Colton Willey
50a3a37ff2
Merge branch 'master' of github.com:ColtonWilley/wolfssl into rsa_pad_crypto_cb
2024-08-29 11:14:49 -07:00
Anthony Hu
844d0ec558
Get rid of pqm4 in favour our own Kyber/MLDSA implementation
2024-08-29 13:23:39 -04:00
Reda Chouk
109e4c3dfb
added missing wolfSSL_X509_NAME_free(dName)
2024-08-29 17:59:02 +02:00
Juliusz Sosinowicz
31ec2b0acd
Merge pull request #7920 from bandi13/fixOSPOpenSSH
...
Fix compilation error for RSA_MAX_SIZE
2024-08-29 16:41:18 +02:00
Andras Fekete
b886ffd04b
Fix compilation error for RSA_MAX_SIZE
2024-08-29 09:31:10 -04:00
Sean Parkinson
7c3d66ecd6
RISC-V ASM: SHA-3
...
Add assembly implementations of SHA-3.
Use VSRL_VX instead of two VSRL_VI operations as immediate is only 5
bits.
2024-08-29 17:58:02 +10:00
Daniel Pouzzner
b178138d83
src/internal.c: in wolfSSL_ERR_reason_error_string(), add missing error string for SCR_DIFFERENT_CERT_E, and de-gate error strings previously gated on HAVE_HTTP_CLIENT.
...
tests/api.c: add error_test() adapted from wolfcrypt/test/test.c, checking all error strings for expected presence/absence and length, called from existing test_wolfSSL_ERR_strings().
wolfssl/ssl.h, wolfssl/error-ssl.h, and wolfssl/wolfcrypt/error-crypt.h:
* move several negative error return codes from ssl.h to error-ssl.h,
* renumber them to conform to existing sequence, and
* include error-ssl.h from ssl.h;
* add special-case WOLFSSL_DEBUG_TRACE_ERROR_CODES macros for WOLFSSL_FAILURE;
* add missing WOLFSSL_API attribute to wc_backtrace_render().
add numerous WC_NO_ERR_TRACE()s to operand error code uses, cleaning up error traces in general, and particularly when WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS.
* crypto lib (36),
* crypto test&benchmark (20),
* TLS lib (179),
* examples (122),
* linuxkm (3),
* tests/api.c (2272).
2024-08-28 23:05:04 -05:00
David Garske
d4f6b5b300
Merge pull request #7915 from embhorn/zd18539
...
Fix WOLFSSL_NO_TLS12 build error
2024-08-28 10:03:58 -07:00
Eric Blankenhorn
1a3a730eb9
Fix WOLFSSL_NO_TLS12 build error
2024-08-28 10:51:11 -05:00
David Garske
5e77c06ea2
Merge pull request #7913 from bandi13/fixDocumentation
...
Doxygen complains about the quotes used
2024-08-28 07:34:03 -07:00
Andras Fekete
6494233774
Doxygen complains about the quotes used
2024-08-28 09:31:34 -04:00
Juliusz Sosinowicz
b2f59f733a
DTLS 1.3: check size including headers
2024-08-28 12:58:50 +02:00
Sean Parkinson
a3e239c2ad
Certificates: ECC signature algorithm parameter
...
Allow, with a define, ECC signature algorithm parameters to be NULL and
not just empty.
Only for interop.
2024-08-28 11:10:41 +10:00
Sean Parkinson
652158fcac
Dilithium: Support FIPS 204 Draft
...
Compile with WOLFSSL_DILITHIUM_FIPS204_DRAFT to get code that implements
the FIPS-204 August 2023 DRAFT.
Alternatively, --enable-dilithium=draft or
--enable-dilithium=fips204-draft
2024-08-28 11:02:01 +10:00
Anthony Hu
6174fb3545
Don't include stdio.h if not needed.
2024-08-27 17:44:04 -04:00
Hideki Miyazaki
0cfd48f200
update rx64n gr-rose key and signed cert
...
add a script to generate signed cert
2024-08-28 06:00:31 +09:00
Eric Blankenhorn
dcea21a9a5
Merge pull request #7897 from douzzer/20240823-WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS
...
20240823-WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS
2024-08-27 15:41:20 -05:00
Colton Willey
b7299a23c0
Add new crypto callback for RSA with padding.
2024-08-27 13:09:23 -07:00
Eric Blankenhorn
d0475def5f
Merge pull request #7906 from douzzer/20240827-XFENCE-all-disable-asm-assert
...
20240827-XFENCE-all-disable-asm-assert
2024-08-27 14:32:20 -05:00
Daniel Pouzzner
349e06ab4a
wolfssl/wolfcrypt/wc_port.h: use non-asm implementation of XFENCE when available.
2024-08-27 13:36:21 -05:00
Colton Willey
a57d234f6b
Clean up sign comparison warnings
2024-08-27 10:07:11 -07:00
Daniel Pouzzner
e164bcb24d
Merge pull request #7904 from SparkiDev/kyber_tls_fixes
...
Kyber: fix TLS usage
2024-08-27 00:44:56 -05:00
Daniel Pouzzner
90152fedda
Merge pull request #7902 from gasbytes/wc_pkcs7_decodeauthenvelopeddata-problem
...
Added check on error out from wc_PKCS7_EncodeAuthEnvelopedData
2024-08-27 00:40:21 -05:00
Daniel Pouzzner
2537e08a99
Merge pull request #7890 from embhorn/zd18463
...
Various Coverity fixes
2024-08-26 23:34:23 -05:00
Sean Parkinson
893a486ae1
Kyber: fix TLS usage
...
Allow only select parameter sets to be compiled in.
Fixed unit.test to recognize when level is supported.
2024-08-27 10:35:08 +10:00
Anthony Hu
bf074d2bb9
Merge pull request #7877 from SparkiDev/ml_dsa_ml_kem_final
...
Dilithum, Kyber: Update to final specification
2024-08-26 16:48:05 -04:00
Daniel Pouzzner
b17b190695
tests/api.c: add missing deallocations in test_wc_dilithium_sign_vfy().
2024-08-26 15:00:27 -05:00
Reda Chouk
25dd8b641e
added check on error out from wc_PKCS7_EncodeAuthEnvelopedData
2024-08-26 19:29:06 +02:00
Sean Parkinson
60f438f0c3
Dilithum, Kyber: Update to final specification
...
FIPS 203 and FIPS 204 final specification changes.
2024-08-26 17:42:27 +10:00
Daniel Pouzzner
bcbb5441ec
Merge pull request #7881 from gasbytes/eagain-proper-shutdown
...
Properly handling the shutdown when multiple ones go on EAGAIN back to back
2024-08-23 23:46:31 -05:00
Daniel Pouzzner
c454a4217c
Merge pull request #7866 from gojimmypi/pr-espressif-config
...
Introduce Espressif common CONFIG_WOLFSSL_EXAMPLE_NAME, Kconfig
2024-08-23 21:11:09 -05:00
Daniel Pouzzner
3f0ba97d1e
Merge pull request #7893 from gojimmypi/pr-asn-allow-zero-serial
...
Introduce WOLFSSL_ASN_ALLOW_0_SERIAL
2024-08-23 21:09:41 -05:00
Daniel Pouzzner
1d34b565fa
Merge pull request #7891 from SparkiDev/test_fixes_2
...
Test fixes
2024-08-23 21:08:44 -05:00
Takashi Kojo
4bedef9664
allow sigParamsSz is zero and malloc(0) to return NULL
2024-08-24 07:58:02 +09:00
Daniel Pouzzner
a39f521f7f
Merge pull request #7884 from dgarske/x86_notwindows
...
Fixes for building x86 in Visual Studio for non-windows OS
2024-08-23 17:38:30 -05:00
Daniel Pouzzner
7725e75c42
add WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS flag for optional errcode tracing in apps, define it in wolfcrypt/test/test.c when defined(WOLFSSL_DEBUG_TRACE_ERROR_CODES), and deploy WC_NO_ERR_TRACE() to test.c where needed.
2024-08-23 16:35:43 -05:00
Eric Blankenhorn
6dab58266d
Various Coverity fixes
2024-08-23 16:09:18 -05:00
Eric Blankenhorn
be37587bc3
Use verify callback before checking dates
2024-08-23 16:02:23 -05:00
Reda Chouk
8a6d7ff9a5
more clang-tidy edits
2024-08-23 21:31:55 +02:00
Reda Chouk
f4a27772e0
removed unnecessary copy of cb
2024-08-23 17:44:49 +02:00
Juliusz Sosinowicz
88d4f486e2
Merge pull request #7892 from douzzer/20240822-fixes
...
20240822-fixes
2024-08-23 16:47:23 +02:00
Daniel Pouzzner
166519ae67
wolfssl/openssl/asn1.h: use macro for ASN1_BIT_STRING_FIRST_BYTE to avoid non-const errors under gcc-6.5; tests/api.c: fix uninited data defect in test_wolfssl_EVP_chacha20_poly1305().
2024-08-22 14:41:06 -05:00
Reda Chouk
577cce60df
defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES) && !defined(WOLFSSL_NO_TLS12)
2024-08-22 21:30:57 +02:00
Reda Chouk
7d2ca8db5f
addressing review:
...
- added unit test;
- formatting;
2024-08-22 21:30:57 +02:00
Reda Chouk
2356bec909
no magic values
2024-08-22 21:30:57 +02:00
Reda Chouk
db64d36f00
properly handling the shutdown when multiple ones go on EAGAIN back to
...
back.
2024-08-22 21:30:56 +02:00
gojimmypi
8baf39310f
Introduce WOLFSSL_ASN_ALLOW_0_SERIAL
2024-08-22 12:30:15 -07:00
Sean Parkinson
56adefcdc5
Ed25519: don't define ASM functions when small
...
Small builds don't allow ASM implementations.
Don't have functions defined for ASM when building small
implementation.
2024-08-22 17:05:26 +10:00
Sean Parkinson
08d8a74992
Test fixes
...
api.c:
Update #ifdefs.
sp_int.c:
Fix free call when hardening is disabled.
2024-08-22 16:09:22 +10:00
Sean Parkinson
e99bbf9429
Merge pull request #7875 from douzzer/20240814-debug-trace-errcodes-MP
...
20240814-debug-trace-errcodes-MP
2024-08-22 10:10:45 +10:00
Daniel Pouzzner
1a0bf421bd
Merge pull request #7781 from julek-wolfssl/sssd
...
init sssd support
2024-08-21 19:05:08 -05:00
Sean Parkinson
2505a59dae
Merge pull request #7886 from douzzer/20240819-shebang-bash-env
...
20240819-shebang-bash-env
2024-08-21 14:50:15 +10:00
Daniel Pouzzner
2448d482f4
wolfssl/wolfcrypt/error-crypt.h: move MPI error codes to range {-97, -100} to avoid collisions.
2024-08-20 23:37:21 -05:00
Daniel Pouzzner
05c4955316
linuxkm: add support for WOLFSSL_DEBUG_BACKTRACE_ERROR_CODES using dump_stack().
2024-08-20 23:36:07 -05:00
Daniel Pouzzner
0da78a7ee2
move several MP error codes from wolfssl/wolfcrypt/sp_int.h, wolfssl/wolfcrypt/tfm.h, and wolfssl/wolfcrypt/integer.h, to wolfssl/wolfcrypt/error-crypt.h, harmonizing their names and numbers.
...
wolfssl/wolfcrypt/error-crypt.h: add WC_FIRST_E.
wolfcrypt/src/error.c: add MP error code strings.
wolfssl/error-ssl.h: add WOLFSSL_FIRST_E and WOLFSSL_LAST_E.
wolfcrypt/test/test.c: update error_test() for new error code layout, refactoring the "missing" check.
src/internal.c: use WC_FIRST_E and WC_LAST_E in wolfSSL_ERR_reason_error_string().
src/ssl.c: fix wolfSSL_ERR_GET_REASON() to identify in-range error codes using WC_FIRST_E, WC_LAST_E, WOLFSSL_FIRST_E, and WOLFSSL_LAST_E.
sp_int.h: provide for WOLFSSL_DEBUG_TRACE_ERROR_CODES, and refactor MP error codes as enums, for consistency with other error codes.
wolfcrypt/src/ecc.c: fix 2 identicalInnerCondition's.
2024-08-20 14:09:06 -05:00
Daniel Pouzzner
1c68da282c
portability enhancement: use "#!/usr/bin/env <interpreter>" on all perl scripts and shell scripts that use bash extensions, and use "#!/bin/sh" on the rest.
2024-08-20 13:48:33 -05:00
Juliusz Sosinowicz
305a699398
Add sssd action
2024-08-20 17:12:43 +02:00
David Garske
4f4fb4bd0a
Merge pull request #7888 from douzzer/20240820-configure-silent
...
20240820-configure-silent
2024-08-20 05:35:23 -07:00
Juliusz Sosinowicz
3260a9b680
Address code review
2024-08-20 10:53:44 +02:00
Daniel Pouzzner
c4f978ffc8
Merge pull request #7874 from mpsuzuki/fix-posix-date
...
POSIX does not request "date" command to support "-R" option.
2024-08-20 00:42:52 -05:00
Daniel Pouzzner
0becc347b1
configure.ac: inhibit options.h reminder message when --quiet.
2024-08-20 00:25:15 -05:00
David Garske
294362a0b7
Fixes for building x86 in Visual Studio for non-windows OS.
2024-08-19 13:00:41 -07:00
suzuki toshiya
e417091f61
[configure.ac] spell out RFC 5322 "date" format for POSIX-conforming "date" with no extension.
...
Following to the advice by Daniel Pouzzner (see the discussion in the issue #7874 ),
no need to invoke "env" command to set LC_TIME.
* IEEE Std 1003.1-2024 does not request the "-R" option:
https://pubs.opengroup.org/onlinepubs/9799919799/
* Default "date" in Solaris 11.4 does not support "-R":
https://docs.oracle.com/cd/E88353_01/html/E37839/date-1.html
* Default "date" in HP-UX 11.22 does not support "-R":
https://man.freebsd.org/cgi/man.cgi?query=date&apropos=0&sektion=0&manpath=HP-UX+11.22&arch=default&format=html
* Default "date" in AIX 7 does not support "-R":
https://www.ibm.com/docs/en/aix/7.3?topic=d-date-command
2024-08-18 15:50:54 +09:00
gojimmypi
a0fc2f0497
Introduce Espressif common CONFIG_WOLFSSL_EXAMPLE_NAME, Kconfig
2024-08-17 13:42:30 -07:00
Daniel Pouzzner
e562a1c4d1
Merge pull request #7867 from ColtonWilley/cert_copy_option
...
Add new option to always copy cert buffer for each SSL object
2024-08-17 00:07:00 -05:00
Daniel Pouzzner
b412e5f24e
Merge pull request #7879 from dgarske/options_h
...
Improve wolfssl/options.h issues
2024-08-16 23:54:54 -05:00
Daniel Pouzzner
c90aa27e06
Merge pull request #7882 from kojo1/client-help
...
Fix <null> in the help message
2024-08-16 23:13:45 -05:00
Takashi Kojo
723adaad20
Fix <null> in the help message
2024-08-17 12:08:07 +09:00
Daniel Pouzzner
9a693f5e65
Merge pull request #7876 from mpsuzuki/fix-config-stray-redirect
...
Using ">>" with no command in configure can be ambigious for some ancient /bin/sh.
2024-08-16 15:38:39 -05:00
Colton Willey
d5268d8bb5
Update NULL check to be consistent with other checks
2024-08-16 10:46:31 -07:00
Colton Willey
a09e3bb3e7
Use signed variable for length calculation in SendTls13Certificate
2024-08-16 10:43:11 -07:00
Daniel Pouzzner
b693127dcd
Analyzer fixes
2024-08-16 17:24:34 +02:00
Juliusz Sosinowicz
a6a40de249
init sssd support
...
- Refactor OCSP to separate IO callback
- wolfSSL_BIO_reset: fix return
- CheckCertCRL_ex: return CRL_CERT_DATE_ERR instead of ASN_AFTER_DATE_E
- CheckCertCRL_ex: return most relevant error code
- i2d/d2i APIs: correct parameters handling and return codes
- Custom ASN1 structures: major refactor to make it much more versatile
- Use WOLFSSL_ASSERT_SIZEOF_GE where applicable
- wolfSSL_EVP_SignFinal: implement ecc
- wolfSSL_EVP_VerifyFinal: implement ecc
- OBJ_NAME_do_all: bring closer to OpenSSL functionality
- Correct return of *_push api
- Implement:
- OCSP_REQ_CTX API
- d2i_ECPKParameters
- wolfSSL_sk_insert
- OCSP_parse_url
- X509_STORE_set1_param
- X509_get0_subject_key_id
- X509_OBJECT_retrieve_by_subject
- OCSP_sendreq_nbio
2024-08-16 17:22:41 +02:00
David Garske
a9be38eaf0
Improve wolfssl/options.h issues. Fixes #7853 .
2024-08-15 15:49:43 -07:00
David Garske
1190d1bafe
Merge pull request #7873 from SparkiDev/riscv-poly1305-asm
...
RISC-V 64 ASM: Add Poly1305 implementation
2024-08-15 09:40:06 -07:00
Colton Willey
d056b63742
Always free existing SSL cert to be compatible with openssl behavior
2024-08-15 09:24:44 -07:00
suzuki toshiya
bbdf7fc1b0
[configure.ac] ">>" without preceding command does not work in traditional Bourne shell.
2024-08-15 13:59:16 +09:00
Sean Parkinson
ccd8b9aa8d
Merge pull request #7872 from douzzer/20240814-linuxkm-kyber-asm
...
20240814-linuxkm-kyber-asm
2024-08-15 14:46:55 +10:00
Daniel Pouzzner
003ea8bff0
Merge pull request #7868 from dgarske/pq_xms_lmss
...
Fixes for building wolfBoot sources for PQ LMS/XMSS
2024-08-14 23:28:12 -05:00
Daniel Pouzzner
14254e8a6e
Merge pull request #7862 from bigbrett/wc-test-nocryptocb
...
cryptocb test disable option
2024-08-14 23:18:02 -05:00
Daniel Pouzzner
0c24aff183
Merge pull request #7864 from gojimmypi/pr-fix-dh-ret
...
fix interim return variable name when DH enabled
2024-08-14 23:08:29 -05:00
Daniel Pouzzner
39a4780878
Merge pull request #7870 from anhu/pkcs7_correct_issuer
...
Ensure correct issuer is copied into PKCS7 struct during verification
2024-08-14 23:05:20 -05:00
Daniel Pouzzner
a2acc41b3f
wolfcrypt/src/wc_kyber.c: in kyberkey_encapsulate(), don't overallocate "at" for USE_INTEL_SPEEDUP.
2024-08-14 21:51:12 -05:00
Colton Willey
65d7c6a533
Do not overwrite cert in wolfSSL_set_SSL_CTX if one is already set, remove unreachable frees.
2024-08-14 17:07:20 -07:00
Sean Parkinson
3ade7a875e
RISC-V 64 ASM: Add Poly1305 implementation
...
Implementation using standard and vector instructions.
2024-08-15 09:01:34 +10:00
Colton Willey
dcf3af5382
Modify tests to make analyzers happy
2024-08-14 14:33:38 -07:00
Daniel Pouzzner
7a29b1e4fd
add comments explaining dependence on idempotency for race-free dynamics re checkedAESNI, haveAESNI, intel_flags, and sha_method. see #7863 .
2024-08-14 15:23:48 -05:00
Colton Willey
15abea7f20
Use 1 instead of TRUE
2024-08-14 13:19:43 -07:00
Colton Willey
337cddfd90
Rework implementation to use existing weOwnCert logic
2024-08-14 13:13:25 -07:00
Daniel Pouzzner
1fa2d2d625
ASN: move DecodedCert.extSubjKeyIdSz and .extAuthKeyIdSz out of the OPENSSL_EXTRA gate. fixes test.c:certext_test(), broken by f8c968d8d1 for some valid configs.
2024-08-14 14:45:11 -05:00
Daniel Pouzzner
21484ec75a
linuxkm: add asm support for Kyber.
2024-08-14 14:45:11 -05:00
Colton Willey
f4decf84da
Enable cert copy by default for openssl extra
2024-08-14 12:16:14 -07:00
Anthony Hu
8b57e3e741
Merge pull request #7807 from Laboratory-for-Safe-and-Secure-Systems/mlkem_compat
...
ML-KEM compatibility
2024-08-14 13:50:10 -04:00
Anthony Hu
498dadad97
Ensure correct issuer is copied into PKCS7 struct during verification
2024-08-14 11:29:02 -04:00
Juliusz Sosinowicz
055d68db9c
Merge pull request #7804 from douzzer/20240728-EVP_PKEY_is_a
...
20240728-EVP_PKEY_is_a
2024-08-14 16:36:06 +02:00
Daniel Pouzzner
ee966beb77
wolfcrypt/src/evp.c: add wolfSSL_EVP_PKEY_is_a() and test_EVP_PKEY_is_a(). also add test_EVP_CIPHER_key_length() and add missing RC4 clause to wolfSSL_EVP_Cipher_key_length().
2024-08-14 09:23:02 -05:00
David Garske
01eaa56290
Fixes for building wolfBoot sources for PQ LMS/XMSS.
...
* Don't throw `#error "This code requires libxmss"`, just gate ext_xmss on HAVE_LIBXMSS. Same for LMS.
2024-08-13 14:10:45 -07:00
Daniel Pouzzner
7dbf2a06dd
Merge pull request #7865 from bandi13/fixMemOverrunInTest
...
Fix possible memory overrun in tests
2024-08-13 15:59:00 -05:00
Colton Willey
ef500c2e62
Add new option to always copy cert buffer for each SSL object
2024-08-13 13:32:25 -07:00
Andras Fekete
ab7bc29006
Fix curl.yml
2024-08-13 16:18:29 -04:00
Andras Fekete
f8c968d8d1
Fix possible memory overrun
2024-08-13 13:43:54 -04:00
gojimmypi
e0e05766ac
fix interim return variable name when DH enabled
2024-08-13 09:10:22 -07:00
Fernando Oleo Blanco
5ea22effcc
Update documentation
2024-08-13 10:56:25 +02:00
Daniel Pouzzner
3875a1855e
Merge pull request #7859 from SparkiDev/aarch64_poly1305_asm_improv
...
Aarch64 Poly1305 ASM: Improve performance
2024-08-12 18:35:49 -05:00
Daniel Pouzzner
7fac450c92
Merge pull request #7860 from dgarske/have_config
...
Add missing config.h on .c files
2024-08-12 18:33:04 -05:00
Daniel Pouzzner
869431495f
Merge pull request #7861 from bandi13/smallPatches
...
No need to check for dependencies
2024-08-12 18:30:33 -05:00
Daniel Pouzzner
53f5ded48d
Merge pull request #7849 from miyazakh/renesas_tsip_update
...
RX72N support update
2024-08-12 18:26:32 -05:00
Brett Nicholas
10a3634e86
cmake support
2024-08-12 16:01:15 -06:00
Brett Nicholas
8df5d61179
add optional cryptocb test disable macro to wolfCrypt tests
2024-08-12 15:16:33 -06:00
Andras Fekete
e2d2915fc1
No need to check for dependencies
...
Suggested in https://github.com/wolfSSL/wolfssl/issues/7857#issuecomment-2283962525
2024-08-12 14:58:02 -04:00
David Garske
08622bab39
Fix to remove NO_BIG_INT from MICROCHIP_PIC32 in settings.h.
2024-08-12 09:29:20 -07:00
David Garske
537827ebde
Add missing config.h on some .c files.
2024-08-12 09:29:07 -07:00
Sean Parkinson
3725594020
Aarch64 Poly1305 ASM: Improve performance
...
Do as many multiplications in base 64 rather than 26 with normal integer
registers.
2024-08-12 12:47:44 +10:00
Sean Parkinson
9f9e89082f
Merge pull request #7854 from embhorn/rsa_min_1024
...
Update default RSA min to 1024
2024-08-12 10:04:13 +10:00
Fernando Oleo Blanco
bec3cd8b6f
Document Alire use
2024-08-11 18:36:54 +02:00
Fernando Oleo Blanco
ae7e7e716a
Update upstream
2024-08-10 13:56:14 +02:00
Kaleb Himes
f660299de0
Merge pull request #7856 from douzzer/20240809-fips-dev-feature-unlock
...
20240809-fips-dev-feature-unlock
2024-08-09 16:00:30 -06:00
JacobBarthelmeh
85bab19090
Merge pull request #7845 from ColtonWilley/pkcs7_digest_absent_params
...
Add option for absent hash params in PKCS7
2024-08-09 15:56:28 -06:00
Hideki Miyazaki
debbea3843
put back the RNG
...
comment to CUSTOM RAND GENERATE BLOCK
2024-08-10 06:45:18 +09:00
Daniel Pouzzner
0d84597d78
Merge pull request #7855 from embhorn/zd18433
...
Fix example settings
2024-08-09 15:32:17 -05:00
Daniel Pouzzner
84b91d0e1e
Merge pull request #7841 from mrdeep1/dtls_downgrade_cid
...
Support DTLS1.3 downgrade when server supports CID
2024-08-09 15:30:20 -05:00
Daniel Pouzzner
bba3995434
Merge pull request #7834 from oltolm/cmake_fix
...
cmake: fix parsing WOLFSSL_DEFINITIONS
2024-08-09 15:24:15 -05:00
Daniel Pouzzner
d351430222
Merge pull request #7840 from mrdeep1/dtls_downgrade
...
Support DTLS1.3 downgrade when server sends multiple handshakes in packet
2024-08-09 15:22:46 -05:00
Daniel Pouzzner
0d952c3343
Merge pull request #7850 from bandi13/dockerfileFixes
...
Dockerfile fixes
2024-08-09 15:19:59 -05:00
Daniel Pouzzner
656ba24de5
Merge pull request #7852 from SparkiDev/sp_no_rng_fix
...
SP: no RNG fix
2024-08-09 15:00:15 -05:00
Daniel Pouzzner
e142b16ae2
Merge pull request #7848 from miyazakh/fips_wcPBKDF2ex
...
Check klen in byte in wc_PBKDF2_ex
2024-08-09 14:49:53 -05:00
Daniel Pouzzner
034e13298f
Merge pull request #7847 from SparkiDev/sp_xfree_2
...
SP: Remove check of NULL before XFREE
2024-08-09 14:47:05 -05:00
Daniel Pouzzner
98f8ab085e
configure.ac: when FIPS_VERSION==dev, unlock features to allow user-forced enablement/disablement. also, add line breaks for clarity on the similar clauses in the v5* section.
2024-08-09 14:38:22 -05:00
Andras Fekete
edb95ae7ae
Clear out remnants of old code
2024-08-09 14:22:38 -04:00
Colton Willey
0a5ebaf806
Change SetAlgoIdEx to be local
2024-08-09 11:22:21 -07:00
Eric Blankenhorn
373f5ee9ae
Fix example settings
2024-08-09 13:06:29 -05:00
Eric Blankenhorn
9dddd99b3b
Update default RSA min to 1024
2024-08-09 10:41:41 -05:00
Sean Parkinson
17a09d9853
SP: no RNG fix
...
Don't use RNG API when WC_NO_RNG is defined.
2024-08-09 10:18:12 +10:00
Sean Parkinson
2a08d3001c
Merge pull request #7846 from douzzer/20240806-debug-trace-errcodes-backtrace
...
20240806-debug-trace-errcodes-backtrace
2024-08-09 09:45:01 +10:00
Daniel Pouzzner
c25d86c6c7
support/gen-debug-trace-error-codes.sh: tweak for compatibility with mawk.
2024-08-08 15:57:14 -05:00
Andras Fekete
085b78994d
Update buildAndPush script
2024-08-08 16:44:22 -04:00
Andras Fekete
63ec8fe83a
Add in 'libbacktrace'
2024-08-08 16:14:03 -04:00
Andras Fekete
e1502e7f5b
Need a newer version that doesn't complain about libz
2024-08-08 15:39:16 -04:00
Daniel Pouzzner
a75d520727
src/pk.c: fix a null deref (nullPointerRedundantCheck) in wolfSSL_RSA_GenAdd() added in d350ba6c41.
2024-08-08 11:40:57 -05:00
Daniel Pouzzner
24e34aa41a
wolfcrypt/src/logging.c: in WOLFSSL_BUFFER(), on averted overrun, log a buffer error rather than silently failing; in wc_backtrace_render(), fix !WOLFSSL_MUTEX_INITIALIZER race mitigation code.
2024-08-08 10:49:05 -05:00
Daniel Pouzzner
f5e775fe95
wolfcrypt/src/wc_kyber.c: fixes for null derefs (nullPointerRedundantCheck) in wc_KyberKey_MakeKeyWithRandom() and wc_KyberKey_Decapsulate() added in d350ba6c41.
2024-08-08 09:13:56 -05:00
Daniel Pouzzner
763ced668e
fixes for defects identified by cppcheck and clang-tidy on --enable-debug builds: null deref in tests/api.c:load_pem_key_file_as_der(), redundant declarations in wolfcrypt/benchmark/benchmark.c, and numerous unchecked XSNPRINTF()s in wolfcrypt/src/logging.c and src/internal.c.
2024-08-08 09:00:42 -05:00
Daniel Pouzzner
5f6067c3e1
add --enable-debug-trace-errcodes=backtrace.
...
* uses libbacktrace to enhance existing "ERR TRACE" messages with backtraces, rendered in same format as the sanitizers.
* adds wc_backtrace_render() and some related callbacks to wolfcrypt/src/logging.c.
* adds an overrideable WOLFSSL_DEBUG_BACKTRACE_RENDER_CLAUSE to the WC_ERR_TRACE() mechanism in wolfssl/wolfcrypt/error-crypt.h.
2024-08-08 09:00:42 -05:00
Hideki Miyazaki
493022b4b4
revert 2b4acf5027
...
fix build failure when no using TSIP
2024-08-08 18:34:36 +09:00
Hideki Miyazaki
180ad206fc
check klen in byte
2024-08-08 08:52:08 +09:00
Sean Parkinson
abc910c03c
SP: Remove check of NULL before XFREE
...
Removed more checks of NULL before XFREE.
Formatting fixes as well.
2024-08-08 09:36:05 +10:00
Daniel Pouzzner
0ab1f1969d
Merge pull request #7828 from miyazakh/zd18141_ocspv2multi
...
Sever side checks OCSP even if it uses v2 multi
2024-08-07 17:40:23 -05:00
Daniel Pouzzner
92952a5538
Merge pull request #7839 from bandi13/noIfXFREE
...
No if xfree
2024-08-07 17:08:12 -05:00
Andras Fekete
38d191c159
More PR comment fixes
2024-08-07 16:56:57 -04:00
Colton Willey
75c3030554
Add option for absent hash params in PKCS7
2024-08-07 11:07:45 -07:00
Andras Fekete
a31d8c5ce7
Addressing PR comments
2024-08-07 11:14:15 -04:00
Sean Parkinson
632d9653da
Merge pull request #7842 from embhorn/zd18417
...
Fix template DecodeSubjDirAttr to set extSubjDirAttr data
2024-08-07 18:29:04 +10:00
Sean Parkinson
18aa2b8d78
Merge pull request #7843 from dgarske/fix_sp_small_gcc
...
Fix for SP small calling label with GCC
2024-08-07 09:23:46 +10:00
Daniel Pouzzner
6116d5edb4
Merge pull request #7824 from anhu/maxq10xx_update
...
Update to the maxq10xx support
2024-08-06 18:01:39 -05:00
Sean Parkinson
2cc5ecf117
Merge pull request #7759 from JacobBarthelmeh/poly1305
...
w64wrapper for poly1305
2024-08-07 07:31:25 +10:00
Andras Fekete
b6a9c38950
Addressing PR comments
2024-08-06 15:29:32 -04:00
David Garske
91ea7ab206
Fix for SP small calling label with GCC (broken in PR #7753 ).
2024-08-06 11:05:40 -07:00
David Garske
a30d9c9818
Merge pull request #7833 from SparkiDev/riscv-sha512-asm
...
RISC-V 64: Add assembly code for SHA-512
2024-08-06 10:39:10 -07:00
Anthony Hu
29a5cc39f2
Duplicate code removed
2024-08-06 10:19:09 -07:00
Anthony Hu
3cf3f297ba
Update to the maxq10xx support
2024-08-06 10:19:09 -07:00
Andras Fekete
101088c390
Fix potential NULL dereference
2024-08-06 12:35:01 -04:00
Eric Blankenhorn
1c2b47d8ad
Fix template DecodeSubjDirAttr to set extSubjDirAttr data
2024-08-06 11:34:14 -05:00
Jon Shallow
f1c918c261
Support DTLS1.3 downgrade when server supports CID
...
With --enable-dtlscid, a client sending a Client Hello to a DLTS1.2
server that supports CID, the server provides the appropriate CID and
assumes that CID has been negotiated.
However, in the case of MbedTLS, it then rejects packets that do not
match its expected CID from the client - as wolfSSL no longer sends
the CID as it is not DTLS1.2.
https://datatracker.ietf.org/doc/html/rfc9147#section-4
If a Connection ID is negotiated, then it MUST be contained in all datagrams.
This fix drops the CID if a Hello Verify Request is received, so the
second Client Hello does not include the CID.
https://datatracker.ietf.org/doc/html/rfc6347#section-4.2.1
When responding to a HelloVerifyRequest, the client MUST use the same
parameter values (version, random, session_id, cipher_suites,
compression_method) as it did in the original ClientHello.
Dropping the CID extension does not violate this.
2024-08-06 16:48:04 +01:00
Andras Fekete
3a83c33499
Fix compilation error
2024-08-06 11:44:32 -04:00
Daniel Pouzzner
6fea4f1266
Merge pull request #7803 from SparkiDev/dilithium_hint_check_fix
...
Dilithium: fix check hint
2024-08-06 10:25:35 -05:00
Jon Shallow
bcbd701155
Support DTLS1.3 downgrade when server sends multiple handshakes in packet
...
If the server sends Server Hello, Server Key Exchange and Server Hello Done
in a single DTLS packet, but for DTLS1.2 in response to a client DTLS1.3
request, then FIRST_REPLAY state does not occur until the server re-sends
the packet. At this point wolfSSLconnect() gets used and all bursts into
life.
When processing handshakes in wolfSSL_connect_TLSv13() for case
HELLO_AGAIN_REPLY, downgrade to using wolfSSLconnect() to continue
processing the remaining handshakes in the packet.
Found when using Mbed TLS for the server.
2024-08-06 16:17:48 +01:00
JacobBarthelmeh
f1ace62363
add null sanity check and adjust add
2024-08-06 09:12:17 -06:00
Andras Fekete
f419e2351b
Remove NULL test with 'ptr = NULL' at the end
2024-08-06 10:55:37 -04:00
Andras Fekete
d350ba6c41
remove NULL test with XFREE arguments with dereference
2024-08-06 10:44:59 -04:00
Andras Fekete
d6a7187538
Programmatically remove NULL test with { XFREE() }
2024-08-06 10:37:43 -04:00
Daniel Pouzzner
f7fc0695c1
Merge pull request #7837 from bandi13/fixMemLeak
...
Fix memory leak
2024-08-06 09:37:10 -05:00
Andras Fekete
208f2d6781
One more occurrence
2024-08-06 10:32:50 -04:00
Andras Fekete
eb0c64d79a
Remove NULL test when there is a dereference
2024-08-06 10:29:02 -04:00
Andras Fekete
d7a0f49906
Programmatically remove NULL test before XFREE
2024-08-06 10:20:45 -04:00
Hideki Miyazaki
c947fc8fda
sever side checks OCSP even if it uses v2 multi
2024-08-06 13:01:56 +09:00
Sean Parkinson
4062b94fb3
RISC-V 64: Add assembly code for SHA-512
...
Cleanup RISC-V 64 SHA-256 by removing unused rev_idx.
2024-08-06 10:21:48 +10:00
Sean Parkinson
ac4f3fb75f
Merge pull request #7831 from space88man/RSA-callbacks-fulldata
...
wolfssl/wolfcrypt/pkcs11.sh: add full data RSA PSS mechs
2024-08-06 09:51:57 +10:00
S-P Chan
5083489174
wolfssl/wolfcrypt/pkcs11.sh: add full data RSA PSS mechs
2024-08-06 07:09:47 +08:00
JacobBarthelmeh
cc2ed4a75b
add w64Add for build with word64
2024-08-05 16:47:35 -06:00
Sean Parkinson
fc19c36bf8
Dilithium: fix check hint
...
When all indeces are 0, then don't check hints against indeces.
2024-08-06 08:22:47 +10:00
Andras Fekete
a0b2da98e6
Remove if(ptr) XFREE(ptr)
2024-08-05 17:47:59 -04:00
Tobias Frauenschläger
2a2f9d5916
ML-KEM compatibility
...
As the WolfSSL implementation of the PQC KEM algorithm kyber also
supports the ML-KEM draft version (enabled by `WOLFSSL_ML_KEM`), we have
to update the groups code point to be compatible with other TLS
implementations (e.g. OQS provider).
Also updated the reference to the source of the values to the current
OQS Github.
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-08-05 21:19:15 +02:00
Andras Fekete
df0663b70e
Fix memory leak
...
CC="gcc -fsanitize=address" ./configure --enable-dtls --enable-opensslextra --enable-debug CFLAGS="-DNO_WOLFSSL_SERVER" && make && tests/unit.test
2024-08-05 14:45:35 -04:00
oltolm
ea307c79e5
cmake: fix parsing WOLFSSL_DEFINITIONS
2024-08-05 20:39:23 +02:00
David Garske
039853cbd5
Merge pull request #7813 from SparkiDev/no_system_headers
...
Don't attempt to include system headers when not required
2024-08-05 11:32:55 -07:00
David Garske
792f81382c
Merge pull request #7836 from bigbrett/apple-universal-readme-curl-instructions
...
apple-universal README update: add curl instructions
2024-08-05 10:51:47 -07:00
David Garske
b26c34c695
Merge pull request #7830 from kojo1/doc-hmac
...
clarify description, wc_HmacSetKey
2024-08-05 10:51:15 -07:00
Sean Parkinson
0e0c3634ec
Don't attempt to include system headers when not required
...
Some builds don't require system headers: no filesystem and single
threaded.
2024-08-05 10:49:16 -07:00
András Fekete
ab2256c088
Merge pull request #7835 from julek-wolfssl/tar-artifacts
...
Use tar to preserve links
2024-08-05 13:21:58 -04:00
Juliusz Sosinowicz
332c64a77c
docker-OpenWRT.yml: Follow links
2024-08-05 18:31:04 +02:00
Juliusz Sosinowicz
5320b425e7
Use tar to preserve links
...
Something broke in the actions/download-artifact action and it is not preserving symbolic links. It didn't get a new release so my guess is that something was updated in the node environment or in npm. This is a future proof solution to preserve the fs structure between upload and download.
2024-08-05 18:23:20 +02:00
Brett Nicholas
573ade3178
added curl instructions to apple-universal README
2024-08-05 10:22:41 -06:00
Sean Parkinson
54370cc51e
Merge pull request #7829 from douzzer/20240804-SetDNSEntry-double-free
...
20240804-SetDNSEntry-double-free
2024-08-05 12:51:31 +10:00
Takashi Kojo
8368a32e7e
clarify description
2024-08-05 05:59:36 +09:00
Daniel Pouzzner
d65be7af21
wolfcrypt/src/asn.c and wolfssl/wolfcrypt/asn.h: in SetDNSEntry(), defer XFREE(dnsEntry, ...) until end (fixes double free); add PBE_NONE to enum PBESTypes; in EncryptContent(), initialize id to PBE_NONE to fix a -Wmaybe-uninitialized (CheckAlgo() can leave it unchanged even when returning success).
2024-08-04 15:41:52 -05:00
Daniel Pouzzner
9aa0742baa
Merge pull request #7798 from dgarske/asn_macros
...
ASN macro simplification
merged with github CI tests failing due to unrelated upstream changes (same tests all previously succeeded on this PR, with only 25d14f1937 added in the meantime).
supplementary testing with `wolfssl-multi-test.sh ... super-quick-check` after rebase on then-current `master` 15e99c8eff .
2024-08-02 16:36:50 -05:00
David Garske
35b45aa015
Merge pull request #7826 from douzzer/20240802-linuxkm-kernel-6v11
...
20240802-linuxkm-kernel-6v11
2024-08-02 14:03:38 -07:00
David Garske
25d14f1937
Fail with NOT_COMPILED_IN if someone tries to use ConfirmSignature with NO_ASN_CRYPT. Also default to signature failed.
2024-08-02 08:25:15 -07:00
Daniel Pouzzner
19ea0b22d0
linuxkm: update for kernel 6.11 (__kvmalloc_node_noprof and __kmalloc_cache_noprof).
2024-08-02 10:16:51 -05:00
David Garske
b12a773821
Merge pull request #7818 from SparkiDev/riscv-chacha-asm
...
RISC-V ChaCha20: assembly implementations
2024-08-02 07:52:53 -07:00
Sean Parkinson
423c1d3e57
fixup
2024-08-02 11:58:50 +10:00
Sean Parkinson
01afe89fa2
Merge pull request #7822 from anhu/WOLFSSL_NO_GOOGLE_TEST
...
Only run the google test if the WOLFSSL_EXTERNAL_TEST env var is set.
2024-08-02 09:06:21 +10:00
David Garske
a18d0161ef
Fixes for minor implicit cast warnings and line length. Also fixed benchmark.c error without ChaCha and unused encrypt_only.
2024-08-01 15:26:02 -07:00
Chris Conlon
a918c0e080
Add TLS13_RSA_PSS_SIGN_CB_NO_PREHASH for TLS 1.3 RSA-PSS PK sign callback without prehash
2024-08-01 15:41:28 -06:00
Anthony Hu
bd88078639
Change to use already existing WOLFSSL_EXTERNAL_TEST
2024-08-01 17:10:53 -04:00
Anthony Hu
1199d5a5a8
If the WOLFSSL_NO_GOOGLE_TEST env var is set, don't run the google test.
2024-08-01 16:41:22 -04:00
David Garske
15e99c8eff
Merge pull request #7820 from Laboratory-for-Safe-and-Secure-Systems/sha3_cmake
...
Build SHA3 assembly with INTEL_SPEEDUP
2024-08-01 11:40:09 -07:00
David Garske
c3adf6635b
Merge pull request #7775 from gojimmypi/pr-arduino-script
...
Update Arduino publishing script for 5.7.2 release
2024-08-01 11:24:40 -07:00
David Garske
9f62ff6e38
Merge pull request #7691 from julek-wolfssl/ntp-action
...
Add ntp action
2024-08-01 11:19:13 -07:00
David Garske
d2373246ad
Merge pull request #7657 from julek-wolfssl/cyrus-sasl-test-retry
...
Retry sasl tests as they appear to be flaky
2024-08-01 11:18:54 -07:00
David Garske
e1c1b5019e
Merge pull request #7651 from julek-wolfssl/rng-tools-action
...
Add rng-tools action
2024-08-01 11:16:17 -07:00
David Garske
16d05972ed
Merge pull request #7819 from julek-wolfssl/mosq-tests-retry
...
Retry mosquitto tests as they appear to be flaky
2024-08-01 11:15:53 -07:00
David Garske
65283fb9bb
Improvement for the --enable-asn=nocrypt. Note: This option skips certificate signature checking, so make check TLS expected failures do not pass. Cleanup of the api.c headers / macros.
2024-08-01 10:27:22 -07:00
Tobias Frauenschläger
aee446f3e5
Build SHA3 assembly with INTEL_SPEEDUP
...
Make sure the file `sha3_asm.S` is compiled when `WOLFSSL_INTEL_ASM` is
enabled using CMake.
Signed-off-by: Tobias Frauenschläger <tobias.frauenschlaeger@oth-regensburg.de >
2024-08-01 16:31:18 +02:00
Juliusz Sosinowicz
4c86219afa
Retry mosquitto tests as they appear to be flaky
2024-08-01 14:17:19 +02:00
Juliusz Sosinowicz
edb5d09e6c
Add rng-tools action
2024-08-01 13:56:37 +02:00
Juliusz Sosinowicz
90861d9e6d
Retry sasl tests as they appear to be flaky
2024-08-01 12:05:33 +02:00
Juliusz Sosinowicz
3943e1324f
Add ntp action
2024-08-01 11:54:47 +02:00
Sean Parkinson
ebb49b6e68
RISC-V ChaCha20: assembly implementations
...
ChaCha20:
scalar and vector implementations
vector implementations doing 6, 4, 2, 1 block at a time.
scalar implemetations using roriw and pack
vector implementations using VROR_VI and roriw.
RISC-V SHA-256: avoid using s0 if it can be helped.
2024-08-01 17:51:59 +10:00
Sean Parkinson
1b8254d668
Merge pull request #7808 from Laboratory-for-Safe-and-Secure-Systems/preTBS_memory_leak
...
Fix memory leak in wc_GeneratePreTBS()
2024-08-01 08:47:47 +10:00
Sean Parkinson
1bc085358a
Merge pull request #7817 from dgarske/wildcard_c
...
Fix for .c files to ensure macro guards for wildcard
2024-08-01 08:46:35 +10:00
David Garske
1dd94bb0cb
Fix for .c files to ensure macro guards for wildcard.
2024-07-31 14:23:05 -07:00
David Garske
54997837f4
Merge pull request #7805 from julek-wolfssl/wolfSSL_X509_REQ_add1_attr_by_NID-push-cleanup
...
wolfSSL_X509_REQ_add1_attr_by_NID: clean up push call for analyzers
2024-07-31 13:16:30 -07:00
David Garske
1ade735579
Merge pull request #7815 from douzzer/20240731-Wconversion
...
20240731-Wconversion
2024-07-31 13:15:08 -07:00
David Garske
7023d5212c
Fix for --enable-all --enable-asn=original.
2024-07-31 13:10:52 -07:00
Daniel Pouzzner
6017c86e5d
wolfcrypt/src/wc_port.c: fix -Wconversions in wc_strdup_ex().
2024-07-31 19:36:59 +00:00
David Garske
548a2c6d8e
Fixed issues building with nocrypt. Improved logic on ASN_BER_TO_DER. Improved logic on unknown extension callback (new WC_ASN_UNKNOWN_EXT_CB gate).
2024-07-31 09:42:46 -07:00
Sean Parkinson
407b78962e
Merge pull request #7811 from lealem47/removeNULL
...
Remove HAVE_NULL_CIPHER from --enable-openssh
2024-07-31 21:55:13 +10:00
Sean Parkinson
dbf88e4c73
Merge pull request #7779 from rizlik/ocsp-dfree-fix
...
ocsp: don't free ocsp request if saved in ssl->ctx->certOcspRequest
2024-07-31 09:31:42 +10:00
Sean Parkinson
ad76038b86
Merge pull request #7812 from dgarske/fix_tls12_secret_callback
...
Fix for TLS v1.2 secret callback, incorrectly detecting bad master secret
2024-07-31 09:29:09 +10:00
David Garske
6a1139a6ee
Merge pull request #7758 from SparkiDev/riscv-sha256-asm
...
RISC-V 64: Add assembly code for SHA-256
2024-07-30 16:23:57 -07:00
Sean Parkinson
31cb72ed8a
Merge pull request #7788 from anhu/kyber_with_fips
...
Allow kyber to be built with FIPS
2024-07-31 09:04:29 +10:00
David Garske
1d9b86e2b0
Fix for TLS v1.2 secret callback, incorrectly detecting bad master secret. API test cleanups (no sleep needed).
2024-07-30 11:54:17 -07:00
David Garske
877c1d781f
Fix bad C89 XSNPRINTF remap.
2024-07-30 10:39:48 -07:00
David Garske
bbbc1e074c
Fixes for clang-tidy.
2024-07-30 10:35:21 -07:00
David Garske
afb6fe6c5f
Fixes for building due to missing OCSP and DecodePolicyOID (--enable-curl and --enable-openssh).
2024-07-30 10:35:21 -07:00
David Garske
20f7d6f9f4
ASN macro simplification. Added new --enable-asn=all and WOLFSSL_ASN_ALL option. Added granular macros for ASN features like: WOLFSSL_ASN_CA_ISSUER, WOLFSSL_ASN_PARSE_KEYUSAGE, WOLFSSL_ASN_TIME_STRING, WOLFSSL_OCSP_PARSE_STATUS.
2024-07-30 10:35:20 -07:00
Lealem Amedie
fb3185bb72
Remove HAVE_NULL_CIPHER from --enable-openssh
2024-07-30 10:46:56 -06:00
András Fekete
50d60bf0e7
Code sonar cleanup ( #7782 )
...
* Fix Warning 826814.9284764
* Fix Warning 826836.9285316
Co-authored-by: Andras Fekete <andras@wolfssl.com >
2024-07-30 09:42:43 -07:00
Daniel Pouzzner
f4c16d22a1
Merge pull request #7806 from SparkiDev/dilithium_der_fix
...
Dilithium: DER encoding fix
2024-07-30 09:43:39 -05:00
Tobias Frauenschläger
36d01cdb9b
Fix memory leak in wc_GeneratePreTBS()
...
In the wc_GeneratePreTBS() method (used for WOLFSSL_DUAL_ALG_CERTS
support), there was a workaround for alt names in certificates, as the
CopyDecodedToX509() method wasn't properly copying them. As a proper
copy mechanism is implemented now, we have to remove the workaround as
it now causes a memory leak of the copied values.
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-07-30 10:38:48 +02:00
Sean Parkinson
f1e01e4636
RISC-V 64: Add assembly code for SHA-256
...
Move common defines out of AES file to header file.
2024-07-30 12:21:13 +10:00
Sean Parkinson
7da6149250
Merge pull request #7792 from dgarske/sprintf
...
Fix for using sprintf in test.h
2024-07-30 09:18:50 +10:00
Sean Parkinson
1681cb2d7e
Dilithium: DER encoding fix
...
Underlying function SetAsymKeyDer() changed semantics.
Update tests to reflect new behaviour.
2024-07-30 09:09:26 +10:00
David Garske
f9dc5e9f4d
Fixes for uses of deprecated sprintf. If C89 remap XSNPRINTF to use sprintf.
2024-07-29 14:03:44 -07:00
David Garske
6d39a78dba
Fix for using sprintf.
...
Resolves warning:
```
./configure CC="gcc -fsanitize=address" && make
In file included from ./wolfclu/clu_header_main.h:71:
/usr/local/include/wolfssl/test.h:1103:18: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
strLen = sprintf(serialMsg, " %s", words[3]);
^
```
2024-07-29 11:22:32 -07:00
David Garske
3fc7be8e3b
Merge pull request #7793 from gojimmypi/pr-platformio-update
...
Update PlatformIO examples to wolfssl 5.7.2
2024-07-29 11:09:30 -07:00
Juliusz Sosinowicz
2d5462d77d
wolfSSL_X509_REQ_add1_attr_by_NID: clean up push call for analyzers
2024-07-29 18:18:07 +02:00
Marco Oliverio
31380aca13
fixup! ocsp: don't free ocsp request if saved in ssl->ctx->certOcspRequest
2024-07-29 15:00:41 +00:00
Sean Parkinson
034af8d99c
Merge pull request #7787 from dgarske/stm32u5a
...
Fix STM32 Hash FIFO and add support for STM32U5A9xx
2024-07-29 17:36:52 +10:00
Sean Parkinson
3b74a64029
Merge pull request #7791 from aidangarske/privkeytoder_fix2
...
`api.c` and `asn.c` changes to allow 0 to be passed in and expanded coverage on test cases.
2024-07-29 09:40:20 +10:00
András Fekete
b1765ca6b4
Merge pull request #7785 from dgarske/asn_original
...
Fixes for ASN original
2024-07-26 14:49:13 -04:00
David Garske
5e58affd5d
Merge pull request #7789 from SparkiDev/test_ssl_load
...
SSL loading of keys/certs: testing and fixes
2024-07-26 11:48:13 -07:00
Sean Parkinson
f7094ff3c4
Dilithium: add option to precalc with small sign ( #7744 )
...
WOLFSSL_DILITHIUM_SIGN_SMALL_MEM_PRECALC added.
It allocates memory for and pre-calculates s1, s2 and t0.
This saves decoding the vectors repeatedly in each signature trial.
2024-07-26 11:46:55 -07:00
David Garske
c3b5322f86
Merge pull request #7753 from SparkiDev/cortexm_label_fix_2
...
Cortex-M/Thumb2 ASM: fix label
2024-07-26 11:45:09 -07:00
Sean Parkinson
caab2c2dca
SSL loading of keys/certs: testing and fixes
...
Added tests to cover ssl_load.c functions.
Fixes from testing.
pk.c: renamed wolfssl_dh_load_key to wolfssl_dh_load_params as it
doesn't handle keys - just parameters.
2024-07-26 11:43:10 +10:00
Daniel Pouzzner
92f1c6e339
Merge pull request #7794 from anhu/custom_ext_stop
...
Stop testing custom extensions in dual alg cert tests.
2024-07-25 16:33:56 -05:00
JacobBarthelmeh
56eed9e059
Merge pull request #7795 from douzzer/20240725-array_add-Wconversion
...
20240725-array_add-Wconversion
2024-07-25 15:19:25 -06:00
Daniel Pouzzner
b40913e80c
wolfcrypt/src/random.c: restore outer cast in array_add() to avoid -Wconversion added in b28e22aef0, itself a fix for a defect added in ed11669f3c (root cause of warning is implicit type promotion).
2024-07-25 15:25:32 -05:00
Anthony Hu
73dc9baaf9
Stop testing custom extensions in dual alg cert tests.
2024-07-25 16:09:19 -04:00
gojimmypi
c2e8121462
Update PlatformIO examples to wolfssl 5.7.2
2024-07-25 12:04:58 -07:00
David Garske
42930b28f3
Merge pull request #7790 from JacobBarthelmeh/random
...
fix for casting with add
2024-07-25 09:13:23 -07:00
aidan garske
55540d03e7
fix for PR#7786 BUFFER_E bad case
2024-07-25 09:03:19 -07:00
JacobBarthelmeh
b28e22aef0
fix for casting with add
2024-07-25 09:16:05 -06:00
aidan garske
dace3acd4d
api.c and asn.c changes to allow 0 to be passed in and expanded coverage on test cases
...
(cherry picked from commit 8572f67e60d419ddd74d4a2b7051dcaa7d0ca6b4)
2024-07-25 08:09:37 -07:00
Anthony Hu
181c408d17
Allow kyber to be built with FIPS
2024-07-24 20:36:51 -04:00
David Garske
c4f73f5955
Peer review cleanups.
2024-07-24 16:57:51 -07:00
Sean Parkinson
324e714a6a
Merge pull request #7750 from space88man/wip-padding-refactor
...
PKCS#11 RSA Padding Offload
2024-07-25 09:20:01 +10:00
David Garske
42403a526e
Fix to resolve STM32 hash FIFO. Simplify logic for ensuring FIFO gets filled before doing a save/restore. ZD 18294
2024-07-24 16:06:04 -07:00
Kaleb Himes
3a4788b7bb
Merge pull request #7783 from douzzer/20240723-AesGcmXcrypt-NULL-in-checks
...
20240723-AesGcmXcrypt-NULL-in-checks
2024-07-24 15:33:42 -06:00
David Garske
7f7d94abd5
Fixes for ASN original (old) to support checking int leading 0 and invalid OID. Disable invalid UTF8 test for old ASN (only supported with newer ASN template).
2024-07-24 12:35:37 -07:00
David Garske
97dcf123f0
Merge pull request #7780 from ColtonWilley/update_zephyr_readme
...
Update zephyr readme
2024-07-24 10:42:44 -07:00
David Garske
4b9d89d387
Fix autoconf issue with ==
2024-07-24 09:10:25 -07:00
David Garske
3e2123f0b3
Disable the ECC custom curve tests for original (old) ASN.
2024-07-24 08:45:19 -07:00
David Garske
007f9ea39d
Fix to restore --enable-asn=original. Fixes for building with ASN original (old). Add the new limit checks for alt names and subtree to the old ASN code.
2024-07-24 08:28:25 -07:00
Marco Oliverio
a1fbfa94d2
tests: add OCSP callback fails test
2024-07-24 15:20:11 +00:00
S-P Chan
d2d71c276d
wolfssl/wolfcrypt/pkcs11.h: RSA PKCS/PSS/OAEP related operations
2024-07-24 22:47:27 +08:00
David Garske
d0782a97ce
Merge pull request #7773 from Laboratory-for-Safe-and-Secure-Systems/kyber_compat
...
Kyber fixes
2024-07-24 07:37:10 -07:00
Tobias Frauenschläger
e2b642d4ab
WolfSSL Kyber and CMake fixes
...
* Make sure wc_kyber implementation is compiled using CMake (also for
Zephyr)
* Fix compilation issue when Liboqs is also enabled
* Fix WOLFSSL_INTEL_ASM and WOLFSSL_ARM_ASM CMake options
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-07-24 09:55:29 +02:00
Daniel Pouzzner
f8726148df
wolfcrypt/src/aes.c: in wc_AesGcmEncrypt() and wc_AesGcmDecrypt(), check and return BAD_FUNC_ARG for nonzero sizes associated with null pointers.
2024-07-23 19:07:32 -05:00
Sean Parkinson
3284f53574
Cortex-M/Thumb2 ASM: fix label
...
IAR doesn't like %=.
Fix code to be consistent in use of labels and branch instructions.
2024-07-24 09:20:40 +10:00
Sean Parkinson
a34ea32f52
Merge pull request #7730 from anhu/unknownExtCallbackEx
...
Extend the unknown extension callback.
2024-07-24 08:37:44 +10:00
Colton Willey
e1995b8313
Update zephyr readme with link to new instructions for Zephyr TLS socket support
2024-07-23 09:56:17 -07:00
David Garske
140abe6c72
Merge pull request #7746 from douzzer/20240711-linuxkm-cross-compilation
...
20240711-linuxkm-cross-compilation
2024-07-23 09:26:39 -07:00
Marco Oliverio
bb60c58800
ocsp: don't free ocsp request if saved in ssl->ctx->certOcspRequest
2024-07-23 16:02:07 +00:00
Daniel Pouzzner
6ee22de999
linuxkm: initial support for cross-compilation.
...
also, additional backward-compatibility measures around cp and clean recipe in linuxkm/Makefile.
also, in sp_int.c, tweak DECL_DYN_SP_INT_ARRAY() to use an explicit XMEMSET() to clear n[], to avoid unshimmable implicit memset() from gcc on aarch64.
2024-07-23 10:29:03 -05:00
David Garske
8f908e76f9
Merge pull request #7776 from douzzer/20240722-fixes
...
20240722-fixes
2024-07-23 06:46:38 -07:00
David Garske
7c6eb7c4a1
Merge pull request #7751 from SparkiDev/ecc_koblitz_ssl
...
ECC key load: fixes
2024-07-22 16:40:59 -07:00
Daniel Pouzzner
367508f498
wolfcrypt/src/asn.c: in EccSpecifiedECDomainDecode(), in calls to DataToHexString(), cast curve->size to word32 to resolve -Wconversion.
...
wolfcrypt/src/dh.c: in GeneratePrivateDh186(), add explicit suppression of uninitvar for "cBuf" arg that isn't fully initialized.
wolfcrypt/test/test.c: in mp_test_param(), explicitly initialize "buffer" to avoid uninitvar warning.
configure.ac: in FIPS builds, don't include enable_cryptocb in --enable-all or --enable-all-crypto. (they can still be enabled explicitly in FIPS builds with --enable-cryptocb, but the combination is not currently supported.)
2024-07-22 18:21:36 -05:00
Sean Parkinson
a3b6ec4a13
Merge pull request #7716 from anhu/post-hs-auth-check
...
Check the return code when calling post handshake auth functions
2024-07-23 08:20:51 +10:00
Anthony Hu
b1dcdabcd4
Check the return code when calling post handshake auth functions
2024-07-22 17:10:59 -04:00
David Garske
6a26569ddc
Support for STM32U5A9xx board. Fixes for building example with fast math (TFM) and CMSIS OS 2.
2024-07-22 14:09:15 -07:00
gojimmypi
a07a658771
Update Arduino publishing script for 5.7.2 release
2024-07-22 09:32:08 -07:00
David Garske
604a1fe2da
Merge pull request #7774 from Laboratory-for-Safe-and-Secure-Systems/zephyr_v3_7
...
Zephyr V3.7 warning fix
2024-07-22 07:15:46 -07:00
Tobias Frauenschläger
bdfe2c3fdf
Zephyr V3.7 warning fix
...
The required feature flag CONFIG_PTHREAD_IPC is deprecated since Zephyr
version 3.7. The new option is CONFIG_POSIX_THREADS. This change clears
the warning.
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-07-22 10:58:20 +02:00
David Garske
a9ff7730ce
Merge pull request #7772 from douzzer/20240719-test-hpke-PRIVATE_KEY_UNLOCK
...
20240719-test-hpke-PRIVATE_KEY_UNLOCK
2024-07-20 11:44:08 -07:00
Daniel Pouzzner
765231060e
wolfcrypt/test/test.c: add missing PRIVATE_KEY_UNLOCK() for hpke_test().
2024-07-19 18:31:01 -05:00
Daniel Pouzzner
6952d1a5ea
wolfssl/wolfcrypt/error-crypt.h: add NO_STDIO_FILESYSTEM definition for WC_ERR_TRACE().
2024-07-19 18:30:31 -05:00
David Garske
33f71f6f60
Merge pull request #7770 from bandi13/fixWolfEngineFlag
...
Fix the actual definition of the ECC_MIN_KEY_SZ
2024-07-19 14:37:55 -07:00
David Garske
575df43889
Merge pull request #7768 from JacobBarthelmeh/copyright
...
update copyright to 2024
2024-07-19 14:27:39 -07:00
David Garske
4d8a6b84fb
Merge pull request #7760 from douzzer/20240718-BIO_DGRAM-memory-leak
...
20240718-BIO_DGRAM-memory-leak
2024-07-19 14:24:30 -07:00
David Garske
16a2d2e71d
Merge pull request #7769 from douzzer/20240719-PQ-fixes
...
20240719-PQ-fixes
2024-07-19 14:20:33 -07:00
aidan garske
74e161e437
Merge branch 'InitSuites_Orderadj' of github.com:aidangarske/wolfssl into InitSuites_Orderadj
2024-07-19 13:19:13 -07:00
aidan garske
f8814fb68f
InitSuites changes to order making BUILD_TLS_AES_256_GCM_SHA384 be prioritized over BUILD_TLS_AES_128_GCM_SHA256 to match TLS 1.2.
2024-07-19 13:14:10 -07:00
Andras Fekete
c3d30e7987
Fix the actual definition of the ECC_MIN_KEY_SZ
2024-07-19 16:01:56 -04:00
JacobBarthelmeh
f5ed2460df
cast to larger type for multiplication
2024-07-19 13:59:05 -06:00
Daniel Pouzzner
787397b28e
src/bio.c and related:
...
* refactor WOLFSSL_BIO.num and WOLFSSL_BIO.ptr as unions, for clarity and bug resistance (no functional changes).
* in wolfSSL_BIO_free(), add WOLFSSL_BIO_DGRAM to the test for closing bio->num.fd, fixing a descriptor leak.
* use SOCKET_INVALID consistently as the invalid value for WOLFSSL_BIO.num.fd, and use SOCKET_T consistently as the internal type for file descriptors.
* move the definitions for SOCKET_T and SOCKET_INVALID from wolfio.h to the filesystem section of wc_port.h, and allow override definitions of SOCKET_T.
detected and tested with wolfssl-multi-test.sh ... pq-hybrid-all-rpk-valgrind-unittest. also tested with wolfssl-multi-test.sh ... super-quick-check.
2024-07-19 14:50:26 -05:00
Daniel Pouzzner
e13a8ddcfb
fixes for null derefs in native Dilithium and Kyber implementations, detected by unit.test and cppcheck.
2024-07-19 14:35:39 -05:00
Daniel Pouzzner
0aa0f26289
wolfcrypt/src/dilithium.c: fix null deref in wc_dilithium_init_ex().
2024-07-19 14:25:53 -05:00
JacobBarthelmeh
31a6a2bf59
update copyright to 2024
2024-07-19 13:15:05 -06:00
JacobBarthelmeh
8a9c893c6f
fix for initialization of high value and funtction signature
2024-07-19 11:03:44 -06:00
David Garske
0eeae4da8c
Merge pull request #6460 from embhorn/mosquitto_osp
...
Add support for Mosquitto OSP
2024-07-19 07:49:32 -07:00
David Garske
bd5586623a
Merge pull request #7703 from SparkiDev/def_ticket_cbc_hmac
...
Default session ticket enc/dec: allow AES-CBC with HMAC
2024-07-19 07:41:27 -07:00
David Garske
74d4ae0075
Merge pull request #7704 from aidangarske/PKCS7_PEM
...
Added PKCS7 PEM support:
2024-07-19 07:39:51 -07:00
David Garske
3e02a70c07
Merge pull request #7707 from JacobBarthelmeh/psk
...
use max key length for PSK encrypt buffer size
2024-07-19 07:38:57 -07:00
David Garske
851bb34f3c
Merge pull request #7762 from ColtonWilley/increase_default_max_alt_names
...
Increase default max alt names from 128 to 1024
2024-07-19 07:37:50 -07:00
David Garske
08b211c3bb
Merge pull request #7761 from kareem-wolfssl/zd18300
...
Fix not calling the signing callback when using PK callbacks + TLS 1.3.
2024-07-19 07:37:37 -07:00
David Garske
b5e188830d
Merge pull request #7755 from philljj/misc_cleanup
...
Misc cleanup: FreeX509 null pointer checks, and spelling cleanup.
2024-07-19 07:37:24 -07:00
David Garske
8bf2fb0ae0
Merge pull request #7765 from Laboratory-for-Safe-and-Secure-Systems/dilithium_fixes
...
Dilithium fixes
2024-07-19 07:36:05 -07:00
David Garske
b3c812921a
Merge pull request #7764 from gojimmypi/pr-asn-update
...
minor asn update: comments, code format, dateType check in CheckDate.
2024-07-19 07:35:02 -07:00
Tobias Frauenschläger
f87849b6f6
Dilithium fixes
...
* Fixed incorrect XFREE calls
* Use key->heap where possible
* Fixed compilation with WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM and
WC_DILITHIUM_CACHE_PUB_VECTORS
* Fixed compilation with WOLFSSL_DILITHIUM_ASSIGN_KEY (const pointers)
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-07-19 07:52:14 +02:00
gojimmypi
8356b349a5
minor asn update: comments, code format, dateType check in CheckDate.
2024-07-18 18:25:53 -07:00
Sean Parkinson
e6fcd488a6
Merge pull request #7685 from dgarske/renesas_rx_tsip
...
Renesas RX TSIP ECDSA support
2024-07-19 10:53:00 +10:00
Sean Parkinson
47dcac657c
Merge pull request #7763 from douzzer/20240718-cppcheck-2v14v2-suppressions
...
20240718-cppcheck-2v14v2-suppressions
2024-07-19 10:03:04 +10:00
David Garske
4eab0f1231
Fix hard coded values in TSIP ECC verify. Fix issues with tab indentation and spelling.
2024-07-18 16:45:27 -07:00
Daniel Pouzzner
4bc04673d1
suppress 4 uninitvar warnings, all associated with passing partially written arrays (true but benign positives). newly detected by cppcheck 2.14.2.
2024-07-18 17:22:17 -05:00
Hideki Miyazaki
945a24e5b4
fix compile error
2024-07-19 06:41:17 +09:00
Colton Willey
a82b76978e
Modify max altname test to run if limit has been lowered
2024-07-18 11:28:11 -07:00
Colton Willey
7434092a3a
Increase default max alt names from 128 to 1024
2024-07-18 11:11:38 -07:00
Kareem
3492caba51
Fix not calling the signing callback when using PK callbacks + TLS 1.3.
2024-07-18 10:33:19 -07:00
JacobBarthelmeh
04ab561a65
add smallstack support for poly1305 w64wrapper
2024-07-18 07:30:08 -06:00
JacobBarthelmeh
902087df6f
add w64wrapper support in poly1305
2024-07-18 07:21:57 -06:00
Sean Parkinson
27c3140c2b
Merge pull request #7757 from douzzer/20240717-fixes
...
20240717-fixes
2024-07-18 10:41:03 +10:00
Daniel Pouzzner
c36ab59f24
fixes for defects identified by nightly testing:
...
* ecc.c: in wc_ecc_free(), fix gating around handling for key->sign_k to resolve memory leak, and in wc_ecc_gen_deterministic_k(), fix -Wconversion.
* test.c: add missing mp_free()s to ecdsa_test_deterministic_k_rs() and ecc521_test_deterministic_k().
* wc_HashType: change several occurrences of int to enum wc_HashType, including ecc_key.hashType and API wc_ecc_set_deterministic_ex(), to resolve C++ warnings.
* fixes for various C++ warnings/errors in crypto and TLS layers and test and benchmark code -- implicit casts, negative initializers for unsigned type, jumped initializers, and missing enums in switch()es.
2024-07-17 18:07:08 -05:00
jordan
6a745518bc
Misc cleanup: FreeX509 null pointer checks, and spelling cleanup.
2024-07-17 10:04:52 -05:00
Sean Parkinson
ec9fcf5353
Merge pull request #7648 from douzzer/20240418-exosip-apis
...
20240418-exosip-apis
2024-07-17 22:59:34 +10:00
David Garske
bbd8fdfc38
Cleanup Renesas RX default devId and improve logic for overflow check.
2024-07-16 17:48:16 -07:00
Daniel Pouzzner
ee7748f2e3
PR7648 20240418-exosip-apis peer review:
...
* tweak typography;
* move wolfSSL_i2d_X509_PUBKEY() from ssl.c to x509.c;
* in asn.h, add !NO_ASN_OLD_TYPE_NAMES macros to remap old names (ISSUER, SUBJECT, BEFORE, AFTER) by default unless the macros are already defined.
2024-07-16 19:12:19 -05:00
Daniel Pouzzner
9023aeef75
BIO/wolfio: refactor TranslateReturnCode(), wolfSSL_LastError(), and TranslateIoError() into complete+consistent wolfSSL_LastError() and TranslateIoReturnCode(), handling all special cases correctly, and correctly returning WOLFSSL_CBIO_ERR_WANT_WRITE and WOLFSSL_CBIO_ERR_TIMEOUT. use TranslateIoReturnCode() directly in wolfIO_Recv(), wolfIO_Send(), wolfIO_RecvFrom(), wolfIO_SendTo(), and remove now-superfluous TranslateIoError() calls from EmbedReceive(), EmbedSend(), EmbedReceiveFrom(), EmbedSendTo(), EmbedReceiveFromMcast().
2024-07-16 19:12:19 -05:00
Daniel Pouzzner
5298039d09
fixes from peer review: move OS-specific code from wolfSSL_BIO_read() and wolfSSL_BIO_write() to wolfIO_Recv(), wolfIO_Send(), wolfIO_RecvFrom(), and wolfIO_SendTo(); add SOCKET_ETIMEDOUT definitions to wolfio.h; misc cleanups.
2024-07-16 19:12:19 -05:00
Daniel Pouzzner
0c1163f01f
src/bio.c: restore inadvertently removed update of bio->connected in wolfSSL_BIO_ctrl() case BIO_CTRL_DGRAM_SET_CONNECTED.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
9e99544315
wolfssl/ssl.h: fix double-WOLFSSL_API on wolfSSL_CTX_load_verify_locations_compat().
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
1159fc333f
src/bio.c: in wolfSSL_BIO_ADDR_size(), add missing gate on HAVE_SYS_UN_H for AF_UNIX.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
51c49b678e
src/bio.c: fix gating for WOLFSSL_BIO_DGRAM handling.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
0a928ead3f
address peer review around WOLFSSL_HAVE_BIO_ADDR:
...
refactor housekeeping for bio->bytes_read and bio->bytes_write, and add WOLFSSL_BIO_HAVE_FLOW_STATS gate;
add WOLFSSL_BIO_FLAG_RETRY housekeeping for WOLFSSL_BIO_SOCKET and WOLFSSL_BIO_DGRAM;
refactor WOLFSSL_BIO.peer_addr to be inline rather than a pointer;
add wolfSSL_set_mtu_compat() and wolfSSL_CTX_load_verify_locations_compat() implementations;
enable WOLFSSL_HAVE_BIO_ADDR and WOLFSSL_DTLS_MTU when OPENSSL_ALL.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
61eb6987d0
src/ssl.c: remove old version of wolfSSL_set_bio().
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
62db3533ae
wolfSSL_CTX_load_verify_locations(): set up with OpenSSL-compatible behavior (WOLFSSL_LOAD_FLAG_IGNORE_ERR).
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
2d370f3e4e
wolfSSL_BIO_read(): return MEMORY_E if wolfSSL_BIO_ADDR_new() fails.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
7216a543dd
checkpoint: complete test_wolfSSL_BIO_datagram(); fix some WOLFSSL_HAVE_BIO_ADDR gates to also gate on WOLFSSL_DTLS and OPENSSL_EXTRA; use DTLS_RECVFROM_FUNCTION, DTLS_SENDTO_FUNCTION, SOCKET_T, SOCKADDR, SOCKADDR_IN, and SOCKADDR_IN6 macros and types, and add SOCKADDR_UN type.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
bd7f7c8bdf
checkpoint: add wolfSSL_BIO_ADDR_free to wolfSSL_BIO_free(); tweak EXPECT_SUCCESS() to tolerate TEST_SKIPPED; add WIP test_wolfSSL_BIO_datagram.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
29ec038aa6
checkpoint: add WOLFSSL_BIO_ADDR, wolfSSL_BIO_ADDR_new(), wolfSSL_BIO_ADDR_free(), wolfSSL_BIO_ADDR_clear(), wolfIO_SendTo(), wolfIO_RecvFrom(); fix name of wolfSSL_BIO_s_datagram().
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
08940866c3
checkpoint progress: add macro definitions for BIO_CTRL_DGRAM_SET_CONNECTED, BIO_CTRL_DGRAM_SET_PEER, WOLFSSL_MULTI_LABEL_WILDCARDS, WOLFSSL_MULTI_LABEL_WILDCARDS, NID_id_GostR3410_2001, NID_id_GostR3410_2012_256, NID_id_GostR3410_2012_512; fix flag arithmetic in wolfSSL_X509_check_host(); add compat macros for i2d_X509_PUBKEY, BIO_new_dgram.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
3f921e0a32
checkpoint progress: add wolfSSL_BIO_s_dgram, wolfSSL_BIO_new_dgram, WOLFSSL_BIO_DGRAM, and remove now-duplicate prototype and definition of wolfSSL_X509_STORE_get0_param.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
8468a70b72
add wolfSSL_i2d_X509_PUBKEY, wolfSSL_X509_VERIFY_PARAM_lookup, and wolfSSL_X509_STORE_get0_param, and make wolfSSL_X509_VERIFY_PARAM_inherit a public API; add macros to openssl compat layer: DTLS_client_method, DTLS_server_method, X509_VERIFY_PARAM_lookup, X509_VERIFY_PARAM_inherit, X509_STORE_get0_param; add "const char *name" slot to struct WOLFSSL_X509_VERIFY_PARAM to support wolfSSL_X509_VERIFY_PARAM_lookup.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
1e7810153f
add wolfSSL_set_rbio, wolfSSL_set_wbio, wolfSSL_BIO_number_read, wolfSSL_BIO_number_written, and compat layer shim macros SSL_set0_rbio, SSL_set0_wbio, BIO_number_read, BIO_number_written, BIO_reset.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
41efa0492c
add ASN_ prefixes to ISSUER, SUBJECT, BEFORE, and AFTER enum constants defined in wolfssl/wolfcrypt/asn.h.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
198f4030e8
add stub implementations of wolfSSL_COMP_get_name(), wolfSSL_get_current_compression(), and wolfSSL_get_current_expansion(), and add compat layer shim macros for them.
2024-07-16 19:12:18 -05:00
Daniel Pouzzner
685bfd1f9d
add wolfSSL_get0_peername() and SSL_set_mtu().
2024-07-16 19:12:18 -05:00
Sean Parkinson
0f3ebedba0
Merge pull request #7700 from aidangarske/ECDSA_deterministic_k
...
ecc.c and test.c changes to add support in ecc_sign_determinsitic.c
2024-07-17 09:12:32 +10:00
JacobBarthelmeh
0be4041479
Merge pull request #7727 from SparkiDev/dilithium_fixed_array
...
Dilithium: support fixed size arays in dilithium_key
2024-07-16 16:54:34 -06:00
aidan garske
237df2cb11
Hash Type selection changes to ecc.c.
2024-07-16 15:17:40 -07:00
Sean Parkinson
500951f059
Dilithium: support fixed size arays in dilithium_key
...
Support fixed size arrays for pre-generated matrix and vectors.
Define: WC_DILITHIUM_FIXED_ARRAY
2024-07-17 07:36:14 +10:00
aidan garske
96af77d757
Hash Type selection changes to ecc.c.
2024-07-16 11:12:29 -07:00
JacobBarthelmeh
bbd769d43a
Merge pull request #7728 from SparkiDev/poly1305_aarch64_uniq_name
...
Poly1305 AArch64: unique naming of asm funcs
2024-07-16 10:10:54 -06:00
Eric Blankenhorn
1112751654
mosquitto workflow update
2024-07-16 10:28:40 -05:00
Eric Blankenhorn
4d247a3a88
Update to mosquitto 2.0.18
2024-07-16 07:37:33 -05:00
Eric Blankenhorn
7aad09fc87
Rebase for mosquitto
2024-07-16 07:37:33 -05:00
Sean Parkinson
e002b6efd3
Merge pull request #7742 from embhorn/zd18240
...
Fix ParseCRL_AuthKeyIdExt setting extAuthKeyIdSet
2024-07-16 09:38:54 +10:00
Sean Parkinson
f2f3a8273d
Merge pull request #7732 from kaleb-himes/NUCLEUS-FIPS-SRTP-KDF
...
Check-in Nucleus Plus 2.3 port work
2024-07-16 09:37:15 +10:00
Sean Parkinson
137831367d
Merge pull request #7710 from anhu/preTBS_altsigalg_fix
...
Stop stripping out the sequence header on the AltSigAlg extension.
2024-07-16 09:35:11 +10:00
Sean Parkinson
0d8763be57
Merge pull request #7665 from anhu/lighty-debug
...
Don't do multithreaded logging tests if single threaded
2024-07-16 09:28:11 +10:00
Sean Parkinson
56b8ac4fa1
Merge pull request #7636 from gojimmypi/PR-ESP8266-Make-Clarification
...
Clarify WOLFSSL_ROOT location for ESP8266 make builds
2024-07-16 09:06:33 +10:00
David Garske
2b4acf5027
Revert built-in wc_GenerateSeed support for RX TSIP removed in #6851 .
2024-07-15 10:10:38 -07:00
Daniel Pouzzner
475ec7b680
Merge pull request #7550 from bandi13/addEnableProvider
...
Add enable provider
2024-07-15 12:08:03 -05:00
David Garske
95f4e0618b
Merge pull request #7747 from lealem47/cubepack_armasm
...
Adding ARM ASM build option to STM32CubePack config
2024-07-15 09:35:44 -07:00
Andras Fekete
5b1e6db9a5
Allow user to override required flags
2024-07-15 09:46:36 -04:00
Sean Parkinson
93ca213a68
Merge pull request #7736 from space88man/fix-pkcs11-slot
...
wolfcrypt/src/wc_pkcs11.c: iterate correctly over slotId
2024-07-15 15:52:40 +10:00
Sean Parkinson
dc86dad26b
ECC key load: fixes
...
asn.c:
Return the curve OID sum with alg_id for ECC keys.
ssl_load.c:
Don't permanently strip the PKCS#8 information as it contains the
curve OID.
2024-07-15 15:46:05 +10:00
Daniel Pouzzner
12ba31967c
Merge pull request #7748 from bandi13/addExtraTestingTools
...
Need to add more dependencies to be able to run all tests
2024-07-12 18:28:42 -05:00
Lealem Amedie
206d3f47f7
Fix typo and disable crypto offload if ARM_ASM enabled
2024-07-12 15:33:37 -06:00
Lealem Amedie
8c76cab2cb
Add comment for new option
2024-07-12 14:59:40 -06:00
Andras Fekete
e7c068b9aa
Add fix to netcat package
2024-07-12 15:48:19 -04:00
aidan garske
82fca1c483
InitSuites changes to order making BUILD_TLS_AES_256_GCM_SHA384 be prioritized over BUILD_TLS_AES_128_GCM_SHA256
2024-07-12 12:45:45 -07:00
Andras Fekete
d21e12851a
Need to add more dependencies to be able to run all tests
2024-07-12 15:31:46 -04:00
Lealem Amedie
8e2775fc89
Adding ARM ASM build option to STM32CubePack config
2024-07-12 13:14:40 -06:00
Eric Blankenhorn
d6731f0f84
Fix ParseCRL_AuthKeyIdExt setting extAuthKeyIdSet
2024-07-12 07:43:23 -05:00
Anthony Hu
f84ea01f72
Get rid of macro test
2024-07-11 21:52:52 -04:00
JacobBarthelmeh
1cf96eb72c
Merge pull request #7741 from douzzer/20240714-asn-Wconversion
...
20240714-asn-Wconversion
2024-07-11 16:48:52 -06:00
JacobBarthelmeh
baec0ced59
Merge pull request #7731 from ColtonWilley/zephyr_tls_support
...
Changes needed for default TLS support in zephyr kernel
2024-07-11 16:46:43 -06:00
Sean Parkinson
e0494b5f04
Merge pull request #7738 from dgarske/pkcs11_rsakeygen
...
Fix to support PKCS11 without RSA key generation
2024-07-12 08:45:53 +10:00
Sean Parkinson
d6ecaaddbd
Merge pull request #7740 from JacobBarthelmeh/readme
...
update changelog for kyber fix, thanks to Antoon Purnal
2024-07-12 08:25:49 +10:00
Colton Willey
978456e39d
Remove get cipher bytes from header
2024-07-11 14:51:38 -07:00
Colton Willey
7b089f548e
Remove get cipher list bytes
2024-07-11 14:39:44 -07:00
Daniel Pouzzner
76f669b1cc
wolfcrypt/src/asn.c: fix -Wconversion in GetLength_ex() added in fea7a89b86.
2024-07-11 14:47:58 -05:00
JacobBarthelmeh
a26476b8b2
update changelog for kyber fix, thanks to Antoon Purnal
2024-07-11 09:01:11 -06:00
Sean Parkinson
3cc7bbea67
Merge pull request #7737 from JacobBarthelmeh/staticmemory-singlethreaded
...
fix for staticmemory and singlethreaded build
2024-07-11 09:57:08 +10:00
Sean Parkinson
0979fe8fea
Merge pull request #7709 from JacobBarthelmeh/staticmemory
...
fix test case for lean static memory build
2024-07-11 09:51:35 +10:00
David Garske
41cf8c090b
Fix compiler issues with unused variable and printf.
2024-07-10 16:07:43 -07:00
Anthony Hu
fe2a826ede
Better guarding.
2024-07-10 18:28:22 -04:00
Anthony Hu
6456281b41
Add support for uknown certificate extensions in PKCS7
2024-07-10 16:15:45 -04:00
David Garske
28db1b19e1
Fix to support PKCS11 without RSA key generation. Fixed Pkcs11Rsa where ret failure could be ignored.
2024-07-10 11:17:02 -07:00
cwilley
db4177ae2c
Merge pull request #7723 from JacobBarthelmeh/max_ext
...
update over max ext test certs and add them to renew script
2024-07-10 11:08:17 -07:00
Anthony Hu
e581930cb7
Extend the unknown extension callback.
...
This will allow the user to pass in a context pointer. Allows them to avoid
global variables.
We also add unknown extensions callback when processing a CA in cert manager
as CA certs can have unknown extensions as well.
Fixes ZD 18252
2024-07-10 13:22:19 -04:00
JacobBarthelmeh
d4741de5dc
Merge pull request #7708 from dgarske/afalg_shake
...
Fix to not allow Shake128/256 with Xilinx AFALG
2024-07-10 10:02:04 -06:00
JacobBarthelmeh
204668778b
Merge pull request #7733 from SparkiDev/coverity_3
...
Coverity fixes
2024-07-10 10:01:29 -06:00
David Garske
9bd0985c87
Merge pull request #7701 from JacobBarthelmeh/testing1
...
with FREERTOS and OPENSSL_ALL add XREMALLOC define
2024-07-10 08:58:02 -07:00
JacobBarthelmeh
2543674d9f
Merge pull request #7721 from SparkiDev/dilithium_fix_3
...
Dilithium: fixes
2024-07-10 09:51:40 -06:00
JacobBarthelmeh
6703a58c51
fix for staticmemory and singlethreaded build
2024-07-10 09:44:10 -06:00
S-P Chan
fdd03fa909
wolfcrypt/src/wc_pkcs11.c: iterate correctly over slotId when searching for token
...
Addresses #7734
2024-07-10 21:01:35 +08:00
Hideki Miyazaki
a5c2290e40
Update key data and set private key for client authentification
2024-07-10 17:13:09 +09:00
Sean Parkinson
fea7a89b86
Coverity fixes
...
pk.c:
EncryptDerKey - setting wrong ret value on allocation failure.
wolfssl_rsa_generate_key_native - now checks e is a valid long
before passing in.
Fix formatting.
ssl_load.c:
ProcessBufferPrivPkcs8Dec - now checking password is not NULL
before zeroizing. Allocation may fail and ForceZero doesn't check for
NULL.
Fix formatting.
tests/api.c:
test_RsaSigFailure_cm - Check cert_sz is greater than zero
before use.
send_new_session_ticket - assert that building the message
doesn't return error or 0.
test_ticket_nonce_malloc - fix setting of medium and big to use
preprocessor. Fix big to be medium + 20.
asn.c:
GetLength_ex - Fix type of bytes so that it can go negative.
sp_int.h:
sp_clamp - add one to ii while it is a signed.
Fix formatting.
2024-07-10 11:40:48 +10:00
kaleb-himes
c333fdf545
Check-in Nucleus Plus 2.3 port work
2024-07-09 15:53:00 -06:00
Colton Willey
4ec07bb5a8
Changes needed for default TLS support in zephyr kernel
2024-07-09 12:00:34 -07:00
Hideki Miyazaki
2d0353bcb1
updae ecc key and signed cert
2024-07-09 20:40:34 +09:00
Sean Parkinson
90836c782b
Poly1305 AArch64: unique naming of asm funcs
...
Change function names to ensure no clash with OpenSSL.
Specifically: poly1305_blocks()
2024-07-09 11:02:10 +10:00
David Garske
00e42151ca
Merge pull request #7725 from JacobBarthelmeh/release
...
prepare for release 5.7.2
2024-07-08 11:02:46 -07:00
JacobBarthelmeh
c8aa0fa351
remove * in changelog created from search and replace
2024-07-08 10:31:13 -06:00
JacobBarthelmeh
203f65a636
prepare for release 5.7.2
2024-07-08 09:47:46 -06:00
JacobBarthelmeh
6c0aae714f
update over max ext test certs and add them to renew script
2024-07-07 23:38:29 -07:00
Sean Parkinson
d1e26b4f5d
Dilithium: fixes
...
Fix inclusion of functions dilithium_vec_check_low() in build:
--enable-dilithium=verify-only,44,65,87
CFLAGS=-DWOLFSSL_DILITHIUM_VERIFY_SMALL_MEM
Fix memory leaks in unit.test:
--enable-dilithium CFLAGS=-DWC_DILITHIUM_CACHE_MATRIX_A 'CC=clang
-fsanitize=address'
2024-07-08 15:02:43 +10:00
JacobBarthelmeh
595e71d7f4
Merge pull request #7718 from douzzer/20240705-coverity-fixes
...
20240705-coverity-fixes
2024-07-06 21:53:16 -06:00
Daniel Pouzzner
e35e713c4a
wolfcrypt/src/asn.c: fix for copy-paste error in FillSigner() WOLFSSL_DUAL_ALG_CERTS path.
2024-07-06 10:04:26 -05:00
Daniel Pouzzner
780fd98f40
src/internal.c: in ProcessPeerCerts(), smallstack refactor of a span gated on HAVE_CERTIFICATE_STATUS_REQUEST_V2, to get DecodedCert off the stack.
2024-07-06 10:04:06 -05:00
Daniel Pouzzner
c8a9bdbe15
wolfcrypt/src/asn.c: fix for -Wconversion in FillSigner().
2024-07-05 20:42:32 -05:00
Daniel Pouzzner
88af1a2932
fixes for Coverity #394680 , #394682 , #394693 , #394712 .
2024-07-05 20:42:32 -05:00
David Garske
d8757a51b3
Merge pull request #7717 from JacobBarthelmeh/coverity
...
Some additional Coverity touch ups
2024-07-05 15:49:53 -07:00
JacobBarthelmeh
fee9788bb0
fix for coverity report 394710
2024-07-05 15:40:47 -06:00
JacobBarthelmeh
b948f6797c
account for negative return value, fixes coverity issue 394678
2024-07-05 15:34:28 -06:00
JacobBarthelmeh
de20bb7ba9
fix for coverity issue 394677
2024-07-05 15:13:28 -06:00
David Garske
d5016d451f
Merge pull request #7714 from JacobBarthelmeh/coverity
...
Coverity issues reported
2024-07-05 13:49:20 -07:00
JacobBarthelmeh
7ef424b193
Merge pull request #7715 from kaleb-himes/C394706
...
Address coverity issue 394706
2024-07-05 14:46:54 -06:00
JacobBarthelmeh
f8eb0c3776
fix for coverity issue 394676 possible null dereference
2024-07-05 14:06:19 -06:00
kaleb-himes
f42fb587a5
Address coverity issue 394706
2024-07-05 13:54:23 -06:00
JacobBarthelmeh
d4cf93c2cf
avoid overflow if clamping a digit with used size 0
2024-07-05 13:17:53 -06:00
JacobBarthelmeh
c880fcf822
add check on padSz return, coverity issue 394711
2024-07-05 12:07:42 -06:00
JacobBarthelmeh
25d52dde3f
fix coverity issue 367842 possible null dereference
2024-07-05 11:56:45 -06:00
JacobBarthelmeh
50a7243486
fix for coverity issue 394670 possible overflow
2024-07-05 11:53:19 -06:00
JacobBarthelmeh
fbdb064a4b
coverity issue 394701 possible derefernce before null check
2024-07-05 11:24:42 -06:00
JacobBarthelmeh
ac52660d5b
Merge pull request #7713 from SparkiDev/dilithium_sign_small_alloc
...
Dilithium: add implementation of signing that allocated less
2024-07-05 10:38:19 -06:00
JacobBarthelmeh
8946e3fb4b
Merge pull request #7702 from rizlik/ocspv2
...
ocsp stapling improvements
2024-07-05 10:29:25 -06:00
Marco Oliverio
053170613a
fixup! csrv2multi: pending ca list
2024-07-05 15:26:41 +00:00
JacobBarthelmeh
5ca9b2f8a4
Merge pull request #7712 from SparkiDev/kyber_ml_kem
...
KYBER/ML-KEM: make ML-KEM available
2024-07-05 09:15:08 -06:00
David Garske
4ae277d21e
Fixes for building RX TSIP with e2Studio project. Fixed tsip_Tls13GenEccKeyPair incorrect free of key if TSIP not used (ZD18222).
2024-07-05 07:44:00 -07:00
Sean Parkinson
44a5e1a398
Dilithium: add implementation of signing that allocated less
...
Added implementation of signing that allocates less memory by doing the
matrix/vector loops in the sign code - WOLFSSL_DILITHIUM_SIGN_SMALL_MEM.
Split out vector operations into vector and polynomial operations so
that small mem signing can call them.
Fix benchmark to be able to compile with only Dilithium and no
asymmetric algorithms.
2024-07-05 16:20:06 +10:00
JacobBarthelmeh
e6fbe25398
Merge pull request #7711 from SparkiDev/dilithium_kats
...
Dilithium: Add KATs and fix key generation
2024-07-04 19:40:08 -06:00
David Garske
f91d0a2925
Remove hash type check not required for ECDSA deterministic k. Fix _HMAC_K devId.
2024-07-04 14:49:20 -07:00
Sean Parkinson
1fd9f2af91
KYBER/ML-KEM: make ML-KEM available
...
Added ML-KEM instead of Kyber implementation with WOLFSSL_ML_KEM.
Tests added from NIST for ML-KEM operations.
2024-07-04 23:51:23 +10:00
Sean Parkinson
387f36657c
Dilithium: Add KATs and fix key generation
...
Add KATs from NIST and fix key generation to produce output of KATs.
2024-07-04 22:22:11 +10:00
Marco Oliverio
3e58cfd864
fixup! ocsp: improvements
2024-07-04 10:21:20 +02:00
Marco Oliverio
fe932b893c
fixup! csrv2multi: pending ca list
2024-07-04 10:21:20 +02:00
Anthony Hu
4c13834500
Don't do multithreaded logging tests if single threaded
2024-07-03 19:31:21 -04:00
JacobBarthelmeh
1c23d2222c
Merge pull request #7693 from philljj/zd18204
...
Fixes ZD 18204: check hashsigalgo matches ssl suites.
2024-07-03 17:12:43 -06:00
Anthony Hu
f5e27bfb0c
Stop stripping out the sequence header on the AltSigAlg extension.
2024-07-03 19:02:04 -04:00
David Garske
4335dac794
Add wc_ecc_set_deterministic_ex to support custom hash type for deterministic sign or verify.
2024-07-03 15:13:29 -07:00
David Garske
4004e6886f
Fix the FIPS Shake logic.
2024-07-03 10:39:51 -07:00
JacobBarthelmeh
a8780d4a80
fix test case for lean static memory build
2024-07-03 11:25:05 -06:00
jordan
f7f3ba9c76
check hashsigalgo matches ssl suites on client side.
2024-07-03 11:59:18 -05:00
David Garske
d3316b72d3
Fix to not allow Shake128/256 with Xilinx AFALG. Cleanup the Shake disable logic to allow forcing off with WOLFSSL_NO_SHAKE128 and WOLFSSL_NO_SHAKE256.
2024-07-03 09:49:52 -07:00
JacobBarthelmeh
955490e90a
use max key length for PSK encrypt buffer size
2024-07-03 10:17:01 -06:00
Andras Fekete
7cc42d446e
Update the true minimum ECC key size default
...
The discrepancy shows up when trying to compile with FIPS
2024-07-03 11:50:04 -04:00
JacobBarthelmeh
ba1eedb46b
Merge pull request #7697 from SparkiDev/arm32_ldrd_strd_fix
...
ARM32 SHA-3 ASM: fix ldrd/strd for ARMv6
2024-07-02 17:18:06 -06:00
JacobBarthelmeh
d7b0aa92cb
Merge pull request #7694 from SparkiDev/sp_x64_asm_fix_3
...
SP Intel x64 ASM: fix get_from_table ASM
2024-07-02 17:13:49 -06:00
JacobBarthelmeh
6409b68b21
Merge pull request #7698 from dgarske/asan_compat_list
...
Fix ASAN warning with compatibility layer cipher list parsing
2024-07-02 17:12:38 -06:00
JacobBarthelmeh
4ff0af79c7
Merge pull request #7705 from aidangarske/SHA3-cryptocb
...
Sha3.c wc_Sha3Update and wc_Sha3Final Hash Type Change
2024-07-02 17:11:01 -06:00
JacobBarthelmeh
a490d4fdf7
Merge pull request #7628 from SparkiDev/alert_after_ch
...
TLS: wrong TLS version in alert after ClientHello
2024-07-02 17:10:24 -06:00
JacobBarthelmeh
5aca239714
Merge pull request #7692 from gasbytes/sni-csharp-wrapper-patch
...
Sni csharp wrapper patch
2024-07-02 16:49:31 -06:00
Andras Fekete
e340e41db3
Add --enable-wolfprovider
2024-07-02 15:57:53 -04:00
Andras Fekete
43b62c8ccf
Make sure the ECC_MIN_SZ is set even when set to default
2024-07-02 15:57:53 -04:00
aidan garske
804f25d76b
Sha3.c wc_Sha3Update and wc_Sha3Final changes so that hash type is determined in the processing functions.
2024-07-02 10:32:57 -07:00
aidan garske
c065e4a854
Added PKCS7 PEM support: "-----BEGIN PKCS7-----" and "-----END PKCS7-----"
2024-07-02 07:58:01 -07:00
Marco Oliverio
9222cb1304
ocsp: improvements
2024-07-02 09:51:34 +02:00
Marco Oliverio
b5206e8504
csrv2multi: pending ca list
2024-07-02 09:51:34 +02:00
Sean Parkinson
c82081591a
Default session ticket enc/dec: allow AES-CBC with HMAC
...
Add option to use AES-CBC with HMAC for default session ticket enc/dec.
Defaults to AES-128-CBC with HMAC-SHA256.
Options include:
WOLFSSL_TICKET_ENC_HMAC_SHA512 for HMAC-SHA512
WOLFSSL_TICKET_ENC_HMAC_SHA384 for HMAC-SHA384
WOLFSSL_TICKET_ENC_AES256_CBC for AES-256-CBC
2024-07-02 11:34:03 +10:00
Juliusz Sosinowicz
7814e4c264
DoCertificateStatus: Clean up logic in WOLFSSL_CSR2_OCSP_MULTI
2024-07-02 01:29:44 +02:00
Juliusz Sosinowicz
dabfad9f6c
Fix ocsp stapling test 2
2024-07-02 01:29:44 +02:00
David Garske
7ad0248558
Fix for RX TSIP ECDSA Verify hash padding/truncation. Fix to set ECDSA crypto callback "res" on success.
2024-07-01 13:43:26 -07:00
JacobBarthelmeh
32066373c2
Merge pull request #7695 from dgarske/compat_realloc
...
Fixes for building the compatibility layer with no realloc
2024-07-01 11:37:52 -06:00
David Garske
9ec29e9ad9
Reduced duplicate code in deterministic test.
2024-07-01 10:35:03 -07:00
David Garske
ac7f44b0dc
Fix the async tests for deterministic sign. The _ex versions cannot be called again. Fix possible leak with async and deterministic sign.
2024-07-01 10:13:28 -07:00
JacobBarthelmeh
bbf3bb4bf4
Merge pull request #7699 from SparkiDev/regression_fixes_13
...
Regression testing: fix compilation for unusual configs
2024-07-01 11:02:46 -06:00
JacobBarthelmeh
72aa6ad178
with FREERTOS and OPENSSL_ALL add XREMALLOC define
2024-07-01 11:00:47 -06:00
aidan garske
c07e7f1e58
Fixed async test for test.c deterministic K.
2024-07-01 09:51:07 -07:00
aidan garske
b5b0e17587
ecc.c and test.c changes to add support in ecc_sign_determinsitic.c for SHA256, SHA384, and SHA512 for SECP256R1, SECP384R1, SECP521R1.
2024-07-01 08:43:32 -07:00
Sean Parkinson
1e3f623ff3
Regression testing: fix compilation for unusual configs
...
Disable ECC but have OPENSSL_EXTRA and curve25519 - fix #ifdef
protection in ssl.c.
tests/api.c:
SSL_SESSION_get_max_fragment_length is not available when no session
cache.
ASN1 APIs using generalized time disabled when NO_ASN_TIME defined so
disable tests.
2024-07-01 21:52:56 +10:00
Sean Parkinson
45442db047
ARM32 SHA-3 ASM: fix ldrd/strd for ARMv6
...
LDRD/STRD not available with ARMv6 and the alternative is two ldr/str
operations. Pointer was 64-bits causing second ldr/str to be 8 bytes
passed first and not 4 bytes. Fixed in asm to add 4 rather than index.
2024-07-01 15:23:53 +10:00
jordan
7dfef18cf4
Refactor unneeded PickHashSigAlgo_ex function.
2024-06-28 18:32:13 -05:00
JacobBarthelmeh
98a5a4c201
Merge pull request #7660 from julek-wolfssl/zd/18188
...
wolfSSL_get_SSL_CTX: Make parameter const
2024-06-28 16:40:06 -06:00
David Garske
7faf0dccc7
Fix for ASAN warning with compatibility layer lists in ParseCipherList and CheckcipherList (ZD 18175). Add test case for ASAN to trigger NULL + 1 warning. Cleanup messy WOLFSSL_TIRTOS in api.c.
2024-06-28 15:26:40 -07:00
David Garske
2fd7a2e4ae
Fix for test.c memcb_test and missing XREALLOC.
2024-06-28 15:25:01 -07:00
JacobBarthelmeh
80d4f71eb9
Merge pull request #7683 from SparkiDev/def_ticket_cb_inlen
...
SSL default ticket encryption callback: check in len on decrypt
2024-06-28 16:04:58 -06:00
JacobBarthelmeh
4913289ce5
Merge pull request #7696 from SparkiDev/dilithium_fix_2
...
Dilithium: fixes
2024-06-28 16:00:05 -06:00
Sean Parkinson
864a9d0598
Dilithium: fixes
...
TLS uses DER API now and needs to be protected with the right #ifdefs.
Do the right check of size in wc_Dilithium_PrivateKeyDecode().
Don't require public key when doing private DER.
2024-06-28 10:55:16 +10:00
David Garske
2a86ca43f8
Fixes for building the compatibility layer with WOLFSSL_NO_REALLOC. Tested using ./configure --enable-opensslextra CFLAGS="-DWOLFSSL_NO_REALLOC".
...
Improve benchmark FreeRTOS default tick rate logic. For example Xilinx FreeRTOS uses 10ms tick (not default 1ms), so include `configTICK_RATE_HZ` in calculation if available.
Fix test.c warning around too many parens with no realloc.
2024-06-27 16:02:28 -07:00
Sean Parkinson
4dc52484f6
SP Intel x64 ASM: fix get_from_table ASM
...
Use movdqu instead of vmovdqu so that function works on SSE2 only CPUs.
2024-06-28 07:42:56 +10:00
JacobBarthelmeh
85552d0fc8
Merge pull request #7662 from julek-wolfssl/enable-WOLFSSL_RSA_KEY_CHECK
...
Enable WOLFSSL_RSA_KEY_CHECK with OPENSSLALL
2024-06-27 09:49:00 -06:00
jordan
107cc82a06
Fixes ZD 18204: check hashsigalgo matches ssl suites.
2024-06-27 10:45:02 -05:00
JacobBarthelmeh
c047e55b92
Merge pull request #7687 from douzzer/20240626-EvictSessionFromCache-ticketNonce-data-leak
...
20240626-EvictSessionFromCache-ticketNonce-data-leak
2024-06-27 09:41:42 -06:00
gasbytes
91cad98d67
1023 <- 1024, changed buffer to textmate
2024-06-27 17:35:43 +02:00
JacobBarthelmeh
5420c1a081
Merge pull request #7689 from douzzer/20240626-linuxkm-cp-no-clobber
...
20240626-linuxkm-cp-no-clobber
2024-06-27 09:32:24 -06:00
JacobBarthelmeh
7691bb6a2a
Merge pull request #7690 from SparkiDev/regression_fixes_12
...
Regression testing: memory allocation failure
2024-06-27 09:32:00 -06:00
gasbytes
97adb4be6e
fixed wolfSSL_SNI_GetFromBuffer
2024-06-27 17:03:05 +02:00
Juliusz Sosinowicz
f66e5a52bd
wolfSSL_get_SSL_CTX: Make parameter const
2024-06-27 15:48:46 +02:00
gasbytes
6dd43caae9
wolfSSL_SNI_GetRequest working, fixing up wolfSSL_SNI_GetFromBuffer
2024-06-27 15:05:02 +02:00
Sean Parkinson
4d56cc1790
Regression testing: memory allocation failure
...
Fixes from memory allocation failure testing.
Also:
fix asn.c to have ifdef protection around code compiled in with dual
algorithm certificates.
fix test_tls13_rpk_handshake() to support no TLS 1.2 or no TLS 1.3.
fix wc_xmss_sigsleft() to initialize the index to avoid compilation
error.
2024-06-27 17:17:53 +10:00
David Garske
73a1938e89
Added Renesas RX TSIP ECDSA Verify Crypto callback.
2024-06-26 17:39:29 -07:00
Daniel Pouzzner
ae0d40b119
linuxkm/Makefile: use old/deprecated cp --no-clobber rather than newfangled cp --update=none in libwolfssl.ko recipe, for compatibility with older cp (pre-coreutils-9.3 of 2023-04-18). note that coreutils-9.5 restores the behavior of --no-clobber pre-9.2, whereby skips of existing files are non-errors.
2024-06-26 17:58:29 -05:00
Daniel Pouzzner
4d43dbf83b
src/ssl_sess.c: in EvictSessionFromCache(), free session->ticketNonce.data if it was dynamically allocated. fixes memory leak via wolfSSL_Cleanup().
2024-06-26 14:15:42 -05:00
Daniel Pouzzner
474b8a0673
Merge pull request #7682 from SparkiDev/dilithium_fix_1
...
Dilithium: fix public and private key decode
2024-06-26 00:03:03 -04:00
Takashi Kojo
3d7583e743
Merge pull request #7684 from kojo1/pk-fix
...
Fix in pk.c
2024-06-26 11:33:38 +09:00
David Garske
e81e18859b
Support for Renesas RX TSIP with ECDSA and Crypto Callbacks.
...
Fix building ECC with NO_ASN (`./configure --enable-cryptonly --disable-rsa --disable-asn --disable-examples`).
2024-06-25 17:43:16 -07:00
Takashi Kojo
72b6074b93
Fixes in pk.c
2024-06-26 08:47:41 +09:00
Sean Parkinson
6d0dc7f2e7
SSL default ticket encryption callback: check in len on decrypt
...
Make sure that the length of the data to decrypt is correct for the
default ticket encryption implementation.
2024-06-26 08:21:17 +10:00
JacobBarthelmeh
22abd37408
Merge pull request #7681 from SparkiDev/kyber_improv_1
...
Kyber: Improve performance
2024-06-25 15:25:51 -06:00
JacobBarthelmeh
38335f4947
Merge pull request #7678 from bandi13/fixReturnType
...
ret will be set to 1 (WOLFSSL_SUCCESS), the rest checks for 'ret == 0'
2024-06-25 10:53:03 -06:00
JacobBarthelmeh
263eb6c60f
Merge pull request #7666 from SparkiDev/sp_x64_asm_fix_2
...
SP Intel x64 ASM: fixes
2024-06-25 10:18:31 -06:00
JacobBarthelmeh
f466453d61
Merge pull request #7680 from philljj/fix_infer_issues
...
Fix Infer issues.
2024-06-25 09:42:49 -06:00
Sean Parkinson
8bba660f9c
Dilithium: fix public and private key decode
...
Fixes to decoding to prevent accessing NULL key.
2024-06-25 19:37:11 +10:00
Sean Parkinson
aa61f98955
Kyber: Improve performance
...
Unroll loops and use larger types.
Allow benchmark to run each kyber parameter separately.
Allow benchmark to have -ml-dsa specified which runs all parameters.
Fix thumb2 ASM C code to not have duplicate includes and ifdef checks.
Fix thumb2 ASM C code to include error-crypt.h to ensure no empty
translation unit.
Check for WOLFSSL_SHA3 before including Thumb2 SHA-3 assembly code.
2024-06-25 18:53:53 +10:00
jordan
394948ce94
Fix Infer issues.
2024-06-24 20:44:33 -05:00
David Garske
7b029d3447
Fixes for building WOLFSSL_RENESAS_TSIP_CRYPTONLY and NO_WOLFSSL_RENESAS_TSIP_CRYPT_HASH.
2024-06-24 16:26:27 -07:00
Sean Parkinson
5793f626ac
Merge pull request #7677 from Laboratory-for-Safe-and-Secure-Systems/mldsa_fixes
...
Fixes for WolfSSL ML-DSA implementation
2024-06-25 09:12:25 +10:00
Juliusz Sosinowicz
b7394274ae
Enable WOLFSSL_RSA_KEY_CHECK with OPENSSLALL
2024-06-24 22:15:04 +02:00
David Garske
be68ba4850
Merge pull request #7676 from SparkiDev/dilithium_opt_1
...
Dilithium: C code optimized
2024-06-24 12:09:29 -07:00
Andras Fekete
773451a5dc
ret will be set to 1 (WOLFSSL_SUCCESS), the rest checks for 'ret == 0'
...
Need to use another type of return code
2024-06-24 12:11:57 -04:00
Tobias Frauenschläger
7cd610bc45
Fixes for WolfSSL ML-DSA implementation
...
* Update OIDs etc. to match OQS ML-DSA values (old ones were Dilithium
Round 3 values)
* Make sure private key files/buffers containing both the private and
the public key are parsed correctly
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-06-24 15:00:44 +02:00
Sean Parkinson
0900e00ee7
Merge pull request #7650 from kaleb-himes/SRTP-KDF-CODEREVIEWr2
...
Add sanity for case id'd in optesting review
2024-06-24 17:04:13 +10:00
Sean Parkinson
75475ae624
Merge pull request #7633 from JacobBarthelmeh/netos
...
use WOLFSSL_NETOS_STACK_SZ for stack size when creating tx thread
2024-06-24 16:44:47 +10:00
Sean Parkinson
f1b1483c63
Merge pull request #7669 from JacobBarthelmeh/x509_dn
...
sanity check for empty directory strings
2024-06-24 16:44:03 +10:00
Sean Parkinson
a094831e1a
Dilithium: C code optimized
...
Changes to get best out of 32-bit ARM chips.
Fixes come compile errors when cutting out functions.
WOLFSSL_DILITHIUM_SIGN_CHECK_Y and WOLFSSL_DILITHIUM_SIGN_CHECK_W0 added
to speed up signing. No longer specification conformat when either used.
2024-06-24 16:37:43 +10:00
David Garske
2312cb4563
Merge pull request #7667 from SparkiDev/sha3_thumb2_arm32_asm
...
SHA-3 Thumb2, ARM32 ASM: Add assembly implemention
2024-06-23 20:16:32 -07:00
David Garske
59c7abf635
Merge pull request #7675 from douzzer/20240622-SHA3-CRYPTO_CB
...
20240622-SHA3-CRYPTO_CB
2024-06-22 18:21:30 -07:00
Daniel Pouzzner
b4e15d028c
WOLF_CRYPTO_CB && WOLFSSL_SHA3: add FIPS gating to wc_CryptoCb_Sha3Hash() and test routine myCryptoDevCb().
2024-06-22 11:20:53 -05:00
JacobBarthelmeh
0cf5421e5a
Merge pull request #7673 from douzzer/20240621-fix-oqs_dilithium_make_key-leak
...
20240621-fix-oqs_dilithium_make_key-leak
2024-06-21 15:37:24 -06:00
JacobBarthelmeh
7405ea8162
Merge pull request #7671 from miyazakh/dtls_ocsp
...
Fix ocsp response message build for DTLS
2024-06-21 14:43:29 -06:00
JacobBarthelmeh
c9d83babe0
Merge pull request #7363 from kaleb-himes/WinCE-supporting-work
...
Manually check-in pre-operational-testing changes for WinCE port effort
2024-06-21 14:02:48 -06:00
kaleb-himes
23f796c0b4
Cleanup excess line
2024-06-21 15:55:08 -04:00
kaleb-himes
871dc9c19b
Implement peer review feedback
2024-06-21 15:54:04 -04:00
kaleb-himes
a1645d684a
448 streaming base on ENABLED flag and below FIPS section
2024-06-21 15:54:04 -04:00
kaleb-himes
f00e5247bb
Add sanity for case id'd in optesting review
2024-06-21 15:54:04 -04:00
JacobBarthelmeh
e72db4a306
Merge pull request #7612 from dgarske/rsa_pad
...
Improvements to RSA padding to expose Pad/Unpad API's
2024-06-21 13:19:28 -06:00
JacobBarthelmeh
aea32e37a9
Merge pull request #7140 from kaleb-himes/140-3-ARMv8-PAA-porting
...
XCODE support for v5.2.3 of the FIPS module
2024-06-21 13:14:54 -06:00
Daniel Pouzzner
25b72497d8
wolfcrypt/src/dilithium.c: add missing OQS_SIG_free() in oqs_dilithium_make_key() (liboqs wrapper).
2024-06-21 14:04:32 -05:00
JacobBarthelmeh
0303a828ec
Merge pull request #7670 from aidangarske/CryptocbSHA3
...
Added crypto callback for SHA3.
2024-06-21 11:28:01 -06:00
kaleb-himes
3eda3436d1
Peer review, great catch! Thanks @JacobBarthelmeh
2024-06-21 10:44:24 -06:00
kaleb-himes
610af43d03
XCODE support for v5.2.3 of the FIPS module
2024-06-21 10:36:57 -06:00
kaleb-himes
94e031e905
Manually check-in pre-operational-testing changes for WinCE port effort
2024-06-21 09:52:57 -06:00
Sean Parkinson
8734f1251d
SHA-3 Thumb2, ARM32 ASM: Add assembly implemention
...
Add SHA-3 assembly implementation for Thumb2 and ARM32.
2024-06-21 14:38:51 +10:00
Hideki Miyazaki
ac5b81edd1
fix unit test
2024-06-21 13:22:00 +09:00
Hideki Miyazaki
30eb558d58
fix ocsp response when using DTLS
2024-06-21 09:57:59 +09:00
aidan garske
e8c3a7dfce
fix for wolfcrypt/src/sha3.c (void)type
2024-06-20 15:03:51 -07:00
aidan garske
1ef9a8fe7c
Added crypto callback for SHA3 and extended the test.c tests for it in cryptocb_test.
2024-06-20 14:15:28 -07:00
JacobBarthelmeh
8ee01ebaf2
sanity check for empty directory strings
2024-06-20 13:42:31 -06:00
JacobBarthelmeh
63f666a599
Merge pull request #7659 from embhorn/zd18179
...
Fixes in ASN1 and X509
2024-06-20 13:10:40 -06:00
David Garske
d545253df7
Merge pull request #7594 from JacobBarthelmeh/socat
...
Updating socat version support
2024-06-20 09:17:41 -07:00
Sean Parkinson
118d2cc8cc
Merge pull request #7664 from anhu/derLenType
...
Der --> Len. Copy paste typo.
2024-06-20 08:53:00 +10:00
Sean Parkinson
75d06cd6f3
SP Intel x64 ASM: fixes
...
Don't use RIP relative with XMM/YMM instructions.
For MSVC asm, explicitly state type for pointer.
For MSVC asm, don't use vmodvqu for saving XMM registers unless this is
AVX2 code.
2024-06-20 08:33:05 +10:00
Anthony Hu
32ca92bd97
Der --> Len. Copy paste typo.
2024-06-19 17:25:54 -04:00
Daniel Pouzzner
38c7327660
Merge pull request #7622 from SparkiDev/ml-dsa
...
Dilithium/ML-DSA: Implementation of ML-DSA-44/65/87
2024-06-19 13:32:35 -04:00
Sean Parkinson
3e3a00dafd
Dilithium/ML-DSA: Implementation of ML-DSA-44/65/87
...
Impemented FIPS 204 (Draft) Module-Lattice-Based Signature Standard.
Implementation include making a key, signing and verification.
Make key API added.
Updated liboqs calls to use ML-DSA implementation instead of Dilithium.
2024-06-19 21:27:01 +10:00
JacobBarthelmeh
24291b4147
Merge pull request #7600 from SparkiDev/wc_ecc_mulmod_zero_z1
...
ECC: when multiplying by zero, set z to 1
2024-06-18 16:36:35 -06:00
JacobBarthelmeh
2b0d724a4d
Merge pull request #7658 from douzzer/20240618-linuxkm-4.14.336LTS
...
20240618-linuxkm-4.14.336LTS
2024-06-18 16:31:37 -06:00
David Garske
71be6524f7
Merge pull request #7649 from SparkiDev/cortexm_label_fix
...
Cortex-M inline assembly: labels with unique number appended
2024-06-18 15:31:13 -07:00
Sean Parkinson
6f4aa54f5b
Merge pull request #7655 from JacobBarthelmeh/vcpkg
...
add no stub and ex data cmake options
2024-06-19 07:45:31 +10:00
JacobBarthelmeh
9175355c81
set LD_LIBRARY_PATH for socat test
...
work around hang from test 373 to 374
add setting SHELL env for socat test
remove some tests for exec sniffing and sorted address options failing with actions but not locally
2024-06-18 14:46:09 -06:00
Eric Blankenhorn
d4a90e8a71
Fix wolfSSL_ASN1_TIME_to_generalizedtime with UTC time
2024-06-18 15:08:01 -05:00
Eric Blankenhorn
5efa82a239
Check for null sig in wolfSSL_X509_CRL_get_signature
2024-06-18 14:47:01 -05:00
Eric Blankenhorn
95cd9c81c8
Add attr to get_dn_attr_by_nid
2024-06-18 14:41:58 -05:00
Daniel Pouzzner
f6f83a20ed
linuxkm/linuxkm_wc_port.h: add a suppression needed for targeting LTS kernel version 4.14.336.
2024-06-18 14:39:44 -05:00
JacobBarthelmeh
684fef2429
add no stub and ex data cmake options
2024-06-18 10:20:18 -06:00
JacobBarthelmeh
eef20ceb51
Merge pull request #7654 from SparkiDev/kyber_c_ntt_invntt_fast
...
Kyber: Improve performance of C implementation
2024-06-18 09:38:25 -06:00
JacobBarthelmeh
0cd3bd7ad3
Merge pull request #7653 from SparkiDev/sm2_offical_tv
...
SM2: change to official test vector
2024-06-18 09:33:05 -06:00
Sean Parkinson
1eea3720e3
Merge pull request #7647 from douzzer/20240614-WOLFSSL_MSG-code-points
...
20240614-WOLFSSL_MSG-code-points
2024-06-18 18:37:35 +10:00
Sean Parkinson
f863513f37
Kyber: Improve performance of C implementation
...
Add larger faster implementations of NTT and inverse NTT.
Allow smaller but still fast implementations to be used as well.
2024-06-18 18:09:33 +10:00
Daniel Pouzzner
187dbd9974
wolfcrypt/src/logging.c: address peer review for PR #7647 .
2024-06-17 23:37:13 -05:00
Sean Parkinson
c91d306531
Merge pull request #7646 from kojo1/i2d-ecdsa
...
alloc a buffer for NULL pointer
2024-06-18 11:47:44 +10:00
Sean Parkinson
fbd69f9b48
ECC: when multiplying by zero, set z to 1
...
Make sure zero times a point is infinity but z is 1 as it is assumed
later on.
2024-06-18 11:30:57 +10:00
Takashi Kojo
2f379ed322
alloc a buff for NULL pointer
2024-06-18 09:41:11 +09:00
Sean Parkinson
8d77df15ef
SM2: change to official test vector
...
Change create digest to official test vector.
2024-06-18 10:40:47 +10:00
Sean Parkinson
a141041d13
Merge pull request #7652 from douzzer/20240617-fix-wc_Sha256-overalignment
...
20240617-fix-wc_Sha256-overalignment
2024-06-18 10:39:15 +10:00
Daniel Pouzzner
87114faa94
Revert "compatibility for EVP_CipherUpdate with AES-GCM"
...
This reverts commit b7a28cc704 .
WOLFSSL_AESGCM_STREAM needs to be conditional as arranged by configure.ac.
2024-06-17 19:04:19 -05:00
Daniel Pouzzner
f3c93a7b57
wolfssl/wolfcrypt/sha256.h: in definition of struct wc_Sha256, conditionalize alignment optimization of digest and buffer slots on defined(WC_64BIT_CPU), to avoid overalignment warnings on 32 bit targets. this also fixes overalignment of struct Hmac.
2024-06-17 19:03:38 -05:00
Sean Parkinson
7018f464ee
Merge pull request #4718 from kojo1/oss-compat
...
compatibility for EVP_CipherUpdate with AES-GCM
2024-06-18 08:48:36 +10:00
Sean Parkinson
8aaf5670f4
Cortex-M inline assembly: labels with unique number appended
...
When functions are inlined, the labels need to be unique.
Putting '%=' on the end of the label ensures that the compilers appends
a unique number to the end.
2024-06-17 17:47:40 +10:00
Daniel Pouzzner
2c69e4a56b
add --debug-code-points and WOLFSSL_DEBUG_CODEPOINTS,
...
add file_name and line_number args to wolfssl_log(),
and inside WOLFSSL_DEBUG_CODEPOINTS gates,
add WOLFSSL_MSG_EX2(), WOLFSSL_MSG2(), WOLFSSL_ENTER2(), and WOLFSSL_LEAVE2(), each with file and line args,
and add wrapper macros for WOLFSSL_MSG, WOLFSSL_MSG_EX, WOLFSSL_ENTER, and WOLFSSL_LEAVE, that pass in file and line.
2024-06-15 00:54:39 -05:00
Daniel Pouzzner
5df57207ac
Merge pull request #7642 from julek-wolfssl/sasl-action
...
Add sasl action
2024-06-14 19:21:48 -04:00
Daniel Pouzzner
38089f11cd
Merge pull request #7643 from julek-wolfssl/net-snmp-action
...
Add net-snmp action
2024-06-14 19:20:50 -04:00
Juliusz Sosinowicz
a4ee5af1ed
Add sasl action
2024-06-14 12:43:53 +02:00
Daniel Pouzzner
a120b83dac
Merge pull request #7585 from kaleb-himes/SRTP-KDF-CODEREVIEW
...
Add FIPS required forward declaration of streaming struct
2024-06-14 00:53:39 -04:00
JacobBarthelmeh
512b468dbb
explicit socat path with test
2024-06-13 13:15:31 -06:00
JacobBarthelmeh
98d2ca1d42
fix updated socat yml file
2024-06-13 13:01:57 -06:00
JacobBarthelmeh
3d70fb1d50
adjust test yml file
2024-06-13 12:51:51 -06:00
Daniel Pouzzner
385a097646
Merge pull request #7638 from gasbytes/patch
...
added check if the buf is at least RECORD_HEADER_SZ
2024-06-13 14:27:40 -04:00
Juliusz Sosinowicz
fce14ffddb
Add net-snmp action
2024-06-13 17:41:15 +02:00
gasbytes
88527a3d6e
word32 -> sword32
2024-06-13 13:44:50 +02:00
kaleb-himes
8ca8827b58
Isolate forward declaration of Gmac
2024-06-12 18:16:33 -04:00
kaleb-himes
20911f254b
ECC, DH, GCM, GMAC, CCM and AES updated services
2024-06-12 18:16:33 -04:00
kaleb-himes
ae9291f4d3
Add FIPS required forward declaration of streaming struct
2024-06-12 18:16:33 -04:00
Daniel Pouzzner
897d55f060
Merge pull request #7630 from julek-wolfssl/libvncserver-action
...
Add libvncserver action
2024-06-12 17:08:28 -04:00
Daniel Pouzzner
d2f4cc9e28
Merge pull request #7616 from embhorn/zd17762
...
Static analysis fixes
2024-06-12 17:07:02 -04:00
Daniel Pouzzner
b0d0a1afe8
Merge pull request #7639 from bandi13/fixLibOQS
...
liboqs depends on pthreads now
2024-06-12 14:52:50 -04:00
Andras Fekete
372f57e528
Address PR suggestions
2024-06-12 14:22:10 -04:00
Andras Fekete
211742bfe0
liboqs depends on pthreads now
2024-06-12 13:45:57 -04:00
Kaleb Himes
9f9a82e469
Merge pull request #7637 from lealem47/armasm_fips
...
Force inline ASM for armv7 with FIPS
2024-06-12 07:53:37 -06:00
gojimmypi
20e0e12185
Exclude autogen binaries from ESP8266 client example makefile
2024-06-12 09:51:10 +02:00
gasbytes
845e2f752c
added check if the buf is at least RECORD_HEADER_SZ
...
when adding the record headers through quic
2024-06-11 22:10:18 +02:00
Lealem Amedie
b7d32d0609
Force inline ASM for armv7 with FIPS
2024-06-11 13:32:46 -06:00
gojimmypi
891b986fd4
Clarify WOLFSSL_ROOT location for ESP8266 make builds
2024-06-11 18:13:24 +02:00
Sean Parkinson
d49308e64a
Merge pull request #7634 from douzzer/20240608-WOLFSSL_DEBUG_TRACE_ERROR_CODES
...
20240608-WOLFSSL_DEBUG_TRACE_ERROR_CODES
2024-06-11 21:25:22 +10:00
Daniel Pouzzner
ac459e3cec
Merge pull request #7631 from dgarske/cmake_singlethreaded
...
Fix for CMake single threaded
2024-06-10 19:29:10 -04:00
JacobBarthelmeh
30dbf7c047
add socat yml CI test
2024-06-10 16:56:54 -06:00
Daniel Pouzzner
202b0a15b4
Merge pull request #7629 from julek-wolfssl/test_wrong_cs_downgrade-clamp
...
test_wrong_cs_downgrade: clamp error to exact value
2024-06-10 18:26:54 -04:00
JacobBarthelmeh
b9e5c0252d
remove extra asign and use ExpectIntEQ test directly
2024-06-10 16:19:27 -06:00
Daniel Pouzzner
1b907d05ed
WOLFSSL_DEBUG_TRACE_ERROR_CODES: restore several initializations, one because needed (in wolfSSL_UseSecureRenegotiation()), the rest in an abundance of caution, and rearrange wolfSSL_CryptHwMutexInit() and wolfSSL_CryptHwMutexUnLock() in a similar abundance of caution.
2024-06-10 13:44:03 -05:00
Daniel Pouzzner
b3e8f0ad24
add --enable-debug-trace-errcodes, WOLFSSL_DEBUG_TRACE_ERROR_CODES, WC_ERR_TRACE(), WC_NO_ERR_TRACE(), support/gen-debug-trace-error-codes.sh. also add numerous deployments of WC_NO_ERR_TRACE() to inhibit frivolous/misleading errcode traces when -DWOLFSSL_DEBUG_TRACE_ERROR_CODES.
2024-06-08 16:39:53 -05:00
JacobBarthelmeh
1753d524d7
use WOLFSSL_NETOS_STACK_SZ for stack size when creating tx thread
2024-06-07 14:30:26 -06:00
JacobBarthelmeh
f7bc78cad0
Merge pull request #7602 from night1rider/Parsing-bug
...
Send BUFFER_ERROR if size does not meet minimum Requirements
2024-06-07 13:54:03 -06:00
night1rider
ebca3376ef
Send BUFFER_ERROR if size does not meet minimum reqs for the extension
2024-06-07 10:26:30 -06:00
David Garske
e960a00650
Merge pull request #7625 from JacobBarthelmeh/x509
...
sanity check on non conforming serial number of 0
2024-06-07 08:33:38 -07:00
David Garske
fda8b4f64f
Fix for CMake single threaded. https://github.com/wolfSSL/wolfssl/issues/7609#issuecomment-2154327463
2024-06-07 06:59:59 -07:00
Juliusz Sosinowicz
6a29dfc6fb
Add libvncserver action
...
Depends on https://github.com/wolfSSL/osp/pull/176
2024-06-07 12:40:48 +02:00
Juliusz Sosinowicz
8c47e8d6f2
test_wrong_cs_downgrade: clamp error to exact value
2024-06-07 11:33:38 +02:00
Sean Parkinson
d7d8d14e95
TLS: wrong TLS version in alert after ClientHello
...
Ignore protocol version being less than expected when received directly
after ClientHello.
Protocol version negotiation hasn't taken place and a lower version can
be sent to cover minimum supported protocol version.
2024-06-07 10:42:12 +10:00
Sean Parkinson
1c51465584
Merge pull request #7627 from douzzer/20240606-clang-tidy-and-mingw-fixes
...
20240606-clang-tidy-and-mingw-fixes
2024-06-07 10:08:55 +10:00
JacobBarthelmeh
d09f955e6c
Merge pull request #7626 from lealem47/parseServerHello
...
Improved fix for TLS1.3 to TLS1.2 client downgrade
2024-06-06 17:16:30 -06:00
Sean Parkinson
c82230324e
Merge pull request #7546 from oltolm/cmake
...
cmake: fix generation of options.h
2024-06-07 08:51:12 +10:00
JacobBarthelmeh
3d33c78e9d
use unsigned char instead of uint8_t
2024-06-06 16:30:40 -06:00
JacobBarthelmeh
467b3cb561
add parsing 0 serial numbers for certs with python
2024-06-06 16:24:48 -06:00
Daniel Pouzzner
ac5cabaac9
fixes for USE_WINDOWS_API && !NO_FILESYSTEM && !NO_WOLFSSL_DIR:
...
* in wc_port.h, add XWRITE and XREAD definitions and include <io.h>;
* in wolfSSL_BIO_read(), implement Windows support for XREAD and XWRITE;
* in wolfSSL_BIO_write_filename(), add 'b' flag to XFOPEN flags;
* in wolfSSL_RAND_file_name(), add support for XALTHOMEVARNAME, and add Windows definition for it to wc_port.h alongside XWRITE and XREAD.
fixes test_wolfSSL_BIO, test_wolfSSL_X509_print, test_wolfSSL_RAND, test_wolfSSL_RSA_print in cross-mingw-all-crypto scenario.
2024-06-06 17:14:12 -05:00
Lealem Amedie
5a1ac2742c
Reviewer feedback
2024-06-06 16:08:39 -06:00
Daniel Pouzzner
71db561c96
wolfcrypt/src/port/riscv/riscv-64-aes.c: fix trailing whitespace.
2024-06-06 16:25:50 -05:00
Daniel Pouzzner
ef925b8b30
wolfcrypt/src/wc_kyber_poly.c: fix bugprone-macro-parentheses for FROM_MSG_BIT.
2024-06-06 16:21:32 -05:00
JacobBarthelmeh
68f52cb49a
add test case
2024-06-06 15:06:15 -06:00
Lealem Amedie
3de358ef06
Ensure extensions are only parsed once
2024-06-06 14:10:56 -06:00
Daniel Pouzzner
d80f05bf77
Merge pull request #7624 from gasbytes/stack-on-calcdx
...
update CalcDX with small-stack support
2024-06-06 16:05:56 -04:00
Lealem Amedie
7cc0ac14c4
Adding test case
2024-06-06 13:24:07 -06:00
JacobBarthelmeh
690d8f7f89
sanity check on non conforming serial number of 0
2024-06-06 13:22:57 -06:00
Lealem Amedie
f3061359d8
Improved fix for TLS1.3 to TLS1.2 client downgrade
2024-06-06 12:22:50 -06:00
David Garske
60ccaf379d
Remove uses of stdint in api.c.
2024-06-06 10:57:46 -07:00
JacobBarthelmeh
29df90197e
Merge pull request #7623 from bandi13/FixOpenSSLTest
...
Sometimes the first call hangs because the server is not completely up
2024-06-06 09:11:36 -06:00
David Garske
b69482ffac
Merge pull request #7569 from SparkiDev/riscv_aes_asm
...
AES RISC-V 64-bit ASM: ECB/CBC/CTR/GCM/CCM
2024-06-06 08:11:31 -07:00
JacobBarthelmeh
7ce9ebde15
Merge pull request #7618 from julek-wolfssl/jwt-cpp
...
Fixes for jwt-cpp
2024-06-06 08:57:46 -06:00
Andras Fekete
fbb2737c2a
Sometimes the first call hangs because the server is not completely up
2024-06-06 10:38:11 -04:00
Sean Parkinson
acd604db3d
AES RISC-V 64-bit ASM: ECB/CBC/CTR/GCM/CCM
...
Add implementations of AES for ECB/CBC/CTR/GCM/CCM for RISC-V using
assembly.
Assembly with standard/scalar cryptography/vector cryptographt
instructions.
2024-06-06 13:16:00 +10:00
David Garske
5132a17fab
Merge pull request #7613 from SparkiDev/kyber_fixes_2
...
Kyber: fix kyber_from_msg()
2024-06-05 17:28:39 -07:00
Sean Parkinson
b7d0c257e6
Merge pull request #7621 from douzzer/20240605-rename-fe_x25519_128
...
20240605-rename-fe_x25519_128
2024-06-06 09:41:52 +10:00
Sean Parkinson
162dffb463
Merge pull request #7619 from lealem47/zd18074
...
Fix for TLS1.3 to 1.2 downgrade
2024-06-06 09:39:32 +10:00
David Garske
1f75d0e1d7
Merge pull request #7620 from anhu/doc_wolfSSL_is_init_finished
...
Quick fixup in API doc for wolfSSL_is_init_finished()
2024-06-05 15:43:40 -07:00
Daniel Pouzzner
92bbd651b6
rename wolfcrypt/src/fe_x25519_128.i to wolfcrypt/src/fe_x25519_128.h to avoid appearance as a cleanable intermediate.
2024-06-05 16:56:03 -05:00
Anthony Hu
0de974c3a7
Quick fixup in API doc for wolfSSL_is_init_finished()
2024-06-05 16:40:06 -04:00
Lealem Amedie
d20ac2ce42
Fix for TLS1.3 to 1.2 downgrade
2024-06-05 11:26:10 -06:00
Chris Conlon
70d317ec79
Merge pull request #7571 from rlm2002/internship
...
Test case for wc_HpkeGenerateKeyPair() NULL argument
2024-06-05 10:57:19 -06:00
gasbytes
589353f346
update CalcDX with small-stack support
2024-06-05 18:53:34 +02:00
JacobBarthelmeh
18526152fe
Merge pull request #7610 from gasbytes/sni-wrappers
...
CSharp Wrapper SNI Support
2024-06-05 10:27:42 -06:00
JacobBarthelmeh
8d63fb5fe5
Merge pull request #7590 from julek-wolfssl/expose-alerts
...
Allow user to send a user_canceled alert
2024-06-05 10:08:21 -06:00
JacobBarthelmeh
592a4522e1
Merge pull request #7615 from jackctj117/ssl-static-memory
...
Added Static Buffer Allocation API
2024-06-05 09:56:06 -06:00
gasbytes
453e2fadc1
dh2048Pem -> dhparam
2024-06-05 17:45:34 +02:00
David Garske
f3b61487e5
Merge pull request #7617 from julek-wolfssl/ipmitool
...
Add ipmitool action
2024-06-05 08:39:54 -07:00
Juliusz Sosinowicz
b3e795c4a5
Add jwt-cpp action
2024-06-05 15:06:12 +02:00
Juliusz Sosinowicz
72243300bf
HMAC: fix signature
2024-06-05 13:43:57 +02:00
Juliusz Sosinowicz
ea02fea3ef
opensslv: include version.h for libwolfssl hex symbol
2024-06-05 13:43:57 +02:00
gasbytes
2ab709c89a
- Platform specific function to correctly set the path for the certificates;
...
- Updated all the examples with it;
2024-06-05 13:28:30 +02:00
gasbytes
6cb97a7262
fixed windows build path problem
2024-06-04 23:12:16 +02:00
gasbytes
f231c7be03
updated the README & haveSNI function
2024-06-04 23:08:56 +02:00
JacobBarthelmeh
119d2a5da1
do session conversion dance
2024-06-04 14:41:01 -06:00
Eric Blankenhorn
55837fa254
Static analysis fixes
2024-06-04 12:37:46 -05:00
gasbytes
70fc5c97fb
made the workflow to compile & executes easier, updated the readme also
2024-06-04 19:13:51 +02:00
Jack Tjaden
7adf0fde8c
Added Static Buffer Allocation API
2024-06-04 10:30:21 -06:00
gasbytes
983610ed68
- Applied David's patch to get access to the missing sni callback (arg)
...
- removed tlsext callback (since it's a compatibility one)
- updated testing examples and wrapper
2024-06-04 18:26:01 +02:00
gasbytes
5d0b7e0d18
updated readme & sni function
2024-06-04 17:54:21 +02:00
David Garske
0397d90713
Merge pull request #7614 from julek-wolfssl/pam-ipmi-tests
...
Fix pam-ipmi test
2024-06-04 08:20:27 -07:00
Juliusz Sosinowicz
ede8cde8a7
dtls: Increment sequence number in SendAlert
2024-06-04 17:13:04 +02:00
Juliusz Sosinowicz
e428c2833b
Allow user to send a user_canceled alert
2024-06-04 17:13:04 +02:00
Juliusz Sosinowicz
2c644eb38a
Add ipmitool action
2024-06-04 16:44:59 +02:00
Juliusz Sosinowicz
04430f55ca
Fix pam-ipmi test
2024-06-04 16:09:35 +02:00
Sean Parkinson
df44face56
Kyber: fix kyber_from_msg()
...
New compilers with specific optimization levels will produce
non-constant time code for kyber_from_msg().
Add in an optimization blocker that stops the compiler from assuming
anything about the value to be ANDed with KYBER_Q_1_HALF.
2024-06-04 22:20:22 +10:00
David Garske
eb8f26926d
Move the options.h.in template for cmake into new location. Added note about adding new options.
2024-06-03 15:38:36 -07:00
John Safranek
514fdfcd43
Merge pull request #7591 from dgarske/wolfssh_template
...
Template for wolfSSH minimal build using user_settings.h
2024-06-03 15:34:17 -07:00
David Garske
78b056c1b0
Merge pull request #7611 from lealem47/gh7609
...
cmake: Define SINGLE_THREADED macro when option enabled
2024-06-03 15:28:16 -07:00
David Garske
8763b127d9
Add CI test for the new user_settings_wolfssh.h.
2024-06-03 14:27:07 -07:00
gasbytes
b2e7707f18
removed sniHostName no longer used
2024-06-03 21:33:55 +02:00
gasbytes
c04c7685b1
added callback example: setting sni cb & arg server side, and passing the name client side via -S flag
2024-06-03 21:24:54 +02:00
David Garske
305a754de3
Improvements to RSA padding. Expose API's to support external pad/unpad.
2024-06-03 12:23:31 -07:00
David Garske
d07d4fb8ac
Update support for wolfSSH with RSA_LOW_MEM.
2024-06-03 12:08:37 -07:00
David Garske
1f684e62d6
Merge pull request #7604 from ColtonWilley/explicit_len_pattern_match
...
Rewrite pattern matching to use explicit length
2024-06-03 12:04:12 -07:00
gasbytes
c325de993d
removed WOLFSSL_SNI_HOST_NAME_OUTER && minor fix (missing sniHostName got lost during editing)
2024-06-03 20:05:00 +02:00
Lealem Amedie
a2e26fb36e
cmake: define SINGLE_THREADED macro when option enabled
2024-06-03 12:01:50 -06:00
David Garske
b4910c4615
wolfSSH size optimizations. Disable RSA OAEP, enable SHA-1 with DH. Do not need SHA2-384/512.
2024-06-03 09:34:53 -07:00
David Garske
cfbadc8b07
Fixes for wolfSSH user_settings.h template. Add low resource option.
2024-06-03 09:34:53 -07:00
David Garske
3d374239a1
Template for wolfSSH minimal build using user_settings.h. ZD 17991.
2024-06-03 09:34:52 -07:00
David Garske
43f4ba91da
Merge pull request #7608 from ejohnstown/rsa-add
...
Import Raw RSA Private Key
2024-06-03 09:33:38 -07:00
Colton Willey
0c0069331b
Use same types for i and chklen, bring all lines under 80 chars
2024-06-03 09:25:41 -07:00
David Garske
4140a05fe4
Merge pull request #7592 from julek-wolfssl/pam-ipmi-tests
...
Add pam-ipmi action
2024-06-03 09:12:22 -07:00
John Safranek
e8e6eaeb4d
Import Raw Rsa Key
...
1. Add API for importing an RSA private key, `wc_RsaPrivateKeyDecodeRaw()`,
when all you have are the components of the key in raw arrays. Also
recalculates dP and dQ if missing.
2. Add API test for `wc_RsaPrivateKeyDecodeRaw()`.
2024-06-03 09:03:29 -07:00
Juliusz Sosinowicz
b1146becfd
Add pam-ipmi action
2024-06-03 14:13:06 +02:00
gasbytes
6f567b58bc
completed the examples
2024-06-02 00:01:51 +02:00
gasbytes
15ac366bf9
added missing wrappers for sni setup & frees
2024-06-01 17:46:17 +02:00
David Garske
3975af88cf
Merge pull request #7191 from kojo1/ecpoint-h2p
...
Add EC_POINT_hex2point
2024-06-01 07:13:31 -07:00
Takashi Kojo
bc2b184c98
Add EC_POINT_hex2point: zd #17090
2024-06-01 13:45:35 +09:00
David Garske
26284e2e5d
Merge pull request #7607 from gojimmypi/PR-fix-7606
...
Fix for #7606 : ESP_LOGI typo in esp32_sha.c
2024-05-31 17:59:08 -07:00
JacobBarthelmeh
533aa48b14
adjust macro guards around get max fragment
2024-05-31 16:52:31 -06:00
JacobBarthelmeh
2445fe844a
rework get max fragment length
2024-05-31 16:45:50 -06:00
gojimmypi
4d2ce1131a
Fix for #7606 : ESP_LOGI typo
2024-05-31 15:33:46 -07:00
JacobBarthelmeh
2caee1c7c5
add support for spaces around '=' with x509 name print
2024-05-31 15:04:01 -06:00
JacobBarthelmeh
ff7626419e
add some simple test cases
2024-05-31 15:02:58 -06:00
JacobBarthelmeh
01a1685159
updating socat support to version 1.8.0.0
2024-05-31 15:02:58 -06:00
David Garske
5657d88ddb
Merge pull request #7605 from douzzer/20240531-linuxkm-6v10-updates
...
20240531-linuxkm-6v10-updates
2024-05-31 11:41:27 -07:00
Daniel Pouzzner
d3a6b71f5f
linuxkm/Makefile: copy link tree of wolfcrypt/ as a whole, rather than just wolfcrypt/src/ and wolfcrypt/test/, to pull in wolfcrypt/benchmark/.
2024-05-31 13:11:52 -05:00
JacobBarthelmeh
40562a0cb3
Merge pull request #7599 from dgarske/asn_checkcertsig
...
Expose `wc_CheckCertSigPubKey` with `WOLFSSL_SMALL_CERT_VERIFY`
2024-05-31 09:20:35 -06:00
David Garske
0789ecb808
Fix the CheckCertSignature API mess.
2024-05-31 06:58:35 -07:00
Colton Willey
447f73c25e
Merge branch 'master' of github.com:ColtonWilley/wolfssl into explicit_len_pattern_match
2024-05-30 20:12:16 -07:00
Sean Parkinson
4b77d4caa1
Merge pull request #7589 from rizlik/sp800_56c
...
wolfcrypt: support NIST 800-56C Option 1 KDF
2024-05-31 11:55:12 +10:00
Sean Parkinson
fc8a509b06
Merge pull request #7597 from ColtonWilley/max_altnames_and_name_constraints
...
Max limits on number of alternative names and name constraints
2024-05-31 11:24:30 +10:00
Colton Willey
f646cbcecb
Address review comments, fix handling of . in name matching and add more tests for . handling
2024-05-30 18:03:38 -07:00
David Garske
7fadd4ed9f
Merge pull request #7595 from JacobBarthelmeh/static
...
Pull in some staticmemory features
2024-05-30 16:31:54 -07:00
David Garske
bb57c1de94
Merge pull request #7603 from lealem47/detect_cut
...
Fix cut detection in configure.ac
2024-05-30 15:42:55 -07:00
Colton Willey
af3828b2b7
Rewrite pattern matching to always use explicit lengths instead of expecting NULL terminated strings, thus replicating the behavior of openssl X509_check_host()
2024-05-30 15:33:17 -07:00
Lealem Amedie
ecef3c214c
Fix cut detection in configure.ac
2024-05-30 16:09:04 -06:00
JacobBarthelmeh
ebdc8b9a32
rename of macros, add descriptions, minor fixes
2024-05-30 14:48:52 -06:00
Colton Willey
1310c97a22
Add new certs to include.am
2024-05-30 12:45:46 -07:00
David Garske
66a5d8cc8a
Merge pull request #7601 from douzzer/20240529-linuxkm-6v10-updates
...
20240529-linuxkm-6v10-updates
2024-05-30 11:49:11 -07:00
David Garske
107c10d795
Merge pull request #7596 from JacobBarthelmeh/decl
...
make function signature match declaration
2024-05-30 10:59:04 -07:00
David Garske
61fea768b3
Merge pull request #7598 from JacobBarthelmeh/x509
...
fix typo with NO_CERTS macro
2024-05-30 09:59:37 -07:00
Daniel Pouzzner
41cbbfe3ab
linuxkm: updates for kernel 6.10: use new _noprof names for newly macro-shimmed kmalloc, krealloc, kzmalloc, kvmalloc_node, and kmalloc_trace, and refactor linuxkm/Makefile and linuxkm/Kbuild to set up links to sources in the dest tree (works around breakage from linux commit 9a0ebe5011).
2024-05-30 11:21:42 -05:00
JacobBarthelmeh
34ca03770f
still compile in wc_RsaKeyToDer with keygen but NO_CERTS
2024-05-30 09:58:25 -06:00
gasbytes
52f1caf699
minor changes to the prototypes and actual implementation
2024-05-30 16:44:34 +02:00
gasbytes
095609107d
prototypes
2024-05-30 16:14:17 +02:00
gasbytes
23bfb01e54
environment setup, updated the README
2024-05-30 15:41:01 +02:00
Marco Oliverio
174456437e
wolcrypt: NIST_SP_800_56C address reviewer's comments
2024-05-30 11:39:49 +02:00
Colton Willey
f13a82610c
Add flag guard for IGNORE_NAME_CONSTRAINTS
2024-05-29 22:41:36 -07:00
Colton Willey
a17677c946
Remove trailing whitespace
2024-05-29 21:29:55 -07:00
Colton Willey
473de5796c
Free ctx before return
2024-05-29 20:52:09 -07:00
Colton Willey
284dea43fe
Unify max name testing to use cert files for both cases.
2024-05-29 19:00:15 -07:00
Colton Willey
e620b47e1a
Add configuration file for generating cert with too many name constraints
2024-05-29 18:23:13 -07:00
Colton Willey
a4544ce2eb
Updates to address review comments
2024-05-29 17:54:52 -07:00
Colton Willey
af537a6ae3
Move definition to beginning of block
2024-05-29 17:02:29 -07:00
David Garske
3e9f656ac3
Merge pull request #7580 from kareem-wolfssl/zd17975
...
Fix missing stdio.h include on Freescale MQX. Use sprintf as snprintf is not available on MQX.
2024-05-29 16:55:34 -07:00
David Garske
0b7f293691
Expose wc_CheckCertSigPubKey with WOLFSSL_SMALL_CERT_VERIFY.
2024-05-29 16:32:31 -07:00
JacobBarthelmeh
cf61df129c
fix typo with NO_CERTS macro
2024-05-29 17:08:01 -06:00
JacobBarthelmeh
9673b3f218
make function signature match declaration
2024-05-29 17:00:22 -06:00
Colton Willey
b00ae2ac69
Initial implementation of max limits on number of alternative names and name constraints
2024-05-29 15:55:17 -07:00
JacobBarthelmeh
511c403631
account for yes/no options
2024-05-29 15:59:51 -06:00
JacobBarthelmeh
6cca3a0d92
tie in static memory debug callback
2024-05-29 15:50:14 -06:00
JacobBarthelmeh
288fe430f5
tying in lean staticmemory build with --enable-staticmemory=small
2024-05-29 15:50:11 -06:00
JacobBarthelmeh
18d80864b9
add lean static memory build
2024-05-29 15:44:09 -06:00
Marco Oliverio
8d41e68d1f
fix: minor typos
2024-05-28 22:59:01 +02:00
Marco Oliverio
5306a85465
wolfcrypt: support NIST 800-56C Option 1 KDF
2024-05-28 14:40:52 +02:00
David Garske
200f309e0e
Merge pull request #7587 from douzzer/20240524-pq-clang-tidy
...
20240524-pq-clang-tidy
2024-05-24 16:40:11 -07:00
Anthony Hu
021b573027
Merge pull request #7581 from dgarske/embos_emnet
...
Fixes for Segger emNet to handle non-blocking want read/want write
2024-05-24 17:31:16 -04:00
Daniel Pouzzner
8de00d7651
fix benign clang-analyzer-deadcode.DeadStores in pq crypto files introduced in 9a58301ab1.
2024-05-24 14:24:02 -05:00
Kareem
911f21ed36
Fix missing stdio.h include and XSNPRINTF definition on Freescale MQX.
2024-05-24 11:54:23 -07:00
Juliusz Sosinowicz
a5154b22f1
Merge pull request #7583 from gasbytes/patch-segv
...
separating two x509_store xmalloc checks
2024-05-24 19:58:29 +02:00
gasbytes
063e48014a
fix tabs and spaces
2024-05-24 17:52:54 +02:00
David Garske
9b058ec3a2
Fixes for EMNET with non-blocking to handle want read/want write. ZD 18012
2024-05-24 07:42:18 -07:00
David Garske
3b5517692e
Merge pull request #7582 from aidangarske/hpke_test_fix
...
Revert change from PR #7570
2024-05-24 07:35:39 -07:00
David Garske
51f19f42c6
Merge pull request #7574 from douzzer/20240522-quantum-safe-linuxkm
...
20240522-quantum-safe-linuxkm
2024-05-24 07:35:01 -07:00
David Garske
76e7d8627f
Merge pull request #7584 from Frauschi/zephyr_fix
...
Zephyr fix for XSTRNCASECMP
2024-05-24 07:32:53 -07:00
Tobias Frauenschläger
30eb26bd79
Zephyr fix for XSTRNCASECMP
...
The macro missed the third argument for wc_strncasecmp().
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-05-24 11:49:58 +02:00
gasbytes
3f96d14b32
80 characters limit fix
2024-05-24 00:12:38 +02:00
gasbytes
12a5cb45fb
separating two x509_store xmalloc checks
2024-05-23 23:04:00 +02:00
Ruby Martin
078fb66b29
Negative tests for all NULL arguments
2024-05-23 14:16:17 -06:00
Ruby Martin
b8838dca44
Tests all NULL argument cases
2024-05-23 13:36:48 -06:00
aidan garske
3670bfb9ae
Revert change from PR #7570
2024-05-23 12:34:59 -07:00
Tobias Frauenschläger
d28dd602e5
Various fixes for dual algorithm certificates ( #7577 )
...
This commit adds varios fixes for the implementation of hybrid
certificates with two algorithms:
* Support for Certificate Signing Requests (both creating hybrid ones
and also verifying ones)
* Fix for SAN fields in the DecodedCert and PreTBS generation
* Fix related to WOLFSSL_SMALL_STACK
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-05-23 15:03:55 -04:00
Anthony Hu
b98e4e0093
Merge pull request #7576 from Frauschi/pqc_private_key_fix
...
Fix PQC and hybrid certificate regressions
2024-05-23 15:03:16 -04:00
Chris Conlon
e05dbd531e
Merge pull request #7570 from jackctj117/test
...
Code Coverage for hpke.c test case HAVE_CURVE448 using test.c
2024-05-23 11:49:37 -06:00
Chris Conlon
688ae60cd9
Merge pull request #7573 from aidangarske/hpke_sha512_test
...
Add test for HPKE for Curve448
2024-05-23 11:46:30 -06:00
David Garske
ff6e6848de
Merge pull request #7578 from Frauschi/stm32h5_aes
...
Add support for STM32H5 AES hardware acceleration
2024-05-23 10:38:44 -07:00
David Garske
40db521f8b
Merge pull request #7575 from josepho0918/cmac
...
Simplify CMAC verification logic
2024-05-23 10:37:57 -07:00
Tobias Frauenschläger
9a58301ab1
Fix PQC and hybrid certificate regressions
...
Due to recent changes in the logic to decode private keys and to parse
the TLS1.3 CertificateVerify message, some regressions regarding PQC
private keys and hybrid certificates have been introduced:
* Decoding PQC private keys fails as the PKCS8 header of a decoded DER
file is now already removed before parsing the key.
* The key size wasn't properly stored in the context for PQC keys after
decoding a certificate (always the maximum size)
* The two 16-bit size values in case of a hybrid signature in the
CertificateVerify message have been incorrectly decoded as 32-bit
values instead of 16-bit values. This resulted in wrong values,
leading to segmentation faults.
All three regressions are fixed with the changes in this commit.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-05-23 16:01:28 +02:00
Sean Parkinson
023f604213
Merge pull request #7572 from douzzer/20240522-sha256-avx1-IS_INTEL_SHA
...
20240522-sha256-avx1-IS_INTEL_SHA
2024-05-23 22:37:54 +10:00
Tobias Frauenschläger
82642c1ee1
Add support for STM32H5 AES hardware acceleration
...
Tested with STM32H573i discovery board.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-05-23 12:22:11 +02:00
Joseph Chen
8a7e3ba52e
Simplify CMAC verification logic
2024-05-23 15:12:10 +08:00
Daniel Pouzzner
5c497c62e7
initial linuxkm compatibility (no asm yet) for wc_kyber, wc_xmss, and wc_lms, and smallstack refactors for kyber512_kat(), kyber768_kat(), kyber1024_kat(), and kyber_test().
2024-05-23 00:15:32 -05:00
Ruby Martin
f2492da6a4
include negative test comment and BAD_FUNC_ARG
2024-05-22 16:20:20 -06:00
Jack Tjaden
14068fb7f3
Removed returns & check next case for ret
2024-05-22 15:58:09 -06:00
Ruby Martin
159981f442
include negative test comment and BAD_FUNC_ARG
2024-05-22 15:23:38 -06:00
Daniel Pouzzner
110f4ec737
wolfcrypt/src/sha256.c: in WC_NO_INTERNAL_FUNCTION_POINTERS code path (linuxkm), fix oversight whereby Transform_Sha256_AVX1_Sha() was used on targets with false IS_INTEL_SHA(intel_flags). the former SHA256_AVX1 method id is now split into SHA256_AVX1_SHA and SHA256_AVX1_NOSHA, with corresponding fixes in Sha256_SetTransform(), inline_XTRANSFORM() and inline_XTRANSFORM_LEN().
2024-05-22 15:39:46 -05:00
David Garske
24f581fe13
Merge pull request #7557 from cconlon/jniSessionCerts
...
Update --enable-jni to define SESSION_CERTS for wolfJSSE
2024-05-22 13:08:00 -07:00
aidan garske
fe5cc9589b
Add HPKE Curve448 test case, however HPKE does not support 448 yet, so expect bad function argument return code.
2024-05-22 12:49:56 -07:00
Jack Tjaden
1a000ef94c
single_test and BAD_FUNC_ARG fix
2024-05-22 13:13:56 -06:00
Jack Tjaden
52b6c361f9
test.c code coverage test hpke.c
2024-05-22 11:51:44 -06:00
David Garske
cb0048dbb1
Merge pull request #7567 from embhorn/gh7564
...
Fix doc for wolfSSL_CTX_EnableOCSP
2024-05-22 08:46:20 -07:00
David Garske
425dd1986b
Merge pull request #7568 from lealem47/fips_pkcallback
...
Fix building FIPS v5 with PK callbacks
2024-05-22 08:45:58 -07:00
Ruby Martin
fe9882769e
Test case for wc_HpkeGenerateKeyPair() NULL argument
2024-05-22 09:13:31 -06:00
Sean Parkinson
32c5acca22
Merge pull request #7566 from douzzer/20240521-fix-overshifts
...
20240521-fix-overshifts
2024-05-22 07:42:49 +10:00
Eric Blankenhorn
314afc9e10
Fix doc for wolfSSL_CTX_EnableOCSP
2024-05-21 16:12:23 -05:00
Lealem Amedie
ba5cc9bdaf
Fix building FIPS v5 with PK callbacks
2024-05-21 15:07:32 -06:00
Daniel Pouzzner
c5ce984966
wolfcrypt/src/wc_xmss_impl.c:wc_xmssmt_sign_next_idx(): use (XmssIdx)1, not (word32)1, for a shift-by-height operand;
...
src/ssl.c:set_curves_list(): don't attempt to enable curves that are out-of-range for word32 disabled.
2024-05-21 13:57:40 -05:00
David Garske
caaa9feb64
Merge pull request #7551 from gojimmypi/PR-DSA-SHA1
...
Add settings.h check: DSA needs SHA1
2024-05-21 08:47:10 -07:00
David Garske
603b5d1795
Merge pull request #7563 from josepho0918/mqx_v5
...
Always use old I/O for MQXv5
2024-05-21 08:19:15 -07:00
Sean Parkinson
87b71c429a
Merge pull request #7562 from gojimmypi/PR-ssl_load-correction
...
Correct warning message file name in ssl_load.c
2024-05-21 22:14:24 +10:00
Joseph Chen
ed321cd640
Always use old I/O for MQXv5
2024-05-21 10:00:40 +08:00
gojimmypi
543a746ddc
Add settings check to disable DSA when SHA-1 is disabled
2024-05-20 17:58:25 -07:00
gojimmypi
84032fa24c
Correct error message file name in ssl_load.c
2024-05-20 17:20:39 -07:00
Sean Parkinson
43b2c80862
Merge pull request #7552 from dgarske/ecies_own_salt
...
Add option for using a custom salt for ourselves
2024-05-21 09:19:12 +10:00
Sean Parkinson
095906f37a
Merge pull request #7561 from kaleb-himes/SRTP-KDF-MAINTENANCE
...
Address periodic CAST failures observed in unit.test by pre-empting CASTs
2024-05-21 09:16:23 +10:00
David Garske
7d4e601902
Merge pull request #6623 from bigbrett/FIPS-TLS-benchmark-CAST-fix
...
Fix benchmark failure on FIPS builds
2024-05-20 14:07:59 -07:00
kaleb-himes
a22956d881
Address periodic CAST failures observed in unit.test by pre-empting the CASTs
2024-05-20 16:35:50 -04:00
Brett Nicholas
c6db51b8a0
fixed formatting
2024-05-20 12:47:30 -06:00
David Garske
fc172e9abd
Merge pull request #7559 from gojimmypi/PR-PlatformIO-FreeRTOS
...
Update PlatformIO README and Examples
2024-05-20 09:36:23 -07:00
David Garske
0987bf4c1a
Merge pull request #7544 from josepho0918/iar
...
Expand supported attributes for IAR
2024-05-20 09:34:55 -07:00
David Garske
5a0594d257
Match wc_ecc_ctx_set_kdf_salt argument names between header and implementation.
2024-05-20 08:38:23 -07:00
Sean Parkinson
b8aec63e14
Merge pull request #7560 from douzzer/20240518-XtsAesStreamData
...
20240518-XtsAesStreamData
2024-05-20 08:33:41 +10:00
Daniel Pouzzner
d0e73783f1
wolfcrypt/src/aes.c and wolfssl/wolfcrypt/aes.h: add FIPS_AES_XTS_MAX_BYTES_PER_TWEAK and struct XtsAesStreamData, with improved error checking on streaming AES-XTS APIs;
...
wolfcrypt/test/test.c and linuxkm/lkcapi_glue.c: update AES-XTS streaming calls to use struct XtsAesStreamData;
linuxkm/lkcapi_glue.c: add handling for CONFIG_CRYPTO_MANAGER*.
2024-05-18 22:00:00 -05:00
Daniel Pouzzner
5c6218696b
wolfcrypt/src/misc.c: fix -Wconversions in CopyString();
...
src/ssl.c: fix missing semicolon in wolfSSL_CTX_check_private_key().
2024-05-18 02:31:58 -05:00
gojimmypi
22af731dd9
Update PlatformIO README and Examples
2024-05-17 16:47:07 -07:00
Chris Conlon
8f1029f86d
Update --enable-jni to define SESSION_CERTS for wolfJSSE
2024-05-17 15:08:37 -06:00
David Garske
2d5e8402e8
Merge pull request #7553 from JacobBarthelmeh/coexist
...
error out if conflicting OPENSSL compat macros are defined
2024-05-17 12:56:59 -07:00
David Garske
15af87af8f
Merge pull request #7555 from lealem47/forceSHA3
...
Force SHA3 on with FIPS V5
2024-05-17 12:30:20 -07:00
David Garske
16b39e8374
Merge pull request #7556 from gasbytes/patch
...
u_int16_t -> uint16_t
2024-05-17 12:29:54 -07:00
David Garske
391431c7d8
Merge pull request #7539 from bandi13/fixConversionPart2
...
Fix conversion part2
2024-05-17 12:29:46 -07:00
Lealem Amedie
54bf7fd5d9
Force SHA3 on with FIPS V5
2024-05-17 11:03:18 -06:00
gasbytes
a40dcd3cb3
u_int16_t -> uint16_t
2024-05-17 18:44:15 +02:00
JacobBarthelmeh
568ec43213
error out if conflicting OPENSSL compat macros are defined
2024-05-17 09:24:38 -06:00
David Garske
95095f5bc4
Add option for using a custom salt for ourselves. ZD 17988
2024-05-17 08:16:04 -07:00
Brett Nicholas
e823da99ae
declare loop variable at top of function body
2024-05-17 07:08:32 -07:00
Brett Nicholas
9fa838881c
fixed bug where tls_bench failed KATs for FIPS builds in a multithreaded environment
2024-05-17 07:08:32 -07:00
David Garske
7782f8eed2
Merge pull request #7528 from gojimmypi/PR-PlatformIO-FreeRTOS
...
Introduce IDE/PlatformIO; add wolfSSL Benchmark and Test Examples
2024-05-17 06:42:47 -07:00
Sean Parkinson
c0015cbda6
Merge pull request #7549 from douzzer/20240516-wc_AesXtsEnDecryptFinal
...
20240516-wc_AesXtsEnDecryptFinal
2024-05-17 09:43:26 +10:00
David Garske
219a338107
Merge pull request #7547 from philljj/spelling_cleanup
...
Used codespell and fixed some obvious typos.
2024-05-16 14:10:19 -07:00
David Garske
b866bf6b3d
Merge pull request #7548 from julek-wolfssl/grpc
...
Point grpc.yml to the wolfssl repo
2024-05-16 14:09:57 -07:00
Daniel Pouzzner
6d0f611ab5
AES-XTS: add wc_AesXtsEncryptFinal() and wc_AesXtsDecryptFinal() for API consistency, and add error-checking (block alignment check) to wc_AesXtsEncryptUpdate() and wc_AesXtsDecryptUpdate().
2024-05-16 15:20:37 -05:00
David Garske
a8dd736b1e
Merge pull request #7158 from JacobBarthelmeh/psk
...
warning fix for small PSK build
2024-05-16 12:57:08 -07:00
Juliusz Sosinowicz
e4f20aff8b
Point grpc.yml to the wolfssl repo
2024-05-16 21:32:04 +02:00
jordan
040e0c956a
Used codespell and fixed obvious typos.
2024-05-16 13:53:26 -05:00
David Garske
dd55542949
Merge pull request #7541 from kaleb-himes/wolfEntropy-first-checkin
...
Add a recipe for wolfEntropy checkout
2024-05-16 11:51:46 -07:00
David Garske
0aa8e2eee7
Merge pull request #7445 from julek-wolfssl/grpc
...
Add grpc support
2024-05-16 11:41:54 -07:00
gojimmypi
439d81e0c9
Add PlatformIO license headers
2024-05-16 10:50:02 -07:00
gojimmypi
74c0d9b9f6
Update example/configs list, sort order.
2024-05-16 10:48:14 -07:00
oltolm
f744043db1
change the way "wolfssl/options.h.in" is generated
2024-05-16 18:55:27 +02:00
oltolm
5f46809988
fix compilation of tests with GCC
2024-05-16 18:55:27 +02:00
Juliusz Sosinowicz
76aba42bfa
Fix api signature
2024-05-16 18:20:53 +02:00
Juliusz Sosinowicz
c07f73b1c7
Fix typo
2024-05-16 18:20:53 +02:00
Juliusz Sosinowicz
12b9367598
test_wolfSSL_check_domain: doesn't work with WOLFSSL_HOSTNAME_VERIFY_ALT_NAME_ONLY
2024-05-16 18:20:53 +02:00
Juliusz Sosinowicz
d9a236ba1e
SSL_get_error does not return x509 errors
2024-05-16 18:20:53 +02:00
Juliusz Sosinowicz
fcb5c362f9
Add grpc testing
2024-05-16 18:20:53 +02:00
Juliusz Sosinowicz
d9f7629296
Add grpc support
...
- Fix BIO_BIO type
- Set retry flags correctly
- Add CRL callback
- Copy the alt names instead of trying to share a pointer
- Allow calling wolfSSL_get_servername on client side (to get the requested name)
- Return the chain in wolfSSL_X509_STORE_CTX_get_chain in the correct order
- Peer first, top CA last
- Fix leak in RebuildFullName
- Add CopyString helper function
- Implement
- X509_CRL_dup
- ASN1_UTCTIME_set
- X509_STORE_CTX_get0_param
- X509_STORE_get0_param
- X509_STORE_set_verify_cb
- X509_STORE_set_get_crl
- X509_set1_notAfter
- X509_set1_notBefore
2024-05-16 18:20:53 +02:00
JacobBarthelmeh
79595a3602
account for sp math which defines NO_BIG_INT but still allows mp_int types
2024-05-16 09:48:56 -06:00
JacobBarthelmeh
712ff0a58d
Merge pull request #7537 from dgarske/cleanups_20240515
...
Various typo and copy/paste cleanups
2024-05-16 09:38:38 -06:00
JacobBarthelmeh
21204244c5
Merge pull request #7394 from embhorn/zd17779
...
Add null check to wolfSSL_Free
2024-05-16 09:31:37 -06:00
David Garske
55ea3301b2
Merge pull request #7542 from gojimmypi/PR-Espressif-PlatformIO-semphr
...
Fix PlatformIO freertos semphr.h include
2024-05-16 08:28:12 -07:00
Daniel Pouzzner
fe7f92c2f1
Merge pull request #7545 from bandi13/reenableOpenVPNmasterTest
...
Reenable failing external project test
2024-05-16 11:26:04 -04:00
Andras Fekete
c0e372005b
Reenable failing external project test
2024-05-16 09:26:01 -04:00
Joseph Chen
931ca9524a
warn_used_result and unused __attribute__ on IAR
2024-05-16 14:53:31 +08:00
gojimmypi
7f1af2feb3
Fix PlatformIO freertos semphr.h include
2024-05-15 18:24:00 -07:00
gojimmypi
503bbbec8f
Update PlatformIO wolfssl/wolfssl@^5.7.0-rev.3c
2024-05-15 17:13:03 -07:00
David Garske
db38351919
Merge pull request #7470 from kaleb-himes/SRTP-KDF-OPTEST
...
Srtp kdf optest
2024-05-15 16:33:26 -07:00
Sean Parkinson
ca47d492d4
Merge pull request #7218 from anhu/gcmccm
...
Fixup places where it should be CCM instead of GCM.
2024-05-16 09:24:43 +10:00
Sean Parkinson
abd1e367a5
Merge pull request #7420 from anhu/cmp_name_case
...
When comparing subject names, do not worry about case.
2024-05-16 09:10:56 +10:00
David Garske
1d1800a3bd
Merge pull request #7380 from oltolm/yesno
...
make "yes;no" cmake options boolean instead of string
2024-05-15 15:18:42 -07:00
gojimmypi
51f814e6b7
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into PR-PlatformIO-FreeRTOS
2024-05-15 14:47:29 -07:00
Anthony Hu
1e2fb8f244
Fixup places where it should be CCM instead of GCM.
...
Fixes https://github.com/wolfSSL/wolfssl/issues/7216
2024-05-15 17:32:09 -04:00
kaleb-himes
42feca7028
Add a recipe for wolfEntropy checkout
2024-05-15 15:23:43 -06:00
Andras Fekete
412447ac41
Enable OPTION_CHECKING by default
...
This should halt `./configure` when an option is passed that is not recognized.
2024-05-15 16:54:55 -04:00
Fernando Oleo Blanco
ad25e9b063
[Ada] Clean Alire recipe
2024-05-15 22:33:29 +02:00
David Garske
287323ab4c
Merge pull request #6933 from kareem-wolfssl/zd16927
...
Add stub for wolfSSL_set_ecdh_auto.
2024-05-15 13:04:06 -07:00
David Garske
8ba96e6881
Merge pull request #7534 from ColtonWilley/deny_null_term_altnames
...
Do not match altnames with NULL terminators in the middle
2024-05-15 12:41:37 -07:00
kaleb-himes
76527c3eaa
Address a report from multi-test about 8-bit chars
2024-05-15 15:21:41 -04:00
Andras Fekete
0eb11ff466
Standard way to set defaults
2024-05-15 15:19:42 -04:00
Andras Fekete
b83d8f0cf6
Make sure MAX_ECC_BITS >= MIN_ECC_BITS
2024-05-15 15:19:13 -04:00
Andras Fekete
35ef7f4093
There is no default defined. Expected to be unset
2024-05-15 15:16:24 -04:00
Eric Blankenhorn
4e5a98e65d
Fix from rebase
2024-05-15 14:03:12 -05:00
kaleb-himes
fa08e2cb62
Fix a long line in pbkdf2 test
2024-05-15 14:02:44 -04:00
kaleb-himes
6719909f4e
Add logging.h header in pwdbased.c when DEBUG_WOLFSSL
2024-05-15 14:02:44 -04:00
kaleb-himes
7047991cda
Log when iterations LT 1000 but take no action
2024-05-15 14:02:44 -04:00
kaleb-himes
a9511e118a
Add SP800-132 112 bit minimum applicable after stretch/strengthen
2024-05-15 14:02:44 -04:00
kaleb-himes
a365d38762
After careful evaluation deciding not to include mem-zero check (for now)
2024-05-15 14:02:43 -04:00
kaleb-himes
82d9a7bbae
Initialize scratch buffer
2024-05-15 14:02:43 -04:00
kaleb-himes
673c5993a7
Make the memzero check default with FIPS, fix benchmark app
2024-05-15 14:02:43 -04:00
kaleb-himes
766c3b5ad8
Comments and further relaxing of some other hmac restrictions
2024-05-15 14:02:43 -04:00
kaleb-himes
49e9c06679
(Has dependency PR) API Service update HmacSizeByType
2024-05-15 14:02:43 -04:00
David Garske
fd4db1497f
Merge pull request #7536 from gasbytes/buffer_overflows_fix
...
added check that checks if the SEQ's length is > than the buff's length
2024-05-15 10:56:42 -07:00
David Garske
ac7aea9674
Merge pull request #7478 from JacobBarthelmeh/staticmemory
...
add global heap hint setter function
2024-05-15 10:43:15 -07:00
Kareem
4481f9b626
Add stub for wolfSSL_set_ecdh_auto.
2024-05-15 10:19:47 -07:00
David Garske
9166c1aa1c
Various typo and copy/paste cleanups.
2024-05-15 10:01:40 -07:00
Colton Willey
b156a51e82
Code cleanup per review comments
2024-05-15 09:51:00 -07:00
JacobBarthelmeh
9aeef1d857
add void and remove rebase issue
2024-05-15 10:28:39 -06:00
gasbytes
2f24b35ab1
added check that checks if the SEQ's length is > than the buff's length
2024-05-15 18:20:33 +02:00
Colton Willey
de0a492499
Remove trailing whitespace
2024-05-15 09:12:00 -07:00
David Garske
c73e4333bf
Merge pull request #7535 from gojimmypi/PR-fix-sha512-endianness
...
Fix Espressif SHA512 SW fallback endianness
2024-05-15 09:04:07 -07:00
David Garske
9c4c9234b1
Merge pull request #7532 from SparkiDev/wc_ecc_mulmod_zero
...
ECC: handle zero in wc_ecc_mulmod()
2024-05-15 09:02:02 -07:00
Colton Willey
d522feb1cd
Free X509 object
2024-05-15 08:37:39 -07:00
Colton Willey
958b5ac465
Clean up cast warning
2024-05-15 08:30:38 -07:00
Colton Willey
eb24bce93f
Add test case for bad alternative name
2024-05-15 08:22:11 -07:00
gojimmypi
b25a4f1082
Use zero, not Espressif macro for return code
2024-05-15 08:06:06 -07:00
gojimmypi
1024d7a809
Fix Espressif SHA512 SW fallback endianness
2024-05-15 07:36:10 -07:00
David Garske
92806a61c0
Merge pull request #7522 from douzzer/20240511-aes-xts-stream
...
20240511-aes-xts-stream
2024-05-15 06:22:20 -07:00
Daniel Pouzzner
1469aab109
linuxkm/lkcapi_glue.c: add native test coverage for WOLFSSL_AESXTS_STREAM.
...
wolfcrypt/test/test.c:
* add WOLFSSL_AESXTS_STREAM testing to the LARGE_XTS_SZ exercise in aes_xts_128_test().
* add the LARGE_XTS_SZ exercise to aes_xts_256_test().
* add aes_xts_192_test().
* fix -Werror=frame-larger-than=2048 in ed25519_test().
2024-05-15 00:45:51 -05:00
Daniel Pouzzner
4331bc092b
configure.ac: on armasm, disable ENABLED_AESXTS_STREAM by default (not implemented).
2024-05-14 19:24:27 -05:00
Daniel Pouzzner
2fe366cc74
wolfcrypt/test/test.c: add test coverage for WOLFSSL_AESXTS_STREAM.
...
linuxkm/lkcapi_glue.c: typographic cleanups, and failsafe error return constructs when skcipher_walk_virt() returns zero walk.nbytes.
wolfcrypt/src/aes.c: additional comments and inline documentation.
.github/workflows/openvpn.yml: disable test on master branch.
2024-05-14 19:11:39 -05:00
Daniel Pouzzner
8392748cda
wolfcrypt/src/aes.c: de-deduplicate code, AesXts{En,De}crypt_sw() vs AesXts{En,De}cryptUpdate_sw().
2024-05-14 19:11:39 -05:00
Daniel Pouzzner
4f1f7b3a4d
linuxkm/lkcapi_glue.c: update names of wc_AesXts{En,De}cryptInit().
...
wolfcrypt/src/aes.c: activate _AesXtsHelper() in AesXts{En,De}cryptUpdate_sw().
2024-05-14 19:11:39 -05:00
Sean Parkinson
643f472cfb
AES-XTS ASM x64: Add Intel x64 implementation of streaming
...
Changed APIs from wc_AesXts*Start -> wc_AesXts*Init.
Enabled ASM for x64 in aes.c.
AesXtsDecryptStart_sw same as AesXtsEncryptStart_sw so changed them to
AesXtsInit_sw.
2024-05-14 19:11:39 -05:00
Daniel Pouzzner
f874d8753d
AES-XTS-streaming: refactor API to eliminate caller-supplied tweak_block. instead, caller-supplied iv is used as a readwrite buffer.
2024-05-14 19:11:39 -05:00
Daniel Pouzzner
9e06524c6f
wolfcrypt/src/aes.c: add prototypes and linkages for AES_XTS_{encrypt,decrypt}_{start,update}_{avx1,aesni}.
2024-05-14 19:11:39 -05:00
Daniel Pouzzner
3ad5ec4e0a
make --enable-linuxkm-lkcapi-register require --enable-experimental, except for the known-good --enable-linuxkm-lkcapi-register="xts(aes)".
2024-05-14 19:11:39 -05:00
Daniel Pouzzner
70d7b6e48b
add WOLFSSL_AESXTS_STREAM, --enable-aesxts-stream, wc_AesXtsEncryptStart(), wc_AesXtsDecryptStart(), wc_AesXtsEncryptUpdate(), wc_AesXtsDecryptUpdate(), and implement fixes in linuxkm/lkcapi_glue.c to use the streaming API when needed. also added support for 2*192 bit AES-XTS, needed for Linux kernel.
2024-05-14 19:11:38 -05:00
Colton Willey
676dfb7edb
Do not allow NULL terminators in the middle of alt name for pattern matching. ZD 17987
2024-05-14 16:59:28 -07:00
Sean Parkinson
b63f308812
fixup
2024-05-15 09:07:04 +10:00
Sean Parkinson
36754683d6
ECC: handle zero in wc_ecc_mulmod()
...
Public API needs to handle multiplying by zero as the underlying code
doesn't and needn't.
2024-05-15 09:05:31 +10:00
Andras Fekete
6d1416d006
addressing PR comments
2024-05-14 16:02:56 -04:00
David Garske
28bd4ebeea
Merge pull request #7520 from bandi13/fixConversion
...
Fix conversion
2024-05-14 11:26:37 -07:00
David Garske
7526f527d1
Merge pull request #7526 from lealem47/addCast
...
Fix for type conversion error
2024-05-14 10:30:08 -07:00
Andras Fekete
a1797f0d0d
Fix casts depending on OS
2024-05-14 11:03:20 -04:00
Andras Fekete
a59a3d109f
Explicit cast
2024-05-14 11:03:20 -04:00
Andras Fekete
12768cdf57
Fix conversion tls13.c
2024-05-14 11:02:28 -04:00
Andras Fekete
bf92797cbc
Fix conversion error in client.c
2024-05-14 11:02:28 -04:00
Andras Fekete
0bf69e240a
Fix build failures
2024-05-14 11:02:28 -04:00
Andras Fekete
702b6c25d5
Fix conversion error in benchmark.c
2024-05-14 11:02:28 -04:00
Andras Fekete
692a7d55ff
Fix conversion error in wolfio.c
2024-05-14 11:02:28 -04:00
Andras Fekete
affd0a318e
Fix sign conversion errors
2024-05-14 11:02:28 -04:00
David Garske
0e2bb28ff3
Merge pull request #7529 from SparkiDev/aes_decrypt_fixes
...
AES: NO_AES_DECRYPT defined
2024-05-14 06:59:02 -07:00
David Garske
1ee315bbab
Merge pull request #7505 from gojimmypi/PR-Apple-Homekit-SRP-fix
...
Espressif updates to fix Apple Homekit SHA / SRP
2024-05-14 06:58:31 -07:00
Sean Parkinson
e1274013d8
AES: NO_AES_DECRYPT defined
...
Allow code to compile with NO_AES_DECRYPT with AES modes enabled and
disabled.
2024-05-14 16:27:36 +10:00
gojimmypi
fe5e5955bd
Introduce IDE/PlatformIO
2024-05-13 19:12:34 -07:00
David Garske
1c4479867e
Merge pull request #7416 from SparkiDev/ecc_blind_k
...
ECC: blind private key after use in signing
2024-05-13 18:56:44 -07:00
Sean Parkinson
a950e90215
Merge pull request #7527 from douzzer/20240513-test_wc_ecc_sm2_create_digest-clang-analyzer-optin.core.EnumCastOutOfRange
...
20240513-test_wc_ecc_sm2_create_digest-clang-analyzer-optin.core.EnumCastOutOfRange
2024-05-14 11:03:55 +10:00
Daniel Pouzzner
8ee7c36bb1
tests/api.c: add suppression for clang-analyzer-optin.core.EnumCastOutOfRange in "Bad hash type" subtest in test_wc_ecc_sm2_create_digest().
2024-05-13 19:06:54 -05:00
Sean Parkinson
b7eca574bb
SSL/TLS: blind private key DER
...
When WOLFSSL_BLIND_PRIVATE_KEY is defined, blind the private key DER
encoding so that stored private key data is always changing.
2024-05-14 09:47:51 +10:00
Sean Parkinson
f24ebdde25
ECC: blind private key after use in signing
...
Use a mask to blind the private key after use so that stored private key
is always changing.
2024-05-14 09:41:06 +10:00
Daniel Pouzzner
009ea6640b
Merge pull request #7493 from SparkiDev/sm3_benchmark_fix
...
Benchmark, SM3: fix full hash testing
2024-05-13 19:22:22 -04:00
Lealem Amedie
f4275d53c4
Fix for type conversion error
2024-05-13 16:32:12 -06:00
David Garske
6b79e5380d
Merge pull request #7525 from bandi13/fixCDTDisableOptionsTest
...
Unused variable error
2024-05-13 13:13:06 -07:00
gojimmypi
44ec470df0
Update esp32 sha uintptr_t types; ret (0/1 not TRUE/FALSE)
2024-05-13 12:36:35 -07:00
David Garske
7cce5684e6
Merge pull request #7468 from gojimmypi/PR-include-am
...
Cleanup & sort IDE include.am
2024-05-13 10:36:09 -07:00
David Garske
29f7578a61
Merge pull request #7446 from julek-wolfssl/hostap
...
hostap update
2024-05-13 10:35:01 -07:00
Andras Fekete
e5a0c0d5bf
Unused variable error
2024-05-13 13:18:20 -04:00
Daniel Pouzzner
4b81a99f91
Merge pull request #7424 from SparkiDev/aes_xts_x64_msvc
...
AES XTS asm x64 MSVC
2024-05-13 13:05:23 -04:00
David Garske
1be10fddba
Merge pull request #7509 from miyazakh/user_threading
...
Add user threading macro definition
2024-05-13 09:24:44 -07:00
David Garske
4eab5267f1
Merge pull request #7511 from julek-wolfssl/ec-meth
...
Stub EC_KEY_METHOD
2024-05-13 09:22:23 -07:00
David Garske
56129bd160
Merge pull request #7480 from gojimmypi/PR-cmake-liboqs-kyber
...
Introduce cmake SET_WOLFSSL_DEFINITIONS; Add Kyber and OQS
2024-05-13 09:21:23 -07:00
David Garske
a9164293c2
Merge pull request #7513 from julek-wolfssl/gh/7510
...
ed25519: check that the signature is smaller than the order
2024-05-13 09:16:17 -07:00
David Garske
568fda0e8b
Merge pull request #7517 from bandi13/bugFixes
...
Bug fixes
2024-05-13 09:01:00 -07:00
David Garske
d39ab765f6
Merge pull request #7519 from julek-wolfssl/gh/7516
...
Return length in wc_Curve448PublicKeyToDer with NULL output param
2024-05-13 09:00:33 -07:00
Sean Parkinson
81c22128e3
Merge pull request #7523 from douzzer/20240511-clang-analyzer-unix.Stream
...
20240511-clang-analyzer-unix.Stream
2024-05-13 21:53:13 +10:00
Sean Parkinson
0d996f4e5f
Merge pull request #7524 from douzzer/20240512-pkcs12_test-leak
...
20240512-pkcs12_test-leak
2024-05-13 09:06:04 +10:00
Daniel Pouzzner
1faa70c128
wolfcrypt/test/test.c:
...
* fix unconditional memory leak in pkcs12_test().
* refactor pkcs12_test() to fix error-conditional memory leaks.
* fix various old-style return codes in sm4_ccm_test(), pkcs12_test(), prf_test(), tls12_kdf_test(), xmss_test(), xmss_test_verify_only(), lms_test(), and lms_test_verify_only().
2024-05-12 14:13:06 -05:00
Daniel Pouzzner
9ac6bdd438
fixes and suppressions for defects reported by clang-analyzer-unix.Stream (new in llvm-19.0.0_pre20240504):
...
* added POSIX definitions for XFEOF(), XFERROR(), and XCLEARERR(), currently with no-op fallbacks for !POSIX.
* added missing file handle checks in testsuite/testsuite.c:file_test() and tests/utils.h:copy_file().
* added fixes and suppression around tests/api.c:test_wolfSSL_SMIME_read_PKCS7().
* added various fixes in examples/asn1/asn1.c and examples/pem/pem.c.
2024-05-11 15:24:54 -05:00
Andras Fekete
c5773f5f26
Make the function flow better
...
Will return 0 on failure.
2024-05-10 15:56:56 -04:00
Andras Fekete
f73a9f0d4f
Fix function logic
2024-05-10 15:03:17 -04:00
Juliusz Sosinowicz
239706615c
Return length in wc_Curve448PublicKeyToDer with NULL output param
2024-05-10 20:10:23 +02:00
JacobBarthelmeh
d68f3cf63c
add macro guard around test case
2024-05-10 11:08:45 -06:00
JacobBarthelmeh
98a19f9fdd
add debug log and adjust set global heap hint function
2024-05-10 11:08:43 -06:00
JacobBarthelmeh
de3d1a488d
add global heap hint setter function
2024-05-10 11:08:01 -06:00
Sean Parkinson
add7428d1c
TLS, SM2: fixes to get SM handshakes working
...
Pass around the algorithm id from the private key so that the WOLFSSL or
WOLFSSL_CTX get the correct key format set.
Use different verification context when self-signed certificate with SM2
and SM3 signature but public key OID is ECC.
2024-05-10 10:15:47 +10:00
Sean Parkinson
b87b521044
AES XTS asm x64 MSVC
...
Use assembly code for AES-XTS with MSVC for x64.
2024-05-10 09:10:36 +10:00
Daniel Pouzzner
cb689104d1
Merge pull request #7466 from julek-wolfssl/gh/7273
...
Mark all record sequence numbers before stateful parsing as read
2024-05-09 13:57:13 -04:00
Daniel Pouzzner
2335eb6bc6
Merge pull request #7488 from SparkiDev/asn_template_debug_fix
...
Asn template debug fix
2024-05-09 12:16:51 -04:00
philljj
2ed2da0a8f
Merge pull request #7515 from douzzer/20240509-fix-linuxkm-x86_vector_register_glue
...
20240509-fix-linuxkm-x86_vector_register_glue
2024-05-09 11:53:36 -04:00
Sean Parkinson
b62e8c1467
ASN template debug compile error
...
Variable is length instead of len.
2024-05-09 10:44:36 -05:00
Juliusz Sosinowicz
ab03324dc7
ed25519: put entire order into buffer for sanity check
2024-05-09 10:36:37 +02:00
Daniel Pouzzner
611a1642a1
linuxkm/include.am: add linuxkm/x86_vector_register_glue.c to EXTRA_DIST.
2024-05-09 02:03:16 -05:00
Daniel Pouzzner
f7e1e370a0
Merge pull request #7438 from julek-wolfssl/zephr-no-malloc
...
zephyr no malloc
2024-05-09 02:57:20 -04:00
Daniel Pouzzner
10b31cc481
Merge pull request #7507 from rizlik/update_err_code_cert
...
tls13: update error code to NO_CERT_ERROR when no cert is set
2024-05-09 01:38:26 -04:00
Daniel Pouzzner
af928faca7
Merge pull request #7489 from anhu/zero_len_hash
...
Allow for zero length hash. Its not an error.
2024-05-09 01:34:24 -04:00
Daniel Pouzzner
d53abc2e37
Merge pull request #7441 from kareem-wolfssl/zd17857
...
Allow using wolfSSL_CTX_set_default_verify_paths without WOLFSSL_SYS_CA_CERTS defined.
2024-05-09 00:38:04 -04:00
philljj
ac17616873
Merge pull request #7514 from douzzer/20240508-linuxkm-x86_vector_register_glue
...
20240508-linuxkm-x86_vector_register_glue
2024-05-08 21:45:39 -04:00
Daniel Pouzzner
5a784c818d
Merge pull request #7319 from SparkiDev/chacha_poly1305_asm_msvc
...
ChaCha20, Poly1305 ASM for MSVC
2024-05-08 19:03:56 -04:00
Daniel Pouzzner
76b302381b
Merge pull request #7484 from SparkiDev/mem_fail_fixes_1
...
Mem fail fix: ProcessingBuffer()
2024-05-08 18:36:45 -04:00
Hideki Miyazaki
5ceb992035
address review comments
2024-05-09 07:05:51 +09:00
Daniel Pouzzner
bc8664164b
linuxkm: move the *SAVE_VECTOR_REGISTERS* code from linuxkm/linuxkm_memory.c to linuxkm/x86_vector_register_glue.c, to move various fidgity/unstable kernel function calls outside the PIE wolfCrypt container.
2024-05-08 16:18:33 -05:00
Juliusz Sosinowicz
2508c9e1f4
ed25519: check that the signature is smaller than the order
2024-05-08 17:54:37 +02:00
Juliusz Sosinowicz
d6291522b9
fixup! Stub EC_KEY_METHOD
2024-05-08 16:41:00 +02:00
Juliusz Sosinowicz
0f06faf3d4
Stub EC_KEY_METHOD
2024-05-08 16:37:30 +02:00
Andras Fekete
8f9c8a1203
Fix infinite loop
...
'ret' could be set to non-zero inside the loop and the 'cmac->bufferSz' never gets reset causing 'add' to become 0 in the subsequent loop.
2024-05-08 09:52:37 -04:00
Juliusz Sosinowicz
df425b306f
Fix https://github.com/wolfSSL/wolfssl/issues/7391
2024-05-08 10:35:42 +02:00
Juliusz Sosinowicz
86c120a3f0
Increase hostap test timeout
2024-05-08 10:35:42 +02:00
Juliusz Sosinowicz
16ec3e52b7
Jenkins fixes
2024-05-08 10:35:42 +02:00
Juliusz Sosinowicz
433f3ae0b9
Add latest patch set to CI
2024-05-08 10:35:42 +02:00
Juliusz Sosinowicz
a987e76677
Use uml for hostap tests
...
Remove tests that fail with openssl
2024-05-08 10:33:30 +02:00
Juliusz Sosinowicz
6b47ebd66a
Expose *_set_groups for TLS < 1.3
...
- Add test to make sure we fail on curve mismatch
2024-05-08 10:33:20 +02:00
Juliusz Sosinowicz
020bcd0043
Advertise all supported sigalgs by default
2024-05-08 10:33:20 +02:00
Juliusz Sosinowicz
66f72a258f
Remove unused internal API
2024-05-08 10:33:20 +02:00
Juliusz Sosinowicz
77a7297c42
Filter cipher list on TLS version change
2024-05-08 10:33:20 +02:00
Juliusz Sosinowicz
06798ab8bf
EAP-FAST
...
Implement PACs for EAP-FAST
- wolfSSL_set_session_ticket_ext_cb
- server side wolfSSL_set_session_secret_cb (tls <=1.2 only)
2024-05-08 10:33:20 +02:00
Sean Parkinson
52861cbdbf
Merge pull request #7476 from per-allansson/one-crl-to-rule-them-all
...
An expired CRL should not override a successful match in other CRL
2024-05-08 09:47:22 +10:00
Hideki Miyazaki
95e9806e9e
add user threading macro definition
2024-05-08 06:56:43 +09:00
Daniel Pouzzner
97110700b2
Merge pull request #7430 from jpbland1/check-session-setup
...
Add `wolfSSL_SessionIsSetup`
2024-05-07 13:51:33 -04:00
András Fekete
33817747c4
Merge pull request #7506 from julek-wolfssl/gh/no-main
...
Don't use main.yml since it has a limit of 20 jobs
2024-05-07 09:22:56 -04:00
Juliusz Sosinowicz
14ce8ce198
Jenkins fixes
2024-05-07 11:46:36 +02:00
Marco Oliverio
b0c991eeb2
tls13: update error code to NO_CERT_ERROR when no cert is set
2024-05-07 10:55:48 +02:00
Juliusz Sosinowicz
589bdba256
Apply suggestions from code review
...
Co-authored-by: Bill Phipps <bill@wolfssl.com >
2024-05-07 10:38:01 +02:00
Juliusz Sosinowicz
77a6481d65
fixup! Add testing for zephyr no malloc
2024-05-07 10:38:01 +02:00
Juliusz Sosinowicz
d7361b3677
Increase zephyr thread sample memory
2024-05-07 10:38:01 +02:00
Juliusz Sosinowicz
8d8f4d4e1e
fixup! zephyr no malloc
2024-05-07 10:38:01 +02:00
Juliusz Sosinowicz
cbd490d1d7
fixup! zephyr no malloc
2024-05-07 10:38:01 +02:00
Juliusz Sosinowicz
550d9ad9a4
Add testing for zephyr no malloc
2024-05-07 10:38:01 +02:00
Juliusz Sosinowicz
7ed5e0b3ba
zephyr no malloc
...
- cert gen
- csr gen
- pkcs12
- Compiles for Zephyr 3.4.0 and 2.7.4
- Add support for CONFIG_POSIX_API
2024-05-07 10:38:01 +02:00
Juliusz Sosinowicz
2ffb5cc16c
Move haproxy.yml to disabled directory
2024-05-07 10:31:04 +02:00
Daniel Pouzzner
4e6a34504d
Merge pull request #7500 from SparkiDev/lms_xmss_move_wolfcrypt
...
LMS, XMSS: move code into wolfCrypt
2024-05-07 01:12:18 -04:00
Chris Conlon
95abc1074b
Merge pull request #7278 from JacobBarthelmeh/pkcs7-validate
...
add guard around public key validation on import
2024-05-06 13:51:29 -06:00
JacobBarthelmeh
7bc73d351f
Merge pull request #7504 from ejohnstown/generic-pool-fix
...
Generic Memory Pools Fix
2024-05-06 13:11:47 -06:00
Juliusz Sosinowicz
7206508329
Don't use main.yml since it has a limit of 20 jobs
2024-05-06 17:18:01 +02:00
gojimmypi
e90c6bcd24
Espressif updates to fix Apple Homekit SRP.
2024-05-04 14:33:23 -07:00
John Safranek
195bbcc315
Generic Memory Pools Fix
...
1. Add some expository comments describing the purpose of:
* WOLFMEM_MAX_BUCKETS
* WOLFMEM_DEF_BUCKETS
* WOLFMEM_BUCKETS
* WOLFMEM_DIST
2. Switch the API test for LoadStaticMemory() to named constants.
3. Delete redundant test case. Add a new test case.
4. In the wolfCrypt test for the memory constants, check the sizes of
the WOLFMEM_BUCKETS and WOLFMEM_DIST lists against
WOLFMEM_DEF_BUCKETS which should be their length. Check that
WOLFMEM_DEF_BUCKETS is not greater than WOLFMEM_MAX_BUCKETS.
5. Default for WOLFMEM_MAX_BUCKETS should be WOLFMEM_DEF_BUCKETS, set it
to what is specified. Add a warning if MAX is less than DEF.
6. Separate the definition of the constant LARGEST_MEM_BUCKET so it is
dependent on config and not if WOLFMEM_BUCKETS isn't set.
2024-05-03 16:15:38 -07:00
JacobBarthelmeh
081731be8b
Merge pull request #7392 from gojimmypi/PR-Espressif-wolfcrypt-test
...
Update Espressif Examples and Libraries
2024-05-03 15:31:23 -06:00
Anthony Hu
4ddba7ac8a
When comparing subject names, do not worry about case.
2024-05-03 15:03:07 -04:00
Sean Parkinson
e47f1d4190
LMS, XMSS: move code into wolfCrypt
...
Move implementations of LMS and XMSS into wolfCrypt and use by default.
2024-05-03 15:43:22 +10:00
Per Allansson
b88803cbb3
Fix formatting
2024-05-03 06:43:15 +02:00
philljj
d22991bb03
Merge pull request #7499 from douzzer/20240502-test_server_loop-double-close
...
20240502-test_server_loop-double-close
2024-05-02 23:53:04 -04:00
Daniel Pouzzner
0c1d583ab4
tests/api.c: fix double close in test_server_loop().
2024-05-02 19:07:36 -05:00
Sean Parkinson
51b85ee1e3
Merge pull request #7490 from dgarske/ecc_curvecache_nomalloc
...
Support for ECC_CACHE_CURVE with no malloc
2024-05-02 07:17:01 +10:00
Sean Parkinson
75b178f666
Merge pull request #7492 from JacobBarthelmeh/porting
...
remove assumption of struct layout
2024-05-02 07:14:06 +10:00
philljj
b61a6baf2b
Merge pull request #7497 from douzzer/20240501-fix-pqcrypto-private_key-callback-names
...
20240501-fix-pqcrypto-private_key-callback-names
2024-05-01 16:02:29 -04:00
András Fekete
ba89e0786d
Merge pull request #7498 from douzzer/20240501-openssl-sha3-sizeof-fix
...
20240501-openssl-sha3-sizeof-fix
2024-05-01 15:50:17 -04:00
Daniel Pouzzner
678038a077
wolfssl/openssl/sha3.h: use sizeof(wc_Sha3), not sizeof(struct wc_Sha3), for compatibility with afalg_hash.h and other ports that don't define a struct wc_Sha3.
2024-05-01 14:19:32 -05:00
Daniel Pouzzner
5905f9289d
fix namespace collision: rename types read_private_key_cb and write_private_key_cb to wc_{lms,xmss}_read_private_key_cb and wc_{lms,xmss}_write_private_key_cb.
2024-05-01 13:58:57 -05:00
András Fekete
866468ec2c
Merge pull request #7496 from douzzer/20240501-xilinx-wc_Sha3
...
20240501-xilinx-wc_Sha3
2024-05-01 14:51:56 -04:00
Daniel Pouzzner
a25644c379
Merge pull request #7495 from bandi13/fixWindowsNetdb_h
...
Fix windows 'gethostbyname' declaration
2024-05-01 14:16:45 -04:00
Daniel Pouzzner
7f6f824594
wolfssl/wolfcrypt/port/xilinx/xil-sha3.h: fix struct name -- struct wc_Sha3, not struct Sha3.
2024-05-01 12:47:23 -05:00
Andras Fekete
c3131b3234
Fix windows 'gethostbyname' declaration
2024-05-01 13:37:22 -04:00
David Garske
3afa420c31
Add option NO_ECC_CACHE_CURVE to allow disabling ECC curve cache with async.
2024-05-01 07:25:28 -07:00
Sean Parkinson
1ddc552828
TLS, SM2: fix ecc key type
...
Set the curve explicitly if it is SM2.
Set the key type to signature algorithm to handle SM2.
2024-05-01 17:56:49 +10:00
Sean Parkinson
e45686cce9
Merge pull request #7494 from douzzer/20240430-xmss-analyzer-cleanups
...
20240430-xmss-analyzer-cleanups
2024-05-01 14:36:46 +10:00
Sean Parkinson
840d1e9fac
Benchmark, SM2: initialize vars for small stack
...
Variables may not be initialized in benchmark test when building for
small stack.
2024-05-01 13:52:46 +10:00
Daniel Pouzzner
fa30d3ae0b
wolfcrypt/benchmark/benchmark.c: fixes for clang-analyzer-deadcode.DeadStores in bench_xmss_sign_verify();
...
wolfcrypt/test/test.c: fix for invalidPrintfArgType_sint in xmss_test_verify_only().
2024-04-30 22:48:48 -05:00
Sean Parkinson
aab97fe9e2
ChaCha20, Poly1305 ASM for MSVC
...
Make ChaCha20 and Poly1305 asm available for MSVC.
2024-05-01 13:44:25 +10:00
Sean Parkinson
db6b1388ce
Benchmark, SM3: fix full hash testing
...
Test now has an array of hashes.
Use only first hash when testing full digest operation.
2024-05-01 09:57:13 +10:00
Sean Parkinson
4594151588
Merge pull request #7418 from ejohnstown/generic-pool
...
Generic Memory Pools
2024-05-01 08:53:56 +10:00
Sean Parkinson
72d49964b9
Merge pull request #7379 from mrdeep1/enable-rpk
...
configure.ac: Add in --enable-rpk option
2024-05-01 08:44:08 +10:00
Sean Parkinson
2a125ad304
Merge pull request #7479 from gojimmypi/PR-cmake-update
...
Introduce cmake_policy CMP0128 NEW
2024-05-01 08:39:58 +10:00
Sean Parkinson
76e478ad8d
Merge pull request #7491 from bandi13/fixDTLStest
...
Make the DTLS tests a bit more resilient
2024-05-01 08:38:41 +10:00
JacobBarthelmeh
5aa39a6397
remove assumption of struct layout
2024-04-30 15:42:38 -06:00
Andras Fekete
256d81795a
Make the DTLS tests a bit more resilient
...
The assumption is that the wrong PIDs are getting killed. Better use the current shell's child processes (ie: 'jobs' command) than storing some calculated PID
2024-04-30 15:49:51 -04:00
John Safranek
6be55269db
Generic Memory Pools
...
1. Add API for function `wc_UnloadStaticMemory()` which frees the mutex
used by the static memory pool.
2. Update the `wc_LoadStaticMemory_ex()` test to free the static memory
pool's mutex on each successful test case.
2024-04-30 09:34:48 -07:00
John Safranek
f6ae432be1
Generic Memory Pools
...
1. Add API test for function `wc_LoadStaticMemory_ex()`.
2024-04-30 09:29:20 -07:00
gojimmypi
216925a946
Introduce cmake get/set_wolfssl_definitions; Add Kyber and OQS
2024-04-30 08:41:46 -07:00
David Garske
eaa5edb65b
Support for ECC_CACHE_CURVE with no malloc. ZD 17774
2024-04-30 08:22:56 -07:00
Anthony Hu
529b6a1eb9
Allow for zero length hash. Its not an error.
...
Fixes ZD17910
2024-04-30 11:06:30 -04:00
Sean Parkinson
f18633a000
Merge pull request #7474 from miyazakh/renesas_rz_rsip_update
...
Improve Renesas RZ support
2024-04-30 21:59:12 +10:00
Hideki Miyazaki
d4b265e84c
convert outLen type correctly
2024-04-30 17:19:11 +09:00
David Garske
6b1e6e3ef9
Spelling fixes.
2024-04-30 17:19:11 +09:00
Hideki Miyazaki
07de40e4bd
fix warnings
...
fix encrypted key use case
Update README
2024-04-30 17:19:11 +09:00
gojimmypi
980e26da63
Introduce cmake_policy CMP0128 NEW
2024-04-29 19:27:41 -07:00
Sean Parkinson
0d86137317
Merge pull request #7487 from bandi13/fixDockerfile
...
Fix dockerfile
2024-04-30 11:50:24 +10:00
Sean Parkinson
068a3b5e99
Merge pull request #7481 from douzzer/20240424-sha-C-dynamic-fallback
...
20240424-sha-C-dynamic-fallback
2024-04-30 09:00:57 +10:00
Sean Parkinson
5cc05956d5
Merge pull request #7485 from dgarske/pkcs11_async
...
Improved the prioritization of crypto callback vs async crypt in ECC …
2024-04-30 08:41:14 +10:00
Daniel Pouzzner
bb4c2cbad6
address peer review: typography in linuxkm/linuxkm_memory.c, typography, clarity, and efficiency in wolfcrypt/src/sha256.c and wolfcrypt/src/sha512.c.
2024-04-29 14:02:44 -05:00
David Garske
5af0b1e83b
Improved the prioritization of crypto callback vs async crypt in ECC and RSA. Resolves possible use of uninitialized value on ECC/RSA key when PKCS11 is enabled. See #7482
2024-04-29 10:34:01 -07:00
Andras Fekete
b90035d7b0
Remove 'dunfell' as its support ends in 3 days
2024-04-29 12:26:29 -04:00
Andras Fekete
13f83045a4
Add in 'langdale' and 'scarthgap' containers
2024-04-29 12:22:54 -04:00
Andras Fekete
aa1f253a8a
Force a rebuild using the latest sources
2024-04-29 12:21:47 -04:00
Sean Parkinson
41eaa8466d
Mem fail fix: ProcessingBuffer()
...
When ProcessBufferCertTypes() is not called, 'der' is not freed.
2024-04-29 23:05:29 +10:00
Per Allansson
e96a65a93d
An expired CRL should not override a successful match in other CRL
2024-04-29 09:35:28 +02:00
Sean Parkinson
bd9a27a39b
Merge pull request #7472 from ColtonWilley/remove-des3-guard-from-pkcs12-tests
...
Remove DES3 flag guard from pkcs12 tests
2024-04-29 10:54:39 +10:00
Daniel Pouzzner
393bf4a8e2
wolfssl/openssl/sha3.h: use sizeof(struct wc_Sha3) only ifdef WOLFSSL_SHA3.
2024-04-27 13:17:01 -05:00
Daniel Pouzzner
7260cc124c
smallstack refactors of wolfcrypt/src/evp.c:wolfssl_evp_digest_pk_final() and wolfcrypt/test/test.c:openssl_test().
2024-04-27 12:35:23 -05:00
Daniel Pouzzner
885497ba5a
add missing gate around Sha256_SetTransform() declaration in wolfcrypt/src/sha256.c;
...
remove stray definitions of XTRANSFORM*() in wolfcrypt/src/sha512.c;
restore global intel_flags in the !WC_NO_INTERNAL_FUNCTION_POINTERS paths of sha256.c and sha512.c;
disable test_wolfSSL_dtls_compare_stateless() in tests/api.c when DEBUG_VECTOR_REGISTER_ACCESS_FUZZING (it depends on a stable SHA512 hash of the in-memory struct WOLFSSL image).
2024-04-27 12:35:23 -05:00
Daniel Pouzzner
0566584191
implement full support for --enable-intelasm --enable-linuxkm. also add --enable-curve25519=noasm to allow use of the existing NO_CURVED25519_X64 code path by the linuxkm build (fe_x25519_asm.S is not kernel-compatible).
2024-04-27 12:35:23 -05:00
Daniel Pouzzner
326fd87b4f
linuxkm/linuxkm_memory.c: fix circular dependency around wolfCrypt_Init(), allocate_wolfcrypt_linuxkm_fpu_states(), wc_linuxkm_fpu_state_assoc(), on FIPS.
2024-04-27 12:35:23 -05:00
Daniel Pouzzner
3f8e33369c
implement WC_C_DYNAMIC_FALLBACK for SHA-3.
2024-04-27 12:35:23 -05:00
Daniel Pouzzner
4184b0e4f3
implement WC_C_DYNAMIC_FALLBACK for SHA512.
2024-04-27 12:35:23 -05:00
Daniel Pouzzner
65649b63d1
implement WC_C_DYNAMIC_FALLBACK for SHA256.
2024-04-27 12:35:23 -05:00
Daniel Pouzzner
4cc27fa58b
rename WC_AES_C_DYNAMIC_FALLBACK to WC_C_DYNAMIC_FALLBACK.
2024-04-27 12:35:23 -05:00
David Garske
2496cc0c21
Merge pull request #7477 from julek-wolfssl/issue/7390-2
...
Fix quic header protect cipher return
2024-04-27 07:10:18 -07:00
John Safranek
d23994862c
Generic Memory Pools
...
1. Added some extra parameter checking to wc_LoadStaticMemory_ex().
2. Added some extra parameter checking to wc_StaticBufferSz_ex().
3. Rename some parameters and add some logging prints.
4. Some static functions have some parameter checking and they are only
calling in one spot, remove it.
2024-04-26 15:08:17 -07:00
Kareem
c1f23cc505
Allow using wolfSSL_CTX_set_default_verify_paths without WOLFSSL_SYS_CA_CERTS defined.
2024-04-26 10:22:40 -07:00
Kareem
21058820fb
Fix NO_WOLFSSL_STUB typo.
2024-04-26 10:22:40 -07:00
Juliusz Sosinowicz
2328270222
Code review
2024-04-26 15:56:20 +02:00
Juliusz Sosinowicz
49952a97d7
Fix quic header protect cipher return
2024-04-26 14:18:40 +02:00
Sean Parkinson
e1bd4dd1ec
Merge pull request #7473 from douzzer/20240425-fixes
...
20240425-fixes
2024-04-26 15:52:05 +10:00
Sean Parkinson
e41454004e
Merge pull request #7475 from douzzer/20240425-master-for-jenkins
...
20240425-master-for-jenkins
2024-04-26 14:54:20 +10:00
Daniel Pouzzner
442d3f30cc
src/ssl.c: refactor fix in wolfSSL_RAND_bytes() for race on initGlobalRNG to retain the initial check on initGlobalRNG, and just recheck it, to avoid possible access to uninitialized globalRNGMutex.
2024-04-25 23:47:39 -05:00
Daniel Pouzzner
185f35287e
configure.ac: fix copyright year.
2024-04-25 22:44:28 -05:00
Daniel Pouzzner
59290cd066
src/quic.c: fix -Wunused-function for evp_cipher_eq().
2024-04-25 22:09:28 -05:00
Daniel Pouzzner
963e14a1fe
src/ssl.c: code style tweak from peer review.
2024-04-25 22:09:28 -05:00
Daniel Pouzzner
8e8e9bd0eb
src/ssl.c: fix races in wolfSSL_Init() and wolfSSL_RAND_bytes().
2024-04-25 22:09:28 -05:00
Daniel Pouzzner
460991a6f0
wolfcrypt/test/test.c: fix invalidPrintfArgType_sint in lms_test_verify_only().
2024-04-25 22:09:28 -05:00
Sean Parkinson
c8e51112c3
Merge pull request #7372 from julek-wolfssl/zd/17435
...
Add secret logging callback to TLS <= 1.2
2024-04-26 09:41:58 +10:00
Sean Parkinson
5ee0e34d89
Merge pull request #7465 from julek-wolfssl/issue/7390
...
Clean up EVP usage in quic
2024-04-26 09:38:40 +10:00
Sean Parkinson
54022b146b
Merge pull request #7456 from mrdeep1/enable-dtls13
...
dtls1.3: Fix issues when --enable-dtls13 enabled
2024-04-26 09:24:01 +10:00
Sean Parkinson
7881f4e04c
Merge pull request #7471 from ColtonWilley/update-benchmark-rsa-size-parsing
...
Update benchmark to only parse rsa size if keygen is enabled
2024-04-26 09:11:32 +10:00
Sean Parkinson
e22ae7a1f8
Merge pull request #7469 from douzzer/20240424-fix-ports-whitespace
...
20240424-fix-ports-whitespace
2024-04-26 09:00:38 +10:00
Sean Parkinson
039fd26baf
Merge pull request #7467 from anhu/quick_fix
...
Get rid of some code with NO_OLD_TLS
2024-04-26 08:57:46 +10:00
Sean Parkinson
9ac918c0d4
Merge pull request #7462 from kaleb-himes/SRTP-KDF-HARNESSrev2
...
Srtp kdf harness rev2
2024-04-26 08:21:37 +10:00
Colton Willey
2fb70b260b
Remove DES3 flag guard from pkcs12 tests that do not depend on DES3 code
2024-04-25 12:15:02 -07:00
Colton Willey
7485e9935d
Update benchmark to only parse rsa size if keygen is enabled, update keygen option help in configure.ac
2024-04-25 11:46:18 -07:00
Juliusz Sosinowicz
c62faa048c
Add secret logging callback to TLS <= 1.2
2024-04-25 17:11:07 +02:00
Juliusz Sosinowicz
d61fec5af9
Clean up EVP usage in quic
2024-04-25 16:34:38 +02:00
Juliusz Sosinowicz
7644d792b6
Mark all record sequence numbers before stateful parsing as read
...
Fixes https://github.com/wolfSSL/wolfssl/issues/7273
2024-04-25 16:23:41 +02:00
Daniel Pouzzner
e862c85db4
fix formatting infractions in the ports (hard tabs, trailing whitespace, C++ comments, stray Unicode including numerous homoglyphs).
2024-04-24 18:32:48 -05:00
gojimmypi
565058370f
Cleanup & sort IDE include.am
2024-04-24 15:36:15 -07:00
Anthony Hu
329650fb4c
Get rid of some code with NO_OLD_TLS
2024-04-24 16:00:45 -04:00
kaleb-himes
24eed7de34
Remove debug printf and place comments inside gate
2024-04-24 10:55:13 -04:00
Jon Shallow
e36df36f84
dtls1.3: Fix issues when --enable-dtls13 enabled
...
Fixed issue reported by scan-build when DTLS13 is enabled.
Fix compile issue when WOLFSSL_DTLS_CH_FRAG is enabled.
Fix running of scripts/dtlscid.test by removing 'set -e' as bwrap
command may not be there.
2024-04-24 12:07:29 +01:00
Sean Parkinson
6e49aa7543
Merge pull request #7421 from philljj/update_lms_parms
...
Update enum wc_LmsParm for wolfboot support.
2024-04-24 16:39:10 +10:00
Sean Parkinson
c26f4041c6
Merge pull request #7463 from ColtonWilley/hmac-oversized-key-test-update
...
Update HMAC oversized key tests
2024-04-24 15:34:28 +10:00
Colton Willey
7f19be05bd
Modify HMAC oversized key tests to consistently use test vectors from RFC.
2024-04-23 15:23:51 -07:00
Sean Parkinson
9d7913508b
Merge pull request #7460 from douzzer/20240423-linuxkm-sha-2-3-asm-save-vector-regs
...
20240423-linuxkm-sha-2-3-asm-save-vector-regs
2024-04-24 07:33:05 +10:00
Jon Shallow
4a1df83b6f
configure.ac: Add in --enable-rpk option
...
By default RPK (RFC7250) support is not enabled, but is enabled when
--enable-rpk, --enable-all or --enable-dist is used.
Makes use of the HAVE_RPK compile time option.
Fix clang issue reported in tests/api.c during test suites
2024-04-23 21:30:21 +01:00
kaleb-himes
80d21f10c6
Remove excess empty line
2024-04-23 13:47:26 -04:00
kaleb-himes
690671d447
ECC allow keyVer of 192-bit (import OK, generate restricted)
2024-04-23 13:45:41 -04:00
jordan
094ddb62c2
Add wc_LmsKey_ExportPubRaw to wolfcrypt test.
2024-04-23 10:48:53 -05:00
András Fekete
a75c2befb5
Add CUDA support ( #7436 )
...
* Redirect the AesEncrypt_C call to device
* Fix function declarations
* Force CC=nvcc with CUDA
* Don't let C++ mangle function names
* Add larger parallelization
* Add in memory copy to device
* `nvcc` does not support '-Wall' nor '-Wno-unused'
* Add in README.md
* Clean up script to output color coded data
* Fix Asymmetric cipher comparisons
* Add in standard output parsing in addition to the CSV
* Add option to output results in a CSV
---------
Co-authored-by: Andras Fekete <andras@wolfssl.com >
2024-04-23 08:26:27 -07:00
jordan
bc00c95fe5
Update enum wc_LmsParm for wolfboot support.
2024-04-23 09:37:07 -05:00
Daniel Pouzzner
5d9154e8c6
wolfcrypt/src/sha{256,512,3}.c add SAVE_VECTOR_REGISTERS() for SHA-2 and SHA-3 vectorized implementations, and add WC_NO_INTERNAL_FUNCTION_POINTERS code paths to fix GOT relocations around implementation function pointers.
2024-04-23 01:31:43 -05:00
Sean Parkinson
c3d9fb61a8
Merge pull request #7444 from miyazakh/trackmem_exclusion
...
Exclusively tracking mem properties
2024-04-23 11:08:42 +10:00
Sean Parkinson
eb125851cd
Merge pull request #7447 from Naruto/feature/enable_sccache
...
add ENABLE_SCCACHE option
2024-04-23 11:05:43 +10:00
David Garske
3a89c452b3
Merge pull request #7454 from lealem47/stm32AesCtr
...
Fix for AES CTR on STM32
2024-04-22 10:04:06 -07:00
John Safranek
0b5c83f589
Generic Memory Pools
...
1. Make the function wolfSSL_GetMemStats() public.
2024-04-22 08:54:40 -07:00
John Safranek
7a0bcb05fb
Generic Memory Pools
...
1. Add checks for listSz against WOLFMEM_MAX_BUCKETS.
2. Use WOLFMEM_DEF_BUCKETS for the size when using the default memory
descriptions.
3. Whitespace.
2024-04-22 08:54:40 -07:00
John Safranek
15a0ae4244
Generic Memory Pools
...
1. Add generic function wolfSSL_StaticBufferSz_ex() where one specifies
the memory bucket list sizes and distribution.
2. Rewrote wolfSSL_StaticBufferSz() in terms of the new function.
3. Changed the list pointers on wc_LoadStaticMemory_ex() and
wc_init_memory_heap() to be pointers to const.
2024-04-22 08:54:40 -07:00
John Safranek
7481644842
Generic Memory Pools
...
1. Add the function wc_LoadStaticMemory_ex(), which is a generic version
of wc_LoadStaticMemory().
2. Modify wc_LoadStaticMemory() to call wc_LoadStaticMemory_ex() with
the bucket lists.
3. Rename the function wolfSSL_load_static_memory() as
wc_partition_static_memory(), make it static, move it higher in the file.
2024-04-22 08:54:40 -07:00
John Safranek
2168b154b6
Generic Memory Pools
...
1. Modify wolfSSL_CTX_load_static_memory() to use wc_LoadStaticMemory()
instead of reimplementing it.
2. Initialize the pointers in wc_LoadStaticMemory() to null.
3. Whitespace changes.
2024-04-22 08:54:37 -07:00
Sean Parkinson
b17ad46b30
Merge pull request #7458 from douzzer/20240422-wc_SRTCP_KDF_ex-Wconversion
...
20240422-wc_SRTCP_KDF_ex-Wconversion
2024-04-22 21:30:14 +10:00
Daniel Pouzzner
44e8f392ae
wolfcrypt/src/kdf.c: fix -Wconversions in wc_SRTCP_KDF_ex().
2024-04-22 01:11:46 -05:00
Sean Parkinson
5bb22d8343
Merge pull request #7439 from JacobBarthelmeh/build_test
...
fix for WOLFSSL_NO_PEM build
2024-04-22 10:48:57 +10:00
Sean Parkinson
e1b66ca62d
Merge pull request #7407 from mrdeep1/key_share
...
Handle PSK-Only negotiation with key_share not being sent in Server Hello
2024-04-22 10:45:56 +10:00
Sean Parkinson
cfe645ca70
Merge pull request #7455 from kaleb-himes/SRTCP-48bit-indices
...
Srtcp 48bit indices
2024-04-22 10:43:07 +10:00
Sean Parkinson
eeadb2a7f3
Merge pull request #7457 from douzzer/20240420-wc_linuxkm_fpu_state_assoc-fixups
...
20240420-wc_linuxkm_fpu_state_assoc-fixups
2024-04-22 10:39:55 +10:00
Daniel Pouzzner
0a4eb1fbc7
linuxkm/linuxkm_memory.c: require kernel 5.4+ for AESNI/AVX, and add fixup code in wc_linuxkm_fpu_state_assoc_unlikely() to cope with migrations. in save_vector_registers_x86(), on kernel < 5.17, check test_thread_flag(TIF_NEED_FPU_LOAD) as a workaround for irq_fpu_usable() missing check for in_kernel_fpu.
2024-04-20 13:55:37 -05:00
Lealem Amedie
eafa425019
Engine doesn't need NO_OLD_RNG_NAME
2024-04-19 16:15:38 -06:00
JacobBarthelmeh
78670f5098
Merge pull request #7453 from douzzer/20240419-wolfSSL_CTX_SetTmpDH-double-free
...
20240419-wolfSSL_CTX_SetTmpDH-double-free
2024-04-19 13:48:37 -06:00
kaleb-himes
4b1edc78bb
Add test case
2024-04-19 13:16:19 -06:00
Lealem Amedie
acc6ff84d8
Move rng seed cb call to wolfcrypt_test
2024-04-19 12:36:20 -06:00
Lealem Amedie
9bc0e31a32
Fix for AES CTR on STM32
2024-04-19 12:35:33 -06:00
kaleb-himes
e835517633
SRTCP 32-bit indices default plus errata 48-bit indices
2024-04-19 12:31:08 -06:00
JacobBarthelmeh
69be7a7c54
Merge pull request #7431 from lealem47/aes_cfb
...
Fix for AES-CFB1 encrypt/decrypt on size (8*x-1) bits
2024-04-19 10:55:27 -06:00
JacobBarthelmeh
a63ff277ed
Merge pull request #7452 from douzzer/20240419-linuxkm-intelasm-expansion
...
20240419-linuxkm-intelasm-expansion
2024-04-19 10:46:11 -06:00
Daniel Pouzzner
39e2405e2f
src/ssl_load.c: fix double-free in wolfSSL_CTX_SetTmpDH().
2024-04-19 11:43:32 -05:00
JacobBarthelmeh
5f9ed54aaa
Merge pull request #7451 from SparkiDev/test_fixes_1
...
Fixes from configuration testing
2024-04-19 10:43:31 -06:00
JacobBarthelmeh
c7f852fbbd
Merge pull request #7450 from anhu/reneg_indic
...
check for conflicting secure renegotiation macros (settings.h)
2024-04-19 10:41:26 -06:00
JacobBarthelmeh
9242f611b2
Merge pull request #7449 from lealem47/nginx_stubs
...
Adding stubs required for latest nginx
2024-04-19 10:38:17 -06:00
Jon Shallow
7b22681287
Handle PSK-Only negotiation with key_share not being sent in Server Hello
...
The wrong cipher suite is potentially chosen if key_share is not seen by the client.
$ cat /tmp/test
Client_identitySHA256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
Server:
$ gnutls-serv --http --priority NORMAL:+ECDHE-PSK:+PSK:+ECDHE-ECDSA:+AES-128-CCM-8:+CTYPE-CLI-ALL:+CTYPE-SRV-ALL:+SHA256 --pskpasswd=/tmp/test
Client:
$ examples/client/client -vd -g -s -p 5556 2>&1| grep HTTP
2024-04-19 17:14:28 +01:00
Daniel Pouzzner
0264a518e1
wolfcrypt/src/ed25519.c: in ed25519_pairwise_consistency_test(), add casts to mollify -Wconversion.
2024-04-19 01:41:35 -05:00
Daniel Pouzzner
28480ec0ea
linuxkm/Kbuild: add SHA-2, SHA-3, ChaCha20, and poly1305, to kernel-safe vectorized-asm list.
2024-04-19 01:35:45 -05:00
Daniel Pouzzner
85f3fb9d07
Merge pull request #7409 from SparkiDev/asm_x64_rip_fix
...
SHA-256 x64 ASM - fix use of %rip
2024-04-19 02:33:47 -04:00
Sean Parkinson
d2b9a365f2
ChaCha20 and Poly1305 x64 ASM - fixu use of %rip
...
Get the address of the constants into a register at start instead of
calculating the address relative to the instruction pointer each time.
2024-04-19 09:59:54 +10:00
Sean Parkinson
97d560d9af
Fixes from configuration testing
...
asn1.c: Allow sample to build without coding (base64 decoding).
set_curves_list(): function for ECC, Ed25519, Ed448 but this block of
code is ECC only. Fixed #ifdef protection.
wolfSSL_CTX_set1_curves_list and wolfSSL_set1_curves_list also available
when Curve25519/Curve448 compiled in but not ECC.
2024-04-19 08:40:19 +10:00
Lealem Amedie
7a7af18887
Guard with OPENSSL_EXTRA instead of WOLFSSL_NGINX
2024-04-18 16:33:37 -06:00
Anthony Hu
85326da7fc
check for conflicting HAVE_RENEGOTIATION_INDICATION and HAVE_SECURE_RENEGOTIATION in settings.h
2024-04-18 17:51:33 -04:00
JacobBarthelmeh
fe671f72e1
Merge pull request #7435 from SparkiDev/ssl_misc_fixup
...
ssl_misc.c: wolfssl_file_len() protection
2024-04-18 14:36:38 -06:00
JacobBarthelmeh
ef153101b7
Merge pull request #7433 from SparkiDev/eddsa_fips_checks
...
EdDSA FIPS checks on public key
2024-04-18 14:34:31 -06:00
JacobBarthelmeh
9666e4d7e4
Merge pull request #7448 from douzzer/20240418-pq-hybrid-fixes
...
20240418-pq-hybrid-fixes
2024-04-18 14:31:27 -06:00
Daniel Pouzzner
e48f06bd53
fixes for WOLFSSL_DUAL_ALG_CERTS: "cannot take address of bit-field ‘altKeyType’" and "‘altPrivateKeyType’" in ProcessBufferTryDecode(), "‘heap’ undeclared" in ProcessBufferCertAltPublicKey(), "‘consumed’ undeclared" in ProcessFile(), "‘keySz’ undeclared" in wolfSSL_CTX_use_PrivateKey_Id().
2024-04-18 13:49:44 -05:00
Lealem Amedie
a1cf316630
Adding stubs required for latest nginx
2024-04-18 12:28:31 -06:00
Lealem Amedie
295033441c
Fix for AES-CFB1 encrypt/decrypt on size (8*x-1) bits
2024-04-18 11:31:28 -06:00
Naruto TAKAHASHI
38dc4f299c
add ENABLE_SCCACHE option
2024-04-19 00:40:57 +09:00
kaleb-himes
0bd5967093
Adjust FIPS version and default configuration
2024-04-18 08:41:05 -06:00
Sean Parkinson
08b42b7c93
Merge pull request #7443 from douzzer/20240418-fix-aes_xts_128_test-DEBUG_VECTOR_REGISTER_ACCESS
...
20240418-fix-aes_xts_128_test-DEBUG_VECTOR_REGISTER_ACCESS
2024-04-18 21:10:40 +10:00
Hideki Miyazaki
dab6726e58
fix tracking mem properties under multi-threads
2024-04-18 15:14:25 +09:00
Daniel Pouzzner
436efb0078
wolfcrypt/test/test.c: in aes_xts_128_test(), change DEBUG_VECTOR_REGISTER_ACCESS gates to DEBUG_VECTOR_REGISTER_ACCESS_AESXTS (currently unused), after refactor of AES-XTS C fallback in 9f55dba2f2. (per-call fallback is no longer supported for AES-XTS.)
2024-04-18 00:59:03 -05:00
JacobBarthelmeh
41f31f4635
Merge pull request #7440 from douzzer/20240417-fix-LoadSystemCaCertsWindows
...
20240417-fix-LoadSystemCaCertsWindows
2024-04-17 15:47:48 -06:00
JacobBarthelmeh
58167a2ebb
Merge pull request #7434 from douzzer/20240416-fips-v6-fixes
...
20240416-fips-v6-fixes
2024-04-17 13:52:35 -06:00
Daniel Pouzzner
6e3a9d5447
src/ssl_load.c: in LoadSystemCaCertsWindows(), fix flub introduced in 8e9810e87e.
2024-04-17 13:24:26 -05:00
JacobBarthelmeh
c2e60d523f
fix for WOLFSSL_NO_PEM build
2024-04-17 11:16:18 -06:00
Sean Parkinson
593cb77e51
ssl_misc.c: wolfssl_file_len() protection
...
wolfssl_file_len is now used by wolfssl_read_file_static() which is
compiled in with less restrictions.
Fix #ifdef protection.
2024-04-17 22:44:13 +10:00
John Bland
804cf1c3b7
re-add function to new file
2024-04-17 04:04:00 -04:00
John Bland
b184cdf7b5
add underscore to make it more consistient and readable
2024-04-17 03:56:07 -04:00
John Bland
c1dbbcc81e
add wolfSSLSessionIsSetup so the user can check if
...
a session ticket has been sent by the server
2024-04-17 03:54:51 -04:00
Sean Parkinson
c590fe514f
EdDSA FIPS checks on public key
...
Check that the Ed25519 and Ed448 public key is valid even without
private key.
Perform pairwise consistency test, only in FIPS, when making a key i
Ed25519 and Ed448.
2024-04-17 17:50:33 +10:00
Daniel Pouzzner
3df11e7eab
fixes for cppcheck uninitvar src/pk.c (false positives) and nullPointerRedundantCheck in src/ssl_load.c (true positive).
2024-04-17 01:00:41 -05:00
Daniel Pouzzner
fac834c80a
configure.ac: in setup for enable-all and enable-all-crypto with enable-32bit, fix inconsistency whereby SHAKE was enabled but SHA512 and SHA3 weren't; remove unneeded+unwanted ENABLED_32BIT conditional force-off of SHA512, SHA384, SHA3, ED25519 (harmonizes with FIPS v6).
2024-04-17 00:43:41 -05:00
Daniel Pouzzner
d0edb3d0a9
scripts/aria-cmake-build-test.sh: fix masked exit value.
2024-04-17 00:43:41 -05:00
Daniel Pouzzner
855175da47
wolfcrypt/src/fe_448.c: fix several out-of-order declarations in fe448_mul_8().
2024-04-17 00:43:41 -05:00
Daniel Pouzzner
9f55dba2f2
wolfcrypt/src/aes.c: in AES-XTS AESNI, use cautious strategy as in AESGCM_STREAM for SAVE_VECTOR_REGISTERS, due to random failures seen with DEBUG_VECTOR_REGISTER_ACCESS_FUZZING using the old per-call fallback strategy.
2024-04-17 00:43:41 -05:00
Daniel Pouzzner
b2f594e84b
fixes for --enable-32bit CFLAGS=-m32 --enable-fips=v6 (fixes "#error ED448 requires SHAKE256").
2024-04-17 00:43:41 -05:00
JacobBarthelmeh
03ed52bd81
Merge pull request #7297 from SparkiDev/ssl_move_5
...
ssl.c: Move functions out to separate files
2024-04-16 17:56:55 -06:00
JacobBarthelmeh
1f61ed3536
Merge pull request #7397 from dalybrown/expose-dtsl-in-ada
...
Expose DTLS in Ada wrapper and update examples
2024-04-16 13:37:23 -06:00
András Fekete
73a85af9b9
Merge pull request #7429 from julek-wolfssl/hostap-cert-update
...
Update hostap certs ref
2024-04-16 12:43:28 -04:00
Juliusz Sosinowicz
52a593c883
Update hostap certs ref
2024-04-16 17:53:29 +02:00
Sean Parkinson
8e9810e87e
ssl.c: Move functions out to separate files
...
Moved E[CD][25519||448] APIs to pk.c
Move public key PEM APIs to pk.c.
Move wolfSSL loading and using of private keys and certificates to
ssl_load.c
Move PKCS#7 and PKCS#12 APIs to ssl_p7p12.c.
Move session and session cache APIs to ssl_sess.c.
Other minor fixes.
2024-04-16 10:30:59 +10:00
JacobBarthelmeh
9b92aea245
Merge pull request #7422 from douzzer/20240412-fips-v5-v6-linuxkm-fixes
...
20240412-fips-v5-v6-linuxkm-fixes
2024-04-15 17:32:53 -06:00
Daniel Pouzzner
281c2a431e
wolfcrypt/test/test.c: fix return code in pbkdf2_test(), add DEBUG_WOLFSSL gates on keysize report in ecc_test_curve(), and add missing PRIVATE_KEY_UNLOCK()s in cryptocb_test() for fips-dev coverage.
2024-04-15 14:11:21 -05:00
Daniel Pouzzner
6e0a90190f
fixes for v5 and v6+ FIPS builds, including linuxkm v6+ builds.
2024-04-15 14:11:21 -05:00
JacobBarthelmeh
be74cb7d94
Merge pull request #7419 from anhu/winpq
...
Add PQ Files for windows.
2024-04-15 10:21:47 -06:00
JacobBarthelmeh
1cb34a8bed
Merge pull request #7411 from douzzer/20240410-lock-free-wc_linuxkm_fpu_state_assoc
...
20240410-lock-free-wc_linuxkm_fpu_state_assoc
2024-04-15 10:20:39 -06:00
JacobBarthelmeh
3742c4dd57
Merge pull request #7413 from gojimmypi/PR-PlatformIO-FreeRTOS
...
Modify PlatformIO FreeRTOS include path, settings.h
2024-04-12 14:32:55 -06:00
JacobBarthelmeh
3113e6c855
Merge pull request #7393 from philljj/xmss_w64_settings
...
Adjust wc_xmss and wc_lms settings to support wolfboot.
2024-04-12 14:14:50 -06:00
JacobBarthelmeh
7d0ce39408
Merge pull request #7396 from miyazakh/renesas_rx72n
...
fix rx72n compile failure
2024-04-12 14:03:45 -06:00
JacobBarthelmeh
77bbb35830
Merge pull request #7415 from bandi13/addDockerCrossCompilerDependency
...
Add yet another cross compiling tool
2024-04-12 13:19:27 -06:00
Anthony Hu
85765b1a57
Add PQ Files for windows.
2024-04-12 15:05:29 -04:00
jordan
6ae99485a1
Additional changes to support wolfboot wc_lms.
2024-04-12 10:51:55 -05:00
Andras Fekete
5e85adee0f
Add yet another cross compiling tool
2024-04-11 23:14:16 -04:00
JacobBarthelmeh
8b656d5a5f
Merge pull request #7295 from kaleb-himes/SRTP-KDF-FS
...
SRTP-KDF FS Preview
2024-04-11 13:41:05 -06:00
kaleb-himes
73e5303718
Removed duplicate file from project
2024-04-11 12:16:21 -06:00
kaleb-himes
29a41d5ff9
Add new fips-ready dependencies to WIN10 project
2024-04-11 10:56:46 -06:00
gojimmypi
b1261f5471
Modify PlatformIO FreeRTOS include path, settings.h
2024-04-11 07:46:35 -07:00
Daniel Pouzzner
954005af9a
linuxkm/linuxkm_memory.c: refactor wc_linuxkm_fpu_state_assoc() as a lock-free O(1) mechanism with per-CPU rather than per-process state.
2024-04-11 00:06:28 -05:00
JacobBarthelmeh
ff09f418c0
Merge pull request #7408 from SparkiDev/asn_templ_rid
...
X.509 RID ASN template behaviour
2024-04-10 11:42:07 -06:00
kaleb-himes
264dcd4e15
Fix a file mode and more overlong lines
2024-04-10 10:18:49 -06:00
kaleb-himes
4a8443f0e4
Address new file item reported by Jenkins
2024-04-10 11:05:11 -04:00
Sean Parkinson
8b3fbe47e6
SHA-256 x64 ASM - fix use of %rip
...
Get the address of table K instead of using it directly each time a
value is required.
2024-04-10 15:02:19 +10:00
Sean Parkinson
36b47d1374
Merge pull request #7352 from JacobBarthelmeh/coverity4
...
Coverity Fixes
2024-04-10 10:46:54 +10:00
Sean Parkinson
b48b5c47f4
X.509 RID ASN template behaviour
...
Don't set the DNS entry for RID unless OPENSSL_ALL is defined to match
the behaviour of original ASN code.
2024-04-10 10:39:45 +10:00
kaleb-himes
2aae5eb0f5
Multi-test doesn't like over-long lines
2024-04-09 16:54:17 -06:00
kaleb-himes
55fc9c09e4
Set debugging off by default
2024-04-09 16:24:35 -06:00
kaleb-himes
455f1a6875
Addendum to windows support with OpenSSL Extra enabled
2024-04-09 16:19:48 -06:00
JacobBarthelmeh
a8415a7926
Merge pull request #7367 from mrdeep1/hello_verify_request
...
Support DTLS1.3 downgrade when using PSK
2024-04-09 16:17:59 -06:00
kaleb-himes
b8d31b042f
Windows support
2024-04-09 13:55:05 -06:00
kaleb-himes
71e83cdd19
Resolve armasm fips wrappers and sanity
2024-04-09 11:41:41 -06:00
kaleb-himes
0d83d0d199
Make wolfEntropy optional and bring settings.h in sync w/ master
2024-04-09 10:44:17 -06:00
kaleb-himes
e45867bbc3
WIN fips section refactor / wolfEntropy API syntax adjustment
2024-04-09 09:48:33 -06:00
kaleb-himes
a3413ad009
Address Jenkins caught item
2024-04-09 09:48:33 -06:00
kaleb-himes
ef2a636610
Expose additional features of opensslall in a compliant way
2024-04-09 09:48:33 -06:00
kaleb-himes
afeb3f5358
More peer feedback
2024-04-09 09:48:33 -06:00
kaleb-himes
d40700b93d
Fix offset (whitespace)
2024-04-09 09:48:33 -06:00
kaleb-himes
84e5ccece5
Implement peer review feedback
2024-04-09 09:48:33 -06:00
kaleb-himes
8485f88688
Bring fips-dev inline with fips-ready
2024-04-09 09:48:33 -06:00
kaleb-himes
2e63ae750d
Comments for SP800-38E TODO, wolfEntropy optional setup and remove forced errors api.c
2024-04-09 09:48:33 -06:00
kaleb-himes
8092104396
Address a flush-left in test.c and gt 80 column limit in settings.h
2024-04-09 09:48:33 -06:00
kaleb-himes
b7d88e0852
Cleanup duplicate forward dec logic with different macros
2024-04-09 09:48:33 -06:00
kaleb-himes
84f5b4e5bf
Touchup a few more edge cases caught by Jenkins
2024-04-09 09:48:33 -06:00
kaleb-himes
829d028d98
Add configure for wolfEngine with new module
2024-04-09 09:48:33 -06:00
kaleb-himes
4df091ae2a
Restore debug messages that were cluttering up logs
2024-04-09 09:48:33 -06:00
kaleb_himes
81f5ac7f6c
SRTP-KDF FS Preview
2024-04-09 09:48:33 -06:00
JacobBarthelmeh
dd79ca5d96
Merge pull request #7405 from SparkiDev/mismatch_cs_alert
...
No match cipher suite alert type change
2024-04-09 09:31:12 -06:00
JacobBarthelmeh
144ffdc713
Merge pull request #7400 from philljj/test_xmss_pubraw
...
Add wc_XmssKey_ExportPubRaw to wolfcrypt test.
2024-04-09 09:14:23 -06:00
jordan
4a069ee5c1
Small cleanup for review.
2024-04-08 21:41:33 -05:00
Daly Brown
707e60aa79
Address gnatprove issues in tls client
2024-04-08 19:40:06 -04:00
Sean Parkinson
d96e5ec589
No match cipher suite alert type change
...
TLS 1.0/1.1/1.2 specifications require the of a return a handshake
failure alert when no cipher suites match.
TLS 1.3 specification requires the return of a "handshake_failure" or
"insufficient_security" fatal alert.
Change alert sent from "illegal_parameter" to "handshake_failure".
2024-04-08 11:25:50 +10:00
Fernando Oleo Blanco
8d49dce2cb
[Ada] Fix crate name in Alire
2024-04-06 01:12:02 +02:00
Fernando Oleo Blanco
afc1e96899
[Ada] Add initial Alire support, alpha version
2024-04-05 23:29:45 +02:00
Fernando Oleo Blanco
77cd3b837b
[Ada] Explicitly add netdb.h support
2024-04-05 23:27:24 +02:00
Fernando Oleo Blanco
4a5373f21b
Add Ada/Alire files to gitignore
2024-04-05 23:23:26 +02:00
Fernando Oleo Blanco
32d0abb407
Merge branch 'wolfSSL:master' into master
2024-04-05 22:11:28 +02:00
Daniel Pouzzner
d1efccd259
Merge pull request #7381 from dgarske/netdb_ioctl
...
Restore `HAVE_NETDB_H` and `HAVE_SYS_IOCTL_H` checks in the wolfio.c.
2024-04-05 16:02:21 -04:00
Daniel Pouzzner
a518f493b5
Merge pull request #7388 from JacobBarthelmeh/x509_cases
...
check for critical policy extension when not supported
2024-04-05 15:59:03 -04:00
Daniel Pouzzner
7d66cc46ff
Merge pull request #7375 from mrdeep1/fix_rpk
...
RPK: Define Certificates correctly for (D)TLS1.2
2024-04-05 15:48:25 -04:00
Daniel Pouzzner
2ba12a89df
Merge pull request #7386 from anhu/reseed_public
...
Make wc_RNG_DRBG_Reseed() a wolfCrypt API.
2024-04-05 14:27:26 -04:00
Anthony Hu
cf2f58bfdf
Merge pull request #7395 from douzzer/20240403-RPK-cleanups
...
20240403-RPK-cleanups
2024-04-05 13:43:15 -04:00
Anthony Hu
3908bc34ed
Merge pull request #7399 from douzzer/20240405-tls-endian-fixes
...
20240405-tls-endian-fixes
2024-04-05 13:40:07 -04:00
jordan
d0802335a8
Add wc_XmssKey_ExportPubRaw to wolfcrypt test.
2024-04-05 12:09:04 -05:00
Daly Brown
97e731f27b
Address gnatprove warnings and errors
2024-04-05 12:09:11 -04:00
Daniel Pouzzner
cdf2504612
fixes for non-portable (endian-sensitive) code patterns around word16 in TLS layer.
2024-04-05 10:42:05 -05:00
Kaleb Himes
9d56484d33
Merge pull request #7398 from douzzer/20240404-fips-VERSION3
...
20240404-fips-VERSION3
2024-04-05 07:53:32 -06:00
gojimmypi
5cab707d8e
Update Espressif Examples and Libraries
2024-04-04 20:40:52 -07:00
Daniel Pouzzner
9542843874
wolfssl/wolfcrypt/settings.h: streamline definitions of WOLFSSL_FIPS_VERSION_CODE for the !HAVE_FIPS and !HAVE_FIPS_VERSION cases; add WOLFSSL_FIPS_VERSION2_CODE and fix the incumbent FIPS_VERSION_{LT,LE,EQ,GE,GT} definitions to use it.
2024-04-04 22:27:51 -05:00
kaleb-himes
ae2a92e449
add "VERSION3" variants of macros for testing and computing FIPS versions.
2024-04-04 17:39:07 -05:00
Daly Brown
42f7be20c8
Fix assertion that address length must be greater than zero
2024-04-04 16:19:44 -04:00
Daly Brown
63547d954a
Fix formatting issues and remove unused variable
2024-04-04 16:06:19 -04:00
Daly Brown
be72849d48
Expose DTLS in Ada wrapper and update examples
2024-04-04 15:52:14 -04:00
Hideki Miyazaki
6c029badcc
fix rx72n compile
2024-04-04 15:40:15 +09:00
Daniel Pouzzner
747755b3c4
fixes for analyzer carps around HAVE_RPK:
...
fix clang-analyzer-deadcode.DeadStores in src/tls.c TLSX_ClientCertificateType_GetSize();
fix clang-analyzer-deadcode.DeadStores in tests/api.c test_tls13_rpk_handshake();
fix null pointer to XMEMCPY() in src/internal.c CopyDecodedName().
2024-04-04 00:15:01 -05:00
jordan
0c22f1f048
wc_xmss_impl requires misc.c functions.
2024-04-03 14:52:05 -05:00
JacobBarthelmeh
8b587b563c
Merge pull request #7286 from Frauschi/hybrid_signatures
...
Improvements to dual algorithm certificates
2024-04-03 13:37:16 -06:00
Daniel Pouzzner
8511b2dc6b
ProcessBuffer(): in WOLFSSL_DUAL_ALG_CERTS code path, fall through without disrupting ret, if cert->sapkiOID and cert->sapkiLen are unset.
2024-04-03 13:54:57 -05:00
jordan
79abae8c3d
Only require WOLFSSL_W64_WRAPPER if WOLFSSL_XMSS_MAX_HEIGHT greater than 32.
2024-04-03 12:16:03 -05:00
David Garske
57603823e3
Merge pull request #7387 from JacobBarthelmeh/sm2
...
fix for oss-fuzz sm2 test build
2024-04-03 10:08:46 -07:00
JacobBarthelmeh
f6a24efe23
Merge pull request #7389 from dgarske/nxp_mmcau_sha256
...
Fix the NXP MMCAU HW acceleration for SHA2-256
2024-04-03 10:39:04 -06:00
Anthony Hu
9bfab33726
Address comments from Jacob.
2024-04-03 09:04:28 -04:00
David Garske
d7c6d7af44
Fix the NXP MMCAU HW acceleration for SHA2-256. Broken with LMS SHA2 refactor.
2024-04-02 19:32:41 -07:00
JacobBarthelmeh
c768f76d5a
Merge pull request #7315 from fabiankeil/disable-3des-ciphers
...
Allow to enable DES3 support without the DES3 ciphers
2024-04-02 17:48:01 -06:00
JacobBarthelmeh
75da69911c
Merge pull request #7369 from dgarske/infineon_modustoolbox
...
Support for Infineon Modus Toolbox with wolfSSL
2024-04-02 17:34:07 -06:00
JacobBarthelmeh
983616afa0
check for critical policy extension when not supported
2024-04-02 16:46:47 -06:00
JacobBarthelmeh
04ebc966d0
Merge pull request #7385 from philljj/spelling_cleanup
...
Used codespell and fixed obvious typos.
2024-04-02 14:35:51 -06:00
JacobBarthelmeh
d4f5825fd2
fix for sp build with ecc_map_ex
2024-04-02 11:40:53 -06:00
JacobBarthelmeh
ed4f052215
Merge pull request #7382 from bandi13/reEnableTest
...
Revert "Disable broken library"
2024-04-02 10:51:50 -06:00
JacobBarthelmeh
b334750bf2
Merge pull request #7383 from embhorn/zd17763
...
Fix build error with RECORD_SIZE defined
2024-04-02 10:51:11 -06:00
Anthony Hu
598a3bfdcd
Make wc_RNG_DRBG_Reseed() a wolfCrypt API.
2024-04-02 12:33:35 -04:00
jordan
b65e42bf4d
Used codespell and fixed obvious typos.
2024-04-02 10:19:39 -05:00
Eric Blankenhorn
e072677379
Fix build error with RECORD_SIZE defined
2024-04-02 10:02:35 -05:00
Fabian Keil
790129ee71
cmake: Add WOLFSSL_DES3_TLS_SUITES option
2024-04-02 16:27:11 +02:00
Daniel Pouzzner
092dba4593
wolfcrypt/src/asn.c: fix for benign identicalInnerCondition in ParseCertRelative().
2024-04-01 23:50:05 -05:00
Anthony Hu
10d210ce26
Parenthesis
2024-04-01 19:05:59 -04:00
Anthony Hu
2d532dd6b8
Clean up after another round of analyzer execution.
2024-04-01 18:56:44 -04:00
Andras Fekete
6524fbb43f
Revert "Disable broken library"
...
This reverts commit ce52a68c3d .
2024-04-01 18:11:42 -04:00
Anthony Hu
3a3a7c2a67
Forgot to clean up the preTBS.
2024-04-01 17:37:04 -04:00
Anthony Hu
6a4d4bf6f1
cks_order is used later; don't let it fall out of scope.
2024-04-01 17:37:03 -04:00
Anthony Hu
8f599defe0
Add check inspired by original implementation of asn.
2024-04-01 17:37:03 -04:00
Daniel Pouzzner
2f3495f286
src/tls13.c: remove unreachable break in DoTls13CertificateVerify().
...
tests/api.c: fix various use-after-frees of file in do_dual_alg_root_certgen() and do_dual_alg_server_certgen().
2024-04-01 17:37:03 -04:00
Anthony Hu
e4b7857e43
If WOLFSSL_TRUST_PEER_CERT is defined, the negative test is no longer negative.
2024-04-01 17:37:03 -04:00
Tobias Frauenschläger
136eaae4f1
Improvements to dual alg certificates
...
* Support for external keys (CryptoCb interface)
* Support for usage in mutual authentication
* better entity cert parsing
* Fix for Zephyr port to support the feature
* Check key support
* Proper validation of signatures in certificate chains
* Proper validation of peer cert with local issuer signature
(alt pub key is cached now)
* Support for ECC & RSA as alt keys with PQC as primary
* Support for PQC certificate generation
* Better support for hybrid signatures with variable length signatures
* Support for primary and alternative private keys in a single
file/buffer
* More API support for alternative private keys
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-04-01 17:37:03 -04:00
David Garske
da6a11d1d1
Restore HAVE_NETDB_H and HAVE_SYS_IOCTL_H checks in the wolfio.c.
2024-04-01 09:49:22 -07:00
oltolm
78b8ea3646
make "yes;no" cmake options boolean instead of string
2024-04-01 16:20:11 +02:00
Daniel Pouzzner
d930825a92
Merge pull request #7362 from jpbland1/rsa-make-key-no-malloc
...
fix wc_MakeRsaKey and wc_RsaKeyToDer to work with WOLFSSL_NO_MALLOC
2024-03-30 03:19:27 -04:00
John Bland
d8e9e90f9d
refactor rawLen to avoid unused warning
2024-03-30 02:12:32 -04:00
Daniel Pouzzner
03d7eac9c4
Merge pull request #7337 from gojimmypi/PR-test-certbuf-256
...
wolfcrypt tests: improve file system gating for USE_CERT_BUFFERS
2024-03-30 00:43:20 -04:00
David Garske
5c486cb7a6
Merge pull request #7371 from douzzer/20240327-tls-int-overflows
...
20240327-tls-int-overflows
2024-03-29 11:37:08 -07:00
Jon Shallow
a0f3933881
Support (D)TLS1.3 downgrade when using PSK
...
DTLS Server:
examples/server/server -v3 -u -s
DTLS Client:
examples/client/client -vd -g -u -s
TLS Server:
examples/server/server -v3 -s
TLS Client:
examples/client/client -vd -g -s
Support checking for DTLS1.2 Hello Verify Request when using PSK.
Unset options.tls1_3 when handling a DTLS1.2 Hello Verify Request.
Unset options.tls1_3 when handling a (D)TLS1.2 Server Hello to stop
checking of Encrypted Client Hello
Requires ./configure --enable-all --enable-dtls13
Add in tests for DTLS1.3 and TLS1.3 downgrade when using PSK.
2024-03-29 18:04:30 +00:00
Daniel Pouzzner
038be95a4a
wolfssl/wolfcrypt/types.h: add WC_SAFE_SUM_WORD32().
...
src/internal.c: mitigations for potential integer overflows in figuring allocation sizes.
2024-03-29 11:45:11 -05:00
Daniel Pouzzner
3f3dd4743a
Merge pull request #7365 from rizlik/ecc_cmp_param_cleanup
...
wc_ecc_cmp_param cleanup
2024-03-29 01:48:46 -04:00
Daniel Pouzzner
1caed2139b
Merge pull request #7374 from gojimmypi/PR-Kyber-Init
...
Initialize some Kyber client variables
2024-03-29 01:44:56 -04:00
Daniel Pouzzner
7e8c0156fe
Merge pull request #7325 from dgarske/zephyr
...
Improve Zephyr support
2024-03-29 00:57:55 -04:00
András Fekete
5b3772c5d2
Merge pull request #7377 from douzzer/20240328-multi-test-fixes
...
20240328-multi-test-fixes
2024-03-28 16:58:30 -04:00
David Garske
83dc3dfac1
Add support for the Infineon/Cypress HAL TRNG.
2024-03-28 13:57:26 -07:00
Daniel Pouzzner
58462840c1
src/ssl.c: add missing cast in wolfSSL_GetSessionFromCache().
2024-03-28 15:14:19 -05:00
Jon Shallow
f2e6f49721
RPK: Define Certificates correctly for (D)TLS1.2
...
As per https://datatracker.ietf.org/doc/html/rfc7250#section-3 Figure 1,
the RPK is a single ASN.1_subjectPublicKeyInfo, whereas X509 certificates
etc. are transmitted as a certificate list (even if there is only 1).
This is for (D)TLS1.2 transfers, and this PR fixes this.
As per https://datatracker.ietf.org/doc/html/rfc8446#section-4.4.2 all
certificates (both RPK and Z509) are transferred using a certificate list.
Update examples client to support RPK certificates.
For testing:-
Server:
$ gnutls-serv --http --x509fmtder --priority NORMAL:+CTYPE-CLI-RAWPK:+CTYPE-SRV-RAWPK --rawpkfile certs/server-keyPub.der --rawpkkeyfile certs/server-key.der
Client:
$ examples/client/client -g -p 5556 -c certs/client-keyPub.der -k certs/client-key.der --rpk --files-are-der
2024-03-28 17:58:02 +00:00
John Bland
7c0423eb65
reduce der buffer size
2024-03-28 12:56:26 -04:00
Daniel Pouzzner
7a283edd68
Merge pull request #7373 from bandi13/FixMultiTestWarning
...
Fix sanitizer complaint in multi-test script
2024-03-28 12:35:45 -04:00
gojimmypi
5bffbdb20c
Initialize some Kyber client variables
2024-03-28 09:14:53 -07:00
Andras Fekete
4cb176ffff
Fix sanitizer complaint
2024-03-28 11:44:12 -04:00
John Bland
6cc32e90b0
trim down buffer size
2024-03-28 03:01:46 -04:00
John Bland
254eb23443
add missing make call
2024-03-28 02:56:08 -04:00
John Bland
04db5baaa1
test wolfcrypt only
2024-03-28 02:56:08 -04:00
John Bland
6272465c44
use only one matrix index
2024-03-28 02:56:08 -04:00
John Bland
f63501f035
fix bad CFLAGS
2024-03-28 02:56:08 -04:00
John Bland
30189e5766
add autogen.sh to workflow
2024-03-28 02:56:08 -04:00
John Bland
71e52487bf
add no malloc to main workflows file
2024-03-28 02:55:31 -04:00
John Bland
76ac4fa7e3
add github workflow to test no malloc
2024-03-28 02:54:49 -04:00
John Bland
9cd614fcac
update rsa test to support no malloc
2024-03-28 02:54:49 -04:00
John Bland
4f51183b45
fix bad indenting
2024-03-28 02:54:49 -04:00
John Bland
305f87561d
break out of loop on failure instead of return
2024-03-28 02:54:49 -04:00
John Bland
fb784a2ac9
more changes from PR comments
2024-03-28 02:54:49 -04:00
John Bland
0bd8775eae
update based on PR comments
2024-03-28 02:54:49 -04:00
John Bland
d9d3f9a4f4
fix wc_MakeRsaKey and wc_RsaKeyToDer to work with
...
WOLFSSL_NO_MALLOC
2024-03-28 02:54:49 -04:00
Daniel Pouzzner
716870cbc2
Merge pull request #7370 from anhu/quickie
...
sizeof(oriType) ---> sizeof(asnDataOid)
2024-03-28 01:58:01 -04:00
Daniel Pouzzner
42a0cb23ac
Merge pull request #7364 from gojimmypi/PR-Kyber-Init
...
Initialize some Kyber variables
2024-03-28 00:13:43 -04:00
Daniel Pouzzner
2f17b756b2
Merge pull request #7360 from rizlik/curl-ticket-nonce-malloc
...
configure.ac: enable ticket_nonce_malloc when using enable-curl
2024-03-27 23:58:21 -04:00
Daniel Pouzzner
98c912c3a0
Merge pull request #7359 from SparkiDev/asn1_test_bad_certs
...
ASN.1 testing: add tests of bad DER encodings
2024-03-27 23:55:57 -04:00
Daniel Pouzzner
0f6670a437
Merge pull request #7357 from kareem-wolfssl/gh7349
...
Fix potential division by zero in example server.
2024-03-27 23:52:55 -04:00
Daniel Pouzzner
ad74fb79ac
Merge pull request #7354 from JacobBarthelmeh/ocsp-test
...
add ocsp test
2024-03-27 23:50:49 -04:00
Daniel Pouzzner
e8e3e9db43
Merge pull request #7285 from anhu/noMagic274
...
Get rid of magic number to size structs.
2024-03-27 23:43:28 -04:00
Daniel Pouzzner
f9b26d8c06
Merge pull request #7358 from bandi13/buildNewYoctoContainer
...
Build new yocto container
2024-03-27 23:41:46 -04:00
Daniel Pouzzner
708fd6003f
Merge pull request #7320 from bandi13/addExtraToolsToDocker
...
More application dependencies
2024-03-27 23:39:41 -04:00
David Garske
2d7f9d1874
Support for Infineon Modus Toolbox with wolfSSL.
2024-03-27 15:37:50 -07:00
Anthony Hu
28a88d1c7c
sizeof(oriType) ---> sizeof(asnDataOid)
2024-03-27 17:05:25 -04:00
Marco Oliverio
0a03940f5a
wolfcrypt: wc_ecc_cmp_param: check string len before strncmp
...
also return -1 on param mismatch.
2024-03-26 14:59:41 +01:00
gojimmypi
01ae240fe8
Initialize some Kyber variables
2024-03-25 14:08:47 -07:00
Andras Fekete
22766578fc
Add in powerpc cross compilation tools
2024-03-25 15:39:59 -04:00
gojimmypi
bf9775831f
Improve wolfcrypt test NO_FILESYSTEM checks
2024-03-22 13:00:25 -07:00
Marco Oliverio
91ab6cafe0
configure.ac: enable ticket_nonce_malloc when using enable-curl
...
To support new session ticket nonce longer than MAX_TICKET_NONCE_STATIC_SZ. If
`--disable-ticket-nonce-malloc` is explicitly specified, the feature is not
enabled even if `--enable-curl` is specified.
2024-03-22 11:46:22 +01:00
Sean Parkinson
d4b1995a2c
ASN.1 testing: add tests of bad DER encodings
...
Certificates with bad DER encoded ASN.1 added to testing.
Fix comment in asn.c.
2024-03-22 08:51:17 +10:00
Andras Fekete
0abb381497
Use official repo to build
2024-03-21 16:31:48 -04:00
Kareem
d867405ffb
Fix floating point comparison.
2024-03-20 16:03:43 -07:00
Kareem
4d4f4e3f30
Fix potential division by zero in example server.
2024-03-20 15:48:46 -07:00
David Garske
8970ff4c34
Merge pull request #7355 from JacobBarthelmeh/release
...
prepare for release 5.7.0
2024-03-20 14:39:57 -07:00
JacobBarthelmeh
85601311a2
rework library versioning
2024-03-21 04:02:28 +07:00
David Garske
b8bebd6196
Fixes for ARM/Intel ASM support.
2024-03-20 13:14:05 -07:00
JacobBarthelmeh
e20ddc35b0
update version for CMake
2024-03-21 03:05:34 +07:00
JacobBarthelmeh
e80deece82
adjust ChangeLog text
2024-03-21 00:18:44 +07:00
JacobBarthelmeh
e5914effab
prepare for release 5.7.0
2024-03-20 19:32:22 +07:00
JacobBarthelmeh
5884f75cbe
add ocsp test
2024-03-20 03:01:43 +07:00
JacobBarthelmeh
3129e29a19
Merge pull request #7353 from ejohnstown/ocsp-ext
...
OCSP Extension Encoding Fix
2024-03-20 03:00:27 +07:00
John Safranek
6462986bf2
OCSP Extension Encoding Fix
...
1. Removed redundant check for the output being NULL in
`EncodeOcspRequestExtensions()`. The chuck of code being protected
only cared about the value of ret, not the pointer. The code was
supposed to calculate the size of the data without writing it.
2024-03-19 09:13:28 -07:00
Andras Fekete
5e45bb4d25
Using PR version
2024-03-19 11:53:03 -04:00
David Garske
face8b6e43
Experimental support for Intel and ARM ASM with Zephyr. Related to issue #7116 .
2024-03-18 13:40:10 -07:00
Andras Fekete
9bddddb952
First test build on 2024-03-06
2024-03-18 16:32:24 -04:00
JacobBarthelmeh
489a79ad8b
CID 347893 set test cert manager to null after free
2024-03-19 02:59:06 +07:00
JacobBarthelmeh
228544c31e
CID 327280 use after free in test case
2024-03-19 02:44:45 +07:00
JacobBarthelmeh
1926e045f3
Merge pull request #7351 from douzzer/20240318-linuxkm-lkcapi-register-yes
...
20240318-linuxkm-lkcapi-register-yes
2024-03-19 02:33:12 +07:00
David Garske
790e39ec03
Merge pull request #7350 from JacobBarthelmeh/scan_build_fix
...
scan-build fixes for pkcs7
2024-03-18 12:31:00 -07:00
Daniel Pouzzner
a14edf3614
configure.ac: for --enable-linuxkm-lkcapi-register, remap "yes" to "all"; in output config summary, add ENABLED_LINUXKM_LKCAPI_REGISTER, and move ENABLED_EXPERIMENTAL and ENABLED_LINUXKM_BENCHMARKS to the "Features" section.
2024-03-18 13:52:06 -05:00
JacobBarthelmeh
d51bef3d43
fix for memory leak on error
2024-03-19 00:58:32 +07:00
JacobBarthelmeh
b9619c3f0b
Merge pull request #7343 from douzzer/20240315-pq-experimental
...
20240315-pq-experimental
2024-03-19 00:54:56 +07:00
David Garske
50b1044c2f
Merge pull request #7347 from JacobBarthelmeh/coverity2
...
Coverity Fixes QUIC
2024-03-18 09:04:09 -07:00
JacobBarthelmeh
4751af9b89
scan-build fixes for pkcs7
2024-03-18 22:55:51 +07:00
Andras Fekete
42091b8970
Normally these tests take 3 minutes, but sometimes they take much longer
2024-03-18 11:22:03 -04:00
Andras Fekete
74d7696e69
More application dependencies
2024-03-18 11:21:24 -04:00
David Garske
ffb43d0150
Merge pull request #7348 from JacobBarthelmeh/coverity3
...
Coverity fixes
2024-03-18 08:20:31 -07:00
David Garske
69bc5c1c19
Merge pull request #7345 from JacobBarthelmeh/coverity
...
Coverity fixes
2024-03-18 08:15:59 -07:00
David Garske
03e306a98f
Add include for project for cases when a custom user_settings.h file is used. Tested support with PSA.
2024-03-18 08:14:40 -07:00
David Garske
85c22abe4e
Fix for Zephyr TimeNowInMilliseconds. Resolves issue with TLS v1.3 server and session tickets time (uptime in sim < 1000 ms was being made 0).
2024-03-18 08:14:40 -07:00
David Garske
737fa53636
Improve Zephyr support. Cleanup user_settings.h mess. Add FIPS support.
2024-03-18 08:14:40 -07:00
JacobBarthelmeh
dd6db025e3
add parenthesis around define value
2024-03-18 21:13:42 +07:00
JacobBarthelmeh
36e67af0f8
Merge pull request #7331 from SparkiDev/asn1_templ_issuer_cn
...
ASN.1 template: store issuer common name
2024-03-18 20:27:04 +07:00
JacobBarthelmeh
d6b4b27cd1
CID 299893 out of bounds read with XMEMCMP
2024-03-18 16:42:15 +07:00
JacobBarthelmeh
44f3e4a3b7
CID 337219 allocation using untrusted size
2024-03-18 16:04:37 +07:00
JacobBarthelmeh
635d326812
CID 337232 sanity check on tainted scalar
2024-03-18 15:03:04 +07:00
JacobBarthelmeh
be233fc805
Merge pull request #7346 from SparkiDev/regression_fixes_11
...
Regression test fixes
2024-03-18 14:29:44 +07:00
Sean Parkinson
638d0b1a9f
Regression test fixes
...
pkcs7.c: pkcs7->stream must be restored or there will be a leak.
test.c: when compiled for compression, compiler warning about const
2024-03-18 09:57:22 +10:00
Sean Parkinson
84c42f4a4e
ASN.1 template: store issuer common name
...
Under certain configurations the certificate issuer's common name is
kept in a DecodedCert. Wasn't implemented in ASN.1 template code.
2024-03-18 07:06:32 +10:00
JacobBarthelmeh
763c4a074c
CID 315823 truncate on cast
2024-03-17 23:54:56 +07:00
JacobBarthelmeh
d71776aced
coverity CID 352930, fix for out of bounds write
2024-03-17 23:31:37 +07:00
David Garske
abd7449f27
Merge pull request #7340 from JacobBarthelmeh/github_tests
...
workaround for Ubuntu runner, high entropy + ASLR
2024-03-17 08:56:50 -07:00
JacobBarthelmeh
5106cb16e2
workaround for llvm version and ASLR issue
2024-03-17 22:22:16 +07:00
David Garske
99dd8a333d
Merge pull request #7342 from JacobBarthelmeh/testing1
...
revert null check in wc_Sha256Update
2024-03-15 14:24:45 -07:00
Daniel Pouzzner
924887b468
configure.ac and wolfssl/wolfcrypt/settings.h: implement --enable-experimental and add a WOLFSSL_EXPERIMENTAL_SETTINGS gate, and refactor "EXPERIMENTAL" features (all pq) to note and enforce requirement for --enable-experimental and WOLFSSL_EXPERIMENTAL_SETTINGS.
2024-03-15 16:15:26 -05:00
Daniel Pouzzner
3728cd3dc5
Kyber fixes:
...
wolfssl/wolfcrypt/wc_kyber.h: in definition of struct KyberKey, use correct type for devId;
wolfcrypt/src/wc_kyber_poly.c: numerous fixes for bugprone-macro-parentheses and readability-inconsistent-declaration-parameter-name;
tests/api.c: in test_tls13_apis(), add missing defined(HAVE_LIBOQS) gate on inclusion of ":P256_KYBER_LEVEL1" in groupList.
2024-03-15 16:06:32 -05:00
JacobBarthelmeh
5a5648a6ac
Merge pull request #7341 from dgarske/psk_openssl
...
Fix for PSK callback with OPENSSL_EXTRA to correctly handle the 0 length
2024-03-16 02:22:24 +07:00
JacobBarthelmeh
ab8f5f71a0
revert null check in wc_Sha256Update
2024-03-16 02:03:07 +07:00
JacobBarthelmeh
2f43cc1c7b
Merge pull request #7332 from SparkiDev/asn_templ_neg_int_check
...
ASN.1 parsing: check for badly encode negative INTEGER
2024-03-15 22:40:55 +07:00
David Garske
8d1714a307
Fix for PSK callback with OPENSSL_EXTRA to correctly handle the 0 length case. Thank you @miyazakh. Broken in #7302
2024-03-15 08:09:59 -07:00
JacobBarthelmeh
81c5cf794c
Merge pull request #7339 from SparkiDev/regression_fixes_10
...
Regression testing fixes
2024-03-15 19:29:26 +07:00
Sean Parkinson
d1b16f2c7b
Regression testing fixes
...
api.c: z and ret no longer only when !NO_ASN_TIME.
benchmark.c: rsaKey array type has changed and unusual code path needsed
updating.
cmac.c: Zeroization test failed when checkSz was zero as called function
didn't zero out cmac. checkSz is invalid.
test.c: rsaCaCertDerFile used even when NO_ASN_TIME.
test.h: --enable-sp-math only supports DH of 2048 bits and above. Change
default DH parameters to be 2048 bits.
2024-03-15 13:24:40 +10:00
Sean Parkinson
8684caa304
Merge pull request #7336 from douzzer/20240314-fix-armasm-sha256
...
20240314 -- fix -Wconversions in asn.c
2024-03-15 10:37:14 +10:00
Daniel Pouzzner
e3fc43c3d6
Merge pull request #7338 from SparkiDev/sha256_armv8_transform
...
SHA256 ARMv8: fix wc_Sha256Transform
2024-03-14 19:48:38 -04:00
Daniel Pouzzner
25efe6b66a
wolfcrypt/src/asn.c: fix -Wconversions in GetASN_BitString(), GetASN_UTF8String(), and GetASN_ObjectId().
2024-03-14 18:42:50 -05:00
Sean Parkinson
a0befd396f
SHA256 ARMv8: fix wc_Sha256Transform
...
wc_Sha256Transform() was passing in data to underlying transform
function even though byte reversed data was in sha256->buffer.
2024-03-15 09:27:15 +10:00
David Garske
b7b6752e2e
Merge pull request #7333 from gojimmypi/PR-tfm-mp_sqr
...
Enable TFM mp_sqr even when HAVE_ECC disabled
2024-03-14 12:45:09 -07:00
David Garske
36eec68571
Cleanup DES3 TLS descriptions and macro names.
2024-03-14 10:34:38 -07:00
David Garske
5dff8aa417
Merge pull request #7334 from SparkiDev/macosx_clang_15_asm_fix
...
MacOS X Intel ASM clang 15: fix asm to compile without warning
2024-03-14 10:10:42 -07:00
David Garske
8fd8548142
Merge pull request #7318 from SparkiDev/kyber_1
...
Kyber: Implementation in wolfSSL
2024-03-14 09:57:52 -07:00
JacobBarthelmeh
88370d8c3e
Merge pull request #7277 from embhorn/readme_folders
...
Add directory layout to readme.
2024-03-14 19:09:12 +07:00
Daniel Pouzzner
3fd6af0cd2
Merge pull request #7283 from SparkiDev/lms
...
LMS: initial implementation
2024-03-14 01:48:57 -04:00
Sean Parkinson
3ba5dd3e6d
MacOS X Intel ASM clang 15: fix asm to compile without warning
...
Don't use align when __APPLE__ is defined.
Make minimum alignment on variables in ASM 8 bytes (.p2align 3).
Fix x86 builds with ASM.
2024-03-14 11:42:12 +10:00
gojimmypi
bebfb120d7
Enable TFM mp_sqr even when HAVE_ECC disabled
2024-03-13 16:36:30 -07:00
Sean Parkinson
25b2c664f4
Kyber: Implementation in wolfSSL
...
Put Kyber implementation into wolfSSL.
2024-03-14 09:14:50 +10:00
Sean Parkinson
40681226aa
ASN.1 parsing: check for badly encode negative INTEGER
...
When encoding a negative number, when the first byte is 0xff then the
next byte can't have top bit set.
2024-03-14 09:01:22 +10:00
David Garske
448378ce90
Merge pull request #7306 from SparkiDev/asn1_validate_fix_1
...
ASN.1 template: validate UTF8STRING and OBJECT IDENTIFER data
2024-03-13 15:23:02 -07:00
David Garske
924c0fd911
Merge pull request #7329 from gojimmypi/PR-Arduino-Build
...
Ignore build file warnings for Arduino; Update examples
2024-03-13 14:59:07 -07:00
David Garske
6f65d6749a
Merge pull request #7321 from JacobBarthelmeh/vcpkg
...
fix for warning of no stdint.h include with uintptr_t
2024-03-13 14:43:47 -07:00
David Garske
c8bc74b232
Merge pull request #7324 from JacobBarthelmeh/sm2_bench
...
Sm2 benchmark build fix
2024-03-13 14:43:30 -07:00
gojimmypi
9057e8120d
Ignore build file warnings for Arduino, update examples
2024-03-13 12:24:00 -07:00
JacobBarthelmeh
9f240bb34c
fix for warning of no stdint.h include with uintptr_t
2024-03-14 00:38:02 +07:00
JacobBarthelmeh
ff14aa20a6
fix for benchmark build with sm4-gcm
2024-03-14 00:05:43 +07:00
JacobBarthelmeh
5c3b929d90
fix for benchmark build with sm2
2024-03-14 00:05:43 +07:00
JacobBarthelmeh
1e054b9613
Merge pull request #7302 from dgarske/pk_psk
...
Support for Public Key (PK) callbacks with PSK
2024-03-14 00:02:23 +07:00
David Garske
d2fd937075
Merge pull request #7328 from bandi13/disableLibSSH2Test
...
Disable broken library
2024-03-12 15:26:44 -07:00
Andras Fekete
ce52a68c3d
Disable broken library
...
The tests on the libssh2 repo are also failing for the same reason
2024-03-12 17:04:20 -04:00
Sean Parkinson
084338dde7
ASN Template: GetASN_UTF8String optional
...
Allow UTF8String checking to be disabled with WOLFSSL_NO_ASN_STRICT.
2024-03-12 09:59:51 +10:00
David Garske
5dba7d3975
Merge pull request #7280 from Frauschi/pqc_kyber_fix
...
Fix for PQC enabled handshake
2024-03-11 09:26:13 -07:00
David Garske
bd20640e58
Merge pull request #7312 from philljj/zd17621
...
Handle failed alloc in TLSX_Write.
2024-03-09 15:20:50 -08:00
Fabian Keil
5d418d67b0
Allow to enable DES3 support without the DES3 ciphers
...
DES3 support is required to use PBES2-3DES-CBC-encoded keys
but also enabling the DES3 ciphers may be undesirable.
When using Privoxy it results in a "Bad" rating at sites like
https://www.howsmyssl.com/ due to the Sweet32 attack.
2024-03-09 12:22:44 +01:00
jordan
0e15a2e83a
Handle failed alloc in TLSX_Write.
2024-03-08 22:56:27 -06:00
David Garske
0c40fb5c5f
Merge pull request #7299 from SparkiDev/siphash_asm_fix_2
...
Siphash: x64 asm fix
2024-03-08 13:15:44 -08:00
David Garske
9fadcb2edc
Merge pull request #7307 from bandi13/fixNightlyCrossworks
...
Fix nightly crossworks
2024-03-08 13:12:53 -08:00
David Garske
8298019a85
Merge pull request #7308 from bandi13/fixNightlySGX
...
Missing functions
2024-03-08 13:12:30 -08:00
David Garske
83cddc76ce
Merge pull request #7309 from bandi13/fixNightlyG++
...
Missing cast to avoid warning
2024-03-08 13:12:09 -08:00
David Garske
b5633f9cea
Merge pull request #7310 from gojimmypi/PR-Revert-Breadcrumbs
...
Revert some debug breadcrumbs in #7304
2024-03-08 13:06:41 -08:00
David Garske
11303ab796
Support for Public Key (PK) callbacks with PSK in TLS v1.2 and TLS v1.3 (client and server). ZD 17383
2024-03-08 12:21:06 -08:00
gojimmypi
56f3c93272
Revert per https://github.com/wolfSSL/wolfssl/pull/7304#pullrequestreview-1925571495
2024-03-08 12:05:54 -08:00
Andras Fekete
082397adda
Missing cast to avoid warning
2024-03-08 14:46:17 -05:00
Andras Fekete
b17db818ce
Missing functions
...
Compilation fails with "undefined reference to `sp_cmp'" etc.
2024-03-08 14:04:35 -05:00
Andras Fekete
98f8329bf2
Add indentation for legibility
2024-03-08 11:49:38 -05:00
Andras Fekete
8fcb007301
Missing gating for netdb.h includes
2024-03-08 11:46:49 -05:00
Sean Parkinson
5daf5fff86
Merge pull request #7272 from JacobBarthelmeh/pkcs7-enc
...
IO callbacks for content and output with PKCS7 bundle sign/encrypt
2024-03-08 07:18:11 +10:00
Sean Parkinson
28e8228744
Merge pull request #7304 from gojimmypi/PR-Arduino-Logging
...
Update Arduino examples: 32KB TLS Client/Server; Add wolfcrypt breadcrumbs.
2024-03-08 07:12:01 +10:00
JacobBarthelmeh
c24b187a88
fixes for clang-tidy warnings
2024-03-08 01:54:37 +07:00
JacobBarthelmeh
a07d92d3d3
refactoring and fixes for new PKCS7 stream code
2024-03-07 21:30:42 +07:00
Sean Parkinson
c568e3c092
Merge pull request #7067 from gojimmypi/PR-Espressif-Monitor-Keyword
...
Introduce WOLFSSL_ESPIDF_EXIT_MESSAGE macro
2024-03-07 21:57:19 +10:00
Sean Parkinson
77a77a9a9d
Merge pull request #7296 from JacobBarthelmeh/autosar
...
initial AutoSAR shim layer
2024-03-07 21:55:50 +10:00
gojimmypi
38d5eec445
Introduce WOLFSSL_ESPIDF_EXIT_MESSAGE macro (+code review edits)
2024-03-07 00:44:11 -08:00
Sean Parkinson
faea635ee2
ASN.1 template: validate UTF8STRING and OBJECT IDENTIFER data
...
Check the data of UTF8STRING and OBJECT IDENTIFIER to ensure it is
properly encoded.
2024-03-07 18:01:16 +10:00
Sean Parkinson
6c8df33191
LMS: initial implementation
...
Initial wolfSSL implementation of LMS.
Changed LMS benchmarking to time making a key and reloading.
SHA-256:
Added wc_Sha256HashBlock to make hashing a block fast.
Fixed assembly code to be able to hash a block from an external
buffer.
Simplified code were possible.
Moved byte reversal decision logic to one place instead of replicating
length checks.
2024-03-07 11:43:16 +10:00
Sean Parkinson
f011012d8e
Merge pull request #7300 from bandi13/codeSonarFixes
...
Code sonar fixes
2024-03-07 10:17:06 +10:00
Sean Parkinson
b7c36fa603
Merge pull request #7305 from embhorn/zd17629
...
Fix leak in wolfSSL_X509_STORE_CTX_get_chain
2024-03-07 10:16:44 +10:00
gojimmypi
e40eb3c774
Update Arduino examples; add wolfcrypt breadcrumbs.
2024-03-06 15:13:37 -08:00
Eric Blankenhorn
a0a9680325
Fix leak in wolfSSL_X509_STORE_CTX_get_chain
2024-03-06 15:13:38 -06:00
lealem47
39ad67607e
Merge pull request #7240 from gojimmypi/PR-wolfssl_client_ESP8266
...
Update TLS client example for Espressif ESP8266
2024-03-06 13:18:28 -07:00
Fernando Oleo Blanco
79235a4698
[Ada] Initial library support
2024-03-06 20:20:55 +01:00
David Garske
21b82a20d5
Merge pull request #7301 from SparkiDev/thumb2_aes_key_align_fix
...
Thumb2 AES ASM: don't assume alignment on key
2024-03-06 09:47:38 -08:00
JacobBarthelmeh
ea9dfecc79
make rng global and get version from LIBWOLFSSL_VERSION_HEX
2024-03-06 17:52:31 +07:00
Sean Parkinson
5408118582
Merge pull request #7298 from douzzer/20240304-wolfcrypttest-fixes
...
20240304-wolfcrypttest-fixes
2024-03-06 14:51:23 +10:00
Daniel Pouzzner
321a72c906
misc fixes:
...
wolfcrypt/test/test.c: fix gating for verify4 in scrypt_test(), and fix WOLFSSL_SMALL_STACK -Wframe-larger-than=2048 warnings in sha256_test() and sha512_test().
src/ssl.c: fix for true-but-benign nullPointerRedundantCheck in ProcessBufferTryDecodeEd25519().
tests/api.c: fix for -Wmaybe-uninitialized in test_wc_PKCS7_VerifySignedData_RSA() identified via cross-m68k-all-asm.
2024-03-05 17:44:33 -06:00
Sean Parkinson
d057f10d58
Thumb2 AES ASM: don't assume alignment on key
...
Fix AES_set_encrypt_key to not assume a word alignment on key.
2024-03-06 08:50:21 +10:00
Sean Parkinson
86b663d67e
Siphash: x64 asm fix
...
Make gcc-8 compiled code work.
2024-03-05 22:23:20 +10:00
JacobBarthelmeh
11c9035a62
misc fixes and correct name for test file
2024-03-05 18:31:42 +07:00
Sean Parkinson
ee39a8f17f
Merge pull request #7262 from gojimmypi/PR-SHA-Interleave
...
Introduce SHA256/SHA512 interleave testing, HAVE_DSA; revised ERROR_OUT
2024-03-05 10:13:10 +10:00
Sean Parkinson
39002d82b4
Merge pull request #7294 from douzzer/20240301-wolfSSL_Init-identicalInnerCondition
...
20240301-wolfSSL_Init-identicalInnerCondition
2024-03-05 09:01:51 +10:00
Sean Parkinson
61749a0171
Merge pull request #7287 from JacobBarthelmeh/pkcs7_verify_stream
...
PKCS7 checking trailing 0's on indef with verify
2024-03-05 08:20:16 +10:00
Sean Parkinson
30366a9c03
Merge pull request #7293 from douzzer/20240301-linuxkm-leak-and-small-stack-fixes
...
20240301-linuxkm-leak-and-small-stack-fixes
2024-03-05 08:17:51 +10:00
Sean Parkinson
ee3aff1258
Merge pull request #7291 from dgarske/armasm_thumb_gcmsmall
...
Thumb2 AES GCM support for GCM_SMALL
2024-03-05 06:58:47 +10:00
Andras Fekete
717a32808f
Fix missing include
2024-03-04 10:24:32 -05:00
JacobBarthelmeh
089e57371f
remove a hard tab
2024-03-04 08:10:41 -07:00
Jacob Barthelmeh
b42a8b6c5d
initial AutoSAR shim layer
2024-03-04 07:51:00 -07:00
Andras Fekete
d81a08a03b
Catch error return code and remove redundant condition
2024-03-04 09:48:31 -05:00
JacobBarthelmeh
2708062d39
add sanity check for null buffer after malloc in test case
2024-03-04 07:33:21 -07:00
JacobBarthelmeh
f05e47bc09
length of characters and extra sanity check on input
2024-03-04 07:05:07 -07:00
JacobBarthelmeh
66f419bd18
add user ctx to stream IO callbacks
2024-03-04 06:00:07 -07:00
Daniel Pouzzner
88f07773d2
Merge pull request #7224 from mpsuzuki/pkg-config-static-link
...
Add "Libs.private: -m" to wolfssl.pc.in for a static linking
2024-03-01 19:24:05 -05:00
Daniel Pouzzner
7fbb209684
ssl.c: in wolfSSL_Init(), fix cppcheck identicalInnerCondition warning on non-FIPS configurations.
2024-03-01 17:54:55 -06:00
Daniel Pouzzner
efda4b5435
Merge pull request #7290 from lealem47/define_ssleay_version
...
Define SSLEAY_VERSION in wolfssl/openssl/crypto.h
2024-03-01 18:44:24 -05:00
Daniel Pouzzner
a59080a858
Merge pull request #7288 from bandi13/fixNETDB_H
...
Move netdb.h and ioctl.h into wolfio.c
2024-03-01 18:36:18 -05:00
Eric Blankenhorn
cf733c306c
Merge pull request #7284 from douzzer/20240229-mutex-initializer-global-refactor
...
20240229-mutex-initializer-global-refactor
2024-03-01 16:43:10 -06:00
Zackery
4a167e9834
Merge pull request #7292 from bandi13/addMeta-WolfsslToBuild
...
This will force building of dependencies in the container
2024-03-01 15:14:24 -07:00
Daniel Pouzzner
b1edb08119
linuxkm/linuxkm_wc_port.h:
...
* fix WC_LINUXKM_ROUND_UP_P_OF_2() to not round up values that are already powers of 2, nor values larger than 8192.
linuxkm/lkcapi_glue.c:
* fix gating on km_AesSetKeyCommon().
* small stack refactors of Aes objects in self-test routines.
* change kmalloc/free to malloc/free in self-test routines.
* fix error-path "return"s to "goto exit"s in self-test routines.
* fix memory leak around large_input in aes_xts_128_test().
wolfcrypt/benchmark/benchmark.c:
* smallstack refactors in bench_chacha() and bench_chacha20_poly1305_aead().
* add error handling in bench_chacha().
wolfcrypt/src/chacha20_poly1305.c: smallstack refactor for wc_ChaCha20Poly1305_Encrypt() and wc_ChaCha20Poly1305_Decrypt().
2024-03-01 14:55:49 -06:00
Andras Fekete
4270f8cda3
This will force building of dependencies in the container
...
Fewer things to compile in subsequent tests
2024-03-01 15:21:46 -05:00
David Garske
7c836c8371
Thumb2 AES GCM support for GCM_SMALL. ZD 17225
2024-03-01 11:10:21 -08:00
Lealem Amedie
86966f62c7
Define SSLEAY_VERSION in wolfssl/openssl/crypto.h
2024-03-01 11:24:56 -07:00
JacobBarthelmeh
065bfb0172
add new test file to make dist
2024-03-02 00:12:01 +07:00
Andras Fekete
897a8419c1
Move netdb.h and ioctl.h into wolfio.c
2024-03-01 11:59:02 -05:00
JacobBarthelmeh
90b28b5cef
add test case for verify of stream signed PKCS7 bundle
2024-03-01 23:43:46 +07:00
JacobBarthelmeh
05138154a9
check trailing 0's in signeeds check case
2024-03-01 22:57:10 +07:00
JacobBarthelmeh
95eb17944c
Merge pull request #6961 from TakayukiMatsuo/pkcs7
...
Add streaming support for PKCS7_VerifySignedData.
2024-03-01 22:38:07 +07:00
JacobBarthelmeh
fbf1b783da
initialize value to resolve warning
2024-03-01 21:39:27 +07:00
JacobBarthelmeh
c32d9c826c
fix for check on hash with ECDSAk case
2024-03-01 21:14:15 +07:00
Daniel Pouzzner
52f003f5fc
Merge pull request #7281 from philljj/zd17416
...
Fix Coverity issues.
2024-03-01 02:41:48 -05:00
Daniel Pouzzner
67d4019058
Merge pull request #7270 from philljj/zd17560
...
Fix dataASN null pointer dereference in asn.c.
2024-03-01 01:53:55 -05:00
Daniel Pouzzner
d1e62b3ff2
Merge pull request #7282 from SparkiDev/pqcrypto_fix_1
...
ASN PQC: fix typo
2024-03-01 01:40:04 -05:00
Daniel Pouzzner
03f9b210d7
Merge pull request #7279 from SparkiDev/ssl_priv_load_fail
...
SSL: Loading bad private key
2024-03-01 01:35:50 -05:00
Anthony Hu
032a0405e4
Get rid of magic number to size structs.
2024-02-29 15:23:48 -05:00
jordan
b3c276bf0b
Fix wc_SetExtKeyUsageOID buffer warning: update size of oid.
2024-02-29 13:17:31 -06:00
Daniel Pouzzner
dfbde4514b
global refactor of static mutex initialization to use WOLFSSL_MUTEX_INITIALIZER, and adjustment of WOLFSSL_MUTEX_INITIALIZER macro to take an argument, for Linux kernel compatibility.
2024-02-29 02:11:32 -06:00
Sean Parkinson
90baf1aadc
ASN PQC: fix typo
...
Replace semicolon with comma.
2024-02-29 07:46:22 +10:00
jordan
c24add5da9
Fix dataASN null pointer dereference in asn.c.
2024-02-28 15:37:55 -06:00
Sean Parkinson
9addb3e45d
SSL: Change other ProcessBufferTryDecode*()
...
Ed448, Falcon and Dilithium changed to return 0 when key format is 0.
2024-02-29 07:37:41 +10:00
jordan
1768b03ecd
Fix wc_SetExtKeyUsageOID buffer warning.
2024-02-28 11:13:33 -06:00
Tobias Frauenschläger
403fcc5a4b
Fix for PQC enabled handshake
...
When PQC Kyber support is enabled, incoming KeyShare messages are tested
regarding the named group is a PQC Kyber group (pure or hybrid). The
boundaries of this test are way too loose (large gap between the pure
ones and the hybrid ones). This could result in failing handshakes in
case a client uses GREASE (Generate Random Extensions And Sustain
Extensibility), as there group numbers in the large gap are used.
The fix is just to make sure that the PQC test uses the two small
boundaries of the PQC named groups.
The lower bound for the hybrid groups has also been updated to reflect
the current OQS definition.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-02-28 17:52:38 +01:00
Sean Parkinson
b53cc0e98c
SSL: Loading bad private key
...
Fix ProcessBufferTryDecodeRsa and ProcessBufferTryDecodeEcc to only
clear error when key format isn't known.
2024-02-28 21:47:45 +10:00
JacobBarthelmeh
8a6c6ebfd5
add guard around public key validation on import
2024-02-28 13:48:58 +07:00
Daniel Pouzzner
6500444b26
Merge pull request #7072 from farazrbx/rbx
...
PlayStation compatibility
2024-02-28 00:52:01 -05:00
Daniel Pouzzner
daf43cd04f
Merge pull request #7260 from kosmas-valianos/missingConst
...
Add const in the list of wolfSSL_CTX_set1_groups_list() and wolfSSL_set1_groups_list()
2024-02-28 00:28:37 -05:00
Daniel Pouzzner
af31fbc840
Merge pull request #7271 from bigbrett/cryptocb-random-wctestfix
...
add full support to wolfcrypt tests for random.c cryptocbs
2024-02-27 19:57:46 -05:00
Daniel Pouzzner
e64a26d6ae
Merge pull request #7274 from SKlimaRA/SKlimaRA/fix-embos-heap-allocation-macros
...
fixed XMALLOC, XFREE and XREALLOC definitions for embOS
2024-02-27 17:29:10 -05:00
Faraz Fallahi
3c6651e1e2
PlayStation compatibility
2024-02-27 12:28:31 -08:00
Eric Blankenhorn
26c5c6f93c
Add directory layout to readme.
2024-02-27 12:07:28 -06:00
Brett Nicholas
55421a11b9
review: removed WOLFSSL_ABI from and refactored args for wc_rng_new_ex, updated tests
2024-02-27 10:17:24 -07:00
Stanislav Klima
c5a5acd26f
code review changes
2024-02-27 15:58:12 +01:00
Stanislav Klima
34b4066d2f
fixed XMALLOC, XFREE and XREALLOC definitions for embOS
2024-02-27 14:47:39 +01:00
TakayukiMatsuo
eeda0caeb9
Add streaming support for PKCS7_VerifySignedData.
2024-02-27 15:04:32 +09:00
JacobBarthelmeh
9eac8cb41f
add a test case
2024-02-26 09:44:23 -07:00
JacobBarthelmeh
2044d6b7dd
add callbacks for PKCS7 streaming input and output
2024-02-26 08:28:12 -07:00
JacobBarthelmeh
10740abf9b
warning fix for small PSK build
2024-02-26 15:28:28 +07:00
gojimmypi
0775baa2e1
Introduce SHA256/SHA512 interleave, HAVE_DSA; revised ERROR_OUT, cleanup
2024-02-23 17:52:20 -08:00
David Garske
a77c6d1fa0
Merge pull request #7269 from JacobBarthelmeh/cryptocb
...
add support for crypto cb only with ECC and CAAM
2024-02-23 13:19:32 -08:00
Brett Nicholas
1a5064cf8c
add full support to wolfcrypt tests for random.c cryptocbs
2024-02-23 13:02:05 -07:00
JacobBarthelmeh
2f6cd765f1
revert some macro guards for support with sp math
2024-02-24 01:07:05 +07:00
JacobBarthelmeh
aa444c1b2c
Merge pull request #7268 from dgarske/bench_fixes
...
Fixes for benchmark with small stack (RSA was being skipped)
2024-02-23 23:24:55 +07:00
JacobBarthelmeh
2364b699ff
add support for crypto cb only with ECC and CAAM
2024-02-23 08:09:19 -08:00
Daniel Pouzzner
06469a43bc
wolfcrypt/benchmark/benchmark.c:
...
* remove redundant nullness checks covered by WC_ALLOC_VAR() via WC_ALLOC_DO_ON_FAILURE();
* add "exit:" logic to bench_sm4_gcm();
* add missing WC_ALLOC_VAR() in bench_sm4_ccm();
* fix early return in bench_ed448KeySign().
2024-02-23 01:07:26 -06:00
David Garske
4055b0d832
Fix for some variable null checks that are not needed.
2024-02-22 16:28:15 -08:00
David Garske
cd0301fc66
Fixes for benchmark with small stack (RSA was being skipped). Added Thumb2 benchmarks for STM32H753.
2024-02-22 14:56:51 -08:00
JacobBarthelmeh
8a68e6aaa1
Merge pull request #7266 from bandi13/addYoctoDocker
...
Add in files for yocto build environment
2024-02-22 19:30:36 +07:00
JacobBarthelmeh
6f281d7e72
Merge pull request #7267 from douzzer/20240221-reproducible-build-tweaks
...
20240221-reproducible-build-tweaks
2024-02-22 19:28:12 +07:00
JacobBarthelmeh
162d4dc483
Merge pull request #7264 from bandi13/dockerFixes
...
Add in missing dependency for nightly-sp-test
2024-02-22 19:11:07 +07:00
Daniel Pouzzner
f1afa7eaff
Merge pull request #7265 from embhorn/zd17547
...
Fix order of check for OPENSSL_EXTRA
2024-02-21 20:25:54 -05:00
Daniel Pouzzner
9e4887bcf4
configure.ac: fix --enable-reproducible-build using -g0 -ffile-prefix-map=... -Wl,--build-id=none. these fixes stabilize the hash of libwolfssl with respect to source and build directory, previously broken for out-of-tree builds.
2024-02-21 16:36:29 -06:00
Andras Fekete
e74d3e126e
Add in files for yocto build environment
2024-02-21 16:49:35 -05:00
Andras Fekete
2ee47eac4d
Add in missing dependency for nightly-sp-test
2024-02-21 16:16:26 -05:00
Eric Blankenhorn
3ad836ab47
Fix order of check for OPENSSL_EXTRA
2024-02-21 15:09:13 -06:00
Sean Parkinson
d027b305ab
Merge pull request #7257 from philljj/zd17540
...
Fix unchecked ge448_scalarmult_base return value.
2024-02-22 07:05:09 +10:00
JacobBarthelmeh
88e7d47930
Merge pull request #7230 from anhu/tests_gating
...
Fixup some gating in the tests.
2024-02-22 01:24:55 +07:00
jordan
5aa06c26ff
Fix unchecked ge448_scalarmult_base return value.
2024-02-21 08:40:38 -06:00
Anthony Hu
00c3f5be2e
A fixup
2024-02-20 21:50:03 -05:00
JacobBarthelmeh
fd2b80ec22
Merge pull request #7245 from julek-wolfssl/transient-certs
...
Implement transient certs
2024-02-20 22:48:19 +07:00
Juliusz Sosinowicz
09de233fc0
Add dox for new API
2024-02-20 14:42:58 +01:00
Juliusz Sosinowicz
aa19d8221e
Add test forcing caTable cleanup during active connections
2024-02-20 14:33:36 +01:00
Juliusz Sosinowicz
4caef93346
Implement transient certs
...
Add wolfSSL_CertManagerUnloadIntermediateCerts API to clear intermediate certs added to store.
2024-02-20 14:33:36 +01:00
Kosmas Valianos
73a6935386
Add const in the list of wolfSSL_CTX_set1_groups_list() and wolfSSL_set1_groups_list()
...
aligning with the wolfSSL_CTX_set1_sigalgs_list()/wolfSSL_set1_sigalgs_list() API
2024-02-20 09:14:39 +01:00
Sean Parkinson
af2b2dddb4
Merge pull request #7253 from julek-wolfssl/zd/17507
...
wc_ecc_shared_secret_ssh fix
2024-02-20 06:56:28 +10:00
JacobBarthelmeh
757fcbcc25
Merge pull request #7236 from julek-wolfssl/get-sig-nid
...
Implement SSL_get_peer_signature_nid and SSL_get_peer_signature_type_nid
2024-02-20 02:46:37 +07:00
JacobBarthelmeh
565a4e6773
Merge pull request #7256 from douzzer/20240217-fixes
...
20240217-fixes
2024-02-20 01:54:32 +07:00
Daniel Pouzzner
8d894fb01b
wolfssl/wolfcrypt/types.h: add WC_ARRAY_ARG() and WC_HEAP_ARRAY_ARG() constructors, for passing arrays declared by WC_DECLARE_ARRAY() and WC_DECLARE_HEAP_ARRAY(). used this to refactor bench_rsa_helper() arg list, fixing a cppcheck argumentSize warning.
...
wolfcrypt/test/test.c: revert overeager constification of xmss_msg and xmss_sig.
2024-02-17 15:24:55 -06:00
David Garske
7f18338322
Merge pull request #7255 from ejohnstown/ocsp-date
...
OCSP Date Checks
2024-02-16 20:58:20 -08:00
John Safranek
52f4dcd7aa
OCSP Date Checks
...
When calling DecodeResponseData(), no matter the return value, if it is
not success, it is assigned to ASN_PARSE_E. This isn't the pattern for
other branch parsing. Return the value returned.
This is seen when decoding an OCSP response that is past the
next-available time.
2024-02-16 12:12:27 -08:00
David Garske
e4ea2651a3
Merge pull request #7252 from douzzer/20240215-benchmark-smallstack-refactors
...
20240215-benchmark-smallstack-refactors
2024-02-16 11:45:59 -08:00
Daniel Pouzzner
af620513f1
wolfssl/wolfcrypt/types.h: fix bugprone-macro-parentheses in smallstack WC_ALLOC_VAR().
2024-02-16 12:39:25 -06:00
David Garske
815c290293
Merge pull request #7231 from anhu/maxqrng
...
Use the MAXQ1065/1080 rng when available.
2024-02-16 09:43:46 -08:00
Daniel Pouzzner
3676dc02a6
wolfcrypt/benchmark/benchmark.c: mollify scan-build with XMEMSET()s in several false positives around WC_DECLARE_ARRAY().
2024-02-16 10:27:06 -06:00
Daniel Pouzzner
44e0ee1ecd
wolfssl/wolfcrypt/types.h:
...
* fix overallocation in WC_DECLARE_ARRAY() macro in the !WOLFSSL_SMALL_STACK path.
* rename WC_INIT_ARRAY() to WC_ALLOC_ARRAY() for clarity (it doesn't initialize any memory).
* rename WC_DECLARE_ARRAY_DYNAMIC_DEC(), WC_DECLARE_ARRAY_DYNAMIC_EXE(), and WC_FREE_ARRAY_DYNAMIC() to WC_DECLARE_HEAP_ARRAY(), WC_ALLOC_HEAP_ARRAY(), and WC_FREE_HEAP_ARRAY(), respectively, also for clarity, and refactor out the duplicate definitions.
* add WC_ALLOC_VAR(), and move the XMALLOC() in smallstack WC_DECLARE_VAR() into it. smallstack WC_DECLARE_VAR() now initializes the pointer to NULL, like smallstack WC_DECLARE_ARRAY(), assuring all pointers are valid upon shortcircuit to cleanup for a failed allocation (see WC_ALLOC_DO_ON_FAILURE below).
* add a new hook "WC_ALLOC_DO_ON_FAILURE" in WC_ALLOC_VAR(), WC_ALLOC_ARRAY(), and WC_DECLARE_ARRAY_DYNAMIC_EXE(), which is invoked when an allocation fails. by default the hook is defined to WC_DO_NOTHING.
* add basic safety to WC_*_HEAP_ARRAY() by recording/detecting allocation state via idx##VAR_NAME.
* add macros WC_ARRAY_OK() and WC_HEAP_ARRAY_OK() to test if allocation succeeded.
* add macros WC_CALLOC_ARRAY() and WC_CALLOC_HEAP_ARRAY() which zero the objects.
* add macro WC_CALLOC_VAR() which zeros the object.
ED448: smallstack refactor of ge448_scalarmult_base().
src/tls.c tests/api.c wolfcrypt/test/test.c: update WC_DECLARE_VAR()s with now-required matching WC_ALLOC_VAR()s.
wolfcrypt/benchmark/benchmark.c:
* no functional changes in default error-free behavior.
* add definition of WC_ALLOC_DO_ON_FAILURE() that prints error message, sets ret, and does goto exit.
* add BENCH_NTIMES and BENCH_AGREETIMES overrideeable macros, to allow fast sanitizer runs and slow high-precision runs.
* smallstack refactor of all declarations of stack arrays of the form foo[BENCH_MAX_PENDING], using WC_DECLARE_ARRAY() (35 in all).
* additional smallstack refactors, using WC_DECLARE_VAR(), for bench_aesxts(), bench_ed448KeyGen(), bench_eccsi*(), and bench_sakke*().
* fixes for various unhandled error conditions around malloc failures.
wolfcrypt/test/test.c: opportunistically constify several (42) static constants, moving them to the readonly data segment.
linuxkm/Makefile: if ENABLED_LINUXKM_BENCHMARKS, add wolfcrypt/benchmark/benchmark.o to WOLFSSL_OBJ_FILES.
linuxkm/Kbuild: enable FPU for benchmark.o, and remove enablement for module_hooks.o.
linuxkm/module_hooks.c: remove inline include of benchmark.c.
2024-02-16 10:26:21 -06:00
András Fekete
92b8196059
Merge pull request #7251 from miyazakh/ra6m4_jenkins
...
fix ra6m4 nightly jenkins failure
2024-02-16 09:09:12 -05:00
Juliusz Sosinowicz
469760e186
wc_ecc_shared_secret_ssh fix
...
- wc_ecc_shared_secret_ssh should either be declared or not. Having two different signatures for the same function is error prone.
- Don't use wc_ecc_shared_secret_ssh in our code. Use wc_ecc_shared_secret directly.
2024-02-16 13:38:35 +01:00
Juliusz Sosinowicz
44de6dfdd3
Return correct values in get_signature APIs and write tests
2024-02-16 11:32:22 +01:00
Juliusz Sosinowicz
98e328dafc
Enable master openvpn testing
...
Depends on https://github.com/wolfSSL/wolfssl/pull/7236
2024-02-16 11:32:04 +01:00
Juliusz Sosinowicz
6537c7163c
Implement SSL_get_peer_signature_nid and SSL_get_peer_signature_type_nid
2024-02-16 11:32:04 +01:00
Hideki Miyazaki
72d8acf5aa
fix ra6m4 nightly jenkins failure
2024-02-16 15:45:32 +09:00
David Garske
d34b254247
Merge pull request #7249 from bandi13/missingOpenVPNDependencies
...
Add in dependencies when compiling with OpenVPN
2024-02-15 15:38:07 -08:00
David Garske
f0a162c265
Merge pull request #7250 from lealem47/ecbAsync
...
Fix for AES-ECB benchmark livelock with Async
2024-02-15 15:37:46 -08:00
Marco Oliverio
c8f3a8f14b
fix: negotiate handshake until the end in wolfSSL_read/wolfSSL_write ( #7237 )
...
* tls: negotiate until hs is complete in wolfSSL_read/wolfSSL_write
Don't rely on ssl->options.handShakeSate == HANDSHAKE_DONE to check if
negotiation is needed. wolfSSL_Connect() or wolfSSL_Accept() job may not yet be
completed and/or some messages may be waiting in the buffer because of
non-blocking I/O.
* tests: test case for handshake with wolfSSL_read()/wolfSSL_write()
* doc: clarify wolfSSL_write()
* internal.c: rename: need_negotiate -> ssl_in_handshake
2024-02-15 13:48:19 -08:00
Lealem Amedie
4cc960787f
Fix for AES-ECB benchmark livelock with Async
2024-02-15 12:51:22 -07:00
Andras Fekete
71fd4782c0
Add in dependencies when compiling with OpenVPN
2024-02-15 13:48:33 -05:00
David Garske
585f0f1956
Merge pull request #7248 from lealem47/ARMASM_UnitTest
...
Fix unit test failure for FIPS 140-2 + WOLFSSL_ARMASM
2024-02-15 08:25:42 -08:00
Lealem Amedie
b87f544af6
Reviewer feedback
2024-02-14 16:43:01 -07:00
Lealem Amedie
152c8565b9
Fix unit test failure for FIPS 140-2 + WOLFSSL_ARMASM
2024-02-14 16:24:58 -07:00
David Garske
d39cf1e499
Merge pull request #7246 from kareem-wolfssl/zd17176
...
Only include CRL monitor definitions when building with HAVE_CRL_MONITOR.
2024-02-14 13:45:23 -08:00
Kareem
6dc6d58c04
Remove redundant ifdefs.
2024-02-14 11:22:32 -07:00
David Garske
375415d042
Merge pull request #7229 from kaleb-himes/win-code-up
...
Windows doesn't like code before variables
2024-02-14 09:50:34 -08:00
Kareem
c119826e75
Only include CRL monitor definitions when building with HAVE_CRL_MONITOR.
2024-02-13 15:37:36 -07:00
Sean Parkinson
3b6a7691c5
Merge pull request #7235 from julek-wolfssl/gh/7228
...
Send alert on bad psk binder
2024-02-14 07:24:52 +10:00
David Garske
6f88ed0901
Merge pull request #7177 from gojimmypi/PR-Arduino-Update
...
Improved Arduino Support: ESP32, Due
2024-02-13 09:43:42 -08:00
David Garske
c8d0bb0bd8
Merge pull request #7212 from SparkiDev/eddsa_check_priv
...
EdDsa: check private value after sign
2024-02-13 09:27:34 -08:00
Sean Parkinson
e28d6a7b71
EdDsa: check private value after sign
...
Check the private value hasn't changed during signing with EdDSA.
2024-02-13 22:11:48 +10:00
Sean Parkinson
94680991a9
Merge pull request #7243 from douzzer/20240213-aes256_test-leak
...
20240213-aes256_test-leak
2024-02-13 22:03:49 +10:00
gojimmypi
68fb183fa6
Update TLS client example for Espressif ESP8266
2024-02-13 03:01:40 -08:00
Daniel Pouzzner
9b7decada0
wolfcrypt/test/test.c: fix Aes init/free lifecycle in aes192_test() and aes256_test().
2024-02-13 01:23:11 -06:00
David Garske
2ebc897e31
Merge pull request #7241 from ejohnstown/ocsp-revoke-reason
...
Decode OCSP Revocation Reason
2024-02-12 15:11:26 -08:00
David Garske
2b9e9955c3
Merge pull request #7242 from SparkiDev/ct_valgrind_fixes_3
...
RSA ct test: force RsaFunctionCheckIn to not be inlined
2024-02-12 15:10:47 -08:00
Sean Parkinson
f031d034df
RSA ct test: force RsaFunctionCheckIn to not be inlined
...
In non-debug compilation, RsaFunctionCheckIn may be inlined.
The function operates on the input - value to exponentiate.
Constant time testing excludes all operations in this function.
2024-02-13 07:37:24 +10:00
John Safranek
c17fb7498b
OCSP Revocation Reason
...
1. The ASN.1 parser wasn't handling the OCSP response correctly when
there was a revocation reason included in the response. The encoded
reason value is constructed, and was getting marked as not
constructed in the parser. Changed the flag to mark it as
constructed.
2024-02-12 13:11:51 -08:00
David Garske
06f04def1b
Merge pull request #7222 from rizlik/early_data_fix
...
tls13: wolfSSL_read_early_data() set outSz to 0 if no early data and update doc
2024-02-12 11:38:46 -08:00
Marco Oliverio
7b0fefbceb
doc: update new wolfSSL_read_early_data() behavior
2024-02-12 17:20:15 +01:00
Marco Oliverio
e923d4c151
tls13: read_early_data: set outSz to 0 if no early data
...
If not data is read, set outSz to 0. This way the
caller can detect if no early data was read.
2024-02-12 17:20:15 +01:00
JacobBarthelmeh
83ae7245b0
Merge pull request #7151 from lealem47/pic24
...
MICROCHIP PIC24 support and example project
2024-02-12 23:15:10 +07:00
Juliusz Sosinowicz
9a08296fa0
Fix openssl client psk key so that psk actually works
2024-02-12 15:07:46 +01:00
Sean Parkinson
d5142d8553
Merge pull request #7234 from douzzer/20240208-test-config-and-linuxkm-tweaks
...
20240208-test-config-and-linuxkm-tweaks
2024-02-12 22:50:28 +10:00
Sean Parkinson
9f0aa38120
Merge pull request #7223 from gojimmypi/PR-debug-messages
...
Add wolfSSL debug messages
2024-02-12 07:35:50 +10:00
Daniel Pouzzner
2e970f53c5
Merge pull request #7232 from bandi13/moreDependencies
...
Add in dependencies of tests
2024-02-10 02:17:28 -05:00
Daniel Pouzzner
13021708d4
Merge pull request #7227 from julek-wolfssl/gh-retention-days
...
Increase retention days to make re-running easier
2024-02-10 02:16:34 -05:00
Daniel Pouzzner
c1931f78de
Merge pull request #7225 from bandi13/fixStaticAnalysisError
...
Static analyzers complain that a->size is never initialized
2024-02-10 02:15:37 -05:00
Daniel Pouzzner
63fe12efe3
wolfcrypt/src/aes.c: fix WOLFSSL_AESGCM_STREAM && WC_AES_C_DYNAMIC_FALLBACK: establish AESNI status dynamically at time of wc_AesGcmSetKey(), and stick to it (or return failure) until the next wc_AesGcmSetKey(). this matches the semantics of the Linux kernel in-tree implementation, allowing safe registration of the wolfCrypt AESNI implementation with the LKCAPI.
...
configure.ac: move enable_aesgcm_stream=yes clauses in enable-all and enable-all-crypto to the main section, from the !ENABLED_LINUXKM_DEFAULTS section, and in ENABLED_LINUXKM_LKCAPI_REGISTER setup, remove the !ENABLED_AESNI from the condition for forcing on ENABLED_AESGCM_STREAM.
linuxkm/lkcapi_glue.c:
* remove all special-casing for AES-GCM with AESNI.
* add support for a LINUXKM_LKCAPI_PRIORITY_ALLOW_MASKING macro.
wolfssl/wolfcrypt/memory.h: add missing definition of SAVE_VECTOR_REGISTERS2() when DEBUG_VECTOR_REGISTER_ACCESS_FUZZING && !DEBUG_VECTOR_REGISTER_ACCESS.
wolfcrypt/src/memory.c:
* define SAVE_VECTOR_REGISTERS2_fuzzer() if DEBUG_VECTOR_REGISTER_ACCESS_FUZZING, regardless of DEBUG_VECTOR_REGISTER_ACCESS.
* add a DEBUG_VECTOR_REGISTER_ACCESS clause to the !HAVE_THREAD_LS version of SAVE_VECTOR_REGISTERS2_fuzzer().
wolfcrypt/test/test.c: remove several errant wc_AesFree()s in aes256_test().
2024-02-10 01:09:15 -06:00
Juliusz Sosinowicz
bd32dfd282
Send alert on bad psk binder
...
Issue reported in https://github.com/wolfSSL/wolfssl/pull/7228
2024-02-09 16:12:04 +01:00
Juliusz Sosinowicz
d34cf39206
Increase retention days to make re-running easier
2024-02-09 11:36:55 +01:00
Daniel Pouzzner
6146485d2a
linuxkm/linuxkm_wc_port.h:
...
* add support for DEBUG_LINUXKM_FORTIFY_OVERLAY to allow KASAN analysis of the overlay without actually enabling CONFIG_FORTIFY_SOURCE (which is buggy in combination with KASAN).
* make SAVE_VECTOR_REGISTERS2 definition conditional on !defined(SAVE_VECTOR_REGISTERS2).
wolfssl/wolfcrypt/memory.h: fix the DEBUG_VECTOR_REGISTER_ACCESS definition for SAVE_VECTOR_REGISTERS to properly omit the on-success bookkeeping code even if the supplied fail_clause doesn't return.
wolfcrypt/src/rsa.c: in wc_MakeRsaKey() primality loop, invoke RESTORE_VECTOR_REGISTERS() SAVE_VECTOR_REGISTERS() to prevent lengthy kernel lockups.
wolfcrypt/src/dh.c: in wc_DhGenerateParams() primality loop, invoke RESTORE_VECTOR_REGISTERS() SAVE_VECTOR_REGISTERS() to prevent lengthy kernel lockups.
wolfcrypt/src/{curve25519.c,dh.c,dsa.c,ecc.c,eccsi.c,rsa.c,sakke.c,sp_int.c}: when WOLFSSL_LINUXKM, force {SAVE,RESTORE}_VECTOR_REGISTERS() to WC_DO_NOTHING if settings gate out applicable asm.
2024-02-09 00:47:23 -06:00
Daniel Pouzzner
91681f378f
configure.ac:
...
* add srtp to enable-all
* add srtp-kdf to enable-all-crypto
* fix typo in enable-all[-crypto] where ENABLED_FIPS was used when FIPS_VERSION was needed.
* in enable-all[-crypto], conditionalize aesxts on !FIPS || FIPS_VERSION == dev.
* move AES-XTS CFLAG setup after FIPS settings, to allow non-dev FIPS to force it off, and add clause to FIPS v5 setup to do that.
* in FIPS v5 setup, add AES-XTS to the list of modes that forces -DWOLFSSL_AES_DIRECT -DHAVE_AES_ECB.
wolfcrypt/src/kdf.c: fix several benign -Wconversions.
wolfcrypt/test/test.c: add aes_cfb_test() and aes_xts_test() as top-level tests with separate "pass" messages, for transparency that those modes have indeed been tested in builds that activate them.
2024-02-09 00:46:54 -06:00
suzuki toshiya
e4b1e54235
configure or cmake sets LIBM variable if required, and write it in wolfssl.pc.
2024-02-09 13:58:28 +09:00
gojimmypi
bf29066d70
Add wolfSSL debug messages
2024-02-08 17:22:36 -08:00
Andras Fekete
340e22a6e4
Add in dependencies of tests
2024-02-08 16:48:10 -05:00
Anthony Hu
d0fd0a287b
Fixup some gating in the tests.
...
Found with:
./configure --enable-wolfclu --enable-asn=template 'CFLAGS=-DNO_ASN_TIME -DWOLFSSL_CUSTOM_OID -DHAVE_OID_ENCODING'
2024-02-08 16:14:43 -05:00
kaleb-himes
f5670082b6
Windows doesn't like code before variables
2024-02-08 14:12:02 -07:00
Anthony Hu
16c74a31b2
Use the MAXQ1065/1080 rng when available.
2024-02-08 16:10:36 -05:00
Andras Fekete
16b40b2f75
Static analyzers complain that a->size is never initialized
2024-02-08 15:13:07 -05:00
Juliusz Sosinowicz
14830d0e09
Merge pull request #7226 from bandi13/disableOpenVPN_master
...
Temporarily disable OpenVPN-master test
2024-02-08 21:06:22 +01:00
Andras Fekete
de0d1ea1e7
Temporarily disable OpenVPN-master test
2024-02-08 13:52:32 -05:00
Daniel Pouzzner
7365c3c6ba
Merge pull request #7215 from julek-wolfssl/openssh-workflow-update
...
Point openssh workflow to wolf master
2024-02-08 12:43:53 -05:00
Sean Parkinson
5b5f0ff32c
Merge pull request #7194 from anhu/CerManUnExtCb
...
Adding unknown extension callback to CertManager
2024-02-08 22:10:32 +10:00
Sean Parkinson
9147a7254b
Merge pull request #7214 from julek-wolfssl/zd/17314
...
DTLS sequence number and cookie fixes
2024-02-08 22:08:37 +10:00
suzuki toshiya
24c30d90e7
Add "Libs.private: -m" to wolfssl.pc.in for a static linking
2024-02-08 13:04:36 +09:00
gojimmypi
e078e74011
Update Arduino IDE README.md
2024-02-07 13:52:18 -08:00
Anthony Hu
271462128d
Add a test
2024-02-07 16:49:46 -05:00
David Garske
7e142583c6
Merge pull request #7221 from SparkiDev/thumb2_inline_asm_iar_fix
...
Thumbs inline ASM IAR: fix register clobber list
2024-02-07 13:30:41 -08:00
David Garske
dec4caa98f
Merge pull request #7206 from julek-wolfssl/gh/7196
...
Fix write_dup with chacha-poly
2024-02-07 08:40:30 -08:00
Sean Parkinson
91e1fe4496
Merge pull request #7220 from gojimmypi/PR-ssl-session-cache
...
Introduce MICRO_SESSION_CACHE, update comments
2024-02-07 21:25:53 +10:00
gojimmypi
538ade105c
Correct C++-style comments in settings.h
2024-02-06 18:25:05 -08:00
Sean Parkinson
fff4effe31
Thumbs inline ASM IAR: fix register clobber list
...
Change register clobber list so that it reserves the same registers for
constants regardless of WOLFSSL_NO_VAR_ASSIGN_REG.
2024-02-07 10:28:01 +10:00
gojimmypi
10b5c375ef
introduce MICRO_SESSION_CACHE, update comments
2024-02-06 14:07:50 -08:00
David Garske
8853096290
Merge pull request #7217 from douzzer/20240206-cmake-install-rule-by-default
...
20240206-cmake-install-rule-by-default
2024-02-06 10:48:55 -08:00
Daniel Pouzzner
c69442375b
CMakeLists.txt: include the install rule by default, disabled with -DWOLFSSL_INSTALL=no, to restore status quo ante. see #7188
2024-02-06 12:08:57 -06:00
David Garske
735fbc7cee
Merge pull request #7195 from philljj/zd17406
...
Update IAR-EWARM project user-settings.h.
2024-02-06 09:20:54 -08:00
Juliusz Sosinowicz
4244fe9ff4
Run openssh tests on PR's
2024-02-06 13:30:25 +01:00
Juliusz Sosinowicz
bdc0b80ddb
Don't include unnecessary headers in public header file
2024-02-06 13:27:34 +01:00
Daniel Pouzzner
4d842f094e
Merge pull request #7199 from lealem47/defaultASN
...
Default to ASN TEMPLATE library
2024-02-05 22:32:57 -05:00
Sean Parkinson
86b1aae218
Merge pull request #7209 from philljj/zd17416
...
Coverity issues: fix MD5 and SHA buffer overrun.
2024-02-06 08:58:27 +10:00
Lealem Amedie
d36bd47a27
For cppcheck: Explicitly initialize some variables
2024-02-05 15:09:05 -07:00
Daniel Pouzzner
48e40b8d8e
Merge pull request #7201 from SparkiDev/sha256_aarch64_unaligned
...
SHA-256 Aarch64: fix alignments on loads and stores
2024-02-05 16:50:27 -05:00
Daniel Pouzzner
8665295573
Merge pull request #7198 from dgarske/tls12only
...
Template for TLS v1.2 only
2024-02-05 16:14:47 -05:00
Daniel Pouzzner
1356e079f1
Merge pull request #7207 from julek-wolfssl/update-actions
...
Update github actions
2024-02-05 16:11:39 -05:00
Daniel Pouzzner
2b33079d50
Merge pull request #7188 from innolectric/innolectric
...
Innolectric CMake changes
2024-02-05 16:08:58 -05:00
Sean Parkinson
9060da42a6
Merge pull request #7211 from douzzer/20240203-linuxkm-fixes
...
20240203-linuxkm-fixes
2024-02-06 07:08:40 +10:00
jordan
9ea52c3a51
Update IAR-EWARM project user-settings.h.
2024-02-05 15:01:07 -06:00
Daniel Pouzzner
5c421d0207
Merge pull request #7178 from anhu/OQS_MEM_LEAKS
...
Fixes that prevent memory leaks when using OQS.
2024-02-05 13:26:43 -05:00
Anthony Hu
9b697a5315
Missed gating
2024-02-05 12:38:25 -05:00
Juliusz Sosinowicz
54b562f501
Point openssh workflow to wolf master
2024-02-05 18:10:24 +01:00
Juliusz Sosinowicz
8bddeb10c7
DTLS sequence number and cookie fixes
...
- dtls: check that the cookie secret is not emtpy
- Dtls13DoDowngrade -> Dtls13ClientDoDowngrade
- dtls: generate both 1.2 and 1.3 cookie secrets in case we downgrade
- dtls: setup sequence numbers for downgrade
- add dtls downgrade sequence number check test
Fixes ZD17314
2024-02-05 16:09:03 +01:00
jordan
83169f91e9
Fix ShaFinal overrun.
2024-02-03 17:36:26 -06:00
Daniel Pouzzner
3a280e8295
linuxkm fixes:
...
linuxkm/linuxkm_wc_port.h: add fallback definition for static_assert() to support legacy kernels.
wolfcrypt/src/aes.c: fix AESNI runtime failure/fallback logic in wc_AesXtsSetKeyNoInit().
2024-02-03 13:46:45 -06:00
David Garske
ca726e97f8
Peer review fixes.
2024-02-03 10:43:46 -08:00
jordan
d111d7da1b
Fix MD5 and SHA buffer overrun.
2024-02-02 19:50:22 -06:00
Daniel Pouzzner
851f059023
Merge pull request #7203 from julek-wolfssl/openssh-9.6
...
openssh 9.6p1 fixes
2024-02-02 19:51:55 -05:00
Daniel Pouzzner
4ed197d487
Merge pull request #7205 from julek-wolfssl/fix-test_wolfSSL_OPENSSL_hexstr2buf
...
test_wolfSSL_OPENSSL_hexstr2buf: test was always skipped
2024-02-02 18:45:31 -05:00
Daniel Pouzzner
866992151b
Merge pull request #7208 from philljj/fix_ext_xmss_sigsleft
...
Fix ext_xmss sigsleft null deref.
2024-02-02 18:28:20 -05:00
Daniel Pouzzner
7823acbbde
Merge pull request #7184 from JacobBarthelmeh/pkcs7-enc
...
PKCS7 streaming with encode/sign
2024-02-02 18:00:12 -05:00
jordan
13e427433c
Fix ext_xmss sigsleft null deref.
2024-02-02 16:04:23 -06:00
JacobBarthelmeh
7592559fd3
rename argument, fix warnings on casts
2024-02-02 14:50:50 -07:00
Daniel Pouzzner
d1e0b37467
Merge pull request #7202 from julek-wolfssl/bio-include-ssl
...
If bio.h is included first then it can't include options.h on its own
2024-02-02 16:00:47 -05:00
Daniel Pouzzner
6230c29194
Merge pull request #7190 from SparkiDev/tls13_hrrcookie_fix
...
TLS 1.3, HRR Cookie: send cookie back in new ClientHello
2024-02-02 15:05:00 -05:00
Juliusz Sosinowicz
31bfac43ea
Update github actions
...
Many of these updates should also speed up some steps
2024-02-02 20:14:28 +01:00
David Garske
32aecf4c35
Merge pull request #7180 from douzzer/20240126-LINUXKM_LKCAPI_REGISTER
...
20240126-LINUXKM_LKCAPI_REGISTER
2024-02-02 11:12:35 -08:00
Juliusz Sosinowicz
5b5d6481de
Fix write_dup with chacha-poly
2024-02-02 19:47:25 +01:00
Juliusz Sosinowicz
188a69e649
test_wolfSSL_OPENSSL_hexstr2buf: test was always skipped
2024-02-02 18:29:15 +01:00
Juliusz Sosinowicz
be90fe073e
tfm and integer: skip whitespace at end in radix read
2024-02-02 14:38:40 +01:00
Juliusz Sosinowicz
7ebb8cd007
Update radix tests
2024-02-02 12:09:50 +01:00
Juliusz Sosinowicz
d3b0a26b3b
If bio.h is included first then it can't include options.h on its own
...
When EXTERNAL_OPTS_OPENVPN is defined, we should be including options.h internally. When bio.h is included first, we don't include options.h and we don't pass the `#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)` guard.
2024-02-02 11:02:39 +01:00
Sean Parkinson
c8b0aac144
SHA-256 Aarch64: fix alignments on loads and stores
...
Input buffer must be loaded with a byte alignment.
Fix other loads and stores to be consistent.
2024-02-02 12:41:12 +10:00
Daniel Pouzzner
10645de648
linuxkm: various tweaks:
...
* configure.ac: in linuxkm-lkcapi-register section, force ENABLED_AESGCM_STREAM=yes if ENABLED_AESGCM is yes and there is asm or FIPS in the picture.
* linuxkm/module_hooks.c: in updateFipsHash(), if DEBUG_LINUXKM_PIE_SUPPORT || WOLFSSL_LINUXKM_VERBOSE_DEBUG, print the base16 hash to the kernel log.
* linuxkm/lkcapi_glue.c:
* implement KATs for AES-CBC, AES-CFB, and AES-GCM.
* clean out extraneous code and macro usage inherited from test/test.c.
* add post-registration crypto_tfm_alg_driver_name() tests for AES-CBC, AES-CFB, and AES-GCM.
2024-02-01 19:04:02 -06:00
Takashi Kojo
791c9e7aba
Add EC_POINT_hex2point
2024-02-02 07:34:38 +09:00
Lealem Amedie
63f7298be2
Default to ASN TEMPLATE library
2024-02-01 14:52:06 -07:00
JacobBarthelmeh
ed4b87eb37
fix for clang-tidy null dereference error
2024-02-01 14:26:13 -07:00
JacobBarthelmeh
5fbadbb215
fix warning with test case
2024-02-01 11:50:51 -07:00
JacobBarthelmeh
8d0dc7a568
fix asn original build, vs warning, and add test cases
2024-02-01 11:50:51 -07:00
JacobBarthelmeh
bf23357c8c
refactor streaming and additional comments
2024-02-01 11:50:51 -07:00
JacobBarthelmeh
c843064681
update macro guard
2024-02-01 11:50:51 -07:00
JacobBarthelmeh
75762d44b6
PKCS7 streaming with encode/sign
2024-02-01 11:50:51 -07:00
gojimmypi
ee0e25de5f
Improved Arduino Support, ESP32, Due; (+ code review x2)
2024-02-01 08:31:00 -08:00
Juliusz Sosinowicz
335c51987e
openssh 9.6p1 fixes
...
- wolfSSL_DSA_set0_key: allow setting just the public key
- radix16: allow skipping the end of line whitespace
- Add openssh action
2024-02-01 11:39:56 +01:00
Daniel Pouzzner
f9bf96d9ba
Merge pull request #7187 from SparkiDev/sha256_intel_instrs
...
SHA-256: Implementation using Intel instructions
2024-01-31 19:15:43 -05:00
Daniel Pouzzner
1fda249468
Merge pull request #7189 from philljj/fix_static_nomalloc_build
...
Fix WOLFSSL_NO_MALLOC build.
2024-01-31 18:46:48 -05:00
Sean Parkinson
f48eb638da
TLS 1.3, HRR Cookie: send cookie back in new ClientHello
...
Make it mandatory that the cookie is sent back in new ClientHello when
seen in a HelloRetryRequest.
2024-02-01 07:49:37 +10:00
Daniel Pouzzner
3064d725b9
Merge pull request #7193 from bandi13/fixOpenWRTTests
...
Snapshots disappear after a while. Versioned releases stay.
2024-01-31 16:38:55 -05:00
Anthony Hu
dfc10741a5
Adding unknown extension callback to CertManager
2024-01-31 16:27:07 -05:00
Andras Fekete
65902308e8
Snapshots disappear after a while. Versioned releases stay.
2024-01-31 16:02:41 -05:00
Daniel Pouzzner
75bd1af110
Merge pull request #7179 from philljj/fix_ext_xmss_sigsleft
...
Fix ext_xmss SigsLeft.
2024-01-31 14:33:18 -05:00
David Garske
9e47703402
Template for TLS v1.2 only.
2024-01-31 10:13:31 -08:00
Daniel Pouzzner
e1ee5e4421
linuxkm: spruce up arch-dependent CFLAGS setup in linuxkm/Kbuild; add "failed:" to error messages in km_AesGcmEncrypt() and km_AesGcmDecrypt().
2024-01-31 11:49:46 -06:00
Daniel Pouzzner
f228a85cee
AES-XTS: fix FIPS gating to use defined(HAVE_FIPS), not defined(HAVE_FIPS_VERSION).
2024-01-30 17:16:37 -06:00
jordan
7ddf20851d
Fix WOLFSSL_NO_MALLOC build.
2024-01-30 09:00:02 -06:00
Juliusz Sosinowicz
48b99b0f10
Merge pull request #7185 from JacobBarthelmeh/zephyr
...
only download parts of zephyr sdk needed for test
2024-01-30 14:46:57 +01:00
Sean Parkinson
492490f7e6
SHA-256: Implementation using Intel instructions
...
Detects Intel SHA-256 instructions available for CPU.
Preferences implementation using Intel instructions.
2024-01-30 23:17:05 +10:00
Sean Parkinson
f7507f14cb
Merge pull request #7186 from douzzer/20240129-fix-wc_RsaFunction_ex
...
20240129-fix-wc_RsaFunction_ex
2024-01-30 23:14:52 +10:00
Daniel Pouzzner
3d3c07944e
wolfcrypt/src/ecc.c: fix logic around WOLF_CRYPTO_CB_ONLY_ECC in wc_ecc_shared_secret(), _ecc_make_key_ex(), wc_ecc_sign_hash(), and wc_ecc_verify_hash() (defects reported by -Wreturn-type, -Wmaybe-uninitialized around err, and a failure of ecc_onlycb_test()).
2024-01-29 22:30:33 -06:00
Daniel Pouzzner
67bbe1e1bb
wolfcrypt/src/rsa.c: in wc_RsaFunction_ex(), if defined(WOLF_CRYPTO_CB_ONLY_RSA), add clause to return NO_VALID_DEVID if key->devId == INVALID_DEVID. fixes "control reaches end of non-void function" in PRB-single-flag.txt.
2024-01-29 22:00:20 -06:00
Daniel Pouzzner
11e8a89f67
wolfcrypt/src/aes.c: coddle XCode (clang) to clear frivolous -Wparentheses-equality.
2024-01-29 17:58:13 -06:00
Daniel Pouzzner
6261108d49
linuxkm: fix line lengths throughout; in linuxkm/lkcapi_glue.c: fix/harmonize error catching, reporting, and error codes; further address peer review feedback.
2024-01-29 17:48:31 -06:00
David Garske
de91add3d9
Merge pull request #7182 from SparkiDev/armv8_32_align_chacha20_asm
...
ARMv8 32 bit ChaCha20 ASM: loading from in/out
2024-01-29 14:59:56 -08:00
JacobBarthelmeh
920abd8b46
only download parts of zephyr sdk needed for test
2024-01-29 15:02:58 -07:00
David Garske
de4a6f9e00
Merge pull request #7167 from SparkiDev/rsa_dec_check_d
...
RSA Decryption: check private value after decryption
2024-01-29 14:01:27 -08:00
Lealem Amedie
154841a083
MICROCHIP PIC24 support and example project
2024-01-29 12:50:00 -07:00
David Garske
a6326bd80a
Merge pull request #7183 from SparkiDev/regression_fixes_9
...
Regression testing fixes
2024-01-29 07:42:34 -08:00
David Garske
60de159707
Merge pull request #7176 from danielinux/iotsafe-sha384
...
IoT-Safe sha384+sha512 support
2024-01-29 07:35:50 -08:00
Sean Parkinson
13591dcae8
Regression testing fixes
...
internal.c: NO_CERT, privateKeySz not used.
./configure --disable-shared --disable-asn --disable-rsa --disable-ecc
--enable-psk
sp_int.c: fix when sp_gcm is available
./configure --disable-shared --disable-shared --disable-ecc
--disable-dh --disable-aes --disable-aesgcm --disable-sha512
--disable-sha384 --disable-sha --disable-poly1305 --disable-chacha
--disable-md5 --disable-sha3 --enable-cryptonly --disable-inline
--enable-rsavfy --disable-asn --disable-oaep --disable-rng
--disable-filesystem --enable-sp=rsa2048 --disable-sp-asm
--enable-sp-math
2024-01-29 23:05:46 +10:00
Daniel Pouzzner
856c9a9a7f
wolfcrypt/src/port/arm/armv8-aes.c: revert changes in a0415ce855.
2024-01-29 00:17:19 -06:00
Daniel Pouzzner
1fc67183a5
linuxkm: address peer review:
...
* support AES_ENCRYPTION_AND_DECRYPTION only if WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS is defined, and define it in linuxkm_wc_port.h if LINUXKM_LKCAPI_REGISTER.
* fix a typo in km_AesInitCommon().
* remove #if 0 code in lkcapi_glue.c.
2024-01-28 23:58:46 -06:00
Sean Parkinson
4585c6d508
ARMv8 32 bit ChaCha20 ASM: loading from in/out
...
Input and output buffers come from the application and are not
necessarily alighed.
Use instructions that allow unaligned access to these buffers.
2024-01-29 11:03:40 +10:00
Daniel Pouzzner
957fc7460c
linuxkm/lkcapi_glue.c: refactor AES-CBC, AES-CFB, and AES-GCM glue around struct km_AesCtx with separate aes_encrypt and aes_decrypt Aes pointers, and no cached key, to avoid AesSetKey operations at encrypt/decrypt time.
2024-01-27 23:16:02 -06:00
Daniel Pouzzner
8ae031a5ed
linuxkm/linuxkm_wc_port.h: improve my_memcpy(), my_memset(), and my_memmove() (CONFIG_FORTIFY_SOURCE workarounds) with copy-by-words codepaths.
2024-01-27 23:12:37 -06:00
Daniel Pouzzner
82d94dab68
linuxkm: move "#undef HAVE_PTHREAD" from linuxkm/module_hooks.c to wolfssl/wolfcrypt/settings.h.
2024-01-27 23:10:12 -06:00
Daniel Pouzzner
a0415ce855
wolfcrypt/src/port/arm/armv8-aes.c: fix for AesXts.aes_encrypt and AesXts.aes_decrypt.
2024-01-26 20:19:52 -06:00
Daniel Pouzzner
b1e5d0f9bb
linuxkm: completion and stabilization of LKCAPI integration for AES-CBC, AES-CFB, AES-GCM, and AES-XTS:
...
linuxkm/lkcapi_glue.c (added in earlier commit):
implement linuxkm_lkcapi_register() and linuxkm_lkcapi_unregister() with idempotency.
add AES-XTS algorithm glue and self-test implementations.
add per-algorithm gating: LINUXKM_LKCAPI_REGISTER_AESCBC, _AESCFB, _AESGCM, and _AESXTS.
carry forward philljj's implementations for AES-CBC, AES-CFB, and AES-GCM, with various cleanups.
linuxkm/module_hooks.c:
print the "wolfCrypt container hashes" message only if DEBUG_LINUXKM_PIE_SUPPORT is set.
render the FIPS version for the self-test success message using the HAVE_FIPS_VERSION* macros.
add a "skipping full wolfcrypt_test() ..." message for --disable-crypttests builds.
add CONFIG_FORTIFY_SOURCE gates.
configure.ac:
add support for --enable-linuxkm-lkcapi-register;
add AES-XTS to output config summary;
rename --enable-xts to --enable-aesxts (retaining old option for backward compatibility).
linuxkm/linuxkm_wc_port.h: add support for CONFIG_FORTIFY_SOURCE.
linuxkm/linuxkm_memory.c:
fix retvals in save_vector_registers_x86() (wc-style MEMORY_E, not sys-style ENOMEM).
add __my_fortify_panic() implementation.
linuxkm/Kbuild: for ENABLED_LINUXKM_PIE in rename-pie-text-and-data-sections recipe, create an .rodata.wolfcrypt section.
linuxkm/include.am: add linuxkm/lkcapi_glue.c to EXTRA_DIST.
wolfcrypt/test/test.c:
when defined(HAVE_FIPS_VERSION), inhibit a test clause in aes_xts_128_test() disallowed by FIPS ("FIPS AES-XTS main and tweak keys must differ").
fix out-of-order user message in ecc_test().
2024-01-26 20:01:19 -06:00
jordan
947528ee16
Fix ext_xmss SigsLeft.
2024-01-26 17:07:43 -06:00
Daniel Pouzzner
39c74a9bf8
AES-XTS:
...
split XtsAes.aes in two, XtsAes.aes_encrypt and XtsAes.aes_decrypt, and add AES_ENCRYPTION_AND_DECRYPTION option constant, to accommodate Linux kernel crypto API model.
in wc_AesXtsSetKeyNoInit(), add FIPS check that main and tweak keys differ, and allow setting encrypt and decrypt keys simultaneously using AES_ENCRYPTION_AND_DECRYPTION.
in wc_AesXtsEncrypt() and wc_AesXtsDecrypt(), error if the required subkey has not been set.
2024-01-26 15:22:34 -06:00
Daniel Pouzzner
ec60f91b4a
linuxkm: add linuxkm/lkcapi_glue.c.
2024-01-26 15:22:34 -06:00
Daniel Pouzzner
1f4cf4188d
linuxkm:
...
* LKCAPI integration tweaks for buildability and streamlining.
* add DEBUG_VECTOR_REGISTER_ACCESS_FUZZING && !DEBUG_VECTOR_REGISTER_ACCESS, with a kernel-compatible implementation of SAVE_VECTOR_REGISTERS2_fuzzer().
2024-01-26 15:22:34 -06:00
Daniel Pouzzner
6e559ed015
linuxkm: squash of philljj's POC work integrating libwolfssl.ko with crypto_register_skcipher/crypto_register_aead, start 2022-12-26, end 2023-01-14.
2024-01-26 15:22:34 -06:00
Anthony Hu
fe87f16114
Fixes that prevent memory leaks when using OQS.
...
Fixes ZD 17177.
2024-01-26 14:54:01 -05:00
JacobBarthelmeh
3db58af4f8
Merge pull request #7173 from gojimmypi/PR-Espressif-SHA-updates
...
Improved Espressif SHA HW/SW selection
2024-01-26 11:51:15 -07:00
Daniele Lacamera
72e34a829a
Fixed wrong define
2024-01-26 16:35:08 +01:00
JacobBarthelmeh
db3873ff40
Merge pull request #7172 from bandi13/fixUninitVar
...
Fix compilation errors about uninitialized variables
2024-01-26 08:32:41 -07:00
Daniele Lacamera
5b3ba8f4bb
Removed "256-bit hash" references from doxygen
2024-01-26 10:22:40 +01:00
Daniele Lacamera
6dab75368d
[IoT-Safe] Add support sha384 + sha512
2024-01-26 10:20:03 +01:00
gojimmypi
ac6181d7ae
Improved Espressif SHA HW/SW selection
2024-01-25 15:23:58 -08:00
JacobBarthelmeh
578735e06c
Merge pull request #7169 from julek-wolfssl/gh/7160
...
BIO_BIO: BIO_{write|read} on a BIO pair should wrap around ring buffer
2024-01-25 12:08:10 -08:00
lealem47
a13d107db4
Merge pull request #7171 from dgarske/stm32_cube_template
...
Improvements to the STM32Cube template
2024-01-25 10:58:46 -07:00
JacobBarthelmeh
4c7f038149
Merge pull request #7161 from SparkiDev/xmss
...
XMSS implementation
2024-01-25 08:41:13 -08:00
Andras Fekete
4971b9a567
Fix compilation errors about uninitialized variables
...
When compiling with '--enable-all CFLAGS=-Og' there were a ton of errors that needed fixing.
2024-01-25 09:49:30 -05:00
Juliusz Sosinowicz
4f1d777090
BIO_BIO: BIO_{write|read} on a BIO pair should wrap around ring buffer
...
- BIO_nread0 should return 0 when no data to read and -2 when not initialized
2024-01-25 13:46:45 +01:00
Sean Parkinson
a5961907b0
XMSS implementation
...
Supporting code for wolfSSL C implementation of XMSS.
2024-01-25 11:21:39 +10:00
David Garske
7305583f72
Improvements to the STM32Cube template. Fix defaults for ASN template and SNI. Disable Shake by default. Add comment about AES CFB.
2024-01-24 10:35:32 -08:00
JacobBarthelmeh
199a5476ec
Merge pull request #7166 from miyazakh/gcc5_strict-aliasing
...
fix strict-aliasing rules warning on gcc 5.x
2024-01-24 10:18:13 -08:00
Sean Parkinson
999f84518c
RSA Decryption: check private value after decryption
2024-01-24 16:09:15 +10:00
Hideki Miyazaki
00f4afb5ea
fix strict-aliasing rules warning
2024-01-24 12:37:16 +09:00
JacobBarthelmeh
478c0633e7
Merge pull request #7159 from dgarske/features_20240122
...
Add PK Callback CMake support. Document `wc_RsaDirect`
2024-01-23 13:08:03 -08:00
David Garske
fa87e227b4
Restore useful comments above wc_RsaDirect in the .c file.
2024-01-23 08:39:35 -08:00
JacobBarthelmeh
3cbffd33b1
Merge pull request #7162 from per-allansson/dtls13-fips-missing-return
...
Fix missing return in DTLS1.3 / FIPS code
2024-01-23 08:30:11 -08:00
JacobBarthelmeh
1574de1008
Merge pull request #7128 from embhorn/zd17251
...
XC32 compiler version 4.x compatibility
2024-01-23 08:20:39 -08:00
JacobBarthelmeh
938698ec6b
Merge pull request #7157 from philljj/fix_zephyr_benchmark_rsa
...
zephyr samples: fix wolfssl_benchmark RSA.
2024-01-23 08:17:10 -08:00
JacobBarthelmeh
78f7454043
Merge pull request #7154 from anhu/EccKeyParamCopy_error
...
Fix missing heap hint in `EccKeyParamCopy`
2024-01-23 08:11:35 -08:00
David Garske
3b20f49544
Merge pull request #7139 from douzzer/20230118-fix-_sp_mont_red-WOLFSSL_NO_CT_OPS
...
20230118-fix-_sp_mont_red-WOLFSSL_NO_CT_OPS
2024-01-23 07:18:25 -08:00
Per Allansson
92d7815b5c
Fix missing return in DTLS1.3 / FIPS code
2024-01-23 08:35:07 +01:00
David Garske
916c22e021
Add PK (public key) callback support to CMake.
2024-01-22 13:42:31 -08:00
David Garske
3d62896137
Add documentation for wc_RsaDirect.
2024-01-22 13:41:25 -08:00
David Garske
dcc946575b
Fix missing heap hint in EccKeyParamCopy. The XFREE is required or it will leak memory allocated in ASNToHexString. This only applies to WOLFSSL_CUSTOM_CURVES && !WOLFSSL_ASN_TEMPLATE.
2024-01-22 13:18:24 -08:00
Sean Parkinson
b0de0a1c95
Merge pull request #7143 from julek-wolfssl/zd/17303
...
EVP_Cipher: correct parameter checking
2024-01-23 07:15:20 +10:00
jordan
920aaebed7
zephyr samples: fix wolfssl_benchmark RSA.
2024-01-22 14:59:09 -06:00
JacobBarthelmeh
eb1fff3ad3
Merge pull request #7141 from julek-wolfssl/zd/17249
...
EarlySanityCheckMsgReceived: version_negotiated should always be checked
2024-01-22 12:18:57 -08:00
JacobBarthelmeh
f2a76a0630
Merge pull request #7156 from bandi13/checkNullInput
...
Check NULL input
2024-01-22 12:07:20 -08:00
Andras Fekete
5c75ca539e
Check NULL input
2024-01-22 12:45:42 -05:00
JacobBarthelmeh
0c150d2391
Merge pull request #7150 from dgarske/getenv
...
Fix build with `NO_STDIO_FILESYSTEM` and improve checks for `XGETENV`
2024-01-22 08:33:24 -08:00
JacobBarthelmeh
12dafec3aa
Merge pull request #7149 from dgarske/psa_cryptocb
...
Remove the PSA restriction to allow use with crypto callbacks
2024-01-22 08:24:51 -08:00
JacobBarthelmeh
2617669302
Merge pull request #7152 from douzzer/20240120-multi-test-fixes
...
20240120-multi-test-fixes
2024-01-22 08:19:23 -08:00
Anthony Hu
ccbb726859
Remove dead code in EccKeyParamCopy
...
Found with:
./configure --enable-ecccustcurves --enable-asn=original CFLAGS=-DWOLFSSL_ECC_CURVE_STATIC
2024-01-22 10:27:59 -05:00
Juliusz Sosinowicz
fc7143a8f4
Code review
2024-01-22 16:08:06 +01:00
Sean Parkinson
d2d653cfdc
Merge pull request #7145 from douzzer/20240119-DoTls13CertificateVerify-CreateSigData-error-handling
...
20240119-DoTls13CertificateVerify-CreateSigData-error-handling
2024-01-22 07:36:49 +10:00
Sean Parkinson
b0d64b419d
Merge pull request #7084 from julek-wolfssl/set-cipher-ssl
...
Allow SetCipherList to operate on SSL without modifying on SSL_CTX
2024-01-22 07:31:22 +10:00
Daniel Pouzzner
2edd18c49d
src/x509.c: fix nullPointerRedundantCheck in wolfSSL_X509V3_set_ctx(). also adds thorough WOLFSSL_MSG() coverage for failures.
2024-01-20 13:08:21 -06:00
David Garske
d043333bee
Merge pull request #7148 from gojimmypi/PR-fix-Espressif-cmake
...
Fix Espressif component cmake for environment variable source
2024-01-19 13:27:32 -08:00
David Garske
37fbb4fbae
Merge pull request #7146 from kareem-wolfssl/zd17295
...
Remove git ignored files from IAR-EWARM projects.
2024-01-19 13:13:06 -08:00
David Garske
76550465bd
Fixes build with NO_STDIO_FILESYSTEM defined.
2024-01-19 12:49:53 -08:00
David Garske
111f584d99
Remove the PSA restriction to allow use with crypto callbacks.
2024-01-19 12:15:40 -08:00
David Garske
a4affd9431
Improve use of XGETENV in wolfSSL_RAND_file_name to check for macro.
2024-01-19 12:13:19 -08:00
gojimmypi
92ab2eaca3
Fix Espressif component cmake for environment variable source
2024-01-19 11:54:10 -08:00
David Garske
6b8280f663
Merge pull request #7144 from bandi13/20240119-codesonar
...
20240119 codesonar
2024-01-19 09:35:02 -08:00
David Garske
a3a7012c81
Merge pull request #7136 from jpbland1/x509-new-ex
...
add heap hint support for a few of the x509 functions
2024-01-19 09:29:47 -08:00
Kareem
f1e833005b
Remove git ignored files from IAR-EWARM projects.
2024-01-19 10:24:50 -07:00
Daniel Pouzzner
9aa99c0c9a
src/tls13.c: in DoTls13CertificateVerify(), add missing error handling in several calls to CreateSigData().
2024-01-19 11:12:23 -06:00
John Bland
66f04958e3
use wolfSSL_CTX_new_ex for heap hint support
2024-01-19 11:20:50 -05:00
Andras Fekete
dbc209d8ea
Always initialize 'decryptedKey'
...
Warning 750167.5627928
2024-01-19 10:58:29 -05:00
Andras Fekete
7069a1805a
Avoid "Use after free"
...
Warning 544767.5627232
2024-01-19 10:47:38 -05:00
Andras Fekete
2c162ffb97
Make sure aes->rounds is initialized
...
Warning 684346.5627323
2024-01-19 10:39:33 -05:00
Andras Fekete
726e7026cb
Uninitialized variable because we don't check return value
...
Warning 544870.5627882
2024-01-19 10:31:20 -05:00
Juliusz Sosinowicz
1288d71132
Address code review
2024-01-19 15:59:22 +01:00
Juliusz Sosinowicz
f6ef146149
EarlySanityCheckMsgReceived: version_negotiated should always be checked
...
Multiple handshake messages in one record will fail the MsgCheckBoundary() check on the client side when the client is set to TLS 1.3 but allows downgrading.
--> ClientHello
<-- ServerHello + rest of TLS 1.2 flight
Client returns OUT_OF_ORDER_E because in TLS 1.3 the ServerHello has to be the last message in a record. In TLS 1.2 the ServerHello can be in the same record as the rest of the server's first flight.
2024-01-19 14:57:35 +01:00
Juliusz Sosinowicz
afd0e5af4e
Refactor haveAnon into useAnon
...
(ctx->|ssl->options.)useAnon means that the user has signalled that they want anonymous ciphersuites
2024-01-19 14:53:33 +01:00
Juliusz Sosinowicz
b8b847bbcf
Allow SetCipherList to operate on SSL without modifying on SSL_CTX
2024-01-19 14:53:28 +01:00
Juliusz Sosinowicz
67700a1d70
Add libssh2 test
2024-01-19 12:46:53 +01:00
Juliusz Sosinowicz
e438131a3b
EVP_Cipher: correct parameter checking
...
EVP_Cipher(ctx, NULL, NULL, 0) is a valid call for all algorithms. For none-AEAD it results in a no-op.
2024-01-19 12:32:17 +01:00
David Garske
ac81d9d29c
Merge pull request #7110 from Frauschi/pq_secure_element
...
PQC: add CryptoCb support for PQC algorithms
2024-01-18 13:29:28 -08:00
Anthony Hu
9be390250d
Adding support for dual key/signature certificates. ( #7112 )
...
Adding support for dual key/signature certificates with X9.146. Enabled with `--enable-dual-alg-certs` or `WOLFSSL_DUAL_ALG_CERTS`.
2024-01-18 13:20:57 -08:00
David Garske
8a45f43eb0
Merge pull request #7131 from bandi13/fips-check-upgrades
...
Fips check upgrades
2024-01-18 08:21:29 -08:00
David Garske
ec96fcdbae
Merge pull request #7138 from ejohnstown/crl-mon-test-fix
...
CRL Monitor Test Fix
2024-01-18 08:20:05 -08:00
Tobias Frauenschläger
68ea31c52a
Fix install step for liboqs port header
...
Make sure the header file of the liboqs port is properly installed
during a call to `make install`.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-01-18 17:07:39 +01:00
Tobias Frauenschläger
4d259da60a
PQC: CryptoCb support for KEM algorithm Kyber
...
Add support for crypto callback and device id for all three Kyber PQC KEM
function calls.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-01-18 17:02:49 +01:00
Tobias Frauenschläger
8e6d151403
PQC: CryptoCb support for signature algorithms
...
Add initial support of the crypto callback API to the two PQC signature
algorithms Dilithium and Falcon. This ultimatelly enables the usage of
external hardware modules (e.g. secure elements) for these algorithms.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-01-18 17:02:38 +01:00
Daniel Pouzzner
9d56de200e
wolfcrypt/src/sp_int.c: in _sp_mont_red(), gate calls to ctMaskIntGTE() on !WOLFSSL_NO_CT_OPS.
2024-01-18 00:36:52 -06:00
John Safranek
b66a108e97
CRL Monitor Test Fix
...
1. For Mach and FreeBsd builds, add the function link_file() which makes
a hard link for a file.
2. Add a macro STAGE_FILE that either calls copy_file or link_file
depending on doing a Mach or FreeBSD build or not.
This is to work around how the CRL Monitor is detecting file changes
made by the CRL monitor test in the testsuite. Linux and Windows are
detecting the file copies and deletes, and how macOS detects them.
kevent sees the link as a single change to the parent directory and
reads it. When you copy the file, kevent sees the new file getting
opened and triggering the file update.
2024-01-17 21:38:26 -08:00
John Bland
41ea1109ec
update uses of wolfSSL_X509_new and wolfSSL_X509_d2i
...
where heap doesn't require a new ex function or struct field to avoid size increase
2024-01-17 18:46:24 -05:00
David Garske
4f8fd98d0d
Merge pull request #7109 from Frauschi/falcon_compat
...
PQC: Update Falcon support to match OQS
2024-01-17 14:18:32 -08:00
Andras Fekete
41b70b8386
Giving up and reverting back to what it was.
2024-01-17 17:03:37 -05:00
David Garske
d5d279454b
Merge pull request #7137 from douzzer/20240117-nightly-fixes
...
20240117-nightly-fixes
2024-01-17 13:57:48 -08:00
David Garske
5ef6ed56dc
Merge pull request #7135 from lealem47/returnParity
...
Return correct error code in TEMPLATE DecodeECC_DSA_Sig_Ex
2024-01-17 12:34:52 -08:00
Andras Fekete
81aa495b51
Fix missing tags
2024-01-17 14:46:19 -05:00
Daniel Pouzzner
64667a5595
src/crl.c: fix "null pointer passed as argument 2" in new XMEMCPY() call in WC_RSA_PSS path of DupCRL_Entry(), added in b140f93b17, detected by gcc 14.0.0_pre20240107 p15 with sanitizers.
2024-01-17 13:38:05 -06:00
John Bland
03f32b623f
update based on PR comments
2024-01-17 13:22:58 -05:00
David Garske
0b167faa56
Merge pull request #7133 from miyazakh/arm_isb
...
fix unsupported arm instruction compile error
2024-01-17 09:44:49 -08:00
John Bland
d1a3646d5c
add heap hint support for a few of the x509 functions
2024-01-17 11:26:52 -05:00
Tobias Frauenschläger
b2888a9467
Update Falcon support to match OQS
...
Update the OIDs and related variables to match the current OQS values.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-01-17 16:54:26 +01:00
Lealem Amedie
cbc8e98876
Return correct error code in TEMPLATE DecodeECC_DSA_Sig_Ex
2024-01-17 08:49:09 -07:00
Hideki Miyazaki
b2f971555e
isb available > armv6
2024-01-17 13:39:48 +09:00
David Garske
089468fbf1
Merge pull request #7132 from ejohnstown/x25519-ecdhe-psk
...
ECDHE-PSK with x25519
2024-01-16 20:16:01 -08:00
David Garske
11029127df
Merge pull request #7119 from JacobBarthelmeh/crl
...
support for RSA-PSS signatures with CRL
2024-01-16 15:23:16 -08:00
Hideki Miyazaki
1af3502204
Merge pull request #7115 from TakayukiMatsuo/jpcmac
...
Update cmac-api documents
2024-01-17 08:18:11 +09:00
John Safranek
746ffac84a
ECDHE-PSK with x25519
...
1. Add missing assignment of the WOLFSSL object's ecdhCurveOid value. It
is set correctly in the previous cases, but got missed for ECDHE-PSK.
2. Add test cases to the unit testing.
2024-01-16 15:18:05 -08:00
JacobBarthelmeh
b140f93b17
refactor sigParams allocation and adjust test file name
2024-01-16 14:41:24 -07:00
TakayukiMatsuo
cdc46a7ddb
Update cmac-api documents
2024-01-17 06:21:03 +09:00
Andras Fekete
79272b5861
Only take the latest from the repo. Don't need old history.
2024-01-16 15:41:15 -05:00
David Garske
7a77d64d56
Merge pull request #7059 from bigbrett/cryptocb-oneshot-cmac
...
Add cryptoCb hook to one-shot CMAC functions
2024-01-16 12:17:05 -08:00
Andras Fekete
a51c8d54d2
Standardize script style
2024-01-16 11:58:34 -05:00
Andras Fekete
5fc32a1124
Add in 'make check' bypass
2024-01-16 11:58:10 -05:00
JacobBarthelmeh
114d11a8d8
adding RSA-PSS macro guard around CRL use
2024-01-15 15:33:01 -07:00
JacobBarthelmeh
b38e20a721
add crl_rsapss.pem to make dist
2024-01-15 15:19:04 -07:00
David Garske
d4272bb48d
Merge pull request #7129 from bandi13/configurePrintout
...
Print out how ./configure was called
2024-01-15 11:01:19 -08:00
Brett Nicholas
abbf9f2b77
Add cryptoCb hooks to one-shot CMAC functions; add CMAC coverage to cryptoCb tests; add context argument to CMAC generate_ex
2024-01-15 11:52:17 -07:00
Andras Fekete
b5015df35f
Print out how ./configure was called
...
This will make debugging and tracing back from logs much easier
2024-01-15 10:07:00 -05:00
JacobBarthelmeh
5fc71161e9
add crl rsa pss for asn=original
2024-01-11 16:50:16 -07:00
Sean Parkinson
49d258f01a
Merge pull request #7124 from SKlimaRA/SKlimaRA/tls13SessionTicketDoubleFree
...
fixed double free happening during EvictSessionFromCache
2024-01-12 09:09:29 +10:00
Sean Parkinson
9137ed671e
Merge pull request #7107 from ejohnstown/fips-script
...
FIPS Script
2024-01-12 05:07:04 +10:00
Stanislav Klima
909b437571
cleared ticket and ticketNonce
2024-01-11 19:59:12 +01:00
Stanislav Klima
e63c50b1f3
fixed double free happening during EvictSessionFromCache
2024-01-11 19:52:03 +01:00
Sean Parkinson
8c6de41eb9
Merge pull request #7051 from JacobBarthelmeh/mb
...
fix and enhancement for AES-GCM use with Xilsecure
2024-01-12 03:44:43 +10:00
Sean Parkinson
5e8fca420e
Merge pull request #7127 from dgarske/cryptocb_defhash
...
Fix for crypto callbacks to allow invalid devId for non _ex single shot hash functions
2024-01-11 11:22:26 +10:00
Eric Blankenhorn
535d507c16
XC32 compiler version 4.x compatibility
2024-01-10 16:34:40 -08:00
David Garske
340aed5498
Fix for crypto callbacks to allow invalid devId for non _ex single shot hash functions.
2024-01-10 15:33:10 -08:00
John Safranek
d9751aa103
FIPS Script
...
1. Update fips-check.sh for checking out v5.2.0.1 of the fips.c file.
2024-01-10 15:12:59 -08:00
Sean Parkinson
06d7b14af1
Merge pull request #7122 from julek-wolfssl/curl-deps
...
Add curl dependencies
2024-01-11 01:35:07 +10:00
David Garske
a2cfa35dc1
Merge pull request #7123 from bandi13/liberationFromGitHooks
...
Since no one uses this, we should remove commit hooks
2024-01-09 23:03:08 -08:00
David Garske
06a32d3437
Merge pull request #7097 from lealem47/removeUserCrypto
...
Remove user-crypto functionality and Intel IPP support
2024-01-09 17:33:28 -08:00
Andras Fekete
f3761ed28e
Since no one uses this, we should remove commit hooks
2024-01-09 20:31:44 -05:00
Juliusz Sosinowicz
cae231b557
Add curl dependencies
2024-01-09 22:47:59 +01:00
JacobBarthelmeh
cd07e32b13
update crl files and add in compat support for RSA-PSS
2024-01-08 16:38:11 -08:00
billphipps
5631bc9b2d
Merge pull request #7118 from douzzer/20240107-fix-linuxkm-commercial-POC
...
20240107-fix-linuxkm-commercial-POC
2024-01-07 14:33:06 -05:00
Daniel Pouzzner
d722276c50
linuxkm/module_hooks.c: add proper gating for my_fpregs_[un]lock().
2024-01-07 11:16:43 -06:00
Sean Parkinson
0ebf82474a
Merge pull request #7117 from douzzer/20240105-linuxkm-commercial-POC
...
20240105-linuxkm-commercial-POC
2024-01-07 15:15:56 +10:00
Sean Parkinson
08aa39f538
Merge pull request #7094 from dgarske/armasm_thumb_aes
...
Fixes for ARM ASM with Thumb
2024-01-07 15:10:16 +10:00
Daniel Pouzzner
9c36bb9073
linuxkm: add WOLFSSL_COMMERCIAL_LICENSE alternative to kernel_fpu_begin()/kernel_fpu_end() in save_vector_registers_x86()/restore_vector_registers_x86(): allocate wc_linuxkm_fpu_savebufs as a buffer for os_xsave()/os_xrstor(), and use fpregs_lock()/fpregs_unlock() to inhibit softirqs/preemption.
2024-01-05 23:21:24 -06:00
JacobBarthelmeh
d58acef895
add RSA-PSS CRL test case
2024-01-05 14:47:53 -08:00
JacobBarthelmeh
74f0625c89
add native asn template RSA-PSS support with CRL
2024-01-05 14:25:12 -08:00
Daniel Pouzzner
d5d476a3a1
Merge pull request #7113 from bandi13/codeSonarFixes
...
Leak
2024-01-05 12:38:17 -05:00
David Garske
8026aa44c8
Merge pull request #7114 from douzzer/20240104-with-liboqs-clang-tidy
...
20240104-with-liboqs-clang-tidy
2024-01-05 09:17:41 -08:00
David Garske
9e28d5010c
Fixes for ARM ASM with Thumb. Fix for AES ECB build with Thumb. Add alignment to thumb2 AES tables. Refactor alignment macros and expose generic alignment macro XALIGNED. The WOLFSSL_USE_ALIGN still controls alignment enablement in wolfSSL/wolfCrypt. ZD 17225 and ZD 17226
2024-01-05 08:16:02 -08:00
Andras Fekete
f84fa8dd8d
Uninitialized variable
...
Warning 581199.5810097
2024-01-04 17:13:28 -05:00
David Garske
77818d9c54
Merge pull request #6939 from danielinux/iotsafe_4B_ID
...
IoT-SAFE: allow for 4B ID fields
2024-01-04 13:57:26 -08:00
Daniel Pouzzner
7f53bcc4d0
fixes for clang-tidy reported defects and misstylings --with-liboqs:
...
* readability-named-parameter (style)
* bugprone-sizeof-expression (true bugs)
* clang-analyzer-deadcode.DeadStores (true bugs)
* clang-analyzer-core.NonNullParamChecker (true bug)
* clang-diagnostic-newline-eof (style)
* clang-diagnostic-shorten-64-to-32 (true but benign in practice)
fixes for sanitizer reported defects --with-liboqs: null pointer memcpy()s in TLSX_KeyShare_GenPqcKey() and server_generate_pqc_ciphertext().
fixes for silent crypto-critical failure in wolfSSL_liboqsGetRandomData(): refactor to accommodate oversize numOfBytes, and abort() if wc_RNG_GenerateBlock() returns failure.
2024-01-04 15:57:09 -06:00
Sean Parkinson
9e468a900b
Merge pull request #7096 from julek-wolfssl/zd/17219
...
Add fencing to ClientSessionToSession()
2024-01-05 07:24:00 +10:00
Sean Parkinson
a8c94cf22b
Merge pull request #7102 from julek-wolfssl/gh/7093
...
server: allow reading 0-RTT data after writing 0.5-RTT data
2024-01-05 07:20:53 +10:00
Sean Parkinson
32f3f7daab
Merge pull request #7111 from Frauschi/fix_implicit_conversion
...
Fix implicit type conversion
2024-01-05 07:17:31 +10:00
Daniele Lacamera
bda44eda4a
IoT-SAFE: allow for 4B ID fields
2024-01-04 19:18:40 +01:00
Tobias Frauenschläger
3fbbc7c1bb
Fix implicit conversion.
...
Fix implicit type conversion from size_t to word32 in liboqs.c source
file to make it build with clang.
Fixes #7108 .
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2024-01-04 16:55:19 +01:00
Juliusz Sosinowicz
0e1573accc
Code review
2024-01-04 13:49:47 +01:00
Juliusz Sosinowicz
14c812cdb7
Code review
...
Add server side check
2024-01-04 13:19:44 +01:00
Juliusz Sosinowicz
5bdcfaa5d0
server: allow reading 0-RTT data after writing 0.5-RTT data
2024-01-04 13:19:44 +01:00
Daniel Pouzzner
9db20774d8
Merge pull request #7099 from jpbland1/tls13-bounds-check
...
TLS13 padding bounds check
2024-01-04 01:09:36 -05:00
John Bland
b37716f5ce
refactor and remove word16 index
2024-01-03 19:19:13 -05:00
John Bland
245c87fe8f
clean up variable definitions
2024-01-03 17:39:20 -05:00
John Bland
e1435e96d2
do bounds check on full word32 size to match
...
inputBuffer length
2024-01-03 17:21:08 -05:00
JacobBarthelmeh
3f10496757
add weak source of entropy on microblaze to test with
2024-01-03 13:35:00 -08:00
Daniel Pouzzner
bcfaf0372c
Merge pull request #7026 from Frauschi/liboqs
...
Improve liboqs integration
2024-01-03 16:20:26 -05:00
Sean Parkinson
52db533d9b
Merge pull request #7106 from bandi13/20231114-codesonar-fixes
...
20231114 codesonar fixes
2024-01-04 07:16:33 +10:00
Sean Parkinson
100c2ecd6a
Merge pull request #7091 from JacobBarthelmeh/forcezero
...
SHA256 uses ForceZero now too
2024-01-04 07:06:44 +10:00
Daniel Pouzzner
7e60b029c2
Merge branch 'master' into liboqs
2024-01-03 15:56:05 -05:00
Andras Fekete
e5d8ce9983
Fix memset size
2024-01-03 11:09:20 -05:00
Andras Fekete
d164a6c543
Buffer Overrun
...
Warning 545843.5806721
2024-01-03 10:00:31 -05:00
Andras Fekete
b206e074fc
Uninitialized Variable
...
Warning 545067.3236517
2024-01-03 09:59:18 -05:00
Andras Fekete
f5c3fcfec4
Uninitialized variable
...
Warning 581107.3236416
2024-01-03 09:59:18 -05:00
Andras Fekete
c404df78b1
Uninitialized variable
...
Warning 581196.3236230
2024-01-03 09:59:18 -05:00
Andras Fekete
f00c5eb95d
Fix double free
...
Warning 546055.3229451
2024-01-03 09:59:18 -05:00
Daniel Pouzzner
461cf9ea71
Merge pull request #7103 from philljj/fix_infer_issues
...
Fix infer issues
2024-01-02 15:40:24 -05:00
jordan
e175004f85
Fix Infer Uninitialized Values.
2024-01-02 12:16:20 -06:00
JacobBarthelmeh
3901fa6a96
fix check on non aad use
2024-01-02 08:50:59 -08:00
JacobBarthelmeh
f8dbc7f15c
use of device key with AES-GCM and add way to avoid malloc for tag
2024-01-02 08:50:59 -08:00
JacobBarthelmeh
567243d257
touch up autoconf build with xilinx and sp macro guards
2024-01-02 08:50:59 -08:00
Daniel Pouzzner
c8188eaabd
Merge pull request #7100 from philljj/zd17237
...
Fix uninitialized keyUsage in DecodeKeyUsage.
2024-01-02 01:51:45 -05:00
Daniel Pouzzner
6de275111b
Merge pull request #7101 from miyazakh/ra_fsp3p5
...
fix include path for FSP 3.5 on Renesas RA6M4
2024-01-02 01:18:18 -05:00
David Garske
faeae02030
Merge pull request #7104 from douzzer/20231227-cppcheck-2v13v0
...
20231227-cppcheck-2v13v0
2023-12-28 18:03:26 -08:00
Daniel Pouzzner
b17ec3b4bc
cppcheck-2.13.0 mitigations peer review:
...
* add explanation in DoSessionTicket() re autoVariables.
* re-refactor ECC_KEY_MAX_BITS() in ecc.c to use two separate macros, ECC_KEY_MAX_BITS() with same definition as before, and ECC_KEY_MAX_BITS_NONULLCHECK().
* in rsip_vprintf() use XVSNPRINTF() not vsnprintf().
* in types.h, fix fallthrough definition of WC_INLINE macro in !NO_INLINE cascade to be WC_MAYBE_UNUSED as it is when NO_INLINE.
2023-12-28 16:38:47 -06:00
Daniel Pouzzner
44b18de704
fixes for cppcheck-2.13.0 --force:
...
* fix null pointer derefs in wc_InitRsaKey_Id() and wc_InitRsaKey_Label() (nullPointerRedundantCheck).
* fix use of wrong printf variant in rsip_vprintf() (wrongPrintfScanfArgNum).
* fix wrong printf format in bench_xmss_sign_verify() (invalidPrintfArgType_sint).
* add missing WOLFSSL_XFREE_NO_NULLNESS_CHECK variants of XFREE() (WOLFSSL_LINUXKM, FREESCALE_MQX, FREESCALE_KSDK_MQX).
* suppress false-positive uninitvar on "limit" in CheckTLS13AEADSendLimit().
* suppress true-but-benign-positive autoVariables in DoClientHello().
* in wolfcrypt/src/ecc.c, refactor ECC_KEY_MAX_BITS() as a local function to resolve true-but-benign-positive identicalInnerCondition.
* refactor flow in wc_ecc_sign_hash_ex() to resolve true-but-benign-positive identicalInnerCondition.
2023-12-28 15:06:21 -06:00
Hideki Miyazaki
e3346fe3c4
fix include path for FSP 3.5
2023-12-28 16:00:05 +09:00
jordan
46bf30ca77
Fix uninitialized keyUsage in DecodeKeyUsage.
2023-12-27 22:58:52 -06:00
Daniel Pouzzner
457188f55e
Merge pull request #7070 from dgarske/cryptocb_moreinfo
...
Fixes for TLS with crypto callbacks
2023-12-27 18:55:56 -05:00
David Garske
1c4d7285d3
Add documentation for HKDF functions. Improve param comments for devId.
2023-12-27 13:56:40 -08:00
lealem47
fc3977fc77
Merge pull request #7098 from dgarske/stm32_pka
...
Fixes for STM32 PKA
2023-12-27 14:36:53 -07:00
John Bland
e641c6b738
when removing the padding for the TLS13 verify message
...
step, check that the index doesn't wrap around due to a malformed packet
2023-12-27 16:06:40 -05:00
David Garske
cca6cc0495
Make new HDFK _ex functions public.
2023-12-27 11:40:29 -08:00
David Garske
c37edb09f7
Fix STM32 PKA V2 (STM32U5) point multiply missing order/coefB.
2023-12-27 11:37:16 -08:00
Lealem Amedie
837452b1ca
Remove user-crypto functionality and Intel IPP support
2023-12-27 12:24:19 -07:00
David Garske
be8000d5f7
Add useful information about single precision math and document options for enabling additional curves/key sizes.
2023-12-27 10:27:56 -08:00
David Garske
0d057099af
Fix line lengths.
2023-12-27 10:12:52 -08:00
David Garske
65ba8bd6ba
Improve detection of FP_MAX_BITS for RSA or DH.
2023-12-27 10:11:06 -08:00
David Garske
3a798e148b
Fix STM32 PKA ECC cast warning.
2023-12-27 09:57:40 -08:00
David Garske
b86dfffdbe
Improve the TLS v1.3 expand key label warning for possible use of uninitialized "hash".
2023-12-27 09:52:56 -08:00
Juliusz Sosinowicz
157753defe
Detect if using C99 and use correct inline asm notation
2023-12-27 18:02:13 +01:00
Juliusz Sosinowicz
4b21cf3efc
Add fencing to ClientSessionToSession()
...
Prevent memory access before clientSession->serverRow and clientSession->serverIdx are sanitized.
Fixes ZD17219
Co-authored-by: Daniele Lacamera <dan@danielinux.net >
2023-12-27 16:23:52 +01:00
David Garske
b8392ef659
Merge pull request #7092 from douzzer/20231224-clang-unreachable-code-aggressive
...
20231224-clang-unreachable-code-aggressive
2023-12-26 14:56:42 -08:00
Daniel Pouzzner
e68facd889
src/ssl.c: in wolfSSL_curve_is_disabled(), fix shiftTooManyBitsSigned.
2023-12-25 00:27:49 -06:00
Daniel Pouzzner
8a32e7f3f9
fixes for clang -Wunreachable-code-aggressive:
...
tests/suites.c: in SuiteTest(), swap order of (void)s and return.
wolfcrypt/src/chacha.c: gate out unreachable C wc_Chacha_encrypt_bytes() call in wc_Chacha_Process, and gate out unused implementations of wc_Chacha_wordtobyte() and wc_Chacha_encrypt_bytes(), when defined(USE_INTEL_CHACHA_SPEEDUP).
wolfcrypt/src/sha256.c and wolfcrypt/src/sha512.c: fix logic in Sha256_SetTransform() and Sha512_SetTransform() to make the AVX1_RORX implementations accessible. also add a missing Transform_Sha512_Len_p = NULL in the C path of Sha512_SetTransform().
wolfssl/internal.h: for the fallback definition of wolfSSL_curve_is_disabled, use an inline function instead of a compound-clause macro, because clang isn't smart enough to treat the compound expression as a bare constant zero, producing a lame-positive -Wunreachable-code.
2023-12-25 00:23:37 -06:00
JacobBarthelmeh
a97ee9d220
SHA256 uses ForceZero now too
2023-12-22 15:09:34 -08:00
David Garske
d9ac8b5422
Peer review fixes. Fix issues with Tls13HKDFExpandKeyLabel. Fix crypto callback line lengths.
2023-12-22 14:16:59 -08:00
JacobBarthelmeh
daf1d1728f
Merge pull request #7090 from douzzer/20231222-clang-unreachable-code-aggressive
...
20231222-clang-unreachable-code-aggressive
2023-12-22 14:51:20 -07:00
Daniel Pouzzner
e65e9f11c7
fixes for clang -Wunreachable-code-aggressive (-Wunreachable-code/clang-diagnostic-unreachable-code in src/ssl.c:wolfSSL_CTX_load_verify_buffer_ex() and -Wunreachable-code/clang-diagnostic-unreachable-code-return in api.c:myCEKwrapFunc()).
2023-12-22 14:12:13 -06:00
Daniel Pouzzner
59cdd5c70f
Merge pull request #7082 from bandi13/ARIA_Sign_fix
...
Aria sign fix
2023-12-21 19:01:54 -05:00
Sean Parkinson
f77f7c70d3
Merge pull request #7018 from dgarske/ti_aes
...
Fixes for TI AES and SHA
2023-12-22 07:55:00 +10:00
Sean Parkinson
f5ff72aa56
Merge pull request #7087 from dgarske/cryptocb_sha1
...
Allow crypto callbacks with SHA-1 HW
2023-12-22 07:54:50 +10:00
Andras Fekete
b5592c4571
Addressing PR comments
2023-12-21 16:48:15 -05:00
Sean Parkinson
00c9625ab8
Merge pull request #7081 from gojimmypi/PR-Espressif-ESP32-C2
...
Add wolfcrypt SHA support for ESP32-C2/ESP8684, other minor updates
2023-12-22 07:23:51 +10:00
Sean Parkinson
a5a2b3752d
Merge pull request #7077 from gojimmypi/PR-Espressif-threads
...
wolfSSL_NewThread() type update for Espressif FreeRTOS
2023-12-22 07:22:33 +10:00
David Garske
0d212d8055
Further cleanup for Hashes.sha when not required. Gate all TLS SHA-1 on either old TLS or WOLFSSL_ALLOW_TLS_SHA1.
2023-12-21 09:41:29 -08:00
Daniel Pouzzner
5b3aaf8bbd
Merge pull request #7086 from dgarske/rpm_spec
...
Remove obsolete mkdir call
2023-12-21 00:37:22 -05:00
David Garske
9311a961a0
Allow crypto callbacks with SHA-1 HW. Resolves build error in test.c with trying to use HW SHA-1 with crypto cb enabled. Note: sha.h changes are very small if ignoring whitespace.
2023-12-20 15:48:21 -08:00
David Garske
86f9171050
Remove obsolete mkdir call.
2023-12-20 14:52:08 -08:00
David Garske
a5464a9b51
Merge pull request #7083 from douzzer/20231219-clang-analyzer-optin.core.EnumCastOutOfRange
...
20231219-clang-analyzer-optin.core.EnumCastOutOfRange
2023-12-20 14:18:06 -08:00
Daniel Pouzzner
805c2d4487
Merge pull request #7085 from dgarske/async_v5.6.6
...
Fix for invalid `dh_ffdhe_test` test case using Intel QuickAssist
2023-12-20 15:31:58 -05:00
David Garske
00f196d497
Fix for invalid dh_ffdhe_test test with even P when using Intel QuickAssist.
2023-12-20 11:30:17 -08:00
Daniel Pouzzner
f2d573f01f
wolfssl/wolfcrypt/asn.h, src/ssl.c: add "ANONk" to enum Key_Sum, and use the new value in wolfSSL_get_sigalg_info(), fixing clang-analyzer-optin.core.EnumCastOutOfRange.
...
add suppressions in tests for expected clang-analyzer-optin.core.EnumCastOutOfRange's.
2023-12-19 18:14:29 -06:00
Andras Fekete
77e8a66ca3
Not cryptocb's job to sanity check input
...
Don't need to check parameters at every level
2023-12-19 15:55:38 -05:00
Andras Fekete
12192b7683
Set result to invalid as first step
2023-12-19 15:54:25 -05:00
Andras Fekete
f45ffd8802
Rename variable to keep the names similar across functions
2023-12-19 15:37:58 -05:00
Andras Fekete
9e974027a8
Fix ARIA signing
...
Used the wrong function to extract key
2023-12-19 15:33:28 -05:00
David Garske
41d4f4a972
Fix TLS v1.2 case where SHA-1 could be used uninitialized. Exclude the SHA1 struct from HS_Hashes when not needed. Fixes mix-match of the SHA-1 with NO_OLD_TLS and WOLFSSL_ALLOW_TLS_SHA1.
2023-12-19 12:30:53 -08:00
David Garske
fb5eab8f79
Fix one shot hash routines to attempt offloading to crypto callbacks. Fix random.c health test to use devId. Fix FIPS unused "ssl".
2023-12-19 11:20:56 -08:00
David Garske
2001d1c74b
Fixes for TLS v1.3 with crypto callbacks not offloading DeriveKeyMsg, KDF HMAC and ECH.
2023-12-19 08:15:58 -08:00
David Garske
66596ad9e1
Merge pull request #7075 from cconlon/v5.6.6-prep
...
5.6.6 version bump and README changes
2023-12-18 19:14:18 -08:00
gojimmypi
07a5566c52
Add wolfcrypt SHA support for ESP32-C2, other minor updates
2023-12-18 17:35:43 -08:00
David Garske
90748b5f61
Remove the SHA1-/SHA2-256 auto devId selection devId = wc_CryptoCb_GetDevIdAtIndex(0);
2023-12-18 17:14:58 -08:00
David Garske
8b203719d3
Add support for using devId with one-shot hash functions.
2023-12-18 17:14:43 -08:00
David Garske
d5e83310b6
Fix typo with HMAC determination of update/final.
2023-12-18 17:11:33 -08:00
David Garske
205403ebb2
Add more information in the DEBUG_CRYPTOCB.
2023-12-18 17:11:16 -08:00
Lealem Amedie
dd55cdbea8
Initialize variables to NULL
2023-12-18 16:51:51 -07:00
Chris Conlon
5046e577d3
update ChangeLog/README with 5.6.6 release information
2023-12-18 15:24:14 -07:00
Chris Conlon
a003338a88
bump version to 5.6.6
2023-12-18 12:16:34 -07:00
philljj
4e081960d3
Merge pull request #7078 from douzzer/20231218-AddSessionToClientCache-round-2
...
20231218-AddSessionToClientCache-round-2
2023-12-18 13:15:52 -06:00
Daniel Pouzzner
7eed28fbe0
src/ssl.c: in AddSessionToClientCache(), remove benign frivolous assignment, and fix so that ret is assigned only if no error.
2023-12-18 11:15:28 -06:00
Chris Conlon
3e483f32a4
Merge pull request #7076 from douzzer/20231216-client_usage_msg-array-length
...
20231216-client_usage_msg-array-length
2023-12-18 09:30:49 -07:00
gojimmypi
da644c7be3
wolfSSL_NewThread() type update for Espressif FreeRTOS
2023-12-17 11:59:42 -08:00
Daniel Pouzzner
ff9fee758e
examples/client/client.c: fix client_usage_msg undersized array dimension.
2023-12-16 13:22:22 -06:00
Tobias Frauenschläger
8a89470422
Fix for liboqs on zephyr
...
When using WolfSSL on zephyr, we need POSIX names for networking systems
calls. This can either be enabled with CONFIG_NET_SOCKETS_POSIX_NAMES or
with CONFIG_POSIX_API. This commit enables support for the latter.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2023-12-16 12:40:26 +01:00
Tobias Frauenschläger
0780fd9719
liboqs: add RNG support for sphincs
...
Added a RNG argument to the wc_sphincs_sign_msg method to properly
generate necessary random data using the desired WolfSSL RNG object.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2023-12-16 12:40:26 +01:00
Tobias Frauenschläger
85c40b1728
liboqs: add RNG support for falcon
...
Added a RNG argument to the wc_falcon_sign_msg method to properly
generate necessary random data using the desired WolfSSL RNG object.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2023-12-16 12:40:26 +01:00
Tobias Frauenschläger
ec86a86096
liboqs: add RNG support for dilithium
...
Added a RNG argument to the wc_dilithium_sign_msg method to properly
generate necessary random data using the desired WolfSSL RNG object.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2023-12-16 12:40:26 +01:00
Tobias Frauenschläger
755c385b1f
Liboqs: use WolfSSL RNG
...
Improve the interface to liboqs by properly configuring and using the
RNG provided by WolfSSL from within liboqs.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2023-12-16 12:40:25 +01:00
Tobias Frauenschläger
d31e2c3581
Added PQC support for the Zephyr port using liboqs
...
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2023-12-16 12:40:25 +01:00
Chris Conlon
64e48deb0e
Merge pull request #7074 from douzzer/20231215-srtp-cleanup
...
20231215-srtp-cleanup
2023-12-15 14:31:32 -07:00
Daniel Pouzzner
ef14176b7f
SRTP fixes:
...
* in wolfssl/ssl.h, add missing arg names to wolfSSL_CTX_set_tlsext_use_srtp(), wolfSSL_set_tlsext_use_srtp(), and wolfSSL_export_dtls_srtp_keying_material();
* in wolfcrypt/src/kdf.c, call wc_AesFree if and only if wc_AesInit() succeeded;
* in src/ssl.c:DtlsSrtpSelProfiles(), fix bugprone-inc-dec-in-conditions;
* in tests/suites.c:execute_test_case(), fix several -Wdeclaration-after-statement and -Wmissing-field-initializers;
* in wolfcrypt/test/test.c, fix a shiftTooManyBitsSigned warning in srtpkdf_test(), and fix a typo (kaSz/ksSz).
2023-12-15 14:06:36 -06:00
Daniel Pouzzner
8f2a48c676
Merge pull request #7073 from julek-wolfssl/move-mutex-init
...
Move the mutex initializer into the appropriate existing section
2023-12-15 12:17:37 -05:00
Chris Conlon
62b3ca5fb5
Merge pull request #7071 from douzzer/20231214-WOLF_CRYPTO_CB-not-WC_AESFREE_IS_MANDATORY
...
20231214-WOLF_CRYPTO_CB-not-WC_AESFREE_IS_MANDATORY
2023-12-15 09:25:48 -07:00
Juliusz Sosinowicz
57355f357e
Move the mutex initializer into the appropriate existing section
2023-12-15 10:03:06 +01:00
Daniel Pouzzner
7ebbb927f3
wolfssl/wolfcrypt/aes.h: don't set WC_AESFREE_IS_MANDATORY for WOLF_CRYPTO_CB -- free is only needed when callbacks are both installed and used.
2023-12-14 18:09:39 -06:00
Chris Conlon
2ffc818c28
Merge pull request #7069 from douzzer/20231213-misc-fixes
...
20231213-misc-fixes
2023-12-14 15:18:12 -07:00
David Garske
4b771a9b28
Document new macro and rename to: NO_TIME_SIGNEDNESS_CHECK
2023-12-14 13:58:29 -08:00
Chris Conlon
27c6ee4d05
Merge pull request #7068 from SparkiDev/srtp_kdf_label
...
SRTP/SRTCP KDF: add APIs that derives one key from a label
2023-12-14 14:54:58 -07:00
Chris Conlon
fb6b022f42
Merge pull request #7020 from SparkiDev/ecc_gen_k_by_reject
...
ECC: generate values in range of order by rejection
2023-12-14 14:54:39 -07:00
David Garske
8b048bc246
Disable the old TI workarounds. Enable support for CCM.
2023-12-14 13:50:03 -08:00
David Garske
f2e4360f8d
Spelling fixes.
2023-12-14 12:15:32 -08:00
David Garske
1cf87ce0c9
Spelling fix.
2023-12-14 12:14:30 -08:00
Chris Conlon
f6ef58dbc2
Merge pull request #7064 from philljj/fix_infer_issues
...
Fix issues from infer diff report.
2023-12-14 12:27:34 -07:00
Daniel Pouzzner
64e4796ed6
wolfssl/wolfcrypt/wc_port.h: add definition for WOLFSSL_MUTEX_INITIALIZER, currently only #ifdef WOLFSSL_PTHREADS.
...
src/ssl.c: refactor dynamics of count_mutex, count_mutex_valid, and initRefCount, to be intrinsically race-free on pthreads builds, and to be always race-free for callers that call wolfSSL_Init() first, then wait for return before any other wolfSSL calls, and call wolfSSL_Cleanup() at most as many times as wolfSSL_Init().
also, in AddSessionToClientCache(), move final access to ClientCache inside the lock-protected span, to mollify Coverity.
2023-12-14 13:22:27 -06:00
Daniel Pouzzner
16c6bd6846
examples/client/client.c and tests/api.c: add missing CloseSocket() calls.
2023-12-14 13:22:27 -06:00
Chris Conlon
1b76f6d56b
Merge pull request #7065 from miyazakh/fix_ra6m3
...
fix benchmark compile error
2023-12-14 09:15:32 -07:00
Sean Parkinson
659a245b27
SRTP/SRTCP KDF: add APIs that derives one key from a label
...
Added more generic APIs that derive a single key with a label.
Added defines for label values and index lengths.
2023-12-14 14:45:35 +10:00
Hideki Miyazaki
3af91c265b
remove tab
2023-12-14 11:16:36 +09:00
David Garske
0bc244962a
Fixes for TI AES GCM and GMAC.
2023-12-13 17:32:45 -08:00
David Garske
c021e3e85d
Merge pull request #7066 from cconlon/v5.6.6-fixes
...
Fixes from release prep testing, example certificate updates
2023-12-13 17:00:45 -08:00
Chris Conlon
d0aa80eb37
update example/test certs for end of year release
2023-12-13 16:41:59 -07:00
Chris Conlon
a14a1bf467
define WOLFSSL_AES_DIRECT in configure.ac with --enable-aes-bitsliced
2023-12-13 16:41:59 -07:00
Chris Conlon
f5d33cedeb
add variable name in wolfSSL_BIO_new() prototype
2023-12-13 16:41:59 -07:00
Chris Conlon
255086b7c8
fix API test warning, comparison of unsigned expression < 0 is always false
2023-12-13 16:41:59 -07:00
Chris Conlon
d36538c40a
Merge pull request #7063 from embhorn/13dec2023_cov_fixes
...
Fixes for release
2023-12-13 16:19:13 -07:00
jordan
a1b44b6214
Fix issues from infer diff report: init mp_digit to 0.
2023-12-13 17:17:49 -06:00
Hideki Miyazaki
f209120218
fix benchmark compile error
2023-12-14 07:35:32 +09:00
jordan
f222adf4c2
Fix issues from infer diff report.
2023-12-13 15:59:03 -06:00
Chris Conlon
a66137d2fe
Merge pull request #7062 from lealem47/leaks
...
Cleanup leaks in api.c and benchmark.c
2023-12-13 14:09:23 -07:00
Eric Blankenhorn
1d7fd42aa8
Fixes for release
2023-12-13 14:47:02 -06:00
Lealem Amedie
5fd0470f76
Cleanup leaks in api.c and benchmark.c
2023-12-13 13:00:52 -07:00
David Garske
8acee813cb
Merge pull request #7061 from gojimmypi/PR-Espressif-user_settings-fix
...
Fix missing closing comment on example Espressif user_settings.h
2023-12-13 10:44:20 -08:00
Chris Conlon
3d959b96c9
Merge pull request #7060 from dgarske/various_20231212
...
Fix for benchmark without filesystem unused globals
2023-12-13 11:29:28 -07:00
David Garske
56c7e5c675
Merge pull request #7054 from cconlon/sslAlpnSelectCb
...
Add wolfSSL_set_alpn_select_cb() for setting ALPN select callback on WOLFSSL session
2023-12-13 09:24:07 -08:00
gojimmypi
eeb024a30d
fix missing closing comment on example user_settings.h
2023-12-13 09:19:39 -08:00
Chris Conlon
269542ed96
add wolfSSL_set_alpn_select_cb() for WOLFSSL-level ALPN select callbacks
2023-12-13 09:16:44 -07:00
Sean Parkinson
b7b20ededd
Merge pull request #7058 from lealem47/zd17174
...
Check buffer length before XMEMCMP in GetOID
2023-12-13 14:36:23 +10:00
Sean Parkinson
cbd5341332
Merge pull request #7056 from douzzer/20231212-QUIC-WOLFSSL_CALLBACKS-error
...
20231212-QUIC-WOLFSSL_CALLBACKS-error
2023-12-13 14:34:19 +10:00
Sean Parkinson
d455196955
Merge pull request #7055 from dgarske/fix_rpmspec
...
Fixes for RPM Spec: Move the .so to devel files
2023-12-13 14:33:09 +10:00
Sean Parkinson
f12b61183b
Merge pull request #7029 from julek-wolfssl/zd/17108-fix
...
Additional TLS checks
2023-12-13 14:31:11 +10:00
David Garske
3b75a41006
Merge pull request #7057 from kaleb-himes/fix-fips-140-3-pr-failure
...
Address fips 140-3 failures with wolfEngine support enabled
2023-12-12 16:15:40 -08:00
kaleb-himes
ca5adfaecb
Add comments per peer review
2023-12-12 15:21:28 -07:00
kaleb-himes
db7f08e12f
Address fips 140-3 failures with wolfEngine support enabled
2023-12-12 15:14:51 -07:00
Lealem Amedie
2724edc257
Check buffer length before XMEMCMP in GetOID
2023-12-12 15:13:42 -07:00
Sean Parkinson
ce74a34154
Merge pull request #7019 from dgarske/armasm_mmcau
...
Patch to support NXP Kinetis MMCAU SHA2-256 with ARM ASM
2023-12-13 07:26:11 +10:00
Sean Parkinson
6e953e4d53
Merge pull request #7044 from julek-wolfssl/zd/17137
...
ocsp: don't error out if we can't verify our certificate
2023-12-13 07:23:46 +10:00
David Garske
3750ff5205
Fix for benchmark without filesystem and unused hash_input and cipher_input.
2023-12-12 13:22:17 -08:00
Daniel Pouzzner
1cc45b57d7
wolfssl/wolfcrypt/settings.h: add #if defined(WOLFSSL_QUIC) && defined(WOLFSSL_CALLBACKS) #error ("ERROR - tests/quic.c line 1027 failed").
2023-12-12 14:26:25 -06:00
Juliusz Sosinowicz
493bb1760d
Add option to remove early sanity checks
2023-12-12 17:31:48 +01:00
David Garske
573093ddf3
Move the .so to devel files. The pure *.so file is considered a dev file.
2023-12-12 08:15:05 -08:00
Juliusz Sosinowicz
51ba745214
ocsp: don't error out if we can't verify our certificate
...
We can omit either the CeritificateStatus message or the appropriate extension when we can not provide the OCSP staple that the peer is asking for. Let peer decide if it requires stapling and error out if we don't send it.
2023-12-12 14:49:52 +01:00
Juliusz Sosinowicz
627310d26a
Additional TLS checks
...
- double check which messages need to be encrypted
- check msgs that have to be last in a record
ZD17108
2023-12-12 13:57:12 +01:00
Sean Parkinson
21f53f37a1
ECC: generate values in range of order by rejection
...
When generating private key and nonce for ECDSA, use rejection sampling.
Note: SP uses this algorithm
2023-12-12 14:55:56 +10:00
Sean Parkinson
1aed438a21
Merge pull request #7053 from douzzer/20231208-asn-big-short-ints
...
20231208-asn-big-short-ints
2023-12-12 13:53:37 +10:00
Sean Parkinson
043dde18be
Merge pull request #7048 from anhu/PQ_uninit_key_free
...
Prevent freeing uninitialized keys
2023-12-12 13:47:30 +10:00
David Garske
058ffad657
Fix cast warnings on test with -1.
2023-12-11 16:25:47 -08:00
David Garske
8e44018baa
Fix TI AES return codes.
2023-12-11 16:10:48 -08:00
David Garske
68cfaa76fc
Fix for TI-RTOS time. Cleanup forced settings.h for WOLFSSL_TIRTOS. Compiler warning cleanups.
2023-12-11 15:57:26 -08:00
Kaleb Himes
00a1c68f97
Merge pull request #7052 from dgarske/stm32_fips
...
Fix to resolve collision between FIPS `RNG` in settings.h and STM32 HAL header
2023-12-11 16:12:07 -07:00
Daniel Pouzzner
c1b5135918
wolfcrypt/src/evp.c and wolfcrypt/test/test.c: in FIPS builds <5.3, gate out AES-XTS functionality that depends on new APIs added in #7031 ( b14aba48af and 931ac4e568) (AES-XTS is non-FIPS in FIPS <5.3).
2023-12-11 12:14:29 -06:00
Daniel Pouzzner
9c17d5d2fa
support ASN ShortInts up to 4 bytes (2^32-1):
...
* parameterize MAX_LENGTH_SZ using overrideable WOLFSSL_ASN_MAX_LENGTH_SZ, default value 5 (raised from 4).
* refactor other Misc_ASN constants to refer to MAX_LENGTH_SZ as appropriate.
* tweak BytePrecision() appropriately.
* refactor SetShortInt() to use BytePrecision() and include a length assert against MAX_SHORT_SZ to assure no buffer overruns with reduced WOLFSSL_ASN_MAX_LENGTH_SZ.
2023-12-11 12:14:29 -06:00
David Garske
f068bebb94
Fix to resolve collision between RNG in settings.h and the STM32 Cube HAL (ex: stm32h7xx.h). In STM32 platforms we use NO_OLD_RNGNAME (see https://github.com/wolfSSL/wolfssl/blob/master/examples/configs/user_settings_stm32.h#L616 )
2023-12-11 10:01:21 -08:00
David Garske
540012844b
Merge pull request #7049 from lealem47/ghIssue6983
...
Enable cURL and QUIC from CMake
2023-12-11 09:40:31 -08:00
David Garske
cb6676fa27
Merge pull request #7030 from julek-wolfssl/gh/7000
...
Store ssl->options.dtlsStateful when exporting DTLS session
2023-12-11 09:39:54 -08:00
David Garske
b5eb8995c9
Fix possible unused variable warning.
2023-12-11 09:22:47 -08:00
Juliusz Sosinowicz
4ce4dd7479
Use correct size for memset
2023-12-11 14:30:54 +01:00
Sean Parkinson
03a82711aa
Merge pull request #7036 from anhu/SCSV
...
Make sure to send SCSV when application sets ciphersuites
2023-12-11 07:15:23 +10:00
JacobBarthelmeh
ac447d1afb
Merge pull request #7031 from douzzer/20231201-openssl-compat-fixes
...
20231201-openssl-compat-fixes
2023-12-08 17:25:53 -07:00
JacobBarthelmeh
f708d42ef7
Merge pull request #7046 from dgarske/crl_cleanups
...
Various cleanups - CRL and comments - 20231207
2023-12-08 17:15:01 -07:00
JacobBarthelmeh
38eddd7f89
Merge pull request #7043 from gojimmypi/PR-Espressif-README
...
Espressif README files
2023-12-08 17:11:59 -07:00
David Garske
8a5a467543
Patch to support NXP Kinetis MMCAU SHA2-256 (FREESCALE_MMCAU_CLASSIC_SHA) with --enable-armasm.
2023-12-08 15:56:20 -08:00
Lealem Amedie
de4bd42de0
Enable cURL and QUIC from CMake
2023-12-08 15:57:29 -07:00
David Garske
b002c330c0
Fixes for TI AES and SHA.
2023-12-08 14:17:09 -08:00
David Garske
df954568be
Fix typos 2.
2023-12-08 14:17:09 -08:00
David Garske
842a60465a
Fix compiler error for missing Task_Handle. Fix typo.
2023-12-08 14:17:08 -08:00
David Garske
d17955f2d0
Cleanups for the ti-aes.c code to conform with coding standards.
2023-12-08 14:17:08 -08:00
kareem-wolfssl
0c9555b29e
Merge pull request #7045 from julek-wolfssl/memcached-retry
...
Retry memcached tests 3 times on error
2023-12-08 14:03:54 -07:00
JacobBarthelmeh
0ba3646f32
Merge pull request #7037 from gojimmypi/PR-Expressif-Benchmark
...
Espressif benchmark update
2023-12-08 13:51:44 -07:00
Juliusz Sosinowicz
1bf0d8c896
Use SIGKILL to actually kill the runner
2023-12-08 20:23:00 +01:00
Anthony Hu
40015a06c4
Prevent freeing uninitialized keys
2023-12-08 13:52:24 -05:00
gojimmypi
62c0910e15
sync w/upstream; resolve merge conflict
2023-12-08 09:06:10 -08:00
JacobBarthelmeh
448b83697a
Merge pull request #7035 from gojimmypi/PR-Espressif-wolfcrypt
...
Espressif wolfcrypt updates
2023-12-08 09:07:46 -07:00
JacobBarthelmeh
ae9632b14a
Merge pull request #7025 from bandi13/universalScriptSimplify
...
Massively simplify apple-universal script
2023-12-08 09:03:30 -07:00
Juliusz Sosinowicz
6c7b47e003
Store ssl->options.dtlsStateful when exporting DTLS session
2023-12-08 15:35:34 +01:00
Juliusz Sosinowicz
21381b939b
Retry memcached tests 3 times on error
2023-12-08 13:53:08 +01:00
gojimmypi
17c663b257
Espressif README files
2023-12-07 16:21:50 -08:00
David Garske
434526c345
Expand WOLFSSL_NO_CRL_DATE_CHECK to the process cert CRL next date check. Fix typo for DEBUG_CRYPTOCB. Add comments for wc_ValidateDate arguments. Improve linker script example for FIPS to put stdlib before FIPS and not force KEEP.
2023-12-07 14:45:16 -08:00
JacobBarthelmeh
c4b77adf48
Merge pull request #7007 from night1rider/ardunio-wolfssl
...
Ardunio Fixes relating to internal Intel Galileo Tests
2023-12-07 14:48:58 -07:00
Sean Parkinson
6c8bf7be55
Merge pull request #6963 from julek-wolfssl/dynamic-certs-n-ciphers
...
Add API to choose dynamic certs based on client ciphers/sigalgs
2023-12-08 07:45:36 +10:00
Sean Parkinson
61b0efce4f
Merge pull request #7039 from embhorn/zd17127
...
Check for neg size in fp_read_unsigned_bin
2023-12-08 07:44:09 +10:00
gojimmypi
5e5286d30d
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into PR-Expressif-Benchmark
2023-12-07 13:26:20 -08:00
Eric Blankenhorn
27e93276de
Check for neg size in fp_read_unsigned_bin
2023-12-07 14:26:12 -06:00
Anthony Hu
9fda21748a
for clients only
2023-12-07 14:05:33 -05:00
JacobBarthelmeh
5caa71ec6a
Merge pull request #7038 from SparkiDev/heapmath_mp_add_d
...
Heapmath mp_add_d: fix for when a and c same pointer
2023-12-07 10:04:13 -07:00
JacobBarthelmeh
9d0bb4c2bf
Merge pull request #7040 from dgarske/win_vs
...
Fixes for building wolfSSL in Visual Studio
2023-12-07 10:02:33 -07:00
Anthony Hu
3c5b402740
Make sure to send SCSV when application sets ciphersuites
2023-12-07 11:53:55 -05:00
Juliusz Sosinowicz
fbe79d7317
Code review
2023-12-07 11:13:16 +01:00
Daniel Pouzzner
803b17a8b3
src/ssl_crypto.c: in wolfSSL_CMAC_CTX_free(), gate wc_CmacFree() on !FIPS || FIPS>=5.3.
2023-12-06 23:04:52 -06:00
Daniel Pouzzner
106e39bd76
tests/api.c: in test_wc_CmacFinal(), don't use wc_CmacFinalNoFree() if FIPS <5.3.
2023-12-06 21:58:55 -06:00
Daniel Pouzzner
931ac4e568
add documentation for wc_AesXtsInit(), wc_AesXtsSetKeyNoInit(), wc_CmacFinalNoFree(), and wc_CmacFree();
...
rename wc_AesXtsSetKey_NoInit() to wc_AesXtsSetKeyNoInit() for morphological consistency;
refactor wc_AesXtsSetKey() to call wc_AesXtsSetKeyNoInit() and clean up on failure;
readability tweak in wolfSSL_EVP_CipherFinal().
2023-12-06 19:26:46 -06:00
Daniel Pouzzner
b14aba48af
wolfcrypt/src/cmac.c: add wc_CmacFree(), revert wc_CmacFinal(), rename wc_CmacFinal() as wc_CmacFinalNoFree() removing its deallocation clauses, and add new wc_CmacFinal() that calls wc_CmacFinalNoFree() then calls wc_CmacFree() unconditionally, for compatibility with legacy client code (some of which may have previously leaked).
...
tests/api.c: modify test_wc_CmacFinal() to use wc_CmacFinalNoFree() except for the final call.
wolfcrypt/src/aes.c:
* fix wc_AesEaxEncryptAuth() and wc_AesEaxDecryptAuth() to call wc_AesEaxFree() only if wc_AesEaxInit() succeeded.
* fix wc_AesEaxInit() to free all resources on failure.
* revert wc_AesEaxEncryptFinal() and wc_AesEaxDecryptFinal() changes, then change wc_CmacFinal() calls in them to wc_CmacFinalNoFree() calls.
* wc_AesEaxFree(): add wc_CmacFree() calls.
2023-12-06 16:55:57 -06:00
Sean Parkinson
c6d6100136
Merge pull request #7010 from julek-wolfssl/dtls13-0.5-rtt
...
dtls13: Add support for 0.5-RTT data
2023-12-07 08:41:42 +10:00
JacobBarthelmeh
0ffb586030
Merge pull request #7032 from SparkiDev/sp_int_neg_mont_red
...
SP int neg sp_mont_red_ex: disallow negative numbers
2023-12-06 15:04:46 -07:00
Sean Parkinson
226c631feb
Heapmath mp_add_d: fix for when a and c same pointer
...
When parameters a and c to mp_add_d are the same pointer, c->sign was
being set to zero/positive and then a->sign was being checked.
Set the c->sign at end as it will always be zero/positive through the
code and the sign of the result isn't otherwise used.
2023-12-07 07:51:43 +10:00
msi-debian
0ff02e59ba
Fixes relating to issues with internal testing with the Intel Galileo,
...
along with updating the file structure construction for the library.
2023-12-06 14:38:32 -07:00
gojimmypi
f3a9d4a56e
Espressif Benchmark ESP-IDF 4.4 fixes
2023-12-06 13:23:14 -08:00
David Garske
db14914951
Fixes for building wolfSSL in Visual Studio. Adds missing files. Fix for type cast warnings.
2023-12-06 13:20:27 -08:00
gojimmypi
4bd78e5e31
Espressif benchmark update
2023-12-06 12:43:42 -08:00
gojimmypi
7de5710a75
Espressif error not warning for legacy macros
2023-12-06 11:01:51 -08:00
gojimmypi
ca1eba0919
Espressif wolfcrypt updates
2023-12-06 10:05:31 -08:00
JacobBarthelmeh
2c9208b0c6
Merge pull request #6765 from kojo1/zd16462
...
Eliminate bad record mac alert
2023-12-06 09:15:41 -07:00
Sean Parkinson
cf8a6efaa5
SP int neg sp_mont_red_ex: disallow negative numbers
...
Don't support negative a or m with sp_mont_red_ex().
2023-12-06 08:59:54 +10:00
Daniel Pouzzner
689a82a622
fix AES-related code, in both crypto and TLS layers, for various uninitialized data and resource leak defects around wc_AesInit() and wc_AesFree():
...
* followup to https://github.com/wolfSSL/wolfssl/pull/7009 "20231128-misc-fixes" and https://github.com/wolfSSL/wolfssl/pull/7011 "Add missing wc_AesInit calls."
* adds WC_DEBUG_CIPHER_LIFECYCLE, which embeds asserts in low-level AES implementations for proper usage of wc_AesInit() and wc_AesFree().
* fixes native CMAC, AES-EAX, and AES-XTS implementations to assure resource release.
* adds missing wc_AesXtsInit() API, and adds a new wc_AesXtsSetKey_NoInit().
* fixes misspellings in EVP that unconditionally gated out AES-OFB and AES-XTS.
* fixes misspellings in EVP that unconditionally gated out AES-CBC and AES-CFB code in wolfSSL_EVP_CIPHER_CTX_cleanup_cipher().
* openssl compat AES low level cipher API has no counterpart to wc_AesFree(), so these compat APIs will now be gated out in configurations where they would otherwise leak memory or file descriptors (WOLFSSL_AFALG, WOLFSSL_DEVCRYPTO, WOLF_CRYPTO_CB, etc.). A new macro, WC_AESFREE_IS_MANDATORY, is defined in wolfcrypt/aes.h to streamline this dependency.
* fixes 40 missing EVP_CIPHER_CTX_cleanup()s and 11 wc_AesFree()s in src/ssl.c, src/ssl_crypto.c, tests/api.c, and wolfcrypt/test/test.c.
2023-12-05 15:58:09 -06:00
JacobBarthelmeh
7753e3db8a
Merge pull request #6844 from gojimmypi/Espressif-client-server-example
...
Espressif ESP32 Benchmark, Test, TLS 1.3 Client & Server Updates
2023-12-05 14:20:02 -07:00
JacobBarthelmeh
223d8c9a10
Merge pull request #7004 from julek-wolfssl/zd/17033
...
x509 AIA: store the first OCSP and CA Issuer URI's
2023-12-05 14:08:43 -07:00
gojimmypi
fb77319758
Espressif examples: polish & misc updates
2023-12-05 10:36:05 -08:00
JacobBarthelmeh
4c85a5a146
Merge pull request #7028 from ejohnstown/ocsp-err-ret
...
OCSP Error Return
2023-12-05 11:00:51 -07:00
David Garske
b92aa59bd8
Merge pull request #6692 from JacobBarthelmeh/tls13
...
fix setting ssl error with TLS 1.3 connect socket errors
2023-12-05 09:15:29 -08:00
gojimmypi
ce2c256544
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into Espressif-client-server-example
2023-12-05 08:02:31 -08:00
JacobBarthelmeh
1857648d7d
Merge pull request #6976 from embhorn/gh6974
...
Fix build errors with dtls1.3 and no tls1.2
2023-12-04 14:53:35 -07:00
John Safranek
52658c51a9
OCSP Error Return
...
1. In CheckOcspResponse(), remove the existing check for UNKNOWN
certificate status. Given the values of ret and ocsp->error, unknown
won't get checked.
2. Separated checks for UKNOWN and REJECTED for logging purposes. Return
that as an error.
3. Anything else should be a failure.
2023-12-04 11:31:04 -08:00
Jacob Barthelmeh
ef536f541f
fix setting ssh error with TLS 1.3 connect socket errors
2023-12-04 09:09:09 -07:00
Sean Parkinson
195c14ccaf
Merge pull request #6919 from JacobBarthelmeh/cert_dates
...
add self-sm2-cert.pem to certificate regen script
2023-12-04 09:05:37 +10:00
JacobBarthelmeh
5297cc74b4
Merge pull request #7016 from anhu/aes_init_docs
...
Add missing references to wc_AesInit in the API docs.
2023-12-01 16:59:49 -07:00
JacobBarthelmeh
adcc21b538
Merge pull request #6997 from cconlon/jniAlwaysVerifyCb
...
Update --enable-jni with WOLFSSL_ALWAYS_VERIFY_CB
2023-12-01 16:58:08 -07:00
JacobBarthelmeh
3ad0e1ef72
Merge pull request #7021 from res0nance/arm64-aes-gcm-clobber
...
AES GCM ARM64: Fix clobber lists
2023-12-01 16:52:14 -07:00
JacobBarthelmeh
c4ab1e6d47
Merge pull request #7017 from SparkiDev/asn_tmpl_ecc_raw_to_sig_fix
...
ASN template: StoreECC_DSA_Sig_Bin
2023-12-01 16:11:15 -07:00
JacobBarthelmeh
fa0362fd2b
Merge pull request #7022 from julek-wolfssl/faster-memcached-tests
...
Parallelised memcached tests
2023-12-01 16:05:17 -07:00
JacobBarthelmeh
44d52c599c
Merge pull request #7023 from SparkiDev/test_dsa_fix
...
Test DSA: fix unused variables
2023-12-01 15:53:08 -07:00
Chris Conlon
883d1a25be
add WOLFSSL_ALWAYS_VERIFY_CB to --enable-jni, used with JSSE X509ExtendedTrustManager hostname verification
2023-12-01 09:23:10 -07:00
Andras Fekete
822405a6d8
Massively simplify apple-universal script
2023-12-01 09:44:43 -05:00
Sean Parkinson
02f8735abf
Test DSA: fix unused variables
...
test.c: fix #if protection around unused variables
2023-12-01 11:04:53 +10:00
JacobBarthelmeh
abab390dd4
Merge pull request #7015 from lealem47/zd17088
...
Reworking MinGW mutex/threading
2023-11-30 17:00:19 -07:00
JacobBarthelmeh
a1e74d9974
Merge pull request #7014 from SparkiDev/ssl_free_tlsx_fixup
...
SSL_free, TLSX_Remove calls: fix #if protection
2023-11-30 16:56:46 -07:00
Sean Parkinson
8097ed74c3
Merge pull request #7012 from philljj/spelling_cleanup
...
Used codespell and fixed obvious typos.
2023-12-01 07:24:21 +10:00
Anthony Hu
cfa1b589c6
minor fix again
2023-11-30 15:26:42 -05:00
Anthony Hu
e6bd8dce6e
Minor fix.
2023-11-30 15:18:47 -05:00
jordan
9265142369
Used codespell and fixed obvious typos.
2023-11-30 13:09:55 -06:00
JacobBarthelmeh
cbe8309b3b
Merge pull request #7013 from SparkiDev/asm_arm_clobber_cc
...
ARM asm: add "cc" to all clobber lists
2023-11-30 11:05:03 -07:00
JacobBarthelmeh
a7e5c6c721
Merge pull request #7011 from philljj/add_missing_aesinit
...
Add missing wc_AesInit calls.
2023-11-30 11:01:02 -07:00
JacobBarthelmeh
cc65c3ec98
Merge pull request #7009 from douzzer/20231128-misc-fixes
...
20231128-misc-fixes
2023-11-30 10:59:42 -07:00
Daniel Pouzzner
cb381a2336
src/tls.c: fix misspelling in TLSX_KeyShare_ProcessPqc().
2023-11-30 10:12:17 -06:00
Juliusz Sosinowicz
52d6073c9c
Parallelised memcached tests
2023-11-30 16:02:13 +01:00
Sean Parkinson
21f662c7d1
ASN template: StoreECC_DSA_Sig_Bin
...
Strip leading zeros from R and S before encoding in ASN.1.
2023-11-30 20:31:29 +10:00
res0nance
14ba944f6c
AES GCM ARM64: Fix clobber lists
2023-11-30 12:33:42 +08:00
Daniel Pouzzner
44db4f3e5a
wolfssl/wolfcrypt/settings.h: add needed (void)s for unused args to several XMALLOC/XFREE/XREALLOC macros that were missing them.
2023-11-29 18:34:47 -06:00
jordan
8c1ab783a1
Add missing wc_AesInit calls: small cleanup.
2023-11-29 18:02:45 -06:00
Anthony Hu
ad1f709455
Add missing references to wc_AesInit in the API docs.
2023-11-29 18:47:26 -05:00
Lealem Amedie
e1ac56f2dd
Reworking MINGW mutex/threading
2023-11-29 16:45:06 -07:00
Sean Parkinson
7ebad05446
SSL_free, TLSX_Remove calls: fix #if protection
...
TLSX_Remove calls added to FreeHanshakeResources() for when TLSX_FreeAll
can't be called but TLSX still being used.
Fix #if protection to compile in TLSX_Remove calls when available.
2023-11-30 09:27:29 +10:00
JacobBarthelmeh
6125e595bb
Merge pull request #6989 from dgarske/stm32_bench
...
Updated STM32L4 (Cortex-M at 80MHz) benchmarks
2023-11-29 16:18:29 -07:00
Sean Parkinson
11e5544032
ARM asm: add "cc" to all clobber lists
...
Carry flags are more often than not affected by assembly code.
Carry wasn't in any inline assembly clobber list.
Always clobber "cc" to be safe.
2023-11-30 08:40:37 +10:00
Juliusz Sosinowicz
e891c721b8
fixup! dtls13: Add support for 0.5-RTT data
2023-11-29 23:22:38 +01:00
Juliusz Sosinowicz
3edfcfe162
Jenkins fixes
2023-11-29 23:17:10 +01:00
Juliusz Sosinowicz
9337cfbb16
Add wolfSSL_get_sigalg_info
2023-11-29 23:04:19 +01:00
Juliusz Sosinowicz
7c2344c389
Add API to get information about ciphersuites
2023-11-29 23:04:19 +01:00
Juliusz Sosinowicz
fbd8996949
Add API to choose dynamic certs based on client ciphers/sigalgs
2023-11-29 23:04:19 +01:00
Daniel Pouzzner
73ca6daf2b
wolfssl/wolfcrypt/types.h: add needed (void)s for unused args to several XMALLOC/XFREE/XREALLOC macros that were missing them.
...
src/quic.c: fix misspelled DYNAMIC_TYPE_TMP_BUFFER.
2023-11-29 16:02:39 -06:00
jordan
3158e04863
Add missing wc_AesInit calls.
2023-11-29 12:54:28 -06:00
Daniel Pouzzner
93ab397c56
wolfcrypt/test/test.c: fix memory leak in dsa_test().
2023-11-29 12:28:39 -06:00
Juliusz Sosinowicz
a7dce98797
Don't touch processReply state in DoApplicationData
2023-11-29 19:11:49 +01:00
Daniel Pouzzner
962bf88c9d
wolfcrypt/src/ecc.c: add missing semicolon in SAVE_VECTOR_REGISTERS() args.
2023-11-29 11:59:35 -06:00
Juliusz Sosinowicz
c87339e5c3
dtls13: Add support for 0.5-RTT data
2023-11-29 15:55:59 +01:00
Daniel Pouzzner
4642077146
src/ssl.c: remove frivolous (void)heap to clear -Wdeclaration-after-statement.
...
wolfcrypt/src/aes.c: add NEED_AES_TABLES gate around AesSetKey_C() implementations (fixes WOLFSSL_KCAPI_AES builds, probably among others).
wolfcrypt/src/sp_int.c: add missing casts to clear -Wconversions.
2023-11-28 23:25:31 -06:00
JacobBarthelmeh
12ee732fe2
Merge pull request #6981 from douzzer/20231102-vector-register-dynamic-fallback-aes
...
20231102-vector-register-dynamic-fallback-aes
2023-11-28 13:15:02 -07:00
JacobBarthelmeh
61a2d2de3d
Merge pull request #6955 from SparkiDev/rsa_dec_inv_blind_mul_mont
...
RSA private exponentiation: multiply blinding invert in Mont
2023-11-28 11:08:57 -07:00
JacobBarthelmeh
a111c5b27f
Merge pull request #6993 from SparkiDev/thumb2_iar_no_inline_fix_2
...
SP Thumb2: make function no-inline
2023-11-28 10:47:58 -07:00
JacobBarthelmeh
373fc537f1
Merge pull request #7003 from SparkiDev/ssl_make_x25519_key_temp
...
SSL: make temp X25519/X448 key failure
2023-11-28 10:46:51 -07:00
JacobBarthelmeh
0ac27eb039
Merge pull request #7005 from SparkiDev/memusage_fix_5
...
Memory usage fixes: nonce type and TLSX extension free
2023-11-28 10:42:04 -07:00
Sean Parkinson
09d2ba8bc8
Memory usage fixes: nonce type and TLSX extension free
...
Nonce ciphers other than AES. Free uses DYNAMIC_TYPE_CIPHER.
AES allocation must use DYNAMIC_TYPE_CIPHER too.
If not all TLSX extensions can be freed, then free the ones that can.
Update TLSX_free() to have a message for each case.
2023-11-28 12:56:06 +10:00
David Garske
4b74a2f006
Updated STM32L4 (Cortex-M at 80MHz) benchmarks with v5.6.4 using the new ARM ASM speedups.
2023-11-27 15:48:32 -08:00
JacobBarthelmeh
602bd3b506
Merge pull request #6996 from SparkiDev/armv8_aes_gcm_init_stream_iv
...
ARMv8 AES-GCM streaming: check size of IV before storing
2023-11-27 09:39:46 -07:00
JacobBarthelmeh
36015e9131
Merge pull request #6998 from SparkiDev/tls_pad_no_hash_raw_fix
...
TLS_hmac: when no raw hash, make sure maxSz is not neg
2023-11-27 09:37:57 -07:00
JacobBarthelmeh
9f06d337e3
Merge pull request #6992 from SparkiDev/heapmath_addmod_ct
...
Heap math: mp_add/submod_ct make work when c == d
2023-11-27 09:28:49 -07:00
Juliusz Sosinowicz
8ac891d902
x509 AIA: store the first OCSP and CA Issuer URI's
...
Solves ZD17033
2023-11-27 14:47:36 +01:00
Sean Parkinson
f65f8be176
SSL: make temp X25519/X448 key failure
...
On failure to make the temporary X25519/X448 key, free it as the type is
stored in eccTempKeyPresent which also indicates a valid key is present.
Otherwise on SSL free, it will default to freeing the key with ECC APIs.
2023-11-27 08:50:22 +10:00
JacobBarthelmeh
008d4958bf
Merge pull request #7001 from dgarske/testnb
...
Fix for TLS v1.3 in non-blocking loosing return code from `SendBuffered`
2023-11-24 12:34:57 -07:00
David Garske
09b6974ae9
Fix for TLS v1.3 in non-blocking loosing return code from SendBuffered. Example: SendBuffered returns WANT_WRITE (-327) and sets ssl->error, then below it was doing ssl->error = ret where ret = 0.
2023-11-24 09:30:09 -08:00
Sean Parkinson
d83a5a955c
SP Thumb2: make function no-inline
...
Lost changes that make function not inlined.
2023-11-24 15:38:11 +10:00
Sean Parkinson
bc36202087
TLS_hmac: when no raw hash, make sure maxSz is not neg
...
When padding byte is invalid, the maxSz can be negative.
Make maxSz 0 in this case so that blocks doesn't get very large and
cause delays.
2023-11-23 09:51:44 +10:00
JacobBarthelmeh
2e89e46c0b
Merge pull request #6990 from gojimmypi/PR-Espressif-C3-C6-S2-HW
...
Espressif ESP32-C3 ESP32-C6 ESP32-S2 Hardware Acceleration
2023-11-22 16:21:41 -07:00
JacobBarthelmeh
5b3f5496f8
Merge pull request #6430 from kareem-wolfssl/memcached
...
Add memcached support.
2023-11-22 16:20:28 -07:00
gojimmypi
98e8ee65dd
remove stray Espressif include.am entry
2023-11-22 15:10:09 -08:00
gojimmypi
967a0c9625
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into Espressif-client-server-example
2023-11-22 15:04:15 -08:00
JacobBarthelmeh
7036c8440b
Merge pull request #6995 from gojimmypi/PR-var-init
...
Initialize variables to appease Espressif compiler
2023-11-22 15:54:40 -07:00
Sean Parkinson
b242b44b2c
ARMv8 AES-GCM streaming: check size of IV before storing
...
Only store IV in Init function if it will fit in reg field of Aes
object.
2023-11-23 08:01:20 +10:00
JacobBarthelmeh
14e8ffcc18
remove locality from self-sm2-cert.pem
2023-11-22 14:30:27 -07:00
Sean Parkinson
416ce54276
Heap math: mp_add/submod_ct make work when c == d
...
mp_addmod_ct and mp_submod_ct expected c and d to be different pointers.
Change code to support this use case.
Fix whitespace.
2023-11-23 07:28:55 +10:00
gojimmypi
2da88115a6
Upstream merge + resolve conflict.
2023-11-22 13:17:14 -08:00
JacobBarthelmeh
e197d5f8a3
add self-sm2-cert.pem to certificate regen script
2023-11-22 14:14:07 -07:00
gojimmypi
6c41a6a374
Initialize variables to appease Espressif compiler
2023-11-22 13:02:51 -08:00
gojimmypi
5b01270205
Update all Expressif examples, ready for PR #6990
2023-11-22 12:37:15 -08:00
JacobBarthelmeh
0306d07c47
Merge pull request #6994 from embhorn/gh6988
...
Fix spelling warnings
2023-11-22 13:29:51 -07:00
Kareem
e175410b00
memcached: Revert wolfSSL_in_connect_init changes
2023-11-22 11:55:16 -07:00
Eric Blankenhorn
7223b5a708
Fix spelling warnings
2023-11-22 12:34:56 -06:00
JacobBarthelmeh
2f920b5cc4
Merge pull request #6892 from embhorn/gh6890
...
Add error reporting to loadX509orX509REQFromBuffer
2023-11-22 11:18:45 -07:00
JacobBarthelmeh
9810a8cd86
Merge pull request #6991 from lealem47/gh6983
...
Option to enable DTLS-SRTP in CMake
2023-11-22 11:09:30 -07:00
Kareem
72cbd9a44e
memcached: Code review feedback
2023-11-21 17:59:55 -07:00
gojimmypi
9227020f8e
code review updates for ESP32 C3/C6/S2 HW Acceleration
2023-11-21 16:22:49 -08:00
JacobBarthelmeh
dda72dc19c
Merge pull request #6979 from SparkiDev/sp_arm64_noinline
...
SP ARM64 P-256: mark functions as SP_NOINLINE
2023-11-21 09:48:08 -07:00
JacobBarthelmeh
60909d5cba
Merge pull request #6971 from SparkiDev/iar_thumb2_asm
...
IAR Thumb2 ASM: fixes
2023-11-21 09:46:31 -07:00
JacobBarthelmeh
ebbeb6c69e
Merge pull request #6984 from res0nance/pqc-crash-fix
...
tls: return immediately if kyber_id2type() fails
2023-11-21 09:35:22 -07:00
gojimmypi
7e69030df1
Espressif ESP32-C3 ESP32-C6 ESP32-S2 Hardware Acceleration
2023-11-20 18:05:18 -08:00
Sean Parkinson
9ac3083e5d
Thumb2 ASM fixes
...
Make a separate AES for IAR that has AES_encrypt_block and
AES_decrypt_block inlined. Default code is relying on compiler to use
specific registers and not modify others.
Improve performance of small SP ASM code for RSA.
2023-11-21 11:58:10 +10:00
Sean Parkinson
e97e1b5847
SP ARM64 P-256: mark functions as SP_NOINLINE
...
iOS device compilations are inlining functions and causing P-256 to
fail.
Add SP_NOINLINE to key P-256 functions.
Add "cc" to more clobber lists.
2023-11-21 10:43:38 +10:00
Lealem Amedie
846b91ea1b
Enable DTLS-SRTP in CMake
2023-11-20 15:58:59 -07:00
JacobBarthelmeh
665469f02a
Merge pull request #6986 from douzzer/20231119-all-cryptonly-opensslextra
...
20231119-all-cryptonly-opensslextra
2023-11-20 15:29:14 -07:00
JacobBarthelmeh
538ce14c62
Merge pull request #6953 from SKlimaRA/SKlimaRA/enable-ca-false
...
Enable encoding CA:FALSE with build flag
2023-11-20 15:03:14 -07:00
David Garske
14906df3ec
Merge pull request #6970 from anhu/AES_with_FREESCALE_MMCAU
...
Fix build errors when defining FREESCALE_MMCAU
2023-11-20 09:32:49 -08:00
Kareem
ca61034d22
Add memcached support.
...
memcached support: add required functions/defines.
Fix running unit test when defining DEBUG_WOLFSSL_VERBOSE without OPENSSL_EXTRA.
Break out session_id_context APIs into separate option WOLFSSL_SESSION_ID_CTX, so they can be used without OPENSSL_EXTRA.
Make wolfSSL_ERR_get_error and wolfSSL_CTX_set_mode available for memcached.
Add --enable-memcached.
Include required defines for memcached.
Revert unit test fix, no longer needed.
Add Github actions test for memcached. Stop defining DEBUG_WOLFSSL_VERBOSE for memcached.
Add auto retry to writes.
Memcached CI: correct libevent package name.
Memcached CI: Add pkgconfig path for Github CI wolfSSL prefix.
memcached: Fix WOLFSSL_OP_NO_RENEGOTIATION going outside of int bounds, add LD_LIBRARY_PATH for memcached CI test.
memcached CI: Use correct path for wolfSSL
memcached: Add required perl dependency for SSL tests
memcached: Update to 1.6.22
memcached: actually test tls
memcached: Update wolfSSL_SSL_in_before to be side agnostic.
2023-11-20 10:10:34 -07:00
JacobBarthelmeh
cbb270bc15
Merge pull request #6982 from julek-wolfssl/nginx-1.24.0-tests
...
Add nginx 1.24.0 testing
2023-11-20 10:08:06 -07:00
David Garske
7566328610
Implement proper wc_AesSetKeyLocal for NXP/Freescale MMCAU and LTC. This is required for AES CTR and AES Direct.
2023-11-20 08:15:50 -08:00
Anthony Hu
3fa612f49f
Fix build errors when defining FREESCALE_MMCAU
2023-11-20 08:15:45 -08:00
Daniel Pouzzner
7dedfe08ef
cryptonly and linuxkm fixes: fix --enable-all[-crypto] with --enable-opensslextra and --enable-cryptonly (build failures detected by multi-test linuxkm-all-asm-cryptonly-opensslextra-pie after merge of 54f2d56300 and e2bbacd548).
2023-11-19 17:22:46 -06:00
Sean Parkinson
9ed0018954
Merge pull request #6980 from gojimmypi/SM-cipher-type-PR
...
Fix evp SM cipherType check
2023-11-20 07:22:54 +10:00
res0nance
98789dc000
tls: return immediately if kyber_id2type() fails
...
This prevents a crash as ecc_key is not initialized but the
free function is still called.
2023-11-18 15:44:03 +08:00
Daniel Pouzzner
06dcc114c1
Merge pull request #6868 from lealem47/microsecond
...
Run benchmarks at microsecond level and record advanced stats
2023-11-17 20:09:07 -05:00
Lealem Amedie
64b98981de
Fix for g++
2023-11-17 16:44:24 -07:00
Daniel Pouzzner
efa61ade89
wolfcrypt/src/aes.c: add fallthrough no-op definitions for VECTOR_REGISTERS_{PUSH,POP} to cover WOLFSSL_TI_CRYPT || WOLFSSL_ARMASM.
2023-11-17 16:55:40 -06:00
Lealem Amedie
a95a7c7e08
One last missing cast
2023-11-17 13:55:49 -07:00
Lealem Amedie
ca195445a3
Add proper casts
2023-11-17 13:33:34 -07:00
Lealem Amedie
07d6d75d72
Fix for sanitizer finds
2023-11-17 13:28:30 -07:00
Daniel Pouzzner
347a17f7cf
wolfcrypt/src/aes_asm.asm: fix missed _AESNI suffixing.
2023-11-17 10:15:03 -06:00
gojimmypi
16dba37ae6
fix wolfSSL_EVP_CIPHER_CTX_ctrl() SM GCM/CCM type
2023-11-17 07:56:56 -08:00
Juliusz Sosinowicz
03f3e6c6af
Add nginx 1.24.0 testing
2023-11-17 10:48:46 +01:00
Daniel Pouzzner
a10260ca5f
refactor AESNI implementations and *VECTOR_REGISTERS* macros to allow dynamic as-needed fallback to pure C, via WC_AES_C_DYNAMIC_FALLBACK.
...
wolfssl/wolfcrypt/aes.h: add key_C_fallback[] to struct Aes, and remove comment that "AESNI needs key first, rounds 2nd, not sure why yet" now that AES_128_Key_Expansion_AESNI no longer writes rounds after the expanded key.
wolfcrypt/src/aes.c:
* add _AESNI or _aesni suffixes/infixes to AESNI implementations that were missing them: AES_CBC_encrypt(), AES_CBC_decrypt_by*(), AES_ECB_encrypt(), AES_*_Key_Expansion(), AES_set_encrypt_key(), AES_set_decrypt_key(), AES_GCM_encrypt(), AES_GCM_decrypt(), AES_XTS_encrypt(), and AES_XTS_decrypt().
* move key size check from to start of wc_AesSetKeyLocal().
* refactor pure-C AES setkey and cipher implementations to use aes->key_C_fallback when defined(WC_AES_C_DYNAMIC_FALLBACK).
* refactor wc_AesSetKeyLocal() to set up both AESNI and pure-C expanded keys when defined(WC_AES_C_DYNAMIC_FALLBACK).
* refactor all (haveAESNI && aes->use_aesni) conditions to just (aes->use_aesni).
* add macros VECTOR_REGISTERS_PUSH and VECTOR_REGISTERS_POP, which do nothing but push a brace level when !defined(WC_AES_C_DYNAMIC_FALLBACK), but when defined(WC_AES_C_DYNAMIC_FALLBACK), they call SAVE_VECTOR_REGISTERS2() and on failure, temporarily clear aes->use_aesni and restore at _POP().
* refactor all invocations of SAVE_VECTOR_REGISTERS() and RESTORE_VECTOR_REGISTERS() to VECTOR_REGISTERS_PUSH and VECTOR_REGISTERS_POP, except in wc_AesSetKeyLocal(), wc_AesXtsEncrypt(), and wc_AesXtsDecrypt(), which are refactored to use SAVE_VECTOR_REGISTERS2(), with graceful failure concealment if defined(WC_AES_C_DYNAMIC_FALLBACK).
* orthogonalize cleanup code in wc_AesCbcEncrypt(), wc_AesCcmEncrypt() and wc_AesCcmDecrypt().
* streamline fallthrough software definitions of wc_AesEncryptDirect() and wc_AesDecryptDirect(), and remove special-casing for defined(WOLFSSL_LINUXKM)&&defined(WOLFSSL_AESNI).
wolfcrypt/src/aes_asm.{S,asm}:
* remove errant "movl $10, 240(%rsi)" from AES_128_Key_Expansion_AESNI.
* add _AESNI suffixes/infixes to implementations that needed them.
wolfcrypt/src/{aes_gcm_asm.{S,asm},aes_xts_asm.S}: regenerate from revisions in scripts#357 -- adds _aesni suffixes to implementations that were missing them.
wolfssl/wolfcrypt/types.h: remove DEBUG_VECTOR_REGISTER_ACCESS macros, and add dummy fallthrough definitions for SAVE_VECTOR_REGISTERS2 and WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL.
wolfssl/wolfcrypt/memory.h: adopt DEBUG_VECTOR_REGISTER_ACCESS code from types.h, and add definitions for WC_DEBUG_VECTOR_REGISTERS_RETVAL_INITVAL and WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL.
linuxkm/linuxkm_wc_port.h: add arch-specific macro definitions for SAVE_VECTOR_REGISTERS2().
wolfcrypt/benchmark/benchmark.c: add missing gates around calls to RESTORE_VECTOR_REGISTERS().
configure.ac:
* cover various interdependencies in enable-all/enable-all-crypto, for better behavior in combination with --disable-aesgcm, --disable-ecc, --disable-ocsp, --disable-hmac, --disable-chacha, --disable-ed25519, and --disable-ed448.
* inhibit aesgcm_stream in enable-all/enable-all-crypto when ENABLED_LINUXKM_DEFAULTS, because it is currently incompatible with WC_AES_C_DYNAMIC_FALLBACK.
* add -DWC_AES_C_DYNAMIC_FALLBACK when ENABLED_LINUXKM_DEFAULTS.
* add 3 new interdependency checks: "ECCSI requires ECC.", "SAKKE requires ECC.", "WOLFSSH requires HMAC."
wolfcrypt/src/asn.c: tweak gating to accommodate defined(NO_RSA) && !defined(HAVE_ECC).
wolfcrypt/src/evp.c: tweak gating to accommodate defined(NO_HMAC).
wolfcrypt/src/logging.c: remove DEBUG_VECTOR_REGISTER_ACCESS code (moved to memory.c).
wolfcrypt/src/memory.c: change #include of settings.h to types.h; adopt DEBUG_VECTOR_REGISTER_ACCESS code from logging.c; add implementation of SAVE_VECTOR_REGISTERS2_fuzzer().
wolfcrypt/src/pwdbased.c: add explanatory #error scrypt requires HMAC.
wolfcrypt/test/test.c:
* add DEBUG_VECTOR_REGISTER_ACCESS clauses to aes_xts_128_test(), aesecb_test(), aesctr_test(), aes_test() CBC section, aes256_test() CBC section, and aesgcm_default_test_helper()
* remove duplicate wc_AesEcbDecrypt() in aesecb_test().
* add gating for pbkdf2_test().
* fix cleanup code in dsa_test().
* fix gating in pkcs7authenveloped_run_vectors() to accommodate !defined(HAVE_AESGCM).
* fix gating in cryptocb_test() to accommodate defined(NO_HMAC).
wolfssl/wolfcrypt/cryptocb.h: remove gates around "pk" sub-struct of struct wc_CryptoInfo -- wc_CryptoInfo.pk.type (an int) is used unconditionally when --enable-debug, and is used with DH.
wolfssl/wolfcrypt/error-crypt.h: fix whitespace.
2023-11-17 01:15:28 -06:00
Sean Parkinson
d3448e2c1a
RSA private exponentiation: multiply blinding invert in Mont
...
When blinding, multiply result of exponentiation my blinding invert in
Montgomery form to make code more constant time.
2023-11-17 15:19:51 +10:00
Daniel Pouzzner
e395aad84b
Merge pull request #6958 from embhorn/zd16866
...
Add XGMTIME validation
2023-11-16 21:28:27 -05:00
JacobBarthelmeh
957a0ce300
Merge pull request #6964 from lealem47/zd16470
...
Parse explicit parameters in StoreEccKey()
2023-11-16 15:59:21 -07:00
gojimmypi
4c6c2942b1
Fix evp SM cipherType
2023-11-16 13:38:39 -08:00
JacobBarthelmeh
6945093221
Merge pull request #6935 from SparkiDev/ssl_crypto_extract
...
ssl.c: Move out crypto compat APIs
2023-11-16 11:58:14 -07:00
David Garske
8e05b5a9ab
Merge pull request #6975 from lealem47/gh6969
...
Add STM32H725 to default_conf.ftl
2023-11-15 21:15:36 -08:00
Sean Parkinson
8c61b2cc5f
IAR Thumb2 ASM: fixes
...
Don't assign constants to registers with IAR.
Don't assume register usage in AES_set_encrypt_key.
2023-11-16 11:14:43 +10:00
JacobBarthelmeh
bb73c233fc
Merge pull request #6973 from douzzer/20231115-misc-fixits
...
20231115-misc-fixits
2023-11-15 15:27:25 -07:00
lealem47
3576db8976
Merge pull request #6977 from JacobBarthelmeh/cmake
...
add wolfcrypt test and unit test to ctest
2023-11-15 14:47:49 -07:00
JacobBarthelmeh
9fa5d8872c
Merge pull request #6948 from SparkiDev/ecc_curve_koblitz
...
ECC double point: SECP112R2 and SEC128R2 are Koblitz curves
2023-11-15 14:23:42 -07:00
Daniel Pouzzner
263973bde9
src/wolfio.c: fix stack allocations for cookie digests on NO_SHA builds;
...
configure.ac: fix dependencies for enable_dsa vs enable_sha in enable-all, enable-all-crypto, and ENABLED_DSA setup.
2023-11-15 14:43:23 -06:00
JacobBarthelmeh
ada085390b
add wolfcrypt test and unit test to ctest
2023-11-15 10:38:49 -07:00
Lealem Amedie
cd1e9e9974
Add STM32H725 to default_conf.ftl
2023-11-15 10:30:01 -07:00
Lealem Amedie
2c7248492f
Rename macro
2023-11-15 10:27:24 -07:00
Lealem Amedie
ac89c90afd
Add RESET_MULTI_VALUE_STATS_VARS macro
2023-11-15 10:26:03 -07:00
Eric Blankenhorn
7bbeadcf97
Fix build errors with dtls1.3 and no tls1.2
2023-11-15 10:37:09 -06:00
JacobBarthelmeh
7daac20d24
Merge pull request #6952 from julek-wolfssl/dtls13-pqc-tests
...
Add dtls 1.3 PQC suites tests
2023-11-15 09:34:36 -07:00
Daniel Pouzzner
eaa66dc117
configure.ac: in enable-all, enable QUIC only if !ENABLED_LINUXKM_DEFAULTS, and enable aesgcm_stream only if enable_aesgcm.
2023-11-15 01:47:46 -06:00
Daniel Pouzzner
748b058dde
wolfcrypt/src/aes.c: fix for -Wrestrict in wc_AesCbcDecrypt() when WOLFSSL_AESNI.
2023-11-15 00:51:21 -06:00
Sean Parkinson
26a9435f5c
ECC point double: when z ordinate is 0 point is infinity
...
Recognize z == 0 as infinity in result of double.
2023-11-15 16:43:06 +10:00
Daniel Pouzzner
7569cfdff8
src/internal.c,src/wolfio.c: fallback to SHA256 when NO_SHA, in LoadCertByIssuer(), MicriumGenerateCookie(), uIPGenerateCookie(), and GNRC_GenerateCookie();
...
tests/api.c: when NO_SHA, omit test_wolfSSL_CertManagerCheckOCSPResponse() and test_wolfSSL_CheckOCSPResponse() (both use static artifacts with SHA1 name and key hashes).
2023-11-15 00:09:22 -06:00
Daniel Pouzzner
6a3451ca54
wolfcrypt/test/test.c: add WC_MAYBE_UNUSED attribute to declaration of max_relative_stack, to accommodate compilation settings when subsumed within testsuite.
2023-11-15 00:09:22 -06:00
Daniel Pouzzner
7e99ccc782
wolfcrypt/src/wc_port.c, wolfssl/wolfcrypt/wc_port.h: refactor WOLFSSL_GMTIME gmtime() into gmtime_r(), and always define HAVE_GMTIME_R when defined(WOLFSSL_GMTIME).
2023-11-15 00:09:22 -06:00
Sean Parkinson
2213306386
ECC double point: SECP112R2 and SEC128R2 are Koblitz curves
...
SECP112r2 and SECP128R2 are Koblitz curves, so don't compile them in
unless HAVE_ECC_KOBLITZ is defined. This requires custom curves which
enables point doubling to support A != -3.
2023-11-15 13:30:45 +10:00
JacobBarthelmeh
8f7adb2c16
Merge pull request #6967 from SparkiDev/aes_gcm_aarch64_hw_crypto
...
AES GCM ARM64: Replace hardware crypto assembly with generated code
2023-11-14 13:55:43 -07:00
Sean Parkinson
c4677927bc
AES GCM ARM64: Replace hardware crypto assembly with generated code
...
Optimized assembly of AES GCM for ARM64 using hardware crypto
instructions.
Code replaced between "START..." and "END...".
2023-11-14 09:24:05 +10:00
Lealem Amedie
b464a277c1
Refactor logic to remove MAX_SAMPLE_RUNS
2023-11-13 13:40:07 -07:00
JacobBarthelmeh
1b55e20d5a
Merge pull request #6966 from SparkiDev/aes_bitsliced_armasm_fix
...
AES bitsliced, ARMASM: config needs WOLFSSL_AES_DIRECT defined
2023-11-13 10:09:08 -07:00
Sean Parkinson
7eaff41e61
AES bitsliced, ARMASM: config needs WOLFSSL_AES_DIRECT defined
...
AES bitsliced needs WOLFSSL_AES_DIRECT defined when compiling for ARMASM
as there are different APIs used.
2023-11-13 07:40:40 +10:00
David Garske
7c24b2d4bd
Merge pull request #6965 from ejohnstown/uint128-cmake
...
uint128 and CMake
2023-11-10 20:57:46 -08:00
JacobBarthelmeh
c903a8c4a6
Merge pull request #6854 from SparkiDev/aes_bit_sliced
...
AES bitsliced implementation added
2023-11-10 17:10:19 -07:00
Kaleb Himes
a04eb81e95
Merge pull request #6959 from SparkiDev/sp_c_rsa_pub_e_64bits
...
SP C: support e up to 64-bits
2023-11-10 16:33:12 -07:00
David Garske
12878fccae
Merge pull request #6957 from lealem47/expandDistro
...
Add --enable-quic to --enable-all
2023-11-10 15:32:05 -08:00
John Safranek
d34d77681a
uint128 and CMake
...
1. Add to the check for HAVE___UINT128_T adding it to the list of items
that get dumped into the options.h file.
2023-11-10 14:59:41 -08:00
Lealem Amedie
04ea4da6fd
Parse explicit parameters in StoreEccKey()
2023-11-10 15:11:08 -07:00
JacobBarthelmeh
63c27219a8
Merge pull request #6962 from julek-wolfssl/dtls13-no-hrr-docs
...
Add info on how to use WOLFSSL_DTLS13_NO_HRR_ON_RESUME
2023-11-10 14:26:46 -07:00
Juliusz Sosinowicz
b8d5ac83eb
Add info on how to use WOLFSSL_DTLS13_NO_HRR_ON_RESUME
2023-11-10 10:43:26 +01:00
Sean Parkinson
3ab0fc1ba4
SP C: support e up to 64-bits
...
SP C code only supported one digit worth of e which is less than 64 or
32.
Change is to support up to 64 bit of e using sp_uint64 to hold value.
2023-11-10 09:58:51 +10:00
Eric Blankenhorn
a4bf774e1c
Add XGMTIME validation
2023-11-09 16:06:37 -06:00
Lealem Amedie
e2bbacd548
Add QUIC to --enable-all
2023-11-09 14:44:02 -07:00
JacobBarthelmeh
49a219e0d1
Merge pull request #6930 from Frauschi/zephyr_fix
...
Fixes for the Zephyr port
2023-11-09 12:56:34 -07:00
JacobBarthelmeh
73d3277b74
Merge pull request #6947 from SparkiDev/sp_arm64_mont_red_4_fix
...
SP ARM64 asm: fix Montgomery reduction by 4
2023-11-09 08:39:52 -07:00
Juliusz Sosinowicz
a666c39b65
zephyr 3.5 github action
2023-11-09 10:41:54 +01:00
Tobias Frauenschläger
081b34919c
Zephyr: improve order of random seed sources
...
When using Zephyr, we also want to use the proper wc_GenerateSeed
method. However, if one of the defines is set (e.g., NO_STM32_RNG), the
Zephyr option is ignored, although it would work. Hence, we have to
change the order in which these settings for the source of a random seed
are evaluated.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2023-11-09 10:41:54 +01:00
Tobias Frauenschläger
182eaa0b63
Zephyr: add support for RTC time
...
For ASN date validation, the actual wall clock time is needed from an
RTC. This commit adds support to read the RTC time in case it is
available in the Zephyr system. If the RTC is not available or an error
occurs during the readout, we fallback to the old implementation which
only supports relative time since boot.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2023-11-09 10:41:54 +01:00
Tobias Frauenschläger
4d8bbd7091
Zephyr: fix POSIX time include
...
The sys/time.h header causes redefinition errors regarding the fd_set
type and the select call inside socket_select.h. We want to include the
regular time.h header anyway, as done in random.c.
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
tmp
2023-11-09 10:41:54 +01:00
Tobias Frauenschläger
9d880fe161
Zephyr: Fix deprecation warning for rand32.h
...
Signed-off-by: Tobias Frauenschläger <t.frauenschlaeger@me.com >
2023-11-09 10:41:54 +01:00
SKlimaRA
308346aa0d
one less memcpy
2023-11-09 09:40:58 +01:00
JacobBarthelmeh
2b1c61a013
Merge pull request #6949 from bigbrett/zd16925
...
fix WOLFSSL_CALLBACK memory error
2023-11-08 23:35:32 -07:00
JacobBarthelmeh
3332b036d5
Merge pull request #6950 from SparkiDev/srtp_kdf_fix
...
SRTP KDF: Don't use i outside loop
2023-11-08 23:13:40 -07:00
JacobBarthelmeh
04c1e94e29
Merge pull request #6954 from SparkiDev/sp_cortexm_iar_branch_long
...
SP Cortex-M: branch long explicitly for IAR
2023-11-08 23:01:45 -07:00
JacobBarthelmeh
68b6bc87c7
Merge pull request #6916 from philljj/add_EXTENDED_KEY_USAGE_free
...
Add EXTENDED_KEY_USAGE_free to OpenSSL compat layer.
2023-11-08 22:07:40 -07:00
Sean Parkinson
168747615c
SP Cortex-M: branch long explicitly for IAR
...
GCC doesn't like explicit wide branch instruction but will use
appropriate instruction implicitly.
IAR won't widen branch instruction unless explicitly told.
2023-11-09 08:27:42 +10:00
jordan
be24d68e5d
Add EXTENDED_KEY_USAGE_free to OpenSSL compat layer.
2023-11-08 15:26:24 -06:00
Lealem Amedie
138d699cc7
Apply changes to new srtp-kdf code
2023-11-08 11:09:00 -07:00
Lealem Amedie
c0f3fe4434
Benchmarks: use clock_gettime() for ns resolution
2023-11-08 10:45:51 -07:00
Lealem Amedie
2cde843093
Measure max & min durations within the confines of MAX_SAMPLE_RUNS
2023-11-08 10:45:51 -07:00
Lealem Amedie
1303c0512c
Extract some code blocks into macros
2023-11-08 10:45:51 -07:00
Lealem Amedie
46a5465c3f
Remove redundant macro
2023-11-08 10:45:51 -07:00
Lealem Amedie
16ecc9b5f8
Address feedback and don't print avg ms if mean is displayed
2023-11-08 10:45:51 -07:00
Lealem Amedie
86a2b050fe
Gate on NO_FILESYSTEM
2023-11-08 10:45:50 -07:00
Lealem Amedie
a40de50be2
Add ADVANCED_STATS in benchmark.c
2023-11-08 10:45:50 -07:00
Lealem Amedie
9006dd5edd
Document new macro
2023-11-08 10:45:50 -07:00
Lealem Amedie
2ea0c2cae8
Run benchmarks at microsecond level
2023-11-08 10:45:50 -07:00
Stanislav Klima
a137847894
removed isCaSet from decoded cert
2023-11-08 12:24:29 +01:00
Stanislav Klima
1562106899
micro fix
2023-11-08 11:18:58 +01:00
Stanislav Klima
76d89a0c15
unused variable
2023-11-08 11:09:05 +01:00
Stanislav Klima
f518a8f7d5
new build flag WOLFSSL_ALLOW_ENCODING_CA_FALSE
2023-11-08 10:51:25 +01:00
Sean Parkinson
54f2d56300
ssl.c: Move out crypto compat APIs
...
ssl_crypto.c contains OpenSSL compatibility APIS for:
- MD4, MD5, SHA/SHA-1, SHA2, SHA3
- HMAC, CMAC
- DES, DES3, AES, RC4
API implementations reworked.
Tests added for coverage.
TODOs for future enhancements.
2023-11-08 19:43:18 +10:00
Juliusz Sosinowicz
8bc79a0b43
Add dtls 1.3 PQC suites tests
2023-11-08 10:29:35 +01:00
Stanislav Klima
4bbb0e3876
drafted ca false
2023-11-08 10:23:46 +01:00
Mikhail Paulyshka
944c7e175b
cmake: add WOLFSSL_X86_64_BUILD_ASM option
2023-11-08 09:18:07 +01:00
Mikhail Paulyshka
fca2f14f48
cmake: guard installation with WOLFSSL_INSTALL option
2023-11-08 09:18:07 +01:00
Mikhail Paulyshka
7adddc5fb8
cmake/functions: do not try to build x86_64 assembler on non-AMD64 platforms
2023-11-08 09:18:07 +01:00
Mikhail Paulyshka
703cfded28
cmake: introduce WOLFSSL_X86_64_BUILD variable
2023-11-08 09:18:06 +01:00
Sean Parkinson
716cb450aa
SRTP KDF: Don't use i outside loop
...
When shifting index down, first XOR outside loop isn't meant to use i.
2023-11-08 15:04:46 +10:00
lealem47
1a3f3aa5f0
Merge pull request #6951 from douzzer/20231107-unit-test-regenerate-ocsp-reply
...
20231107-unit-test-regenerate-ocsp-reply
2023-11-07 20:09:32 -07:00
Daniel Pouzzner
9cb6243357
wolfcrypt/test/test.c: add all initializers in wolfcrypt_test_main() for args for C++ legality (C-style initializer added in e58fafcf3d).
2023-11-07 19:33:18 -06:00
Daniel Pouzzner
ca694938fd
tests/api.c: update response vector in test_wolfSSL_CertManagerCheckOCSPResponse(), reflecting regenerated keys in certs/ocsp/.
2023-11-07 19:25:52 -06:00
David Garske
0fa47e9e28
Merge pull request #6943 from SparkiDev/iar_inline_asm_no_register
...
Thumb2 inline ASM: IAR doesn't do register variables
2023-11-07 14:23:44 -08:00
JacobBarthelmeh
b6e5b36f35
Merge pull request #6946 from dgarske/nooldtls_v1.1
...
Turn off old TLS v1.1 by default
2023-11-07 13:30:03 -07:00
Brett Nicholas
ba37dc9933
Fixes bug where example server with WOLFSSL_CALLBACKS hangs when used with
...
-6 option (simulated WANT_WRITE errors) or with DTLS, causing make check
to fail
2023-11-07 11:44:20 -07:00
David Garske
a46b6221b4
Turn off old TLS v1.1 by default (unless SSL v3.0 or TLS v1.0 enabled).
2023-11-07 09:23:59 -08:00
JacobBarthelmeh
d751029c07
Merge pull request #6945 from gojimmypi/PR-goto-alternate
...
introduce WARNING_OUT, when goto is not a hard error during tests
2023-11-07 10:17:53 -07:00
JacobBarthelmeh
8921a720a1
Merge pull request #6888 from SparkiDev/srtp_kdf
...
SRTP/SRTCP KDF: add implementation
2023-11-07 10:11:43 -07:00
JacobBarthelmeh
a6de9cd06f
Merge pull request #6942 from SparkiDev/sp_int_sqr_volatile
...
SP int: ARM64 optimization issue
2023-11-07 10:09:25 -07:00
gojimmypi
e58fafcf3d
introduce WARNING_OUT, optional WOLFSSL_ESPIDF_ERROR_PAUSE
2023-11-07 08:52:34 +01:00
Sean Parkinson
cefe108cab
Thumb2 inline ASM: IAR doesn't do register variables
...
IAR doesn't parse register variable declarations with specified
registers. IAR doesn't even honor the register keyword.
Can use small negative but IAR doesn't like it.
Specify the positive value instead.
Add a small code size version of mont_reduce_full using umlal and umaal.
Make 'asm' usage in variables use keyword '__asm__'.
Explicitly don't inline some functions when compiling with IAR.
2023-11-07 16:12:07 +10:00
Sean Parkinson
01c3345c7a
SP ARM64 asm: fix Montgomery reduction by 4
...
Handle add overflow properly in generic Montgomery reduction for 4
words. Used when reducing back to order of P-256 curve.
2023-11-07 11:39:03 +10:00
Sean Parkinson
8c3e1dbf48
SRTP/SRTCP KDF: add implementation
...
Add implementation of SRTP KDF and SRTCP KDF.
One shot APIs compatible with SP 800-135 and ACVP testing.
Tests added to test.c.
Benchmarking added.
Doxygen added.
2023-11-07 10:33:14 +10:00
JacobBarthelmeh
c852347dfb
Merge pull request #6877 from gojimmypi/Espressif-cmake-update
...
Espressif Update wolfSSL component CMakeLists.txt
2023-11-06 13:43:07 -07:00
JacobBarthelmeh
c5e2f414ea
Merge pull request #6929 from julek-wolfssl/dtls13-early-data-server-side
...
dtls 1.3: allow to skip cookie exchange on resumption
2023-11-06 13:30:21 -07:00
JacobBarthelmeh
8ac291bbe1
Merge pull request #6944 from miyazakh/fix_qt_jenkins_failure
...
skip DATE check if flags is set when calling AddTrustedPeer
2023-11-06 11:35:22 -07:00
JacobBarthelmeh
c92d25816a
Merge pull request #6887 from julek-wolfssl/zd/16849
...
Implement untrusted certs in wolfSSL_X509_STORE_CTX_init
2023-11-06 10:13:43 -07:00
JacobBarthelmeh
8569e76a87
Merge pull request #6915 from bigbrett/typo-fix-DecodeBasicCAConstraint
...
fix typo in WOLFSSL_ENTER function name
2023-11-03 13:53:23 -06:00
JacobBarthelmeh
190b51ae6f
Merge pull request #6810 from bandi13/codeSonar_fixes
...
Fix 'negative character value'
2023-11-03 13:52:06 -06:00
Juliusz Sosinowicz
8c87920903
Address code review
2023-11-03 11:02:41 +01:00
Sean Parkinson
5b863dcb12
AES bitsliced implementation added
...
AES bitsliced implementation that is cache attack safe.
Configure with:
--enable-aes-bitslice
or define:
WC_AES_BITSLICE
HAVE_AES_ECB
HAVE_AES_DIRECT
Very slow for CBC, CFB, OFB and any mode that uses a previous encrypt
block to calculate current.
CTR, GCM, XTS can parallelize the data and be much faster.
Added AES-ECB test to test.c.
2023-11-03 14:19:58 +10:00
Hideki Miyazaki
49121b5c47
move declaration to the top of func
2023-11-03 11:45:33 +09:00
Hideki Miyazaki
8d9dc3d79f
skip DATE if flags is set when calling AddTrustedPeer
2023-11-03 09:38:23 +09:00
Sean Parkinson
b8ea978066
Merge pull request #6941 from douzzer/20231102-examples-asn1-double-fclose
...
20231102-examples-asn1-double-fclose
2023-11-03 08:50:13 +10:00
Sean Parkinson
cfb6560468
SP int: ARM64 optimization issue
...
Make variables volatile to avoid compiler optimization issues.
2023-11-03 08:08:29 +10:00
JacobBarthelmeh
c8af4edd74
Merge pull request #6940 from bandi13/takeInConstParameters
...
Can guarantee not to modify arguments of `mp_isodd` and `mp_iszero`
2023-11-02 15:45:51 -06:00
Daniel Pouzzner
d6f37d48d6
examples/asn1/asn1.c: remove now-redundant fclose(fp) in asn1App_ReadFile() (which also was incorrectly closing stdin). see #6905 .
2023-11-02 16:14:40 -05:00
Andras Fekete
49b9764c52
Can guarantee not to modify arguments of mp_isodd and mp_iszero
2023-11-02 16:00:57 -04:00
David Garske
8fc754515a
Merge pull request #6938 from SparkiDev/rsa_pss_salt_len_openssl_compat_fix
...
RSA PSS OpenSSL compatibility verification: support AUTO
2023-11-02 09:07:40 -07:00
JacobBarthelmeh
96977d1480
Merge pull request #6900 from julek-wolfssl/zd/16868
...
EVP_EncodeBlock should not append a newline
2023-11-02 09:20:39 -06:00
Sean Parkinson
4870435604
RSA PSS OpenSSL compatibility verification: support AUTO
...
When wolfSSL_RSA_verify_PKCS1_PSS() called with RSA_PSS_SALTLEN_AUTO
(RSA_PSS_SALTLEN_MAX_SIGN) it wasn't using RSA_PSS_SALT_LEN_DISCOVER
when available.
2023-11-02 11:24:18 +10:00
lealem47
2ee94023f9
Merge pull request #6937 from dgarske/stm32wl
...
Support for the STM32WL55 and PKA improvements for ECC parameters
2023-11-01 17:44:22 -06:00
David Garske
0dde07e282
Whitespace cleanups (appease multi-test "check-source-text").
2023-11-01 15:03:12 -07:00
David Garske
33e12e3537
Support for the STM32WL55 and PKA improvements for ECC parameters. Fixes #6386 and Fixes #6396 .
2023-11-01 13:55:31 -07:00
JacobBarthelmeh
9e34ed937e
Merge pull request #6927 from dgarske/crl_no_date
...
Add build option for disabling CRL date check
2023-11-01 14:48:28 -06:00
JacobBarthelmeh
21f34ef028
Merge pull request #6905 from bandi13/moreCodeSonarFixes
...
Don't nag about leaked resources
2023-11-01 14:46:02 -06:00
Brett Nicholas
9d632ccaa6
apply lateRL offset to memcpy dest, not src
2023-11-01 14:32:11 -06:00
JacobBarthelmeh
15fdf6eccc
Merge pull request #6910 from bigbrett/ios-ca-api
...
exercise --sys-ca-certs optionin external.test
2023-11-01 14:09:24 -06:00
Andras Fekete
bb9031da6e
Remove dead code
2023-11-01 13:30:40 -04:00
JacobBarthelmeh
c920337f2f
Merge pull request #6891 from julek-wolfssl/zd/16849-i2d_x509
...
Advance pointer in wolfSSL_i2d_X509
2023-11-01 11:02:44 -06:00
JacobBarthelmeh
026c4bcbc7
Merge pull request #6902 from dgarske/various_20231020
...
Fixes for PKCS w/out RSA and Cert/CSR signing with unknown OID
2023-11-01 10:58:10 -06:00
JacobBarthelmeh
a3ea84d8e8
Merge pull request #6917 from SparkiDev/sp_int_no_sp_digit
...
SP int: don't use sp_digit as the type is sp_int_digit
2023-11-01 10:57:07 -06:00
JacobBarthelmeh
98843798c2
Merge pull request #6934 from SparkiDev/regression_fixes_8
...
Regression test fixes
2023-11-01 10:55:41 -06:00
JacobBarthelmeh
59e947d3e6
Merge pull request #6936 from philljj/codespell_cleanup
...
Used codespell and fixed obvious typos.
2023-11-01 10:39:04 -06:00
jordan
34f349e510
Used codespell and fixed obvious typos.
2023-11-01 10:35:12 -05:00
Sean Parkinson
0eab70f806
Regression test fixes
...
Fixes for different configurations and memory allocation failure
testing.
2023-11-01 14:10:49 +10:00
Sean Parkinson
2e37ff4e45
SP int: don't use sp_digit as the type is sp_int_digit
...
Stop casting to the wrong type. SP int code use sp_int_digit and
sp_digit can be a different signedness.
2023-11-01 13:38:23 +10:00
JacobBarthelmeh
7435d235a6
Merge pull request #6931 from dgarske/async_v5.6.4
...
Async v5.6.4
2023-10-31 14:52:13 -06:00
David Garske
2ac0d47908
Fix for async edge case with Intel QuickAssist/Cavium Nitrox that was broken in PR #6783 . Was causing re-entry and multiple calls for some operations like DH KeyGen that don't advance state on completion. https://github.com/wolfSSL/wolfAsyncCrypt/pull/71
2023-10-31 12:43:12 -07:00
Juliusz Sosinowicz
aed715cb2c
dtls 1.3: allow to skip cookie exchange on resumption
...
tls 1.3: do cookie exchange when asked too even when found a matching cipher
2023-10-31 14:29:04 +01:00
David Garske
0455224439
Fix build errors in API unit test without IO dependencies.
2023-10-30 17:04:36 -07:00
David Garske
cdef51f537
Add build option for disabling CRL date check (WOLFSSL_NO_CRL_DATE_CHECK). ZD 16675
2023-10-30 15:45:33 -07:00
David Garske
37884f864d
Merge pull request #6926 from JacobBarthelmeh/release
...
prepare for release 5.6.4
2023-10-30 08:28:37 -07:00
JacobBarthelmeh
6cf75a7d42
prepare for release 5.6.4
2023-10-30 07:59:00 -06:00
David Garske
2c91ecb466
Merge pull request #6924 from JacobBarthelmeh/srtp
...
sanity check on length before ato16 with SRTP
2023-10-28 16:13:06 -07:00
JacobBarthelmeh
07c8c5c8ca
sanity check on length before ato16 with SRTP
2023-10-28 16:13:45 -06:00
David Garske
cc45b31470
Merge pull request #6922 from JacobBarthelmeh/coverity
...
clean up some coverity reports
2023-10-27 18:40:02 -07:00
JacobBarthelmeh
c3ed45d331
additional case for CID 330392 and 330401
2023-10-27 16:34:04 -06:00
JacobBarthelmeh
688b94cad2
fix typo and missing brackets
2023-10-27 16:11:18 -06:00
JacobBarthelmeh
7d5491994e
Fix for CID 299649 checking on if ctx is null
2023-10-27 15:28:42 -06:00
JacobBarthelmeh
29782449ec
Fix for CID 299637 make sure after free'ing pointer it is not re-used
2023-10-27 15:14:02 -06:00
JacobBarthelmeh
247bc151d9
Fix for CID 299627 memory leak on error case
2023-10-27 15:10:32 -06:00
JacobBarthelmeh
0ba406a52c
Fix for CID 299536 possible null dereference
2023-10-27 15:02:10 -06:00
JacobBarthelmeh
a2032dfb36
touch up negative value sanity check, fix CID 210741 sanity check
2023-10-27 14:50:13 -06:00
JacobBarthelmeh
33c4054cbb
Fix for CID 299748 memory leak in error case
2023-10-27 14:36:51 -06:00
JacobBarthelmeh
ef50cb3f02
Fix for CID 299759 be explicit on compare
2023-10-27 14:33:33 -06:00
JacobBarthelmeh
271fa83a15
Fix for CID 299778 memory leak on error case
2023-10-27 14:28:47 -06:00
JacobBarthelmeh
8760ad9473
Fix for CID 299847 memory leak on error case
2023-10-27 14:17:31 -06:00
JacobBarthelmeh
7b20a5597c
Fix for CID 330399 memory leak on error case
2023-10-27 14:11:21 -06:00
JacobBarthelmeh
c11176c276
Fixes CID 330401 and 330392 memory leak
2023-10-27 14:04:46 -06:00
Andras Fekete
42c241dbbf
Avoid use of uninitialized array
2023-10-27 15:38:46 -04:00
JacobBarthelmeh
8add411d9a
fix for CID 330412 wrong sizeof argument
2023-10-27 13:35:08 -06:00
Andras Fekete
2877b7be50
Fix possible memory leak
2023-10-27 15:31:28 -04:00
Andras Fekete
21d465cf9a
Fix possible double free
2023-10-27 15:31:28 -04:00
Andras Fekete
f8f080d7de
Don't nag about leaked resources
2023-10-27 15:31:28 -04:00
JacobBarthelmeh
16b842992d
fix for CID 330416 memory leak
2023-10-27 13:27:30 -06:00
JacobBarthelmeh
449fb9c581
Fix for report CID 330424 wrong sizeof argument
2023-10-27 13:20:50 -06:00
JacobBarthelmeh
1dd6888288
Merge pull request #6920 from embhorn/zd16909
...
Fix mem leak in TLSX_CA_Names_Parse
2023-10-27 10:45:54 -06:00
Eric Blankenhorn
6b0e28f840
Fix mem leak in TLSX_CA_Names_Parse
2023-10-27 07:58:50 -05:00
David Garske
a17d6ef751
Merge pull request #6918 from JacobBarthelmeh/readme
...
remove packaging status badge
2023-10-26 16:19:06 -07:00
JacobBarthelmeh
85fab2b4f7
remove packaging status badge
2023-10-26 15:15:36 -07:00
Brett Nicholas
5277065c3c
fix typo in WOLFSSL_ENTER function name
2023-10-26 13:01:05 -06:00
JacobBarthelmeh
45ba778692
Merge pull request #6911 from douzzer/20231025-sp_to_unsigned_bin_len_ct-Wconversion-cast
...
20231025-sp_to_unsigned_bin_len_ct-Wconversion-cast
2023-10-26 10:33:50 -06:00
Daniel Pouzzner
7821c48e65
wolfcrypt/src/sp_int.c: add cast in sp_to_unsigned_bin_len_ct() to mollify -Wconversion.
2023-10-25 23:40:21 -05:00
David Garske
fc858ec33b
Merge pull request #6908 from JacobBarthelmeh/static-analysis
...
minor warning fixes from static analysis tests
2023-10-25 17:28:54 -07:00
Brett
89d445a5a5
added --sys-ca-certs client connection to external test
2023-10-25 15:13:08 -06:00
Brett
60f75ea5a8
simplified apple header detection used in code
2023-10-25 15:13:06 -06:00
JacobBarthelmeh
6538ed1c39
coverity fix for CID 327268
2023-10-25 09:52:35 -06:00
JacobBarthelmeh
b46545315c
fix for possible null dereference warning
2023-10-25 08:44:11 -06:00
JacobBarthelmeh
d801dc1c85
Merge pull request #6906 from SparkiDev/pkcs8_info_free_fix
...
ProcessBuffer: fix free call
2023-10-25 08:38:56 -06:00
JacobBarthelmeh
6d8136c63e
Merge pull request #6896 from SparkiDev/rsa_to_bin_len_ct
...
RSA: convert to bin with length in constant time
2023-10-25 08:34:37 -06:00
Sean Parkinson
d87cd2cc05
ProcessBuffer: fix free call
...
'info' was freed before use when OPENSSL_EXTRA is defined.
2023-10-25 17:23:04 +10:00
András Fekete
5da7efacc9
Merge pull request #6894 from julek-wolfssl/fix-possible-hang
...
Fix static analyzer possible leak
2023-10-24 09:13:58 -04:00
András Fekete
a74228b5b0
Merge pull request #6904 from julek-wolfssl/suites-allocation
...
Don't try to allocate 0 size suites copy. Fixes `--enable-trackmemory --enable-smallstack CFLAGS="-DALT_ECC_SIZE" --enable-opensslextra` errors.
2023-10-24 09:07:42 -04:00
Juliusz Sosinowicz
dc5a246fdd
Do NULL check in FreeCRL
2023-10-24 10:31:17 +02:00
Juliusz Sosinowicz
8f60fb0053
Advance pointer in wolfSSL_i2d_X509
2023-10-24 10:25:06 +02:00
Juliusz Sosinowicz
4aad7589d6
Don't try to allocate 0 size suites copy
2023-10-24 10:10:08 +02:00
Sean Parkinson
13cadbbe55
Merge pull request #6903 from douzzer/20231021-fix-null-derefs
...
20231021-fix-null-derefs
2023-10-24 13:12:09 +10:00
JacobBarthelmeh
1de048826e
Merge pull request #6895 from bigbrett/ios-ca-api
...
Fix WOLFSSL_SYS_CA_CERTS bug on Apple devices
2023-10-23 07:57:08 -06:00
Juliusz Sosinowicz
3c5d3c0fa9
bwrap ocsp renew script
2023-10-23 15:53:42 +02:00
gojimmypi
1a113c5429
Espressif add TLS Client/Server local user_settings.h
2023-10-22 16:59:54 +02:00
gojimmypi
8eaf09d7a0
Update Espressif TLS Client/Server CMakeLists.txt
2023-10-22 16:53:56 +02:00
gojimmypi
9fe071fe73
Espressif remove pre-existing /include/user_settings.h during compile all.
2023-10-22 16:21:06 +02:00
Daniel Pouzzner
501299bc31
fix null pointer derefs in examples/pem/pem.c:pemApp_ReadFile() and tests/api.c:LoadPKCS7SignedDataCerts() detected by clang-tidy.
2023-10-21 13:34:04 -05:00
David Garske
cf1dcdf402
Fix for adding signature where OID is not found. Currently our AddSignature function will add without OID, which is invalid. For example RSA is disabled and CSR tries to use CTC_SHA256wRSA. The wc_SignCert_ex will succeed and report success, but the CSR/Cert will be invalid (missing sigType OID).
2023-10-20 16:29:59 -07:00
David Garske
6887281361
Fix for ./configure --enable-pkcs7 --disable-rsa && make check.
2023-10-20 16:27:54 -07:00
JacobBarthelmeh
9db828a099
Merge pull request #6898 from SparkiDev/ed25519_g++
...
Ed25519: add missing C++ directives for C functions
2023-10-20 15:52:12 -06:00
JacobBarthelmeh
5018d6c2bb
Merge pull request #6897 from SparkiDev/tls13_psk_one_id_var_decl
...
TLS 1.3: compiling with WOLFSSL_PSK_ONE_ID fix
2023-10-20 15:48:59 -06:00
JacobBarthelmeh
ca2a6d7daa
Merge pull request #6878 from SparkiDev/sha256_armv7a_vmov_fix
...
ARMv7a SHA256: explicit size on vmov
2023-10-20 15:46:58 -06:00
Brett
2387579880
added FIPS warning for Apple native cert validation
2023-10-20 15:40:49 -06:00
Brett
dd12e5a39e
Fix WOLFSSL_SYS_CA_CERTS bug that accepted intermediate CA certs with invalid
...
signatures. Also adds --sys-ca-certs to client in unit.test to detect
regressions
2023-10-20 15:40:44 -06:00
Andras Fekete
0925f8ab18
Use 'unsigned char'
2023-10-20 16:16:48 -04:00
Andras Fekete
ec0a2f2683
Fix 'negative character value'
...
In a number of libc implementations, isalpha()/isalnum() is implemented using lookup tables (arrays): passing in a negative value can result in a read underrun.
2023-10-20 16:16:48 -04:00
Juliusz Sosinowicz
8cd6cd175d
EVP_EncodeBlock should not append a newline
2023-10-20 13:20:11 +02:00
Sean Parkinson
fcf1406675
RSA: convert to bin with length in constant time
...
Add mp_to_unsigned_bin_len_ct() which puts a number into a buffer with
padding in constant time.
Call mp_to_unsigned_bin_len_ct() in RSA when encoding result of
exponentiation.
2023-10-20 14:04:36 +10:00
Sean Parkinson
c88dcac80e
Ed25519: add missing C++ directives for C functions
...
Assembly code has C function names.
Need to tell C++ that these are C function and not to mangle names.
2023-10-20 12:02:51 +10:00
Sean Parkinson
ce1e44d5e8
TLS 1.3: compiling with WOLFSSL_PSK_ONE_ID fix
...
Move use of 'suites' into non-WOLFSSL_PSK_ONE_ID path as variable
declared and used only in that case.
2023-10-20 10:32:45 +10:00
Sean Parkinson
4ac795961b
ARMv7a SHA256: explicit size on vmov
...
For SHA256 using NEON on ARM32, change vmov instruction that is moving
from scalar to general-purpose register to have explicit size (32 bits).
May be needed by some compilers.
2023-10-20 10:21:57 +10:00
JacobBarthelmeh
1abaa94120
Merge pull request #6889 from SparkiDev/sm2_priv_import_range
...
ECC SM2 import private key: check less than order-1
2023-10-19 17:12:07 -06:00
JacobBarthelmeh
22be42a161
Merge pull request #6885 from bigbrett/aes-eax
...
Move AesEax definition to aes.h
2023-10-19 16:49:10 -06:00
Juliusz Sosinowicz
d13d446c2e
Add missing guard
2023-10-19 20:05:59 +02:00
Juliusz Sosinowicz
2ccbdd3a7e
Log correct message
2023-10-19 19:07:45 +02:00
Juliusz Sosinowicz
cecc5f6b19
Call wc_UnLockRwLock only once
2023-10-19 17:04:41 +02:00
Juliusz Sosinowicz
8a8acbd55f
Add log about allocation failure
2023-10-19 17:00:49 +02:00
Juliusz Sosinowicz
2dd8e713f2
Fix static analyzer possible leak
...
crl would never be null there but clean up code to make sure newcrl->crlLock gets free'd
2023-10-19 16:58:28 +02:00
Eric Blankenhorn
962e35aa24
Add error reporting to loadX509orX509REQFromBuffer
2023-10-19 09:31:30 -05:00
Sean Parkinson
abd7bb3ac3
ECC SM2 import private key: check less than order-1
...
SM2 curves must have private key less than order-1 instead of order.
2023-10-19 17:29:25 +10:00
Juliusz Sosinowicz
1ae248018f
Implement untrusted certs in wolfSSL_X509_STORE_CTX_init
2023-10-18 22:24:19 +02:00
JacobBarthelmeh
a3bf7a66a4
Merge pull request #6886 from julek-wolfssl/openvpn-master-fix
...
Define SSL_get_peer_tmp_key
2023-10-18 13:17:15 -06:00
David Garske
22ab21749c
Merge pull request #6869 from bigbrett/ios-ca-api
...
Add support for new Apple trust APIs with WOLFSSL_SYS_CA_CERTS
2023-10-18 10:29:41 -07:00
Juliusz Sosinowicz
f99c7cbb21
Define SSL_get_peer_tmp_key
2023-10-18 19:24:11 +02:00
JacobBarthelmeh
269090353e
Merge pull request #6884 from kareem-wolfssl/zd16824
...
Add explicit break to switch statement in GetHmacLength
2023-10-18 11:20:55 -06:00
JacobBarthelmeh
b4724b515d
Merge pull request #6880 from SparkiDev/sm2_named_group_val_fix
...
SM2 named curve disabled: value outside of supported values
2023-10-18 10:51:02 -06:00
Brett
d805e06469
add AesEax struct to header for public use
2023-10-18 09:23:39 -06:00
Sean Parkinson
1e84d24c20
SM2 named curve disabled: value outside of supported values
...
SM2 named curve value is specified in specification.
Values 0-14 aren't used, so, those bits in disabledCurves are used for
values over 31.
Add range checks.
2023-10-18 10:51:37 +10:00
JacobBarthelmeh
3943852b79
Merge pull request #6882 from douzzer/20231017-wolfsentry-wolfssl_test-h
...
20231017-wolfsentry-wolfssl_test-h
2023-10-17 16:03:41 -06:00
David Garske
bc0643803d
Merge pull request #6873 from JacobBarthelmeh/coverity
...
Coverity scan touch up
2023-10-17 14:44:33 -07:00
JacobBarthelmeh
19870b2378
Merge pull request #6883 from bigbrett/cmake-aarch64-build-macro-fix
...
cmake aarch64 fix
2023-10-17 15:31:23 -06:00
Kareem
f59b22d3a0
Add explicit break to switch statement in GetHmacLength
2023-10-17 14:14:05 -07:00
JacobBarthelmeh
4f1b3fff73
Merge pull request #6879 from jpbland1/cmac-invalid-devId
...
correctly set invalid devId for when cryptoCb is on
2023-10-17 13:23:17 -06:00
Brett
a1d76849e6
added CMake support for new Apple native certificate verification
2023-10-17 13:17:42 -06:00
JacobBarthelmeh
dc7e044157
Merge pull request #6881 from lealem47/mingw_pthreads
...
Fix for pthreads on MSYS2 & MINGW
2023-10-17 13:10:05 -06:00
Brett
e976a7faeb
added CMake host processor check to appropriately set WOLFSSL_AARCH64_BUILD on M1 macs
2023-10-17 12:51:36 -06:00
Daniel Pouzzner
f0db681550
wolfssl/test.h: move wolfsentry logic out of wolfssl project and into header file in wolfsentry project.
2023-10-17 13:05:23 -05:00
Lealem Amedie
a810514f86
Get multi-test passing
2023-10-17 11:36:19 -06:00
John Bland
76b770d4ee
update comment based on PR advise
2023-10-17 13:01:00 -04:00
Lealem Amedie
286d551ad0
Use same mingw macro in codebase for consistency
2023-10-17 10:22:17 -06:00
JacobBarthelmeh
603b5bb573
Merge pull request #6875 from douzzer/20231016-sp-math-fix-redux
...
20231016-sp-math-fix-redux
2023-10-17 10:08:43 -06:00
Lealem Amedie
5bc2edd5ad
Allow override of XSNPRINTF for Windows
2023-10-17 09:37:50 -06:00
Lealem Amedie
b73a440205
Fix for pthreads on MSYS2 & MINGW
2023-10-17 09:16:41 -06:00
John Bland
92382602dd
fix bad placement
2023-10-17 01:39:34 -04:00
John Bland
53d80c0b7f
correctly set invalid devId for when cryptoCb is on
...
but the user has opted to use software, or cmac is not available on for their
device. currently a devId of 0 is set which causes CRYPTOCB_UNAVAILABLE
2023-10-17 01:33:06 -04:00
gojimmypi
f5d1cb5132
Update wolfSSL component CMakeLists.txt
2023-10-17 02:09:26 +02:00
Daniel Pouzzner
f1725b4962
fix to 3e9f8bc649: (void)h was a typo for correct (void)n.
2023-10-16 18:23:45 -05:00
JacobBarthelmeh
b7b0316ac9
free buffer on error case
2023-10-16 15:04:57 -06:00
Brett
0244c2a254
Add support for new Apple trust APIs with WOLFSSL_SYS_CA_CERTS
2023-10-16 14:37:21 -06:00
JacobBarthelmeh
ae3fdbec47
add free in error case CID 327286
2023-10-16 13:59:05 -06:00
JacobBarthelmeh
74b63b6409
fix for derefernce warning on debug message
2023-10-16 13:52:42 -06:00
JacobBarthelmeh
8be0e14bd2
add unlock in error case CID 327294
2023-10-16 13:46:18 -06:00
JacobBarthelmeh
bab01ca313
Merge pull request #6872 from douzzer/20231016-sp-math-aes-eax-fips-fixes
...
20231016-sp-math-aes-eax-fips-fixes
2023-10-16 13:43:26 -06:00
JacobBarthelmeh
99d46d9a6d
fix for derefernce warning CID 327296 & CID 327298
2023-10-16 13:36:24 -06:00
JacobBarthelmeh
3c23f39437
fix for out of bounds edge case CID 327299
2023-10-16 13:34:05 -06:00
JacobBarthelmeh
ed001829df
Fix for dereference CID 327300 & CID 327301
2023-10-16 13:33:15 -06:00
Daniel Pouzzner
3e9f8bc649
tests/api.c: gate test_wc_AesEaxVectors(), test_wc_AesEaxEncryptAuth(), and test_wc_AesEaxDecryptAuth(), on !FIPS || FIPS>=5.3.
...
wolfcrypt/src/eccsi.c: remove incorrect `(void)h` from eccsi_mulmod_base_add() in newly exposed WOLFSSL_SP_MATH code path.
2023-10-16 13:30:16 -05:00
JacobBarthelmeh
d35112064b
Merge pull request #6840 from philljj/xmss_hooks_support
...
Add XMSS/XMSSMT wolfCrypt hooks.
2023-10-16 10:58:12 -06:00
jordan
46b1a030a7
XMSS/XMSSMT hooks support: fix g++ warnings, and small cleanup for review.
2023-10-13 18:01:07 -05:00
JacobBarthelmeh
c23559a91c
Merge pull request #6866 from bigbrett/aes-eax
...
Add more extensive AES EAX tests to api.c
2023-10-13 16:09:30 -06:00
JacobBarthelmeh
7afd9810de
Merge pull request #6867 from cconlon/jniConfigExpand
...
Update "--enable-jni" to include additional defines
2023-10-13 15:13:32 -06:00
Brett
87cffc8229
Added more extensive AES EAX tests to api.c
2023-10-13 11:38:16 -06:00
JacobBarthelmeh
79a6e1eb04
Merge pull request #6808 from SparkiDev/sp_sm2
...
SP updates for SM2
2023-10-13 10:17:17 -06:00
Chris Conlon
8cd89884ce
update --enable-jni with KEEP_PEER_CERT, WOLFSSL_ALT_CERT_CHAINS, WOLFSSL_KEY_GEN
2023-10-13 10:07:04 -06:00
JacobBarthelmeh
f247e6b6f0
Merge pull request #6865 from per-allansson/wolfio-getaddrinfo-hints-a
...
wolfio: request only IPv4 addresses unless IPv6 support is enabled
2023-10-13 09:53:38 -06:00
JacobBarthelmeh
95137f91fa
Merge pull request #6856 from dgarske/fips_win32
...
Fixes for wolfCrypt FIPS DLL win32
2023-10-13 09:49:26 -06:00
JacobBarthelmeh
dd1459ec8e
Merge pull request #6859 from julek-wolfssl/curl-releases
...
Test curl releases
2023-10-13 08:57:11 -06:00
JacobBarthelmeh
4001734421
Merge pull request #6863 from lealem47/xcode_cyassl
...
Remove cyaSSL from XCODE proj and small fix in chacha.c
2023-10-13 08:54:11 -06:00
Per Allansson
5f20f1171d
wolfio: request only IPv4 addresses unless IPv6 support is enabled
2023-10-13 15:25:16 +02:00
Juliusz Sosinowicz
962c315447
Test curl releases too
2023-10-13 11:52:02 +02:00
JacobBarthelmeh
26cc785fbc
Merge pull request #6861 from douzzer/20231012-keylog-export-warning-fix
...
20231012-keylog-export-warning-fix
2023-10-12 17:04:39 -06:00
Sean Parkinson
0cc21a42f3
SP updates for SM2
...
Allow wolfSSL to build with SP implementations of SM2.
Updates to SP implementation of other code.
2023-10-13 08:14:15 +10:00
JacobBarthelmeh
38df4e2bd5
Merge pull request #6857 from kareem-wolfssl/zd16815
...
Update documentation for wc_Shake256_Final to match function signature.
2023-10-12 15:08:58 -06:00
JacobBarthelmeh
26ab3b109a
Merge pull request #6858 from anhu/FASCN_OID
...
Support FASCN OID in wolfssl_dns_entry_othername_to_gn()
2023-10-12 14:47:09 -06:00
JacobBarthelmeh
883fcfc11e
Merge pull request #6860 from douzzer/20231012-aes-xts-fixes
...
20231012-aes-xts-fixes
2023-10-12 14:41:17 -06:00
Lealem Amedie
0d53796284
Apply the same changes to FIPS project
2023-10-12 14:07:32 -06:00
Lealem Amedie
20cab7afe3
Remove cyaSSL from XCODE proj and small fix in chacha.c
2023-10-12 13:58:43 -06:00
David Garske
c05aea7c5a
Improvements to the wolfCrypt FIPS Visual Studio project link settings to resolve ASLR (Randomized Base Address) issue on some platforms. ZD 16615
2023-10-12 12:05:14 -07:00
David Garske
3cebf35b1b
Cleanups for IDE/WIN10 user_settings.h to allow for FIPS 140-2 3389 cert. Fixed compiler warning with possible use of uninitialized data.
2023-10-12 12:04:51 -07:00
Daniel Pouzzner
0549dba3db
configure.ac and src/tls.c: fix --enable-keylog-export to warn at configure time, then build cleanly.
2023-10-12 13:09:43 -05:00
Daniel Pouzzner
3a195563f7
wolfcrypt/src/aes.c: fix zerodivcond and -Wconversion in wc_AesXtsEncryptConsecutiveSectors() and wc_AesXtsDecryptConsecutiveSectors().
...
wolfcrypt/test/test.c: add missing FIPS gating around AES-XTS testing.
2023-10-12 12:08:16 -05:00
jordan
60fea5ee5c
XMSS/XMSSMT hooks support: small update for requested changes.
2023-10-11 21:29:45 -05:00
Anthony Hu
f332995131
Support FASCN OID in wolfssl_dns_entry_othername_to_gn()
2023-10-11 20:33:13 -04:00
Kareem
66f4101569
Update documentation for wc_Shake256_Final to match function signature.
2023-10-11 16:12:34 -07:00
JacobBarthelmeh
0e35e9cbbe
Merge pull request #6806 from lealem47/XTS
...
Add XTS API's required for VeraCrypt
2023-10-11 13:35:45 -06:00
JacobBarthelmeh
653e5b01b1
Merge pull request #6646 from embhorn/gh5636_5637
...
Fix RFC references and add WOLFSSL_ALLOW_CRIT_AIA
2023-10-11 13:30:42 -06:00
Lealem Amedie
e7eec645b0
Sanity checks and correct comment
2023-10-11 12:03:02 -06:00
JacobBarthelmeh
f0bfcc50d7
Merge pull request #6748 from julek-wolfssl/dtls13-frag-ch2
...
DTLS 1.3: allow fragmenting the second ClientHello message
2023-10-11 11:13:57 -06:00
JacobBarthelmeh
5e4baf898c
Merge pull request #6786 from SparkiDev/aes_gcm_align_arm_fix
...
AES GCM ARM32 alignment fix
2023-10-11 10:18:11 -06:00
Chris Conlon
7f562f8259
Merge pull request #6851 from miyazakh/rnd_gen_updates_rx
...
Update random generation on RX TSIP
2023-10-11 09:10:34 -06:00
TakayukiMatsuo
a4f9ae90d0
Merge pull request #6845 from kojo1/jp-doc
...
fix jp doc translations
2023-10-11 07:00:16 +09:00
Hideki Miyazaki
f8604da8e3
change to use a cutom random generation func for PRNG
2023-10-11 06:50:26 +09:00
Lealem Amedie
a27b49882d
Add XTS API's required for VeraCrypt
2023-10-10 15:09:35 -06:00
Juliusz Sosinowicz
ca73a311cf
Don't use /dev/null
2023-10-10 17:31:45 +02:00
Juliusz Sosinowicz
5372cd5026
Update openwrt script
2023-10-10 17:08:58 +02:00
Chris Conlon
210fff5569
Merge pull request #6849 from miyazakh/rnd_gen_updates
...
Update random generation on RZ RSIP
2023-10-10 08:52:22 -06:00
Juliusz Sosinowicz
53f14206d1
Increase curl timeout
2023-10-10 14:36:00 +02:00
Juliusz Sosinowicz
cb912219e4
Run only stable curl tests
2023-10-10 14:19:03 +02:00
Juliusz Sosinowicz
365fae8ac0
Add curl test dep
2023-10-10 11:37:48 +02:00
jordan
f32c6a0d25
XMSS/XMSSMT hooks support: fix build.
2023-10-09 10:13:32 -05:00
JacobBarthelmeh
d83f2fa126
Merge pull request #6850 from douzzer/20231008-Wconversion-and-Aes-Eax-FIPS-fixes
...
20231008-Wconversion-and-Aes-Eax-FIPS-fixes
2023-10-09 09:06:17 -06:00
Juliusz Sosinowicz
64ed7d57eb
Add comment
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
275c0a0838
Update window in one place only when stateful
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
8ac72750bc
Fix linting issues
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
948d7ae761
keyLog_callback: flush the descriptor to make sure it is written out
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
c1a49fef99
Fix unreachable code error
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
bec87e525f
PQC TLS 1.3: test setting pqc with wolfSSL_CTX_set_groups
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
3a881079d3
Fix async
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
2c6c52078a
test_dtls13_frag_ch_pq: make sure kyber5 is used
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
37c0d52fa8
Dump manual memio stream with WOLFSSL_DUMP_MEMIO_STREAM
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
c802193119
Simplify the pqc keyshare handling
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
0dbf97c867
fixup! Clear the keyshare instead of storing it
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
230f81712c
fixup! Clear the keyshare instead of storing it
2023-10-09 12:54:11 +02:00
Anthony Hu
f640fdf91f
Adding a post-quantum DTLS 1.3 test.
...
This exercises the fragmenting of ClientHello via large post-quantum key share.
./configure --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtls \
--enable-dtls13 --with-liboqs
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
ada785e115
Address code review
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
8da863184c
Force DTLS 1.3 when accepting fragmented CH
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
df8ee69075
Clear the keyshare instead of storing it
2023-10-09 12:54:11 +02:00
Juliusz Sosinowicz
85a596e54a
DTLS 1.3: allow fragmenting the second ClientHello message
...
- DTLS 1.3 pqc support
- Add --enable-dtls-frag-ch option to enable CH fragmenting
- Send an alert when we get an empty keyshare with a cookie present to not allow for multiple HRR in one connection
- Only update the DTLS window when we have successfully processed or stored a message
- Call ssl->chGoodCb as soon as we have processed a verified full or fragmented ClientHello cookie
2023-10-09 12:54:11 +02:00
Daniel Pouzzner
61371d403a
minor fixes for AES-EAX implementation and test routines.
2023-10-08 18:02:52 -05:00
Sean Parkinson
832e0f3726
Merge pull request #6842 from kaleb-himes/fix-err-introduce-with-cm-move
...
Fix -4 return code when expected BAD_FUNC_ARG(-173)
2023-10-09 07:04:24 +10:00
Hideki Miyazaki
8d5df6fec2
change to use custom random generation func
2023-10-08 16:42:36 +09:00
JacobBarthelmeh
c082216661
Merge pull request #6836 from anhu/iar_ewarm_gitignore
...
Changes to what gets ignored by git for the IAR-EWARM IDE
2023-10-06 20:57:25 -06:00
JacobBarthelmeh
5cb80ea898
Merge pull request #6847 from embhorn/zd16767
...
Fix wolfSSL_set_verify_result to use correct value
2023-10-06 16:52:32 -06:00
Eric Blankenhorn
b329c0d5f4
Fix wolfSSL_set_verify_result to use correct value
2023-10-06 16:34:31 -05:00
Anthony Hu
52a9730f56
Changes to gitignore for IAR-EWARM IDE.
2023-10-06 17:02:22 -04:00
JacobBarthelmeh
fd2d098566
Merge pull request #6821 from bigbrett/aes-eax
...
AES EAX mode
2023-10-06 14:14:28 -06:00
Brett Nicholas
fafb9e81c0
Add support for AES EAX mode, as described in https://eprint.iacr.org/2003/069
2023-10-06 11:10:06 -06:00
JacobBarthelmeh
a7950a3739
Merge pull request #6846 from SparkiDev/aes_xts_arm_hw_crypto
...
Aarch64 and ARM32 AES XTS with crypto instructions
2023-10-06 09:58:38 -06:00
JacobBarthelmeh
a24d66939f
Merge pull request #6843 from embhorn/gh6760_take2
...
Fix RNG with writedup
2023-10-06 09:11:33 -06:00
Sean Parkinson
862a98abe0
Aarch64 and ARM32 AES XTS with crypto instructions
...
Optimised assembly of AES-XTS for Aarch64 and ARM32 using hardware
crypto instructions.
Aarch64 has loop unrolling.
Update aes.c to not have AES-XTS implementation when assembly
compilable.
Update test of AES-XTS to check expected cipher text of partial block
encryption.
2023-10-06 12:39:31 +10:00
Takashi Kojo
5fdc3d8dd5
fix jp doc translations
2023-10-06 09:16:41 +09:00
Takashi Kojo
97b6b00226
Merge branch 'master' of https://github.com/wolfssl/wolfssl
2023-10-06 09:15:10 +09:00
kaleb-himes
e51399ca0f
Do the success checkout out front
2023-10-05 17:05:36 -06:00
JacobBarthelmeh
5a5a8c9b47
Merge pull request #6841 from julek-wolfssl/fix-all-scr
...
Fixes for bugs exposed with SCR
2023-10-05 16:55:01 -06:00
JacobBarthelmeh
c26ad8d19a
Merge pull request #6828 from SparkiDev/mp_sqrtmod_prime_cust_curve
...
mp_sqrtmod_prime: bail early on the check for small values
2023-10-05 16:32:01 -06:00
JacobBarthelmeh
22b838c22b
Merge pull request #6799 from kojo1/no_malloc
...
fix NO_MALLOC guard in an error case
2023-10-05 16:23:54 -06:00
Eric Blankenhorn
a494d04f10
Fix RNG with writedup
2023-10-05 16:03:42 -05:00
kaleb-himes
4bb6c51d2d
Fix -4 return code when expected BAD_FUNC_ARG(-173)
2023-10-05 14:20:37 -06:00
JacobBarthelmeh
2c4556c797
Merge pull request #6835 from julek-wolfssl/no-ossl-defs-in-release
...
Add option to disable OPENSSL_COMPATIBLE_DEFAULTS
2023-10-05 10:47:50 -06:00
JacobBarthelmeh
1b4435d134
Merge pull request #6839 from julek-wolfssl/eol-repos
...
Remove unsupported distros from readme badge
2023-10-05 10:46:49 -06:00
JacobBarthelmeh
a333e775c7
Merge pull request #6837 from anhu/doc_corr
...
Minor correction to documentation
2023-10-05 10:46:12 -06:00
Chris Conlon
6968105984
Merge pull request #6831 from miyazakh/renesas_tsip_fix
...
fix compile error due to rz port change
2023-10-05 09:43:34 -06:00
Juliusz Sosinowicz
858c66de3c
Add configs that exposed this bug
2023-10-05 16:58:45 +02:00
Juliusz Sosinowicz
89946126f2
Remove dtls_expected_rx and use expected values directly
...
We should always read MTU + EXTRA so that we capture the entire message and are able to correctly decrypt the entire datagram. A smaller MTU also breaks larger handshake messages sent during a connection like secure renegotiation in DTLS 1.2 (confirmed) and post-handshake messages in DTLS 1.3 (suspected).
2023-10-05 16:58:45 +02:00
Juliusz Sosinowicz
80c8c62fb2
Proper initial_ctx clean up
...
- Call wolfSSL_CTX_free on ssl->initial_ctx so that it decrements the counter and free's the object
- Clean up where ssl->initial_ctx is free'd. It only needs to be free'd when the ssl object is being free'd
2023-10-05 16:58:45 +02:00
jordan
33d4b331fb
Add XMSS/XMSSMT wolfCrypt hooks.
2023-10-05 09:18:50 -05:00
Juliusz Sosinowicz
9abc611550
Update dtls in readme
2023-10-05 13:32:58 +02:00
Juliusz Sosinowicz
6b28a68e42
Add DTLS 1.3 to README
2023-10-05 13:26:35 +02:00
Juliusz Sosinowicz
c88fec1534
Remove unsupported distros from readme badge
2023-10-05 13:22:34 +02:00
Juliusz Sosinowicz
8ce8359bd7
Add option to disable OPENSSL_COMPATIBLE_DEFAULTS
2023-10-05 10:30:44 +02:00
Anthony Hu
630d75153f
Minor correction to documentation
2023-10-04 16:51:55 -04:00
JacobBarthelmeh
96205fc80d
Merge pull request #6820 from julek-wolfssl/zd/16550-int-crl
...
CRL verify the entire chain including loaded CA's
2023-10-04 14:37:50 -06:00
David Garske
4d81725438
Merge pull request #6832 from jpbland1/cryptocb-key-context
...
add devCtx to all keys for use in cryptoCb
2023-10-04 09:34:06 -07:00
JacobBarthelmeh
94043723c9
Merge pull request #6833 from douzzer/20231003-options-h-flag-order-etc
...
20231003-options-h-flag-order-etc
2023-10-04 09:01:58 -06:00
Daniel Pouzzner
45b613ee55
wolfcrypt/test/test.c: fix error codes in hpke_test_single(), hpke_test(), and ecc521_test_deterministic_k().
2023-10-03 22:44:11 -05:00
Daniel Pouzzner
71649388a0
configure.ac: in options.h generation, fix order of flags to match Makefile order.
2023-10-03 21:11:59 -05:00
John Bland
f4acc8f33d
add devCtx to all keys for use in cryptoCb
2023-10-03 19:29:36 -04:00
Hideki Miyazaki
f9fb966bb4
fix compile error due to rz port change
2023-10-04 06:47:12 +09:00
JacobBarthelmeh
88d25036a0
Merge pull request #6823 from rizlik/stale_suites_fix
...
fix: tls13: don't use stale suites pointers in CheckPreSharedKeys
2023-10-03 11:41:53 -06:00
Juliusz Sosinowicz
7baf151c37
CRL verify the entire chain including loaded CA's
...
- Regen CRL's as most of them are expired
- certs/crl/extra-crls/ca-int-cert-revoked.pem: CRL that revokes certs/intermediate/ca-int-cert.pem signed by certs/ca-cert.pem
- Add CheckCertCRL_ex API to not depend on DecodedCert
- CheckCertCRLList: accept raw serial or hashed version to work with Signers
- Add XELEM_CNT to simplify pre-proc element counting
2023-10-03 11:45:43 +02:00
Sean Parkinson
e55e6790dd
mp_sqrtmod_prime: bail early on the check for small values
...
When using custom curves, only use the first 22 values with the prime to
calculate Legendre symbol. The known curves work and defeats long running
times when non-prime values are passed in.
2023-10-03 16:48:34 +10:00
Daniel Pouzzner
5066771f10
Merge pull request #6824 from bandi13/PRB-fips-ready-config-issues
...
Fix issue created by 62c14e4d5b
2023-10-03 00:47:14 -04:00
JacobBarthelmeh
1a3bf5e932
Merge pull request #6822 from douzzer/20230930-aes-xts-test-gate
...
20230930-aes-xts-test-gate
2023-10-02 17:57:17 -06:00
Andras Fekete
47f0d5a5d0
Fix issue created by 62c14e4d5b
2023-10-02 12:34:33 -04:00
Chris Conlon
ecf666a121
Merge pull request #6819 from miyazakh/renesas_rz_opt
...
Update usage of sha acceleration on RSIP
2023-10-02 09:22:06 -06:00
Marco Oliverio
c70b3f297e
fix: tls13: don't use stale suites pointers in CheckPreSharedKeys
2023-10-02 15:03:55 +00:00
Daniel Pouzzner
3e7f4c5f2d
wolfcrypt/test/test.c: in aes_xts_128_test(), fix gate on LARGE_XTS_SZ test added in 3ea0fb30dd (disable for AF_ALG and pre-5.3 FIPS).
2023-09-30 12:07:56 -05:00
JacobBarthelmeh
369db531d2
Merge pull request #6817 from anhu/tls13_server_suppgroups
...
Allow the server to send supported groups extension in TLS 1.3
2023-09-29 13:53:37 -06:00
Anthony Hu
7c1cc5e8f9
Allow the server to send supported groups extension in TLS 1.3
2023-09-29 12:42:44 -04:00
JacobBarthelmeh
8a57936d7e
Merge pull request #6801 from julek-wolfssl/zephyr-fixes
...
Misc zephyr fixes
2023-09-29 09:50:19 -06:00
JacobBarthelmeh
53f729f959
Merge pull request #6815 from SparkiDev/aes_xts_x64
...
AES XTS x64 ASM: add AVX1 and AESNI implementations
2023-09-29 09:42:58 -06:00
Hideki Miyazaki
e092c57675
change sha h/w acceleration implementation
2023-09-29 16:22:16 +09:00
JacobBarthelmeh
aedebac649
Merge pull request #6818 from bandi13/containerReadme
...
Container readme
2023-09-28 15:21:23 -06:00
Sean Parkinson
3ea0fb30dd
AES XTS x64 ASM: add AVX1 and AESNI implementations
...
Adding AES-XTS AVX1 and AESNI implementations.
Fix name in comment at top of x64 assembly files.
2023-09-28 14:44:23 -05:00
Andras Fekete
005346d9ec
Fix entrypoint
2023-09-28 14:45:51 -04:00
Andras Fekete
93358f1402
Define WOLFSSL_DIR
2023-09-28 13:59:04 -04:00
Andras Fekete
5e1bd8174c
Push multi-platform wolfCLU to DockerHub
2023-09-28 13:55:38 -04:00
Andras Fekete
2ef83e142f
Update buildAndPush.sh and README.md
2023-09-28 13:27:07 -04:00
JacobBarthelmeh
0571040e36
Merge pull request #6816 from bandi13/fixContainers
...
Fix containers
2023-09-28 10:37:20 -06:00
Andras Fekete
9fdb3cf17a
Appease test scripts
2023-09-28 10:48:03 -04:00
Andras Fekete
b88754bb64
Add in clang-10 and clang-11 tests
2023-09-28 10:29:36 -04:00
Andras Fekete
5e3f00f6f7
Specify the OS version
...
'ubuntu-latest' doesn't have clang-12 in it anymore
2023-09-28 10:29:20 -04:00
Andras Fekete
0f4f677ea4
Show logs on test failure
2023-09-28 10:17:30 -04:00
JacobBarthelmeh
20f992af5e
Merge pull request #6809 from SparkiDev/static_rsa_len_check_fix
...
Static RSA length check
2023-09-27 15:09:08 -06:00
Andras Fekete
d95ce57eea
Fix script errors
2023-09-27 15:31:01 -04:00
JacobBarthelmeh
79a6cbc860
Merge pull request #6813 from anhu/elliptical
...
Fixup spelling: Elliptic
2023-09-26 17:11:12 -06:00
JacobBarthelmeh
a97e13f823
Merge pull request #6798 from gojimmypi/autogen-update-wsl-pr
...
no WSL/Windows git hooks from autogen.sh
2023-09-26 16:59:41 -06:00
Sean Parkinson
9acba6ee2d
Static RSA length check
...
Better length check on decrypted pre-master secret length.
2023-09-27 07:55:53 +10:00
Anthony Hu
b22c2971e3
Fixup spelling: Elliptic
...
Fixes https://github.com/wolfSSL/wolfssl/issues/6767
2023-09-26 16:18:02 -04:00
JacobBarthelmeh
60f30e994d
Merge pull request #6811 from gojimmypi/esp32-sha-revert-verbosity
...
ESP32 debug only: Mode REVERT to ESP32_SHA_SW
2023-09-26 13:34:43 -06:00
JacobBarthelmeh
f042863ddf
Merge pull request #6807 from kareem-wolfssl/zd16715
...
Prevent current handshake counter from underflowing.
2023-09-26 10:55:52 -06:00
gojimmypi
4ece466fca
ESP32 debug only: Mode REVERT to ESP32_SHA_SW
2023-09-26 08:32:23 -07:00
JacobBarthelmeh
237d10ab1e
Merge pull request #6803 from gojimmypi/esp32-example-time
...
ESP32 examples: update interim set_time() fixed value
2023-09-25 13:34:22 -06:00
gojimmypi
83117ae33f
ESP32 examples: interim set_time() fixed value
2023-09-23 17:16:19 -07:00
Kareem
df6a65e151
Prevent current handshake counter from underflowing.
2023-09-22 14:47:00 -07:00
JacobBarthelmeh
f9082c54e3
Merge pull request #6800 from DimitriPapadopoulos/codespell
...
More typos found by codespell
2023-09-22 14:12:34 -06:00
Andras Fekete
717249c0cc
Trust github.com in container, add in possible Jenkins userIDs
2023-09-22 16:01:54 -04:00
Andras Fekete
f0d0a87822
Add in working cross-compiler container and builder script
2023-09-22 14:55:30 -04:00
Andras Fekete
1141f9bee9
Use wolfssl/wolfssl-builder as the container name
2023-09-22 14:55:01 -04:00
Juliusz Sosinowicz
470e839b26
Misc zephyr fixes
...
- Need to call fs_file_t_init() before calling fs_open()
- 0 is a valid POSIX socket number
- Include stdio.h when needed to simplify macro logic
- Define Zephyr specific macros in CMakeLists.txt to make for a better user experience
2023-09-22 12:19:06 +02:00
Dimitri Papadopoulos
f7d7006e87
More typos found by codespell
2023-09-22 11:38:24 +02:00
Takashi Kojo
a9548b2f11
fix NO_MALLOC guard in an error case
2023-09-22 10:05:21 +09:00
Takashi Kojo
2fafa722c2
fix NO_MALLOC guard in an error case
2023-09-22 09:13:41 +09:00
gojimmypi
d5b6aa318c
no WSL/Windows git hooks copy for autogen.sh
2023-09-21 23:31:11 +02:00
Sean Parkinson
9442ec4b06
Merge pull request #6793 from danielinux/no_umaal_for_cortexm
...
Enforce WOLFSSL_SP_NO_UMAAL with _CORTEX_M_ASM
2023-09-21 22:29:32 +10:00
TakayukiMatsuo
4b1c29ce0c
Merge pull request #6796 from miyazakh/doxygen_j_typo
...
Fix weird Japanese words in doxygen
2023-09-21 16:59:12 +09:00
Hideki Miyazaki
88254d3709
fix weird Japanese words
2023-09-21 09:12:22 +09:00
David Garske
347394cc6b
Detect Cortex M3 (no UMAAL) and define WOLFSSL_SP_NO_UMAAL.
2023-09-20 17:10:27 -07:00
David Garske
16e6a8c150
Merge pull request #6795 from jpbland1/ech-double-free-fix
...
Fix ECH double free on rejection
2023-09-20 14:25:11 -07:00
David Garske
bc02006def
Merge pull request #6794 from res0nance/fix-memory-type
...
pqc: fix memory type for shared secret storage server side
2023-09-20 14:24:42 -07:00
John Bland
f71423d626
set ssl->hsHashesEch to NULL regardless of acceptance
...
to avoid double free, clean up style violations
2023-09-20 14:51:40 -04:00
David Garske
f7ca923b4b
Merge pull request #6783 from bandi13/more_async_cb
...
More async cb
2023-09-20 10:16:08 -07:00
Andras Fekete
9ed19cddfa
Need to increment state after the async task completes
2023-09-20 12:23:14 -04:00
Chris Conlon
e91b6230a8
Merge pull request #6792 from miyazakh/renesas_ra6m4_r
...
Fix ra6m4 port
2023-09-20 09:10:10 -06:00
res0nance
0983ea9a80
pqc: fix memory type for shared secret storage server side
...
This gets copied to preMasterSecret and freed in
TLSX_KeyShare_ProcessPqc with the SECRET type but is allocated
with the TLSX type.
2023-09-20 15:45:26 +08:00
Hideki Miyazaki
8f9c3716ed
fix ra6m4 port
2023-09-20 09:00:22 +09:00
Chris Conlon
5bc5b8a99b
Merge pull request #6768 from miyazakh/renesas_rz
...
Renesas RZN2L support
2023-09-19 14:38:03 -06:00
David Garske
1cda8430fd
Merge pull request #6709 from embhorn/zd16316
...
misc.h declarations for user defined functions with NO_INLINE disabled
2023-09-19 11:19:23 -07:00
David Garske
b72d02dd88
Merge pull request #6742 from embhorn/zd16187_2
...
Fixes for NO_FILESYSTEM and NO_BIO config
2023-09-19 11:19:07 -07:00
gojimmypi
5830f921fa
ARIA cipher cmake ( #6600 )
...
* ARIA Cipher CMake support
2023-09-19 10:57:02 -07:00
David Garske
de3c9f19ef
Merge pull request #6788 from bandi13/addCCacheDocker
...
Add CCache to the container to decrease compilation time
2023-09-19 10:39:51 -07:00
Andras Fekete
da39f66ff0
Remove accidental comment left in.
2023-09-19 13:10:16 -04:00
Andras Fekete
186d3c2eb4
Fixes to various Async issues
2023-09-19 13:10:16 -04:00
Andras Fekete
ad9779cdc1
Explicitly define code with WOLFCRYPT_ASYNC_CRYPT_SW
2023-09-19 13:10:16 -04:00
David Garske
763de1a685
Merge pull request #6790 from bandi13/codesonar
...
Clean up memory leaks
2023-09-19 09:48:22 -07:00
David Garske
eca28ea2f6
Merge pull request #6789 from bandi13/renameAsyncEnumPart2
...
Clean up double enum
2023-09-19 09:08:32 -07:00
David Garske
ba74c83f73
Merge pull request #6785 from embhorn/gh6760
...
Fix writedup rng leak
2023-09-19 08:23:41 -07:00
gojimmypi
9398fa0736
Espressif HW Improvements ( #6624 )
...
* Espressif HW Improvements
* revised AES HW/SW fallback logic for ESP32
2023-09-19 08:21:13 -07:00
Andras Fekete
2af5ae89a2
Rename enum to protect the innocent
...
WC_NO_PENDING_E indicates that there really isn't any asynchronous task that is pending.
2023-09-19 10:46:11 -04:00
Andras Fekete
c12bf79e56
Clean up double enum
...
This was necessary to have https://github.com/wolfSSL/wolfAsyncCrypt/pull/70 be able to merge
2023-09-19 10:30:04 -04:00
Andras Fekete
9472dd39e4
Add CCache to the container to decrease compilation time
2023-09-19 10:12:03 -04:00
Sean Parkinson
af6386732c
AES GCM ARM32 alignment fix
...
Don't use xorbufout in GMULT.
Force the table to be aligned.
2023-09-19 09:21:20 +10:00
Eric Blankenhorn
911c4519ef
Fix writedup rng leak
2023-09-18 16:19:22 -05:00
Andras Fekete
3bb0643cdd
Clean up memory leaks
2023-09-18 16:53:48 -04:00
David Garske
1149522357
Merge pull request #6784 from bandi13/renameAsyncEnum
...
Allow code to build during rename
2023-09-18 12:41:53 -07:00
Andras Fekete
164fc8c5cb
Allow code to build during rename
2023-09-18 14:47:35 -04:00
David Garske
1d7c6c94fe
Merge pull request #6780 from SparkiDev/sp_x64_uninit
...
SP x64 ASM: Initialize pointers in RSA functions
2023-09-18 09:49:22 -07:00
David Garske
623549ce90
Merge pull request #6781 from SparkiDev/sp_arm64_asm_fixup_1
...
SP ARM64 ASM: fix sp_256_mont_dbl_4
2023-09-18 09:49:06 -07:00
Sean Parkinson
ea8bc82f85
SP ARM64 ASM: fix sp_256_mont_dbl_4
...
In sp_256_mont_dbl_4, not all used registers were in asm clobber list.
2023-09-18 15:17:39 +10:00
Sean Parkinson
c0edb7b583
SP x64 ASM: Initialize pointers in RSA functions
...
Windows compiler complains about uninitialized variables in these
functions. Set the pointers to NULL to quiet the compiler.
2023-09-18 14:49:19 +10:00
Hideki Miyazaki
7735ea0ff3
fix rx build failure
2023-09-16 11:48:49 +09:00
JacobBarthelmeh
1f2ddb7554
Merge pull request #6778 from danielinux/writeable_pkcs11_tokens
...
Add compile-time option WOLFSSL_PKCS11_RW_TOKENS
2023-09-15 11:46:03 -06:00
JacobBarthelmeh
5654691f05
Merge pull request #6775 from kareem-wolfssl/zd16652
...
Add a build flag ASN_TEMPLATE_SKIP_ISCA_CHECK to optionally skip the isCa != false check.
2023-09-15 11:43:04 -06:00
JacobBarthelmeh
139fd5d208
Merge pull request #6776 from SparkiDev/sp_ecc_x64
...
SP ECC: x64 minor speed improvement
2023-09-15 08:23:51 -06:00
Daniele Lacamera
ca56b79209
Add compile-time option WOLFSSL_PKCS11_RW_TOKENS
...
By default, wolfcrypt PKCS11 interface accesses tokens in read-only
mode. In some cases, we might want to build the client with write
permissions, i.e. when initializing tokens via C_InitToken().
The WOLFSSL_PKCS11_RW_TOKENS option, if present, allows write access to
PKCS11 tokens.
2023-09-15 15:18:11 +02:00
Hideki Miyazaki
5e97b9fde8
addressed review comments
2023-09-15 13:22:35 +09:00
Sean Parkinson
e9f1489997
SP ECC: x64 minor speed improvement
...
ARM32/Thumb2: for safer code, do two reductions in mont triple after doing double part.
2023-09-15 09:48:32 +10:00
Kareem
8e40130003
Add a build flag ASN_TEMPLATE_SKIP_ISCA_CHECK to optionally skip the isCa != false check.
2023-09-14 15:44:47 -07:00
JacobBarthelmeh
7d85e390a9
Merge pull request #6769 from cconlon/pkcs7ContentType
...
Support PKCS#7 definition for ContentType content ANY
2023-09-14 15:44:35 -06:00
JacobBarthelmeh
6b6c9f9ae0
Merge pull request #6772 from bandi13/zd16449_more_fixes
...
Zd16449 more fixes
2023-09-14 09:35:01 -06:00
Anthony Hu
6bf716bd26
Merge pull request #6743 from JacobBarthelmeh/unit_tests
...
add test case for ignoring cert path error
2023-09-14 11:04:35 -04:00
JacobBarthelmeh
f23e2a62e6
Merge pull request #6773 from SparkiDev/sp_arm_arch
...
SP: WOLFSSL_SP_ARM_ARCH to WOLFSSL_ARM_ARCH
2023-09-14 08:57:02 -06:00
Sean Parkinson
6a25cdeb28
SP: WOLFSSL_SP_ARM_ARCH to WOLFSSL_ARM_ARCH and fix SAKKE on Thumb2/ARM32
...
WOLFSSL_SP_ARM_ARCH no longer used.
Using WOLFSSL_ARM_ARCH instead.
Change umaal check to only available with WOLFSSL_ARM_ARCH > 6.
SAKKE mont_reduce with umaal not using correct registers at end.
2023-09-14 13:04:49 +10:00
JacobBarthelmeh
3ae23ec926
Merge pull request #6745 from res0nance/windows-test
...
ci: run windows test
2023-09-13 16:16:13 -06:00
JacobBarthelmeh
3697219244
Merge pull request #6747 from res0nance/multi-arch-ci
...
ci: Add CI for different archs
2023-09-13 16:12:35 -06:00
JacobBarthelmeh
ba03677569
Merge pull request #6770 from SparkiDev/sp_asm_improvements_1
...
SP ASM: improve performance
2023-09-13 16:01:03 -06:00
JacobBarthelmeh
624cb5e2bb
Merge pull request #6744 from res0nance/windows-benchmark-config
...
windows: fix x64 benchmark release builds
2023-09-13 15:52:27 -06:00
Sean Parkinson
f5b96e7bde
Merge pull request #6735 from anhu/lteq_0
...
Propose to convert a less than 0 to less than or equal to 0
2023-09-14 07:08:22 +10:00
Andras Fekete
3d332a4fad
Remove accidental code change
2023-09-13 14:41:21 -04:00
Andras Fekete
2f63eb070e
Fix memory leak if the function is being called again because of a retry
2023-09-13 14:05:57 -04:00
JacobBarthelmeh
f32f220919
Merge pull request #6752 from SparkiDev/aes_gmult_table_align_32bit
...
AES GMULT: add table implementation using 32-bit types
2023-09-13 11:38:03 -06:00
JacobBarthelmeh
ff233ce3af
Merge pull request #6771 from res0nance/pqc-curvename
...
Fix wolfSSL_get_curve_name() returning NULL when using PQC groups
2023-09-13 10:54:58 -06:00
Sean Parkinson
114c8cc681
SP ASM: improve performance
...
Thumb2/ARM32: use umaal instruction to speed up mulitplication, squaring
and reduction. umaal not always available so use umlal instead.
Implementations for architectures less than 4 still kept - no umull.
Cleanup point arithmetic to not take shortcuts.
Make masking for constant time faster.
Add alternate asm for different compilers.
Get ARMv4 and ARMv6 compiling.
Remove whitespace at end of lines.
2023-09-13 21:13:53 +10:00
res0nance
825db397d7
Set namedGroup when generating pqc ciphertext
...
This fixes an issue where wolfSSL_get_curve_name() will
return NULL when using PQC groups.
2023-09-13 13:29:31 +08:00
Sean Parkinson
40c5048e38
AES GMULT: add table implementation using 32-bit types
...
32-bit ARM didn't load 64-bit pointers without alignment issues.
2023-09-13 13:44:17 +10:00
John Bland
eda3cd6a37
Merge pull request #6762 from jpbland1/ocsp-chain-count-retry
...
stop DoCertificate from reseting the cert chain
2023-09-12 21:42:09 -04:00
Hideki Miyazaki
1c9afb8b12
initial commit for RZN2L board Support
2023-09-13 09:22:55 +09:00
John Bland
6c8eaf26f5
update based on pr comments
2023-09-12 19:43:28 -04:00
John Bland
6e87fc7f90
switch to using ssl->error to check for previous error
2023-09-12 18:25:10 -04:00
Andras Fekete
971df19c5c
Missing fix
2023-09-12 17:06:54 -04:00
John Bland
14017bd67e
remove NULL check on non-pointer array
2023-09-12 14:42:33 -04:00
JacobBarthelmeh
86755dc7e4
Merge pull request #6766 from douzzer/20230911-linuxkm-my__show_free_areas-prototype
...
20230911-linuxkm-my__show_free_areas-prototype
2023-09-12 10:51:15 -06:00
David Garske
e4b211bee9
Merge pull request #6764 from bandi13/zd16449_async
...
Zd16449 async
2023-09-12 08:38:16 -07:00
Daniel Pouzzner
63e167e974
linuxkm/linuxkm_wc_port.h: add missing prototype for my__show_free_areas().
2023-09-11 21:27:25 -05:00
John Bland
937aa3415f
set last missing lastErr section
2023-09-11 18:24:37 -04:00
Takashi Kojo
1f7ccc4eff
Eliminate bad record mac alert
2023-09-12 07:17:04 +09:00
JacobBarthelmeh
61f48eb5a1
Merge pull request #6763 from DimitriPapadopoulos/codespell
...
Fix residual typos found by codespell
2023-09-11 15:55:34 -06:00
John Bland
b99b1d4cfd
fix bad error setting and instances where lastErr
...
wasn't set as it should have been
2023-09-11 17:52:07 -04:00
Andras Fekete
d25f4f06bf
clang-tidy is being super picky
2023-09-11 16:30:29 -04:00
Andras Fekete
c7f5043774
Fixes for the sanitizer
2023-09-11 15:57:20 -04:00
Andras Fekete
42985ebdfa
Revert "Add in ASYNC_CRYPTO_SW checks"
...
This reverts commit f5ef7b40db .
2023-09-11 15:10:32 -04:00
Andras Fekete
6cb1aef836
Clean up old comments
2023-09-11 14:54:42 -04:00
Andras Fekete
07e2f90fbb
Reorder and add async_* sources
2023-09-11 14:48:17 -04:00
Andras Fekete
b34348680a
New format
2023-09-11 14:33:19 -04:00
Andras Fekete
f5ef7b40db
Add in ASYNC_CRYPTO_SW checks
2023-09-11 13:12:09 -04:00
Andras Fekete
57e870e0d4
Add Async examples
2023-09-11 12:05:11 -04:00
JacobBarthelmeh
63477bcfdb
Merge pull request #6733 from gojimmypi/windows-gettime_secs
...
implement gettime_secs for Windows (_MSC_VER) in tests/api.c
2023-09-11 09:31:30 -06:00
Dimitri Papadopoulos
d532833af9
Fix residual typos found by codespell
2023-09-11 11:34:28 +02:00
John Bland
d0c2609ebb
stop ProcessPeerCerts from reseting the cert chain
...
count when an async error was returned
2023-09-11 01:56:58 -04:00
Chris Conlon
0bb9b85cd4
PKCS7: support PKCS#7 definition for ContentType eContent ANY, in addition to CMS OCTET_STRING definition
2023-09-08 16:32:15 -06:00
Andras Fekete
23ebace6b1
Fix event handling
2023-09-08 16:34:04 -04:00
JacobBarthelmeh
f9c2a86456
Merge pull request #6759 from kaleb-himes/SP_CACHE_UPDATE
...
Remove references to WOLFSSL_SP_CACHE_RESISTANT as it is always on
2023-09-08 14:27:38 -06:00
Andras Fekete
f9e5e4d08a
Clean up the 'async-check.sh' script
...
Far too many times I got burned by passing the wrong argument and things getting set up wrong.
2023-09-08 15:05:22 -04:00
JacobBarthelmeh
f8f66191e3
Merge pull request #6750 from SparkiDev/curve25519_thumb2_2
...
Curve25519/Ed25519: align buffers
2023-09-08 10:36:25 -06:00
Sean Parkinson
90467aa578
Curve25519/Ed25519: align buffers
...
Make data structures align buffers.
Align buffers in functions.
Add versions that don't use umaal
2023-09-08 15:23:15 +10:00
Sean Parkinson
00a08374df
Merge pull request #6707 from JacobBarthelmeh/xilinx
...
use flush instead of invalidate
2023-09-08 07:07:08 +10:00
Sean Parkinson
0e1706c3c7
Merge pull request #6756 from JacobBarthelmeh/docs
...
fix parameter typo in dox documentation
2023-09-08 07:03:39 +10:00
kaleb-himes
0fb514fa41
Remove references to WOLFSSL_SP_CACHE_RESISTANT as it is always on
2023-09-07 14:24:51 -06:00
David Garske
7ca6c129e5
Merge pull request #6755 from anhu/GetASNInt
...
Expose GetASNInt as part of WOLFSSL_ASN_API
2023-09-07 11:30:46 -07:00
gojimmypi
bba9add3a5
Merge branch 'master' of https://github.com/wolfssl/wolfssl into windows-gettime_secs
2023-09-07 08:54:42 -07:00
Anthony Hu
fddda8f582
Expose GetASNHeader in both template and original.
2023-09-07 09:52:27 -04:00
András Fekete
fc4e4f1238
Merge pull request #6757 from julek-wolfssl/zephyr-ci
...
Tie zephyr tests to a release
2023-09-07 08:49:10 -04:00
Juliusz Sosinowicz
ec7ecba0fe
Tie zephyr tests to a release
2023-09-07 13:21:24 +02:00
gojimmypi
e74b3ecdad
revert to only original gettime_secs changes per code review
2023-09-06 17:55:15 -07:00
JacobBarthelmeh
6e9c73eb12
fix parameter typo in dox documentation
2023-09-06 15:38:49 -07:00
Anthony Hu
6665f240e0
Expose GetASNInt as part of WOLFSSL_ASN_API
2023-09-06 18:17:42 -04:00
JacobBarthelmeh
755c39b5fc
Merge pull request #6751 from ejohnstown/merge-fips-builds
...
FIPS 140-3 Pilot Program Check-in
2023-09-06 16:07:41 -06:00
Daniel Pouzzner
344e1661e1
wolfcrypt/src/{hmac.c,sha256.c,sha512.c,kdf.c}: ForceZero() smallstack buffers before freeing them, and ForceZero() the Hmac, wc_Sha512, wc_Sha384, wc_Sha256, and wc_Sha224 structures at the end of their respective freeing routines. also, remove superseded ForceZero() calls in wc_HKDF_Expand(), wc_SSH_KDF(), and wc_HKDF_Extract().
2023-09-06 14:53:19 -05:00
JacobBarthelmeh
51cb80b865
Merge pull request #6753 from bandi13/disableZephyrTests
...
Temporarily disable until we can figure out the issue
2023-09-06 11:18:01 -06:00
Daniel Pouzzner
5540449315
wolfcrypt/src/port/arm/armv8-aes.c: add missing implementations of wc_AesCtrSetKey(), and add (void)dir in implementation to silence -Wunused.
2023-09-06 08:20:25 -07:00
Andras Fekete
f0743a70b4
Temporarily disable until we can figure out the issue
2023-09-06 09:24:34 -04:00
John Safranek
fb91f1c1fd
Update the ARM asm files with a missing initialization for SHA2-256 and
...
the AesCtrSetKey function for AES-CTR.
2023-09-05 17:07:08 -07:00
John Safranek
d866144fb1
Merge branch 'master' into merge-fips-builds
2023-09-05 16:52:36 -07:00
John Safranek
db858fd052
Merge tag 'v5.2.1-stable' into merge-fips-builds
...
Check-in FIPS 140-3 PILOT
2023-09-05 13:50:29 -07:00
JacobBarthelmeh
298b488bf1
Merge pull request #6749 from cconlon/jniCertReq
...
Add WOLFSSL_CERT_EXT to --enable-jni, minor CSR items
2023-09-01 16:15:10 -06:00
JacobBarthelmeh
0352b384a5
Merge pull request #6731 from SparkiDev/aes_arm32_thumb2
...
AES ARM32 and Thumb2 ASM: fixup ARM32 and add Thumb2
2023-09-01 15:56:12 -06:00
JacobBarthelmeh
cd02d5140f
Merge pull request #6738 from philljj/wolfcrypt_lms_verify_only
...
Wolfcrypt LMS verify-only support
2023-09-01 13:25:31 -06:00
Chris Conlon
a2e2a3e994
add --enable-certreq to --enable-jni, support extKeyUsage in X509_REQ_sign, add missing X509_REQ_print fields
2023-09-01 11:59:21 -06:00
Daniel Pouzzner
196f154c51
wolfcrypt/src/curve25519.c: use endian-conditional initializer for kCurve25519BasePoint.
2023-09-01 11:36:18 -05:00
res0nance
cf32bc362b
ci: Add CI for different archs
2023-09-01 16:40:37 +08:00
jordan
b36c312ef3
LMS verify-only support: fix clang warning, rename define.
2023-08-31 21:46:00 -05:00
David Garske
136cb98412
Force 32-bit alignment on kCurve25519BasePoint
2023-09-01 12:14:55 +10:00
JacobBarthelmeh
efd08eadb8
Merge pull request #6746 from douzzer/20230831-ge_p3_dbl
...
20230831-ge_p3_dbl
2023-08-31 15:06:17 -06:00
Daniel Pouzzner
dc2905ce80
wolfssl/wolfcrypt/ge_operations.h: fix for bugprone-macro-parentheses in ge_p3_dbl() found by multi-test clang-tidy-all-intelasm.
2023-08-31 13:22:53 -05:00
JacobBarthelmeh
ffd6c2b859
Merge pull request #6625 from TakayukiMatsuo/jp6352
...
Update Japanese API comments
2023-08-31 10:03:09 -06:00
res0nance
3dec8279a0
windows: fix x64 benchmark release builds
...
The linker should use the x64 option for 64-bit builds
2023-08-31 20:02:37 +08:00
res0nance
a99139574a
ci: run windows test
2023-08-31 19:59:05 +08:00
jordan
03088b2946
LMS verify-only support: tiny correction to INSTALL.
2023-08-30 21:02:50 -05:00
JacobBarthelmeh
927930c86e
Merge pull request #6740 from SparkiDev/ecies_kdf
...
ECIES: add support for other KDFs
2023-08-30 16:27:39 -06:00
Sean Parkinson
b546473495
Merge pull request #6739 from JacobBarthelmeh/fuzzing
...
additional sanity check with GetIntPositive
2023-08-31 07:11:05 +10:00
JacobBarthelmeh
e748e1be32
add test case for ignoring cert path error
2023-08-30 12:45:29 -07:00
JacobBarthelmeh
2aefdfe9d5
Merge pull request #6737 from anhu/ignoreBadPath
...
Add new feature macro WOLFSSL_IGNORE_BAD_CERT_PATH.
2023-08-30 13:37:56 -06:00
Eric Blankenhorn
7262a30074
Fixes for NO_FILESYSTEM config
2023-08-30 13:54:49 -05:00
JacobBarthelmeh
944db2c2e5
Merge pull request #6726 from julek-wolfssl/dropped-ccs
...
Server should not ignore plaintext packets as long as it has stuff to rtx
2023-08-30 09:40:14 -06:00
Eric Blankenhorn
4e86523624
Fix NO_BIO build error
2023-08-30 10:24:25 -05:00
Sean Parkinson
0638ec234b
AES ARM32 and Thumb2 ASM: fixup ARM32 and add Thumb2
...
Fix which functions and data are compiled in depending on defines.
Better handing of constants.
Also fix Aarch64 ed25519 inline assembly.
2023-08-30 20:34:51 +10:00
Sean Parkinson
41d6afcfa1
ECIES: add support for other KDFs
2023-08-30 10:37:57 +10:00
JacobBarthelmeh
1ada2e6a43
additional sanity check with GetIntPositive
2023-08-29 15:43:01 -07:00
jordan
bbf105f8dc
LMS verify-only support: update INSTALL.
2023-08-29 16:37:21 -05:00
jordan
8662312ecf
LMS verify only support.
2023-08-29 15:46:18 -05:00
Anthony Hu
d7bb5aa367
Add new feature macro WOLFSSL_IGNORE_BAD_CERT_PATH.
2023-08-29 10:28:02 -04:00
Kaleb Himes
70c362f680
Merge pull request #6736 from ejohnstown/fips-update
...
FIPS Update
2023-08-29 08:21:47 -06:00
JacobBarthelmeh
c47600c52c
update comment
2023-08-29 12:45:45 +02:00
Juliusz Sosinowicz
a0fef66c3b
Add test case for dropped ccs
2023-08-29 12:45:45 +02:00
Juliusz Sosinowicz
357c9a68f2
Only drop plaintext msgs when we don't have stuff to rtx
2023-08-29 12:45:13 +02:00
Juliusz Sosinowicz
6e3c3577f5
Refactor the crazy conditional in VerifyForDtlsMsgPoolSend
2023-08-29 12:45:13 +02:00
gojimmypi
d8fe8b9140
gettime_secs() in api.c now uses TimeNowInMilliseconds()
2023-08-28 18:14:29 -07:00
gojimmypi
e303f8709c
move TimeNowInMilliseconds from tls13.c to internal,c; now WOLFSSL_API
2023-08-28 18:13:24 -07:00
John Safranek
b13294623b
FIPS Update
...
1. Restore the linuxv5 option of fips-check.
2. Added option linuxv5.2.1 to fips-check.
2023-08-28 16:41:47 -07:00
John Safranek
2380086209
FIPS Update
...
1. Rename the error code for degraded mode so it matches what's in the
fips repo.
2. Update the tag used for linuxv5 builds in the fips-check script.
2023-08-28 15:11:13 -07:00
kaleb-himes
3a5e171636
Check-in fips_test.h changes to master as well
2023-08-28 14:22:37 -07:00
Anthony Hu
354b28eea0
Propose to convert a less than 0 to less than or equal to 0
2023-08-28 17:16:34 -04:00
gojimmypi
4058dbec7c
Merge branch 'master' of https://github.com/wolfssl/wolfssl into windows-gettime_secs
2023-08-28 11:40:51 -07:00
JacobBarthelmeh
c5c968aae3
Merge pull request #6722 from julek-wolfssl/zd/16550
...
ZD16550
2023-08-28 10:19:19 -06:00
JacobBarthelmeh
872551a5fc
Merge pull request #6734 from julek-wolfssl/curl-action-correct-name
...
Correct name in curl github action
2023-08-28 09:30:34 -06:00
Juliusz Sosinowicz
9bea33b598
Correct name in curl github action
2023-08-28 11:55:42 +02:00
Juliusz Sosinowicz
b02fe0853f
CI fixes
2023-08-28 10:52:36 +02:00
Juliusz Sosinowicz
57ce894393
CRL refactor
...
- CheckCertCRLList: check all entries in case a single issuer has multiple CRL's loaded
- test_multiple_crls_same_issuer: testing two different certificates forcing the client to check both CRL's from the same issuer
- CRL_Entry
- use a lock instead of a mutex to allow multiple threads to access the same list simultaneously
- add a verifyMutex when doing verification so that we don't have to release the crlLock
- Add allocation and free functions for CRL_Entry
- DupCRL_Entry: simplify copying by copying all static fields in one memcpy
2023-08-28 10:52:36 +02:00
Juliusz Sosinowicz
abfcda8750
Decode the key usage extension as LE not BE
2023-08-28 10:52:36 +02:00
Juliusz Sosinowicz
e85901c8e5
Only list supported sigalgs in certreq
2023-08-28 10:52:36 +02:00
gojimmypi
321f74869a
implement gettime_secs for Windows (_MSC_VER) in tests/api.c
2023-08-25 18:30:05 -07:00
JacobBarthelmeh
5b5e66b55f
Merge pull request #6732 from billphipps/correct_cryptocb_debug
...
Correct cryptocb cmd debug message
2023-08-25 13:57:32 -06:00
billphipps
7a6e851a82
Corrected print format string.
2023-08-25 13:59:23 -04:00
JacobBarthelmeh
2a5ed11f34
Merge pull request #6730 from gojimmypi/aria-no-openssl
...
ARIA no longer needs OpenSSL enabled
2023-08-25 11:48:11 -06:00
JacobBarthelmeh
b20c6c54d1
Merge pull request #6729 from ejohnstown/degraded-mode
...
FIPS Degraded Mode
2023-08-25 10:10:22 -06:00
JacobBarthelmeh
14deb7afda
Merge pull request #6700 from julek-wolfssl/dtls13-downgrade-acks
...
DTLS 1.3: do not send ACKs until we negotiate 1.3 (through SH)
2023-08-25 09:34:53 -06:00
billphipps
d7f8cc55d8
Update wolfcrypt/src/cryptocb.c
...
Correction
2023-08-25 11:24:47 -04:00
billphipps
27bc7219e5
Correct cryptocb cmd debug message
2023-08-25 11:16:15 -04:00
TakayukiMatsuo
0484f3e0f7
Update Japanese API comments to match PR6352
2023-08-25 10:32:10 +09:00
John Safranek
e48b7ef3d7
FIPS Degraded Mode
...
1. Add error code for entering FIPS degraded mode.
2. Add string for the error code.
2023-08-24 16:27:23 -07:00
gojimmypi
8803510375
ARIA no longer needs OpenSSL enabled
2023-08-24 15:57:14 -07:00
JacobBarthelmeh
c9e9e0fc72
Merge pull request #6704 from icing/session-copy-on-write
...
Updating a shared session objects needs to do copy on write
2023-08-24 16:52:17 -06:00
JacobBarthelmeh
2f2dddde25
Merge pull request #6727 from bigbrett/tls13-sniffer-keylogfile
...
TLS 1.3 sniffer keylog file support
2023-08-24 16:52:00 -06:00
kaleb-himes
c98ce0d18c
FIPS 140-3 Pilot Program Check-in
2023-08-24 14:29:32 -07:00
JacobBarthelmeh
a6257ca635
Merge pull request #6724 from julek-wolfssl/zd/16445
...
ZD16445
2023-08-24 13:46:49 -06:00
Brett Nicholas
f1027464e8
added tls13 keylog test, refactored diff test to only use app data output
2023-08-24 13:05:01 -06:00
Brett Nicholas
15918d8ee6
First pass at TLS1.3 keylog file working
2023-08-24 13:04:59 -06:00
JacobBarthelmeh
5f44a73f8e
Merge pull request #6725 from julek-wolfssl/zd/16598
...
TLSX_CA_Names_Parse: Include header in length check
2023-08-24 10:30:07 -06:00
JacobBarthelmeh
6b09b5c0cf
Merge pull request #6690 from julek-wolfssl/packaging
...
Init deb packaging
2023-08-24 10:28:24 -06:00
David Garske
88ad5ce6b0
Merge pull request #6607 from SparkiDev/curve25519_thumb2
...
Thumb2 ASM, Curve25519
2023-08-24 08:29:54 -07:00
Juliusz Sosinowicz
82c5170659
TLSX_CA_Names_Parse: Include header in length check
2023-08-24 15:23:37 +02:00
Juliusz Sosinowicz
8ce71cc19c
Call HaveUniqueSessionObj when we need to have a unique session object
2023-08-24 15:01:22 +02:00
Juliusz Sosinowicz
06d81f7f8f
Add a test case that negotiates tickets during another handshake
2023-08-24 15:01:22 +02:00
Juliusz Sosinowicz
b44d31df02
Jenkins fixes
2023-08-24 10:57:45 +02:00
Juliusz Sosinowicz
b771b6ebf5
ZD16445
...
- Use unions for type punning in xor API
- Initialise potentially uninitialised variables
- Use `LL` suffix to specify a larger integer type
- Don't use `max` as it can shadow other definitions
2023-08-24 10:53:26 +02:00
Sean Parkinson
36b92a4cef
Thumb2 ASM, Curve25519
...
Add support for compiling ASM for Thumb2
Add Curve25519 ASM for Thumb2
Limit assembly code compiled when Ed25519 not required.
Rework all assembly implementations to replace ge_*() functions instead
of having fe_ge_*() versions that take many parameters.
Get ARM32 inline asm working.
2023-08-24 17:43:03 +10:00
Juliusz Sosinowicz
a99954c0b0
Update dtls_expected_peer_handshake_number when downgrading
2023-08-23 23:20:51 +02:00
Juliusz Sosinowicz
9ca1738b7a
Fix newlines in async script
2023-08-23 23:20:51 +02:00
Juliusz Sosinowicz
5624b6e9d2
Update comment
2023-08-23 23:20:51 +02:00
Juliusz Sosinowicz
058dfca809
Use explicit field to signal that we received a unified hdr
2023-08-23 23:20:51 +02:00
Juliusz Sosinowicz
3cc473b1ec
Check that HVR and HRR don't appear in the same connection
2023-08-23 22:18:21 +02:00
Juliusz Sosinowicz
9427bea275
DTLS 1.3: do not send ACKs until we negotiate 1.3 (through SH)
2023-08-23 22:18:21 +02:00
Stefan Eissing
7b29362d90
Updating a shared session objects needs to do copy on write
2023-08-23 22:15:25 +02:00
JacobBarthelmeh
32a07a7f5a
Merge pull request #6723 from anhu/bench_sphincs_gating
...
More gating on HAVE_SPHINCS in benchmarks
2023-08-23 14:10:51 -06:00
Juliusz Sosinowicz
24cf794342
Increase timeout as macos build time are very variable (due to homebrew)
2023-08-23 22:01:12 +02:00
Juliusz Sosinowicz
7a12202675
Init deb packaging
...
- rpm: Simplify script and list wolfSSL as packager
- add packaging github action
2023-08-23 22:01:12 +02:00
Anthony Hu
1608cb8b45
More ating on HAVE_SPHINCS in benchmarks
2023-08-23 14:03:22 -04:00
Hideki Miyazaki
827287000c
Merge pull request #6720 from TakayukiMatsuo/jp6506
...
Apdate Japanese API comments to match them in PR6506
2023-08-23 09:48:05 +09:00
JacobBarthelmeh
3033371abc
Merge pull request #6717 from bigbrett/sniffer-keylogfile
...
sniffer keylog file support
2023-08-22 14:06:27 -06:00
JacobBarthelmeh
fd9c78d93f
Merge pull request #6721 from bandi13/udp_proxy-fixes
...
Udp proxy fixes
2023-08-22 13:13:57 -06:00
Brett Nicholas
66c53b0996
Decoupled keylogfile registration and sniffer server creation APIs
...
fixed (very old) use-after-free found by ASAN
Updated documentation
review comments (spelling and housekeeping)
2023-08-22 11:29:58 -06:00
Brett Nicholas
2ee6a01d91
Initial sniffer keylog file support for TLS 1.2
2023-08-22 11:23:46 -06:00
JacobBarthelmeh
205cdb1809
Merge pull request #6719 from anhu/MBSTRING_ASC
...
Support MBSTRING_ASC for cert encoding
2023-08-22 09:29:50 -06:00
Andras Fekete
c4f91cdc8d
Revert "Don't run script un-bwrapped"
...
This reverts commit d321ae2fd5 .
2023-08-22 10:00:00 -04:00
Andras Fekete
d54aa0dabd
Display test duration
2023-08-22 09:51:42 -04:00
Andras Fekete
d321ae2fd5
Don't run script un-bwrapped
2023-08-22 09:43:59 -04:00
Andras Fekete
c1821e9ed2
Decrease timeout to 1m. Most tests complete in seconds
2023-08-22 09:43:33 -04:00
Andras Fekete
79d831c712
Set customizable PCAP file name
2023-08-22 09:32:51 -04:00
Andras Fekete
88c32a510e
Wrap script in a bwrap environment
2023-08-22 09:30:51 -04:00
Andras Fekete
e487b73809
Reduce likelihood of two tests running and saving to the PCAP dump
2023-08-21 13:37:34 -04:00
JacobBarthelmeh
5339fe0d9f
Merge pull request #6715 from anhu/WOLFSSL_NO_SPHINCS
...
Allow easily disabling of SPHINCS+.
2023-08-21 09:26:16 -06:00
Andras Fekete
307ce9d623
Only drop the first Nth packet, not every
2023-08-21 09:55:23 -04:00
Andras Fekete
bf438c85e1
Add in a marker to the PCAP file
2023-08-21 09:55:23 -04:00
TakayukiMatsuo
174f0b2ebc
Apdate Japanese API comments to match them in PR6506
2023-08-20 15:25:33 +09:00
JacobBarthelmeh
928dd70213
Merge pull request #6716 from bandi13/dtls_test_cleanup
...
DTLS test cleanup
2023-08-18 16:48:21 -06:00
JacobBarthelmeh
9cc8cdcc30
Merge pull request #6712 from philljj/spelling_cleanup
...
Used codespell and fixed obvious typos.
2023-08-18 16:29:36 -06:00
Anthony Hu
7669f966f3
Support MBSTRING_ASC for cert encoding
2023-08-18 17:50:25 -04:00
Andras Fekete
dbd5d713e7
Add in a marker to the PCAP file
2023-08-18 14:10:47 -04:00
Andras Fekete
9a007604e4
Usage documentation
2023-08-18 14:05:07 -04:00
JacobBarthelmeh
65217cbc70
Merge pull request #6713 from ejohnstown/fips-check-exp-ver
...
FIPS Check Script with Explicit Versioning
2023-08-18 11:20:23 -06:00
Andras Fekete
bea1b6f89b
Use unique temp file names
2023-08-18 13:11:31 -04:00
Andras Fekete
3df434930e
Add in total test run count
2023-08-18 13:06:13 -04:00
Andras Fekete
883d4dc219
Clean up the script
2023-08-18 13:04:36 -04:00
JacobBarthelmeh
033b0785e3
Merge pull request #6714 from julek-wolfssl/rename-utils.c
...
Rename utils.c to utils.h
2023-08-18 10:37:00 -06:00
John Safranek
b9dbd86fab
FIPS Check Script with Explicit Versioning
...
1. Remove the case block deciding if to checkout the wolfcrypt files or
not, it is redundant. Things are set up now where we don't need it.
2. Comment reflow.
Changes due to peer review:
3. Change the check for the temp mytag branches to use a git command
that provides an exact match, rather than a foulable grep check.
4. Change the fips repo file checkout to work the same way as the
wolfcrypt files. Each file in the copy list is tagged with its
revision.
2023-08-18 09:27:53 -07:00
Andras Fekete
62bb434aa6
Remove debugging code
2023-08-18 11:14:50 -04:00
Andras Fekete
dfc4850e75
Add extra flags for DTLS1.3
2023-08-18 11:11:25 -04:00
Andras Fekete
e0b90a0463
Rename the script to be a bit more generic
2023-08-18 11:11:08 -04:00
Andras Fekete
8772d8b868
Able to adjust DTLS version globally
2023-08-18 11:05:36 -04:00
Andras Fekete
bad00ea9f7
Adding in tcpdump capture
2023-08-18 11:04:45 -04:00
Andras Fekete
f089b2c2f6
Clean up code
2023-08-18 10:21:44 -04:00
Andras Fekete
fea48e2505
Drop every i'th packet
2023-08-18 10:05:12 -04:00
Andras Fekete
49dc3a473b
Run through all the tests and give a tally for failed
2023-08-18 10:03:58 -04:00
Anthony Hu
a24f99fbf6
Allow easily disabling of SPHINCS+.
2023-08-18 10:00:47 -04:00
Andras Fekete
bc7c8af5de
Massively simplified the tests
2023-08-18 09:41:13 -04:00
Juliusz Sosinowicz
b32ff0b0b8
Rename utils.c to utils.h
...
This better signals that this file is meant to be included directly in testing programs and also plays better with my IDE.
2023-08-18 15:05:23 +02:00
Sean Parkinson
975047bd22
Merge pull request #6710 from JacobBarthelmeh/PKCS7
...
initialize kari decoded cert
2023-08-18 10:24:48 +10:00
John Safranek
3e93c5e253
FIPS Check Script with Explicit Versioning
...
1. Move the command line updatable variables to the beginning of the
script.
2. Reorder the OE names in the usage list.
3. Add the missing asm files.
4. Correct the regex for the fipsv2-OE-ready version name.
2023-08-17 14:37:48 -07:00
John Safranek
6724a3d005
FIPS Check Script with Explicit Versioning
...
1. Remove the demo OE.
2. Update all OEs with the new file lists.
3. Merge OEs with same files and tags, and add a check for the
difference to optionally update that. For example, solaris is the
same file list and tags as linuxv2, but uses gmake instead of make.
2023-08-17 14:35:45 -07:00
John Safranek
87695adc82
FIPS Check Script with Explicit Versioning
...
1. Remove the demo variable presets. Actually use them in testing.
2. FIPS_REPO can be set to a local file path to speed up testing.
3. Add files missing from the demo OE checkout.
4. Add the fips-read OE files.
5. Add the quiet option to grep.
2023-08-17 14:32:40 -07:00
John Safranek
98c50e05a3
FIPS Check Script with Explicit Versioning
...
1. Add an optional initialized variable for the KEEP option and default
it to 'yes' temporarily.
2. Comment out all the descriptions for all the OEs except the test OE.
3. Update the copy FIPS file list format to have the file path and add
the tag to use for copying as the first item.
4. Merge the branch-creation and file checkout into one function. Remove
the local path changing.
5. Update and simplify the FIPS file copying function.
6. Remove the old copying code.
7. When updating the fipsv2-OE-ready version string, also check that
fips.c is non-zero.
8. Use explicit paths for files.
2023-08-17 14:25:48 -07:00
John Safranek
0fd96be7f8
FIPS Check Script with Explicit Versioning
...
1. Add a test OE for trying out the new methods.
2. Add a temporary way to trigger using the new methods.
3. Add a function to check out different versions of files in the repo,
and only adding a new branch when needed.
4. Remove the old checkout code.
2023-08-17 14:23:13 -07:00
Sean Parkinson
b156e83990
Merge pull request #6711 from bandi13/mp_sqrtmod_prime-static
...
Set mp_sqrtmod_prime as static
2023-08-18 07:13:55 +10:00
jordan
d4ba2e50d4
Used codespell and fixed obvious typos.
2023-08-17 15:20:10 -05:00
Andras Fekete
c917eee70e
Set mp_sqrtmod_prime as static
...
This function is not in any header files, and wasn't meant to be exposed.
2023-08-17 13:52:17 -04:00
JacobBarthelmeh
cc4e327316
Merge pull request #6544 from TakayukiMatsuo/rpk
...
Add support for raw-public-key
2023-08-17 09:23:18 -06:00
JacobBarthelmeh
ba4842aded
Merge pull request #6703 from anhu/guard_sphincs
...
Guard sphincs away properly.
2023-08-16 14:40:11 -06:00
JacobBarthelmeh
d7b2626433
initialize kari decoded cert
2023-08-16 13:20:29 -07:00
Andras Fekete
7023f86e66
Remove unnecessary code
...
'bc' is not installed in VM images. Don't want to run 'killall' in Jenkins tests
2023-08-16 16:01:47 -04:00
Eric Blankenhorn
a78694e5bf
misc.h declarations for user defined functions with NO_INLINE disabled
2023-08-16 12:45:37 -05:00
JacobBarthelmeh
afd0d07d9a
Merge pull request #6706 from bandi13/ZD16551
...
Add in another clamp to prevent infinite loops
2023-08-16 11:03:44 -06:00
Chris Conlon
ac90fa8d60
Merge pull request #6701 from miyazakh/fspsm
...
generalize Renesas SCE Protected port
2023-08-16 09:38:18 -06:00
JacobBarthelmeh
ec818e5dbd
Merge pull request #6682 from gojimmypi/Espressif-template
...
Add Espressif ESP-IDF template project
2023-08-15 16:37:24 -06:00
JacobBarthelmeh
c3ebfd133b
use flush instead of invalidate
2023-08-15 15:05:47 -07:00
Hideki Miyazaki
0d8f68ef03
address review comments
2023-08-16 06:30:13 +09:00
Andras Fekete
437c2020bd
Add in another clamp to prevent infinite loops
...
M = i - 1 would make it 2^0. Anything above that would be negative powers which don't make sense.
2023-08-15 17:05:43 -04:00
JacobBarthelmeh
45bcb65dc0
Merge pull request #6659 from gojimmypi/ESP32_Info_link_change
...
updated comment links for Espressif examples
2023-08-15 14:58:06 -06:00
JacobBarthelmeh
a71114b4cb
Merge pull request #6702 from bandi13/ZD16572
...
Check the return value
2023-08-15 14:57:26 -06:00
Andras Fekete
f1b4387eca
Return a failure if the sizes don't match
2023-08-15 15:00:06 -04:00
Anthony Hu
9bb6c1b70e
Guard away properly; don't build sphincs code.
2023-08-14 21:31:28 -04:00
Chris Conlon
24f60cc435
Merge pull request #6699 from JacobBarthelmeh/PKCS7
...
init mp_int before use
2023-08-14 16:11:33 -06:00
JacobBarthelmeh
bbcd91b59a
Merge pull request #6621 from bandi13/addPKIXSSH
...
Add in PKIXSSH
2023-08-14 16:08:29 -06:00
Andras Fekete
b3a1badecf
Check the return value
2023-08-14 17:02:59 -04:00
Andras Fekete
300c183453
Update README
2023-08-14 11:21:12 -04:00
Andras Fekete
5002ef19b1
Give GDB permission to attach to processes as non-root
2023-08-14 11:21:00 -04:00
Hideki Miyazaki
47caa9b06d
generalize sce protect impl to fsp sm(secure module)
2023-08-13 09:23:03 +09:00
Hideki Miyazaki
d3d131d08d
Merge pull request #6663 from TakayukiMatsuo/jp6417
...
Update Japanese API comments
2023-08-12 08:05:41 +09:00
JacobBarthelmeh
bd14be8553
init mp_int before use
2023-08-11 10:04:17 -07:00
Andras Fekete
4167a51fe9
Add in 'udp-proxy'
2023-08-11 11:23:09 -04:00
JacobBarthelmeh
8bb8f64373
Merge pull request #6698 from anhu/compat_into_settings_h
...
Bring compat layer logic from configure.ac into settings.h
2023-08-11 09:23:03 -06:00
JacobBarthelmeh
46229bb167
Merge pull request #6693 from bandi13/ZD16551
...
Add in clamp for mp_sqrtmod_prime
2023-08-11 09:22:53 -06:00
Andras Fekete
568bf35555
Reduce image size
2023-08-11 11:22:08 -04:00
JacobBarthelmeh
a4152ab341
Merge pull request #6695 from philljj/fix_test_x509_guards
...
Fix define guards for X509 api tests.
2023-08-11 09:18:00 -06:00
JacobBarthelmeh
61761143e7
Merge pull request #6696 from philljj/small_benchmark_cleanup
...
Tiny cleanup to benchmark print usage.
2023-08-11 09:16:48 -06:00
JacobBarthelmeh
c29227dcbb
Merge pull request #6694 from kareem-wolfssl/gh6689
...
Change enum ecc_curve_load_mask into defines
2023-08-11 09:13:03 -06:00
Anthony Hu
507ec9f7d2
Bring compat layer logic from configure.ac into settings.h
2023-08-11 00:11:36 -04:00
TakayukiMatsuo
3a5739a8fa
Add support for raw-public-key
2023-08-11 11:29:15 +09:00
Andras Fekete
6b1513a769
Clean up garbage characters
2023-08-10 16:41:11 -04:00
Andras Fekete
66c529e610
Add in PKIXSSH
2023-08-10 16:41:11 -04:00
JacobBarthelmeh
65401cfd35
Merge pull request #6697 from julek-wolfssl/refactor-cond-again
...
Refactor conditional code again
2023-08-10 13:49:46 -06:00
JacobBarthelmeh
26fcdbf348
Merge pull request #6688 from kareem-wolfssl/gh6684
...
Update set1_groups/_list prototype conditions to match the functions' conditions. Fixes #6684 .
2023-08-10 13:35:49 -06:00
Juliusz Sosinowicz
c3fea8c930
fixup! client: resend data when didn't receive reply after timeout
2023-08-10 20:14:35 +02:00
Juliusz Sosinowicz
e96837aa34
cond: Add start and end API for mutex handling
2023-08-10 18:07:51 +02:00
Juliusz Sosinowicz
1b393199f4
client: resend data when didn't receive reply after timeout
2023-08-10 18:07:35 +02:00
jordan
779b87f03a
Tiny cleanup to benchmark print usage.
2023-08-10 09:47:07 -05:00
jordan
5255b02fbb
Fix define guards for X509 api tests.
2023-08-10 08:49:25 -05:00
Kareem
1bb0199a2b
Change enum ecc_curve_load_mask into defines
2023-08-09 17:35:01 -07:00
JacobBarthelmeh
6ea1e7d824
Merge pull request #6683 from dgarske/tpm_ecc
...
Enable math API's for wolfTPM
2023-08-09 17:11:33 -06:00
JacobBarthelmeh
12685d7713
Merge pull request #6686 from dgarske/fix_cond
...
Fixes for wolfSSL conditional porting
2023-08-09 12:08:05 -06:00
JacobBarthelmeh
35f4a1a09d
Merge pull request #6672 from anhu/cert_err_message
...
Add some OpenSSL compat error strings.
2023-08-09 09:28:51 -06:00
Juliusz Sosinowicz
737e12a1bd
fixup! Initialize BIO methods at compile time
2023-08-09 17:04:59 +02:00
Juliusz Sosinowicz
b86d2a3bff
Fix typo
2023-08-09 16:47:14 +02:00
Juliusz Sosinowicz
bc4c0df315
Update multi-compiler timeout
2023-08-09 16:47:03 +02:00
Andras Fekete
9b81b0b505
Add in clamp for mp_sqrtmod_prime
2023-08-09 10:44:59 -04:00
Juliusz Sosinowicz
d747df2ae4
Make sure no mutexes are held when cond API are called
2023-08-09 16:25:58 +02:00
Juliusz Sosinowicz
7ba00f3b84
Initialize BIO methods at compile time
2023-08-09 16:23:46 +02:00
Juliusz Sosinowicz
6fcdead112
Check error codes from pthread funcs
2023-08-09 14:20:29 +02:00
Juliusz Sosinowicz
27feb9b9e9
Simplify mac cond type
2023-08-09 14:18:32 +02:00
Kareem
9f577dc4d4
Update set1_groups/_list prototype conditions to match the functions' conditions. Fixes #6684 .
2023-08-08 17:56:56 -07:00
JacobBarthelmeh
e9e5d70aad
Merge pull request #6674 from ejohnstown/fips-check-update
...
FIPS Check Update
2023-08-08 15:42:28 -06:00
David Garske
c7b6fa2931
Return codes and missed srtp.
2023-08-08 13:58:38 -07:00
Anthony Hu
5daabe0801
Suggestion from Jacob to remove OPENSSL_EXTRA_X509_SMALL
2023-08-08 16:35:55 -04:00
David Garske
39f632d096
Remove lockCount.
2023-08-08 12:51:27 -07:00
David Garske
5b16586483
Fixes for wolfSSL conditional porting. Can cause deadlock in high usage situations. Added better signal support on MacOS. Issue created in PR #6437 .
2023-08-08 12:46:42 -07:00
JacobBarthelmeh
0dbc7d0b13
Merge pull request #6685 from anhu/sm4_disabled
...
SM4 disabled
2023-08-08 13:37:23 -06:00
Anthony Hu
958113c070
Correct configure defaults for SM4-GCM and SM4-CCM (disabled)
2023-08-08 13:06:00 -04:00
TakayukiMatsuo
9f6d48891a
Update Japanese API comments
2023-08-08 13:29:46 +09:00
gojimmypi
a957f0e2c3
config.h not needed for Espressif example
2023-08-07 15:09:20 -07:00
David Garske
75f81db084
New TPM ECC encrypt needs access to the mp_ math functions.
2023-08-07 15:06:58 -07:00
gojimmypi
69eeedbac3
Add Espressif ESP-IDF template project
2023-08-07 15:03:21 -07:00
JacobBarthelmeh
33e31ed41c
Merge pull request #6675 from douzzer/20230805-clang-18-tidy-fixes
...
20230805-clang-18-tidy-fixes
2023-08-07 14:55:15 -06:00
Daniel Pouzzner
e51ca7941f
fixes for code warned by clang-tidy:18 and cppcheck-2.11:
...
bugprone-inc-dec-in-conditions: examples/server/server.c:server_test(), src/internal.c:MatchDomainName(), src/x509.c:wolfSSL_X509_set_ext(), wolfcrypt/src/asn.c:MatchBaseName()
missingReturn: wolfcrypt/src/wc_port.c:mystrnstr()
bugprone-unused-return-value: wolfcrypt/src/wc_port.c:wolfSSL_NewThreadNoJoin()
clang-analyzer-deadcode.DeadStores: wolfssl/test.h:udp_accept()
2023-08-05 12:28:41 -05:00
John Safranek
0654ed3549
Fixed style warning from shellcheck re x in comparisons.
2023-08-04 16:41:39 -07:00
John Safranek
f3af4542e7
FIPS Check Update
...
1. Whitespace changes.
2. Deleted the stm32l4 build. The fips-check-2.0.sh script handles it.
3. Removed the CAVP_SELFTEST_* variables, used the FIPS_OPTIONS for it.
4. Removed the v1 style code checkout. The current method works for all
available cases.
5. Removed the FIPS_CONFLICTS case rename case.
2023-08-04 13:53:34 -07:00
JacobBarthelmeh
c9b72d7b61
Merge pull request #6673 from anhu/readfile
...
Change ReadFile instances to app-specific naming.
2023-08-04 13:48:49 -06:00
JacobBarthelmeh
65b515aec8
Merge pull request #6655 from julek-wolfssl/threading-testing
...
Port testing to wolfSSL threading interface
2023-08-04 13:46:14 -06:00
Anthony Hu
30fda7ad38
Change ReadFile instances to app-specific naming.
...
ReadFile conflicts with a windows API.
2023-08-04 13:50:46 -04:00
Anthony Hu
cec438a4e4
Add some OpenSSL compat error strings.
2023-08-04 13:26:28 -04:00
John Safranek
aa69b2fd62
Update the header comment.
2023-08-04 07:38:48 -07:00
Juliusz Sosinowicz
90a6a14878
Merge pull request #6446 from JacobBarthelmeh/session
2023-08-04 11:34:59 +02:00
Juliusz Sosinowicz
e04033ae3d
Adjust timeout to account for longer brew install
2023-08-04 10:49:39 +02:00
Juliusz Sosinowicz
decee67138
Use random port in crl test
2023-08-04 10:49:39 +02:00
Juliusz Sosinowicz
67d6d438c5
Port testing to wolfSSL threading interface
2023-08-04 10:49:39 +02:00
Hideki Miyazaki
ae90a9b2c0
Merge pull request #6665 from TakayukiMatsuo/jp6472
...
Update Japanese API comments
2023-08-04 14:37:33 +09:00
John Safranek
4e07ebf279
changes to the script fips-check.sh
2023-08-03 22:22:20 -07:00
JacobBarthelmeh
83de744dcf
Merge pull request #6671 from SparkiDev/sm_impl_redirect
...
SM Ciphers: Reference the GitHub repository to get implementation
2023-08-03 16:41:46 -06:00
JacobBarthelmeh
7f0cfcb27d
Merge pull request #6667 from bandi13/byebyeCyaSSL
...
Byebye cya ssl
2023-08-03 15:43:01 -06:00
Sean Parkinson
e7ae80493b
SM Ciphers: Reference the GitHub repository to get implementation
...
wolfsm is public and we can point people to repository.
2023-08-04 07:28:21 +10:00
Sean Parkinson
71f9162b99
Merge pull request #6668 from julek-wolfssl/zd/16515
...
DTLS downgrade bug fixes
2023-08-04 07:20:01 +10:00
JacobBarthelmeh
a60810cebe
Merge pull request #6664 from joakim-strandberg/ada_windows_support
...
Ada windows support
2023-08-03 14:40:34 -06:00
JacobBarthelmeh
0c39b8074e
Merge pull request #6654 from lealem47/zd16475
...
Fix of buffer overflow in GenerateDNSEntryRIDString()
2023-08-03 14:12:47 -06:00
JacobBarthelmeh
1da000b244
Merge pull request #6670 from anhu/080
...
Document that we integrate with liboqs 0.8.0
2023-08-03 13:29:32 -06:00
Andras Fekete
a6c850d7f9
Fix CAVP errors
2023-08-03 12:05:40 -04:00
Anthony Hu
54ab1b1113
Document that we integrate with liboqs 0.8.0
2023-08-03 10:23:12 -04:00
Juliusz Sosinowicz
8a9a363621
DTLS 1.3: move state machine forward when HVR received
2023-08-03 15:00:14 +02:00
Juliusz Sosinowicz
907a0201e7
Require HAVE_SECURE_RENEGOTIATION for API that perform SCR (not just indication)
2023-08-03 11:32:42 +02:00
Juliusz Sosinowicz
5a94dc961d
DtlsShouldDrop: don't ignore app data sent before a SCR handshake
2023-08-03 11:32:03 +02:00
Juliusz Sosinowicz
158402ab03
Add logging prefixes to api.c client and server
2023-08-03 11:31:47 +02:00
TakayukiMatsuo
f35173b1a6
Update Japanese API comments
2023-08-03 09:47:19 +09:00
Andras Fekete
b31e485dc9
Remove 'HAVE_FIPS_VERSION < 2' blocks
2023-08-02 17:08:03 -04:00
Andras Fekete
f5164d325b
Remove weird control char + copy/paste errors
2023-08-02 16:14:25 -04:00
Andras Fekete
de0048e5b2
Put back netbsd- and marvell-linux-selftest modes
2023-08-02 14:23:29 -04:00
JacobBarthelmeh
05b692d01c
Merge pull request #6661 from julek-wolfssl/zd/16477
...
Recover when the client sends a 0-length session ID when using tickets
2023-08-02 11:37:21 -06:00
Juliusz Sosinowicz
dee32247b9
Code review
2023-08-02 18:02:41 +02:00
Juliusz Sosinowicz
bfe7bc0fcc
Recover when the client sends a 0-length session ID when using tickets
...
Fixes ZD16477
2023-08-02 18:02:30 +02:00
JacobBarthelmeh
fbc6ed4fe4
Merge pull request #6662 from julek-wolfssl/zd/16504
...
DoHelloVerifyRequest: only do DTLS 1.3 version check
2023-08-02 09:22:05 -06:00
JacobBarthelmeh
a885a94b21
Merge pull request #6669 from douzzer/20230801-fips-nullcipher
...
20230801-fips-nullcipher
2023-08-02 08:59:46 -06:00
Juliusz Sosinowicz
6f4fabaac9
Adjust DER size
2023-08-02 10:30:12 +02:00
Juliusz Sosinowicz
724fe53379
DoHelloVerifyRequest: only do DTLS 1.3 version check
2023-08-02 10:30:12 +02:00
Andras Fekete
2a6956a954
Missing commit
2023-08-01 17:55:38 -04:00
Joakim Strandberg
8794e3f2f6
Updated the Ada wrapper README.md file and removed mention of the c_tls_client_main.c and c_tls_server_main.c files.
2023-08-01 23:08:52 +02:00
Joakim Strandberg
0e74213692
Fix display of SPARK tool output in README
2023-08-01 22:45:07 +02:00
Andras Fekete
a0668bd9ab
Remove FIPS-check for v1
2023-08-01 15:46:40 -04:00
Andras Fekete
25f542adb4
Clean up compile errors
2023-08-01 15:46:18 -04:00
Daniel Pouzzner
d250eb8327
configure.ac: in FIPS builds, remove nullcipher from enable-all and enable-all-crypto, and error on explicit --enable-nullcipher with FIPS unless fips=dev.
2023-08-01 12:24:50 -05:00
Chris Conlon
27a59761b9
Merge pull request #6520 from miyazakh/tsip_cryptonly
...
Support TSIP crypt only
2023-08-01 10:13:18 -06:00
Andras Fekete
6e33fe3b51
Remove cyassl reference
2023-08-01 10:57:19 -04:00
Andras Fekete
44b634a597
More cleanup
2023-08-01 10:29:03 -04:00
Andras Fekete
9eb339f9fd
Remove cyassl from example code
2023-08-01 10:17:38 -04:00
Andras Fekete
70e1ab7f0c
Remove cyassl from wolfcrypt
2023-08-01 10:17:11 -04:00
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
Joakim Strandberg
278f395542
Made sure the relative paths for finding the certificates is correct.
2023-07-31 23:48:44 +02:00
Joakim Strandberg
6893123edf
Removed references to the c implementations of the client and server
2023-07-31 21:54:30 +02:00
Andras Fekete
ab953c3141
Update VS project files
2023-07-31 15:37:48 -04:00
Andras Fekete
2b2509c56c
Drop code support
2023-07-31 15:36:38 -04:00
Andras Fekete
66f04f8db5
Remove cyassl
2023-07-31 15:17:17 -04:00
Joakim Strandberg
b6a11b8b01
Updated the README.md and updated client.gpr
2023-07-31 17:53:01 +02:00
Joakim Strandberg
c76b0a0237
removed the C examples only keeping Ada code in the Ada wrapper example directory
2023-07-31 17:31:23 +02: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
Juliusz Sosinowicz
854ae0dcdb
Code review
2023-07-31 15:16:59 +02:00
JacobBarthelmeh
106a065a41
Merge pull request #6660 from DimitriPapadopoulos/codespell
...
Fix residual typos found by codespell
2023-07-28 11:52:47 -06: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
1b10fb5ca7
Fix typos(?) found by codespell
...
These typos could have been generated by some program, in which case
the program should be fixed instead. Yet the typos are inconcistent,
as if the output had been manually copied. Why is the output poorly
aligned?
Use seconds or s for seconds, consistently.
Use ops for operations, consistently. Unless you want the singular
op for operation, as the value is often < 2.
2023-07-28 10:03:27 +02:00
Dimitri Papadopoulos
52f91e4ab9
Fix residual typos found by codespell
2023-07-28 09:29:28 +02:00
JacobBarthelmeh
5043ecefc1
Merge pull request #6648 from DimitriPapadopoulos/codespell
...
Fix typos found by codespell
2023-07-27 17:07:30 -06:00
JacobBarthelmeh
a785c39a12
Merge pull request #6657 from kojo1/multibyte
...
multi-byte code
2023-07-27 16:35:22 -06:00
Dimitri Papadopoulos
6d9c85a762
Fix typos found by codespell
2023-07-27 23:38:44 +02:00
JacobBarthelmeh
3e63589664
Merge pull request #6605 from dgarske/ada
...
Ada Bindings for wolfSSL
2023-07-27 15:21:52 -06:00
billphipps
10adca1a45
Add CryptoCb features ( #6636 )
...
* Update to support invoking cryptocb during un/register.
2023-07-27 13:16:43 -07:00
gojimmypi
f89892a3cd
updated comment links
2023-07-27 09:44:57 -07: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
d0abfd7686
Merge pull request #6658 from julek-wolfssl/krb5-action-update
...
Point krb5 action to master branch of osp repo
2023-07-27 10:19:06 -06:00
Juliusz Sosinowicz
ee9ecd9591
Point krb5 action to master branch of osp repo
2023-07-27 11:14:41 +02:00
Takashi Kojo
136738fd33
Avoid mult-byte code error
2023-07-27 17:04:41 +09:00
JacobBarthelmeh
daa54f3d31
adjust wait times so that test can happen before timed out
2023-07-26 16:14:24 -07:00
Jacob Barthelmeh
b16e7fd87b
use Expect with test
...
fix for session expire check
better name for test function
rewrite test case
make new session also timeout in 1 second
2023-07-26 15:10:22 -07:00
JacobBarthelmeh
9cd7e59e6a
add another session expire test case
2023-07-26 15:10:22 -07:00
David Garske
3510ea4fec
Merge pull request #6656 from JacobBarthelmeh/sanitizer
...
conversion warning flagged on Windows test builds
2023-07-26 14:48:19 -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
7c11c0f201
conversion warning flagged on Windows test builds
2023-07-26 13:48:33 -07: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
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
JacobBarthelmeh
681a75da24
fix for AES-GCM use with petalinux
2023-07-25 22:08:20 -06:00
Sean Parkinson
d87bb14ac0
Merge pull request #6647 from gojimmypi/SM4_Hash_fix
...
WOLFSSL_NO_HASH_RAW Hmac_UpdateFinal() properties for SM3
2023-07-26 11:32:35 +10:00
gojimmypi
31dfdf8360
TLS SM2, SM3, SM4-CBC: hash details for SM3
2023-07-25 17:25:11 -07: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
JacobBarthelmeh
746802be89
Merge pull request #6652 from douzzer/20230724-cppcheck-2v11
...
20230724-cppcheck-2v11
2023-07-25 14:59:50 -06:00
Lealem Amedie
9cade8c9a4
Fix of buffer overflow in GenerateDNSEntryRIDString()
2023-07-25 14:33:05 -06: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
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
JacobBarthelmeh
1812d32258
Merge pull request #6635 from julek-wolfssl/zd/16403
...
Fix ClientHello parsing when no extensions are present
2023-07-24 09:49:28 -06:00
Eric Blankenhorn
a19a0537ee
Fix RFC references and add WOLFSSL_ALLOW_CRIT_AIA
2023-07-24 09:20:30 -05:00
Juliusz Sosinowicz
d3aa11bf87
Place manual memio helpers in utils.c and add macro for them
2023-07-24 09:14:21 +02:00
Juliusz Sosinowicz
ab560aa6b8
Fix ClientHello parsing when no extensions are present
2023-07-24 09:14:21 +02:00
Juliusz Sosinowicz
8ec2e23773
Rework curl action to use actions-build-autotools-project
2023-07-24 09:13:10 +02:00
Juliusz Sosinowicz
72d99d0ae0
Add timeouts to action tests
2023-07-24 09:13:10 +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
Lealem Amedie
318c95a2c2
Remove leftover declaration in ssl.h
2023-07-21 17:13:28 -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
JacobBarthelmeh
c09138cd3f
Merge pull request #6642 from kareem-wolfssl/zd16073
...
Fix wolfSSL_SMIME_write_PKCS7 not removing NULL characters between sections.
2023-07-21 16:52:38 -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
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
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
David Garske
1daaabf38a
Merge pull request #6640 from SparkiDev/sm3_asm_s_protection
...
SM3 ASM file: protect with check for WOLFSSL_SM3
2023-07-21 09:20:30 -07:00
Eric Blankenhorn
f9cb9560c4
Add CRL_REPORT_LOAD_ERRORS option
2023-07-21 10:06:35 -05:00
TakayukiMatsuo
477e65e07a
Merge pull request #6626 from TakayukiMatsuo/jp6414
...
Update Japanese API comments
2023-07-21 12:33:29 +09:00
Sean Parkinson
452f6a8898
Merge pull request #6639 from JacobBarthelmeh/vcpkg
...
add include to wolfio.h and replace cmake NAMESPACE
2023-07-21 10:43:13 +10: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
JacobBarthelmeh
9bc6fc64de
add include to wolfio.h and replace cmake NAMESPACE
2023-07-20 16:12:56 -07: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
JacobBarthelmeh
b7b4be8822
Merge pull request #6610 from bigbrett/apple-universal-lib
...
Apple "universal binary framework" build script and project example
2023-07-19 15:39:24 -06:00
Lealem Amedie
16058ce168
Address review comments
2023-07-19 12:01:01 -06:00
JacobBarthelmeh
acd819caa1
Merge pull request #6633 from SparkiDev/sm2_not_with_sp_math
...
SM2 and SP_MATH: don't enable SM2 with SP_MATH
2023-07-19 10:09:58 -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
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
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
9f2dd21a91
Merge pull request #6629 from night1rider/wolfssl-documentation-fixes
...
Wolfssl documentation fixes
2023-07-18 10:14:04 -06:00
Brett
425cd2c6dc
added "-c" command line option to allow passing extra configure flags, removed curl and harden default options, updated documentation
2023-07-17 14:47:23 -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
dell5060
56a34b0be2
Updated Documentation to Include support OS-dependant CA certfications stores it supports for the api: wolfSSL_CTX_load_system_CA_certs
2023-07-17 13:06:29 -06:00
Joakim Strandberg
58ac57861f
Updated the README.md file and made sure that using default.gpr to build the Ada TLS server application does not try to build the Ada TCL client application that makes use of the secondary stack.
2023-07-17 19:50:05 +02:00
David Garske
da9541551d
Fix for STM32 HAL_RTC_GetDate year. Fixes #6618 .
2023-07-17 10:30:47 -07:00
Brett
d1db78adb2
fixed typos in README
2023-07-17 11:10:02 -06: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
TakayukiMatsuo
c55c1dd0e4
Update Japanese API comments
2023-07-17 18:28:42 +09:00
Joakim Strandberg
00b90adc97
Updated README.md file. Added description of subprograms in the specification file of the WolfSSL package. Made it possible to get error codes through the WolfSSL API.
2023-07-17 01:22:06 +02: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
Joakim Strandberg
71b28caa09
Added Initialize and Finalize functions to initialize and cleanup resources of the WolfSSL library. Removed definitions of exceptions.
2023-07-14 22:20:39 +02: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
JacobBarthelmeh
1fe8944363
Merge pull request #6545 from bigbrett/serverListening-include-guard
...
fix pthread macro protection in tls_bench
2023-07-14 14:14:18 -06:00
JacobBarthelmeh
ff38d8f018
revert portion of cmake for vcpkg build
2023-07-14 13:27:38 -06:00
jordan
1afc0df83d
tfm fp_exptmod_nct: set result to zero when base is zero
2023-07-14 13:57:29 -05:00
Anthony Hu
933dae393e
Make PRBs happy
2023-07-14 14:33:43 -04:00
Joakim Strandberg
f49ffc0353
The implementations of the tls client and server applications can now be formally verified by the SPARK tools.
2023-07-14 20:30:34 +02:00
Brett
707c1a44bc
added support for dist bundle
2023-07-14 12:27:10 -06:00
Brett
5d24d5114a
removed Preview Assets and disabled swiftUI preview, as it is not required and adds unused files to a make dist install
2023-07-14 12:14:19 -06:00
Anthony Hu
3b773db728
Clean up after myself
2023-07-14 13:43:57 -04: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
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
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
40d0a14c09
Merge pull request #6615 from dgarske/various2
...
Fix for building ED25519 with no client auth
2023-07-14 10:52:24 +10:00
Brett
0d9252de9e
review: max line length changes
2023-07-13 16:30:25 -06:00
Brett
698bf7b423
fixed typo and added xcode version to overview
2023-07-13 16:24:30 -06: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
4fd5d154a4
Merge pull request #6611 from bandi13/addLibLMS_Docker
...
Add dependency for liblms
2023-07-13 14:15:07 -07:00
Brett Nicholas
9bed65ad57
split up error message
...
split #if into multiple lines
2023-07-13 15:14:02 -06:00
Brett Nicholas
b02a22b5b3
added error reporting macro for invalid configuration
2023-07-13 15:14:02 -06:00
Brett Nicholas
44faddac6c
fix compiler error for targets that don't define HAVE_PTHREAD
2023-07-13 15:14:02 -06: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
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
Anthony Hu
4ccd6dfbe1
Adding wolfSSL_GENERAL_NAME_set0_value() compat layer API.
2023-07-13 16:09:47 -04: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
Brett
9379a8a094
added standard license headers, switched to C-style comments
2023-07-13 12:58:38 -06:00
Andras Fekete
8cd06c64b2
Add dependency for liblms
...
Usage: './configure --enable-lms=yes --with-liblms=/opt/sources/hash-sigs'
2023-07-13 14:22:55 -04:00
Brett
c8209068c2
added apple univeresal binary framework build script and example
2023-07-13 12:02:12 -06:00
David Garske
90b32d7857
Merge pull request #6596 from bandi13/updateLibOQS
...
Use liboqs v0.8
2023-07-13 09:37:01 -07:00
Joakim Strandberg
45d8a5b04c
Ada version of TLS v1.3 client application implemented
2023-07-13 16:49:22 +02: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
JacobBarthelmeh
62c14e4d5b
Merge pull request #6604 from douzzer/20230711-linuxkm-fixes
...
20230711-linuxkm-fixes
2023-07-12 16:26:56 -06:00
Chris Conlon
a8ed78e012
define WOLFSSL_ALT_NAMES in --enable-jni build
2023-07-12 14:33:45 -06: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
David Garske
d20a096ffa
Ada Bindings for wolfSSL. Credit Joakim Dahlgren Strandberg <joakimds@kth.se>
2023-07-12 12:37:52 -07: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
David Garske
b8119af455
Merge pull request #6594 from lealem47/curl
...
Fix for curl build
2023-07-11 17:13:59 -07:00
Sean Parkinson
b18bc86ef8
Heap Math exptmod: fixes for valid modulus checks
...
mp_exptmod_base_2() uses Montogmery method and does not support even
modulus. Added check.
mp_exptmod_fast() uses Montogmery method when odd not when dr > 0.
Comment updated at call.
Reduce value of zero doesn't work for mp_reduece_2k. Changed setup of
use to check for zero and won't use it. Other methods won't work either.
2023-07-12 09:20:11 +10:00
Sean Parkinson
96f745af6f
EVP SM3: fix cast
...
wc_Sm3Update takes a word32 for the size.
Others cases are using the OpenSSL compatibility API but SM3 APIs don't
exist in OpenSSL.
2023-07-12 08:05:03 +10:00
Sean Parkinson
d6a6cbb83e
Merge pull request #6595 from dgarske/various
...
Fix for no malloc with SP and fix defaultdhparams typo
2023-07-12 07:19:52 +10:00
JacobBarthelmeh
fd72b885b6
Merge pull request #6592 from embhorn/zd16415
...
Fix Micrium config and new examples with NO_FILESYSTEM
2023-07-11 15:01:18 -06:00
jordan
4c125ece77
LMS: cleanup INSTALL, and cap threads to 4.
2023-07-11 15:04:51 -05:00
Andras Fekete
6fa080642c
Use liboqs v0.8
2023-07-11 15:36:44 -04:00
Lealem Amedie
f30364a00d
Fix test
2023-07-11 13:27:37 -06:00
Lealem Amedie
e140a83fad
Add curl gh actions test
2023-07-11 13:27:37 -06:00
Lealem Amedie
5fbe319ce9
Remove references to config.h from test headers
2023-07-11 13:27:37 -06:00
Lealem Amedie
1329543b62
Other miscellaneous fixes
2023-07-11 13:27:37 -06:00
Lealem Amedie
bcbeef7647
Fix for curl build
2023-07-11 13:27:37 -06:00
Anthony Hu
0b18e250ed
Merge pull request #6576 from iyanmv/liboqs-1.8
...
Rename sphincs algs to follow upstream
2023-07-11 14:56:49 -04:00
David Garske
36c1d20bb2
If malloc is disabled make sure it is also disabled in SP math
2023-07-11 11:51:40 -07:00
David Garske
3e9bdb7671
Fix defaultdhparams typo fix logic.
2023-07-11 10:26:40 -07:00
David Garske
8f36f78e6c
Merge pull request #6400 from bandi13/ARIA-cipher
...
Aria cipher
2023-07-11 09:50:42 -07:00
Iyán Méndez Veiga
fd091a745c
Include all post-quantum algorithm files in cmake
...
GH-5407 already included falcon.c, but now we also add sphincs.c,
dilithium.c and ext_kyber.c to avoid undefined reference errors.
2023-07-11 17:57:00 +02:00
JacobBarthelmeh
ba4c96f727
Merge pull request #6593 from SparkiDev/sm_update_2
...
SM cipher suite: fix name
2023-07-11 09:28:24 -06:00
Andras Fekete
ecc138fc6e
Fixed g++ shortcomings
2023-07-11 09:26:39 -04:00
jordan
d7c3a176e2
LMS cleanup.
2023-07-10 23:43:07 -05:00
Sean Parkinson
9f61cb9f2a
Merge pull request #6590 from dgarske/sp_math_only
...
Fix for SP math only case to ensure fast math and heap math are disabled
2023-07-11 10:33:46 +10:00
David Garske
29edef1645
Fix for SP math only case to ensure fast math and heap math are disabled. Also fix build error for case where WOLFSSL_HAVE_SP_ECC is defined, but HAVE_ECC is not. ZD 16419
2023-07-10 15:12:38 -07:00
Eric Blankenhorn
d84adce608
Fix Micrium config and new examples with NO_FILESYSTEM
2023-07-10 17:12:12 -05:00
Sean Parkinson
f26b8bdf62
Merge pull request #6584 from julek-wolfssl/issue/6554
...
Always enable tls13MiddleBoxCompat with WOLFSSL_TLS13_MIDDLEBOX_COMPAT
2023-07-11 07:53:56 +10:00
Sean Parkinson
ce02ad7347
SM cipher suite: fix name
...
Fix name of TLSv1.3 CCM cipher suite.
2023-07-11 07:30:44 +10:00
Andras Fekete
a317ac280c
PR comments
2023-07-10 16:50:54 -04:00
Andras Fekete
27a95e7e82
CMake is on a TODO for later
2023-07-10 15:44:30 -04:00
David Garske
2299282fdd
Merge pull request #6235 from kareem-wolfssl/hitch
...
Hitch
2023-07-10 11:46:57 -07:00
David Garske
e4c9a73296
Merge pull request #6587 from gojimmypi/ESP32WROOM-refactor
...
Espressif refactor WROOM32 ESP32
2023-07-10 11:46:10 -07:00
Iyán Méndez Veiga
d64d73a13f
Fix format keys
2023-07-10 19:43:59 +02:00
Kareem
8906ee95fd
Hitch code review feedback.
2023-07-10 10:06:12 -07:00
Kareem
2d0cc65381
Fix hitch test make check.
2023-07-10 10:06:12 -07:00
Kareem
56328d845a
Hitch code review feedback.
2023-07-10 10:06:12 -07:00
Kareem
3bfa189286
Fix hitch Github action.
2023-07-10 10:06:12 -07:00
Kareem
e871b1c04d
Add hitch support to wolfSSL.
...
Add support for cipher aliases DHE, EDH and EECDH.
Add define SSL_CTRL_GET_CHAIN_CERTS to help hitch and other programs detect SSL_CTX_get0_chain_certs is supported.
Add wolfSSL_get_locking_callback.
Allow using ECDHE+RSA cipher suites when ECDHE alias is used while in OpenSSL compatibility mode.
Add more alerts for hitch.
SSL_CM should use the CTX's x509_store_pt if available.
Add support for SSL_CERT_FILE and SSL_CERT_DIR. Load default OpenSSL TLS 1.3 ciphers when using OPENSSL_COMPATIBLE_DEFAULTS.
Use wolfSSL_sk_X509_new_null to allocate WOLFSSL_STACK in wolfSSL_CTX_get_extra_chain_certs. Previous approach of malloc'ing without setting type/memsetting was leading to a segfault.
Add --enable-hitch.
hitch: Add unit tests for new APIs, fix a couple of issues uncovered by unit testing.
Correct behavior of wolfSSL_BIO_set_mem_buf for BIO_CLOSE/NOCLOSE and update unit test accordingly.
Add Github action test for hitch.
2023-07-10 10:06:10 -07:00
JacobBarthelmeh
9d18648dfb
Merge pull request #6589 from SparkiDev/aarch64_aes_opensslextra_fix
...
AES GCM stream: arm asm fix when --enable-opensslextra
2023-07-10 10:55:50 -06:00
Andras Fekete
0a02218ba3
Clean up allocated memory on failure
2023-07-10 12:37:07 -04:00
Iyán Méndez Veiga
7c14ea67ae
Rename sphincs algs to follow upstream
...
This also adds new keys for SPHINCS+. The reason is that SPHINCS+
was updated to 3.1 in liboqs (open-quantum-safe/liboqs/pull/1420),
and old keys are incompatible with the new implementation.
Keys were generated using the oqs-provider for OpenSSL 3
openssl genpkey \
-provider default -provider oqsprovider \
-algorithm sphincsshake128fsimple \
-outform der \
-out bench_sphincs_fast_level1_key.der
And certs_test.h was updated using xxd
xxd -i -c 10 -u bench_sphincs_fast_level1_key.der
This was repeated for the 6 variants of SPHINCS+ that wolfSSL supports.
2023-07-10 18:31:07 +02:00
Andras Fekete
299b4d8552
Make wc_BuildEccKeyDer non-static
2023-07-10 11:32:17 -04:00
JacobBarthelmeh
2426cf14ca
Merge pull request #6583 from SparkiDev/certman_split
...
Moved CertManager APIs into own file
2023-07-10 09:20:09 -06:00
Andras Fekete
0efdf966d0
addressing PR comments
2023-07-10 11:14:07 -04:00
Juliusz Sosinowicz
86fd570e8c
Remove MyKeyLog.txt
2023-07-10 13:23:35 +02:00
Juliusz Sosinowicz
d0b8b919df
Always enable tls13MiddleBoxCompat with WOLFSSL_TLS13_MIDDLEBOX_COMPAT
2023-07-10 11:40:51 +02:00
Sean Parkinson
9f6ef65e8f
Merge pull request #6557 from julek-wolfssl/zd/16332
...
Don't allow a resumption handshake inside of a SCR
2023-07-10 13:51:29 +10:00
Sean Parkinson
fa053be533
Merge pull request #6496 from JacobBarthelmeh/PKCS7
...
parse ASN1 only with SMIME_read_PKCS7
2023-07-10 10:16:20 +10:00
Sean Parkinson
360b61aff2
AES GCM stream: arm asm fix when --enable-opensslextra
...
aadLen is now in gcm field of Aes.
2023-07-10 10:13:26 +10:00
Sean Parkinson
52a3d591b5
Fix check of date to respect VERIFY_SKIP_DATE in ASN.1 template
...
DecodeCertInternal was not recognizing VERIFY_SKIP_DATE.
2023-07-10 10:05:59 +10:00
JacobBarthelmeh
9d3a95a287
account for error return in test case when building without pkcs7 streaming
2023-07-09 12:42:29 -07:00
JacobBarthelmeh
0e2749eeb4
adjust test case for asn=original
2023-07-08 07:37:26 -07:00
JacobBarthelmeh
7866a40d06
resolve kari decode without recipient certificate
2023-07-08 07:37:26 -07:00
JacobBarthelmeh
f0354b4cbe
parse ASN1 only with SMIME_read_PKCS7
2023-07-08 07:36:10 -07:00
gojimmypi
57546405c0
refactor WROOM32 ESP32
2023-07-07 15:47:00 -07:00
David Garske
770590a3be
Rebase fix to add back set_verify call in CertManagerLoadCA. Fix API tests for bad date check. Various spelling fixes.
2023-07-07 15:08:08 -07:00
Sean Parkinson
3af87f6f93
Moved CertManager APIs into own file
...
Split out certificate manager APIs into ssl_certman.c.
ssl.c includes ssl_certman.c
Better test coverage.
Minor fixes.
wolfSSL_X509_chain_up_ref calls XFREE with name->heap but name may be
NULL. Check for NULL first.
2023-07-07 15:08:08 -07:00
David Garske
f2809c5a24
Merge pull request #6586 from julek-wolfssl/zephyr-action
...
Add zephyr testing github action
2023-07-07 14:54:07 -07:00
jordan
55bbd5865c
LMS/HSS: cleanup, and safer write/read callbacks
2023-07-07 15:30:50 -05:00
Juliusz Sosinowicz
c4cbf0508b
Add zephyr action
2023-07-07 20:18:19 +02:00
JacobBarthelmeh
7213cb3cfb
Merge pull request #6463 from dgarske/silabs_erf32
...
Updated support for Silicon Labs Simplicity Studio and the ERF32 Gecko SDK
2023-07-07 11:42:00 -06:00
David Garske
91fb24161b
Merge pull request #6515 from julek-wolfssl/nginx-1.25.0
...
Add support for nginx-1.25.0
2023-07-07 09:29:23 -07:00
David Garske
9599ddd80a
Merge pull request #6575 from julek-wolfssl/zd/15258
...
Properly enforce the pathLenConstraint of the BasicConstraints extension
2023-07-07 08:58:28 -07:00
David Garske
abe1bce914
Fix silabs_ecc_export_public to set the signing only flag. Added tests cases for import of private and public only verify in the SiLabs example.
2023-07-07 08:25:46 -07:00
Juliusz Sosinowicz
0abaa89787
Add support for nginx-1.25.0
...
- nginx: add necessary defines and function
- Implement Certificate Authorities for TLS 1.3
- Implement secret logging for TLS 1.3. Can be used for example with:
./configure CPPFLAGS="-DWOLFSSL_SSLKEYLOGFILE -DSHOW_SECRETS -DHAVE_SECRET_CALLBACK -DWOLFSSL_SSLKEYLOGFILE_OUTPUT='\"/tmp/secrets\"'"
- Implement session context checking for tickets
- Check for authorized responder in OCSP basic response
- Fix handling call to ocsp->statusCb
- compat: Translate SOCKET_PEER_CLOSED_E to WOLFSSL_ERROR_SYSCALL
- Fix wolfSSL_CTX_set_session_cache_mode
- WOLFSSL_SESS_CACHE_OFF means nothing should be on
- WOLFSSL_SESS_CACHE_NO_INTERNAL turns off only the internal cache
- Respect ssl->options.internalCacheOff
- Implement SSL_SESSION_set_time
- wolfSSL_SSL_in_init: fix detection for TLS 1.3
- Fix handling call to ssl->alpnSelect
- SendTls13NewSessionTicket: always generate new ID
- When we send a new ticket for the same session (for example we resumed a connection and are sending a new ticket so that the client can resume in the future), we need to generate a new ID so that we don't overwrite the old session in the cache. Overwriting the session results in the `diff` calculation in `DoClientTicketCheck()` producing the wrong value and failing to resume.
Add nginx github action test
- Fix memory leaks
- wolfSSL_OCSP_basic_verify: implement OCSP_TRUSTOTHER flag
- AKID: implement matching on issuer name and serial number
- ocsp: check for a chain match for OCSP responder
- Split CreateTicket into CreateTicket and SetupTicket
- SendCertificateStatus: free response.buffer
- Use heap hint when allocating responseBuffer
- Remove responseBuffer from internal API's that don't use it anywhere
2023-07-07 11:22:58 +02:00
Sean Parkinson
52b5adb54a
Merge pull request #6581 from kareem-wolfssl/eccNullKCheck
...
Fixed crash in wc_ecc_free.
2023-07-07 10:54:18 +10:00
David Garske
4d25faafe2
Merge pull request #6582 from SparkiDev/aes_gcm_arm_fix
...
AES-GCM ARM asm: fixes from GCM changes
2023-07-06 17:12:08 -07:00
Sean Parkinson
f3bae3192a
Merge pull request #6580 from dgarske/sig_verify
...
Fix for `wc_SignatureGenerate_ex` calling verify twice
2023-07-07 08:40:39 +10:00
Sean Parkinson
af5b3b551a
AES-GCM ARM asm: fixes from GCM changes
...
GCM is now its own structure.
GMULT, GHASH, GenerateM0 made public and fixed here too.
2023-07-07 08:35:14 +10:00
Juliusz Sosinowicz
2248140bf3
Clear ssl->arrays->sessionIDSz at start of function
2023-07-06 15:13:56 -07:00
Juliusz Sosinowicz
57e53d1a43
Don't allow a resumption handshake inside of a SCR
2023-07-06 15:13:56 -07:00
Kareem
fb9e036d5b
Add NULL check in TFM's fp_forcezero.
2023-07-06 14:47:18 -07:00
Kareem
657679efda
Only check for ALT_ECC_SIZE case, otherwise key->k is an array which will never be NULL.
2023-07-06 21:15:37 -07:00
Kareem
e995568626
Fixed crash in wc_ecc_free.
2023-07-06 21:10:32 -07:00
Andras Fekete
4f9b5de802
File gating
2023-07-06 17:03:57 -04:00
Andras Fekete
8421b384fb
Settable 'keyAsn1' max length
2023-07-06 17:02:44 -04:00
Andras Fekete
ef9206f73f
Addressing PR comments
2023-07-06 16:42:12 -04:00
Andras Fekete
266307da6c
Add in ARIA wrappers
...
Address PR comments + other cleanup
Addressing PR comments
Minor change
Make sure the last line gets output as well
Add in ARIA SHA256 session to internal structure
Add in ARIA SHA384 session to internal structure
Add necessary function for ARIA to extract key
Fix unit tests
Rename HAVE_ARIAGCM to HAVE_ARIA
Move aria.* to wolfcrypt/port/aria
Separate out aria-crypt init functions
Adding in ECC+SHA callbacks
Avoid using AC_CHECK_FILE
Rename Aria to wc_Aria
Don't need special cases
Addressing PR comments
Code cleanup
C89 support
Remove TODO
Add documentation about buffer size
Clean up header files
Use ARIA_DEVID by default if available
Dummy update call to make MagicCrypto happy
Fix for detecting what algo type to use
Documentation
Use the appropriate sign/verify
Collect MagicCrypto functions together (and avoid leaks)
Fall back on other implementations on failure
Fix issue when compiling without CRYPTOCB
Addressing PR comments
Better cleanup
Addressing PR comments
Cleaner exit in case of error
2023-07-06 16:09:23 -04:00
Juliusz Sosinowicz
2cf916581d
Jenkins fixes
2023-07-06 19:55:54 +02:00
Juliusz Sosinowicz
c041863aaa
Code review
2023-07-06 19:00:11 +02:00
Juliusz Sosinowicz
d2642e329d
Properly enforce the pathLenConstraint of the BasicConstraints extension
...
- move the testsuite file helps into a new tests/utils.c file so that they can be used across all tests
- dump the raw TLS stream when WOLFSSL_DUMP_MEMIO_STREAM is defined so that it can be examined in Wireshark
2023-07-06 19:00:11 +02:00
David Garske
9ca53ac7f7
Fix for wc_SignatureGenerate_ex calling verify twice.
2023-07-06 09:34:03 -07:00
David Garske
fb0c769d6c
Merge pull request #6578 from douzzer/20230705-analyzer-fixes
...
20230705-analyzer-fixes
2023-07-06 09:04:39 -07:00
David Garske
e8f3afc85b
Merge pull request #6579 from julek-wolfssl/getsockopt-endianness
...
getsockopt needs to take in an int
2023-07-06 09:04:13 -07:00
David Garske
caa0e5aabf
Fix for silabs_ecc_export_public to set the type (curve).
2023-07-06 08:57:02 -07:00
jordan
67bef21185
Add LMS/HSS wolfCrypt hooks.
2023-07-06 10:55:53 -05:00
David Garske
794425c431
Merge pull request #6577 from SparkiDev/sm_update_1
...
SM tests: void in function declaration that is its prototype
2023-07-06 06:04:14 -07:00
Juliusz Sosinowicz
0b4e4287c9
getsockopt needs to take in an int
...
This caused an issue on big endian platforms
From the getsockopt man page:
Most socket-level options utilize an int argument for optval. For setsockopt(), the argument should be non‐
zero to enable a boolean option, or zero if the option is to be disabled.
2023-07-06 11:40:36 +02:00
Daniel Pouzzner
1912f1bc2a
fixes for clang-analyzer-core.NullDereference, clang-analyzer-core.NonNullParamChecker, clang-analyzer-deadcode.DeadStores, readability-redundant-preprocessor, clang-diagnostic-unreachable-code-break, -Werror=sign-conversion, bugprone-macro-parentheses, "Call to 'malloc' has an allocation size of 0 bytes", clang-diagnostic-declaration-after-statement re tests/unit.h:ExpectPtr() pragmas.
2023-07-06 00:53:37 -05:00
Sean Parkinson
7a73c9aac7
SM tests: void in function declaration that is its prototype
...
Need to have void in prototype of funtion.
2023-07-06 08:57:30 +10:00
David Garske
652c5491fe
Merge pull request #6571 from julek-wolfssl/dtls-mtu-interop
...
Always add DTLS_MTU_ADDITIONAL_READ_BUFFER for better MTU interop
2023-07-05 13:03:10 -07:00
Juliusz Sosinowicz
b0c2e29a2e
Always add DTLS_MTU_ADDITIONAL_READ_BUFFER for better MTU interop
2023-07-05 10:19:19 -07:00
David Garske
856b5c3f1b
Merge pull request #6566 from JacobBarthelmeh/soname
...
update soname to 40
2023-07-05 09:21:10 -07:00
David Garske
f00b5c3a1e
Merge pull request #6537 from SparkiDev/sm
...
SM2/SM3/SM4: Chinese cipher support
2023-07-04 10:03:37 -07:00
David Garske
b682c2c4bb
Merge pull request #6437 from julek-wolfssl/windows-crl-monitor
...
Implement CRL monitor for Windows
2023-07-04 10:03:14 -07:00
Juliusz Sosinowicz
7af1f0cf05
Add additional windows logging for DoMonitor
2023-07-04 14:12:38 +02:00
Juliusz Sosinowicz
f58539581d
Fix DoMonitor for Mac/BSD
2023-07-04 13:24:00 +02:00
Juliusz Sosinowicz
2feec88702
Add comment explaining threading usage
2023-07-04 11:18:44 +02:00
Juliusz Sosinowicz
713670dcc7
Use smaller buffer for copying
2023-07-04 11:18:44 +02:00
Juliusz Sosinowicz
3d2db844c1
Speed up waiting for file removal
2023-07-04 11:18:44 +02:00
Dimitri Papadopoulos
50752f5a2b
Fix typos found by codespell
2023-07-04 07:21:27 +02:00
Sean Parkinson
e2424e6744
SM2/SM3/SM4: Chinese cipher support
...
Add support for:
- SM2 elliptic curve and SM2 sign/verify
- SM3 digest
- SM4 cipher with modes ECB/CBC/CTR/GCM/CCM
Add APIs for SM3 and SM4.
Add SM2 sign and verify APIs.
Add support for SM3 in wc_Hash and wc_Hmac API.
Add support for SM3 and SM4 through EVP layer.
Add support for SM2-SM3 certificates. Support key ID and name hash being
with SHA-1/256 or SM3.
Add support for TLS 1.3 cipher suites: TLS-SM4-GCM-SM3, TLS-SM4-CCM-SM3
Add support for TLS 1.2 SM cipher suite: ECDHE-ECDSA-SM4-CBC-SM3
Add support for SM3 in wc_PRF_TLS.
Add SM2-SM3 certificates and keys. Generated with GmSSL-3.0.0 and
OpenSSL.
2023-07-04 13:36:28 +10:00
David Garske
6028dfd394
Merge pull request #6523 from gojimmypi/wc-memory-test
...
Add wolfcrypt test: R/O filesystem const memory pointer
2023-07-03 11:58:13 -07:00
David Garske
a921ab754d
Merge pull request #6569 from SparkiDev/pem_der_example
...
PEM example: new example for convert between PEM and DER
2023-07-03 11:31:36 -07:00
gojimmypi
573fedae2f
add const_byte_ptr_test for Xtensa -mforce-l32 check
2023-07-03 10:44:01 -07:00
David Garske
ad2621a7a0
Merge pull request #6572 from douzzer/20230703-clang-tidy-fixes
...
20230703-clang-tidy-fixes
2023-07-03 10:43:45 -07:00
David Garske
f72a6b705f
Minor spelling fixes.
2023-07-03 10:23:55 -07:00
Daniel Pouzzner
214f9f55c4
fixes for bugprone-suspicious-missing-comma, clang-analyzer-core.NullDereference, and readability-redundant-preprocessor.
2023-07-03 11:30:08 -05:00
David Garske
678a65822f
Merge pull request #6556 from StMartin81/Fix_compilation_of_wc_RsaFunctionNonBlock_if_WOLFSSL_RSA_PUBLIC_ONLY_is_defined
...
Fix compilation of wc_RsaFunctionNonBlock if WOLFSSL_RSA_PUBLIC_ONLY …
2023-07-03 08:55:36 -07:00
David Garske
732ef09da6
Merge pull request #6551 from SparkiDev/asn_no_certs
...
ASN: fix so that NO_CERTS configurations work
2023-07-03 08:55:14 -07:00
Juliusz Sosinowicz
3d68bcd6f7
Jenkins fixes
2023-07-03 14:02:51 +02:00
Juliusz Sosinowicz
ca77da92e5
Implement pthreads threading
2023-07-03 14:02:51 +02:00
Juliusz Sosinowicz
bff2cf5690
Add crl monitor unit testing
2023-07-03 14:02:51 +02:00
Juliusz Sosinowicz
8ab0050801
Init windows CRL monitor
2023-07-03 14:02:51 +02:00
Sean Parkinson
a39a04fc88
PEM example: new example for convert between PEM and DER
...
PEM example converts PEM to DER and DER to PEM.
Supports encrypting DER and writing out as PEM.
Added better support for 40-bit RC2-CBC PBE.
Added AES-128-CBC encryption support with PKCS#5v2.
Fixed handling of iterations to support writing 24-bit values.
Declared enum types for pass to PKCS#8 encryption APIs.
Add more DER and PEM files to certs directory.
Add testing of 'pem' with pem.test script.
2023-07-03 17:20:35 +10:00
Sean Parkinson
5be883a995
ASN: fix so that NO_CERTS configurations work
...
Moved code around and update #ifdefs so that --enable-cryptonly
CFLAGS=-DNO_CERTS compiles.
2023-07-03 09:16:44 +10:00
Sean Parkinson
da4424cd0c
Merge pull request #6559 from dgarske/sni_defaults
...
Turn on SNI by default on hosts with resources
2023-07-03 08:07:45 +10:00
JacobBarthelmeh
e2a1bc6e6a
fix warning for build with vcpkg
2023-06-30 15:53:46 -07:00
JacobBarthelmeh
a4c058649b
Merge pull request #6560 from dgarske/stm32_nuttx
...
Support for using the Nuttx STM RNG register definitions
2023-06-30 16:15:49 -06:00
JacobBarthelmeh
877979c5c2
update soname to 40
2023-06-30 14:40:26 -07:00
David Garske
052fba887c
Merge pull request #6563 from SKlimaRA/SKlimaRA/fix-funky-ifdef
...
fixed bug in ifdef logic caused in pull req 6277
2023-06-30 14:30:47 -07:00
Chris Conlon
e1cb74f24a
Merge pull request #6492 from night1rider/wolfssl-wolfcrypttest-statickeys
...
Added to cert buffer keys and updated testwolfcrypt
2023-06-30 14:21:40 -06:00
Lealem Amedie
5ba579397d
Make public wc_ api for EncodeObjectId
2023-06-30 14:14:27 -06:00
Stanislav Klima
c2726b4cbe
fixed bug in ifdef logic caused in pull req 6277
2023-06-30 13:08:07 -07:00
Martin Stolpe
81484ef74b
Fix compilation of wc_RsaFunctionNonBlock if WOLFSSL_RSA_PUBLIC_ONLY is defined
2023-06-30 13:05:21 -07:00
David Garske
6052e01879
Fixes for SNI test with static memory enabled. Fixes for other minor static memory build combinations.
2023-06-30 13:04:05 -07:00
David Garske
79a7d21932
Turn on SNI by default on hosts with resources.
2023-06-30 13:04:05 -07:00
David Garske
53c30f44a0
Support for using the Nuttx STM RNG register definitions, enabled with STM32_NUTTX_RNG. ZD 16315
2023-06-30 13:00:52 -07:00
David Garske
95675c7e34
Merge pull request #6455 from lealem47/INIT_SSL_NO_CTX_KEY
...
Allow option to create SSL without key/cert in ctx
2023-06-30 10:35:52 -07:00
David Garske
9fc68f4a80
Merge pull request #6558 from anhu/wolfSSL_X509_NAME_heap
...
Allocate WOLFSSL_X509_NAME with heap hint.
2023-06-30 10:35:08 -07:00
David Garske
1c33cefff7
Merge pull request #6562 from SparkiDev/wolfbot_fixes_1
...
wolfBot fixes
2023-06-29 19:13:17 -07:00
Sean Parkinson
a1939d22b9
wolfBot fixes
...
Importing an EC point ordinate with one being zero will result in
different errors based on different implementations. Check both known
error codes.
Benchmark usage fixed.
2023-06-30 09:07:46 +10:00
Lealem Amedie
7720dac545
Allow option to create SSL without key/cert in ctx
2023-06-29 13:57:40 -06:00
Anthony Hu
ed4774f606
Allocate WOLFSSL_X509_NAME with heap hint.
2023-06-29 12:04:32 -04:00
David Garske
048083cfe3
Merge pull request #6329 from tmael/crl_off
...
Add support for enabling and disabling CRLs.
2023-06-28 16:03:25 -07:00
Sean Parkinson
d029ba4d46
Merge pull request #6415 from julek-wolfssl/issue/6408
...
Ignore session ID's shorter than 32 bytes instead of erroring out
2023-06-29 08:20:48 +10:00
Lealem Amedie
c45f7c87b0
Make DecodeObjectId available for OPENSSL_ALL
2023-06-28 13:46:45 -06:00
Lealem Amedie
7251d564eb
Use new RID function in asn=original
2023-06-28 13:04:47 -06:00
Lealem Amedie
47350fa95c
Remove manual encoding of OID in txt2oidBuf
2023-06-28 12:53:34 -06:00
Lealem Amedie
ee63d73299
Restore nid2oid functionality to preserve expected behaviour
2023-06-28 12:53:34 -06:00
Lealem Amedie
1d83448df7
memcpy instead of strcpy
2023-06-28 12:53:34 -06:00
Lealem Amedie
48de458017
Add Obj_txt2oidBuf function
2023-06-28 12:53:34 -06:00
Lealem Amedie
2a539fe028
Cleanup
2023-06-28 12:53:34 -06:00
Lealem Amedie
fdc95f9ba6
Handle registeredID correctly
2023-06-28 12:53:34 -06:00
Lealem Amedie
90f5665318
Improve subjectAltName extension parsing and printing
2023-06-28 12:53:34 -06:00
David Garske
dcfa410540
Merge pull request #6289 from jpbland1/nuttx-hw-acel
...
Nuttx hw acel benchmark with STM32_HW_CLOCK_AUTO
2023-06-28 09:32:48 -07:00
Hideki Miyazaki
e0651e4eb3
Merge pull request #6434 from TakayukiMatsuo/fixtypo
...
Fixed some typos in Japanese help in examples/client
2023-06-28 11:20:42 +09:00
David Garske
8e3afbd6e3
Merge pull request #6547 from philljj/fix_cut_call
...
fix detection of cut tool in configure.ac
2023-06-27 16:19:52 -07:00
JacobBarthelmeh
78107b0f88
Merge pull request #6540 from dgarske/bench_fix
...
Fix for benchmark always using 4KB of memory for `gStats`
2023-06-27 16:18:29 -06:00
John Bland
c72d008a5c
add STM32_HW_CLOCK_AUTO which turns the stm32 hw
...
accleration clock on and off automatically
2023-06-27 17:16:46 -04:00
John Bland
fbadcf67da
add the STM32 peripheral clock enable and disable
...
calls to the benchmark program so the benchmark program can use hardware accleration
2023-06-27 17:16:46 -04:00
David Garske
d9d9c5cd3d
Merge pull request #6549 from gojimmypi/pthread_gate
...
Revert #6536 types.h one line HAVE_PTHREAD
2023-06-27 13:42:16 -07:00
David Garske
6b26b071e4
Merge pull request #6532 from embhorn/forum_topic2018
...
Fix WinCE XSEEK_SET
2023-06-27 13:26:18 -07:00
David Garske
0d0d2cf50c
Merge pull request #6531 from bandi13/extraCMakeOptions
...
Extra c make options
2023-06-27 13:26:03 -07:00
David Garske
b1fe15dc70
Further refactor of the benchmark stats tracking. Always use the allocated list (avoids using a stack pointer for ECC descriptions).
2023-06-27 13:05:04 -07:00
David Garske
e0fa25eedc
Merge pull request #6548 from lealem47/gplusplus
...
Fix for g++ builds
2023-06-27 13:02:50 -07:00
gojimmypi
8867f484e5
Revert #6536 types.h one line HAVE_PTHREAD
2023-06-27 12:36:53 -07:00
Lealem Amedie
91962a1a78
Fix for g++ builds
2023-06-27 12:50:56 -06:00
jordan
41d248461b
fix detection of cut tool in configure.ac
2023-06-27 13:18:25 -05:00
David Garske
51ca7bb8e3
Fix to support using -print with WC_BENCH_TRACK_STATS.
2023-06-27 10:25:48 -07:00
JacobBarthelmeh
9a4237ee88
Merge pull request #6457 from lealem47/gcc-arm-user-settings
...
Improve GCC-ARM user-settings.h FIPS configurability
2023-06-27 11:17:56 -06:00
David Garske
145ca4ae9d
Merge pull request #6542 from SparkiDev/api_fixes_1
...
Tests api.c: fixes
2023-06-27 10:00:07 -07:00
David Garske
500b66eb36
Add API for exporting a SiLabs SE ECC key to a wolf ECC key (silabs_ecc_export_public). Add API for supporting export of a vault's public key. Add an ECC signature example for SiLabs.
2023-06-27 09:36:41 -07:00
Tesfa Mael
26e6fd9a6f
update wolfSSL_X509_STORE_set_flags
2023-06-27 08:29:13 -07:00
Tesfa Mael
cb0e2c8b0f
Maintain existing behavor when not using OPENSSL_COMPATIBLE_DEFAULTS
2023-06-27 08:29:13 -07:00
Tesfa Mael
03e5d109c7
Add test_wolfSSL_dup_CA_list
2023-06-27 08:29:13 -07:00
Tesfa Mael
481ae20fcb
Maintain consistent behavior when activating CRL
2023-06-27 08:26:02 -07:00
Tesfa Mael
fd17fa3e9c
Implement the option to disable CRL check
...
Do leaf CRL check by default
Correct wolfSSL_sk_X509_NAME_push return check
Update OpenSSL compatibility errors for HAProxy
Change X509_V to literal constant values
Fix the compat layer with TLS session ticket reuse
Fix for tls1_2 session resume and cache miss
Save intitial wolfSSL ctx
Check for OpenSSL CRL error code 23
2023-06-27 08:26:02 -07:00
Juliusz Sosinowicz
291c538e5f
Ignore session ID's shorter than 32 bytes instead of erroring out
2023-06-27 14:51:46 +02:00
David Garske
23c60b7b9c
Merge pull request #6530 from SparkiDev/tests_api_expect_5
...
Test api.c: change more tests to use Expect instead of Assert
2023-06-26 16:10:52 -07:00
Sean Parkinson
578f56e60c
Test api.c: change more tests to use Expect instead of Assert
...
bio.c:
wolfSSL_BIO_flush(): check allocation to bio->ip succeeded.
internal.c:
InitSSL_Ctx(): set ctx->heap to heap if value passed in
ProcessPeerCerts(): check for error MEMORY_E too as a fatal parsing
error
ssl.c:
wolfSSL_shutdown(): SOCKET_ERROR_E is also an indication that the
socket is done, MEMORY_E is a fatal error
wolfSSL_Cleanup(): move free of memory fail couting to wolfSSL API
SessionTicketNoncePrealloc(): eror return must be non-zero
AddSessionToCache(): XFREE checks for NULL no need to do it before
call
wolfSSL_set_psk_use_session_callback(): ensure ssl is not NULL before
dereferencing
wolfSSL_SMIME_read_PKCS7(): check for error return from
wolfSSL_BIO_gets()
asn.c:
wc_MIME_parse_headers(): check allocation succeeded into nextHdr
compress.c:
wc_DeCompressDynamic(): free tmp on inflateInit2 failure
memory.c: rework where memory allocation failure counting code for when
WOFLSSL_STATIC_MEMORY is defined
wc_port.c:
wolfCrypt_Cleanup(): only call wc_MemFailCount_Free() when no
wolfSSL_Cleanup()
2023-06-27 08:01:33 +10:00
Sean Parkinson
17bc833bd3
Merge pull request #6543 from embhorn/gh6506
...
Spelling fixes in script generated files
2023-06-27 07:28:35 +10:00
Eric Blankenhorn
51ffe9691f
Spelling fixes in script generated files
2023-06-26 09:48:15 -05:00
gojimmypi
6b240fa41a
Refactor HAVE_PTHREAD and _POSIX_THREADS ( #6536 )
...
* HAVE_PTHREAD gate in test.h
* add config.h and settings.h to test.h
* added config.h and settings.h to other test.h in wolfcrypt/test
* settings #ifdef _POSIX_THREADS HAVE_PTHREAD
* cyassl settings _POSIX_THREADS HAVE_PTHREAD
* undo cyassl _POSIX_THREADS HAVE_PTHREAD
* move settings.h #include in both test.h
* add !defined(SINGLE_THREADED) logic
* refactor HAVE_PTHREAD, _POSIX_THREADS
2023-06-26 07:32:20 -07:00
Sean Parkinson
b7332e33c7
Tests api.c: fixes
...
NULL dereference.
Uninitialized variable use.
2023-06-26 16:04:24 +10:00
JacobBarthelmeh
18032cdc40
Merge pull request #6535 from dgarske/wpas_small
...
Fix for `--enable-wpas=small`
2023-06-23 16:19:31 -07:00
David Garske
514ea2d0b1
Merge pull request #6510 from mitchcapper/win32_better_socket_error_msg_pr
...
Added For TranslateIoError in debug mode use FormatMessage to get a better error message
2023-06-23 15:33:34 -07:00
David Garske
af0facad9f
Fix for --enable-wpas=small.
2023-06-23 14:25:39 -07:00
David Garske
48dc288b83
Fix for wc_ecc_import_raw_private using 0 for key size. Add check in silabs_ecc.
2023-06-23 14:22:46 -07:00
David Garske
cde4e8e13d
Fix for signing with vault to only use if private key is not supplied. Refactor the silabs ECC key import code. Added checks for all silabs_ecc return codes.
2023-06-23 14:22:45 -07:00
David Garske
fc153ff273
Support for Silicon Labs Gecko SDK v4. Changes SE Hash to use multipart API's. Gecko SDK v3 auto-detected or manually forced using WOLFSSL_SILABS_SE_ACCEL_3.
2023-06-23 14:22:44 -07:00
David Garske
83dca07421
Updated support for Silicon Labs Simplicity Studio and the ERF32 Gecko SDK. Fix ECC unused functions with HW crypto like SE. ZD 15874.
2023-06-23 14:20:40 -07:00
David Garske
00719182d5
Fix for benchmark always using 4KB of memory for gStats, even when not required. Added new WC_BENCH_TRACK_STATS to enable feature is needed. Code cleanups for line length and headers.
2023-06-23 14:17:22 -07:00
Mitch Capper
6185d66b01
For TranslateIoError use FormatMessage to get a better error message on win32
2023-06-23 14:05:38 -07:00
David Garske
033f56bfe9
Merge pull request #6534 from mitchcapper/basic_editorconfig_addition_pr
...
Basic editor config to avoid some whitespace issues
2023-06-23 11:49:27 -07:00
David Garske
102cb1114a
Merge pull request #6509 from douzzer/20230613-wc_test_ret_t
...
20230613-wc_test_ret_t
2023-06-23 11:47:20 -07:00
David Garske
ea68920b8b
Merge pull request #6539 from JacobBarthelmeh/caam
...
fix for keymod with rt1170 blobs
2023-06-23 11:47:04 -07:00
lealem47
06c1dd171a
Merge pull request #6466 from dgarske/keilmdk
...
Fixes and cleanups for Keil MDK examples
2023-06-23 08:41:04 -06:00
JacobBarthelmeh
2d87037e4b
fix for keymod with rt1170 blobs
2023-06-23 00:50:25 -07:00
David Garske
746ac3c9a3
Merge pull request #6533 from anhu/no_data_junk
...
make sure that when TLSX_ALPN_GetRequest() returns, data and dataSz...
2023-06-22 22:11:02 -07:00
Lealem Amedie
6f2831a252
Document inline build error & fix
2023-06-22 16:48:17 -06:00
David Garske
255aa774f2
Updated Keil MDK documentation to note RTOS and TCP default dependency. Fix for inline error due to tracking code being available too broadly. Use current branch for makedistsmall.sh.
2023-06-22 16:48:17 -06:00
David Garske
a56fe30c2c
Fixes and cleanups for Keil MDK examples. Combine duplicate user_settings.h. Use SP math all by default. Disable old/deprecated algorithms. Add CMSIS RTOS timer support for TLS and benchmark.
2023-06-22 16:48:17 -06:00
David Garske
2f44ece4d8
Merge pull request #6511 from JacobBarthelmeh/nightly
...
fix for nightly toolchain armv7 build warning
2023-06-22 15:25:57 -07:00
David Garske
33808c75f2
Merge pull request #6527 from philljj/zd16310
...
Fix ThreadSanitizer unlock of an unlocked mutex warning
2023-06-22 14:26:44 -07:00
Mitch Capper
20d706aad8
Basic editor config to avoid some whitespace issues
2023-06-22 14:06:46 -07:00
Anthony Hu
3e821c6f2b
make sure that when TLSX_ALPN_GetRequest() returns data and dataSz are not pointing to junk.
2023-06-22 15:01:11 -04:00
jordan
2be3bb4c56
Fix ThreadSanitizer unlock of an unlocked mutex warning
2023-06-22 13:23:08 -05:00
Eric Blankenhorn
c933f780ca
Fix WinCE XSEEK_SET
2023-06-22 11:14:34 -05:00
Andras Fekete
155ce9aecf
HKDF already defined
2023-06-22 11:17:34 -04:00
Andras Fekete
0ee198437a
Get around issue with 'uint8_t' undefined
2023-06-22 11:03:56 -04:00
Andras Fekete
f58ae30b50
Add in CMake flags 'HPKE', 'HKDF', 'ECH'
2023-06-22 11:03:36 -04:00
Andras Fekete
e1f2c0bb2e
Add 'Keying_material' option
2023-06-22 10:12:37 -04:00
David Garske
3cb0b4ab29
Merge pull request #6410 from embhorn/zd15856
...
Update EBSNET port
2023-06-21 21:35:19 -07:00
David Garske
6697181081
Merge pull request #6500 from SparkiDev/tests_api_expect_4
...
Test api.c: change more tests to use Expect instead of Assert
2023-06-21 17:17:37 -07:00
David Garske
fb35526b73
Merge pull request #6528 from kareem-wolfssl/trustedCaKeys
...
Fix trusted_ca_keys, refactor MAX_X509_SIZE
2023-06-21 17:07:55 -07:00
Kareem
e6017dc546
Refactor MAX_X509_SIZE into a define so it can be overriden in build settings.
2023-06-21 15:35:29 -07:00
Kareem
75c8d87353
Fix trusted_ca_keys extension allowed logic.
2023-06-21 15:35:29 -07:00
Sean Parkinson
e467112a93
Test api.c: change more tests to use Expect instead of Assert
...
Changed EXPECT_DECL to start of as TEST_SKIPPED.
Modified other EXPECT macros appropriately.
Change test functions to not use 'res' when EXPECT_DECL is used.
memory.c:
wc_MemFailCount_Init(): don't declare variable after a statement
conf.c:
wolfSSL_TXT_DB_read(): free the whole WOLFSSL_TXT_DB on failure
instead of just the memory
wolfSSL_CONF_add_string(): pop the value added into section->value
(sk) if it can't be pushed onto conf->data
wolfSSL_NCONF_load(): free the new value if it wasn't able to be added
ocsp.c:
wolfSSL_OCSP_cert_to_id():
free the decoded certificate if parsing failed (is freed after use
otherwise)
free the certificate id on failure and make it NULL and continue
freeing other variables
pk.c:
wolfSSL_RSA_set0_crt_params(): set dmp1, dmq1 and iqmp fields to NULL
if setting the internal failed - returns error and caller needs to free
the passed in BNs
wolfSSL_RSA_set0_factors(): set p and q fields to NULL if setting the
internal failed - returns error and caller needs to free the passed in
BNs
wolfSSL_RSA_set0_key(): set n, e abd d fields to NULL if setting the
internal failed - returns error and caller needs to free the passed in
BNs
x509.c:
wolfSSL_X509_set_serialNumber(): explicit NULL
checkwolfSSL_X509_REQ_add1_attr_by_NID(): check whether push succeeded
and on failure free attribute
asn.c:
ConfirmSignature(): for DSA, allocate separately to ensure no leak on
memory allocation failure.
dh.c:
wc_DhGenerateParams(): ensure tmp and tmp2 are able to be cleared on
error
evp.c:
wolfSSL_EVP_PKEY_CTX_add1_hkdf_info(): fix realloc use to no leak on
failure
wolfSSL_EVP_CIPHER_CTX_iv_length(): handle ctx being NULL.
2023-06-22 08:21:17 +10:00
Eric Blankenhorn
53fe93430e
Update EBSNET port
2023-06-21 15:52:42 -05:00
David Garske
8473275fc6
Merge pull request #6529 from kareem-wolfssl/openwrt21.02Fix
...
Workaround for removed kmods repo in OpenWRT 21.02.
2023-06-21 13:19:40 -07:00
JacobBarthelmeh
2d28b492b0
Merge pull request #6501 from dgarske/ecc_comp
...
Fix for SP math all and ECC with compressed keys (missing sp_add_d)
2023-06-21 12:01:06 -07:00
Kareem
9f24217e26
Workaround for removed kmods repo in OpenWRT 21.02.
2023-06-21 11:53:30 -07:00
David Garske
1bff338e37
Merge pull request #6507 from bandi13/fix_certs_ocsp_renewcerts
...
Fix certs ocsp renewcerts
2023-06-21 11:26:59 -07:00
David Garske
9204101e94
Merge pull request #6517 from douzzer/20230615-opensslextra-wolfSSL_ERR_reason_error_string
...
20230615-opensslextra-wolfSSL_ERR_reason_error_string
2023-06-21 11:06:51 -07:00
David Garske
aaf2408851
Merge pull request #6504 from SparkiDev/bench_embedded_scrypt
...
test.c, scrypt: bench embedded reduce heap usage
2023-06-21 11:06:26 -07:00
David Garske
0e2c32f726
Merge pull request #6505 from SparkiDev/alt_ecc_cryptocb
...
ECC, ALT_ECC_SIZE, CryptoCB: ensure err is 0 in _ecc_make_key_ex
2023-06-21 11:05:53 -07:00
David Garske
70c3e84735
Merge pull request #6503 from SparkiDev/mp_test_tfm_mips
...
TFM: fix big endian reading a zero length buffer
2023-06-21 11:05:40 -07:00
David Garske
3b3c175af0
Merge pull request #6521 from ejohnstown/readme
...
Update Readme
2023-06-18 21:16:56 -07:00
John Safranek
c322e1f7f8
update readme
2023-06-18 20:24:28 -07:00
David Garske
d967aae501
Merge pull request #6518 from ejohnstown/release-5.6.3
...
Release 5.6.3
2023-06-16 12:08:23 -07:00
John Safranek
42e934b251
Update read-me and change-log for the release.
2023-06-16 09:47:35 -07:00
David Garske
4741a0b696
Merge pull request #6508 from JacobBarthelmeh/fuzzing
...
sanity check on send fatal alert return
2023-06-15 20:13:49 -07:00
David Garske
78b78428e7
Merge pull request #6512 from SparkiDev/math_enc_mem_exptmod
...
Math, Encrypted Memory: mod exp fix
2023-06-15 19:52:41 -07:00
Sean Parkinson
e17f86d145
TFM: fix big endian reading a zero length buffer
...
Bail early as big endian implementation doesn't handle it.
2023-06-16 10:58:51 +10:00
Sean Parkinson
beef8b0014
outputBuffer - use idx field
...
dtls13.c:
Change end of outputBuffer data calculations to use function
GetOutputBuffer().
Use idx when calculating unused byte count of outputBuffer.
internal.c:
Change end of outputBuffer data calculations to use function
GetOutputBuffer().
Use GetOutputBuffer() to calculate end of data in outputBuffer.
GrowOutputBuffer():
Calculate new size to allocate to include already written data in
case of static buffer.
Copy all data including already written count (idx).
CheckAvailableSize():
Don't subtract idx from length when checking MTU size.
Do subtract idx from bufferSize to determine count of unused bytes
in outputBuffer.
2023-06-16 10:29:52 +10:00
Sean Parkinson
a1e8aa7269
test.c, scrypt: bench embedded reduce heap usage
...
Don't do scrypt test cases that allocate 1MB of memory when
BENCH_EMBEDDED is defined.
2023-06-16 10:16:34 +10:00
Daniel Pouzzner
970663f8a1
in wolfSSL_ERR_reason_error_string(), unconditionally convert positive error codes to negative, and in switch(), match against negated values of OpenSSL positive codes like WOLFSSL_ERROR_WANT_READ. fixes #6514
2023-06-15 17:42:03 -05:00
dell5060
7926ceb120
Updated Key gen to convert the keys located in /certs/statickeys to be used in buffers
2023-06-15 15:33:11 -06:00
Sean Parkinson
7153dd70a6
Math, Encrypted Memory: mod exp fix
...
The modular exponentiation implementations in sp_int.c and tfm.c are not
safe when using Encrypted Memory.
Cannot have two pieces of memory where one changes and the other doesn't
based on private value.
Use extra variable to hold the two new values and assign them both back
at the same time in a safe manner.
Alternative implementations used when WC_PROTECT_ENCRYPTED_MEM is
defined.
2023-06-16 07:28:47 +10:00
JacobBarthelmeh
5b81dc47d2
adjust location used for writing to output buffer
2023-06-14 21:01:12 -07:00
JacobBarthelmeh
8f29111aac
fix for nightly toolchain armv7 build warning
2023-06-14 14:13:59 -06:00
Daniel Pouzzner
902d47aaa1
wolfcrypt/test/test.c: fix scoping of hkdf_test();
...
wolfcrypt/test/test.h: include <wolfssl/wolfcrypt/types.h> to be sure sword32 is available.
2023-06-14 15:06:13 -05:00
JacobBarthelmeh
0a860c793f
adjust test case to handle error of peer closing down
2023-06-14 12:21:52 -07:00
JacobBarthelmeh
9e0c13bbdb
sanity check on send fatal alert return
2023-06-14 11:08:56 -07:00
Daniel Pouzzner
bb5e09c394
wolfssl/wolfcrypt/settings.h: refactor ssize_t setup to be more flexible, with NO_WC_SSIZE_TYPE and WC_SSIZE_TYPE override options, and no use of autotools-style HAVE_SSIZE_T.
2023-06-14 12:28:50 -05:00
Daniel Pouzzner
e843a7bd1e
wolfcrypt/test/test.{c,h}: add wc_test_ret_t, and 'L' long int suffixes on relevant numeric literals, to facilitate passing around 32 bit retvals in the WC_TEST_RET_*() system on 16 bit targets.
2023-06-14 12:28:50 -05:00
Daniel Pouzzner
131b7c2bcf
wolfcrypt/src/chacha20_poly1305.c: refactor ssize_t uses in wc_XChaCha20Poly1305_crypt_oneshot() as long int, for portability.
2023-06-14 12:28:50 -05:00
Andras Fekete
76cf3d61a0
Calling 'nc' makes the server unresponsive
2023-06-14 09:54:23 -04:00
Andras Fekete
20df12e5f7
This should add a check to make sure the server is up before connecting
2023-06-14 09:20:06 -04:00
Sean Parkinson
82cc988226
Merge pull request #6495 from JacobBarthelmeh/build
...
update check for stdatomic header file
2023-06-14 14:00:04 +10:00
Sean Parkinson
cdb3d6df40
Merge pull request #6502 from JacobBarthelmeh/release
...
prepare for 5.6.3
2023-06-14 13:59:41 +10:00
Sean Parkinson
0db49ef83a
ECC, ALT_ECC_SIZE, CryptoCB: ensure err is 0 in _ecc_make_key_ex
...
When CryptoCB is used and the key gen operation is not implemented, err
is CRYPTOCB_UNAVAILABLE and needs to be reset to 0.
2023-06-14 10:12:04 +10:00
JacobBarthelmeh
72536e0e10
prepare for 5.6.3
2023-06-13 14:47:06 -06:00
David Garske
fe7502a50e
Fix for SP math all and ECC with compressed keys (missing sp_add_d). Reproduce using: ./configure --disable-rsa --disable-dh --enable-compkey --disable-pkcs12 && make.
2023-06-13 11:39:24 -07:00
Eric Blankenhorn
58c1c0c31b
Merge pull request #6499 from douzzer/20230612-windows-fixes
...
20230612-windows-fixes
2023-06-13 12:32:01 -05:00
Daniel Pouzzner
03a6eed037
wolfcrypt/src/{aes.c,blake2b.c,siphash.c}: fix W64LIT() arguments to not have improper 'U' suffix;
...
wolfssl/wolfcrypt/types.h: add 'U' suffix to W64LIT() macro defs, and add SW64LIT() macro defs (not yet used anywhere);
wolfcrypt/src/asn.c: add !WOLFSSL_ECC_CURVE_STATIC gate around DataToHexStringAlloc() to resolve -Wunused;
wolfcrypt/src/ecc.c: guard against zero-valued "len" arg to wc_ecc_get_curve_id_from_oid();
wolfcrypt/src/wc_port.c: fix several argument implicit sign changes in USE_WINDOWS_API paths;
wolfssl/wolfcrypt/ecc.h: remove const attribute from inline buffers in WOLFSSL_ECC_CURVE_STATIC struct ecc_set_type.
2023-06-12 23:15:08 -05:00
JacobBarthelmeh
47036d0166
update check for stdatomic header file
2023-06-12 13:48:24 -06:00
JacobBarthelmeh
9ffa9faecd
Merge pull request #6491 from ejohnstown/fix-imp-conv
...
Implicit Type Conversion Fix
2023-06-09 13:19:18 -06:00
John Safranek
7b0283fa04
Implicit Type Conversion Fix
...
1. Typecast the return of strlen() to int for the variable used.
2023-06-09 11:13:44 -07:00
John Safranek
a56070cd70
Merge pull request #6490 from JacobBarthelmeh/release
...
Prepare for release 5.6.2
2023-06-09 11:00:10 -07:00
JacobBarthelmeh
353a2926b6
add check for stdatomic.h
2023-06-09 09:52:01 -07:00
JacobBarthelmeh
032ac405db
prepare for release 5.6.2
2023-06-09 05:51:18 -07:00
JacobBarthelmeh
c59cc92379
Merge pull request #6488 from douzzer/20230608-linuxkm-__is_constexpr
...
20230608-linuxkm-__is_constexpr
2023-06-08 14:48:19 -06:00
Daniel Pouzzner
e35cb5bc3d
linuxkm/linuxkm_wc_port.h: override definition of __is_constexpr() from /usr/src/linux/include/linux/const.h with warning-free __builtin_constant_p().
2023-06-08 14:43:05 -05:00
John Safranek
3f1dd32f4e
Merge pull request #6487 from JacobBarthelmeh/fuzzing
...
sanity check on socket return value for timeout with DTLS13
2023-06-08 10:41:41 -07:00
JacobBarthelmeh
0d591f1111
Merge pull request #6485 from SparkiDev/coverity_api_c_fixes
...
Coverity fixes: api.c
2023-06-08 09:25:08 -06:00
Sean Parkinson
897a865090
Merge pull request #6477 from JacobBarthelmeh/stm32
...
add sanity check on hash size with STM32 port
2023-06-08 22:21:19 +10:00
Sean Parkinson
e5bb09f281
Coverity fixes: api.c
...
Fixes from coverity scan in the file api.c.
2023-06-08 22:18:05 +10:00
JacobBarthelmeh
938a48d9b1
sanity check on socket return value for timeout with DTLS13
2023-06-08 02:37:21 -06:00
Sean Parkinson
66d222adfc
Merge pull request #6484 from JacobBarthelmeh/cov
...
coverity scan fixes
2023-06-08 10:06:18 +10:00
JacobBarthelmeh
4a4a769512
check on allocation of new node before dereferencing
2023-06-07 15:20:23 -06:00
JacobBarthelmeh
84979900a7
avoid use after free in error case
2023-06-07 15:13:13 -06:00
JacobBarthelmeh
14990ad92d
set return bio to null after free on error
2023-06-07 15:05:52 -06:00
JacobBarthelmeh
fb5413cea0
account for null terminator with SEP serail number
2023-06-07 14:59:07 -06:00
JacobBarthelmeh
ebc62f8d17
clear extension string and avoid potential double free
2023-06-07 14:41:47 -06:00
JacobBarthelmeh
d796aa12fc
free up memory with othername object on error
2023-06-07 13:29:41 -06:00
JacobBarthelmeh
c399fba4ce
set ext pointer to null after free'ing it
2023-06-07 13:23:43 -06:00
Jacob Barthelmeh
327645ff2a
add additional STM32 ECC sanity check to sign
2023-06-07 10:26:40 -07:00
Jacob Barthelmeh
2a0b244393
add sanity check on hash size with STM32 port
2023-06-07 10:26:40 -07:00
JacobBarthelmeh
c040b4a339
Merge pull request #6478 from SparkiDev/kyber_fixes_1
...
Kyber: allow compilation with limited sizes with liboqs
2023-06-07 11:24:08 -06:00
JacobBarthelmeh
8583cc65fa
Merge pull request #6471 from SparkiDev/tests_api_expect_3
...
Test api.c: change more tests to use Expect instead of Assert
2023-06-07 11:22:23 -06:00
JacobBarthelmeh
1445a6a832
Merge pull request #6482 from SparkiDev/regression_fixes_7
...
Regression testing fixes
2023-06-07 11:18:36 -06:00
JacobBarthelmeh
2b054e223b
Merge pull request #6483 from SparkiDev/cppcheck_fixes_10
...
cppcheck: fixes from scan
2023-06-07 11:13:53 -06:00
Chris Conlon
0752a9e4f4
Merge pull request #6481 from miyazakh/fix_androidb_2
...
fix un-initialized var
2023-06-07 09:39:00 -06:00
Sean Parkinson
ed01b14356
cppcheck: fixes from scan
...
wolfssl_sce_unit_test.c:
sce_crypt_Sha_AesCbcGcm_multitest(): duplicate condition
ssl_asn1.c:
wolfSSL_i2t_ASN1_OBJECT(): done is not needed
MonthStr(): fix bounds check on i
woolfcrypt_test.c, test_main.c, wolfssl_tsip_unit_test.c, devices.c,
aes.c, des3.c:
Variable not used.
asn.c:
DecodeSubjKeyId(): sz is unsigned - check for less than zero does
nothing
kcapi_rsa.c:
KcapiRsa_Decrypt(): fix ret check by using else
KcapiRsa_Encrypt(): make same change for consistency
kcapi_hash.c:
KcapiHashFinal(): move ret into #ifdef where it is needed
stm32.c:
wc_Stm32_Hash_GetDigest(): i redeclared with different type - use ii
instead
bio.c, conf.c:
XFREE checks for NULL
Reduce scope of varialbes.
Condition same.
2023-06-07 17:27:51 +10:00
John Safranek
d67ce722ff
Merge pull request #6476 from kareem-wolfssl/dtlsBlankCert
...
Send blank certificate message in DTLS when no client cert is loaded.
2023-06-06 22:43:01 -07:00
Sean Parkinson
b07c5d7ce8
Regression testing fixes
...
Fix: ./configure --disable-shared --enable-smallstack --enable-all
CFLAGS=-DNO_ASN_TIME
Don't compile mp_test when compiling for SP Math All and RSA
verification only - very few functions available.
ssl.c:
wolfSSL_Rehandshake(): wolfSSL_UseSessionTicket only available when
not NO_WOLFSSL_CLIENT
api.c:
test_wolfSSL_ticket_keys(): meant to be tested on server
2023-06-07 14:26:45 +10:00
Sean Parkinson
e542e51d9f
Test api.c: change more tests to use Expect instead of Assert
...
bio.c:
wolfSSL_BIO_push(): handles NULL for top and append.
crl.c:
InitCRL_Entry(): set toBeSigned to NULL after freeing when allocation
fails.
AddCRL(): free CRL entry properly on error.
wolfSSL_X509_STORE_add_crl(): check for NULL after
wolfSSL_X509_crl_new call.
ssl.c:
wolfSSL_CertManagerGetCerts(): free the certificate if it didn't get
pushed onto stack
wolfSSL_RAND_Init(): returns success if global already initialized.
ssl_asn1.c: wolfSSL_ASN1_TYPE_set now avaiable when OPENSSL_EXTRA
defined for function wolfssl_dns_entry_othername_to_gn().
x509.c:
Added support for creating a valid General Name of type GEN_OTHERNAME.
Extracted some code out into wolfssl_x509_alt_names_to_gn().
wolfSSL_X509_set_ext(): free data correctly on errors
wolfSSL_X509_PUBKEY_set(): free str if DSA parameters cannot be
retrieved; wolfSSL_OBJ_nid2obj() called separately to handle when
returning NULL.
wolfSSL_X509_NAME_copy(): check for failure when
wolfSSL_X509_NAME_add_entry() is called.
x509_str.c:
wolfSSL_X509_STORE_CTX_new(): check for error from calling
wolfSSL_X509_STORE_CTX_init().
wolfSSL_X509_STORE_get0_objects(): don't double free x509; free memory
correctly on error
2023-06-07 14:10:42 +10:00
Hideki Miyazaki
5624df95b5
fix uninit var
2023-06-07 07:43:02 +09:00
JacobBarthelmeh
ee289fdf89
Merge pull request #6429 from embhorn/zd16184
...
Allow wolfSSL_RAND_Init to pass if already initialized
2023-06-06 16:23:42 -06:00
JacobBarthelmeh
8390ab5847
Merge pull request #6480 from lealem47/xcode
...
XCODE project: install all headers
2023-06-06 16:19:21 -06:00
Sean Parkinson
cac42db53c
Merge pull request #6468 from philljj/zd16236
...
Fix fastmath and heapmath invmod to be consistent with sp-math.
2023-06-07 07:47:41 +10:00
JacobBarthelmeh
f42d57df87
Merge pull request #6472 from kaleb-himes/ZD16185-Doc-Update-Request
...
Update error return(s) for wc_RsaPSS_Verify
2023-06-06 15:16:40 -06:00
Lealem Amedie
9bb2ae4884
XCODE project: install all headers
2023-06-06 13:34:22 -06:00
Daniel Pouzzner
3b48bc97ed
Merge pull request #6381 from SparkiDev/type_conversion_fixes_1
...
Fix type conversion warnings by gcc
2023-06-06 11:25:31 -05:00
Sean Parkinson
9ca9c2ba6f
Kyber: allow compilation with limited sizes with liboqs
2023-06-06 14:26:06 +10:00
Sean Parkinson
3230d27700
Merge pull request #6436 from lealem47/sanitizer
...
Miscellaneous fixes for sanitizer
2023-06-06 11:55:52 +10:00
Lealem Amedie
32976d379f
Fix formatting
2023-06-05 16:47:11 -06:00
Sean Parkinson
c0e2752000
Merge pull request #6475 from rizlik/fix_dtls_nogroups_nocerts
...
fix: add guards to compile w !HAVE_SUPPORTED_CURVES && NO_CERTS
2023-06-06 07:55:08 +10:00
Kareem
ebac138e77
Send blank certificate message in DTLS when no client cert is loaded.
2023-06-05 10:49:42 -07:00
Marco Oliverio
e53453a7ed
fix: add guards to compile w !HAVE_SUPPORTED_CURVES && NO_CERTS
...
This configuration can be used to build a static PSK only build
2023-06-05 16:13:11 +00:00
kaleb-himes
6d85d09b0b
Update error return(s) for wc_RsaPSS_Verify
2023-06-05 09:22:08 -06:00
Sean Parkinson
ccd404e13d
Merge pull request #6470 from douzzer/20230603-unittest-maybe-uninited
...
20230603-unittest-maybe-uninited
2023-06-05 08:11:52 +10:00
Daniel Pouzzner
6c4cc2a931
tests/api.c: fix a likely-spurious maybe-uninitialized from gcc-11 -m32 (all-sp-m32) in test_wolfSSL_PEM_PrivateKey().
2023-06-03 10:41:15 -05:00
jordan
db28d38ea3
Fix fastmath and heapmath invmod to be consistent with sp-math.
2023-06-02 22:11:44 -05:00
JacobBarthelmeh
37aada0313
Merge pull request #6465 from lealem47/zd162152
...
Read and assign err return val from _sp_mulmod_tmp
2023-06-02 11:45:27 -06:00
JacobBarthelmeh
3ee31dca6b
Merge pull request #6464 from douzzer/20230602-analyzer-guided-fixes
...
20230602-analyzer-guided-fixes
2023-06-02 11:31:26 -06:00
Lealem Amedie
eaf27b1945
Read and assign err return val from _sp_mulmod_tmp
2023-06-02 10:09:12 -06:00
Daniel Pouzzner
291be53524
tests/api.c: fixes for clang-diagnostic-embedded-directive (also warned by gcc), clang-analyzer-core.UndefinedBinaryOperatorResult, and clang-analyzer-deadcode.DeadStores.
2023-06-02 11:06:16 -05:00
JacobBarthelmeh
bb78e1c7d8
Merge pull request #6462 from douzzer/20230601-fix-fips-XASM_LINK
...
20230601-fix-fips-XASM_LINK
2023-06-01 14:00:01 -06:00
JacobBarthelmeh
35e59a3569
Merge pull request #6456 from SparkiDev/tests_api_expect_2
...
Test api.c: change more tests to use Expect instead of Assert
2023-06-01 10:29:52 -06:00
Daniel Pouzzner
a435302415
wolfssl/wolfcrypt/types.h: conditionalize XASM_LINK() definition on !FIPS_VERSION_LT(5,3) and !WOLFSSL_NO_ASM.
2023-06-01 11:12:27 -05:00
Chris Conlon
806c75d28b
Merge pull request #6450 from miyazakh/fix_jenkins_android
...
fix to cast diff type, int and uint
2023-06-01 08:33:02 -06:00
Sean Parkinson
7259351a3f
Test api.c: change more tests to use Expect instead of Assert
...
Added a new version of 'nofail' handshaking that doesn't use threads.
More tests can be run in single threaded.
Changed tests over to use test_wolfSSL_client_server_nofail() or
test_wolfSSL_client_server_nofail_memio() to simplfy test cases.
Changed tests to use Expect.
CRL:
BufferLoadCRL wasn't freeing allocated data when currentEntry
couldn't be allocated.
ssl.c:
DecodeToX509(): Needs to call FreeDecodedCert even if
ParseCertRelative fails.
wolfSSL_PEM_read_PUBKEY(): Need to check result of
wolfSSL_d2i_PUBKEY is NULL rather than the passed in WOLFSSL_EVP_PKEY.
X509:
wolfSSL_X509_set_ext(): Must free allocated WOLFSSL_X509_EXTENSION
if not pushed on to stack regardless of stack being NULL.
wolfSSL_X509V3_EXT_i2d(): Don't free asn1str on error as it is the
data passed in.
wolfSSL_i2d_X509_NAME_canon(): free names and cano_data when call to
wolfSSL_ASN1_STRING_canon() fails.
PKCS7:
wc_PKCS7_InitWithCert(): Check memory allocation of cert for NULL.
2023-06-01 14:22:00 +10:00
Sean Parkinson
b62e0b7ceb
Fix type conversion warnings by gcc
2023-06-01 14:21:41 +10:00
Sean Parkinson
5ffee2dbe1
Merge pull request #6459 from douzzer/20230531-analyzer-guided-fixes
...
20230531-analyzer-guided-fixes
2023-06-01 10:55:48 +10:00
Daniel Pouzzner
c45efd79af
api.c: fix 3 missed EXPECT_RESULT() == WOLFSSL_SUCCESSes to use the succincter EXPECT_SUCCESS().
2023-05-31 18:26:27 -05:00
JacobBarthelmeh
42a5d0320b
Merge pull request #6445 from jpbland1/dsa_ex
...
add ex functions to use other digest algorithms with DSA
2023-05-31 14:50:05 -06:00
Daniel Pouzzner
59a7c0d7e4
move definitions of XASM_LINK() from wolfcrypt/src/aes.c, wolfcrypt/src/asm.c, and wolfcrypt/src/cpuid.c, to wolfssl/wolfcrypt/types.h, and use __asm__() instead of asm() if __GNUC__, for compatibility with -std=c99.
2023-05-31 15:48:52 -05:00
Daniel Pouzzner
64c9026c77
wolfssl/wolfcrypt/types.h: add PRAGMA_DIAG_PUSH, PRAGMA(), and PRAGMA_DIAG_POP(), using the gcc or clang variants as applicable, to facilitate pragmas to be used on both gcc and clang;
...
tests/unit.h: fix ExpectPtr() to inhibit pedantic warnings on both gcc and clang;
wolfssl/test.h: in myVerify(), explicitly check for nullness when printing issuer/subject, to avoid cppcheck null-deref warning;
tests/api.c: fixes for:
* myriad "embedding a directive within macro arguments is not portable"
* an "ISO C forbids conversion of object pointer to function pointer type"
* some "stringop-overflow"s
* a clang-analyzer-core.uninitialized.Assign
* a clang-analyzer-core.CallAndMessage "2nd function call argument is an uninitialized value"
* a nullPointerRedundantCheck
* several clang-diagnostic-declaration-after-statement
* a spurious gcc sanitizer maybe-uninitialized in test_wolfSSL_CheckOCSPResponse()
2023-05-31 15:19:15 -05:00
Daniel Pouzzner
109a17f3bd
wolfcrypt/src/memory.c: restore required linuxkm #define WOLFSSL_NEED_LINUX_CURRENT
2023-05-31 15:17:01 -05:00
JacobBarthelmeh
80311975ce
Merge pull request #6452 from anhu/no_rsa_sigalgs
...
For NO_RSA, don't advertise support for RSA.
2023-05-31 13:41:56 -06:00
Lealem Amedie
88c3d9a529
More improvements for GCC-ARM FIPS build
2023-05-31 11:23:50 -06:00
Lealem Amedie
c2e03689c0
Improve GCC-ARM user-settings.h FIPS configurability
2023-05-31 09:53:51 -06:00
Hideki Miyazaki
554e6472b5
addressed review comments
2023-05-31 06:54:14 +09:00
JacobBarthelmeh
5604033902
Merge pull request #6453 from kaleb-himes/OE52_OE54_CHECKIN
...
Checkin STARCORE project OE52_OE54_ACVP effort
2023-05-30 14:43:25 -06:00
JacobBarthelmeh
ca2ca4f739
Merge pull request #6454 from philljj/spelling_cleanup
...
Used codespell and fixed obvious typos in src and wolfssl.
2023-05-30 14:42:04 -06:00
Chris Conlon
769c488d18
Merge pull request #6444 from night1rider/wolfssl-Onboarding
...
added test case for wolfSSL_configure_args
2023-05-30 13:03:05 -06:00
jordan
1bdd1cb157
Used codespell and fixed obvious typos in src and wolfssl.
2023-05-30 11:36:43 -05:00
kaleb-himes
f51d4c4c30
Checkin STARCORE project OE52_OE54_ACVP effort
2023-05-30 10:36:01 -06:00
Anthony Hu
ea6155c924
For NO_RSA, don't advertise support for RSA.
2023-05-30 12:34:23 -04:00
JacobBarthelmeh
dbca65f028
Merge pull request #6447 from SparkiDev/tests_api_expect
...
Tests api.c: rework for malloc failure testing
2023-05-30 09:19:54 -06:00
Hideki Miyazaki
63a5fe3229
fix to cast diff type, int and uint
2023-05-30 17:32:42 +09:00
Sean Parkinson
541ea51ad5
Tests api.c: rework for malloc failure testing
...
Modified number of tests to not crash on failure and cleanup allocations
on failure.
Added memory fail count option to set which memory allocation to start
failing on.
Fix issues found from testing.
bio.c:
BIO_new() move ref count up so that calls to wolfSSL_BIO_free()
work.
internal.c:
ImportCipherSpecState wasn't checking SetKeySide for failure. Crash
when pointer is NULL and accessed directly.
ocsp.c:
wolfSSL_OCSP_response_get1_basic() doesn't need to free vs->source
as it is freed in WOLFSSL_OCSP_RESPONSE_free().
ssl.c:
ProcessBuffer() Don't strip PKCS#8 header if failed to create DER.
Crasged as directly accessing 'der' which was NULL.
ssl_asn.c:
wolfssl_asn1_integer_require_len was checking wrong variable to see
if allocation failed.
x509,c:
wolfSSL_X509_ALGOR_set0 needs to set aobj only when no failure
possible.
wolfSSL_X509_chain_up_ref needs to call cleanup to ensure everything
is freed.
2023-05-30 12:01:21 +10:00
Sean Parkinson
37c03e3f11
Merge pull request #6442 from embedded-specialties/int-sequence
...
ASN.1 Integer sequence
2023-05-30 09:37:55 +10:00
David Garske
4f8419c641
Merge pull request #6441 from SparkiDev/cryptocb_pkcs11_rsa_get_size
...
CryptoCb, PKCS#11: add RSA key size lookup
2023-05-29 16:09:33 -07:00
Joe Hamman
d340587035
Added valid ASN.1 integer value to test_asn1
2023-05-28 21:18:45 -04:00
Joe Hamman
8fb4e7813b
Added braces to support older compilers
2023-05-28 18:59:16 -04:00
dell5060
c0116d6026
added test case for wolfSSL_configure_args and added fix
...
new fix
removing redundant () in code
2023-05-26 16:45:13 -06:00
JacobBarthelmeh
5a49b8c436
Merge pull request #6449 from anhu/syn_err
...
Fix a syntax error.
2023-05-26 15:55:36 -06:00
Anthony Hu
87bbcbb96a
Fix a syntax error.
...
Tested with:
./configure --enable-debug --enable-all CFLAGS=-DDEBUG_WOLFSSL_VERBOSE
2023-05-26 16:12:14 -04:00
JacobBarthelmeh
569a498015
Merge pull request #6443 from SparkiDev/wolfssl_x509_name_entry_leak_2
...
X509 NAME Entry: fix get object to not leak
2023-05-25 16:15:12 -06:00
John Bland
566fa1179f
add ex functions to use other digest algorithms
2023-05-25 12:50:23 -04:00
JacobBarthelmeh
a05f4f4dd9
Merge pull request #6432 from SparkiDev/wolfssl_x509_name_entry_leak
...
X509 NAME ENTRY create: ensure existing object is not lost
2023-05-25 09:28:45 -06:00
JacobBarthelmeh
6b2fe61d95
Merge pull request #6439 from lealem47/asio_cmake
...
CMake: add option to enable asio
2023-05-25 09:26:06 -06:00
Sean Parkinson
cff8e8e6f7
X509 NAME Entry: fix get object to not leak
...
wolfSSL_X509_NAME_ENTRY_get_object
- object field was being reused if it existed but lost on error
- store object only on success, ie object is not NULL
- moved function into x509.c
2023-05-25 09:26:22 +10:00
David Garske
e3be76b238
Merge pull request #6435 from SparkiDev/sp_int_count_bits_cleanup
...
SP int: cleanup sp_count_bits
2023-05-24 15:11:12 -07:00
Joe Hamman
2c59bec72c
Fixed typo in comment
2023-05-24 17:37:51 -04:00
Joe Hamman
8bd3850e58
Added ASN.1 Integer sequencing
2023-05-24 17:28:53 -04:00
Lealem Amedie
98522fa39d
Only clear last ASN_PEM_NO_HEADER error
2023-05-24 14:17:46 -06:00
JacobBarthelmeh
1218cfb7f2
Merge pull request #6087 from rizlik/embed_recv_from_fix_peer
...
dtls: improve different peer recvfrom and better error reporting on ipv6
2023-05-24 13:54:40 -06:00
Lealem Amedie
34c12789c9
CMake: add option to enable asio
2023-05-24 12:46:11 -06:00
JacobBarthelmeh
188a99bd5a
Merge pull request #6438 from anhu/ext_cache
...
Without HAVE_EXT_CACHE session dup is not compiled in
2023-05-24 11:15:00 -06:00
Anthony Hu
87a7af05dd
Without HAVE_EXT_CACHE session dup is not compiled in
2023-05-24 12:14:02 -04:00
Sean Parkinson
e954110cc5
CryptoCb, PKCS#11: add RSA key size lookup
...
wc_RsaEncryptSize(): assumed a key size of 2048 when using hardware key.
Added callback to do lookup and implemented for PKCS#11.
If lookup not supported then assumes 2048 bits.
2023-05-24 11:42:52 +10:00
Lealem Amedie
5613109fae
Miscellaneous fixes for sanitizer
2023-05-23 13:51:46 -06:00
David Garske
9d01411857
Merge pull request #6433 from SparkiDev/memusage_7
...
Memory usage: reduce stack usage
2023-05-22 16:35:04 -07:00
Sean Parkinson
622375b47e
SP int: clenaup sp_count_bits
...
More explicitly handle used == 0 for static code analyser.
Make sp_count_bits clearer.
2023-05-23 09:20:22 +10:00
TakayukiMatsuo
c2c97c2b57
Fix typos in Japanese help.
2023-05-23 07:11:53 +09:00
David Garske
5a59807733
Merge pull request #6431 from douzzer/20230521-wolfsentry-mt-usage-fixes
...
20230521-wolfsentry-mt-usage-fixes
2023-05-22 10:05:52 -07:00
Marco Oliverio
5182fe3f7d
wolfio: cleaning: use WOLFSSL_IP6 define instead of AF_INET6
2023-05-22 15:33:06 +00:00
Marco Oliverio
f21c34b08d
tests: EmbedRecvFrom/EmbedSendTo error if ipv6 w/o ipv6 compiled in
2023-05-22 15:33:06 +00:00
Marco Oliverio
640f9cf967
wolfio: EmbedRecvFrom: check ipv6 peer on non-ipv6 version
2023-05-22 15:33:05 +00:00
Marco Oliverio
b4542ed270
tests: add dtls ignoring different peer test
2023-05-22 15:32:57 +00:00
Marco Oliverio
73f502e189
wolfio: dtls: retry instead of returning WANT_READ on different peer
...
If EmbedReceiveFrom() returns WANT_READ, a blocking socket will not know how to
deal with the error. Retry the recvfrom instead adjusting the timeout.
2023-05-22 15:31:58 +00:00
Marco Oliverio
5f293bf736
tests: add test_wolfssl_client_server_no_fail(_ex) to set client cb
2023-05-22 15:31:58 +00:00
Marco Oliverio
cff580b4f0
tests: api: error out on read error in test_server_nofail
2023-05-22 15:31:58 +00:00
Sean Parkinson
98a717e1d5
Memory usage: reduce stack usage
...
AES C impl: don't align to 32 bytes, align to 16 as buffer is 16 bytes
long.
SP int: Don't call _sp_mulmod but call sp_mul and _sp_div to do mod
operation. For RSA, fewer calls for mod operation means less stack used
at deepest point.
2023-05-22 16:57:07 +10:00
Sean Parkinson
403acadf1a
X509 NAME ENTRY create: ensure existing object is not lost
...
wolfSSL_X509_NAME_ENTRY_create_by_txt and
wolfSSL_X509_NAME_ENTRY_create_by_NID:
- object field was being reused if it existed but lost on error
- extracted common code
- store object only on success, ie object is not NULL
2023-05-22 10:52:51 +10:00
Sean Parkinson
d8e4c78960
Merge pull request #6426 from jpbland1/invariant-mp-size
...
add check to sp_invmod_mont_ct to make sure the
2023-05-22 08:14:39 +10:00
Daniel Pouzzner
3e14b34bdc
wolfssl/test.h: in wolfsentry_setup(), add lock-unlock wrap before wolfsentry_route_get_main_table() (enforced by wolfSentry 1.3+, and was always required for thread safety).
2023-05-21 10:51:24 -05:00
Eric Blankenhorn
3e95ad9549
Allow wolfSSL_RAND_Init to pass if already initialized
2023-05-19 17:08:44 -05:00
JacobBarthelmeh
a06bd777c0
Merge pull request #6423 from cconlon/pkcs7NoStream
...
Fix PKCS#7 build with NO_PKCS7_STREAM
2023-05-19 10:32:49 -06:00
JacobBarthelmeh
235dc95b27
Merge pull request #6420 from julek-wolfssl/atomic-use-macro
...
Implement atomic operations interface
2023-05-19 10:29:04 -06:00
David Garske
8b9e13865a
Merge pull request #6383 from philljj/zd16072
...
Fix session ticket leak in wolfSSL_Cleanup
2023-05-19 09:14:07 -07:00
JacobBarthelmeh
8f4524efa0
Merge pull request #6298 from rizlik/dtls13-null-cipher
...
dtls13: support Authentication and Integrity-Only Cipher Suites
2023-05-19 10:13:44 -06:00
David Garske
10b6105505
Merge pull request #6424 from SparkiDev/coverity_2
...
Coverity scan fixes
2023-05-19 09:13:26 -07:00
John Bland
7e3aafb60c
Fix for FIPS ECC integrity check with crypto callback set ( #6425 )
...
Skip ECC private key check when the TPM is used to generate the key, since it doesn't release the private part. this option needs to be used with a FIPS approved TPM for the end result to be FIPS approved
2023-05-19 09:12:44 -07:00
John Bland
344c3338a9
add check to sp_invmod_mont_ct to make sure the
...
result integer can hold the range of the modulus
2023-05-19 10:49:42 -04:00
András Fekete
f3b66a3e26
Merge pull request #6427 from SparkiDev/scan-build_fixes_1
...
scan-build fixes
2023-05-19 10:46:00 -04:00
Marco Oliverio
35185e1a59
tests: add dtls13 null cipher test
2023-05-19 08:10:26 +00:00
Sean Parkinson
45503972f8
scan-build fixes
...
sp_mulmod
- scan-build getting confused with size of result
- don't check result size as checked already
- split out implementation of sp_mulmod from check
StoreEccKey
- ensure pubKey is not NULL even though all uses will not be
GetCertKey
- ensure source is not NULL
- cert->source may be NULL in incorrect usages of APIs
2023-05-19 12:17:41 +10:00
Sean Parkinson
2c34210efb
Coverity scan fixes
...
DecodeRsaPssParams() assumed params is never NULL. Should never be
called with NULL but check saves a NULL dereference.
PrintObjectIdText() didn't check return of call to GetObjectId. 'oid'
will retain -1 value on error and work as normal on error return.
Cleaner to check for ASN_PARSE_E and handle - other error,
ASN_UNKNOWN_OID_E, is OK for printing.
2023-05-19 09:15:16 +10:00
Chris Conlon
6ef580ca59
fix PKCS#7 build when using NO_PKCS7_STREAM
2023-05-18 14:50:03 -06:00
JacobBarthelmeh
a595f10549
Merge pull request #6421 from ejohnstown/bp-conf-desc-fix
...
Configure Typo
2023-05-18 14:07:58 -06:00
John Safranek
f9dcab956e
Configure Typo
...
1. The description text for the brainpool enable option in configure was
using a shell variable that ended up in the output. Switched to the
description pattern used in other options.
2023-05-18 10:51:04 -07:00
Juliusz Sosinowicz
466636214f
Add MSVC atomics
2023-05-18 12:06:54 +02:00
Marco Oliverio
31ed2a2bbb
dtls13: support Authentication and Integrity-Only Cipher Suites
...
See RFC 9150. To enable the feature use HAVE_NULL_CIPHER compilation flag.
2023-05-18 10:03:03 +00:00
Sean Parkinson
5f1ce09dce
Merge pull request #6412 from JacobBarthelmeh/tls13
...
add tls extension sanity check
2023-05-18 09:33:49 +10:00
David Garske
0530ee774f
Merge pull request #6418 from douzzer/20230517-linuxkm-benchmarks
...
20230517-linuxkm-benchmarks
2023-05-17 15:00:49 -07:00
oltolm
90b858492f
CMake: improve build scripts ( #6331 )
...
* make wolfssl compile with Mingw-w64
* cmake: CMAKE_SYSTEM_PROCESSOR is AMD64 on Windows
* cmake: use target_compile_definitions instead of add_definitions
* cmake: change default value of WOLFSSL_BUILD_OUT_OF_TREE_DEFAULT to ON
* cmake: link crypt32.lib on Windows
* cmake: export wolfssl
* move Config.cmake.in to cmake directory
* revert changes to .gitignore
* add Config.cmake.in to include.am
2023-05-17 15:26:46 -06:00
jordan
9d05a4f2ed
Don't orphan ticBuff pointer in wolfSSL_DupSessionEx
2023-05-17 16:25:27 -04:00
JacobBarthelmeh
2bb3ade4ac
Merge pull request #6416 from embhorn/gh6413
...
Fix valgrind issue with memcpy
2023-05-17 13:46:49 -06:00
JacobBarthelmeh
a5106ecda0
Merge pull request #6417 from kareem-wolfssl/docUpdates
...
Update AES and Chacha documentation.
2023-05-17 13:43:15 -06:00
Daniel Pouzzner
fffff657de
cleanups: line length, WOLFSSL_SMALL_STACK_STATIC, and SAVE_VECTOR_REGISTERS() failure trap in benchmark.c, proper path to benchmark.c in linuxkm/module_hooks.c, and proper casting in aes.c. also harmonized semantics and prototype of bench_ripemd().
2023-05-17 13:00:46 -05:00
Juliusz Sosinowicz
dd9edfee24
Implement atomic operations interface
2023-05-17 16:33:11 +02:00
Daniel Pouzzner
37b716192b
wolfcrypt/benchmark/benchmark.c: fix typo in bench_stats_start().
2023-05-17 02:27:04 -05:00
Daniel Pouzzner
4f4842fce6
linuxkm/linuxkm_memory.c: refactor SAVE/RESTORE_VECTOR_REGISTERS() to be per-process rather than per-CPU, and add migrate_disable/enable() to kernel_fpu_begin/end() because preempt_disable() is just a barrier on _PREEMPT_VOLUNTARY kernels;
...
linuxkm/linuxkm_wc_port.h: activate SAVE/RESTORE_VECTOR_REGISTERS() whenever defined(WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS) for benchmark.c support, independent of vector crypto features;
fix and optimize various alignment issues with stack and heap allocations;
fix macro definitions for XMALLOC/XREALLOC/XFREE to correctly use kvmalloc and friends when defined(HAVE_KVMALLOC), and to use wolfSSL_Malloc() and friends when defined(WOLFSSL_TRACK_MEMORY);
purge stale LINUXKM_SIMD_IRQ code.
2023-05-17 01:44:36 -05:00
Daniel Pouzzner
fc589d664e
wolfssl/wolfcrypt/mem_track.h: refactor for linuxkm compatibility, mainly by supporting NO_STDIO_FILESYSTEM.
2023-05-17 01:13:36 -05:00
Daniel Pouzzner
cc1ec8ace5
wolfssl/wolfcrypt/types.h: add missing do-while-0 nonstatments to WC_FREE_VAR() and WC_FREE_ARRAY() for pedantic semicolon swallowing.
2023-05-17 01:11:01 -05:00
Daniel Pouzzner
a18dc7f10a
wolfcrypt/src/aes.c: in wc_AesSetKeyLocal(), add an alignment check in the haveAESNI path for WOLFSSL_LINUXKM, because the failure mode is module crash.
2023-05-17 01:07:47 -05:00
Daniel Pouzzner
40b598289f
src/ssl_asn1.c: in wolfssl_asn1_time_to_tm(), initialize localTm with memset, not the zero initializer, for C++ compatibility.
2023-05-17 01:06:17 -05:00
Daniel Pouzzner
85e0bf337b
fix for benign sign clash in wc_RNG_GenerateBlock().
2023-05-17 01:05:33 -05:00
Daniel Pouzzner
5aceae1d1c
src/internal.c: fix for typo (identicalInnerCondition) in DoClientHello().
2023-05-17 01:05:14 -05:00
Daniel Pouzzner
3ad7e39dc4
refactor benchmark.c for linux kernel compatibility -- WOLFSSL_SMALL_STACK and WOLFSSL_NO_FLOAT_FMT codepaths, SAVE/RESTORE_VECTOR_REGISTERS, refactor of several stack array initializations that broke in the kernel, and replacement of an fputs() call with printf().
2023-05-17 01:04:40 -05:00
Daniel Pouzzner
42cce9d8e5
add --enable-linuxkm-benchmarks; add check for async.{c,h} when --enable-asynccrypt; update failure message for the opensslextra AC_CHECK_HEADER() test.
2023-05-17 01:03:26 -05:00
Kareem
6cb2c84f12
Update AES documentation to clarify block size requirement. Fix parameter ordering in wc_ChaCha20Poly1305_Decrypt documentation.
2023-05-16 14:31:51 -07:00
Eric Blankenhorn
0a5a5a65a2
Fix valgrind issue with memcpy
2023-05-16 14:38:51 -05:00
JacobBarthelmeh
5194a296e0
Merge pull request #6414 from embhorn/zd16166
...
Documentation for wolfSSL_CertManagerFreeCRL
2023-05-16 10:08:51 -06:00
JacobBarthelmeh
53ef26bf3a
Merge pull request #6392 from rizlik/dtls13-fix-ch-epoch
...
DTLS v1.3: fix epoch 0 check on plaintext message
2023-05-16 10:07:14 -06:00
JacobBarthelmeh
ae37fee134
Merge pull request #6411 from lealem47/6397
...
Fixes for wolfcrypt test without ECC SECP
2023-05-16 09:59:55 -06:00
Eric Blankenhorn
494febb3fb
Documentation for wolfSSL_CertManagerFreeCRL
2023-05-16 09:44:00 -05:00
JacobBarthelmeh
00f1eddee4
add tls extension sanity check
2023-05-15 15:49:44 -07:00
Lealem Amedie
1c3fa38821
Fix for conflicting types for HAL timer
2023-05-15 14:12:53 -06:00
Lealem Amedie
3f795f2f47
Fixes for wolfcrypt test without ECC SECP
2023-05-15 14:12:24 -06:00
David Garske
c2a7397425
Merge pull request #6406 from JacobBarthelmeh/fuzzing
...
check for socket errors on SendAlert
2023-05-15 09:16:20 -07:00
JacobBarthelmeh
c17cff7265
Merge pull request #6403 from kareem-wolfssl/gh6387
...
Fix wolfssl_asn1_time_to_tm setting unexpected fields in tm struct.
2023-05-12 16:37:17 -06:00
Chris Conlon
a474179cdf
Merge pull request #6301 from miyazakh/ra_cryptonly
...
Add Renesas SCE RSA Crypt Only support
2023-05-12 16:32:15 -06:00
Kareem
f1ad37919d
Add test case for ASN1_TIME_to_tm fix.
2023-05-12 14:30:55 -07:00
JacobBarthelmeh
1b6ab01d0b
Merge pull request #6407 from dgarske/stm32_cleanup
...
Remove STM AES always true check
2023-05-12 13:54:24 -06:00
JacobBarthelmeh
9cca571c1d
Merge pull request #6399 from bigbrett/zd16083-ocsp-double-free
...
fix double free in InitOCSPRequest
2023-05-12 13:50:54 -06:00
David Garske
bebf4f6e8b
Merge pull request #6405 from julek-wolfssl/zephyr-misc
...
Small fixes to build wolfSSL on zephyr without warnings
2023-05-12 12:33:01 -07:00
lealem47
79a5c49e47
Skip Async_DevCtxInit when using init rsa/ecc label/id api's ( #6393 )
...
* Skip Async_DevCtxInit when using init rsa/ecc label/id api's
---------
Co-authored-by: Lealem Amedie <lealem47@github.com >
2023-05-12 11:54:03 -07:00
JacobBarthelmeh
ea40176bee
check for socket errors on SendAlert
2023-05-12 09:52:01 -07:00
JacobBarthelmeh
56cd8c3dc1
Merge pull request #6401 from anhu/doc_ptr_fix
...
Doc Fix: TI no longer maintains the documentation; we do.
2023-05-12 09:20:37 -06:00
Juliusz Sosinowicz
62db14e676
Small fixes to build wolfSSL without warnings
2023-05-12 13:24:21 +02:00
David Garske
a68b0d8ecf
Merge pull request #6402 from lealem47/no_ecc_secp
...
Don't test SECP vectors when disabled in test.c
2023-05-11 17:25:42 -07:00
Kareem
6930179b8e
Fix wolfssl_asn1_time_to_tm setting unexpected fields in tm struct.
2023-05-11 15:15:46 -07:00
Lealem Amedie
9a2dc120c4
Don't test SECP vectors when disabled in test.c
2023-05-11 14:21:39 -06:00
Anthony Hu
ced8198737
Doc Fix: TI no longer maintains the documentation; we do.
2023-05-11 15:23:35 -04:00
Brett Nicholas
46dce4b33f
set pointer to null after freeing in InitOcspRequest() to prevent a subsequent double-free in FreeOcspRequest()
2023-05-11 12:59:25 -06:00
David Garske
dbb5ee3b1e
Merge pull request #6389 from JacobBarthelmeh/devid
...
always call crypto cb when compiled in
2023-05-11 11:48:30 -07:00
David Garske
6a48539309
Merge pull request #6398 from douzzer/20230511-analyzer-carps
...
20230511-analyzer-carps
2023-05-11 11:47:23 -07:00
David Garske
dfbd61cad9
Remove always true check.
2023-05-11 11:38:12 -07:00
Daniel Pouzzner
3c06638115
wolfcrypt/src/aes.c: fixes for bugprone-macro-parentheses;
...
wolfcrypt/src/ecc.c: fix for nullPointerRedundantCheck ("possible null pointer dereference").
2023-05-11 11:51:27 -05:00
JacobBarthelmeh
07c41c5498
add macro guard on test case
2023-05-10 15:51:39 -07:00
JacobBarthelmeh
bab35c4de2
add WOLF_CRYPTO_CB_FIND macro to guard find device ID callback
2023-05-10 15:28:19 -07:00
David Garske
870f7cc95b
Merge pull request #6394 from douzzer/20230509-THIS_MODULE-mem-and-more-Wconversion
...
20230509-THIS_MODULE-mem-and-more-Wconversion
2023-05-10 10:19:25 -07:00
JacobBarthelmeh
04e831fa63
Merge pull request #6309 from SparkiDev/aes_cache_touch_lines
...
AES: touch each cache line when getting offset from table
2023-05-10 09:56:27 -06:00
JacobBarthelmeh
c953716367
Merge pull request #6391 from rizlik/dtls13-label-fix
...
dtls13: fix: use correct label to derive resumption key
2023-05-10 08:06:27 -06:00
JacobBarthelmeh
c26a5f7514
Merge pull request #6390 from lealem47/no_asn_time
...
Fix for compiling with NO_ASN_TIME + doc fix
2023-05-10 08:02:45 -06:00
Marco Oliverio
5773252e33
test: add check that CH with epoch != 0 are ignored
2023-05-10 13:54:25 +00:00
Marco Oliverio
6c8811a737
dtls13: fix: check plaintext record header epoch is 0
...
In DTLS v1.3 the normal (plaintext) record header can be used only with
unprotected message (epoch == 0). Protected messages use the unified header.
Check this invariant using `IsAtLeastTLSv1_3` instead of `ssl->options.tls1_3`
because the latter is false before version negotiation.
In DTLSv1.2 the DTLS normal header is used for all the epoch, this check doesn't
interfere because:
1. the first CH's epoch must be zero in all DTLS versions
2. In case of downgrade after version negotiation `IsAtLeastTLSv1_3` is false
2023-05-10 13:54:25 +00:00
Hideki Miyazaki
a2776ad35e
addressed review comments
2023-05-10 13:55:34 +09:00
Daniel Pouzzner
f2c97d5d35
fixes for various wolfcrypt -Wconversions visible only on compilers that promote byte and word16 to signed int, then warn of a sign conflict when an intrinsically safe result is assigned back to the original type.
2023-05-09 23:55:08 -05:00
Daniel Pouzzner
ec9beaab41
linuxkm: add coverage for Linux 6.4+ module memory layout refactor; also, refactor WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS to make it settable independent of WOLFSSL_AESNI etc.
2023-05-09 23:53:49 -05:00
Sean Parkinson
158c0362e7
Merge pull request #6372 from rizlik/send_alert_fix
...
tls13: correctly propagatae SendAlert err message
2023-05-10 10:25:15 +10:00
Lealem Amedie
03f5ce03ff
Remove inaccurate STM32 documentation
2023-05-09 13:28:20 -06:00
Lealem Amedie
86064f9a04
Fix for compiling with NO_ASN_TIME
2023-05-09 13:26:19 -06:00
JacobBarthelmeh
71ca447b6b
resolve CB_ONLY cases
2023-05-09 09:08:32 -07:00
Marco Oliverio
e9303a5e77
dtls13: fix: use dtls label to derive ExportKey/Resumption secrets
2023-05-09 10:04:29 +00:00
JacobBarthelmeh
cdeba4e1b0
Merge pull request #6364 from anhu/compat_unknown_oid
...
Allow for unknown OIDs in extensions in wolfSSL_X509_set_ext()
2023-05-08 14:51:35 -06:00
JacobBarthelmeh
11512c7e89
Merge pull request #6388 from philljj/zd16114
...
Fix memory leak in TLSX_KeyShare_Setup
2023-05-08 14:47:00 -06:00
JacobBarthelmeh
03a566791e
fix for recursive issue in test case
2023-05-08 12:51:22 -07:00
Anthony Hu
730db6a841
Address Jacob's comment
2023-05-08 14:47:22 -04:00
JacobBarthelmeh
71cbc019d7
always call crypto cb when compiled in
2023-05-08 09:49:50 -07:00
jordan
8c792b836c
Fix memory leak in TLSX_KeyShare_Setup
2023-05-08 10:46:33 -05:00
David Garske
62a4329f8e
Merge pull request #6379 from SparkiDev/sp_int_gcd_fix
...
SP int; fix sp_gcd error checking
2023-05-07 12:11:29 -07:00
jordan
979b92deb8
Fix session ticket leak in wolfSSL_Cleanup
2023-05-04 22:21:55 -05:00
Daniel Pouzzner
ae844b4a0f
Merge pull request #6378 from SparkiDev/minor_fixes_2
...
Minor fixes
2023-05-04 20:20:33 -05:00
Sean Parkinson
d342e341d8
SP int; fix sp_gcd error checking
...
r can be as large as the smaller of a and b.
Fix sign check.
Add comments as to what GCD does.
2023-05-05 09:11:47 +10:00
Sean Parkinson
55a91c2b55
Minor fixes
...
configure.ac: Don't use == in test.
client.c: Merge string to one line.
asn.c/asn_public.h:
fix conversion warnings/errors.
wc_Asn1_Print no longer public and doesn't need to check for NULL.
wc_Asn1_PrintAll check all pointer parameters for NULL.
2023-05-05 08:43:50 +10:00
David Garske
c3e4da9f66
Merge pull request #6376 from lealem47/freeRTOS_thread
...
Define WOLFSSL_THREAD for FREERTOS case
2023-05-04 14:53:24 -07:00
Lealem Amedie
0af4e8d10a
Define WOLFSSL_THREAD for FREERTOS case
2023-05-04 14:26:12 -06:00
David Garske
6e572cc91d
Merge pull request #6352 from SparkiDev/asn1_print
...
ASN.1 print utility: asn1
2023-05-04 10:55:47 -07:00
Marco Oliverio
75390937bc
tls13: correctly propagatae SendAlert err message
2023-05-04 16:30:50 +00:00
David Garske
4cdf32e497
Merge pull request #6333 from SparkiDev/memusage_6
...
Memory usage improvements
2023-05-04 09:14:24 -07:00
gojimmypi
82e502d8a2
WOLFSSL_SP_INT_NEGATIVE declaration for all Espressif chipsets ( #6374 )
...
* WOLFSSL_SP_INT_NEGATIVE declaration for all Espressif chipsets
* correct naming for WOLFSSL_SHA384 on ESP32-C3
2023-05-04 08:04:25 -07:00
Sean Parkinson
9b404fcc5b
AES touch cache lines
...
Change implementation to get from each line of a table once for each 4
variables.
Only enable WOLFSSL_AES_TOUCH_LINES, by default, when RISC-V.
2023-05-04 16:34:42 +10:00
Sean Parkinson
d2afe9e5e0
Memory usage improvements
...
ECC: make private key field 'k' able to be smaller when ALT_ECC_SIZE is
defined.
WOLFSSL_SMALL_STACK_CACHE: allocate temps using new macros.
2023-05-04 10:26:57 +10:00
Sean Parkinson
9cdee20a7d
ASN.1 print: implementation to parse and print added
...
New API to parse and print DER/BER data from a buffer.
Add an example to parse DER, Base64 and PEM files and print out ASN.1 items.
2023-05-04 09:57:44 +10:00
John Bland
6369b1e9ec
Merge pull request #6371 from dgarske/lowres
...
Fixes and improvements for building with low footprint
2023-05-03 19:33:53 -04:00
David Garske
714ec82e91
Merge pull request #6369 from rizlik/dh-async-fix
...
async fixes: dh and tests
2023-05-03 07:50:23 -07:00
JacobBarthelmeh
f05543c9e5
Merge pull request #6370 from SparkiDev/sp_int_copy_change
...
SP int: _sp_copy don't check a == b, change calls to _sp_copy
2023-05-03 08:30:55 -06:00
David Garske
4b90afa37b
Provide way to disable ASN but have wc_RsaPublicKeyDecodeRaw, which doesn't need ASN.1 parsing.
2023-05-02 18:10:25 -07:00
David Garske
61dfbf5ef2
Fixes and improvements for building with low footprint. Fix for ASN template with RSA verify only (was missing mp_leading_bit). Fix to allow disabling DRBG with crypto callbacks enabled. Updated the wolfTPM user_settings.h template with low resource option.
2023-05-02 16:51:41 -07:00
Sean Parkinson
1a8f09d013
Merge pull request #6320 from JacobBarthelmeh/curl
...
smaller sized build with curl
2023-05-03 07:46:29 +10:00
Sean Parkinson
c3a8476b95
SP int: _sp_copy don't check a == b, change calls to _sp_copy
...
Simplify code to make it easier for software analysers.
Reduce work done by using _sp_copy instead of sp_copy where possible.
2023-05-03 07:44:28 +10:00
JacobBarthelmeh
11a77f7078
Merge pull request #6363 from dgarske/threadlocal
...
Add option to support disabling thread local storage
2023-05-02 15:12:13 -06:00
JacobBarthelmeh
58b996353b
Merge pull request #6266 from dgarske/zd15938_async_ecc
...
Fix for async ECC shared secret state
2023-05-02 12:01:31 -06:00
Anthony Hu
0ebe5819d0
Allow for unknown OIDs in extensions in wolfSSL_X509_set_ext()
...
...and add some testing to show we properly inserted the extensions.
2023-05-02 12:43:14 -04:00
Marco Oliverio
a5a2316aa4
async: fix overwrite of keylen params between calls
...
The `kse->pubKeyLen` parameter is used as an input parameter to `DhGenKeyPair`
to provide the size of the `pubKey` buffer (the same size as the prime p). After
that, `kse->pubKeyLen` is used to check that the public key generated is of the
same length as the prime p. If this is not the case, the public key is
padded. If the key generation is asynchronous, then `TLSX_KeyShare_GenDhKey` may
be invoked twice. The second time, the `kse->pubKeyLen` value, updated
asynchronously by the async code, is overwritten with the prime size at the
beginning of the function. When this happens, a wrong public key value is used,
and the shared secret computed is incorrect.
Similar reasoning can be applied to `kse->keyLen`
2023-05-02 16:34:15 +00:00
Marco Oliverio
3e4b95eb4b
test: fix test AEAD limit server set fds as nonblock
2023-05-02 16:34:01 +00:00
JacobBarthelmeh
bdd45350c5
Merge pull request #6361 from bandi13/minorContainerUpdates
...
Minor container updates
2023-05-01 17:05:36 -06:00
David Garske
ceeda82906
Add option to support disabling thread local --disable-threadlocal. Useful for cross-compile situation where thread local storage is not desired. ZD 16062
2023-05-01 15:51:22 -07:00
JacobBarthelmeh
06d5897233
Merge pull request #6362 from dgarske/stm32_hash
...
Improved fix for STM32 hashing on U5
2023-05-01 16:30:57 -06:00
David Garske
72ffa743a0
Fix for async ECC shared secret. ZD 15938
2023-05-01 15:30:03 -07:00
JacobBarthelmeh
ef955c620f
refactor evp.c to group all MD digest functions togther
2023-05-01 13:23:48 -07:00
David Garske
7576380635
Improved fix for STM32 hashing on U5
2023-05-01 13:13:00 -07:00
JacobBarthelmeh
c84abaf5b6
Merge pull request #6357 from kareem-wolfssl/gh6348
...
Fix wc_PeekErrorNodeLineData not unlocking error queue on error.
2023-05-01 13:59:35 -06:00
JacobBarthelmeh
45c8796f7c
Merge pull request #6355 from bandi13/minorBugfix
...
Should only move the index by the amount we wrote
2023-05-01 13:56:22 -06:00
Andras Fekete
931f665a9a
Missing 'tcpdump' utility
2023-05-01 15:30:12 -04:00
Andras Fekete
00fa00f875
Changes to make it possible to use a different base container
2023-05-01 15:28:39 -04:00
JacobBarthelmeh
73b3f9c01a
Merge pull request #6356 from lealem47/init_values
...
Fix uninitialized variable compiler warning
2023-05-01 09:18:48 -06:00
Kareem
f6cdcfcf9f
Fix wc_PeekErrorNodeLineData not unlocking error queue on error.
2023-04-28 16:35:49 -07:00
Lealem Amedie
99b4ee50ba
Fix uninitialized variable compiler warning
2023-04-28 13:58:29 -06:00
Andras Fekete
1522155892
Should only move the index by the amount we wrote
2023-04-28 14:08:15 -04:00
David Garske
52a20fc2b5
Merge pull request #6328 from julek-wolfssl/zd/16000
...
Allow cert callback to override skipAddCA
2023-04-28 10:25:13 -07:00
Juliusz Sosinowicz
13f4e178e5
Zephyr misc fixes for TLS ( #6353 )
...
* zephyr wolfssl_tls_sock: fix project name
* zephyr tls_sock.c: don't include options.h when using user settings
* zephyr: define XSTAT_TYPE for use with XSTAT
2023-04-28 10:00:24 -07:00
JacobBarthelmeh
6b2aca1418
Merge pull request #6347 from SparkiDev/sp_int_armv6_clz
...
SP int ARMv6: clz not available, correct #if
2023-04-28 09:43:58 -06:00
Juliusz Sosinowicz
36ac816cd1
Merge pull request #6342 from TakayukiMatsuo/unittest
2023-04-28 10:06:04 +02:00
Sean Parkinson
f8559b745e
Merge pull request #6351 from douzzer/20230427-linuxkm-simd-fixes
...
20230427-linuxkm-simd-fixes
2023-04-28 11:20:20 +10:00
Sean Parkinson
e4bf1a7c0b
Merge pull request #6350 from kareem-wolfssl/zd15670
...
Fix PowerPC inline assembly on old GNU toolchain.
2023-04-28 11:19:42 +10:00
Daniel Pouzzner
448f1ec9e7
linuxkm: in {save,restore}_vector_registers_x86(), check if vector register file has already been saved and invalidated, and if so, inhibit the kernel_fpu_{begin,end}() wrap and instead just use preempt_{disable,enable}() wraps.
2023-04-27 17:48:32 -05:00
Daniel Pouzzner
8a89303b49
wolfcrypt/test/test.c: add TEST_FAIL() macro (counterpart to incumbent TEST_PASS()), by default same as incumbent functionality, but #ifdef TEST_ALWAYS_RUN_TO_END, print errors as they occur but continue to end.
2023-04-27 17:46:56 -05:00
Daniel Pouzzner
3f60fa8c3b
configure.ac: escape backslashes when generating preprocessor directives for .build_params; delete backslashes and process parenthesized arguments correctly when generating options.h.
2023-04-27 17:38:29 -05:00
Hideki Miyazaki
dcd1428b7d
Merge pull request #6304 from TakayukiMatsuo/jpupdate
...
Update Japanese comments
2023-04-28 07:06:38 +09:00
Kareem
1172354664
Fix PowerPC inline assembly on old GNU as. It does not like an empty clobbered register line, so simply omit the line.
2023-04-27 14:54:51 -07:00
JacobBarthelmeh
7b52913451
Merge pull request #6345 from kareem-wolfssl/zd16035
...
Fix getting key size in stm32_ecc_sign_hash_ex.
2023-04-27 13:32:47 -06:00
JacobBarthelmeh
bbad64649b
Merge pull request #6340 from SparkiDev/minor_fixes_1
...
Minor fixes
2023-04-27 10:02:06 -06:00
TakayukiMatsuo
59472312a5
Fix example code in wolfSSL_get_chain_X509
2023-04-27 17:51:10 +09:00
Juliusz Sosinowicz
bf2c66a1cb
Allow cert callback to override skipAddCA
2023-04-27 10:07:04 +02:00
TakayukiMatsuo
4c47934562
Fix issues in test_wolfSSL_dtls_fragments
2023-04-27 17:00:29 +09:00
Sean Parkinson
d901433999
SP int ARMv6: clz not available, correct #if
...
Checking for architecture less than 7 to use clz instruction when clz is
only guaranteed to be available in 7 or more. Reverse logic.
2023-04-27 09:41:31 +10:00
JacobBarthelmeh
ca4a17ebf6
Merge pull request #6339 from SparkiDev/asn_orig_ocsp_fix
...
ASN original, OCSP: fix maximum size calc to GetDateInfo
2023-04-26 16:36:55 -06:00
Kareem
e7e2713bba
Fix getting key size in stm32_ecc_sign_hash_ex.
2023-04-26 15:00:59 -07:00
JacobBarthelmeh
ccb9bdd903
set dev ID with signature check ( #6318 )
...
* set dev ID with signature check
* refactor devId use and add API to set devId in WOLFSSL_CERT_MANAGER structure
* add api.c call to set devid with WOLFSSL_CERT_MANAGER
* resolving devID CRL issue and CM pointer
* add device find callback
* add simple test case
2023-04-26 11:19:00 -07:00
David Garske
3556b7adb7
Merge pull request #6338 from JacobBarthelmeh/certs
...
revert WOLFSSL_NO_ASN_STRICT macro guard
2023-04-26 11:16:04 -07:00
David Garske
b42d3566ab
Merge pull request #6336 from lealem47/useAfterFree
...
Remove XMEMSET after XFREE in sniffer.c
2023-04-26 10:50:00 -07:00
JacobBarthelmeh
32c6a66a4e
Merge pull request #6341 from douzzer/20230425-analyzer-coddling
...
20230425-analyzer-coddling
2023-04-26 11:22:23 -06:00
Chris Conlon
4526df6d78
Merge pull request #6199 from JacobBarthelmeh/PKCS7
...
add messageDigest attribute if adding any custom signed attributes
2023-04-26 09:23:22 -06:00
TakayukiMatsuo
ead8d9784b
Update Japanese comments
2023-04-26 18:20:51 +09:00
Daniel Pouzzner
5538d65a79
wolfcrypt/src/asn.c: add to DecodeCertInternal() a workaround for an apparent clang-tidy bug, gated on WOLFSSL_CLANG_TIDY, and add a missing cast to mollify -Wconversion;
...
wolfssl/wolfcrypt/sp_int.h: refactor MP_INT_SIZEOF() using sizeof(sp_int_minimal) and addition, rather than sizeof(sp_int) and subtraction, for clarity and analyzer mollification.
2023-04-26 00:05:37 -05:00
Sean Parkinson
5b0c017a94
ASN original, OCSP: fix maximum size calc to GetDateInfo
...
GetDateInfo called with a local index (reset to 0) but size is of
original buffer. Subtract the index into original buffer from size to
get size available for parsing.
2023-04-26 11:18:29 +10:00
Sean Parkinson
a5a4c71121
Minor fixes
...
EncryptContent() - id not initialized
sp_int.c: cast count to int to ensure same type comparison with i.
2023-04-26 11:05:07 +10:00
Sean Parkinson
c4233e7aec
Merge pull request #6288 from JacobBarthelmeh/Testing
...
avoid callback buffer overwrite with sha512_224 and remove min from w…
2023-04-26 08:36:20 +10:00
Sean Parkinson
7fb9540176
Merge pull request #6337 from JacobBarthelmeh/fuzzing
...
add sanity check on PKCS7 index value
2023-04-26 08:33:25 +10:00
JacobBarthelmeh
5c97dfbb4c
Merge pull request #6334 from SparkiDev/openssl_ec_set_priv_key_check
...
OpenSSL EC API: fix setting private key
2023-04-25 16:32:53 -06:00
Sean Parkinson
2641c493b3
Merge pull request #6335 from JacobBarthelmeh/RT1170
...
add guard for random with CAAM + MQX
2023-04-26 08:32:20 +10:00
JacobBarthelmeh
71f71074f8
revert WOLFSSL_NO_ASN_STRICT macro guard
2023-04-25 13:32:19 -07:00
Jacob Barthelmeh
bbe9c694a6
more specific naming for attribute types
2023-04-25 13:56:29 -06:00
JacobBarthelmeh
d701a0a06e
add sanity check on PKCS7 index value
2023-04-25 08:30:33 -07:00
Lealem Amedie
84ea15039f
Remove XMEMSET after XFREE in sniffer.c
2023-04-25 09:16:39 -06:00
JacobBarthelmeh
57de292d19
add guard for random with CAAM + MQX
2023-04-24 16:29:22 -07:00
JacobBarthelmeh
3e5c8af571
Merge pull request #6322 from lealem47/remove_shellscript
...
Fix for CMake with USER_SETTINGS on Windows
2023-04-24 17:01:57 -06:00
JacobBarthelmeh
a991ce1a6b
Merge pull request #6327 from SparkiDev/memusage_5
...
Memory usage improvements
2023-04-24 16:42:56 -06:00
lealem47
a10526d5f9
Async sniffer: don't retry if seeing non-pending error ( #6220 )
...
* Async sniffer: don't retry if seeing non-pending error
* Print error messages when decrypting from queue
* Zeroize the SessionTable in ssl_FreeSniffer()
---------
Co-authored-by: Lealem Amedie <lealem47@github.com >
2023-04-24 13:51:55 -07:00
David Garske
9b7ca65608
Merge pull request #6330 from douzzer/20230421-configure-fixes
...
20230421-configure-fixes
2023-04-24 09:35:48 -07:00
JacobBarthelmeh
e1d1bef085
Merge pull request #6321 from SparkiDev/sp_int_missing_brace
...
SP int: missing brace
2023-04-24 10:00:39 -06:00
JacobBarthelmeh
cfeb8b9aee
Merge pull request #6332 from SparkiDev/bn_to_asn1_fix
...
BN_to_ASN1_INTEGER: fix handling of padding
2023-04-24 09:58:12 -06:00
Sean Parkinson
673d72a2dc
OpenSSL EC API: fix setting private key
...
wolfSSL_EC_KEY_set_private_key() should fail on obvious bad private key
values.
2023-04-24 17:59:32 +10:00
Sean Parkinson
2d06718857
Memory usage improvements
...
TLS 1.3 Server: don't cache the messages for Ed25519/Ed448 when doing
TLS 1.3.
ASN DecodeCertInternal: Call GetCertName for issuer and subject after
freeing the dataASN.
2023-04-24 11:12:00 +10:00
Sean Parkinson
6634ec198e
BN_to_ASN1_INTEGER: fix handling of padding
...
Incorrect calculation of when padding byte needed and consequently
adding byte manually when properly handled by SetASNInt().
2023-04-24 09:30:38 +10:00
Sean Parkinson
865581704e
Merge pull request #6312 from philljj/zd15961
...
Fix out-of-bounds write in fp_mod_2d.
2023-04-24 08:03:02 +10:00
Daniel Pouzzner
800f4df7a3
fix typos in configure.ac (from shellcheck --severity=warning).
2023-04-21 16:05:43 -05:00
Daniel Pouzzner
32ff165d8b
remove buggy+bug-prone WOLFSSL_NO_XOR_OPS setup in settings.h.
2023-04-21 16:05:20 -05:00
JacobBarthelmeh
60d059fc9e
Merge pull request #6305 from SparkiDev/sp_radix_size_stack_fix
...
SP int: sp_radix_size when radix 10 fix temp size
2023-04-21 09:59:56 -06:00
JacobBarthelmeh
e194c90b3e
Merge pull request #6326 from SparkiDev/ecc_key_max_bits_fix
...
ECC: max bits for a key must handle order as well
2023-04-21 09:47:42 -06:00
JacobBarthelmeh
12cec5ec61
Merge pull request #6325 from SparkiDev/memusage_fix_4
...
Memory Usage fixes
2023-04-21 09:37:11 -06:00
tmael
1106e5ff0e
TLS v1.3: Support a stateful ticket and test HAVE_EXT_CACHE ( #5960 )
...
* Add TLSv1.3 stateful support
Fix internal and external session cache
* session cache fixes
* Refactor
- implement wolfSSL_CTX_flush_sessions
- use wolfSSL_CTX_flush_sessions to make test_wolfSSL_CTX_add_session_ext deterministic
- add dtls to test_wolfSSL_CTX_add_session_ext
- DoClientTicket_ex does not modify ssl object
- only call session remove callback on:
- timeout
- session is being overwritten/removed from the cache
* Session fixes
- restore bogus ID on session duplicate
- don't evict on overwrite
- use memmove instead on memcpy as `ssl->session == session` is possible
- ignore ClientSession parameter in AddSessionToCache on NO_SESSION_CACHE_REF
- use sessionID when altSessionID not present
* Session fixes
- DoClientTicketFinalize: always copy in the ID as teh altSessionID
- don't overwrite ex_data when overwriting cacheSession and cacheSession owns it
* Callback wants to retain a copy
* wolfSSL_GetSessionClient: ssl->ctx->get_sess_cb does not apply here
* test_wolfSSL_CTX_add_session_ext
gate expected results on WOLFSSL_DTLS_NO_HVR_ON_RESUME
* TlsSessionIdIsValid: copy return can't be ignored
* Silence unused parameter
* test_wolfSSL_CTX_add_session_ext: handle async case
* Gate wolfSSL_SSL_CTX_remove_session on NO_SESSION_CACHE
* ssl.c: style fixes
* Add twcase_get_sessionCb_cleanup to free external cache
* Remove hard tab
* Correct build error in wolfSSL_CTX_flush_sessions
* Jenkins fixes:
- altSessionID only available with WOLFSSL_TICKET_HAVE_ID
- slim out psk_sess_free_cb_ctx
* Stateful dtls case has 2 accesses. Stateless just one.
* Add version numbering to hostap logs
* Import internal.h for test_wolfSSL_SESSION_get_ex_new_index
* wolfSSL_SetSession: don't check SslSessionCacheOff for session setting
* wolfSSL_SetSession: fully set expired session for OpenSSL compatibility
* wolfSSL_SetSession: check if setting same object
* AddSession: always populate the session object to allow re-use
* Add logging to wolfSSL_NewSession and wolfSSL_FreeSession
* Always setup session object
* Check if session has been setup before setting it
* Print errors in async test
* Make SetupSession available outside NO_SESSION_CACHE
* Review comments
* Fix ticBuf leak and TlsSessionIdIsValid logic
* Fix unmatched curly brackets
* TlsSessionIdIsValid: always need to check copy var
* TlsResumptionIsValid: set resume to FALSE default
* wolfSSL_SetSession: remove now variable since only used in one place
* Move internalCacheLookupOff into HAVE_EXT_CACHE block
---------
Co-authored-by: Juliusz Sosinowicz <juliusz@wolfssl.com >
2023-04-21 06:46:08 -07:00
Sean Parkinson
9230d9cfe3
Merge pull request #6185 from lealem47/time_check
...
Adding NO_ASN_TIME_CHECK build option
2023-04-21 11:55:52 +10:00
Sean Parkinson
0cc50521b6
ECC: max bits for a key must handle order as well
...
The order may be 1 bit larger than prime for some curves.
Handle this in calculation of maximum size of curve.
SP int _sp_mont_red(): ensure m->used is never 0 when doing default
implementaion.
2023-04-21 11:23:47 +10:00
Sean Parkinson
d414ae9492
Memory Usage fixes
...
Ed25519CheckPubKey/Ed448CheckPubKey: get the public key from certificate
in a new function, wc_CertGetPubKey, that uses less memory.
Set the ENCRYPT_BASE_BITS to minimal values when Curve448/Curve25519 are
the largest public key algorithms.
2023-04-21 09:59:38 +10:00
Sean Parkinson
0bae919a9c
SP int: ensure declaration of sp_ints are with valid values
...
Move declaration of sp_ints until after checks of valid parameters.
In particular, whether used field of input/s are valid.
Pull implementations of algorithms out into separate functions as a
pattern to fix.
2023-04-21 08:48:38 +10:00
Sean Parkinson
8994aab0ed
SP int: sp_radix_size when radix 10 fix temp size
...
SP int should be able to calculate size of encoded number for a radix of
10 when mp_int has all digits used.
sp_radix_size declared a temporary mp_int of 1 greater than input. Don't
need it 1 greater. Stack declaration of maximum plus one caused address
sanitizer error.
Changed temporary mp_int to be same size as input mp_int.
2023-04-21 08:46:46 +10:00
Lealem Amedie
42be04f323
Remove duplicate line
2023-04-20 16:45:53 -06:00
Lealem Amedie
a963adc33d
Add more comments for alternatives and security risk
2023-04-20 14:36:22 -06:00
Lealem Amedie
b0c6a3ec75
Adding NO_ASN_TIME_CHECK build option
2023-04-20 14:16:00 -06:00
JacobBarthelmeh
d099fe34b5
Merge pull request #6324 from SparkiDev/sp_int_thumb_asm_r7
...
SP int: ARM Thumb ASM don't use r7 on debug
2023-04-20 10:51:19 -06:00
JacobBarthelmeh
ebff7f46b7
Merge pull request #6323 from SparkiDev/sp_c_to_bin_mp_fix
...
SP C: fix handling of oversized arrays
2023-04-20 09:24:06 -06:00
David Garske
c761f587f6
Merge pull request #6278 from julek-wolfssl/fix-zephyr
...
Zephyr port update
2023-04-20 06:48:02 -07:00
Hideki Miyazaki
4fd629d4e7
fix white spaces and overlong lines
2023-04-20 16:07:51 +09:00
Sean Parkinson
1d94521abe
SP int: ARM Thumb ASM don't use r7 on debug
...
When DEBUG is defined, use versions of assembly code that don't use
register r7.
2023-04-20 15:13:54 +10:00
Sean Parkinson
574d8c3f63
Merge pull request #6319 from douzzer/20230418-more-Wconversion-fixes
...
20230418-more-Wconversion-fixes
2023-04-20 13:19:07 +10:00
Sean Parkinson
32e2775d34
SP C: fix handling of oversized arrays
...
For mul and sqr implementation efficiency the fixed array has extra
digits beyond what is needed. When encoding, only put in the useful
digits.
2023-04-20 12:42:51 +10:00
Daniel Pouzzner
da9cda7eae
wolfcrypt/src/pkcs12.c: fix non-portable casts;
...
wolfcrypt/src/sp_int.c: use unsigned int, not word32, for sign variables, to match type in header file.
2023-04-19 21:22:34 -05:00
Lealem Amedie
fa914a0054
Let hashbang decide which shell to run with instead of default shell
2023-04-19 18:13:57 -06:00
Lealem Amedie
cc8b789545
Remove shellscript dependency from CMake with WOLFSSL_USER_SETTINGS
2023-04-19 17:20:33 -06:00
Sean Parkinson
4ec23571c6
SP int: missing brace
...
Missing a brace in sp_exptmod_ex().
2023-04-20 08:27:44 +10:00
Daniel Pouzzner
2a00b67056
revert change in wc_ShaFinal() capturing InitSha() retval, introduced in 510038022f, to (void)ed result.
2023-04-19 17:25:33 -05:00
JacobBarthelmeh
dc8f348bdf
smaller sized build with curl
2023-04-19 15:12:15 -07:00
Daniel Pouzzner
8f610bb156
fix for retval overwrite (warned by clang-analyzer-deadcode.DeadStores) in sha.c:wc_ShaFinal();
...
fix for benign clang-analyzer-deadcode.DeadStores in aes.c:wc_AesFeedbackEncrypt();
fix for cppcheck:selfAssignment in chacha.c:wc_Chacha_wordtobyte().
2023-04-19 15:53:48 -05:00
Daniel Pouzzner
f396989d20
more -Wconversion fixes, now covering everything inside the 140-3 boundary with default build options, everything in wolfcrypt with default build options, all modes of AES, builds with/without intelasm, all permutations of c89/c99 32/64 bit, and much of the crypto-all-cryptonly boundary;
...
also a gating fix for asn.c:SetShortInt().
2023-04-19 15:26:05 -05:00
JacobBarthelmeh
3865f943c3
Merge pull request #6203 from julek-wolfssl/xor-optim
...
Try to XOR as many words as possible in xorbuf APIs
2023-04-19 11:59:33 -06:00
JacobBarthelmeh
0e64972c86
Merge pull request #6316 from SparkiDev/memusage_fix_3
...
ASN.1 template: CheckCertSignature memory usage fix
2023-04-19 10:37:11 -06:00
JacobBarthelmeh
0186fb7114
Merge pull request #6313 from anhu/empty_stack
...
Should not be an error to call wolfSSL_X509_REQ_add_extensions with...
2023-04-19 10:32:06 -06:00
Juliusz Sosinowicz
c9d91c5e79
Zephyr port update
...
- Add CONFIG_PTHREAD_IPC when using threads
- Add logging config suggestions
- test.c: fix undefined `ret` error
- Increase stack size for samples
- Ignore ASN_BEFORE_DATE_E in examples
- wc_port.h: add missing posix thread includes
- wc_port.h: move definitions to relevant section
- benchmark.c: fix missing `arc` and `argv` errors
- benchmark.c: fflush does not work on stdout in Zephyr
- Update z_fs_open implementation to support flags
2023-04-19 18:18:00 +02:00
Juliusz Sosinowicz
81c9062973
sakke.c: use xorbuf
2023-04-19 17:06:25 +02:00
Juliusz Sosinowicz
bed99401a0
hpke.c: use xorbufout in wc_HpkeContextComputeNonce
2023-04-19 17:06:25 +02:00
Juliusz Sosinowicz
3c57228197
aes.c: Use xorbufout when possible
2023-04-19 17:06:25 +02:00
Juliusz Sosinowicz
6079b92e26
xorbuf: fix alignment when possible
2023-04-19 17:06:25 +02:00
Juliusz Sosinowicz
82e8eb2f70
rsa.c: Use xorbuf when possible
2023-04-19 17:06:25 +02:00
Juliusz Sosinowicz
e7ae64d9b5
pkcs12.c: Ignore param when heap not used
2023-04-19 17:05:03 +02:00
Juliusz Sosinowicz
7a0d6487b7
Simplify ctMaskCopy
2023-04-19 17:05:03 +02:00
Juliusz Sosinowicz
b91f3063ea
Use xorbuf in 3des for FREESCALE_MMCAU
2023-04-19 17:05:03 +02:00
Juliusz Sosinowicz
aeb4338085
Use xorbufout in chacha
2023-04-19 17:05:03 +02:00
Juliusz Sosinowicz
8fe321d5be
Try to XOR as many words as possible in xorbuf APIs
2023-04-19 17:05:03 +02:00
Chris Conlon
81ab16b105
Merge pull request #6314 from TakayukiMatsuo/vla2
2023-04-19 08:11:40 -06:00
gojimmypi
510038022f
Various Espressif HW crypto, SHA2, AES, MP updates. ( #6287 )
...
* various Espressif HW crypto, SHA2, AES, MP updates.
* code review updates & cleanup
* clean trailing whitespace
* cleanup per code review
* removed additional unused WOLFSSL_USE_ESP32C3_CRYPT_HASH_HW
* Code review updates; pack & order WC_ESP32SHA
* clean up TAG text for Espressif ESP_LOG()
2023-04-19 06:10:22 -07:00
Sean Parkinson
436c647acc
Memory Usage: reduce maximum in use
...
CheckCertSignature
Free the dataASN before calling ConfirmSignature.
dataASN not needed at this point and ConfirmSignature uses lots of
memory.
DecodeCertInternal:
Free the dataASN before calling DecodeCertExtensions,
dataASN not needed at this point and DecodeCertExtensions uses more
memory.
ecc_verify_hash:
v doesn't need to be a new allocated variable - reuse w.
v is the modular reduction of x-ordinate to prime calculated at end.
2023-04-19 16:44:34 +10:00
David Garske
70322f620d
Merge pull request #6303 from douzzer/20230414-yet-more-c89
...
20230414-yet-more-c89
2023-04-18 16:00:12 -07:00
David Garske
3a2bcf080b
Merge pull request #6276 from anhu/zephyr_stm32
...
Add in instructions for compiling with zephyr on STM32.
2023-04-18 14:50:53 -07:00
David Garske
243665fe37
Merge pull request #6315 from anhu/stm32_gpdma
...
Instructions for GPDMA configuration
2023-04-18 14:50:25 -07:00
JacobBarthelmeh
c67de7f914
Merge pull request #6308 from SparkiDev/sp_mod_err_check
...
SP int: sp_mod check sp_div error before adding and replacing error
2023-04-18 15:44:50 -06:00
JacobBarthelmeh
8b79248eab
Merge pull request #6307 from SparkiDev/decode_ecdsa_sig_inited
...
ECC, ASN.1: DecodeECC_DSA_Sig didn't handle r and s being initialized
2023-04-18 15:43:42 -06:00
JacobBarthelmeh
a525fa19f4
Merge pull request #6306 from SparkiDev/wc_ecc_is_point_check_args
...
ECC: wc_ecc_is_point - validate parameters
2023-04-18 15:37:22 -06:00
Anthony Hu
d59724a0f3
Instructions for GPDMA configuration
2023-04-18 16:52:57 -04:00
Anthony Hu
b3b26dd266
Add in instructions for compiling with zephyr on STM32.
2023-04-18 16:19:32 -04:00
Daniel Pouzzner
fe3099b08e
wolfssl/wolfcrypt/settings.h: add #ifdef _MSC_VER clause to define ssize_t, #ifndef HAVE_SSIZE_T.
2023-04-18 14:43:41 -05:00
TakayukiMatsuo
cc747f0094
Add WOLFSSL_SP_NO_DYN_STACK macro to avoid compilation error in CC-RX compiler
2023-04-19 04:39:49 +09:00
Daniel Pouzzner
f1a674eec9
wolfcrypt/src/wc_port.c: in wc_FileLoad(), use ssize_t for fileSz, not long int, for portability.
2023-04-18 14:30:38 -05:00
Daniel Pouzzner
b87c2fc621
fix null pointer deref (found by cppcheck:nullPointerRedundantCheck) in src/x509.c:wolfSSL_X509_EXTENSION_create_by_OBJ().
2023-04-18 14:29:13 -05:00
Daniel Pouzzner
4180a650c8
fix clang-analyzer-deadcode.DeadStores in wolfcrypt/src/asn.c:SetOthername().
2023-04-18 14:27:52 -05:00
Daniel Pouzzner
a4aef0e55d
refinements from peer review for #6303 .
2023-04-18 12:23:24 -05:00
Daniel Pouzzner
193919a276
add wc_strcasecmp() and wc_strncasecmp() to wc_port.c, and set up (USE_WOLF_STR[N]CASECMP) in types.h for targets lacking native implementations (including WOLF_C89);
...
define USE_WOLF_STRSEP if defined(WOLF_C89).
2023-04-18 12:23:24 -05:00
Daniel Pouzzner
4b9302cdb3
another batch of -Wconversion fixes.
2023-04-18 12:23:24 -05:00
Daniel Pouzzner
42bea705d9
fix several more C89 "comma at end of enumerator list" spots in 64-bit-only headers, missed in earlier passes; in tests/unit.h, add a WOLF_C89 definition of AssertPtr() without pragmas, to avoid a -Wdeclaration-after-statement.
2023-04-18 12:23:24 -05:00
Daniel Pouzzner
730890b8cc
wolfssl/wolfcrypt/sp_int.h: fix a missed bugprone-macro-parentheses in the C89 path.
2023-04-18 12:23:24 -05:00
Daniel Pouzzner
d91f0f82d8
wolfssl/wolfcrypt/misc.h: add missing argument names in NO_INLINE path.
2023-04-18 12:23:24 -05:00
Daniel Pouzzner
3d16ec8dc1
wolfssl/wolfcrypt/asn_public.h: fix version threshold for wc_RsaPrivateKeyValidate() prototype.
2023-04-18 12:23:24 -05:00
gojimmypi
98b718f91b
wolfcrypt polish: init, checks, corrections ( #6249 )
...
* wolfcrypt polish: init, checks, corrections
2023-04-18 09:41:42 -07:00
Anthony Hu
b0e90b6ffe
Should not be an error to call wolfSSL_X509_REQ_add_extensions with empty stack.
2023-04-18 12:27:54 -04:00
András Fekete
f7d7e4f30a
Merge pull request #6285 from gojimmypi/Espressif_VisualGDB
...
platform-specific VisualGDB test & benchmark projects
2023-04-18 11:52:29 -04:00
jordan
8254112c9b
Fix out-of-bounds write in fp_mod_2d.
2023-04-18 10:51:38 -05:00
JacobBarthelmeh
ca71907142
add function to control default pkcs7 signer attributes
2023-04-18 08:35:02 -07:00
Jacob Barthelmeh
ad13717644
add messageDigest attribute if adding any custom signed attributes
2023-04-18 08:35:02 -07:00
JacobBarthelmeh
ff13a7cdc8
Merge pull request #6250 from julek-wolfssl/fix-wolfSSL_DES_ede3_cbc_encrypt
...
Write next IV in wolfSSL_DES_ede3_cbc_encrypt
2023-04-18 09:33:10 -06:00
Sean Parkinson
a5c220d034
AES: touch each cache line when getting offset from table
2023-04-18 12:46:56 +10:00
Sean Parkinson
59c113d358
SP int: sp_mod check sp_div error before adding and replacing error
...
Fix to not overwrite error when sp_div fails in sp_mod.
2023-04-18 09:38:13 +10:00
Sean Parkinson
eddcf0c0ee
ECC, ASN.1: DecodeECC_DSA_Sig didn't handle r and s being initialized
...
New creation of mp_ints r and s to be minimal size must not be
re-initialized.
Changes to ASN.1 code to handle r and s being initialized and to not
initialize again.
2023-04-18 09:37:23 +10:00
Sean Parkinson
04ae676629
ECC: wc_ecc_is_point - validate parameters
...
Public API wc_ecc_is_point() needs to validate the parameters.
Ensure that the x and y are in range [0, p-1] and z is one (affine
ordinates).
Made the API a wrapper around existing calculation code.
When x-ordinate is a large negative, then it will spend large amounts of
time adding the prime to a large negative intermediate value.
2023-04-18 09:35:22 +10:00
JacobBarthelmeh
42b73ee326
Merge pull request #6277 from anhu/upnsid
...
Support UPN and SID.
2023-04-17 17:03:55 -06:00
Anthony Hu
120d1f0d1a
Support in the compatibility layer for UPN and SID.
2023-04-17 14:42:27 -04:00
David Garske
91a2c9f18e
Merge pull request #6310 from julek-wolfssl/hostap-certs-update-2023
...
hostap/hwsim: use a custom commit to update the expired certs
2023-04-17 11:36:59 -07:00
Juliusz Sosinowicz
aa47a38a9e
hostap/hwsim: use a custom commit to update the expired certs
...
- use 'theirs' merge strategy
2023-04-17 18:43:47 +02:00
David Garske
5938a40def
Merge pull request #6297 from JacobBarthelmeh/math
...
clean up NO_BIG_INT build, removing WOLFSSL_SP_MATH macro and heapmath compile
2023-04-17 07:44:20 -07:00
JacobBarthelmeh
ec78d1a4b8
Merge pull request #6293 from tim-weller-wolfssl/mynewt-updates
...
Update wolfCrypt porting layer for Mynewt OS to remove build warning.
2023-04-17 08:07:39 -06:00
Sean Parkinson
50e15dbb36
Merge pull request #6283 from cconlon/tls13resume12
...
In SendTls13ClientHello() only send Session ID for sessions being resumed (< TLS 1.3)
2023-04-17 12:21:11 +10:00
David Garske
6b12831dfb
Merge pull request #6302 from douzzer/20230413-more-wolfcrypt-c89
...
20230413-more-wolfcrypt-c89
2023-04-14 14:08:03 -07:00
Jacob Barthelmeh
cb9a121bd7
fix configure, compatibility layer needed big int. for BN use
2023-04-14 14:52:05 -06:00
Daniel Pouzzner
1bed740710
address peer review: make C89-compatible refactors in sakke_pairing() and sakke_modexp_loop(); add explanatory comment for WOLF_ENUM_DUMMY_LAST_ELEMENT() in types.h.
2023-04-14 15:07:05 -05:00
Eric Blankenhorn
39b81ce338
Merge pull request #6282 from dgarske/fix_heapmath
...
Fix for including integer.h when heap math is not used
2023-04-14 14:28:38 -05:00
Daniel Pouzzner
ac85cfa3d5
fix "comma at end of enumerator list" warnings in wolfcrypt for C89 compatibility, mostly by just snipping out unneeded comma, but several using WOLF_ENUM_DUMMY_LAST_ELEMENT() to preserve gated enum values as-is.
2023-04-14 13:48:03 -05:00
Daniel Pouzzner
2bcf6bd3ca
wolfssl/wolfcrypt/types.h: add WOLF_ENUM_DUMMY_LAST_ELEMENT() macro, and disable HAVE_ANONYMOUS_INLINE_AGGREGATES ifdef WOLF_C89.
2023-04-14 13:47:47 -05:00
Daniel Pouzzner
d5588af0a2
wolfcrypt/src/sakke.c: fixes for C89 "initializer element is not computable at load time".
2023-04-14 13:29:26 -05:00
Daniel Pouzzner
105714460c
wolfcrypt/src/fe_448.c: fix declaration-after-statement in fe448_mul_8().
2023-04-14 13:29:26 -05:00
Daniel Pouzzner
edf95dbcbd
add WOLF_C89 clauses to the W64LIT() definitions in wolfssl/wolfcrypt/types.h, and wrap several long long numeric literals with W64LIT() in wolfcrypt/src/{aes.c,blake2b.c,siphash.c};
...
add WOLF_C89 handling to SP_ULONG_BITS and SP_ULLONG_BITS setup in wolfssl/wolfcrypt/sp_int.h.
2023-04-14 13:29:26 -05:00
David Garske
bc3d070629
Merge pull request #6290 from embhorn/zd15969
...
Allow Micrium to use STM32_RNG
2023-04-14 10:59:50 -07:00
David Garske
deae28b9a3
Fix for building with heap math and including integer.h only. Fixes https://github.com/wolfSSL/wolfssl/issues/6280
...
```
./configure --enable-heapmath CFLAGS="-DWOLFSSL_PUBLIC_MP" && make && sudo make install
cd ../wolfssl-examples/ecc
make clean && make
```
2023-04-14 10:37:40 -07:00
JacobBarthelmeh
36a9b9944c
fix guard on ECC export
2023-04-13 16:12:08 -07:00
JacobBarthelmeh
00aa061d77
Merge pull request #6300 from douzzer/20230413-fixes
...
20230413-fixes
2023-04-13 15:41:51 -06:00
Hideki Miyazaki
35f6099d7c
Add SCE RSA Crypt Only feature
...
- RSA SSA 1024/2048 Sign/verify
- RSA ES 1024/2048 Enc/Dec
- Unit test for these RSA operation
2023-04-14 06:41:24 +09:00
JacobBarthelmeh
04ee247389
do not default to heapmath if no other math libraries found, add NO_BIG_INT as a math option in settings.h
2023-04-13 14:38:35 -07:00
David Garske
6040a6b5da
Merge pull request #6299 from JacobBarthelmeh/build
...
fix for wpas build with x509 small
2023-04-13 13:54:50 -07:00
Daniel Pouzzner
358af4ef05
fix for cppcheck/zerodivcond in wolfcrypt/src/pkcs7.c:wc_PKCS7_DecodeAuthEnvelopedData();
...
fixes for clang-tidy/bugprone-macro-parentheses in wolfssl/wolfcrypt/sp_int.{c,h} and wolfcrypt/src/ecc.c;
fix for clang-analyzer-deadcode.DeadStores in olfcrypt/src/asn.c.
2023-04-13 14:51:29 -05:00
David Garske
2307b36a65
Merge pull request #6296 from JacobBarthelmeh/RT1170
...
fix for creating options.h with cmake and WOLFSSL_USER_SETTINGS
2023-04-13 11:24:53 -07:00
JacobBarthelmeh
9a0934161d
fix for wpas build with x509 small
2023-04-13 10:38:12 -07:00
David Garske
419a1f0a01
Merge pull request #6294 from douzzer/20230412-WC_ASN_NAME_MAX-bump-for-MULTI_ATTRIB
...
20230412-WC_ASN_NAME_MAX-bump-for-MULTI_ATTRIB
2023-04-12 16:21:33 -07:00
JacobBarthelmeh
441b78e5a2
Merge pull request #6284 from douzzer/20230410-Wconversion-fixes
...
20230410-Wconversion-fixes
2023-04-12 17:07:24 -06:00
JacobBarthelmeh
d4b92cb65c
Merge pull request #6295 from dgarske/stm32_20230412
...
Fixes for STM32 U5/H5/H7 hash and PKA sign build error
2023-04-12 16:36:43 -06:00
JacobBarthelmeh
26a0142f51
add nomath option for builds without a math library
2023-04-12 15:33:59 -07:00
Daniel Pouzzner
c41030663e
wolfcrypt/src/pkcs7.c: correct fix for clang-analyzer-core.DivideZero in wc_PKCS7_DecodeAuthEnvelopedData().
2023-04-12 16:37:20 -05:00
David Garske
b7ff375ac6
Fix PKA build error with SP sign. Fix U5/H5/H7 hashing, which require a workaround to write an extra 32-bit to flush FIFO before save/restore.
2023-04-12 13:45:29 -07:00
David Garske
e1ca478356
Added STM32G0 benchmarks.
2023-04-12 13:45:28 -07:00
JacobBarthelmeh
2c26b068b2
Merge pull request #6239 from dgarske/stm32h5
...
Support for STM32H5
2023-04-12 14:33:25 -06:00
Daniel Pouzzner
97ffdfa9b8
wolfssl/wolfcrypt/asn.h: if defined(WOLFSSL_MULTI_ATTRIB), bump predefined WC_ASN_NAME_MAX, to fix rsa_certgen_test() with config --enable-testcert --enable-asn=original CPPFLAGS='-DWOLFSSL_CERT_GEN -DWOLFSSL_MULTI_ATTRIB'.
2023-04-12 13:48:03 -05:00
tim-weller-wolfssl
72fc023d38
Update wolfCrypt porting layer for Mynewt OS to provide declarations needed to remove build warning for time API used for XTIME
2023-04-12 12:30:42 -05:00
Daniel Pouzzner
4b59588cf3
more fixes for implicit casts, mostly asn=original.
2023-04-12 02:17:18 -05:00
Daniel Pouzzner
fe2acb53af
wolfcrypt/src/ecc.c:fix overstringent arg check in wc_ecc_gen_k().
2023-04-12 01:37:09 -05:00
Daniel Pouzzner
7155c5748e
fix overlong lines.
2023-04-12 01:37:09 -05:00
Daniel Pouzzner
99ffd7726f
wolfcrypt/src/pkcs7.c:wc_PKCS7_DecodeAuthEnvelopedData(): fix clang-analyzer-core.DivideZero (expBlockSz not properly set before use as a denominator in a mod op).
2023-04-12 01:37:09 -05:00
Daniel Pouzzner
bd8f97f315
Revert "Resolve issue with C89 compliance with "commas at the end of enumerator lists"."
...
This reverts commit 68acfd51dca1e0e11e2e7bd0e6ab956b8def6473.
2023-04-12 01:37:09 -05:00
Daniel Pouzzner
41818bf6f8
Revert "Fix enum KeyWrap_Sum impossible combinations (note: ugly code)."
...
This reverts commit 2bac48a290e5243337f661c70eb582e55ceb2c39.
2023-04-12 01:37:09 -05:00
Daniel Pouzzner
ed11669f3c
more fixes for implicit casts, including asn=template.
2023-04-12 01:37:09 -05:00
David Garske
ee50d95b0b
Fix enum KeyWrap_Sum impossible combinations (note: ugly code).
2023-04-12 01:37:09 -05:00
David Garske
72c6429276
Better fixes for pedantic to resolve (error: comparison of unsigned expression >= 0 is always true). Also overlong lines.
2023-04-12 01:37:09 -05:00
David Garske
f3eee4bc99
Resolve issue with C89 compliance with "commas at the end of enumerator lists".
...
Tested with `./configure --disable-asm --enable-32bit --enable-asn --enable-cryptonly CFLAGS="-Wall -ansi -pedantic-errors -Wshadow -g" && make`
2023-04-12 01:37:09 -05:00
David Garske
6418e3cbfe
Fixes for implicit casts.
...
Tested with `./configure --disable-asm --enable-32bit --enable-asn=original --enable-cryptonly CFLAGS="-Wconversion -pedantic" && make`. Some progress with ASN template, but not complete.
2023-04-12 01:37:09 -05:00
JacobBarthelmeh
1889549828
fix for creating options.h with cmake and WOLFSSL_USER_SETTINGS
2023-04-11 13:30:04 -07:00
Eric Blankenhorn
9465d32aea
Allow Micrium to use STM32_RNG
2023-04-11 15:12:58 -05:00
JacobBarthelmeh
edad8d1da8
avoid callback buffer overwrite with sha512_224 and remove min from wolfcaam_cmac
2023-04-11 09:06:39 -07:00
JacobBarthelmeh
6a89464176
Merge pull request #6231 from billphipps/15785-CorrectFreeDuringEarlyConnectFail
...
Track SetDigest usage to avoid invalid free under error conditions.
2023-04-11 09:49:51 -06:00
gojimmypi
9f257af989
platform-specific VisualGDB test & benchmark projects
2023-04-11 09:41:53 +02:00
Chris Conlon
18e0c28487
Only send session ID in resumed ClientHello from SendTls13ClientHello() if ssl->options.resuming
2023-04-10 15:43:31 -06:00
billphipps
0013be9027
15451 correct padding for pkcs7 ( #6260 )
...
* Update to ensure full blocks for crypto in En/DecodeAuthEnvelopedData.
* Corrected spacing and comments
* Set plain to NULL after free on non-error path.
2023-04-10 14:08:52 -07:00
David Garske
f2ae066797
Merge pull request #6281 from JacobBarthelmeh/ECC
...
- fix ECC performance regression
2023-04-10 14:08:43 -07:00
JacobBarthelmeh
8bb0b2ef3f
fix for ECC sign with nonblocking only
2023-04-10 12:53:40 -07:00
David Garske
6b862a1440
Merge pull request #6272 from gojimmypi/wolfcrypt-mpi-fix
...
mp_setneg(Z), not mpi
2023-04-10 11:58:04 -07:00
Bill Phipps
2430f2377f
Corrected spacing and comments
2023-04-10 17:15:22 +00:00
Jacob Barthelmeh
582d8a70f5
fix ECC performance regression
2023-04-09 00:08:01 -06:00
JacobBarthelmeh
12e285434b
Merge pull request #6275 from douzzer/20230406-XREWIND-fixes-contd
...
20230406-XREWIND-fixes-contd
2023-04-06 15:22:48 -06:00
Daniel Pouzzner
7c15131db5
wolfcrypt/src/asn.c: in wc_PemCertToDer_ex() and wc_PemPubKeyToDer_ex(), work around false positive -Wmaybe-uninitialized from scan-build.
2023-04-06 15:15:26 -05:00
JacobBarthelmeh
012f0e0779
Merge pull request #6262 from SparkiDev/mp_int_mem_usage
...
SP int: improve use of stack
2023-04-06 14:06:08 -06:00
Daniel Pouzzner
3468750bae
wolfcrypt/src/asn.c:
...
* refactor error-checking cascade in wc_PemCertToDer_ex() as in wc_PemPubKeyToDer_ex(),
* refactor staticBuffer gating/dynamics in wc_PemPubKeyToDer_ex() as in wc_PemCertToDer_ex(),
* and use IO_FAILED_E, not BUFFER_E, for I/O errors on the file handles, in both routines;
fix smallstack null pointer dereferences in src/pk.c:wolfSSL_RSA_GenAdd() and src/ssl.c:set_curves_list().
2023-04-06 14:31:53 -05:00
Chris Conlon
bd02b9c29c
Merge pull request #6254 from miyazakh/fix_favouriteDrink
2023-04-06 09:39:23 -06:00
Sean Parkinson
67624628c2
Merge pull request #6274 from douzzer/20230405-fixes
...
20230405-fixes
2023-04-06 14:27:37 +10:00
Daniel Pouzzner
dcc8b5d7d5
eliminate XREWIND() macro, add XSEEK_SET definitions, and refactor all XREWIND()s to XFSEEK()s, to fix clang-tidy-17 bugprone-unsafe-functions warning on rewind();
...
add BENCH_DEVID_COLUMN_HEADER in wolfcrypt/benchmark/benchmark.c:bench_stats_sym_finish() to resolve clang-diagnostic-embedded-directive.
2023-04-05 20:28:51 -05:00
Sean Parkinson
8065139050
SP int: improve use of stack
...
Minimize use of stack.
Make very large stack allocations dynamic memory allocations unless
WOLFSSL_SP_NO_MALLOC.
ProcessBufferTryDecode() split up into a function for each type.
ProcessBufferTryDecodeRsa() decodes the data and gets key size rather
than having or allocating an RsaKey.
Added wc_RsaPrivateKeyValidate() that only validates the encoding is an
RSA key and returns the key size in bytes.
For SP int, only create sp_ints of required size in RSA and ECC
implementation. For WOLFSSL_SMALL_STACK, memory is allocated to have
just enough bytes and size is set to maximum supported. Otherwise,
relies on dynamic stack variables.
For ECC, MAX_ECC_BITS_USE used when dynamic stack variables not
supported. Significantly reduces memory usage when RSA/DH is also built.
Add macros to sp_int.h, tfm.h and integer.h to support declaring,
allocating, initializing and freeing mp_ints.
For integer.h, mp_int is always static as size is no more than 32 bytes.
For tfm.h, WOLFSSL_SMALL_STACK has a full mp_int allocated, otherwise
the full mp_int is put on the stack.
For sp_int.h with new macros, dynamically allocate sp_int to minimal
size when WOLFSSL_SMALL_STACK, or when dynamic stack variables, declare
them to be of minimal size or otherwise declare with a fixed max.
Added mp_bitsused(), for all implementations, to get the number of bits
available based on used. Included for RSA to get the size of the
modulus.
SP int now always uses dynamic stack variables if possible rather than
for builds with WOLFSSL_SP_SMALL.
Moved code out into separate functions so that stack allocations don't
happen when not going down code path.
2023-04-06 10:04:39 +10:00
JacobBarthelmeh
8c0a20fc32
Merge pull request #6212 from embhorn/gh6211
...
RIOT-OS does support writev
2023-04-05 15:26:07 -06:00
JacobBarthelmeh
caf2749c8a
Merge pull request #6269 from julek-wolfssl/fix-test_wolfSSL_CTX_add_session
...
Fix intermittent failures in test_wolfSSL_CTX_add_session
2023-04-05 15:19:36 -06:00
JacobBarthelmeh
1bef3ec745
Merge pull request #6233 from embhorn/gh6209
...
Support HAVE_SESSION_TICKET without realloc
2023-04-05 15:17:58 -06:00
JacobBarthelmeh
3c90eb25c8
Merge pull request #6271 from anhu/XSTAT
...
Allow user to override XSTAT
2023-04-05 14:44:09 -06:00
JacobBarthelmeh
9c368d0a0e
Merge pull request #6273 from anhu/wolfSSL_get_chain_cert
...
Documentation fixup for wolfSSL_get_chain_cert();
2023-04-05 14:33:29 -06:00
billphipps
599cf9356f
Merge branch 'wolfSSL:master' into 15785-CorrectFreeDuringEarlyConnectFail
2023-04-05 15:24:30 -04:00
Anthony Hu
3e58e47856
Documentation fixup for wolfSSL_get_chain_cert();
2023-04-05 15:12:43 -04:00
Daniel Pouzzner
cf173e7b7d
Merge pull request #6270 from julek-wolfssl/fix-test_wolfSSL_dtls_stateless_HashWOLFSSL
...
Ignore staticBuffer in test_wolfSSL_dtls_stateless_HashWOLFSSL
2023-04-05 12:53:11 -05:00
Eric Blankenhorn
d9bf93b49f
Support HAVE_SESSION_TICKET without realloc
2023-04-05 11:33:06 -05:00
András Fekete
3b934b858e
Merge pull request #6268 from SparkiDev/asn1_test_0_len
...
ASN.1 testing: restore 0 length BIO failure tests
2023-04-05 11:14:50 -04:00
gojimmypi
bb32b6a927
mp_setneg(Z), not mpi
2023-04-05 17:10:37 +02:00
JacobBarthelmeh
6a52c727f6
Merge pull request #6267 from SparkiDev/openssl_cryptonly
...
OpenSSL API and cryptonly: fix to compile
2023-04-05 09:08:32 -06:00
Anthony Hu
c9e467b734
Allow user to override XSTAT
2023-04-05 10:39:16 -04:00
Juliusz Sosinowicz
171c217ae5
Add in-place support for DES_ede3_cbc_encrypt
2023-04-05 15:50:51 +02:00
Juliusz Sosinowicz
c5f03e43cf
Ignore staticBuffer in test_wolfSSL_dtls_stateless_HashWOLFSSL
2023-04-05 14:23:19 +02:00
Juliusz Sosinowicz
a51daf1bfa
Fix intermittent failures in test_wolfSSL_CTX_add_session
2023-04-05 13:57:10 +02:00
Sean Parkinson
9eac521521
ASN.1 testing: restore 0 length BIO failure tests
...
Create a fixed buffer BIO of length 1 and then write one byte into it so
that there is 0 length to write into.
Test cases removed as setting fixed buffer BIO to length 0 allocated 0
length buffer that is sometimes returning NULL.
2023-04-05 10:29:46 +10:00
Sean Parkinson
10c1009bbd
Merge pull request #6127 from JacobBarthelmeh/qnx
...
IMX6Q CAAM Port
2023-04-05 08:44:00 +10:00
Hideki Miyazaki
9eb3c4d31a
fix unitest failure
2023-04-05 07:25:25 +09:00
Sean Parkinson
b30c8b1fca
OpenSSL API and cryptonly: fix to compile
...
OBJ_nid2sn not available when compiling for cryptonly - don't compile in
call to it in test.h.
2023-04-05 08:02:20 +10:00
JacobBarthelmeh
b8e61a241b
Merge pull request #6257 from kareem-wolfssl/micriumFixes
...
Micrium settings fixes
2023-04-04 11:09:49 -06:00
JacobBarthelmeh
539c562ecd
Merge pull request #6263 from julek-wolfssl/fix-docs-wolfSSL_set_dtls_fd_connected
...
Add missing semicolon
2023-04-04 10:49:02 -06:00
JacobBarthelmeh
cb422bfaf7
Merge pull request #6242 from julek-wolfssl/harden-tls
...
Implement TLS recommendations from RFC 9325
2023-04-04 10:13:27 -06:00
Juliusz Sosinowicz
027c8ed926
Add missing semicolon
2023-04-04 16:59:28 +02:00
David Garske
a4a6a05f06
Merge pull request #6251 from PrinceOfPuppers/master
...
updated zephyr includes
2023-04-03 16:25:32 -07:00
JacobBarthelmeh
e4f75afe5f
update README
2023-04-03 16:41:09 -06:00
JacobBarthelmeh
f9f1347e8d
third optimization pass with aes-ctr
2023-04-03 16:41:09 -06:00
JacobBarthelmeh
14b0f422c8
optimization pass through 2
2023-04-03 16:41:08 -06:00
JacobBarthelmeh
5882b8f68a
cleanup user_settings example file
2023-04-03 16:41:08 -06:00
JacobBarthelmeh
30adcd58d8
IMX6Q CAAM Port
2023-04-03 16:41:08 -06:00
David Garske
b1e4d4922e
Merge pull request #6259 from SparkiDev/cppcheck_fixes_9
...
cppcheck fixes
2023-04-03 15:35:35 -07:00
David Garske
b6ab7a9d56
Merge pull request #6261 from douzzer/20230331-fixes
...
20230331-fixes
2023-04-03 14:56:16 -07:00
Daniel Pouzzner
c08878ac94
configure.ac: include both -I. and -I$srcdir for "circular dependency" test, so that ${build_pwd}/wolfssl/options.h is found in out-of-tree builds; streamline scripting that dynamically sets $TRIM;
...
linuxkm/module_exports.c.template: include wolfssl/wolfcrypt/wolfmath.h, to bring in wc_GetMathInfo() prototype;
src/ssl.c: move "Global pointer to constant BN on" to src/ssl_bn.c; and in wolfSSL_Cleanup(), call the new wolfSSL_BN_free_one() rather than using ad hoc cleanup logic;
src/ssl_bn.c: add bn_one and wolfSSL_BN_free_one();
src/ssl_asn1.c: fix bugprone-macro-parentheses in bufLenOrNull(); refactor wolfSSL_ASN1_TIME_diff() to avoid floating point math; use intermediate tm_year variable in wolfssl_asn1_time_to_tm() to avoid target-specific type conflicts on tm->tm_year; use "FALL_THROUGH", not "/* fall-through */", in wolfSSL_ASN1_TYPE_set (clang-diagnostic-implicit-fallthrough);
wolfcrypt/src/ecc.c: fix identicalInnerCondition in ecc_mul2add();
wolfcrypt/src/integer.c: refactor OPT_CAST()s in mp_grow() to unconditional casts as elsewhere, to mollify a confused cppcheck-all-intmath;
tests/api.c: reformat some overlong lines.
2023-04-03 15:49:39 -05:00
Juliusz Sosinowicz
505ab746c6
Tabs -> spaces
2023-04-03 18:24:01 +02:00
Sean Parkinson
8851065848
cppcheck fixes
...
Fix checking of negative with unsigned variables.
Check digestSz for 0 in wc_SSH_KDF() so that no possibility of dividing
by zero.
Change XMEMCPY to XMEMSET in renesas_sce_util.c.
Fix test.c to free prvTmp and pubTmp on read error.
Remove unused variables.
XFREE checks for NULL so don't check before call.
Move variable declarations to reduce scope.
2023-04-03 16:59:58 +10:00
Kareem
a64fba93cb
Micrium: Add missing XATOI/XSTRTOK definitions, update XMEMMOVE function.
2023-03-31 17:33:33 -07:00
David Garske
2ad0659fa4
Merge pull request #6255 from julek-wolfssl/fix-ssl_asn1
...
Add missing guards
2023-03-31 13:54:25 -07:00
Andras Fekete
c56e58db5b
Remove TODO+bad tests
2023-03-31 15:51:28 -04:00
Andras Fekete
18f4b45129
Fix object size
2023-03-31 15:44:25 -04:00
Andras Fekete
80a0fb548a
Zero buffer size test should be implemented another way
2023-03-31 15:44:13 -04:00
David Garske
753ad4c4c1
Merge pull request #6253 from JacobBarthelmeh/CAAM
...
resolve warning about uninitialized variable
2023-03-31 10:50:28 -07:00
JacobBarthelmeh
35611cad96
Merge pull request #6252 from julek-wolfssl/async-test-action
...
Initial async test with gh action
2023-03-31 11:33:32 -06:00
Andras Fekete
c8e1731cb7
Fix dependency issues
2023-03-31 13:21:13 -04:00
JacobBarthelmeh
74e6f0d337
Merge pull request #6243 from julek-wolfssl/reuse-wolfssl-builds
...
actions: Build wolfSSL in seperate job
2023-03-31 09:26:43 -06:00
Andras Fekete
7138b66b5e
Compiler error
2023-03-31 11:22:58 -04:00
Juliusz Sosinowicz
9f41ed8c72
Add missing guards
2023-03-31 16:11:58 +02:00
Juliusz Sosinowicz
8f8153220b
Remove trailing whitespace
2023-03-31 13:29:42 +02:00
Juliusz Sosinowicz
f1a93f524d
Tabs -> spaces
2023-03-31 11:51:49 +02:00
Juliusz Sosinowicz
ffcc66bb53
Add explicit casts
2023-03-31 11:48:18 +02:00
Juliusz Sosinowicz
4ddc975aca
Expand asyn-check script
2023-03-31 11:25:46 +02:00
Hideki Miyazaki
27f5f3a3e8
fix overwriting serialnum by favouriteDrink
2023-03-31 15:56:31 +09:00
David Garske
00e3dcfab5
Merge pull request #6226 from SparkiDev/asn1_move
...
Move ASN.1 APIs out to separate file: ssl_asn1.c
2023-03-30 18:22:13 -07:00
Sean Parkinson
8489095057
Move ASN.1 APIs out to separate file: ssl_asn1.c
...
Implementations of ASN.1 APIs reworked.
Added tests.
Added wolfssl_bn_set_neg for ASN.1 code.
Added wolfssl_sk_new_type() and wolfssl_sk_pop_type() to generically
handle creating and popping a stack of elements of a type.
No longer freeing pathlen field of ASN1 OBJECT in
wolfSSL_X509_EXTENSION_free(). This is happening in
wolfSSL_ASN1_OBJECT_free().
Stop wolfSSL_i2d_X509_NAME_canon from double freeing ASN.1 STRING's data
field.
Fixed up GetFormattedTime() to be better code.
Added ASN_CLASS_MASK to mask off the class part of an ASN.1 tag.
NO_ASN_TIME means no implementation to get the current time. Disable
features that won'r work without time.
2023-03-31 09:36:01 +10:00
Sean Parkinson
6bed0c5757
Merge pull request #6123 from dgarske/math_info
...
Add introspection for math build and math cleanups
2023-03-31 09:15:48 +10:00
Chris Conlon
7fae945ee6
Merge pull request #6214 from miyazakh/altname_next_reset
2023-03-30 16:58:09 -06:00
David Garske
22a5a5c45e
Add introspection for math build and math cleanups:
...
* Add introspection for math build.
* Raise build error if more than one multi-precision math library used.
* Fix ESP32 to support using any multi-precision math option.
* Refactor math headers to use `wolfmath.h`
* Refactor of the opaque math variable type `MATH_INT_T` used by crypto hardware (QuickAssist, SE050, ESP32 and STM32).
* Cleanups for building with `WOLFCRYPT_ONLY` and `NO_BIG_INT`.
* Stop forcing use of fast math by default for platforms in settings.h. Note: For users that still want to use fast math (tfm.c) they will need to add USE_FAST_MATH to their build settings.
Applies To:
```
WOLFSSL_ESPWROOM32
WOLFSSL_ESPWROOM32SE
MICROCHIP_PIC32
WOLFSSL_PICOTCP_DEMO
WOLFSSL_UTASKER
WOLFSSL_NRF5x
FREERTOS_TCP
WOLFSSL_TIRTOS
EBSNET
FREESCALE_COMMON
FREESCALE_KSDK_BM
WOLFSSL_DEOS
MICRIUM
WOLFSSL_SGX
```
2023-03-30 14:42:55 -07:00
David Garske
c7a76365f0
Fixes to support larger H5 save/restore and larger digest result (for SHA2-512).
2023-03-30 14:42:20 -07:00
David Garske
d99514a41c
Added benchmarks for STM32H563ZI.
2023-03-30 14:42:20 -07:00
David Garske
0201662094
Support for STM32H5
2023-03-30 14:42:20 -07:00
Jacob Barthelmeh
f7d3ce7843
resolve warning about uninitialized variable
2023-03-30 11:44:08 -06:00
Juliusz Sosinowicz
27794c4b7e
Initial async test with gh action
2023-03-30 19:33:54 +02:00
Juliusz Sosinowicz
de2f878781
Write next IV in wolfSSL_DES_ede3_cbc_encrypt
2023-03-30 18:47:53 +02:00
Juliusz Sosinowicz
9120712438
Address code review
2023-03-30 15:35:52 +02:00
Juliusz Sosinowicz
4338ed9b7b
Add missing define
2023-03-30 14:56:31 +02:00
Sean Parkinson
0210dcd98d
Merge pull request #6240 from kaleb-himes/wolfEntropy-work
...
Fix a typo in PP macro and add a ceiling to guard against implementation bugs
2023-03-30 12:33:01 +10:00
PrinceOfPuppers
9b1aed0c82
updated zephyr includes
2023-03-29 22:22:31 -04:00
David Garske
a8ca958855
Merge pull request #6248 from JacobBarthelmeh/fips
...
visibility is dependent on macros that could be set in user_settings.h
2023-03-29 16:32:29 -07:00
David Garske
5d1a914ebd
Merge pull request #6247 from JacobBarthelmeh/config
...
check if colrm is available for options.h creation
2023-03-29 15:19:14 -07:00
Jacob Barthelmeh
951b5bc77c
visibility is dependent on macros that could be set in user_settings.h
2023-03-29 16:14:54 -06:00
JacobBarthelmeh
e1730c760c
check if colrm is available for options.h creation
2023-03-29 14:11:56 -07:00
David Garske
68d6ce647d
Merge pull request #6227 from julek-wolfssl/hwsim-retry
...
Retry hwsim tests 3 times on fail
2023-03-29 12:34:19 -07:00
David Garske
8b34ad7c4d
Merge pull request #6245 from lealem47/asyncRelease
...
Fixes for the async release
2023-03-29 12:33:57 -07:00
Lealem Amedie
8e730534d5
Free in drbg test when appropriate
2023-03-29 10:26:59 -06:00
David Garske
3841b559ec
Merge pull request #6246 from SparkiDev/siphash_asm_fix
...
siphash: fix assembly so that no register is left behind
2023-03-29 09:23:38 -07:00
Lealem Amedie
047db19956
Disable SHA512/224 & SHA512/256 on QAT
2023-03-29 10:17:06 -06:00
Lealem Amedie
65f97482f3
Missed free's in api.c
2023-03-29 10:16:29 -06:00
David Garske
6a71c7d71a
Merge pull request #6228 from SparkiDev/sp_math_dh_test_param
...
SP math: 2048-bit DH parameters
2023-03-29 08:25:54 -07:00
David Garske
689b0f803a
Merge pull request #6237 from SparkiDev/benchmark_base10
...
Benchmark: fix reporting of base10
2023-03-29 08:25:29 -07:00
Juliusz Sosinowicz
4a75d78682
Add flags to disable certain checks
2023-03-29 14:22:31 +02:00
Juliusz Sosinowicz
43ca374cad
actions: Fix openwrt patch
2023-03-29 11:32:32 +02:00
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
David Garske
35111b29c1
Merge pull request #6244 from bandi13/consolidateVMdeps
...
Fix dependencies
2023-03-28 13:30:08 -07:00
Lealem Amedie
6824166cf9
Add QAT flags to logic checking for dependencies
2023-03-28 12:44:22 -06:00
Kaleb Himes
ba47562d18
Merge pull request #6238 from bandi13/fixRenewcerts.sh
...
Remove expectation for an argument to be passed
2023-03-28 11:24:51 -06:00
Juliusz Sosinowicz
415d6151ff
Use unique name in openwrt action
2023-03-28 18:10:01 +02:00
Andras Fekete
103f6e7520
Fix dependencies
2023-03-28 11:56:29 -04:00
Juliusz Sosinowicz
f5b0c406c0
use unique artifact names
2023-03-28 17:17:18 +02:00
JacobBarthelmeh
f1aa43dc48
Merge pull request #6230 from bandi13/zd15855
...
Fix for variable server startup time
2023-03-28 09:13:52 -06:00
JacobBarthelmeh
ba2b7af84a
Merge pull request #6241 from lealem47/strncmp
...
Fixes for sniffer with enable all
2023-03-28 09:13:11 -06:00
Juliusz Sosinowicz
1766a69152
actions: Build wolfSSL in seperate job
2023-03-28 17:00:51 +02:00
Andras Fekete
0a2201700d
Put the .rnd file in a local folder
2023-03-28 10:43:17 -04:00
Andras Fekete
1cf2d9ece3
Create files that the script depends on
2023-03-28 10:16:24 -04:00
Andras Fekete
610c45afb6
Don't need to store state anymore
2023-03-28 10:15:58 -04:00
Juliusz Sosinowicz
60501236cf
Add counter
2023-03-28 14:15:57 +02:00
Juliusz Sosinowicz
e73ae077dc
Retry hwsim tests 3 times on fail
2023-03-28 14:15:57 +02:00
Juliusz Sosinowicz
7116f1e005
Add comment.
2023-03-28 14:14:40 +02:00
Juliusz Sosinowicz
f0ad01f552
Send secure renegotiation extension by default
...
- Add test for terminating the connection
- Add ProcessReplyEx(ssl, 1) to wolfSSL_accept
2023-03-28 12:43:53 +02:00
Sean Parkinson
69199a30f9
SP math: 2048-bit DH parameters
...
Add 2048-bit DH parameters for testing when SP math with SP.
2023-03-28 09:24:56 +10:00
Lealem Amedie
591089664d
Fixes for sniffer with enable all
2023-03-27 16:37:14 -06:00
kaleb-himes
59107aeaa8
Fix a typo in PP macro and add a ceiling to guard against implementation bugs
2023-03-27 16:02:34 -06:00
Andras Fekete
1f6071df33
PR suggestions
2023-03-27 13:59:01 -04:00
Chris Conlon
496a15037b
Merge pull request #6166 from TakayukiMatsuo/tsip117
2023-03-27 11:49:18 -06:00
Andras Fekete
cadd2d9ab6
Remove expectation for an argument to be passed
...
Added in a failing return value to flush out tests/scripts that may be calling this script multiple times with various arguments
2023-03-27 13:30:12 -04:00
David Garske
85e82746c3
Merge pull request #6210 from rizlik/realloc_on_espressif
...
wolfcrypt/settings.h: use default realloc on EspressIf
2023-03-27 09:28:42 -07:00
Juliusz Sosinowicz
28fd14621a
Add harden config to testing
2023-03-27 17:20:16 +02:00
Juliusz Sosinowicz
c0b0c14a15
Allow user to choose between 112 and 128 bits of security
2023-03-27 15:42:19 +02:00
Juliusz Sosinowicz
3b759580b2
Require 128 bits of security for public keys
2023-03-27 10:27:57 +02:00
Sean Parkinson
5f2208e71d
Benchmark: fix reporting of base10
2023-03-27 16:29:47 +10:00
David Garske
979707380c
Merge pull request #6232 from JacobBarthelmeh/release
...
prepare for release 5.6.0
2023-03-24 10:14:19 -07:00
Juliusz Sosinowicz
40cbb32b23
Ciphersuite check
...
https://www.rfc-editor.org/rfc/rfc9325#section-4.1
2023-03-24 16:44:33 +01:00
Juliusz Sosinowicz
e465089798
No old TLS check
2023-03-24 16:44:01 +01:00
Juliusz Sosinowicz
94cf845c05
Truncated hmac check
2023-03-24 16:43:34 +01:00
Juliusz Sosinowicz
7791b8ff4d
Add config option
2023-03-24 16:42:56 +01:00
JacobBarthelmeh
877e026da4
prepare for release 5.6.0
2023-03-23 21:44:18 -07:00
billphipps
9f6388d272
Track SetDigest usage to avoid invalid free under error conditions.
2023-03-23 15:46:38 -04:00
Andras Fekete
d57d6d2b78
Fix for variable server startup time
2023-03-23 15:03:26 -04: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
aeffe6cfa7
Merge pull request #6222 from JacobBarthelmeh/alerts
...
don't try to send an alert to a disconnected peer
2023-03-23 09:49:15 -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
e9214e07cf
Merge pull request #6219 from RSmatRA/RSmatRA/zeroing-input-buffer
...
Do not ForceZero the part of the buffer that has not been used.
2023-03-23 21:13:37 +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
JacobBarthelmeh
6ad786abe4
Merge pull request #6224 from SparkiDev/quic_aes_gcm_stream
...
AES-GCM streaming: EVP needs to set IV with wc_AesGcmInit
2023-03-23 08:25:31 +07:00
Lealem Amedie
a31ca24bb0
Fix for async build with enable all
2023-03-22 17:30:38 -06: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
JacobBarthelmeh
7734588669
don't try to send an alert to a disconnected peer
2023-03-22 14:20:07 -07: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
David Garske
7c122cda6d
Merge pull request #6197 from JacobBarthelmeh/Testing
...
adjust location of Options typdef
2023-03-22 12:31:00 -07:00
JacobBarthelmeh
edca6b9d03
adjust location of Options typedef
2023-03-22 09:27:26 -07:00
JacobBarthelmeh
7e8d027a17
Merge pull request #6217 from douzzer/20230321-fixes
...
20230321-fixes
2023-03-22 10:23:07 -06:00
Radim Smat
e618bb9686
Do not ForceZero the part of the buffer that has not been used.
2023-03-22 14:48:18 +01: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
Hideki Miyazaki
51040b1f07
reset alt name list to head
2023-03-22 10:31:58 +09: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
JacobBarthelmeh
2af55903c5
Merge pull request #6187 from SparkiDev/tls13_server_id
...
Server ID - long id, TLS 1.3 - cache client session for tickets
2023-03-21 16:48:05 -06:00
JacobBarthelmeh
265a6c824f
Merge pull request #6164 from wolfSSL/gojimmypi-patch-zephyr-link
...
Update README link
2023-03-21 09:10:52 -06:00
Sean Parkinson
17e20b8c36
Server ID - long id, TLS 1.3 - cache client session for tickets
...
Long server IDs were being truncated. Hash long IDs instead.
TLS 1.3 session ticket on client side no longer added session to client
cache. Explicit call added.
2023-03-21 15:29:07 +10:00
John Safranek
74f549a0b4
Merge pull request #6206 from SparkiDev/aesgcm_armv6_asm
...
AES ARMASM <ARMV7: fix load order
2023-03-20 21:21:01 -07: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
Sean Parkinson
09dd9a0ca3
Merge pull request #6207 from rizlik/move_alerts_from_get_record_header
...
Move alerts from get record header
2023-03-21 08:20:22 +10:00
Eric Blankenhorn
cc4f6221e1
RIOT-OS does support writev
2023-03-20 16:07:29 -05:00
JacobBarthelmeh
5c7be2fa98
Merge pull request #6202 from philljj/zd15807
...
Fix out-of-bounds read in CRL parsing
2023-03-20 14:19:01 -06:00
Marco Oliverio
e281ef9ea9
wolfcrypt/settings.h: use default realloc on EspressIf
2023-03-20 17:26:46 +00:00
JacobBarthelmeh
72e53ca1a4
handle failing RNG init when creating PKEY
2023-03-20 07:17:25 -07:00
Marco Oliverio
84d8245e58
internal: move SendAlerts outside of GetRecordHeader
...
This will give a chance to DTLS logic to ignore an error.
2023-03-20 10:50:00 +00:00
Marco Oliverio
aabd665e73
SendAlert: propagate return error in non-fatal SendAlert
2023-03-20 10:50:00 +00:00
Sean Parkinson
c3b51af6cd
Merge pull request #6204 from JacobBarthelmeh/name
...
Fix for value of givenName and name
2023-03-20 10:59:47 +10:00
jordan
2fe473cf9f
Fix out-of-bounds read in CRL parsing
2023-03-17 22:33:35 -05:00
JacobBarthelmeh
327692b09f
Merge pull request #6200 from kareem-wolfssl/zd15324_2
...
Fix IAR warnings.
2023-03-17 15:04:35 -06: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
9c3cfab328
Merge pull request #6196 from bandi13/zd15783
...
OCSP_CERT_UNKNOWN
2023-03-17 14:33:57 -06:00
JacobBarthelmeh
0e431c3eaa
add given name test case
2023-03-17 13:07:15 -07:00
JacobBarthelmeh
a917f380bb
fix values for givenName and name
2023-03-17 12:56:27 -07:00
Kareem
011385d4d4
Revert logging return code fixes, already fixed in another PR.
2023-03-17 12:39:04 -07: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
Kareem
5b08b016af
Add client-absolute-urn.pem to renewcerts.sh
2023-03-16 16:14:08 -07:00
Kareem
5126dc87e6
Fix IAR warnings.
2023-03-16 15:46:41 -07:00
Sean Parkinson
459058a645
Merge pull request #6194 from JacobBarthelmeh/string
...
cast on input of XISALNUM
2023-03-17 08:39:21 +10: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
28f39f6b3d
Fix unit test failure when building OPENSSL_EXTRA without HAVE_EXT_CACHE.
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
Kaleb Himes
75149f71d2
Implement peer suggestions
2023-03-16 12:59:49 -06:00
JacobBarthelmeh
8ec339d11c
Merge pull request #6175 from tim-weller-wolfssl/zd15722-mem-leak
...
zd15722 - Prevent out-of-bound read in ASN parsing logic by erroring out.
2023-03-16 07:29:26 -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
JacobBarthelmeh
fb6f2d1790
cast on input of XISALNUM
2023-03-15 15:43:28 -07: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
kaleb-himes
ea06d064b0
Add a base-line user_settings.h for use with FIPS 140-3 in xCode example app
2023-03-15 14:08:32 -06: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
JacobBarthelmeh
8ba35a5f16
Merge pull request #6180 from julek-wolfssl/openvpn-test
...
Add libnl-genl-3-200 as dependency to openvpn test
2023-03-15 10:11:20 -06:00
Andras Fekete
69024d121f
Revert change
2023-03-15 10:16:34 -04:00
Andras Fekete
682354628b
Better return value
2023-03-15 09:58:39 -04:00
Eric Blankenhorn
7c918255b9
Fix type conv error in logging
2023-03-15 07:46:22 -05:00
Andras Fekete
1967375ea5
Pass up the error
2023-03-14 18:11:00 -04:00
Andras Fekete
c6e7ea685e
Add in CERT_UNKNOWN detection
2023-03-14 18:09:45 -04: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
Sean Parkinson
a268222167
Merge pull request #6169 from rizlik/wssl-alerts
...
Wssl alerts
2023-03-15 07:48:57 +10:00
JacobBarthelmeh
0355187f51
Merge pull request #6184 from bandi13/fixCRLTest
...
Fix possible timing issue with other tests copying the certs folder
2023-03-14 09:29:03 -06:00
Juliusz Sosinowicz
caad42291b
Merge pull request #6193 from JacobBarthelmeh/tls13
2023-03-14 14:54:00 +01:00
Marco Oliverio
94d983f94a
tests: add WOLFSSL_EXTRA_ALERTS tests
2023-03-14 13:27:40 +00:00
JacobBarthelmeh
c61d079905
Merge pull request #6186 from SparkiDev/asn_template_leading_zero
...
ASN template: compile option to allow leading zeros
2023-03-14 06:37:06 -06: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
Marco Oliverio
898fed9a8b
tests: memio: allow NULL client and/or server ctx
2023-03-14 09:27:19 +00:00
Marco Oliverio
4227f763a8
ssl: send alert on bad psk
2023-03-14 09:27:19 +00:00
Marco Oliverio
7b53baea62
refactor: more centralized extra alerts
...
on handshake messages' errors:
- don't send alerts on WANT_READ, WANT_WRITE and WC_PENDING_E "errors"
- use return error code to decide which alert description
to send
- use alert description handshake_failure in the general case
- if a fatal alert was already sent, do not send any new alerts. This allow
a more specific alert description in case the exact description can't be
derived from the return code
2023-03-14 09:27:18 +00:00
Marco Oliverio
f666a7d4b7
internal.c: fix fall_through compilation issues
...
src/internal.c: In function 'SendCertificateVerify':
./wolfssl/wolfcrypt/types.h:345:40: error: attribute 'fallthrough' not preceding a case label or default label [-Werror]
345 | #define FALL_THROUGH ; __attribute__ ((fallthrough))
In file included from ./wolfssl/internal.h:27,
from src/internal.c:92:
src/internal.c: In function 'SendCertificateVerify':
./wolfssl/wolfcrypt/types.h:345:40: error: attribute 'fallthrough' not preceding a case label or default label [-Werror]
345 | #define FALL_THROUGH ; __attribute__ ((fallthrough))
2023-03-14 09:27:18 +00: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
JacobBarthelmeh
19a1ec8c98
Merge pull request #6192 from kaleb-himes/aes-free-dox
...
Document use of wc_AesFree()
2023-03-13 16:03:13 -06:00
JacobBarthelmeh
d7cd7bc256
adjust guards around PreSharedKey structure for non tls13 builds
2023-03-13 14:47:25 -07:00
kaleb-himes
9c1adbd83b
Fix typo's in the code sample(s)
2023-03-13 14:56:46 -06:00
kaleb-himes
5bbdda6895
Document use of wc_AesFree()
2023-03-13 11:50:28 -06:00
JacobBarthelmeh
e8828574ea
Merge pull request #6190 from bandi13/ghActions
...
Let tests run to completion
2023-03-13 09:24:09 -06:00
JacobBarthelmeh
694b527e67
Merge pull request #5910 from julek-wolfssl/dtls13-stateless
...
DTLS 1.3 stateless server ClientHello parsing
2023-03-13 09:22:58 -06:00
Andras Fekete
c56c4ef7ce
Hacky workaround to be able to put/remove files in certs folder
2023-03-13 10:37:21 -04:00
Andras Fekete
f3e785b4c7
Let tests run to completion
2023-03-13 09:48:37 -04:00
JacobBarthelmeh
bcd6bce040
Merge pull request #6183 from ejohnstown/rng-tweak
...
RNG Tweak
2023-03-10 15:16:54 -07:00
András Fekete
f2a955d5eb
Merge pull request #6182 from julek-wolfssl/hostap-testing
...
Add initial testing for wpa_supplicant
2023-03-10 15:44:07 -05:00
Lealem Amedie
1c9fa5c5ae
Set some freed data to NULL
2023-03-10 13:40:25 -07:00
Andras Fekete
e2a1ab9e49
Fix possible timing issue with other tests copying the certs folder
2023-03-10 15:35:03 -05: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
Juliusz Sosinowicz
a47cf08273
Add initial testing for wpa_supplicant
2023-03-10 17:12:56 +01:00
David Garske
90f1c26211
Merge pull request #6162 from gojimmypi/Espressif_fix_6148
...
compiler appeasement initialization
2023-03-09 20:08:24 -08:00
Juliusz Sosinowicz
9628eb0159
Add libnl-genl-3-200 as dependency to openvpn test
...
Looks like github actions removed libnl-genl-3-200 from the default image. Need to install manually.
2023-03-09 21:47:10 +01:00
Juliusz Sosinowicz
4c7aa5c8dd
Address code review
2023-03-09 19:00:25 +01:00
JacobBarthelmeh
2a15363033
Merge pull request #6176 from bandi13/addWolfCLUDocker
...
Add in wolfCLU Dockerfile
2023-03-09 10:39:56 -07:00
JacobBarthelmeh
4fe3cc60b0
Merge pull request #6177 from cconlon/asnTimeString
...
Fix GetAsnTimeString() to correctly increment internal data pointer
2023-03-09 09:36:59 -07:00
JacobBarthelmeh
a640418832
Merge pull request #6170 from julek-wolfssl/openvpn-test
...
Add fsanitize testing for openvpn
2023-03-09 09:25:43 -07: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
Andras Fekete
ebf7fa585a
First attempt
2023-03-08 15:27:16 -05:00
Lealem Amedie
13867dab12
Fix leak and address more feedback
2023-03-08 13:14:16 -07:00
Juliusz Sosinowicz
e04a01dc4c
Add fsanitize testing for openvpn
2023-03-08 11:23:41 +01: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
Jacob Barthelmeh
07a1725635
remove redundent check on mp_read_radix available
2023-03-07 16:08:37 -07: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
Juliusz Sosinowicz
335722c586
Async fixes
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
f5f67f43d7
Reset DTLS sequence number
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
a432502a98
Refactor sequence number reset for DTLS into one function
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
db1f199a11
Add comment about keyshare negotiation
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
cbedae2f55
This path in TLSX_KeyShare_Choose should not be taken normally
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
06749144d5
Add RFC link to help understand constraints
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
f2032e8744
Clear decrypted ticket that failed checks in DoClientTicket_ex
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
b0d7656ad2
Rebase fixes
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
885cca67fe
Check for shared ctx in all configs
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
61c2059cd9
Differentiate between empty and missing extension
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
5f39c594aa
TLS 1.3: hold decrypted ticket to check which ciphersuite matches
...
DTLS 1.3: Move stateless ticket decoding to FindPskSuiteFromExt
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
8c08dbb6ce
Adding checks for SigAlgs, KeyShare, and Supported Groups
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
2bbdf6979a
Reuse ReadVector16
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
de6ed96feb
CopyExtensions -> CopySupportedGroup
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
5f65752414
Refactor alerts into one location
...
Remove previous stateless code. Now all DTLS 1.3 stateless handling is done in dtls.c
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
51a384eba5
Read cookie extension into separate field
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
5b0903a82d
Missing casts
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
b5e7761e58
For DTLS 1.3 use PSK for ticket
...
Resumption info is also necessary when WOLFSSL_DTLS_NO_HVR_ON_RESUME is not defined.
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
0264df1546
Definition was defined out in some configs
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
969c610ef7
Fix unused variable
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
57dccc4cf4
Calculate cookie in SendStatelessReplyDtls13()
...
Not touching ssl->hsHashes while in stateless mode
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
c15043b191
Refactor SendStatelessReply 1.3 branch into new function
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
2f31cdef69
Re-create hs header for hash
2023-03-07 12:04:54 +01:00
Juliusz Sosinowicz
aa9dcca624
Rebase and Jenkins fixes
2023-03-07 12:02:54 +01:00
Juliusz Sosinowicz
a999909969
Use PSK callback to get the ciphersuite to use
...
- Allocate additional byte in TLSX_PreSharedKey_New for null terminator
2023-03-07 12:02:54 +01:00
Juliusz Sosinowicz
6160f93f94
Fix Jenkins errors
2023-03-07 12:02:54 +01:00
Juliusz Sosinowicz
7dfa96a729
Define usePSK when ext is present
2023-03-07 12:02:54 +01:00
Juliusz Sosinowicz
984d709db0
dtls 1.3: Stateless ClientHello parsing
2023-03-07 12:02:54 +01:00
Anthony Hu
109063e427
Relaxed parsing of explicit ECC public key
2023-03-06 20:11:36 -05:00
Chris Conlon
9bc3b867e0
Merge pull request #6157 from miyazakh/add_favouriteDrinkNID
2023-03-06 16:45:14 -07:00
Sean Parkinson
fa8b253657
Merge pull request #6167 from douzzer/20230306-fix-header-loop-test
...
20230306-fix-header-loop-test
2023-03-07 08:47:41 +10:00
Daniel Pouzzner
3c107da2a9
wolfssl/openssl/bn.h: fix bugprone-macro-parentheses.
2023-03-06 15:23:14 -06:00
Daniel Pouzzner
0a90b2d354
configure.ac: further fix for header loop check -- construct header list while in $srcdir, so that -I${srcdir} works as expected. see earlier commits 7baddb04f8 a7d9ea7550 b3a1ac80dc .
2023-03-06 15:21:23 -06:00
Lealem Amedie
d9429185d8
Addressing some review feedback
2023-03-06 10:42:23 -07:00
David Garske
86e1b0d8ab
Merge pull request #6165 from SparkiDev/bn_move
...
BN compatibility API: move implementation out to separate API
2023-03-06 09:27:24 -08:00
David Garske
9f66a58afd
Merge pull request #6159 from philljj/zd15693
...
Fix ASN1_STRING leak in create_by_NID and create_by_txt
2023-03-06 09:25:37 -08:00
Sean Parkinson
e4c2386b61
BN compatibility API: move implementation out to separate API
...
BN APIs from ssl.c have been moved out to ssl_bn.c that is included in
ssl.c.
Added defines for BN_rand() and BN_pseudo_rand() to indicate which bits
are to be set.
'internal' field now always maps to the ;mpi' field that is a MP
integer.
SetIndividualInternal/External renamed to wolfssl_bn_get/set_value.
Fixed BN APIs to work as closely to OpenSSL as possible.
Added tests.
Moved wolfssl_make_rng out to ssl.c as BN APIs are using it now.
SP int and TFM now check trials are in a valid range for
mp_prime_is_prime_ex().
2023-03-06 14:32:10 +10:00
gojimmypi
9363b96947
Update README link
...
fix link that's currently 404
2023-03-05 15:26:48 -08:00
David Garske
487d46fd28
Merge pull request #6161 from douzzer/20230303-fix-c89-etc
...
20230303-fix-c89-etc
2023-03-05 14:24:33 -08:00
Daniel Pouzzner
b3a1ac80dc
configure.ac: don't check for opensslextra circular header dependencies if ENABLED_LINUXKM (handcrafted linuxkm/Makefile and linuxkm/Kbuild set up paths to correctly find dependencies like linux/mutex.h).
2023-03-04 12:12:08 -06:00
Hideki Miyazaki
05b0796361
add favourite drink pilot attibute type to get it from the encoding
2023-03-04 14:20:48 +09:00
Daniel Pouzzner
ab71f6fd4c
extend C89 build to whole codebase including examples:
...
configure.ac: remove implied --disable-examples when --disable-inline;
tests/api.c: always include wolfcrypt/src/misc.c;
wolfcrypt/src/misc.c: use WC_MISC_STATIC to designate staticness of the misc functions;
wolfssl/wolfcrypt/misc.h: define WC_MISC_STATIC to empty or static depending on #ifdef NO_INLINE or not (respectively);
wolfssl/wolfcrypt/types.h: #ifdef NO_INLINE, #define WC_INLINE WC_MAYBE_UNUSED, and move the definitions of WARN_UNUSED_RESULT and WC_MAYBE_UNUSED above the definition of WC_INLINE for clarity;
wolfssl/wolfcrypt/mem_track.h: always declare TrackMalloc() et al static (no functional change, because the state and callback bindings were and remain unconditionally static, but previously #ifdef NO_INLINE the functions were globals, leading to multiple definitions.
2023-03-03 22:30:08 -06:00
Daniel Pouzzner
e76d12f932
src/ssl.c: fix a couple suppressions to use C comment syntax, for C89 goodness.
2023-03-03 22:01:52 -06:00
Daniel Pouzzner
aecb37c032
linuxkm/module_hooks.c: wc_SetSeed_Cb(wc_GenerateSeed) in wolfssl_init() #ifdef WC_RNG_SEED, regardless of whether wolfcrypt_test() will be called.
2023-03-03 22:00:24 -06:00
Daniel Pouzzner
a7d9ea7550
configure.ac: fix openssl header circular dependency detector to work on out-of-tree builds.
2023-03-03 21:56:42 -06:00
Lealem Amedie
bb9c1bb253
Adding support for indefinite length PKCS12
2023-03-03 15:58:17 -07:00
David Garske
35b68fb23d
Merge pull request #5597 from Tathorack/add-renesas-rx64-rx72-sha-support
...
Add RX64/RX71 SHA hardware support
2023-03-03 13:14:32 -08:00
Rhys Hansen
4d81a06557
Update comment format and other minor changes
2023-03-03 13:57:44 -06:00
David Garske
d955ec8d54
Merge pull request #6156 from jpbland1/revert-zephyr-relocation
...
move the zephyr folder back to it's correct location
2023-03-03 11:19:35 -08:00
David Garske
9a597a098b
Merge pull request #6158 from miyazakh/initial_dec
...
fix init var in for-loop
2023-03-03 08:40:55 -08:00
jordan
51dbb44799
Fix ASN1_STRING leak in create_by_NID and create_by_txt
2023-03-03 08:22:35 -06:00
Hideki Miyazaki
0693b66c44
fix init var in for-loop
2023-03-03 17:51:34 +09:00
John Bland
b146830fe8
move the zephyr folder back to it's correct location
2023-03-02 23:40:12 -05:00
David Garske
4ebc896231
Merge pull request #6095 from SparkiDev/aes_gcm_win_asm
...
Aes gcm win asm
2023-03-02 15:02:55 -08:00
Sean Parkinson
a8723f71cb
Merge pull request #6154 from kaleb-himes/wolfmikey-w-fips-140-3
...
Allow building of sakke as external non-FIPS algorithm with wolfmikey product
2023-03-03 08:18:40 +10:00
David Garske
03948fd3ae
Merge pull request #6140 from JacobBarthelmeh/seco
...
Fix AES-ECB with SECO
2023-03-02 13:43:15 -08:00
David Garske
41a9b1148f
Merge pull request #6152 from philljj/spelling_cleanup
...
Used codespell and fixed obvious typos in src and wolfssl.
2023-03-02 11:39:45 -08:00
David Garske
871754b97c
Merge pull request #6153 from bandi13/fixZD15705
...
Fix memory leak
2023-03-02 11:39:03 -08:00
kaleb-himes
7ca4b1bc66
Allow building of sakke as external non-FIPS algorithm with wolfmikey product
2023-03-02 11:30:56 -07:00
Juliusz Sosinowicz
7baddb04f8
Check for circular dependencies in compatibility headers ( #6091 )
...
* Check for circular dependencies in compatibility headers
* Run header check only when ENABLED_OPENSSLEXTRA
* Add missing include
* Pedantic compilers don't like empty translation units
* Fix macro guards
2023-03-02 08:51:13 -08:00
Andras Fekete
406d8753be
Fix memory leak
2023-03-02 11:15:32 -05:00
jordan
409ed6232a
Used codespell and fixed obvious typos in src and wolfssl.
2023-03-02 09:52:07 -06:00
JacobBarthelmeh
9a54cea78b
Fix AES-ECB with SECO
2023-03-02 07:55:05 -07:00
JacobBarthelmeh
3f7109c18b
Merge pull request #6147 from dgarske/cpp17
...
Fixes for building with C++17
2023-03-02 07:46:35 -07:00
Sean Parkinson
126805183c
Merge pull request #6150 from douzzer/20230301-fix-async-and-mips-and-kcapi
...
20230301-fix-async-and-mips-and-kcapi
2023-03-02 13:10:26 +10:00
Daniel Pouzzner
98c1b152a0
wolfssl/openssl/sha.h: fix undersized WOLFSSL_SHA384_CTX to have same size as WOLFSSL_SHA512_CTX (fixes failed assert in fips-140-3-dev-kcapi-opensslextra-build).
2023-03-01 17:55:02 -06:00
Daniel Pouzzner
24a1c171ea
wolfssl/wolfcrypt/settings.h: define WOLFSSL_SP_INT_DIGIT_ALIGN when target is MIPS, to fix a crash in sp_read_unsigned_bin().
2023-03-01 17:52:46 -06:00
Daniel Pouzzner
51339edf47
wolfcrypt/src/asn.c: fix WOLFSSL_ASYNC_CRYPT codepath in SignCert() -- fall through to non-async certSignCtx_lcl for algs without async support.
2023-03-01 17:51:25 -06:00
Daniel Pouzzner
6a7674a146
wolfcrypt/test/test.c: improve strerror_r() flavor sensing (simpler gate randomly provoked cppcheck-all-async-quic).
2023-03-01 17:50:00 -06:00
David Garske
63b049814b
Merge pull request #6136 from SparkiDev/armv7_aes_no_reloc_text
...
ARMv7a AES asm: don't have relocatable text
2023-03-01 14:36:41 -08:00
David Garske
5de15fedee
Merge pull request #6132 from bandi13/moreContainerSupport
...
More container support
2023-03-01 13:57:04 -08:00
David Garske
17ad27c350
Fixes for building with C++17. Adds new USE_CPLUSPLUS_BYTE build option to use std::byte as byte to avoid redefinition issues when customer application sets default namespace to "std" or wants to use "byte".
...
Tested using `./configure CC="g++ -std=c++17" --enable-all && make check`.
2023-03-01 12:49:47 -08:00
David Garske
7d049aa90a
Merge pull request #6141 from SparkiDev/cert_name_enc_fix
...
Cert name encoding fix
2023-02-28 17:36:22 -08:00
Sean Parkinson
3aa1ef5907
ARMv7a AES asm: don't have relocatable text
...
For FIPS hash, don't have relocatable text in ARMv7's AES assembly code.
2023-03-01 11:32:00 +10:00
David Garske
91d77393b9
Merge pull request #6110 from SparkiDev/sp_small_stack
...
SP: WOLFSSL_SP_SMALL_STACK
2023-02-28 17:17:58 -08:00
David Garske
aa8d3df8dd
Merge pull request #6137 from SparkiDev/rsa_enc_no_pad
...
RSA padding - no pad length check fix
2023-02-28 17:17:05 -08:00
Sean Parkinson
d1b8386d36
Cert name encoding fix
...
Only include extra name entries once when encoding.
Fix certDefaultName to not have \0 on strings of extra names.
2023-03-01 10:01:54 +10:00
Sean Parkinson
2a33f24dc9
RSA padding - no pad length check fix
...
Perform correct length check of input bytes based on bits in key in
wc_RsaPad_ex when no padding to be done.
2023-03-01 09:42:39 +10:00
Sean Parkinson
cc8493668b
SP: WOLFSSL_SP_SMALL_STACK
...
Defined when WOLFSSL_SMALL_STACK and !WOLFSSL_SP_NO_MALLOC or on
configuration line as an option to --enable-sp: smallstack.
2023-03-01 09:35:05 +10:00
Daniel Pouzzner
47aad3fedb
Merge pull request #6138 from dgarske/pkcs7_async
...
Fix for PKCS7 with asynchronous crypto enabled
2023-02-28 17:24:56 -06:00
David Garske
2420d5d3b6
Merge pull request #6144 from kareem-wolfssl/zd15741Gh6142
...
Fix for PIC32 crypto HW and unused `TLSX_SetResponse`
2023-02-28 15:10:37 -08:00
David Garske
be6fb0c26f
Merge pull request #6145 from bandi13/x509_sign_test_fix
...
Fix `test_wolfSSL_X509_sign` expected size
2023-02-28 15:10:21 -08:00
Andras Fekete
aff4d4a7d3
The size of the packet could vary by up to 5 bytes
2023-02-28 17:04:40 -05:00
Kareem
08a3e2cb6e
Avoid building TLSX_SetResponse unless it is being used. Initialize PIC32 UPDPTR register in all cases.
2023-02-28 14:37:45 -07:00
David Garske
58236632ca
Fix for PKCS7 with asynchronous crypto enabled. The addition of the devId field will attempt to leverage crypto callbacks and async hardware, so convert WC_PENDING_E to blocking.
2023-02-28 13:22:39 -08:00
Daniel Pouzzner
b133f6bbf7
20230223-refactor-test-c-error-codes ( #6135 )
...
* wolfcrypt/test/test.{c,h}: refactor to capture and encode error retvals using WC_TEST_RET_*() macros (based on line numbers), and print line and return code in err_sys().
* wolfcrypt/test/test.h: cast back to int in WC_TEST_RET_ENC(), to fix MSVC warning.
* configure.ac: add shake128 and shake256 to enable-all and enable-all-crypto;
* wolfcrypt/benchmark/benchmark.c: fix gating for bench_shake128() from !defined(WOLFSSL_NO_SHAKE128) to defined(WOLFSSL_SHAKE128).
* wolfcrypt/test/test.h: add WC_TEST_RET_TAG_* and WC_TEST_RET_DEC_TAG(), and refactor WC_TEST_RET_{ENC,DEC}_*() macros to implement the tag mechanism;
* add render_error_message() with tag-specific rendering of error strings;
* wolfcrypt/test/test.c: smallstack refactor of shake128_test() and shake128_absorb_test();
* wolfcrypt/test/test.c: change gating around mp_test() and related routines from defined(HAVE_VALGRIND) to defined(WOLFSSL_PUBLIC_MP);
* smallstack refactor of mp_test();
* refactor a slew of WC_TEST_RET_ENC_NC associated with XFOPEN/XFREAD to be WC_TEST_RET_ENC_ERRNO, and add error detection for XFREAD (previously silently tolerating zero retvals).
* wolfcrypt/test/test.c: build mp_test() only if WOLFSSL_SP_MATH_ALL or USE_FAST_MATH (in addition to WOLFSSL_PUBLIC_MP), because many general purpose functions such as sp_mulmod() are gated out in SP builds without WOLFSSL_SP_MATH_ALL.
* wolfcrypt/test/test.c: fix array bounds flubs in shake128_test();
* don't print_fiducials() in wolfcrypt_test() header, but rather, after render_error_message() in err_sys().
* wolfcrypt/test/test.{c,h}: wrap some overlong lines, and fix an unused-variable warning in mp_test_set_is_bit().
* wolfcrypt/test/test.c: fixes for several misplaced and several missing WC_TEST_RET_ENC_EC()s.
2023-02-28 13:02:37 -08:00
Andras Fekete
41ce9afef4
Better dependency list
...
Need 32bit compilation support as well as ARM/AARCH64
2023-02-28 11:19:09 -05:00
Andras Fekete
7b96cd2220
Switch out gcc-multilib for more modern multiarch
2023-02-28 09:29:23 -05:00
Sean Parkinson
397537e691
AES-GCM: MSVC use generated assembly instead of inline
...
AES-GCM for MSVC was using inline assembly.
Add MSVC version of AES-GCM assembly and use it instead.
Removed inline assembly.
2023-02-28 14:56:29 +10:00
David Garske
79eaf10041
Merge pull request #6139 from bandi13/fixOpenVpn
...
Attempt to fix build error
2023-02-27 17:56:26 -08:00
Sean Parkinson
c7b4bb1b27
Merge pull request #6128 from tim-weller-wolfssl/zd15454-benchmark-windows-update
...
Update wolfCrypt benchmark windows build files to support x64 Platform
2023-02-28 08:28:20 +10:00
Andras Fekete
2cbf5435c6
Attempt to fix build error
2023-02-27 17:07:13 -05:00
David Garske
950e0d100a
Merge pull request #6133 from philljj/zd15662
...
Fix malloc of zero size in fast_s_mp_sqr and fast_s_mp_mul_digs.
2023-02-27 10:47:29 -08:00
David Garske
12ccd01127
Merge pull request #6131 from anhu/STM32_kyber
...
Changes that make kyber work on STM32
2023-02-27 08:14:02 -08:00
Anthony Hu
49ae7d4845
Make old compilers happy.
2023-02-24 17:13:47 -05:00
JacobBarthelmeh
041d9c4510
Merge pull request #6130 from gojimmypi/Espressif_OpenSSL_interim
...
fix WOLFSSL_SHA_CTX for OpenSSL w/Espressif HW hash
2023-02-24 14:58:08 -07:00
David Garske
f3f2f6ccb9
Merge pull request #6126 from tmael/rpm_fix
...
Fix RPM build
2023-02-24 13:35:52 -08:00
Tim Weller
fd3d8c407d
Update wolfCrypt benchmark Windows / Visual Studio build files to include x64 Configuration/Platform combinations (e.g. Debug-x64) and fixed compilation errors in benchmark.c related to conditional-compilation.
2023-02-24 11:53:01 -06:00
David Garske
469226f214
Merge pull request #6107 from anhu/ecc_pub
...
Fixes for encoding/decoding ecc public keys.
2023-02-24 08:36:15 -08:00
jordan
22b1857bee
Fix malloc of zero size in fast_s_mp_sqr and fast_s_mp_mul_digs.
2023-02-24 10:18:36 -06:00
Andras Fekete
392ddd1b4a
Remove conflicts
2023-02-24 10:38:35 -05:00
David Garske
b1f421d0a6
Improve the "adder" for compatibility layer SHA context when hardware acceleration is used.
2023-02-24 07:28:15 -08:00
gojimmypi
aef44ff029
fix WOLFSSL_SHA_CTX for OpenSSL w/Espressif HW hash
2023-02-24 07:20:55 -08:00
Andras Fekete
d98dd53f55
Add one more utility
2023-02-24 09:48:15 -05:00
Andras Fekete
62748ba451
One more liboqs flag
2023-02-24 09:47:47 -05:00
Andras Fekete
559db5f314
Build liboqs for distribution
...
This makes it possible to use the library on same architecture but different processor type.
2023-02-24 09:47:47 -05:00
Andras Fekete
2b96f4bd16
Add in liboqs
2023-02-24 09:47:47 -05:00
Andras Fekete
87b7988643
Add cross compilers
2023-02-24 09:47:24 -05:00
Anthony Hu
1fcff5b30d
Changes that make kyber work on STM32
...
(wolfcrypttest and benchmark)
2023-02-24 04:08:07 -05:00
David Garske
b2a6203ec0
Merge pull request #6129 from SparkiDev/ed25519_doc_fix
...
Ed25519 doxygen update
2023-02-23 19:53:41 -08:00
Sean Parkinson
695aa2e6a0
Ed25519 doxygen update
...
Fix return comments to match code.
2023-02-24 08:54:16 +10:00
Anthony Hu
c2daca1393
Fixes for encoding/decoding ecc public keys.
2023-02-23 13:56:48 -05:00
Anthony Hu
d85ee5c87f
Merge pull request #6124 from embhorn/zd15573
...
Fix NID conflict NID_givenName and NID_md5WithRSAEncryption
2023-02-23 18:15:28 +00:00
David Garske
69ceedbcff
Merge pull request #5938 from JacobBarthelmeh/RT1170
...
Port to RT1170 and expand CAAM driver
2023-02-22 20:11:58 -08:00
David Garske
ffa392cdb5
Merge pull request #6125 from embhorn/gh6007
...
Include sys/time.h for WOLFSSL_RIOT_OS
2023-02-22 16:06:10 -08:00
David Garske
434e869b1d
Merge pull request #6109 from nunojpg/master
...
Fix out of bound memset to 0
2023-02-22 15:43:09 -08:00
David Garske
a8b8092ff8
Merge pull request #6122 from anhu/WOLFSSL_HAVE_KYBER
...
HAVE_KYBER --> WOLFSSL_HAVE_KYBER
2023-02-22 14:55:29 -08:00
JacobBarthelmeh
121ee7a6df
fix spelling, refactor openssl extra struct, remove magic number, use static mutex
2023-02-22 14:31:16 -08:00
David Garske
2e7713f4c2
Merge pull request #6120 from embhorn/zd15698
...
Fix NULL dereference in TLSX_CSR_Parse
2023-02-22 13:43:43 -08:00
Eric Blankenhorn
3d71d3c388
Include sys/time.h for WOLFSSL_RIOT_OS
2023-02-22 15:36:50 -06:00
Eric Blankenhorn
b32036258d
Fix NID conflict NID_givenName and NID_md5WithRSAEncryption
2023-02-22 15:02:52 -06:00
Anthony Hu
bd3ae97603
HAVE_KYBER --> WOLFSSL_HAVE_KYBER
2023-02-22 15:05:47 -05:00
JacobBarthelmeh
b801a96f8c
Port to RT1170 and expand CAAM driver
2023-02-22 08:26:25 -08:00
Eric Blankenhorn
0a928208f2
Fix NULL dereference in TLSX_CSR_Parse
2023-02-22 08:19:11 -06:00
Sean Parkinson
b81759173a
Merge pull request #5840 from kareem-wolfssl/dynSessCache2
...
Add dynamic session cache which allocates sessions from the heap.
2023-02-22 15:14:38 +10:00
David Garske
74bad76707
Merge pull request #6117 from SparkiDev/priv_key_id_fix
...
Private Key ID: change to always set priv key type and size
2023-02-21 19:23:51 -08:00
Sean Parkinson
05365f6052
Merge pull request #6116 from dgarske/various2
...
Cleanup function logging
2023-02-22 12:27:26 +10:00
Tesfa Mael
bfcc615e44
Fix rpm build
2023-02-21 15:02:10 -08:00
Sean Parkinson
39cfd8e566
Private Key ID: change to always set priv key type and size
...
When a certificate is loaded then the private key type and size is set
based on the public key.
Always set, even if previously set.
Use case is setting an RSA certificate against ctx and then setting EC
certificate against ssl.
2023-02-22 08:07:27 +10:00
Rhys Hansen
fa41754b83
RX64/RX71 SHA hardware support updates
...
Made the following updates based on review feedback
Fixed mixed variable declaration and simplified cases by typedefing
wolfssl_RX64_HW_Hash to wc_Sha, wc_Sha224, & wc_Sha256
Added files to include.am so they are built when using make
Add WOLFSSL_RENESAS_RX64_HASH to settings.h and set WOLFSSL_NO_HASH_RAW
in settings.h based on value of WOLFSSL_RENESAS_RX64_HASH
Add and handle return value for rx64_hw_Open
Fix some minor formatting and comments
2023-02-21 15:46:25 -06:00
Rhys Hansen
e47633ad83
Add RX64/RX71 SHA hardware support
...
Adding support for SHA1, SHA224, and SHA256 hardware acceleration on
Renesas RX64 and RX71 microcontrollers.
This follows the a similar pattern as the Renesas TSIP support.
Speed comparison for hashing 64KB of data on a RX64M
| Hash Speed | SHA1 | SHA256 |
|:----------:|:----:|:------:|
| Hardware | 4ms | 4ms |
| Software | 11ms | 89ms |
Update define for RX64/RX71 SHA hardware support
This will allow for different hardware acceleration modules to be
enabled individually.
Init & Close for the RX64/RX71 SHA subsystem for WolfCrypt
This ensures that the SHA subsystem is ready for use when WolfCrypt
needs access to it.
Shorten the max line length, clean up comments
This wraps code and comments at 80 characters and adds some comments
2023-02-21 15:46:17 -06:00
David Garske
fc6d693dae
Update logging enter, exit, msg to match function names. Fix some typos and improper use of "enter". Fix internal uses of SSL_SUCCESS and SSL_FAILURE. Add WOLFSSL_DEBUG_NONBLOCK option to allow printing iterations without debug enabled.
2023-02-21 12:02:15 -08:00
JacobBarthelmeh
da04e0fb4c
Merge pull request #6115 from SKlimaRA/SKlimaRA/fix-decompress-dynamic
...
fixed heap corruption
2023-02-21 11:58:11 -07:00
Anthony Hu
a6114afb84
Merge pull request #6114 from dgarske/stm32_hash
...
Fix for STM32 hashing hardware
2023-02-21 18:37:03 +00:00
gojimmypi
821120e31c
Add SHA512/224 and SHA512/256 benchmarks ( #6113 )
2023-02-21 09:27:03 -08:00
Stanislav Klima
208056b2da
fixed heaap corruptions
2023-02-21 11:01:50 +01:00
Daniel Pouzzner
e0abb0e306
Merge pull request #6097 from gojimmypi/New_SHA512_Tests
...
Add new SHA-512/224 and SHA-512/256 tests
2023-02-21 01:39:38 -06:00
David Garske
6820fea5d3
Merge pull request #6111 from SparkiDev/sp_point_add_fix
...
SP: fix point_add_qz1
2023-02-20 17:05:21 -08:00
gojimmypi
136267d29c
Add new SHA-512/224 and SHA-512/256 tests
2023-02-20 16:55:38 -08:00
David Garske
5ec62c8d48
Merge pull request #6096 from SparkiDev/armv7a_neon_config
...
ARMv7a neon configure.ac
2023-02-20 15:22:20 -08:00
David Garske
39e72630ce
Proper fix for STM32 hashing. FIFO is always 32 bytes. The original U5/H7 proper fix is to make sure the hash is "done" before saving state.
2023-02-20 15:14:44 -08:00
András Fekete
c055740e6a
Merge pull request #6100 from julek-wolfssl/stunnel-github-action-test
...
Add OSP github action
2023-02-20 15:41:58 -05:00
Juliusz Sosinowicz
261054896c
Actions fix
...
Fix for `workflows must be defined at the top level of the .github/workflows/ directory` error.
2023-02-20 18:42:47 +01:00
Juliusz Sosinowicz
8b7ea9e820
Refactor os-check.yml
2023-02-20 18:42:47 +01:00
Juliusz Sosinowicz
04cc85b31e
Separate out into different files
2023-02-20 18:29:41 +01:00
Juliusz Sosinowicz
d3551acc2b
Code review
2023-02-20 18:29:41 +01:00
Juliusz Sosinowicz
36df1e1ae9
Add OSP github action
2023-02-20 18:29:41 +01:00
Sean Parkinson
9a7cd7367a
SP: fix point_add_qz1
...
Better detection of when add won't work and double needed.
Minor reorg of point operations.
2023-02-20 21:53:52 +10:00
Nuno Gonçalves
4e6bad1225
Fix out of bound memset to 0
...
In case buf size sz is too small it will get updated to the larger required value
and can't be used anymore to clear the buffer.
As the buffer is untouched don't need to clear it anyway.
Signed-off-by: Nuno Gonçalves <nunojpg@gmail.com >
2023-02-18 10:40:21 +00:00
Daniel Pouzzner
6cc5c1a428
Merge pull request #6102 from dgarske/non_const
...
Fix for "expression must have a constant value" in tls13.c
2023-02-17 21:07:27 -06:00
David Garske
1bae1ef63e
Merge pull request #6101 from kaleb-himes/invalid-pp-macro
...
Fix invalid PP macro logic, guard under same conditions as internal.h
2023-02-17 17:05:50 -08:00
Chris Conlon
588b694c7d
Merge pull request #5709 from TakayukiMatsuo/ccv
2023-02-17 17:02:04 -07:00
Kareem
8de2eba9ab
Fix allocating new sessions using the dynamic session cache.
2023-02-17 15:25:12 -07:00
David Garske
c476dd6e28
Merge pull request #6103 from SparkiDev/sp_ecdsa_sig_r0
...
SP ECC sign: reject random k when r is 0
2023-02-17 13:58:53 -08:00
David Garske
8a6483f13a
Merge pull request #6080 from tim-weller-wolfssl/zd15632-oob-in-cert-parsing
...
zd15632 - OSS-Fuzz #55810 : Out-of-bounds read in certificate parsing
2023-02-17 12:08:11 -08:00
David Garske
4edb7e26b9
Merge pull request #6104 from douzzer/20230216-readability-redundant-preprocessor
...
20230216-readability-redundant-preprocessor
2023-02-17 10:31:27 -08:00
David Garske
24fd561bf8
Merge pull request #6099 from bandi13/ocsp-cleanup
...
Be more aggressive in killing processes
2023-02-17 09:28:14 -08:00
Daniel Pouzzner
21645460cd
src/tls13.c: fix a readability-redundant-preprocessor in CheckPreSharedKeys().
2023-02-16 23:37:43 -06:00
Sean Parkinson
26b7052b3f
SP ECC sign: reject random k when r is 0
...
SP ECC signing code was generating signatures with r of 0.
This is not allowed by the algorithm description.
Retry sig gen when r is 0 like when s is 0.
2023-02-17 08:55:59 +10:00
David Garske
d488693f15
Allow #define HAVE_LIBZ support in user_settings.h.
2023-02-16 14:20:57 -08:00
David Garske
82d65481bb
Fix for "expression must have a constant value" in tls13.c with GreenHills compiler.
2023-02-16 13:58:48 -08:00
kaleb-himes
b2caa5c5ae
Fix invalid PP macro logic, guard under same conditions as internal.h
2023-02-16 14:40:43 -07:00
David Garske
0b31d5577c
Merge pull request #6098 from bandi13/moreDockerprograms
...
Some tests need these utilities
2023-02-16 13:28:02 -08:00
Andras Fekete
fdb0338473
Be more aggressive in killing processes
2023-02-16 09:55:52 -05:00
Andras Fekete
ff96150404
Some tests need these utilities
2023-02-16 09:51:46 -05:00
tim-weller-wolfssl
dea123f88e
Minimal changes to avoid Out-of-Bounds write in ASN.1 parsing logic. Add unit tests for ParseCert() API passing badly formed ASN data (should error out gracefully).
2023-02-16 07:49:08 -06:00
David Garske
0a6dedab03
Merge pull request #6094 from SparkiDev/aes_gcm_stream_bench
...
AES GCM benchmark: separate aes-gcm streaming runs
2023-02-15 21:10:48 -08:00
David Garske
464c2d19dc
Merge pull request #6006 from SparkiDev/tls13_only_psk_dhe_ke
...
TLS 1.3 PSK: add option to require only PSK with DHE
2023-02-15 21:10:27 -08:00
Daniel Pouzzner
859b1ff398
Merge pull request #6093 from dgarske/fix_async
...
Fix issue with async and `WOLFSSL_CHECK_ALERT_ON_ERR`
2023-02-15 19:49:56 -06:00
Sean Parkinson
aaed553311
Merge pull request #6092 from dgarske/various
...
Various cleanups (STM docs, include case, make dist small script)
2023-02-16 11:23:51 +10:00
Kareem
1167ad623b
Dynamic session cache: code review feedback
2023-02-15 17:38:14 -07:00
Sean Parkinson
85314e6ba5
ARMv7a neon configure.ac
...
Support other CPUs that start with armv7a.
2023-02-16 10:36:38 +10:00
Sean Parkinson
195ca1a20a
AES GCM benchmark: separate aes-gcm streaming runs
...
Always to AES-GCM one-shot benchmark.
When WOLFSSL_AESGCM_STREAM, always perform AES-GCM streaming benchmark.
2023-02-16 09:37:00 +10:00
Sean Parkinson
b624fc8377
TLS 1.3 PSK: add option to require only PSK with DHE
...
Can specify only PSK without DHE.
Add only PSK with DHE.
2023-02-16 09:21:29 +10:00
David Garske
18bee3142d
Fix to use the right cert/key in the API unit test if overridden.
2023-02-15 14:57:43 -08:00
David Garske
e8a26c673a
Fix for async with WOLFSSL_CHECK_ALERT_ON_ERR.
2023-02-15 14:57:34 -08:00
David Garske
47801107da
Fix to make sure API unit test always calls init/cleanup when not running all tests.
2023-02-15 14:24:22 -08:00
David Garske
5481a059c4
Fix wincrypt.h include header case when used with case sensitive file system.
2023-02-15 11:44:34 -08:00
David Garske
6ea3fe2f7a
Merge pull request #6089 from kaleb-himes/stunnel-5_67_support_fix
...
Fix unused variable warning when configuring with --enable-apachehttpd
2023-02-15 08:39:30 -08:00
Sean Parkinson
089ef86587
Merge pull request #6090 from douzzer/20230214-mollify-iso-c-pedantic
...
20230214-mollify-iso-c-pedantic
2023-02-15 17:04:07 +10:00
Daniel Pouzzner
ca87a99646
src/ssl.c and src/x509.c: use the customary function pointers (WOLFSSL_CRYPTO_EX_*()), not void *, in the arg lists of wolfSSL_CTX_get_ex_new_index() and wolfSSL_X509_get_ex_new_index(), to avoid "ISO C forbids passing argument ... between function pointer and ‘void *’";
...
move typedefs for WOLFSSL_CRYPTO_EX_*() from wolfssl/openssl/compat_types.h to wolfssl/wolfcrypt/types.h, grouped with the other EX_DATA-related typedefs, as they are needed whenever defined(HAVE_EX_DATA) regardless of openssl compatness;
properly gate wolfSSL_CTX_get_ex_new_index() and wolfSSL_X509_get_ex_new_index() prototypes on defined(HAVE_EX_DATA).
2023-02-14 19:28:40 -06:00
David Garske
7e582932f3
Improve documentation for STM32 PKA support.
2023-02-14 14:27:05 -08:00
David Garske
100ec1e7e6
Fix ./scripts/makedistsmall.sh for Docker and RTOS.
2023-02-14 14:25:40 -08:00
Kaleb Himes
dead56b3cb
Merge pull request #6086 from julek-wolfssl/explicit-rwlock
...
Make rwlock an explicit enable option
2023-02-14 15:04:13 -07:00
kaleb-himes
2719943ffd
Fix unused variable warning when configuring with --enable-apachehttpd
2023-02-14 14:25:57 -07:00
Juliusz Sosinowicz
0cedc4e1ac
stunnel 5.67 support ( #6020 )
...
* stunnel 5.67 support
- ssl->session->ticketAdd may be set when parsing a ticket before PSK
- PSK binders should be calculated based on ciphersuite associated with PSK
- Add option to prioritise PSK order instead of ciphersuite order
- Update ctx->method->version when using Set_CTX_max_proto_version API
- Simplify wolfSSL_parse_cipher_list
- Keep copy of old list and then add in the previous ciphersuites depending on whether we are doing only TLS 1.3 ciphersuites or not
- Specify CRL revocation in alert
- Match reason string to match OpenSSL
- Add support for external data callbacks for WOLFSSL_SESSION
* Upref the session for stunnel instead of duplicating it
* Add small stack option for wolfSSL_parse_cipher_list
2023-02-14 09:38:28 -08:00
tmael
c4fa013800
Fix for BIO_reset() ( #5887 )
...
* Fix for BIO_reset
* Introduced BIO_FLAGS_MEM_RDONLY
2023-02-14 08:54:25 -08:00
Juliusz Sosinowicz
bcfd5fb66b
Make rwlock an explicit enable option
2023-02-14 13:55:59 +01:00
Sean Parkinson
2fe34facba
Merge pull request #6084 from philljj/zd15607
...
Check keyLen matches cipher in wolfSSL_CMAC_Init.
2023-02-14 12:51:20 +10:00
David Garske
6e21b8c907
Merge pull request #6085 from anhu/env_shell
...
Invoke shell for shell scripts.
2023-02-13 14:53:47 -08:00
gojimmypi
ed79545a27
Espressif examples run with local wolfSSL (no setup!) ( #6018 )
...
* Espressif examples run with local wolfSSL (no setup!)
* include.am Espressif local no-setup component files
* cleanup Espressif Example CMakeLists.txt, use function
* multiple wolfSSL installs is now a fatal Espressif build error
* Examples no longer need setup
* CompileAll builds local examples, not IDF_PATH ones
* Espressif compileAllExamples both local & ESP-IDF components
* add wolfssl_test_idf test project
* move VisualGDB projects to subdirectories
* move VisualGDB wolfssl_server to subdirectory
* update include.am for moved VisualGDB project files
2023-02-13 14:37:56 -08:00
David Garske
6877c98d82
Merge pull request #6081 from douzzer/20230211-wolfcrypttest-fixes
...
20230211-wolfcrypttest-fixes
2023-02-13 14:28:43 -08:00
Anthony Hu
eedc8fa0b3
Invoke shell for shell scripts.
2023-02-13 15:58:15 -05:00
Daniel Pouzzner
a945017a88
wolfcrypt/test/test.c: around ecc_ctx_kdf_salt_test(): fix fips gating, fix length handling for "message", fix memory leaks;
...
in crypto_ecc_verify(), crypto_ecc_sign(), ecc_test_nonblock_dhe(), and ecc_test_nonblock_ecdsa(), add codepoint-specific retvals.
2023-02-13 14:21:50 -06:00
David Garske
405b98aaa4
Merge pull request #6078 from SparkiDev/rsapss_openssl_compat
...
X509 RSA PSS: fixes for OpenSSL compat layer
2023-02-13 08:43:10 -08:00
Daniel Pouzzner
295da3232a
Merge pull request #6082 from SparkiDev/asn_dsa_mp_int_leak
...
ASN template, DSA: Clear the mp_int before re-reading data
2023-02-12 22:28:11 -06:00
Sean Parkinson
0a8753d2b2
ASN template, DSA: Clear the mp_int before re-reading data
...
Make sure the mp_int is cleared so that any exisiting bigint is freed.
Tidy up api.c code.
2023-02-13 11:08:18 +10:00
jordan
909aa86d2d
Check keyLen matches cipher in wolfSSL_CMAC_Init.
...
Fixes ZD15607.
2023-02-12 18:26:40 -06:00
Kareem
5a77db3f20
Add dynamic session cache which allocates sessions from the heap.
2023-02-10 14:18:03 -07:00
tmael
55a7e24cfe
Support pthread_rwlock ( #5952 )
...
* Support rwlock
* Fix typo, ENABLE_SESSION_CACHE_ROW_LOCK with TITAN_SESSION_CACHE
* Implement read lock
- Use read lock for the SessionCache
- Don't copy the
* TLS 1.3: Don't push ticket to cache if we don't retrieve from it
* Detect rwlock support with PTHREAD_RWLOCK_INITIALIZER
* Implement explicit rwlocks
- Mutex's still necessary for signals. Implement explicit rwlocks and we can migrate critical mutexs to rwlocks when necessary.
* Remove WOLFSSL_USE_RWLOCK guard around mutex condLock
* condLock not necessary after all
* Use configure.ac to check for pthread_rwlock_destroy support
* Can't include config.h in wc_port.h as that breaks make distcheck
* Check for pthread_rwlock_t to determine if rwlock is available
* Code review
---------
Co-authored-by: Juliusz Sosinowicz <juliusz@wolfssl.com >
2023-02-10 10:42:38 -08:00
John Bland
338d8db274
Ecc ctx state fix ( #6077 )
...
* set the client state correctly when wc_ecc_ctx_set_kdf_salt is called
* add test that covers wc_ecc_ctx_set_kdf_salt
* use shared key and smallstack to reduce test stack usage
2023-02-10 10:05:52 -08:00
philljj
5b8fda1ac6
Fix overflow in fp_to_unsigned_bin_len length check. ( #6075 )
...
* Fix overflow in fp_to_unsigned_bin_len length check.
* Add a second check when i == a->used - 1.
2023-02-10 08:46:37 -08:00
TakayukiMatsuo
0c771a93dc
Improve TLS1.2 client authentication to use TSIP
2023-02-10 16:16:25 +09:00
Daniel Pouzzner
c2384674d8
Merge pull request #6079 from SparkiDev/aes-ecb-len-aesni
...
AES ECB/CTR/XTS: enable AES-NI usage
2023-02-09 21:17:50 -06:00
Sean Parkinson
b359dd27e4
AES ECB/CTR/XTS: enable AES-NI usage
...
Perform multiple blocks of encryption/decryption in assembly call with
ECB.
This improves performance of ECB, CTR and XTS on Intel x64.
2023-02-10 11:14:06 +10:00
Sean Parkinson
9750fc4485
X509 RSA PSS: fixes for OpenSSL compat layer
...
Add NIDs for RSA-PSS to OpenSSL compat layer.
Have wc_RsaPublicKeyDecode call wc_RsaPublicKeyDecode_ex where logic for
RSA-PSS handling is already done.
2023-02-10 10:25:49 +10:00
Hideki Miyazaki
d336e22b85
Allow reading ENC EC PRIVATE KEY as well via wolfSSL_PEM_read_bio_ECPrivateKey ( #6055 )
...
* fix qt qsslkey unit test
2023-02-09 14:48:52 -08:00
Sean Parkinson
7a6f7ff6b7
Merge pull request #6076 from dgarske/fix_async
...
Fix for possible uses of NULL with heap hint in pk.c
2023-02-10 08:26:44 +10:00
David Garske
8929b31b84
Fix for possible uses of NULL in heap hint. The api.c has expected "bad" test cases where the key is passed in as NULL and the XFREE tries to use it. Tested with: ./configure --enable-asynccrypt --with-intelqa=../QAT1.8 --enable-all && make && sudo ./tests/unit.test
2023-02-09 10:18:37 -08:00
David Garske
05f8abd524
Merge pull request #6064 from embhorn/gh6063
...
Add WOLFSSL_IP_ALT_NAME to --enable-curl; fix unused error in FindPsk
2023-02-09 08:38:38 -08:00
Sean Parkinson
644d92f28c
Merge pull request #6074 from douzzer/20230208-fixes
...
20230208-fixes
2023-02-09 16:18:35 +10:00
Daniel Pouzzner
9dd23fca25
wolfcrypt/src/pwdbased.c: refactor copy in scryptSalsa() as a memcpy(), for efficiency and to work around a bug in clang-17; also fix scratch buffer x in scryptBlockMix() to have correct alignment.
2023-02-08 21:31:56 -06:00
Daniel Pouzzner
63fdc4e843
src/ssl.c: fix PK object on stack in wolfSSL_i2d_PublicKey().
2023-02-08 21:30:50 -06:00
Daniel Pouzzner
ef0eda4091
cleaner fix for bugprone-signed-char-misuse first addressed in 38c057a084.
2023-02-08 21:28:34 -06:00
Sean Parkinson
49a500c2af
Merge pull request #6070 from bandi13/coverityFixes
...
Coverity fixes
2023-02-09 10:21:12 +10:00
Sean Parkinson
008d2962d7
Merge pull request #6072 from bandi13/dsaNoInit
...
Fix for calling 'mp_clear(tmp)' without having called 'mp_init(tmp)'
2023-02-09 10:18:51 +10:00
John Bland
e9aeb1a857
Add nuttx integration ( #6043 )
2023-02-08 16:04:53 -08:00
David Garske
619a587a7b
Merge pull request #6071 from bandi13/extraPackagesForDocker
...
Add in a few more utilities that we need
2023-02-08 14:53:20 -08:00
David Garske
7f9b764eb5
Merge pull request #6054 from anhu/d2i_publickey_fix
...
Ensure that i2d APIs for public keys gives appropriate data.
2023-02-08 14:44:29 -08:00
David Garske
1da392c297
Merge pull request #6069 from philljj/spelling_cleanup
...
Spelling cleanup: configure.ac, ssl.c, ssl.h
2023-02-08 14:40:03 -08:00
Sean Parkinson
7a30617b26
Merge pull request #6073 from dgarske/shake_bench
...
Fix for benchmarking shake with custom block size
2023-02-09 08:06:24 +10:00
Andras Fekete
767c282c1d
Addressing PR comments
2023-02-08 16:35:03 -05:00
Daniel Pouzzner
6a24cdaa42
Merge pull request #6067 from SparkiDev/sp_int_fixup_5
...
SP int: tidy up ifdef
2023-02-08 13:50:50 -06:00
David Garske
cefd55eb74
Fix for benchmarking shake with custom block size. Using ./benchmark -shake 1024 caused seg fault.
2023-02-08 11:25:53 -08:00
Andras Fekete
08c63d55dc
Addressing PR comments
2023-02-08 13:18:13 -05:00
Andras Fekete
38f2f43705
Fix for calling 'mp_clear(tmp)' without having called 'mp_init(tmp)'
2023-02-08 13:08:12 -05:00
Andras Fekete
06d6f2d4b6
One more app for debugging
2023-02-08 11:25:11 -05:00
Andras Fekete
94c01d9f4e
Add in a few more utilities that we need
2023-02-08 10:52:00 -05:00
Anthony Hu
7a6ed68f2d
Ensure that i2d APIs for public keys gives appropriate data.
2023-02-08 09:54:28 -05:00
jordan
cc791a7a53
Spelling cleanup: configure.ac, ssl.c, ssl.h
2023-02-07 21:45:06 -06:00
Sean Parkinson
3e82abd002
SP int: tidy up ifdef
2023-02-08 10:45:00 +10:00
Andras Fekete
62cfd8725a
Disable latest OpenWrt test
2023-02-07 18:17:39 -05:00
Sean Parkinson
1912aaf91b
EC OpenSSL compat: validate point after setting
...
wolfSSL_EC_POINT_set_affine_coordinates_GFp wasn't checking the point is
valid for the curve. Added call to check point when setting.
Made check available for opensslextra.
Fixed test to have valid ordinates to set.
2023-02-07 18:17:39 -05:00
Sean Parkinson
3e445b5ba0
SP int: sp_invmod_mont_ct check err before setting
...
Two places in sp_invmod_mont_ct were not checking err is set before
performing a new operation and setting err. Change to check error before
performing operation.
2023-02-07 18:17:39 -05:00
David Garske
ee12a5f0c6
Merge pull request #6048 from SparkiDev/asn1_template_def
...
ASN: make template default for configure
2023-02-07 14:15:57 -08:00
David Garske
299bee96d2
Merge pull request #6060 from SparkiDev/sp_int_fixes_4
...
SP int: fix sp_div_2 to use signed integer
2023-02-07 14:13:02 -08:00
David Garske
9f5ffe6bd7
Merge pull request #6066 from SparkiDev/int_fast_mont_red_oob
...
integer.c: fast mod reduce fix
2023-02-07 14:12:13 -08:00
Eric Blankenhorn
2539ba3f3d
Add WOLFSSL_IP_ALT_NAME to --enable-curl; fix unused error in FindPsk
2023-02-07 15:51:09 -06:00
David Garske
3ae8bac3b2
Merge pull request #6065 from SparkiDev/ec_point_cmp_jacobian
...
wolfSSL_EC_POINT_cmp: handle Jacobian ordinates
2023-02-07 10:04:37 -08:00
Sean Parkinson
20ae076b80
integer.c: fast mod reduce fix
...
When using small stack, not enough memory uas being allocated in
fast_mp_montgomery_reduce().
Allocate the required space and memset all used memory.
2023-02-07 11:29:53 +10:00
Sean Parkinson
92065b61b3
wolfSSL_EC_POINT_cmp: handle Jacobian ordinates
...
API support doesn't allow for a point to be in Jacobian ordinates.
wolfSSL_EC_POINT_add() has ordinates in Montgomery form.
When needed, compile with WOLFSSL_EC_POINT_CMP_JACOBIAN.
2023-02-07 11:02:50 +10:00
Sean Parkinson
ca0731616f
SP int: fix sp_div_2 to use signed integer
...
sp_div_2 no longer handled a->used of 0 and 1.
Rework to have have internal APIs that don't return errors and use them
where no error is expected.
2023-02-07 08:51:15 +10:00
Sean Parkinson
bd155389e2
ASN: make template default for configure
...
When loading DH private key, create the public key if not found.
Failures fixed.
2023-02-07 08:49:46 +10:00
David Garske
2448adf68b
Merge pull request #6051 from philljj/zd15531
...
Fix wolfSSL_ASN1_INTEGER_to_BN for negative values
2023-02-06 12:46:21 -08:00
David Garske
cc037447dd
Merge pull request #6062 from bandi13/disableOpenWrtSnapshot
...
Disable latest OpenWrt test
2023-02-06 08:06:31 -08:00
Andras Fekete
dc08ecf287
Disable latest OpenWrt test
2023-02-06 11:03:41 -05:00
David Garske
8a212ec351
Merge pull request #6042 from SparkiDev/ec_point_set
...
EC OpenSSL compat: validate point after setting
2023-02-06 07:14:19 -08:00
Sean Parkinson
c9fefe660f
EC OpenSSL compat: validate point after setting
...
wolfSSL_EC_POINT_set_affine_coordinates_GFp wasn't checking the point is
valid for the curve. Added call to check point when setting.
Made check available for opensslextra.
Fixed test to have valid ordinates to set.
2023-02-06 12:22:17 +10:00
David Garske
a8c2a9aeab
Merge pull request #6040 from SparkiDev/sp_invmod_mont_ct_err
...
SP int: sp_invmod_mont_ct check err before setting
2023-02-05 14:17:51 -08:00
David Garske
3cdda2adf0
Merge pull request #6056 from ejohnstown/ssh-kdf-inlines
...
Build Fixes
2023-02-04 10:37:16 -08:00
David Garske
a4ffe085a0
Merge pull request #6052 from rizlik/fix_ret_create
...
fix: propagate WOLFSSL_TICKET_RET_CREATE from DoDecryptTicket()
2023-02-03 17:32:26 -08:00
John Safranek
8e57ff08ab
Build Fixes
...
./configure --enable-wolfssh --enable-cryptonly \
--disable-asn --disable-rsa --disable-ecc
./configure --disable-asn --disable-rsa --disable-ecc --enable-psk
./configure --enable-cryptonly --disable-asn --disable-rsa --disable-ecc
1. Fails compiling the KDF file, can't find c32toa inline function.
2. In configure, move the check for ECC when ASN is disabled up to the
other ASN checks. It also needs to be checked with cryptonly is
disabled.
2023-02-03 16:09:27 -08:00
Marco Oliverio
a9ffbae7af
test: add test to check new ticket is created when resuming
2023-02-03 22:16:06 +00:00
David Garske
646b363e49
Merge pull request #6053 from JacobBarthelmeh/freebsd
...
fix DTLS test case for when able to read peers close notify alert
2023-02-03 14:10:33 -08:00
David Garske
c6018b837d
Merge pull request #6050 from JacobBarthelmeh/time
...
fix warning if ltime is unsigned
2023-02-03 11:06:17 -08:00
JacobBarthelmeh
f55f9bfd36
fix DTLS test case for when able to read peers close notify alert
2023-02-03 11:05:56 -08:00
David Garske
29c884eafd
Merge pull request #6045 from JacobBarthelmeh/PKCS7
...
add sequence around algo parameters with authenvelop
2023-02-03 10:29:19 -08:00
David Garske
1027c0667a
Merge pull request #6049 from SparkiDev/sp_int_used_size
...
SP int: make used and size fields unsigned
2023-02-03 09:38:40 -08:00
Marco Oliverio
a2bf82397a
fix: propagate WOLFSSL_TICKET_RET_CREATE from DoDecryptTicket()
2023-02-03 17:33:24 +00:00
jordan
f61dce8746
Fix wolfSSL_ASN1_INTEGER_to_BN for negative values
...
Added mp_setneg for ZD#15531.
2023-02-03 08:51:46 -06:00
Jacob Barthelmeh
d184a17644
fix warning if ltime is unsigned
2023-02-03 07:43:08 -07:00
Sean Parkinson
3455e726f9
SP int: make used and size fields unsigned
...
used and size have no reason to be negative - change type.
Change code to match unsigned change. Mostly change variables to be
unsigned where possible.
integer.c: Only have mp_rand_prime available when needed and
mp_prime_is_prime_ex is available.
Fixes from regression testing.
2023-02-03 17:09:56 +10:00
David Garske
ef266d7e0b
Merge pull request #6047 from SparkiDev/refinc_ret_check
...
Ref counting: rework for static analysers
2023-02-02 18:46:34 -08:00
David Garske
8ecf6f3381
Merge pull request #6046 from ejohnstown/srtp-marshal
...
SRTP Marshaling
2023-02-02 18:03:31 -08:00
Sean Parkinson
f6da3a26ac
Ref counting: rework for static analysers
...
When always reference counting APIs always return 0 don't check return
value for error.
Reference decrement set isZero to false on error.
2023-02-03 10:13:32 +10:00
John Safranek
ca999f932c
SRTP Marshaling
...
1. Changed the loop over the SRTP setting bitfield when it is encoded
for the TLS extension.
2023-02-02 14:51:12 -08:00
JacobBarthelmeh
9e9315f480
add sequence around algo parameters with authenvelop
2023-02-02 10:54:38 -08:00
David Garske
a4f55b01d6
Merge pull request #6041 from JacobBarthelmeh/seco
...
Fix to mask the argument for enc/dec flag used with GCM/CCM in CAAM+SECO build
2023-02-02 08:32:48 -08:00
Sean Parkinson
447991a9c2
Merge pull request #5949 from JacobBarthelmeh/Testing
...
add pragram around sanity check for vcpkg build warning
2023-02-02 10:34:14 +10:00
Sean Parkinson
55d43a46b8
SP int: sp_invmod_mont_ct check err before setting
...
Two places in sp_invmod_mont_ct were not checking err is set before
performing a new operation and setting err. Change to check error before
performing operation.
2023-02-02 08:45:45 +10:00
JacobBarthelmeh
d76195c52a
add fix GCM use with CAAM SECO
2023-02-01 14:42:39 -08:00
David Garske
087e2dc22a
Merge pull request #6037 from douzzer/20230131-fixes-evp-af-alg
...
20230131-fixes-evp-af-alg
2023-02-01 07:09:02 -08:00
Daniel Pouzzner
a8a61fe6b7
evp.c: fix gating in wolfSSL_EVP_CIPHER_CTX_cleanup() to avoid switch-unreachable; also fix indentation.
2023-02-01 01:29:36 -06:00
Daniel Pouzzner
38c057a084
fix resource leak (missing calls to wc_AesFree()) in wolfSSL_EVP_CIPHER_CTX_cleanup();
...
fix file descriptor leaks in AF_ALG code, and fix return codes (WC_AFALG_SOCK_E, not -1) in afalg_aes.c;
fixes for sanitizer-detected forbidden null pointer args in AfalgHashUpdate() and AfalgHashCopy();
fixes for resource leaks in api.c test_wolfSSL_AES_cbc_encrypt() (missing wc_AesFree()s);
fixes for resource leaks in test.c openssl_test() (missing wolfSSL_EVP_CIPHER_CTX_cleanup());
also some local fixes for bugprone-signed-char-misuse, readability-redundant-preprocessor, and clang-diagnostic-strict-prototypes, in src/pk.c and src/ssl.c.
2023-02-01 00:49:34 -06:00
Anthony Hu
462f76c1ff
Merge pull request #6033 from dgarske/stm32_fixes
...
Fixes and cleanups for STM32
2023-01-31 12:13:13 -05:00
David Garske
9defb9a356
Merge pull request #6035 from gojimmypi/PK_SSL_init_vars
...
Initialize `OPENSSL_ALL` local size / length / type vars
2023-01-31 09:09:18 -08:00
David Garske
9b6e787071
Merge pull request #6034 from gojimmypi/Espressif_fix_6024
...
ESP32 SHA384 fixes
2023-01-31 09:08:54 -08:00
David Garske
934d8e274f
Merge pull request #5926 from SparkiDev/openssl_ec_api_rework
...
EC OpenSSL compat: rework EC API
2023-01-31 09:08:26 -08:00
gojimmypi
b10adae48f
Initialize OPENSSL_ALL local size / length / type vars
2023-01-30 17:30:56 -08:00
gojimmypi
53d6e79f89
ESP32 SHA384 fixes
2023-01-30 16:58:57 -08:00
David Garske
2d03a052e1
Fixes and cleanups for STM32:
...
* Fix for STM32 Hash peripherals (like on F437) with FIFO depth = 1.
* Cleanups for `XREALLOC` and new `WOLFSSL_NO_REALLOC` to force undef of `XREALLOC`.
* Change STM32 Cube to default to `NO_TLS_UART_TEST`.
2023-01-30 16:44:47 -08:00
Sean Parkinson
7691cd4b45
EC OpenSSL compat: rework EC API
...
Reworked the implementations of the EC APIs including:
wolfSSL_EC_curve, wolfSSL_EC_METHOD, wolfSSL_EC_GROUP,
wolfSSL_EC_POINT, wolfSSL_EC_KEY, wolfSSL_ECDSA_SIG, wolfSSL_ECDSA and
wolfSSL_ECDH.
Added support for EC parameters to PEM decoding.
EccEnumToNID() moved out of wolfCrypt - it maps NIDs defined in
wolfssl/openssl/ec.h to those in wolfssl/wolfcrypt/ecc.h.
Moved wc_OBJ_sn2nid() out of wolfCrypt - implementation uses
EccEnumToNID().
Changed reference counding to use wolfSSL_Ref.
Added tests to api.c that increase coverage of EC APIs.
2023-01-31 10:19:57 +10:00
David Garske
08538b69f3
Merge pull request #6016 from SparkiDev/sp_dh_agree_uinit
...
DH and SP: sp_DhExp_* called with uninitialized outLen
2023-01-30 15:56:46 -08:00
David Garske
66532ed052
Merge pull request #6032 from anhu/braces
...
Closing and opening scope around case statement.
2023-01-30 15:08:02 -08:00
David Garske
daa82e4653
Merge pull request #6030 from SparkiDev/sp_ecc_p256_arm64
...
SP Aarch64 ECC P256: mont reduce fix
2023-01-30 15:07:29 -08:00
Sean Parkinson
7cdf5c7956
SP Aarch64 ECC P256: mont reduce fix
...
For Montgomery Reduction of P256: Don't set x10 and x11 to words of mu
<< 32. x11 is needed later and there are plenty of registers.
2023-01-30 11:14:12 -08:00
David Garske
420f2f45c1
Merge pull request #6019 from SparkiDev/sp_arm64_cc
...
SP Aarch64: conditional changed in asm needs "cc"
2023-01-30 11:06:53 -08:00
Anthony Hu
242dcb0141
Closing and opening scope around case statement.
...
Related: ZD 15451
2023-01-30 13:45:03 -05:00
András Fekete
414c72adbc
Fix workflow concurrency ( #6031 )
...
* First test of the consolidated workflows
Co-authored-by: Andras Fekete <andras@wolfssl.com >
2023-01-30 10:10:54 -08:00
András Fekete
d72ea6101f
Merge pull request #6027 from SparkiDev/sp_int_div_small
...
SP int: div small static code analysis change
2023-01-30 10:34:05 -05:00
Sean Parkinson
0e16d2919f
Merge pull request #6022 from douzzer/20230127-fixes
...
20230127-fixes
2023-01-30 08:46:42 +10:00
Sean Parkinson
08afe6a404
SP int: div small static code analysis change
...
_sp_div_small: Make it explicit as possible that we only want the bottom
digit of the product subtracted from the bottom word of t. Top digit is
unnecessary and more cycles used if calculated.
2023-01-30 08:40:45 +10:00
David Garske
6e9d956a49
Merge pull request #6021 from kareem-wolfssl/zd15544
...
Fix for building with ASN template and `NO_ASN_TIME`
2023-01-27 18:19:19 -08:00
David Garske
ef8afa98a4
Merge pull request #6017 from cconlon/se050_tls_fixes
...
Fix SE050 RSA public key loading and RSA/ECC SE050 TLS Compatibility
2023-01-27 15:29:21 -08:00
Kareem
c70ca25282
Fix building NO_ASN_TIME with cert gen and OpenSSL Extra enabled.
2023-01-27 16:09:04 -07:00
Daniel Pouzzner
d077c39f42
wolfcrypt/test/test.c: in aes_xts_128_test(), gate in-place test on !HAVE_FIPS || FIPS_VERSION_GE(5,3); in hpke_test(), gate tests on availability of relevant ECC curve, not just on relevant digest.
2023-01-27 16:49:46 -06:00
Daniel Pouzzner
687bbeb712
wolfcrypt/src/port/arm/armv8-aes.c: harmonize arg validation in aarch64-armasm wc_AesCcm{En,De}crypt() with aes.c -- tolerate null in/out iff inSz==0.
2023-01-27 16:32:13 -06:00
Chris Conlon
f14c27f644
Fix SE050 RSA public key loading and RSA/ECC SE050 usage from TLS with WOLF_PRIVATE_KEY_ID
2023-01-27 14:28:47 -07:00
Kareem
4542eb0df1
Fix NO_ASN_TIME support for ASN template, also fix expired certificate unit tests with NO_ASN_TIME defined.
2023-01-27 12:39:53 -07:00
Sean Parkinson
f61938a882
SP Aarch64: conditional changed in asm needs "cc"
...
Add "cc" to asm that changes the conditional flags.
2023-01-27 16:33:06 +10:00
Sean Parkinson
134d4cca67
DH and SP: sp_DhExp_* called with uninitialized outLen
...
Fix for GeneratePublicDh was not right in #6002 .
sp_DhExp_* are called from multiple functions.
Sometimes outLen contains a value and sometimes not.
Check public key output size in GeneratePublicDh before calling SP.
2023-01-27 10:13:56 +10:00
David Garske
06509021ff
Merge pull request #6013 from douzzer/20230125-various-fixes
...
20230125-various-fixes
2023-01-26 15:10:18 -08:00
David Garske
58c2fe1c40
Merge pull request #6011 from SparkiDev/xts_in_place_enc_fix
...
AES XTS: encrypt not handling in-place properly
2023-01-26 14:04:58 -08:00
Andras Fekete
5b36d5235c
Always check to make sure 'sigCheckBuf' is within range
2023-01-26 16:23:39 -05:00
Andras Fekete
eaeff1e7c2
Avoid "use after free" error
2023-01-26 16:23:39 -05:00
Andras Fekete
3cfaa4c1ff
Handle return value
2023-01-26 16:23:39 -05:00
Daniel Pouzzner
f776371874
wolfcrypt/src/hpke.c: add PRIVATE_KEY_{UNLOCK,LOCK}() wrappers in wc_HpkeSealBase() and wc_HpkeOpenBase();
...
wolfcrypt/test/test.c: remove PRIVATE_KEY_{UNLOCK,LOCK}() wrappers from hpke_test_single(), and do a smallstack refactor.
2023-01-26 15:00:56 -06:00
Daniel Pouzzner
84a5bb67f2
tests/api.c: in test_tls13_apis(), conditionalize expected return value of wolfSSL_CTX_set_max_early_data() on WOLFSSL_ERROR_CODE_OPENSSL (only affects !OPENSSL_EXTRA paths).
2023-01-26 14:56:50 -06:00
Daniel Pouzzner
4b0e0b88fb
configure.ac: restore CPPFLAGS and CFLAGS to list of iterated options rendered into options.h; delete stale .build_params when ENABLED_REPRODUCIBLE_BUILD.
2023-01-26 14:53:56 -06:00
András Fekete
8eacd3acc9
Merge pull request #6015 from dgarske/wolf_products
...
Add user_settings.h template for wolfTPM
2023-01-26 15:33:54 -05:00
David Garske
10529e6199
Add user_settings.h template for wolfTPM
2023-01-26 10:40:59 -08:00
Daniel Pouzzner
c3a5698799
configure.ac/Makefile.am:
...
add support for EXTRA_CPPFLAGS, EXTRA_CCASFLAGS, and EXTRA_LDFLAGS;
fix typo in setup for CFLAG_VISIBILITY;
lightly refactor handling of CPPFLAGS/AM_CPPFLAGS in handlers for --with-liboqs, --with-wnr, and --with-cavium;
refactor+enhance options.h generation to handle -U directives.
2023-01-25 23:45:21 -06:00
Daniel Pouzzner
022d0e7c89
linuxkm/module_exports.c.template: include hpke.h if HAVE_HPKE.
2023-01-25 23:36:55 -06:00
Daniel Pouzzner
78cc2c5c3e
wolfcrypt/src/port/af_alg/afalg_aes.c: in wc_AesCbc{En,De}crypt(), handle WOLFSSL_AES_CBC_LENGTH_CHECKS as in wolfcrypt/aes.c; in wc_AesGcm{En,De}crypt(), truncate ivSz to WC_SYSTEM_AESGCM_IV if necessary.
2023-01-25 23:36:01 -06:00
Daniel Pouzzner
8f2ae77513
wolfcrypt/test/test.c: add missing PRIVATE_KEY_UNLOCK()/PRIVATE_KEY_LOCK() in hpke_test_single().
2023-01-25 23:32:55 -06:00
David Garske
584411f21a
Merge pull request #6012 from kareem-wolfssl/zd15524
...
Fix building FIPSv2 with WOLFSSL_ECDSA_SET_K defined.
2023-01-25 18:59:38 -08:00
András Fekete
8ecd906c23
Update open wrt test ( #6010 )
...
Adding in tests of various versions of OpenWrt. Also simplified the way to reproduce potential issues and added in breadcrumbs for debugging.
Co-authored-by: Andras Fekete <andras@wolfssl.com >
2023-01-25 13:58:52 -08:00
Kareem
c9125f9685
Fix building FIPSv2 with WOLFSSL_ECDSA_SET_K defined.
2023-01-25 14:49:05 -07:00
David Garske
7e1aecfe4c
Merge pull request #6001 from SparkiDev/dsa_sign_sig_size
...
DSA sign: use mp_to_unsigned_bin_len
2023-01-25 11:59:27 -08:00
David Garske
becedd41c9
Merge pull request #6000 from SparkiDev/dsa_force_zero
...
DSA: Don't force zero MPs on memory allocation failure
2023-01-25 11:59:13 -08:00
Sean Parkinson
214a6bd216
Merge pull request #6009 from douzzer/20230124-fix-HAVE_C___ATOMIC
...
20230124-fix-HAVE_C___ATOMIC
2023-01-25 15:34:30 +10:00
Sean Parkinson
e9af0136b9
AES XTS: encrypt not handling in-place properly
...
Fix AES XTS in-place encrypt to work when ciphertext stealing.
2023-01-25 09:32:37 +10:00
Daniel Pouzzner
b2c751a9ca
wolfcrypt/src/asn.c: fix a maybe-uninitialized found by clang --enable-asn=template.
2023-01-24 14:00:22 -06:00
Daniel Pouzzner
5e6005a1a3
m4/ax_atomic.m4: fix conflicting macro definition for HAVE_C___ATOMIC.
2023-01-24 12:08:35 -06:00
David Garske
a21c3a3c89
Merge pull request #6005 from SparkiDev/ecc_fp_alloc_fail_oob_1
...
ECC FP_ECC: zeroize when value set
2023-01-24 07:57:53 -08:00
David Garske
c9e1039a54
Merge pull request #6003 from SparkiDev/sp_math_ec_smul
...
EC scalar mult with SP Math: fix scalar length check
2023-01-24 07:54:02 -08:00
Sean Parkinson
a5adfcd5ca
ECC FP_ECC: zeroize when value set
...
accel_fp_mul was zeroizing an uninitialized MP - tk.
Add boolean, indicating to zeroize, that is set when a value is set.
2023-01-24 10:28:49 +10:00
Sean Parkinson
e34027ec76
SP EC ASM: mod_mul_norm fix
...
Handle corner case of overflow in last 32-bit word.
2023-01-24 10:12:32 +10:00
Sean Parkinson
4592f1a5b4
EC scalar mult with SP Math: fix scalar length check
...
The support curves in SP all have an order length the same as modulus
length. The scalar cannot be larger than the order and so fix the check.
2023-01-24 09:23:19 +10:00
David Garske
4b8ab2550d
Merge pull request #6004 from jpbland1/hpke-disable-harden
...
update hpke to not use rng with ecc when hardening is off
2023-01-23 15:09:30 -08:00
John Bland
44ca98f5b3
add missing NULL checks and remove rng pointer when not needed
2023-01-23 16:03:58 -05:00
David Garske
a24a1c8530
Merge pull request #5924 from SparkiDev/ref_cnt_update
...
Ref count: change to use wolfSSL_Ref
2023-01-23 08:33:37 -08:00
David Garske
9c1d214a61
Merge pull request #6002 from SparkiDev/sp_dh_exp_check_outlen
...
SP DH Exp: check output length for minimum
2023-01-23 08:32:12 -08:00
John Bland
a36276ca3a
update hpke to not use rng with ecc when hardening is off
2023-01-23 11:27:23 -05:00
Sean Parkinson
53dfcd00e2
Ref count: change to use wolfSSL_Ref
...
Data structures changed:
WOLFSSL_CERT_MANAGER, WOLFSSL_CTX, WOLFSSL_SESSION, WOLFSSL_X509,
WOLFSSL_X509, WOLFSSL_EVP_PKEY, WOLFSSL_BIO, WOLFSSL_X509_STORE
2023-01-23 16:29:12 +10:00
Sean Parkinson
1c4e1f8871
SP DH Exp: check output length for minimum
...
For DH Exp function in SP, don't assume output length has the minimum
length.
2023-01-23 09:43:58 +10:00
Sean Parkinson
90e24d8ba5
DSA sign: use mp_to_unsigned_bin_len
...
mp_to_unsigned_len checks length and front pads with zeros.
Return MP_VAL when length is too small in all implemenations.
Make TFM implementation check length.
Add test case.
2023-01-23 09:14:24 +10:00
Sean Parkinson
ffe302025e
DSA: Don't force zero MPs on memory allocation failure
...
When memory allocation fails, the MPs are not initialized and force zero
is using invalid values.
2023-01-23 08:33:09 +10:00
David Garske
a40da56f11
Merge pull request #5996 from douzzer/20230120-fixes
...
20230120-fixes
2023-01-21 08:32:14 -08:00
Daniel Pouzzner
aa776057ff
fixes: shellcheck gripes on Docker/OpenWrt/runTests.sh; null pointer derefs and duplicate tests and assigns in src/tls.c and wolfcrypt/src/hpke.c found by cppcheck (nullPointerRedundantCheck, identicalInnerCondition, duplicateAssignExpression).
2023-01-21 00:51:57 -06:00
Daniel Pouzzner
d711e4b9f8
Merge pull request #5995 from jpbland1/ech-no-recursion
...
stop ech from using a recursive function call
2023-01-20 23:47:22 -06:00
tmael
9d73c197e6
Move X509_V errors from enums to defines for HAProxy CLI ( #5901 )
...
* Move X509_V errors to openssl/ssl.h
* Have X509_V define errors in wolfssl/ssl.h
* Refactor X509_V errors
* Add wolfSSL_SESSION_set1_id_*
* Fix overlong line
2023-01-20 17:50:26 -08:00
András Fekete
b9a544920d
Add open wrt test ( #5985 )
...
* First test
* Don't forget to run autogen.sh!
* Add tools needed by automake
* Try additional platforms
* Add in qemu for other platforms
* No real support for arm containers
* Fix indentation
* Simplify container build with a testing script
* Simpler names for actions
* No need to distribute OpenWRT test files
* Better list to put ignore files onto
* Create an 'ignore_files' list after all
* Add in some documentation of how OpenWRT tests work
* Fix up naming of OpenWrt
Co-authored-by: Andras Fekete <andras@wolfssl.com >
2023-01-20 16:59:36 -08:00
David Garske
6206ad320c
Merge pull request #5992 from tim-weller-wolfssl/zd15423-accepts-large-ivs
...
Update AES-GCM stream decryption to allow long IVs (ZenDesk #15423 )
2023-01-20 16:10:13 -08:00
David Garske
d28bd08093
Merge pull request #5994 from bandi13/noAutoCancelActions
...
Don't auto-cancel GitHub Workflows
2023-01-20 16:09:56 -08:00
John Bland
d14d29e32a
stop ech from using a recursive function call
...
update bad return value for when retry_configs is returned, add locks around hkdf functions for private key use
2023-01-20 18:37:19 -05:00
Andras Fekete
7e87623973
Don't auto-cancel GitHub Workflows
2023-01-20 16:17:20 -05:00
tim-weller-wolfssl
cf9b865e33
Update AES-GCM stream decryption setup to allow long IV values (already allowed by encryption APIs)
2023-01-20 20:35:39 +00:00
David Garske
8c3cad3e95
Merge pull request #5984 from embhorn/zd15493
...
Fix Cmake to exclude libm when DH is not enabled
2023-01-20 11:21:09 -08:00
David Garske
8d89d4a168
Merge pull request #5927 from SparkiDev/sp_math_clz
...
SP math: use count leading zero instruction
2023-01-20 10:33:18 -08:00
David Garske
c1e0115092
Merge pull request #5993 from anhu/quic_doc_switcharoo
...
Move the wolfSSL Configuration section higher in QUIC.md
2023-01-20 09:32:40 -08:00
Anthony Hu
9be01633d1
Move the wolfSSL Configuration section higher in QUIC.md because it is the first step.
2023-01-20 09:49:18 -05:00
Eric Blankenhorn
9f7e82a081
Add WOLFSSL_DH_CONST option to Cmake
2023-01-20 08:42:48 -06:00
Sean Parkinson
9adea94274
SP math: use count leading zero instruction
...
To speed up counting bits, use the instruction that counts leading zeros
in a word.
Fix _sp_div_3 to use registers with 0 in them for multiplication result.
2023-01-20 11:56:07 +10:00
David Garske
cfe92aa330
Merge pull request #5983 from SparkiDev/sp_int_read_radix_neg
...
SP int negative: handle negative character properly with read radix
2023-01-19 17:51:07 -08:00
David Garske
e72ec4e876
Merge pull request #5976 from SparkiDev/eccsi_hash_check
...
ECCSI: hash function must have output size as curve size
2023-01-19 17:50:44 -08:00
András Fekete
f0c9f5f9f0
Multi compiler test ( #5991 )
...
* First attempt with GCC only
* Make the test run on every push temporarily
Also clean up the description of the workflow
* Fix invalid job name
* Missing hunks added
* Try out matrix actions
* Fix missing 'runs-on'
* Only needs to run on Ubuntu
* Use local installations of gcc/clang instead of containers
* Explicitly list out compilers to test
* Clean up names and concurrency group
* Only need to run on PRs and important branches
Co-authored-by: Andras Fekete <andras@wolfssl.com >
2023-01-19 14:56:16 -08:00
David Garske
f6ecc6ce4c
Merge pull request #5990 from philljj/gcmstream_kcapi_errmsg
...
Don't allow aesgcm-stream option with kcapi
2023-01-19 12:00:36 -08:00
David Garske
02178b9013
Merge pull request #5988 from bandi13/parallelOSBuilds
...
Parallel os builds
2023-01-19 09:59:07 -08:00
JacobBarthelmeh
fc19aed8c8
Merge pull request #5623 from dgarske/hpke
...
Adds support for TLS v1.3 Encrypted Client Hello (ECH) and HPKE (Hybrid Public Key Encryption)
2023-01-19 10:03:28 -07:00
jordan
04383bfb34
Don't allow aesgcm-stream option with kcapi
2023-01-19 10:54:48 -06:00
David Garske
f0212fef3e
Merge pull request #5986 from bandi13/fixNonStandarBaseImages
...
Fix when a base image leaves non-root user
2023-01-19 07:55:19 -08:00
Andras Fekete
2276fca0f4
Cancel runs on subsequent push to PR but not to branches
2023-01-19 10:12:08 -05:00
Andras Fekete
d955768744
Only run on important branches
2023-01-19 10:03:26 -05:00
Andras Fekete
ac8951c4e2
Fix typo
2023-01-19 09:54:20 -05:00
Andras Fekete
4d5dbe9b90
Give a better name to the workflow
2023-01-19 09:44:38 -05:00
Andras Fekete
b1f423be38
Kill off previous run if another commit happens
2023-01-19 09:41:18 -05:00
Andras Fekete
cb601bdf64
Combine ubuntu and macos tests to ensure the same thing is run
2023-01-19 09:33:26 -05:00
David Garske
e1d9b37f84
Merge pull request #5932 from julek-wolfssl/zd15346
...
ssl->suites: use ssl->ctx->suites when possible
2023-01-18 15:20:21 -08:00
Andras Fekete
283ebd5afe
Remove base job
2023-01-18 17:17:15 -05:00
Andras Fekete
bb88c8fbfa
Add in 'runs-on'
2023-01-18 17:13:08 -05:00
Andras Fekete
caa7c9e8b5
One more missing keyword
2023-01-18 17:07:36 -05:00
Andras Fekete
0d73074718
Missing keyword
2023-01-18 17:00:47 -05:00
Andras Fekete
ffee4edcf5
Fix dependency command
2023-01-18 16:22:06 -05:00
Andras Fekete
6ac09b5c66
Fix spacing
2023-01-18 16:12:54 -05:00
Andras Fekete
cd0b3b4eb9
Separate out steps to individual jobs
2023-01-18 16:10:58 -05:00
David Garske
6b6ad38e4f
Adds support for TLS v1.3 Encrypted Client Hello (ECH) draft-ietf-tls-esni) and HPKE (Hybrid Public Key Encryption) RFC9180.
2023-01-18 11:37:27 -08:00
David Garske
41c35b1249
Fix line length and whitespace issues. Fix macro argument missing parentheses.
2023-01-18 11:10:19 -08:00
Juliusz Sosinowicz
50cb3a7b8c
Address code review
2023-01-18 09:55:33 -08:00
Juliusz Sosinowicz
0e662dea6e
TLSX_SetSignatureAlgorithms: free sa when TLSX_Push fails
2023-01-18 09:55:33 -08:00
Juliusz Sosinowicz
281bb32edf
DtlsMsgCreateFragBucket: heap param might be unused
2023-01-18 09:55:33 -08:00
Juliusz Sosinowicz
a58e83847e
Don't allocate Suites object on renegotiation
2023-01-18 09:55:33 -08:00
Juliusz Sosinowicz
2f63fdc6ce
Allocate CTX->suites in InitSSL when not already allocated
2023-01-18 09:55:33 -08:00
Juliusz Sosinowicz
1cb4615435
Add SCR reconnect test
2023-01-18 09:55:32 -08:00
Juliusz Sosinowicz
5b8026899b
Refactor SigAlgs to use a custom struct that can override ssl->suites
2023-01-18 09:55:32 -08:00
Juliusz Sosinowicz
e431688ca6
ssl->suites: use ssl->ctx->suites when possible
...
- Allocate ssl->suites when necessary for the WOLFSSL object to have its own instance. Use AllocateSuites() to allocate the object.
- Move cipher negotiation options from Suites into Options
ZD15346
2023-01-18 09:55:32 -08:00
Eric Blankenhorn
68520e3f0b
Fix Cmake to exclude libm when DH is not enabled
2023-01-17 16:28:36 -06:00
Sean Parkinson
11ea6a10e8
ECCSI: hash function must have output size as curve size
2023-01-18 03:54:17 +10:00
JacobBarthelmeh
7120ae1961
Merge pull request #5978 from gojimmypi/Visual_Studio_Line_Endings
...
CRLF line endings, trailing spaces for C# Wrapper Projects (no code change)
2023-01-17 10:38:38 -07:00
Sean Parkinson
cdf2036454
SP int negative: handle negative character properly with read radix
...
SP int when compiled with negative was setting sign too early.
Get sign and set after absolute value read in.
2023-01-18 03:38:23 +10:00
David Garske
ea80e9e0ea
Add documentation for the CSharp wrapper.
2023-01-16 11:13:25 -08:00
Andras Fekete
e90ba67a4c
Fix when a base image leaves non-root user
2023-01-16 13:32:10 -05:00
Sean Parkinson
b15bc3d236
Merge pull request #5977 from dgarske/kcapi_opensslextra
...
Fixes for building KCAPI with opensslextra enabled
2023-01-17 02:13:50 +10:00
Juliusz Sosinowicz
b01e42a96c
Merge pull request #5970 from ejohnstown/dtls-seq
...
DTLS Handshake Sequence
2023-01-16 07:39:53 -08:00
David Garske
08a988f557
Merge pull request #5973 from philljj/zd15445
...
EVP_EncryptUpdate should update outl on empty input
2023-01-15 13:45:19 -08:00
jordan
4c35a22e0a
Cleanup input checks.
2023-01-14 23:04:29 -06:00
David Garske
acf761ea07
Merge pull request #5979 from SparkiDev/sp_int_arm_asm_cc
...
SP int ARM: Fix div word asm to indicate flags changed
2023-01-14 11:13:23 -08:00
David Garske
bf3673c0b2
Merge pull request #5974 from SparkiDev/aessiv_uninit_aes
...
AES SIV: Allocate memory for AES as late as possbile
2023-01-14 11:13:09 -08:00
Sean Parkinson
e6ef66a777
SP int ARM: Fix div word asm to indicate flags changed
...
"cc" needs to be set in assembly code as a modified register for div
word for ARM64 and ARM32.
2023-01-15 02:05:34 +10:00
David Garske
2d8c19ac42
Merge pull request #5972 from SparkiDev/sp_int_8bit_to_bin_len
...
SP int: fix 8-bit words and to binary length
2023-01-13 16:55:53 -08:00
David Garske
fec4fe6095
Fixes for building KCAPI with opensslextra enabled.
2023-01-13 16:33:55 -08:00
gojimmypi
91d2ff1fe9
no code change; CRLF line endings, trailing spaces
2023-01-13 16:29:19 -08:00
David Garske
46ace19111
Merge pull request #5975 from bandi13/cleanupContainers
...
No need to leave container artifacts around
2023-01-13 15:03:43 -08:00
Sean Parkinson
e6ed44322a
Merge pull request #5967 from dgarske/bench_help
...
Fixes for benchmark help `-alg` list and block format
2023-01-14 05:55:04 +10:00
Sean Parkinson
0a2ee6c530
AES SIV: Allocate memory for AES as late as possbile
...
AES will be initialized if memory allocation succeeded.
2023-01-14 05:41:24 +10:00
jordan
4f4819bd19
EVP_EncryptUpdate should update outl on empty input
2023-01-13 11:32:15 -06:00
Sean Parkinson
658d647339
SP int: fix 8-bit words and to binary length
2023-01-14 03:10:50 +10:00
John Safranek
af379f0a0f
DTLS Handshake Sequence
...
The DTLS server needs to save the message_seq number of the client
hello for use in both the hello verify request in the stateless start
and for the server hello. Move the stashing of the value earlier in
DoClientHello(). (Issue #5224 )
2023-01-12 20:43:05 -08:00
David Garske
5311a8e673
Merge pull request #5969 from SparkiDev/sp_int_to_bin_len
...
SP int: fail when buffer writing to is too small for number
2023-01-12 13:44:39 -08:00
David Garske
3151a5b12a
Merge pull request #5956 from gojimmypi/Espressif_S3_wolfcrypt_random
...
interim ESP32-S3 changes & diagnostics
2023-01-12 11:34:38 -08:00
David Garske
48a136a932
Fix for MB vs MiB printing. The base2 option was printing type backwards (base2=1 = 1024 bytes and base2=0 or -base10 means 1000 bytes).
2023-01-12 11:09:20 -08:00
Sean Parkinson
c22b89e935
SP int: fail when buffer writing to is too small for number
2023-01-13 02:12:03 +10:00
gojimmypi
24f89337f6
Espressif examples default partition params: large app
2023-01-11 17:46:44 -08:00
David Garske
5e1c7c3db2
Fix for benchmark help broken in PR #5871
2023-01-11 15:05:07 -08:00
gojimmypi
50820b64fb
update Espressif include.am, add sdkconfig.defaults
2023-01-11 12:26:19 -08:00
gojimmypi
0c263a4098
tidy up ESP32S3 detection. known-good sdkconfig defaults
2023-01-09 19:59:15 -08:00
David Garske
b2d8b1c2fd
Merge pull request #5954 from JacobBarthelmeh/Compatibility-Layer
...
very basic support for public key types in cipher list string with '+'
2023-01-09 15:46:50 -08:00
Andras Fekete
369c565368
No need to leave container artifacts around
2023-01-06 15:06:30 -05:00
John Safranek
86aa3cc836
Merge pull request #5942 from bandi13/evpaesccm
...
Evpaesccm
2023-01-06 11:25:37 -08:00
JacobBarthelmeh
9c2bbc2080
Merge pull request #5959 from douzzer/20230105-wolfsentry-fixes
...
20230105-wolfsentry-fixes
2023-01-06 11:04:16 -07:00
JacobBarthelmeh
26f9047079
Merge pull request #5958 from tatowicz/siphash-fix
...
Add fix for siphash cache and tests
2023-01-06 11:02:38 -07:00
JacobBarthelmeh
99a489dec3
improve test and handling of public key type cipher suite string
2023-01-06 09:53:51 -08:00
Andras Fekete
8436f82540
Adding in @ejohnstown's suggested patch for line lengths
2023-01-06 12:23:30 -05:00
Daniel Pouzzner
d44130d807
src/ssl.c: revert 2c2740d0dc, as it duplicates optimizer functionality, and produces bugprone-sizeof-expression on clang-tidy and sizeofwithnumericparameter on cppcheck.
2023-01-05 18:40:51 -06:00
Daniel Pouzzner
0b0b980784
fix an oversight in wolfSentry integration in examples/{client,server}.
2023-01-05 17:59:10 -06:00
Anthony Tatowicz
a08c853799
Add fix for siphash cache and tests
2023-01-05 16:56:07 -06:00
JacobBarthelmeh
10c324e9ad
Merge pull request #5953 from anhu/wolfSSL_CertManagerLoadCABuffer_ex
...
Add wolfSSL_CertManagerLoadCABuffer_ex()
2023-01-05 15:20:58 -07:00
JacobBarthelmeh
ab33788cdb
treat ECDHE,RSA cipher suite list as mixed TLS 1.3 and pre TLS 1.3
2023-01-05 13:48:34 -08:00
JacobBarthelmeh
636f4fc929
Merge pull request #5957 from douzzer/20230104-fixes
...
20230104-fixes
2023-01-05 13:58:21 -07:00
Anthony Hu
5de817b0c1
Add wolfSSL_CertManagerLoadCABuffer_ex()
...
Also add unit tests.
2023-01-05 15:34:13 -05:00
David Garske
404930036c
Merge pull request #5951 from tim-weller-wolfssl/zd14935-pointless-comparison
...
Avoid pointless-comparison warnings (Pa084) with IAR for ARM tools
2023-01-05 08:20:02 -08:00
Daniel Pouzzner
43265669c6
fix warnings around clang-diagnostic-embedded-directive and readability-uppercase-literal-suffix; update wolfSentry integration for upcoming release 0.8.0.
2023-01-05 00:13:17 -06:00
Andras Fekete
124c04b01a
A bit more consistent naming for structure variables
2023-01-04 21:04:58 -05:00
Andras Fekete
25ce553e8f
Shorten some line lengths
2023-01-04 20:32:04 -05:00
Andras Fekete
51f3386d60
Shorten variable names
2023-01-04 20:29:14 -05:00
JacobBarthelmeh
d5a7b56332
sp pragram around sanity check for vcpkg build warning
2023-01-04 16:19:27 -08:00
gojimmypi
b04d6ed56b
interim ESP32-S3 changes & diagnostics
2023-01-04 15:49:35 -08:00
tim-weller-wolfssl
2c2740d0dc
Update comparison of WOLFSSL_BN_ULONG value to MP_MASK to include check for potential type size differences which can lead to pointless-comparison warnings with IAR tools
2023-01-04 17:35:46 -06:00
Andras Fekete
af2c5cf18b
Remove the existence of WOLFSSL_AESCCM_STREAM
2023-01-04 14:17:36 -05:00
JacobBarthelmeh
a3e085f204
very basic support for public key types in cipher list string with '+'
2023-01-04 10:49:18 -08:00
András Fekete
adb406e1ee
Adding some developer utilities ( #5941 )
...
* Adding some developer utilities for Docker.
* Add support for `make test`
* Don't need to run the testsuite specifically
* Share .gitconfig and ssh keys with the container
Co-authored-by: Andras Fekete <andras@wolfssl.com >
2023-01-04 08:48:24 -08:00
JacobBarthelmeh
e42f6dbe4b
Merge pull request #5939 from dgarske/20221228_cleanups
...
Fixes for some build configuration variations
2023-01-04 08:32:20 -07:00
Andras Fekete
0ec0c05eda
Change variable names to protect the innocent
2023-01-04 10:23:42 -05:00
Andras Fekete
c21f5f3757
Fix unused variable error
2023-01-04 09:48:28 -05:00
Juliusz Sosinowicz
8d59f61b9b
Fix test_wolfSSL_dtls_stateless_resume test case
2023-01-04 13:04:45 +01:00
JacobBarthelmeh
114471d6cf
add pragram around sanity check for vcpkg build warning
2023-01-03 15:23:43 -08:00
Andras Fekete
914d3114de
Addressing PR comments
...
TODO should not have been in the changes
indentation of #ifdef moved in line with the 'if' conditional
2023-01-03 14:55:07 -05:00
David Garske
023db01aca
* Fixed some build configuration variations.
...
* Fixed `PEM_BUFSIZE` macro redefined when building with coexist.
* Updated the `user_settings_all.h` and `user_settings_wolfboot_keytools.h` to include latest options.
* Improved API unit test error case checking where `TEST_RES_CHECK` is not used.
* Changed `TEST_SKIPPED` to unique value.
* Added CI tests for enable-all, small stack, and user setting templates.
2023-01-03 10:59:59 -08:00
András Fekete
4f8edb312b
Add compilation to espressif ( #5947 )
...
* Refactor GitHub actions and add ESP tests.
* Add script for building all examples for ESP.
* Fixes for ESP-IDF v5.0
* Consolidating Espressif files into a single include.am
Co-authored-by: Andras Fekete <andras@wolfssl.com >
2023-01-03 09:50:38 -08:00
David Garske
bdcf6928a2
Merge pull request #5945 from JacobBarthelmeh/copyright
...
update copyright to 2023
2023-01-03 09:29:39 -08:00
youtai
4edae51095
Fix StartTLS_Init ( #5907 )
...
* Fix StartTLS_Init (contribution by Yota Nagaya)
2023-01-03 09:28:23 -08:00
Andras Fekete
dc6ffc790d
Need declaration of 'tmp' variable
2023-01-02 14:36:50 -05:00
Andras Fekete
ec9697999e
Use minimum size for NONCE
2023-01-02 08:51:13 -05:00
Jacob Barthelmeh
9dcc48c8f7
update copyright to 2023
2022-12-30 17:12:11 -07:00
Andras Fekete
df3c11ad82
Don't define a new default NONCE size, instead use existing MAX
2022-12-30 16:02:30 -05:00
Andras Fekete
f734f5037d
Add similar trick to GCM routines so our code is more uniform
2022-12-30 13:11:26 -05:00
Andras Fekete
a00abb0f88
Fix compilation issue when AESCCM is not enabled
2022-12-30 13:10:24 -05:00
John Safranek
c925223822
Merge pull request #5943 from JacobBarthelmeh/sessionExport
2022-12-30 09:58:47 -08:00
David Garske
b43852363e
Merge pull request #5944 from JacobBarthelmeh/Testing
...
fix for older selftest that returns bad padding instead of salt len e…
2022-12-30 08:37:02 -08:00
JacobBarthelmeh
4a23edd5fb
fix for older selftest that returns bad padding instead of salt len error
2022-12-30 06:31:09 -08:00
Jacob Barthelmeh
aab12fc14b
check DTLS method for test case
2022-12-29 15:49:46 -07:00
Andras Fekete
1132579dd1
Add in zero length test
2022-12-29 17:02:43 -05:00
Andras Fekete
1192d41f0e
First successful implementation of EVP_aes_*_ccm
2022-12-29 17:02:43 -05:00
Andras Fekete
27b5ac421e
Use the actual size of the structure
2022-12-29 17:02:43 -05:00
David Garske
251b89631e
Merge pull request #5940 from anhu/bench_ext_kyber
...
don't call external implemenation of kyber from benchmark anymore.
2022-12-29 11:00:59 -08:00
Anthony Hu
0787ab1131
don't call external implemenation of kyber from benchmark anymore.
2022-12-29 11:48:54 -05:00
David Garske
5e11fb19a4
Merge pull request #5937 from anhu/blinding_on
...
Change comment to reflect that RSA blind is enabled by default
2022-12-28 12:56:58 -08:00
David Garske
5c0abfd7ad
Merge pull request #5936 from embhorn/zd15400
...
Fix unguarded XFPRINTF calls
2022-12-28 12:47:19 -08:00
Eric Blankenhorn
004705b38f
Fix unguarded XFPRINTF calls
2022-12-28 12:23:40 -06:00
Anthony Hu
f9ccdd7ffc
Change comment to reflect that RSA blind is enabled by default
2022-12-28 13:09:59 -05:00
Chris Conlon
aadce3af9c
Merge pull request #5930 from miyazakh/subscript_has_char
2022-12-28 10:18:43 -07:00
Kaleb Himes
9b513fd6bf
Merge pull request #5934 from cconlon/jpdocfix
...
Remove incomplete doxygen in JP asn_public.h
2022-12-28 08:07:20 -07:00
David Garske
67fe575896
Merge pull request #5933 from anhu/purge_dilithium_aes
...
Purge the AES variant of Dilithium
2022-12-27 16:44:52 -08:00
Chris Conlon
a2b6c5dd1e
remove incomplete doxygen in JP asn_public.h
2022-12-27 14:46:38 -07:00
Anthony Hu
b3e99348cd
Purge the AES variant of Dilithium
2022-12-27 14:37:47 -05:00
David Garske
19033d82fe
Merge pull request #5931 from douzzer/20221226-minor-fixes
...
20221226-minor-fixes
2022-12-27 08:40:17 -08:00
David Garske
43f0830ad7
Merge pull request #5923 from JacobBarthelmeh/release
...
add quality of release statement
2022-12-27 08:39:41 -08:00
JacobBarthelmeh
11e44e746b
Merge pull request #5928 from dgarske/zd15388
...
Fixes SP math all build issue with small-stack and no hardening
2022-12-27 09:23:53 -07:00
Daniel Pouzzner
cb1b20dc8e
linuxkm/: accomodate refactoring in kernel 6.2+ of cpu_number to be an element of the pcpu_hot`structure.
2022-12-26 21:03:04 -06:00
Daniel Pouzzner
425d0b72c3
wolfcrypt/benchmark/benchmark.c: fix bench_stats_sym_finish() in GENERATE_MACHINE_PARSEABLE_REPORT mode to properly render "bytes_total" column in bytes, not the unit selected by WOLFSSL_BENCHMARK_FIXED_UNITS_*.
2022-12-26 20:25:05 -06:00
Daniel Pouzzner
9ac790a8ce
Docker/run.sh: mollify shellcheck, and prevent splitting on whitespace passing args through to configure.
2022-12-26 20:18:43 -06:00
Hideki Miyazaki
684646c8b9
fix shadows min and subscript by i486-netbsd-gcc
2022-12-25 07:20:04 +09:00
David Garske
dee01cfe9b
Fixes SP math all build issue with small-stack and no hardening. Fixes ZD15388
2022-12-23 13:22:40 -08:00
David Garske
d686f0a5de
Merge pull request #5925 from SparkiDev/sp_mod_3_perf
...
SP math: rework mod 3
2022-12-22 17:55:28 -08:00
David Garske
18e04d184e
Merge pull request #5895 from bandi13/addDocker
...
Add docker
2022-12-22 17:19:43 -08:00
David Garske
60037ead70
Merge pull request #5871 from gojimmypi/BenchmarkEnhancements
...
Benchmark Enhancements and Code Cleanup
2022-12-22 17:18:47 -08:00
David Garske
49d23cf60a
Merge pull request #5913 from douzzer/20221219-no-sha-1-all-crypto
...
20221219-no-sha-1-all-crypto
2022-12-22 17:02:58 -08:00
David Garske
1b18da7e87
Merge pull request #5920 from jpbland1/unrecognized-http-header
...
remove http header length check for CRL verification
2022-12-22 17:01:54 -08:00
David Garske
5c89719c51
Merge pull request #5916 from julek-wolfssl/dtls-srtp-keying-material
...
DTLS-SRTP: use wolfSSL_export_keying_material instead of wc_PRF_TLS
2022-12-22 17:01:37 -08:00
David Garske
135b9f0566
Merge pull request #5915 from julek-wolfssl/dtls-remove-realloc-dep
...
DtlsMsgCombineFragBuckets: Remove realloc dependency
2022-12-22 17:01:31 -08:00
David Garske
62e3835b0e
Merge pull request #5911 from julek-wolfssl/DtlsMsgPoolSend-sendSz
...
DtlsMsgPoolSend: Use correct sendSz
2022-12-22 17:01:19 -08:00
David Garske
29c46ce867
Merge pull request #5902 from bandi13/ESP-IDF_fixes
...
Esp idf v5 fixes
2022-12-22 17:01:09 -08:00
Takashi Kojo
b7a28cc704
compatibility for EVP_CipherUpdate with AES-GCM
2022-12-23 09:09:20 +09:00
Sean Parkinson
162dca87c3
SP math: rework mod 3
...
Simplification when only calculating mod and modulus is 3.
2^(2*n) * x mod 3 = x mod 3.
Add all digits and calculate mod 3 of sum.
2022-12-23 09:21:13 +10:00
Chris Conlon
8e0f0d611f
Merge pull request #5914 from kojo1/ja
...
add Doxygen cmac.h, quic.h
2022-12-22 15:20:26 -07:00
John Safranek
9ce79c4de8
Merge pull request #5921 from cconlon/libsuffix
2022-12-22 11:37:28 -08:00
Jacob Barthelmeh
50aeb2f79e
add quality of release statement
2022-12-22 10:42:18 -07:00
gojimmypi
a20426b2b0
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into BenchmarkEnhancements
2022-12-22 08:47:25 -08:00
David Garske
709461e4aa
Merge pull request #5922 from JacobBarthelmeh/Testing
...
add crl test file to dist
2022-12-21 16:30:33 -08:00
Jacob Barthelmeh
db03994899
add crl test file to dist
2022-12-21 15:05:30 -07:00
Chris Conlon
9a7ff8773b
add --with-libsuffix support, append suffix to library artifact name
2022-12-21 13:31:07 -07:00
John Bland
b36d585335
remove http header length check for CRL verification
2022-12-21 13:01:58 -05:00
David Garske
4fbd4fd36a
Merge pull request #5917 from JacobBarthelmeh/release
...
prepare for release 5.5.4
2022-12-20 16:15:51 -08:00
JacobBarthelmeh
509ad07dbd
Merge pull request #5918 from kareem-wolfssl/zd15369
...
Fix length being passed into GetFormattedTime.
2022-12-20 17:12:13 -07:00
Kareem
eebe04b181
Fix length being passed into GetFormattedTime.
2022-12-20 15:42:02 -07:00
Jacob Barthelmeh
cca63a465d
prepare for release 5.5.4
2022-12-20 14:19:59 -07:00
Daniel Pouzzner
455e76873c
peer review fixes re: minor fixes to accommodate --disable-sha in combination with --enable-all-crypto.
2022-12-20 10:43:33 -06:00
Juliusz Sosinowicz
6a8be960ba
DTLS-SRTP: use wolfSSL_export_keying_material instead of wc_PRF_TLS
2022-12-20 16:42:28 +01:00
Juliusz Sosinowicz
2fe6555fcf
DtlsMsgCombineFragBuckets: Remove realloc dependency
2022-12-20 13:53:03 +01:00
Takashi Kojo
5ff8bec975
add Doxygen cmac.h, quic.h
2022-12-20 17:44:52 +09:00
Daniel Pouzzner
91869f6028
minor fixes to accommodate --disable-sha in combination with --enable-all-crypto.
2022-12-20 00:42:05 -06:00
David Garske
6f7d8d287d
Merge pull request #5905 from JacobBarthelmeh/cert_update
...
end of year certificate update
2022-12-19 09:52:53 -08:00
Andras Fekete
bc15f67d8d
Fixing indentation on preprocessor commands
2022-12-19 11:13:58 -05:00
András Fekete
11fcb790b1
Merge branch 'wolfSSL:master' into ESP-IDF_fixes
2022-12-19 11:11:55 -05:00
Juliusz Sosinowicz
53b2be06d3
DtlsMsgPoolSend: Use correct sendSz
...
pool->sz is the size without the record header. The handshake header is present already.
Reproducible with
./udp_proxy -p 12345 -s 127.0.0.1:11111 -x 1:3 -S server
or
./udp_proxy -p 12345 -s 127.0.0.1:11111 -x 1:3 -S server
and
./examples/server/server -l ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305 -u -i
./examples/client/client -l ECDHE-RSA-AES256-GCM-SHA384 -u -R -p 12345 -i
2022-12-19 17:07:37 +01:00
gojimmypi
64a7d511b8
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into BenchmarkEnhancements
2022-12-16 14:00:16 -08:00
JacobBarthelmeh
3d1775320b
Merge pull request #5900 from icing/tls12-no-tickets
...
WOLFSSL_OP_NO_TICKET fix for TLSv1.2
2022-12-16 14:42:50 -07:00
JacobBarthelmeh
91f8b5e58e
Merge pull request #5903 from douzzer/20221216-fix-benchmark
...
20221216-fix-benchmark
2022-12-16 14:35:12 -07:00
JacobBarthelmeh
c6aaa1310e
end of year certificate update
2022-12-16 13:32:37 -08:00
Kaleb Himes
b90c07900b
Merge pull request #5904 from anhu/FIPS_fix
...
ENABLED_FIPS doesn't hold the version; FIPS_VERSION does.
2022-12-16 14:16:47 -07:00
Andras Fekete
8d372b2c6f
Start an FAQ in the README.md
2022-12-16 15:45:29 -05:00
gojimmypi
c370529975
manual merge with upstream
2022-12-16 11:28:04 -08:00
Anthony Hu
24d7f85016
ENABLED_FIPS doesn't hold the version; FIPS_VERSION does.
...
Found with:
./configure --enable-engine=fips=v2
2022-12-16 14:06:43 -05:00
Daniel Pouzzner
04b31518ba
wolfcrypt/benchmark/benchmark.c: fix calculation of outer iteration constant in bench_aesecb_internal(); fix .c.h clash in argument name ("useDevId" vs "useDeviceID").
2022-12-16 12:55:37 -06:00
Andras Fekete
d0f0d66b80
Add in changes to wolfssl_server
2022-12-16 11:55:53 -05:00
Andras Fekete
814ad9fc38
Better fixes
2022-12-16 11:55:28 -05:00
Andras Fekete
b9e69f1795
Fixes for wolfssl_client example
2022-12-16 10:23:09 -05:00
David Garske
5c21e40bce
Merge pull request #5899 from SparkiDev/regression_fixes_5
...
Fixes from regression testing.
2022-12-16 06:54:26 -08:00
David Garske
07dcd5270e
Merge pull request #5898 from cconlon/androidSystemCa
...
Add Android CA certs path for wolfSSL_CTX_load_system_CA_certs()
2022-12-16 06:12:24 -08:00
Stefan Eissing
9d0b16097e
Fix builds without session tickets.
2022-12-16 09:40:51 +01:00
Stefan Eissing
dccabc60a5
Disabling TLSv1.2 session tickets when WOLFSSL_OP_NO_TICKET is being set.
...
There seems to have been a misunderstanding that WOLFSSL_OP_NO_TICKET would only disable tickets
for TLS version lower than 1.2. But it includes 1.2 as well.
2022-12-16 09:29:44 +01:00
Sean Parkinson
45e3c721b3
Fixes from regression testing.
...
Fix random prime generation for big endian to set low bits after
shifting top word.
Allow SP_MATH to be built without RSA, DH and ECC - needed for PKCS#12.
Add DH 2048 bit parameters to cert_test.c for test.c when NO_ASN and
WOLFSSL_SP_MATH.
2022-12-16 14:43:29 +10:00
David Garske
502fd843ec
Merge pull request #5897 from gojimmypi/gojimmypi-initialize-resp_length
...
initialize resp_length = 0 in tls.c
2022-12-15 17:23:48 -08:00
Chris Conlon
f9bd8f76de
add Android system CA certs path for to wolfSSL_CTX_load_system_CA_certs() usage
2022-12-15 16:39:48 -07:00
Sean Parkinson
4434d898a1
Merge pull request #5894 from kaleb-himes/fix-leak
...
Fix a quick leak in the test apps
2022-12-16 08:04:50 +10:00
JacobBarthelmeh
aa784397b0
Merge pull request #5896 from cconlon/atexitOSX
...
AC_CHECK_DECLS for atexit needs stdlib.h on OSX
2022-12-15 15:00:29 -07:00
Andras Fekete
b823da9bb9
Fix build issues with the latest ESP-IDF
2022-12-15 16:11:39 -05:00
gojimmypi
e0c9586b79
initialize resp_length = 0 in tls.c
2022-12-15 12:51:33 -08:00
Andras Fekete
3ba8c918f2
Use standard naming
2022-12-15 15:30:22 -05:00
Andras Fekete
6a2673f5f7
Adding Docker files to distribution
2022-12-15 15:11:14 -05:00
Andras Fekete
995e3bd009
Allow for existing group
2022-12-15 14:30:13 -05:00
kaleb-himes
b23db16ff8
Refactor the double-free fix
2022-12-15 12:21:08 -07:00
David Garske
668efea464
Merge pull request #5884 from icing/ssl-set-ssl-ctx
...
Fix wolfSSL_set_SSL_CTX() to be usable during handshake.
2022-12-15 10:59:54 -08:00
Chris Conlon
8c54bd0fb1
check for atexit needs stdlib.h on OSX, fixes configure sed error
2022-12-15 11:23:37 -07:00
David Garske
908744dc0f
Merge pull request #5646 from JacobBarthelmeh/caam
...
benchmark devid changes, CCM with SECO fix, set IV on AES import into SECO
2022-12-15 10:01:01 -08:00
Andras Fekete
c1cf8a8f34
Add in README.md
2022-12-15 12:54:21 -05:00
David Garske
d9ca5f6d3a
Merge pull request #5893 from kaleb-himes/mtu-with-static-mem
...
Add alt case for unsupported static memory API
2022-12-15 09:22:21 -08:00
Andras Fekete
9c135e59dc
Script can run from an arbitrary folder
2022-12-15 12:22:05 -05:00
David Garske
d46813953d
Merge pull request #5892 from tatowicz/decodealtnames-fuzz-fix
...
Add Overflow check to DecodeAltNames input buffer access
2022-12-15 09:21:37 -08:00
Andras Fekete
64d39dbd74
Cleaner base image
2022-12-15 12:10:48 -05:00
Andras Fekete
c1ad3457f3
Run as non-root local user
2022-12-15 12:10:25 -05:00
Andras Fekete
be1b3ec007
Fix issue with multiple command arguments
2022-12-15 11:25:43 -05:00
kaleb-himes
46c47e4adc
Fix a quick leak in the test apps
...
Fix a double-free scenario also
2022-12-15 09:13:45 -07:00
Stefan Eissing
78fd5d7dbc
Fix wolfSSL_set_SSL_CTX() to be usable during handshake.
...
This method requires some explanation. Its sibling is
int SetSSL_CTX(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
which re-inits the WOLFSSL* with all settings in the new CTX.
That one is the right one to use *before* a handshake is started.
This method was added by OpenSSL to be used *during* the handshake, e.g.
when a server inspects the SNI in a ClientHello callback and
decides which set of certificates to use.
Since, at the time the SNI callback is run, some decisions on
Extensions or the ServerHello might already have been taken, this
method is very restricted in what it does:
- changing the server certificate(s)
- changing the server id for session handling
and everything else in WOLFSSL* needs to remain untouched.
2022-12-15 09:33:01 +01:00
gojimmypi
d8c9a5aa17
return benchmark to auto-scale units by default
2022-12-14 20:45:44 -08:00
gojimmypi
8831fbd22e
fix csv math, units/sec, PQ cycle header
2022-12-14 20:27:15 -08:00
JacobBarthelmeh
8924487f27
fix warning for builds using cmac and not devID
2022-12-14 15:38:08 -08:00
JacobBarthelmeh
89c993eff3
fix AES-CCM enc/dec for SECO (passes nonce directly)
2022-12-14 15:20:03 -08:00
JacobBarthelmeh
b79879d106
fix setting IV when importing AES key into SECO
2022-12-14 15:20:03 -08:00
JacobBarthelmeh
9f77210b0b
update benchmark for devID builds
2022-12-14 15:20:03 -08:00
kaleb-himes
ed17524793
Add alt case for unsupported static memory API
2022-12-14 16:02:35 -07:00
Sean Parkinson
a3f3c76faa
Merge pull request #5890 from anhu/fix_iv_size
...
Fix the wrong IV size.
2022-12-15 08:43:25 +10:00
Sean Parkinson
3d8f25ab7d
Merge pull request #5430 from dgarske/sniffer_multithread
...
Support for multi-threaded sniffer
2022-12-15 08:18:49 +10:00
David Garske
3fd2292d11
Merge pull request #5889 from anhu/dtls13_pqtests
...
Kyber with DTLS 1.3 tests
2022-12-14 13:20:32 -08:00
Anthony Tatowicz
370e0ce0f4
Add formatting fixes
2022-12-14 13:54:03 -06:00
Anthony Hu
c5ca20fe43
New files so add them to include.am
2022-12-14 13:28:20 -05:00
Andras Fekete
d55ef14cc7
First crack at creating a common Docker environment
2022-12-14 13:17:22 -05:00
Anthony Tatowicz
8580ac0377
Add Overflow check to DecodeAltNames input buffer access
2022-12-14 12:08:19 -06:00
Anthony Hu
472a31a801
Fix the wrong IV size.
2022-12-14 13:04:38 -05:00
Anthony Hu
ad6d6be620
Kyber with DTLS 1.3 tests
2022-12-14 12:46:24 -05:00
David Garske
6be0512728
Peer review cleanups.
2022-12-14 09:25:04 -08:00
David Garske
b2d25ece98
Merge pull request #5885 from anhu/pq_session_ticket
...
Allow session tickets to properly resume when using PQ KEMs.
2022-12-13 16:32:07 -08:00
David Garske
e33d59cd76
Review cleanups.
2022-12-13 10:55:22 -08:00
Anthony Hu
364835dc9e
Allow session tickets to properly resume when using PQ KEMs.
...
Found with:
```
./configure --with-liboqs --enable-session-ticket
./examples/server/server -v 4 -r --pqc P521_KYBER_LEVEL5
./examples/client/client -v 4 -r --pqc P521_KYBER_LEVEL5
```
2022-12-13 11:36:00 -05:00
Daniel Pouzzner
64ef6aedd6
Merge pull request #5882 from SparkiDev/sp_aarch64_be
...
SP: support aarch64 big endian
2022-12-12 22:06:38 -06:00
Sean Parkinson
a7a6d5b297
Merge pull request #5874 from JacobBarthelmeh/tls13
...
adjust post auth support with TLS 1.3
2022-12-13 09:39:31 +10:00
Sean Parkinson
bc3b723609
SP: support aarch64 big endian
2022-12-13 09:33:16 +10:00
David Garske
d0c9ec6681
Merge pull request #5854 from JacobBarthelmeh/Certs
...
fix other name san parsing and add RID cert to test parsing
2022-12-12 14:44:07 -08:00
David Garske
a1e883b43d
Merge pull request #5875 from JacobBarthelmeh/Compatibility-Layer
...
fix for handling DEFAULT:... cipher suite list
2022-12-12 14:43:50 -08:00
David Garske
334042d7f5
Merge pull request #5881 from anhu/warn_session_ticket
...
Warn that renegotiation in TLS 1.3 requires session ticket.
2022-12-12 13:51:28 -08:00
David Garske
36413a2c11
Merge pull request #5879 from SparkiDev/api_test_timing
...
API test: Report time taken to perform test
2022-12-12 12:31:06 -08:00
David Garske
f87859a00e
Whitespace cleanups. Use const for test_tls_ext_duplicate.
2022-12-12 08:59:53 -08:00
David Garske
78f495cdae
Merge pull request #5877 from SparkiDev/x509v3_d2i_aia
...
X509v3 EXT d2i: fix freeing of aia
2022-12-12 08:59:15 -08:00
David Garske
2a97862d26
Merge pull request #5878 from SparkiDev/benchmark_aesofb_fix
...
Benchmark AES-OFB: initialize and free AES object
2022-12-12 08:57:44 -08:00
Anthony Hu
b017795413
Remove changes around wolfSSL_set_session() as it breaks tests.
2022-12-12 11:44:27 -05:00
David Garske
de22dbe61d
Support for multi-threaded sniffer. Add support for atomic operations instead of mutex in wc_port.h.
2022-12-12 08:39:42 -08:00
Anthony Hu
fffd3adc30
Warn that renegotiation in TLS 1.3 requires session ticket.
2022-12-12 11:30:01 -05:00
David Garske
b871829833
Merge pull request #5811 from lealem47/zd15184
...
Async Sniffer: Fix for decryption after second handshake
2022-12-12 08:21:35 -08:00
Sean Parkinson
b4b1739783
API test: Report time taken to perform test
...
API test now displays timing taken to perform a test case to help
identify ones that are doing too much work.
2022-12-12 12:24:38 +10:00
David Garske
50c5d61998
Merge pull request #5872 from SparkiDev/tls_ext_no_dup
...
TLS: detect duplicate known extensions
2022-12-11 16:53:38 -08:00
Sean Parkinson
819d40a76f
Benchmark AES-OFB: initialize and free AES object
...
Device ID is not initialized unless wc_AesInit() is called.
Call wc_AesFree() for possible hardware implementations.
2022-12-12 10:45:21 +10:00
Sean Parkinson
7f3de91e25
X509v3 EXT d2i: fix freeing of aia
...
aia is a stack and must be pop freed rather than freed with XFREE.
Extract function that creates Authority Info Access stack.
Fix spelling issue raised by codespell.
2022-12-12 10:13:13 +10:00
Sean Parkinson
9ab8867b42
TLS: detect duplicate known extensions
...
TLS specification requires that there not be more than one extension of
the same type in a given extension block. E.g. ClientHello
2022-12-12 08:35:04 +10:00
JacobBarthelmeh
f974bd4ad6
move test function call into macro guard
2022-12-10 15:45:14 -08:00
JacobBarthelmeh
8b296877ab
fix for handling DEFAULT:... cipher suite list
2022-12-10 14:53:43 -08:00
JacobBarthelmeh
389cf6ed0a
adjust post auth support with TLS 1.3
2022-12-10 06:49:51 -08:00
gojimmypi
5e434e62fb
Support for WOLFSSL_BENCHMARK_FIXED_CSV, minor changes per #5871 feedback
2022-12-09 12:39:51 -08:00
Daniel Pouzzner
11c4a0e228
Merge pull request #5866 from dgarske/ecc_pub_import
...
Fix API test `test_wc_ecc_import_raw` with SP math
2022-12-09 14:00:57 -06:00
David Garske
793bd6620b
Fix unicode char in logging.c.
2022-12-09 10:36:35 -08:00
David Garske
52c6710783
Fix test_wc_ecc_import_raw to handle ECC_INF_E or MP_VAL on point failures. SP math returns MP_VAL in sp_256_ecc_is_point_4.
2022-12-09 10:32:46 -08:00
gojimmypi
9d98cd6e50
Merge branch 'BenchmarkEnhancements' of https://github.com/gojimmypi/wolfssl into BenchmarkEnhancements
2022-12-09 10:10:04 -08:00
gojimmypi
6c3e301006
Benchmark Consolidated Enhancements and Code Cleanup
2022-12-09 10:09:56 -08:00
Tesfa Mael
85dc7a61c5
Detect SIZEOF_LONG in armclang and diab
2022-12-09 09:29:25 +01:00
Sean Parkinson
c959d22b98
Merge pull request #5868 from dgarske/ecc_pub_math
...
Expose more ECC math functions and improve async shared secret
2022-12-09 08:37:26 +10:00
David Garske
f8484fb5f3
Merge pull request #5869 from anhu/NO_SERVER_fix
...
Add proper gating on !NO_WOLFSSL_SERVER
2022-12-08 14:30:23 -08:00
Sean Parkinson
5d9532b0ee
Merge pull request #5865 from dgarske/fix_-5864
...
Fix for implicit conversion with 32-bit in SP math
2022-12-09 08:24:04 +10:00
JacobBarthelmeh
ab6233a01b
Merge pull request #5870 from anhu/fix_sgx_stdout
...
stdout is undeclared
2022-12-08 15:22:30 -07:00
gojimmypi
374d6d368e
Benchmark Consolidated Enhancements and Code Cleanup
2022-12-08 13:38:06 -08:00
Anthony Hu
3aa74e3c8c
stdout is undeclared
2022-12-08 15:29:48 -05:00
Anthony Hu
cdaa4d8aa0
Add proper gating on !NO_WOLFSSL_SERVER
...
Found with the following configuration:
--enable-dtls --enable-dtls13 --enable-dtls-mtu CFLAGS="-DNO_WOLFSSL_SERVER"
2022-12-08 14:20:17 -05:00
David Garske
9cb19e36fe
Merge pull request #5867 from anhu/dont_make_broken_key
...
For compatibility `EC_KEY_new_by_curve_name` check that we found curve
2022-12-08 11:09:56 -08:00
David Garske
9ad4e3f9ba
Expose the safe version of point double/add and mulmod_ex with WOLFSSL_PUBLIC_ECC_ADD_DBL. Eliminate int wc_ecc_shared_secret_gen used by async/nb and improve async use of curve spec allocations.
2022-12-08 10:43:03 -08:00
Anthony Hu
937d247c7d
Don't create a key if we don't support the curve.
...
Found with the following configuration:
./configure --enable-tls13 --disable-oldtls --enable-static --enable-singlethreaded --enable-dtls --enable-dtls13 --enable-dtls-mtu --enable-sp=yes,4096 --disable-shared --disable-sha3 --disable-dh --enable-curve25519 --enable-secure-renegotiation --enable-debug --enable-opensslextra 'CFLAGS=-DWOLFSSL_DTLS_ALLOW_FUTURE -DWOLFSSL_MIN_RSA_BITS=2048 -DWOLFSSL_MIN_ECC_BITS=256 -DFP_MAX_BITS=8192 -fomit-frame-pointer'
2022-12-08 12:13:12 -05:00
David Garske
d264cbc899
Fix for implicit conversion with 32-bit in SP math.
...
Fixes `error: implicit conversion loses integer precision: sp_int64' (aka long long) to sp_digit (aka int)` building with `./configure CC="clang -m32" --enable-sp && make`
2022-12-08 08:31:02 -08:00
JacobBarthelmeh
eb69ccb22c
Merge pull request #5856 from icing/errq-improvements
...
Improvements in OpenSSL Compat ERR Queue handling.
2022-12-08 09:28:05 -07:00
Stefan Eissing
02094ebb2e
Updates after review by JacobBarthelmeh.
...
- fix err/ret rename leftover for python builds
- add documenetation to thread-local functions
- move generic queue functions up
2022-12-08 09:53:05 +01:00
David Garske
bdadbefb4c
Merge pull request #5862 from JacobBarthelmeh/Compatibility-Layer
...
map SSL_CTX_get_session_cache_mode compat API
2022-12-07 14:50:31 -08:00
Sean Parkinson
1f607ee560
Merge pull request #5860 from tmael/entropy_memuse
...
Increase RNG_SECURITY_STRENGTH for FIPS
2022-12-08 08:26:07 +10:00
David Garske
099135b2f9
Merge pull request #5861 from kosmas-valianos/FixTypo
...
Fix wrong function name in wolfSSL_X509_get_name_oneline()
2022-12-07 13:03:54 -08:00
Jacob Barthelmeh
94212e68e5
map SSL_CTX_get_session_cache_mode compat API
2022-12-07 11:35:48 -07:00
Stefan Eissing
45f9ef5dd9
Improvements in OpenSSL Compat ERR Queue handling.
...
Configuration
- thread-local storaoge is selected when available
- '--enable-error-queue-per-thread' and '--disable-error-queue-per-thread' can
be used as before to explicitly en-/disable the feature.
Implementation:
- with thread-local-storage, error queue is realized in one struct without
allocations. Queue size is restricted to 16 entries (per thread), which
is the same limit in OpenSSL 1.1.x.
- without thread-local-storage, all error queue operations are mutex locked
- wc_PeekErrorNodeLineData() and wc_GetErrorNodeErr() added for use by SSL
functions to allow locked queue iterations/manipulations.
2022-12-07 18:14:45 +01:00
Kosmas Valianos
11f9bd85ee
Fix wrong function name in wolfSSL_X509_get_name_oneline()
2022-12-07 16:00:05 +01:00
Tesfa Mael
1e0886180b
Adjust ENTROPY_SCALE_FACTOR for FIPS
2022-12-06 23:01:13 -08:00
David Garske
f6cb13b11b
Merge pull request #5851 from SparkiDev/sp_enable_asm_fix
...
SP: --enable-sp-asm now enables SP if not set
2022-12-06 17:37:15 -08:00
Sean Parkinson
1de30c6b67
SP: --enable-sp-asm now enables SP if not set
...
Enabling SP with ASM didn't enable SP or error out when SP wasn't
configured. Now enables SP when '' and errors when 'no'.
SAKKE modinv used large amounts of stack. Change to have more temporary
memory allocated increased to cover the usage.
ECC, SAKKE: sp_<bits>_ecc_mulmod_<cpu><words>() used large amounts of
stack. Allocate when WOLFSSL_SMALL_STACK.
wc_DhCheckKeyPair() not available when HAVE_SELFTEST.
Wasn't compiled in before as WOLFSSL_HAVE_SP_DH wasn't defined.
2022-12-07 09:01:53 +10:00
Sean Parkinson
e5d03cf5ad
Merge pull request #5848 from philljj/fix_mingw64_build
...
Fix mingw-w64 build issues on windows.
2022-12-07 08:57:07 +10:00
Tesfa Mael
5c020c6ad4
Increase RNG_SECURITY_STRENGTH for FIPS
2022-12-06 14:16:29 -08:00
David Garske
ec11c22fb7
Merge pull request #5859 from anhu/ws
...
whitespace
2022-12-06 14:08:10 -08:00
jordan
246ce8dbe1
Cleanup spaces.
2022-12-06 15:24:34 -06:00
Anthony Hu
754440e0f2
whitespace
2022-12-06 15:12:44 -05:00
David Garske
6bde6af973
Merge pull request #5858 from anhu/dtls13_fixups
...
Fixups for problems discovered while testing for DTLS 1.3
2022-12-06 10:44:26 -08:00
David Garske
9e181e8ecb
Merge pull request #5857 from gojimmypi/GitIgnore
...
gitignore old cmake, VisualGDB working & Espressif sdkconfig files
2022-12-06 10:44:05 -08:00
David Garske
824c280d12
Merge pull request #5807 from lealem47/sniffer_error
...
Improvement for sniffer error messages
2022-12-06 09:40:07 -08:00
David Garske
44a1ffa56e
Merge pull request #5855 from ejohnstown/rdrand-ok
...
DRBG OK
2022-12-06 08:53:07 -08:00
David Garske
a5f9e5c3c8
Merge pull request #5820 from SparkiDev/entropy_memuse
...
MemUse Entropy: enabled with HAVE_ENTROPY_MEMUSE
2022-12-06 08:52:45 -08:00
Anthony Hu
7935a11b3e
Fixups for problems discovered while testing for DTLS 1.3
2022-12-06 11:30:23 -05:00
gojimmypi
ef63a5287a
Ignore old cmake, VisualGDB working & Espressif sdkconfig files
2022-12-06 08:10:14 -08:00
David Garske
a6c98a11d9
Merge pull request #5845 from anhu/re-sign
...
Don't regenerate in wolfSSL_PEM_write_bio_X509().
2022-12-06 06:35:13 -08:00
Sean Parkinson
1f6a9d442b
MemUse Entropy: enabled with HAVE_ENTROPY_MEMUSE
...
--enable-entropy-memuse enables the software base entropy gatherer.
The entropy source uses difference in timing to read/write cache lines.
Random indeces into a buffer are updated with the high resolution timer
value which is fed into a hash to produce further random indeces.
The current time is added to the entropy samples at time of
conditioning.
2022-12-06 14:01:16 +10:00
David Garske
47b8caa0b7
Merge pull request #5849 from SparkiDev/sp_int_sp_ecc_fix
...
SP int: fix when ECC specific size code included
2022-12-05 17:15:04 -08:00
John Safranek
3891cd65d8
DRBG OK
...
When initializing the RNG and are using RDRAND, or one of the other
replacement random number generators that could fall back to the
Hash_DRBG if unavailable, set the status to DRBG_OK. This would fix a
problem if someone assumes the DRBG status is meaningful.
2022-12-05 16:09:45 -08:00
JacobBarthelmeh
f1daa2d356
fix other name san parsing and add RID cert to test parsing
2022-12-05 15:51:33 -08:00
Sean Parkinson
6db2ea0672
SP int: fix when ECC specific size code included
...
Was enabled when !SP and HAVE_ECC
Now enabled when !WOLFSSL_SP_MATH and HAVE_ECC
2022-12-06 09:44:05 +10:00
Sean Parkinson
f38c7303eb
Merge pull request #5853 from douzzer/20221205-sp-int-bugprone-macro-parentheses
...
20221205-sp-int-bugprone-macro-parentheses
2022-12-06 09:18:40 +10:00
Daniel Pouzzner
595f8a30d6
wolfcrypt/src/sp_int.c: fix bugprone-macro-parentheses in ALLOC_SP_INT() and ALLOC_SP_INT_ARRAY() introduced in aeca8cb17a.
2022-12-05 15:21:17 -06:00
David Garske
9d9549fbd3
Merge pull request #5836 from anhu/kyber_cleanup
...
Remove kyber-90s and route all kyber through wolfcrypt.
2022-12-05 13:18:44 -08:00
Anthony Hu
312b488582
Remove double free
2022-12-05 15:39:14 -05:00
David Garske
d3441545ef
Merge pull request #5852 from SparkiDev/sp_c_perf_2
...
SP C, SP int: improve performance
2022-12-05 11:51:28 -08:00
David Garske
5dee15d074
Merge pull request #5850 from SparkiDev/sp_exptmod_nct_err_fix
...
SP int: fix check of err in _sp_exptmod_nct
2022-12-05 11:24:12 -08:00
David Garske
304f287a7e
Merge pull request #5828 from SparkiDev/sp_int_static_size
...
SP int: check size required when using sp_int on stack
2022-12-05 11:23:25 -08:00
Anthony Hu
65a5ea7cae
Make sure certs are identical in tests.
2022-12-05 13:57:53 -05:00
Sean Parkinson
22141faf16
SP C, SP int: improve performance
...
In SP C: Improve performance of large digit mul and sqr.
In SP int: include optimized 16 digit mul and sqr when compiling SAKKE.
2022-12-05 14:17:09 +10:00
Sean Parkinson
4601a57ff2
SP int: fix check of err in _sp_exptmod_nct
2022-12-05 09:36:28 +10:00
jordan
87113cc88d
Fix mingw-w64 build issues on windows.
2022-12-03 17:00:44 -06:00
David Garske
b99f5e5041
Merge pull request #5847 from douzzer/20221203-sp-int-missing-const
...
20221203-sp-int-missing-const
2022-12-03 12:39:33 -08:00
Daniel Pouzzner
cd1a61288b
wolfcrypt/src/sp_int.c: in _sp_mont_red(), add missing const in SP_WORD_SIZE == 32 codepath.
2022-12-03 10:14:15 -06:00
David Garske
ea2d79338c
Merge pull request #5846 from douzzer/20221202-dtls-crypt-only-gating
...
20221202-dtls-crypt-only-gating
2022-12-03 07:21:55 -08:00
Anthony Hu
57a5c9701d
Missed a free of der
2022-12-02 17:23:47 -05:00
Anthony Hu
42c37b6831
eliminate need for --enable-kyber
2022-12-02 17:16:41 -05:00
Anthony Hu
f58f3bd986
Don't regenerate in test_wolfSSL_PEM_write_bio_X509(). We don't have the private key.
2022-12-02 16:41:24 -05:00
Lealem Amedie
c506812cf0
Improvement for some sniffer error messages
2022-12-02 13:27:29 -08:00
Daniel Pouzzner
3ea8dd2f67
src/dtls.c: add WOLFCRYPT_ONLY gating.
2022-12-02 15:13:31 -06:00
Lealem Amedie
dd89fe269e
Fix logic in GetSnifferServer
2022-12-02 13:13:16 -08:00
Lealem Amedie
ed69bb33a6
Async Sniffer: Fix for decryption after second handshake
2022-12-02 13:11:23 -08:00
David Garske
efd194ea74
Merge pull request #5842 from SparkiDev/sp_int_clang_tidy
...
SP int: fixes for static analyser clang-tidy
2022-12-02 07:42:00 -08:00
Sean Parkinson
3239ff5b0e
SP int: fixes for static analyser clang-tidy
...
Const poison sp_int.c to allow static analysers to work better.
sp_prime_is_prime_ex() checks whether a->used is negative to avoid bad
behavior.
2022-12-02 13:57:32 +10:00
David Garske
c079455d3e
Merge pull request #5839 from SparkiDev/sp_int_pub_apis
...
SP int: fix which APIs are public available wiht WOLFSSL_SP_MATH
2022-12-01 19:33:11 -08:00
Sean Parkinson
39716737c1
SP int: fix which APIs are public available wiht WOLFSSL_SP_MATH
...
Make sp_rshd not available when WOLFSSL_SP_MATH in header.
sp_rshd is not required by any wolfCrypt code.
Fix sp_rshd comment on #endif
Make sp_div publicly available in some WOLFSSL_SP_MATH builds.
Delare sp_div for some WOLFSSL_SP_MATH builds.
Fix test.c to compile with WOLFSL_SP_MATH and HAVE_VALGRIND.
2022-12-02 09:11:35 +10:00
David Garske
5f410b47b7
Merge pull request #5829 from SparkiDev/sp_invmod_fixes
...
SP int: fix error checks when modulus even
2022-12-01 15:05:22 -08:00
Sean Parkinson
c59d6c36e4
Merge pull request #5838 from douzzer/20221201-fix-kcapi
...
20221201-fix-kcapi
2022-12-02 08:24:14 +10:00
David Garske
8fb92a283a
Merge pull request #5716 from rizlik/dtls_cookie_stateless
...
dtls: allow for stateless client hello parsing
2022-12-01 13:47:33 -08:00
Daniel Pouzzner
1c7826b199
wolfcrypt/src/port/kcapi/kcapi_aes.c: fix error checking on KCAPI wc_AesGcmEncrypt() and wc_AesGcmDecrypt().
2022-12-01 12:54:57 -06:00
David Garske
d1e6ce064f
Merge pull request #5832 from JacobBarthelmeh/fuzzing
...
free signer if malloc cases fail
2022-12-01 10:35:15 -08:00
JacobBarthelmeh
1e8ecd3d71
Merge pull request #5830 from SparkiDev/sp_int_no64bit
...
SP int: check NO_64BIT before speculative using long long
2022-12-01 11:10:33 -07:00
Marco Oliverio
fc4b008912
dtls: fix heap hint in XFREE
2022-12-01 16:47:37 +00:00
Marco Oliverio
abbba4815e
tests: add tests for stateless dtls v1.2 cookie
2022-12-01 16:47:37 +00:00
Marco Oliverio
af00c89f18
dtls v1.2: stateless support WOLFSSL_DTLS_NO_HVR_ON_RESUME
2022-12-01 16:30:54 +00:00
Marco Oliverio
cc7dad3ee6
dtls v1.2: support stateless client hello processing
2022-12-01 16:30:54 +00:00
Marco Oliverio
5bc86b8c2c
fix: dtls: always use version DTLS 1.0 in HelloVerifyRequest
...
see rfc6347 section 4.2.1
2022-12-01 16:30:54 +00:00
Marco Oliverio
4fa1b9dd0a
fix: AddRecordHeader: use correct minor when using DTLS
2022-12-01 16:30:54 +00:00
Marco Oliverio
aff01121a2
fix: dtls v1.2: reset window when invoking DtlsResetState
2022-12-01 16:30:54 +00:00
Marco Oliverio
173208728a
fix: tls13: hash using right version when downgrading
2022-12-01 16:30:54 +00:00
Marco Oliverio
2c35d7f9d2
fix: formatting and typos
...
dtls: fix debug message when downgrading
internal.c: fix typo
2022-12-01 16:30:53 +00:00
David Garske
1388e66059
Merge pull request #5706 from icing/ha-quic
...
Set of QUIC related changes for HAProxy integration.
2022-12-01 06:11:14 -08:00
Stefan Eissing
e5cfd96609
QUIC API support in OpenSSL compat layer, as needed by HAProxy integration.
...
- adding patch for HAProxy, see dod/QUIC.md, based on current master.
For documentaton purposes, since HAProxy does not accept PRs. To be
removed once forwarded to the project.
2022-12-01 10:12:35 +01:00
Sean Parkinson
aeca8cb17a
SP int: check size required when using sp_int on stack
...
SP int can be configured to declare temporary sp_ints.
Check that the requested number of digits is not larger than the max
supported (SP_INT_DIGITS).
Also check arrays of sp_ints too.
2022-12-01 12:53:52 +10:00
David Garske
2d88fd3b75
Merge pull request #5835 from lealem47/zd15262
...
Making CTC_MAX_CRLINFO_SZ a compile-time option
2022-11-30 17:35:11 -08:00
Sean Parkinson
e83e0693b9
SP int: check NO_64BIT before speculative using long long
...
ULLONG_MAX is not defined for old versions of C compiler.
An unsigned long long type may still be available though.
Don't use unsigned long long for a 64-bit type when NO_64BIT is defined.
2022-12-01 10:25:13 +10:00
David Garske
c6a7afee74
Merge pull request #5834 from anhu/http
...
Correction to a webpage link.
2022-11-30 15:14:35 -08:00
Lealem Amedie
eba6a6d9f6
Making CTC_MAX_CRLINFO_SZ a compile-time option
2022-11-30 14:24:23 -08:00
Anthony Hu
a2fb4c0788
Remove kyber-90s and route all kyber through wolfcrypt.
2022-11-30 17:17:28 -05:00
Anthony Hu
3b00c9abee
Correction to a webpage link.
2022-11-30 16:27:50 -05:00
JacobBarthelmeh
01833a369e
free signer if malloc cases fail
2022-11-30 10:02:33 -08:00
gojimmypi
fec7469c19
Tidy up Espressif ESP32 test and benchmark examples ( #5800 )
...
Tidy up Espressif ESP32 test and benchmark examples:
* add VisualGDB project and solution files for server and client
* "hardware in use revert to software" is now verbose level message
* Remove (void) TAG; - not needed to appease compiler
* include esp_log.h lib with defined(WOLFSSL_ESPIDF)
* large ESP32 default stack size
* check for max number of arguments assembled into array
* cleanup & comments per code review
* wolfssl_test VisualGDB updates
* Espressif wolfssl_test default stack 55,000 bytes
2022-11-30 10:01:46 -08:00
Sean Parkinson
c7c80be15e
SP int: sp_invmod_div check div result before proceeding
2022-11-30 18:33:35 +10:00
Sean Parkinson
faf848a915
SP int: fix error checks when modulus even
2022-11-30 18:15:30 +10:00
Daniel Pouzzner
973de0e954
Merge pull request #5831 from SparkiDev/sp_int_div_clear_fix
...
SP int: don't call sp_clear unless no longer using sp_int
2022-11-30 02:15:19 -06:00
Sean Parkinson
61c2fd9a2b
SP int: don't call sp_clear unless no longer using sp_int
...
Put in casts to be sure no compiler complains.
Tidy up other parts of the code.
2022-11-30 16:36:48 +10:00
David Garske
24cc8e7145
Merge pull request #5827 from douzzer/20221129-ecb-benchmark-throughput
...
20221129-ecb-benchmark-throughput
2022-11-29 18:12:23 -08:00
David Garske
63051f3826
Merge pull request #5825 from SparkiDev/api_test_sep
...
Unit test: rework to be able to run API tests individually
2022-11-29 18:11:57 -08:00
Sean Parkinson
fed3f53969
Merge pull request #5826 from kaleb-himes/gcc-11-12-fixes
...
Initialize variable causing failures with gcc-11 and gcc-12
2022-11-30 10:40:17 +10:00
Daniel Pouzzner
4bacc25e22
examples/benchmark/tls_bench.c: fix for clang-analyzer-deadcode.DeadStores in bench_tls().
2022-11-29 17:09:05 -06:00
David Garske
b2f9838af4
Fix DSA public decode to allow extra buffer (in case private key is passed in). Fixes for clang-tidy "value stored never read". Allow showing line number and conditional with DEBUG_WOLFSSL_VERBOSE on TEST_RES_CHECK.
2022-11-29 14:58:52 -08:00
kaleb-himes
4d2b893fb3
Initialize variable causing failures with gcc-11 and gcc-12
2022-11-29 14:59:53 -07:00
Daniel Pouzzner
a9b28c1562
wolfcrypt/benchmark/benchmark.c: make iteration increment in bench_aesecb_internal() even lumpier (by a factor of 10) to further reduce false positives from iteration overhead.
2022-11-29 14:39:44 -06:00
David Garske
7310eb102f
Whitespace and line length cleanups.
2022-11-29 09:52:11 -08:00
Sean Parkinson
e4e53ab7ca
Unit test: rework to be able to run API tests individually
...
Change API test cases to return a result.
Test success is now TEST_SUCCESS (1).
Test result can be returned with use of macro TEST_RES_CHECK().
Always print the id, name of the test and the result (skipped or
otherwise) before and after running the test case.
Changed test case output to go to stderr.
Fixed some formatting.
Add option to take index and/or name of test case to run.
Added option to list all API tests.
Added option to only run API tests.
Added options to show usage.
2022-11-29 12:37:20 +10:00
David Garske
7aa796bdbd
Merge pull request #5824 from SparkiDev/pkcs11_init_rv
...
PKCS#11: add initialization API that returns PKCS#11 return value
2022-11-28 14:31:03 -08:00
David Garske
3046899966
Merge pull request #5821 from anhu/ntru_saber_purge
...
Purge NTRU and SABER. Not going to be standardized.
2022-11-28 08:28:11 -08:00
David Garske
7697337703
Merge pull request #5816 from SparkiDev/sp_int_rework
...
SP int: Comment and rework some code
2022-11-28 08:26:58 -08:00
David Garske
0c2f713ca3
Merge pull request #5823 from SparkiDev/arm32-ldrd-fixes
...
ARM32 ASM: don't use ldrd on user data
2022-11-28 08:25:23 -08:00
Sean Parkinson
7005d416ce
SP int: Comment and rework some code
...
Improvements to sp_int.c that make it slightly quicker and documented.
2022-11-28 18:06:09 +10:00
Sean Parkinson
2d424f7d06
PKCS#11: add initialization API that returns PKCS#11 return value
2022-11-28 16:40:29 +10:00
Sean Parkinson
847c478c45
ARM32 ASM: don't use ldrd on user data
...
Alignment fixes.
Regeneration of ARM32 has config.h included.
2022-11-28 12:59:58 +10:00
Anthony Hu
7c576de914
Fixes from testing
2022-11-25 16:00:09 -05:00
Anthony Hu
0bfa5c9836
Purge NTRU and SABER. Not going to be standardized.
2022-11-25 14:54:08 -05:00
Sean Parkinson
ee91f4415d
Merge pull request #5819 from miyazakh/enable_sp_math_conf
...
must have SP enabled with SP math
2022-11-25 21:16:29 +10:00
Hideki Miyazaki
3597034a42
must have SP enabled with SP math
2022-11-25 08:41:11 +09:00
Sean Parkinson
ba3022c32a
Merge pull request #5818 from anhu/remove_WOLFSSL_HAVE_KYBER
...
Remove some unnecessary guarding. Preventing build on STM32.
2022-11-25 08:00:31 +10:00
Sean Parkinson
558343dd2b
Merge pull request #5817 from douzzer/20221124-wc_GetCurrentIdx-prototype
...
20221124-wc_GetCurrentIdx-prototype
2022-11-25 07:58:26 +10:00
Anthony Hu
5e191b7218
Remove some unnecessary guarding. Preventing build on STM32.
2022-11-24 11:49:12 -05:00
Daniel Pouzzner
466b625b5d
wolfcrypt/src/logging.c: add missing void arg list to definition of wc_GetCurrentIdx().
2022-11-24 09:32:58 -06:00
Sean Parkinson
d0fb9a0b30
Merge pull request #5809 from tmael/sp_static_mem
...
Support static memory with sp-math
2022-11-24 12:42:42 +10:00
Sean Parkinson
cf8ea5c606
Merge pull request #5812 from ejohnstown/crl-ocsp
...
OCSP/CRL
2022-11-24 12:42:17 +10:00
John Safranek
88f3570fe4
OCSP/CRL
...
Added comments for the usage of OCSP_WANT_READ used with the CRL I/O
callback.
2022-11-23 16:35:10 -08:00
David Garske
0a38553909
Merge pull request #5798 from JacobBarthelmeh/python
...
account for 'pulled' error nodes
2022-11-23 14:57:03 -08:00
David Garske
a482ab367a
Merge pull request #5781 from anhu/maxq10xx
...
Support for Analog Devices MAXQ1080 and MAXQ1065
2022-11-23 13:31:22 -08:00
John Safranek
909fd726cd
OCSP/CRL
...
Fixing issue #3070 . When the OCSP responder returns an unknown exception,
continue through to checking the CRL. Before, it was setting the flag
to check CRL, then clearing it because of the exception.
2022-11-23 10:50:12 -08:00
Anthony Hu
f3546b50fd
Conform to pre-existing pattern.
2022-11-23 17:58:12 +00:00
Anthony Hu
6190666108
Support for Analog Devices MAXQ1080 and MAXQ1065
2022-11-23 11:57:31 -05:00
Sean Parkinson
54466b670a
Merge pull request #5810 from Uriah-wolfSSL/haproxy-integration
...
Added required config option and return value for HaProxy
2022-11-23 10:01:17 +10:00
Tesfa Mael
4c95f64b77
Check NO_BIG_INT with static memory
2022-11-22 15:32:34 -08:00
Jacob Barthelmeh
b6ae17804a
update comments and check error case
2022-11-22 11:22:38 -07:00
Uriah Pollock
d373c0856a
Added required config option and return value for HaProxy
2022-11-22 10:42:05 -06:00
Tesfa Mael
5c7127ff24
Support static memory with sp-math
2022-11-22 08:17:27 -08:00
Juliusz Sosinowicz
50f19ec225
Merge pull request #5806 from embhorn/zd15177
...
Fix X509_get1_ocsp to set num of elements in stack
2022-11-22 12:00:08 +01:00
Sean Parkinson
55718d214c
Merge pull request #5801 from philljj/zd15172
...
Fix leak in wolfSSL_X509_NAME_ENTRY_get_object.
2022-11-22 15:11:18 +10:00
Eric Blankenhorn
dee73887b8
Fix X509_get1_ocsp to set num of elements in stack
2022-11-21 08:25:46 -06:00
Sean Parkinson
73ecd604bd
Merge pull request #5803 from douzzer/20221120-enable-brainpool
...
20221120-enable-brainpool
2022-11-21 10:08:50 +10:00
Daniel Pouzzner
0da2a0a524
configure.ac: add --enable-brainpool, default on unless disable-ecccustcurves, and use it to enable brainpool in enable-all and enable-all-crypto, subject to override.
2022-11-20 11:00:50 -06:00
David Garske
ba8731dc69
Merge pull request #5802 from douzzer/20221118-minor-fixes
...
20221118-minor-fixes
2022-11-19 08:11:53 -08:00
Daniel Pouzzner
2fa206dec0
wolfcrypt/src/siphash.c: fix bugprone-macro-parentheses, and in wc_SipHash(), fix clang-diagnostic-overlength-strings around inline asm.
2022-11-18 22:43:13 -06:00
Daniel Pouzzner
6f98a5b271
src/internal.c: in VerifyServerSuite(), narrow condition and fix return value in error check added in 647ce794dd.
2022-11-18 22:21:08 -06:00
Daniel Pouzzner
39ee267a31
configure.ac: mutually harmonize --enable-all and --enable-all-crypto: add enable-siphash to enable-all, and add Brainpool to enable-all-crypto.
2022-11-18 22:13:22 -06:00
kareem-wolfssl
9f36d9e530
Merge pull request #5799 from tim-weller-wolfssl/gh5754-mips64-abi32
...
Add check for 64-bit ABI on MIPS64 before declaring a 64-bit CPU
2022-11-18 13:19:39 -07:00
jordan
153ab82ad8
Fix leak in wolfSSL_X509_NAME_ENTRY_get_object.
2022-11-18 11:23:15 -06:00
tim-weller-wolfssl
f586183d1e
Add check for 64-bit ABI on MIPS64 before declaring a 64-bit CPU
2022-11-18 07:12:04 -06:00
JacobBarthelmeh
34f8fa797e
Merge pull request #5695 from embhorn/gh5693
...
Fix --enable-devcrypto build error for sys without u_int8_t type
2022-11-17 16:01:35 -07:00
JacobBarthelmeh
143dac64a3
account for 'pulled' error nodes
2022-11-17 14:51:37 -08:00
David Garske
bd7b442df3
Merge pull request #5796 from tmael/mem_err
...
Propagate malloc returning NULL up the call stack
2022-11-16 12:45:42 -08:00
Tesfa Mael
2a2cf5671e
Move error check in CompareSuites
2022-11-16 09:29:24 -08:00
Tesfa Mael
647ce794dd
unmask malloc returning NULL
2022-11-16 09:25:25 -08:00
Kaleb Himes
38b511f297
Merge pull request #5651 from haydenroche5/engine_pss_fips_v5
...
Add RSA PSS salt defines to engine builds if not FIPS v2.
2022-11-15 16:30:45 -07:00
David Garske
7d046e0eb8
Merge pull request #5793 from philljj/zd15041
...
Support ASN1/DER CRLs in LoadCertByIssuer.
2022-11-15 14:05:10 -08:00
jordan
17105606b1
Cleanup format and typos, and use WOLFSSL_FILETYPE.
2022-11-15 11:45:11 -06:00
Eric Blankenhorn
dc9f46a3be
Fix --enable-devcrypto build error for sys without u_int8_t type
2022-11-11 15:40:12 -06:00
David Garske
9036c098b0
Merge pull request #5760 from cconlon/se050
...
NXP SE050: feature expansion and fixes
2022-11-11 13:31:05 -08:00
jordan
81ed2a60b4
Support ASN1/DER CRLs in LoadCertByIssuer.
...
This fixes hash based dir lookup of ASN1/DER CRLs in OpenSSL
compatible API. The function wolfSSL_X509_load_crl_file is
called with entry->dir_type, rather than hardcoded filetype.
A new test crl was added, and existing crl 0fdb2da4.r0 was
reorganized to a new dir.
Also, completes the stub wolfSSL_X509_LOOKUP_add_dir. A new
test function test_X509_LOOKUP_add_dir was added to tests/api.c
2022-11-11 15:13:00 -06:00
David Garske
cb7f73d0a3
Merge pull request #5792 from JacobBarthelmeh/Testing
...
allow for cpuid public functions with non-intel build
2022-11-11 12:28:06 -08:00
Chris Conlon
45bf793b5a
SE050 expansion: add RSA support, allow for larger key IDs, get/set key ID from ecc_key/RsaKey, fixes for SE050 hashing, remove XREALLOC dependency, API to store/get binary object, API to erase object, test.c compatibility
2022-11-11 12:14:14 -07:00
David Garske
9c569b950a
Merge pull request #5791 from douzzer/20221110-wc_DhAgree_Sync-uninited-use
...
20221110-wc_DhAgree_Sync-uninited-use
2022-11-11 09:01:52 -08:00
Jacob Barthelmeh
c78b669b42
allow for cpuid public functions with non-intel build
2022-11-11 09:42:02 -07:00
Daniel Pouzzner
3bfff3bfc5
wolfcrypt/src/dh.c: fix benign uses of uninited var in wc_DhAgree_Sync(), introduced in #5782 -- see oss-fuzz #53177 .
2022-11-11 08:51:17 -06:00
JacobBarthelmeh
7887576032
Merge pull request #5788 from dgarske/small_build
...
Fix for misc `HashObject` to be excluded for `WOLFCRYPT_ONLY`
2022-11-10 16:03:25 -07:00
David Garske
f4621a6807
Merge pull request #5786 from philljj/zd15125
...
Fix incorrect self signed error return.
2022-11-10 14:13:38 -08:00
jordan
5ad6ff23d5
Use local int lastErr instead of args->lastErr.
2022-11-10 13:46:51 -06:00
David Garske
77ffacf6d1
Fix for build error with SHA2-256 disabled.
2022-11-10 11:38:08 -08:00
JacobBarthelmeh
95a3fea947
Merge pull request #5789 from dgarske/aesccm256
...
Added AES CCM 256-bit test
2022-11-10 10:54:00 -07:00
JacobBarthelmeh
154378220d
Merge pull request #5790 from per-allansson/xcode-project-fixes
...
Xcode project fixes
2022-11-10 10:46:31 -07:00
David Garske
3b23a49a5f
Merge pull request #5761 from tim-weller-wolfssl/zd15084-x509-crl-fail
...
Link newly created x509 store's certificate manager to self by default
2022-11-10 06:10:18 -08:00
Per Allansson
0e4621a794
IDE/XCODE: include armv8-xxx in projects
2022-11-10 09:44:56 +01:00
Per Allansson
364b2ddc8f
IDE/XCODE: include dtls.c/dtls13.c/tls13.c/quic.c/kdf.c in projects
2022-11-10 09:44:01 +01:00
David Garske
c573ba9864
Merge pull request #5758 from per-allansson/dtls13-fips
...
Allow DTLS 1.3 to compile when FIPS is enabled
2022-11-09 18:18:06 -08:00
David Garske
90d37f9786
Add AES CCM 256-bit test.
2022-11-09 17:46:07 -08:00
Sean Parkinson
5d2124e70d
Merge pull request #5787 from dgarske/fixes_minor
...
Fix for `test_wolfSSL_sk_CIPHER_description` incorrectly failing
2022-11-10 09:22:08 +10:00
tim-weller-wolfssl
3bc3ec25b8
Add link of newly created x509 store's certificate manager to self by default
2022-11-09 17:17:30 -06:00
David Garske
35ccd880ed
Fix for misc HashObject to be excluded for WOLFCRYPT_ONLY.
2022-11-09 15:07:36 -08:00
Sean Parkinson
922771bf05
Merge pull request #5785 from miyazakh/undef_gcc4p8
...
fix compile error due to Werro=undef on gcc-4.8
2022-11-10 08:05:56 +10:00
David Garske
57ae840f39
Fix for test_wolfSSL_sk_CIPHER_description incorrectly failing with TLS v1.3 NULL cipher.
2022-11-09 12:05:16 -08:00
jordan
961c696436
Fix incorrect self signed error return.
...
ASN_SELF_SIGNED_E was being overwritten with ASN_NO_SIGNER_E when
compiled with certreq and certgen.
2022-11-09 10:27:31 -06:00
David Garske
231a4098fa
Merge pull request #5783 from SparkiDev/sp_small_p521_fix
...
SP P521 small HAVE_COMP_KEY: sp_521_mont_sqr_n*
2022-11-09 06:07:12 -08:00
Hideki Miyazaki
454cd02627
fix compile error due to Werro=undef on gcc-4.8
2022-11-09 14:00:50 +09:00
Daniel Pouzzner
1938b117c2
Merge pull request #5782 from SparkiDev/dh_sp_agree_0_1_fix
...
DH: fix when using SP
2022-11-08 22:41:08 -06:00
Sean Parkinson
3e58c63647
SP P521 small HAVE_COMP_KEY: sp_521_mont_sqr_n*
...
Specific compress key code for P521 doesn't need a n square function.
Fixing generation of x86_64 ASM scripts resulted in adding carriage
return to chacha_asm.S.
2022-11-09 11:43:13 +10:00
Sean Parkinson
2d757eadd0
DH: fix when using SP
...
The agreed secret must not be 0 or 1 by SP800-56A, 5.7.1.1.
Check done when not using SP.
Add check to SP calling code.
2022-11-09 09:55:16 +10:00
David Garske
eac3b4e189
Merge pull request #5752 from julek-wolfssl/alt-name-str-type
...
Set alt name type to V_ASN1_IA5STRING
2022-11-08 15:42:39 -08:00
Sean Parkinson
dfa997a6fd
Merge pull request #5780 from douzzer/20221105-benchmark-determinism-fixes
...
20221105-benchmark-determinism-fixes
2022-11-09 08:44:08 +10:00
Sean Parkinson
72a4a8a377
Merge pull request #5599 from embhorn/gh5580
...
Fix casts in evp.c and build issue in ParseCRL
2022-11-09 08:40:31 +10:00
Daniel Pouzzner
48ba365fd6
fixes for defects:
...
clang-analyzer-deadcode.DeadStores in examples/server/server.c;
-Werror=use-after-free and LeakSanitizer Direct leak in tests/api.c;
nullPointerRedundantCheck in src/pk.c which identified a semantically consequential flub.
2022-11-08 14:04:16 -06:00
Daniel Pouzzner
ca1ca24bc9
wolfcrypt/benchmark/benchmark.c: fix formatting (column alignment) in asym tests; fix typo in asym_pq section.
2022-11-08 12:31:04 -06:00
Eric Blankenhorn
4b30f47e9b
Fix casts in evp.c and build issue in ParseCRL
2022-11-08 10:59:18 -06:00
Sean Parkinson
bd83345c02
Merge pull request #5773 from dgarske/async_v5.5.3
...
Fixes for various tests that do not properly handle `WC_PENDING_E`
2022-11-08 14:47:23 +10:00
Sean Parkinson
3d228415f4
Merge pull request #5734 from dgarske/zd15017
...
Fixes for async sniffer handling of packets with multiple TLS messages
2022-11-08 14:46:40 +10:00
David Garske
d42f8e0834
Merge pull request #5600 from embhorn/zd14858
...
Add reference to wc_AesInit in Gmac API doc
2022-11-07 17:44:35 -08:00
David Garske
826dfd8a23
Merge pull request #5766 from SparkiDev/x509_subj_dir_attr_fix
...
ASN X509 subject directory attribute: fix ASN template parsing
2022-11-07 17:41:27 -08:00
David Garske
44e66fd7c7
Merge pull request #5762 from SparkiDev/pkcs11_find_no_class_type
...
PKCS#11: compile time check in finding keys
2022-11-07 17:40:50 -08:00
David Garske
9c645cf5ce
Merge pull request #5747 from SparkiDev/pkcs11_nullptr_user_pin
...
PKCS#11: User PIN can be NULL_PTR
2022-11-07 17:40:38 -08:00
David Garske
2e362a193e
Merge pull request #5742 from SparkiDev/sp_int_64bit_type
...
SP int: guess 64-bit type
2022-11-07 17:40:14 -08:00
David Garske
20913a4201
Fix for sniffer with async to not terminate processing until all pending items have been processed.
2022-11-07 15:45:50 -08:00
David Garske
887b4bd9f0
Merge pull request #5767 from haydenroche5/load_system_root_certs
...
Improve logic for enabling system CA certs on Apple devices.
2022-11-07 15:15:13 -08:00
Sean Parkinson
829fd71714
Merge pull request #5779 from dgarske/compat_heap
...
Fixes for compatibility layer building with heap hint and OSSL callbacks
2022-11-08 08:59:26 +10:00
David Garske
6ca8336c52
Fix for asynchronous sniffer edge case for back to back sessions where new session was created while still pending.
2022-11-07 13:52:40 -08:00
David Garske
0fc303e1fc
Do not throw warning when disabling feature automatically.
2022-11-07 13:10:19 -08:00
David Garske
d2fe30349a
Merge pull request #5778 from kaleb-himes/fix-azsphere-nightly-test
...
Update azsphere support to prevent compilation of file included inline
2022-11-07 12:48:31 -08:00
David Garske
583940ee30
Merge pull request #5776 from SparkiDev/sp_int_mingw64_fix
...
SP int: support mingw64 again
2022-11-07 11:39:12 -08:00
David Garske
59774ae576
Fixes for building with use of heap hint and compatibility layer. Fix for invalid OSSL callback function errors.
2022-11-07 11:33:39 -08:00
kaleb-himes
b052ef46ba
Add new setting per peer review feedback
2022-11-07 11:25:01 -07:00
kaleb-himes
0a97aa83b6
Update azsphere support to prevent compilation of file included inline
2022-11-07 10:36:24 -07:00
Sean Parkinson
b845c8bfc8
SP int: support mingw64 again
...
Check for _MSC_VER to determine that we are compiling for MSVC.
2022-11-07 16:34:26 +10:00
David Garske
1ee3a78e4a
Fixes for various tests that do not properly handle WC_PENDING_E.
2022-11-04 14:56:40 -07:00
Hayden Roche
d0f33f62f4
Fix missing config.h include in some ARMv8 files.
2022-11-04 13:53:22 -07:00
Hayden Roche
d7cbd8cd17
Improve logic for enabling system CA certs on Apple devices.
...
In configure.ac and CMakeLists.txt, check for the header
Security/SecTrustSettings.h. If this header is found, enable the feature. If
it isn't, disable it. For non-configure/non-CMake builds, require the user to
explicitly define HAVE_SECURITY_SECTRUSTSETTINGS_H if they want to use system
CA certs (handled in settings.h).
2022-11-04 13:52:45 -07:00
Hayden Roche
5d70f3efce
Merge pull request #5730 from philljj/zd15040
2022-11-04 13:32:48 -07:00
Hayden Roche
4a917219f7
Merge pull request #5608 from SparkiDev/pk_c_rework_2
2022-11-04 13:32:36 -07:00
Hayden Roche
1ce5951f0d
Merge pull request #5722 from dgarske/stm32
2022-11-04 13:32:11 -07:00
Hayden Roche
7cc2336af7
Merge pull request #5737 from SparkiDev/ecc_cofactor
2022-11-04 13:31:24 -07:00
Hayden Roche
e3621d5bb1
Merge pull request #5771 from dgarske/revert-5622-sniffer_sequence
2022-11-04 13:25:48 -07:00
Chris Conlon
dce1fc4766
Merge pull request #5703 from miyazakh/renesas_rx72n_simple
2022-11-04 11:43:08 -06:00
John Safranek
5f4cf53d87
Merge pull request #5772 from JacobBarthelmeh/OCSP
2022-11-04 09:46:42 -07:00
JacobBarthelmeh
8225d3642b
save next status with OCSP response verify
2022-11-03 22:39:47 -07:00
Hayden Roche
cbbe6fec94
Merge pull request #5763 from douzzer/20221031-benchmark-determinism
2022-11-03 14:52:59 -07:00
David Garske
f610df59a9
Whitespace cleanups.
2022-11-03 14:38:43 -07:00
Hayden Roche
fbc4af8701
Merge pull request #5739 from anhu/no_WOLFSSL_DYN_CERT
2022-11-03 14:24:34 -07:00
Hayden Roche
7414dd7ea5
Merge pull request #5768 from kareem-wolfssl/maxCertpolSz
2022-11-03 14:23:17 -07:00
Kareem
48bddc6d07
Update max Cert Policy size based on RFC 5280.
2022-11-03 11:49:15 -07:00
Daniel Pouzzner
b140abd1fd
wolfcrypt/benchmark/benchmark.c: add check_for_excessive_stime() and remove double declaration of base_rusage and cur_rusage.
2022-11-03 13:48:51 -05:00
David Garske
1adc06d181
Fix for Intel QAT handling of sign R when cofactor is not 1. ZD 15017
2022-11-03 10:00:07 -07:00
Sean Parkinson
4766a978cf
ECC cofactor: fix check scalar bits
...
For shared secrets, when a curve has a cofactor, the private key (in
range of order) is multiplied by the cofactor before use.
If there is a cofactor involved, check bit size of scalar against
modulus instead of order.
2022-11-03 10:00:07 -07:00
David Garske
1ec2b14922
Revert "Fix for sniffer to decode out of order packets"
2022-11-03 09:50:15 -07:00
Sean Parkinson
336bef666a
ASN X509 subject directory attribute: fix ASN template parsing
...
Support multiple attributes.
When Country of Citizenship, pull out PRINTABLE_STRING explicitly.
Each type of attribute has a different format.
2022-11-03 09:24:59 +10:00
David Garske
a7635da9e6
Merge pull request #5765 from JacobBarthelmeh/release
...
update for version 5.5.3
2022-11-02 15:46:10 -07:00
JacobBarthelmeh
9b895b74bf
update for version 5.5.3
2022-11-02 13:58:37 -07:00
Sean Parkinson
ae22babf8b
PKCS#11: compile time check in finding keys
...
When WC_PKCS11_FIND_WITH_ID_ONLY defined, don't add key class and
type to attributes of search for by Id.
2022-11-01 17:38:46 +10:00
Daniel Pouzzner
4ab41caf40
make static flags sym_header_printed, asym_header_printed, and pqasym_header_printed, local to the routines that use them (fixes an -Wunused-variable in -UBENCH_ASYM builds).
2022-11-01 01:12:17 -05:00
Daniel Pouzzner
89182b829f
wolfcrypt/benchmark/benchmark.c: add GENERATE_MACHINE_PARSEABLE_REPORT and LINUX_RUSAGE_UTIME codepaths;
...
fflush stdout after each scenario for line-buffered pipelining;
refactor csv_header_count into sym_header_printed, asym_header_printed, and pqasym_header_printed;
move SAKKE tests to precede PQ tests;
rename bench_stats_sym_check() to bench_stats_check();
add bench_stats_asym_finish_ex() accepting a "desc_extra" arg, and use it to disambiguate otherwise-homonymous SAKKE runs;
fix bench_aesecb_internal() to not check time (syscall) for every 3 blocks processed.
2022-11-01 00:15:37 -05:00
JacobBarthelmeh
502a395723
Merge pull request #5757 from SparkiDev/enc_err_forcezero_fix
...
ForceZero fix: encryption fail and not EtM
2022-10-31 11:43:48 -06:00
Per Allansson
0a88bb9779
Allow DTLS 1.3 to compile when FIPS is enabled
2022-10-31 08:42:13 +01:00
Sean Parkinson
4efba8f437
ForceZero fix: encryption fail and not EtM
...
Zeroizing of plaintext on encryption failure will use wrong size when
not using Encrypt-then-MAC. Size may go negative and cast to unsigned.
2022-10-31 09:14:16 +10:00
Juliusz Sosinowicz
8bbbdfa3f9
Set alt name type to V_ASN1_IA5STRING
2022-10-28 19:58:01 +02:00
Anthony Hu
0158c82487
Keep WOLFSSL_DYN_CERT
2022-10-28 13:37:55 -04:00
jordan
c4e758dda5
Fix X509 subject and issuer name_hash mismatch
...
Fix logging message and g++ invalid conversion error.
2022-10-27 19:31:30 -05:00
Sean Parkinson
4b648e7e08
PKCS#11: User PIN can be NULL_PTR
...
Allow TokenInit to store NULL for User Pin.
New APIs to handle not setting User PIN.
2022-10-28 08:52:18 +10:00
jordan
822f11d1a1
Fix X509 subject and issuer name_hash mismatch
...
Refactor duplicate code a bit more.
2022-10-27 15:15:55 -05:00
Hideki Miyazaki
e9d37b9bd1
addressed code review
2022-10-27 16:52:04 +09:00
Sean Parkinson
7a4657c881
Fixes from review 3
2022-10-27 11:25:27 +10:00
Sean Parkinson
8519988d57
SP int: guess 64-bit type
...
When ULLONG_MAX not defined and long is the 32-bit type, speculatively
use long long as the 64-bit type.
2022-10-27 10:19:21 +10:00
David Garske
fe28702891
Fixes for async sniffer handling of packets with multiple TLS messages. Other minor cleanups for spelling and CheckPreRecord SnifferSession deference.
2022-10-26 15:28:02 -07:00
David Garske
e26d4f84fc
Improvements for AES GCM on STM32. Cleanups for STM32 example.
2022-10-26 14:10:19 -07:00
jordan
b31567e752
Fix X509 subject and issuer name_hash mismatch
...
Refactor duplicate code, and better error messages.
2022-10-26 15:27:15 -05:00
David Garske
0c79ca1de1
Fix for STM32 PKA with coefSign for non 256-bit curves. Don't check point for STM PKA. ZD14928
2022-10-26 09:44:58 -07:00
Anthony Hu
9486721bb8
Prevent WOLFSSL_NO_MALLOC from breaking RSA certificate verfication
2022-10-26 12:11:55 -04:00
jordan
be07401856
Fix X509 subject and issuer name_hash mismatch
...
Use WOLFSSL_ERROR_MSG for errors, don't leak canonName, and better
error handling and comments.
2022-10-26 10:25:05 -05:00
Sean Parkinson
5db2d53d54
Fixes from review part 2
2022-10-26 16:04:05 +10:00
Sean Parkinson
e68c7bb74d
Move file and BIO reading out to ssl_misc.c
2022-10-26 10:28:20 +10:00
Sean Parkinson
e477571168
Fixes from review part 1
2022-10-26 10:28:20 +10:00
Sean Parkinson
dad62fc182
pk.c: rework DH API and improve PEM read/write
...
Reorganized the DH APIs into groups.
Reworked all DH APIs.
Improved testing of DH API.
Implemented wolfSSL_PEM_read_RSAPublicKey() and
wolfSSL_PEM_write_RSA_PUBKEY().
Fix public key PEM write implementations to use the correct
header/footer names.
Added support for "RSA PUBLIC KEY" in header and footer in DerToPemEx().
Reworked PEM read/write APIs to be independent. No longer create an EVP
to use common function - common functionality refectored out.
Similarly file APIs don't create a BIO and call the partner APIs.
Improved testing of PEM read/write APIs.
Generic read BIO from memory BIO now returns the buffer instead of
allocating memory and reading.
No longer reading chunks when a file BIO.
Added wolfssl_make_rng() to create or get get global random. All RSA and
DH APIs now use this. DH_generate_parameters() creates a random object
and use global on error rather than just using global random.
Changed implementations to use BIO_new_fp() instead of create a new BIO
and setting file pointer.
2022-10-26 10:28:20 +10:00
jordan
8b7668f771
Fix X509 subject and issuer name_hash mismatch
...
Fix api test and cleanup.
2022-10-25 13:00:22 -05:00
jordan
e3153f3997
Fix X509 subject and issuer name_hash mismatch
2022-10-24 18:09:44 -05:00
Hideki Miyazaki
60aac9039d
remove aesccm
2022-10-15 11:05:25 +09:00
Hideki Miyazaki
60a8f6dff9
Add simple example working on Rx72n
...
Use T4-Tiny IP stack
2022-10-15 10:01:21 +09:00
Hayden Roche
08009e73fc
Add RSA PSS salt defines to engine builds if not FIPS v2.
...
WOLFSSL_PSS_LONG_SALT and WOLFSSL_PSS_SALT_LEN_DISCOVER are supported in our
latest FIPS module (v5). These should be defined for engine builds as long as
the FIPS version isn't v2.
2022-09-30 08:21:15 -07:00
Eric Blankenhorn
fa30ab37b3
Add reference to wc_AesInit in Gmac API doc
2022-09-16 15:54:32 -05:00