David Garske
e6c07a296d
Merge pull request #4866 from ejohnstown/release
...
Prepare for release 5.2.0
2022-02-21 09:09:58 -08:00
John Safranek
ad8bf40b5e
Update readme for release.
2022-02-20 13:05:04 -08:00
John Safranek
bb8af1cac5
Prepare for release 5.2.0
...
1. Update versions as appropriate.
2. Modify FreeAtomicUser() to only free the Aes data in the callback
contexts if the contexts exist.
2022-02-18 13:55:22 -08:00
David Garske
ffb4ae07df
Merge pull request #4871 from wolfSSL/small-leak
...
Fix Small Memory Leaks
2022-02-18 13:53:56 -08:00
John Safranek
041d300b2b
Fix Small Memory Leaks
...
Found with the configuration running the unit test through valgrind.
% ./configure CFLAGS=-DNO_WOLFSSL_CIPHER_SUITE_TEST \
--enable-all --disable-fastmath --enable-debug --disable-shared
1. ssl.c: In wolfSSL_DSA_generate_key(), we initialize (and allocate)
all the parameters in the key (p, q, g, x, y), and then we generate a
key, initializes (and allocates) x and y, again. mp_clear them
first.
2. evp.c: When printing public keys, the temporary mp_int wasn't getting
correctly freed.
3. evp.c: When printing public keys, modified the utility functions to
return once with a do-while-0 loop.
2022-02-18 10:01:49 -08:00
John Safranek
4b0c8c07f4
Merge pull request #4870 from elms/fix/tls13_renegotiation_info_ext
...
tls13: fix not including RENEGOTIATION_INFO ext
2022-02-17 13:09:02 -08:00
elms
208c457348
tls13: fix to not send RENEGOTIATION_INFO ext
...
Introduced in PR #4742 to enable sending of extension in TLS1.2
without fully supporting secure renegotiation in accordance with
RFC 5746 4.3 https://datatracker.ietf.org/doc/html/rfc5746#section-4.3
2022-02-17 11:22:17 -08:00
David Garske
95ae242550
Merge pull request #4869 from wolfSSL/silabs-aes
...
SILABS port: fix sizeof
2022-02-17 10:45:47 -08:00
David Garske
b343c2691b
Merge pull request #4867 from maximevince/master
...
Fix WOLFSSL_NO_TLS12 for Async dev
2022-02-17 10:18:18 -08:00
John Safranek
4361d1bdd2
SILABS port: fix sizeof
...
A sizeof wasn't dereferencing a pointer using the sizeof the pointer and
not the actual struct. This is limited to setting the key for an AES
operation only when using SILABS SE2 acceleration.
2022-02-17 08:52:46 -08:00
Maxime Vincent
111ae9da84
Fix WOLFSSL_NO_TLS12 for Async dev
2022-02-17 08:10:19 +01:00
David Garske
df0b516c68
Merge pull request #4863 from SparkiDev/tls13_auth
...
TLS 1.3: improved checks on received message type
2022-02-15 11:33:34 -08:00
Sean Parkinson
94c03a77f5
TLS 1.3: improved checks on received message type
...
pskNegotiated field added to indicate Session Ticket or PSK negotiated.
peerAuthGood field added to indicate that any require peer
authentication (certificate, if required, or PSK) have been performed.
2022-02-15 13:25:16 +10:00
Sean Parkinson
9906c9c55e
Merge pull request #4862 from dgarske/no_server
...
Fix typo for no server
2022-02-15 10:31:12 +10:00
David Garske
07045083a9
Merge pull request #4859 from SparkiDev/sp_int_thumb_small
...
SP int: fixup ARM Thumb asm for small builds
2022-02-14 16:07:50 -08:00
Sean Parkinson
6571151d17
SP int: fixup ARM Thumb asm for small builds
...
Small builds or arm Thumb can't use r7.
2022-02-15 08:34:21 +10:00
David Garske
c992ddbfc0
Merge pull request #4853 from SparkiDev/curve448_128bit_perf
...
Curve448: inline Karatsuba in sqr and mul for 128-bit impl
2022-02-14 12:04:57 -08:00
David Garske
16566f329e
Fix typo for no server. Should be NO_WOLFSSL_SERVER.
2022-02-14 10:37:34 -08:00
David Garske
ff4ee20f05
Merge pull request #4860 from SparkiDev/disable_hmac
...
Configure HMAC: define NO_HMAC when HMAC disabled
2022-02-14 10:08:32 -08:00
Sean Parkinson
f02296a4e6
Configure HMAC: define NO_HMAC when HMAC disabled
2022-02-14 17:22:10 +10:00
Sean Parkinson
38653510eb
Curve448: inline Karatsuba in sqr and mul for 128-bit impl
2022-02-14 09:09:57 +10:00
David Garske
2fa542eb28
Merge pull request #4846 from haydenroche5/fips_mode_compat
...
Implement FIPS_mode and FIPS_mode_set in the compat layer.
2022-02-11 12:50:30 -08:00
David Garske
88f202aa22
Merge pull request #4855 from julek-wolfssl/issue-4854
...
wolfSSL_get_error may return SSL_ERROR_NONE on ret <= 0
2022-02-11 09:01:16 -08:00
Juliusz Sosinowicz
4f8ffc4586
wolfSSL_get_error may return SSL_ERROR_NONE on ret <= 0
...
Fix docs mismatch reported in https://github.com/wolfSSL/wolfssl/issues/4854
2022-02-11 12:37:12 +01:00
Daniel Pouzzner
34b6102816
Merge pull request #4847 from douzzer/20220209_clang-Os
...
fixes for clang -Os on clang >= 12.0.0
2022-02-10 21:31:01 -06:00
Chris Conlon
7da3b8458a
Merge pull request #4851 from miyazakh/update_RA6M3_rmunsrc
2022-02-10 18:14:09 -07:00
Daniel Pouzzner
fbf38fff07
wolfcrypt/src/sp_int.c: fix comment around clang-12+ -Os.
2022-02-10 16:43:17 -06:00
Daniel Pouzzner
5c9510d92e
fips_check.sh: for linuxv2 add COPY_DIRECT with wolfcrypt/src/{aes_asm.S,aes_asm.asm}; for linuxv5 add wolfcrypt/src/aes_gcm_asm.S to COPY_DIRECT; fix whitespace.
2022-02-10 16:01:08 -06:00
Daniel Pouzzner
cbc253d713
wolfcrypt/test/test.c: gate ecc_encrypt_e2e_test() on !HAVE_FIPS || FIPS_VERSION_GE(5,3).
2022-02-10 16:00:52 -06:00
Daniel Pouzzner
c581e13380
bwrap tweaks:
...
in scripts/ocsp.test, don't call ping.test when $AM_BWRAPPED = yes (ping is setuid, so fails under bwrap);
in scripts/unit.test.in, don't bwrap if $AM_BWRAPPED = yes (double-bwrapping always fails);
in testsuite/testsuite.c testsuite_test(), build tempName using tempDir, and try to assign tempDir from XGETENV("TMPDIR"), fallback to hardcoded "/tmp".
2022-02-10 15:54:39 -06:00
Daniel Pouzzner
91578df19d
fixes for clang -Os on clang >= 12.0.0; fixes for bugs in blake2s.
2022-02-10 15:54:10 -06:00
Hayden Roche
562fcd3916
Implement FIPS_mode and FIPS_mode_set in the compat layer.
2022-02-10 13:14:05 -08:00
David Garske
34c87b83e2
Merge pull request #4848 from SparkiDev/sp_int_div_word_2
...
SP int, cortex, thumb div_word: fix to work
2022-02-10 07:42:00 -08:00
Anthony Hu
a1198549dd
Merge pull request #4844 from dgarske/bench_cleanups
2022-02-10 10:24:55 -05:00
David Garske
d1267b5203
Merge pull request #4805 from SparkiDev/ecies_aes_ctr
...
ECIES: add support for more encryption algorithms
2022-02-10 07:04:24 -08:00
Hideki Miyazaki
e351f1a7e7
rm unused src links
2022-02-10 22:21:24 +09:00
Sean Parkinson
e8fb17f7b5
SP int, cortex, thumb div_word: fix to work
...
Cortex builds needed # before number. Arm32 works with or without.
Thumb div_word needed to shift up if divisor too small (like other ARM
implementations).
2022-02-10 12:07:11 +10:00
Sean Parkinson
e50f661639
ECIES: add support for more encryption algorithms
...
Add support to ECIES for AES-256-CBC, AES-128-CTR, AES-256-CTR.
Added new API wc_ecc_ctx_set_algo() that sets the encryption, KDF and
MAC algorithms.
Cleanup formatting of ECIES code.
2022-02-10 09:54:22 +10:00
David Garske
4f1aa9a475
Fix benchmark input/output arguments. Cleanup line length and whitespace.
2022-02-09 13:13:42 -08:00
David Garske
cba262440a
Merge pull request #4842 from SparkiDev/sha3_arm_fixup
...
ARMASM, SHA-3: fixup when not using crypto instructions
2022-02-09 10:20:46 -08:00
Chris Conlon
bee025842e
Merge pull request #4828 from TakayukiMatsuo/rtos
2022-02-09 09:37:47 -07:00
tmael
0d5edfadcb
Merge pull request #4837 from SparkiDev/sp_c_config
...
SP C: when sp_c32.c ad sp_c64.c are included in build changed
2022-02-09 07:51:20 -08:00
Eric Blankenhorn
c472b3582e
Merge pull request #4839 from douzzer/20220207-clang-tidy-15
...
20220208 clang-tidy-15 fixes etc.
2022-02-09 08:36:18 -06:00
Sean Parkinson
343cb0da23
SP C: when sp_c32.c ad sp_c64.c are included in build changed
...
When compiling with the CFLAG -m32, sp_c32.c is used and not sp_c64.c.
The build system cannot detect that this is a 32-bit platform and to use
sp_c32.c.
The SP code detects which implementaiton to use and sets defines that
enable the code in sp_c32.c or sp_c64.c.
ENABLED_64BIT, 64-bit platform, was on by default, which is not always
true.
By making ENABLED_64BIT not default then the decision of which SP C
files to include in the build had to change to not being the other.
That is, sp_c64.c is not included when the configuration line explicitly
enables 32bit and sp_c32.c is not include when the configuration line
explicitly enables 64bit.
2022-02-09 15:56:57 +10:00
Sean Parkinson
b436262cdf
ARMASM, SHA-3: fixup when not using crypto instructions
2022-02-09 09:36:00 +10:00
John Safranek
49defbd2cc
Merge pull request #4836 from embhorn/zd13634
...
Remove deprecated VS solution
2022-02-08 15:18:21 -08:00
Sean Parkinson
67b2a1be40
Merge pull request #4831 from dgarske/zd13571_2
...
Improve the client certificate checking logic
2022-02-09 08:27:03 +10:00
TakayukiMatsuo
1bd4cb4eee
Modify example app to work with FreeRTOS+IoT
2022-02-09 07:18:39 +09:00
Chris Conlon
34946c2440
Merge pull request #4832 from TakayukiMatsuo/rose
2022-02-08 14:54:47 -07:00
Daniel Pouzzner
74408e3ee3
fixes for whitespace, C++ warnings, and LLVM 15 clang-tidy defects/carps:
...
* whitespace in src/ssl.c, tests/api.c, wolfssl/openssl/fips_rand.h.
* clang-analyzer-core.StackAddressEscape from llvm-15 clang-tidy, in tests/suites.c:execute_test_case().
* bugprone-suspicious-memory-comparison from llvm-15 clang-tidy, in src/internal.c:DoSessionTicket() and src/ssl.c:wolfSSL_sk_push().
2022-02-08 15:20:22 -06:00
David Garske
ed1fc9fc51
Merge pull request #4833 from SparkiDev/sha3_arm_crypto
...
SHA-3, ARM64: add assembly support for crypto instructions
2022-02-08 11:05:35 -08:00
Daniel Pouzzner
3ee6e93590
Merge pull request #4838 from SparkiDev/g++_fix_4
...
Rework functions to avoid warning with g++
2022-02-08 10:20:58 -06:00
Daniel Pouzzner
1f69c52ce8
Merge pull request #4830 from dgarske/no_hmac
...
Fixes for building without HMAC
2022-02-07 22:26:38 -06:00
Sean Parkinson
d2307186d9
Rework functions to avoid warning with g++
2022-02-08 12:36:36 +10:00
Sean Parkinson
0042a2594c
SHA-3, ARM64: add assembly support for crypto instructions
...
Add ability to compile ARM assembly from inline C code.
2022-02-08 12:21:38 +10:00
David Garske
b60d2dccce
Include the havePeerCert argument in the check.
2022-02-07 16:31:50 -08:00
Eric Blankenhorn
5e5a389afb
Remove deprecated VS solution
2022-02-07 17:14:41 -06:00
David Garske
d0246a280d
Merge pull request #4834 from anhu/guard_wc_PKCS7_SetPassword
...
Fix tests to properly gate on ! NO_PWDBASED && ! NO_SHA
2022-02-07 15:12:22 -08:00
David Garske
56c562a516
Fixes for building with ./configure --enable-opensslextra --enable-cryptonly CFLAGS="-DNO_HMAC" && make. Found this testing a customers configuration with latest. Also fixes some trailing whitespace.
2022-02-07 15:10:21 -08:00
David Garske
d085984103
Merge pull request #4829 from kosmas-valianos/kTLS
...
Expose Sequence Numbers so that Linux TLS (kTLS) can be configured
2022-02-07 14:55:07 -08:00
TakayukiMatsuo
5361c0bda0
Update signature as the certificate is renewed
2022-02-08 07:31:50 +09:00
Anthony Hu
e47dd675af
Fix tests to properly gate on ! NO_PWDBASED && ! NO_SHA
2022-02-07 14:44:26 -05:00
David Garske
dd2e0064b2
Merge pull request #4827 from SparkiDev/sp_int_dw_asm
...
SP math, Aarch64, ARM32: div word asm fixup
2022-02-07 11:32:14 -08:00
David Garske
54e7db0a9a
Merge pull request #4739 from rizlik/psa
...
support Platform Security Architecture (PSA) API
2022-02-07 10:40:21 -08:00
Chris Conlon
4c8f0709fc
Merge pull request #4720 from dgarske/fips_compat
2022-02-07 09:56:24 -07:00
David Garske
3cdb1c639d
Improve the client certificate checking logic. Make sure calling wolfSSL_CTX_mutual_auth is also checked.
2022-02-07 08:09:38 -08:00
David Garske
3d85a9690f
Merge pull request #4819 from lealem47/hashMismatch
...
Fix for OpenSSL x509_NAME_hash mismatch
2022-02-07 08:08:49 -08:00
Kosmas Valianos
30b35acd39
Expose Sequence Numbers so that Linux TLS (kTLS) can be configured
2022-02-07 09:30:59 +01:00
Sean Parkinson
f6d79ff598
Merge pull request #4813 from dgarske/zd13571
...
Fix for mutual authentication to prevent mismatch of certificate and sigalgo
2022-02-07 11:00:04 +10:00
Lealem Amedie
f9ff551992
Fix for OpenSSL x509_NAME_hash mismatch
2022-02-04 16:59:51 -08:00
David Garske
1f8ff7d9fe
Merge pull request #4822 from embhorn/zd13613
...
Fix warnings in VS
2022-02-04 15:37:31 -08:00
Marco Oliverio
2077184953
psa: add compile-time error if builded with crypto cb
2022-02-04 21:45:38 +01:00
Marco Oliverio
b8635efda7
psa: add README.md and doxygen header
2022-02-04 21:45:38 +01:00
Marco Oliverio
0cb2cc1705
psa: support pk callbacks for ECDSA, ECDH, HKDF
2022-02-04 21:45:38 +01:00
Marco Oliverio
630b244cee
psa: introduce global lock
2022-02-04 21:45:38 +01:00
Marco Oliverio
a7165907da
psa: support AES
2022-02-04 21:45:38 +01:00
Marco Oliverio
9ccfc81f26
psa: support PSA SHA1/SHA256/SHA224
2022-02-04 21:45:38 +01:00
Marco Oliverio
06915b6fa3
psa: support PSA random generator
2022-02-04 21:45:38 +01:00
David Garske
08047b2d95
Add checking to make sure key is present in all cases. Explicitly set validSigAlgo to zero with comment to clarify the default assumption.
2022-02-04 11:47:06 -08:00
David Garske
2d184348fb
Merge pull request #4825 from embhorn/gh4815
...
Fix wolfSSL_PEM_X509_INFO_read with NO_FILESYSTEM
2022-02-04 10:42:40 -08:00
David Garske
327e35fc25
Merge pull request #4826 from haydenroche5/evp_aes_gcm_iv_bug
...
Fix IV length bug in EVP AES-GCM code.
2022-02-04 10:38:02 -08:00
Hayden Roche
d1ca8fc673
Merge pull request #4821 from elms/cmake/help_cleanup
2022-02-04 09:37:39 -08:00
Marco Oliverio
08fbcf5eae
autoconf: add PSA options
2022-02-04 12:12:04 +01:00
Sean Parkinson
bd1b58dd7f
SP math, Aarch64, ARM32: div word asm fixup
...
ASM code is dividing by top half of divisor. If this value is very small
then bad results are calculated.
Moved the divisor up by a quarter of the width if top quarter of divisor
is 0.
2022-02-04 11:59:31 +10:00
Hayden Roche
b850cc89b0
Fix IV length bug in EVP AES-GCM code.
...
In `wolfSSL_EVP_CipherInit`, `ctx`'s `ivSz` field isn't being accounted for.
A common OpenSSL EVP AES-GCM flow looks like this:
- `EVP_CIPHER_CTX_new`
- `EVP_EncryptInit_ex`
- `EVP_CIPHER_CTX_ctrl` with command `EVP_CTRL_GCM_SET_IVLEN` to set the IV
length to 16 (AES block size) instead of the default 12
- `EVP_EncryptInit_ex` again to set the key and IV
- `EVP_EncryptUpdate` however many times
- `EVP_EncryptFinal`
In fact, we test this flow in our unit test `test_wolfssl_EVP_aes_gcm`. However,
in our implementation, the second call to `EVP_EncryptInit_ex` unconditionally
resets the IV length back to 12. This doesn't cause a test failure because
decryption has the same problem, so both sides of the equation have the same
wrong view of the IV.
The solution is to preserve the IV length in wolfSSL_EVP_CipherInit if ctx->ivSz
is non-zero. Otherwise, use the default of 12 (`GCM_NONCE_MID_SZ`).
This was discovered by a user migrating to the compatibility layer. As I
mentioned, it isn't exposed by our testing. It is exposed if you try to use the
same key and IV with OpenSSL and compare the resulting ciphertext with wolfSSL.
They won't be the same and thus won't interoperate.
2022-02-03 17:40:26 -08:00
Eric Blankenhorn
a0444bf72f
Fix wolfSSL_PEM_X509_INFO_read with NO_FILESYSTEM
2022-02-03 16:52:08 -06:00
Eric Blankenhorn
7b2e457d04
Fix VS unreachable code warning
2022-02-03 15:53:35 -06:00
David Garske
53e64b55e1
Merge pull request #4823 from haydenroche5/alpn_bug
...
Fix bug in TLSX_ALPN_ParseAndSet when using ALPN select callback.
2022-02-03 13:16:13 -08:00
Hayden Roche
fab2e99bff
Fix bug in TLSX_ALPN_ParseAndSet when using ALPN select callback.
...
At the start of this function, it attempts to find an ALPN extension in the
ssl object's extensions with `TLSX_Find`. If an ALPN select callback has been
set (i.e. via `wolfSSL_CTX_set_alpn_select_cb`), that gets called next. If that
callback finds a match, it removes all existing ALPN extensions found in the
ssl object. It then uses the new protocol name like this:
```
if (TLSX_UseALPN(&ssl->extensions, (char*)out, outLen, 0, ssl->heap)
== WOLFSSL_SUCCESS) {
if (extension == NULL) {
extension = TLSX_Find(ssl->extensions,
TLSX_APPLICATION_LAYER_PROTOCOL);
}
}
```
The bug is exposed if `extension` is not NULL, i.e. it was found on that initial
`TLSX_Find` call. `extension` is not NULL but it now points to garbage because
all the old ALPN extensions were just removed. It won't have it's value assigned
to the new extension that just got pushed via `TLSX_UseALPN` because of this
NULL check. This results in a segfault later in the function.
The solution is to remove the NULL check and always update `extension` after the
`TLSX_UseALPN` call.
This bug was discovered by a customer when using nginx + wolfSSL. I was able to
reproduce locally with curl acting as the client
2022-02-03 09:36:18 -08:00
Eric Blankenhorn
f0b953ce0c
Fix warnings in VS
2022-02-03 07:19:43 -06:00
Elms
fab8eca2fd
cmake: Check for valid voerride values
...
Also remove trailing whitespace
2022-02-02 16:32:00 -08:00
Elms
9b4289c751
cmake: Add KEYGEN option. Cleanup help messages.
...
Add `WOLFSSL_KEYGEN` option and override enable when `WOLFTPM` is
enabled
Also major reduction of variables for help messages. Override only
updates `VALUE`
2022-02-02 16:15:47 -08:00
David Garske
d3e3f57b77
Merge pull request #4818 from julek-wolfssl/guido-13454
...
`object` and `value` need to be `free`'ed
2022-02-02 16:04:39 -08:00
David Garske
17eee2ba0c
Merge pull request #4817 from julek-wolfssl/ZD13495
...
ZD13495
2022-02-02 15:54:08 -08:00
Juliusz Sosinowicz
97dd974a94
object and value need to be free'ed
2022-02-02 23:13:59 +01:00
David Garske
e13861bcde
Fix for mutual authentication to prevent mismatch of certificate and sig algo. Work from Sean P. ZD 13571
2022-02-02 12:20:02 -08:00
David Garske
28d3292a16
Merge pull request #4811 from haydenroche5/dh_get_2048_256
...
Add DH_get_2048_256 to compatibility layer.
2022-02-02 12:12:34 -08:00
David Garske
0618b69b6d
Merge pull request #4816 from julek-wolfssl/ok-error
...
For `0` OpenSSL prints "ok"
2022-02-02 12:10:35 -08:00
David Garske
9efb791abc
Merge pull request #4814 from SparkiDev/bio_dump_iter
...
wolfSSL_BIO_dump: fix output format and make iterative
2022-02-02 12:02:07 -08:00
Juliusz Sosinowicz
d5b294edc4
ZD13495
...
- `wolfSSLeay_version` now returns the version of wolfSSL
- `wolfssl/openssl/crypto.h` was not enveloped in a `extern "C"` wrapper
2022-02-02 17:38:36 +01:00
Hayden Roche
c629c3fcaa
Add DH_get_2048_256 to compatibility layer.
2022-02-02 07:59:17 -08:00
Juliusz Sosinowicz
1552e89810
For 0 OpenSSL prints "ok"
2022-02-02 15:54:21 +01:00
Marco Oliverio
cebb127ac3
test: don't free AesXts struct in-between tests that reuse the key
2022-02-02 10:46:40 +01:00
Sean Parkinson
641576390d
wolfSSL_BIO_dump() and wolfSSL_OBJ_obj2txt() rework
...
wolfSSL_BIO_dump(): fix output format and make iterative
wolfSSL_OBJ_obj2txt(): make iterative, test and rework.
2022-02-02 12:43:06 +10:00
Chris Conlon
59ea65bad3
Merge pull request #4809 from haydenroche5/asn1_int
2022-02-01 13:44:32 -07:00
David Garske
99799a3e3e
Merge pull request #4806 from anhu/kill_idea
...
Purge IDEA cipher
2022-02-01 12:27:55 -08:00
Hayden Roche
24a2ed7e9e
Merge pull request #4780 from dgarske/ipsec_racoon
2022-01-31 15:10:58 -08:00
David Garske
df85ea7e87
Merge pull request #4800 from SparkiDev/sp_c_smul
...
SP C: multiplication of two signed types with overflow is undefined in C
2022-01-31 14:29:18 -08:00
David Garske
13c759cc10
Merge pull request #4812 from douzzer/20220131-camellia-clang-tidy
...
wolfcrypt/src/camellia.c: clang-tidy fixes (bugprone-macro-parentheses).
2022-01-31 14:13:23 -08:00
Anthony Hu
a742c33c0c
Mention IDEA removal in README.md.
2022-01-31 16:18:39 -05:00
Anthony Hu
9ea40f3a9c
Purge IDEA cipher
2022-01-31 15:29:25 -05:00
Daniel Pouzzner
a7de880745
wolfcrypt/src/camellia.c: clang-tidy fixes (bugprone-macro-parentheses).
2022-01-31 14:21:54 -06:00
David Garske
ecb3f215b5
Merge pull request #4808 from lealem47/certreq
...
Fix for certreq and certgen options with openssl compatability
2022-01-31 10:16:22 -08:00
David Garske
5bdaf44354
Merge pull request #4774 from anhu/kill_rabbit
...
Purge Rabbit cipher
2022-01-31 09:17:23 -08:00
Hayden Roche
6b71289ae1
Add new ASN1_INTEGER compatibility functions.
...
This commit adds:
- wolfSSL_i2d_ASN1_INTEGER
- wolfSSL_d2i_ASN1_INTEGER
- wolfSSL_ASN1_INTEGER_cmp
2022-01-29 17:01:16 -08:00
David Garske
e58ff9e765
Merge pull request #4795 from wolfSSL/cmake/wolftpm
...
cmake: Add options to support wolfTPM
2022-01-28 14:52:53 -08:00
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
Daniel Pouzzner
4f9d0b7ea7
fix whitespace.
2022-01-21 01:26:44 -06:00
Daniel Pouzzner
bfada558bd
remove extraneous build gates and fix whitespace justification in a comment (peer review re PR #4772 ).
2022-01-21 01:26:44 -06:00
Daniel Pouzzner
386aac9694
AES-SIV:
...
in configure.ac, enable SIV only if !ENABLED_FIPS or if building FIPS v5-dev;
in cmac.{c,h}, remove !HAVE_FIPS gating on ShiftAndXorRb().
2022-01-21 01:26:33 -06:00
Daniel Pouzzner
84f7d812d3
linuxkm/module_exports.c.template: include siphash.h.
2022-01-21 01:25:48 -06:00
Daniel Pouzzner
10b8f56fec
wolfio.c: in wolfIO_TcpConnect(), test for usability of gethostbyname_r by (__GLIBC__ >= 2) && defined(__USE_MISC), not defined(__GNUC__).
2022-01-21 01:25:48 -06:00
Daniel Pouzzner
5e33da8147
fix whitespace.
2022-01-21 01:25:48 -06:00
Daniel Pouzzner
bb07d0a490
wolfio.c: refactor wolfIO_TcpConnect(() to use gethostbyname_r() if GNUC && !SINGLE_THREADED, for thread safety.
2022-01-21 01:25:48 -06:00
Daniel Pouzzner
6a56d3e131
jumbo patch of fixes for clang-tidy gripes (with some bug fixes).
...
defect/gripe statistics:
configured --enable-all --enable-sp-math-all --enable-intelasm
with LLVM 13 clang-tidy -checks=readability-*,bugprone-*,misc-no-recursion,misc-misplaced-const,misc-redundant-expression,misc-unused-parameters,misc-unused-using-decls,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-clang-analyzer-optin.performance.Padding,-readability-braces-around-statements,-readability-function-size,-readability-function-cognitive-complexity,-bugprone-suspicious-include,-bugprone-easily-swappable-parameters,-readability-isolate-declaration,-readability-magic-numbers,-readability-else-after-return,-bugprone-reserved-identifier,-readability-suspicious-call-argument,-bugprone-suspicious-string-compare,-bugprone-branch-clone,-misc-redundant-expression,-readability-non-const-parameter,-readability-redundant-control-flow,-readability-misleading-indentation,-bugprone-narrowing-conversions,-bugprone-implicit-widening-of-multiplication-result
[note these figures don't reflect additional defects fixed in this commit for --enable-smallstack, --enable-fips, --enable-async, --enable-asn=template, and --enable-fastmath, and --disable-fastmath]
pre-patch warning count per file, with suppressions:
clang-analyzer-security.insecureAPI.strcpy 6 wolfssl/tests/suites.c
clang-analyzer-security.insecureAPI.strcpy 2 wolfssl/testsuite/testsuite.c
bugprone-suspicious-missing-comma 3 wolfssl/examples/server/server.c
bugprone-suspicious-missing-comma 3 wolfssl/examples/client/client.c
readability-redundant-preprocessor 2 wolfssl/wolfcrypt/src/asn.c
readability-redundant-preprocessor 1 wolfssl/wolfcrypt/src/rsa.c
readability-redundant-preprocessor 9 wolfssl/src/ssl.c
readability-redundant-preprocessor 2 wolfssl/src/tls13.c
readability-redundant-preprocessor 18 wolfssl/tests/api.c
readability-redundant-preprocessor 3 wolfssl/src/internal.c
readability-redundant-preprocessor 10 wolfssl/wolfcrypt/test/test.c
readability-named-parameter 1 wolfssl/wolfcrypt/benchmark/benchmark.c
readability-named-parameter 7 wolfssl/src/internal.c
readability-named-parameter 1 wolfssl/wolfcrypt/src/ecc.c
readability-named-parameter 1 wolfssl/testsuite/testsuite.c
readability-named-parameter 11 wolfssl/wolfcrypt/src/ge_operations.c
misc-no-recursion 3 wolfssl/src/ssl.c
readability-uppercase-literal-suffix 4 wolfssl/wolfcrypt/src/asn.c
readability-uppercase-literal-suffix 1 wolfssl/src/ssl.c
readability-uppercase-literal-suffix 13 wolfssl/wolfcrypt/benchmark/benchmark.c
bugprone-too-small-loop-variable 1 wolfssl/wolfcrypt/src/rsa.c
bugprone-too-small-loop-variable 2 wolfssl/wolfcrypt/src/sha3.c
bugprone-too-small-loop-variable 4 wolfssl/wolfcrypt/src/idea.c
bugprone-signed-char-misuse 2 wolfssl/src/ssl.c
bugprone-signed-char-misuse 3 wolfssl/wolfcrypt/src/sp_int.c
bugprone-signed-char-misuse 3 wolfssl/examples/client/client.c
bugprone-macro-parentheses 19 wolfssl/wolfcrypt/src/aes.c
bugprone-macro-parentheses 109 wolfssl/wolfcrypt/src/camellia.c
bugprone-macro-parentheses 1 wolfssl/src/tls.c
bugprone-macro-parentheses 3 wolfssl/wolfcrypt/src/md4.c
bugprone-macro-parentheses 2 wolfssl/wolfcrypt/src/asn.c
bugprone-macro-parentheses 26 wolfssl/wolfcrypt/src/blake2b.c
bugprone-macro-parentheses 257 wolfssl/wolfcrypt/src/sha3.c
bugprone-macro-parentheses 15 wolfssl/src/ssl.c
bugprone-macro-parentheses 1 wolfssl/wolfcrypt/src/sha.c
bugprone-macro-parentheses 8 wolfssl/tests/api.c
bugprone-macro-parentheses 4 wolfssl/wolfcrypt/src/sp_int.c
bugprone-macro-parentheses 6 wolfssl/wolfcrypt/benchmark/benchmark.c
bugprone-macro-parentheses 38 wolfssl/wolfcrypt/src/hc128.c
bugprone-macro-parentheses 12 wolfssl/wolfcrypt/src/md5.c
bugprone-macro-parentheses 10 wolfssl/wolfcrypt/src/sha256.c
bugprone-macro-parentheses 4 wolfssl/wolfcrypt/test/test.c
bugprone-macro-parentheses 3 wolfssl/wolfcrypt/src/ecc.c
bugprone-macro-parentheses 2 wolfssl/tests/suites.c
bugprone-macro-parentheses 4 wolfssl/wolfcrypt/src/cpuid.c
bugprone-macro-parentheses 26 wolfssl/wolfcrypt/src/blake2s.c
bugprone-macro-parentheses 24 wolfssl/wolfcrypt/src/sha512.c
bugprone-macro-parentheses 3 wolfssl/wolfcrypt/src/poly1305.c
bugprone-macro-parentheses 24 wolfssl/wolfcrypt/src/ripemd.c
readability-inconsistent-declaration-parameter-name 1 wolfssl/src/internal.c
readability-inconsistent-declaration-parameter-name 1 wolfssl/testsuite/testsuite.c
pre-patch warning count summaries, with suppressions:
clang-analyzer-security.insecureAPI.strcpy 8
bugprone-suspicious-missing-comma 6
readability-redundant-preprocessor 45
readability-named-parameter 21
misc-no-recursion 3
readability-uppercase-literal-suffix 18
bugprone-too-small-loop-variable 7
bugprone-signed-char-misuse 8
bugprone-macro-parentheses 601
readability-inconsistent-declaration-parameter-name 2
pre-patch warning count summaries, without suppressions:
clang-analyzer-security.insecureAPI.strcpy 8
bugprone-branch-clone 152
readability-non-const-parameter 118
bugprone-suspicious-missing-comma 6
bugprone-suspicious-include 52
readability-magic-numbers 22423
readability-redundant-preprocessor 45
readability-named-parameter 21
readability-function-cognitive-complexity 845
readability-else-after-return 398
bugprone-implicit-widening-of-multiplication-result 595
readability-function-size 21
readability-isolate-declaration 1090
misc-redundant-expression 2
bugprone-narrowing-conversions 994
misc-no-recursion 3
readability-uppercase-literal-suffix 18
bugprone-reserved-identifier 56
readability-suspicious-call-argument 74
bugprone-too-small-loop-variable 7
bugprone-easily-swappable-parameters 437
bugprone-signed-char-misuse 8
readability-misleading-indentation 94
bugprone-macro-parentheses 601
readability-inconsistent-declaration-parameter-name 2
bugprone-suspicious-string-compare 495
readability-redundant-control-flow 20
readability-braces-around-statements 11483
clang-analyzer-valist.Uninitialized 1
clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling 3502
2022-01-21 01:25:48 -06:00
Sean Parkinson
b75fe633ad
SP int: minor improvements to sp_invmod
2022-01-21 16:47:59 +10:00
Sean Parkinson
8a2cab8702
SHA-512 ASM: For Mac computers default to using SHA512 instructions
2022-01-21 16:40:35 +10:00
Sean Parkinson
30e9d2813e
Merge pull request #4782 from haydenroche5/aes_siv_gpp
...
Fix AES-SIV test with g++.
2022-01-21 15:37:12 +10:00
Hayden Roche
888bd2b304
Fix AES-SIV test with g++.
...
The string initializers for the AES-SIV test vector fields needed an extra byte
for the null terminator expected by g++.
2022-01-20 19:22:25 -08:00
Sean Parkinson
848f5eeb0c
Merge pull request #4755 from dgarske/dtls_srtp
...
DTLS SRTP (RFC5764) support (adds `--enable-srtp`)
2022-01-21 10:43:47 +10:00
David Garske
d1a23a3285
Merge pull request #4758 from kareem-wolfssl/asioOldTls
...
Fix building ASIO with Old TLS disabled.
2022-01-20 10:44:41 -08:00
David Garske
427b67d51b
Merge pull request #4756 from kareem-wolfssl/noBio
...
Fix building with OPENSSL_EXTRA and NO_BIO defined.
2022-01-20 10:41:22 -08:00
David Garske
5ea23d389c
Merge pull request #4778 from haydenroche5/chrony
...
Add --enable-chrony configure option.
2022-01-20 08:46:00 -08:00
Marco Oliverio
40f573df72
dtls-srtp: NIT: fix EKM size in comments
2022-01-20 16:55:44 +01:00
Marco Oliverio
46c0809f5a
dtls-srtp: add script to test interop with OpenSSL
2022-01-20 16:55:44 +01:00
Marco Oliverio
d5aa76b161
dtsl-srtp: use PRF according to the DTLS version used
...
RFC 5764 sec 4.1.2
2022-01-20 16:55:30 +01:00
Marco Oliverio
cdb2936244
dtls-srtp: PRF: fix correct order of client/server random in seed
...
see RFC 5705 Section 4
2022-01-20 16:12:04 +01:00
Marco Oliverio
231a0bbb84
dtls-srtp: no ekm cross check on single threaded/no pthread conf
2022-01-20 16:12:04 +01:00
Sean Parkinson
1af3ea56c8
Cert: allow allocation of fields even with WOLFSSL_NO_MALLOC
...
subjectCN and publicKey in a DecodedCert are needed by the certificate
store in some cases. For embedded, allow them to be allocated even with
WOLFSSL_NO_MALLOC defined.
2022-01-20 16:16:09 +10:00
David Garske
d728a7f0e6
Merge pull request #4777 from SparkiDev/sp_modinv_even_fix
...
SP int: fix rework of sp_invmod
2022-01-19 20:32:48 -08:00
Hayden Roche
a05b1b012f
Add --enable-chrony configure option.
...
This turns on the necessary features for using the chrony NTP package with
wolfSSL.
2022-01-19 19:13:34 -08:00
David Garske
95efdccd7f
Merge pull request #4751 from SparkiDev/sp_int_thumb_asm
...
SP int: ARM Thumb asm snippets
2022-01-19 18:52:02 -08:00
David Garske
609d6442b1
Merge pull request #4753 from SparkiDev/siphash
...
Add SipHash algorithm
2022-01-19 18:51:44 -08:00
David Garske
fcce4f7a92
Merge pull request #4765 from haydenroche5/aes_siv
...
Add AES-SIV (RFC 5297).
2022-01-19 18:51:12 -08:00
Jacob Barthelmeh
29513e1ec8
include hmac for deterministic ecc sign build
2022-01-20 09:25:32 +07:00
Sean Parkinson
b767857abb
SP int: fix rework of sp_invmod
...
Simplify code and check for m mod a == 0 which means there is no
inverse.
2022-01-20 10:37:31 +10:00
Sean Parkinson
a6485a228d
Add SipHash algorithm
2022-01-20 09:41:18 +10:00
Sean Parkinson
a1185adf2c
SP int: ARM Thumb asm snippets
2022-01-20 09:16:45 +10:00
Hayden Roche
62b07d8806
Add AES-SIV (RFC 5297).
...
This commit adds functions to encrypt and decrypt data using AES in SIV mode, as
described in RFC 5297. This was added in the process of porting chrony to
wolfSSL. chrony is an NTP implementation that can use NTS (network time
security), which requires AES-SIV.
2022-01-19 14:32:33 -08:00
David Garske
d668037541
Merge pull request #4746 from elms/gh/templates
...
github: Initial templates
2022-01-19 14:04:21 -08:00
elms
c6fdb34daa
cmake: enable ASM and fix thread with usersettings
...
* Assembly files were not being compiled.
* With When `-DWOLFSSL_USER_SETTINGS` `HAVE_PTHREAD` was not
propagating to `config.h`
2022-01-19 13:34:25 -08:00
David Garske
7adbf59f22
Merge pull request #4767 from anhu/kill_hc128
...
Get rid of HC-128
2022-01-19 12:20:18 -08:00
David Garske
c5d3581ac2
Merge pull request #4771 from SparkiDev/sp_c_mont_red
...
SP C: fix corner case of P256 and P384 mont red
2022-01-19 11:32:49 -08:00
David Garske
0175013604
Merge pull request #4770 from anhu/cve
...
CVE-2022-23408
2022-01-19 11:31:24 -08:00
elms
0f50ffb2ef
github: Initial templates
2022-01-19 10:36:01 -08:00
David Garske
8e0ece920b
Test cleanups. Fix possible leak in TLSX_UseSRTP.
2022-01-19 09:22:02 -08:00
Anthony Hu
af71aec77e
Mention removal of HC-128 in README.md
2022-01-19 09:49:25 -05:00
Marco Oliverio
86ba0ef643
tests: support test for SRTP
...
the test will check that the same Exported Keying Material is generated between
client and server
2022-01-19 13:35:29 +01:00
Marco Oliverio
9b69f693e4
dtls-srtp: check that length of strings matched before memcomparing
...
otherwise if profile_str_len is > strlen(gSrtpProfiles[i].name) we end up
comparing memory past gSrtpProfiles[i].name. -fsanitize=address catches this:
```
==100159==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7f40d8d533b2 at pc 0x7f40d8eb014f bp 0x7f40d50fe240 sp 0x7f40d50fd9e8
READ of size 21 at 0x7f40d8d533b2 thread T107
#0 0x7f40d8eb014e in MemcmpInterceptorCommon(void*, int (*)(void const*, void const*, unsigned long), void const*, void const*, unsigned long) /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:860
#1 0x7f40d8eb06e6 in __interceptor_memcmp /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:892
#2 0x7f40d8eb06e6 in __interceptor_memcmp /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:887
#3 0x7f40d8c2e830 in DtlsSrtpFindProfile src/ssl.c:1310
#4 0x7f40d8c2e9ed in DtlsSrtpSelProfiles src/ssl.c:1347
#5 0x7f40d8c2eada in wolfSSL_CTX_set_tlsext_use_srtp src/ssl.c:1359
#6 0x563bf381b4c5 in server_test examples/server/server.c:2278
#7 0x7f40d88f0258 in start_thread (/usr/lib/libpthread.so.0+0x9258)
#8 0x7f40d88195e2 in __GI___clone (/usr/lib/libc.so.6+0xfe5e2)
```
2022-01-19 13:14:58 +01:00
Sean Parkinson
c06ba390cd
SP C: fix corner case of P256 and P384 mont red
2022-01-19 14:22:04 +10:00
Chris Conlon
4c05d35452
Merge pull request #4743 from miyazakh/tls_bench_onlymode
2022-01-18 15:41:48 -07:00
Daniel Pouzzner
2984cb5abf
Merge pull request #4768 from SparkiDev/sp_invmod_nr
...
SP math: sp_invmod changed to not call itself
2022-01-18 16:20:37 -06:00
David Garske
65d1d32972
Merge pull request #4769 from SparkiDev/sp_mont_red_neg
...
SP math neg: Mont Reduce fix
2022-01-18 14:12:09 -08:00
Anthony Hu
884b8634af
CVE-2022-23408
2022-01-18 16:06:08 -05:00
Anthony Hu
e6466f92b7
Counting properly
2022-01-18 15:41:16 -05:00
Anthony Hu
ff128c07a1
Remove extra references to Guid no longer required. Note that other count gaps exist so this should be fine.
2022-01-18 15:23:08 -05:00
David Garske
ba589955f7
Improve the DTLS SRTP client side parsing.
2022-01-18 11:23:13 -08:00
Sean Parkinson
e745de657f
Merge pull request #4761 from haydenroche5/time_cb
...
Add time callback functionality.
2022-01-18 16:49:19 +10:00
Sean Parkinson
53a4903e2f
SP math neg: Mont Reduce fix
...
Compare the absolute value for negatives.
2022-01-18 16:22:38 +10:00
JacobBarthelmeh
e11d484746
Merge pull request #4752 from LinuxJedi/fix-ber-der
...
Fix buffer overflows in BERtoDER
2022-01-17 21:05:39 -07:00
JacobBarthelmeh
84b06ac1b6
Merge pull request #4730 from embhorn/zd13475
...
Document wc_AesCfbEncrypt and wc_AesCfbDecrypt
2022-01-17 19:45:45 -07:00
Hayden Roche
1b0926a3b8
Add time callback functionality.
...
This commit adds `wolfSSL_SetTimeCb` and `wolfSSL_time`. The former allows the
user to override the function wolfSSL uses to get the current time,
`wolfSSL_time`. If set, `wolfSSL_time` uses that function. If not set,
`wolfSSL_time` uses the `XTIME` macro by default. This functionality is needed
for the port of chrony to wolfSSL. chrony is an NTP implementation that uses
GnuTLS by default. For TLS, chrony uses the time it computes in place of the
default system time function.
2022-01-17 17:49:51 -08:00
Sean Parkinson
fc861f3d6d
SP math: sp_invmod changed to not call itself
...
When the modulus is even, calculate m^-1 mod a instead and fixup after.
Don't call self to do inverse.
2022-01-18 10:45:57 +10:00
David Garske
f3f5b0f53b
Peer review fixes. Improve profile not found handling or errors. Improve inline function.
2022-01-17 15:52:40 -08:00
Anthony Hu
c2860cb311
Get rid of HC-128
2022-01-17 18:11:54 -05:00
David Garske
ec44747029
Merge pull request #4764 from SparkiDev/evp_cbn_casecmp
...
wolfSSL_EVP_get_cipherbyname: case compare
2022-01-17 14:11:07 -08:00
David Garske
d38c5003d0
Merge pull request #4762 from ejohnstown/old-gcc
...
Old Compiler Warning Cleanup (GCC 4.0.2)
2022-01-17 09:44:44 -08:00
Chris Conlon
989a4f096e
Merge pull request #4728 from miyazakh/sce_aes128_cryonly
2022-01-17 10:28:57 -07:00
Chris Conlon
e953707258
Merge pull request #4754 from miyazakh/update_espidfport
2022-01-17 10:27:28 -07:00
Eric Blankenhorn
6197853f37
Document wc_AesCfbEncrypt and wc_AesCfbDecrypt
2022-01-17 11:27:19 -06:00
John Safranek
d06cf97d73
Old Compiler Warning Cleanup (GCC 4.0.2)
...
test.c:
1. Removed pragma disabling the warning for unused functions.
2. Fixed the guards around the function that wasn't getting removed from
the build. And matched the guards to the call of the function. The
issue is a test that fails only in a cert 3389 build using Arm
assembly single-precision public keys.
3. Fixed the guards around a couple other functions.
2022-01-16 22:08:35 -08:00
Sean Parkinson
1b5d0c75b8
wolfSSL_EVP_get_cipherbyname: case compare
...
Accept any case alternatives to name or alias.
Remove case only different aliases.
Tidy up formatting in function.
2022-01-17 09:39:16 +10:00
John Safranek
b68b14b499
Merge pull request #4724 from embhorn/zd13462
...
Improve param checks of enc
2022-01-16 15:35:54 -08:00
John Safranek
815527be6b
Merge pull request #4745 from SparkiDev/m1_sha512
...
Aarch64 SHA512: fixup to work on Apple M1
2022-01-16 15:29:01 -08:00
Sean Parkinson
15f501358d
Merge pull request #4716 from julek-wolfssl/issue-4592
...
Verification: Domain check should only be performed on leaf certs
2022-01-17 08:40:14 +10:00
John Safranek
001469589b
Old Compiler Warning Cleanup (GCC 4.0.2)
...
Fixed a lot of shadowed global values. Some were prototype and function
declaration parameter name conflicts. Some conflicted with typenames.
Some conflicted with globals in libc.
2022-01-14 17:43:21 -08:00
John Safranek
5ddf4392df
Old Compiler Warning Cleanup (GCC 4.0.2)
...
pwdbased.c: Simplified some arithmetic to fix a variable promotion
warning.
2022-01-14 17:36:12 -08:00
John Safranek
2cf21a3f69
Old Compiler Warning Cleanup (GCC 4.0.2)
...
ecc.c,api.c: Initialize some variables to fix warning for possible
uninitialized variable use.
2022-01-14 17:33:49 -08:00
John Safranek
e724622506
Old Compiler Warning Cleanup (GCC 4.0.2)
...
ge_operations.c: Added the keyword `inline` to several function
prototypes for functions declared `inline`.
2022-01-14 17:19:01 -08:00
John Safranek
2085624a29
Old Compiler Warning Cleanup (GCC 4.0.2)
...
1. Removed pragma disabling the warning for non-literal format strings
on `printf()`.
2. Switched the `printf()` into two printf calls.
2022-01-14 17:11:55 -08:00
John Safranek
153b9abc31
Old Compiler Warning Cleanup (GCC 4.0.2)
...
ssl.c: Fix a couple of checks on hashType enum that were using a `< 0`
for the lower bound on an unsigned.
2022-01-14 16:32:18 -08:00
Kareem
021f9171c5
Fix building ASIO with Old TLS disabled.
2022-01-14 15:00:02 -07:00
David Garske
eade8ecdf1
DTLS SRTP improvements. Added support for client to send list of profiles. Added support for more SRTP profiles.
2022-01-14 13:43:29 -08:00
Kareem
1ed152daeb
Fix building with OPENSSL_EXTRA and NO_BIO defined.
2022-01-14 11:19:01 -07:00
Juliusz Sosinowicz
31e84d82b8
Domain check should only be performed on leaf certs
...
- Refactor `*_set_verify` functions into common logic
- NULL protect `wolfSSL_X509_VERIFY_PARAM_set1_host` and add debug info
2022-01-14 18:16:42 +01:00
David Garske
6ccbd8776f
DTLS SRTP (RFC5764) support (adds --enable-srtp). Used with WebRTC to agree on profile for new real-time session keys.
2022-01-14 07:35:45 -08:00
Hideki Miyazaki
a33d901409
update ESP-IDF port to fix failure
2022-01-14 15:35:28 +09:00
David Garske
f81e15f342
Merge pull request #4750 from SparkiDev/etm-disable
...
TLS EncryptThenMac; fix when extension response sent
2022-01-13 13:33:57 -08:00
David Garske
8d7059497e
Merge pull request #4742 from elms/fix/secure_renegotiate_compat
...
TLS: Default secure renegotiation compatibility
2022-01-13 10:23:27 -08:00
Andrew Hutchings
1a4bc322f7
Fix buffer overflow in PKCS7_VerifySignedData
...
wc_PKCS7_AddDataToStream() was called the first time prior to BERtoDER
conversion, subsequent times afterwards which meant the stream idx
pointer was incorrect. This patch restarts the stream after conversion.
Fixes ZD13476
2022-01-13 14:49:31 +00:00
Andrew Hutchings
92d01611ff
Fix buffer overflow in GetOID
...
When converting BER to DER we switched the pointer for pkiMsg to the DER
but not the size which could cause buffer overflow.
Fixes ZD13471
2022-01-13 13:26:32 +00:00
Sean Parkinson
70b169e3f2
TLS EncryptThenMac; fix when extension response sent
...
Only respond with the extension when negotiated a block cipher.
2022-01-13 12:46:21 +10:00
elms
ba579753ba
Merge pull request #4749 from ejohnstown/vpath-fix
2022-01-12 17:06:37 -08:00
John Safranek
15c5ac880e
PKCS7 Test Output
...
When running the test with PKCS7 enabled, there's an additional option
that will save to disk the generated PKCS7 blobs for by-hand review.
(PKCS7_OUTPUT_TEST_BUNDLES) Fixed a couple compile errors that were
missed with that option enabled.
2022-01-12 14:51:11 -08:00
John Safranek
33f0e2eda5
In the wolfCrypt test, fix a few filenames to use the VPATH versions.
2022-01-12 14:50:43 -08:00
Sean Parkinson
0acf8d0e75
Merge pull request #4732 from embhorn/zd13375
...
SP int, TFM: Init vars for static analysis
2022-01-13 07:06:19 +10:00
Sean Parkinson
3ddfb0f189
Aarch64 SHA512: fixup to work on Apple M1
...
Directive needed on Apple to indicate SHA3 extensions available.
Fixup C file as well - remove unused constants not avaiable and
prototype function that is extern elsewhere.
2022-01-12 12:56:39 +10:00
elms
336e595ebb
Remove some lingering oldname return values
2022-01-11 17:09:52 -08:00
Hideki Miyazaki
723cfb2d0b
make server/client only work
2022-01-12 09:23:23 +09:00
elms
efe2cea8d1
TLS: Default secure renegotiation compatability
...
By default this change will have servers send the renegotiation info
extension, but not allow renegotiation. This is accordance with RFC 5746
From to RFC 5746:
> In order to enable clients to probe, even servers that do not support
> renegotiation MUST implement the minimal version of the extension
> described in this document for initial handshakes, thus signaling
> that they have been upgraded.
With openSSL 3.0 the default it not allow connections to servers
without secure renegotiation extension. See
https://github.com/openssl/openssl/pull/15127
2022-01-11 15:56:35 -08:00
David Garske
abc9b7197d
Merge pull request #4676 from ThalesGroup/iotsafe-hkdf-extract
...
Iotsafe hkdf extract
2022-01-11 07:37:30 -08:00
Hideki Miyazaki
f0f65f41b7
addressed review comments
2022-01-11 19:53:54 +09:00
Sean Parkinson
c7b0b7003e
Merge pull request #4700 from dgarske/pkcs11_id
...
Improved the PKCS11 init to support slotId or tokenName
2022-01-11 14:25:37 +10:00
Saksik Remy
30777bb5ee
nit minor changes
2022-01-11 10:08:52 +08:00
David Garske
9a4981a5a8
Improved the PKCS11 init to support slotId or tokenName. Adds new wc_Pkcs11Token_InitName and alters existing wc_Pkcs11Token_Init to allow NULL tokenName. ZD13348
2022-01-10 16:53:01 -08:00
David Garske
5910ada93d
Merge pull request #4736 from douzzer/20220107-cppcheck-hygiene
...
cppcheck sweep
2022-01-10 12:52:22 -08:00
Eric Blankenhorn
6a02826bbf
Merge pull request #4740 from dgarske/sess_names_docs
...
Session doc and naming cleanups
2022-01-10 14:38:47 -06:00
David Garske
5392190807
Merge pull request #4741 from danielinux/psoc6-sha512-fix
...
PsoC6 hw crypto: added missing wc_InitSha512_ex()
2022-01-10 12:32:13 -08:00
Daniele Lacamera
814e7c91e0
PsoC6 hw crypto: added missing wc_InitSha512_ex()
2022-01-10 18:30:53 +01:00
Chris Conlon
f72d198778
Merge pull request #4723 from dgarske/se050
2022-01-10 10:11:49 -07:00
David Garske
43bbc5d2e5
Merge pull request #4738 from SparkiDev/sp_int_div_arm_2
...
SP int: ARM64/32 sp_div_word changes
2022-01-10 07:58:28 -08:00
David Garske
6ce248e2f9
Improve documentation for wolfSSL_get1_session. Add wolfSSL specific naming on the internal session functions to avoid possible user conflicts. ZD13363 and ZD13487.
2022-01-10 07:47:19 -08:00
Eric Blankenhorn
5cce1926bb
Init vars for static analysis
2022-01-10 08:24:29 -06:00
Sean Parkinson
6398087d5b
SP int: ARM64/32 sp_div_word changes
...
Fixup up formatting.
Fix comments.
Aarch64: don't use variable r when hi can be used.
ARM 32-bit: Add a version that uses udiv - not available on all chips
and can be slower anyway.
2022-01-10 16:27:39 +10:00
Saksik Remy
1a291870a3
minor fixes
2022-01-10 10:28:14 +08:00
David Garske
4bbf90d604
Merge pull request #4702 from SparkiDev/sp_int_div_arm
...
SP int: transplant the div_word from SP into SP int for ARM64 and ARM32
2022-01-09 17:54:39 -08:00
Daniel Pouzzner
355b5821b2
WOLFSSL_SESSION_EXPORT: fixes for scan-build complaints (deadcode.DeadStores) building --enable-all --enable-sessionexport.
2022-01-08 11:43:56 -06:00
Daniel Pouzzner
c50964cc35
src/internal.c: fix flubbed edit in wolfSSL_session_import_internal().
2022-01-08 11:08:57 -06:00
Daniel Pouzzner
49fc54ef1f
linuxkm/linuxkm_wc_port.h: move XMALLOC/XREALLOC/XFREE definitions outside BUILDING_WOLFSSL gate as-was, for back-compat.
2022-01-08 02:41:02 -06:00
Daniel Pouzzner
56c28ff307
src/ssl.c: in wolfSSL_SESSION_has_ticket(), add (void)sess if !defined(HAVE_SESSION_TICKET), to fix -Wunused-parameter.
2022-01-08 02:39:50 -06:00
Daniel Pouzzner
ff0eb5a41e
wolfcrypt/test/test.c: in wolfcrypt_test(), tweak formatting of CheckRunTimeSettings() to resolve invalidPrintfArgType_uint from cppcheck --force.
2022-01-08 01:35:46 -06:00
Daniel Pouzzner
a4444e6c3e
wolfcrypt/test/test.c: in rsa_oaep_padding_test(), remove accidentally repeated MEMORY_E check.
2022-01-08 01:10:02 -06:00
Daniel Pouzzner
7341b54a20
wolfssl/wolfcrypt/tfm.h: fixes for cppcheck complaints: preprocessorErrorDirective[division/modulo by zero]
2022-01-08 00:34:33 -06:00
Daniel Pouzzner
cb86da71fa
wolfssl/wolfcrypt/ecc.h: fixes for cppcheck complaints: preprocessorErrorDirective[division/modulo by zero]
2022-01-08 00:34:22 -06:00
Daniel Pouzzner
fdb6a2d87d
wolfssl/test.h: fixes for cppcheck complaints: nullPointerRedundantCheck invalidScanfArgType_int
2022-01-08 00:34:09 -06:00
Daniel Pouzzner
29fcbb0b19
wolfcrypt/test/test.c: fixes for cppcheck complaints: memleakOnRealloc nullPointerRedundantCheck uninitvar invalidPrintfArgType_uint
2022-01-08 00:33:54 -06:00
Daniel Pouzzner
70ab36f81c
wolfcrypt/src/wc_port.c: fixes for cppcheck complaints: uninitvar nullPointer
2022-01-08 00:33:33 -06:00
Daniel Pouzzner
8aa1100508
wolfcrypt/src/wc_pkcs11.c: fixes for cppcheck complaints: uninitvar
2022-01-08 00:32:48 -06:00
Daniel Pouzzner
71b0b89e95
wolfcrypt/src/srp.c: fixes for cppcheck complaints: identicalInnerCondition
2022-01-08 00:32:37 -06:00
Daniel Pouzzner
82b508b917
wolfcrypt/src/sha512.c: fixes for cppcheck complaints: nullPointerRedundantCheck
2022-01-08 00:32:26 -06:00
Daniel Pouzzner
6e763825ed
wolfcrypt/src/sha.c: fixes for cppcheck complaints: bufferAccessOutOfBounds
2022-01-08 00:32:14 -06:00
Daniel Pouzzner
094d89bfb9
wolfcrypt/src/rsa.c: fixes for cppcheck complaints: identicalInnerCondition
2022-01-08 00:32:03 -06:00
Daniel Pouzzner
24bb007d3c
wolfcrypt/src/random.c: fixes for cppcheck complaints: uninitvar
2022-01-08 00:31:51 -06:00
Daniel Pouzzner
1488e28ea3
wolfcrypt/src/port/ti/ti-aes.c: fixes for cppcheck complaints: missingReturn[false positive]
2022-01-08 00:31:36 -06:00
Daniel Pouzzner
9e76ec8855
wolfcrypt/src/pkcs7.c: fixes for cppcheck complaints: nullPointerArithmeticRedundantCheck
2022-01-08 00:31:07 -06:00
Daniel Pouzzner
dc98f4dd30
wolfcrypt/src/pkcs12.c: fixes for cppcheck complaints: uselessAssignmentPtrArg
2022-01-08 00:30:52 -06:00
Daniel Pouzzner
67de528d91
wolfcrypt/src/logging.c: fixes for cppcheck complaints: invalidPrintfArgType_sint
2022-01-08 00:30:32 -06:00
Daniel Pouzzner
f126e6add5
wolfcrypt/src/integer.c: fixes for cppcheck complaints: nullPointerRedundantCheck[false positive; added suppression]
2022-01-08 00:30:20 -06:00
Daniel Pouzzner
1eb5537e34
wolfcrypt/src/fe_low_mem.c: fixes for cppcheck complaints: funcArgOrderDifferent
2022-01-08 00:30:00 -06:00
Daniel Pouzzner
d4aa6bd1fc
wolfcrypt/src/evp.c: fixes for cppcheck complaints: bufferAccessOutOfBounds nullPointerRedundantCheck
2022-01-08 00:29:47 -06:00
Daniel Pouzzner
c557a74953
wolfcrypt/src/ecc.c: fixes for cppcheck complaints: invalidPrintfArgType_sint identicalInnerCondition
2022-01-08 00:29:35 -06:00
Daniel Pouzzner
d36a1be74b
wolfcrypt/src/dh.c: fixes for cppcheck complaints: identicalInnerCondition
2022-01-08 00:29:18 -06:00
Daniel Pouzzner
11f72877a2
wolfcrypt/src/asn.c: fixes for cppcheck complaints: invalidPrintfArgType_uint nullPointerRedundantCheck
2022-01-08 00:29:09 -06:00
Daniel Pouzzner
8ba6027073
src/wolfio.c: fixes for cppcheck complaints: nullPointer uninitvar
2022-01-08 00:28:35 -06:00
Daniel Pouzzner
bb727d2ef2
src/ssl.c: fixes for cppcheck complaints: uselessAssignmentPtrArg autoVariables[not a defect; added suppression] invalidPrintfArgType_sint nullPointerRedundantCheck pointerSize
2022-01-08 00:28:09 -06:00
Daniel Pouzzner
4d3dfc451d
src/sniffer.c: fixes for cppcheck complaints: negativeIndex
2022-01-08 00:27:59 -06:00
Daniel Pouzzner
b69dc00bd7
src/internal.c: fixes for cppcheck complaints: nullPointerRedundantCheck uninitvar
2022-01-08 00:27:47 -06:00
Daniel Pouzzner
ff4c6e5d7b
linuxkm: relocate WOLFSSL_LINUXKM code in wolfssl/wolfcrypt/wc_port.h and wolfcrypt/src/memory.c to linuxkm/{linuxkm_wc_port.h,linuxkm_memory.c}, and gate SIMD in IRQ handlers on -DLINUXKM_SIMD_IRQ in prep for Linux 5.16;
...
linuxkm: when -DWOLFCRYPT_ONLY, don't include ssl.h in module_exports.c.template and module_hooks.c, and fix gating to work right with that;
wolfssl/wolfcrypt/types.h: add support for a WOLFSSL_XFREE_NO_NULLNESS_CHECK gate (used in cppcheck analysis).
2022-01-07 22:39:38 -06:00
Daniel Pouzzner
a14982b079
configure.ac: add ENABLED_WPAS to the config summary.
2022-01-07 21:36:24 -06:00
David Garske
b4da751076
Fixes for SE050 Ed25519/Curve25519.
2022-01-07 12:54:54 -08:00
Daniel Pouzzner
bbc9bc5e2c
wolfcrypt/src/port/kcapi/kcapi_hmac.c: fix memory leak in wc_HmacSetKey() ( fixes #4731 ).
2022-01-07 12:40:31 -06:00
David Garske
b97894c617
Merge pull request #4729 from anhu/STM32U575xx
...
Add support for STM32U575xx boards.
2022-01-06 16:34:28 -08:00
Anthony Hu
f3e1e8c155
Add support for STM32U575xx boards.
2022-01-06 15:40:45 -05:00
David Garske
d21105b3ca
Merge pull request #4725 from elms/cmake/min_ver_3.16
...
cmake: Increase minimum version to 3.16 and fix HomeBrew build
2022-01-06 08:09:44 -08:00
Eric Blankenhorn
f74831a7da
Improve param checks of enc
2022-01-06 09:12:18 -06:00
Hideki Miyazaki
0e6ba492e5
update signed ca
...
fix aes128-gcm crypt only usecase
2022-01-06 15:18:16 +09:00
David Garske
252e2b6a99
Merge pull request #4726 from ejohnstown/typos
...
Fix a couple typos in asn.c
2022-01-05 14:51:50 -08:00
Anthony Hu
1e903a20a5
Merge pull request #4722 from dgarske/minor
2022-01-05 15:03:44 -05:00
David Garske
32223b9c3a
Merge pull request #4697 from LinuxJedi/isotp
...
Add ISO-TP support to wolfio
2022-01-05 10:34:43 -08:00
John Safranek
66ade8006b
Fix a couple typos in asn.c
2022-01-05 10:24:25 -08:00
elms
cc2b69573c
cmake: Increase minimum version to 3.16 and fix HomeBrew build
...
Increasing cmake version required to allow use of more recent
additions in the future.
Reported issue is that Homebrew use different compiler than AppleClang
(from XCode). Correctly test for AppleClang to set xcode specific `ar`
and `ranlib` flags. It may also be appropraite to use for ANDROID as
well see
7d057b2738 (diff-6f7a068f87ca22bd0105fef2143b0960e4993854863fd20c9416c677ee33a737R61-R67)
2022-01-05 09:29:27 -08:00
Andrew Hutchings
e847bf7301
ISO-TP buffer fixes
...
* Flow control failed on wrap around when there is going to be no more
flow control packets.
* If ISOTP_Send is provided more than 4095 bytes, limit it to 4095 bytes
as wolfSSL will retry with the rest.
* Set the default receive size to the max ISO-TP data size.
* A few other cleanups.
2022-01-05 11:37:15 +00:00
David Garske
84df7a50dc
Minor build warning fixes. Possible benchmark unused bench_pq_asym_algs. Fix if RSA enabled and WOLFSSL_SP_MATH set and WOLFSSL_HAVE_SP_RSA is not.
2022-01-04 15:38:35 -08:00
David Garske
96e1f77c32
Adds compatibility FIPS DRBG API's and test cases.
2022-01-04 15:13:06 -08:00
JacobBarthelmeh
35847c1371
Merge pull request #4717 from embhorn/zd13452
...
Fix heap-buffer-overflow in GetBerHeader
2022-01-04 16:11:03 -07:00
David Garske
be69412e27
Merge pull request #4682 from JacobBarthelmeh/qnx
...
add check on mutex lock return value with qnx CAAM
2022-01-04 14:36:40 -08:00
David Garske
db1bb9ea6a
Merge pull request #4694 from anhu/with-curl
...
Add a --enable-curl build option
2022-01-04 13:39:07 -08:00
David Garske
cf29badd52
Merge pull request #4721 from anhu/lighty
...
lighttpd requires WOLFSSL_KEY_GEN…
2022-01-04 12:37:41 -08:00
Anthony Hu
038a9d8fa9
lighttpd requires WOLFSSL_KEY_GEN. Without it, a call to wolfSSL_CTX_use_PrivateKey fails.
2022-01-04 13:09:13 -05:00
David Garske
58d8f52107
Merge pull request #4719 from JacobBarthelmeh/release
...
bump version for dev and update year in readme
2022-01-04 08:40:06 -08:00
Andrew Hutchings
247cbdeef7
Cleanups for ISO-TP in wolfio
...
* Add Doxygen comments
* Make ISOTP_Send, ISOTP_Receive and wolfSSL_SetIO_ISOTP safer
* Reorder isotp_wolfssl_ctx
* Other minor cleanups
2022-01-04 12:57:11 +00:00
Saksik Remy
12d3f94c98
update build and update NULL salt usecase
2022-01-04 13:18:39 +08:00
Jacob Barthelmeh
7dd50a1beb
bump version for dev and update year in readme
2022-01-03 16:02:10 -07:00
Eric Blankenhorn
3134bd2e71
Fix heap-buffer-overflow in GetBerHeader
2022-01-03 14:51:47 -06:00
David Garske
a0b9e2bead
Merge pull request #4715 from JacobBarthelmeh/release
...
update README for release v5.1.1
2022-01-03 10:51:51 -08:00
JacobBarthelmeh
5f16a826dd
update README for release v5.1.1
2022-01-03 09:39:16 -07:00
David Garske
70ca57790c
Merge pull request #4713 from ejohnstown/fips-RC12
...
FIPS RC12
2021-12-30 17:16:03 -08:00
John Safranek
68e58bb321
Update configure and fips-check.sh for FIPS RC12.
2021-12-30 15:21:44 -08:00
David Garske
7ad7821193
Merge pull request #4712 from rizlik/aes_free_fix
...
Fix potential resources leaks
2021-12-30 13:57:04 -08:00
Marco Oliverio
ea5374c62d
wolfcrypt: aes: gcm: streaming api: add missing wc_AesFree()
2021-12-30 20:33:23 +01:00
Marco Oliverio
4907696ed4
wolfssl: keys: add missing wc_AesFree() when setting new keys
2021-12-30 20:30:36 +01:00
Marco Oliverio
2679c386ae
wolfcrypt: wc_encrypt: add missing wc_AesFree()
2021-12-30 20:30:36 +01:00
Marco Oliverio
933065d696
wolfcrypt: cmac: add missing wc_AesFree()
2021-12-30 20:30:36 +01:00
Marco Oliverio
7edc916057
wolfcrypt/wolfssl: tests: adding missing wc_Aes*Free()
...
In some Aes implementation this may leak resources
2021-12-30 20:30:33 +01:00
JacobBarthelmeh
67b27f64d0
Merge pull request #4708 from dgarske/async_v5.1.0
...
Fixes for wolfSSL Async v5.1.0
2021-12-29 13:30:41 -07:00
David Garske
ff68ab8eea
Merge pull request #4707 from JacobBarthelmeh/release
...
bump version by .1 for developing on
2021-12-29 12:09:43 -08:00
David Garske
c4f51931c9
Merge pull request #4710 from JacobBarthelmeh/sessionExport
...
fix for location of xmemset
2021-12-29 11:52:08 -08:00
Anthony Hu
69733e87c5
SNI and ALT_CERT_CHAINS
2021-12-29 12:50:50 -05:00
Jacob Barthelmeh
73b4cc9476
fix for location of xmemset
2021-12-29 10:48:06 -07:00
Chris Conlon
bc6690c584
Merge pull request #4709 from miyazakh/Update_fspv3p5_RA6M3
2021-12-29 09:10:18 -07:00
Saksik Remy
d11e88298a
Add Make file and fix identation
2021-12-29 11:45:32 +08:00
Remy saksik
4fc2891d5a
Merge branch 'wolfSSL:master' into iotsafe-hkdf-extract
2021-12-29 11:15:13 +08:00
Hideki Miyazaki
f5df363cdd
remove configure.xml from include.am
2021-12-29 11:16:14 +09:00
Hideki Miyazaki
1d107d0403
update RA6M3 projects to the latest e2studio and FSP v3.5.0
2021-12-29 11:06:48 +09:00
David Garske
930cad649e
Fix to resolve possible memory leak with DSA wc_DsaPublicKeyDecode in API unit test when used with HAVE_WOLF_BIGINT.
2021-12-28 16:34:54 -08:00
JacobBarthelmeh
0f9550d80a
increase version for rpm build
2021-12-28 15:35:14 -08:00
Jacob Barthelmeh
616026880e
bump version by .1 for dev
2021-12-28 16:25:05 -07:00
David Garske
2b670c026d
Merge pull request #4705 from JacobBarthelmeh/DTLS
...
account for DTLS extra header size when reading msg from pool
2021-12-27 19:16:26 -08:00
JacobBarthelmeh
a07673ad07
Merge pull request #4706 from douzzer/20211227-fix-null-pointer-wolfSSL_EVP_CIPHER_CTX_ctrl
...
wolfcrypt/src/evp.c: fix wolfSSL_EVP_CIPHER_CTX_ctrl() null pointer…
2021-12-27 20:08:43 -07:00
Daniel Pouzzner
aa05eb2879
wolfcrypt/src/evp.c: fix wolfSSL_EVP_CIPHER_CTX_ctrl() null pointer passed to XMEMCPY(), found by sanitizers under gcc-11.2.1.
2021-12-27 17:59:28 -06:00
Jacob Barthelmeh
05a19c852b
account for DTLS extra header size when reading msg from pool
2021-12-27 16:52:09 -07:00
David Garske
930cc053d5
Merge pull request #4704 from JacobBarthelmeh/release
...
prepare for release 5.1.0
2021-12-27 12:35:49 -08:00
JacobBarthelmeh
d1b03eb8b9
add missing header files for rpm build
2021-12-27 09:49:47 -08:00
Jacob Barthelmeh
816718ecd3
prepare for release 5.1.0
2021-12-27 10:34:09 -07:00
Jacob Barthelmeh
cbab5bb6cb
add kdf.c to MYSQL cmake build
2021-12-27 10:10:35 -07:00
Jacob Barthelmeh
5a4e59c09d
fix warning about NULL compare
2021-12-27 10:02:16 -07:00
David Garske
4e1c39b4c6
Merge pull request #4701 from SparkiDev/asn_templ_fix_1
...
ASN template: get compiling
2021-12-24 07:42:56 -08:00
David Garske
fd31c017e1
Merge pull request #4703 from douzzer/20211224-fixits
...
20211224 ssl.c fixes
2021-12-24 07:42:00 -08:00
Andrew Hutchings
7c2a2229c5
Use XMEMCPY and defined constannts for ISOTP
2021-12-24 11:56:16 +00:00
Daniel Pouzzner
54e9076c45
src/ssl.c: fix whitespace and heap reference in FreeSession() (re 569c066fab).
2021-12-24 01:16:32 -06:00
Sean Parkinson
9d49884274
Merge pull request #4690 from dgarske/resume
...
Fixes for session resumption edge cases
2021-12-24 15:28:06 +10:00
David Garske
02186dbd23
Fix for TLS v1.3 client session ticket resumption where the server opts to do a new handshake. Fix to make sure preMasterSz is valid.
2021-12-23 18:45:52 -08:00
David Garske
a92fb0eb42
Fix for session resumption to ensure use of the right cipher suite. ZD13297
2021-12-23 18:42:41 -08:00
Sean Parkinson
80a4793201
SP int: transplant the div_word from SP into SP int for ARM64 and ARM32
2021-12-24 12:26:19 +10:00
Sean Parkinson
f1f15f411f
Merge pull request #4688 from embhorn/gh4684
...
Fix missing include ws2tcpip.h for VS build
2021-12-24 11:58:12 +10:00
Sean Parkinson
929174be6b
Merge pull request #4667 from dgarske/zd13363
...
Improve TLS client side session cache references
2021-12-24 11:23:06 +10:00
Sean Parkinson
4c6af465c4
ASN template: get compiling
2021-12-24 11:21:18 +10:00
David Garske
a75e152b93
Merge pull request #4698 from JacobBarthelmeh/Jenkins
...
fix for user_settings_all.h build on 'VS' and build with libz + pkcs7 test
2021-12-23 16:54:40 -08:00
Hayden Roche
37925e0b6a
Merge pull request #4699 from douzzer/ssl-wolfCrypt_SetPrivateKeyReadEnable_fips
2021-12-23 16:42:06 -08:00
David Garske
1e4b13dfac
Only include ws2tcpip.h if not user IO.
2021-12-23 15:25:25 -08:00
Anthony Hu
8eea17d92a
More stuff, probably not complete yet
2021-12-23 17:28:24 -05:00
David Garske
569c066fab
Improve TLS client side session cache references to provide option for not returning an internal session cache pointer. Now use wolfSSL_get1_sesson for reference logic, that requires calling wolfSSL_SESSION_free. To disable this feature use NO_SESSION_CACHE_REF.
2021-12-23 14:25:45 -08:00
Daniel Pouzzner
7b5b1f5a4d
src/ssl.c: refine integration of wolfCrypt_SetPrivateKeyReadEnable_fips(), started by 52754123d9: depend on fips 5.1+, and call as matched pair in wolfSSL_Init() and wolfSSL_Cleanup().
2021-12-23 16:05:25 -06:00
David Garske
f950f24b1a
Merge pull request #4691 from JacobBarthelmeh/sessionExport
...
retain same size for exported session
2021-12-23 14:03:11 -08:00
David Garske
21c8b19fc2
Merge pull request #4696 from JacobBarthelmeh/build_tests
...
fix for a couple reports from build_tests
2021-12-23 13:42:06 -08:00
JacobBarthelmeh
801c0c7efd
Merge pull request #4549 from elms/cmake/ac_catchup
...
cmake/configure consistency
2021-12-23 13:49:44 -07:00
David Garske
57d2555ac8
Merge pull request #4695 from douzzer/20211222-fips-config-update-and-fix-test_RsaDecryptBoundsCheck
...
fips config update and test-driven cleanup
2021-12-23 10:38:36 -08:00
Andrew Hutchings
bb8d38c2a1
Add ISO-TP support to wolfio
...
ISO-TP is a commonly used simple transport layer for CAN bus which
allows larger than the 1-8 bytes payload than the CAN bus protocol
allows.
This implements our own ISO-TP transport layer for wolfSSL when compiled
with `WOLFSSL_ISOTP`.
2021-12-23 18:27:34 +00:00
JacobBarthelmeh
f9c9f4c840
refactor IP macro defines
2021-12-23 09:59:05 -08:00
JacobBarthelmeh
c4e50ef086
fix for libz test with pkcs7
2021-12-23 09:37:09 -08:00
David Garske
a8605309c6
Merge pull request #4692 from haydenroche5/wolfssl_init_fipsv5
...
Call wc_SetSeed_Cb and wolfCrypt_SetPrivateKeyReadEnable_fips in wolfSSL_Init.
2021-12-23 09:28:36 -08:00
Chris Conlon
9892f1f2d5
Merge pull request #4679 from dgarske/fips_ecc_pct
2021-12-23 10:27:51 -07:00
elms
dc073f9c1d
cmake: add back de-duplication and fix formatting
2021-12-23 09:22:47 -08:00
elms
37eec1ed19
cmake: reduce port includes
...
TESTING:
```
./autogen.sh && ./configure --enable-reproducible-build --prefix=$PWD/ac_repro && make install
cmake -B b2 -DWOLFSSL_REPRODUCIBLE_BUILD=yes -DCMAKE_INSTALL_PREFIX:PATH=$PWD/cmake_repro && cmake --build b2 && cmake --install b2
diff -rq ac_repro cmake_repro
```
2021-12-23 09:22:47 -08:00
elms
6ff1e0b037
cmake: correct libtool version, default to shared library, generate pkgconfig
2021-12-23 09:22:47 -08:00
elms
c89b7d5f79
configure and cmake: Closing gap on options and output
...
cmake:
* 32-bit and 16-bit mode flags
* Add 4bit to AESGCM
* Add align data
* Encrypted Keys option
* PKC12 option
* Header installation cleanup
configure:
* Add comment for `v5-RC9`
* update CFLAGS to always be appended instead of mix of prepend and append
* removed duplicate `ARC4` logic
2021-12-23 09:22:47 -08:00
JacobBarthelmeh
63df8f0836
add fe_low_mem.c to wolfssl vs project and fix a couple warnings
2021-12-23 16:55:51 +00:00
David Garske
40d5bd052f
Merge pull request #4693 from embhorn/zd13433
...
Fix to init ctx in wc_Des3_SetKey
2021-12-23 07:41:13 -08:00
Sean Parkinson
86e51b97e9
Merge pull request #4689 from haydenroche5/wolfengine_compression_fix
...
Fix usage of SSL_OP_NO_COMPRESSION that was breaking wolfEngine.
2021-12-23 10:47:30 +10:00
Daniel Pouzzner
a5b3daf216
fix whitespace.
2021-12-22 17:34:06 -06:00
Daniel Pouzzner
951eb72ecb
fips-check.sh: update+streamline flavors -- add linuxv5-dev (checks out fips master same as old linuxv5-ready) , drop linuxv5-RC8, linuxv5-RC9, linuxv5-RC10, and the desupported/unbuildable fips-v3-ready; update linuxv5 and linuxv5-ready to use WCv5.0-RC11; use the term "flavor" consistently for the fips key (versus "version" or "platform"); cleanup to satisfy shellcheck.
2021-12-22 17:32:36 -06:00
Daniel Pouzzner
a6ed5dc92d
configure.ac: update fips with RC11.
2021-12-22 17:32:36 -06:00
Daniel Pouzzner
b0a5b16068
api.c: fix logic in test_RsaDecryptBoundsCheck().
2021-12-22 17:32:36 -06:00
Eric Blankenhorn
29c18a110b
Fix to init ctx in wc_Des3_SetKey
2021-12-22 17:05:58 -06:00
David Garske
11e8d729c2
Merge pull request #4685 from SparkiDev/sp_gen_fix_1
...
SP gen: Regenerate
2021-12-22 15:02:03 -08:00
Anthony Hu
991ddaadfc
Add a --enable-curl build option
2021-12-22 17:34:58 -05:00
Hayden Roche
52754123d9
Call wc_SetSeed_Cb and wolfCrypt_SetPrivateKeyReadEnable_fips in wolfSSL_Init.
...
Additionally, remove wc_SetSeed_Cb calls applications (e.g. example client and
server), since they are now redundant.
2021-12-22 14:21:06 -08:00
Chris Conlon
8670e33baf
Merge pull request #4651 from TakayukiMatsuo/tsip_sce
2021-12-22 15:00:32 -07:00
Jacob Barthelmeh
fd39197e4b
retain same size for exported session
2021-12-22 14:28:42 -07:00
Hayden Roche
646ceb259a
Fix usage of SSL_OP_NO_COMPRESSION that was breaking wolfEngine.
...
Replace instances of SSL_OP_NO_COMPRESSION with WOLFSSL_OP_NO_COMPRESSION in
ssl.c. Only define SSL_OP_NO_COMPRESSION when using the compatibility layer.
Before these changes, wolfEngine builds were failing due to
SSL_OP_NO_COMPRESSION being defined in both wolfSSL and OpenSSL headers.
2021-12-22 10:23:51 -08:00
David Garske
38214bd083
Disable the FIPS consistency checks in ECC and DH for key generation by default.
2021-12-22 10:06:19 -08:00
David Garske
8d4c22abda
Merge pull request #4687 from julek-wolfssl/asn-template-var-init
...
`items` needs to be initialized as the compiler complains
2021-12-22 08:58:54 -08:00
David Garske
9d137668c7
Merge pull request #4675 from julek-wolfssl/openssh-8.8
...
Fix macro name conflicts with openssh
2021-12-22 08:31:36 -08:00
Eric Blankenhorn
713c4afcb4
Fix missing include ws2tcpip.h for VS build
2021-12-22 09:26:22 -06:00
Juliusz Sosinowicz
8435eb4644
Add WC_ namespace to variable handling defines
2021-12-22 12:16:02 +01:00
Juliusz Sosinowicz
618599656f
items needs to be initialized as the compiler complains
2021-12-22 10:42:48 +01:00
Saksik Remy
81cf1ae38a
fix alignment
2021-12-22 15:16:08 +08:00
Saksik Remy
c7fc0fac05
revert changes + spelling/comments
2021-12-22 15:11:50 +08:00
Remy saksik
9091cbde5f
Merge branch 'wolfSSL:master' into iotsafe-hkdf-extract
2021-12-22 14:46:28 +08:00
David Garske
ea432f45cd
Merge pull request #4686 from SparkiDev/fe448_cast
...
Curve448: add casts for Windows
2021-12-21 22:21:25 -08:00
TakayukiMatsuo
cd96330f2a
Integrate Renesas TSIP specific code into Renesas common logics
2021-12-22 13:18:32 +09:00
Remy saksik
140cf8955d
Merge branch 'wolfSSL:master' into iotsafe-hkdf-extract
2021-12-22 12:01:11 +08:00
Sean Parkinson
80e291fcd1
Curve448: add casts for Windows
2021-12-22 12:57:15 +10:00
Juliusz Sosinowicz
dd9b1afb72
Remove magic numbers from WOLFSSL_ASN_TEMPLATE code ( #4582 )
...
* pkcs8KeyASN and other misc asn fixes
- Test fixes for testing with `USE_CERT_BUFFERS_1024`
* intASN
* bitStringASN
* objectIdASN
* algoIdASN
* rsaKeyASN
* pbes2ParamsASN
* pbes1ParamsASN
* pkcs8DecASN
* p8EncPbes1ASN
* rsaPublicKeyASN
* dhParamASN
* dhKeyPkcs8ASN
* dsaKeyASN
* dsaPubKeyASN
- Add `wc_SetDsaPublicKey` without header testing
* dsaKeyOctASN
* rsaCertKeyASN
* eccCertKeyASN
* rdnASN
* certNameASN
* digestInfoASN
* otherNameASN
* altNameASN
* basicConsASN
* crlDistASN
* accessDescASN
* authKeyIdASN
* keyUsageASN
* keyPurposeIdASN
* subTreeASN
* nameConstraintsASN
* policyInfoASN
* certExtHdrASN
* certExtASN
* x509CertASN
* reqAttrASN
* strAttrASN
* certReqASN
* eccPublicKeyASN
* edPubKeyASN
* ekuASN
* nameASN
* certExtsASN
* sigASN
* certReqBodyASN_IDX_EXT_BODY
* dsaSigASN
* eccSpecifiedASN
* eccKeyASN
* edKeyASN
* singleResponseASN
* respExtHdrASN
* ocspRespDataASN
* ocspBasicRespASN
* ocspResponseASN
* ocspNonceExtASN
* ocspRequestASN
* revokedASN
* crlASN
* pivASN
* pivCertASN
* dateASN
* `wc_SetDsaPublicKey` was not including `y` in the sequence length
* All index names changed to uppercase
* Shorten names in comments
* Make sure extensions have sequence header when in cert gen
* Fix/refactor size calc in `SetNameEx`
* Pad blocks for encryption
* Add casting for increased enum portability
* Use stack for small ASN types
2021-12-22 11:28:01 +10:00
David Garske
af0bcef0ef
Merge pull request #4648 from embhorn/zd13365
...
Fix - wolfSSL_init should cleanup on failure of a component
2021-12-21 17:17:16 -08:00
David Garske
bf612c075b
Merge pull request #4668 from ejohnstown/kcapi-ecdsa
...
KCAPI ECDSA Memory
2021-12-21 15:32:33 -08:00
Sean Parkinson
bf37845e2d
Merge pull request #4680 from JacobBarthelmeh/certs
...
update certificate expiration dates and fix autorenew
2021-12-22 08:48:35 +10:00
Sean Parkinson
395c5815bd
SP gen: Regenerate
...
Put back in fix for SAKKE.
2021-12-22 08:24:33 +10:00
David Garske
a6a071771b
Merge pull request #4681 from SparkiDev/sp_arm64_p384_mr
...
SP ARM64: P-384 prime specific Montogmery Reduction
2021-12-21 13:50:33 -08:00
JacobBarthelmeh
bbfcd0cac8
fix build warning with af_alg
2021-12-21 10:20:34 -08:00
JacobBarthelmeh
d29cdd3537
fix for --enable-ip-alt-name build
2021-12-21 09:53:58 -08:00
JacobBarthelmeh
d28cb70735
fix for ed25519 client cert generation
2021-12-21 09:03:54 -08:00
Saksik Remy
78a419fdf5
spelling
2021-12-21 15:57:19 +08:00
Saksik Remy
ebff24353a
fix Spelling
2021-12-21 15:53:57 +08:00
Saksik Remy
f1bbfa5a24
revert change on Derive Master secret
2021-12-21 15:51:32 +08:00
Saksik Remy
31cf4f305c
fixing comments and spelling; fallback hkdf imp + signature header
2021-12-21 15:41:43 +08:00
Jacob Barthelmeh
343cfb32f2
add check on mutex lock return value with qnx CAAM
2021-12-20 17:41:06 -07:00
Sean Parkinson
9f2419246e
SP ARM64: P-384 prime specific Montogmery Reduction
...
Improves performance
2021-12-21 10:18:12 +10:00
JacobBarthelmeh
c0f8fd5f5d
update certificate dates and fix autorenew
2021-12-20 16:04:05 -08:00
David Garske
6b47954d58
Merge pull request #4670 from julek-wolfssl/krb5-missing-api
...
Missing config for krb5 1.16.1
2021-12-20 15:54:41 -08:00
David Garske
3644d97dd8
Merge pull request #4613 from SparkiDev/sp_div_max
...
SP math all: div handling of length of dividend
2021-12-20 15:10:35 -08:00
David Garske
360a513696
Merge pull request #4553 from SparkiDev/sp_mont_inv_order_fix
...
SP: fix when mont_mul_order is defined
2021-12-20 15:09:08 -08:00
Sean Parkinson
463d050d3d
Merge pull request #4678 from dgarske/nightly
...
Nightly fixes: PK with no AES and OCSP test with DTLS
2021-12-21 09:00:22 +10:00
David Garske
0ce9703768
Merge pull request #4666 from SparkiDev/ecc_enc_mem
...
ECC: better protection when using encrypted memory
2021-12-20 14:48:13 -08:00
Sean Parkinson
bb306d14b7
Merge pull request #4643 from kareem-wolfssl/zd13328
...
Fix building with OPENSSL_EXTRA defined and NO_WOLFSSL_STUB not defined.
2021-12-21 08:02:17 +10:00
David Garske
d588437504
Merge pull request #4677 from anhu/oqs_to_pqc
...
--with-liboqs now defines HAVE_LIBOQS and HAVE_PQC
2021-12-20 13:00:30 -08:00
David Garske
d8b58b8b05
Put both DigiCert Global Root CA and GlobalSign Root CA into the Google CA list. Fixes --enable-dtls --enable-ocsp ./scripts/ocsp.test`.
2021-12-20 11:47:34 -08:00
David Garske
ebc64db7d0
Fix for --enable-pkcallbacks --disable-aes --disable-aesgcm.
2021-12-20 10:17:50 -08:00
David Garske
b290e8089c
Merge pull request #4672 from SparkiDev/sp_c_mont_red
...
SP C: specific Montgomery reduction code for P256 and P384
2021-12-20 09:50:54 -08:00
Anthony Hu
79f6301521
Add error for case of user defining HAVE_PQC without HAVE_LIBOQS.
2021-12-20 12:42:09 -05:00
Anthony Hu
7d4c13b9a4
--with-liboqs now defines HAVE_LIBOQS and HAVE_PQC
...
AKA: The Great Rename of December 2021
2021-12-20 11:48:03 -05:00
Saksik Remy
93712fcfbd
fallback in software imp if callback not supporting operation ie: NULL salt
2021-12-20 17:34:27 +08:00
Saksik Remy
d1f850273f
add hkdf-extract to iotsafe implementation + sample application
2021-12-20 17:33:24 +08:00
Sean Parkinson
6d2da74c21
Merge pull request #4625 from dgarske/zd13208
...
Fix for PKCS7 verify to handle content type OID with indef BER encoding
2021-12-20 14:49:59 +10:00
David Garske
ce4f436d0f
Merge pull request #4587 from SparkiDev/dis_algs_fix_1
...
Disable algorithms: fixes
2021-12-19 20:12:30 -08:00
David Garske
2477574a69
Fix for PKCS7 verify to handle pkcs7-data content type OID with indef BER encoding. ZD13208
2021-12-17 14:24:35 -08:00
David Garske
ab9eda636a
Merge pull request #4671 from lealem47/remove-n
...
Removing extra \n from WOLFSSL_LEAVE and WOLFSSL_ENTER
2021-12-17 14:04:42 -08:00
John Safranek
b45f1ed761
KCAPI ECDSA Memory
...
Use page aligned memory when using ECDSA signing and verify.
2021-12-17 11:11:16 -08:00
David Garske
97830b81d6
Merge pull request #4674 from anhu/uninitialized
...
Fix unitialized usage
2021-12-17 10:51:43 -08:00
John Safranek
771647615a
Merge pull request #4669 from douzzer/rehab-configure-fips
...
FIPS configure cleanup
2021-12-17 08:58:44 -08:00
Anthony Hu
9cc1624023
Fix unitialized usage
2021-12-17 11:55:08 -05:00
Kaleb Himes
2f0b451545
Merge pull request #4673 from julek-wolfssl/should-retry-fix
...
Fix `test_wolfSSL_BIO_should_retry` test
2021-12-17 08:16:16 -07:00
Juliusz Sosinowicz
21a5a571e8
Fix test_wolfSSL_BIO_should_retry test
...
When `OPENSSL_COMPATIBLE_DEFAULTS` is defined then `SSL_MODE_AUTO_RETRY` is set on context creation. For this test we need to clear this mode so that the `WOLFSSL_CBIO_ERR_WANT_READ` can propagate up to the user.
2021-12-17 12:32:25 +01:00
David Garske
bd515cd3a6
Merge pull request #4637 from SparkiDev/sp_c32_rsa
...
SP C RSA: normalize tmpa after conditionally adding p
2021-12-16 18:54:28 -08:00
Sean Parkinson
6cac0ea5a9
SP C: specific Montgomery reduction code for P256 and P384
...
Improves performance of 32-bit and 64-bit SP C code.
2021-12-17 12:00:16 +10:00
Daniel Pouzzner
5c6bd8c2c9
configure.ac: in fips v5 setup, consider HAVE_AES{CCM,CTR,GCM,OFB}_PORT when auto-setting -DWOLFSSL_AES_DIRECT -DHAVE_AES_ECB; refactor KCAPI options for readability and correctness.
2021-12-16 17:03:01 -06:00
Sean Parkinson
0b2b218de7
ECC: better protection when using encrypted memory
...
Added new ECC scalar multiplication implementation.
2021-12-17 08:30:45 +10:00
Lealem Amedie
a79440b95a
Removing extra \n from WOLFSSL_LEAVE and WOLFSSL_ENTER
2021-12-16 13:30:43 -07:00
Daniel Pouzzner
f889916fae
ssl.c: fix C++ invalid conversion in wolfSSL_sk_X509_INFO_value().
2021-12-16 13:29:17 -06:00
Daniel Pouzzner
e35c3c0d71
wolfcrypt/src/wc_port.c: fix whitespace.
2021-12-16 13:01:01 -06:00
Daniel Pouzzner
cf16480c85
configure.ac: fix hard tabs, and fix fips "v5-ready" that should have been "v5-dev".
2021-12-16 13:00:10 -06:00
Daniel Pouzzner
b7307e0ca5
ecc.c: small stack refactor for mp_int on the stack in wc_ecc_gen_deterministic_k().
2021-12-16 13:00:10 -06:00
Daniel Pouzzner
fed5eb1d94
ecc.c: fix a deadcode.DeadStores warning in wc_ecc_gen_deterministic_k().
2021-12-16 13:00:10 -06:00
Daniel Pouzzner
b6b12fe946
configure.ac: fips cleanup: drop flavor keys "v5-REL" (confusing); drop "v3" aka "v3-ready" (no longer buildable); add flavor "v5-dev" aka "dev"; refactor the "v5*" case of the FIPS setup switch to impose feature locks for v5 and v5-ready, but allow feature overrides with the new v5-dev; fix a debugging echo in the v2 case added in 1c27654300.
2021-12-16 13:00:10 -06:00
David Garske
dec78169bf
Merge pull request #4658 from julek-wolfssl/apache-2.4.51
...
Add Apache 2.4.51 support
2021-12-16 08:52:10 -08:00
David Garske
ea2245c4d1
Merge pull request #4656 from JacobBarthelmeh/SanityChecks
...
sanity check before reading policy constraint
2021-12-16 08:42:19 -08:00
David Garske
424bd2d73d
Merge pull request #4599 from julek-wolfssl/issue-4593
...
Add WOLFSSL_FORCE_AUTO_RETRY option: force retrying of network reads
2021-12-16 08:42:07 -08:00
Chris Conlon
3bd737b9ef
Merge pull request #4665 from miyazakh/sce_fsp_update_v3p5
2021-12-16 09:39:13 -07:00
David Garske
7699d92935
Merge pull request #4664 from anhu/Fix_ENCRYPT_LEN
...
Do not let anything override HAVE_LIBOQS when setting ENCRYPT_LEN
2021-12-16 07:51:32 -08:00
Eric Blankenhorn
44cc9e4824
Fix - wolfSSL_init should cleanup on failure of a component
2021-12-16 09:50:50 -06:00
Juliusz Sosinowicz
afa6237f56
Add WOLFSSL_FORCE_AUTO_RETRY option: force retrying of network reads
2021-12-16 15:33:30 +01:00
Juliusz Sosinowicz
d5783d1eaa
Missing config for krb5 1.16.1
2021-12-16 14:35:39 +01:00
Juliusz Sosinowicz
017d6cf464
Simplify error queue macros
2021-12-16 12:39:58 +01:00
Juliusz Sosinowicz
e78f7f734e
Add Apache 2.4.51 support
...
- Define `OPENSSL_COMPATIBLE_DEFAULTS` and `WOLFSSL_NO_OCSP_ISSUER_CHECK` for Apache config
- Fix `SSL_set_timeout` to match OpenSSL signature
- Implement `pkey` in `X509_INFO`
- Detect attempt to connect with plain HTTP
- Implement `wolfSSL_OCSP_request_add1_nonce`
- Set `ssl->cipher.bits` when calling `wolfSSL_get_current_cipher`
- Use custom flush method in `wolfSSL_BIO_flush` when set in BIO method
- Set the TLS version options in the `ssl->options` at the end of ClientHello parsing
- Don't modify the `ssl->version` when in a handshake (`ssl->msgsReceived.got_client_hello` is set)
- `wolfSSL_get_shutdown` returns a full bidirectional return when the SSL object is cleared. `wolfSSL_get_shutdown` calls `wolfSSL_clear` on a successful shutdown so if we detect a cleared SSL object, assume full shutdown was performed.
2021-12-16 12:39:38 +01:00
Marco Oliverio
fa913f797a
Merge pull request #4657 from SparkiDev/sakke_cond_add
...
SAKKE: fixup cond add to use all words
2021-12-16 07:40:13 +01:00
Hideki Miyazaki
63ade421c1
fix redundat #ifdef
2021-12-16 09:30:21 +09:00
Sean Parkinson
bd7e19b8fe
Merge pull request #4639 from JacobBarthelmeh/ECC
...
deterministic ECC sign edge case fix and add variant
2021-12-16 08:48:37 +10:00
David Garske
abe8696852
Merge pull request #4642 from cconlon/pubKeyDerFromX509
...
Add wc_GetPubKeyDerFromCert()
2021-12-15 14:30:58 -08:00
Anthony Hu
7975ead1af
Do not let anything override HAVE_LIBOQS when setting ENCRYPT_LEN because oqs wants biggest value.
2021-12-15 14:48:50 -05:00
John Safranek
e1cee463b6
Merge pull request #4662 from douzzer/20211214-fixits
...
20211214 fixits
2021-12-15 10:47:50 -08:00
Daniel Pouzzner
463118005f
Merge pull request #4663 from ejohnstown/revert-pr
...
Revert configure.ac PR
2021-12-15 12:33:19 -06:00
John Safranek
8688bd43f1
Revert "Swap v5-ready (exception) and v5, add the wildcard back in for all non-ready cases"
...
This reverts commit 23fbf2e786 .
2021-12-15 10:24:05 -08:00
John Safranek
1b6e0c45d0
Merge pull request #4660 from kaleb-himes/FIPS_READY_KCAPI_FOLLOWUP
...
Swap v5-ready (exception) and v5, add the wildcard back in for all non-ready cases
2021-12-15 10:16:33 -08:00
Chris Conlon
5172130287
add wc_GetPubKeyDerFromCert(), get pub key DER from DecodedCert
2021-12-15 11:04:52 -07:00
Hideki Miyazaki
9af9d96cc7
Update README for FSP v3.5.0
...
fix tyo
2021-12-15 15:46:16 +09:00
Daniel Pouzzner
a773cdfd5d
pkcs12.c wc_d2i_PKCS12_fp(): mollify Visual Studio (false positives C4701 and C4703).
2021-12-14 18:33:24 -06:00
Daniel Pouzzner
242eb2dcf1
wolfcrypt/src/pkcs12.c: fix scan-build deadcode.DeadStores gripe.
2021-12-14 18:08:54 -06:00
Daniel Pouzzner
eb032e0266
configure.ac: refactor changes of 7cccaa98b7 around FIPS v5*.
2021-12-14 18:08:12 -06:00
kaleb-himes
23fbf2e786
Swap v5-ready (exception) and v5, add the wildcard back in for all non-ready cases
2021-12-14 13:28:35 -07:00
David Garske
a6c7d56c32
Merge pull request #4655 from haydenroche5/wc_pkcs12_from_file
...
Add wc_d2i_PKCS12_fp to parse a PKCS #12 file directly in wolfCrypt.
2021-12-14 08:58:57 -08:00
Sean Parkinson
994e370db3
SAKKE: fixup cond add to use all words
2021-12-14 12:02:59 +10:00
John Safranek
2359045b28
Merge pull request #4649 from kaleb-himes/KCAPI_FIPS_READY
...
The minimal changes needed to add KCAPI support with fips-ready
2021-12-13 17:33:03 -08:00
Hayden Roche
92d207a1cd
Add wc_d2i_PKCS12_fp to parse a PKCS #12 file directly in wolfCrypt.
2021-12-13 15:28:34 -08:00
JacobBarthelmeh
a2cf234100
sanity check before reading policy constraint
2021-12-13 14:32:46 -08:00
Sean Parkinson
f5cd61e4f9
Merge pull request #4654 from embhorn/zd13375
...
Fix _sp_exptmod_base_2 to init vars.
2021-12-14 07:38:20 +10:00
David Garske
7fd1b7aa51
Merge pull request #4650 from anhu/changelog
...
Mention falcon in the changelog
2021-12-13 10:37:07 -08:00
kareem-wolfssl
638d00f593
Merge pull request #4634 from danielinux/iotsafe-16bit-id
...
IoT-SAFE module: improvements and bug fixes
2021-12-13 11:33:19 -07:00
David Garske
caf9024984
Merge pull request #4652 from douzzer/no-rsa-no-dh-no-dsa
...
WOLFSSL_ECC_NO_SMALL_STACK etc
2021-12-13 10:12:14 -08:00
David Garske
9a85638ac3
Merge pull request #4647 from anhu/evp_pkey_dummy_falcon
...
In d2iGenericKey(), if a falcon key is encountered, make a dummy pkey.
2021-12-13 10:12:07 -08:00
Eric Blankenhorn
53eb5d2e5a
Fix _sp_exptmod_base_2 to init vars.
2021-12-13 10:16:55 -06:00
Daniel Pouzzner
355b779a3e
feature gating tweaks to better support --disable-rsa --disable-dh --disable-dsa. also a whitespace fix in ssl.c.
2021-12-11 14:08:04 -06:00
Daniel Pouzzner
2193df1d62
add WOLFSSL_ECC_NO_SMALL_STACK.
2021-12-10 23:57:14 -06:00
David Garske
41d4aafa3f
Merge pull request #4645 from haydenroche5/parse_cert_public
...
Make wolfCrypt ASN cert parsing functionality public.
2021-12-10 18:27:18 -08:00
Anthony Hu
eec9649049
Mention falcon in the changelog
2021-12-10 16:54:13 -05:00
kaleb-himes
7cccaa98b7
The minimal changes needed to add KCAPI support with fips-ready
2021-12-10 14:44:20 -07:00
Anthony Hu
4c12f0be95
Only one call to wc_falcon_init() and comment on 300.
2021-12-10 16:40:41 -05:00
Anthony Hu
1d8ff70900
In d2iGenericKey(), if a falcon key is encountered, make a dummy pkey.
...
This allows apache-httpd to work without PQ-specific patch along with a previous
pull request.
2021-12-10 14:18:42 -05:00
Hayden Roche
6764e7c15f
Make wolfCrypt ASN cert parsing functionality public.
...
Currently, the `ParseCert` function is only available if `WOLFSSL_ASN_API` is
defined to `WOLFSSL_API`. The only way to achieve this without enabling the
compatibility layer is to define `WOLFSSL_TEST_CERT`. There are users defining
this so that they can parse certs with wolfCrypt, even though this doesn't seem
to be the original intent of the define. This commit adds the function
`wc_ParseCert` to the public wolfCrypt API. It's simply a wrapper around
`ParseCert`. Similarly, this commit adds `wc_InitDecodedCert` and
`wc_FreeDecodedCert` to the public API, which are wrappers around
`InitDecodedCert` and `FreeDecodedCert`, respectively.
2021-12-10 10:43:28 -08:00
David Garske
dde8cd9039
Merge pull request #4646 from julek-wolfssl/SSL_OP_NO_COMPRESSION-redef-error
...
Fix redefinition error of `WOLFSSL_OP_NO_COMPRESSION`
2021-12-10 08:46:43 -08:00
David Garske
65a0b71994
Merge pull request #4641 from anhu/priv_key_check
...
Actually do a private/public key check for FALCON.
2021-12-10 06:53:35 -08:00
Juliusz Sosinowicz
e40ba00ece
Fix redefinition error of WOLFSSL_OP_NO_COMPRESSION
2021-12-10 15:11:11 +01:00
Anthony Hu
6b5fa9d0ae
remove consistency check; let it fail elsewhere.
2021-12-09 17:12:42 -05:00
David Garske
b921161309
Merge pull request #4633 from SparkiDev/tls13_expired
...
TLS13: Skip if expired rather than turning off resuming
2021-12-09 14:10:42 -08:00
David Garske
dd0e3d6ebf
Merge pull request #4644 from kareem-wolfssl/iotsafe_class
...
Fix compiling Iotsafe with C++ by avoiding reserved keyword 'class'.
2021-12-09 09:10:24 -08:00
Anthony Hu
494abde3eb
Better casting.
2021-12-09 09:45:28 -05:00
Daniele Lacamera
f02763b088
Fixes after review comments
2021-12-09 11:23:44 +01:00
David Garske
4764c4d6fa
Merge pull request #4636 from JacobBarthelmeh/client
...
print out PEM of peer cert with example client
2021-12-08 20:04:57 -08:00
Sean Parkinson
32014c69fd
TLS 13 session ticket timeout: fixup checks
...
Check difference between now and ticket seen from encrypted ticket
against timeout.
2021-12-09 12:43:30 +10:00
Sean Parkinson
6da0cc1ced
Merge pull request #4600 from dgarske/cust_oid
...
Support for Custom OID in subject and CSR request extension
2021-12-09 11:24:30 +10:00
Kareem
4200cf1b4d
Fix compiling Iotsafe with C++ by avoiding reserved keyword 'class'.
2021-12-08 17:17:58 -07:00
Kareem
376be0f66a
Fix building with OPENSSL_EXTRA defined and NO_WOLFSSL_STUB not defined.
2021-12-08 16:51:51 -07:00
Anthony Hu
7022eb6f89
Actually do a private/public key check for FALCON.
2021-12-08 18:04:11 -05:00
David Garske
dac0c21989
Merge pull request #4640 from anhu/prevent_stack_corruption
...
Pass in pointer to a local size_t var, not word32 var to prevent stack corruption
2021-12-08 14:44:07 -08:00
Sean Parkinson
cf0d3263ac
Merge pull request #4628 from julek-wolfssl/issue-4623
...
Handle an `EPIPE` error from the socket
2021-12-09 08:08:56 +10:00
Anthony Hu
74442605fa
Pass in pointer to a local size_t var, not word32 var to prevent stack corruption.
2021-12-08 16:01:52 -05:00
Jacob Barthelmeh
ad078a7358
adjust macro guard in example client
2021-12-08 13:45:37 -07:00
Jacob Barthelmeh
0446d93285
add deterministic k variant for ECC to enable all
2021-12-08 10:49:17 -07:00
Jacob Barthelmeh
dfce101b5b
deterministic ECC sign edge case fix and add variant
2021-12-08 09:54:47 -07:00
Chris Conlon
dd0e1226b7
Merge pull request #4638 from miyazakh/sce_protect_iar_compiler
2021-12-08 09:50:16 -07:00
Hideki Miyazaki
081d28f556
better handling for global index
...
fix function proto type definition
2021-12-08 11:42:23 +09:00
Sean Parkinson
3b65a4876f
SP C RSA: normalize tmpa after conditionally adding p
...
Numbers in a word get too big for fast mul implementation when not
normalized.
Only affects RSA keys where p < q.
2021-12-08 11:25:20 +10:00
Jacob Barthelmeh
9a07b3af9b
print out PEM of peer cert with example client
2021-12-07 14:07:47 -07:00
Kaleb Himes
8609d98122
Merge pull request #4635 from julek-wolfssl/PrintPubKeyEC-wrong-free
...
Return early on failed `key` init
2021-12-07 13:28:53 -07:00
Juliusz Sosinowicz
223f25149b
Return early on failed key init
2021-12-07 18:11:19 +01:00
Kaleb Himes
96daf2bede
Merge pull request #4632 from julek-wolfssl/PrintPubKeyEC-leak
...
`a` and `key` were not being freed => leak in `PrintPubKeyEC`
2021-12-07 07:20:05 -07:00
Daniele Lacamera
1cb8b34fba
IoT-SAFE: minor fixes + doxygen for new API calls
2021-12-07 14:11:14 +01:00
Daniele Lacamera
9e73c324a4
iot-safe: Fixed debug printf, updated slot number for 16-bit demo
2021-12-07 14:11:14 +01:00
Daniele Lacamera
23982e4fb3
Fixed wolfIoT_ecc_keygen when key is stored during generation
2021-12-07 14:11:14 +01:00
Daniele Lacamera
b23d51ab78
Avoid looping on uart read after applet initialization fails
2021-12-07 14:11:14 +01:00
Daniele Lacamera
5da89c6275
Clear meaning for the return value of iotsafe_gen_keypair
2021-12-07 14:11:14 +01:00
Kareem
4d483b0a28
iotsafe: allow init to continue with empty response
2021-12-07 14:11:13 +01:00
Daniele Lacamera
29e20eeadc
Fix to rebase branch on current master
2021-12-07 14:11:13 +01:00
Daniele Lacamera
e551f439f4
Reworked expect_tok to fix NULL dereferences
2021-12-07 14:11:13 +01:00
Daniele Lacamera
0c0f36d67d
IoT-SAFE: Minor fixes
...
- reverted length change in put public operation
- Loading CA from IoT-SAFE file slot in 16bit demo
2021-12-07 14:11:13 +01:00
Daniele Lacamera
2646747f2a
Fixed 8bit variable overflow/useless code
2021-12-07 14:11:13 +01:00
Daniele Lacamera
0621ba061b
Multiple fixes for IoT-SAFE
...
- Tested with a different SIM:
- 16bit IDs
- Directly retrieving public key from keygen function
- larger response buffers (up to 256 bytes in ReadFile)
- Fixed hardcoded length in ID buffers
2021-12-07 14:11:13 +01:00
Daniele Lacamera
2f17a7e626
Support longer-than-8bit IDs for IoTSAFE key/file slots
2021-12-07 14:11:13 +01:00
Juliusz Sosinowicz
574d171357
Fix leak when mp_int = 0 in integer.c
2021-12-07 12:46:24 +01:00
Sean Parkinson
85ec6054c6
TLS13: Skip if expired rather than turning off resuming
2021-12-07 13:58:38 +10:00
Sean Parkinson
9f6aa36866
Merge pull request #4629 from dgarske/zd13337
...
Additional checking for side on TLS messages
2021-12-07 10:13:44 +10:00
David Garske
e1b7363647
Fixes from peer review.
2021-12-06 16:12:07 -08:00
John Safranek
261d305b32
Merge pull request #4627 from cconlon/fipsOsSeed
2021-12-06 16:06:46 -08:00
Sean Parkinson
d5c27fca7d
Merge pull request #4626 from JacobBarthelmeh/certs
...
add human readable string of IP
2021-12-07 08:23:31 +10:00
David Garske
579056a2f3
Subject raw should be populated with WOLFSSL_CERT_EXT.
2021-12-06 14:19:32 -08:00
Chris Conlon
e45c33a771
Merge pull request #4624 from miyazakh/jenkins_qt_failure
2021-12-06 09:53:34 -07:00
David Garske
5107f6b752
Merge pull request #4630 from douzzer/20211204-nits
...
20211204 nits
2021-12-06 08:24:17 -08:00
Juliusz Sosinowicz
96b8b11fba
a and key were not being freed => leak in PrintPubKeyEC
2021-12-06 12:03:02 +01:00
Daniel Pouzzner
30b68060fb
configure.ac: fix whitespace; client.c: make gcc 5.4.0 -Wmaybe-uninitialized happy.
2021-12-04 00:57:49 -06:00
David Garske
54c3e0ac73
Additional checking for side on TLS messages. ZD13337
2021-12-03 11:49:08 -08:00
Juliusz Sosinowicz
e4bd5d9046
Handle an EPIPE error from the socket
...
Issue reported in https://github.com/wolfSSL/wolfssl/issues/4623
2021-12-03 17:44:53 +01:00
Chris Conlon
9eabf16ed8
fix redefinition of OS_Seed error with FIPS Ready on some compilers
2021-12-02 17:01:11 -07:00
Jacob Barthelmeh
1ec86ee4cc
add human readable string of IP
2021-12-02 16:04:58 -07:00
David Garske
b4c6140b64
Merge pull request #4442 from julek-wolfssl/kerberos
...
Add Kerberos 5 support
2021-12-02 09:07:34 -08:00
Daniele Lacamera
baee7bace4
Merge pull request #4584 from ethanlooney/nxp_se050_curve25519
...
Added curve25519 support for NXP SE050
2021-12-02 02:47:36 -08:00
Hideki Miyazaki
a5bd6cde8d
fix nigtly jenkins Qt Job failure
2021-12-02 16:37:48 +09:00
David Garske
48b15b0dfb
Merge pull request #4616 from SparkiDev/sp_int_mips32
...
SP math all: MIPS asm fix
2021-12-01 16:16:14 -08:00
David Garske
9f611e8b80
Merge pull request #4589 from JacobBarthelmeh/native-lwip
...
Native LwIP support update
2021-12-01 10:37:13 -08:00
David Garske
5c172ca955
Merge pull request #4622 from douzzer/fix-wolfsentry-build
...
wolfsentry fixes re HAVE_EX_DATA and wolfsentry_sockaddr
2021-12-01 08:16:07 -08:00
Sean Parkinson
d06ada2ccc
Merge pull request #4610 from julek-wolfssl/nginx-1.21.4
...
Add support for Nginx 1.21.4
2021-12-01 22:27:12 +10:00
Juliusz Sosinowicz
aac1b406df
Add support for Nginx 1.21.4
...
- Add KEYGEN to Nginx config
- Check for name length in `wolfSSL_X509_get_subject_name`
- Refactor `wolfSSL_CONF_cmd`
- Implement `wolfSSL_CONF_cmd_value_type`
- Don't forecfully overwrite side
- `issuerName` should be `NULL` since the name is empty
2021-12-01 09:49:52 +01:00
Daniel Pouzzner
32db20143c
wolfssl/test.h: fix --enable-wolfsentry CFLAGS=-pedantic.
2021-11-30 23:40:30 -06:00
Daniel Pouzzner
3f65916f3a
HAVE_EX_DATA: fix wolfssl/ssl.h and tests/api.c to build -DHAVE_EX_DATA but -UOPENSSL_EXTRA.
2021-11-30 23:39:16 -06:00
Hayden Roche
7b5b4015f6
Merge pull request #4621 from dgarske/zd13303
2021-11-30 21:04:41 -06:00
JacobBarthelmeh
43ac0d3684
adjust test file for pritnf and test_pass
2021-11-30 16:41:02 -07:00
JacobBarthelmeh
b69a1c860c
Merge pull request #3996 from cconlon/pkcs7_detachedhash
...
adjust PKCS7_VerifySignedData to correctly verify precomputed content hash with detached signature
2021-11-30 12:46:46 -08:00
David Garske
a0300f7ab0
Fixes for ECDSA_Size. If group is unknown set to -1, otherwise defaults to first ECC index. Fix the signature size calculation to use our existing enum and calculation logic. ZD13303
2021-11-30 12:33:49 -08:00
David Garske
1e74c6f38d
Merge pull request #4620 from JacobBarthelmeh/Testing
...
do not load example CA if not verifying peer
2021-11-30 12:17:58 -08:00
David Garske
29517fd617
Merge pull request #4609 from danielinux/tls13_hkdf_callback
...
TLS 1.3: Add HKDF extract callback
2021-11-30 10:59:44 -08:00
David Garske
6d4c067b72
Merge pull request #4607 from anhu/wolfcrypt_pq_benchmarks
...
Use wolfCrypt's benchmarking app to run the PQ algorithms.
2021-11-30 10:09:48 -08:00
Jacob Barthelmeh
0340b49ff9
do not load example CA if not verifying peer
2021-11-30 10:44:05 -07:00
David Garske
d32f26de64
Merge pull request #4619 from kojo1/early_data
...
OpneSSL compat for SSL_read/write_early_data
2021-11-30 08:36:14 -08:00
David Garske
d3d73f7a4e
Merge pull request #4614 from SparkiDev/sp_exp_nct
...
SP math all: fix exponent bit count
2021-11-30 08:26:41 -08:00
David Garske
37df78b082
Merge pull request #4615 from SparkiDev/mp_mulx
...
TFM: fix Intel MULX multiply
2021-11-30 08:26:17 -08:00
David Garske
5a55baddad
Merge pull request #4617 from SparkiDev/ecc_point_on_curve
...
ECC wc_ecc_point_is_on_curve: validate oridinates against prime
2021-11-30 08:25:47 -08:00
David Garske
7a41089b12
Merge pull request #4618 from douzzer/wc-port-h-linuxkm-XSNPRINTF-XATOI
...
linuxkm wc_port.h macro scoping fix
2021-11-30 08:25:06 -08:00
David Garske
78f4c84ee0
Merge pull request #4586 from SparkiDev/sp_gen_ecc_order
...
SP: fix range of k to be 1..n-1
2021-11-30 08:23:46 -08:00
Daniele Lacamera
c3b1d9f9e7
Cosmetic and prototypes changes after reviewer's comments
2021-11-30 10:06:54 +01:00
Takashi Kojo
6af38a9f5b
OpneSSL compat for SSL_read/write_early_data
2021-11-30 17:38:01 +09:00
Daniel Pouzzner
a33ae21801
whitespace cleanups and portability/pedantic fixes
2021-11-29 23:58:39 -06:00
Daniel Pouzzner
5fbdd2a2c0
wc_port.h: for linuxkm, move definitions of XSNPRINTF and XATOI macros outside the defined(BUILDING_WOLFSSL) gate, to prevent inclusion of stdio.h and stdlib.h from types.h when building application code.
2021-11-29 23:23:23 -06:00
Sean Parkinson
567cd155ea
ECC wc_ecc_point_is_on_curve: validate oridinates against prime
2021-11-30 14:17:41 +10:00
Sean Parkinson
a7d538a82f
SP math all: MIPS asm fix
...
Names $lo and $hi in register list are not supported with old GCC
compiler. Newer compiler also supports %lo and %hi.
2021-11-30 12:56:08 +10:00
Sean Parkinson
9f6fd6abf9
TFM: fix Intel MULX multiply
...
Carry wasn't being handled properly.
2021-11-30 12:07:44 +10:00
Sean Parkinson
e5e280b175
SP math all: fix exponent bit count
...
Only when using non-constant time implementation and modulus even.
2021-11-30 10:28:42 +10:00
Sean Parkinson
a3d46bee32
SP math all: div handling of length of dividend
...
Fail when dividend is maximum size as we may be shifting left and
overflow when divisor is not on a word boundary.
2021-11-30 09:46:11 +10:00
Jacob Barthelmeh
f7c34d22e6
add calls to user callback and adjust formating
2021-11-29 15:56:00 -07:00
Chris Conlon
7221e06ff7
Merge pull request #4588 from miyazakh/sce_protect_mode_e2studio
2021-11-29 15:32:48 -07:00
Chris Conlon
9e2e0c06dc
Merge pull request #4608 from miyazakh/esp_idf
...
Fix compile error on the latest ESP-IDF
2021-11-29 14:13:13 -07:00
David Garske
80c16745c4
Merge pull request #4602 from embhorn/zd13296
...
Initialize global in TSIP port
2021-11-29 13:01:03 -08:00
Anthony Hu
8a2945fe66
More braces.
2021-11-29 15:56:44 -05:00
Anthony Hu
5aa8bc2983
Drop a brace.
2021-11-29 15:47:53 -05:00
David Garske
c104ab2206
Merge pull request #4572 from SparkiDev/ecc_pub_decode
...
mp_sqrt: TonelliShanks algorithm doesn't handle zero
2021-11-29 12:27:36 -08:00
David Garske
c78256702d
Merge pull request #4604 from tmael/fix_cc_ecc
...
Fix Cryptocell ecc build
2021-11-29 11:01:33 -08:00
Daniele Lacamera
57fb5453cb
Support for HKDF Extract callback
2021-11-29 14:51:13 +01:00
Hideki Miyazaki
f6893789b9
add dummy_test_paths.h to include.am
2021-11-27 14:34:23 +09:00
Hideki Miyazaki
a25c338007
fix build failures
...
update README to follow the latest ESP-IDF
2021-11-27 13:14:36 +09:00
Anthony Hu
fea438d07f
Use wolfCrypt's benchmarking app to run the PQ algorithms.
2021-11-26 15:15:23 -05:00
Hideki Miyazaki
fb4e39f00a
addressed review comments prt1
2021-11-26 16:03:42 +09:00
Tesfa Mael
b2c0bacb06
Fix Cryptocell ecc
2021-11-24 19:22:40 -08:00
kareem-wolfssl
ae0cefc48d
Merge pull request #4603 from anhu/stop_OPENSSLEXTRA
...
Stop needlessly enabling ENABLED_OPENSSLEXTRA when enabling liboqs.
2021-11-24 13:46:31 -07:00
Anthony Hu
ffe7a84e3d
Stop needlessly enabling ENABLED_OPENSSLEXTRA when enabling liboqs.
2021-11-24 14:09:19 -05:00
Eric Blankenhorn
6d7e50d2ae
Initialize global in TSIP port
2021-11-24 09:22:14 -06:00
David Garske
be870e742d
Edge case build fixes (cert gen only).
2021-11-23 15:12:48 -08:00
David Garske
7396a0cb3a
Resolves all peer review comments. Fixes to get Curve25519 working on real hardware. Regression testing fixes for ECC.
2021-11-23 15:03:53 -08:00
David Garske
7524ededd3
Support for Custom OID in subject and CSR request extension:
...
* Adds new build option `WOLFSSL_CUSTOM_OID` for supplying a custom OID in a CSR
* Fixes in ASN template CSR generation.
* Fix to allow calling `wc_Ed25519PublicKeyToDer` and `wc_Ed448PublicKeyToDer` with NULL output buffer to get length only.
* Refactor of the certificate subject name encoding.
* Refactor of the OID's to consolidate.
* Improvements to the Domain Component API unit test.
ZD 12943
2021-11-23 09:51:13 -08:00
David Garske
dcc2a2852c
Merge pull request #4590 from JacobBarthelmeh/fuzzing
...
sanity check on pem size
2021-11-22 16:09:13 -08:00
David Garske
f5239cc57e
Merge pull request #4597 from cconlon/removeSwig
...
Remove swig wrapper
2021-11-22 15:31:40 -08:00
David Garske
23e722be27
Merge pull request #4595 from masap/fix-linuxkm
...
Fix failure of make distclean when linuxkm is enabled
2021-11-22 12:01:21 -08:00
Chris Conlon
84be329ffb
remove swig wrapper, now that we have dedicated Java and Python wrappers
2021-11-22 11:32:37 -07:00
Hideki Miyazaki
89ed811e23
fix compile error when disabled SCEPROTECT
2021-11-22 21:36:02 +09:00
Juliusz Sosinowicz
0de4136ad6
Rebase fixes
2021-11-22 13:10:55 +01:00
Juliusz Sosinowicz
5fc2dadde1
Fix issue in wolfSSL_BN_rand_range causing random errors
2021-11-22 11:48:31 +01:00
Juliusz Sosinowicz
1d7b2de074
Code review changes
2021-11-22 11:48:31 +01:00
Juliusz Sosinowicz
3da810cb1b
Implement OpenSSL API's
...
- `OBJ_DUP`
- `i2d_PKCS7`
- `BN_rshift1
- `BN_rshift` testing
- Add `--enable-krb`
2021-11-22 11:47:58 +01:00
Juliusz Sosinowicz
e7c5f137be
Implement BN_rand_range
2021-11-22 11:45:27 +01:00
Juliusz Sosinowicz
82a9f74476
Compat updates
...
- implement `wolfSSL_PEM_X509_INFO_read`
- `wolfSSL_EVP_CipherUpdate` no-ops on `NULL` input
- add md4 support to `wolfSSL_EVP_MD_block_size` and `wolfSSL_EVP_MD_size`
2021-11-22 11:45:27 +01:00
Juliusz Sosinowicz
ccbe184434
Implement CTS
...
Ciphertext stealing on top of CBC is implemented with `wolfSSL_CRYPTO_cts128_encrypt` and `wolfSSL_CRYPTO_cts128_decrypt` APIs
2021-11-22 11:45:27 +01:00
Juliusz Sosinowicz
fa662c2ab1
AES_cbc_encrypt enc parameter flipped. 1 = encrypt 0 = decrypt
...
This change makes the `enc` parameter of `AES_cbc_encrypt` consistent with OpenSSL. This commit flips the meaning of this parameter now.
2021-11-22 11:45:27 +01:00
Masashi Honma
ace5d444a4
Fix failure of make distclean when linuxkm is enabled
...
$ make distclean
Making distclean in linuxkm
make[1]: Entering directory '/home/honma/git/wolfssl/linuxkm'
make[1]: *** No rule to make target 'distclean'. Stop.
make[1]: Leaving directory '/home/honma/git/wolfssl/linuxkm'
make: *** [Makefile:6431: distclean-recursive] Error 1
Signed-off-by: Masashi Honma <masashi.honma@gmail.com >
2021-11-22 05:50:38 +09:00
Masashi Honma
30a01a0758
Fix failure of check at commiting when linuxkm is enabled
...
Making check in linuxkm
make[2]: Entering directory '/home/honma/git/wolfssl/linuxkm'
make[2]: warning: -j13 forced in submake: resetting jobserver mode.
make[2]: *** No rule to make target 'check'. Stop.
make[2]: Leaving directory '/home/honma/git/wolfssl/linuxkm'
make[1]: *** [Makefile:6431: check-recursive] Error 1
make[1]: Leaving directory '/home/honma/git/wolfssl'
make: *** [Makefile:6901: check] Error 2
Signed-off-by: Masashi Honma <masashi.honma@gmail.com >
2021-11-22 05:50:38 +09:00
Hideki Miyazaki
82eb23b300
addressed jenkins failures
2021-11-20 10:15:57 +09:00
David Garske
5182e2a8c8
Merge pull request #4580 from kareem-wolfssl/minor_fixes
...
Check ssl->arrays in SendClientHello to avoid null dereference. Allow building with fallthrough defined.
2021-11-19 16:55:01 -08:00
Hideki Miyazaki
d00c7641ae
addressed jenkins failure
2021-11-20 09:14:21 +09:00
David Garske
f6c48bf7dc
Merge pull request #4560 from kaleb-himes/OE30-OE31-non-fips-changes
...
OE30 and OE31 changes external to FIPS module for NetBSD builds
2021-11-19 15:49:30 -08:00
David Garske
34346bab4f
Merge pull request #4579 from JacobBarthelmeh/PKCS7
...
BER size adjustment with PKCS7
2021-11-19 14:49:03 -08:00
Kareem
8de281c1d4
Fix minimum clang version for FALL_THROUGH. Not working properly before clang 11.
2021-11-19 15:16:56 -07:00
David Garske
617668b9aa
Merge pull request #4585 from kareem-wolfssl/encryptMacFix
...
Fix building Import/ExportOptions with HAVE_ENCRYPT_THEN_MAC undefined.
2021-11-19 13:45:16 -08:00
Kareem
fd6d479888
Rework ssl and ssl->arrays NULL checks, and add to SendTls13ClientHello as well.
2021-11-19 14:19:27 -07:00
Kareem
72d4dcce0f
Fix updated FALL_THROUGH macro. Fix a couple of case statements and remove a trailing whitespace.
2021-11-19 14:13:02 -07:00
Kareem
0772635972
Rework FALL_THROUGH definition to use fallthrough if defined.
2021-11-19 14:06:54 -07:00
Kareem
930e1ac473
Check ssl->arrays in SendClientHello to avoid null dereference. Allow building with fallthrough defined.
2021-11-19 14:06:54 -07:00
Jacob Barthelmeh
5d49847147
sanity check on pem size
2021-11-19 13:55:03 -07:00
Chris Conlon
c3500fa24e
Merge pull request #4581 from miyazakh/max_earlydata
...
add get_max_eraly_data
2021-11-19 09:42:01 -07:00
Sean Parkinson
5a72fee3df
Disable algorithms: fixes
...
WOLFSSL_PUBLIC_MP and disable algorithms didn't work because of api.c.
- mp_cond_copy not available unless ECC compiled in
- wc_export_int not available unless ECC compiled in
Enabling only DH and using SP with SP Math didn't work as the DH
parameters were too small.
sp_cmp is needed when only DH.
mp_set_int is was not available in SP math when RSA is not defined.
mp_set is close enough for the use cases.
Configure with SP and SP math but not RSA, DH and ECC didn't configure -
now default to small maths.
2021-11-19 16:56:33 +10:00
Hideki Miyazaki
9a331d7072
update Readme
2021-11-19 15:35:06 +09:00
JacobBarthelmeh
7e2fab6f4a
warning with keil build and native lwip want read case
2021-11-18 22:58:50 -07:00
Hideki Miyazaki
c84194ffc8
include renesas_cmn.h to am file
2021-11-19 14:44:45 +09:00
Hideki Miyazaki
f50fcd918e
support Renesas RA SCE protect mode on RA6M4 evaluation board
2021-11-19 14:22:16 +09:00
Sean Parkinson
7e81372131
Merge pull request #4583 from dgarske/zd13242
...
Improve `ret` handling in the `ProcessPeerCerts` verify step.
2021-11-19 10:22:08 +10:00
Sean Parkinson
af097401f2
SP: fix range of k to be 1..n-1
...
Was checking less than order - 2 then adding one.
i.e. 0..order-3 => 1..order-2
2021-11-19 09:40:26 +10:00
Kareem
757f3b8105
Fix building Import/ExportOptions with HAVE_ENCRYPT_THEN_MAC undefined.
2021-11-18 16:06:22 -07:00
David Garske
3054f20c6a
Improve ret handling in the ProcessPeerCerts verify step.
2021-11-18 14:51:09 -08:00
David Garske
2841b5c93b
Merge pull request #3010 from kaleb-himes/ZD10203
...
Consistency in PP checking on use of WOLFSSL_CRYPTO_EX_DATA
2021-11-18 14:47:25 -08:00
Hideki Miyazaki
9bc159a5ec
addressed review comment
2021-11-19 07:24:46 +09:00
kaleb-himes
4324cf8f0a
Correct cast from uint to uchar
2021-11-18 10:18:25 -07:00
Ethan
5a85d63543
Added curve25519 support for NXP SE050
...
Reverted commented out lines from se050_port.h
2021-11-18 09:23:59 -07:00
David Garske
e33156d0dc
Merge pull request #4578 from kaleb-himes/OE33_NON_FIPS_CHANGES
...
OE33: Fix issues found by XCODE and add user_settings.h
2021-11-18 06:59:43 -08:00
David Garske
d02e819e4c
Merge pull request #4575 from SparkiDev/dh_enc_fix_2
...
ASN: DH private key encoding
2021-11-18 06:57:40 -08:00
Sean Parkinson
618b9619c5
Merge pull request #4571 from anhu/init_sig_algs
...
Uninitialized var.
2021-11-18 22:46:37 +10:00
Sean Parkinson
db3c0f7829
Merge pull request #4574 from masap/fix-asn1-integer-get
...
Fix invalid return value of ASN1_INTEGER_get()
2021-11-18 17:20:15 +10:00
Hideki Miyazaki
483be08b1f
add definition for early_data_status compat
2021-11-18 14:21:47 +09:00
Daniel Pouzzner
6ba00f66cd
Merge pull request #4573 from ejohnstown/fips-check-fix
...
Fix FIPS Check Script
2021-11-17 21:30:45 -06:00
JacobBarthelmeh
b42a0d9712
native lwip update
2021-11-17 17:36:44 -07:00
Hideki Miyazaki
7da0d524ff
add get_max_eraly_data
...
support set/get_max_eraly_data compatibility layer
2021-11-18 09:07:32 +09:00
Sean Parkinson
370570d19b
ASN: DH private key encoding
...
Proper fix for sequence length when small keys.
2021-11-18 08:28:49 +10:00
Masashi Honma
4800db1f9d
Enable max/min int test even when non 64bit platform
...
Signed-off-by: Masashi Honma <masashi.honma@gmail.com >
2021-11-18 06:58:21 +09:00
Masashi Honma
cb3fc0c7ce
Fix invalid return value of ASN1_INTEGER_get()
...
When DIGIT_BIT is less than SIZEOF_LONG * CHAR_BIT, ASN1_INTEGER_get() can
return invalid value. For example, with trailing program, ASN1_INTEGER_get()
unexpectedly returns -268435449 (0xf0000007) on i386.
On the i386 platform (DIGIT_BIT=28), the input value 0x7fffffff is separated
into 0xfffffff and 0x7 and stored in the dp array of mp_int. Previously,
wolfSSL_BN_get_word_1() returned 0xfffffff shifted by 28 bits plus 0x7, so this
patch fixed it to return 0xfffffff plus 0x7 shifted by 28 bits.
int main(void)
{
ASN1_INTEGER *a;
long val;
int ret;
a = ASN1_INTEGER_new();
val = 0x7fffffff;
ret = ASN1_INTEGER_set(a, val);
if (ret != 1) {
printf("ret=%d\n", ret);
}
if (ASN1_INTEGER_get(a) != val) {
printf("ASN1_INTEGER_get=%ld\n", ASN1_INTEGER_get(a));
}
ASN1_INTEGER_free(a);
return 0;
}
Signed-off-by: Masashi Honma <masashi.honma@gmail.com >
2021-11-18 06:58:21 +09:00
Anthony Hu
ab0654bb64
remove something that slipped in
2021-11-17 16:38:30 -05:00
Anthony Hu
39edf8d206
pulled up a line.
2021-11-17 16:38:30 -05:00
Anthony Hu
49c7abb875
Changes suggested by SparkiDev.
2021-11-17 16:38:30 -05:00
Anthony Hu
5c48e74c7f
0xFF
2021-11-17 16:38:30 -05:00
Anthony Hu
0ae0b31509
The following config:
...
./configure --with-liboqs --enable-all --disable-psk --enable-intelasm --enable-aesni --enable-sp-math-all --enable-sp-asm CFLAGS="-O3"
Yeilds the following erorr:
src/internal.c: In function ‘DoServerKeyExchange’:
src/internal.c:24487:28: error: ‘sigAlgo’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
24487 | if (sigAlgo == ed448_sa_algo &&
| ^
This fixes it.
2021-11-17 16:38:30 -05:00
kaleb-himes
38ec0bb31f
Merge branch 'master' of github.com:wolfssl/wolfssl into OE33_NON_FIPS_CHANGES
2021-11-17 14:02:56 -07:00
David Garske
995ef60ff1
Merge pull request #4577 from kaleb-himes/WINDOWS_AES_OFB_ON
...
Turn on AES-OFB mode in windows for FIPS=v5
2021-11-17 12:20:19 -08:00
kaleb-himes
37db5a9ab3
Add include.am(s) for new file(s)
2021-11-17 12:05:05 -07:00
Jacob Barthelmeh
ddf06b8161
BER size adjustment with PKCS7
2021-11-17 12:03:32 -07:00
kaleb-himes
f638df3575
Fix issues found by XCODE and add user_settings.h
...
Disable internal test settings by default
2021-11-17 11:00:56 -07:00
John Safranek
ef62fab4ea
Update
...
1. WIN10 FIPS build should use version 5,2 now.
2. Update the v5-ready build ot use version 5,2.
3. Remove eol-whitespace from the benchmark source.
2021-11-17 09:19:34 -08:00
Kaleb Himes
c7c682ba2a
Move up to avoid breaking the patch applied for windows
2021-11-17 09:37:26 -07:00
kaleb-himes
dc6ec2b849
Turn on AES-OFB mode in windows for FIPS=v5
2021-11-17 09:22:58 -07:00
John Safranek
158ebcaa0a
Add v5-RC10 to the list of allowed versions
2021-11-16 16:36:38 -08:00
Sean Parkinson
a5e581506e
Merge pull request #4570 from dgarske/android_keystore
...
Fixes for building wolfSSL with Android WPA Supplicant and KeyStore
2021-11-17 08:30:01 +10:00
David Garske
e8e0bc0d49
Merge pull request #4552 from SparkiDev/sp_mod_exp_zero
...
SP: mod_exp with exponent of 0 is invalid
2021-11-16 08:29:13 -08:00
David Garske
2b3ab855dd
Fixes for building wolfSSL with Android WPA Supplicant and KeyStore.
2021-11-16 08:27:30 -08:00
Sean Parkinson
33a6b8c779
Merge pull request #4531 from dgarske/cryptocb_aesccm
...
Added crypto callback support for AES CCM
2021-11-16 22:45:11 +10:00
Daniel Pouzzner
ceae7d56fa
Merge pull request #4551 from ejohnstown/aes-ofb
...
Add AES-OFB to FIPS boundary
2021-11-15 22:56:43 -06:00
Daniel Pouzzner
cae3fcb9ce
Merge pull request #4569 from masap/i386-segfault
...
dsa.c: fix error-path mp_clear()s on uninitialized mp_ints in wc_DsaSign() and wc_DsaVerify().
2021-11-15 22:51:23 -06:00
Sean Parkinson
8606788198
SP: mod_exp with exponent of 0 is invalid
...
Don't allow exponenetiation by 0 as it is cryptographically invalid and
not supported by the implementation.
Also check for even modulus in mod_exp.
2021-11-16 11:27:26 +10:00
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
David Garske
1559e92dca
Add crypto callback AES CCM test case.
2021-11-15 16:22:10 -08:00
Sean Parkinson
d3fc8c229a
mp_sqrt: TonelliShanks algorithm doesn't handle zero
...
(0 * 0) mod p = 0.
Modular reduce n and shortcut when 0.
2021-11-16 09:23:07 +10: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
Daniel Pouzzner
c80e63a822
Merge pull request #4566 from ejohnstown/fips-check
...
fips-check script update
2021-11-15 13:23:54 -06:00
John Safranek
13871cf547
Set RC10 to be the default v5 FIPS build.
2021-11-15 10:03:50 -08:00
John Safranek
0d465cf42f
Add AES-OFB to FIPSv5 build as v5-RC10 (5,2)
2021-11-15 10:03:49 -08:00
David Garske
ab74bbcfee
Merge pull request #4567 from SparkiDev/sp_scripts_sync_1
...
SP sync: Missing update
2021-11-15 07:04:08 -08:00
Sean Parkinson
79f18c7585
SP sync: Missing update
2021-11-15 08:33:14 +10:00
Sean Parkinson
d6219567c1
Merge pull request #4565 from dgarske/spelling
...
Fixes for spelling errors
2021-11-15 08:20:41 +10:00
John Safranek
3384159cb9
Add WCv5.0-RC10 to fips-check script. Remove some new whitespace from sniffer.
2021-11-12 14:10:58 -08:00
David Garske
25054bd87f
Merge pull request #4538 from julek-wolfssl/sk_free-refactor
...
Refactor sk_*_free functions and stack type
2021-11-12 10:30:14 -08:00
David Garske
a626a4fb02
Fixes for spelling errors.
2021-11-12 10:27:49 -08:00
David Garske
600d562168
Merge pull request #4558 from anhu/falcon_bench
...
Add Falcon benchmarking.
2021-11-12 09:14:08 -08:00
Juliusz Sosinowicz
4112cd4b99
Make stack type an enum
2021-11-12 14:48:17 +01:00
Juliusz Sosinowicz
361975abbc
Refactor sk_*_free functions
...
Use a single `wolfSSL_sk_pop_free` and `wolfSSL_sk_free` function that free's the stack and optionally free's the node content as well.
2021-11-12 13:55:37 +01:00
kaleb-himes
6547bcb44c
Consistency in PP checking on use of WOLFSSL_CRYPTO_EX_DATA
2021-11-11 17:47:17 -07:00
John Safranek
2501aef34e
Merge pull request #4562 from SparkiDev/cert_suite_check
2021-11-11 15:36:12 -08:00
John Safranek
af67692e4a
Merge pull request #4559 from dgarske/sniffer_ht
2021-11-11 14:44:01 -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
Sean Parkinson
b5fd899113
TLS 1.2: check signature algo in ServerKeyExchange
2021-11-11 18:54:30 +10: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
David Garske
607a3bfaa7
Merge pull request #4554 from SparkiDev/mp_test_32bit
...
mp_test: when SP_INT_DIGITS is even calc was wrong
2021-11-10 15:07:43 -08:00
David Garske
3c1deff611
Fix falcon bench cleanup case (should not free if init fails). Fix RSA key gen keySz with ./wolfcrypt/benchmark/benchmark -asym.
2021-11-10 15:03:44 -08:00
Anthony Hu
f2465e5688
include.am
2021-11-10 18:01:40 -05:00
Anthony Hu
242847760a
More appropriate file names.
2021-11-10 17:55:46 -05:00
Anthony Hu
453404a864
Get the falcon keys into wolfssl/certs_test.h
2021-11-10 17:33:24 -05:00
kaleb-himes
6bb86cf4da
OE30 and OE31 changes external to FIPS module for NetBSD builds
2021-11-10 15:16:21 -07:00
Anthony Hu
5fe078d7db
sig1, sig5 --> sig
2021-11-10 16:52:05 -05:00
Anthony Hu
246d470956
Refactor to do proper memory management.
2021-11-10 16:42:48 -05:00
David Garske
1cadf88f26
Fixes for sniffer and handling of out-of-order situations that can occur with a saturated link.
2021-11-10 13:37:21 -08:00
Anthony Hu
6165323829
Satisfy a jenkins test.
2021-11-10 15:29:09 -05:00
Anthony Hu
237b098ba5
Add Falcon benchmarking.
2021-11-10 14:53:35 -05:00
David Garske
b2ba6f94af
Merge pull request #4557 from LinuxJedi/doxygen-fixes
...
Fix up some Doxygen issues for 1.9
2021-11-10 11:29:47 -08:00
Andrew Hutchings
231546dacc
Fix more Doxygen typos
2021-11-10 17:26:33 +00:00
Andrew Hutchings
afe8d74333
Fix up some Doxygen issues for 1.9
...
Some of the Doxygen content was not processed correctly by Doxygen.
This patch fixes all the issues found.
2021-11-10 16:20:13 +00:00
Daniel Pouzzner
6d55f8e42a
ssl.c: fixes for C++ pointer type hygiene.
2021-11-09 22:41:06 -06:00
Daniel Pouzzner
ed0418c2a8
fix whitespace.
2021-11-09 22:17:38 -06:00
Daniel Pouzzner
313d29f752
linuxkm: in module_hooks.c, refactor WOLFSSL_LINUXKM_SIMD_X86_IRQ_ALLOWED gates to WOLFSSL_LINUXKM_SIMD_X86, and add updateFipsHash().
2021-11-09 22:02:17 -06:00
Sean Parkinson
341bd7bbbc
mp_test: when SP_INT_DIGITS is even calc was wrong
2021-11-10 09:33:14 +10: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
bd0f6736c5
Merge pull request #4513 from masap/wpa_sup_dpp
...
Fix X509_PUBKEY_set() to show correct algorithm and parameters
2021-11-09 10:26:59 -08:00
David Garske
fe172ed9c1
Fix for generation of ephemeral key if static ephemeral is not set.
2021-11-09 10:14:23 -08:00
David Garske
eebed0cc1c
Fix for possible ret may be used uninitialized.
2021-11-09 08:27:44 -08:00
David Garske
df82b01e68
Added x448 static ephemeral support.
2021-11-09 08:27:42 -08:00
David Garske
e91439f2eb
Fixes for static ephemeral key support with threading and possible use after free.
2021-11-09 08:25:47 -08:00
David Garske
4a04e56ac8
Fix to allow calls to get TLS session random even if wolfSSL_KeepArrays has not been called.
2021-11-09 08:23:19 -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
Sean Parkinson
ff3179012d
SP: fix when mont_mul_order is defined
...
Customer configuration that failed:
./configure --enable-cryptonly --enable-ecc --enable-sp=yes,asm
--disable-rsa --disable-dh --disable-sha3 --disable-sha224 --disable-md5
--disable-sha --disable-pkcs12 --disable-memory --disable-chacha
--disable-poly1305 --disable-sha512 --disable-sha384 --disable-aesgcm
--disable-aescbc --disable-aes --disable-rng CFLAGS="-DNO_SIG_WRAPPER
-DWOLFSSL_PUBLIC_MP -DECC_USER_CURVES -DNO_ECC_SIGN -DNO_ECC_DHE
-DNO_ECC_KEY_EXPORT"
2021-11-09 17:50:21 +10:00
David Garske
1d9832c0de
Merge pull request #4545 from douzzer/misc-fixes-20211105
...
global typographic and file mode fixes
2021-11-08 20:54:20 -08:00
Daniel Pouzzner
97557ed29b
linuxkm: add --enable-benchmark switch (default yes) and BUILD_BENCHMARK conditional to configure.ac to allow build with testwolfcrypt but without benchmark; change gate in wolfcrypt/benchmark/include.am from if !BUILD_LINUXKM to if BUILD_BENCHMARK.
2021-11-08 18:25:15 -06:00
Daniel Pouzzner
03d5c4e6d3
test.c: fix whitespace.
2021-11-08 18:24:42 -06:00
Daniel Pouzzner
18e487069b
src/internal.c: fix typo introduced in earlier "typographic cleanup".
2021-11-08 18:24:08 -06:00
Daniel Pouzzner
95bed1cdfd
test.c: smallstack refactors for idea_test(), ed448_test(), and verifyBundle() (fixes various error-dependent leaks too).
2021-11-08 17:35:10 -06:00
Daniel Pouzzner
25f74d4967
ssl.c: wolfSSL_UseALPN(): allocate char **token (2kB) on the heap, not the stack.
2021-11-08 17:35:10 -06:00
Daniel Pouzzner
f8565f26e2
fixes for --disable-harden.
2021-11-08 17:35:10 -06:00
Daniel Pouzzner
27d4bb304c
test.c add smallstack refactor of pkcs7enveloped_run_vectors().
2021-11-08 17:35:10 -06:00
Daniel Pouzzner
26cc534dd2
wolfcrypt/test/test.c: fix memory leaks in pkcs7signed_run_[SingleShot]Vectors() added in smallstack refactor.
2021-11-08 17:35:10 -06:00
Daniel Pouzzner
11ffb037ba
linuxkm/module_exports.c.template: remove accidentally added MSC clause.
2021-11-08 17:35:10 -06:00
Daniel Pouzzner
beebd1411d
linuxkm/module_hooks.c: fix whitespace, and update code around WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE and updateFipsHash().
2021-11-08 17:35:10 -06:00
Daniel Pouzzner
8b3048a0ea
wolfcrypt/test/test.c: smallstack refactors for pkcs7authenveloped_run_vectors(), pkcs7signed_run_vectors(), and pkcs7signed_run_SingleShotVectors(); typographic&whitespace cleanup.
2021-11-08 17:35:10 -06:00
Daniel Pouzzner
59ec9fc285
configure.ac: refactor setup for --enable-reproducible-build; remove mutex between --enable-sp-math and --enable-sp-math-all (they can now coexist); whitespace cleanup.
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
Daniel Pouzzner
8f121e7752
file modes: clear inappropriate executable bits.
2021-11-08 17:28:11 -06: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
Masashi Honma
ee39fd079f
Fix X509_PUBKEY_set() to show correct algorithm and parameters
...
When build with OpenSSL, trailing program outputs these messages.
algorithm: id-ecPublicKey
parameters: prime256v1
But with wolfSSL, X509_PUBKEY_get0_param() fails.
This patch fixes wolfSSL to display the same values as OpenSSL.
This program was extracted from wpa_supplicant in order to reproduce the
issue.
----------------
int main(void)
{
EVP_PKEY *pkey;
X509_PUBKEY *pub = NULL;
ASN1_OBJECT *ppkalg, *poid;
const ASN1_OBJECT *pa_oid;
const uint8_t *pk;
int ppklen, ptype;
X509_ALGOR *pa;
void *pval;
char buf[100];
const uint8_t data[] = {
0x30, 0x39, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a,
0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x22, 0x00, 0x03, 0x33, 0x6d, 0xb4, 0xe9, 0xab,
0xf1, 0x1c, 0x96, 0x87, 0x5e, 0x02, 0xcc, 0x92, 0xaf, 0xf6, 0xe1, 0xed, 0x2b, 0xb2, 0xb7, 0xcc,
0x3f, 0xd2, 0xb5, 0x4e, 0x6f, 0x20, 0xc7, 0xea, 0x2f, 0x3f, 0x42
};
size_t data_len = sizeof(data);
const uint8_t *p;
int res;
p = data;
pkey = d2i_PUBKEY(NULL, &p, data_len);
if (!pkey) {
fprintf(stderr, "d2i_PUBKEY() failed\n");
return -1;
}
if (EVP_PKEY_type(EVP_PKEY_id(pkey)) != EVP_PKEY_EC) {
fprintf(stderr, "invalid type\n");
EVP_PKEY_free(pkey);
return -1;
}
res = X509_PUBKEY_set(&pub, pkey);
if (res != 1) {
fprintf(stderr, "X509_PUBKEY_set() failed\n");
return -1;
}
res = X509_PUBKEY_get0_param(&ppkalg, &pk, &ppklen, &pa, pub);
if (res != 1) {
fprintf(stderr, "X509_PUBKEY_get0_param() failed\n");
return -1;
}
res = OBJ_obj2txt(buf, sizeof(buf), ppkalg, 0);
if (res < 0 || (size_t) res >= sizeof(buf)) {
fprintf(stderr, "OBJ_obj2txt() failed\n");
return -1;
}
fprintf(stdout, "algorithm: %s\n", buf);
X509_ALGOR_get0(&pa_oid, &ptype, (void *) &pval, pa);
if (ptype != V_ASN1_OBJECT) {
fprintf(stderr, "X509_ALGOR_get0() failed\n");
return -1;
}
poid = pval;
res = OBJ_obj2txt(buf, sizeof(buf), poid, 0);
if (res < 0 || (size_t) res >= sizeof(buf)) {
fprintf(stderr, "OBJ_obj2txt() failed\n");
return -1;
}
fprintf(stdout, "parameters: %s\n", buf);
X509_PUBKEY_free(pub);
EVP_PKEY_free(pkey);
return 0;
}
Signed-off-by: Masashi Honma <masashi.honma@gmail.com >
2021-11-09 07:30:58 +09:00
David Garske
4453001fac
Merge pull request #4550 from kareem-wolfssl/gh4547
...
Fix doAsync warning in bench_ecc.
2021-11-08 13:24:18 -08:00
David Garske
478f57b347
Merge pull request #4535 from kareem-wolfssl/zd13165
...
Fix building with NO_ECC_KEY_EXPORT.
2021-11-08 11:11:53 -08:00
David Garske
67a11df15b
Merge pull request #4548 from anhu/TlS
...
Fix capitalization.
2021-11-08 11:07:00 -08:00
Kareem
2f1a37769e
Fix doAsync warning in bench_ecc.
2021-11-08 11:42:05 -07:00
Anthony Hu
a28e44730c
Fix capitalization.
2021-11-08 11:45:49 -05:00
David Garske
3a9be7373f
Merge pull request #4532 from embhorn/zd13139
...
Fix mem leak in HandleTlsResumption
2021-11-08 08:39:45 -08: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
Kaleb Himes
ba291b519d
Merge pull request #4543 from julek-wolfssl/server-echo-return
...
Check correct var for `server.c` echo return.
2021-11-05 11:26:15 -06:00
Eric Blankenhorn
d6264059ac
Fix mem leak in HandleTlsResumption
2021-11-05 11:40:40 -05:00
David Garske
e9aa76b34e
Merge pull request #4542 from SparkiDev/dh_enc_fix
...
DH encoding: use correct length for inner sequence
2021-11-05 08:50:43 -07:00
David Garske
4fe17cc143
Merge pull request #4527 from julek-wolfssl/zd13097
...
Fix a heap buffer overflow with mismatched PEM structure ZD13097
2021-11-05 08:50:28 -07:00
David Garske
7fca031346
Remove duplicate code in wc_HmacFree (looks like past merge error).
2021-11-05 08:20:39 -07:00
Juliusz Sosinowicz
6d89de4f11
Check correct var for server.c echo return.
2021-11-05 16:10:17 +01: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
Chris Conlon
ae84a2a326
Merge pull request #4293 from TakayukiMatsuo/set_min_proto
...
Add support for value zero as version parameter for SSL_CTX_set_min/max_proto_version
2021-11-04 14:59:34 -06:00
David Garske
74a32e92eb
Rename the internal "Hash" structure used by Hmac as it is too generic.
2021-11-04 11:56:00 -07:00
David Garske
d8faa22194
Fix for ecc_def_curve_test test changes.
2021-11-04 11:54:09 -07:00
David Garske
16afe7ff87
Merge pull request #4540 from anhu/forLealem
...
Changes suggest by Lealem after he tried the instructions.
2021-11-04 11:44:18 -07:00
Anthony Hu
6f9e501f45
Changes suggest by Lealem after he tried the instructions.
2021-11-04 11:00:18 -04:00
Juliusz Sosinowicz
1faa9e66b6
Check wolfSSL_BIO_read return
2021-11-04 15:34:33 +01:00
Kareem
60a86157c7
Fix building with NO_ECC_KEY_EXPORT.
2021-11-03 16:03:26 -07:00
Jacob Barthelmeh
ca72beb688
check size of values with sp_gcd
2021-11-03 16:56:45 -06:00
Sean Parkinson
8f7df68869
Merge pull request #4533 from JacobBarthelmeh/Testing
...
additional checks on fp montgomery return value
2021-11-04 08:36:27 +10: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
d24bfb6bf7
Merge pull request #4530 from anhu/falcon-pqsig
...
The NIST round 3 Falcon Signature Scheme integration.
2021-11-03 09:35:01 -07: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
Anthony Hu
dbe3e550b0
Correct the directory to pq in reference to wolfssl-examples
2021-11-02 15:35:39 -04: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
04f27551aa
Some more sensible constants.
2021-11-02 14:59:31 -04:00
David Garske
82c106be80
Added crypto callback support for AES CCM.
2021-11-02 09:53:55 -07:00
David Garske
945e4a0885
Merge pull request #4529 from anhu/disable_dh
...
Fix for being able to build with LIBOQS but without DH
2021-11-02 08:54:40 -07:00
David Garske
b652d2e631
Merge pull request #4524 from JacobBarthelmeh/Release
...
bump to dev version and touch up readme
2021-11-02 08:54:14 -07:00
Anthony Hu
81def76b18
The NIST round 3 Falcon Signature Scheme integration.
2021-11-02 11:12:10 -04:00
Anthony Hu
e1cc1e831e
Fix for being able to build with LIBOQS but without DH
...
The following configuration yielded a compile error:
./configure --with-liboqs --disable-dh
This fixes bug reported on ZD13028.
2021-11-02 10:16:38 -04:00
Juliusz Sosinowicz
23487a4532
Fix a heap buffer overflow with mismatched PEM structure ZD13097
2021-11-02 11:31:22 +01:00
Sean Parkinson
2745f394e5
Merge pull request #4525 from cconlon/sslopno
...
TLS 1.3: check SSL_OP_NO_TLSv1_2 in TLS 1.3 clients
2021-11-02 09:40:59 +10:00
Jacob Barthelmeh
ac5e9e5e7c
bump to dev version and touch up readme
2021-11-01 15:50:03 -06:00
David Garske
7e01af0121
Merge pull request #4521 from JacobBarthelmeh/Release
...
prepare for release v5.0.0
2021-11-01 12:45:22 -07:00
Jacob Barthelmeh
7c3d1c7fbc
update rpm spec
2021-11-01 12:24:53 -06:00
Jacob Barthelmeh
44219906e0
add kdf.c to cs+ project
2021-11-01 12:02:53 -06:00
Daniel Pouzzner
6f18ba15b0
linuxkm: accommodate printk()->_printk() renaming in kernel 5.15+.
2021-11-01 11:49:56 -06:00
Daniel Pouzzner
742492cb5e
linuxkm/Makefile: fix module sign-file error handling.
2021-11-01 11:49:48 -06:00
Jacob Barthelmeh
d869c60605
prepare for release v5.0.0
2021-11-01 11:43:25 -06: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
Jacob Barthelmeh
fb7baf28ca
fix for xcode build and revert cmake change
2021-10-29 16:55:05 -06:00
Daniel Pouzzner
6ba55edd50
fix async warnings
2021-10-29 14:37:39 -06:00
Jacob Barthelmeh
1d91ccb41b
remove exe bit on example.c and server.c
2021-10-29 13:12:43 -06:00
Jacob Barthelmeh
03bc45c5b1
check if private key exists before using with private key check function
2021-10-29 10:51:24 -06:00
David Garske
5ad580b233
Merge pull request #4517 from elms/cmake/kdf
...
cmake: Add `kdf.c` and `FIPS_V5`
2021-10-29 09:29:23 -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
Elms
49389f3074
cmake: Add kdf.c and FIPS_V5
2021-10-28 16:50:15 -07: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
Chris Conlon
afad1374a3
check SSL_OP_NO_TLSv1_2 in TLS 1.3 enabled client
2021-10-28 16:30:02 -06:00
Jacob Barthelmeh
e10e3a92b8
add kdf.c to cmake build
2021-10-28 16:27:45 -06:00
Jacob Barthelmeh
9ec9ace7ea
adding kdf.c to IDE builds
2021-10-28 16:19:18 -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
David Garske
0a26335243
Merge pull request #4446 from ejohnstown/dtls-sizing
...
DTLS Sizing
2021-10-28 14:15:36 -07:00
David Garske
2c42770eea
Merge pull request #4508 from elms/cmake/tlsx
...
cmake: add SNI and TLSx
2021-10-28 14:03:59 -07:00
Juliusz Sosinowicz
9c8e4f558c
Explicit cast to int
2021-10-28 21:05:19 +02:00
Juliusz Sosinowicz
adee6a86d1
Return the close notify error when expecting an error.
2021-10-28 20:53:58 +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
David Garske
e4e6242fde
Merge pull request #4514 from SparkiDev/zephyr_fix_2
...
Fixes for Zephyr OS
2021-10-28 07:52:32 -07:00
Juliusz Sosinowicz
8cba5dda17
Need to free x509 in tests
2021-10-28 14:50:53 +02:00
Juliusz Sosinowicz
a738c16b2f
Can't have macros within macros
2021-10-28 14:50:53 +02:00
Juliusz Sosinowicz
7d6f8ea255
Update wrong email in gen script
2021-10-28 14:50:53 +02: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
Juliusz Sosinowicz
842dba7946
Put address and postal code in WOLFSSL_CERT_EXT
2021-10-28 14:50:53 +02:00
Juliusz Sosinowicz
2531cd961f
Code review fixes
2021-10-28 14:50:53 +02:00
Juliusz Sosinowicz
d9af698aa4
Implement raw AKID with WOLFSSL_ASN_TEMPLATE
2021-10-28 14:50:53 +02:00
Juliusz Sosinowicz
c162196b27
Add x509 name attributes and extensions to DER parsing and generation
...
- Postal Code
- Street Address
- External Key Usage
- Netscape Certificate Type
- CRL Distribution Points
- Storing full Authority Key Identifier information
- Add new certificates to `certs/test` for testing
- Update WOLFSSL_ASN_TEMPLATE to match new features
2021-10-28 14:50:53 +02:00
Juliusz Sosinowicz
894303be59
Make the wolfSSL_GetMaxFragSize parameter meaning consistent
...
- Add testing for sending as much app data as possible in a single DTLS record
2021-10-28 14:46:15 +02:00
Sean Parkinson
623a84ed7b
Fixes for Zephyr OS
...
time is not available.
Must include clock module
kdf.c missing from file list
2021-10-28 15:57:46 +10:00
Sean Parkinson
7baffd9cf1
Merge pull request #4512 from douzzer/fips-check-linuxv5-uses-tag-WCv5.0-RC9
...
fips-check.sh update for WCv5.0-RC9 tags
2021-10-28 14:15:55 +10:00
Sean Parkinson
0e18e9c404
Merge pull request #4502 from dgarske/async_test
...
Fixes for async TLS v1.3
2021-10-28 14:13:32 +10:00
David Garske
55ee5e41db
Merge pull request #4510 from SparkiDev/sp_cmp_c64
...
SP: change to sp_c32.c now in scripts caused changes to sp_c64.c
2021-10-27 18:50:13 -07:00
Daniel Pouzzner
46ecf752b4
fips-check.sh: update wolfSSL remote & tag for linuxv5 aka linuxv5-RC9.
2021-10-27 18:17:57 -05:00
John Safranek
7cbfb27fa0
When adding cipherExtraData(), also account for TLSv1.3.
2021-10-27 15:12:31 -07:00
John Safranek
9f3f9c53fd
Remove debugging printfs. Added some guards around DTLS and AEAD only things.
2021-10-27 15:12:31 -07:00
Juliusz Sosinowicz
be3b6b47ef
DTLS MTU fixes
2021-10-27 15:12:31 -07:00
John Safranek
77ebd11781
Updating based on MTU. Debugging prints.
2021-10-27 15:12:31 -07:00
John Safranek
be2e7e25ac
Change the calculation for the extra data size in a DTLS message when checking to see if it'll fit in an MTU. (ZD12983)
2021-10-27 15:12:31 -07:00
David Garske
c16f0db1b5
Fixes for handling WC_PENDING_E async responses in API unit test and examples. Resolves all issues with --enable-all --enable-asynccrypt --with-intelqa=.
2021-10-27 15:08:39 -07:00
David Garske
a2ad01604f
Fix devId, which must be -2 or INVALID_DEVID (not 0). Fix RSA doc typo.
2021-10-27 15:08:38 -07:00
David Garske
eb56b652ca
Fix for async TLS v1.3 with multiple WC_PENDING_E on client_hello and server_hello processing. Fix for not aligned NUMA.
2021-10-27 15:08:38 -07:00
Sean Parkinson
34095dfd38
Merge pull request #4509 from dgarske/fix_sesstick
...
Fix for session ticket handling with error cases
2021-10-28 08:07:10 +10:00
David Garske
f14bd41733
Merge pull request #4359 from douzzer/fipsv3-rebased
...
fips 140-3 linuxkm edition
2021-10-27 15:06:48 -07:00
Jacob Barthelmeh
f585dcd5ab
adjust inSz with BER PKCS7 parsing
2021-10-27 15:12:04 -06:00
Daniel Pouzzner
f413ff8b3a
tls.c: TLSX_SupportedFFDHE_Set(): add handling for malloc failures.
2021-10-27 15:11:04 -05:00
Jacob Barthelmeh
00249b70ae
fix for build with WOLFSSL_SGX
2021-10-27 13:22:45 -06:00
Daniel Pouzzner
3a80ba6744
configure.ac: fixes for --enable-fips logic.
2021-10-26 22:51:59 -05:00
Daniel Pouzzner
d105256330
fips-check.sh: remap fips-ready target to be ready flavor of 140-3, temporarily with FIPS_VERSION="master"; add fips-v3-ready target with FIPS_VERSION="v4.1.1"; add linuxv5|linuxv5-RC9 target to be updated after merge with tags.
2021-10-26 20:24:29 -05:00
Daniel Pouzzner
d527b25034
configure.ac: FIPS: remap "ready" to be ready flavor of 140-3 (i.e. v5-ready); add v3-ready for ready flavor of 140-2.
2021-10-26 20:24:29 -05:00
Daniel Pouzzner
8ee49cd50c
linuxkm: in module_hooks.c:wolfssl_init(), add support for WC_RNG_SEED_CB.
2021-10-26 20:24:29 -05:00
Daniel Pouzzner
071be3171e
linuxkm: in module_hooks.c, fix logic+gating around CONFIG_MODULE_SIG and WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE.
2021-10-26 20:24:29 -05:00
John Safranek
9b5f8c84b0
Change the WIN10 project files to build for FIPS v5.
2021-10-26 20:24:29 -05:00
Daniel Pouzzner
073bef579b
linuxkm: add missing #ifdef OPENSSL_EXTRA around openssl includes in module_exports.c.template, and add an assert to configure.ac disallowing linuxkm+opensslextra.
2021-10-26 20:24:29 -05:00
Daniel Pouzzner
ac8fbe3fbd
ssl.c: fix a couple trivial rebase errors.
2021-10-26 20:24:29 -05:00
John Safranek
6e9f9c8fe8
Update the Windows user_settings for recent updates.
2021-10-26 20:24:29 -05:00
Daniel Pouzzner
7915f6acb0
linuxkm: add the remainder of known needed SAVE_VECTOR_REGISTERS() wrappers to PK algs, add DEBUG_VECTOR_REGISTERS_{EXIT,ABORT}_ON_FAIL options; add a slew of ASSERT_SAVED_VECTOR_REGISTERS() to sp_x86_64.c (autogenerated, separate scripts commit to follow).
2021-10-26 20:24:29 -05:00
John Safranek
75df6508e6
Add a read enable for private keys when in FIPS mode.
2021-10-26 20:24:29 -05:00
Daniel Pouzzner
1d07034fb9
linuxkm: fix line length in types.h, and add #ifdef _MSC_VER #pragma warning(disable: 4127) to work around MSC bug re "conditional expression is constant"; fix flub in ecc.c.
2021-10-26 20:24:29 -05:00
Daniel Pouzzner
62c1bcae8a
linuxkm: {SAVE,RESTORE}_VECTOR_REGISTERS() wrappers around RSA, DH, and ECC routines that might use sp-asm.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
0eb76bcfd8
linuxkm: add missing RESTORE_VECTOR_REGISTERS() in wolfcrypt/src/poly1305.c:wc_Poly1305Update().
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
85a8c06062
linuxkm: add DEBUG_VECTOR_REGISTER_ACCESS (debug feature switch), ASSERT_SAVED_VECTOR_REGISTERS, and ASSERT_RESTORED_VECTOR_REGISTERS macros, and move the fallback no-op definitions of the SAVE_VECTOR_REGISTERS and RESTORE_VECTOR_REGISTERS to types.h. also fixed several ASCII TAB characters in types.h.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
e0395c6441
linuxkm: in wolfcrypt/src/sha{256,512}.c, remove {SAVE,RESTORE}_VECTOR_REGISTERS() wrappers around AVX implementations, as this needs to be refactored for efficiency and the underlying assembly is not yet kernel-compatible.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
ad4c200cd2
linuxkm: wolfcrypt/src/memory.c: in {save,restore}_vector_registers_x86(), allow for recursive calls (some crypto calls are recursive).
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
fc73c6dbea
linuxkm: fix Makefile to properly pivot module signature on CONFIG_MODULE_SIG==y; remove not-yet-kernel-compatible asm files from the ASFLAGS_FPU_DISABLE_SIMD_ENABLE list, matching the OBJECT_FILES_NON_STANDARD list, for clarity.
2021-10-26 20:24:28 -05:00
John Safranek
40e3cac695
Use correct value for pSz when setting the dhKeySize in the session.
2021-10-26 20:24:28 -05:00
John Safranek
f2c4567164
Like the public key, zero pad the front of the private key.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
bc91187063
tls.c:TLSX_KeyShare_GenDhKey(): fix typo.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
aca43cfe52
linuxkm/Kbuild: include -fno-omit-frame-pointer in HOST_EXTRACFLAGS, in case the target kernel has profiling enabled; remove the "always := $(hostprogs)" rule, as it doesn't work and causes warnings on kernel 5.10.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
8bdae98a93
fips-check.sh: temporarily arrange for "linuxv5" to be an alias of "linuxv5-ready", to arrange for Jenkins testing of wolfcrypt code in the PR in FIPS mode.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
a3435ca062
fips-check.sh: exit (fatal error) if git fails.
2021-10-26 20:24:28 -05:00
John Safranek
f1d43f6891
Add error code for the private key read lockout.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
31f13a7f41
wolfcrypt/test/test.c: when HAVE_FIPS, wrap wc_MakeRsaKey() calls in infinite iteration while ret == PRIME_GEN_E, to inhibit nondeterministic failure mode from FIPS-limited _CheckProbablePrime() iteration.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
490a1238a8
configure.ac: refactor AC_CHECK_FILES brought in by rebase, to fix warning.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
b577984574
rsa.c: fix whitespace.
2021-10-26 20:24:28 -05:00
David Garske
3fcdcbc1f9
Fix for RSA _ifc_pairwise_consistency_test to make the async blocking.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
e61d88657d
WOLFSSL_ASYNC_CRYPT: in EccSharedSecret(), don't try to wolfSSL_AsyncInit() if there's no priv_key to supply an asyncDev; in RSA _ifc_pairwise_consistency_test(), disable async to force blocking crypto.
2021-10-26 20:24:28 -05:00
David Garske
303aa312a8
Fix the TLS v1.3 async key share support. Added WOLFSSL_NO_PUBLIC_FFDHE option to test without public FFDHE API's.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
75e4c0869e
DH: move declaration of wc_DhPublicKeyDecode() from dh.h to asn.h (it is defined in asn.c).
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
10304c9143
linuxkm: portability fix in aes.c for SAVE_VECTOR_REGISTERS() call ("embedding a directive within macro arguments is not portable").
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
c0778e5ad9
gate access to wc_Sha512.devId on !NO_SHA2_CRYPTO_CB.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
5d796ba06c
settings.h: add WOLFSSL_MAKE_FIPS_VERSION(), WOLFSSL_FIPS_VERSION_CODE, and FIPS_VERSION_{LT,LE,EQ,GE,GT} macros; define NO_SHA2_CRYPTO_CB macro if HAVE_FIPS && FIPS_VERSION_LT(5,1); refactor other FIPS version dependencies in settings.h to use new macros.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
0f05a71bfb
linuxkm: refactor SAVE_VECTOR_REGISTERS() macro to take a fail clause as an argument, to allow the preprocessor to completely eliminate it in non-kernel builds, and for backward compat with WCv5.0-RC8.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
6160da243d
linuxkm: use EXPORT_SYMBOL_NS_GPL() for exports.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
c2c2e5b4f5
tests/api.c: post_auth_version_cb(): add missing gating on !NO_ERROR_QUEUE for wolfSSL_ERR_get_error() test.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
e4d075de20
src/internal.c: FreeX509(): remove redundant free of x509->CRLInfo.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
61df408d70
configure.ac: fix handling of ENABLED_FIPS->REPRODUCIBLE_BUILD_DEFAULT=yes; take JNI back out of from enable-all feature set because it adds -DNO_ERROR_QUEUE to flags; fix typo in FIPS test for --with-max-rsa-bits setup.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
32349749a6
internal.c: SendServerKeyExchange(): check retval from wc_DhGetNamedKeyParamSize().
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
361559ca30
settings.h: set HAVE_PUBLIC_FFDHE as in configure.ac (FIPS v2 and SELFTEST) if it isn't already set.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
342e319870
dsa.c: fix up comment spelling/typography in wc_MakeDsaKey().
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
a5c03f65e3
tests/api.c: fix test_CryptoCb_Func() to not attempt signing op on ephemeral ECC keys.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
1f6eb4648e
configure.ac: remove WOLFSSL_VALIDATE_ECC_IMPORT and WOLFSSL_VALIDATE_ECC_KEYGEN from enable-all and enable-all-crypto feature sets.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
7a4ec22953
pkcs7.c: further smallstack refactor of PKCS7_EncodeSigned().
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
fb49d814c5
configure.ac and autogen.sh: fix warnings in configure.ac, and enable WARNINGS=all,error in autogen.sh. also, remove --verbose to avoid obscuring warning output.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
f60cb94b82
wolfcrypt/src/include.am and src/include.am: don't disrupt modtimes of fips/async source files if they already exist.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
ab4c96292b
autogen.sh: disable WARNINGS=all until autotools config is fixed.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
e894340a64
tls13.c: mac2hash(): accommodate scenario where all hashes are gated out of the build (peer review).
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
972c6c032e
ssl.c: clean up MD5->SHA refactor of wolfSSL_LH_strhash() (peer review).
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
e9332c1ce4
autogen.sh: refactor to not disrupt modtimes of fips/async source files if they already exist. also, assert success on any file ops, and properly export WARNINGS to autoreconf.
2021-10-26 20:24:28 -05:00
Daniel Pouzzner
255d2d650f
rsa.c: add missing WOLFSSL_ASYNC_CRYPT clauses to _ifc_pairwise_consistency_test().
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
87b965c964
include.am: in FIPS clauses, include wolfcrypt/src/aes_gcm_asm.S in src_libwolfssl_la_SOURCES when BUILD_AESNI, regardless of BUILD_INTELASM, as in the corresponding non-FIPS clause.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
0f407b4bfc
test.c: fix indirection flubs in _ASYNC_CRYPT parts of ecc_test_sign_vectors().
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
f264741aa0
benchmark.c: fix -Wstringop-truncation in _ASYNC_CRYPT bench_stats_add().
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
0231446006
configure.ac: don't warn about loading real async files if async.c is present and non-empty.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
3745b1c9db
linuxkm: fix clean rules/definitions to not pick up top level Makefile, and to clean up empty object directories.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
8e131620ae
.gitignore: add linuxkm/libwolfssl.lds
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
14f39f07a2
fips-check.sh: add linuxv5-ready (--enable-fips=v5-ready).
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
f9627e4b14
configure.ac: for --enable-fips, make v5 an alias for v5-RC8 (alias to be updated after newer lab-approved snapshots are tagged), and add v5-ready and a placeholder v5-REL.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
5ef97acbab
types.h: add back missing WC_HASH_TYPE_MAX to enum wc_HashType when HAVE_FIPS_VERSION <= 2 (now WC_HASH_TYPE_BLAKE2S, since SHAKE is now excluded from the enum).
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
40c32081bb
types.h: rename STRINGIFY() macro to WC_STRINGIFY().
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
e3989edd39
wolfcrypt/benchmark/benchmark.c: fix typo.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
4a451caf7b
src/sniffer.c: fix rebase errors.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
834efe4ff6
fips-check.sh: update to test 140-3 using --enable-fips=v5-RC8 and the WCv5.0-RC8 version tags.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
db26e0a40a
Makefile.am: .build_params belongs in DISTCLEANFILES, not CLEANFILES.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
9f36df44a4
wolfssl/wolfcrypt/types.h: define WOLFSSL_NOSHA512_224, WOLFSSL_NOSHA512_256, and WOLFSSL_NO_SHAKE256 in SELFTEST/FIPS<=v2 version of enum wc_HashType definition, to assure synchrony.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
1c27654300
configure.ac and wolfssl/wolfcrypt/types.h: don't change wc_HashType for FIPS <= v2 (reverts commit 56843fbefd as it affected that definition); add -DWOLFSSL_NOSHA512_224 -DWOLFSSL_NOSHA512_256 to FIPS v2 and v3.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
aa6ca43e91
api.c: skip test_wolfSSL_EVP_PBE_scrypt() when FIPS 140-3 (test uses impermissibly short HMAC key).
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
22f947edd6
configure.ac and wolfssl/wolfcrypt/asn_public.h: add --enable-fips=v5-RC8 for use with WCv5.0-RC8 codebase; add HAVE_FIPS_VERSION_MINOR, and refactor main $ENABLED_FIPS switch to set HAVE_FIPS_VERSION and if applicable HAVE_FIPS_VERSION_MINOR for use in subsequent tests and the main FIPS setup code; in asn_public.h, use HAVE_FIPS_VERSION_MINOR to exclude declaration of wc_RsaKeyToPublicDer() when building FIPS WCv5.0-RC8.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
8c3cbf84f9
add missing gating around WOLFSSL_NO_SHAKE256, WOLFSSL_NOSHA512_224, and WOLFSSL_NOSHA512_256.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
7b40cd6cef
configure.ac: fips tweaks: add --enable-fips=disabled to allow non-fips build in a fips tree, for convenient testing; add ENABLED_SHAKE256=no override to fipsv5 setup; don't add an RSA_MAX_SIZE setting to AM_CFLAGS when FIPS, to avoid a conflict with old rsa.h.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
083b97c5a3
tls.c: fix rebase error in TLSX_KeyShare_FreeAll().
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
19b33d5a76
configure.ac: don't include rc2 in enable-all or enable-all-crypto (memory leaks).
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
b77000bcfb
add smallstack codepath to ecc_test_sign_vectors(), and add missing rc2.h include to linuxkm/module_exports.c.template.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
9e3fb73567
configure.ac: improvement for enable-all and enable-all-crypto:
...
remove haproxy from enable-all set, to avoid SECURE_RENEGOTIATION;
add enable-aescbc-length-checks to enable-all-crypto set, inadvertently omitted;
add enable-base16 to all (where it was implicit) and to all-crypto (where it was missing);
add ssh, rc2 and srp to all-crypto;
reorder the portion of the enable-all set that's common with enable-all-crypto, to have matching order.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
fae342940c
.gitignore: add .build_params.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
d39d389c6e
aes.c: in CheckAesGcmIvSize(), don't disallow GCM_NONCE_MIN_SZ for FIPS 140-3, i.e. always allow it.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
b93a18b34e
src/internal.c: in SendServerKeyExchange() case diffie_hellman_kea, #ifdef HAVE_SECURE_RENEGOTIATION, enlarge buffers.serverDH_Pub.buffer to accomodate larger new key replacing smaller old key, whether or not ssl->namedGroup is set (copy-paste of existing in !ssl->namedGroup path).
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
67db7b7f32
fixes for issues identified by Jenkins run:
...
Makefile.am: clean .build_params file;
ecc.c: fix misplaced gat #endif in wc_ecc_shared_secret_gen_sync();
move AM_CFLAGS+=-include /.build_params to before AC_SUBST([]AM_CFLAGS);
fix new unused-label defect in wc_ecc_shared_secret_gen_sync();
fix integer.[ch] mp_exch() to return int not void (sp_exch() and TFM mp_exch() can both fail on allocations);
fix NO_INLINE ForceZero() prototype;
ecc.c: add missing if (err == MP_OKAY) in build_lut();
wolfcrypt/test/test.c: revert "rename hkdf_test to wc_hkdf_test to eliminate namespace collision", restoring unconditional static qualifier, to fix crash at return from main() on Xilinx Zynq ARM test;
ecc.c: refactor build_lut() flow control to fix uninited variable scenario found by scan-build;
WOLFCRYPT_ONLY and OPENSSL_EXTRA: fix gating to allow successful build with --enable-all-crypto, and add configure error if crypt-only and opensslall are combined.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
87578262aa
wolfcrypt smallstack refactors:
...
rsa.c: wc_CompareDiffPQ()
dh.c: wc_DhGenerateParams()
dsa.c: wc_MakeDsaKey() wc_MakeDsaParameters()
srp.c: wc_SrpGetVerifier() wc_SrpSetPrivate() wc_SrpGetPublic()
ecc.c: build_lut() wc_ecc_mulmod_ex() wc_ecc_mulmod_ex2() wc_ecc_shared_secret_gen_sync()
test.c: GenerateNextP() dh_generate_test() GenerateP()
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
0f201a7394
wolfcrypt/types.h: revert change to WOLFSSL_LINUXKM XFREE() macro added in commit "remove frivolous semicolons at end of several macro definitions."
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
947a0d6a2f
autotools/Makefiles: enable reproducible build by default for FIPS, and add -DHAVE_REPRODUCIBLE_BUILD to AM_CFLAGS;
...
refactor the HAVE_WC_INTROSPECTION mechanism to pass build params via $output_objdir/.build_params rather than abusing autotools config.h to pass them;
add support for EXTRA_CFLAGS on the make command line;
in FIPS builds, exclude pkcallbacks from --enable-all;
linuxkm: move test.o out of PIE container (uses function pointers as operands).
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
f1c1f76851
ssl.c: refactor wolfSSL_LH_strhash() to use SHA1 instead of MD5, to eliminate dependency on deprecated alg.
2021-10-26 20:24:27 -05:00
Daniel Pouzzner
ddda108de6
sp_int.c:sp_set(): use PRAGMA_GCC_* macros, not ad hoc gated __Pragmas, to mask spurious -Warray-bounds.
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
cdcb8fb9da
configure.ac: revert change (AC_MSG_NOTICE reverted to AC_MSG_ERROR) for "FIPS source tree used for non-FIPS build"; in enable_all set, move enable_stunnel and enable_tcpdump to the !ENABLED_LINUXKM_DEFAULTS section.
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
220a255281
use WOLFSSL_BIO_ERROR, not SOCKET_INVALID (both macros have value -1), as the default/unset value of WOLFSSL_BIO.num, to avoid unnecessary dependency on HAVE_SOCKADDR.
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
1e3d47af57
remove frivolous semicolons at end of several macro definitions.
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
64bfe81ff5
configure.ac: test for cryptonly && opensslextra, if so error "mutually incompatible".
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
2bf711341b
wolfcrypt/test/test.c: use HAVE_FIPS_VERSION, not FIPS_VERSION.
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
4cf1826c8f
PRAGMA_GCC_*: refactor macros to properly push a context, and refactor their use in src/tls13.c:DeriveKey() to deal with gcc context quirks that otherwise disabled the warning mask when defined(HAVE_FIPS); add a missing #ifndef NO_MD5 in ssl.c:wolfSSL_LH_strhash().
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
cff7c5b3c0
wolfcrypt/benchmark/benchmark.c: in bench_dh(), add a missing #ifdef HAVE_PUBLIC_FFDHE around a DhParams use.
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
8de8af8b43
wolfcrypt/test/test.c: disable hmac_md5_test() for FIPS 140-3, and rename hkdf_test to wc_hkdf_test to eliminate namespace collision.
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
89797db946
configure.ac: enable_stunnel for enable-all only if !FIPS; add enable_tcpdump if !FIPS; add -DWOLFSSL_ECDSA_SET_K to FIPS 140-3 CFLAGS; use DEFAULT_MAX_CLASSIC_ASYM_KEY_BITS to set FP_MAX_BITS indirectly for FIPS 140-3; use AC_MSG_NOTICE() for informational notices previously echoed; gate informational output appropriately on $verbose and $silent.
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
5293180566
linuxkm/module_exports.c.template: tweaks for FIPS compatibility.
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
ed33315f25
wolfcrypt/src/sp_int.c: add pragma to sp_set() to suppress false positive -Warray-bounds on gcc-11.
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
54b3f1b252
src/tls.c:TLSX_KeyShare_GenDhKey(): don't generate a key if one is already set.
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
34e88b0605
linuxkm: properly pass {AM_,}CPPFLAGS to Kbuild, and include kdf.h in module_exports.c.template.
2021-10-26 20:24:26 -05:00
Daniel Pouzzner
b673622322
FIPS 140-3 misc fixes including fixes for rebase errors.
2021-10-26 20:24:26 -05:00
John Safranek
b615309a7b
update FFDHE4096 test with the updated usage
2021-10-26 20:24:26 -05:00
John Safranek
c31ed64eb5
Add guard around the public key check for DH to skip it when we have
...
the condition to perform the small key test. The small key is
mathematically valid, but does not necessarily pass the SP 800-56Ar3
test for DH keys. The most recent FIPS build will add the tested file.
This change is only used in the older FIPS releases and in some rare
configurations that include the small key test.
2021-10-26 20:24:26 -05:00
John Safranek
aeb8f5bb51
For the WIN10 user_settings, remove the forced set of FIPS version to 5.
2021-10-26 20:24:26 -05:00
John Safranek
b00b95ef6c
Cofactor flag in wolfcrypt test needed a guard.
2021-10-26 20:24:26 -05:00
John Safranek
f53a4db4e7
Unwind a few changes adding guards so it'll build with old FIPS.
2021-10-26 20:24:26 -05:00
John Safranek
b54459ace3
When the ECC PCT verify result is 0, the PCT fails.
2021-10-26 20:24:26 -05:00
John Safranek
175bab9a6f
Add missed step in DH key pair generation.
2021-10-26 20:24:26 -05:00
John Safranek
b815939c53
Add missing settings for the Windows 10 FIPS build.
2021-10-26 20:24:26 -05:00
John Safranek
f42106201a
In the RSA PCT, initialize the plain output pointer.
2021-10-26 20:24:26 -05:00
John Safranek
aa3fb6f0d0
Update visibility on a SP math function for DH.
2021-10-26 20:24:26 -05:00
John Safranek
04ffd2ab45
Fixes:
...
1. When enabling FIPSv5 in configure, enable WOLFSSL_WOLFSSH.
2. Appropriate size selection of DH private keys.
2021-10-26 20:24:26 -05:00
John Safranek
3eaeaf3a57
Add sign/verify PCT to ECC.
2021-10-26 20:24:25 -05:00
John Safranek
9bf36f329a
Add sign/verify PCT to RSA key gen.
2021-10-26 20:24:25 -05:00
John Safranek
5d7c6dda72
Restore the PCTs to ECC and DH.
2021-10-26 20:24:25 -05:00
John Safranek
1065d2accf
Fix some Windows build warnings.
2021-10-26 20:24:25 -05:00
John Safranek
9022762e5a
Check to see if a pointer is nonnull that is expected to be.
2021-10-26 20:24:25 -05:00
John Safranek
908ec9b14a
Modify ffdhe to not return addresses.
2021-10-26 20:24:25 -05:00
John Safranek
ebdadefb9a
Update WIN10 user_settings.h for new FIPS build.
2021-10-26 20:24:25 -05:00
John Safranek
f49a09749e
When building for FIPS, the unit test will run all the CASTs up front.
2021-10-26 20:24:25 -05:00
John Safranek
52432382a2
Add kdf.c to the Windows builds.
2021-10-26 20:24:25 -05:00
John Safranek
82e63cee1e
Remove the unused ECDSA PCT tests in the CAST list.
2021-10-26 20:24:25 -05:00
John Safranek
ae7a2e5a48
Remove the unused RSA PCT test in the CAST list.
2021-10-26 20:24:25 -05:00
John Safranek
7af87e5b32
Restore the HKDF code to hmac.c. For compatibility between FIPS builds.
2021-10-26 20:24:25 -05:00
John Safranek
54a1b4c881
Remove redundant pairwise test from DH and ECC.
2021-10-26 20:24:25 -05:00
John Safranek
c5d575c8ae
Remove RDSEED from the intel asm build.
2021-10-26 20:24:25 -05:00
John Safranek
f69b6ac5eb
Add missing verify curves into configure. Copy the kdf files when building for FIPSv5.
2021-10-26 20:24:25 -05:00
John Safranek
c0e6a55aaa
Skip the small key DH test for SP and FFDHE builds.
2021-10-26 20:24:25 -05:00
John Safranek
3b5c8231c2
Move the PCT down to where it used to be located as CheckKeyPair.
2021-10-26 20:24:25 -05:00
John Safranek
6cf186696e
Update the BUILD_FIPS_V4 flag to V5. Consolidate the Makefile include for the flavors of FIPS.
2021-10-26 20:24:25 -05:00
John Safranek
2de6b3b2bd
Move the KDF functions into their own source file.
2021-10-26 20:24:25 -05:00
John Safranek
f78887d2ab
Add 'static' to the test vector arrays for the SSH KDF test.
2021-10-26 20:24:25 -05:00
John Safranek
dee2a67720
Change visibility of wc_GenerateSeed() to API.
2021-10-26 20:24:25 -05:00
John Safranek
86c040a3ae
Rename the PCT error codes to remove 'FIPS' since they can be enabled without FIPS.
2021-10-26 20:24:25 -05:00
John Safranek
9c5607a677
Add guard around ECC PCT for builds without validate keygen.
2021-10-26 20:24:25 -05:00
John Safranek
7a2b661c0c
Add types for the RNG seed callback and the OS_Seed.
2021-10-26 20:24:25 -05:00
John Safranek
133faea89a
Hushed compiler warnings about unused variables.
2021-10-26 20:24:25 -05:00
John Safranek
a967cbcb7b
56Ar3 Testing Updates
...
1. Add PCTs for ECC and FFC.
2. Update the public key checks for ECC and FFC.
2021-10-26 20:24:25 -05:00
John Safranek
976402e04b
RNG Update
...
1. When the seed callback is enabled, allow wc_GenerateSeed() to be used
as a default callback.
2. Modify all the tests and examples to use the default seed callback if
the seed callback is enabled.
2021-10-26 20:24:25 -05:00
John Safranek
0c6d8cfc22
If the RNG seeding callback is missing or returns an error, the RNG instantiate fails.
2021-10-26 20:24:25 -05:00
John Safranek
c6486d7392
Removed an outdated comment.
2021-10-26 20:24:25 -05:00
John Safranek
a562db82ef
1. Rename and relabel the FIPS 140-3 option as wolfCrypt v5.
...
2. Make sure the correct SHA assembly files are copied over for the latest FIPS build.
2021-10-26 20:24:25 -05:00
John Safranek
c47e354eed
Add callback option for RNG seeding.
2021-10-26 20:24:25 -05:00
John Safranek
bffe4f64dd
Add option to fips-check script to checkout specific named files from the FIPS tag.
2021-10-26 20:24:25 -05:00
John Safranek
a2f802199d
DH key gen should call DH check key.
2021-10-26 20:24:25 -05:00
John Safranek
e3b2be5ea3
ECC key gen should call ECC check key.
2021-10-26 20:24:25 -05:00
John Safranek
1f67e4519c
Restrict AES-GCM IV minimum size to 96-bits for newer FIPS builds.
2021-10-26 20:24:25 -05:00
John Safranek
e03b29966c
Remove MD5 and old TLS from the newest FIPS build.
2021-10-26 20:24:25 -05:00
John Safranek
17a4c891ce
Add CASTs for TLSv1.2, TLSv1.3, and SSH KDFs.
2021-10-26 20:24:25 -05:00
John Safranek
1fcf33b898
Fix another configure error due to rebase.
2021-10-26 20:24:25 -05:00
John Safranek
e32c58d533
Add RSA PAT.
2021-10-26 20:24:25 -05:00
John Safranek
9656b83a03
Add ECDSA-KAT CAST.
2021-10-26 20:24:25 -05:00
John Safranek
3994a6b5e7
FIPSv3
...
1. Remove the CAST IDs for the redundant RSA tests.
2. Remove the flags in configure.ac that enable the keys for the redundant RSA tests.
2021-10-26 20:24:25 -05:00
John Safranek
90752e89fb
Restore a configure check lost in a rebase.
2021-10-26 20:24:25 -05:00
John Safranek
6dfef1400d
Use the new APIs for HKDF extract with label.
2021-10-26 20:24:25 -05:00
John Safranek
e67bbf7526
1. Add flag to DH keys when using safe parameters.
...
2. The LN check is skipped when using safe parameters.
3. Enable all FFDHE parameter sets when building for FIPS 140-3.
2021-10-26 20:24:25 -05:00
John Safranek
7f64fc4efb
Move the TLSv1.3 KDF into wolfCrypt with the other KDFs.
2021-10-26 20:24:25 -05:00
John Safranek
38064bb396
Add HMAC-SHA2-512 to the TLSv1.2 PRF.
2021-10-26 20:24:25 -05:00
John Safranek
c7ea896759
Add prototype for the ssh-kdf test in the wolfCrypt test.
2021-10-26 20:24:24 -05:00
John Safranek
de4af35f89
KDF Update
...
1. Move wolfSSH's KDF into wolfCrypt.
2021-10-26 20:24:24 -05:00
John Safranek
a49125e613
FIPS KDF Update
...
1. Copied the TLSv1.2 PRF into hmac.c since it uses it and the TLSv1.3
HKDF is in there as well.
2. Added guard around the old TLS PRF so that it switches in correctly
for older FIPS builds only.
2021-10-26 20:24:24 -05:00
John Safranek
a935f2f86d
FIPS CAST Update
...
1. In the unit test, when checking the build options, also check for
FIPSv4 to make sure 2048-bit RSA is used.
2. In the standalone SHA-1 one step hash function, wc_InitSha() wasn't
getting called, so the FIPS flags didn't get checked. (It was using
wc_InitSha_ex() which bypasses the FIPS checks.)
2021-10-26 20:24:24 -05:00
John Safranek
11fb1abe74
Fix a bad assignment in the configure script.
2021-10-26 20:24:24 -05:00
John Safranek
e855654fff
FIPS CAST Update
...
1. Added a public API to run a CAST.
2. Added the other test certs for the RSA tests.
3. Added IDs for the new RSA tests and the SHA3-pairwise test.
2021-10-26 20:24:24 -05:00
John Safranek
a5032e8087
Update the fips-check script to pull the sources from GitHub rather than
...
from a directory on a local machine.
2021-10-26 20:24:24 -05:00
John Safranek
df859d30f3
FIPS 140-3
...
1. Change the internal version number for the FIPS 140-3 changes as v4.
2. Insert v3 as an alias for FIPS Ready.
3. Use the correct directory for the FIPS old files sources. (For local
testing of 140-3 builds.)
4. Change back the check for the FIPS version in internal.c for
EccMakeKey().
2021-10-26 20:24:24 -05:00
John Safranek
1683644e77
FIPS 140-3
...
1. Fix issue with FIPS Ready and FIPS 140-3. FR acts at the latest
version in the code, but that leaves DES3 out of the build. The code
was still including the header. Force DES3 disabled in FIPS Ready
builds.
2021-10-26 20:24:24 -05:00
John Safranek
9e92c118ed
FIPS 140-3
...
1. Add the old known answer test prototype back into fips_test.h for FIPSv2 builds.
2021-10-26 20:24:24 -05:00
John Safranek
f1bd79ac50
FIPS 140-3
...
1. Added enable option for FIPS 140-3 in configure script.
2. Modify DES3 source to disallow DES3 for the new option.
3. Added the new constants to fips_test.h.
4. Added some new test functions.
5. Added API for doing the POST.
6. Added a processing state for the CASTs.
7. Delete some unused prototypes from FIPS test API.
2021-10-26 20:24:24 -05:00
JacobBarthelmeh
d27a49b98c
Merge pull request #4507 from cconlon/cavpselftest2
...
fix CAVP selftest v2 build error in test.c
2021-10-27 06:04:06 +07:00
JacobBarthelmeh
4825534062
Merge pull request #4500 from cconlon/errorQueueFix
...
fix wc_ERR_print_errors_fp() unit test with NO_ERROR_QUEUE
2021-10-27 05:56:32 +07:00
Sean Parkinson
4235602c1e
SP: change to sp_c32.c now in scripts caused changes to sp_c64.c
2021-10-27 08:46:32 +10:00
Jacob Barthelmeh
3d5eea8f56
fix for disable memory build
2021-10-26 16:17:32 -06:00
elms
fdf2b711f7
cmake: add SNI and TLSx
2021-10-26 15:03:29 -07:00
Jacob Barthelmeh
583a50a3f6
account for case where XTIME returns an unsigned type
2021-10-26 15:50:11 -06:00
David Garske
a08b2db692
Fix for session ticket handling with error cases. Session ticket callback return code failures were still trying to do resumption. Behavior broken in PR #3827 .
2021-10-26 11:37:01 -07:00
David Garske
9c665d7282
Merge pull request #4501 from embhorn/zd13114
...
Fix wolfSSL_ASN1_TIME_diff use of gmtime and 32-bit overflow
2021-10-26 10:47:59 -07:00
David Garske
87baf7818e
Merge pull request #4505 from julek-wolfssl/fix-nids
...
Make NID's consistent v2
2021-10-26 10:29:42 -07:00
Chris Conlon
5810e45cb7
fix CAVP selftest v2 build error in test.c
2021-10-26 10:33:05 -06:00
David Garske
529f1c63dd
Merge pull request #4503 from SparkiDev/opensslcoexist_ed
...
ED25519 and ED448 api.c tests: doesn't compile with --opensslcoexist
2021-10-26 09:19:08 -07:00
Eric Blankenhorn
19feab7850
Fix wolfSSL_ASN1_TIME_diff use of gmtime and 32-bit overflow
2021-10-26 07:14:53 -05:00
Juliusz Sosinowicz
48b304be00
Fix issues with AIA_OCSP_OID and AIA_CA_ISSUER_OID
2021-10-26 11:47:27 +02:00
Juliusz Sosinowicz
348fec3d29
wc_ClearErrorNodes is a local API that is not exported for linking
2021-10-26 09:14:48 +02:00
Juliusz Sosinowicz
fa3cf590d5
Fix NID conflicts
...
- `NID_sha224` conflicted with `NID_sha1WithRSAEncryption`
- `NID_commonName` conflicted with `PBE-SHA1-3DES`
- `NID_X9_62_prime239v3` conflicted with `AES128CBCb`
- `NID_md5` conflicted with `NID_surname`
- `NID_md2WithRSAEncryption` conflicted with `NID_localityName`
- `NID_md5WithRSAEncryption` conflicted with `NID_stateOrProvinceName`
NID conflicts found by examining the runtime values in `wolfssl_object_info`
2021-10-26 09:14:34 +02:00
Juliusz Sosinowicz
57b9170ac0
Make NID's consistent
...
- `CTC_SHAwDSA` -> `NID_dsaWithSHA1`
- `CTC_SHA256wDSA` -> `NID_dsa_with_SHA256`
- `CTC_MD2wRSA` -> `NID_md2WithRSAEncryption`
- `CTC_MD5wRSA` -> `NID_md5WithRSAEncryption`
- `CTC_SHAwRSA` -> `NID_sha1WithRSAEncryption`
- `CTC_SHA224wRSA` -> `NID_sha224WithRSAEncryption`
- `CTC_SHA256wRSA` -> `NID_sha256WithRSAEncryption`
- `CTC_SHA384wRSA` -> `NID_sha384WithRSAEncryption`
- `CTC_SHA512wRSA` -> `NID_sha512WithRSAEncryption`
- `CTC_SHA3_224wRSA` -> `NID_RSA_SHA3_224`
- `CTC_SHA3_256wRSA` -> `NID_RSA_SHA3_256`
- `CTC_SHA3_384wRSA` -> `NID_RSA_SHA3_384`
- `CTC_SHA3_512wRSA` -> `NID_RSA_SHA3_512`
- `CTC_SHAwECDSA` -> `NID_ecdsa_with_SHA1`
- `CTC_SHA224wECDSA` -> `NID_ecdsa_with_SHA224`
- `CTC_SHA256wECDSA` -> `NID_ecdsa_with_SHA256`
- `CTC_SHA384wECDSA` -> `NID_ecdsa_with_SHA384`
- `CTC_SHA512wECDSA` -> `NID_ecdsa_with_SHA512`
- `CTC_SHA3_224wECDSA` -> `NID_ecdsa_with_SHA3_224`
- `CTC_SHA3_256wECDSA` -> `NID_ecdsa_with_SHA3_256`
- `CTC_SHA3_384wECDSA` -> `NID_ecdsa_with_SHA3_384`
- `CTC_SHA3_512wECDSA` -> `NID_ecdsa_with_SHA3_512`
- `DSAk` -> `NID_dsa`
- `RSAk` -> `NID_rsaEncryption`
- `ECDSAk` -> `NID_X9_62_id_ecPublicKey`
2021-10-26 09:14:25 +02:00
Sean Parkinson
08d9b145d9
ED25519 and ED448 api.c tests: doesn't compile with --opensslcoexist
...
Change SSL_FATAL_ERROR to WOLFSSL_FATAL_ERROR
2021-10-26 15:50:52 +10:00
Daniel Pouzzner
49e29eb811
Merge pull request #4504 from wolfSSL/revert-4429-fix-nids
...
Revert "Make NID's consistent"
2021-10-26 00:09:56 -05:00
John Safranek
a0c7c079b8
Revert "Make NID's consistent"
2021-10-25 21:57:28 -07:00
Sean Parkinson
cdf72facbf
Merge pull request #4429 from julek-wolfssl/fix-nids
...
Make NID's consistent
2021-10-26 09:59:26 +10:00
Sean Parkinson
905683c98c
Merge pull request #4496 from dgarske/sniffer_keywatch
...
Fix for sniffer key watch callback
2021-10-26 09:55:17 +10:00
Sean Parkinson
6070981366
Merge pull request #4490 from dgarske/static_mem_unittest
...
Add CTX static memory API unit tests
2021-10-26 09:52:14 +10:00
David Garske
aa72f0685d
Merge pull request #4499 from SparkiDev/dec_ku_len
...
KeyUsage dcoding: Ensure data length is 1 or 2
2021-10-25 15:11:18 -07:00
Chris Conlon
a8b6304e19
add unit test for wc_PKCS7_VerifySignedData_ex() with detached signature and content digest only
2021-10-25 15:52:19 -06:00
Chris Conlon
322cb05852
adjust PKCS7_VerifySignedData to correctly verify precomputed content hash with detached signature
2021-10-25 14:46:10 -06:00
Chris Conlon
eb0b6ca122
fix unit test for wc_ERR_print_errors_fp() when NO_ERROR_QUEUE is defined
2021-10-25 13:50:39 -06:00
David Garske
517225e135
Merge pull request #4497 from cconlon/authInfo
...
fix nid2oid/oid2nid for oidCertAuthInfoType
2021-10-25 09:29:09 -07:00
Sean Parkinson
8e6c6e7757
KeyUsage dcoding: Ensure data length is 1 or 2
2021-10-25 09:22:31 +10:00
David Garske
bf2b13939f
Merge pull request #4329 from kaleb-himes/OE22-Porting-Changes
...
Oe22 porting changes
2021-10-22 16:16:26 -07:00
Chris Conlon
402ee29163
fix nid2oid/oid2nid for oidCertAuthInfoType
2021-10-22 16:53:18 -06:00
David Garske
e4da9c6f48
Fix for sniffer key callback. Fix for building sniffer without RSA. Fix for wolfCrypt test cert ext without RSA.
2021-10-22 14:29:06 -07:00
kaleb-himes
5859779ddf
Check-in non-FIPS specific porting changes for OE22
...
Fix no new line
Change comment style in testsuite.c
Add include for proper socket header in wolfio.h
Add dc_log_printf support to benchmark application
Pull in changes for examples
Refector NETOS check in test.c
Fix format and remove settings used only for validation testing
Implement peer review feedback
Address last items noted in peer review
Add new README to include.am
Adjust comment style on TODO
Gate changes in client and server properly
Add static on customer feedback
Fix settings include
Update latest peer feedback
2021-10-22 15:01:14 -06:00
John Safranek
d83d16af59
Merge pull request #4483 from julek-wolfssl/cov-reports
2021-10-22 13:07:57 -07:00
David Garske
229f0d5fd1
Merge pull request #4485 from JacobBarthelmeh/certs
...
Improve permitted alternate name logic in certificate ASN handling
2021-10-22 11:59:16 -07:00
David Garske
c027fffa92
Fix for CTX free heap hint issue. With openssl extra the param and x509_store.lookup.dirs are allocated at CTX init and if heap or static pool was used depends on ctx->onHeapHint. Added test case for this and inline code comment.
2021-10-22 11:58:02 -07:00
John Safranek
734a73dd35
Add missing null-check. Fix dead store.
2021-10-22 11:17:41 -07:00
David Garske
f8178b4896
Merge pull request #4495 from utzig/fix-mmacu-sha256-warn
...
Fix MMCAU_SHA256 type warnings
2021-10-22 10:55:43 -07:00
David Garske
587077856e
Merge pull request #4494 from utzig/fix-forcezero-comment
...
Fix comment that applies to fp_forcezero
2021-10-22 10:55:30 -07:00
David Garske
c54f906678
Merge pull request #4492 from haydenroche5/pem_password_cb
...
Rename pem_password_cb to wc_pem_password_cb.
2021-10-22 10:51:47 -07:00
John Safranek
aad230a7e3
Restore a test case. Add a missing null-check.
2021-10-22 10:36:17 -07:00
David Garske
4c0527490d
Fixes for API unit test with WOLFSSL_NO_ASN_STRICT. Fix spelling error.
2021-10-22 09:59:16 -07:00
Fabio Utzig
29f4f09e6c
Fix MMCAU_SHA256 type warnings
...
Fix warnings in the usage of MMCAU_SHA256 routines, where digest is
expected to be `uint32_t*`, but is defined as `word32*`, which results
in:
```
expected 'uint32_t *' {aka 'long unsigned int *'} but argument is of
type 'word32 *' {aka 'unsigned int *'}
```
Signed-off-by: Fabio Utzig <utzig@apache.org >
2021-10-22 09:51:14 -03:00
Fabio Utzig
a00e3024ce
Fix comment that applies to fp_forcezero
...
Fix comment mentioning the use of `ForceZero` besides `fp_clear`, which
uses `XMEMSET`, and puts it above `fp_forcezero` where it should belong.
Signed-off-by: Fabio Utzig <utzig@apache.org >
2021-10-22 09:01:31 -03:00
Sean Parkinson
6e7dee3283
Change to compare each name to each matching type in permittedNames list.
2021-10-22 10:57:11 +10:00
Hayden Roche
0b6523d933
Rename pem_password_cb to wc_pem_password_cb.
...
Recently, we had a wolfEngine customer report a compilation error because
wolfSSL and OpenSSL both define the typedef pem_password_cb. The solution is to
namespace our typedef with the wc_ prefix. In order to not break existing code
that relies on wolfSSL providing pem_password_cb, if OPENSSL_COEXIST is not
defined, we define pem_password_cb as a macro that maps to wc_pem_password_cb.
2021-10-21 16:47:29 -07:00
David Garske
b5f4a0c005
Improve API unit test to use X509_NAME_get_sz and make it widely available.
2021-10-21 16:42:19 -07:00
David Garske
f17187aad9
Fixes for static memory testing. Fix clang memory sanitizer warnings.
2021-10-21 16:33:57 -07:00
David Garske
785e37790a
Cleanup API test case debugging.
2021-10-21 12:35:06 -07:00
David Garske
911d95e5e4
Add CTX static memory API unit tests. Expanded crypto callback TLS tests to older SSL/TLS and DTLS.
2021-10-21 11:47:00 -07:00
David Garske
37a976b4bf
Fix example server to support option 7 (which exists). Fix static mem size required with session cert (matches client now).
2021-10-21 11:41:30 -07:00
Juliusz Sosinowicz
79b738b5a6
commit-test and jenkins fixes
2021-10-21 14:29:28 +02:00
Juliusz Sosinowicz
44d8ab20e1
#456
2021-10-21 14:25:06 +02:00
Juliusz Sosinowicz
f512514fd6
#450
2021-10-21 14:25:06 +02:00
Juliusz Sosinowicz
a4a093ebed
#449
2021-10-21 14:25:06 +02:00
Juliusz Sosinowicz
9e3ff9c92c
#427
2021-10-21 14:25:06 +02:00
Juliusz Sosinowicz
9386a882b9
#424
...
Refactor d2i key API to use common code
2021-10-21 14:25:06 +02:00
Juliusz Sosinowicz
4d5dceaa4e
#421
2021-10-21 14:25:06 +02:00
Juliusz Sosinowicz
9d989689c6
#420
2021-10-21 14:25:06 +02:00
Juliusz Sosinowicz
86f93e5c1b
#419
2021-10-21 14:25:06 +02:00
Juliusz Sosinowicz
70901f0626
#257
2021-10-21 14:25:06 +02:00
Juliusz Sosinowicz
3894021a53
#246
2021-10-21 14:25:06 +02:00
Juliusz Sosinowicz
af64d4347d
#244
2021-10-21 14:25:06 +02:00
Juliusz Sosinowicz
f7f12da8ec
#242
2021-10-21 14:25:06 +02:00
Juliusz Sosinowicz
e70dfe7265
#239
2021-10-21 14:25:06 +02:00
Juliusz Sosinowicz
3563585274
#240
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
df1d817f1f
#129
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
1d5f4a6664
#118
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
81c3f4b925
#114
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
1239a7f57d
#96
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
a1127be18e
#95
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
2678a3b981
#67
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
e97e8bc7d0
#59
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
5bacc0c9ab
In first |= op r always equals 0
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
8e6759384c
#40
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
344a07051e
#39
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
74cf332a8b
#37
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
e82ae7b072
#17
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
79682fd30a
#15
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
97c89dd072
#9
2021-10-21 14:22:54 +02:00
Juliusz Sosinowicz
4268763adb
wc_ClearErrorNodes is a local API that is not exported for linking
2021-10-21 13:47:55 +02:00
Juliusz Sosinowicz
642d0e0fba
Fix NID conflicts
...
- `NID_sha224` conflicted with `NID_sha1WithRSAEncryption`
- `NID_commonName` conflicted with `PBE-SHA1-3DES`
- `NID_X9_62_prime239v3` conflicted with `AES128CBCb`
- `NID_md5` conflicted with `NID_surname`
- `NID_md2WithRSAEncryption` conflicted with `NID_localityName`
- `NID_md5WithRSAEncryption` conflicted with `NID_stateOrProvinceName`
NID conflicts found by examining the runtime values in `wolfssl_object_info`
2021-10-21 13:01:57 +02:00
Juliusz Sosinowicz
20473ba563
Make NID's consistent
...
- `CTC_SHAwDSA` -> `NID_dsaWithSHA1`
- `CTC_SHA256wDSA` -> `NID_dsa_with_SHA256`
- `CTC_MD2wRSA` -> `NID_md2WithRSAEncryption`
- `CTC_MD5wRSA` -> `NID_md5WithRSAEncryption`
- `CTC_SHAwRSA` -> `NID_sha1WithRSAEncryption`
- `CTC_SHA224wRSA` -> `NID_sha224WithRSAEncryption`
- `CTC_SHA256wRSA` -> `NID_sha256WithRSAEncryption`
- `CTC_SHA384wRSA` -> `NID_sha384WithRSAEncryption`
- `CTC_SHA512wRSA` -> `NID_sha512WithRSAEncryption`
- `CTC_SHA3_224wRSA` -> `NID_RSA_SHA3_224`
- `CTC_SHA3_256wRSA` -> `NID_RSA_SHA3_256`
- `CTC_SHA3_384wRSA` -> `NID_RSA_SHA3_384`
- `CTC_SHA3_512wRSA` -> `NID_RSA_SHA3_512`
- `CTC_SHAwECDSA` -> `NID_ecdsa_with_SHA1`
- `CTC_SHA224wECDSA` -> `NID_ecdsa_with_SHA224`
- `CTC_SHA256wECDSA` -> `NID_ecdsa_with_SHA256`
- `CTC_SHA384wECDSA` -> `NID_ecdsa_with_SHA384`
- `CTC_SHA512wECDSA` -> `NID_ecdsa_with_SHA512`
- `CTC_SHA3_224wECDSA` -> `NID_ecdsa_with_SHA3_224`
- `CTC_SHA3_256wECDSA` -> `NID_ecdsa_with_SHA3_256`
- `CTC_SHA3_384wECDSA` -> `NID_ecdsa_with_SHA3_384`
- `CTC_SHA3_512wECDSA` -> `NID_ecdsa_with_SHA3_512`
- `DSAk` -> `NID_dsa`
- `RSAk` -> `NID_rsaEncryption`
- `ECDSAk` -> `NID_X9_62_id_ecPublicKey`
2021-10-21 13:01:57 +02:00
Jacob Barthelmeh
12f86b020a
clean up test case memory and common name size
2021-10-20 17:13:34 -06:00
Sean Parkinson
817cd2f2a6
Merge pull request #4487 from haydenroche5/openssh
...
Make several changes to support OpenSSH 8.5p1.
2021-10-21 08:59:38 +10:00
Sean Parkinson
ac3612bbef
Merge pull request #4469 from dgarske/android_keystore
...
Support for Android KeyStore compatibility API's
2021-10-21 08:30:08 +10:00
Sean Parkinson
a9f467a6b0
Merge pull request #4457 from dgarske/zd13036
...
Fix for sniffer to trap negative size calculation
2021-10-21 08:17:52 +10:00
John Safranek
ff8e7609f5
Merge pull request #4458 from kosmas-valianos/SkipCRLnoCDP
2021-10-20 13:45:58 -07:00
Jacob Barthelmeh
f57801c17b
more name constraint test cases and adjust DNS base name matching to not require .
2021-10-20 14:25:02 -06:00
Hayden Roche
864f913454
Make several changes to support OpenSSH 8.5p1.
...
- Permit more wolfSSL_EC_POINT_* functions for FIPS builds. This requires one
workaround in wolfSSL_EC_POINT_mul where wc_ecc_get_generator isn't available.
- Permit more AES-GCM code in EVP code for FIPS v2 builds. It's unclear why this
code wasn't already available.
- Add EVP_CIPHER_CTX_get_iv to the compatibility layer.
- Clear any existing AAD in the EVP_CIPHER_CTX for AES-GCM when we receive the
EVP_CTRL_GCM_IV_GEN control command. OpenSSL does this, and OpenSSH is relying
on this behavior to use AES-GCM correctly.
- Modify ecc_point_test in testwolfcrypt so that it doesn't fail when doing a
FIPS build with HAVE_COMP_KEY defined.
2021-10-20 11:00:42 -07:00
John Safranek
e572c6b9d7
Merge pull request #4486 from dgarske/set_secret
2021-10-20 10:54:13 -07:00
David Garske
1d6c7b542d
Update the user_settings.h template for Android, based on final testing.
2021-10-20 10:10:15 -07:00
David Garske
6d2a5fab9b
Added test cases for EVP_PKCS82PKEY and EVP_PKEY2PKCS8.
2021-10-20 09:18:13 -07:00
Jacob Barthelmeh
ab6939d200
add new test cert to make dist
2021-10-19 23:34:03 -06:00
Jacob Barthelmeh
e0e43b6a16
clean up test case
2021-10-19 23:12:07 -06:00
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
David Garske
4e7ce45a8c
Allow loading public key with PK callbacks also.
2021-10-19 17:04:18 -07:00
David Garske
de8798f4be
Fix API unit tests where DH 3072-bit is not enabled.
2021-10-19 17:04:18 -07:00
David Garske
a03ed32380
Support for Android KeyStore compatibility API's:
...
* Adds `EVP_PKCS82PKEY` and `d2i_PKCS8_PRIV_KEY_INFO`.
* Adds `EVP_PKEY2PKCS8` and `i2d_PKCS8_PRIV_KEY_INFO`.
* Adds `ECDSA_verify`.
* Fix to allow `SHA256()` and `MD5()` with FIPSv2.
* Decouple crypto callbacks and hash flags
* Fix for possible use of uninitialized when building TLS bench without TLS v1.3.
* Fix for building with `NO_CHECK_PRIVATE_KEY`. Test `./configure --disable-pkcs12 --enable-opensslextra CFLAGS="-DNO_CHECK_PRIVATE_KEY"`.
* Fix to support `RSA_public_decrypt` for PKCSv15 only with FIPS.
* Cleanup `RSA_public_encrypt`, `RSA_public_decrypt` and `RSA_private_decrypt`.
* Added instructions for building wolfSSL with Android kernel.
2021-10-19 17:04:18 -07:00
David Garske
00bdc69284
Fix for wolfSSL_set_secret with DTLS where TLS v1.3 is not defined. Function assumed ssl->arrays->preMasterSecret was allocated.
2021-10-19 16:22:39 -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
Sean Parkinson
93f033823c
Merge pull request #4482 from miyazakh/mindowngarde_staticrsa
...
TLS 1.3: ServerHello downgrade with no extensions fix
2021-10-20 07:58:34 +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
David Garske
dcb2ebba39
Fix for openssl.test extraction of version and cipher suites. Fix mem tracking to use stderr. Fix client version print to use single printf with newline.
2021-10-19 13:00:25 -07:00
Eric Blankenhorn
c0b592ef82
Fix build error with WOLFSSL_USER_IO
2021-10-19 08:27:43 -05:00
Hideki Miyazaki
91cd2b1731
TLS 1.3 ServerHello additional fix for PR4439 in Static RSA case
2021-10-19 17:51:00 +09:00
Daniel Pouzzner
768496be4a
scan-build LLVM-13 fixes: in examples/echoclient/echoclient.c, remove frivolous "break;", avoiding need to pragma-ignore clang -Wunreachable-code-break.
2021-10-18 21:46:10 -05:00
Daniel Pouzzner
e341291d99
scan-build LLVM-13 fixes: tests/api.c: fix -Wunused-but-set-variable for drive_len in test_wolfSSL_EVP_Cipher_extra() by removing the unused drive_len code.
2021-10-18 21:46:10 -05:00
Daniel Pouzzner
69bc801c13
scan-build LLVM-13 fixes: src/ssl.c: work around deadcode.DeadStores warning in wolfSSL_X509_REQ_sign() in a different way, avoiding WC_MAYBE_UNUSED.
2021-10-18 21:46:09 -05:00
Daniel Pouzzner
76332069ea
examples/client/client.c: remove frivolous break to avoid need for PRAGMA_CLANG("clang diagnostic ignored \"-Wunreachable-code-break\"").
2021-10-18 21:46:09 -05: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
007f01e7ec
scan-build LLVM-13 fixes: in src/tls.c TLSX_PopulateExtensions(), avoid -Wunreachable-code-return by refactoring iteration to use an array terminator (a new "WOLFSSL_NAMED_GROUP_INVALID" with value 0) rather than a compile-time-calculated constant of iteration.
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
f621a93081
more scan-build LLVM-13 fixes and expanded coverage: deadcode.DeadStores in client.c and server.c (no functional changes).
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
Sean Parkinson
7447a567e1
Merge pull request #4480 from JacobBarthelmeh/fuzzing
...
sanity check on q value with DSA sign
2021-10-19 11:10:51 +10:00
Sean Parkinson
84b845c65b
Merge pull request #4478 from maximevince/zephyr-user-settings-override
...
Zephyr: Rename leftover CONFIG_WOLFSSL_OPTIONS_FILE
2021-10-19 09:51:15 +10:00
David Garske
a50d1f4870
Merge pull request #4301 from julek-wolfssl/issue-4298
...
`mem_buf` only used with memory BIO
2021-10-18 10:29:55 -07:00
Jacob Barthelmeh
c07a7deec2
sanity check on q value with DSA sign
2021-10-18 10:17:49 -06:00
Maxime Vincent
77895ac964
Rename leftover CONFIG_WOLFSSL_OPTIONS_FILE to CONFIG_WOLFSSL_SETTINGS_FILE
...
Signed-off-by: Maxime Vincent <maxime@veemax.be >
2021-10-16 15:43:21 +02: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
David Garske
b2c003d7d4
Fix for sniffer to trap negative sslBytes. Revert logic from PR 3493 blocking out of range sequence numbers. Fix ack sequence rollover logic. ZD13036
2021-10-15 11:31:53 -07: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
Sean Parkinson
b2b39f01b7
Merge pull request #4474 from cconlon/includekds
...
include IDE/KDS in make dist archive
2021-10-15 08:33:23 +10:00
Chris Conlon
7bd92e606b
Merge pull request #4473 from JacobBarthelmeh/dks7g2
...
Update DK-S7G2 README.md
2021-10-14 16:29:08 -06:00
Eric Blankenhorn
17e0249a26
Fixing NO_BIO and OPENSSL_ALL errrors
2021-10-14 16:03:52 -05:00
Chris Conlon
228f1e233a
include IDE/KDS in make dist archive
2021-10-14 14:01:19 -06:00
Jacob Barthelmeh
82a1c4b9f1
Update DK-S7G2 README.md
2021-10-14 13:09:42 -06: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
61bab6f68b
Fix test build errors with NO_BIO
2021-10-14 09:37:01 -05:00
Eric Blankenhorn
1396c46281
Fix build errors with NO_BIO config
2021-10-14 09:06:54 -05:00
Sean Parkinson
4c70ac73f1
Merge pull request #4467 from dgarske/smtp
...
Example client: fix for SMTP temp buffer size
2021-10-14 08:16:42 +10: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
Chris Conlon
cc63668691
Merge pull request #4445 from TakayukiMatsuo/tsip113
...
Add support for TSIPv1.13
2021-10-13 09:26:58 -06: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
bc97539756
Increase the size of the temp buffer for starttls. Some SMTP servers send larger messages.
2021-10-12 15:13:38 -07:00
David Garske
b9b5661550
Merge pull request #4465 from LinuxJedi/stm32-fixes
...
Minor STM32F1 fixes
2021-10-12 11:57:18 -07:00
Andrew Hutchings
66c4b6d270
Improve STM32 documentation
...
Walk through how to create a new STM32CubeMX project for wolfSSL.
2021-10-12 17:13:41 +01: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
David Garske
f20f883e94
Merge pull request #4464 from SparkiDev/tls_hs_state_fix
...
TLS: don't set the handshake state to the record type
2021-10-12 08:18:17 -07:00
Daniele Lacamera
ec78b2e368
Merge pull request #4322 from dgarske/se050_branch
...
NXP SE050 Support
2021-10-12 07:37:58 -07:00
Sean Parkinson
6fbc9be71a
Merge pull request #4462 from guidovranken/zd13048
...
Check return value of mp_grow in mp_mod_2d
2021-10-12 11:36:59 +10:00
Sean Parkinson
544e64f9e4
TLS: don't set the handshake state to the record type
2021-10-12 08:52:58 +10:00
Sean Parkinson
69d5405e91
Merge pull request #4350 from cconlon/pythonCompatD
...
OpenSSL compatibility fixes: BIO_set_nbio(), SHA3 NID, WOLFSSL_PYTHON
2021-10-12 08:14:34 +10: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
2028d8b63d
Add missing se050_port.h.
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
Sean Parkinson
b8c4e89ea0
Merge pull request #4460 from dgarske/test_init
...
Refactor API unit test named initializer code for `callback_functions`
2021-10-11 08:25:38 +10:00
Sean Parkinson
511c74ea52
Merge pull request #4456 from dgarske/zd13032
...
Fix to not try OCSP or CRL checks if there is already an error
2021-10-11 08:20:58 +10: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
a395305cab
Refactor API unit test named initializer code for callback_functions, to avoid older g++ build issues.
2021-10-08 14:04:21 -07:00
JacobBarthelmeh
f757318eeb
Merge pull request #4454 from dgarske/static_mem
...
Fix for `Bad memory_mutex lock` on static memory cleanup
2021-10-09 00:13:10 +07:00
Kosmas Valianos
8760f39476
Skip CRL verification in case no CDP in peer cert
2021-10-08 13:16:08 +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
668f8700a4
Fix to not try OCSP or CRL checks if there is already an error. This fix prevents an error code from being overwritten if there is already a failure. ZD13032
2021-10-07 15:30:16 -07: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
elms
8c178118a4
Configure: add option to enable alternate certificate chains ( #4455 )
2021-10-07 11:14:51 +10: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
David Garske
928f4ad430
Merge pull request #4452 from LinuxJedi/stm32-readme-fix
...
Fixes to STM32 README
2021-10-06 10:07:41 -07:00
David Garske
9f57345614
Fix for Bad memory_mutex lock on static memory cleanup (was free'ing mutex then trying to use it).
2021-10-05 13:46:42 -07:00
David Garske
da15356c2a
Merge pull request #4444 from anhu/pq_bench
...
Benchmarking the supported groups.
2021-10-05 09:52:51 -07:00
JacobBarthelmeh
43ffe26133
Merge pull request #4430 from embhorn/zd12976
...
Add support for X9.42 header
2021-10-05 23:47:42 +07:00
Andrew Hutchings
fd54dc4838
Fixes to STM32 README
...
* Reordered things so that the installation of the Cube Pack comes
before the Cube Pack usage.
* Added another way to find the pack installation menu (because I'm
blind to the box on the screen apparently).
* Two extra steps in the Cube Pack Usage that were missing (6 & 8)
* Added syntax highlighting to the markdown.
2021-10-05 14:19:35 +01:00
David Garske
310a75ff43
Merge pull request #4449 from SparkiDev/fix_1
...
X509 name: remove unused variable
2021-10-04 20:01:04 -07:00
David Garske
024c59a04c
Merge pull request #4439 from SparkiDev/tls13_min_down_no_ext
...
TLS 1.3: Check min downgrade when no extensions in ServerHello
2021-10-04 16:39:29 -07:00
Sean Parkinson
152da35ca4
X509 name: remove unused variable
2021-10-05 09:06:10 +10:00
Anthony Hu
41b9b14cfb
whitespace
2021-10-04 18:35:09 -04:00
Anthony Hu
f77a5e26b5
semi-colon --> colon and use wolfTLSv1_3_server_method when NO_WOLFSSL_CLIENT.
2021-10-04 18:31:28 -04:00
Jacob Barthelmeh
b582e152ea
add test case max error queue size
2021-10-04 14:52:05 -06:00
Anthony Hu
310ab6692a
Drop a function brace and WOLFSSL_TLS13.
2021-10-04 13:56:01 -04: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
Anthony Hu
0bee624ee5
Merge pull request #4447 from lealem47/oqs-doc
2021-10-04 13:03:46 -04:00
Eric Blankenhorn
1440b8966d
Add test for X9.42 parsing
2021-10-04 11:05:58 -05:00
Lealem Amedie
4084928d93
Slight changes to liboqs documentation in INSTALL and example client/server
2021-10-02 13:14:32 -06:00
TakayukiMatsuo
72ea8dffe2
Add support for TSIPv1.13
2021-10-02 07:03:12 +09:00
David Garske
0abbd9b1ec
Merge pull request #4438 from ejohnstown/dtls-big
...
DTLS Related Fixes
2021-10-01 13:04:20 -07:00
Anthony Hu
2fa0114d54
Benchmarking the supported groups.
2021-10-01 15:38:07 -04: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
774bc36603
Merge pull request #4061 from JacobBarthelmeh/sessionExport
2021-10-01 10:21:42 -07:00
John Safranek
cd2bd0b7a3
Enable All Disable DTLS fixes
...
1. Remove mcast and jni from enable-all.
2. Add comment to DTLS section.
Testing `./configure --enable-all --disable-dtls` would leave DTLS still
enabled. enable-all was also enabling mcast, which it doesn't need to
do, that would force DTLS back on. JNI also forces DTLS on. The other
language wrappers are not included in enable-all, so leave JNI out.
2021-10-01 09:56:58 -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
David Garske
a575595e5f
Merge pull request #4256 from SparkiDev/arm_keil_fix
...
SP ARM Thumb support for Keil and performance improvements
2021-10-01 07:10:41 -07:00
Sean Parkinson
4473e9335e
TLS 1.3: Check min downgrade when no extensions in ServerHello
...
TLS 1.3 ServerHello must have extensions, so server attempting to
downgrade, but min downgrade was not checked in that case.
2021-10-01 12:51:10 +10:00
David Garske
66a6153456
Merge pull request #4436 from elms/makefile/add_ed448
...
GCC makefile: Add sources files
2021-09-30 18:44:36 -07:00
Sean Parkinson
ca002b5ee9
ASN: tidy up SetAsymKeyDerPublic()
...
Also, nighlty PowerPC Jenkins test complained of use of uninitialized in
function. Ensure vars initialized despite not needing it.
2021-10-01 10:44:07 +10:00
Sean Parkinson
6300989937
SP: Thumb assembly for older Keil compilers and optimize
...
Improve the generated instructions for multiplying 32 bits by 32 bits
and squaring 32 bits with 64 bit results.
Minimize loads in montgomery reduction, mul and sqr.
Pull conditional subtract into montgomery reduction assembly code.
Added unrolled square and multiply
Define WOLFSSL_SP_LARGE_CODE to use the unrolled versions.
2021-10-01 09:52:29 +10:00
John Safranek
98b1e93429
Merge pull request #4402 from JacobBarthelmeh/Compatibility-Layer
2021-09-30 15:53:58 -07:00
elms
f1a0d00f4e
GCC Makefile: wrap async and selftest
2021-09-30 15:51:19 -07:00
Jacob Barthelmeh
ed8b87306d
account for test case where psk and anon is off
2021-09-30 15:48:55 -06:00
John Safranek
b0de40d10a
Forgive a DTLS session trying to send too much at once. (ZD12921)
2021-09-30 14:27:21 -07:00
elms
2dfc3f308b
GCC makefile: Add other missing source files
2021-09-30 14:25:15 -07:00
John Safranek
998c7a9cb9
Merge pull request #4435 from anhu/docfix
2021-09-30 09:50:38 -07:00
Jacob Barthelmeh
cb4b57c5c7
add tls 1.3 test case
2021-09-30 10:08:47 -06:00
Anthony Hu
833c9d3f71
Fix INSTALL file to specify levels.
2021-09-30 09:43:32 -04:00
Sean Parkinson
38cfec89e8
ARMv8: fix configurations
...
Poly1305: poly1305_block() is void for ARMv8 ASM
SHA512: explicitly include cryptocb.h.
AES: set keylen for EVP API
AES: Implement streaming AES-GCM.
2021-09-30 10:33:08 +10:00
Chris Conlon
cf1ce3f073
Add get_default_cert_file/env() stubs, SSL_get/set_read_ahead(), SSL_SESSION_has_ticket/lifetime_hint() ( #4349 )
...
* add wolfSSL_X509_get_default_cert_file/file_env/dir/dir_env() stubs
* add SSL_get_read_ahead/SSL_set_read_ahead()
* add SSL_SESSION_has_ticket()
* add SSL_SESSION_get_ticket_lifetime_hint()
* address review feedback - comments, return values
* make SSL_get_read_ahead() arg const
* add unit tests for SESSION_has_ticket/get_ticket_lifetime_hint
* test for SESSION_TICKET_HINT_DEFAULT in api.c for wolfSSL_SESSION_get_ticket_lifetime_hint()
* fix variable shadow warning in api.c
2021-09-30 08:35:23 +10:00
Chris Conlon
bcd6930581
Various OpenSSL compatibility expansion items, for Python 3.8.5 ( #4347 )
...
* make ASN1_OBJECT arg const in OBJ_obj2txt
* add ERR_LIB values to openssl/ssl.h
* add missing alert type definitions in openssl/ssl.h
* add definition for X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS, no support
* define value for X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT
* use correct CRYPTO_THREADID arg type for wolfSSL_THREADID_set_callback callback
* add handshake type defines for compat layer message callback types
* define ASN1_R_HEADER_TOO_LONG for compatibility builds
* use correct return type for wolfSSL_THREADID_set_callback, remove Qt code no longer needed
2021-09-30 08:32:49 +10:00
Chris Conlon
95b9fae605
Add DIST_POINT compatibility functions ( #4351 )
...
* add DIST_POINT compatibility functions
* switch X509_LU_* from enum to define, prevent compiler type warnings
* refactoring, adding in comments, and formating
* refactoring and a memory leak fix
* cast return value for g++ warning
* refactor wolfSSL_sk_DIST_POINT_pop_free and remove NULL assign after free
* fix get next DIST_POINT node for free function
Co-authored-by: Jacob Barthelmeh <jacob@wolfssl.com >
2021-09-30 08:27:39 +10:00
Jacob Barthelmeh
707385724e
adjust macro guard around test cases
2021-09-29 13:28:20 -06:00
Jacob Barthelmeh
5f9f6fd9fa
add some test cases and use allocator
2021-09-29 12:02:26 -06:00
David Garske
ecf7dea6a1
Merge pull request #4433 from anhu/unit_tests
...
Unit tests for post-quantum groups.
2021-09-29 10:31:00 -07:00
Jacob Barthelmeh
dd7b62d067
fix for use with idea enabled
2021-09-29 11:15:51 -06:00
elms
f46f69c1dc
GCC makefile: Add ed448 files
2021-09-29 08:17:44 -07:00
Jacob Barthelmeh
ae47cb3bcd
update check on is TLS, update macro guard for test case
2021-09-28 16:57:30 -06:00
Anthony Hu
a55cedd357
Fixup in response to dgarske comments
2021-09-28 18:36:18 -04:00
Anthony Hu
0e80923fb3
Unit tests for post-quantum groups.
...
Also, fixes for the things they caught such as:
- ssl->arrays->preMasterSecret is pre-allocated so copy into it instead of
moving ownership of buffer.
- server does not need to save the public key.
- in TLSX_KeyShare_Parse() don't call TLSX_KeyShare_Use() because its done in
TLSX_PopulateExtensions().
- in TLSX_KeyShare_Use(), the server generates the ciphertext while the client
generates the public key.
- in TLSX_PopulateExtensions(), prevent client from calling TLSX_KeyShare_Use()
because its already been done.
- Support longer curve/group names.
2021-09-28 17:16:44 -04:00
David Garske
f4be011b91
Merge pull request #4432 from haydenroche5/cmake_user_settings
...
Don't automatically set BUILD_ED25519_SMALL and BUILD_CURVE25519_SMALL in the CMake build when using user_settings.h.
2021-09-28 14:01:39 -07:00
John Safranek
a4f927999f
Merge pull request #4431 from haydenroche5/is_on_curve_fips
...
Don't compile wolfSSL_EC_POINT_is_on_curve for FIPS.
2021-09-28 09:42:08 -07:00
Hayden Roche
a9870d59a3
Don't automatically set BUILD_ED25519_SMALL and BUILD_CURVE25519_SMALL in the
...
CMake build when using user_settings.h.
See https://github.com/wolfSSL/wolfssl/pull/4367 for the same change to the
autotools build.
2021-09-28 09:00:50 -07:00
Hayden Roche
6a0bc995a0
Don't compile wolfSSL_EC_POINT_is_on_curve for FIPS.
...
This function uses wc_ecc_point_is_on_curve, which isn't in the current (v2)
FIPS module.
2021-09-27 16:08:04 -07:00
David Garske
847b8f9a1f
Reduce openssl verbosity in BIO due to PEM_X509_INFO_read_bio reading 1 byte at a time. Remove duplicate PEM_X509_INFO_read_bio macro. ( #4428 )
2021-09-28 08:21:23 +10:00
Eric Blankenhorn
702ba65b1c
Add support for X9.42 header
2021-09-27 15:37:11 -05:00
Jacob Barthelmeh
6e7c6e8a66
add comments to dox header file
2021-09-27 14:01:15 -06:00
Jacob Barthelmeh
41f3a006ac
sanity check on padding size imported
2021-09-27 14:01:15 -06:00
Jacob Barthelmeh
21181f2437
canned test was made without the wolfssl_idea enum on
2021-09-27 14:01:15 -06:00
Jacob Barthelmeh
13478a94a8
sanity check on block size with block cipher type
2021-09-27 14:01:15 -06:00
Jacob Barthelmeh
8b456b90e0
add test case for tls export/import
2021-09-27 14:01:15 -06:00
Jacob Barthelmeh
1929024029
fix for getting export buffer size
2021-09-27 14:01:15 -06:00
Jacob Barthelmeh
64f53c4e1b
fix macro name and make api public
2021-09-27 14:01:15 -06:00
Jacob Barthelmeh
22b6cc675a
add import/export of peer info with tls
2021-09-27 14:01:15 -06:00
Jacob Barthelmeh
2871fc670f
initial serialization of TLS session
2021-09-27 14:00:13 -06:00
David Garske
943c98a45e
Fix some PKCS11 warnings and spelling errors. ( #4427 )
2021-09-27 08:23:48 +10:00
David Garske
3bdce348e9
Added NID_pkcs9_contentType and ub_ to compatibility layer ( #4408 )
...
* Added `NID_pkcs9_contentType` and `ub_` values. ZD 11742
* Improve the API unit test. Also only include when `WOLFSSL_CERT_REQ` defined.
2021-09-27 08:21:53 +10:00
Chris Conlon
9e4ab9b638
Add BIO_up_ref(), PEM_read_DHparam(), EVP_MD_nid() ( #4348 )
...
* add BIO_up_ref
* add PEM_read_DHparams()
* add EVP_MD_nid()
* exclude PEM_read_DHparams when NO_FILESYSTEM defined
* review feedback: single threaded, indents, EVP_MD_nid
2021-09-27 08:20:37 +10:00
Juliusz Sosinowicz
32e4d5ad70
Use record size instead of buffer size to validate alert length ( #4425 )
2021-09-27 08:05:13 +10:00
Hayden Roche
709a84f8b5
Add support for libwolfcrypttest and libwolfcryptbench to autotools flow.
...
These can be built by configuring with `--enable-crypttests-libs`.
2021-09-25 10:31:06 -07:00
Hayden Roche
302938d3c6
Improve wolfcrypt test/bench library comments.
...
These can be built as shared libraries, too, so the comments shouldn't be
specific about static libraries.
2021-09-25 10:30:01 -07:00
John Safranek
7319627533
Merge pull request #4423 from elms/gcc_makefile_options
...
GCC makefile: allow overriding and provide more flexibility
2021-09-24 14:07:48 -07:00
Hayden Roche
9634a54b8f
Improve CMake build option handling.
...
Prior to this commit, we only allowed CMake options to be specified according to
a finite set of values. For example if an option "WOLFSSL_FEATURE" was permitted
to take only the values "yes" and "no" and a user ran
`cmake -DWOLFSSL_FEATURE=ON`, that would fail because ON isn't in `[yes, no]`.
However, this behavior runs counter to CMake's way of evaluating boolean values,
which permits a variety of values that evaluate to true/false (see
https://cmake.org/cmake/help/latest/command/if.html#basic-expressions ). This
commit will allow the user to specify any value for a build option. If it's not
in the predefined set of values, we use CMake's "if" logic to reduce the value
to yes or no.
2021-09-24 13:54:18 -07:00
Hayden Roche
ec857f6f62
Add a CMake option to build wolfcrypt test and bench code as static libs.
...
Application code can use the resulting CMake targets or the static library
artifacts directly (e.g. libwolfcrypttest.a on *nix).
2021-09-24 13:54:18 -07:00
elms
690b7d9800
GCC makefile: fix warning for hard fault format strings
2021-09-24 10:47:47 -07:00
TakayukiMatsuo
0bf832bd2a
fix uninitialized variables
2021-09-24 23:22:04 +09:00
TakayukiMatsuo
5b3dfabc32
Introduce global protoVerTbl for SSL_CTX_set_min/max_proto_version
2021-09-24 16:05:55 +09:00
David Garske
8169e12975
Merge pull request #4424 from SparkiDev/rsa_dec_pkcs15
...
RSA: cast bitwise negate value to byte before converting to int
2021-09-23 21:47:36 -07:00
Hayden Roche
24e2eded1e
Add to the OpenSSL compatibility layer. ( #4404 )
...
- X509_get_extension_flags
- X509_get_key_usage
- X509_get_extended_key_usage
- ASN1_TIME_to_tm
- ASN1_TIME_diff
- PEM_read_X509_REQ
- ERR_load_ERR_strings
- BIO_ssl_shutdown
- BIO_get_ssl
- BIO_new_ssl_connect
- BIO_set_conn_hostname
2021-09-24 12:26:53 +10:00
Sean Parkinson
d5a803d81d
RSA: cast bitwise negate value to byte before converting to int
2021-09-24 09:18:49 +10:00
Anthony Hu
33cb823148
Remove legacy NTRU and OQS ( #4418 )
...
* Remove NTRU and OQS
* Keep the DTLS serialization format backwards compatible.
* Remove n from mygetopt_long() call.
* Fix over-zealous deletion.
* Resolve problems found by @SparkiDev
2021-09-24 08:37:53 +10:00
Elms
23f4aadf27
GCC makefile: allow overriding and provide more flexibility
...
- older GCC and additional platforms
- `NO_EXAMPLES` to exclude building .o files
- add FIPS optional
2021-09-23 14:55:34 -07:00
John Safranek
79787eaaa4
Merge pull request #4419 from anhu/set1_groups_list
...
Make quantum-safe groups available to the compatibility layer.
2021-09-23 10:28:02 -07:00
Chris Conlon
82a3d79c2f
unnecessary variable init, else formatting in bio.c
2021-09-23 11:26:17 -06:00
John Safranek
a4609c612f
Merge pull request #4413 from kabuobeid/wpas_keying
...
Add HAVE_KEYING_MATERIAL requirement to WPAS, to use wolfSSL_export_keying_material
2021-09-23 10:20:34 -07:00
John Safranek
8818df2d34
Merge pull request #4415 from elms/ppc/define_gates_64bit_literals
...
Define gate fixes and sha3 64bit literal definitions
2021-09-23 10:18:03 -07:00
Anthony Hu
58a02495fe
Make the quantum-safe groups available to the OpenSSL compatibility layer.
2021-09-22 15:28:44 -04:00
Daniel Pouzzner
b716c88e01
smallstack refactors for ge_double_scalarmult_vartime(), sp_ModExp_4096(), and sp_DhExp_4096().
2021-09-22 13:58:05 -05:00
Eric Blankenhorn
e6e7795140
Make subj alt name order match openSSL ( #4406 )
2021-09-22 10:29:57 +10:00
John Safranek
df30a88dc6
Merge pull request #4414 from JacobBarthelmeh/devcrypto
...
update macro guard on SHA256 transform call
2021-09-21 10:03:51 -07:00
John Safranek
63a3eef97a
Merge pull request #4403 from dgarske/zd12852_sniffer
...
Sniffer improvements for handling TCP ack unseen and retransmission issues
2021-09-21 09:53:27 -07:00
John Safranek
7ec7faddef
Merge pull request #4405 from anhu/truncating_last_char
...
Fix for `set1_curves_list` ignoring last character
2021-09-21 08:49:53 -07:00
David Garske
34c6e8f975
Merge pull request #4407 from douzzer/linuxkm-SIMD-IRQ
...
linuxkm-SIMD-IRQ
2021-09-20 14:57:38 -07:00
Elms
ef33445316
Define gate fixes and sha3 64bit literal definitions
...
Found when supporting PPC750
2021-09-20 13:48:34 -07:00
Daniel Pouzzner
6d715130a2
linuxkm: cleanups and smallstack refactors related to WOLFSSL_LINUXKM_SIMD_X86_IRQ_ALLOWED, associated linuxkm-SIMD-IRQ PR, and associated peer review:
...
smallstack refactors for wolfcrypt/src/rsa.c:wc_CheckProbablePrime_ex() and wolfcrypt/src/pwdbased.c:wc_PKCS12_PBKDF_ex();
add WARN_UNUSED_RESULT macro to types.h;
text format cleanup;
fix internal.c:LowResTimer() implementation.
refactor tls13.c:TimeNowInMilliseconds() for kernel 4.9 and 3.16 compat.
use ktime_get_coarse_real_ts64() only for kernel 5.x+. in kernel 4.x, use its older form, current_kernel_time64(), and in 3.x, use getnstimeofday().
linuxkm/module_hooks.c: fix wolfssl_init() pie code to be compatible with kernel 4.4-;
fix allocate_wolfcrypt_irq_fpu_states() return codes to all be wolfcrypt codes, and in calling code, pass up that code (suggested by dgarske peer review).
2021-09-20 13:46:51 -05:00
Daniel Pouzzner
ec21dd6d13
miscellaneous buildability fixes:
...
configure.ac: fix ed25519/sha512 dependency test to not misfire when ENABLED_32BIT;
wolfssl/wolfcrypt/curve{25519,448}.h: fix redundant typedefs of curve{25519,448}_key (fixes -Wpedantic warnings);
configure.ac: fix for "ISO C forbids an empty translation unit [-Werror=pedantic]", re wolfcrypt/src/sp_c{32,64}.c;
configure.ac: fixes for --enable-32bit versus pedantic "ISO C forbids an empty translation unit", including explicit exclusion of 32bit-incompatible algorithms from enable-all and enable-all-crypto sets;
tests/api.c: fixes for a couple inadequately gated SHA2 dependencies;
tests/api.c:test_wolfSSL_set_alpn_protos(): fix prototype missing (void);
wolfcrypt/src/misc.c and wolfssl/wolfcrypt/misc.h: fix ForceZero() definition and NO_INLINE prototype to not counterfactually constify the mem ptr, to avoid -Wmaybe-uninitialized from gcc11;
wolfcrypt/src/des3.c: drop obsolete register qualifier from declaration in DesSetKey(), for c++17 compatibility;
src/ssl.c:wolfSSL_BN_mod_word(): fix cast of arg2 to mp_mod_d().
2021-09-20 13:38:52 -05:00
David Garske
753a931196
Merge pull request #4416 from SparkiDev/mp_submod_addmod_ct
...
SP math, TFM: constant time addmod, submod
2021-09-20 11:37:45 -07:00
David Garske
a62f103899
Merge pull request #4412 from anhu/level
...
Convert post-quantum algorithm group names
2021-09-20 11:27:20 -07:00
Daniel Pouzzner
83e0e19e03
linuxkm feature additions:
...
add build-time support for module signing using native Linux facility;
add support for alternative licenses using WOLFSSL_LICENSE macro;
improve load-time kernel log messages;
add support for sp-math-all asm/AVX2 acceleration;
add error-checking and return in SAVE_VECTOR_REGISTERS();
implement support for x86 accelerated crypto from interrupt handlers, gated on WOLFSSL_LINUXKM_SIMD_X86_IRQ_ALLOWED:
* wolfcrypt_irq_fpu_states
* am_in_hard_interrupt_handler()
* allocate_wolfcrypt_irq_fpu_states()
* free_wolfcrypt_irq_fpu_states()
* save_vector_registers_x86()
* restore_vector_registers_x86()
add WOLFSSL_LINUXKM_SIMD, WOLFSSL_LINUXKM_SIMD_X86, and WOLFSSL_LINUXKM_SIMD_ARM macros for more readable gating.
2021-09-20 10:27:13 -05:00
Daniel Pouzzner
2629b8b1fb
wolfcrypt/src/wc_port.c LINUXKM time(): use ktime_get_coarse_real_ts64 instead of ktime_get_real_seconds, to avoid GPL-only function, and fix the calculation in the kernel 3.x codepath.
2021-09-20 10:27:13 -05:00
Daniel Pouzzner
1209908468
tests/api.c: fix key size in test_wc_ecc_shared_secret().
2021-09-20 10:27:13 -05:00
Daniel Pouzzner
45e9872714
wolfcrypt/benchmark: fix output buffer size in bench_eccEncrypt().
2021-09-20 10:27:13 -05:00
Anthony Hu
ebf1168240
Documenting the level meanings
2021-09-20 10:11:49 -04:00
Anthony Hu
c733be728f
Trivial change to re-trigger jenkins.
2021-09-20 08:37:56 -04:00
Jacob Barthelmeh
f1ff3da47c
fix for case of long type on 32bit systems
2021-09-19 21:20:58 -06:00
Hayden Roche
ec0335cdb3
Use WOLFSSL_SUCCESS instead of 1.
2021-09-19 17:20:55 -07:00
Jacob Barthelmeh
1bf4dbfa32
rename enum value
2021-09-19 17:20:55 -07:00
Jacob Barthelmeh
3f534e7e07
return macro and macro guards
2021-09-19 17:20:55 -07:00
Chris Conlon
dae4d637c9
define SSL_OP_* in openssl/ssl.h for compatibility
2021-09-19 17:20:54 -07:00
Chris Conlon
b8c90b369e
bump openssl version for Python 3.8.5 port with WOLFSSL_PYTHON
2021-09-19 17:20:54 -07:00
Chris Conlon
0f344e4b64
add SHA3 NID and name info to wolfssl_object_info[]
2021-09-19 17:20:54 -07:00
Chris Conlon
f6b91f04ed
BIO_set_nbio() should always return 1, check input bio for NULL before using
2021-09-19 17:20:54 -07:00
Sean Parkinson
f63fac82cd
SP math, TFM: constant time addmod, submod
...
Improve performance of fp_submod_ct() and fp_addmod_ct().
Improve performance of sp_submod_ct() and sp_addmod_ct().
2021-09-20 10:12:21 +10:00
Kaleb Himes
9bd300e07d
AESNI in FIPS mode does not support zero length inputs ( #4411 )
...
* AESNI in FIPS mode does not support zero length inputs
* Update note to specifically note AESNI
2021-09-20 08:29:15 +10:00
JacobBarthelmeh
f447e4c1fa
update macro guard on SHA256 transform call
2021-09-17 15:06:13 -07:00
Kareem Abuobeid
5c3c2dd1bf
Add HAVE_KEYING_MATERIAL requirement to WPAS, to use wolfSSL_export_keying_material
2021-09-17 14:53:01 -07:00
JacobBarthelmeh
989179a94a
set value for number of protocols in table
2021-09-17 14:04:42 -07:00
David Garske
b14e9c1134
Sniffer improvements for handling TCP out of order, ack unseen and retransmission issues.
2021-09-17 13:16:39 -07:00
Anthony Hu
79cc6be806
Make jenkins happy
2021-09-17 15:50:06 -04:00
Jacob Barthelmeh
9ee96c484b
update macro guard
2021-09-17 13:17:05 -06:00
Anthony Hu
13d4722678
Convert post-quantum algorithm group names
...
... from using parameter set names from the papers to NIST levels.
2021-09-17 13:28:34 -04:00
John Safranek
ffa13f314b
Merge pull request #4409 from SparkiDev/tfm_submod_ct
...
TFM: fp_submod_ct fix check for greater
2021-09-17 08:41:20 -07:00
John Safranek
bb70fee1ec
Merge pull request #4390 from anhu/hybridizing
...
Hybridizing NIST ECC groups with the OQS groups.
2021-09-16 22:01:39 -07:00
Sean Parkinson
9623797064
TFM: fp_submod_ct fix check for greater
...
a can be greater than modulus.
Update fp_montgomery_reduce_mulx() to reflect the updates to
fp_montgomery_reduce_ex().
2021-09-17 10:12:07 +10:00
JacobBarthelmeh
ff963e7259
fall back to previous version if PRF not compiled in
2021-09-16 14:08:12 -07:00
Anthony Hu
5151cc289e
Make clang happy.
2021-09-16 14:41:19 -04:00
John Safranek
4380e8b94a
Merge pull request #4391 from JacobBarthelmeh/Sniffer
...
add sanity check on buffer size
2021-09-16 09:36:48 -07:00
JacobBarthelmeh
f2bce42bbd
add function wolfSSL_CTX_get_max_proto_version and handling for edge cases
2021-09-16 01:01:38 -07:00
JacobBarthelmeh
60aa7b9a62
compat layer adjustments, pseudo rand update, fix for peek with ASN1_R_HEADER_TOO_LONG
2021-09-16 00:56:44 -07:00
John Safranek
3503be2c13
Merge pull request #4362 from JacobBarthelmeh/wolfCLU
...
add wolfclu enable option and remove test macro guard
2021-09-15 13:57:50 -07:00
Anthony Hu
07656e371c
Parameter sanity check and a unit test.
2021-09-15 16:29:55 -04:00
John Safranek
71e8d3ca3c
Merge pull request #4358 from SparkiDev/arm_sha512_crypto
...
AARCH64 SHA512: implementation using crypto instructions added
2021-09-15 09:51:09 -07:00
Anthony Hu
4f3c55988b
We were ignoring the last character of the group name.
2021-09-15 12:50:04 -04:00
Juliusz Sosinowicz
4ad8b07c1c
wolfSSL_PEM_write_bio_PUBKEY needs to write only the public part (#4354 )
...
* `wolfSSL_PEM_write_bio_PUBKEY` needs to write only the public part
The `wolfSSL_PEM_write_bio_PUBKEY` output can't contain the private portion of the key. This output could be used to distribute the public key and if it contains the private part then it gets leaked to others.
* Add heap hint to `wolfSSL_RSA_To_Der`
* Correct function name in logs
2021-09-15 17:34:43 +10:00
Sean Parkinson
17c2e9e1cd
AARCH64 SHA512: implementation using crypto instructions added
...
Use --enable-armasm=sha512-crypto or define WOLFSSL_ARMASM_CRYPTO_SHA512
to use SHA512 cryptographic instructions.
Checks system register for the feature before using the SHA512
instructions.
Added SHA512 input data alignment test.
Add support for SHA512/224 and SHA512/256 to ARM port.
2021-09-15 12:05:48 +10:00
David Garske
d86aed210b
Merge pull request #4398 from SparkiDev/cppcheck_fixes_7
...
cppcheck fixes and a config fix
2021-09-14 18:19:30 -07:00
Hideki Miyazaki
d9767207b7
call alpn selection call-back at server side only ( #4377 )
...
* call alpn selection call-back at server side only
* addressed review comment
* addressed jenkins failure
2021-09-15 10:02:18 +10:00
David Garske
3c21996002
Merge pull request #4353 from SparkiDev/pkcs11_static_link
...
PKCS #11 : support static linking with PKCS #11 library
2021-09-14 15:26:52 -07:00
David Garske
4be3b2b351
Merge pull request #4401 from embhorn/gh4400
...
Fix overflow check in ClientMemSend
2021-09-14 12:20:32 -07:00
David Garske
9c3d3ffcd2
Merge pull request #4396 from kabuobeid/iotsafe_header
...
Fix exporting iotsafe functions by adding missing include in iotsafe.c.
2021-09-14 10:01:44 -07:00
Eric Blankenhorn
2274d0b773
Fix overflow check in ClientMemSend
2021-09-14 11:17:01 -05:00
Juliusz Sosinowicz
bfbb445e06
Register cleanup with atexit for OpenSSL compat layer
2021-09-14 16:45:11 +02:00
Sean Parkinson
142c7a9892
cppcheck fixes and a config fix
...
./configure --disable-rsa --disable-ecc --disable-dsa
--enable-curve25519 --disable-ed25519 --disable-curve448
--disable-ed448 --enable-cryptonly
suites.c, testsuite.c: ensure port is an integer for snprintf.
unit.c: make memFailCount an integer for printf.
aes.c:
Reduce variable scope.
Check aes is not NULL before use in GHASH implementations.
XTS check sz is greater than or equal to a AES_BLOCK_SIZE rather than
0 as another block is processed.
wc_AesXtsEncrypt, wc_AesXtsEncrypt - simplify braces and ifdefs
wc_AesEcbEncrypt - subtracting from sz is unnecessary as is unused
after.
asn.c:
StoreKey, StoreEccKey - compiler doesn't see ret != 0 when publicKey
is NULL.
DecodeAuthInfo - count is not used when after break.
DecodeSubtree - don't use min and max as variables (already macros).
SetEccPublicKey - initialize pubSz and set sz regardless for
compiler's sake.
wc_EncodeName_ex - use unique variable 'namesASN'; ret isn't set after
last check.
SetEccPublicKey - simplify code by using else rather than check ret
wasn't set.
DecodeAsymKey - ret not modified in non-template implementaiton.
SetAsymKeyDer - ret still at initialized value here.
DecodeResponseData - ensure dataASN is freed when single->next->status
failed to allocate.
test.c:
curve255519_der_test() can't be compiled when NO_ASN is defined.
types.h:
cast to the appropriate type in EXIT_TEST
test.h
don't return anything when THREAD_RETURN is void and EXIT_TEST is for
threading with stack size.
2021-09-14 16:08:26 +10:00
Hideki Miyazaki
ab3bbf11e9
add ASN1_R_HEADER_TOO_LONG case ( #4392 )
...
* add ASN1_R_HEADER_TOO_LONG case
* addressed review comments
2021-09-14 12:32:30 +10:00
TakayukiMatsuo
c8bcfe4763
Add implementation to make wolfSSL_BIO_flush work for WOLFSSL_BIO_FILE ( #4395 )
2021-09-14 10:08:55 +10:00
Kareem
39ce723577
Fix exporting iotsafe functions by adding missing include in iotsafe.c.
2021-09-13 16:45:18 -07:00
Hideki Miyazaki
4d49ab6342
add store finished message on Tls13 ( #4381 )
...
* add to store finished message on Tls13
* addressed jenkins failure
* jenkins failures
sanity check for size before copying memory
* remove check of finishSz
* addressed review comments
2021-09-14 09:22:16 +10:00
David Garske
a65ab0c4af
Merge pull request #4189 from SparkiDev/sp_calc_vfy_check_ret
...
SP ECC: calc vfy point not check mod_inv return
2021-09-13 11:17:50 -07:00
David Garske
f08b1c49a9
Merge pull request #4371 from anhu/doc_update
...
Documentation fixup to reflect that we will error out if you set a ba…
2021-09-13 11:14:25 -07:00
Jacob Barthelmeh
f06414903c
fix for scan build warning and better check on size
2021-09-13 09:35:55 -06:00
David Garske
f64c22839e
Merge pull request #4380 from SparkiDev/fp_submod_ct_overflow
...
TFM: check size of inputs
2021-09-13 07:56:54 -07:00
David Garske
05ed3dc9ea
Merge pull request #4387 from SparkiDev/popen_host
...
Get host name: add code to use popen and the command 'host'
2021-09-13 07:55:45 -07:00
David Garske
51c1f27065
Merge pull request #4393 from SparkiDev/srp_test_1536
...
SRP test; increase size of N
2021-09-13 07:29:59 -07:00
David Garske
bce2c010de
Merge pull request #4394 from SparkiDev/regression_fixes_2
...
Fixes for configurations and a cppcheck fix
2021-09-13 07:22:24 -07:00
Sean Parkinson
c42573096a
Fixes for configurations and a cppcheck fix
...
configure --disable-shared --enable-opensslextra --enable-dsa
--enable-curve25519 --enable-ed25519 --enable-curve448 --enable-ed448
--enable-ocsp --enable-all --enable-asn=template
GetCertName() sets raw in ASN template code too.
GetBasicDate() not needed for template ASN.
SetAsymKeyDer() ASN template version now returns 0 when output is NULL
too.
./configure '--disable-shared' '--enable-curve25519' '--enable-ed25519'
'--disable-rsa' '--disable-ecc'
SetBitString() is needed now.
Close the file before return in wolfSSL_save_session_cache() and
wolfSSL_restore_session_cache().
2021-09-13 10:25:19 +10:00
Sean Parkinson
33028de0de
SRP test; increase size of N
...
SHA512 digest was sometimes too big for the 1024-bit N.
Increase N to 1536 bits to ensure no intermittent fails.
2021-09-13 09:18:26 +10:00
JacobBarthelmeh
4bd87a0c41
sanity check on pkcs7 input size ( #4386 )
2021-09-13 08:34:23 +10:00
Jacob Barthelmeh
602ec188ad
sanity checks on ed25519 private key decode
2021-09-10 21:51:18 -06:00
Jacob Barthelmeh
ae4766ae96
add sanity check on buffer size
2021-09-10 16:49:42 -06:00
David Garske
42db91e454
Merge pull request #4389 from SparkiDev/sha512_rework
...
SHA512: Tidy up and have Sha512_224/256 FinalRaw return smaller digest
2021-09-10 13:01:08 -07:00
Jacob Barthelmeh
93d805352f
move setting of ENABLED_MD5
2021-09-10 12:17:11 -06:00
Anthony Hu
1168d4ce49
changes to address dgarske's comments
2021-09-10 13:51:44 -04:00
Anthony Hu
c9cf39de64
Make jenkins windows happy?
2021-09-10 13:26:19 -04:00
Anthony Hu
fb733b4662
Hybridizing the OQS groups with NIST ECC groups.
2021-09-10 13:12:12 -04:00
Anthony Hu
5a5bc9c571
Remove NAMED_DH_MASK as its usage catches some OQS groups.
2021-09-10 09:44:12 -04:00
Sean Parkinson
cd8bff272c
SHA512: Tidy up and have Sha512_224/256 FinalRaw return smaller digest
...
Make code cleaner by passing in parameters instead of determining from
type.
Remove trailing whitespace.
2021-09-10 09:52:01 +10:00
Eric Blankenhorn
5e3f7d8778
Add return value checking for FREESCALE_RNGA ( #4388 )
2021-09-10 08:52:34 +10:00
elms
98f286d8cb
Consistent return value from SSL_CTX_load_verify_locations{,_ex} ( #4341 )
...
On any failure, return `WOLFSSL_FAILURE`
If there was a failure and a successful processing of certs from the
same directory, the return value depended on the last cert processed
which not guarenteed to be the same order. If the last cert load
failed, it would return the specific wolfSSL error code. If it
succeeded, then WOLFSSL_FAILURE would be returned as a generic failure
due to a previous cert error.
2021-09-10 08:45:13 +10:00
Eric Blankenhorn
649aa9c95f
Add error handling to wolfSSL_BIO_get_len ( #4385 )
2021-09-10 08:15:30 +10:00
Sean Parkinson
72486333c3
Get host name: add code to use popen and the command 'host'
...
When compiling for QEMU, the gethostbyname call doesn't have access to
the OS DNS.
Implemented a lookup of hostname that uses the system command host.
Fix for QEMU Aarch64 where 'char' is unsigned and the -1 return is being
converted to 255 in wolfSSL_OPENSSL_hexchar2int().
Test TLSv1.3 with www.google.com if wolfSSL supports it.
CMAC: cannot cast size_t* to word32* when big-endian.
SP math all: Random prime - munge bits before moving them around for
big-endian.
BIO, no filesystem: Allow BIO_prinf to be used with mem BIO.
2021-09-09 18:32:19 +10:00
Sean Parkinson
89dd1a65ca
TFM: check size of inputs
...
fp_submod_ct and fp_addmod_ct need modulus (c) words plus one.
Check that the modulus length is valid for fixed data array size.
Improved fp_submod_ct to only use as many words as necessary.
Added comments to fp_submod_ct and fp_addmod_ct.
2021-09-09 09:20:11 +10:00
JacobBarthelmeh
934b0ab572
free structure on error case ( #4383 )
2021-09-09 08:07:22 +10:00
David Garske
b6665df6a8
Fixes for sniffer handling of TCP spurious retransmission ( #4372 )
...
* Fix for sniffer to better handle spurious retransmission edge case. ZD 12852
* Fix for sniffer to not send alerts during application data processing.
* Fix for missing semi-colon on XFREE.
* Fix for `bench_stats_print` with stack variable name used in `bench_ecc`. Improve benchmark thread cleanup, CPU count calcuation and stat blocking logic.
2021-09-08 09:40:58 +10:00
JacobBarthelmeh
078e0a7379
add unlock of mutex in fail cases ( #4378 )
2021-09-08 08:51:34 +10:00
Hideki Miyazaki
a118de1043
copy sessionCtxSz ( #4375 )
2021-09-08 08:03:35 +10:00
David Garske
3ca1900528
Merge pull request #4379 from haydenroche5/cmake
...
Fix issue with CMake build where CMAKE_C_FLAGS is empty.
2021-09-07 14:15:18 -07:00
Hayden Roche
93d3739ae7
Fix issue with CMake build where CMAKE_C_FLAGS is empty.
2021-09-07 12:11:43 -07:00
Hideki Miyazaki
51a2f9de17
return value convention on compatibility layer ( #4373 )
...
* return value convention
* addressed review comments
* addressed review comment part2
* fix jenkins failures
2021-09-07 08:15:08 +10:00
Hideki Miyazaki
d4387493fb
keep CRLInfo at own cert memory ( #4374 )
2021-09-07 08:11:29 +10:00
Anthony Hu
10a4cfae9d
Documentation fixup to reflect that we will error out if you set a bad group identifier
2021-09-03 12:46:44 -04:00
Jacob Barthelmeh
4844f7598e
account for 32bit build with ed25519
2021-09-03 10:03:37 -06:00
TakayukiMatsuo
90116a2873
Add support for wolfSSL_EVP_PBE_scrypt ( #4345 )
2021-09-03 15:49:02 +10:00
David Garske
35cef831bf
Fix for missing heap hint with RSA PSS and WOLFSSL_PSS_LONG_SALT ( #4363 )
...
* Fix for missing heap hint with RSA PSS and `WOLFSSL_PSS_LONG_SALT`. This fix will only allocate buffer if it exceeds the local buffer. Added `wc_RsaPSS_CheckPadding_ex2` to support heap hint if required. Fixed asn.c build issue with `NO_CERTS`. Fixed several spelling errors in asn.c. ZD12855.
* Improve the dynamic memory NULL checking in `wc_RsaPSS_CheckPadding_ex2` with `WOLFSSL_PSS_LONG_SALT` defined.
2021-09-03 15:42:31 +10:00
David Garske
a3ee84bf6d
Merge pull request #4355 from anhu/check_support_of_group
...
BUGFIX: Its possible to send a supported group that is not supported.
2021-09-02 20:03:32 -07:00
David Garske
43cb7d5ada
Merge pull request #4368 from haydenroche5/cmake
...
Make sure CMAKE_C_FLAGS gets parsed for defines to add to options.h.
2021-09-02 20:01:08 -07:00
elms
fd77cb8918
fix wc_AesKeyWrap_ex and wc_AesKeyUnWrap_ex bound checks ( #4369 )
...
RFC3394 in must be at least 2 64-bit blocks and output is one block longer.
On Unwrapping the input must then be a minimum of 3 64-bit blocks
2021-09-03 12:48:01 +10:00
John Safranek
1662b01157
Merge pull request #4367 from julek-wolfssl/zd12834
...
Changes for ED25519 and `HAVE_SECRET_CALLBACK`
2021-09-02 15:46:44 -07:00
Jacob Barthelmeh
c412d23b07
add wolfclu enable option
2021-09-02 16:46:38 -06:00
Kaleb Himes
a9a1158f46
Remove test cases not supported by ARM64_ASM in FIPS mode - OE25 ( #4342 )
2021-09-03 08:37:34 +10:00
Anthony Hu
26c7592d4b
leantls only supports secp256r1.
2021-09-02 17:38:04 -04:00
Hayden Roche
12d7487774
Make sure CMAKE_C_FLAGS gets parsed for defines to add to options.h.
...
For example, if a user does
```
cmake -DCMAKE_C_FLAGS="-DWOLFSSL_AESGCM_STREAM -DFP_MAX_BITS=16384" ..
```
definitions for `WOLFSSL_AESGCM_STREAM` and `FP_MAX_BITS 16384` should wind up
in options.h (same as the autotools build).
2021-09-02 13:00:24 -07:00
Anthony Hu
428fe29537
Remove authentication related logic from TLSX_ValidateSupportedCurves()
2021-09-02 14:07:06 -04:00
David Garske
03fba72027
Merge pull request #4361 from julek-wolfssl/GetASNHeader-return
...
Missing `GetASNHeader` return handling
2021-09-02 09:18:06 -07:00
David Garske
587389d137
Merge pull request #4366 from douzzer/cpp-anon-inline-unions
...
C++ HAVE_ANONYMOUS_INLINE_AGGREGATES sensing
2021-09-02 09:14:31 -07:00
Juliusz Sosinowicz
4a26b53dfc
Changes for ED25519 and HAVE_SECRET_CALLBACK
...
- `HAVE_SECRET_CALLBACK` needs to have `wolfSSL_SSL_CTX_get_timeout` and `wolfSSL_SSL_get_timeout` available
- Call `wolfSSL_KeepArrays` for `HAVE_SECRET_CALLBACK`
- Increase the default `DTLS_MTU_ADDITIONAL_READ_BUFFER` and make it adjustable by the user
- Don't truncate application data returned to user in `wolfSSL_read_internal`
2021-09-02 15:58:30 +02:00
Juliusz Sosinowicz
abc046b5b7
Missing GetASNHeader return handling
2021-09-02 14:56:58 +02:00
TakayukiMatsuo
56843fbefd
Add support for EVP_sha512_224/256 ( #4257 )
2021-09-02 14:05:07 +10:00
David Garske
504e27dfa7
Merge pull request #4357 from gojimmypi/patch-1
...
Espressif README Syntax / keyword highlighting / clarifications
2021-09-01 18:35:32 -07:00
gojimmypi
e079b357df
copy missing Espressif/ESP-IDF files from wolfssl/wolfcrypt/benchmark ( #4273 )
...
* copy missing files from wolfssl/wolfcrypt/benchmark
* instead of GitHub copy, update setup to perform the copy of ESP-IDF benchmark files; add --verbose option
* update setup to perform the copy of ESP-IDF benchmark files; add --verbose option
* copy benchmark.c / benchmark.h at setup time
2021-09-01 18:34:46 -07:00
JacobBarthelmeh
bac0497c35
PKCS7 fix for double free on error case and sanity check on set serial number ( #4356 )
...
* check for error value on set serial number
* set pointer in fail case
2021-09-02 09:13:35 +10:00
Daniel Pouzzner
c8f65ec404
wolfcrypt/types.h: fix HAVE_ANONYMOUS_INLINE_AGGREGATES sensing to correctly accommodate C++ builds.
2021-09-01 17:01:55 -05:00
Anthony Hu
5e12fa3eb7
Some small bugfixes uncovered by the unit tests.
2021-09-01 16:25:04 -04:00
Anthony Hu
096db7577f
Make jenkins happy. \n\nI feel like I should put the guard around the whole function but then other things break.
2021-09-01 10:54:52 -04:00
Anthony Hu
0d6d171fa4
BUGFIX; Its possible to sending a supported group that is not supported.
...
This change fixes that.
2021-09-01 10:54:52 -04:00
David Garske
d23b0784b3
Fix for building session tickets without TLS v1.3. Broken in PR #4275 . ( #4360 )
2021-09-01 10:06:31 +10:00
David Garske
9b6cf56a6e
Expanded support for Curve25519/Curve448 and TLS v1.3 sniffer ( #4335 )
...
* Fixes for building with Ed/Curve25519 only. Fix for IoT safe demo to exit after running once. Added `WOLFSSL_DH_EXTRA` to `--enable-all` and `--enable-sniffer`. Cleanup uses of `==` in configure.ac. Various spelling fixes.
* Fix for sniffer with TLS v1.3 session tickets.
* Fix for ASN Template Ed25519 key export (missing version / not setting OID correctly).
* Add key import/export support for Curve25519/Curve448. Refactor of the 25519/448 ASN code to combine duplicate code.
* Refactor of Curve25519 code. Improved public key export to handle generation when only private is set. Improved private scalar buffer sizing.
* Fix for static ephemeral loading of file buffer.
* Added sniffer Curve25519 support and test case.
* Fix for sniffer to not use ECC for X25519 if both are set.
* Fix Curve448 public export when only private is set.
* Fix for `dh_generate_test` for small stack size.
* Reduce stack size use on new asymmetric DER import/export functions. Cleanup pub length calc.
* Fix invalid comment.
2021-09-01 09:28:24 +10:00
gojimmypi
e25b17b108
Syntax / keyword highlighting / clarifications
...
See https://github.com/espressif/esp-wolfssl/issues/11
2021-08-30 17:35:17 -07:00
John Safranek
0f0ba46ac5
Merge pull request #4352 from haydenroche5/dsa_fips
...
Allow OpenSSL DSA sign/verify functions with FIPS.
2021-08-30 15:47:38 -07:00
John Safranek
35a917e527
Merge pull request #4337 from miyazakh/py_get_ca_certs
...
fix python ut, get_ca_certs
2021-08-30 14:02:05 -07:00
David Garske
4645a6917c
Merge pull request #4168 from JacobBarthelmeh/wolfCLU
...
function additions and fixes for expansion of wolfCLU
2021-08-30 13:42:50 -07:00
John Safranek
078d49ea6f
Merge pull request #4333 from dgarske/evp_devid
...
EVP key support for heap hint and crypto callbacks
2021-08-30 11:59:27 -07:00
John Safranek
ee07bd3fa9
Merge pull request #4331 from SparkiDev/jenkins_fixes_4
...
Jenkins nighlty fixes
2021-08-30 10:29:00 -07:00
John Safranek
85df95e10d
Merge pull request #4324 from miyazakh/maxfragment
...
add set_tlsext_max_fragment_length support
2021-08-30 10:21:59 -07:00
David Garske
2a6b8f4912
Merge pull request #4275 from JacobBarthelmeh/Compatibility-Layer
...
add set num tickets compat function
2021-08-30 09:26:49 -07:00
Sean Parkinson
218f4c80f9
PKCS #11 : support static linking with PKCS #11 library
...
--enable-pkcs11=static LIBS=-l<pkcs11 static library>
or
define HAVE_PKCS11_STATIC
2021-08-30 12:28:28 +10:00
Hayden Roche
3ca77bb09b
Allow OpenSSL DSA sign/verify functions with FIPS.
2021-08-29 18:22:30 -07:00
Sean Parkinson
0488caed4c
Merge pull request #4346 from cconlon/verifyPostHandshake
...
TLS 1.3: add support for WOLFSSL_VERIFY_POST_HANDSHAKE verify mode
2021-08-30 09:47:23 +10:00
David Garske
c7645a42a7
Merge pull request #4320 from anhu/liboqs_keyshare_updated
...
WolfSSL support for OQS's implementation of NIST Round 3 KEMs as TLS 1.3 groups
2021-08-27 17:42:25 -07:00
Chris Conlon
070029fd08
add support for WOLFSSL_VERIFY_POST_HANDSHAKE verify mode
2021-08-27 14:49:47 -06:00
JacobBarthelmeh
65cfef5337
fix for free with test case
2021-08-27 14:10:06 -06:00
Kareem
9a438ce289
liboqs integration using keyshare/supported_groups extensions in TLS 1.3
2021-08-27 13:56:53 -04:00
Jacob Barthelmeh
83d39932bb
add test case for X509 EXTENSION set
2021-08-27 11:30:44 -06:00
John Safranek
412528e18b
Merge pull request #4336 from elms/sp_out_of_range
...
sp_math: error on multiplier larger than curve order
2021-08-27 10:15:42 -07:00
John Safranek
8b79f77fb0
Merge pull request #4327 from JacobBarthelmeh/Compatibility-Layer-Part3
...
add implementation of AUTHORITY_INFO_ACCESS_free
2021-08-27 09:27:34 -07:00
Jacob Barthelmeh
40a4015491
add no server macro guard
2021-08-27 08:28:50 -06:00
Jacob Barthelmeh
ff9fed08a3
fix count on number of tickets sent
2021-08-26 21:17:45 -06:00
Sean Parkinson
db8f4e4f19
Jenkins nighlty fixes
...
wolfSSL_Rehandshake(): don't set 'ret' unless HAVE_SESSION_TICKET
defined (otherwise compiler will complain: warning: Value stored to
'ret' is never read)
AES GCM streaming: fix 64-bit word version to compile and pass testing
Use '--enable-aesgcm=word' to get the word32 or word64 implementation
depending on the availabilty of 64-bit type.
2021-08-27 08:46:39 +10:00
Jacob Barthelmeh
a52df87c8a
adjust type for max tickets variable and number sent with WOLFSSL_TLS13_TICKET_BEFORE_FINISHED macro
2021-08-26 15:45:21 -06:00
Jacob Barthelmeh
21159659cf
add implementation of AUTHORITY_INFO_ACCESS_free
2021-08-26 14:48:12 -06:00
David Garske
ef0fb6520d
Merge pull request #4283 from JacobBarthelmeh/Compatibility-Layer-Part2
...
couple more compatibility functions
2021-08-26 11:50:09 -07:00
Chris Conlon
c631cffe3d
Merge pull request #4334 from miyazakh/py_store_stats
...
fix python unit test failure, cert_store_stats
2021-08-26 10:24:24 -06:00
Chris Conlon
b5d42eb773
Merge pull request #4318 from kojo1/i2d_RSA
...
arg type compatibility
2021-08-26 09:51:43 -06:00
Hideki Miyazaki
3896016121
fix python ut, get_ca_certs
2021-08-26 13:51:28 +09:00
elms
be2ad82e6d
sp_math: error on multiplier larger than curve order
...
zd 12674
2021-08-25 14:59:51 -07:00
John Safranek
cb3f42482b
Merge pull request #4332 from dgarske/zd12791
...
Improve CRL error codes
2021-08-25 13:57:46 -07:00
David Garske
3a9d463ef4
Fix use of hardcoded number and added comment.
2021-08-25 09:57:10 -07:00
Hideki Miyazaki
77eff68b95
addressed review comment
2021-08-25 11:07:32 +09:00
Hideki Miyazaki
9b4a635372
fix python unit test failure, cert_store_stats
2021-08-25 10:20:48 +09:00
John Safranek
3f2abef212
Merge pull request #4321 from haydenroche5/libimobiledevice
...
Make changes to support libimobiledevice.
2021-08-24 17:19:26 -07:00
David Garske
b8263f44f7
Added new EVP API for creating a private key for use with crypto callbacks. Improvements to heap hint and devId with EVP layer.
2021-08-24 12:14:44 -07:00
David Garske
700b1c56c1
Improve CRL error codes. Add --enable-crl=io option. ZD 12791
2021-08-24 11:12:12 -07:00
John Safranek
196e092023
Merge pull request #4328 from dgarske/zd12801
...
Fix for sniffer TCP sequence rollover
2021-08-24 10:05:49 -07:00
JacobBarthelmeh
3d8dc68266
free test case object
2021-08-24 10:59:38 -06:00
JacobBarthelmeh
ff521a14e4
add test case and macro mapping
2021-08-24 10:59:38 -06:00
JacobBarthelmeh
de3416998c
fix for memory leak
2021-08-24 10:58:33 -06:00
Jacob Barthelmeh
80d4e0f644
function additions and fixes for expansion of wolfCLU
2021-08-24 10:58:33 -06:00
Hayden Roche
7ff1351971
Make changes to support libimobiledevice.
...
- `EVP_PKEY_assign_RSA` should store the private key in DER format, not the
public key.
- The last call to `infoCb` in `wolfSSL_BIO_write` should provide the length of
the data to write.
- We should be able to parse RSA public keys starting with BEGIN RSA PUBLIC KEY
and ending with END RSA PUBLIC KEY.
2021-08-24 08:52:43 -07:00
Sean Parkinson
a1e26e7bc7
Merge pull request #4308 from dgarske/sess_row_cache
...
Improvements to session locking to allow per-row
2021-08-24 09:07:03 +10:00
John Safranek
9c541568fc
Merge pull request #4313 from SparkiDev/rsa_vfy_only
...
SP RSA verify only: fix to compile
2021-08-23 14:42:56 -07:00
David Garske
fe83d2d941
Fix for sniffer TCP sequence rollover. The math to detect and compute the rollover was off by one. ZD 12801.
2021-08-23 13:54:28 -07:00
Jacob Barthelmeh
da6e8d394f
shift instead of multiply and add comment
2021-08-23 13:24:27 -06:00
David Garske
a13c2e2304
Fix for macro arg paren and double ampersand. Fixes building with ENABLE_SESSION_CACHE_ROW_LOCK.
2021-08-23 09:56:07 -07:00
David Garske
6ec28f508e
Merge pull request #4325 from SparkiDev/jenkins_fixes_3
...
OpenSSL Extra builds: fixes from nightly builds failing
2021-08-23 09:30:15 -07:00
David Garske
206b4641e8
Merge pull request #4326 from danielinux/iotsafe-fix-warning
...
Fix compiler warnings
2021-08-23 08:35:29 -07:00
Daniele Lacamera
b56c89bb84
Fix compiler warnings (ZD12802 and others)
2021-08-23 08:12:24 +02:00
Sean Parkinson
4bfd0443a7
OpenSSL Extra builds: fixes from nightly builds failing
...
Prototype is required when internal.h is not included and GetCA is not
defined.
wolfSSL_EVP_CIPHER_CTX_set_iv_length() is called with CBC cipher in
api.c. Function is not specificly for GCM, though not strictly needed
for CBC.
2021-08-23 12:55:27 +10:00
Hideki Miyazaki
8808e6a3ac
implement set_tlsext_max_fragment_length
2021-08-23 09:08:14 +09:00
David Garske
26cf17e602
Merge pull request #4317 from SparkiDev/math_x86_asm_fix
...
Maths x86 asm: change asm snippets to get compiling
2021-08-20 13:42:15 -07:00
David Garske
c8926a45ab
Improvements to session locking to allow per-row. Can manually be enabled with ENABLE_SESSION_CACHE_ROW_LOCK or forcefully disabled using NO_SESSION_CACHE_ROW_LOCK. Enabled by default for Titan cache. ZD 12715.
2021-08-20 13:03:50 -07:00
Takashi Kojo
10c5e33027
arg type compatibility
2021-08-20 15:21:06 +09:00
Sean Parkinson
dbb03cb5a3
SP RSA verify only: fix to compile
...
Configurations:
./configure --disable-asn --disable-filesystem --enable-cryptonly
--disable-dh --disable-sha224 --disable-ecc CFLAGS=-DWOLFSSL_PUBLIC_MP
--enable-rsavfy --enable-sp=small2048 --enable-sp-math
./configure --disable-asn --disable-filesystem --enable-cryptonly
--disable-dh --disable-sha224 --disable-ecc CFLAGS=-DWOLFSSL_PUBLIC_MP
--enable-rsavfy --enable-sp=2048 --enable-sp-math
./configure --disable-asn --disable-filesystem --enable-cryptonly
--disable-dh --disable-sha224 --disable-ecc CFLAGS=-DWOLFSSL_PUBLIC_MP
--enable-rsavfy --enable-sp=small2048 --enable-sp-math-all
./configure --disable-asn --disable-filesystem --enable-cryptonly
--disable-dh --disable-sha224 --disable-ecc CFLAGS=-DWOLFSSL_PUBLIC_MP
--enable-rsavfy --enable-sp=small2048 --enable-sp-math --enable-sp-asm
./configure --disable-asn --disable-filesystem --enable-cryptonly
--disable-dh --disable-sha224 --disable-ecc CFLAGS=-DWOLFSSL_PUBLIC_MP
--enable-rsavfy --enable-sp=2048 --enable-sp-math --enable-sp-asm
2021-08-20 13:16:58 +10:00
Sean Parkinson
fa8f23284d
Maths x86 asm: change asm snippets to get compiling
...
TFM:
Use register or memory for c0, c1, c2 in SQRADD and SQRADD2.
SP:
Use register or memory for vl, vh, vo in SP_ASM_MUL_ADD,
SP_ASM_MUL_ADD2 and SP_ASM_SQR_ADD.
2021-08-20 10:35:49 +10:00
John Safranek
e7ef48d2b7
Merge pull request #3869 from SparkiDev/asn1_template
...
ASN1 Template: stricter and simpler DER/BER parsing/construction
2021-08-19 12:47:04 -07:00
Daniel Pouzzner
3226e69649
--enable-linuxkm-pie (FIPS Linux kernel module) ( #4276 )
...
* Adds `--enable-linuxkm-pie` and associated infrastructure, to support FIPS mode in the Linux kernel module.
* Adds `tests/api.c` missing (void) arglist to `test_SSL_CIPHER_get_xxx()`.
2021-08-19 09:15:52 -07:00
John Safranek
16ad5cf3c5
Merge pull request #4315 from SparkiDev/g++_fix_3
...
SRP test: use proper SRP hash type for g++
2021-08-19 08:56:43 -07:00
Sean Parkinson
17a569d4dd
SRP test: use proper SRP hash type for g++
2021-08-19 11:40:43 +10:00
Sean Parkinson
d486b89c61
ASN1 Template: stricter and simpler DER/BER parsing/construction
...
Reduce debug output noise
2021-08-19 11:32:41 +10:00
John Safranek
63fde01e32
Merge pull request #4311 from haydenroche5/rsyslog
...
Make improvements for rsyslog port.
2021-08-18 16:55:32 -07:00
John Safranek
9a1233c04d
Merge pull request #4312 from julek-wolfssl/DH_set_length
...
Implement `DH_set_length`.
2021-08-18 16:42:38 -07:00
John Safranek
eaded189ff
Merge pull request #4310 from haydenroche5/dsa_fips
...
Don't run test_wolfSSL_DSA_SIG if HAVE_FIPS is defined.
2021-08-18 16:33:26 -07:00
John Safranek
18314e5a4f
Merge pull request #4309 from dgarske/sniff_cleanups
...
Improved sniffer statistics and documentation
2021-08-18 16:03:38 -07:00
John Safranek
c2b88a1fca
Merge pull request #4306 from dgarske/pk_tls13
...
Fixes for PK callbacks with TLS v1.3
2021-08-18 15:42:19 -07:00
Sean Parkinson
8df65c3fa7
Merge pull request #4270 from dgarske/zd12586
...
Fixes for various PKCS7 and SRP build issues
2021-08-19 08:12:15 +10:00
John Safranek
ef77cd05d4
Merge pull request #4302 from haydenroche5/libssh2
...
Add missing ECDSA_SIG getter/settter for libssh2.
2021-08-18 15:08:06 -07:00
David Garske
c5f9e55567
Fixes for CMAC compatibility layer with AES CBC disabled. CMAC code cleanups. Fixes for "make check" with AES CBC disabled.
2021-08-18 11:30:18 -07:00
Chris Conlon
6237a7a00d
Merge pull request #4305 from TakayukiMatsuo/i2t
...
Add support for wolfSSL_i2t_ASN1_OBJECT
2021-08-18 10:37:08 -06:00
Juliusz Sosinowicz
162f14aaf9
Implement DH_set_length.
2021-08-18 13:24:51 +02:00
Sean Parkinson
3c06dd6fa8
SP ECC: calc vfy point not check mod_inv return
...
Not all implementations return an error though.
2021-08-18 10:05:29 +10:00
Sean Parkinson
8f7e09d9b5
Merge pull request #4294 from dgarske/tls13_earlydata
...
Fix early data max size handling in TLS v1.3
2021-08-18 08:48:42 +10:00
David Garske
d1e027b6fa
Fix for pedantic warning with pre-processor in macro.
2021-08-17 14:55:42 -07:00
David Garske
f5076cad1b
Added new files to include.am.
2021-08-17 13:20:34 -07:00
David Garske
d6f5f815e1
Fix for srp_test_digest return code checking. Added GCC-ARM TLS server example.
2021-08-17 11:12:40 -07:00
David Garske
95178e3bdc
Use void* on heap hint test. Also previously fixed in hmac.c.
2021-08-17 10:52:50 -07:00
David Garske
89904ce82e
Fixes for building without AES CBC and support for PKCS7 without AES CBC.
2021-08-17 10:47:19 -07:00
David Garske
a9b8b6d3de
Fix for PKCS7 heap hint in API unit test.
2021-08-17 10:46:53 -07:00
David Garske
e1f603301b
Fixes for SRP with heap hint.
2021-08-17 10:45:50 -07:00
David Garske
c598688f89
Fix for static memory with bucket size matching.
2021-08-17 10:38:27 -07:00
David Garske
69d01afd3a
Merge pull request #4250 from danielinux/iotsafe
...
IoT-Safe with TLS demo
2021-08-17 08:26:19 -07:00
David Garske
5209e235a7
Merge pull request #4307 from SparkiDev/srp_test_digests
...
SRP test: increase size of N to support larger digests
2021-08-17 08:24:47 -07:00
Hayden Roche
c16127d9ab
Make improvements for rsyslog port.
...
- Remove FP_MAX_BITS and RSA_MAX_BITS definitions from rsyslog config. A user
configuring wolfSSL for rsyslog support should set them as they see fit (i.e.
based on the key sizes they need to support).
- After testing with wolfSSL FIPS, I discovered that some functions were missing
from the compatibility layer that rsyslog needs. Notably wolfSSL_DH_generate_key
and wolfSSL_DH_set0_pqg. These were gated out of compilation based on HAVE_FIPS.
However, they only need to be compiled out if WOLFSSL_DH_EXTRA is defined. This
is because these functions call SetDhInternal, which calls wc_DhImportKeyPair
if WOLFSSL_DH_EXTRA is defined. wc_DhImportKeyPair isn't available in the FIPS
module's dh.c. So, these functions can exist in the FIPS build provided
WOLFSSL_DH_EXTRA isn't defined. This commit accounts for this scenario.
2021-08-17 08:19:43 -07:00
TakayukiMatsuo
421be50cb8
Add support for wolfSSL_i2t_ASN1_OBJECT
2021-08-17 10:52:20 +09:00
Hayden Roche
95ab6ce4b8
Don't run test_wolfSSL_DSA_SIG if HAVE_FIPS is defined.
...
This test calls `wolfSSL_DSA_do_sign_ex` and `wolfSSL_DSA_do_verify_ex`, both
of which don't exist if `HAVE_FIPS` is defined.
2021-08-16 17:42:00 -07:00
David Garske
5c00951f09
Do not add DH padding on failure.
2021-08-16 16:31:18 -07:00
David Garske
9898b5d82b
Various spelling fixes.
2021-08-16 16:31:18 -07:00
David Garske
0ea5046b39
Improved documentation for sniffer statistics (ZD 12731).
2021-08-16 16:31:18 -07:00
Sean Parkinson
9066ab6051
SRP test: increase size of N to support larger digests
...
Test all digests supported by SRP.
2021-08-17 09:15:07 +10:00
David Garske
6ac03d41ef
Merge pull request #4203 from SparkiDev/tls13_peek_fix_off
...
TLS 1.3: ability to turn peek change off
2021-08-16 15:25:58 -07:00
Hayden Roche
63d1bd13d4
Add missing ECDSA_SIG getter/settter for libssh2.
2021-08-16 14:43:13 -07:00
David Garske
c8fd5d552e
IoTSafe Improvements. Use new hex to char functions in misc.c. Fix for arm-none-eabi missing nano specs. Cleanups for IoTSafe code, README.md and user_settings.h. Fix linker script to use flash at 0x8000000. Support for TLS v1.3.
2021-08-16 13:13:32 -07:00
Daniele Lacamera
490eeb4003
Support for IoT-Safe with TLS demo
2021-08-16 13:13:30 -07:00
David Garske
70535f51d5
Fixes for PK callbacks with TLS v1.3. Tested with ./configure --enable-pkcallbacks CFLAGS="-DTEST_PK_PRIVKEY -DDEBUG_PK_CB".
2021-08-16 13:09:17 -07:00
Hayden Roche
c6f0fb11d0
Merge pull request #4253 from julek-wolfssl/lighttpd-1.4.55
...
Implement `wolfSSL_set_client_CA_list` and add 'HIGH' cipher suite
2021-08-16 15:05:51 -05:00
David Garske
1ac95b5716
Merge pull request #4303 from haydenroche5/rsyslog
...
Add support for rsyslog.
2021-08-16 11:20:28 -07:00
David Garske
6a37309ece
Merge pull request #4300 from julek-wolfssl/libimobiledevice
...
Missing API for libimobiledevice
2021-08-16 09:40:42 -07:00
Juliusz Sosinowicz
93a53d72de
mem_buf only used with memory and pair BIOs
2021-08-16 13:38:51 +02:00
Hayden Roche
bbb514fa6d
Add support for rsyslog.
...
- Add an --enable-rsyslog option to configure.ac.
- Add a few missing `WOLFSSL_ERROR` calls that were expected by rsyslog unit
tests.
- Add better documentation around `WOLFSSL_SHUTDOWN_NOT_DONE` and define it to
be 0 (rather than 2) when `WOLFSSL_ERROR_CODE_OPENSSL` is defined. This is in
accordance with OpenSSL documentation. Without this change, rsyslog was
failing to do the bidirectional shutdown properly because it was checking the
shutdown return value against 0. I'm keeping the old value when
`WOLFSSL_ERROR_CODE_OPENSSL` isn't defined because it's part of the public
wolfssl interface (it's in ssl.h).
2021-08-13 23:24:28 -07:00
Juliusz Sosinowicz
0f6e564093
Rebase fixes
2021-08-14 00:35:55 +02:00
Juliusz Sosinowicz
6a5f40d698
Code review fixes.
2021-08-14 00:25:00 +02:00
Juliusz Sosinowicz
72f1d0adac
Refactor client_CA API to use wolfSSL_sk_X509_NAME_* API
2021-08-14 00:24:24 +02:00
Juliusz Sosinowicz
62cab15c64
Reorganize wolfSSL_sk_X509_NAME_*
...
Make the `wolfSSL_sk_X509_NAME_*` API's available in OPENSSL_EXTRA for use with `client_CA_list` API's.
2021-08-14 00:24:24 +02:00
Juliusz Sosinowicz
d4391bd997
Parse distinguished names in DoCertificateRequest
...
The CA names sent by the server are now being parsed in `DoCertificateRequest` and are saved on a stack in `ssl->ca_names`.
2021-08-14 00:24:08 +02:00
Juliusz Sosinowicz
647e007eea
Implement wolfSSL_set_client_CA_list and add 'HIGH' cipher suite
2021-08-14 00:24:08 +02:00
elms
b2380069f0
Merge pull request #4261 from dgarske/rsa_der_pub
2021-08-13 13:36:01 -07:00
Chris Conlon
ca06694bfb
Merge pull request #4282 from miyazakh/SSL_CIPHER_xx
...
Add SSL_CIPHER_get_xxx_nid support
2021-08-13 13:48:31 -06:00
Chris Conlon
5235b7d1e6
Merge pull request #4291 from miyazakh/PARAM_set1_ip
...
Add X509_VERIFY_PARAM_set1_ip support
2021-08-13 13:45:33 -06:00
TakayukiMatsuo
1acf64a782
Add support for value zero as version parameter for SSL_CTX_set_min/max_proto_version
2021-08-14 02:16:34 +09:00
David Garske
ec4e336866
Merge pull request #4299 from haydenroche5/evp_pkey_dec_enc_improvements
...
Make improvements to wolfSSL_EVP_PKEY_encrypt and wolfSSL_EVP_PKEY_decrypt.
2021-08-13 08:10:20 -07:00
David Garske
14bbf49118
Merge pull request #3726 from julek-wolfssl/openresty
...
Openresty
2021-08-13 08:06:46 -07:00
Juliusz Sosinowicz
59d04efee8
Missing API for libimobiledevice
2021-08-13 16:32:53 +02:00
Hayden Roche
3be13f7358
Make improvements to wolfSSL_EVP_PKEY_encrypt and wolfSSL_EVP_PKEY_decrypt.
...
- Handle case where output buffer is NULL. In this case, passed in output buffer
length pointer should be given the maximum output buffer size needed.
- Add better debug messages.
2021-08-12 18:46:15 -07:00
Juliusz Sosinowicz
7dea1dcd39
OpenResty 1.13.6.2 and 1.19.3.1 support
...
# New or Updated APIs
- wolfSSL_get_tlsext_status_type
- wolfSSL_X509_chain_up_ref
- wolfSSL_get0_verified_chain
- SSL_CTX_set_cert_cb
- SSL_certs_clear
- SSL_add0_chain_cert ssl_cert_add0_chain_cert
- SSL_add1_chain_cert ssl_cert_add1_chain_cert
- sk_X509_NAME_new_null
- SSL_CTX_set_cert_cb
- SSL_set0_verify_cert_store
- SSL_set_client_CA_list
# Other Changes
- Ignore gdbinit
- Add api.c tests for new API
- Add `WOLFSSL_X509_STORE* x509_store_pt` to `WOLFSSL`
- Add macro to select the `WOLFSSL` specific store when available and the associated `WOLFSSL_CTX` store otherwise. Calls to `ssl->ctx->cm` and `ssl->ctx->x509_store*` were replaced by macros.
- NO-OP when setting existing store
- Add reference counter to `WOLFSSL_X509_STORE`
- Cleanup MD5 redundant declarations
- WOLFSSL_ERROR may map to nothing so make assignment outside of it
- refMutex fields are excluded with SINGLE_THREADED macro
- Chain cert refactor
- Make `wolfSSL_add0_chain_cert` and `wolfSSL_add1_chain_cert` not affect the context associated with the SSL object
- `wolfSSL_CTX_add1_chain_cert` now updates the `ctx->certChain` on success and stores the cert in `ctx->x509Chain` for later free'ing
2021-08-12 23:58:22 +02:00
David Garske
8601c14f1c
Merge pull request #4297 from anhu/master
...
Fix a race condition in the benchmark example and …
2021-08-12 13:51:43 -07:00
David Garske
cccb8f940a
Merge pull request #4209 from julek-wolfssl/net-snmp
...
Add support for net-snmp
2021-08-12 13:06:21 -07:00
David Garske
96c223e585
Merge pull request #4288 from julek-wolfssl/get-date-from-cert
...
Add a test/example for parsing the date from a certificate
2021-08-12 12:52:52 -07:00
David Garske
93a1fe4580
Merge pull request #4205 from julek-wolfssl/wpas-include-extra-stuff
...
Include stuff needed for EAP in hostap
2021-08-12 11:17:23 -07:00
Chris Conlon
d4b0ec0705
Merge pull request #4290 from TakayukiMatsuo/general
...
Add wolfSSL_GENERAL_NAME_print
2021-08-12 09:51:28 -06:00
Anthony Hu
7c75b9836e
Changes to make Jenkins happy and reduce verbosity.
...
- added HAVE_PTHREAD guards
- usleep ---> XSLEEP_MS
- only print polling message if verbose output requested.
2021-08-12 11:13:15 -04:00
JacobBarthelmeh
5dff4dd4e0
Merge pull request #4280 from dgarske/caam_macros
...
Fixes for CAAM build macros and spelling
2021-08-12 19:19:31 +07:00
Juliusz Sosinowicz
e583d0ab76
SslSessionCacheOn -> SslSessionCacheOff
2021-08-12 13:52:25 +02:00
TakayukiMatsuo
517309724a
Add wolfSSL_GENERAL_NAME_print
2021-08-12 14:17:41 +09:00
Hideki Miyazaki
0b070166cb
addressed review comments
2021-08-12 10:44:07 +09:00
Hideki Miyazaki
4fa69c0a3a
addressed review comments
2021-08-12 07:41:24 +09:00
David Garske
9c3502bea9
Merge pull request #4285 from haydenroche5/alerts
...
During the handshake, make sure alerts are getting read on the client side in the event of an error.
2021-08-11 15:22:05 -07:00
David Garske
0a238483c1
Merge pull request #4296 from lealem47/fix-link
...
Fix broken link in examples/README.md
2021-08-11 15:21:43 -07:00
Chris Conlon
fc4e4eacba
Merge pull request #4292 from kojo1/evp
...
EVP_CIPHER_CTX_set_iv_length
2021-08-11 16:13:26 -06:00
Anthony Hu
586317f198
Fix a race condition in the benchmark example and all output goes to stderr.
2021-08-11 17:07:01 -04:00
David Garske
9bbb32c352
Merge pull request #4295 from haydenroche5/stunnel_key_gen
...
Turn on key generation for --enable-stunnel.
2021-08-11 11:17:30 -07:00
elms
d39b91de27
Merge pull request #4266 from dgarske/hexchar
2021-08-11 10:56:53 -07:00
Lealem Amedie
d4d225e33f
Fix broken link in examples/README.md
2021-08-11 10:49:38 -06:00
Juliusz Sosinowicz
dd4adacee8
Code review changes
2021-08-11 17:58:46 +02:00
elms
d487916557
Merge pull request #4279 from haydenroche5/pkcs12
...
Cleanups for PKCS8 and PKCS12 macros (always support parsing PKCS8 header)
2021-08-10 18:37:33 -07:00
Hayden Roche
65a00d9430
Turn on key generation for --enable-stunnel.
2021-08-10 17:14:06 -07:00
David Garske
0c74e18eaf
Fix early data max size handling. Fixes issue with size checking around wolfSSL_CTX_set_max_early_data and wolfSSL_set_max_early_data, which was checking against the padded size. Also was adding to the earlyDataSz and checking against it with un-padded data size. ZD 12632.
2021-08-10 16:32:41 -07:00
David Garske
b258321219
Fixes for misc.c to not be included unless required.
2021-08-10 16:11:22 -07:00
David Garske
df10152b54
Refactor hex char to byte conversions.
2021-08-10 12:07:41 -07:00
David Garske
fdb6c8141e
Merge pull request #4274 from haydenroche5/pyopenssl
...
Add support for pyOpenSSL.
2021-08-10 11:49:07 -07:00
Hayden Roche
fdc350fb52
Add a macro guard WOLFSSL_CHECK_ALERT_ON_ERR that has the client check for
...
alerts in the event of an error during the handshake.
2021-08-10 09:43:12 -07:00
Hayden Roche
ef5510cbcc
During the handshake, make sure alerts are getting read on the client side in
...
the event of an error.
2021-08-09 14:26:53 -07:00
David Garske
0e4b200df1
Merge pull request #4267 from elms/key_overflow
...
tls13: avoid buffer overflow with size check
2021-08-09 09:19:46 -07:00
JacobBarthelmeh
1a8109f77d
rename function parameter
2021-08-09 22:52:45 +07:00
David Garske
e698d08317
Merge pull request #4286 from douzzer/cryptocb-pedantic-c99
...
--enable-cryptocb CFLAGS='-std=c99 -pedantic'
2021-08-09 08:29:36 -07:00
Hideki Miyazaki
5c55be72ec
fix jenkins failure part2
2021-08-09 10:00:35 +09:00
Takashi Kojo
c0b085dd4a
EVP_CIPHER_CTX_set_iv_length
2021-08-08 14:49:28 +09:00
Hideki Miyazaki
cf9d5ea8b6
fix jenkins failure part2
2021-08-07 14:14:39 +09:00
Hideki Miyazaki
dbf0977ed0
fix fenkins failure
2021-08-07 11:42:03 +09:00
Hideki Miyazaki
a066c48f55
fix jenkins failure
2021-08-07 11:13:41 +09:00
Hideki Miyazaki
a851e13f1d
implemented X509_VERIFY_PARAM_set1_ip
2021-08-07 10:50:57 +09:00
David Garske
bd6b765b17
Merge pull request #4287 from ejohnstown/ac-upd
...
flags update
2021-08-06 16:22:15 -07:00
John Safranek
2c62880fd2
flags update
...
1. Fixed typo in ifdef for HAVE_ED448.
2. Fixed typos in comments in sha512.
3. Add include config.h to bio.c.
2021-08-06 11:28:20 -06:00
Juliusz Sosinowicz
b4131f355e
Add a test/example for parsing the date from a certificate
2021-08-06 14:51:57 +02:00
Daniel Pouzzner
1b2d57123f
tests/api.c: add missing (void) arg lists.
2021-08-05 15:30:33 -05:00
Daniel Pouzzner
6a92db7722
add overrideable HAVE_ANONYMOUS_INLINE_AGGREGATES macro, set to 0 or 1 in wolfcrypt/types.h, and use it to conditionalize feature usage in wolfcrypt/cryptocb.h.
2021-08-05 15:30:16 -05:00
David Garske
0df28083d3
Fixes for CAAM build macros and spelling.
2021-08-05 10:12:59 -07:00
Juliusz Sosinowicz
fab227411f
Free ECC cache per thread when used
2021-08-05 15:34:47 +02:00
JacobBarthelmeh
1e491993ca
add a2i_IPADDRESS
2021-08-05 16:53:36 +07:00
Hideki Miyazaki
67e773db91
implement SSL_CIPHER_xxxx
2021-08-05 09:42:55 +09:00
David Garske
5465d40ee3
Attempt to move asn.c RSA API defs into asn_public.h, since ASN is not in FIPS boundary.
2021-08-04 17:42:46 -07:00
David Garske
699728c70c
Fix for PKCS12 with NO_ASN.
2021-08-04 17:37:05 -07:00
Elms
d8a54e1a32
tls13: avoid buffer overflow with size check
...
For cases where a private key that is larger than the configured
maximum is passed.
2021-08-04 17:14:25 -07:00
Hayden Roche
35a33b2f00
Add support for pyOpenSSL.
...
pyOpenSSL needs the OpenSSL function X509_EXTENSION_dup, so this commit adds
that to the compatibility layer. It also needs to be able to access the DER
encoding of the subject alt names in a cert, so that's added as well.
2021-08-04 14:08:43 -07:00
David Garske
3e894a9804
Merge pull request #4277 from lealem47/ex-repo-link
...
Adding README.md to examples dir and links to examples github repo in…
2021-08-04 12:43:57 -07:00
David Garske
ed8edde9c4
Merge pull request #4264 from maximevince/zephyr-module-support
...
wolfSSL as a Zephyr module (without setup.sh)
2021-08-04 12:26:14 -07:00
Chris Conlon
fdbe3f0ff1
Merge pull request #4258 from miyazakh/evp_md_do_all
...
add EVP_MD_do_all and OBJ_NAME_do_all support
2021-08-04 12:17:27 -06:00
David Garske
333aa9f24b
Merge pull request #4269 from JacobBarthelmeh/PKCS7
...
sanity check on pkcs7 stream amount read
2021-08-04 06:41:50 -07:00
JacobBarthelmeh
d39893baa0
add ctx set msg callback
2021-08-04 16:49:01 +07:00
JacobBarthelmeh
b1212ff979
set the default number of tickets to 1
2021-08-04 14:40:17 +07:00
Chris Conlon
f1377ed861
Merge pull request #4215 from lealem47/Md2HashTest
...
Added wc_Md2Hash() unit testing to test.c
2021-08-03 16:51:05 -06:00
Chris Conlon
d64768abff
Merge pull request #4265 from miyazakh/ecc_pubkey
...
update der size in actual length
2021-08-03 16:41:36 -06:00
David Garske
b3c502890c
Merge pull request #4263 from kabuobeid/x509StoreWpas
...
Fix x509_store_p compilation error in WOLFSSL_CERT_MANAGER when defining WOLFSSL_WPAS_SMALL without OPENSSL_EXTRA.
2021-08-03 15:27:11 -07:00
David Garske
45eddc68e2
Fix to always support parsing of the PKCS8 header. Improved macro logic for PKCS8 and PKCS12. Added --disable-pkcs8 option. Fix to enable PWDBASED and PKCS8 if PKCS12 is enabled.
2021-08-03 14:45:45 -07:00
Juliusz Sosinowicz
67ee3ddb0f
Set explicit conversion
2021-08-03 19:29:08 +02:00
Juliusz Sosinowicz
3b366d24f2
Rebase fixes
2021-08-03 19:29:08 +02:00
Juliusz Sosinowicz
c7a6b17922
Need to free ecc cache
2021-08-03 19:29:08 +02:00
Juliusz Sosinowicz
51b6c413d3
For Windows API socklen_t = int
2021-08-03 19:29:08 +02:00
Juliusz Sosinowicz
2bbd04f10f
Implement BIO_new_accept and BIO_do_accept
2021-08-03 19:29:08 +02:00
Juliusz Sosinowicz
8b4345734e
net-snmp support patch
2021-08-03 19:28:53 +02:00
David Garske
9aa528d19d
Merge pull request #4165 from haydenroche5/ntp
...
Make changes to support port of NTP from OpenSSL to wolfSSL.
2021-08-03 09:16:26 -07:00
Juliusz Sosinowicz
2cd499d2df
Refactor session cache on checking into function
2021-08-03 17:52:50 +02:00
Juliusz Sosinowicz
46b061c7bc
Include stuff needed for EAP in hostap
...
Patch that includes the API needed for EAP in hostapd and wpa_supplicant
2021-08-03 17:52:50 +02:00
Hayden Roche
ba7b1d3be0
Only compile in PKCS12 code if PKCS8 is also compiled in.
2021-08-03 07:09:34 -07:00
Maxime Vincent
ea6f81cc54
Move zephyr/include.am to toplevel Makefile.am
2021-08-03 09:43:03 +02:00
Lealem Amedie
0722fb56d8
Adding README.md to examples dir and links to wolfssl-examples github repo in client/server.c
2021-08-02 20:27:41 -06:00
Hayden Roche
dc7ae37f7a
Make changes to support port of NTP from OpenSSL to wolfSSL.
2021-08-02 13:33:18 -07:00
David Garske
9f6a963c60
Merge pull request #4262 from haydenroche5/libssh2
...
Add support for libssh2.
2021-08-02 11:29:54 -07:00
David Garske
9600d533c1
Merge pull request #4268 from JacobBarthelmeh/ECC
...
fix for memset with small stack
2021-08-02 09:53:21 -07:00
JacobBarthelmeh
2479346f5c
add set num tickets compat function
2021-08-02 23:47:53 +07:00
John Safranek
a5b55344b1
Merge pull request #2760 from kojo1/EVP-test
...
additional test on EVP_CipherUpdate/Final
2021-08-02 09:23:00 -07:00
Chris Conlon
96e4970258
Merge pull request #4271 from TakayukiMatsuo/shake
...
Add support for EVP_shake128/256
2021-08-02 09:40:36 -06:00
Maxime Vincent
f932736f23
Fix include.am / EXTRA_DIST
2021-08-02 16:44:07 +02:00
Hayden Roche
279b0facb5
Add support for libssh2.
2021-08-02 05:54:08 -07:00
TakayukiMatsuo
0dc98b8299
Add support for EVP_shake128/256
2021-08-02 13:00:31 +09:00
Hideki Miyazaki
b27b4768ae
fix jenkins failure
2021-07-31 18:26:07 +09:00
Jacob Barthelmeh
293755917e
sanity check on pkcs7 stream amount read
2021-07-30 22:11:45 +07:00
Jacob Barthelmeh
725f95364d
fix for memset with small stack
2021-07-30 20:42:48 +07:00
Hideki Miyazaki
447705a2cb
fix jenkins failure
2021-07-30 10:21:16 +09:00
Takashi Kojo
bad9a973b4
remove hard tabs and other minor fixes
2021-07-30 07:07:40 +09:00
Takashi Kojo
297ae23521
additional test on EVP_CipherUpdate/Final
2021-07-30 06:50:01 +09:00
John Safranek
a802c270e1
Merge pull request #4260 from dgarske/dep_rc4
...
RC4 Cipher Deprecation
2021-07-29 10:26:11 -07:00
John Safranek
07e0c60ce1
Merge pull request #4259 from dgarske/cleanups
...
Cleanups for memory docs and Arduino
2021-07-29 10:16:43 -07:00
John Safranek
2e415ccaed
Merge pull request #4243 from SparkiDev/ecc_large_mul
...
ECC: ecc point multiply doesn't handle large multipliers
2021-07-29 09:30:09 -07:00
David Garske
c69d6d2491
Added public API wc_RsaKeyToPublicDer_ex to allow getting RSA public key without ASN.1 header (can return only seq + n + e). Related to PR #4068 . Cleanup documentation for RSA and wolfIO. Consolidate duplicate code in wc_RsaPublicKeyDerSize.
2021-07-29 09:27:50 -07:00
John Safranek
6f2853ef28
Merge pull request #4251 from dgarske/openssl_all
...
Fixes for edge case builds with openssl all
2021-07-29 08:58:22 -07:00
David Garske
9df4312c4e
Merge pull request #3823 from per-allansson/checkaltname-fix
...
wolfSSL_X509_check_ip_asc/CheckForAltName fixes
2021-07-29 08:08:06 -07:00
Hideki Miyazaki
2b43052f36
update pkey sz in actual length
2021-07-29 23:28:10 +09:00
Maxime Vincent
7acbf61e53
zephyr: fix CMakeLists.txt
2021-07-29 12:36:34 +02:00
Maxime Vincent
3f802d19e4
Update zephyr/README.md
2021-07-29 12:16:05 +02:00
Maxime Vincent
7532ac530a
Remove IDE/zephyr/include.am from IDE/include.am for now
2021-07-29 12:03:40 +02:00
Maxime Vincent
9d562a59bc
wolfSSL as a Zephyr module
2021-07-29 11:58:13 +02:00
Hideki Miyazaki
e333632ad0
add obj_name_do_all
2021-07-29 14:37:10 +09:00
Hideki Miyazaki
2abf23cbc9
fix jenkins failure
2021-07-29 09:03:38 +09:00
Hideki Miyazaki
b2b5d4e603
add evp_md_do_all
2021-07-29 08:59:26 +09:00
David Garske
0ec848e2bd
Merge pull request #4255 from SparkiDev/afalg_msg_fix
...
AF_ALG: fix debug messages
2021-07-28 16:40:09 -07:00
Kareem
85521c2a74
Fix x509_store_p compilation error in WOLFSSL_CERT_MANAGER when defining WOLFSSL_WPAS_SMALL without OPENSSL_EXTRA.
2021-07-28 14:50:08 -07:00
Lealem Amedie
71cf55a947
Added wc_Md2Hash() unit testing to test.c
2021-07-28 13:45:02 -06:00
David Garske
2c1fed8262
Fixes for edge case builds with openssl all. Improvements to the test_wolfSSL_PKCS8_d2i. Allow forceful disable of OCSP with ./configure --enable-opensslall --disable-ocsp.
2021-07-28 12:32:08 -07:00
David Garske
50ae93071d
Merge pull request #4237 from kabuobeid/dupSSL
...
Fix missing CBIOSend and properly guard hmac in DupSSL().
2021-07-28 10:50:17 -07:00
David Garske
27b96753e2
Disable RC4 unless forcefully enabled with --enable-rc4 or if WOLFSSL_ALLOW_RC4 is specified. Related to issue #4248
2021-07-28 10:31:15 -07:00
David Garske
c29a373308
Cleanups for Arduino examples. Resolves PR #3126
2021-07-28 09:50:37 -07:00
John Safranek
1b13eef354
Merge pull request #4254 from dgarske/zd12681
...
Sniffer fix for possible math issue around 64-bit pointer and 32-bit unsigned int
2021-07-28 09:16:57 -07:00
David Garske
8376a2adc2
Improved memory documentation and examples. Resolves PR #3834 .
2021-07-28 09:03:40 -07:00
Per Allansson
c41f10e708
CheckForAltNames fixes
...
- Missing conversion from char to unsigned char caused any IP
address with a byte > 127 to be wrong
- IPv6 address was converted to wrong format XX:YY:...
(which also caused a buffer overrun)
- Anything that is not an IPv4 or IPv6 address should be ignored
2021-07-28 09:46:33 +02:00
Per Allansson
4da7fbb654
tests: use different IPv4 address in + add IPv6 SAN to generated cert
2021-07-28 09:36:21 +02:00
Sean Parkinson
0d0dfc3f5e
Merge pull request #4238 from dgarske/xc32
...
Fixes for building with Microchip XC32 and ATECC
2021-07-28 09:33:01 +10:00
Sean Parkinson
f404107330
AF_ALG: fix debug messages
2021-07-28 09:30:07 +10:00
David Garske
3ea22ffa32
Remove use of assert (replace with soft failures). Note: Session hash will always return value < HASH_SIZE.
2021-07-27 12:07:08 -07:00
David Garske
3abb2b86d6
Fix possible issues with math around 64-bit pointer and unsigned int (32-bit). ZD 12681
2021-07-27 12:05:37 -07:00
Chris Conlon
2dac9a2a81
Merge pull request #4228 from miyazakh/EVP_blake2xx
...
add EVP_blake2 compatibility layer API
2021-07-27 11:45:37 -06:00
David Garske
d49d8a9286
Merge pull request #4204 from SparkiDev/ecies_sec1
...
ECIES: SEC.1 and ISO 18033 support
2021-07-27 09:43:53 -07:00
John Safranek
4f1d30d0db
Merge pull request #4249 from dgarske/ecc_heap
...
Fix for `wc_ecc_ctx_free` and heap hint
2021-07-27 09:31:01 -07:00
David Garske
917fdfbaf7
Peer review fix (second try)
2021-07-27 08:20:22 -07:00
David Garske
f1209367d9
Peer review fix for undef. Cleanup wc_ecc_check_key return code.
2021-07-27 08:20:22 -07:00
David Garske
a92f03a11e
Fixes for building with Microchip XC32 and ATECC.
2021-07-27 08:20:20 -07:00
JacobBarthelmeh
f3cb8e4ada
Merge pull request #4252 from douzzer/gcc-11-fix-pedantic-fallthrough
...
fix FALL_THROUGH for gcc-11 -pedantic
2021-07-27 22:07:01 +07:00
JacobBarthelmeh
3ecd7262b7
Merge pull request #4236 from kabuobeid/serialSz
...
Fix signed comparison issue with serialSz.
2021-07-27 13:54:38 +07:00
John Safranek
8c63701577
Merge pull request #4247 from SparkiDev/dhp_to_der_fix
...
OpenSSL API: DH params to der
2021-07-26 17:00:34 -07:00
Sean Parkinson
31dde4706e
ECIES: Support SEC 1 and ISO 18033
...
Default is SEC 1.
To use old ECIES implementation: --enable-eccencrypt=old or define
WOLFSSL_ECIES_OLD
To use ISO-18033 implememtation: --enable-eccencrypt=iso18033 or
define WOLFSSL_ECIES_ISO18033
Support passing NULL for public key into wc_ecc_decrypt().
Support not having public key in privKey passed into wc_ecc_encrypt() -
public key is calculated and stored in priKey.
Add decrypt KAT test for ECIES.
2021-07-27 09:30:53 +10:00
David Garske
55029acc84
Merge pull request #4244 from SparkiDev/config_fix_4
...
Configuration: fixes for uncommon configurations
2021-07-26 10:32:32 -07:00
Daniel Pouzzner
af3a10ed83
wolfcrypt/types.h: fix FALL_THROUGH macro to work warning-free on gcc-11.
2021-07-26 12:08:56 -05:00
David Garske
28e8f02525
Fix for wc_ecc_ctx_free and heap hint. Fixes #4246 .
2021-07-26 09:56:29 -07:00
JacobBarthelmeh
028c056c55
Merge pull request #4213 from lealem47/leakFixes
...
Addressing possible leaks in ssl.c and api.c
2021-07-26 23:32:19 +07:00
Chris Conlon
ce7e1ef94a
Merge pull request #4230 from douzzer/configure-max-bits-and-ex-data
...
configure options for max rsa/ecc bits and ex_data
2021-07-26 09:27:20 -06:00
Sean Parkinson
7d5271ed71
OpenSSL API: DH params to der
...
Fix calculation of length of encoding in ssl.c.
Fix encoding to check proper length in asn.c.
Fix tests to check for correct value (api.c).
2021-07-26 22:47:46 +10:00
Sean Parkinson
ec6ffb0583
Configuration: fixes for uncommon configurations
...
./configure --enable-all --disable-filesystem
./configure --enable-all CC=g++ --enable-intelasm
2021-07-26 16:34:20 +10:00
Sean Parkinson
da0fd5c6cf
Merge pull request #4235 from JacobBarthelmeh/Docs
...
update mention of report to include CVE number and last names
2021-07-26 15:01:30 +10:00
JacobBarthelmeh
27c49b1673
Merge pull request #4075 from julek-wolfssl/bind-dns
...
Bind 9.17.9 and 9.11.22 Support
2021-07-26 11:24:57 +07:00
Sean Parkinson
6cb4f0fe08
ECC: ecc point multiply doesn't handle large multipliers
...
Detect large multiplier and return error.
2021-07-26 09:34:56 +10:00
Daniel Pouzzner
494e285cf1
configure.ac: add --with-max-rsa-bits, --with-max-ecc-bits, and --enable-context-extra-user-data[=#]; untabify and otherwise clean up whitespace; tweak api.c, ecc.h, rsa.h, and settings.h, for compatibility with new options.
2021-07-23 22:02:58 -05:00
Daniel Pouzzner
cbb013ca11
wolfssl/test.h: in wolfsentry_*(), correctly use WOLFSENTRY_MASKIN_BITS(), not WOLFSENTRY_CHECK_BITS(), to test for setness of bits.
2021-07-23 22:02:58 -05:00
Kareem
671147549f
Fix missing CBIOSend and properly guard hmac in DupSSL().
2021-07-23 12:11:30 -07:00
Kareem
8bd304e4c5
Fix signed comparison issue with serialSz.
2021-07-23 11:15:40 -07:00
kabuobeid
3bb2d55257
Merge pull request #4233 from JacobBarthelmeh/fuzzing
...
fix memory leak with SMIME
2021-07-23 10:26:02 -07:00
John Safranek
e8d636771f
Merge pull request #4231 from haydenroche5/des3-iv-fips
...
Use correct DES IV size when using FIPS v2.
2021-07-23 09:38:56 -07:00
Juliusz Sosinowicz
8ee9024da9
More rebase fixes
2021-07-23 18:22:46 +02:00
Juliusz Sosinowicz
23cff71bbf
Second wc_EccPrivateKeyDecode not needed now that it supports PKCS8
2021-07-23 18:14:54 +02:00
Juliusz Sosinowicz
9f7aa32662
Fix merge conflict resolution in ECC_populate_EVP_PKEY
2021-07-23 18:14:54 +02:00
Juliusz Sosinowicz
10168e093a
Rebase fixes
2021-07-23 18:14:54 +02:00
Juliusz Sosinowicz
c7d6e26437
Fix DSA signature length
...
The length of the DSA signature is 40 bytes for N=160 but 64 bytes for N=256. New enum values are added for better clarity.
2021-07-23 18:14:18 +02:00
Juliusz Sosinowicz
142ff6d885
Bind 9.11.22
2021-07-23 18:14:18 +02:00
Juliusz Sosinowicz
553c930ecb
dot system test passed
2021-07-23 18:14:18 +02:00
Juliusz Sosinowicz
763aa9b66d
Fix race condition with RsaKey
...
When RsaKey is shared and RsaPublicEncryptEx is called simultaneously by multiple threads, the key->state may be incorrectly set in some threads. This side-steps the state logic when building for bind9.
2021-07-23 18:14:18 +02:00
Juliusz Sosinowicz
69948b3648
WIP
2021-07-23 18:14:18 +02:00
Juliusz Sosinowicz
06ebcca913
Code review and mp_int memory leak fixes
2021-07-23 18:14:18 +02:00
Juliusz Sosinowicz
b4fd737fb1
Bind 9.17.9 Support
...
- Add `--enable-bind` configuration option
- New compatibility API:
- `RSA_get0_crt_params`
- `RSA_set0_crt_params`
- `RSA_get0_factors`
- `RSA_set0_factors`
- `RSA_test_flags`
- `HMAC_CTX_get_md`
- `EVP_MD_block_size`
- `EC_KEY_check_key`
- `o2i_ECPublicKey`
- `DH_get0_key`
- `DH_set0_key`
- Calling `EVP_MD_CTX_cleanup` on an uninitialized `EVP_MD_CTX` structure is no longer an error
- `DH_generate_parameters` and `DH_generate_parameters_ex` has been implemented
2021-07-23 18:14:12 +02:00
David Garske
9f99253a8b
Merge pull request #4219 from SparkiDev/math_neg_mod_2d
...
Maths: mp_mod_2d supports negative value now
2021-07-23 08:40:56 -07:00
David Garske
2372ea45fb
Merge pull request #4229 from SparkiDev/ssl_reorg_4
...
Reorg of ssl.c: CONF, BIO, RAND and EVP_CIPHER
2021-07-23 07:45:30 -07:00
David Garske
92b1f233c9
Merge pull request #4234 from SparkiDev/g++_fix_2
...
C++ fix: cast from void* to X509_OBJECT*
2021-07-23 07:45:05 -07:00
Jacob Barthelmeh
b80d14a872
update mention of report to include CVE number and last names
2021-07-23 21:38:58 +07:00
JacobBarthelmeh
e130da181b
Merge pull request #4232 from SparkiDev/small_build_fixes
...
Small configurations: get compiling
2021-07-23 14:20:56 +07:00
Sean Parkinson
94373781b2
C++ fix: cast from void* to X509_OBJECT*
2021-07-23 14:56:38 +10:00
Jacob Barthelmeh
f2852dad4a
fix memory leak with SMIME
2021-07-23 10:38:11 +07:00
Sean Parkinson
9452c22653
Small configurations: get compiling
...
./configure --enable-psk -disable-rsa --disable-dh -disable-ecc
--disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --disable-coding
--disable-filesystem CFLAGS=-DNO_WOLFSSL_SERVER
./configure --enable-psk -disable-rsa --disable-dh -disable-ecc
--disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --disable-coding
--disable-filesystem CFLAGS=-DNO_WOLFSSL_CLIENT
2021-07-23 11:55:08 +10:00
Hayden Roche
ec180f3901
Use correct DES IV size when using FIPS v2.
2021-07-22 18:17:41 -07:00
Sean Parkinson
715a8303d2
Reorg of ssl.c: CONF, BIO, RAND and EVP_CIPHER
...
Remove whitespace at end of lines in ssl.c.
2021-07-23 09:55:07 +10:00
David Garske
ab226e1a73
Merge pull request #4212 from SparkiDev/sp_c_perf
...
SP C: change number of words for RSA/DH
2021-07-22 09:33:51 -07:00
Sean Parkinson
d372f097f7
SP C: change number of words for RSA/DH
...
Faster small code and fast code.
Allow fixed 4096-bit FFDHE parameters in benchmark.
Convert [u]int[32|64|128]*_t types to sp_[u]int[32|64|128].
Add a div for when top bits are all 1
WOLFSSL_SP_FAST_LARGE_CODE added to make mul_add function faster on
non-embedded platforms.
Change mod_exp window sizes for same performance but less memory.
P256 with c32 now 9 words instead of 10.
2021-07-22 13:12:31 +10:00
Hideki Miyazaki
6a3ff81f2d
use EVP_get_digestbyname
2021-07-22 08:17:55 +09:00
Hideki Miyazaki
b4c61b4df9
add EVP_blake2xyyy
2021-07-22 08:17:54 +09:00
Chris Conlon
ffd69f6426
Merge pull request #4141 from kaleb-himes/FIPS_ANDROID_v454
...
Changes to support Android app with wolfCrypt module v4.5.4
2021-07-21 11:23:42 -06:00
Chris Conlon
c544c19013
Merge pull request #4227 from miyazakh/ERR_lib_error_string
...
add ERR_lib_error_string compatibility layer API
2021-07-21 11:19:29 -06:00
JacobBarthelmeh
83c6688bee
Merge pull request #4135 from dgarske/evp_set1_eckey
...
Fixes for handling PKCS8 ECC key with EVP PKEY
2021-07-22 00:17:11 +07:00
Chris Conlon
49a6c19069
Merge pull request #4216 from dgarske/cube_4.8.0
...
Improvements to the ST Cube pack configuration template
2021-07-21 11:16:33 -06:00
David Garske
2177430b8d
Merge pull request #4224 from JacobBarthelmeh/Release
...
update docs for 4.8.1
2021-07-21 09:00:42 -07:00
David Garske
73ad0315ce
Merge pull request #4226 from douzzer/valgrind-fixes-20210720
...
fixes for valgrind-detected leaks and undefined data accesses
2021-07-21 08:43:00 -07:00
David Garske
ede738b6e4
Merge pull request #4223 from SparkiDev/mem_usage_fixes_1
...
Memory allocation: fixes from memory usage generation
2021-07-21 08:20:09 -07:00
Hideki Miyazaki
b76d44dad9
add ERR_lib_error_string
2021-07-21 10:31:00 +09:00
Sean Parkinson
dc19ba2aa7
Memory allocation: fixes from memory usage generation
...
1. Configuration: If not fast math then don't set ALT_ECC_SIZE when
configuring.
2. ECC KeyShare: Key share entry's key was allocated with type
DYNAMIC_TYPE_PRIVATE_KEY, free with same type.
3. Ed25519: free the SHA-512 temporary object. WOLFSSL_SMALL_STACK_CACHE
builds have dynamicaly allocated data.
4. RSA: Don't keep allocating a new hash object in RsaMGF1 when compiled
with WOLFSSL_SMALL_STACK_CACHE.
2021-07-21 09:54:11 +10:00
Daniel Pouzzner
2014d39254
fixes for valgrind-detected leaks and undefined data accesses: wolfSSL_{SHA*,MD5}_Final (OpenSSL compat wrappers): call wc_*Free() on sha state that otherwise leaks when _SMALL_STACK_CACHE; test_wc_curve25519_shared_secret_ex(): properly initialize public_key.
2021-07-20 18:26:05 -05:00
Sean Parkinson
60288a5083
Merge pull request #4222 from TakayukiMatsuo/tk12625
...
SSL APIs: Add sanity check to some APIs
2021-07-21 09:00:03 +10:00
David Garske
f18344c191
Fix logic error for calculation of PKCS header size in wolfSSL_i2d_PUBKEY.
2021-07-20 15:11:32 -07:00
JacobBarthelmeh
aedd2a33db
Merge pull request #4221 from douzzer/sanitizer-fixes-20210719
...
misc sanitizer fixes etc
2021-07-21 00:40:09 +07:00
David Garske
1a7c8ccbd1
Peer review fixes.
2021-07-20 10:02:16 -07:00
David Garske
762b384be2
Fixes for -pedantic errors.
2021-07-20 10:02:16 -07:00
David Garske
be6fd26f54
Fix for backwards compatibility for i2d_PrivateKey.
2021-07-20 10:02:16 -07:00
David Garske
b344246549
Fix the new PKCS8 header check in wc_CreatePKCS8Key to use the right input buffer.
2021-07-20 10:02:16 -07:00
David Garske
b8ed577e9a
Peer review fixes and improvements. Resolves issue with public API compatibility.
2021-07-20 10:02:16 -07:00
David Garske
fd52424dd5
Improvements to PKCS8 handling.
...
* Fixes for handling PKCS8 in keys with EVP PKEY. Resolves QT test issues. Replacement to PR #3925 .
* Improved code handling for PKCS 8 headers. Change PemToDer to not strip the PKCS8 header.
* Add support in the ECC/RSA/DH key import code to support detection / handling of the PKCS8 header.
* Fix for `wc_RsaKeyToDer` to be exposed with `OPENSSL_EXTRA`.
* Adds EVP PKCS8 test case for RSA and ECC.
* Refactor `test_wolfSSL_OPENSSL_hexstr2buf` to resolve g++ compiler warning.
* Added new `WOLFSSL_TRAP_MALLOC_SZ` build option to trap mallocs that are over a specified size.
2021-07-20 10:02:16 -07:00
David Garske
673becee74
Merge pull request #4210 from JacobBarthelmeh/Testing
...
handle edge case of input buffer malloc'd to location immediately aft…
2021-07-20 09:56:27 -07:00
Jacob Barthelmeh
932abbb6e6
update docs for 4.8.1
2021-07-20 21:20:15 +07:00
JacobBarthelmeh
4cdbe0e23e
Merge pull request #4207 from haydenroche5/sblim-sfcb
...
Add support for sblim-sfcb port.
2021-07-20 20:41:46 +07:00
JacobBarthelmeh
38fd577ded
Merge pull request #4218 from SparkiDev/sp_ecc_add_dbl
...
SP: ecc proj add point, dbl point fix
2021-07-20 18:57:48 +07:00
JacobBarthelmeh
35a0258f47
Merge pull request #4220 from SparkiDev/ecc_neg_string
...
ECC: where reading strings, check for neg (invalid)
2021-07-20 18:56:00 +07:00
Sean Parkinson
ed6e173fc3
Maths: mp_mod_2d supports negative value now
...
SRP: don't clear an mp_int that hasn't been initialized
2021-07-20 18:33:55 +10:00
TakayukiMatsuo
f630fded44
Add sanity check to some APIs
2021-07-20 13:23:16 +09:00
Daniel Pouzzner
a43cc4ebfa
openssl/sha.h: enlarge WOLFSSL_SHA384_CTX.holder to accommodate wc_Sha512.{devId,devCtx}.
2021-07-19 21:41:15 -05:00
Daniel Pouzzner
fe94c36a7b
configure.ac: fix wrong constructions in environment setup for ENABLED_REPRODUCIBLE_BUILD.
2021-07-19 18:31:13 -05:00
Hayden Roche
5507a07563
Add support for sblim-sfcb port.
2021-07-19 16:28:44 -07:00
Daniel Pouzzner
f8d1befdff
autogen.sh: leave .git/hooks/pre-{commit,push} alone unless they don't exist, to allow for local ecosystem-dependent customizations of the hooks.
2021-07-19 16:31:22 -05:00
Daniel Pouzzner
4df6fb74b0
fix sanitizer-detected uninitialized/null data accesses: wc_SrpComputeKey(), XChaCha20Poly1305_test().
2021-07-19 16:29:43 -05:00
John Safranek
77c9b36b5a
Merge pull request #4181 from dgarske/sniffer_keycb
...
Sniffer fixes and new sniffer key callback support
2021-07-19 13:26:17 -07:00
JacobBarthelmeh
020e23783b
Merge pull request #4180 from kaleb-himes/DEFAULT_CA_BOOL
...
Fix basic constraints extension present and CA Boolean not asserted
2021-07-19 23:08:27 +07:00
Sean Parkinson
5b621cf039
ECC: where reading strings, check for neg (invalid)
2021-07-19 22:58:07 +10:00
Sean Parkinson
d45e78b715
SP: ecc proj add point, dbl point fix
...
Set infinity field of points.
2021-07-19 12:45:52 +10:00
David Garske
bbe47a81b7
Merge pull request #4183 from douzzer/ED-streaming-verify
...
add streaming API to the ED verify routines
2021-07-18 14:12:42 -07:00
Daniel Pouzzner
186ff2b365
make -DNO_ED25519_KEY_{IMPORT,EXPORT} buildable, and fix api.c and suites.c so that -DNO_ED*_KEY_{IMPORT,EXPORT} pass make check.
2021-07-16 23:07:28 -05:00
Daniel Pouzzner
ac92204c15
make -DNO_ED448_KEY_{IMPORT,EXPORT} buildable
2021-07-16 18:21:30 -05:00
Daniel Pouzzner
785a8f83ed
evp.c: fixes in wolfSSL_EVP_CIPHER_CTX_ctrl() from peer review.
2021-07-16 17:52:28 -05:00
David Garske
070ca6c34d
Fixes to properly support sniffer with secure renegotiation.
2021-07-16 14:48:22 -07:00
Daniel Pouzzner
c97eff6e61
evp.c: add missing checks and logic in wolfSSL_EVP_CIPHER_CTX_ctrl(), and fix api.c:test_IncCtr() to exercise wolfSSL_EVP_CIPHER_CTX_ctrl() with EVP_CTRL_GCM_IV_GEN using an AES cipher, with thanks to Juliusz.
2021-07-16 15:30:23 -05:00
Daniel Pouzzner
05128968f6
fixes for null pointer accesses detected by clang sanitizer. also, gate SuiteTest() on !NO_WOLFSSL_CIPHER_SUITE_TEST in tests/unit.c, greatly reducing time to completion when not debugging cipher suites.
2021-07-16 13:49:47 -05:00
Daniel Pouzzner
5e8da2348f
ED: add --enable-ed25519-stream and --enable-ed448-stream to configure.ac, disabled by default, and add them to --enable-all and --enable-all-crypto lists, along with --enable-aesgcm-stream; report AES-GCM and ED* streaming API options in feature summary rendered at end;
...
refactor ED routines to pivot on WOLFSSL_ED*_PERSISTENT_SHA and WOLFSSL_ED*_STREAMING_VERIFY macros, with sha state in the key struct only when WOLFSSL_ED*_PERSISTENT_SHA, otherwise on the stack as before;
add ed*_hash_init() and ed*_hash_free() local helpers;
ED* peer review: fix line lengths, remove superfluous retval checks, tweaks for efficiency, and add ED448_PREHASH_SIZE to ed448.h.
2021-07-16 13:49:47 -05:00
Daniel Pouzzner
9b43e57ccf
ED: add streaming API to the ED verify routines: wc_ed*_verify_msg_init(), wc_ed*_verify_msg_update(), wc_ed*_verify_msg_final();
...
harmonize the ED448 API with the ED25519 API by making wc_ed448_verify_msg_ex() and wc_ed448_init_ex() public functions;
track devId and heap pointer in ed*_key.{devId,heap}, and pass them through to sha init functions;
add ed*_key.{sha,sha_clean_flag}, and ed*_hash_{reset,update,final} functions, and use them for all ED hashing ops, to support streaming API and for optimally efficient reuse for the preexisting ED calls;
add ed448_hash() akin to ed25519_hash(), and use it in place of wc_Shake256Hash(), for .sha_clean_flag dynamics.
add to wc_ed*_import_private_key() the ability to import the combined key generated by wc_ed*_export_private() without supplying the redundant public key;
add macro asserts near top of ed*.h to assure the required hash functions are available;
fix {NO,HAVE}_ED*_{SIGN,VERIFY};
wolfcrypt/test/test.c: add missing key initializations in ed*_test();
wolfcrypt/test/test.c: fix unaligned access in myDecryptionFunc() detected by -fsanitize=address,undefined.
2021-07-16 13:49:47 -05:00
David Garske
fe77e29ba0
Fix for SNI refactor handling of return codes. Fix for possible use of NULL on client array.
2021-07-16 11:23:20 -07:00
kaleb-himes
f408eeb5bb
Implement peer review suggestions
2021-07-16 09:57:11 -06:00
Lealem Amedie
73323e694f
Addressing possible leaks in ssl.c and api.c
2021-07-16 09:48:06 -06:00
JacobBarthelmeh
b9c707511b
Merge pull request #4211 from SparkiDev/ocsp_no_check
...
OCSP: improve handling of OCSP no check extension
2021-07-16 16:06:41 +07:00
Sean Parkinson
f93083be72
OCSP: improve handling of OCSP no check extension
2021-07-16 12:19:39 +10:00
Sean Parkinson
8e6c31b15d
ECC bench: can't use SAKKE curve with ECDH/ECDSA
...
Skip curve benchmarking when all curves are being benchmarked.
2021-07-16 12:06:14 +10:00
Sean Parkinson
af98e64b88
Merge pull request #4208 from dgarske/leaks
...
Fixes for possible leaks with ECCSI and DH test
2021-07-16 08:59:11 +10:00
David Garske
8a8b315ed8
Improvements to the ST Cube pack configuration template.
2021-07-15 14:02:56 -07:00
Jacob Barthelmeh
12a4517d6b
handle edge case of input buffer malloc'd to location immediately after output buffer
2021-07-15 22:38:48 +07:00
David Garske
6c3c635be7
Merge pull request #4206 from julek-wolfssl/remove-api
2021-07-15 06:41:00 -07:00
JacobBarthelmeh
6a0809b53b
Merge pull request #4185 from guidovranken/fix-gh-issue-4184
...
Fix compilation failure with WOLFSSL_PUBLIC_ECC_ADD_DBL
2021-07-15 16:19:30 +07:00
JacobBarthelmeh
fc6aa19eb8
Merge pull request #4200 from haydenroche5/tcpdump
...
Add support for tcpdump with wolfSSL.
2021-07-15 14:57:47 +07:00
JacobBarthelmeh
6458a8cedd
Merge pull request #4187 from SparkiDev/sp_math_mod_red_fix
...
SP math: montgomery reduction edge case
2021-07-15 14:33:26 +07:00
Sean Parkinson
2959902a10
TLS 1.3: ability to turn peek change off
...
Allow post-handshake peeking for handshaking messages to be disabled.
Not all customers want to handle this.
Clear WOLFSSL_ERROR_WANT_READ error on entry to ReceiveData which was
set when peeking found handshake message.
2021-07-15 10:14:13 +10:00
David Garske
fbbb290d9e
Fixes for possible leaks with HAVE_WOLF_BIGINT used by async in ECCSI and DH test. Fixes for GCC -fsanitize=address with --enable-all.
2021-07-14 14:57:32 -07:00
David Garske
3ff21171cb
Fix for secure renegotiation, which was not keeping handshake resources. Added NULL checks for case where handshake resources might be free'd to prevent possible use of NULL. Refactor the SNI client hello processing to not assume TLS header is in prior buffer (not there for decrypted handshake packets).
2021-07-14 10:44:33 -07:00
John Safranek
f82fd01283
Merge pull request #4202 from JacobBarthelmeh/BuildOptions
...
fix for build with wpas and disable tls13
2021-07-14 09:07:08 -07:00
JacobBarthelmeh
b5eef78cdb
Merge pull request #4176 from SparkiDev/sp_math_read_bin_max
...
SP math all: allow reading of bin up to max digit size
2021-07-14 16:03:32 +07:00
JacobBarthelmeh
18399091ce
Merge pull request #4012 from julek-wolfssl/haproxy
...
HaProxy 2.4-dev18 support
2021-07-14 15:46:04 +07:00
Daniel Pouzzner
81f3f417e8
Merge pull request #4190 from SparkiDev/bench_sakke_ecdsa
...
ECC bench: can't use SAKKE curve with ECDH/ECDSA
2021-07-13 15:39:25 -05:00
David Garske
10987a69d7
Merge pull request #4201 from JacobBarthelmeh/Release
...
bump version for dev
2021-07-13 11:41:51 -07:00
JacobBarthelmeh
0d55dcaaa0
Merge pull request #4188 from guidovranken/mp_invmod_slow-check
...
Add missing return value check in mp_invmod_slow
2021-07-14 01:27:10 +07:00
Jacob Barthelmeh
3f22721a86
use version from wolfssl/version.h with driver
2021-07-13 22:39:39 +07:00
Jacob Barthelmeh
2592a04d8a
fix for build with wpas and disable tls13
2021-07-13 15:49:40 +07:00
Jacob Barthelmeh
3bebcaaf54
bump version for dev
2021-07-13 04:18:52 +07:00
John Safranek
52b8c7b1fa
Merge pull request #4192 from haydenroche5/ocsp_http_header
...
Improve wolfIO_HttpProcessResponse HTTP header checking logic.
2021-07-12 14:13:07 -07:00
Hayden Roche
9f8e728672
Add support for tcpdump with wolfSSL.
2021-07-12 14:06:25 -07:00
David Garske
db32570ab3
Fix for missing sp_radix_size with WC_MP_TO_RADIX.
2021-07-12 13:40:55 -07:00
John Safranek
add4a68465
Merge pull request #4199 from JacobBarthelmeh/Certs
...
Lighttpd build fix and gencertbuf on updated ed25519 certs
2021-07-12 09:15:50 -07:00
Jacob Barthelmeh
851c1fe1cf
fix for lighttpd build
2021-07-12 16:25:50 +07:00
Jacob Barthelmeh
2f9af5f753
gencertbuf on updated ed25519 certs
2021-07-12 14:31:03 +07:00
John Safranek
30baa83a0b
Merge pull request #4198 from douzzer/fix-linuxkm-for-v4.8
2021-07-09 19:15:23 -07:00
John Safranek
50d007ded8
Merge pull request #4196 from JacobBarthelmeh/Release
...
Release version 4.8.0
2021-07-09 14:33:26 -07:00
John Safranek
84539be656
Merge pull request #4197 from JacobBarthelmeh/Jenkins
...
Updates found with Jenkins tests
2021-07-09 14:32:43 -07:00
Daniel Pouzzner
15c890179f
Linux kernel module: add an explicit -ffreestanding to CFLAGS in linuxkm/Makefile, and in wc_port.h ifdef WOLFSSL_LINUXKM, ignore -Wtype-limits in Linux kernel header files (needed for kernel v5.13), and suppress inclusion of stdint-gcc.h.
2021-07-09 15:23:07 -05:00
Jacob Barthelmeh
88b70a3906
update google cert that was set to expire in Dec 2021
2021-07-09 23:57:50 +07:00
JacobBarthelmeh
c01a63508a
account for testing on big endian system
2021-07-09 08:18:39 -06:00
Jacob Barthelmeh
f4c4cf8afe
update changelog for release 4.8.0
2021-07-09 17:02:18 +07:00
David Garske
e1b487ab9f
Fix for wc_export_int with WC_TYPE_HEX_STR, which was not returning the correct length.
2021-07-08 14:36:36 -07:00
David Garske
4f055653c7
Restore TLS v1.3 hello_retry behavior with session id. Fix for SNI with default (no name) putting newline due to fgets.
2021-07-08 13:50:08 -07:00
JacobBarthelmeh
500a6c8b27
prepare for release 4.8.0
2021-07-08 12:02:40 -06:00
David Garske
4cb076f22b
Cleanup to remove duplicate stat sslResumptionValid. Add print of sslResumptionInserts.
2021-07-08 09:49:13 -07:00
David Garske
ddbe0e6dab
Fix for sniffer stats on resume miss. The logic for hello_retry_request will no longer try and do resume, so restore BAD_SESSION_RESUME_STR error.
2021-07-08 09:31:59 -07:00
JacobBarthelmeh
127add4bf7
include stddef for size_t type for ptr
2021-07-08 07:06:20 -06:00
Jacob Barthelmeh
7bcd0da164
warning for length used on strncpy
2021-07-08 15:51:17 +07:00
Jacob Barthelmeh
263e03748e
fix issue of handling partially streamed PKCS7 input
2021-07-08 15:25:40 +07:00
JacobBarthelmeh
a250e1f23a
Merge pull request #4194 from ejohnstown/to-fix
...
Timeout Fix
2021-07-08 14:34:42 +07:00
John Safranek
c9aa23ac7a
Merge pull request #4191 from dgarske/htons
...
Fix for missing `XHTONS` with `WOLFSSL_USER_IO` and session tickets
2021-07-07 16:21:59 -07:00
John Safranek
00cab36b36
Timeout Fix
...
The macros setting up the timeout for the select used to timeout just
multiplied the ms by 1000 to make us. The BSD select used on macOS
doesn't like the us to be greater than 999999. Modified to carry the
excess us over into the seconds.
2021-07-07 16:14:48 -07:00
Sean Parkinson
849020660f
Merge pull request #4182 from JacobBarthelmeh/CAAM
...
check return of DSA decode
2021-07-08 08:16:46 +10:00
John Safranek
b9dac74086
Merge pull request #4193 from JacobBarthelmeh/StaticAnalysisTests
...
Static analysis tests
2021-07-07 14:23:58 -07:00
JacobBarthelmeh
86e5287a14
Merge pull request #4032 from TakayukiMatsuo/tk11968
...
Make wolfSSL_CTX_set_timeout reflect to Session-ticket-lifetime-hint
2021-07-07 22:26:06 +07:00
Juliusz Sosinowicz
b7bd3766c7
Fix pedantic errors about macros in macros
2021-07-07 10:54:34 +02:00
JacobBarthelmeh
7b9d6a3f5e
Merge pull request #3792 from TakayukiMatsuo/os_keylog
...
Add wolfSSL_CTX_set_keylog_callback
2021-07-07 15:34:33 +07:00
Hayden Roche
7422f07fb5
Improve wolfIO_HttpProcessResponse HTTP header checking logic.
...
Modify this function to just ensure that the response header starts with "HTTP
1.x 200" (where x is 0, 1, etc.).
2021-07-06 15:18:26 -07:00
David Garske
41ac17cdc6
Improve support for XHTONS with WOLFSSL_USER_IO and session tickets with default encryption implementation !WOLFSSL_NO_DEF_TICKET_ENC_CB.
2021-07-06 13:13:35 -07:00
Jacob Barthelmeh
b1a6d88af6
fix for memory leak
2021-07-06 23:37:35 +07:00
Juliusz Sosinowicz
fc7533fe5e
Code review changes
2021-07-06 16:14:25 +02:00
Juliusz Sosinowicz
1acf906612
Code review changes
2021-07-06 15:39:23 +02:00
Juliusz Sosinowicz
6dfc702364
Correct serverDH_Pub length on renegotiation
...
On a renegotiation the serverDH_Pub buffer may be too short. The previous DhGenKeyPair call may have generated a key that has a shorter binary representation (usually by one byte). Calling DhGenKeyPair with this shorter buffer results in a WC_KEY_SIZE_E error.
2021-07-06 15:39:23 +02:00
Juliusz Sosinowicz
1b6b16c2c3
HaProxy 2.4-dev18 support
...
*This patch is dependent on https://github.com/wolfSSL/wolfssl/pull/3871 because proto version selection logic is refactored in that pull request.*
This patch contains the following changes:
- Enable more options with `--enable-haproxy`
- Compatibility layer additions
- `STACK_TYPE_X509_OBJ`
- `OCSP_id_cmp`
- `X509_STORE_get0_objects`
- `X509V3_EXT_nconf_nid`
- `X509V3_EXT_nconf`
- `X509_chain_up_ref`
- `X509_NAME_hash`
- `sk_X509_NAME_new_null`
- `X509_OBJECT_get0_X509`
- `X509_OBJECT_get0_X509_CRL`
- `ASN1_OCTET_STRING_free`
- `X509_LOOKUP_TYPE`
- `OSSL_HANDSHAKE_STATE`
- New `OPENSSL_COMPATIBLE_DEFAULTS` define will set default behaviour that is compatible with OpenSSL
- WOLFSSL_CTX
- Enable all compiled in protocols
- Allow anonymous ciphers
- Set message grouping
- Set verify to SSL_VERIFY_NONE
- In `SetSSL_CTX`, don't change `send` and `recv` callback if currently using `BIO`
- `ssl->peerVerifyRet`
- Return first that occured
- Set correct value on date error
- Set revoked error on OCSP or CRL error
- Save value in session and restore on resumption
- Add to session serialization
- With `OPENSSL_EXTRA`, send an alert on invalid downgrade attempt
- Handle sni callback `SSL_TLSEXT_ERR_NOACK`
- Add `WOLFSSL_VERIFY_DEFAULT` option for `wolfSSL_CTX_set_verify` and `wolfSSL_set_verify` to allow resetting to default behaviour
2021-07-06 15:39:23 +02:00
Jacob Barthelmeh
a6ce91f3bb
fix for gcc-11 build with blake2
2021-07-06 14:53:39 +07:00
Jacob Barthelmeh
ae00b5acd0
some minor changes for unintialized and null infer reports
2021-07-06 14:13:45 +07:00
Sean Parkinson
34528eb6c9
ECC bench: can't use SAKKE curve with ECDH/ECDSA
...
Skip curve benchmarking when all curves are being benchmarked.
2021-07-06 12:19:50 +10:00
Guido Vranken
e0f268e522
Simplify mp_invmod_slow fix
2021-07-06 02:29:31 +02:00
Guido Vranken
9783d64f7e
Add missing return value check in mp_invmod_slow
2021-07-06 02:13:42 +02:00
Sean Parkinson
08ebd34f31
SP math: montgomery reduction edge case
...
4 and 6 word specific implementations now handle rare overflow correctly
in last mul-add of loop.
2021-07-06 10:03:24 +10:00
Guido Vranken
460b513594
Fix compilation failure with WOLFSSL_PUBLIC_ECC_ADD_DBL
...
Fixes https://github.com/wolfSSL/wolfssl/issues/4184
2021-07-03 19:31:29 +02:00
TakayukiMatsuo
5df0f7820a
Add wolfSSL_CTX_set_keylog_callback
2021-07-03 14:51:23 +09:00
Jacob Barthelmeh
89866846d6
check return of DSA decode
2021-07-03 03:41:40 +07:00
David Garske
26789ef877
Fix variable declaration mid-code.
2021-07-02 13:24:25 -07:00
David Garske
2dd169f9a1
Added new sniffer API for callback for key use ssl_SetKeyCallback. Support indicated by WOLFSSL_SNIFFER_KEY_CALLBACK. Trace cleanup for custom error.
2021-07-02 12:18:56 -07:00
kaleb-himes
93a8f36530
Fix basic constraints extension present and CA Boolean not asserted
2021-07-02 12:16:16 -06:00
TakayukiMatsuo
567d8ed704
Make wolfSSL_set_session return success on timeout under WOLFSSL_ERROR_CODE_OPENSSL macro definition.
2021-07-02 10:50:00 +09:00
TakayukiMatsuo
aef9e560b1
Make wolfSSL_CTX_set_timeout call wolfSSL_CTX_set_TicketHint internally to change session-ticket-lifetime-hint.
2021-07-02 09:15:01 +09:00
David Garske
197b959916
Merge pull request #4177 from SparkiDev/ecc_exp_point_size
...
ECC: validate ordinate length before export
2021-07-01 17:07:35 -07:00
David Garske
d16e374972
Merge pull request #4160 from JacobBarthelmeh/fuzzing
...
better checking on length of streaming buffer
2021-07-01 17:04:49 -07:00
David Garske
43f8c5ba1b
Merge pull request #4121 from JacobBarthelmeh/PKCS7
...
wc_PKCS7_DecodeCompressedData optionally handle a packet without cont…
2021-07-01 17:03:56 -07:00
JacobBarthelmeh
9b8142c1ff
Merge pull request #4174 from SparkiDev/zephyr_2_6_99
...
Zephyr Project: update port to work with latest
2021-07-02 03:23:10 +07:00
Daniel Pouzzner
e9e41d3344
Merge pull request #4070 from elms/fsanitize/undefined_fixes
...
address errors with `-fsanitize=undefined`
2021-07-01 13:00:06 -05:00
JacobBarthelmeh
45486ac904
Merge pull request #4166 from miyazakh/supportedversion_ex_mindowngrade
...
not include smaller versions than minimum downgrade
2021-07-01 21:00:20 +07:00
JacobBarthelmeh
7a42096643
Merge pull request #4175 from SparkiDev/sp_thumb_clang
...
SP: Thumb implementaton that works with clang
2021-07-01 20:39:06 +07:00
Sean Parkinson
a992480f91
ECC: validate ordinate length before export
2021-07-01 15:50:04 +10:00
Elms
75e807abc6
Fixes for gcc-10 and -fsanitize=undefined for rabbit.c
...
* One introduced in #4156
* One from previous commit in this PR
2021-06-30 22:20:17 -07:00
Sean Parkinson
6694775d4b
Changes to compile without XTREAM_ALIGN
...
Use macro to load 32 bits from input parameters key in hc128.c and input
in rabbit.c
Also fix warning about string copy.
2021-06-30 21:58:30 -07:00
Elms
56d879f422
address scan-build issues for clang 6 and 10
2021-06-30 21:58:30 -07:00
Elms
c9597ea735
sha3: align data for Sha3Update
2021-06-30 21:58:30 -07:00
Elms
dc7beab784
address errors with -fsanitize=undefined
...
- fix null dereferences or undefined `memcpy` calls
- fix alignment in `myCryptoDevCb`
- fix default dtls context assignment
- add align configure option to force data alignment
TESTED:
`./configure CFLAGS=-fsanitize=undefined\ -DWOLFSSL_GENERAL_ALIGNMENT=1 --enable-all`
2021-06-30 21:58:30 -07:00
Sean Parkinson
4cff893c5f
SP math all: allow reading of bin up to max digit size
2021-07-01 14:29:58 +10:00
David Garske
f9cd83743a
Fix include.am typo.
2021-06-30 08:42:15 -07:00
David Garske
23b573c70a
Autoconf Include.am fixes, spelling and copyright.
2021-06-30 08:38:17 -07:00
David Garske
c820b5679a
Merge pull request #4173 from SparkiDev/sp_int_mingw64
2021-06-30 06:57:58 -07:00
Jacob Barthelmeh
893b71e8c1
remove dead code
2021-06-30 19:54:25 +07:00
Juliusz Sosinowicz
0277fa6d7c
Remove unused wolfSSL_StartSecureRenegotiation
2021-06-30 13:51:11 +02:00
Jacob Barthelmeh
23eededc36
simplify and fix max stream buffer length
2021-06-30 15:26:44 +07:00
Hideki Miyazaki
b0688688c1
addressed review comments
2021-06-30 13:52:46 +09:00
Sean Parkinson
60a520c525
SP: Thumb implementaton that works with clang
2021-06-30 13:10:29 +10:00
Sean Parkinson
d1fb736136
Zephyr Project: update port to work with latest
2021-06-30 10:29:54 +10:00
Sean Parkinson
36d534034c
SP math: cast number to sp_digit rather than declare as long
2021-06-30 09:28:51 +10:00
David Garske
ae68de060a
Merge pull request #4171 from SparkiDev/sp_small_fast_modexp
...
SP: allow fast mod_exp to be compiled for small C code
2021-06-29 13:32:55 -07:00
David Garske
0d1672dfee
Merge pull request #4170 from SparkiDev/sp_mingw64
...
SP: Don't cast number to sp_digit rather than declare as long
2021-06-29 13:32:28 -07:00
Chris Conlon
9179071af5
Merge pull request #4153 from JacobBarthelmeh/Testing
...
fix for keyid with ktri cms
2021-06-29 11:40:00 -06:00
David Garske
e59cc79a1f
Document new WOLFSSL_SP_FAST_MODEXP option.
2021-06-29 09:16:27 -07:00
David Garske
a748b5264e
Fix for wolfcrypt/src/sp_int.c:2720:34: error: left shift count >= width of type with mingw64.
2021-06-29 09:13:32 -07:00
David Garske
b0e9531f26
Merge pull request #4169 from SparkiDev/dh_anon_tls12
...
TLS: Get DH anon working TLS 1.2 and below
2021-06-29 08:53:44 -07:00
Sean Parkinson
303f944935
SP: allow fast mod_exp to be compiled for small C code
2021-06-29 12:51:21 +10:00
Sean Parkinson
08e560e0a7
SP: Don't cast number to sp_digit rather than declare as long
...
mingw64 has numbers as 32-bit type when declarted long.
Fixup some line lengths.
2021-06-29 11:07:47 +10:00
Sean Parkinson
f56bf3d8ee
TLS: Get DH anon working TLS 1.2 and below
...
Send the server DH parameters in ServerKeyExchange.
./configure '--enable-anon' '--disable-rsa' '--enable-oldtls'
2021-06-29 10:29:39 +10:00
David Garske
0bb66f3023
Merge pull request #4167 from danielinux/pka_readme
...
port/st: added mention of the PKA support in README
2021-06-28 10:35:32 -07:00
Eric Blankenhorn
33174cec5c
Merge pull request #4161 from dgarske/ssl_doxy
...
Added inline documentation for `wolfSSL_CTX_load_verify_buffer_ex`
2021-06-28 12:35:11 -05:00
Daniele Lacamera
15080317ce
port/st: added mention of the PKA support in README
2021-06-28 14:39:58 +02:00
David Garske
80480e5d1f
Merge pull request #4163 from lealem47/rsa-test
...
Rsa test
2021-06-25 13:12:58 -07:00
David Garske
5adbcfb3be
Merge pull request #4151 from SparkiDev/sp_math_all_base10
...
SP math all: fix read radix 10
2021-06-25 09:37:05 -07:00
David Garske
63ad5d58a2
Merge pull request #4162 from ejohnstown/abi-update
...
ABI Update
2021-06-25 08:36:07 -07:00
John Safranek
5437883da7
Merge pull request #4164 from dgarske/async_frag
...
Fix for async with fragmented packets
2021-06-25 08:33:50 -07:00
David Garske
74b9b5a8cd
Merge pull request #4156 from SparkiDev/regression_fixes_1
...
Regression test fixes
2021-06-25 07:48:02 -07:00
Lealem Amedie
729fea6b71
unused variable fix in rsa_oaep_padding_test fix
2021-06-25 08:39:44 -06:00
Jacob Barthelmeh
5038a27cda
add test cases and set content oid with decode encrypted data
2021-06-25 21:16:01 +07:00
Jacob Barthelmeh
55002c56d2
update for ber padding
2021-06-25 18:57:28 +07:00
Hideki Miyazaki
5bb52915b9
update test conf to fix jenkins failures
2021-06-25 16:31:49 +09:00
Sean Parkinson
fbe086534a
SP math all: fix read radix 10
...
Ensure first digit is 0 when zeroing a number.
Check size of output in _sp_mul_d() - only place to be sure of overflow.
Modify callers of _sp_mul_d() to check return.
2021-06-25 15:55:32 +10:00
Hideki Miyazaki
d576e3ef96
not send smaller versions than minimum downgradable version as supportedversion ext
2021-06-25 14:51:34 +09:00
Sean Parkinson
dab6724059
Regression fixes: more configurations
...
./configure --disable-rsa --disable-ecc --disable-dh --enable-curve25519
&& make
./configure --disable-aescbc --disable-chacha --disable-poly1305
--disable-coding && make
2021-06-25 15:23:51 +10:00
Lealem Amedie
873f10b0cf
Simplifying rsa_test() by extracting sections as separate functions
2021-06-24 20:47:14 -06:00
Sean Parkinson
1994811d24
Merge pull request #4144 from haydenroche5/pkcs8
...
Make a bunch of PKCS#8 improvements.
2021-06-25 12:22:11 +10:00
Sean Parkinson
dae6683803
Merge pull request #4030 from julek-wolfssl/ZD12235
...
Expand SHA-3 support
2021-06-25 12:18:03 +10:00
Sean Parkinson
8592053856
Regression test fixes
...
./configure --enable-all --disable-rsa
./configure --disable-chacha --disable-asm
./configure --disable-rsa --disable-ecc --disable-dh --enable-curve25519
--enable-cryptonly (and ed25519, curve448, ed448)
./configure --disable-tls13 --enable-psk --disable-rsa --disable-ecc
--disable-dh C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK
./configure --disable-oldtls --enable-psk -disable-rsa --disable-dh
-disable-ecc --disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK
--enable-lowresource --enable-singlethreaded --disable-asm
--disable-errorstrings --disable-pkcs12 --disable-sha3 --disable-sha224
--disable-sha384 --disable-sha512 --disable-sha --disable-md5
-disable-aescbc --disable-chacha --disable-poly1305 --disable-coding
Various build combinations with WOLFSSL_SP_MATH and WOLFSSL_SP_MATH_ALL
2021-06-25 09:18:06 +10:00
David Garske
45ef68d5c7
Fix for async with fragmented packets where inline crypto could be overwritten on reprocessing fragment. FIxes unit tests with --enable-all --enable-asynccrypt. Minor cleanup for line length and free verify RSA buffer sooner.
...
Reproducible with:
```
./examples/server/server -v 3 -l ECDHE-ECDSA-AES256-GCM-SHA384 -c ./certs/server-ecc.pem -k ./certs/ecc-key.pem -2
./examples/client/client -v 3 -l ECDHE-ECDSA-AES256-GCM-SHA384 -A ./certs/ca-ecc-cert.pem -F 6 -2
```
2021-06-24 16:03:12 -07:00
John Safranek
66c29ef1ca
ABI Update
...
Add wolfSSL_CTX_set_verify to the ABI list.
2021-06-24 14:08:28 -07:00
David Garske
4ef3c5d75c
Added inline documentation for wolfSSL_CTX_load_verify_buffer_ex.
2021-06-24 10:38:34 -07:00
Juliusz Sosinowicz
656e49cc3b
Expand SHA-3 support
...
Add more support in the EVP layer as well as add signing support. The SHA-3 OID's were also added for DER algorithm identifier encoding.
2021-06-24 19:31:43 +02:00
David Garske
c59d1f2e8d
Merge pull request #4155 from SparkiDev/ssl_reorg_3
...
Reorg of ssl.c: standard C wrappers, EX_DATA, BUF_MEM, TXT_DB
2021-06-24 09:53:53 -07:00
David Garske
1ec212be81
Merge pull request #4159 from SparkiDev/sakke_eccsi_fix_1
...
SAKKE: fix configurations
2021-06-24 09:48:14 -07:00
David Garske
97ab1bb013
Merge pull request #4154 from SparkiDev/hmac_update_ct
...
TLS hmac: handle truncated mac in Hmac_UpdateFinal_CT()
2021-06-24 09:28:22 -07:00
Jacob Barthelmeh
b826083fbf
better checking on length of streaming buffer
2021-06-24 23:06:37 +07:00
Sean Parkinson
2fb6a9eacf
SAKKE: fix configurations
...
Fix position of sp_1024_norm_18 now that div requires it:
./configure --disable-shared --enable-sakke --disable-eccsi
--enable-sp
Fix missing '{' in sp_mulmod_table_1024:
./configure --disable-shared --enable-sakke --enable-eccsi
--enable-smallstack --enable-sp
2021-06-24 14:01:27 +10:00
Sean Parkinson
92a4e30b69
Merge pull request #4158 from dgarske/nxp_ltc_rsa2
...
Fixes for NXP LTC with RSA and Blinding
2021-06-24 12:14:04 +10:00
David Garske
73c90369c6
Fix for int neg being defined mid code. Fix limit check for mp_mulmod using hardware vs software. Resolves issue when using WC_RSA_BLINDING.
2021-06-23 14:45:52 -07:00
David Garske
2d1b113f51
Fix for missing wolfcrypt_mp_prime_is_prime_ex def.
2021-06-23 14:45:52 -07:00
John Safranek
ae2f2b246e
Merge pull request #4148 from BrianAker/master
...
Fix for make distcheck, maintainer-clean, to allow distribution builds.
2021-06-23 10:33:06 -07:00
David Garske
81daf9172b
Merge pull request #3872 from ejohnstown/pcExt
...
Policy Constraints Extension
2021-06-23 09:40:15 -07:00
Hayden Roche
b3401bd102
Make a bunch of PKCS#8 improvements.
...
- Add doxygen documentation for wc_GetPkcs8TraditionalOffset, wc_CreatePKCS8Key,
wc_EncryptPKCS8Key, and wc_DecryptPKCS8Key.
- Add a new API function, wc_CreateEncryptedPKCS8Key, which handles both
creation of an unencrypted PKCS#8 key and the subsequent encrypting of said key.
This is a wrapper around TraditionalEnc, which does the same thing. This may
become a first-class function at some point (i.e. not a wrapper). TraditionalEnc
is left as is since it is used in the wild.
- Added a unit test which exercises wc_CreateEncryptedPKCS8Key and
wc_DecryptPKCS8Key. Testing wc_CreateEncryptedPKCS8Key inherently also tests
TraditionalEnc, wc_CreatePKCS8Key, and wc_EncryptPKCS8Key.
- Modified wc_EncryptPKCS8Key to be able to return the required output buffer
size via LENGTH_ONLY_E idiom.
- Added parameter checking to wc_EncryptPKCS8Key and wc_DecryptPKCS8Key.
2021-06-23 08:39:20 -07:00
John Safranek
f762672a12
Merge pull request #4157 from julek-wolfssl/app-data-reason
...
Add a reason text for APP_DATA_READY
2021-06-23 08:30:19 -07:00
Juliusz Sosinowicz
4eff3ff3dd
Add a reason text for APP_DATA_READY
2021-06-23 13:43:56 +02:00
Sean Parkinson
945acb4c2f
Reorg of ssl.c: standard C wrappers, EX_DATA, BUF_MEM, TXT_DB
2021-06-23 11:28:38 +10:00
Sean Parkinson
2923d812bd
Merge pull request #4058 from miyazakh/qt_oslext_cs
...
TLS: extend set_cipher_list() compatibility layer API
2021-06-23 10:12:11 +10:00
Sean Parkinson
5cf7e17820
TLS hmac: handle truncated mac in Hmac_UpdateFinal_CT()
2021-06-23 09:54:41 +10:00
John Safranek
a5852fe440
Merge pull request #4119 from julek-wolfssl/dtls-seq-num-refactor
...
Refactor `dtls_expected_peer_handshake_number` handling
2021-06-22 16:29:45 -07:00
Sean Parkinson
eccfb4f632
Merge pull request #4125 from dgarske/sniffer_etsi
...
TLS: Fixes for sniffer and static ephemeral keys
2021-06-23 09:17:13 +10:00
Chris Conlon
4b3bd3e384
Merge pull request #4049 from miyazakh/set_verifyDepth_3
...
Set verify depth limit
2021-06-22 10:23:43 -06:00
Chris Conlon
b70e028200
Merge pull request #4087 from miyazakh/get_ciphers_compat
...
higher priority of cipher suite is on top of stack
2021-06-22 10:22:43 -06:00
Chris Conlon
446393bcab
Merge pull request #3793 from TakayukiMatsuo/os_base64
...
Add wolfSSL_EVP_Encode/Decode APIs
2021-06-22 10:19:30 -06:00
Chris Conlon
b050463dce
Merge pull request #4059 from miyazakh/qt_unit_test
...
fix qt unit test
2021-06-22 10:12:48 -06:00
Jacob Barthelmeh
647bde671c
macro guard on test case
2021-06-22 22:56:35 +07:00
Jacob Barthelmeh
2b1a6cfb54
add setting contentOID with decode enveloped data
2021-06-22 22:06:16 +07:00
Jacob Barthelmeh
a4b5ebb62f
remove contentOID check
2021-06-22 21:59:57 +07:00
Jacob Barthelmeh
31e8784057
fix for compressedData eContent encoding with PKCS7
2021-06-22 21:59:57 +07:00
Jacob Barthelmeh
9c2de0e40a
wc_PKCS7_DecodeCompressedData optionally handle a packet without content wrapping
2021-06-22 21:59:57 +07:00
Jacob Barthelmeh
3cd43cf692
fix for keyid with ktri cms
2021-06-22 21:33:12 +07:00
David Garske
67b87a8883
Merge pull request #4127 from douzzer/wolfsentry-client
...
outbound connection filtering and wolfSentry integration
2021-06-22 07:27:18 -07:00
David Garske
c4ea64b7fc
Merge pull request #4140 from SparkiDev/set_sig_algs
2021-06-21 19:18:10 -07:00
David Garske
52582ede28
Merge pull request #4146 from SparkiDev/pkcs11_dec_final
...
PKCS #11 : Use C_Decrypt instead of C_DecryptUpdate
2021-06-21 15:28:45 -07:00
Sean Parkinson
ab2c1e117e
Merge pull request #4149 from guidovranken/wc_ecc_verify_hash_ex-alloc-check
...
ECC: wc_ecc_verify_hash_ex, return if ALLOC_CURVE_SPECS() fails
2021-06-22 08:24:22 +10:00
David Garske
716237c5dd
Fix minor line length and spelling.
2021-06-21 15:09:39 -07:00
David Garske
4942220718
Merge pull request #4150 from elms/fix/sniffer_no_dh
...
Fix build with `--enable-sniffer --disable-dh`
2021-06-21 12:47:58 -07:00
Elms
a409e7c9ce
Fix build with --enable-sniffer --disable-dh
2021-06-21 09:42:51 -07:00
David Garske
7491a44bb4
Fix for possible memory leak case on mp_init failure in wc_ecc_verify_hash_ex with WOLFSSL_SMALL_STACK.
2021-06-21 09:19:47 -07:00
Guido Vranken
7c600e3ebc
In wc_ecc_verify_hash_ex, return if ALLOC_CURVE_SPECS() fails
...
This prevents a NULL pointer dereference later in the function.
2021-06-20 22:29:20 +02:00
Brian Aker
2d497d1cf5
Fix for make distcheck, maintainer-clean, to allow distribution builds.
...
This the second pass at this after seeing how fips is added to tree in later phases.
This allow autoreconf to be directly called which allows the Makefile to rebuild when seeing that changes have been ( having an autogen.sh is older convention which left to history in the way autotools are invoked )
This fixes "make distcheck" and "make maintainer-clean" which are required by most distributions packaging systems.
The files previously touched by autogen.sh are now properly placed into autoconf.
The include files files are generated by configure. ( There is a note placed in configure.ac as to why and reference to the automake documention for this ). Append to file was done on purpose, touch cannot be in configure safetly. Normally autoheader would be used for this but since the include files are created out of tree, care has to be taken to not overwrite those file.
For the source files, they were moved into the coresponding automake file. It is safe to use touch in automake. Since files can optionally copied from elsewhere, they have to be listed in BUILT_SOURCES. They are written srcdir in order to allow make to do VPATH builds ( which is configure by make distcheck ).
To show fips files are preserved without having the actual fips files, a C style comment can be echoed into the files.
There are a few current, but outstanding issues.
1) config.h needs to be fixed configure.ac to use autoheader in order to allow configure to know to rebuilt depencies on its changes. ( Out of scope for this patch. )
2) verion.h checked into the tree and it is a built file. A make maintainer-clean followed by "git status --ignored" will confirm this. ( Out of scope for this patch )
3) autogen.sh has not been updated to reflect fixes. I believe that for this patch, it should be left alone and checked for regression in Jenkins by itself.
4) There is an out of date .spec file for building RPM which should be updated now that distcheck is working.
5) maintainer-clean should have rule added to remove build-aux testdriver.
This has been tested on current Ubuntu testing, OSX, Fedora 34, and Debian 10.
Additionaly "make distcheck" should be added to regression testing, along with "make maintainer-check".
Other improvement possibilities:
A possible future improvement is to let autoconf handle build with optional out of dist files.
Modify fips configure.ac check to allow for an injection of comments into blank fips files in order to prove distribution of fips/non-fips builds.
Update git rules to use 'make maintainer-clean', 'autoreconf -if', 'make distcheck'.
2021-06-19 20:16:14 -07:00
Kaleb Himes
149920fc14
Merge pull request #4110 from dgarske/config_examples
...
Additional user_settings.h examples
2021-06-18 12:00:29 -05:00
David Garske
5a685ca37e
Merge pull request #4139 from SparkiDev/etm_check_pad
...
TLS EtM: check all padding bytes are the same value
2021-06-18 08:14:46 -07:00
David Garske
15065175d8
Merge pull request #4145 from SparkiDev/sp_int_neg_mod
...
SP int negative: check size of a in mp_mod
2021-06-18 08:14:02 -07:00
Sean Parkinson
7224fcd9bc
TLS: add support for user setting signature algorithms
2021-06-18 16:19:01 +10:00
Hideki Miyazaki
fbb7a40295
simplified string parse
2021-06-18 11:55:09 +09:00
Hideki Miyazaki
b52ff200de
addressed code review part2
2021-06-18 11:22:23 +09:00
Hideki Miyazaki
368dd7b501
address review comments part1
2021-06-18 11:22:22 +09:00
Hideki Miyazaki
23a3c7f5f5
fixed no-termination
2021-06-18 11:22:21 +09:00
Hideki Miyazaki
1ebb4a47f6
addressed jenkins failure
2021-06-18 11:22:20 +09:00
Hideki Miyazaki
a4ff5de369
always tls13 suites in the front position
2021-06-18 11:22:20 +09:00
Hideki Miyazaki
4feedb72cc
simulate set_ciphersuites comp. API
2021-06-18 11:22:19 +09:00
Sean Parkinson
699a75c211
PKCS #11 : Use C_Decrypt instead of C_DecryptUpdate
...
Some PKCS #11 devices need final called (implicit in C_Decrypt).
2021-06-18 12:14:34 +10:00
Hideki Miyazaki
23fc810b3c
added more context
2021-06-18 11:10:13 +09:00
Hideki Miyazaki
ddf2a0227f
additional fix for set verify depth to be compliant with openssl limit
2021-06-18 11:00:51 +09:00
Hideki Miyazaki
2bbf7cc0fb
addressed review comments
2021-06-18 10:49:24 +09:00
David Garske
3d5c5b39ac
Merge pull request #4134 from embhorn/joi-cert
...
Update use of joi cert and add to renew script.
2021-06-17 18:28:12 -07:00
Daniel Pouzzner
b59c60db8a
ssl.c: fix build gating on wolfSSL_X509_get_ex_new_index() again (fixing rebase error).
2021-06-17 20:14:54 -05:00
Daniel Pouzzner
8c75553e08
wolfSentry integration: move rest of recyclable code out of examples and into wolfsentry_setup() in wolfssl/test.h, and implement peer review corrections on error codes and string.h wrapper macros.
2021-06-17 20:05:40 -05:00
Daniel Pouzzner
55ed985c9a
include error-ssl.h, not error-crypt.h, in wolfssl/test.h, and fix rebase error in src/ssl.c.
2021-06-17 20:05:40 -05:00
Daniel Pouzzner
1c9ea6228c
ssl.c: fix build gating on wolfSSL_X509_get_ex_new_index().
2021-06-17 20:05:40 -05:00
Daniel Pouzzner
93dfb4c7f4
add outbound connection filtering support to libwolfssl, add wolfSentry support to the test client, and add wolfSentry JSON config file support to the test client and server using --wolfsentry-config.
...
also, add mygetopt_long() to wolfssl/test.h, and add --help and Japanese counterpart options to test client and server.
2021-06-17 20:05:40 -05:00
Sean Parkinson
2fb80ceb59
Merge pull request #4133 from dgarske/crypto_cb_25519
...
Adds crypto callback support for Ed/Curve25519 and SHA2-512/384
2021-06-18 09:47:30 +10:00
David Garske
18fc1b7e63
Merge pull request #4006 from elms/refactor_pointer_manipulation
2021-06-17 16:37:03 -07:00
Sean Parkinson
485cfd798b
SP int negative: check size of a in mp_mod
...
When using negative numbers, t is allocated to be one digit longer than
a->used. Fail when a->used is SP_DIGIT_MAX.
2021-06-18 09:28:51 +10:00
Hideki Miyazaki
951de64e2c
set PSK at the beginning
2021-06-18 07:59:35 +09:00
Hideki Miyazaki
3386069490
add LOAD flag to be compliant with OpenSSL
2021-06-18 07:59:34 +09:00
Hideki Miyazaki
af917cc55e
tell error code
2021-06-18 07:59:34 +09:00
Hideki Miyazaki
976b6ae97c
not push CA, revert error code when being OpensslExtra mode
2021-06-18 07:59:33 +09:00
Hideki Miyazaki
cd73cf3d0f
fix Qt unit test verifyClientCert
2021-06-18 07:59:32 +09:00
Hideki Miyazaki
8b9bf041c1
addressed review comments
2021-06-18 07:50:06 +09:00
Sean Parkinson
98ce4e901a
TLS EtM: check all padding bytes are the same value
...
Must be constant time so as not to provide an oracle.
That is, don't leak length of data and padding.
2021-06-18 08:42:48 +10:00
Hideki Miyazaki
22430ccdd3
higher priority of cipher suite is on top of stack
2021-06-18 07:42:41 +09:00
David Garske
9181c949ae
Added static ciphers and sniffer. Fixed spelling.
2021-06-17 15:19:45 -07:00
David Garske
ffb9a8b440
Improve the user_settings_template to incude Windows. Added STM32 configuration example.
2021-06-17 15:19:45 -07:00
David Garske
8b14bf2951
Additional user_settings.h examples.
2021-06-17 15:19:45 -07:00
David Garske
4bff3b6c69
Fix issue with WOLFSSL object copying CTX and object free'ing. Track ownership of the static key info.
2021-06-17 15:12:07 -07:00
David Garske
155621b611
Fix to prevent static ephemeral memory leak if WC_PK_TYPE_NONE is used for auto-detect. Add DER PK auto detect support. Add sniffer ssl_SetWatchKey_buffer support for static ephemeral.
2021-06-17 15:11:03 -07:00
David Garske
258e0c10da
Merge pull request #4142 from elms/fix/memtest
...
test: Fix memtest callbacks
2021-06-17 14:01:21 -07:00
David Garske
5440b6c63c
Fix for intel asm SHA512 where HAVE_INTEL_AVX1 or HAVE_INTEL_AVX2 is defined, but USE_INTEL_SPEEDUP is not. Fix for scan-build error with test.c ret not used.
2021-06-17 13:50:09 -07:00
Chris Conlon
bd6a353921
Merge pull request #4083 from dgarske/stm32_aes_gcm
...
Fix for STM32 AES GCM for HAL's that support byte sized headers
2021-06-17 13:08:15 -06:00
Elms
91f002235e
make: --enable-memtest track and --enable-memtest=fail to force failure
2021-06-17 10:45:39 -07:00
Elms
ad59b8af45
test: Fix memtest callbacks
2021-06-17 10:15:11 -07:00
David Garske
c802ea7ebd
Fix for unaligned authentication tag sizes when the STM32 Cube HAL supports it with CRYP_HEADERWIDTHUNIT_BYTE.
2021-06-17 08:15:44 -07:00
David Garske
b6ec698a83
Fix for FIPS case with hkdf_test.
2021-06-17 08:15:44 -07:00
David Garske
14b845a9a5
Fixes for wolfCrypt HMAC test without SHA1/SHA2. Added NO RNG option to cube pack configuration template.
2021-06-17 08:15:44 -07:00
David Garske
e8c4f857e1
Fix to use accelerated AES GCM when auth is not 4-byte aligned on platforms supporting byte header size.
2021-06-17 08:15:44 -07:00
David Garske
a1517dbfe4
Merge pull request #4138 from SparkiDev/ssl_reorg_2
...
Reorg of ssl.c: X509_STORE_CTX and X509_STORE APIs isolated
2021-06-17 07:38:25 -07:00
David Garske
eb7896919b
Merge pull request #4137 from SparkiDev/tls13_hrr_ch_ems
...
TLS EMS ext: TLS13 - send in second CH if in first
2021-06-17 07:29:19 -07:00
David Garske
5751e20bcc
Merge pull request #4136 from SparkiDev/tfm_size_checks
...
tfm: fix length check in add and mul_d
2021-06-17 07:28:40 -07:00
kaleb-himes
b29fa9bd33
Changes to support Android app with wolfCrypt module v4.5.4
2021-06-17 08:11:40 -06:00
Sean Parkinson
ad4baec0f5
Merge pull request #4090 from JacobBarthelmeh/CAAM
...
CAAM: add dynamic setup of entropy delay on init
2021-06-17 17:06:01 +10:00
Jacob Barthelmeh
d09b7153f2
address review items
2021-06-17 09:43:06 +07:00
Sean Parkinson
4bba282a70
TLS EMS ext: TLS13 - send in second CH if in first
2021-06-17 11:40:48 +10:00
Sean Parkinson
effa7e079d
Reorg of ssl.c: X509_STORE_CTX and X509_STORE APIs isolated
2021-06-17 11:38:26 +10:00
David Garske
98147de422
Fix for wolfCrypt test not calling init for ed25519 tests.
2021-06-16 16:44:28 -07:00
David Garske
54cef64250
Merge pull request #4128 from SparkiDev/ssl_reorg_1
...
Reorg of ssl.c: PKCS7, PKCS12, crypto-only APIs isolated
2021-06-16 16:12:03 -07:00
Sean Parkinson
9023c4d65a
tfm: fix length check in add and mul_d
...
Check that the overflow digit is going to fit rather than whether we are
at limit after adding digit.
2021-06-17 09:11:01 +10:00
Kaleb Himes
93ae372c55
Merge pull request #4132 from dgarske/exebits
...
Remove execute bit on update pem/der files
2021-06-16 17:20:53 -05:00
David Garske
0fc9c33f84
Wire up Ed25519 SHA512 to use devId.
2021-06-16 13:15:06 -07:00
David Garske
54f69079a8
Merge pull request #4131 from elms/fix/g++_enum_logical_op
...
fixes build with g++ automatically converting enum to int
2021-06-16 13:09:06 -07:00
Eric Blankenhorn
1307972344
Update use of joi cert and add to renew script.
2021-06-16 13:55:36 -05:00
David Garske
15d761a0c2
Added ED25519 and Curve25519 crypto callback support.
2021-06-16 11:49:24 -07:00
David Garske
9c24731e3c
Added SHA2-384/512 crypto callback support.
2021-06-16 11:49:24 -07:00
David Garske
27218e1d40
Merge pull request #4129 from JacobBarthelmeh/Testing
...
add cert generation to renewcerts script
2021-06-16 10:21:59 -07:00
David Garske
90d894b9fd
Remove execute bit on update pem/der files.
2021-06-16 10:17:20 -07:00
David Garske
852892c85b
Merge pull request #4130 from embhorn/zd12463
...
Fix BIO_free_all return type
2021-06-16 10:06:49 -07:00
David Garske
e39fc4b6ec
Merge pull request #4099 from embhorn/zd12274
...
Fix nonblocking ret value from crlIOCb
2021-06-16 10:05:04 -07:00
Elms
75445f7810
fixes build with g++ automatically converting enum to int
2021-06-16 09:40:20 -07:00
Eric Blankenhorn
b3bfe2d12b
Fix BIO_free_all return type
2021-06-16 09:51:45 -05:00
TakayukiMatsuo
9e02655ac4
Merge remote-tracking branch 'upstream/master' into os_base64
2021-06-16 23:19:52 +09:00
Jacob Barthelmeh
d8fc01aabf
add cert generation to renewcerts script
2021-06-16 14:31:33 +07:00
Sean Parkinson
2ca6550207
Reorg of ssl.c: PKCS7, PKCS12, crypto-only APIs isolated
...
Moved functions to bottom of file in groups.
Whitespace changed but not code.
PKCS7 APIs and wolfSSL_d2i_PKCS12_fp now protected by !NO_CERTS
2021-06-16 16:08:24 +10:00
Elms
3a885aba23
Refactor pointer manipulation to be independent of datatype width
...
Tested with `./configure CFLAGS="-DNO_64BIT" --disable-sha512
--disable-sha384 --enable-harden` on a 64-bit machine
2021-06-15 21:08:49 -07:00
Sean Parkinson
5bb639f6db
Merge pull request #4126 from dgarske/certs_test_expired
...
Fixes for expired test certs
2021-06-16 11:25:54 +10:00
Sean Parkinson
d849606bba
Merge pull request #4109 from guidovranken/Base64_SkipNewline-fixes
...
Additional length check improvements in Base64_SkipNewline
2021-06-16 08:52:32 +10:00
Sean Parkinson
b73673a218
Merge pull request #3794 from TakayukiMatsuo/os_keyprint
...
Add wolfSSL_EVP_PKEY_print_public
2021-06-16 08:43:41 +10:00
David Garske
1374ab7da5
Merge pull request #4123 from SparkiDev/sp_int_neg_cmp
...
SP math all: sp_cmp handling of negative values
2021-06-15 15:33:29 -07:00
David Garske
6d95188f4b
Fixes for expired test certs. Generated using cd certs/test && ./gen-testcerts.sh.
2021-06-15 15:07:34 -07:00
Eric Blankenhorn
8900d05167
Fix nonblocking ret value from crlIOCb
2021-06-15 15:31:29 -05:00
David Garske
2f39e6c217
Merge pull request #4122 from kaleb-himes/BUGREPORT_M_W_GCOV
...
Address bug that fails to ignore select files generated by gcov. Thanks to M.W. for the report
2021-06-15 11:07:30 -07:00
David Garske
a9515b80eb
Merge pull request #4108 from elms/fix/scripts/paths_w_spaces
...
tests: fix test scripts for paths with spaces
2021-06-15 08:18:08 -07:00
TakayukiMatsuo
c6680d08ba
Fix coding issues
2021-06-15 11:16:38 +09:00
Sean Parkinson
cce96f5fe6
Merge pull request #4114 from dgarske/secrene_extmst
...
Check for insecure build combination of secure renegotiation and no extended master secret
2021-06-15 10:52:25 +10:00
Sean Parkinson
12c358bc30
Merge pull request #3979 from dgarske/tls13_async
...
Asynchronous support for TLS v1.3 TLSX ECC/DH key generation and key agreement
2021-06-15 10:02:19 +10:00
Sean Parkinson
b9715432f8
SP math all: sp_cmp handling of negative values
2021-06-15 09:44:06 +10:00
Sean Parkinson
07784e9f56
Merge pull request #4066 from dgarske/stm_pka
...
Fixes for STM32 PKA with ECC
2021-06-15 08:33:50 +10:00
David Garske
77df7d8630
Merge pull request #3968 from elms/pedantic_cleanup
...
Fixes for some `-pedantic` errors
2021-06-14 13:46:39 -07:00
David Garske
831e1713f1
Merge pull request #4076 from TakayukiMatsuo/st_timeout
...
Add session ticket timeout check in DoSessionTicket
2021-06-14 13:44:32 -07:00
David Garske
fd6b30ef32
Merge pull request #4111 from elms/silabs/fix_ecc_shared_secret_outlen
...
silabs: fix `wc_ecc_shared_secret` to only return x coordinate
2021-06-14 13:44:00 -07:00
kaleb-himes
eea9866967
Address bug that fails to ignore select files generated by gcov. Thanks to M.W. for the report
2021-06-14 14:40:11 -06:00
Chris Conlon
7ad4a3dffd
Merge pull request #4086 from miyazakh/psk_length_zero
...
treats a return of zero from callback as no psk available
2021-06-14 13:54:00 -06:00
Chris Conlon
a8d185cb9e
Merge pull request #4117 from TakayukiMatsuo/tk12403
...
Add null-parameters-test cases for SHA(), SHA224(), MD5() and MD5_xxx().
2021-06-14 13:52:01 -06:00
Chris Conlon
9d569dfeb7
Merge pull request #4116 from miyazakh/tcp_accept
...
fix api unit test compile failure
2021-06-14 13:49:00 -06:00
Elms
9ae021d2cb
tests: server example doesn't like empty string params
...
But it's ok with them at the end
2021-06-14 12:01:09 -07:00
David Garske
a110f249bd
Merge pull request #4118 from JacobBarthelmeh/ECC
...
add error return with alloc curve macro
2021-06-14 10:46:42 -07:00
David Garske
2ffc0a8392
Remove casts that are not needed.
2021-06-14 08:47:40 -07:00
David Garske
4d4b3c9e8a
Fixes for return codes on STM PKA code. Fix for const warnings.
2021-06-14 08:47:40 -07:00
David Garske
98ab62ea74
Fix for STM32 PKA ECC point mapping, which is handled in hardware.
2021-06-14 08:47:38 -07:00
David Garske
7b6005d467
Remove unused STM32 cofactor.
2021-06-14 08:46:20 -07:00
David Garske
b0782cb8f8
Fix for improperly initialized PKA_ECDSASignOutTypeDef on STM32 PKA sign.
2021-06-14 08:46:20 -07:00
David Garske
839231c508
Fixes for STM32 PKA compiler warnings.
2021-06-14 08:46:20 -07:00
Jacob Barthelmeh
70063213a5
additional comments, code readability, and error check
2021-06-14 21:40:51 +07:00
Juliusz Sosinowicz
1ee0c3a7fd
Refactor dtls_expected_peer_handshake_number handling
...
Moving the `dtls_expected_peer_handshake_number` value along has been moved to one location. It has also been changed to not keep state before a cookie exchange has been completed.
2021-06-14 15:51:04 +02:00
Jacob Barthelmeh
bba1c8b433
add error return with alloc curve macro
2021-06-14 20:33:20 +07:00
JacobBarthelmeh
64298a2c4a
Merge pull request #4094 from guidovranken/DecodePolicyOID-XSNPRINTF
...
Improve checking of XSNPRINTF return value in DecodePolicyOID
2021-06-14 19:58:09 +07:00
Elms
ed4cf6e91c
silabs: fix wc_ecc_shared_secret to only return x coordinate
...
secure element computes and returns the full coordinate. The wolfSSL
API should only return the x component.
2021-06-13 21:46:23 -07:00
TakayukiMatsuo
ebec2fbd25
Fixed uninitialized parameter for Base16_Encode
2021-06-14 13:45:12 +09:00
Elms
21db484f50
tests: fix test scripts for paths with spaces
2021-06-13 21:37:07 -07:00
Guido Vranken
f163a4e18f
Return BUFFER_E from DecodePolicyOID if XSNPRINTF indicates insufficient buffer space
2021-06-14 03:55:13 +02:00
Guido Vranken
220bfe9926
Fix Base64_SkipNewline such that tests pass
2021-06-14 03:42:41 +02:00
Sean Parkinson
3180ec96a5
Merge pull request #3963 from dgarske/nxp_ltc_rsa
...
Fixes for NXP LTC ECC/RSA
2021-06-14 08:29:24 +10:00
TakayukiMatsuo
50526cfe67
Changed some logics for simplicity
2021-06-14 03:26:00 +09:00
Hideki Miyazaki
6d3b9aec80
fix api compile failure
2021-06-12 09:24:11 +09:00
David Garske
5e6b8e50c8
Fix to set groups for client benchmark test.
2021-06-11 14:12:15 -07:00
David Garske
2e4e65f518
Asynchronous support for TLS v1.3 TLSX ECC/DH key generation and key agreement
...
* Added async support to `SendTls13ClientHello`, `DoTls13ServerHello` and `DoTls13ClientHello`.
* Cleanup of the example client/server use key share code.
* Fix some scan-build warnings.
ZD 12065
2021-06-11 14:12:12 -07:00
David Garske
7eb840d615
Merge pull request #4115 from SparkiDev/ed25519_openssl_fix
...
ED25119 and SHAKE-256: fixes
2021-06-11 10:41:51 -07:00
David Garske
5f99979597
Peer review feedback and improvements.
2021-06-11 09:10:26 -07:00
David Garske
b28aab4cf9
Merge pull request #4098 from SparkiDev/san_hw_name_fix
...
Certs: fix leak when multiple hardware names in SAN
2021-06-11 08:25:28 -07:00
David Garske
5a78574a8a
Add new scripts to include.am.
2021-06-11 08:19:23 -07:00
TakayukiMatsuo
ed5cb0a1bd
Modified along the revire comments
2021-06-11 21:08:27 +09:00
TakayukiMatsuo
779e3701e6
Merge branch 'master' of github.com:wolfSSL/wolfssl into os_keyprint
2021-06-11 13:56:52 +09:00
TakayukiMatsuo
1a9b59b183
Add macro guard for LowResTimer
2021-06-11 11:58:55 +09:00
Sean Parkinson
89156908da
Merge pull request #4021 from embhorn/zd12233
...
Fix heap-buffer-overflow issues in wolfSSL_SMIME_read_PKCS7
2021-06-11 12:38:52 +10:00
Sean Parkinson
36a9cd3010
Merge pull request #3911 from TakayukiMatsuo/tk11851
...
Fix SSL_read behaving differently from openSSL after bidirectional shutdown
2021-06-11 10:25:39 +10:00
Sean Parkinson
e720762b5a
Merge pull request #4010 from JacobBarthelmeh/fuzzing
...
fix for use after free issue on error cases
2021-06-11 10:21:30 +10:00
Sean Parkinson
ed14e593c7
ED25119 and SHAKE-256: fixes
...
SHAKE-256 is off by default now. Make sure WOLFSSL_SHAKE256 doesn't make
it into options.h.
Fix openssl.test usage of ed25519 certificates.
Add scripts that regenerate certificates
2021-06-11 10:13:31 +10:00
David Garske
61314f3971
Added build error for insecure build combination of secure renegotiation enabled with extended master secret disabled when session resumption is enabled.
2021-06-10 16:44:23 -07:00
John Safranek
4e881a226a
Merge pull request #4088 from julek-wolfssl/dtls-mtu-define
...
Change magic number 100 bytes to an enum define
2021-06-10 09:22:08 -07:00
David Garske
624e150c7b
Merge pull request #3827 from SparkiDev/tls13_psk_hash
...
TLS 1.3 PSK: use the hash algorithm to choose cipher suite
2021-06-10 06:59:40 -07:00
David Garske
2fc5b03d71
Merge pull request #4102 from danielinux/psoc6-sha-fixes
...
[PSOC6_CRYPTO] Do not directly include psoc6 port header to prevent loops
2021-06-10 06:57:17 -07:00
Sean Parkinson
3ecb8d5a3e
Merge pull request #4062 from dgarske/dh_key
...
DH Key and Params Export cleanups and Apache httpd fixes
2021-06-10 20:54:32 +10:00
TakayukiMatsuo
4d3f2f92fd
Add test cases for SHA(), SHA224(), MD5() and MD5_xxx() to test with null parameters.
2021-06-10 16:40:51 +09:00
Sean Parkinson
56c317e1ab
Merge pull request #4052 from elms/gcc11_fixes
...
fixes for gcc 11 compile and other whitespace
2021-06-10 15:51:04 +10:00
Sean Parkinson
7e0c372e4c
TLS 1.3 PSK: use the hash algorithm to choose cipher suite
...
See RFC 8446: 4.2.11
With TLS 1.3 PSK callback, If the returned cipher suite isn't available,
use the hash from the cipher suite and choose from available list.
Require exact match when: WOLFSSL_TLS13_PSK_NO_MATCH_HASH
Alternative callback for client added that is passed a cipher suite
string. Called for each cipher suite that is to be negotiated.
If cipher suite to be used with PSK then return client identity.
Returning an identity based on cipher suite hash will result in
only one PSK extension being added per hash.
2021-06-10 09:55:27 +10:00
David Garske
c6c7dfd5db
Merge pull request #4053 from SparkiDev/cppcheck_fixes_6
...
cppcheck: fixes from reviewing report
2021-06-09 12:51:30 -07:00
David Garske
a6edff7bd5
Merge pull request #4017 from SparkiDev/not_ecc_pk_cb
...
ECC: Disable ECC but have Curve25519/448 and PK callbacks fix
2021-06-09 12:38:37 -07:00
David Garske
c6fc709502
Merge pull request #4072 from SparkiDev/ecc_sp_c_mod_sub_fix
...
SP C ECC: mont sub - always normalize after sub before check for add
2021-06-09 12:36:46 -07:00
Guido Vranken
fb366f063e
Additional length check improvements in Base64_SkipNewline
2021-06-09 19:16:07 +02:00
Eric Blankenhorn
a68542e6f4
Fix heap-buffer-overflow issues in wolfSSL_SMIME_read_PKCS7
2021-06-09 08:32:52 -05:00
Elms
5a54bb656b
make macros for pragma to compile with gcc11
2021-06-08 19:20:20 -07:00
Sean Parkinson
d8cd7cbee1
Merge pull request #4024 from kabuobeid/zd12245
...
PKCS7: Check size in wc_PKCS7_InitWithCert before XMEMCPY to avoid overflow.
2021-06-09 10:06:02 +10:00
Sean Parkinson
c6646ae9c8
Merge pull request #4044 from julek-wolfssl/ZD12270
...
Check for XREAD when XFREAD fails
2021-06-09 09:48:25 +10:00
Sean Parkinson
50dca86dcf
Merge pull request #3878 from JacobBarthelmeh/ECC
...
add deterministic k generation for ECC sign
2021-06-09 09:47:19 +10:00
Sean Parkinson
8fa4dedf97
Merge pull request #4096 from vaintroub/master
...
MSVC, ARM64 - correct 64bit detection
2021-06-09 09:40:47 +10:00
Sean Parkinson
32c215775a
Merge pull request #4093 from guidovranken/DecodeResponseData-allocation-check
...
ASN: Catch allocation failure in DecodeResponseData
2021-06-09 09:38:53 +10:00
Sean Parkinson
9580574382
Merge pull request #3999 from dgarske/user_io
...
Fixes for building with `WOLFSSL_USER_IO`
2021-06-09 08:55:36 +10:00
Sean Parkinson
70d2c838bb
Merge pull request #4080 from kaleb-himes/SHAKE_DEFAULT_FIX
...
Sync SHAKE256 default (disabled) with parent default edDSA448 (disabled) and remove WOLFSSL_NO_SHAKE256 flag
2021-06-09 08:52:05 +10:00
David Garske
ae4af3c681
Merge pull request #4071 from SparkiDev/fp_ecc_long_order
...
ECC FP: cached doesn't work when order has more bits than prime
2021-06-08 12:17:04 -07:00
David Garske
4a85127507
Improve wc_DhKeyToDer for public key size calculation. Fixes bug with the output too (was missing 1 byte in length for the unused bits byte in bit string).
2021-06-08 09:55:56 -07:00
David Garske
9b215c5138
Fixes for DH Pub key import/export and new test case. Improve wc_DhParamsToDer.
2021-06-08 09:27:30 -07:00
David Garske
6db0b42c7f
* Refactor of DH key and param exports code (moved into asn.c) enabled with WOLFSSL_DH_EXTRA.
...
* Cleanup `WOLFSSL_DH_EXTRA` macro logic and do not allow with FIPS v1 or v2.
* Fixes for httpd (if `SSL_CONF_FLAG_FILE` is defined it is used to indicate support for `SSL_CONF_CTX_set_flags` and `SSL_CONF_cmd_value_type`).
* Add Curve448 and ED448 key type to `enum wc_PkType`.
* Expand `dh_ffdhe_test` to include 4096 bit.
2021-06-08 09:27:26 -07:00
David Garske
54d13f63c1
Merge pull request #4067 from haydenroche5/pkcs8
...
Add an API function wc_EncryptPKCS8Key to handle encrypting a DER, PKCS#8-formatted key.
2021-06-08 09:21:53 -07:00
Jacob Barthelmeh
34d8073fbd
remove dead code
2021-06-08 22:45:28 +07:00
David Garske
de70681229
Improve code comments to explain FP_ECC limitation for SECP160R1, SECP160R2, SECP160K1 and SECP224K1.
2021-06-08 08:41:36 -07:00
David Garske
61eae79f71
Merge pull request #4074 from SparkiDev/ecdsa_dbl_table_point
...
ECDSA FP ECC: fix corner case
2021-06-08 08:35:17 -07:00
David Garske
5586bc349c
Merge pull request #4056 from SparkiDev/mp_int_rem_apis
...
MP Integer: remove unsupported API prototypes
2021-06-08 08:08:04 -07:00
David Garske
50e8509a36
Merge pull request #4037 from SparkiDev/prime_test_err_check
...
TFM prime checking: check for more errors
2021-06-08 08:06:37 -07:00
David Garske
9497c74283
Merge pull request #4081 from strongX509/master
...
SHA3-based RSA signatures require SHA-3 hash OIDs
2021-06-08 07:46:18 -07:00
TakayukiMatsuo
0186d19aba
Fix some coding style issues.
2021-06-08 16:25:28 +09:00
Daniele Lacamera
6d1981abd1
Do not directly include psoc6 port header to prevent loops
2021-06-08 08:24:43 +02:00
Sean Parkinson
88322b82a5
Merge pull request #3871 from julek-wolfssl/openvpn-master
...
OpenVPN additions and fixes
2021-06-08 13:54:14 +10:00
Sean Parkinson
194b494741
Merge pull request #4034 from embhorn/zd12261
...
Fix declarations for EVP_VerifyFinal and RSA_private_encrypt
2021-06-08 12:15:30 +10:00
Sean Parkinson
b3352648dd
Merge pull request #4097 from guidovranken/blake2-init-key-fixes
...
Check return value in BLAKE2 key init functions
2021-06-08 11:54:29 +10:00
Sean Parkinson
8ee1dda2f9
Merge pull request #4001 from dgarske/time_long
...
Improve TLS v1.3 time rollover support and fixes for NO_ASN_TIME
2021-06-08 11:17:55 +10:00
Sean Parkinson
23d733f837
Merge pull request #4063 from guidovranken/zd12328
...
Fix length calculations in Base64_SkipNewline
2021-06-08 10:55:15 +10:00
Elms
c726cddf1b
session_ticket: Add separate member to track compatCb
...
This resolves an error:
`ISO C forbids conversion of object pointer to function pointer type`
Instead of casting the function pointer, the extra
member contains the function pointer.
2021-06-07 15:42:38 -07:00
Elms
5c01613acb
Add GCC extension to bypass select -pedantic warnings
...
Add wrapper macro for `__extension__` to suppress pedantic warnings
2021-06-07 15:38:15 -07:00
Jacob Barthelmeh
9fadc21e0f
add version print out
2021-06-08 04:18:22 +07:00
David Garske
3e307aa626
Merge pull request #4091 from JacobBarthelmeh/Testing
...
add strict check on signature length
2021-06-07 11:02:02 -07:00
Guido Vranken
4e318ade36
In wc_PBKDF1_ex, break out of outer loop on error
2021-06-07 16:21:02 +02:00
Jacob Barthelmeh
f97ca1c1ca
adjust test case and add useful comments
2021-06-07 19:44:05 +07:00
Sean Parkinson
e76ae2b8ac
Certs: fix leak when multiple hardware names in SAN
...
Can only be one hardware name in SAN as this indicates the certificate
is for verifying signatures created by hardware module.
2021-06-07 12:02:23 +10:00
Guido Vranken
96b7b193d7
Check return value in BLAKE2 key init functions
...
If built with smallstack, allocations in `blake2s_update` and `blake2b_update` may fail,
so the error must be propagated.
2021-06-07 03:34:44 +02:00
Guido Vranken
bd7b57783d
Remove excess space characters
2021-06-07 03:20:16 +02:00
Sean Parkinson
898b9d5e24
Merge pull request #4084 from dgarske/sp_math_keygen
...
Fix for building SP small math only (no DH) with key generation
2021-06-07 10:48:01 +10:00
Vladislav Vaintroub
29968716ea
MSVC, ARM64 - correct 64bit detection
...
Fixes https://github.com/wolfSSL/wolfssl/issues/4095
2021-06-06 23:30:27 +02:00
Guido Vranken
1af3f482cb
Catch allocation failure in ASNToHexString
2021-06-06 19:52:15 +02:00
Hideki Miyazaki
1606746d2d
a return of zero from callback as no psk available
2021-06-06 11:53:02 +09:00
Guido Vranken
8cb576009d
Improve bounds check in EncodePolicyOID
2021-06-06 04:07:02 +02:00
Guido Vranken
a1257429bd
Improve checking of XSNPRINTF return value in DecodePolicyOID
2021-06-06 03:54:15 +02:00
Guido Vranken
76e0a8666b
Catch allocation failure in DecodeResponseData
2021-06-06 03:12:53 +02:00
David Garske
5d33161032
Fixes for RSA keygen with SP (no DH). Thanks Sean.
2021-06-04 13:32:59 -07:00
Jacob Barthelmeh
c245c4a812
add strict check on signature length
2021-06-05 03:09:33 +07:00
Jacob Barthelmeh
9ef43c5aff
add dynamic setup of entropy delay on init
2021-06-05 00:41:10 +07:00
David Garske
d7117cd8bb
Merge pull request #4089 from danielinux/psoc6-sha-fixes
...
psoc6_Crypto port: fixes to sha256/sha512 objects
2021-06-04 09:16:42 -07:00
Daniele Lacamera
a5a4925370
Fixed sha256 and sha512 interface for psoc6 crypto module
2021-06-04 13:22:17 +02:00
Juliusz Sosinowicz
588a424d8d
Change magic number 100 bytes to an enum define
2021-06-04 11:27:57 +02:00
Chris Conlon
961773b384
Merge pull request #4079 from lealem47/PKCS12UnitTest
...
Pkcs12 unit test
2021-06-03 16:07:54 -06:00
David Garske
21060afb80
Fix for building SP math only (small) with key generation. Fix for WOLFSSL_EXTRA. Fix for RSA without PSS. Fix for ed25519 spelling error.
2021-06-03 10:56:54 -07:00
Jacob Barthelmeh
66c7acb076
add use of heap hint for malloc
2021-06-03 23:38:30 +07:00
TakayukiMatsuo
195ca2b3f0
Add corner test cases for EVP_EncodeFinal and EVP_DecodeFinal
2021-06-03 20:02:48 +09:00
David Garske
eb63ab19e2
Fix for mp_mulmod with NXP LTC.
2021-06-01 16:33:58 -07:00
Chris Conlon
6cfb982740
Merge pull request #3981 from miyazakh/qt_oslext_cnf
...
Added compatibility layer API
2021-06-01 15:25:37 -06:00
Lealem Amedie
72fc7e62b8
Fixed spacing
2021-06-01 14:47:51 -06:00
Andreas Steffen
0caf3ba456
SHA3-based RSA signatures require SHA-3 hash OIDs
...
The SHA-3 ASN.1 OIDs are defined by NIST under the
nistalgorithm/hashAlgs node.
2021-06-01 22:02:23 +02:00
Kaleb Himes
a27cdc538a
Fix typo
2021-06-01 13:30:32 -06:00
Kaleb Himes
3a9c6ea924
fix FIPS v2 check ($ENABLED_FIPS not set for v2)
2021-06-01 13:29:39 -06:00
kaleb-himes
94831eadf1
Sync SHAKE256 default (disabled) with parent default edDSA448 (disabled) and remove WOLFSSL_NO_SHAKE256 flag
2021-06-01 11:38:17 -06:00
Lealem Amedie
03a5395b53
Fixed casting issue
2021-06-01 09:46:30 -06:00
TakayukiMatsuo
69cf5ef266
Chage to use WOLFSSL_SESSION.bornON instead of WOLFSSL_SESSION.timestamp to hold the ticket creation time.
2021-06-01 15:30:07 +09:00
TakayukiMatsuo
5f7477980c
Add session ticket timeout check in DoSessionTicket
2021-06-01 00:09:50 +09:00
Lealem Amedie
2db233d10e
Added wolfssl_PKCS12_verify_mac testing in test_wolfSSL_PKCS12() function in api.c
2021-05-28 16:33:46 -06:00
Chris Conlon
15931fa199
Merge pull request #4060 from kojo1/encrypt_len
...
FP_MAX_BITS for ENCRYPT_LEN
2021-05-28 15:55:58 -06:00
Jacob Barthelmeh
ab07c55609
check on hmac free and add else if case for check if key is 0's
2021-05-28 16:27:54 +07:00
Sean Parkinson
9fff404313
Merge pull request #4073 from TakayukiMatsuo/tk12138
...
Add calling wc_FreeMutex for globalRNGMutex
2021-05-28 16:11:00 +10:00
Sean Parkinson
c69665b999
ECDSA FP ECC: fix corner case
...
When the same table is used for both base point and public point (which
is not a valid thing to do) then a corner case occurs when the table
point can be added to the same point. This has to be a double operation
instead.
The table point isn't able to be doubled as it has a z-ordinate of 0 and
the original point is overwritten with the invalid add result.
Fix this case by:
- copying the table point into the result,
- setting z-ordinate to Montgomery form of 1,
- double the result point in place.
2021-05-28 13:06:20 +10:00
TakayukiMatsuo
54dba6a2f2
Add calling wc_FreeMutex for globalRNGMutex
2021-05-28 11:19:40 +09:00
Elms
3deb635155
skip memory callback tests with STATIC_MEMORY and LINUXKM
2021-05-27 14:46:45 -07:00
Elms
7a98c517e4
Fixes for some -pedantic errors
...
Some of the API with callbacks may not be compatible with pedantic
2021-05-27 14:46:45 -07:00
Jacob Barthelmeh
252971aad7
better comments on RFC steps and fixes for combining code blocks, fix for check on sign_k value
2021-05-27 17:27:15 +07:00
Sean Parkinson
4e88521a90
SP C ECC: mont sub - always normalize after sub before check for add
2021-05-27 11:08:05 +10:00
Sean Parkinson
6bf9a887e1
ECC FP: cached doesn't work when order has more bits than prime
...
Small curves that are not commonly used do not work with scalars that
are the length of the order when the order is longer than the prime.
The table is generated based on modulus length not order length.
Simple fix is to not allow these curves to be used with FP_ECC.
Order isn't passed into the pseudo-public APIs.
2021-05-27 09:53:03 +10:00
John Safranek
1fe445368c
Merge pull request #4069 from guidovranken/zd12349
...
Several ASN decoder fixes
2021-05-26 16:13:54 -07:00
TakayukiMatsuo
d1e3be1f43
Replace return code from literal to value
2021-05-27 06:20:34 +09:00
Guido Vranken
1fbc3dc2d4
Heap-allocate additional CertStatus structs in DecodeResponseData
2021-05-26 21:41:47 +02:00
Guido Vranken
cfef249041
Several ASN decoder fixes
...
See ZD 12349
2021-05-26 20:15:32 +02:00
Hayden Roche
88370285cc
Add an API function wc_DecryptPKCS8Key to handle decrypting a DER, PKCS#8
...
encrypted key.
2021-05-26 10:48:14 -07:00
Hayden Roche
5e4e73d6e9
Add an API function wc_EncryptPKCS8Key to handle encrypting a DER,
...
PKCS#8-formatted key.
There's already a function wc_CreatePKCS8Key, but this only creates the
unencrypted PKCS#8 key. TraditionalEnc exists, which takes a non-PKCS#8 key,
converts it to PKCS#8 format, and encrypts it, but this function isn't in the
public-facing API. I've modified TraditionalEnc to use wc_EncryptPKCS8Key after
wc_CreatePKCS8Key. wc_EncryptPKCS8Key is essentially the encryption portion of
TraditionalEnc moved out into its own function. wc_EncryptPKCS8Key will be in
the API going forward so that users can do PKCS#8 encryption without relying on
the non-API TraditionalEnc. Next, I'll be adding a corresponding
wc_DecryptPKCS8Key to handle decryption.
2021-05-26 10:48:11 -07:00
David Garske
8bf2cbf55e
Fix for NXP LTC to not modify incoming math variables (use temp). Added build option for testing/validation of the LTC math operation.
2021-05-26 10:30:47 -07:00
David Garske
0d3530b45d
Cleanup NXP LTC logic.
2021-05-25 16:49:58 -07:00
David Garske
c59349c7a7
Fix for ecc_map, which is handled in hardware. Fix for NXP LTC mp_mul N value. Fix for MMCAU cast warnings.
2021-05-25 15:58:22 -07:00
David Garske
63ac9decfc
Added error response checking for NXP LTC LTC_PKHA_ModMul. Isolated the result C to it's own variable.
2021-05-25 15:58:22 -07:00
David Garske
9453f83d28
Fix bad logic flow in WC_NO_RNG case.
2021-05-25 15:58:22 -07:00
David Garske
64ae0a827c
Fixes for RSA with NXP LTC. The invmod function must reduce if A > B. Added RSA Key Generation acceleration.
2021-05-25 15:58:22 -07:00
David Garske
41af3da0e3
Merge pull request #4057 from SparkiDev/no_tls12_pkcb
...
TLS: fix build with no TLSv12 but PK callbacks
2021-05-25 15:26:40 -07:00
Guido Vranken
360d6c8a4f
Additional fix for Base64_SkipNewline
2021-05-26 00:25:27 +02:00
David Garske
3cc69ee6a0
Merge pull request #4064 from SparkiDev/evp_aes_gcm_stream_leak
...
EVP AES-GCM Streaming: must free Aes
2021-05-25 15:11:03 -07:00
Hideki Miyazaki
1c0fd3f1c0
addressed review comments part3
2021-05-26 06:17:33 +09:00
Hideki Miyazaki
e2284d59bf
addressed review comments part2
2021-05-26 06:07:48 +09:00
Hideki Miyazaki
ae502c7a09
addressed review comments part1
2021-05-26 06:07:48 +09:00
Hideki Miyazaki
af67965f65
addressed jenkins failures part1
2021-05-26 06:07:48 +09:00
Hideki Miyazaki
33e91c577f
added unit test cases for cmdline
2021-05-26 06:07:47 +09:00
Hideki Miyazaki
394c0b5cdc
implemented CONF_cmd
2021-05-26 06:07:47 +09:00
Elms
7127dbeeec
fixes for gcc 11 compile and other whitespace
2021-05-25 12:34:04 -07:00
Sean Parkinson
e1bc0c4447
EVP AES-GCM Streaming: must free Aes
...
AES streaming implementation allocates data in Aes objects, when small
stack, that needs to be freed.
Fix memory leaks in streaming test case too.
2021-05-25 15:57:09 +10:00
Guido Vranken
b7663a51b4
Fix length calculations in Base64_SkipNewline
...
ZD 12328
2021-05-25 03:52:16 +02:00
Chris Conlon
956a0f2b5f
Merge pull request #3931 from julek-wolfssl/dsa-engine
...
Add more DSA parameters support
2021-05-24 14:57:02 -06:00
Chris Conlon
399ce70aba
Merge pull request #4055 from JacobBarthelmeh/PKCS7
...
set content type parsed
2021-05-24 13:21:19 -06:00
Chris Conlon
d03ce69009
Merge pull request #4050 from julek-wolfssl/devkitpro
...
Add support for running `wolfcrypt/test/testwolfcrypt` on Dolphin emulator
2021-05-24 13:20:42 -06:00
Takashi Kojo
159fe1541a
FP_MAX_BITS for ENCRYPT_LEN
2021-05-24 07:12:07 +09:00
Sean Parkinson
6747055d46
TLS: fix build with no TLSv12 but PK callbacks
...
./configure '--disable-tlsv12' '-enable-pkcallbacks'
Disable non-TLS13 cipher suite test as well.
2021-05-21 10:59:23 +10:00
Sean Parkinson
573c0fcba7
MP Integer: remove unsupported API prototypes
...
mp_read_signed_bin, mp_signed_bin_size, mp_to_signed_bin - not
implemented anywhere. (Removed fp versions that were commented out too.)
mp_read_raw, mp_raw_size, mp_toraw - map to unimplemented mp_*_signed_*
APIs.
2021-05-21 08:22:04 +10:00
Juliusz Sosinowicz
ceadb62d5b
Add support for running wolfcrypt/test/testwolfcrypt on Dolphin emulator
2021-05-20 21:07:50 +02:00
Jacob Barthelmeh
f4959cca8d
set content type parsed
2021-05-21 01:42:10 +07:00
Sean Parkinson
2c6285ccba
cppcheck: fixes from reviewing report
2021-05-20 17:55:06 +10:00
Chris Conlon
0e23d40250
Merge pull request #4038 from TakayukiMatsuo/tk12254
...
Add test cases for wc_ShaxxxUpdate funcs
2021-05-18 15:38:02 -06:00
Eric Blankenhorn
b87af6ae89
Merge pull request #4046 from SparkiDev/coverity_1
...
TFM: get returned error to act on
2021-05-18 14:26:04 -05:00
Daniel Pouzzner
687736fd56
Merge pull request #4047 from elms/automake_branch_switch
...
make: fix timing error when switching between revisions
2021-05-18 13:50:46 -05:00
David Garske
9661677d4d
Merge pull request #4041 from SparkiDev/tls13_psk_early_test_fix
...
TLS 1.3 PSK EarlyData testing
2021-05-18 10:00:03 -07:00
Elms
82981e9305
make: fix timing error when switching between revisions
...
On switching over revision that added server target specific CFLAGS,
could receive: `error: #warning "For timing resistance / side-channel
attack prevention consider using harden options"`
2021-05-18 09:43:29 -07:00
Sean Parkinson
ed5b134161
TLS 1.3 PSK EarlyData testing
...
Fix test to expect 3 or 5 lines with "Early Data" (release or debug
build).
2021-05-18 15:25:12 +10:00
Sean Parkinson
c1490bb91a
TFM: get returned error to act on
2021-05-18 14:30:26 +10:00
Sean Parkinson
ed3a0ae694
TFM prime checking: check for more errors
...
Small stack can produce errors that were being ignored.
Checks for valid size in fp_exptmod was being ignored.
2021-05-18 08:51:55 +10:00
David Garske
d8312a2e61
Merge pull request #4040 from JacobBarthelmeh/CAAM
...
add caam header files to make install
2021-05-17 12:22:41 -07:00
David Garske
4a1907ae88
Merge pull request #3976 from rliebscher/Use_Renesas_RX_intrinsics_with_CC-RX_compiler
...
Renesas RX: Use intrinsics for rot[rl], revl
2021-05-17 11:05:01 -07:00
David Garske
379312d23e
Merge pull request #4042 from danielinux/dcp_explicit_casts
2021-05-17 08:05:39 -07:00
Juliusz Sosinowicz
58e7d5388a
Check for XREAD when XFREAD fails
...
On Windows we would always fail with `NOT_COMPILED_IN` when reading a file BIO.
2021-05-17 16:57:53 +02:00
Daniele Lacamera
b09df89200
NXP DCP: add explicit casts
2021-05-17 10:35:00 +02:00
Jacob Barthelmeh
efa478c121
add caam header files to make install
2021-05-15 15:42:50 +07:00
David Garske
e18880f7dc
Merge pull request #4036 from SparkiDev/sp_asm_x86_64_ifdef
...
SP ASM: x86_64 asm files - protect with WOLFSSL_SP_X86_64_ASM
2021-05-14 10:35:59 -07:00
TakayukiMatsuo
8c71fb4113
Add test cases for wc_ShaxxxUpdate funcs
2021-05-14 09:46:21 +09:00
Sean Parkinson
740f200156
SP ASM: x86_64 asm files - protect with WOLFSSL_SP_X86_64_ASM
2021-05-14 09:22:41 +10:00
David Garske
19526f050e
Merge pull request #4035 from JacobBarthelmeh/CAAM
...
add macro guard on debug print
2021-05-13 12:46:11 -07:00
Jacob Barthelmeh
82a2797b56
add macro guard on debug print
2021-05-13 23:58:51 +07:00
David Garske
263105abec
Merge pull request #4033 from JacobBarthelmeh/CAAM
...
set partition number on key import and use ocb address for free'ing d…
2021-05-13 09:39:36 -07:00
David Garske
44a9346305
Merge pull request #4025 from danielinux/hdrbg_double_include_sha256
...
Fix double include of sha256.h causing a build error
2021-05-13 09:15:51 -07:00
Eric Blankenhorn
9eebaaf352
Fix declarations for EVP_VerifyFinal and RSA_private_encrypt
2021-05-13 10:48:49 -05:00
Juliusz Sosinowicz
5865dc08dd
Code review changes
2021-05-13 15:21:33 +02:00
Jacob Barthelmeh
311c929fe2
set partition number on key import and use ocb address for free'ing dangling partitions on close
2021-05-13 17:34:30 +07:00
Daniele Lacamera
420a48a5aa
Removed unnecessary headers
2021-05-13 07:40:22 +02:00
Daniele Lacamera
563c7391ed
DCP: moved guards so code is not included when building *.c
2021-05-13 07:29:33 +02:00
Daniele Lacamera
6ea5254bb9
DCP refactor: do not override wc_Sha types
2021-05-12 17:11:09 +02:00
David Garske
0a8996f467
Merge pull request #4028 from danielinux/freescale_rng
...
Allow use of FREESCALE hw RNG without a specific port
2021-05-12 06:41:01 -07:00
Daniele Lacamera
1dfde34852
Allow use of FREESCALE hw RNG without a specific port
2021-05-12 10:10:42 +02:00
Daniele Lacamera
f3c07e5f3f
include sha256.h when required by smallstackcache
2021-05-12 09:42:41 +02:00
Daniele Lacamera
8c008b81ac
random.h: removed include of sha256.h with HASHDBRG
2021-05-12 07:46:22 +02:00
Sean Parkinson
8a17e6c10e
Merge pull request #4019 from dgarske/zd11435
...
ECC, SP math all: Add `wc_ecc_gen_k` arg checking. Fix SP math debug support (mp_dump)
2021-05-12 08:21:56 +10:00
Chris Conlon
c75830e2e8
Merge pull request #4011 from miyazakh/set_verify_depth2
...
fix out of bound access when peer's chain is greater than verifyDepth + 1
2021-05-11 15:38:39 -06:00
Kareem Abuobeid
cba029a436
PKCS7: Check size in wc_PKCS7_InitWithCert before XMEMCPY to avoid overflow.
2021-05-11 14:35:41 -07:00
Chris Conlon
ae0591b1db
Merge pull request #4016 from miyazakh/qt_sanity_check
...
add sanity check
2021-05-11 15:06:54 -06:00
David Garske
64330d468e
Merge pull request #4023 from danielinux/dcp_rt1060_fixes_aes
...
DCP port: Fixed AES, aligned key for the HW module
2021-05-11 09:55:50 -07:00
David Garske
92a524820b
Merge pull request #4018 from SparkiDev/jenkins-nightly-1
...
Fixes from nightly builds
2021-05-11 09:11:42 -07:00
David Garske
fce9870a64
Merge pull request #4020 from ejohnstown/options-export
...
New Option Export/Import
2021-05-11 09:10:17 -07:00
Daniele Lacamera
d9cc013fd2
DCP port: Fixed AES, aligned key for the HW module
2021-05-11 08:27:03 +02:00
John Safranek
d74b74d156
Also adjust for v3 of export, and update the API test case.
2021-05-10 18:06:31 -07:00
David Garske
7e69277680
Improve SP mp_dump to use macro.
2021-05-10 16:27:06 -07:00
Sean Parkinson
bab0d9bd4a
Merge pull request #4022 from dgarske/test_fix
...
Test AES CBC: Fix for the unmodified check for AesCbc test
2021-05-11 08:38:04 +10:00
David Garske
db7888ceaa
Fix for the unmodified check for AesCbc test.
2021-05-10 10:04:50 -07:00
John Safranek
a608b083b4
Take into account a new flag in the DTLS state export and import.
2021-05-10 09:33:38 -07:00
David Garske
8c91a0c6b0
Support for mp_dump with SP Math ALL.
2021-05-10 09:26:33 -07:00
David Garske
f5509780c6
Add argument checking to wc_ecc_gen_k . Cleanup return codes for wc_ecc_mulmod_ex2.
2021-05-10 09:26:33 -07:00
David Garske
ead656c4db
Fixes for NO_BIO related to ZD11886. Replaces PR #3888 .
2021-05-10 09:19:08 -07:00
Juliusz Sosinowicz
ddbd26305f
OpenVPN additions and fixes
...
- `SSL_CTX_set_min_proto_version` now allows setting not compiled in protocols but checks that the constraints leave any compiled in protocol available
- wolfSSL_HmacCopy return already returns `WOLFSSL_SUCCESS` or `WOLFSSL_FAILURE`
2021-05-10 12:00:18 +02:00
Sean Parkinson
0c1af66843
Fixes from nightly builds
...
output not read.
g++ realloc cast.
curve25519 - no fix, only format changes
2021-05-10 11:59:52 +10:00
Sean Parkinson
8779c3a884
ECC: Disable ECC but have Curve25519/448 and PK callbacks fix
...
Fix ed25519 certificates.
Tidy up testsuite.c
2021-05-10 10:32:55 +10:00
Hideki Miyazaki
07872189eb
add sanity check
2021-05-08 13:15:50 +09:00
John Safranek
e247161b2e
Merge pull request #3992 from embhorn/zd12169
...
Allow parsing spaces in Base64_SkipNewline
2021-05-07 14:30:24 -07:00
Daniel Pouzzner
49717328dd
Merge pull request #4014 from haydenroche5/cmake
...
Add support for reproducible builds with CMake.
2021-05-07 15:54:01 -05:00
David Garske
aa3f9f8459
Merge pull request #4013 from kabuobeid/smime_fixes
...
S/MIME: Fix issue with canonSection size when adding newlines.
2021-05-07 13:12:54 -07:00
David Garske
28e2d68677
Merge pull request #4015 from embhorn/zd12221
...
Fix XMALLOC of sp_point_256 array
2021-05-07 13:11:41 -07:00
David Garske
3807304243
Fixes in additional places for incorrect point heap allocation size in SP ecc_mulmod with small stack or SP no malloc.
2021-05-07 09:43:17 -07:00
Eric Blankenhorn
0bc0e0f562
Fix XMALLOC of sp_point_256 array
2021-05-07 09:12:22 -05:00
Hayden Roche
051d1c2579
Add support for reproducible builds with CMake.
...
Unlike the autotools build, I've chosen NOT to make the build un-deterministic
if WOLFSSL_REPRODUCIBLE_BUILD is set to no (the default). Instead, I just use
whatever CMake's default is. On my system, ar and ranlib run in deterministic
mode by default, and the CMake defaults for the relevant ar and ranlib variables
are:
CMAKE_C_ARCHIVE_CREATE = <CMAKE_AR> qc <TARGET> <LINK_FLAGS> <OBJECTS>
CMAKE_C_ARCHIVE_APPEND = <CMAKE_AR> q <TARGET> <LINK_FLAGS> <OBJECTS>
CMAKE_C_ARCHIVE_FINISH = <CMAKE_RANLIB> <TARGET>
So my builds are automatically deterministic. This is normal on my system so I
wouldn't want to make them not deterministic by default, hence the decision.
I validated with md5sum on libwolfssl.a that explicitly making the build not
deterministic indeed results in different checksums across multiple runs. The
checksums are the same when flipping back to deterministic mode.
2021-05-06 23:05:33 -07:00
Kareem Abuobeid
62bb0a8527
S/MIME: Fix issue with canonSection size when adding newlines.
2021-05-06 16:35:24 -07:00
David Garske
6c131e3e8b
Fix off by 1 in rollover calculation.
2021-05-06 14:46:35 -07:00
David Garske
c88afdef87
Fixes for building with WOLFSSL_USER_IO (with no built-in socket support). Related to issue #3998 .
2021-05-06 11:07:05 -07:00
David Garske
1cd8bd3a94
Merge pull request #3993 from ejohnstown/actions
2021-05-06 08:32:37 -07:00
Hideki Miyazaki
2a39f1dc5c
fixed memory leak
2021-05-06 16:55:51 +09:00
Hideki Miyazaki
93f04543b0
fixed unit test intermittent failure
2021-05-06 15:40:24 +09:00
Hideki Miyazaki
0539b99c86
fix boundary access when peer's chain is less than verifyDepth + 1
2021-05-06 14:54:16 +09:00
Jacob Barthelmeh
2c2f389373
set pointer to null after free
2021-05-06 12:11:52 +07:00
Jacob Barthelmeh
e185a9b7ca
reset pointer on SMIME fail case
2021-05-06 11:44:46 +07:00
toddouska
4cfa6c43a5
Merge pull request #4000 from dgarske/sizeof_ctc
...
Fix for SIZEOF detection and issue with CTC_SETTINGS
2021-05-05 15:46:14 -07:00
toddouska
014bd21df0
Merge pull request #3983 from tmael/tls_down
...
TLS minimum downgrade option
2021-05-05 15:38:45 -07:00
toddouska
bc043ee358
Merge pull request #3980 from embhorn/gh3978
...
Fix Espressif win script
2021-05-05 15:37:04 -07:00
toddouska
0b16b33de4
Merge pull request #3973 from SparkiDev/pkcs11_sign
...
PKCS#11: rework RSA operations to be clearer
2021-05-05 15:35:27 -07:00
David Garske
94c0bff839
Merge pull request #3997 from tmael/minor_fixes
...
Fix test build
2021-05-04 08:51:30 -07:00
David Garske
ed188903e0
Merge pull request #4007 from haydenroche5/ocsp_bug
...
Fix test_wolfSSL_CertManagerCheckOCSPResponse.
2021-05-03 16:55:52 -07:00
Hayden Roche
822aa92fcc
Fix test_wolfSSL_CertManagerCheckOCSPResponse.
...
This test broke once we went past the nextUpdate time in the static, raw OCSP
response being used. This change makes it so that response is valid until 2048.
2021-05-03 15:26:39 -07:00
David Garske
6e0197e171
Merge pull request #4002 from kabuobeid/smime_fixes
...
S/MIME: Canonicalize multi-part messages before hashing. Improve error checking in wc_MIME_parse_headers.
2021-05-03 09:24:43 -07:00
TakayukiMatsuo
9eab854c61
Revised logic along review comments
2021-05-03 07:44:04 +09:00
Kareem Abuobeid
8071fac306
S/MIME: Add smime-test-canon.p7s to include.am
2021-04-30 15:30:55 -07:00
Kareem Abuobeid
effcecf40d
S/MIME: Add non-canonicalized test case
2021-04-30 15:07:37 -07:00
David Garske
f8ecd4b441
Fixes for building with NO_ASN_TIME. If used with TLS user must supply LowResTimer and TimeNowInMilliseconds.
2021-04-30 15:04:31 -07:00
David Garske
c9634952d5
Fix to handle time rollover in TLS v1.3 diff calculation.
2021-04-30 15:04:09 -07:00
David Garske
651860dce7
Merge pull request #3991 from kaleb-himes/OE6_MINOR_PORTING_CHANGE
...
Implement minor port change requested by customer
2021-04-30 14:37:35 -07:00
David Garske
9e48de9d42
Merge pull request #3970 from embhorn/zd12122
...
Clarify that units of size parameters are in bits
2021-04-30 14:28:50 -07:00
David Garske
fa9f1f8012
Merge pull request #3977 from embhorn/zd12136
...
Improve PSK callback doc
2021-04-30 14:26:39 -07:00
David Garske
ea2e2994af
Reversing hunk in test.c for DEOS (suspect that was in error).
2021-04-30 14:21:23 -07:00
Kareem Abuobeid
baa80284c0
S/MIME: Code review fixes
2021-04-30 14:00:59 -07:00
Chris Conlon
57e03d7e2f
Merge pull request #3961 from miyazakh/qt_oslext_pskss_cb
...
added psk session callback compatibility layer API
2021-04-30 14:26:44 -06:00
Chris Conlon
44b7dd828e
Merge pull request #3972 from TakayukiMatsuo/newindex
...
Add wolfSSL_CRYPTO_get_ex_new_index
2021-04-30 14:21:55 -06:00
Chris Conlon
3daafb47d5
Merge pull request #3982 from dgarske/atca_bool
...
Fix for ATECC on platforms where bool and int have different sizes
2021-04-30 13:59:49 -06:00
Chris Conlon
37cb24874e
Merge pull request #3994 from miyazakh/esp_rsa_hw
...
Fixed esp32 RSA hw accelerator initialization issue
2021-04-30 13:58:24 -06:00
Kareem Abuobeid
573d51966a
S/MIME: Canonicalize multi-part messages before hashing. Improve error checking in wc_MIME_parse_headers.
2021-04-30 12:50:27 -07:00
David Garske
6489d69c7c
For platforms that support limits.h or windows make sure both SIZEOF_LONG_LONG and SIZEOF_LONG are set, otherwise causes issues with CTC_SETTINGS.
2021-04-30 11:06:09 -07:00
David Garske
e97692c521
Merge pull request #3926 from vppillai/vppillai-patch-2
...
Fix ATECC608A TNGTLS certificate size issue
2021-04-30 10:58:09 -07:00
David Garske
751cb8f43f
Merge pull request #3974 from JacobBarthelmeh/sniffer
...
add fatal error return value for sniffer
2021-04-30 10:57:33 -07:00
David Garske
1388956a35
Merge pull request #3995 from SparkiDev/sha3_align
...
SHA-3: Aligned access of 64 bit value.
2021-04-30 10:54:21 -07:00
Tesfa Mael
f9a9b139ed
Fix a build err
2021-04-29 16:44:51 -07:00
Sean Parkinson
1fbe0cb408
SHA-3: Aligned access of 64 bit value.
2021-04-30 08:45:05 +10:00
Vysakh P Pillai
8ede17f337
code formating changes based on PR review.
2021-04-29 07:48:31 +05:30
Hideki Miyazaki
f4935f52b5
clear PROT_RSA_PD bit in PORT_RSA_PD_CTRL_REG to be initialization and activate RSA accelerator
2021-04-29 09:20:16 +09:00
John Safranek
3aa3fc889f
Add simple push and pull-request triggered build checks.
2021-04-28 16:52:54 -07:00
Sean Parkinson
985482a2ad
PKCS#11: rework RSA operations to be clearer
2021-04-29 08:42:53 +10:00
Eric Blankenhorn
cdede0515c
Allow parsing spaces in Base64_SkipNewline
2021-04-28 10:30:16 -05:00
kaleb-himes
0b4b0193e7
Implement minor port change requested by customer
2021-04-28 08:58:23 -06:00
TakayukiMatsuo
f652ac2a04
Removed unused macro guard.
2021-04-28 10:47:22 +09:00
TakayukiMatsuo
a56de6361d
Removed the double-defined function.
2021-04-28 10:41:49 +09:00
TakayukiMatsuo
c4782a7a1c
Fix macro guard for wolfSSL_CRYPTO_get_ex_new_index and get_ex_new_index.
2021-04-28 10:41:49 +09:00
TakayukiMatsuo
9c0ff73370
Add wolfSSL_CRYPTO_get_ex_new_index
2021-04-28 10:38:53 +09:00
Hideki Miyazaki
4063e33b02
addressed review comments p1
2021-04-28 10:08:22 +09:00
Hideki Miyazaki
9de3fab74c
fixed jenkins failures part1
2021-04-28 10:08:21 +09:00
Hideki Miyazaki
0e40293798
added psk session callback
2021-04-28 10:08:21 +09:00
David Garske
385e0bedaa
Merge pull request #3990 from haydenroche5/ocsp_bug
...
Fix CompareOcspReqResp.
2021-04-27 17:07:58 -07:00
Chris Conlon
edb0beb9b6
Merge pull request #3969 from TakayukiMatsuo/koyo
...
Add wolfSSL_DH_get0_pqg
2021-04-27 17:52:17 -06:00
Chris Conlon
6fad8c4a57
Merge pull request #3975 from TakayukiMatsuo/resumable
...
Add implementation for wolfSSL_SESSION_is_resumable.
2021-04-27 16:45:34 -06:00
Hayden Roche
73076940af
Fix CompareOcspReqResp.
...
There was a bug in this function that could cause a match to be reported even
when the OCSP request and response in fact had a mismatch.
2021-04-27 13:54:43 -07:00
Chris Conlon
1bff411191
Merge pull request #3986 from miyazakh/qt_ctx_min_max_proto
...
add MIN/MAX_PROTO into CTX_ctrl
2021-04-27 14:54:16 -06:00
Hideki Miyazaki
6d381a6c7f
do nothing when version is zero
2021-04-27 21:13:19 +09:00
Hideki Miyazaki
3b070e1bd0
add MIN/MAX_PROTO into CTX_ctrl
...
add unit test for min/max proto of CTX ctrl
2021-04-27 21:13:17 +09:00
Vysakh P Pillai
e716fcc635
do not reserve ATMEL_SLOT_ECDHE type for TNGTLS
2021-04-27 16:51:49 +05:30
Vysakh P Pillai
c34fcf908c
code cleanup based on PR review comments
2021-04-27 12:17:23 +05:30
Sean Parkinson
7e87c01a7d
Merge pull request #3987 from tmael/pss_salt
...
RSA: Fix RSA PSS padding check
2021-04-27 14:50:32 +10:00
Tesfa Mael
1637bd3e02
Fix RSA PSS padding
2021-04-26 19:21:23 -07:00
toddouska
b7b2347804
Merge pull request #3985 from elms/fix/dtls_no_asn
...
fix define gates for `AddFragHeaders` with DTLS
2021-04-26 15:13:59 -07:00
Elms
d20f7e7143
fix define gates for AddFragHeaders with DTLS
...
fixes build with `./configure --enable-dtls --disable-asn`
2021-04-24 07:23:50 -07:00
toddouska
3502bdc8df
Merge pull request #3960 from elms/msys_build_fix
...
mingw/msys: fix build error with TFM
2021-04-23 15:56:10 -07:00
Tesfa Mael
f8e9f32eb8
Add a new file
2021-04-23 15:56:09 -07:00
toddouska
54b17ba465
Merge pull request #3952 from julek-wolfssl/ZD12062
...
Using `--enable-chacha=noasm` wouldn't actually enable chacha
2021-04-23 15:55:10 -07:00
toddouska
40fe746710
Merge pull request #3942 from dgarske/get_static_ephemeral
...
Added API's for getting pointer to loaded static ephemeral key
2021-04-23 15:54:46 -07:00
toddouska
47fe114a02
Merge pull request #3901 from dgarske/bio_read
...
Fix for BIO read callback not called
2021-04-23 15:51:38 -07:00
toddouska
bbda833909
Merge pull request #3720 from elms/deos/project_files
...
DEOS: Add project files for shared library
2021-04-23 15:44:33 -07:00
toddouska
91e90f7a98
Merge pull request #3604 from haydenroche5/stunnel
...
Make changes to get latest verison of stunnel (5.57) working with wolfSSL.
2021-04-23 15:41:22 -07:00
toddouska
c3fefc6e27
Merge pull request #3889 from douzzer/network-introspection
...
--enable-wolfsentry
2021-04-23 15:38:01 -07:00
Tesfa Mael
0c16ef4b29
Check for TLS downgrade
2021-04-23 14:45:35 -07:00
David Garske
fa353b1ee0
Fix for ATECC on platforms where bool and int have different sizes. Related to issue #3971
2021-04-23 11:15:36 -07:00
elms
33f9f98569
Deos: fixup readme
2021-04-23 10:15:23 -07:00
TakayukiMatsuo
2b6f623777
Add implementation for wolfSSL_SESSION_is_resumable.
2021-04-23 11:12:20 +09:00
TakayukiMatsuo
c442841e4a
Fix some along review.
2021-04-23 10:53:22 +09:00
TakayukiMatsuo
d22ed7443b
Fix unit test.
2021-04-23 09:47:24 +09:00
TakayukiMatsuo
568c09bcde
Add guard to the unit test
2021-04-23 09:47:24 +09:00
TakayukiMatsuo
63826e227b
Add wolfSSL_DH_get0_pqg
2021-04-23 09:47:24 +09:00
Chris Conlon
878e0006ad
Merge pull request #3965 from miyazakh/qt_oslext_epk_param_ck
...
added wofSSL_EVP_PKEY_param_check for compatibility layer API
2021-04-22 15:43:47 -06:00
Chris Conlon
a83c6c68fe
Merge pull request #3940 from miyazakh/qt_v5p15p2_r3
...
Added compatibility layer API for Qt5.15.2 part2
2021-04-22 15:36:20 -06:00
Eric Blankenhorn
cb02f46fec
Fix Espressif win script
2021-04-22 16:20:34 -05:00
Eric Blankenhorn
3c0a77485e
Improve PSK callback doc
2021-04-22 10:47:46 -05:00
René Liebscher
fa98477f22
Renesas RX: Use intrinsics for rot[rl], revl
...
For byte order reverse and rotation we have builtins
in the CC-RX compiler.
Especially when rotating registers with fixed amounts
this can be compiled efficiently into opcodes with
embedded values for shift (without needing other registers).
2021-04-22 16:44:19 +02:00
Jacob Barthelmeh
14ddfa6894
add fatal error return value for sniffer
2021-04-22 14:28:10 +07:00
Daniel Pouzzner
9c7ee3fa64
examples/server/server.c: when TEST_IPV6, set the remote address to IPv6 localhost for wolfsentry_route_insert_static().
2021-04-22 00:20:12 -05:00
Daniel Pouzzner
1650e8b88a
ssl.c: add back missing line continuation backslash.
2021-04-21 17:45:08 -05:00
Daniel Pouzzner
0cf9bacf1b
WOLFSSL_WOLFSENTRY_HOOKS/HAVE_EX_DATA*: refactor wolfSSL_CRYPTO_cleanup_ex_data() to take only one arg (the WOLFSSL_CRYPTO_EX_DATA *); fix preprocessor gates on wolfSSL_set_ex_data() and wolfSSL_X509_get_ex_new_index(); fix line lengths.
2021-04-21 17:34:47 -05:00
Daniel Pouzzner
40d5aad8fe
configure.ac: improve dynamics of --enable-wolfsentry and --with-wolfsentry*, including existence-checking user-supplied paths.
2021-04-21 17:28:27 -05:00
David Garske
67277d13cd
Merge pull request #3937 from elms/intime/dir_pre_intimever6
...
INTIME: support CRL for INTIME version < 6
2021-04-21 10:42:33 -07:00
Daniel Pouzzner
0afcd4227b
ssl.c/internal.c: refactor _EX_DATA_CLEANUP_HOOKS cleanup in _free() routines to use a common wolfSSL_CRYPTO_cleanup_ex_data() routine; remove superfluous WOLFSSL_API qualifiers in ssl.c.
2021-04-21 12:20:56 -05:00
Daniel Pouzzner
89d7f4faf3
tests/api.c: add missing void arglists.
2021-04-21 03:22:10 -05:00
Daniel Pouzzner
660e64cdff
examples/server/server.c: clean up wolfsentry printfs.
2021-04-21 03:19:55 -05:00
Daniel Pouzzner
c874d9259c
configure.ac: add --with-wolfsentry option.
2021-04-21 03:19:35 -05:00
Hideki Miyazaki
23b5447050
Qt v5.15 requires greater than version 1.1.1
2021-04-21 17:01:06 +09:00
Daniel Pouzzner
cb976db02b
server.c: update for wolfSentry API changes.
2021-04-20 23:59:58 -05:00
Daniel Pouzzner
6175e11156
server.c: update wolfsentry_init() usage (hpi pointer).
2021-04-20 23:59:58 -05:00
Daniel Pouzzner
23d8df720e
remove WOLFSSL_NETWORK_INTROSPECTION code; add wolfSSL_X509_STORE_set_ex_data_with_cleanup(); refactor WOLFSSL_WOLFSENTRY_HOOKS code in server.c to use HAVE_EX_DATA/HAVE_EX_DATA_CLEANUP_HOOKS.
2021-04-20 23:59:58 -05:00
Daniel Pouzzner
4458ed37c1
fix a couple stray WOLFSSL_NETWORK_INTROSPECTION gates that needed to be WOLFSSL_WOLFSENTRY_HOOKS.
2021-04-20 23:59:58 -05:00
Daniel Pouzzner
2a05fcb59a
examples/server: fix wolfSentry integration to handle DTLS correctly.
2021-04-20 23:59:57 -05:00
Daniel Pouzzner
1cbe696716
checkpoint: fully functioning demo via examples/server/ and unit.test (which produces a "filtered" error on a subtest when built --enable-wolfsentry).
2021-04-20 23:59:57 -05:00
Daniel Pouzzner
734860f535
WOLFSSL_NETWORK_INTROSPECTION WIP
2021-04-20 23:59:57 -05:00
Daniel Pouzzner
ba2cc00e5d
initial implementation of WOLFSSL_NETWORK_INTROSPECTION: --enable-network-introspection, struct wolfSSL_network_connection, wolfSSL_*_endpoints*(), NetworkFilterCallback_t, wolfSSL_*set_AcceptFilter().
2021-04-20 23:59:57 -05:00
John Safranek
38ff193368
Merge pull request #3962 from julek-wolfssl/dtls-allow-future
...
Change default DTLS future packet behaviour
2021-04-20 17:32:42 -07:00
John Safranek
6e7b43056d
Merge pull request #3956 from dgarske/zd12010
...
Fix in sniffer for possible use of uninitialized variable
2021-04-20 17:29:46 -07:00
John Safranek
9d387b13d0
Merge pull request #3938 from julek-wolfssl/dtls-mtu
...
Refactor DTLS MTU logic
2021-04-20 17:18:12 -07:00
Hideki Miyazaki
d3b41a2fed
addressed review comments p1
2021-04-21 09:10:32 +09:00
Hideki Miyazaki
2f5b280d6c
fixed jenkins failure part1
2021-04-21 07:53:19 +09:00
Hideki Miyazaki
e063984d17
added EVP_PKEY_param_check
2021-04-21 07:53:18 +09:00
Hideki Miyazaki
b37f1ac0c0
addressed review comments part1
2021-04-21 07:39:13 +09:00
Hideki Miyazaki
bca3cd1d49
fix jenkins failures
2021-04-21 07:39:12 +09:00
Hideki Miyazaki
89b5b90be6
added compatibility layer API stub for Qt 5.15.2
2021-04-21 07:39:12 +09:00
Sean Parkinson
31bc2e4114
Merge pull request #3967 from embhorn/zd12116
...
PKCS#11: Add debug for failure in wc_Pkcs11_Initialize
2021-04-21 08:06:14 +10:00
Chris Conlon
b9c52729d1
Merge pull request #3959 from kaleb-himes/WINCE_settings_update
...
Update WINCE for wolfEngine and turn off MD5
2021-04-20 10:15:44 -06:00
Chris Conlon
537d33d5fa
Merge pull request #3951 from dgarske/stm32_aes_h7
...
Fix for AES GCM with STM32H7
2021-04-20 10:14:13 -06:00
Chris Conlon
f931e67cd7
Merge pull request #3946 from TakayukiMatsuo/tk11899
...
Add test cases for EVP_CIPHER_CTX_cleanup and BIO_free
2021-04-20 10:10:41 -06:00
Chris Conlon
c3aee06b23
Merge pull request #3939 from miyazakh/qt_v5p15p2_r1
...
added and modified compatibility layer APIs for Qt v5.15.2 part1
2021-04-20 10:02:27 -06:00
Chris Conlon
bd5dc0b21d
Merge pull request #3948 from miyazakh/qt_unittest_cert
...
added favourite drink pilot attribute
2021-04-20 09:50:30 -06:00
Eric Blankenhorn
1d50962889
Clarify that units of size parameters are in bits
2021-04-20 09:28:17 -05:00
Elms
9dd5768ecc
Intime: simplify and fix stat on different directory
2021-04-19 22:34:31 -07:00
Eric Blankenhorn
94eb096e42
Add debug for failure in wc_Pkcs11_Initialize
2021-04-19 17:53:21 -05:00
Daniel Pouzzner
d08a2b1761
Merge pull request #3966 from SparkiDev/arm-jenkins-2
...
ARMv8 ASM AES-CBC: Fix parameter validation
2021-04-19 17:06:48 -05:00
Sean Parkinson
d274c80789
ARMv8 ASM AES-CBC: Fix parameter validation
2021-04-19 16:47:34 +10:00
Sean Parkinson
d7b0b97352
Merge pull request #3955 from kaleb-himes/OE18-external-to-module-changes
...
non-const versions only needed when using inlined ARM assembly in the module.
2021-04-19 09:13:11 +10:00
elms
a26a19b4c8
Deos: rebase fix and add note about importing to readme
2021-04-16 16:35:30 -07:00
elms
6600a531c8
Deos: project relative include paths and ignore fips files by default
2021-04-16 15:39:24 -07:00
Elms
3e6f663a38
DEOS: update readme
2021-04-16 15:39:24 -07:00
Elms
d6a29b269d
DEOS: add files to dist
2021-04-16 15:39:24 -07:00
Elms
57f4adf438
DEOS: updated memory and add DTLS
...
Tested: DDC-I 9.2.0r94156 and OpenArbor on PPC hardware
2021-04-16 15:39:19 -07:00
Kaleb Himes
3da32e75ad
Correct commentary based on peer feedback
2021-04-16 15:12:35 -06:00
David Garske
099f88e45b
Revert the change to test.c.
2021-04-16 12:02:04 -07:00
David Garske
7cfd22304e
Fix to improve STM32 AES GCM with partial blocks. Use a local buffer for partial remainder and make sure remainder is zero'd.
2021-04-16 11:58:45 -07:00
Juliusz Sosinowicz
2bc2a911d7
Change default DTLS future packet behaviour
...
This is a better default for most users. Most users who make use of DTLS, allow messages from "too far into the future". It makes sense that DTLS may lose connection for a period of time and will lose all messages from this period. Losing connection effectively stalls the wolfSSL DTLS connection.
2021-04-16 19:27:39 +02:00
Juliusz Sosinowicz
70a3857ae8
Fragmentation for ServerKeyExchange and CeriticateVerify
...
- The `ssl->dtlsMtuSz` value is the maximum possible size of the DTLS record layer. We read `ssl->dtlsMtuSz + 100` in case peer has slightly different MTU set.
- The `-u` option in the examples takes the value of the MTU size.
- MTU tests are added in `tests/test-dtls-mtu.conf`
2021-04-16 17:30:51 +02:00
TakayukiMatsuo
9553188099
Added type cast to the parm of wolfSSL_BIO_write.
2021-04-16 11:51:58 +09:00
TakayukiMatsuo
1a4adab52e
Changed DumpElement() so that the allocated buffer is freed in the WOLFSSL_SMALL_STACK build case.
2021-04-16 10:05:48 +09:00
Sean Parkinson
5955603c51
Merge pull request #3958 from TakayukiMatsuo/tk11969
...
Changed the logic for determining the group used for KeyShare in TLSX_PopulateExtensions.
2021-04-16 09:34:54 +10:00
Hideki Miyazaki
cc0359accb
changed callback func name corresponding other cb func name convention
2021-04-16 08:20:12 +09:00
Elms
cc4116de24
mingw/msys: fix build error with TFM
...
Conditional was always true. Rule out using preprocessor.
2021-04-15 15:16:21 -07:00
David Garske
38637bb276
Merge pull request #3957 from SparkiDev/sp_div_word_fix
...
SP DIV word C: Add instead of OR
2021-04-15 12:20:56 -07:00
kaleb-himes
96256a3ec1
Update WINCE for wolfEngine and turn off MD5
2021-04-15 10:27:41 -06:00
David Garske
64c7830c93
Fix for possible use of invalid *sslFrame and calculated headerSz in partial case with WOLFSSL_SNIFFER_CHAIN_INPUT.
2021-04-15 09:01:11 -07:00
TakayukiMatsuo
2db06eb3b7
Changed the logic for determining the group used for KeyShare.
2021-04-15 19:30:02 +09:00
Sean Parkinson
bb75c4d610
SP DIV word C: Add instead of OR
2021-04-15 09:22:29 +10:00
David Garske
d34161e482
Fix in sniffer for possible use of uninitialized length when skipPartial is set. ZD 12010
2021-04-14 15:14:14 -07:00
Hideki Miyazaki
5a1d171236
fixed unit test failure
2021-04-14 21:25:50 +09:00
Hideki Miyazaki
03cfc3dc8f
addressed review comments part1
2021-04-14 11:15:23 +09:00
kaleb-himes
88aed28a3f
Refactor following peer review
2021-04-13 17:28:43 -06:00
Hideki Miyazaki
f8e7f9bf03
addressed review comment part1
2021-04-14 07:58:22 +09:00
TakayukiMatsuo
f245ba0ca1
Merge remote-tracking branch 'upstream/master' into tk11899
...
# Conflicts:
# tests/api.c
2021-04-14 06:13:46 +09:00
Chris Conlon
21faeff478
Merge pull request #3916 from JacobBarthelmeh/PKCS7
...
fix for streaming with PKCS7
2021-04-13 14:04:06 -06:00
Chris Conlon
c129f630e2
Merge pull request #3933 from miyazakh/rand_bytes_regression
...
fix retrun code regression on RAND_bytes
2021-04-13 13:55:04 -06:00
Chris Conlon
71e2f191a6
Merge pull request #3947 from dgarske/nxp_ltc
...
Fixes for NXP LTC
2021-04-13 13:49:22 -06:00
kaleb-himes
87a2cdea31
const poisoning - gcc 4.x prefers consistency in prototypes and implementations
2021-04-13 13:29:40 -06:00
Hayden Roche
4cd3f2e826
Make changes to get latest verison of stunnel (5.57) working with wolfSSL.
2021-04-13 09:18:25 -05:00
JacobBarthelmeh
295418fa3e
Merge pull request #3954 from ejohnstown/m1
...
M1 Update
2021-04-13 12:08:11 +08:00
David Garske
54e111aa85
Update copy/paste error in comment.
2021-04-12 17:02:35 -07:00
David Garske
89e4bae8d2
Fix for STM32 AES GCM decrypt to support partial (not multiple of 4) for auth tag calculation.
2021-04-12 16:57:57 -07:00
Chris Conlon
2739759072
Merge pull request #3953 from JacobBarthelmeh/build-tests
...
add option to use an engine with openssl test script
2021-04-12 13:22:52 -06:00
Juliusz Sosinowicz
c6077b6767
Refactor DTLS MTU logic
...
- wolfSSL_GetMaxRecordSize will now take additional cipher data into account
- The set MTU size is understood as the maximum size of a DTLS record. The WOLFSSL_MAX_MTU was adjusted to account for UDP/IP headers.
2021-04-12 21:01:15 +02:00
John Safranek
74df158c5c
Update the check for 64-bit on the M1 to filter out other ARM processors.
2021-04-12 11:18:52 -07:00
David Garske
021c22c038
Merge pull request #3950 from embhorn/zd11850
...
Fix build error with NO_PKCS12
2021-04-12 10:46:45 -07:00
toddouska
0f1a702f58
Merge pull request #3949 from JacobBarthelmeh/StaticAnalysisTests
...
remove dead code, variable gn will currently always be null
2021-04-12 10:26:02 -07:00
Hideki Miyazaki
501de37cad
fixed memory leak in unit test
2021-04-12 18:34:07 +09:00
Hideki Miyazaki
ad6f8e4246
added and modified compatibility layer APIs for Qt v5.15.2 part1
2021-04-12 18:34:07 +09:00
Jacob Barthelmeh
4a7434a56d
add missing ret checks
2021-04-12 16:33:14 +08:00
Jacob Barthelmeh
160faa851c
add deterministic k generation for ECC sign
2021-04-12 16:33:14 +08:00
JacobBarthelmeh
d44549fd77
only update OPENSSL_ENGINE_ID if already set
2021-04-12 01:47:01 -06:00
Sean Parkinson
7345b2418b
Merge pull request #3944 from guidovranken/zd12039
...
Account for sp_sqr failure in _sp_exptmod_nct
2021-04-12 11:03:38 +10:00
Sean Parkinson
0197e133b1
Merge pull request #3929 from hicksjacobp/tls13-cbclientcert
...
fix: call CBClientCert for TLS 1.3 certificate requests
2021-04-12 09:25:22 +10:00
JacobBarthelmeh
ee22d27cf8
add sanity check that engine can be loaded
2021-04-11 20:48:18 +07:00
JacobBarthelmeh
c34025b186
add option to use an engine with openssl test script
2021-04-11 20:06:13 +07:00
David Garske
8538869d33
Added runtime checking for LTC big integer buffer sizes.
2021-04-09 15:51:57 -07:00
David Garske
070dfad07a
Fix for NXP LTC ECC public key computation broken in PR #2859 for contstant time changes.
2021-04-09 15:51:30 -07:00
Daniel Pouzzner
04cc48b810
Merge pull request #3935 from miyazakh/x509_store_ex_data
...
add X509_STORE_get/set_ex_data
2021-04-08 21:51:03 -05:00
Chris Conlon
a4ebeac932
fix minor typo in function return comment
2021-04-08 16:37:16 -06:00
Elms
18eca4deff
INTIME: fix check returns Find{First,Next,Close} for version <6
2021-04-08 10:23:26 -07:00
Juliusz Sosinowicz
beff4daf7e
Refactor wolfSSL_BIO_BASE64_write to simplify its logic
2021-04-08 19:11:55 +02:00
TakayukiMatsuo
07022eebe7
Add a OPENSSL_EXTRA guard to call SSL_get_early_data_status
2021-04-09 01:10:45 +09:00
David Garske
f298bb9f22
Peer review feedback.
2021-04-08 08:06:45 -07:00
TakayukiMatsuo
424d97ca3d
Merge remote-tracking branch 'upstream/master' into tk11899
...
# Conflicts:
# src/ssl.c
2021-04-08 23:59:51 +09:00
TakayukiMatsuo
bc7191ca4c
Added test cases for NULL-parameter
2021-04-08 23:11:00 +09:00
Juliusz Sosinowicz
d8dd69cf44
Using --enable-chacha=noasm wouldn't actually enable chacha
2021-04-08 12:46:05 +02:00
toddouska
3b9e7942ea
Merge pull request #3908 from embhorn/zd11866
...
Sanity check size in TLSX_Parse
2021-04-07 16:34:56 -07:00
toddouska
b3177ffc17
Merge pull request #3945 from dgarske/ecc_nomalloc
...
Improve ECC with `WOLFSSL_NO_MALLOC`
2021-04-07 16:29:13 -07:00
toddouska
418e5b46d6
Merge pull request #3934 from SparkiDev/armv8-asm-sha256-fix
...
ARMv8 SHA-256: recalc data in SHA256 update
2021-04-07 16:22:27 -07:00
toddouska
86fe77d776
Merge pull request #3924 from dgarske/sp_math_all
...
Sp math all fixes
2021-04-07 16:21:58 -07:00
toddouska
de8653be35
Merge pull request #3941 from JacobBarthelmeh/Compatibility-Layer
...
add implementation of EC_KEY_set_group
2021-04-07 16:20:50 -07:00
toddouska
9e9506c260
Merge pull request #3919 from JacobBarthelmeh/StaticAnalysisTests_2
...
Static analysis tests 2
2021-04-07 16:18:37 -07:00
David Garske
acf1a9833b
Fix for AES GCM with STM32H7 to use crypto hardware in all cases except IV size != 12.
2021-04-07 15:51:50 -07:00
Eric Blankenhorn
ef69a9b458
Fix build error with NO_PKCS12
2021-04-07 15:36:35 -05:00
David Garske
4747ba9ccb
Fix for BIO base64 write valgrind issue.
2021-04-07 12:23:26 -07:00
Jacob Barthelmeh
f16136c29b
remove dead code, variable gn will currently always be null
2021-04-07 20:56:50 +07:00
Hideki Miyazaki
8e6710e030
added favourite drink pilot attribute
...
fix OCSP authority access info
2021-04-07 18:44:32 +09:00
TakayukiMatsuo
7da85c6f3f
Merge remote-tracking branch 'upstream/master' into tk11899
2021-04-07 12:01:39 +09:00
David Garske
786bbabbdc
Improve ECC with WOLFSSL_NO_MALLOC
...
Tested with `./configure --enable-cryptonly --disable-examples --disable-rsa --disable-dh CFLAGS="-DWOLFSSL_NO_MALLOC -DBENCH_EMBEDDED" && make check`.
All ECC operations can work now with WOLFSSL_NO_MALLOC and variables will be on stack.
ZD 11829
2021-04-06 15:31:40 -07:00
David Garske
779dabc04e
Cleanups to KSDK port for LTC.
2021-04-06 13:50:33 -07:00
David Garske
f4e1d96cfc
Fixes for building K82. Fixes for warning with const mp_int* k changes.
2021-04-06 11:38:05 -07:00
Jacob Barthelmeh
4eb8265c46
add ecc guard on test case
2021-04-06 20:01:15 +07:00
TakayukiMatsuo
0a05acff09
Add test cases for EVP_CIPHER_CTX_cleanup and BIO_free
2021-04-06 14:21:53 +09:00
Guido Vranken
52e6ff7c56
Account for sp_sqr failure in _sp_exptmod_nct
...
ZD 12039
2021-04-06 01:34:09 +02:00
David Garske
5ebe5d071f
Fixes for wolfSSL_BIO_BASE64_write changes.
2021-04-05 14:35:47 -07:00
Juliusz Sosinowicz
1a9d59c185
front may be unused and generate a warning
2021-04-05 14:35:47 -07:00
Juliusz Sosinowicz
d257cf5003
Return error when using not compiled in BIO
...
Refactor base64 BIO write into static function
2021-04-05 14:35:47 -07:00
David Garske
5b751d9eaa
Fix for possible unused label "exit_chain".
2021-04-05 14:35:47 -07:00
David Garske
8984ce03e9
Refactor BIO read/write to use switch.
2021-04-05 14:35:47 -07:00
David Garske
072e6e010c
Handle the BIO want read in BioReceive.
2021-04-05 14:35:47 -07:00
David Garske
5c762afb94
Fix for BIO with callbacks not called after PR #3824 (was always returning WANT_READ).
2021-04-05 14:35:47 -07:00
David Garske
e13c93d493
Added API's for getting pointer to load static ephemeral key.
2021-04-05 13:40:48 -07:00
David Garske
6b46669641
Merge pull request #3917 from embhorn/zd11959
...
Sanity check sockfd max value
2021-04-05 11:50:13 -07:00
David Garske
7935b7c485
Merge pull request #3920 from SparkiDev/sp_int_ullong
...
SP int: Handle ULLONG_MAX not being defined
2021-04-05 11:48:38 -07:00
David Garske
53d97d1961
Fix for DSA only case and missing sp_read_radix
2021-04-05 11:43:21 -07:00
David Garske
24d8e1b104
SP math all edge cases without RSA.
2021-04-05 11:31:55 -07:00
David Garske
eb37953061
Fix for WOLFSSL_SP_MATH_ALL typo. Plus a few other minor ones.
2021-04-05 11:31:55 -07:00
JacobBarthelmeh
63c96c3585
add implementation of EC_KEY_set_group
2021-04-05 22:22:31 +07:00
Jacob Barthelmeh
9a86f133c8
additional fixes for reports with test cases
2021-04-05 21:26:52 +07:00
Jacob Barthelmeh
71fea2bdd1
initialize hash size variable to 0 in the case that getting the digest size returns 0
2021-04-05 21:26:52 +07:00
Jacob Barthelmeh
4e8769ba6b
initialize variable
2021-04-05 21:26:52 +07:00
Jacob Barthelmeh
39f34ef88b
check return values
2021-04-05 21:26:52 +07:00
Jacob Barthelmeh
1c3ba77bee
remove dead code path
2021-04-05 21:26:52 +07:00
Jacob Barthelmeh
fdb3221ea7
check variable is not null before use in error case
2021-04-05 21:26:52 +07:00
Jacob Barthelmeh
b4c0301f57
add sanity check on serial size
2021-04-05 21:26:52 +07:00
Jacob Barthelmeh
9ea60db80a
add free of bio in error case
2021-04-05 21:26:22 +07:00
Jacob Barthelmeh
4ead19e21f
check return value of hash digest size
2021-04-05 21:26:22 +07:00
Jacob Barthelmeh
75abeebaf7
free memory in test case
2021-04-05 21:26:22 +07:00
Jacob Barthelmeh
97b83a2550
free PKCS7 structure on error case
2021-04-05 21:26:22 +07:00
Jacob Barthelmeh
141d1cb5af
fix for potential leak on fail case
2021-04-05 21:26:22 +07:00
Elms
379e1fb630
INTIME: support CRL for INTIME version < 6
2021-04-01 11:15:23 -07:00
Juliusz Sosinowicz
c5b6d20483
Add more DSA parameters support
...
- Implement wc_DsaParamsDecode and wc_DsaKeyToParamsDer
- Don't include NIDs without OpenSSL builds
2021-04-01 19:47:09 +02:00
Hideki Miyazaki
ea0f4580de
add X509_STORE_get/set_ex_data
2021-04-01 17:06:02 +09:00
Sean Parkinson
e3c86f8f77
ARMv8 SHA-256: recalc data in SHA256 update
2021-04-01 17:01:21 +10:00
Sean Parkinson
fd94d05b0a
Merge pull request #3932 from guidovranken/zd12012
...
MP integer.c: Use unsigned integers in mp_is_bit_set
2021-04-01 15:41:01 +10:00
Hideki Miyazaki
b8684f3f7e
fix retrun code regression on RAND_bytes
...
fix jenkins fail
2021-04-01 13:35:50 +09:00
Guido Vranken
2ecaa3c4c6
Use unsigned integers in mp_is_bit_set
...
ZD 12012
2021-04-01 00:57:06 +02:00
toddouska
95b91d8913
Merge pull request #3886 from DKubasekRA/fix/RA/v4.7.0-coverity
...
RA - Fixes for Coverity issues
2021-03-31 10:41:54 -07:00
toddouska
49b29bec32
Merge pull request #3930 from JacobBarthelmeh/Testing
...
add link to wolfssl-examples repository in README
2021-03-31 10:10:44 -07:00
toddouska
38cec4b0d4
Merge pull request #3922 from dgarske/have_secret
...
Expose functions to get client/server random for have secret callback
2021-03-30 16:03:57 -07:00
toddouska
f7046ca12a
Merge pull request #3906 from douzzer/AES-BAD_ALIGN_E-consistency
...
Adds optional AES CBC length checking
2021-03-30 16:01:29 -07:00
toddouska
4d1ad6acd6
Merge pull request #3885 from JacobBarthelmeh/StaticAnalysisTests
...
Static analysis fixes for items listed as high priority
2021-03-30 16:00:03 -07:00
Chris Conlon
4044b30363
Merge pull request #3915 from TakayukiMatsuo/os_ecdh
...
Add unit tests for OpenSSL compat APIs
2021-03-30 16:18:16 -06:00
Jacob Barthelmeh
dfb7848320
add link to wolfssl-examples repository in README
2021-03-31 01:34:14 +07:00
Jake Hicks
0ea9163253
fix: call CBClientCert for TLS 1.3 certificate requests
2021-03-30 07:25:05 -05:00
TakayukiMatsuo
56b1406a30
Fix to call wc_FreeDhKey only after wc_InitDhKey succeeds.
2021-03-30 00:18:40 +09:00
Sean Parkinson
c3fcb2e95f
Merge pull request #3923 from dgarske/armv8
...
ARMv8: do not compile code if module is disabled
2021-03-29 08:50:41 +10:00
Vysakh P Pillai
4911977946
rename I2C address var per cryptoauthlib 3.3.0
2021-03-28 00:11:11 +05:30
Vysakh P Pillai
ccc50714d0
Fix TNGTLS certificate size issue
...
TNGTLS devices has shown variations in the device and signer certificate sizes causing failure.
This fix makes the size query dynamic.
2021-03-28 00:02:17 +05:30
Chris Conlon
a9ff314840
Merge pull request #3912 from miyazakh/rsa_bits_
...
Added RSA_bits
2021-03-26 17:00:56 -06:00
Chris Conlon
b67f270e3d
Merge pull request #3910 from miyazakh/openssl_ext_unit_test
...
Update compatibility layer api unit test
2021-03-26 16:58:21 -06:00
David Garske
a22defec50
Fix for availability of wolfSSL_SESSION_print.
2021-03-26 15:39:55 -07:00
David Garske
95ff75c43d
Fix for wolfSSL_SESSION_print
2021-03-26 13:41:11 -07:00
David Garske
724a415d51
Fix ARMv8 to not compile code if module is disabled
2021-03-26 13:28:15 -07:00
David Garske
f65e1f1f09
Expose functions to get client/server random when HAVE_SECRET_CALLBACK is defined.
2021-03-26 13:23:00 -07:00
Daniel Pouzzner
5f6b618e71
configure.ac: add --enable-aescbc-length-checks and add it to --enable-all; api.c: fix expected error code in WOLFSSL_AES_CBC_LENGTH_CHECKS path of test_wc_AesCbcEncryptDecrypt(); aes.c: add explanatory comment on WOLFSSL_AES_CBC_LENGTH_CHECKS to top of file.
2021-03-26 14:04:25 -05:00
Daniel Pouzzner
5d9ee97530
WOLFSSL_AES_CBC_LENGTH_CHECKS: add gated logic to aes.c wc_AesCbc{En,De}crypt() to return BAD_LENGTH_E when input length is not a multiple of AES_BLOCK_SIZE; add gated tests of new functionality in test_wc_AesCbcEncryptDecrypt(); fix first encrypt-decrypt-memcmp in test_wc_AesCbcEncryptDecrypt() to span all of test vector and extend test vector length to be block-multiple; add ungated logic in platform-specific wc_AesCbc{En,De}crypt() routines to return with early success when blocks == 0 (also mitigates buffer overrun on short (less-than-AES_BLOCK_SIZE) input); add BAD_LENGTH_E error code; update documentation.
2021-03-26 13:40:08 -05:00
David Garske
f201d65459
Merge pull request #3898 from elms/intime_rtos/crl_directory_fix
...
INTIME: add support for directory file search
2021-03-26 09:37:21 -07:00
toddouska
79fa71d600
Merge pull request #3882 from TakayukiMatsuo/tk11899
...
Return code differences in wolfSSL_EVP_PKEY_cmp et al.
2021-03-26 09:36:52 -07:00
toddouska
212be50a23
Merge pull request #3899 from SparkiDev/shake256_improve
...
SHA-3: Improve SHAKE256 change to support longer output
2021-03-26 09:35:52 -07:00
toddouska
bb7dce8b46
Merge pull request #3921 from SparkiDev/sp_modinv_win
...
SP MSVC: movslq -> movsxd
2021-03-26 09:34:15 -07:00
TakayukiMatsuo
f7477b932d
Add return value checks and fixed typos.
2021-03-26 17:06:14 +09:00
TakayukiMatsuo
5456765dca
Changed API names to call in unit tests.
2021-03-26 17:05:25 +09:00
Sean Parkinson
1b832bf8fa
SHA-3: Improve SHAKE256 change to support longer output
...
Added tests for 1 complete block output and longer from NIST's CAVP
tests vectors.
2021-03-26 14:59:12 +10:00
Sean Parkinson
a188ef251c
SP MSVC: movslq -> movsl
2021-03-26 14:12:58 +10:00
TakayukiMatsuo
4460180214
Fix implicit conv error.
2021-03-26 08:18:16 +09:00
Sean Parkinson
08be489bf5
SP int: Handle ULLONG_MAX not being defined
2021-03-26 09:03:39 +10:00
Sean Parkinson
0d995527aa
Merge pull request #3918 from dgarske/fix_ecc_mulmod_fast
...
Fix for SP ecc_mulmod_fast
2021-03-26 08:39:48 +10:00
TakayukiMatsuo
5887c2f2e2
Fix fall through.
2021-03-26 04:45:10 +09:00
Eric Blankenhorn
23bd46bac6
Sanity check sockfd
2021-03-25 14:40:38 -05:00
TakayukiMatsuo
79837eeb8e
Changed the function name to be called in the unit test to the OpeSSL function name.
2021-03-26 04:30:36 +09:00
Eric Blankenhorn
11189fe386
Sanity check size in TLSX_Parse
2021-03-25 14:16:22 -05:00
TakayukiMatsuo
da9131d30d
Added return value checks and removed ToDec()
2021-03-26 04:14:14 +09:00
TakayukiMatsuo
dd6db22bc6
Changed the function name to be called in the unit test to the OpenSSL function name.
2021-03-26 04:08:02 +09:00
Elms
4eb4cecff4
INTIME: whitespace fixup and zero context in wc_ReadDirFirst
2021-03-25 10:54:05 -07:00
David Garske
c9b5806575
Fix for ecc_mulmod_fast broken in PR #3868 . The "t" needs 1 extra point for "rt".
2021-03-25 09:19:17 -07:00
David Garske
06966a203b
Merge pull request #3914 from SparkiDev/sp_c_sub_fixes
...
SP C 32/64: fix corner cases around subtraction
2021-03-25 08:11:06 -07:00
Stanislav Klima
6c7b3d806a
Fixed modifying a const value.
2021-03-25 15:36:30 +01:00
Radim Smat
fd7131197f
Updated fix of CID 587269.
2021-03-25 13:28:47 +01:00
Jacob Barthelmeh
a472d2af4a
fix for streaming with PKCS7
2021-03-25 18:54:09 +07:00
Stanislav Klima
67d4611fda
Review fixes.
2021-03-25 11:26:34 +01:00
TakayukiMatsuo
8dcaa8c4b6
Merge remote-tracking branch 'upstream/master' into os_ecdh
...
# Conflicts:
# tests/api.c
2021-03-25 19:17:22 +09:00
TakayukiMatsuo
952a9b3497
Add unit tests for CONT_modules_xxx, CRYPTO_set_dynlock_xxx, CRYPTO_THREADID_xxx and ENGINE_cleanup.
2021-03-25 19:02:13 +09:00
Sean Parkinson
d8a81d0c0f
SP C 32/64: fix corner cases around subtraction
...
Affected RSA PSS
2021-03-25 16:19:54 +10:00
Hideki Miyazaki
c9be50c3a0
added RSA_bits
2021-03-25 13:31:47 +09:00
TakayukiMatsuo
03bad1c056
Added logic to wait for TCP disconnect so that SSL_read behaves the same as OpenSSL after a bidirectional shutdown.
2021-03-25 12:54:05 +09:00
John Safranek
8bee2af550
Merge pull request #3904 from julek-wolfssl/dtls-chacha-poly-fix
...
Chacha-Poly AEAD fix for SCR
2021-03-24 18:53:46 -07:00
David Garske
64555cdd11
Merge pull request #3907 from JacobBarthelmeh/CAAM
2021-03-24 18:47:47 -07:00
John Safranek
662d04ce74
Merge pull request #3879 from julek-wolfssl/dtls-timeout
...
Let user inspect error in wolfSSL_dtls_got_timeout
2021-03-24 18:31:05 -07:00
John Safranek
f2f2976e96
Merge pull request #3837 from haydenroche5/zd11808
...
Fix for ZD 11808.
2021-03-24 18:24:04 -07:00
Sean Parkinson
08ea90ad94
Merge pull request #3905 from dgarske/sp_nb_sync
...
SP ECC: Fix for non-blocking test and synchronization of changes
2021-03-25 10:35:30 +10:00
Hideki Miyazaki
f7652d18a0
use compatibility layer API when they are enabled
2021-03-25 08:09:06 +09:00
JacobBarthelmeh
e074513d38
fix for memory management with mmap function calls
2021-03-25 01:32:37 +07:00
Jacob Barthelmeh
183917f102
change debug message type from review
2021-03-25 01:16:20 +07:00
Martin Kinčl
7f64950da4
Fixed fix of CID 576329.
2021-03-24 17:23:49 +01:00
Martin Kinčl
bf1482a2d7
Fixed another CID 529732.
2021-03-24 17:05:02 +01:00
JacobBarthelmeh
13d81f1fb9
Merge pull request #3902 from dgarske/snicb
...
Fix for SNI recv callback
2021-03-24 15:34:35 +07:00
David Garske
a6851a44af
Fix for ECC non-blocking test R/S values not zero padded causing occasstional wolfCrypt test failures with ./configure --enable-ecc=nonblock --enable-sp=yes,nonblock CFLAGS="-DWOLFSSL_PUBLIC_MP".
2021-03-23 17:32:36 -07:00
David Garske
a6e9e71fde
Synchronization of SP ECC non-blocking code. Adds WOLFSSL_ECDSA_SET_K_ONE_LOOP support to SP ECC non-block. Removes double code in verify steps. Fixes verify result logic. Spelling error.
2021-03-23 17:30:56 -07:00
toddouska
14ef517b61
Merge pull request #3884 from SparkiDev/tfm_read_bin
...
TFM read_unsigned_bin: endian may not be defined
2021-03-23 14:47:18 -07:00
toddouska
d539dc59be
Merge pull request #3903 from SparkiDev/sha2_arm
...
ARMv8 SHA256, SHA512: Add wc_Sha256Transform, wc_Sha512Transform
2021-03-23 14:46:45 -07:00
toddouska
1643bec05f
Merge pull request #3862 from kaleb-himes/WIN32_WCE_PORTING
...
_WIN32_WCE port of wolfCrypt - OE12
2021-03-23 14:40:48 -07:00
toddouska
6134de6a22
Merge pull request #3855 from miyazakh/openssl_ext_r2
...
Compatibility layer API addition
2021-03-23 14:37:47 -07:00
Stanislav Klima
ee79e1082a
Updated fix of 58787.
2021-03-23 13:19:32 +01:00
Juliusz Sosinowicz
3abcdf059a
Chacha-Poly AEAD fix for SCR
...
Wrong cipher material was being used when using Chacha-Poly AEAD for DTLS 1.2 with secure renegotiation
2021-03-23 10:38:48 +01:00
Sean Parkinson
089ebf277f
ARMv8 SHA256, SHA512: Add wc_Sha256Transform, wc_Sha512Transform
2021-03-23 12:53:06 +10:00
David Garske
9313d59479
Fix for SNI callback
...
* Fix for SNI callback on server to make sure the SNI data is stored even without setting a hostname. This makes sure the SNI extension is set when there is a registered SNI recv callback.
* Fix for Apache HTTPD to include `WOLFSSL_ALWAYS_KEEP_SNI`
2021-03-22 11:28:16 -07:00
kaleb-himes
b3eb2e3ddd
Implement peer review feedback
...
Fix items that were missed from peer review
Remove dead code
Add ret capture of return from XVSNPRINTF
2021-03-22 11:55:16 -06:00
David Garske
3accd4dd86
Merge pull request #3900 from JacobBarthelmeh/CAAM
...
account for leading 0's with r and s during ECC verify
2021-03-22 09:08:44 -07:00
JacobBarthelmeh
b7ac12edb6
account for leading 0's with r and s during ECC verify
2021-03-22 18:16:21 +07:00
Stanislav Klima
2e25c53111
Revert "Fixed CID 583215."
...
This reverts commit 26578be1a7 .
2021-03-22 09:50:20 +01:00
Stanislav Klima
a8abeeb50e
Fixed CID 58787.
2021-03-22 09:47:52 +01:00
Sean Parkinson
24b67599c8
Merge pull request #3896 from strongX509/wolfssl-shake256
...
Full implementation of SHAKE256
2021-03-22 09:57:05 +10:00
TakayukiMatsuo
53c54ab475
Added bounds checks.
2021-03-21 12:30:45 +09:00
TakayukiMatsuo
a86a638698
Fix for PRB tests.
2021-03-21 08:19:02 +09:00
TakayukiMatsuo
6bf14dfa56
Added bounds checks, smallstack pattern.
2021-03-21 07:37:02 +09:00
TakayukiMatsuo
a1ff026670
Revert the change of wolfSSL_EVP_CHIPER_CTX_cleanup.
2021-03-21 00:14:57 +09:00
Elms
c3e6195da5
INTIME: add support for directory file search
...
Directory support allows CRL use with undefining `NO_WOLFSSL_DIR`
Also increase stack size to avoid page fault and add
`_USE_64BIT_TIME_T` to example project to pass ASN test
2021-03-20 00:53:02 -07:00
Hideki Miyazaki
526688a1a5
adressed review comments part 5-1
2021-03-20 14:57:26 +09:00
Hideki Miyazaki
fae36f108e
adressed review comments part 5
2021-03-20 12:29:42 +09:00
toddouska
14b7d70ae4
Merge pull request #3846 from kabuobeid/builtinEngsRandMethod
...
Add wolfSSL_RAND_set_rand_method() and document ENGINE_load_builtin_engines()
2021-03-19 14:23:03 -07:00
toddouska
a0a1406a43
Merge pull request #3894 from SparkiDev/eccsi_sakke_g++
...
ECCSI/SAKKE: fix for g++
2021-03-19 14:03:06 -07:00
toddouska
fc2dff0af6
Merge pull request #3895 from SparkiDev/no_dhe_psk_fix
...
TLS 1.3 PSK no DHE: When not doing PSK don't allow noPskDheKe to be set
2021-03-19 14:02:43 -07:00
Chris Conlon
19c321f165
Merge pull request #3891 from JacobBarthelmeh/PKCS7
...
adjust size when streaming with PKCS7 verify
2021-03-19 11:53:38 -06:00
David Garske
761bebc4a0
Merge pull request #3893 from SparkiDev/sp_dyn_stack
...
SP dyanmic stack: WOLFSSL_SP_NO_DYN_STACK disable use
2021-03-19 10:53:02 -07:00
Chris Conlon
f49e8669cd
Merge pull request #3892 from dgarske/stm32g0
...
Adds support for STM32G0
2021-03-19 11:31:17 -06:00
Andreas Steffen
6e383cf6cd
Full implementation of SHAKE256
...
The current SHAKE256 implementation squeezes output bytes only up
to the rate limit of 136 bytes. This has been fixed to support
the output of an unlimited amount of bytes complying with the
NIST FIPS 202 standard.
2021-03-19 11:13:54 +01:00
TakayukiMatsuo
4136dcb098
Add modifications to fix following issues:
...
- bounds checks
- sanity checks
- smallstack pattern
- coding standard
- typos
2021-03-19 14:58:56 +09:00
TakayukiMatsuo
491f3bc423
Add two public key files in certs folder and register them to gencertbuf.pl
2021-03-19 14:52:58 +09:00
TakayukiMatsuo
62304411dd
Remove wc_EccPublicKeyDecode_ex
2021-03-19 14:48:46 +09:00
TakayukiMatsuo
1c81afcc0a
Add wc_FreeDhKey in wolfSSL_d2i_PUBKEY
2021-03-19 14:23:40 +09:00
TakayukiMatsuo
364e35575c
Add following modifications to unit-test:
...
- Modify reference data in test_wolfSSL_EVP_PKEY_print_public
- Remove test_wc_EccPublicKeyDecode_ex
- Rewrite test_wc_DhPublicKeyDecode to have Assert
2021-03-19 14:17:26 +09:00
Hideki Miyazaki
300cbf7a5b
fixed NO_WOLFSSL_DIR configuration case
2021-03-19 13:13:03 +09:00
Hideki Miyazaki
ffa6a80725
addressed review comments part 4
2021-03-19 13:13:02 +09:00
Hideki Miyazaki
7b81ff1bc6
fixed api testing for hash dir
2021-03-19 13:13:01 +09:00
Hideki Miyazaki
c5327866a4
addressed review comments part 3
2021-03-19 13:13:01 +09:00
Hideki Miyazaki
84368eed3f
addressed review comment part 2 moving BY_DIR_xxx functions to internal
2021-03-19 13:13:00 +09:00
Hideki Miyazaki
4650aaf4fb
addressed review comments part 1
2021-03-19 13:13:00 +09:00
Hideki Miyazaki
f9c9de5855
free Mutex
2021-03-19 13:12:59 +09:00
Hideki Miyazaki
2d79578eda
addressed jenkins failure
...
fix missing mutex initialization
2021-03-19 13:12:59 +09:00
Hideki Miyazaki
a13784abe1
fixed jenkins failure
2021-03-19 13:12:58 +09:00
Hideki Miyazaki
cb0f082e39
simplified wc_EncodeName*
2021-03-19 13:12:57 +09:00
Hideki Miyazaki
e73b06e797
add comments and description to new function and API
2021-03-19 13:12:57 +09:00
Hideki Miyazaki
39b0c4eaf8
fixed sanitize errors
2021-03-19 13:12:56 +09:00
Hideki Miyazaki
b4a573ca98
Initial implemented X509_LOOKUP_ctrl L_ADD_DIR
2021-03-19 13:12:55 +09:00
Hideki Miyazaki
ce485d99b3
implemented L_FILE_LOAD case
2021-03-19 13:12:54 +09:00
Sean Parkinson
e7472384c2
TLS 1.3 PSK no DHE: When not doing PSK don't allow noPskDheKe to be set
2021-03-19 12:11:30 +10:00
Sean Parkinson
7cacfc53e6
ECCSI/SAKKE: fix for g++
...
Cast XMALLOC return.
2021-03-19 10:49:34 +10:00
Sean Parkinson
f6840ca907
SP dyanmic stack: WOLFSSL_SP_NO_DYN_STACK disable use
...
For small code and not small stack, arrays are being defined with a size
dependent on the input parameters, where compiler supports it.
Disable this with: WOLFSSL_SP_NO_DYN_STACK
2021-03-19 09:56:56 +10:00
Sean Parkinson
a688245738
Merge pull request #3868 from dgarske/sp_nomalloc
...
Fixes for SP RSA/DH with `WOLFSSL_SP_NO_MALLOC`
2021-03-19 09:41:30 +10:00
David Garske
14e79a165a
Merge pull request #3880 from embhorn/cov_fixes
...
Fix resource leak
2021-03-18 15:18:38 -07:00
toddouska
a363077b1e
Merge pull request #3841 from SparkiDev/aes_gcm_stream
...
AES GCM: implement streaming
2021-03-18 14:36:55 -07:00
David Garske
6bf3c08634
Fixes for SP RSA/DH with WOLFSSL_SP_NO_MALLOC. Cleanup of the SP no malloc code for ECC, RSA and DH.
2021-03-18 14:00:51 -07:00
David Garske
a27a61c937
Adds support for STM32G0.
2021-03-18 11:25:48 -07:00
Kareem Abuobeid
a85e348c0e
Change void return from RAND_seed back to int.
2021-03-18 11:20:56 -07:00
Kareem Abuobeid
5aa23424a4
wolfSSL_RAND_set_rand_method: Cleanup
2021-03-18 10:27:31 -07:00
Jacob Barthelmeh
de50209cdf
adjust size when streaming with PKCS7 verify
2021-03-18 22:52:36 +07:00
David Garske
e7ad9b423f
Merge pull request #3881 from embhorn/zd11906
...
Fix der struct mem leak in AddTrustedPeer
2021-03-18 07:40:27 -07:00
David Garske
89a461595f
Merge pull request #3890 from douzzer/fix-linuxkm-tls13-typo
...
src/tls13.c: fix typo introduced in commit 697d34c80d .
2021-03-18 07:36:58 -07:00
Jacob Barthelmeh
360c961b48
fix for unused variable in dh.c from Jenkins test
2021-03-18 20:34:38 +07:00
Jacob Barthelmeh
a64bb8aef7
fix unused variable in test case from Jenkins test
2021-03-18 15:17:08 +07:00
Daniel Pouzzner
717c0089c0
src/tls13.c: fix typo introduced in commit 697d34c80d.
2021-03-18 00:04:53 -05:00
Kareem Abuobeid
832c99597c
wolfSSL_RAND_set_rand_method: Code review feedback
2021-03-17 17:02:20 -07:00
David Garske
7760dcb43b
Fixes and cleanups for the openssl compatibility layer RAND_ functions. For opensslextra=x509small don't include the RAND method code. Removed abandonded "ENABLED_SMALL" option in configure.ac.
2021-03-17 15:51:52 -07:00
Kareem Abuobeid
1477af9a22
Add wolfSSL_RAND_set_rand_method() and support for RAND_ callbacks.
2021-03-17 14:29:24 -07:00
toddouska
a3be049e0e
Merge pull request #3883 from SparkiDev/sp_asm_config
...
SP config: allow asm to be an SP options (--enable-sp=asm,yes)
2021-03-17 12:53:14 -07:00
Jacob Barthelmeh
12b290cbaf
remove duplicate (deadcode) for clearing mp_int's
2021-03-17 17:34:54 +07:00
Jacob Barthelmeh
6ef905c9e3
use err goto for error out
2021-03-17 17:06:03 +07:00
Jacob Barthelmeh
2732ba2bba
check return value is not negative
2021-03-17 16:50:53 +07:00
Jacob Barthelmeh
1ca3604212
add check on init mutex return value
2021-03-17 16:42:16 +07:00
Jacob Barthelmeh
da56c33f48
add debug message on BIO write return value when printing out error nodes
2021-03-17 16:33:37 +07:00
Jacob Barthelmeh
d439694eb6
sanity check on length in wolfSSL_BN_rand
2021-03-17 13:41:27 +07:00
Jacob Barthelmeh
6995f6dedc
help out static analyizer and memset buffer created
2021-03-17 12:34:12 +07:00
Jacob Barthelmeh
48d13bbfa5
fix for leak with wolfSSL_a2i_ASN1_INTEGER
2021-03-17 12:24:18 +07:00
Sean Parkinson
2dafb3ed96
TFM read_unsigned_bin: endian may not be defined
2021-03-17 12:10:06 +10:00
Sean Parkinson
38d268dbbb
fixup
2021-03-17 11:31:03 +10:00
Sean Parkinson
7f1e63e7f5
SP config: allow asm to be an SP options (--enable-sp=asm.yes)
2021-03-17 11:24:55 +10:00
TakayukiMatsuo
3bd7127188
Wrap some long lines.
2021-03-17 06:58:51 +09:00
toddouska
cba348dbf1
Merge pull request #3853 from SparkiDev/sp_add_d
...
SP int neg add_d/sub_d: handle small values properly
2021-03-16 14:16:01 -07:00
TakayukiMatsuo
07807526c6
Change the following functions to behave the same as opeSSL:
...
- EVP_CIPHER_CTX_cleanup
- BIO_free
- EVP_PKEY_cmp
2021-03-17 05:47:45 +09:00
Eric Blankenhorn
3f8444e7ea
Fix der struct mem leak in AddTrustedPeer
2021-03-16 11:57:49 -05:00
David Garske
e668b9b5d6
Merge pull request #3876 from kabuobeid/sslSuitesNullCheck
...
Fix missing NULL check in FreeSuites(). Fixes #3873 .
2021-03-16 09:02:10 -07:00
JacobBarthelmeh
df2e0905e0
Merge pull request #3874 from dgarske/cryptocb_devctx
...
Fixes for for crypto callbacks (SHA1, HMAC and CMAC)
2021-03-16 21:26:50 +07:00
TakayukiMatsuo
9f6d1fe964
Merge branch 'master' of github.com:wolfSSL/wolfssl into os_keyprint
2021-03-16 15:55:51 +09:00
Sean Parkinson
35659be06f
AES GCM: implement streaming
...
Updated EVP layer to use streaming API when enabled.
Assembly for x64 updated to include streaming.
2021-03-16 16:39:49 +10:00
David Garske
f3900be6dc
Merge pull request #3877 from SparkiDev/sakke_eccsi_fixup
2021-03-15 20:18:09 -07:00
TakayukiMatsuo
9fd8fde714
Add fixes along the review commnents.
2021-03-16 11:55:18 +09:00
Sean Parkinson
9caf366a25
SP x86_64 asm: put back in lost fixes
...
Corner case for P-256.
ModInv P-256 AVX2 fix carry and use movslq for clang.
Get entry P-384 non-AVX2 don't assume table data is aligned.
2021-03-16 11:08:34 +10:00
Sean Parkinson
6fc0440904
SP int neg add_d/sub_d: handle small values properly
2021-03-16 10:22:48 +10:00
toddouska
5c82ef9420
Merge pull request #3858 from julek-wolfssl/x509-set-pub-key
...
wolfSSL_X509_set_pubkey fix
2021-03-15 17:19:30 -07:00
toddouska
5c4c101ac5
Merge pull request #3863 from JacobBarthelmeh/Testing
...
fix for wolfSSL_ASN1_TIME_adj set length
2021-03-15 17:17:33 -07:00
toddouska
1b8c0c73a9
Merge pull request #3851 from SparkiDev/sp_read_bin_align
...
SP int: read_unsigned_bin and BIG_ENDIAN
2021-03-15 17:12:23 -07:00
toddouska
3ac03d3d66
Merge pull request #3805 from JacobBarthelmeh/copyright
...
update copyright date to 2021
2021-03-15 16:16:50 -07:00
toddouska
5fd0950a3a
Merge pull request #3654 from SparkiDev/sakke_eccsi
...
ECCSI and SAKKE: add support
2021-03-15 16:15:59 -07:00
Kareem Abuobeid
46b3beeccd
Fix missing NULL check in FreeSuites(), with OPENSSL_ALL enabled, this was causing a segfault in when freeing a WOLFSSL object created with wolfSSL_write_dup().
2021-03-15 16:15:21 -07:00
Juliusz Sosinowicz
0fa39a04dc
Let user inspect error in wolfSSL_dtls_got_timeout
2021-03-15 19:00:11 +01:00
David Garske
2e247cc176
Merge pull request #3870 from JacobBarthelmeh/Benchmark
...
fix for using devId with benchmarking ECC
2021-03-15 10:09:23 -07:00
David Garske
d4d30a0078
Merge pull request #3875 from SparkiDev/sp_get_entry
...
SP x86_64 non-AVX2: Fix get_entry to no load table aligned
2021-03-15 10:00:27 -07:00
Sean Parkinson
0f605b2aab
SP x86_64 non-AVX2: Fix get_entry to no load table aligned
2021-03-15 18:05:10 +10:00
David Garske
e2aee302ef
Merge pull request #3867 from douzzer/autoconf-2.71-gcc-10.2-updates
2021-03-12 16:19:28 -08:00
David Garske
7a020e4bb6
Fix for FIPS and CMAC init.
2021-03-12 14:23:34 -08:00
Eric Blankenhorn
36f80d53aa
Fix resource leak
2021-03-12 14:57:45 -06:00
Daniel Pouzzner
92854a5ddc
configure.ac: advance AC_PREREQ from 2.63 (2008) to 2.69 (2012) to reflect current automated testing coverage, and to avoid intractable best-practice conflicts between 2.63 and 2.70 (2020); advance AM_INIT_AUTOMAKE from 1.11 (2009) to 1.14.1 (2013) to reflect current automated testing coverage; advance LT_PREREQ from 2.2 (2008) to 2.4.2 (2011) to reflect current automated testing coverage.
2021-03-12 13:49:29 -06:00
David Garske
697d34c80d
Fix for for crypto callback devCtx on symmetric algorithms (missing for SHA1 and CMAC). Fix for HMAC to use devId for hashing. Fixes for CMAC crypto callbacks and testing.
2021-03-12 11:49:25 -08:00
John Safranek
62ec4ef3b9
Policy Constraints Extension
...
Read the policy constraints extension from a certificate. Save the skip value but don't do anything with it at this time.
2021-03-12 10:23:23 -08:00
Juliusz Sosinowicz
c5c80b67d2
wolfSSL_X509_set_pubkey fix
...
wolfSSL_X509_set_pubkey should always regenerate the key to make sure that it does not contain the private key
2021-03-12 18:13:15 +01:00
JacobBarthelmeh
e9b39c3091
fix for using devId with benchmarking ECC
2021-03-12 21:14:20 +07:00
David Garske
fa8934c5fc
Merge pull request #3861 from haydenroche5/cmake_session_ticket
2021-03-11 21:05:31 -08:00
Jacob Barthelmeh
5369c133ad
add macro guard around test
2021-03-12 11:44:09 +07:00
Sean Parkinson
a20b7fae32
ECCSI/SAKKE: add loop count to generation functions
2021-03-12 13:57:53 +10:00
Sean Parkinson
a55e94cf6f
ECCSI and SAKKE: add support
...
Fixes for static code analysis included.
Added const to function parameters.
Zeroise some temporaries.
2021-03-12 09:31:22 +10:00
Daniel Pouzzner
771a7418ea
fixes for compat with autoconf 2.70 and gcc-10: update m4/ax_pthread.m4 and m4/ax_tls.m4 from upstream, fix declaration syntax in tests/api.c, add AC_CANONICAL_TARGET in configure.ac, and fix two spots with bad quoting syntax in configure.ac and m4/ax_linuxkm.m4. also fix myriad whitespace flubs in api.c.
2021-03-11 17:29:12 -06:00
elms
c091b968a3
Merge pull request #3864 from cconlon/0311
...
api.c fix for --enable-opensslall and --enable-debug
2021-03-11 14:54:40 -08:00
Chris Conlon
e93568816e
Merge pull request #3859 from TakayukiMatsuo/os_ecdh
...
Remove NO_WOLFSSL_STUB guard and add a comment to each API
2021-03-11 15:31:21 -07:00
elms
6241d56eec
Merge pull request #3865 from haydenroche5/fix_have_aes_ecb
...
Change WOLFSSL_AES_ECB to HAVE_AES_ECB in api.c.
2021-03-11 14:12:46 -08:00
Hayden Roche
211eefa155
Change WOLFSSL_AES_ECB to HAVE_AES_ECB in api.c.
2021-03-11 14:03:54 -06:00
Chris Conlon
e184cf5c29
fix api.c build with --enable-opensslall and --enable-debug
2021-03-11 12:56:13 -07:00
kaleb-himes
1d5d946273
Cleanup user_settings.h
2021-03-11 06:39:39 -07:00
Jacob Barthelmeh
eb8b40c64a
fix for wolfSSL_ASN1_TIME_adj set length
2021-03-11 20:34:17 +07:00
TakayukiMatsuo
b9464befb6
Merge branch 'master' of github.com:wolfSSL/wolfssl into os_keyprint
2021-03-11 16:21:09 +09:00
Jacob Barthelmeh
c729318ddd
update copyright date
2021-03-11 13:42:46 +07:00
John Safranek
fceba6eb6f
Merge pull request #3860 from julek-wolfssl/scr-hello-verify
...
SCR cookie exchange shouldn't change seq and epoch numbers
2021-03-10 16:11:03 -08:00
kaleb-himes
16d55b0b86
_WIN32_WCE port of wolfCrypt - OE12
...
Add user_settings.h for OE12
Restrict LPCWSTR typecast to be WINCE specific
2021-03-10 17:02:21 -07:00
toddouska
72eebd6e75
Merge pull request #3795 from JacobBarthelmeh/CAAM
...
Addition of QNX CAAM driver
2021-03-10 15:04:21 -08:00
toddouska
44c5ca9d39
Merge pull request #3825 from julek-wolfssl/openssl-key-wrap
...
Implement `AES_wrap_key` and `AES_unwrap_key`
2021-03-10 15:01:51 -08:00
toddouska
b081243af3
Merge pull request #3850 from SparkiDev/sp_x64_asm_fixes
...
SP ECC: Fix P-256 modinv for AVX2
2021-03-10 14:57:17 -08:00
toddouska
385ef17099
Merge pull request #3852 from SparkiDev/mp_is_bit_set
...
MP int: fix word range check in mp_is_bit_set()
2021-03-10 14:54:58 -08:00
David Garske
2b92abdd35
Merge pull request #3857 from embhorn/zd11865
...
Fix header cir ref with WPAS
2021-03-10 14:54:50 -08:00
toddouska
0bcde126d9
Merge pull request #3791 from TakayukiMatsuo/ZD11641
...
Causes SSL_CTX_load_verify_locations and X509_LOOKUP_load_file to return zero on failure if WOLFSSL_ERR_CODE_OPENSSL is defined
2021-03-10 14:54:14 -08:00
Chris Conlon
40b5d94db8
Merge pull request #3848 from JacobBarthelmeh/Testing
...
sanity check on size before compare
2021-03-10 15:18:44 -07:00
Hayden Roche
0403990cc8
Add support for session tickets in CMake.
...
Additionally, ensure duplicate definitions don't make it into options.h.
2021-03-10 11:48:59 -06:00
Juliusz Sosinowicz
26fb658206
SCR cookie exchange shouldn't change seq and epoch numbers
2021-03-10 18:34:09 +01:00
TakayukiMatsuo
0e699ff046
Remove NO_WOLFSSL_STUB guard and add a comment to each wolfSSL_set_dynlock_xxx API.
2021-03-11 00:04:17 +09:00
JacobBarthelmeh
4ad1b52108
Merge pull request #3824 from julek-wolfssl/ssl-bio-use-chain
...
WOLFSSL_BIO_SSL BIO should use remaining chain for IO
2021-03-10 18:21:09 +07:00
JacobBarthelmeh
28ae8e3e11
add include file for getting WOLFSSL_CAAM_DEVID in test case
2021-03-10 17:27:40 +07:00
Juliusz Sosinowicz
d7838155e5
WOLFSSL_BIO_SSL BIO should use remaining chain for IO
...
This is accomplished by passing the next BIO in the chain in to the `wolfSSL_set_bio` API.
2021-03-10 10:13:42 +01:00
David Garske
ce62a24325
Merge pull request #3856 from embhorn/gh3849
...
Typo in client example
2021-03-09 15:49:30 -08:00
Eric Blankenhorn
f421f949c9
Fix header cir ref with WPAS
2021-03-09 17:09:04 -06:00
Chris Conlon
23396a94c4
Merge pull request #3822 from TakayukiMatsuo/os_ecdh
...
Add CTX_set_ecdh_auto
2021-03-09 15:15:38 -07:00
John Safranek
fd6618170d
Merge pull request #3843 from julek-wolfssl/dtls-reset-seq-num
...
Correctly move the Tx sequence number forward
2021-03-09 13:06:04 -08:00
Juliusz Sosinowicz
d4302cc71b
Correctly reset the Tx sequence number
...
All DTLS records after the ClientHello should try to start from the sequence number of the ClientHello if it is available.
2021-03-09 18:30:10 +01:00
Stanislav Klima
9f9bf7345b
Fixed CID 13482
2021-03-09 15:12:31 +01:00
Stanislav Klima
dc1f11666d
Fixed CID 588443
2021-03-09 14:49:30 +01:00
Stanislav Klima
9e68d0d1a8
Fixed CID 586938
2021-03-09 12:30:39 +01:00
TakayukiMatsuo
153859f2b2
Merge remote-tracking branch 'upstream/master' into os_ecdh
...
# Conflicts:
# tests/api.c
2021-03-09 12:00:15 +09:00
Eric Blankenhorn
5e953d5968
Typo in client example
2021-03-08 17:31:12 -06:00
Sean Parkinson
ff3325fcaf
SP ECC: Fix P-256 modinv for AVX2
...
modinv AVX2: do quick norm on result twice and convert 32-bit signed to
64-bit signed before adding
P-256 mont_add, mont_dbl, mont_tpl, mont_sub x64: handle mul/sqr result
being greater than modulus but not greater than 1<<256.
2021-03-09 08:42:07 +10:00
Hayden Roche
b271da2954
Fix for ZD 11808.
2021-03-08 12:23:32 -06:00
David Garske
c73965b471
Merge pull request #3842 from danielinux/imx-rt1060-fixes
...
Fixed regressions in sha modules when compiling with WOLFSSL_IMXRT_DCP
2021-03-08 10:21:40 -08:00
Chris Conlon
7b2aa54044
Merge pull request #3801 from TakayukiMatsuo/os_bio
...
Add wolfSSL_BIO_tell
2021-03-08 09:56:01 -07:00
Chris Conlon
ec58765498
Merge pull request #3769 from miyazakh/openssl_ext_r1
...
Compatibility layer API addition
2021-03-08 09:54:07 -07:00
Sean Parkinson
419b426a1b
MP int: fix word range check in mp_is_bit_set()
2021-03-08 15:45:04 +10:00
Sean Parkinson
98683bf71c
SP int: read_unsigned_bin and BIG_ENDIAN
...
When unaligned access of sp_int_digit pointer causes segfault, define:
WOLFSSL_SP_INT_DIGIT_ALIGN
2021-03-08 15:17:12 +10:00
TakayukiMatsuo
feeb0ceb96
Change macro name to WS_RETURN_CODE and add more comments.
2021-03-08 11:57:36 +09:00
JacobBarthelmeh
2275c97602
check ret of lock and adjust return type
2021-03-06 14:21:44 +07:00
Jacob Barthelmeh
e497a8f589
sanity check on size before compare
2021-03-06 08:58:37 +07:00
Hideki Miyazaki
3b768bcb5e
addressed review comments
2021-03-06 10:18:31 +09:00
Martin Kinčl
5efd0bf2a4
Fixed CID 587445.
2021-03-06 00:58:39 +01:00
Martin Kinčl
db275268a1
Fixed CID 581667.
2021-03-06 00:40:08 +01:00
Martin Kinčl
c2629d34b5
Fixed CID 577166, 577196.
2021-03-06 00:07:37 +01:00
Martin Kinčl
5841ee8efb
Fixed CID 576945.
2021-03-05 23:40:49 +01:00
Martin Kinčl
7d9661d75c
Fixed CID 576884.
2021-03-05 23:24:34 +01:00
Martin Kinčl
876cc9239d
Fixed CID 576574.
2021-03-05 23:16:50 +01:00
toddouska
b6130513e3
Merge pull request #3844 from SparkiDev/mp_read_radix_fail
...
MP small: read radix set result to 0 on all errors
2021-03-05 12:09:38 -08:00
toddouska
8428823881
Merge pull request #3840 from SparkiDev/mp_neg_fixes
...
MP: fixes for negative
2021-03-05 12:08:45 -08:00
David Garske
b55e428795
Merge pull request #3826 from tmael/ecc_err
...
WOLFSSL_STATIC_MEMORY no longer requires fast math
2021-03-05 11:49:01 -08:00
Radim Smat
af7b1bd25e
Fixed CID 587328.
2021-03-05 17:18:34 +01:00
Radim Smat
e76da394b7
Fixed CID 587287.
2021-03-05 15:44:00 +01:00
David Kubasek
d01d32b6ed
Fixed the fix of CID 578018
2021-03-05 14:59:18 +01:00
David Kubasek
175fe250ba
Merge branch 'fix/RA/v4.7.0-coverity' of https://github.com/DKubasekRA/wolfssl into fix/RA/v4.7.0-coverity
2021-03-05 14:44:10 +01:00
David Kubasek
97a9938f94
Fixed CID 584275
2021-03-05 14:43:52 +01:00
Radim Smat
9732f6e74b
Fixed CID 587328.
2021-03-05 14:27:47 +01:00
Radim Smat
f7fbd0fceb
Fixed CID 587287.
2021-03-05 13:35:27 +01:00
Radim Smat
8588998234
Fixed CID 586797.
2021-03-05 12:22:59 +01:00
Radim Smat
8539e8c170
Fixed CID 584000.
2021-03-05 12:10:40 +01:00
Radim Smat
0caed02db7
Fixed CID 576609.
2021-03-05 12:04:30 +01:00
David Kubasek
d2b26f66d5
Fixed CID 578018
2021-03-05 10:59:08 +01:00
David Kubasek
ad70112fd8
Fixed CID 576268
2021-03-05 10:35:14 +01:00
Radim Smat
d510c270cd
Fixed CID 212170.
2021-03-05 09:44:47 +01:00
Jacob Barthelmeh
6d0dbbe1c0
add IDE/QNX/README.md and add WOLFSSL_QNX_CAAM guard
2021-03-05 14:43:23 +07:00
Sean Parkinson
298ebd6024
MP small: read radix set result to 0 on all errors
2021-03-05 10:02:07 +10:00
Sean Parkinson
046b279ae2
MP: fixes for negative
...
sp_int.c:
- sp_addmod_ct(), sp_submod_ct(), sp_gcd() and sp_lcm() only support
positive numbers: updated comments.
- sp_mod(0, neg): fix to not add 0 and neg.
- sp_div(): set sign on rem when a is greater than d but same bit length
and fix sign setting on result when absolute values equal or
close.
- Modular exponentation functions: compare absolute values when
determining whether base needs to be reduced.
- Fix calculation of hex string when negative: add -ve nibble before
checking for need of extra 0.
- Fix size allocation in sp_mod when WOLFSSL_SP_INT_NEGATIVE defined
tfm.c:
- fp_mod(0, neg): fix to not add 0 and neg.
- fp_isone(): fixed to check for negative
- fp_add_d(): fix small stack version to support negative numbers
integer.c:
- mp_isone(): fixed to check for negative
2021-03-05 09:29:46 +10:00
Hideki Miyazaki
896245cae7
addressed jenkins cavp test failure
2021-03-05 08:19:25 +09:00
Hideki Miyazaki
464f82a575
addressed jenkins failure part4
2021-03-05 08:19:24 +09:00
Hideki Miyazaki
2246ea33cc
addressed sanitize failure
2021-03-05 08:19:23 +09:00
Hideki Miyazaki
302c6dfe11
addressed jenkins failure part3
2021-03-05 08:19:22 +09:00
Hideki Miyazaki
9bae05525c
addressed review comments
2021-03-05 08:19:22 +09:00
Hideki Miyazaki
5ddd2710d7
addressed jenkins failure part2
2021-03-05 08:19:21 +09:00
Hideki Miyazaki
cd26444e01
addressed jenkins failure part1
2021-03-05 08:19:21 +09:00
Hideki Miyazaki
5fb9aa3f9b
implemented SHA512_Transform and unit test
2021-03-05 08:19:20 +09:00
Hideki Miyazaki
82fb498ed5
Implemented MD5 unit tests
2021-03-05 08:19:19 +09:00
Hideki Miyazaki
525d28f38f
Implemented MD5_Transform
2021-03-05 08:19:18 +09:00
Hideki Miyazaki
502e1458f9
Implemented SHA one shot
...
Implemented SHA_Transform
2021-03-05 08:19:17 +09:00
Hideki Miyazaki
95cf3675e9
implemented SHA256_Transform
...
WIP SHA512_Transform
2021-03-05 08:19:17 +09:00
Hideki Miyazaki
cb3fa8ff9e
SHA224 implementation
2021-03-05 08:19:16 +09:00
Hideki Miyazaki
141d07e21b
addressed pre-review comments
2021-03-05 08:19:16 +09:00
Hideki Miyazaki
e39477c531
initial implement SSL_get_early_data_status
2021-03-05 08:19:15 +09:00
Hideki Miyazaki
44a20c8ce6
add more unit test case for load_crl_file
2021-03-05 08:19:14 +09:00
Hideki Miyazaki
544ed32893
implemented X509_load_crl_file
2021-03-05 08:19:14 +09:00
Hideki Miyazaki
2e223fb101
implemeted wolfSSL_CTX_get0/set1_param, and corresponding to sub-methods
2021-03-05 08:19:13 +09:00
JacobBarthelmeh
f15450f63e
Merge pull request #3839 from cconlon/pkcs7free
...
fix PKCS7 dynamic content save/restore in PKCS7_VerifySignedData
2021-03-05 05:53:38 +07:00
Tesfa Mael
19fa75c6a8
static memory no longer requires fast math
2021-03-04 14:40:14 -08:00
Tesfa Mael
16f39b4e77
Fix _sp_add_d err
2021-03-04 14:40:14 -08:00
Sean Parkinson
25228cb6c0
Merge pull request #3798 from dgarske/no_hash
...
wolfcrypt: Fixes for building without hash or rng
2021-03-05 08:16:34 +10:00
David Garske
7983734dcb
Merge pull request #3786 from tmael/cc310_ecc_importkey
...
Add Cryptocell wc_ecc_import_x963_ex
2021-03-04 13:59:54 -08:00
toddouska
53a7397418
Merge pull request #3828 from elms/test/fix_openssl_ticket_noaes
...
test: fix compile with session-ticket without AES-GCM
2021-03-04 11:15:20 -08:00
toddouska
bd57e3e4cf
Merge pull request #3818 from dgarske/zd11760
...
Fix for InTime RTOS v5 random
2021-03-04 11:14:34 -08:00
toddouska
b8235649ea
Merge pull request #3812 from haydenroche5/get-certs-refactor
...
Improve wolfSSL_CertManagerGetCerts.
2021-03-04 11:14:05 -08:00
toddouska
0a74fbf95f
Merge pull request #3789 from fabiankeil/configure-accept-amd64
...
configure: When enabling --enable-sp-asm, accept host_cpu amd64
2021-03-04 11:11:13 -08:00
toddouska
12d5c6d416
Merge pull request #3783 from haydenroche5/socat
...
Add support for OpenSSL compatibility function SSL_CTX_get_min_proto_…
2021-03-04 11:10:17 -08:00
toddouska
90d45028cc
Merge pull request #3781 from fabiankeil/NO_WOLFSSL_STUB-build-fix
...
Fix build with NO_WOLFSSL_STUB
2021-03-04 11:07:26 -08:00
toddouska
447b8c9318
Merge pull request #3831 from SparkiDev/sp_int_not_inf
...
SP int: define errors for backward compatability
2021-03-04 11:06:15 -08:00
Martin Kinčl
ea243e0906
Merge branch 'fix/RA/v4.7.0-coverity' of https://github.com/DKubasekRA/wolfssl into fix/RA/v4.7.0-coverity
2021-03-04 18:26:20 +01:00
Radim Smat
027f05e349
Fixed CID 583215.
2021-03-04 13:40:45 +01:00
Radim Smat
f056601d26
Fixed CID 587549.
2021-03-04 11:16:40 +01:00
Radim Smat
dbaf545694
Fixed CID 587348 and CID 587349.
2021-03-04 11:08:25 +01:00
Radim Smat
86b5434dcc
Fixed CID 587342.
2021-03-04 10:45:49 +01:00
TakayukiMatsuo
da75a4f803
Add comment to each added function and fix return value of wolfSSL_EVP_DecodedFinal
2021-03-04 18:39:47 +09:00
TakayukiMatsuo
5043f0229a
Add comment to each added functions
2021-03-04 17:41:18 +09:00
Daniele Lacamera
7610e4989c
iMX-RT1060 support: Fixed missing definition of wc_Sha256Free
2021-03-04 08:34:15 +01:00
Daniele Lacamera
791a5b4244
iMXRT1060 support: Fixed duplicate definition of wc_InitSha & wc_ShaCopy
2021-03-04 08:33:20 +01:00
TakayukiMatsuo
871933e3e8
Add s comment to wolfSSL_BIO_tell
2021-03-04 15:41:03 +09:00
TakayukiMatsuo
b141c2f4f2
Add comment for each added function
2021-03-04 15:02:53 +09:00
Martin Kinčl
d5cd9c4a7f
Fixed CID 591810.
2021-03-04 01:02:11 +01:00
Chris Conlon
2be80acdd3
fix PKCS7 dynamic content save/restore in PKCS7_VerifySignedData for multiPart bundles with certs
2021-03-03 16:19:58 -07:00
Sean Parkinson
8c3b5c3402
Merge pull request #3838 from guidovranken/zd11824
...
Return error code from sp_cond_swap_ct
2021-03-04 08:30:19 +10:00
Martin Kinčl
b383d93274
Fixed CID 582952.
2021-03-03 21:32:34 +01:00
Martin Kinčl
3770d4c581
Fixed CID 577295.
2021-03-03 21:20:33 +01:00
Martin Kinčl
c634c6c850
Fixed CID 577188.
2021-03-03 21:09:24 +01:00
Martin Kinčl
d3314f142a
Fixed CID 576946.
2021-03-03 21:04:51 +01:00
Martin Kinčl
f2b832415e
Fixed CID 576799.
2021-03-03 20:57:40 +01:00
Martin Kinčl
9ea66868d8
Fixed CID 536133.
2021-03-03 20:37:29 +01:00
Martin Kinčl
05156083ec
Fixed CID 529770.
2021-03-03 20:29:21 +01:00
Martin Kinčl
c27c78f9e4
Fixed CID 529748.
2021-03-03 20:12:59 +01:00
Guido Vranken
6725a4f5d2
Return error code from sp_cond_swap_ct
...
ZD 11824
2021-03-03 20:03:10 +01:00
Martin Kinčl
d941cb4456
Fixed CID 587279.
2021-03-03 19:48:54 +01:00
Martin Kinčl
806313ff1a
Fixed CID 576473.
2021-03-03 19:43:19 +01:00
Martin Kinčl
af42e2a799
Fixed CID 576329.
2021-03-03 19:21:51 +01:00
Martin Kinčl
b47678513a
Merge branch 'fix/RA/v4.7.0-coverity' of https://github.com/DKubasekRA/wolfssl into fix/RA/v4.7.0-coverity
2021-03-03 18:49:06 +01:00
Martin Kinčl
1aa718a438
Fixed CID 143658, 463100, 529732.
2021-03-03 18:49:00 +01:00
Radim Smat
061120dda6
Fixed CID 587340.
2021-03-03 17:18:24 +01:00
Radim Smat
18163c9a2a
Fixed CID 587269.
2021-03-03 16:38:28 +01:00
Radim Smat
d5c3d9ca4f
Fixed CID 587064.
2021-03-03 16:03:32 +01:00
Radim Smat
27c5714f11
Fixed CID 586826.
2021-03-03 15:58:55 +01:00
Radim Smat
0bdb2bf40c
Fixed CID 583972.
2021-03-03 15:55:02 +01:00
Radim Smat
26578be1a7
Fixed CID 583215.
2021-03-03 15:51:22 +01:00
Radim Smat
ef34e613e8
Fixed CID 582947.
2021-03-03 15:46:37 +01:00
Radim Smat
38cfe71732
Fixed CID 576552.
2021-03-03 15:41:28 +01:00
Jacob Barthelmeh
b801a6e809
silence warning of unused parameter in certain builds
2021-03-03 18:45:40 +07:00
Jacob Barthelmeh
9db0257e2e
changes after initial review
2021-03-03 18:45:40 +07:00
Jacob Barthelmeh
26a6643383
fix typo on black keymod size and set devid default with TLS
2021-03-03 18:45:40 +07:00
Jacob Barthelmeh
73349d9a83
add missing header file
2021-03-03 18:45:40 +07:00
Jacob Barthelmeh
ffbd565285
fix for cryptocb with private key check
2021-03-03 18:45:40 +07:00
Jacob Barthelmeh
79ec07f5e1
adjustment after rebase
2021-03-03 18:45:40 +07:00
Jacob Barthelmeh
69a0b643be
removing some magic numbers
2021-03-03 18:45:40 +07:00
Jacob Barthelmeh
4409be2a4e
some misra c changes
2021-03-03 18:45:40 +07:00
Jacob Barthelmeh
99f19b19d4
fix for valgrind ecc verify issue
2021-03-03 18:45:40 +07:00
Jacob Barthelmeh
3757e83c64
use hardset mmap device memory for flags
2021-03-03 18:45:40 +07:00
Jacob Barthelmeh
49aeafaa8d
adjust dist files and fix warning
2021-03-03 18:45:40 +07:00
Jacob Barthelmeh
749425e1e8
first pre alpha code for QNX + CAAM
...
manual run of RNG init and JDKEK print
job ring does initial rng
is successful on some red key blob operations
caam red key blob test pass
ecdsa sign/verify
ecdsa ecdh/sign/verify with black secure key
ecdsa ecdh/sign/verify with black secure key
initial cmac addition
initial cmac addition
black blob encap
black keys with cmac
add invalidate memory
refactoring and clean up
more code cleanup
add files for dist and remove some printf's
remove unneeded macro guard
use resource manager
2021-03-03 18:45:40 +07:00
David Kubasek
5dbc6db295
Fixed CID 576149
2021-03-03 10:25:54 +01:00
TakayukiMatsuo
bbf1284112
Replace immediate value "0" with WOLFSSL_FAILURE and add comment to the RETURN_CODE macro
2021-03-03 11:23:11 +09:00
Sean Parkinson
7b78c61ed3
Merge pull request #3833 from dgarske/ecc_keydp
...
ECC: Improve the key ecc_set NULL checking
2021-03-03 09:47:32 +10:00
David Garske
3752347f14
Improve the random logic for the INTIME RTOS RNG.
2021-03-02 15:04:01 -08:00
David Garske
4d8068a328
Merge pull request #3813 from douzzer/configure-autotools-boilerplate-at-the-top
...
configure.ac: put autotools boilerplate at the top
2021-03-02 09:22:09 -08:00
elms
7e8aa99471
Merge pull request #3820 from haydenroche5/cmake-options-cleanup
...
Clean up CMake option strings.
2021-03-02 08:55:12 -08:00
Elms
4ff886dbda
test: fix compile with session-ticket without AES-GCM
...
EVP compat layer doesn't support poly chacha so test shouldn't be
included to try and test it.
2021-03-02 08:40:19 -08:00
David Garske
9fe7be5ac4
Improve the key ecc_set NULL checking for possible use of key->dp == NULL cases. This is cases where the key has not been properly iniailized or loaded prior to calling from a public API.
2021-03-01 17:17:40 -08:00
David Garske
9d4d36f7fe
Fix hasty copy/paste with privSz2.
2021-03-01 16:02:51 -08:00
Sean Parkinson
84d5d37f61
SP int: define errors for backward compatability
2021-03-02 08:34:23 +10:00
David Garske
14faf16955
Dismiss unused warnings for dh_test.
2021-03-01 10:14:28 -08:00
David Garske
8c1a93d9e1
Using "rand()" to seed our PRNG as its available on all INTIME RTOS versions.
2021-03-01 09:23:19 -08:00
Juliusz Sosinowicz
39a28eeec2
Add RSA_NO_PADDING to wolfSSL_RSA_private_encrypt
2021-03-01 13:21:26 +01:00
TakayukiMatsuo
42e87fa542
Add DH key initialization
2021-03-01 01:13:25 +09:00
TakayukiMatsuo
a34c5b018f
Move the local variable declaration to the beginning of the function
2021-03-01 00:49:50 +09:00
TakayukiMatsuo
e72948b018
Fix for PR tests
2021-02-28 10:27:43 +09:00
Hayden Roche
265b456cac
Improve wolfSSL_CertManagerGetCerts.
...
- Use wolfSSL_d2i_X509. wolfSSL_CertManagerGetCerts duplicated a lot of work
that wolfSSL_d2i_X509 can do for us.
- This function gets the caLock from the CertManager and then calls ParseCert.
Ultimately, ParseCert calls GetCA, which attempts to acquire the same caLock.
Deadlock ensues. The solution is to get the caLock, make a copy of all the
certs, and release the lock. Then, we use the copy of the certs to build up
the stack of X509 objects. What happens if one of the certs is removed from
the CertManager between our copying and calling wolfSSL_d2i_X509? Nothing of
consequence for this use case. ParseCertRelative won't set the DecodedCert's ca
field, but we don't need that to be set here.
2021-02-26 10:45:27 -06:00
Hayden Roche
cd9f400cf3
Clean up CMake option strings.
...
This commit makes all the binary CMake options (i.e. yes/no) conform to one
string convention: "yes/no." Previously, we had a mixture of yes/no and ON/OFF.
2021-02-26 10:30:46 -06:00
TakayukiMatsuo
78e2e37fd6
Remove unneccessary local variable initializations and remove local variable declarations in for-loops
2021-02-26 17:17:32 +09:00
TakayukiMatsuo
e9719595fa
Removed commented-out line
2021-02-26 12:49:32 +09:00
TakayukiMatsuo
a54e3aadea
Fix for PR tests
2021-02-26 12:42:42 +09:00
TakayukiMatsuo
ec471af9c5
Add following stub funcs:
...
- wolfSSL_THREADID_current
- wolfSSL_THREADID_hash
- wolfSSL_CTX_set_ecdh_auto
2021-02-26 11:26:10 +09:00
toddouska
4c1a94a6ad
Merge pull request #3768 from SparkiDev/mp_add_d_too_big
...
MP small: mp_add_d doesn't support adding a digit greater than MP_DIG…
2021-02-25 16:56:23 -08:00
toddouska
e18eacfcd2
Merge pull request #3779 from embhorn/zd11711
...
Squelch interfering def of SHA_CTX
2021-02-25 16:05:24 -08:00
toddouska
2d13a43e71
Merge pull request #3819 from elms/fix/nightly_g++
...
ssl: fix g++ compile warning with explicit cast
2021-02-25 16:04:05 -08:00
toddouska
5682d61e75
Merge pull request #3817 from SparkiDev/i2d_x509_name_mv
...
ASN: move wolfSSL_i2d_X509_NAME to ssl.c
2021-02-25 16:03:30 -08:00
toddouska
7d002a7645
Merge pull request #3816 from SparkiDev/win_curve448
...
Windows Project: Include the X448 and Ed448 files
2021-02-25 16:00:53 -08:00
toddouska
dbc4c51a4e
Merge pull request #3815 from SparkiDev/sp_math_keygen
...
SP int: get keygen working with SP math again
2021-02-25 16:00:27 -08:00
toddouska
8d37da24dc
Merge pull request #3814 from SparkiDev/gcd_lcm_zero
...
Math: GCD(0,0) is undefined and LCM(0,*) is undefined.
2021-02-25 16:00:04 -08:00
Hayden Roche
10181b7bbf
Add support for OpenSSL compatibility function SSL_CTX_get_min_proto_version.
...
This is needed by socat-1.7.4.1.
2021-02-25 17:04:41 -06:00
David Garske
bc585e85b6
Dismiss unused warnings for rsa_test.
2021-02-25 11:23:21 -08:00
Juliusz Sosinowicz
2eb253330f
Implement AES_wrap_key and AES_unwrap_key
...
Add `wc_AesKeyWrap_ex` and `wc_AesKeyUnWrap_ex` API to accept an `Aes` object to use for the AES operations
2021-02-25 20:01:51 +01:00
Elms
afbe3607d7
ssl: fix g++ compile warning with explicit cast
...
cast OpenSSL callback to `void*` for storage as context to be used by
static callback
2021-02-25 11:01:16 -08:00
David Garske
acff0e8781
Fix for InTime RTOS v5. The arc4random_buf wasn't added until v6, so opting to use arc4random. ZD 11760.
2021-02-25 08:54:30 -08:00
David Garske
442f182c67
Merge pull request #3778 from haydenroche5/cmake_curve_ed
...
Add CMake support for CURVE25519, ED25519, CURVE448, and ED448.
2021-02-25 08:01:26 -08:00
Sean Parkinson
d271092aef
ASN: move wolfSSL_i2d_X509_NAME to ssl.c
...
Move WOLFSSL_X509_NAME APIs out of asn.[ch].
2021-02-25 11:45:12 +10:00
Sean Parkinson
7bc12bb536
Windows Project: Include the X448 and Ed448 files
2021-02-25 11:10:46 +10:00
Sean Parkinson
d805a5c681
SP int: get keygen working with SP math again
...
./configure --enable-sp --enable-sp-math --enable-keygen
2021-02-25 10:01:27 +10:00
Sean Parkinson
982ba6c1e0
Math: GCD(0,0) is undefined and LCM(0,*) is undefined.
...
All integers divide 0 so there is no greatest common divisor.
0 is not in the set of numbers for LCM.
2021-02-25 09:29:21 +10:00
David Garske
5cc8979309
Review feedback for unused `pubSz2.
2021-02-24 15:09:51 -08:00
David Garske
3a3c0be43f
Fixes for build warnings for CryptoCell with ECC and RSA.
2021-02-24 15:05:27 -08:00
Daniel Pouzzner
9be1e74dc3
configure.ac: move the autotools boilerplate/initializations back to the top, before --enable-distro and --enable-reproducible-build handling.
2021-02-24 17:04:33 -06:00
Elms
101b35e766
cmake: mirror configure logic for SHA3, SHAKE256, SHA224
2021-02-24 14:25:30 -08:00
David Garske
49a0f70c24
Fix errors from last commit.
2021-02-24 14:19:13 -08:00
Hayden Roche
074090049b
Add CMake support for CURVE25519, ED25519, CURVE448, and ED448.
2021-02-24 13:57:34 -08:00
Eric Blankenhorn
8988f1d5a2
Squelch interfering def of SHA_CTX
2021-02-24 15:46:02 -06:00
David Garske
9ebdc8d61c
Additional fixes for building without RNG. Fix for possible use of key->dp == NULL in wc_ecc_export_ex.
2021-02-24 13:21:54 -08:00
Daniel Pouzzner
c201b6801c
Merge pull request #3808 from lechner/enable-base64-with-all
...
Enable Base64 as part of --enable-all.
2021-02-24 14:39:20 -06:00
Daniel Pouzzner
764207a9f5
Merge pull request #3806 from elms/autoconf/oot_fips_check
...
configure: fix for FIPS out-of-tree builds
2021-02-24 14:38:26 -06:00
toddouska
94a23c1d48
Merge pull request #3646 from julek-wolfssl/nginx-1.19.6
...
Add support for Nginx 1.19.6
2021-02-24 12:21:51 -08:00
toddouska
d8a053ac35
Merge pull request #3809 from embhorn/zd11773
...
Warnings and error fixes
2021-02-24 12:14:08 -08:00
David Garske
bf63b41465
Fixes for building without hash. If all hash algorithms are disabled wc_HashAlg could report empty union. ZD 11585.
2021-02-24 11:04:03 -08:00
Elms
36ba2e134b
configure: FIPS error and compatability cleanup
...
Use autotools macros for case and if. Simplify validation logic.
2021-02-24 08:53:50 -08:00
Eric Blankenhorn
1d16af4f32
Warnings and error fixes
2021-02-24 09:08:15 -06:00
Felix Lechner
ae28550667
Enable Base64 as part of --enable-all.
...
Part of an effort to standardize build options across distributions.
When building with all options, this includes Base64, a feature that
was requested in the past.
This commit passed Debian's Salsa CI pipeline [1] as part of a larger
commit streamlining the build options for distributions. [2]
A related pull request by douzzer activated reproducible builds for
distributions by default. [3]
Thanks to David Garske for his generous contributions to this commit!
[1] https://salsa.debian.org/lechner/wolfssl/-/pipelines/233601
[2] https://salsa.debian.org/lechner/wolfssl/-/blob/debian/master/debian/patches/standardize-distro-options.patch
[3] e30b3d3554
2021-02-23 19:46:56 -08:00
David Garske
ac38e53fec
Merge pull request #3804 from tmael/aws-sdk
...
Use Unix line endings
2021-02-23 18:33:07 -08:00
David Garske
e30b3d3554
Merge pull request #3807 from douzzer/distro-reproducible-build
...
--enable-distro implies --enable-reproducible-build
2021-02-23 18:32:04 -08:00
Daniel Pouzzner
9dadd02fb9
configure.ac move --enable-distro handling to top (preceding --enable-reproducible-build handling), and turn on reproducible-build by default when enable-distro; fix spelling error in reproducible-build help text.
2021-02-23 17:05:44 -06:00
Sean Parkinson
3cdbc242b4
Merge pull request #3803 from dgarske/zd11759
...
Fix misplaced endif and brace
2021-02-24 09:04:38 +10:00
Elms
47872224d8
configure: fix for FIPS out-of-tree builds
...
Check for fips files relative to source directory.
2021-02-23 14:17:35 -08:00
David Garske
7a71ec4692
Merge pull request #3802 from tmael/pkcs8err
...
Fix PKCS8 build config
2021-02-23 13:42:17 -08:00
Tesfa Mael
9bfbc999d9
Move variable declarations to the top
2021-02-23 13:21:50 -08:00
TakayukiMatsuo
2d0207fc60
Fix undeclared identifier errors
2021-02-24 05:38:28 +09:00
JacobBarthelmeh
0dfdf92ff7
Merge pull request #3784 from elms/cmake_curve_ed
...
configure: ED448 to enable SHA3 and SHAKE256 properly
2021-02-24 03:20:38 +07:00
toddouska
5eba89c3ca
Merge pull request #3742 from julek-wolfssl/error-queue-per-thread
...
Add --enable-error-queue-per-thread
2021-02-23 12:02:16 -08:00
toddouska
ef916df1b1
Merge pull request #3761 from JacobBarthelmeh/Release
...
update changelog and bump version to 4.7.1 for development bundles
2021-02-23 12:00:59 -08:00
toddouska
60614ff8b1
Merge pull request #3772 from SparkiDev/sp_ecdsa_set_k
...
SP ECDSA sign: fix multiple loops work of generating k
2021-02-23 12:00:21 -08:00
toddouska
a1db869491
Merge pull request #3775 from haydenroche5/openldap
...
Add a define to openssl/ssl.h needed for openldap port.
2021-02-23 11:58:37 -08:00
toddouska
363185669a
Merge pull request #3776 from cconlon/pkcs7testfix
...
fix wolfCrypt PKCS#7 test when PKCS7_OUTPUT_TEST_BUNDLES is defined
2021-02-23 11:58:00 -08:00
toddouska
e471cba8df
Merge pull request #3780 from SparkiDev/tls13_key_up_resp
...
TLS 1.3: add API to tell if a KeyUpdate response is required
2021-02-23 11:57:10 -08:00
Tesfa Mael
d3c8720b56
Use Unix line endings
2021-02-23 11:54:02 -08:00
toddouska
244accece1
Merge pull request #3799 from SparkiDev/sp_gcd_protect
...
SP int: fix guard around sp_gcm and sp_lcm
2021-02-23 11:53:25 -08:00
David Garske
6cc137dce0
Fix misplaced endif and brace.
2021-02-23 10:22:59 -08:00
TakayukiMatsuo
760ea219a8
Fix for "unused variable" warning
2021-02-24 02:33:46 +09:00
Tesfa Mael
b199c2e444
Fix PKCS8 test
2021-02-23 09:33:14 -08:00
TakayukiMatsuo
c0a9f86de3
Move some variable declarations to the beginning of the block
2021-02-24 01:33:51 +09:00
TakayukiMatsuo
362d2a2d68
Moved int pos declaration at the top the func
2021-02-24 01:07:45 +09:00
Juliusz Sosinowicz
d074e7443f
Remove default ticket cb as this will be added in another PR
2021-02-23 10:06:11 +01:00
Sean Parkinson
22349e0539
Merge pull request #3800 from dgarske/zd11759
...
Fixes for warnings in Windows and failing `wc_BufferKeyEncrypt` test
2021-02-23 17:07:14 +10:00
TakayukiMatsuo
9e4dcfb66c
Add wolfSSL_BIO_tell
2021-02-23 11:12:12 +09:00
David Garske
b5239f97c4
Fixes for warnings in Windows. Fix for failing wc_BufferKeyEncrypt with PBKDF disabled. ZD 11759.
2021-02-22 16:51:17 -08:00
David Garske
3ac40be091
Merge pull request #3797 from tmael/builderr
...
Correct a build error with a non-standard configurations
2021-02-22 16:33:01 -08:00
Sean Parkinson
d2f9f4c4ce
SP int: fix guard around sp_gcm and sp_lcm
2021-02-23 10:21:32 +10:00
Sean Parkinson
fc6394b923
Merge pull request #3796 from elms/fix_valgrind_fpecc
...
tests: fix preprocessor test for gcd/lcm
2021-02-23 09:42:35 +10:00
TakayukiMatsuo
a7cca8a99b
Fix wolfSSL_EVP_PKEY_print_public
2021-02-23 07:57:45 +09:00
John Safranek
e9cdcf5bac
Merge pull request #3764 from embhorn/zd11668
...
Fix typo
2021-02-22 14:12:12 -08:00
Tesfa Mael
243c3ceacc
Fix build err
2021-02-22 13:36:21 -08:00
Elms
c4d2e7cfdb
configure: split SHA3 and SHAKE256 to work with ED448
...
Define flags and defaults early, but set CFLAGS later to allow
override.
2021-02-22 10:14:21 -08:00
Elms
451b8ede51
tests: fix preprocessor test for gcd/lcm
...
Fixes `--enable-valgrind --enable-fpecc --enable-ecc` build
2021-02-22 09:53:55 -08:00
TakayukiMatsuo
b495e12179
Fix such as "for loop initial declaration"
2021-02-23 02:29:37 +09:00
TakayukiMatsuo
e25284c690
Add wolfSSL_EVP_PKEY_print_public
2021-02-22 23:51:27 +09:00
TakayukiMatsuo
49d1b859d4
Add wolfSSL_EVP_Encode/Decode APIs
2021-02-22 17:51:44 +09:00
TakayukiMatsuo
4264a49246
Causes SSL_CTX_load_verify_locations and X509_LOOKUP_load_file to return zero on failure if WOLFSSL_ERR_CODE_OPENSSL is defined
2021-02-22 08:05:11 +09:00
Sean Parkinson
41c4a25b25
Merge pull request #3785 from embhorn/zd11752
...
Fix ret val for wolfSSL_BIO_set_ssl
2021-02-22 08:34:47 +10:00
Fabian Keil
1b319804ad
configure: When enabling --enable-sp-asm, accept host_cpu amd64 as alternative to x86_64
...
Allows to use --enable-sp-asm on ElectroBSD amd64.
Previouly configure failed with:
configure: error: ASM not available for CPU. Supported CPUs: x86_64, aarch64, arm
2021-02-20 14:25:05 +01:00
Tesfa Mael
c7b1dc8f94
Fix Cryptocell ECC tests
2021-02-19 16:39:45 -08:00
Eric Blankenhorn
ebb2c7ae71
Fix ret val for wolfSSL_BIO_set_ssl
2021-02-19 16:35:01 -06:00
David Garske
078d78a884
Merge pull request #3782 from JacobBarthelmeh/Async
2021-02-19 14:24:09 -08:00
Elms
31d3dfdd4d
configure: ED448 to enable SHA3 and SHAKE256 properly
...
SHA3 and SHAKE256 are required for ED448, but were potentially
overwritten after being set when ED448, specifically others than
x86_64/aarch64
2021-02-19 13:18:52 -08:00
Jacob Barthelmeh
3079ca4d6a
add comment that use is blocking and adjust indentation
2021-02-20 02:54:10 +07:00
JacobBarthelmeh
8d7c61cf10
prep for Async release
2021-02-19 11:51:23 -07:00
Fabian Keil
2002ae9dca
tests/api.c: Fix build with NO_WOLFSSL_STUB defined
2021-02-19 05:45:19 +01:00
Fabian Keil
400a1d6927
Compile wolfSSL_ASN1_TIME_set_string() independently of NO_WOLFSSL_STUB
2021-02-19 05:45:09 +01:00
Sean Parkinson
8fabb9e9bb
Merge pull request #3767 from dgarske/rsapubonly
...
Fixes for building with RSA verify or public only
2021-02-19 10:36:00 +10:00
Sean Parkinson
fa7b5f55ee
TLS 1.3: add API to tell if a KeyUpdate response is required
2021-02-19 10:21:08 +10:00
David Garske
31c76dcc1a
Merge pull request #3777 from elms/cmake/configure_test_paths
...
cmake: configure `test_paths.h`
2021-02-18 15:02:19 -08:00
Elms
70ddaf8f2e
cmake: configure test_paths.h
2021-02-18 12:17:55 -08:00
Chris Conlon
4da0328e1a
fix wolfCrypt PKCS#7 test when PKCS7_OUTPUT_TEST_BUNDLES is defined
2021-02-18 12:14:48 -07:00
David Garske
10be54054e
Minor fixes for build errors and bad macro names.
2021-02-18 10:55:47 -08:00
David Garske
c62b48f7d0
Fixes for building with RSA public or verify only. Fixes issue with reserved "div" keyword as variable name. ZD11585
2021-02-18 07:47:00 -08:00
Hayden Roche
2290d1b4c8
Add a define to openssl/ssl.h needed for openldap port.
2021-02-18 09:17:47 -06:00
Sean Parkinson
3bf9b49274
SP ECDSA sign: fix multiple loops work of generating k
...
Support only one loop of generated k.
2021-02-18 09:06:50 +10:00
Sean Parkinson
ad58478d29
Merge pull request #3765 from embhorn/zd11703
...
Validate name size
2021-02-18 08:42:26 +10:00
Sean Parkinson
276e090a1f
Merge pull request #3763 from embhorn/zd11726
...
Adding wolfSSL_CTX_get_TicketEncCtx
2021-02-18 08:35:03 +10:00
Sean Parkinson
5dc6de3063
Merge pull request #3771 from JacobBarthelmeh/Testing
...
fix build for apache without tls 1.3
2021-02-18 08:19:29 +10:00
Eric Blankenhorn
caa39f78ae
Fix from review and leak in wolfSSL_X509_get_serialNumber
2021-02-17 13:53:30 -06:00
Eric Blankenhorn
d31f184c49
Adding tests
2021-02-17 13:34:38 -06:00
Eric Blankenhorn
608083f559
Add more checks for name->sz
2021-02-17 12:19:42 -06:00
Jacob Barthelmeh
4def38dd7e
fix build for apache without tls 1.3
2021-02-17 18:23:03 +07:00
Sean Parkinson
7ce3860e19
MP small: mp_add_d doesn't support adding a digit greater than MP_DIGIT_MAX
2021-02-17 09:24:22 +10:00
Sean Parkinson
80e75c3db8
Merge pull request #3766 from guidovranken/zd11733
...
Better error propagation in _fp_exptmod_ct
2021-02-17 08:45:43 +10:00
David Garske
cc37227f18
Merge pull request #3762 from guidovranken/zd11732
...
Fix memory leak in fp_gcd
2021-02-16 13:04:10 -08:00
Eric Blankenhorn
806b5d7d23
Validate name size
2021-02-16 14:58:58 -06:00
Guido Vranken
b47809e718
Better error propagation in _fp_exptmod_ct
2021-02-16 19:54:59 +01:00
Jacob Barthelmeh
3a9d533d2c
update changelog with researchers names, thanks Aina and Olivier
2021-02-17 00:04:16 +07:00
Jacob Barthelmeh
5f3ee2985c
bump version for development bundles
2021-02-16 23:57:47 +07:00
Guido Vranken
7bd3cccd87
Fix memory leak in fp_gcd
...
ZD 11732
2021-02-16 17:47:00 +01:00
Juliusz Sosinowicz
b8f841599c
Add --enable-error-queue-per-thread
2021-02-16 16:08:13 +01:00
Juliusz Sosinowicz
89fd0b375b
Correctly read anon cipher run-time options
2021-02-16 14:27:19 +01:00
Juliusz Sosinowicz
9265c3f71f
Use native API for ticket callback
2021-02-16 14:25:45 +01:00
Juliusz Sosinowicz
0ae1a8b8c5
Jenkins fixes
...
- Change pushCAx509Chain to an iterative implementation
- Fix variable names shadowing global names
2021-02-16 14:25:45 +01:00
Juliusz Sosinowicz
e80158a96e
Set full chain with known CA's in wolfSSL_set_peer_cert_chain
2021-02-16 14:25:45 +01:00
Juliusz Sosinowicz
b90862fa3f
Free OcspEntry.status only when the struct owns the pointer
2021-02-16 14:25:45 +01:00
Juliusz Sosinowicz
26df833074
Compat layer session tickets
...
- OpenSSL uses an internal mechanism by default for session tickets. This is now implemented for OPENSSL_EXTRA in wolfSSL.
- Add testing of wolfSSL_CTX_set_tlsext_ticket_key_cb
2021-02-16 14:25:45 +01:00
Juliusz Sosinowicz
9a1e54cfd5
Nginx 1.19.6 Fixes
2021-02-16 14:25:45 +01:00
Juliusz Sosinowicz
b63f43a2af
Nginx 1.19.6
...
- Implement X509_pubkey_digest
- Initialize entire WOLFSSL_X509_NAME struct to zero
- Set raw and rawLen when copying WOLFSSL_X509_NAME
2021-02-16 14:25:45 +01:00
Jacob Barthelmeh
8f88ac7442
add note about s/mime addition to changelog
2021-02-16 08:35:21 +07:00
Eric Blankenhorn
b7b07e1945
Adding wolfSSL_CTX_get_TicketEncCtx
2021-02-15 11:28:46 -06:00
Eric Blankenhorn
2c2bdca200
Fix typo
2021-02-11 12:27:43 -06:00