Sean Parkinson
cd0670cbd7
RSA: verify only build fixes
...
configuration: --disable-ecc --disable-dh --disable-aes --disable-aesgcm
--disable-sha512 --disable-sha384 --disable-sha --disable-poly1305
--disable-chacha --disable-md5 --disable-sha3 --enable-cryptonly
--disable-inline --enable-rsavfy --disable-asn --disable-oaep
--disable-rng --disable-filesystem --enable-sp=rsa2048 --enable-sp-math
Fixes to make code build again.
2021-01-06 11:58:15 +10:00
Sean Parkinson
5accd57c21
X509 API no file system: hide wolfSSL_X509_NAME_print_ex_fp
...
configuration: --enable-all --disable-filesystem
wolfSSL_X509_NAME_print_ex_fp has XFILE as a parameter and cannot be
compiled with --disable-filesystem
2021-01-06 11:05:58 +10:00
Sean Parkinson
10722fba14
RSA/DH test: even number error check fixup
...
Configuration: --enable-sp=3072
Test only enabled when SP is used.
Return codes checked are those we expect from SP.
Code, with configuration, is compiled so that 2048-bit operations are
not going to SP and the error returns were not correct.
2021-01-06 09:39:24 +10:00
Hideki Miyazaki
b8997d0b47
revert test_wolfssl.c changes
...
add test.c as src target
2021-01-05 16:20:42 +09:00
Hideki Miyazaki
99d4a7417a
fix wolfssl unit test on ESP-IDF
2021-01-05 16:08:05 +09:00
Sean Parkinson
a6b69b6864
TLS send change cipher: Don't set keys when negotiating TLS 1.3
2021-01-05 14:32:48 +10:00
Sean Parkinson
f196c60c66
TLS 1.3 key share: add a key share from supported list
2021-01-05 13:08:48 +10:00
Sean Parkinson
1b94309a6c
SP math all: doco fix and don't assign 0 to o
...
o is not used after that point so no need to zero it.
2021-01-05 10:40:34 +10:00
Sean Parkinson
2a2b194d71
SP arm64 MAC: non-ct mod inv not use so many registers
2021-01-05 10:23:14 +10:00
Tesfa Mael
46e260dd61
Correct unsigned arithmetic
2021-01-04 15:48:27 -08:00
Chris Conlon
54f072fd8d
Merge pull request #3607 from douzzer/WOLFSSL_TEST_SUBROUTINE
...
test.c: add WOLFSSL_TEST_SUBROUTINE macro to make subtests optionally static
2021-01-04 10:10:56 -07:00
Hayden Roche
96ece3ac7d
Modify ParseCertRelative to ensure issuerKeyHash gets parsed and copied into the
...
decoded cert for self-signed CA certs.
The bit of code that does this copy was previously inside a conditional that's
only entered if the certificate is not self-signed. The primary purpose of this
conditional is to set the maxPathLen field. It's possible that the copying of
the issuerKeyHash was mistakenly included in the "else" block here, when it
should be outside.
2021-01-04 10:34:09 -06:00
Sean Parkinson
b5403fe6b9
SP int: Hide func decls if only available with WOLFSSL_SP_MATH_ALL
2021-01-04 16:39:51 +10:00
Sean Parkinson
413bde9146
Merge pull request #3608 from tmael/sp_squre
...
Fix SP integer square
2021-01-04 16:29:40 +10:00
Sean Parkinson
faf7d307b4
Merge pull request #3606 from dgarske/zd11438
...
Fix for possible ECC sign memory leak with custom "k"
2021-01-04 15:39:53 +10:00
Tesfa Mael
01c27068c1
Correct SP x->used with sp_clamp()
2021-01-03 20:08:06 -08:00
Sean Parkinson
68c2e36ad5
AES test: Remove unneeded loop
2021-01-04 12:43:34 +10:00
Sean Parkinson
40ab08be45
SP rand_prime: fix length check
...
-ve length indicates to use a BBS prime (last two bits set)
2021-01-04 12:31:59 +10:00
John Safranek
ef56bc09f1
Merge pull request #3596 from julek-wolfssl/dtls-multiple-hellorequest
...
Calling wolfSSL_Rehandshake during renegotiation should not be an error
2020-12-31 13:53:32 -08:00
David Garske
fbb3e9fca3
Merge pull request #3605 from tmael/cm_free
...
Free mutex and fix tls13.test script
2020-12-31 08:40:35 -08:00
David Garske
c9ac64d77d
Merge pull request #3609 from douzzer/lkm_kvmalloc
...
use kvmalloc()/kvfree() for heap allocations in the linuxkm build
2020-12-31 08:37:53 -08:00
Daniel Pouzzner
9dc8721032
linuxkm: on kernels >= 4.12, use kvmalloc()/kvfree() and a partial implementation of realloc() leveraging them, rather than kmalloc()/kfree()/krealloc(). this makes large allocations possible and relatively safe. note that the realloc() implementation fails gracefully when the supplied pointer is larger than the page size, but otherwise works normally.
2020-12-31 00:30:35 -06:00
Daniel Pouzzner
a2dec7ce9c
test.c: work around toolchain/ecosystem bug on aarch64 linux 4.14.0-xilinx-v2018.3.
2020-12-30 20:03:13 -06:00
Tesfa Mael
9598c03716
Free mutex and fix test script
2020-12-30 17:40:15 -08:00
Daniel Pouzzner
3d88676ff1
test.c: add WOLFSSL_TEST_SUBROUTINE macro to qualify all previously global subtest handlers, defaulting to the empty string. this restores the version<=4.5 test.c namespace allowing end users to call the tests directly piecemeal. --enable-linuxkm[-defaults] sets -DWOLFSSL_TEST_SUBROUTINE=static for extra namespace hygiene.
2020-12-30 16:12:08 -06:00
David Garske
060ebd1ca2
Fix for possible ECC sign memory leak when using `WOLFSSL_ECDSA_SET_K` and `wc_ecc_sign_set_k`, where the k is not valid. ZD 11438.
2020-12-30 09:54:54 -08:00
David Garske
7fb2c0f63f
Merge pull request #3603 from haydenroche5/zd11434
...
Ensure that all leading zeros are skipped in sp_tohex.
2020-12-30 08:28:52 -08:00
David Garske
1b6a988dc0
Merge pull request #3601 from tmael/mp_rand_p
...
Add parameter check in sp_rand_prime()
2020-12-30 08:20:18 -08:00
Hayden Roche
81f70fba5f
Ensure that all leading zeros are skipped in sp_tohex.
2020-12-30 08:32:01 -06:00
Tesfa Mael
d366ca74af
Review comments and cast
2020-12-29 19:48:45 -08:00
John Safranek
c482d16029
Merge pull request #3544 from haydenroche5/ocsp_stapling_bug
...
Fix bug where OCSP stapling wasn't happening even when requested by client
2020-12-29 14:23:10 -08:00
Chris Conlon
da007ecd7b
Merge pull request #3409 from kojo1/mqx
...
add IDE/MQX
2020-12-29 13:53:37 -07:00
David Garske
c6abb59343
Merge pull request #3593 from tmael/sp_cast
...
casting fix for clang-12
2020-12-29 09:51:37 -08:00
tmael
837e9856f5
Merge pull request #3590 from dgarske/stcube_rel
...
Fixes for STM Cube Pack rename
2020-12-29 09:37:39 -08:00
David Garske
dc21d56545
Merge pull request #3600 from douzzer/low-resources-fixes
...
--enable-lowresource --enable-sp-math-all
2020-12-29 08:01:51 -08:00
Daniel Pouzzner
2bd0d4c467
wolfcrypt/src/evp.c: fix wolfSSL_EVP_CipherUpdate_GCM() to not fail when inl is zero, to properly handle realloc implementations that return NULL for zero-size allocations.
2020-12-28 23:49:48 -06:00
Daniel Pouzzner
fbcfc6adbf
test.c: rehab fail codes in ecc_test_curve_size().
2020-12-28 21:56:39 -06:00
Daniel Pouzzner
b0ca598d59
sp_int.h and ecc.h: add one more to SP_INT_DIGITS and FP_SIZE_ECC, to accommodate extra digit used by sp_mul(), sp_mulmod(), sp_sqr(), and sp_sqrmod().
2020-12-28 18:06:18 -06:00
Tesfa Mael
cedec3ae28
Add parameter check
2020-12-28 15:53:56 -08:00
Daniel Pouzzner
764b3cf09d
examples/client/client.c: add missing !defined(NO_SESSION_CACHE) gate around wolfSSL_get_session() for "print out session" code.
2020-12-28 17:49:58 -06:00
Juliusz Sosinowicz
8c07aafc43
Fix memory leaks
...
- Freeing the session object depends on the callback return
- The session object is malloc'ed when ssl->options.internalCacheOff
- wolfSSL_CTX_use_certificate needs to own the cert when KEEP_OUR_CERT because either it is up ref'ed or copied
2020-12-28 22:33:01 +01:00
Juliusz Sosinowicz
54479359f3
Calling wolfSSL_Rehandshake during renegotiation should not be an error
...
If we call wolfSSL_Rehandshake during a renegotiation then it should not result in a SECURE_RENEGOTIATION_E. wolfSSL_Rehandshake might be called when multiple HelloRequest messages are processed or the user could call this API during renegotiation. Either way wolfSSL should not treat this as an error if renegotiation is enabled.
2020-12-24 12:10:04 +01:00
David Garske
8b517975d1
Fixes from peer review.
2020-12-23 16:54:29 -08:00
elms
4280861af0
Merge pull request #3591 from dgarske/wolftpm
...
Added helper configure option '--enable-wolftpm`
2020-12-23 12:22:44 -08:00
Tesfa Mael
5c4011b3b4
cast to int
2020-12-23 12:09:35 -08:00
David Garske
b2155e6e26
Merge pull request #3592 from douzzer/verbose-heap-instrumentation
...
--enable-trackmemory=verbose
2020-12-23 11:40:45 -08:00
Daniel Pouzzner
d5dd35c739
add --enable-trackmemory=verbose, and add WOLFSSL_TEST_MAX_RELATIVE_HEAP_{BYTES,ALLOCS} and -m/-a (runtime counterparts) to wolfcrypt_test(). also add -h to wolfcrypt_test() to print available options.
2020-12-23 12:03:06 -06:00
David Garske
daa6833f37
Added helper configure option '--enable-wolftpm` to enable options used by wolfTPM. This enables (cert gen/req/ext, pkcs7, cryptocb and aes-cfb).
2020-12-23 08:09:24 -08:00
David Garske
e0f36baebe
Fixes for STM Cube Pack rename.
2020-12-23 07:02:12 -08:00
Daniel Pouzzner
542ad0a81b
linuxkm/module_hooks.c: separate cleanup into static libwolfssl_cleanup(), and call it from wolfssl_init() if wolfcrypt_test() fails.
2020-12-22 21:57:17 -06:00