Commit Graph

3702 Commits

Author SHA1 Message Date
Daniel Pouzzner
8e77ee5c2a Merge pull request #9064 from SparkiDev/test_api_c_split_2
api.c: split out more tests into separate files
2025-08-06 10:51:25 -05:00
Daniel Pouzzner
034cbb9b97 tests/api.c: fix -Wuninitialized-const-pointer in test_wolfSSL_CertManagerAPI();
wolfcrypt/benchmark/benchmark.c:

* use WC_RELAX_LONG_LOOP() as default definition of TEST_SLEEP(), and remove WC_RELAX_LONG_LOOP() from bench_stats_sym_finish()/bench_stats_asym_finish_ex();
* when WOLFSSL_LINUXKM but !WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS., properly wrap kernel_fpu_begin...end around floating point ops.
2025-08-05 17:05:36 -05:00
David Garske
1693f72af7 Fixes for issues copilot found. 2025-08-05 07:22:04 -07:00
Sean Parkinson
b40e3d479f api.c: split out more tests into separate files
wolfCrypt PKCS7
wolfCrypt PKCS12
OpenSSL compat ASN.1
OpenSSL compat BN
OpenSSL comppat BIO
OpenSSL comppat Digest
OpenSSL comppat MAC
OpenSSL comppat Cipher
OpenSSL comppat RSA
OpenSSL comppat DH
OpenSSL comppat EC
OpenSSL comppat ECX
OpenSSL comppat DSA
2025-08-05 19:32:56 +10:00
JacobBarthelmeh
040e2102a8 Merge pull request #9049 from kojiws/import_mldsa_seed_pkcs8_reapply
Reapply - Import ML-DSA's seed from PKCS8 file
2025-08-01 14:34:09 -06:00
JacobBarthelmeh
0392ee009f Merge pull request #9033 from anhu/mlkem-hybrid-draft-names-wolfssl
Rename ML-KEM hybrids to match IETF Draft.
2025-08-01 10:21:54 -06:00
Anthony Hu
6f66f4fda3 Use correct string in the unit tests. 2025-07-31 10:35:32 -04:00
Koji Takeda
2891815965 Fix errors on #9000 2025-07-31 16:04:22 +09:00
Koji Takeda
09deacbe8f Revert "Merge pull request #9045 from douzzer/20250730-revert-PR9000"
This reverts commit 70af2be5ab, reversing
changes made to 46347173b2.
2025-07-31 14:14:51 +09:00
Daniel Pouzzner
26806cda7b Revert "Support importing seed of ML-DSA key"
This reverts commit a82d1a6b12.
2025-07-30 15:39:57 -05:00
Daniel Pouzzner
d0bf9c4b3c Revert "Disable exporting dilithium DER tests without WOLFSSL_ASN_TEMPLATE"
This reverts commit bbcdfe92e0.
2025-07-30 15:39:53 -05:00
JacobBarthelmeh
46347173b2 Merge pull request #9034 from holtrop/allow-pkcs7-without-x963-kdf
Allow building with HAVE_PKCS7 set and HAVE_X963_KDF unset
2025-07-30 10:05:09 -06:00
Josh Holtrop
ccb463dd1d Fix unit test coverity defect in test_wc_PKCS7_SetAESKeyWrapUnwrapCb() 2025-07-30 10:37:28 -04:00
JacobBarthelmeh
36912c3af8 Merge pull request #9000 from kojiws/import_mldsa_seed_pkcs8
Import ML-DSA's seed from PKCS8 file
2025-07-29 16:02:36 -06:00
Josh Holtrop
df7e105fb7 Allow building with HAVE_PKCS7 set and HAVE_X963_KDF unset 2025-07-29 11:46:44 -04:00
Josh Holtrop
26a4ea93eb Allow building with HAVE_PKCS7 set and HAVE_AES_KEYWRAP unset 2025-07-28 12:40:35 -04:00
Koji Takeda
bbcdfe92e0 Disable exporting dilithium DER tests without WOLFSSL_ASN_TEMPLATE 2025-07-28 21:46:28 +09:00
Koji Takeda
a82d1a6b12 Support importing seed of ML-DSA key 2025-07-28 21:46:28 +09:00
Anthony Hu
c7e054a7a7 Rename ML-KEM hybrids to match IETF Draft. 2025-07-25 13:27:26 -04:00
David Garske
c347f75b3c Merge pull request #9029 from holtrop/extract-kari-rid
Add wc_PKCS7_GetEnvelopedDataKariRid()
2025-07-25 09:04:11 -07:00
Josh Holtrop
804c4f20b5 Explicitly initialize some unit test variables to avoid warnings 2025-07-24 18:51:58 -04:00
Josh Holtrop
1226dedeb8 Check that we don't run out of space for the RID structure 2025-07-24 15:52:34 -04:00
Josh Holtrop
71bd9e2f6e Make unit test more resilient to earlier errors 2025-07-24 15:46:01 -04:00
Josh Holtrop
6309b241cd Fix some clang-tidy warnings in unit test 2025-07-24 15:42:55 -04:00
JacobBarthelmeh
c25efcee92 Merge pull request #9028 from dgarske/md5_sha1
Fixes for building with MD5 and SHA1 to support Hash `WC_HASH_TYPE_MD5_SHA`
2025-07-24 10:41:22 -06:00
Josh Holtrop
cf843c8b82 Add wc_PKCS7_GetEnvelopedDataKariRid()
Allow access to recipient ID before attempting to decrypt content.
2025-07-24 11:15:30 -04:00
David Garske
6aabc73845 Merge pull request #9018 from holtrop/decode-skp
Add API to decode SymmetricKeyPackage and OneSymmetricKey CMS objects
2025-07-23 16:01:58 -07:00
David Garske
44eba446ec Merge pull request #9002 from holtrop/aes-key-wrap-callbacks
Add callback functions for custom AES key wrap/unwrap operations
2025-07-23 16:01:49 -07:00
David Garske
551ff3f1b6 Fixes for building with MD5 and SHA1 to support Hash WC_HASH_TYPE_MD5_SHA. ZD 20269. 2025-07-23 15:59:08 -07:00
Josh Holtrop
86d7d42eb6 Comment test ASN DER sequences 2025-07-22 20:29:44 -04:00
Josh Holtrop
7762fa9b14 Update style per code review comments 2025-07-22 20:09:55 -04:00
Josh Holtrop
27f0ef8789 Combine AES key wrap/unwrap callbacks 2025-07-22 16:34:37 -04:00
Josh Holtrop
15c8730ef7 Use wc_ prefix for IndexSequenceOf() 2025-07-22 14:50:42 -04:00
Josh Holtrop
77bace5010 Update style per code review comments 2025-07-22 14:47:22 -04:00
David Garske
357b624ca5 Merge pull request #9024 from JacobBarthelmeh/mldsa
fix mldsa test case for buffer size and expire date
2025-07-22 11:04:41 -07:00
Sean Parkinson
cd7256ae63 Merge pull request #8979 from anhu/abort_on_bad_legacy
Abort TLS connection if legacy version field  is TLS 1.3 or higher
2025-07-22 17:12:39 +10:00
JacobBarthelmeh
98c70fb77e fix mldsa test case for buffer size and expire date 2025-07-21 15:15:31 -06:00
Albert Ribes
b2463f167c Avoid bogus warning on uninitialized variables on old versions of GCC
gcc-4.3.3 erroneously complains that some variables may be used
uninitialized. Silence it assigning NULL on declaration, as is already
done with many other variables.
2025-07-21 10:57:50 +02:00
Josh Holtrop
06d86af67c Add API to decode SymmetricKeyPackage and OneSymmetricKey CMS objects 2025-07-19 18:28:06 -04:00
JacobBarthelmeh
2c90d1585a Merge pull request #8897 from anhu/compat_additions
Compatibility layer additions for X.509 extensions and RSA PSS
2025-07-15 10:52:33 -06:00
Daniel Pouzzner
2c341a5806 Merge pull request #8990 from JacobBarthelmeh/license
updating license from GPLv2 to GPLv3

