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
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
John Bland
7c0423eb65
reduce der buffer size
2024-03-28 12:56:26 -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
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
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
gojimmypi
bf9775831f
Improve wolfcrypt test NO_FILESYSTEM checks
2024-03-22 13:00:25 -07: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
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
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
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
JacobBarthelmeh
4751af9b89
scan-build fixes for pkcs7
2024-03-18 22:55:51 +07:00
David Garske
69bc5c1c19
Merge pull request #7345 from JacobBarthelmeh/coverity
...
Coverity fixes
2024-03-18 08:15:59 -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
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
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
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
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
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
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
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
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