Masashi Honma
6086728968
Fix possible segfault occurs when mp_clear() is executed for uninitialized mp_int
...
If NULL is passed as the digest argument of wc_DsaSign(), mp_clear() will be
called before mp_init() is called. This can cause segmentation fault.
Signed-off-by: Masashi Honma <masashi.honma@gmail.com >
2021-11-16 09:57:02 +09:00
Masashi Honma
f621defefe
Fix the segfault occurs when mp_clear() is executed for uninitialized mp_int on i386
...
test_wc_DsaSignVerify() passes the tests but causes an error.
free(): invalid pointer
If NULL is passed as the digest argument of wc_DsaVerify(), mp_clear() will be
called before mp_init() is called. On qemu-i386, the dp field of the mp_int
structure is non-null by default, which causes a segmentation fault when calling
mp_clear(). However, if WOLFSSL_SMALL_STACK is enabled, this problem does not
occur.
Signed-off-by: Masashi Honma <masashi.honma@gmail.com >
2021-11-16 09:56:56 +09:00
Sean Parkinson
64407bbd7d
Merge pull request #4564 from rizlik/unused_ret_value_fix
...
woflcrypt/src/rsa.c: check memory allocation return value
2021-11-16 08:56:47 +10:00
Sean Parkinson
79f18c7585
SP sync: Missing update
2021-11-15 08:33:14 +10:00
David Garske
a626a4fb02
Fixes for spelling errors.
2021-11-12 10:27:49 -08:00
John Safranek
4e20b93e72
Merge pull request #4556 from douzzer/updateFipsHash
2021-11-11 14:23:01 -08:00
John Safranek
c702dab988
Merge pull request #4561 from haydenroche5/wc_prf_fix
2021-11-11 13:03:58 -08:00
Marco Oliverio
3ea4e35737
woflcrypt/src/rsa.c: check memory allocation return value
2021-11-11 16:25:03 +01:00
Hayden Roche
2f29ca1092
Make fixes/improvements to TLS PRF code.
...
Make `wc_PRF` return an error if it doesn't find a corresponding hash for the
passed in hash type. Currently, if `wc_PRF_TLS` is called with `NO_OLD_TLS`
defined, it will do nothing but still return success. Make it return an error
instead. These problems were uncovered when running the wolfEngine unit tests
with wolfSSL 5.0.0 FIPS Ready, which defines `NO_MD5` and `NO_OLD_TLS`.
2021-11-10 15:19:43 -08:00
Daniel Pouzzner
ed0418c2a8
fix whitespace.
2021-11-09 22:17:38 -06:00
Sean Parkinson
8e0fdc64be
Merge pull request #4522 from dgarske/static_eph
...
Fixes and refactor for static ephemeral key support
2021-11-10 08:22:51 +10:00
David Garske
9a83842c29
Merge pull request #4536 from luizluca/refactor_nameconstraints-permit
...
ASN: refactor name constraints checks
2021-11-09 10:44:17 -08:00
David Garske
df82b01e68
Added x448 static ephemeral support.
2021-11-09 08:27:42 -08:00
David Garske
5dac25f470
Eliminate EIGHTK_BUF use in asn. Cleanup uses of 0 in set_verify for callback.
2021-11-09 08:23:19 -08:00
Daniel Pouzzner
f8565f26e2
fixes for --disable-harden.
2021-11-08 17:35:10 -06:00
Daniel Pouzzner
0b4f34d62a
typographic cleanup: fix whitespace, remove unneeded UTF-8, convert C++ comment constructs to C.
2021-11-08 17:35:05 -06:00
Luiz Angelo Daros de Luca
01335e2e1c
ASN: refactor name constraints checks
...
Use the same logic for any type of name constraint.
It could be even cleaner if there were a altNamesByType[],
permittedNamesByType[] and excludedNamesByType[] in cert.
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com >
2021-11-08 20:29:18 -03:00
Sean Parkinson
dd833807d8
Merge pull request #4523 from dgarske/nxp_se050_fixes
...
Fixes for NXP SE050 ECC create and key store id
2021-11-09 08:56:03 +10:00
David Garske
5a4577eb6c
Merge pull request #4541 from SparkiDev/mp_hexchar_asm
...
SP, TFM: fixes
2021-11-08 14:49:02 -08:00
Sean Parkinson
49024b131e
Merge pull request #4534 from JacobBarthelmeh/fuzzing
...
check size of values with sp_gcd
2021-11-09 08:40:21 +10:00
David Garske
67a11df15b
Merge pull request #4548 from anhu/TlS
...
Fix capitalization.
2021-11-08 11:07:00 -08:00
Anthony Hu
a28e44730c
Fix capitalization.
2021-11-08 11:45:49 -05:00
John Safranek
d46b140250
Merge pull request #4544 from dgarske/hmachash
2021-11-05 15:11:07 -07:00
David Garske
3941eea626
Fixes for peer review feedback. Improve the ECC key bit calculation. Improve the signature RS unsigned bin creation.
2021-11-05 14:53:20 -07:00
David Garske
7fca031346
Remove duplicate code in wc_HmacFree (looks like past merge error).
2021-11-05 08:20:39 -07:00
Sean Parkinson
d01f0d7a4c
DH encoding: use correct length for inner sequence
...
Only affect small DH keys (like 512 bits).
2021-11-05 15:02:14 +10:00
Sean Parkinson
dc911b94e7
SP, TFM: fixes
...
HexCharToByte must be cast to a signed char as a char is unsigned on
some platforms.
Redefine the __asm__ and __volatile__ for ICC and KEIL in sp_int.c
mp_test: don't use large bit lengths if unsupported.
2021-11-05 11:49:24 +10:00
Jacob Barthelmeh
ca72beb688
check size of values with sp_gcd
2021-11-03 16:56:45 -06:00
David Garske
b84edb5c67
Fixes for NXP SE050 testing with hardware.
2021-11-03 12:47:07 -07:00
Jacob Barthelmeh
7ca95bfaca
additional checks on fp montgomery return value
2021-11-03 11:40:14 -06:00
David Garske
e9fbd94150
Fix for _ecc_validate_public_key and unused parameters for partial and priv.
2021-11-03 08:10:37 -07:00
David Garske
495cac8ad7
Fixes for NXP SE050 key sizes and key id use. Related to #4526
2021-11-02 16:34:19 -07:00
David Garske
2abb2eae7d
Changed NXP SE050 to not use symmetric offloading by default. If desired use WOLFSSL_SE050_HASH and WOLFSSL_SE050_CRYPT.
2021-11-02 12:00:24 -07:00
Anthony Hu
81def76b18
The NIST round 3 Falcon Signature Scheme integration.
2021-11-02 11:12:10 -04:00
David Garske
f63a799f18
Fix for ECC create key public export size and key size bits. Fix for key store ID vs key ID.
2021-11-01 09:52:12 -07:00
David Garske
99f44149eb
Merge pull request #4520 from JacobBarthelmeh/Testing
...
add kdf.c file to IDE projects and cmake, few edge case fuzz reports, remove exe bit and c files
2021-11-01 08:35:11 -07:00
JacobBarthelmeh
fc01723407
Merge pull request #4516 from dgarske/asn_templ_genname
...
Fix for ASN template general name parsing
2021-10-29 23:14:50 +07:00
David Garske
a6415493eb
Merge pull request #4518 from douzzer/nestable-save-vector-registers
...
linuxkm: fixes for {save,restore}_vector_registers_x86().
2021-10-29 09:14:32 -07:00
David Garske
8a8a6cf17f
Merge pull request #4515 from kareem-wolfssl/zd13006
...
wc_scrypt: Check for underflow in blocksSz calculation.
2021-10-29 08:23:37 -07:00
Daniel Pouzzner
ddf927ae41
linuxkm: fixes for {save,restore}_vector_registers_x86().
2021-10-29 01:26:48 -05:00
David Garske
e60c2201b2
Fix for general name parsing with WOLFSSL_ASN_TEMPLATE to use right length for general names and properly NULL terminate.
2021-10-28 16:13:58 -07:00
Jacob Barthelmeh
8775823fa0
handling edge cases with ecc import and decrypt functions
2021-10-28 17:11:56 -06:00
Kareem
39c9fa96bc
wc_scrypt: Code review feedback.
2021-10-28 15:02:53 -07:00
David Garske
6b3ff9bae2
Merge pull request #4459 from julek-wolfssl/missing-ext
...
Add x509 name attributes and extensions to DER parsing and generation
2021-10-28 14:30:37 -07:00
Kareem
0ecb81e74a
wc_scrypt: Check for underflow in blocksSz calculation.
2021-10-28 14:18:22 -07:00
Juliusz Sosinowicz
9c8e4f558c
Explicit cast to int
2021-10-28 21:05:19 +02:00
David Garske
6bb7e3900e
Merge pull request #4511 from JacobBarthelmeh/Testing
...
build fixes and PKCS7 BER encoding fix
2021-10-28 10:52:58 -07:00
Juliusz Sosinowicz
ef37eeaeaa
Code review fixes
2021-10-28 14:50:53 +02:00
Juliusz Sosinowicz
a6be157628
Gate new AKID functionality on WOLFSSL_AKID_NAME
2021-10-28 14:50:53 +02:00
Juliusz Sosinowicz
cb79bc5c46
Use same code for DecodeNsCertType with templates
2021-10-28 14:50:53 +02:00