Commit Graph

5473 Commits (3b73c6e3ae2fd6444d1b9ea17c46bd26a7286acf)

Author SHA1 Message Date
Jacob Barthelmeh 3b73c6e3ae handle multiple permitted name constraints 2021-10-19 23:12:07 -06:00
Jacob Barthelmeh afee92e0cf bail out when a bad alt name is found in the list of alt names 2021-10-19 23:12:07 -06:00
David Garske e5caf5124c
Merge pull request #4477 from luizluca/zero-terminate-constraints
ASN: zero-terminate name constraints strings
2021-10-19 21:16:46 -07:00
David Garske 892685ac59
Merge pull request #4472 from utzig/ksdk-port-koblitz
nxp: ksdk: add support for Koblitz curves
2021-10-19 21:14:38 -07:00
David Garske a145f3107d
Merge pull request #4481 from SparkiDev/mod_exp_even
SP int: handle even modulus with exponentiation
2021-10-19 21:09:15 -07:00
Sean Parkinson f04380d624
Merge pull request #4475 from douzzer/fix-scan-build-UnreachableCode
scan-build LLVM-13 fixes and expanded coverage
2021-10-20 08:30:46 +10:00
Sean Parkinson d880403207 SP int: handle even modulus with exponentiation
Fix testing of mp_int to only call when implementation included.
2021-10-20 08:21:26 +10:00
Sean Parkinson 7f5a3a4e74
Merge pull request #4484 from dgarske/memtest
Fix for openssl test with --enable-memtest (also DH test build edge case)
2021-10-20 08:19:30 +10:00
Sean Parkinson 41eecd37e5
Merge pull request #4471 from embhorn/zd11886
Fix build errors with NO_BIO config
2021-10-20 08:06:42 +10:00
David Garske d297a06c25 Fix for wolfCrypt test with custom curves without Brainpool. Tested all changes on NXP K82 LTC. 2021-10-19 13:12:12 -07:00
David Garske 498884eadb Fix for missing `dhKeyFile` and `dhKeyPubFile` with file system enabled, `WOLFSSL_DH_EXTRA` and `USE_CERT_BUFFERS_2048` set. 2021-10-19 13:06:37 -07:00
Daniel Pouzzner a5006d580c scan-build LLVM-13 fixes: sp_int.c: drop "&& defined(SP_DEBUG_VERBOSE)" from preprocessor gates around debugging printfs. 2021-10-18 21:46:09 -05:00
Daniel Pouzzner 816527e826 scan-build fixes: back out all "#ifndef __clang_analyzer__" wrappers added to suppress false and frivolous positives from alpha.deadcode.UnreachableCode, and rename new macro WC_UNUSED to WC_MAYBE_UNUSED to make its meaning more precisely apparent. build is still clean with -Wunreachable-code-break -Wunreachable-code-return under scan-build-13. 2021-10-18 21:46:09 -05:00
Daniel Pouzzner 62822be6ce scan-build LLVM-13 fixes and expanded coverage: add WC_UNUSED and PRAGMA_CLANG_DIAG_{PUSH,POP} macros; deploy "#ifndef __clang_analyzer__" as needed; fix violations and suppress false positives of -Wunreachable-code-break, -Wunreachable-code-return, and -enable-checker alpha.deadcode.UnreachableCode; expand scan-build clean build scope to --enable-all --enable-sp-math-all. 2021-10-18 21:46:09 -05:00
Jacob Barthelmeh c07a7deec2 sanity check on q value with DSA sign 2021-10-18 10:17:49 -06:00
Luiz Angelo Daros de Luca 0e3218dcd0 ASN: zero-terminate name constraints strings
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2021-10-15 20:19:05 -03:00
Daniel Pouzzner 60adf22ce1
Merge pull request #4468 from SparkiDev/sp_fixes_6
SP: regenerated SP code
2021-10-15 02:27:19 -05:00
David Garske 2aa2ef84b2
Merge pull request #4470 from LinuxJedi/md-cleanups
Cleanup markdown documentation
2021-10-14 11:04:48 -07:00
Fabio Utzig ed243b3327 nxp: ksdk: add support for Koblitz curves
The Kinetis port implementation currently only supports SECP random
curves. This commit expands it to also support the accepted SECP
koblitz curves, based on user settings. The implementation also makes
it easy to add Brainpool curves.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-10-14 12:33:30 -03:00
Eric Blankenhorn 1396c46281 Fix build errors with NO_BIO config 2021-10-14 09:06:54 -05:00
Sean Parkinson b93b7b07a9
Merge pull request #4463 from JacobBarthelmeh/fuzzing
DSA: add check on bit length of q
2021-10-14 08:06:53 +10:00
Andrew Hutchings 11e3f867b0 Cleanup markdown documentation
* Add syntax highlighting where appropriate
* Fix some markdown compliance issues
* Add some links for things
* Add some inline code quoting
* Fix some headings
* Fix copyright date in doxygen html output
2021-10-13 16:39:46 +01:00
Sean Parkinson 5748818427 SP: regenerated SP code 2021-10-13 08:37:38 +10:00
Sean Parkinson 7f1dbd8709
Merge pull request #4420 from douzzer/smallstack-ge-sp
SP, Ed25519: smallstack
2021-10-13 08:33:36 +10:00
Sean Parkinson 03d2e9ad8c
Merge pull request #4466 from embhorn/zd13059
Fix for ecc_projective_*_safe visibility
2021-10-13 08:27:47 +10:00
David Garske b9b5661550
Merge pull request #4465 from LinuxJedi/stm32-fixes
Minor STM32F1 fixes
2021-10-12 11:57:18 -07:00
Eric Blankenhorn be6bf5687b Fix for ecc_projective_*_safe visibilty 2021-10-12 11:12:42 -05:00
Andrew Hutchings 97883d78ac Minor STM32F1 fixes
* Not all STM32 RTCs support subseconds in the time struct, so this is
  now ifdef'd using the only obvious define which exists when subseconds
  exist.