(linuxkm tweak to `MODULE_LICENSE("GPL")` to follow.)
2025-07-14 16:14:39 -05:00
Josh Holtrop
429ccd5456 Add callback functions for custom AES key wrap/unwrap operations 2025-07-14 15:58:14 -04:00
Anthony Hu
1a0a3283a0 Add a test. 2025-07-11 14:32:47 -04:00
Daniel Pouzzner
d90394efa6 wolfcrypt/src/asn.c and wolfssl/wolfcrypt/asn.h: add
WC_ASN_RUNTIME_DATE_CHECK_CONTROL, with accessors wc_AsnSetSkipDateCheck()
(WOLFSSL_TEST_VIS) and wc_AsnGetSkipDateCheck() (WOLFSSL_LOCAL).  use this to
permafix test_wolfSSL_CRL_duplicate_extensions() in api.c, which has an
expiring-soon handcrafted certificate in it.
2025-07-11 11:25:25 -05:00
David Garske
a36f9085c1 Fix for compat wolfSSL_RSA_sign and wolfSSL_RSA_verify to support RSA PSS with custom salt and mgf1 hash type. Adds compat API's for i2d_PrivateKey_bio , BN_ucmp and X509v3_get_ext_by_NID. ZD 20059 2025-07-11 08:51:51 -07:00
JacobBarthelmeh
388eea3cf2 Merge pull request #8976 from holtrop/decode-encrypted-key-package
Add wc_PKCS7_DecodeEncryptedKeyPackage()
2025-07-10 17:08:06 -06:00
JacobBarthelmeh
629c5b4cf6 updating license from GPLv2 to GPLv3 2025-07-10 16:11:36 -06:00
Kareem
f942990113 Fix building unit tests with --enable-rpk --disable-rsa.
Exact configure line used:
 ./configure --enable-kyber --enable-mlkem --enable-dilithium --enable-dtls --enable-dtls13 --enable-dtls-frag-ch --enable-debug --enable-debug-trace-errcodes \
CFLAGS="-DHAVE_RPK -DWOLFSSL_DER_LOAD -DWOLFSSL_LOGGINGENABLED_DEFAULT=1" --disable-rsa
2025-07-10 12:03:18 -07:00
David Garske
c3518e473b Merge pull request #8971 from SparkiDev/psk_build_fix
API test ASN: must not have NO_ASN defined
2025-07-09 16:30:22 -07:00
David Garske
b0a5d2fdf0 Merge pull request #8969 from SparkiDev/alpn_gcc_Os_fix
ALPN: don't use BIO
2025-07-09 16:30:12 -07:00