Commit Graph

7697 Commits

Author SHA1 Message Date
kaleb-himes
ef2a636610 Expose additional features of opensslall in a compliant way 2024-04-09 09:48:33 -06:00
kaleb_himes
81f5ac7f6c SRTP-KDF FS Preview 2024-04-09 09:48:33 -06: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
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
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
Anthony Hu
cf2f58bfdf Merge pull request #7395 from douzzer/20240403-RPK-cleanups
20240403-RPK-cleanups
2024-04-05 13:43:15 -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
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
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
Anthony Hu
9bfab33726 Address comments from Jacob. 2024-04-03 09:04:28 -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
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
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
7e8c0156fe Merge pull request #7325 from dgarske/zephyr
Improve Zephyr support
2024-03-29 00:57:55 -04: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
gojimmypi
01ae240fe8 Initialize some Kyber variables 2024-03-25 14:08:47 -07:00
JacobBarthelmeh
85601311a2 rework library versioning 2024-03-21 04:02:28 +07:00
David Garske
50b1044c2f Merge pull request #7347 from JacobBarthelmeh/coverity2
Coverity Fixes QUIC
2024-03-18 09:04:09 -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
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
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
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
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
JacobBarthelmeh
9f240bb34c fix for warning of no stdint.h include with uintptr_t 2024-03-14 00:38:02 +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
jordan
0e15a2e83a Handle failed alloc in TLSX_Write. 2024-03-08 22:56:27 -06:00
David Garske
9fadcb2edc Merge pull request #7307 from bandi13/fixNightlyCrossworks
Fix nightly crossworks
2024-03-08 13:12:53 -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
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
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
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
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
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
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
Andras Fekete
d81a08a03b Catch error return code and remove redundant condition 2024-03-04 09:48:31 -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
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
Andras Fekete
897a8419c1 Move netdb.h and ioctl.h into wolfio.c 2024-03-01 11:59:02 -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
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