* Let wc_GenerateSeed detect STM32's without RNG correctly.
* wolfCrypt test was attempting to use variables that don't exist when
  both WOLFSSL_SMALL_STACK and WC_NO_RNG is defined.
2021-10-12 16:20:36 +01:00
Daniele Lacamera ec78b2e368
Merge pull request #4322 from dgarske/se050_branch
NXP SE050 Support
2021-10-12 07:37:58 -07:00
David Garske 70894383ce Fix for new SHA512 224/256 support with NXP SE050. 2021-10-11 13:01:38 -07:00
David Garske 90a51490a9 Peer review feedback. Improvements with small stack. 2021-10-11 11:54:03 -07:00
David Garske 0c1d12c224 Improve keyId logic. Fix minor compile warnings. Change `wc_se050_set_config` to match naming convention of other function in port. 2021-10-11 11:53:21 -07:00
Ethan Looney 09ce1e3c5f Improvements to the key id allocation 2021-10-11 11:53:21 -07:00
David Garske 185d48938d Fixes for building NXP SE050. Add support for automatic initialization of the SE050 if `WOLFSSL_SE050_INIT` is defined. Optionally can override the `portName` using `SE050_DEFAULT_PORT`. 2021-10-11 11:53:21 -07:00
David Garske 29f051e585 Fixes and cleanups for NXP SE050 support. 2021-10-11 11:53:19 -07:00
Ethan 3f76a76c46 SE050 port with support for RNG, SHA, AES, ECC (sign/verify/shared secret) and ED25519 2021-10-11 11:52:12 -07:00
Jacob Barthelmeh 63c9fa7a37 add check on bit length of q with DSA 2021-10-11 09:52:57 -06:00
Guido Vranken 0522e19fc1 Check return value of mp_grow in mp_mod_2d
ZD13048
2021-10-10 21:02:03 +02:00
David Garske 854512105f
Merge pull request #4314 from SparkiDev/libkcapi
KCAPI: add support for using libkcapi for crypto (Linux Kernel)
2021-10-07 21:23:05 -07:00
Sean Parkinson e0abcca040 KCAPI: add support for using libkcapi for crypto (Linux Kernel)
RSA, DH and ECC not testable as no Linux Kernel driver to use.
ECC implementation is customer specific.
2021-10-08 09:07:22 +10:00
Sean Parkinson dd6e4093b3
Merge pull request #4448 from JacobBarthelmeh/Compatibility-Layer
remove error queue from JNI build and set a default upper bound on it
2021-10-08 08:35:03 +10:00
David Garske 725e503c57
Merge pull request #4451 from SparkiDev/asn_templ_fix_1
ASN template: replicate AddAltName change in template code
2021-10-07 09:23:37 -07:00
David Garske 9d2082f7e1
Fixes and improvements for crypto callbacks with TLS (mutual auth) (#4437)
* This PR resolves issues with using TLS client authentication (mutual auth) with crypto callbacks. The TLS client auth will not be sent without a private key being set. The solution is to allow setting a public key only if crypto callbacks is enabled and a devId is set.

* Fix to allow using crypto callbacks with TLS mutual authentication where a private key is not available.
* Fix for ED25519 sign when only a private key is loaded.
* Fix to enable crypto callbacks for ED25519 and Curve25519 in TLS by using the _ex init functions.
* Fix for wc_PemToDer return code where a PKCS8 header does not exist.
* Remove duplicate logs in DoCertificateVerify.
* Doxygen API updates: Added crypto callback help and updated use_PrivateKey with info about public key use.

* * Added crypto callback tests for TLS client and server with mutual auth for RSA, ECC and ED25519.
* Enhanced the API unit test TLS code to allow setting CA, cert and key.

* Revert ED25519 changes. Opt to calculate public key directly when required for signing in the TLS crypto callback test. Build configuration fixes.

* Fix to use proper devId in `ProcessBufferTryDecode`.

* Various build fixes due to changes in PR. G++ issue with `missing-field-initializers`. Unused api.c func with DTLS and session export. Duplicate `eccKeyPubFile` def.

* Added crypto callback TLS tests at WOLFSSL object level. Fix for ED25519/ED448 with client mutual auth where the private key is not set till WOLFSSL object. Fix issues with  `wolfSSL_CTX_GetDevId` where devId is set on WOLFSSL object. Enable the `_id` API's for crypto callbacks.

* Proper fix for `eccKeyPubFile` name conflict. Was causing RSA test to fail (expected DER, not PEM).
2021-10-07 11:12:06 +10:00
Sean Parkinson dfbdcf9400 ASN template: replicate AddAltName change in template code 2021-10-07 09:51:56 +10:00
Jacob Barthelmeh 34c9367cbe refactor location of error queue count and consolidate no error queue macro 2021-10-06 11:55:40 -06:00
JacobBarthelmeh 43ffe26133
Merge pull request #4430 from embhorn/zd12976
Add support for X9.42 header
2021-10-05 23:47:42 +07:00
Jacob Barthelmeh 40ac1c4dd2 remove error queue from JNI build and put a default max on error queue size 2021-10-04 11:45:18 -06:00
David Garske 97d96c6cf8
Merge pull request #4422 from haydenroche5/cmake
Add a CMake option to build wolfcrypt test and bench code as libraries.
2021-10-01 12:32:50 -07:00
John Safranek faca24c00d
Merge pull request #4434 from SparkiDev/armv8_nighlty_1 2021-10-01 09:06:33 -07:00
David Garske d48dc55611
Merge pull request #4440 from SparkiDev/jenkins_powerpc_fix_1
ASN: tidy up SetAsymKeyDerPublic()
2021-10-01 08:17:12 -07:00