16304 Commits

Author SHA1 Message Date
Anthony Hu
f509dafd6c README.md addition 2022-01-28 17:20:25 -05:00
Lealem Amedie
f608b1a731 macro logic fix 2022-01-28 13:54:13 -08:00
Lealem Amedie
e135ea7338 Fix for certreq and certgen options with openssl compatability 2022-01-28 12:39:00 -08:00
David Garske
40fff86807
Merge pull request #4801 from tmael/cert_rr
cert subset improvements
2022-01-28 11:00:55 -08:00
Anthony Hu
b957a6e872 Purge Rabbit cipher 2022-01-28 13:13:53 -05:00
Elms
6e76f21f9e cmake: Add options to support wolfTPM
* certgen
 * certgencache
 * certreq
 * certext
 * cryptocb
 * pkcs7
 * X9.63 KDF
 * AES-CFB
2022-01-28 09:44:09 -08:00
David Garske
c69010adef Peer review feedback. 2022-01-28 09:21:03 -08:00
David Garske
6615f019f5 Improved HMAC_Init error logging and code comment for FIPS failure on wc_HmacSetKey call. 2022-01-28 09:21:03 -08:00
David Garske
80ae237852 Fixes for building with ipsec-tools/racoon and openvpn:
* Fix for `EVP_CIPHER_CTX_flags`, which mapped to a missing function (broke openvpn)
* Added stack of name entries for ipsec/racoon support.
* Added `X509_STORE_CTX_set_flags` stub.
* Added PKCS7 NID types.
* Improved FIPS "SHA" logic in `test_wolfSSL_SHA`
* Added some uncommon NID type definitions.
* Expose the DH `DH_set_length` and `DH_set0_pqg` with OPENSSL_ALL
2022-01-28 09:21:03 -08:00
John Safranek
46f25ea3e0
Merge pull request #4804 from douzzer/20220127-clang-tidy-fips_test_h
clang-tidy hygiene for fips_test.h
2022-01-28 09:00:03 -08:00
Hayden Roche
cd72b4652b
Merge pull request #4798 from lealem47/cmake 2022-01-28 08:42:29 -08:00
Daniel Pouzzner
30b2073228 test.c: fix gating on wc_ecc_encrypt_ex() for FIPS <5.3 --enable-all. 2022-01-27 19:54:07 -06:00
Daniel Pouzzner
19042023f4 MD5 vs. FIPS 140-3: fix gating so that unit.test succeeds when --enable-fips=v5 --enable-md5 (HMAC-MD5 is non-FIPS in 140-3, but even in a FIPS 140-3 build, the non-FIPS API can be accessed directly by #undef'ing wc_Hmac*()). 2022-01-27 18:37:29 -06:00
Daniel Pouzzner
d9073f39e1 fips_test.h: add arg names to prototypes, and delete obsolete+unused DoIntegrityTest() prototype. 2022-01-27 18:37:29 -06:00
John Safranek
1465f99b12
Merge pull request #4734 from haydenroche5/fips_v5_des3
Allow DES3 with FIPS v5-dev.
2022-01-27 15:07:22 -08:00
David Garske
667009007b
Merge pull request #4799 from SparkiDev/file_gen_fixes
Generated files: fixes
2022-01-27 14:21:34 -08:00
David Garske
77a64d0087
Merge pull request #4802 from SparkiDev/ecies_compressed
ECIES: allow compressed public keys
2022-01-27 14:21:12 -08:00
Lealem Amedie
1c12490c98 Adding some CMake options 2022-01-27 11:52:37 -08:00
Sean Parkinson
b890a2f15d ECIES: allow compressed public keys
ECIES messages have a public key/point at start of the data.
It can be either uncompressed or compressed.
Adding support for decrypting and encrypting of compressed point.
2022-01-27 12:10:59 +10:00
Tesfa Mael
a37e17084d Use mp_iszero 2022-01-26 17:33:42 -08:00
Tesfa Mael
1c1bd413e0 cert subset SHA2-256, ecc-256, cert gen, cryptocb 2022-01-26 17:11:00 -08:00
Sean Parkinson
91b1e541c5 SP C: multiplication of two signed types with overflow is undefined in C
Montgomery Reduction: cast variables to be unsigned where signed
multiplication with overflow is performed.
2022-01-27 10:25:02 +10:00
Sean Parkinson
a242424abe Generated files: fixes
Fixups from updating scripts that generate the files.
Include settings.h for ARM32 assembly.
ARM32 SHA-512 ASM has only one function, Transform_Sha512_Len(). The
implementation is dependent on defines.
2022-01-27 10:05:45 +10:00
David Garske
9bbc5e07e6
Merge pull request #4733 from JacobBarthelmeh/ECC
include hmac for deterministic ecc sign build
2022-01-26 10:01:46 -08:00
David Garske
25c6417f03
Merge pull request #4797 from douzzer/20220124-clang-tidy
clang-tidying headers
2022-01-26 10:01:00 -08:00
Daniel Pouzzner
b7cecbacb2 update headers to resolve clang-tidy carping (mostly bugprone-macro-parentheses and readability-named-parameter). also disables MSC C4028 because incompatible with readability-avoid-const-params-in-decls. 2022-01-26 02:06:37 -06:00
Daniel Pouzzner
9250edc2ea wolfcrypt/src/fe_x25519_128.i: harmonize argument names in fe_cswap() and fe_cmov() with those used in fe_operations.c. 2022-01-26 02:05:26 -06:00
Daniel Pouzzner
85da17bcf8 src/ssl.c: fix argument name in openssl compat layer wrappers of hash final funcs in ssl.c (use "output", not "input"). 2022-01-26 00:27:45 -06:00
Daniel Pouzzner
1e3516d924 src/ssl.c: implement wolfSSL_SHA512_224_Transform() and wolfSSL_SHA512_256_Transform(). 2022-01-26 00:27:07 -06:00
Daniel Pouzzner
7c9f4911c3 src/wolfio.c: protect __GLIBC__ comparison with defined(__GLIBC__). 2022-01-26 00:22:13 -06:00
David Garske
cfc7337bda
Merge pull request #4794 from rizlik/openssl_srtp_script_fix
dtls-srtp: don't run openssl_srtp.test on make check
2022-01-25 16:31:29 -08:00
David Garske
d0dbdd374d
Merge pull request #4775 from elms/cmake/asm_user_settings
cmake: enable ASM and fix thread with usersettings
2022-01-25 16:25:16 -08:00
Marco Oliverio
38558d7fd1 dtls-srtp: don't run openssl_srtp.test on make check 2022-01-25 21:51:56 +01:00
David Garske
588f4a11c9
Merge pull request #4785 from douzzer/20220120-aes-internal-error-handling
20220120-aes-internal-error-handling
2022-01-24 20:45:53 -08:00
Hayden Roche
58789991f9 Allow DES3 with FIPS v5-dev. 2022-01-24 15:18:44 -08:00
David Garske
50e3565df6
Merge pull request #4779 from SparkiDev/dyn_cert
Cert: allow allocation of fields even with WOLFSSL_NO_MALLOC
2022-01-24 14:17:41 -08:00
Daniel Pouzzner
746c05ca44 AES: peer review: remove gating around sanity checks on aes->rounds in software wc_AesEncrypt() and wc_AesDecrypt();
use local variable crypto_cb_ret around WOLF_CRYPTO_CB calls for clarity;

fix line length.
2022-01-24 15:47:23 -06:00
Daniel Pouzzner
f0041852b5 aes.c: add error catching and percolation for wc_AesGetKeySize() on FREESCALE_LTC in wc_AesEncrypt(), wc_AesDecrypt(), and wc_AesCtrEncrypt(). 2022-01-24 13:34:22 -06:00
Daniel Pouzzner
5ff1d98306 AES: fix linebreaks in newly overlong lines in aes.c and aes.h; add missing return code in armv8-aes.c wc_AesDecryptDirect(); add missing RESTORE_VECTOR_REGISTERS() in software wc_AesXtsEncrypt() (all pursuant to peer review in #4785 from Sean). 2022-01-24 12:32:25 -06:00
Daniel Pouzzner
565a7b0aab aes.c: in linuxkm clause of WOLFSSL_AES_DIRECT section, gate on WOLFSSL_LINUXKM && WOLFSSL_AESNI (with no-asm falling through to the generic definition), and use wolfssl-idiomatic WARN_UNUSED_RESULT, not linux-kernel-idiomatic __must_check. (thanks to John S peer review) 2022-01-24 11:44:16 -06:00
Daniel Pouzzner
a718637c6f AES: harmonize wc_Aes{Encrypt,Decrypt} and wc_Aes{Encrypt,Decrypt}Direct implementations to return int; add return values to all static void functions in aes.c that can fail; add WARN_UNUSED_RESULT to all static functions in aes.c with return values; implement missing error percolation around AES block cipher implementations; bump FIPS version for v5-ready and v5-dev to 5.3 (v5-RC12 is 5.2). 2022-01-24 11:44:16 -06:00
David Garske
dee66cfe9e
Merge pull request #4789 from SparkiDev/sp_invmod_oob
SP int: sp_modinv fixes for sizes
2022-01-24 09:08:08 -08:00
John Safranek
93404361ff
Merge pull request #4783 from SparkiDev/mac_sha512_def
SHA-512 ASM: For Mac computers default to using SHA512 instructions
2022-01-24 09:03:08 -08:00
David Garske
44c0a5f9f8
Merge pull request #4790 from SparkiDev/decodesubtree_oobr
ParseCert: check index in DecodeSubtree before accessing tag
2022-01-24 08:36:52 -08:00
Sean Parkinson
3d63e41653 SP int: sp_modinv fixes for sizes
sp_invmod with even modulus requires a multiplication by modulus. Don't
let modulus overflow result variable 'r'.
Fix allocation of temporary sp_ints to be correct size.
Add test for maximum modulus size in test.c.

Remove leading spaces on functions so git correctly determines which
function has changed.
Put in Thumb code for more sizes of _sp_mul_*().
2022-01-24 15:18:20 +10:00
Sean Parkinson
1dd213db76 ParseCert: check index in DecodeSubtree before accessing tag 2022-01-24 12:30:48 +10:00
David Garske
198843aa34
Merge pull request #4787 from douzzer/20220121-fixits-20220118-clang-tidy
cleanup re #4772
2022-01-21 12:46:07 -08:00
Daniel Pouzzner
2955d7339e remove a debugging printf, fix whitespace/indentation, and add a comment re gethostbyname_r buffer size. 2022-01-21 13:00:22 -06:00
David Garske
7a36d57e8f
Merge pull request #4784 from SparkiDev/sp_int_modinv_perf
SP int: minor improvements to sp_invmod
2022-01-21 10:30:09 -08:00
David Garske
869246609a
Merge pull request #4772 from douzzer/20220118-clang-tidy
clang-tidy fixes/cleanups
2022-01-21 10:29:26 -08:00