David Garske
0ea0b887a5
Merge pull request #5749 from JacobBarthelmeh/release
...
update version to 5.5.2
2022-10-28 09:22:50 -07:00
JacobBarthelmeh
8fd5a4061c
Merge pull request #5748 from SparkiDev/arm32_asm_lr_fixup
...
ARM32 ASM: fix asm saving and restoring of registers
2022-10-28 07:37:02 -06:00
JacobBarthelmeh
eb52083afd
update version to 5.5.2
2022-10-28 06:25:33 -07:00
Sean Parkinson
7bd8ced7af
ARM32 ASM: fix asm saving and restoring of registers
...
Fix push and pop generated at beginning and end of function.
2022-10-28 09:51:32 +10:00
JacobBarthelmeh
319901a85c
Merge pull request #5743 from SparkiDev/tls_perf_fix_forcezero
...
TLS performance fix: ForceZero minimization
2022-10-27 13:43:17 -06:00
JacobBarthelmeh
7366a9edbd
Merge pull request #5744 from SparkiDev/regression_fixes_4
...
Regresssion testing fixes
2022-10-27 11:49:52 -06:00
Sean Parkinson
fd7544ca19
Regresssion testing fixes
...
Ed25519 and Ed448 need to enable certs.
If no system CA certs can't be parsed,
wolfSSL_CTX_load_system_CA_certs() will fail. Don't try test if RSA and
ECC are not enabled.
Fix benchmark.c so that e is defined when WOLFSSL_BENCHMARK_ALL defined.
MAX_LENGTH_SZ is 4 and supports lengths up to 2^24 - one byte for length
and 3 bytes of length.
(new gcc compiler fix)
2022-10-27 17:47:48 +10:00
Sean Parkinson
b1e37377a1
TLS performance fix: ForceZero minimization
...
Don't ForceZero the output buffer before free.
ForceZero it when encryption fails.
ShrinkInputBuffer needs to zeroize input buffer even if not currently
encrypting as it may be using the buffer on wolfSSL object reuse.
Fix SP to zeroize the whole buffer.
Fix DH to check cBuf when WOLFSSL_CHECK_MEM_ZERO defined.
2022-10-27 17:00:42 +10:00
JacobBarthelmeh
1c09a67f6a
Merge pull request #5735 from SparkiDev/aes_gcm_c_dec_auth
...
AES GCM decrypt C: don't decrypt when auth tag invalid
2022-10-26 22:41:25 -06:00
Hayden Roche
294a26ba0c
Merge pull request #5708 from JacobBarthelmeh/OCSP
2022-10-26 15:43:15 -07:00
JacobBarthelmeh
8f2d35bb84
Merge pull request #5741 from douzzer/20221026-fixes-QUIC-and-ALPN
...
20221026-fixes-QUIC-and-ALPN
2022-10-26 15:03:28 -06:00
Hayden Roche
b477804462
Merge pull request #5725 from julek-wolfssl/rpm-pkg
2022-10-26 13:33:16 -07:00
JacobBarthelmeh
d08c204466
remove extra memset
2022-10-26 12:54:17 -07:00
Daniel Pouzzner
1608037c6b
Merge pull request #5740 from JacobBarthelmeh/release
...
minor warning fixes
2022-10-26 14:09:01 -05:00
Eric Blankenhorn
4d36d494b2
Merge pull request #5738 from SKlimaRA/SKlimaRA/fix-backslash-random-c
...
removed backslash
2022-10-26 12:42:49 -05:00
JacobBarthelmeh
33617588fc
fix setting dynamic flag with ocsp and asn template
2022-10-26 10:31:50 -07:00
Jacob Barthelmeh
8d6ee0b26a
minor warning fixes
2022-10-26 10:48:51 -06:00
Daniel Pouzzner
dfa603e502
fixes for warnings and defects around QUIC and ALPN -- fixes for clang-diagnostic-gnu-zero-variadic-macro-arguments, clang-analyzer-deadcode.DeadStores, clang-analyzer-core.UndefinedBinaryOperatorResult, clang-analyzer-security.insecureAPI.strcpy, and an overrun prevention assert in wolfSSL_ALPN_GetPeerProtocol().
2022-10-26 11:32:06 -05:00
JacobBarthelmeh
a26b89f66b
fix leak with multiple entries
2022-10-26 09:29:06 -07:00
Stanislav Klima
6fa43a3d84
removed backslash
2022-10-26 15:03:31 +02:00
Sean Parkinson
2d19f00dd5
Merge pull request #5736 from douzzer/20221025-fixes-wolfsentry-and-armv7a
...
20221025-fixes-wolfsentry-and-armv7a
2022-10-26 12:38:01 +10:00
Sean Parkinson
8d8371ac5a
Merge pull request #5717 from icing/sni-alpn-order
...
Changing ALPN selection to a deterministic point in the handshake.
2022-10-26 09:47:23 +10:00
JacobBarthelmeh
0f9279ce52
Merge pull request #5684 from SparkiDev/ssl_sess_version_check
...
SSL session retrieval: check protocol version
2022-10-25 17:29:54 -06:00
Sean Parkinson
55ab33a4a4
AES GCM decrypt C: don't decrypt when auth tag invalid
2022-10-26 09:25:28 +10:00
Daniel Pouzzner
baa19c1092
tests/api.c: fix 3 clang-analyzer-deadcode.DeadStores.
2022-10-25 18:17:22 -05:00
JacobBarthelmeh
29a5c04c2e
add test case
2022-10-25 15:35:37 -07:00
JacobBarthelmeh
7381846edb
fix case of copying over status to existing struct
2022-10-25 15:33:17 -07:00
Daniel Pouzzner
2575047ea2
wolfcrypt/src/port/arm/armv8-aes.c: define FIPS_NO_WRAPPERS, rather than undefine HAVE_FIPS, to fix FIPS builds.
2022-10-25 17:24:34 -05:00
Daniel Pouzzner
e464d374c0
fix whitespace.
2022-10-25 17:24:34 -05:00
Daniel Pouzzner
263123e7b4
wolfssl/test.h: add unsigned attribute to type of buffer passed to wolfsentry_config_json_feed() (sync with wolfsentry e22878b666).
2022-10-25 17:24:34 -05:00
Daniel Pouzzner
084fabc733
Merge pull request #5731 from SparkiDev/armv7a_aes_fixup
...
AES-CBC decrypt ARMv8 no hw crypto: fixes
2022-10-25 17:23:45 -05:00
Hayden Roche
5c3b3e6ede
Merge pull request #5733 from ejohnstown/assert-whitespace
2022-10-25 13:45:54 -07:00
John Safranek
e803e5916c
Assert Consistency
...
1. Make whitespace in asserts consistent.
2. Added typecasting of the string inputs for AssertStr.
2022-10-25 11:42:51 -07:00
Hayden Roche
e7a121325b
Merge pull request #5720 from julek-wolfssl/nid-defines
2022-10-25 10:34:59 -07:00
David Garske
d052feeff2
Merge pull request #5675 from embhorn/zd14968
...
Fix coverity issues
2022-10-25 10:08:40 -07:00
Hayden Roche
2b72a50688
Merge pull request #5662 from Uriah-wolfSSL/haproxy-update-2.6.0
2022-10-25 07:47:54 -07:00
Juliusz Sosinowicz
2ae815e2ee
Use WOLFSSL_ERROR_MSG for error logs
2022-10-25 13:13:44 +02:00
Juliusz Sosinowicz
55091c6464
Add small test
2022-10-25 13:13:14 +02:00
David Garske
370b9f4d40
Merge pull request #5729 from JacobBarthelmeh/Benchmark
...
fix for define guards in benchmark app
2022-10-24 19:54:35 -07:00
Sean Parkinson
e9a7c36c7b
AES-CBC decrypt ARMv8 no hw crypto: fixes
...
Handle in and out buffer being the same.
2022-10-25 11:32:47 +10:00
Sean Parkinson
9d1ed9c5d1
Merge pull request #5728 from douzzer/20221024-armv7a-enable-all
...
20221024-armv7a-enable-all
2022-10-25 11:28:31 +10:00
Jacob Barthelmeh
65d7d43497
use a check for if defined rather than value of macro
2022-10-24 16:32:19 -06:00
Daniel Pouzzner
3677253b55
fixes and comments for buildability, warnings, and clarity, re WOLFSSL_ARMASM_NO_HW_CRYPTO, in configure.ac, wolfcrypt/src/port/arm/armv8-aes.c, and wolfcrypt/test/test.c.
2022-10-24 17:31:48 -05:00
Jacob Barthelmeh
eb4c3e06eb
revert NO_MAIN_DRIVER behavior in benchmark app
2022-10-24 16:27:23 -06:00
Uriah Pollock
19e30b081f
Resolved sanitizer issue.
2022-10-24 16:27:18 -05:00
Hayden Roche
010fb64f74
Merge pull request #5718 from kareem-wolfssl/fpMaxBits
2022-10-24 12:27:59 -07:00
Stefan Eissing
879f788bb9
Setting ssl->alpn_peer_requested_length to 0 when freeing ssl->alpn_peer_requested.
2022-10-24 10:27:16 +02:00
Stefan Eissing
a1203917c5
Update after review by haydenroche5.
2022-10-24 10:17:29 +02:00
David Garske
53bc10eb76
Merge pull request #5723 from Anthony-Tatowicz/ECC384-benchmark
...
Add SECP384 and SECP521 to bench
2022-10-22 11:03:26 -07:00
David Garske
3aec9a15ce
Merge pull request #5726 from ejohnstown/nucleus-thread
...
Nucleus Thread Types
2022-10-21 20:22:39 -07:00
Anthony Tatowicz
1f82e90dbf
Add SECP384 and SECP521 to bench
2022-10-21 18:50:59 -05:00
Hayden Roche
4859a00c2a
Merge pull request #5698 from SparkiDev/aes_arm32_no_hw
2022-10-21 12:34:22 -07:00
Hayden Roche
a60a15d544
Merge pull request #5721 from philljj/zd15011
2022-10-21 12:32:03 -07:00
John Safranek
7c8dafab2f
Nucleus Thread Types
...
Add a type block for Nucleus RTOS's thread types.
2022-10-21 11:40:59 -07:00
Uriah Pollock
6aff27c5c8
Resolved valgrind issue. Updated ASN1_TIME usage per feedback.
...
Refactored wolfSSL_d2i_OCSP_CERTID per feedback.
2022-10-21 13:16:32 -05:00
jordan
e409acc0f7
cite RFC 5280 in DIST_POINT_NAME comment
2022-10-21 12:38:04 -05:00
David Garske
378d475c5f
Merge pull request #5724 from Anthony-Tatowicz/doc-fixes
...
Doc Example Typo Fix
2022-10-21 09:27:01 -07:00
Juliusz Sosinowicz
3ddc766b38
rpmbuild: update with fixes
...
- Pass in the build configuration to the output rpm package
- Compiler test fails in %configure step in %prep due to missing linker script (injected by rpmbuild). Moving to %build section.
- .la files not wanted in rpm package and delete .la file after install step
- Compiler test fails due to missing linker script (injected by rpmbuild)
https://fedoraproject.org/wiki/Changes/RemoveLaFiles#Upgrade.2Fcompatibility_impact
- Conditional include sp_int.h
- FIPS header and hash update
2022-10-21 14:22:08 +02:00
Anthony Tatowicz
92c7faafb7
Doc typo fix
2022-10-20 17:17:24 -05:00
Hayden Roche
1bde7b3d47
Merge pull request #5665 from SparkiDev/sp_msvc_x64_asm_fix
2022-10-20 15:09:29 -07:00
Hayden Roche
fdffdd241f
Merge pull request #5711 from philljj/add_SSL_set1_host
2022-10-20 15:02:24 -07:00
jordan
bfe8b9b76c
correct DIST_POINT_NAME type value
2022-10-20 15:10:36 -05:00
Hayden Roche
3591ce773c
Merge pull request #5719 from ejohnstown/dh-test-key2
2022-10-20 10:29:26 -07:00
Juliusz Sosinowicz
3339443260
Change NID_* from enum to #define
2022-10-20 17:07:32 +02:00
Stefan Eissing
02d37f08fc
Do not direclty return but goto exit label for cleanup of allocated resources in case ALPN selection or SNI callback fails.
2022-10-20 12:33:08 +02:00
Stefan Eissing
057fdd30d3
Properly check the defined() combinations that make ALPN and SNI available for testing.
2022-10-20 09:21:36 +02:00
John Safranek
31222618b9
DH Test Keys
...
1. Add a flag to the DH test to indicate that the second key is initted.
2. Add a flag to the DH test to indicate that the RNG is initted.
Fixes an issue where the DH wolfCrypt test can crash or lock up when
the DH parameters file is missing. Localized to the test only.
2022-10-19 16:15:53 -07:00
Kareem
5892655ab0
Don't override user-set FP_MAX_BITS when building FIPSv2.
2022-10-19 11:51:07 -07:00
Hayden Roche
86605c92ce
Merge pull request #5714 from ejohnstown/inline-guard
2022-10-19 08:33:07 -07:00
Stefan Eissing
f1cf96846a
Changing ALPN selection to a deterministic point in the handshake.
2022-10-19 15:25:52 +02:00
jordan
90eefc2824
fix unit test when RSA disabled
2022-10-18 21:03:41 -05:00
Kaleb Himes
930604f195
Merge pull request #5712 from haydenroche5/user_settings_asm
...
Make some improvements to user_settings_asm.h.
2022-10-18 17:10:39 -06:00
JacobBarthelmeh
7399f72fb3
Merge pull request #5715 from douzzer/20221018-linux6v1-and-WOLFSSL_CALLBACKS-fixes
...
20221018-linux6v1-and-WOLFSSL_CALLBACKS-fixes
2022-10-18 15:30:05 -06:00
Hayden Roche
44eb6e447e
Merge pull request #5713 from kaleb-himes/fix-fipsv2-win10
2022-10-18 13:02:59 -07:00
Daniel Pouzzner
895a2e1ac5
WOLFSSL_CALLBACKS codepaths: fixes for bugprone-unused-return-value, bugprone-macro-parentheses, readability-named-parameter, and clang-analyzer-deadcode.DeadStores
2022-10-18 13:34:42 -05:00
Daniel Pouzzner
c8c107a09e
linuxkm/: fixes to deal with kernel 6.1+ show_free_areas() mess.
2022-10-18 13:34:24 -05:00
John Safranek
353a8a0275
Inline Function Guard
...
Fixed an inline function aes.c that was included, but never used. Added
similar preprocessor guard around it as when it is used.
2022-10-18 10:51:51 -07:00
kaleb-himes
c25e9d9994
FIPSv2 builds on win10 adjust for new fastmath default in settings.h
2022-10-18 10:50:01 -06:00
Hayden Roche
e3ced9f9ae
Make some improvements to user_settings_asm.h.
...
For the CMake and autotools flows, enabling user_settings.h will define the
macro WOLFSSL_USER_SETTINGS_ASM. This will cause the generated
user_settings_asm.h to be included in the .S assembly files. If the user is
building without autotools or CMake, these files will include user_settings.h
directly, unless WOLFSSL_USER_SETTINGS_ASM is defined.
2022-10-18 09:20:06 -07:00
JacobBarthelmeh
af518f8c86
adjust saving new OCSP cert
2022-10-18 08:33:13 -07:00
Hayden Roche
b7c4ddba72
Merge pull request #5663 from lealem47/scan_build
2022-10-18 08:10:33 -07:00
Hayden Roche
c5df62e647
Merge pull request #5705 from icing/earlydata-client
2022-10-18 07:26:46 -07:00
Stefan Eissing
9726d1f6eb
Allowing use of SSL/CTX_set_max_early_data() for client side.
...
- updating english doc and test cases
2022-10-18 10:40:18 +02:00
Sean Parkinson
591101fd8b
AES for ARM32 without using crypto hardware instructions
...
AES-ECB, AES-CBC, AES-CTR, AES-GCM, AES-CCM
Fix ldrd and strd to use even first first register and have
second register be next after first.
2022-10-18 08:31:53 +10:00
Lealem Amedie
327b66d3ed
Miscellaneous fixes from scan-build and KDF refactor & small build fixes
2022-10-17 14:34:08 -07:00
jordan
7e35919cc0
Add SSL_set1_host
2022-10-17 16:23:38 -05:00
David Garske
a272731d45
Merge pull request #5707 from JacobBarthelmeh/Testing
...
free PKCS7 in test case
2022-10-17 11:21:48 -07:00
JacobBarthelmeh
bc1c087701
free PKCS7 in test case
2022-10-17 08:24:38 -07:00
Uriah Pollock
f48b736ec3
Changed some WOLFSSL_ASN1_TIME handling and other fixes.
2022-10-14 17:09:35 -05:00
JacobBarthelmeh
6f1db6c03a
Merge pull request #5697 from cconlon/pkcs7SignedCertSet
...
PKCS#7: Fix SignedData verification when signer cert is not first in SET
2022-10-14 16:05:40 -06:00
David Garske
2c503a5b34
Merge pull request #5682 from JacobBarthelmeh/Testing
...
additional sanity checks on debug callback
2022-10-14 09:25:14 -07:00
Hayden Roche
a1de8655da
Merge pull request #5699 from SparkiDev/sp_cortexm_iccarm
2022-10-14 09:00:50 -07:00
Hayden Roche
b54eca4cfe
Merge pull request #5700 from kaleb-himes/macOS-C++-proj-settings-rev2
2022-10-14 08:06:22 -07:00
David Garske
6685ce7a10
Merge pull request #5702 from haydenroche5/ecc_nb_shared_secret_fix
...
Fix output length bug in SP non-blocking ECC shared secret gen.
2022-10-13 18:15:54 -07:00
Hayden Roche
40f1ba7e33
Fix output length bug in SP non-blocking ECC shared secret gen.
...
This was incorrectly being set to 32 for P-384/521 due to a bug in the SP gen
script.
2022-10-13 16:18:20 -07:00
Hayden Roche
6829c956b7
Merge pull request #5701 from dgarske/20221013_fixes
2022-10-13 14:59:41 -07:00
Hayden Roche
757549dd1b
Merge pull request #5674 from rizlik/hrr_size_fix
2022-10-13 12:57:35 -07:00
Hayden Roche
843ea32dc7
Merge pull request #5694 from philljj/fix_enable-fastmath_disable-rsa_build
2022-10-13 12:49:25 -07:00
David Garske
e2566bab21
Various build fixes:
...
* Fix api.c build error with `NO_FILESYSTEM` and `WOLFSSL_CERT_EXT`.
* Fix for building tests/suites.c with static memory (missing `LARGEST_MEM_BUCKET`).
* Always expose `wc_ecc_set_rng` for compatibility.
2022-10-13 12:49:06 -07:00
Chris Conlon
1b0171fe3e
fix PKCS7 SignedData verification when signer cert is not first in SET
2022-10-13 11:03:13 -06:00
Marco Oliverio
2fa2f8e88d
fix: wrong size using DTLSv1.3 in RestartHandshakeHashWithCookie
...
HRR_MAX_HS_HEADER_SZ does not consider DTLS handshake extra fields.
2022-10-13 17:42:58 +02:00
jordan
656ad8959d
Fix enable-fastmath with disable-rsa build.
...
Consistently guard WOLFSSL_MAX_RSA_BITS with both defines.
2022-10-13 10:10:10 -05:00
kaleb-himes
e47a213ea3
Fix settings following testing
2022-10-13 08:32:29 -04:00
Sean Parkinson
47e3ffade6
SP Cortex-M: suport for ICCARM
...
Change ifdefs to use GNUC form for conditional branch for ICCARM.
2022-10-13 14:26:43 +10:00
Hayden Roche
4fa0deadda
Merge pull request #5696 from ejohnstown/wc_only
2022-10-12 17:11:06 -07:00
John Safranek
b838d65a72
wincrypt.h requires windows.h, which isn't included in internal.h when WOLFCRYPT_ONLY set
2022-10-12 15:33:23 -07:00
Uriah Pollock
dc8997d4b6
Added more APIs for HaProxy integration.
2022-10-12 15:45:09 -05:00
Uriah Pollock
478b0cd4aa
Added more APIs for HaProxy integration.
2022-10-12 15:27:31 -05:00
jordan
248952648d
Fix enable-fastmath with disable-rsa build.
...
WOLFSSL_MAX_RSA_BITS was being checked against ENCRYPT_BASE_BITS
even though RSA is disabled.
2022-10-12 15:26:05 -05:00
Uriah Pollock
3c7f01d853
Added WOLFSSL_ASN1_TIME to CRL
2022-10-12 15:10:29 -05:00
Uriah Pollock
0f0496ae8f
Added WOLFSSL_ASN1_TIME to CRL
2022-10-12 14:30:26 -05:00
Uriah Pollock
5cbb099dc9
Updated per PR comments.
2022-10-12 14:06:57 -05:00
Uriah Pollock
9117f8b51b
Added more APIs for HaProxy integration.
2022-10-12 14:06:57 -05:00
Uriah Pollock
b798c5f3a0
Added wolfSSL_X509_REVOKED_get_revocationDate()
2022-10-12 14:06:56 -05:00
Hayden Roche
72839d05f5
Merge pull request #5692 from douzzer/20221012-fix-file-modes-and-tweak-user_settings_asm.sh
2022-10-12 11:39:17 -07:00
Hayden Roche
46ecd909e9
Merge pull request #5691 from philljj/fix_lowresource_build
2022-10-12 09:35:48 -07:00
Daniel Pouzzner
67c194edf8
scripts/user_settings_asm.sh: give priority to user_settings.h found via the supplied search path arguments, and fall back to current directory; use POSIX sh variable expansions for prefix trimming and variable existence testing; trim trailing slash from supplied search path arguments; direct error messages to stderr.
2022-10-12 11:20:56 -05:00
Daniel Pouzzner
e05d044cf9
fix file modes.
2022-10-12 11:16:20 -05:00
jordan
06511a0f2e
tiny fix for broken lowresource build option
2022-10-11 17:54:42 -05:00
JacobBarthelmeh
927f4c445d
additional sanity checks on debug callback
2022-10-11 13:14:59 -07:00
David Garske
4d37e8d687
Merge pull request #5680 from embhorn/gh5679
...
Fix tirtos build
2022-10-11 11:31:41 -07:00
David Garske
0a36091afd
Merge pull request #5687 from danielinux/forcezero-fastmath
...
ForceZero enabled with USE_FAST_MATH
2022-10-11 11:23:05 -07:00
Daniele Lacamera
c9336865d0
ForceZero enabled with USE_FAST_MATH
2022-10-11 17:38:58 +02:00
David Garske
3b33c962c4
Merge pull request #5660 from haydenroche5/load_system_root_certs
...
Add support for wolfSSL_CTX_load_system_CA_certs on Windows and Mac.
2022-10-11 08:38:57 -07:00
Hayden Roche
80b826b510
Merge pull request #5647 from kaleb-himes/macOS-C++-proj-settings
2022-10-11 08:00:52 -07:00
Hayden Roche
5f0d85adb5
Merge pull request #5666 from per-allansson/windows-wolfio-connect-timeout-bug
2022-10-11 07:42:46 -07:00
Sean Parkinson
43809b5f97
SSL session retrieval: check protocol version
...
When looking up the session by ID on the server, check that the protocol
version of the SSL and session match on TLS 1.3 or not.
TLS 1.3 sessions don't work with TLS 1.2 handshakes and vice-versa.
2022-10-11 11:07:05 +10:00
David Garske
b7f74962ad
Merge pull request #5683 from douzzer/20221010-fixes-missing-field-initializers-etc
...
20221010-fixes-missing-field-initializers-etc
2022-10-10 16:29:27 -07:00
David Garske
4d9aacbe87
Merge pull request #5678 from SparkiDev/curve448_32bit_fix
...
Curve448 32-bit C code: handle corner case
2022-10-10 16:28:43 -07:00
Daniel Pouzzner
af4987628f
wolfssl/test.h: fix bugprone-macro-parentheses.
2022-10-10 17:08:51 -05:00
Daniel Pouzzner
1bca5d80a1
configure.ac: fix hard tab.
2022-10-10 16:51:19 -05:00
Daniel Pouzzner
e48e406def
CMakeLists.txt: add handling for WARNING_C_FLAGS in setup for CMAKE_C_FLAGS, to allow override warning config, e.g. without -Werror.
2022-10-10 16:48:49 -05:00
Daniel Pouzzner
02863d2e81
configure.ac: when FIPS 140-3, disable AES-GCM streaming API, unless "dev".
2022-10-10 16:37:38 -05:00
Daniel Pouzzner
6456b244d3
tests/api.c: refactor struct initializer using XMEMCPY() to mollify -Werror=missing-field-initializers in C++ builds.
2022-10-10 16:18:33 -05:00
Eric Blankenhorn
ea5e814dfa
Fix tirtos build
2022-10-10 11:36:40 -05:00
Juliusz Sosinowicz
b1f97c6bc0
Merge pull request #5652 from rizlik/send_alert_on_version_mismatch
2022-10-10 11:16:11 +02:00
Sean Parkinson
46091b7c7d
Curve448 32-bit C code: handle corner case
...
For sqr and mul (28/32 bits) the sums of products can exceed maximum
64-bit signed value. Handle last sum value, that may cause overflow,
separately.
Fix formatting of overflow last line.
2022-10-10 11:33:46 +10:00
Hayden Roche
12bfa24ecc
Merge pull request #5559 from tmael/crl_bs_p
2022-10-09 09:45:49 -07:00
Hayden Roche
47ccd924c2
Merge pull request #5657 from julek-wolfssl/dtls-1.2-stateless
2022-10-09 09:31:07 -07:00
David Garske
018204f904
Merge pull request #5677 from kaleb-himes/small-stack-refactor-fix
...
Fix: test.c not printing out status of tests
2022-10-08 11:26:36 -07:00
Kaleb Himes
65c872e910
Merge pull request #5670 from dgarske/smallstack_fixes2
...
Fix for Linux kernel module and stdio.h
2022-10-08 09:08:13 -06:00
kaleb-himes
7a265dcd2f
Fix: test.c not printing out status of tests
2022-10-08 08:34:34 -06:00
Eric Blankenhorn
b4e0137d37
Fix coverity issues
2022-10-07 14:49:05 -05:00
Hayden Roche
98ac4a6f9c
Add ability to toggle system CA certs support.
2022-10-07 12:34:00 -07:00
Tesfa Mael
5704c83f78
Unused param
2022-10-07 12:24:52 -07:00
Tesfa Mael
e4da4f60d9
Implemented suggested changes
2022-10-07 11:24:09 -07:00
Tesfa Mael
a738927846
Add CRL binary search, CRL_STATIC_REVOKED_LIST
2022-10-07 11:24:09 -07:00
Hayden Roche
82fbb7920a
Merge pull request #5624 from julek-wolfssl/dtlscid-prb
2022-10-07 09:48:19 -07:00
John Safranek
b4e5ee3f6b
Merge pull request #5672 from SparkiDev/kyber_inc_fix
...
Kyber: only include source when not FIPS
2022-10-07 08:39:54 -07:00
Eric Blankenhorn
aaea77bce3
Merge pull request #5669 from JacobBarthelmeh/Docs
...
update changelog notes
2022-10-07 08:29:19 -05:00
Juliusz Sosinowicz
b45ab0ae15
Add dtlscid.test to make check testing
2022-10-07 10:44:42 +02:00
Hayden Roche
5c85c8e128
Merge pull request #5658 from philljj/fix_wolfSSL_sk_X509_new
2022-10-06 17:18:03 -07:00
Hayden Roche
82bee5d6f1
Merge pull request #5671 from SparkiDev/aes_x86_asm_fix
2022-10-06 17:14:28 -07:00
Hayden Roche
b50a786cb2
Add support for wolfSSL_CTX_load_system_CA_certs on Windows and Mac.
...
Additionally, fix CMake build to add WOLFSSL_X86_64_BUILD when building for
x86_64.
2022-10-06 17:12:21 -07:00
Sean Parkinson
be41af6527
Kyber: only include source when not FIPS
2022-10-07 08:33:05 +10:00
Sean Parkinson
34a03f6646
AES-GCM x86: fix for AESNI implementation
...
Jump to non-inplace decrypt update when pointers are different.
2022-10-07 08:16:08 +10:00
David Garske
bc78ecfa6c
Fix for linuxkm and stdio.h.
2022-10-06 14:36:09 -07:00
Hayden Roche
af7c0e9b74
Merge pull request #5668 from dgarske/smallstack_fixes
2022-10-06 14:29:41 -07:00
Jacob Barthelmeh
e720d4ab3b
update changelog notes
2022-10-06 14:31:25 -06:00
jordan
8ff6dc2a9a
clean up wolfSSL_sk_X509_new
2022-10-06 14:13:30 -05:00
David Garske
0eb4a7807b
Fixes from small stack refactor ( #5631 ). Resolves these multi-test errors:
...
```
wolfssl/wolfcrypt/mem_track.h:700:9: error: Memory leak: shim_args [memleak]
return ret;
^
wolfssl/wolfssl/wolfcrypt/types.h:1248:17: error: unknown type name ‘pthread_t’
1248 | typedef pthread_t THREAD_TYPE;
```
2022-10-06 11:32:27 -07:00
Hayden Roche
4962134ff5
Merge pull request #5667 from tim-weller-wolfssl/wolfssl-strongswan-update
2022-10-06 09:56:01 -07:00
Juliusz Sosinowicz
7f42792616
DTLS 1.2: Test stateless server connection
2022-10-06 18:53:13 +02:00
Hayden Roche
d2f672db96
Merge pull request #5661 from kaleb-himes/aes_asm_FIPS_checkouts
2022-10-06 08:52:41 -07:00
tim-weller-wolfssl
474bc6ee1a
Remove unused ASN1_GENERALIZEDTIME enum value (conflicts with strongSwan ASN enum and wolfSSL OpenSSL compatibility layer)
2022-10-06 09:23:56 -05:00
Per Allansson
68dc01e7b7
fix bug with wolfIO_TcpConnect not working with timeout
...
- non-blocking connect() on Windows returns SOCKET_ERROR + WSAEWOULDBLOCK
- the check for fd against FD_SETSIZE is wrong (and not needed) on Windows
2022-10-06 14:14:33 +02:00
Sean Parkinson
800830187b
Fixes for SP and x86_64 with MSVC
...
Add inline implementations of assembly snippets for MSVC.
Missing multiplier when index memory address.
2022-10-06 15:35:50 +10:00
Hayden Roche
18b54f2ae7
Merge pull request #5664 from kaleb-himes/SGX_FIXUP
2022-10-05 15:18:55 -07:00
jordan
2bd3814953
fix failed Visual Studio Build Test
2022-10-05 15:08:08 -05:00
kaleb-himes
6178b3e365
Fixup builds using WOLFSSL_LOG_PRINTF (SGX test exposed)
2022-10-05 13:54:22 -06:00
Marco Oliverio
ebb378096a
test: DTLSv1.2: send alert when version negotiation fails
2022-10-05 20:29:23 +02:00
Marco Oliverio
84748757b0
tests: refactor ticket-nonce-test callbacks to re-use code
2022-10-05 20:29:23 +02:00
Marco Oliverio
a7a7a25ab0
ssl: move wolfSSL_GetSide outside ATOMIC_USER guard
2022-10-05 20:29:23 +02:00
Marco Oliverio
de6187f599
tls: send protocol_version fatal alert on version mismatch
...
see rfc5246 Appendix E
2022-10-05 20:29:23 +02:00
kaleb-himes
1e2397aa5a
Implement peer review feedback and enhance PAA settings
2022-10-05 10:52:12 -06:00
kaleb-himes
a2b48aac53
Update v5 checkout for sha256_asm and sha512_asm
2022-10-05 10:00:47 -06:00
kaleb-himes
df5fd87f0b
Modify checkout of aes_asm.S (and .asm) given commit 6f4af15
2022-10-05 09:12:47 -06:00
David Garske
cb5828235b
Merge pull request #5653 from haydenroche5/load_system_root_certs
...
Add --sys-ca-certs option to example client.
2022-10-04 18:25:50 -07:00
Hayden Roche
6f4af1581b
Merge pull request #5650 from SparkiDev/aes_x86_asm
2022-10-04 16:40:02 -07:00
Sean Parkinson
c989dd9590
Merge pull request #5641 from haydenroche5/user_settings_asm
...
Generate an assembler-safe user_settings.h in configure.ac and CMakeLists.txt.
2022-10-05 07:51:56 +10:00
Hayden Roche
79d9bc376f
Merge pull request #5631 from dgarske/smallstack
2022-10-04 14:39:17 -07:00
Sean Parkinson
66ce7635b9
AES x86 ASM: new assembly
...
Added new x86 assembly for AES.
AES-CBC decrypt only 4 blocks at a time (not 6 or 8) due to reduces
register count.
GCM implementation for AVX2, AVX1 and AESNI only.
Disabled looking for other assembly files for x86.
2022-10-05 07:34:42 +10:00
jordan
984649eeac
Correct wolfSSL_sk_X509_new in OpenSSL compatible API
2022-10-04 15:20:32 -05:00
David Garske
0006d1f91c
Fix benchmark with small stack and WOLFSSL_RSA_VERIFY_ONLY.
2022-10-04 08:39:42 -07:00
Juliusz Sosinowicz
354cd2ed50
DTLS 1.2: Reset state when sending HelloVerifyRequest
2022-10-04 16:22:59 +02:00
Hayden Roche
3bcd4b45df
Generate an assembler-safe user_settings.h in configure.ac and CMakeLists.txt.
...
For user_settings.h builds, .S assembly files need to include user_settings.h
in order to get the defines used by the build. However, a user_settings.h may
contain code only understood by a C compiler and not the assembler (e.g. a
typedef). This commit makes it so our autotools and CMake builds produce a file
user_settings_asm.h when doing a user_settings.h build. This generated header
contains only the preprocessor directives from the user_settings.h. As a result,
it can be safely included by our assembly code files.
2022-10-03 16:00:32 -07:00
Hayden Roche
58d482428e
Merge pull request #5649 from philljj/zd14898
2022-10-03 14:00:45 -07:00
Hayden Roche
bfa13376fa
Merge pull request #5642 from lealem47/WIN_snifftest
2022-10-03 13:49:06 -07:00
David Garske
09f4a94b24
Fixes for small stack in TLS v1.3, HKDF and SHA2. Add new WC_ASN_HASH_SHA256 build option to allow forcing SHA2-256 for the internal certificate calculations. Fixes for integer.c with small stack (allocate only the size needed, not the max).
2022-10-03 12:52:11 -07:00
Lealem Amedie
b91e48d770
Add snifftest vcxproj file and documentation
2022-10-03 10:22:53 -07:00
David Garske
8101800cd9
Merge pull request #5656 from douzzer/20220930-wolfsentry-API-update
...
20220930-wolfsentry-API-update
2022-10-03 09:12:16 -07:00
Hayden Roche
898ddac159
Add --sys-ca-certs option to example client.
...
Using this option will call wolfSSL_CTX_load_system_CA_certs on the client ctx.
2022-10-03 09:05:23 -07:00
Daniel Pouzzner
d0540adac2
wolfssl/test.h: update wolfSentry calls for API changes in wolfSentry-0.6.0.
2022-09-30 22:28:21 -05:00
David Garske
db6ffae376
Merge pull request #5655 from lealem47/api_test_leak
...
Fix for EVP_PKEY_DH memory leak
2022-09-30 17:26:30 -07:00
Lealem Amedie
e77c3849a0
Fix for evp key leak in unit tests
2022-09-30 16:02:07 -07:00
David Garske
f9506dc05a
Add small stack to DoClientHello Suites (360 bytes). Add small stack for DRBG health test. Refactor of the small stack into its own header, to allow easier use in other files. Minor build fixes.
2022-09-30 14:06:31 -07:00
kaleb-himes
f02fe73eb4
Correct default setting
2022-09-30 14:02:07 -06:00
David Garske
6506c45918
Merge pull request #5654 from douzzer/20220930-fixes-smallstack-shellcheck-etc
...
20220930-fixes-smallstack-shellcheck-etc
2022-09-30 12:13:00 -07:00
Daniel Pouzzner
acb35029a0
wolfssl/ssl.h: remove redundant prototype for wolfSSL_CTX_set_default_verify_paths().
2022-09-30 12:06:31 -05:00
Daniel Pouzzner
548d432df3
wolfcrypt/test/test.c: fix gating, and smallstack refactors, for ecc_test_deterministic_k(), ecc384_test_deterministic_k(), and ecc521_test_deterministic_k().
2022-09-30 12:06:15 -05:00
Daniel Pouzzner
ddad526e64
wolfcrypt/benchmark/benchmark.c: fix clang-tidy complaints around ungrouped string continuation and unparenthesized macro args.
2022-09-30 12:05:57 -05:00
Daniel Pouzzner
e9520fe131
shellcheck-guided fixes in IDE/XilinxSDK/bench.sh, IDE/XilinxSDK/combine.sh, IDE/XilinxSDK/graph.sh, and scripts/bench/bench_functions.sh.
2022-09-30 12:05:40 -05:00
jordan
eccba1401f
fix valgrind leak in new unit test
2022-09-30 11:24:54 -05:00
Hayden Roche
5070994ae2
Merge pull request #5644 from tim-weller-wolfssl/crossworks-test-update
2022-09-30 08:00:01 -07:00
jordan
0f66c90b54
implement sk_X509_shift for zd 14898
2022-09-29 23:04:31 -05:00
kaleb-himes
8ae08d594e
Add user_settings.h for Intel/M1 FIPSv2 macOS C++ projects
2022-09-29 16:06:08 -06:00
David Garske
bba3193f9c
Merge pull request #5595 from haydenroche5/async_ticket_dec_fix
...
Handle WC_PENDING_E from ticketEncCb in DoClientTicket properly.
2022-09-29 14:41:35 -07:00
Hayden Roche
591d1ada94
Merge pull request #5615 from JacobBarthelmeh/RSAPSS
2022-09-29 14:39:05 -07:00
David Garske
5524500e85
Merge pull request #5166 from sjaeckel/versal-bringup
...
Versal bringup
2022-09-29 13:27:13 -07:00
David Garske
26f01168b5
Merge pull request #5645 from rizlik/fix_bad_heap_hint
...
fix: tls13: fix wrong heap hint argument of XFREE
2022-09-29 13:06:31 -07:00
David Garske
ab44c89ab4
Merge pull request #5626 from haydenroche5/load_system_root_certs
...
Add a function to load system CA certs into a WOLFSSL_CTX.
2022-09-29 11:03:26 -07:00
David Garske
a5a9ab96e6
Merge pull request #5524 from rizlik/protocol_version_alerts
...
Dtls13: improvements
2022-09-29 10:59:06 -07:00
David Garske
d0bf083050
Merge pull request #5643 from SparkiDev/gen_arm32_fixup
...
ARM32 assembly code: fixed scripts
2022-09-29 10:20:06 -07:00
Jacob Barthelmeh
e971bd7315
add FreeRTOS example to include.am
2022-09-29 09:57:23 -06:00
Marco Oliverio
32eca32c97
fix: tls13: fix wrong heap hint argument of XFREE
2022-09-29 17:56:59 +02:00
Steffen Jaeckel
0e57e9858f
Integrate Xilinx Versal
...
* add Versal specific glue
The same structure of an "XSecure client" is used throughout the API's,
therefor define it once and re-use in all clients.
* integrate Versal AES-GCM engine
* integrate Versal SHA3-384 engine
* add versal support to tests
- There's no intermediate-hash API for Versal.
* add specific test with large AAD
Test only with `n*16 byte` wide chunks of AAD, so it gets processed in the
hardware engine.
* add specific test with misaligned AES-GCM arguments
* integrate Versal RSA engine
* disable failing RSA test-case when Xilinx Crypto is enabled
* introduce define `WOLFSSL_XILINX_CRYPT_VERSAL`
* integrate Versal TRNG engine
* allow using Versal TRNG w/o wolfcrypt DRBG
Versal TRNG already provides a HRNG mode which does the same as the
wolfcrypt DRBG implementation.
* add support for user-supplied nonce to Versal TRNG
* add `wc_XsecureErrorToString()` to map PLM error codes to messages.
* integrate Versal EcDSA engine
* update tests to work with Versal EcDSA
If deterministic K is enabled, the tests failed here since the Versal
EcDSA engine doesn't support the SECP256R1 curve yet.
* Xilinx crypto engines like aligned memory very much
Make this a default choice, not via the user configuration.
* add Xilinx-specific `WOLFSSL_MSG()` equivalent
`WOLFSSL_XIL_MSG()` does the same as `WOLFSSL_MSG()` besides waiting for
1 second before printing to stdout, since the PLM maybe prints to same and
outputs would be mixed up.
This waiting can be disabled by defining `WOLFSSL_XIL_MSG_NO_SLEEP`.
* add option to enable DPA CounterMeasures in AES-GCM crypto engine
* add "command mode" to Xilinx bare-metal example
* update Xilinx default user settings
* add script to execute benchmarks
* add scripts to create graphics
* add Vitis 2022.1 example projects
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de >
2022-09-29 09:39:57 -06:00
Steffen Jaeckel
f24cf38f01
Update benchmarks
...
* add option to run benchmarks with and w/o AAD
This adds the possibility to benchmark AES-GCM and AES-CCM both with and
w/o AAD, with the option to also run both.
The default behavior when wolfSSL provides the `main()` function is
unchanged.
The default behavior when wolfSSL doesn't provide the `main()` function has
been changed to "run both benchmarks - with and w/o ADD".
* add option to run benchmarks against 4096bit RSA&DH keys
* remove `BENCH_SIZE` macro from benchmark.c
* pre-define benchmark sizes in a single place, before it had to be done in two places
* improve `benchmark_static_init()`
- static variable doesn't need to be in global scope
- add option to force re-init
- add more static variables to be reset
* add `-blocks` option to benchmarks
* expose benchmark `main()` as `wolfcrypt_benchmark_main()`
* fix benchmark `-?` output
* use correct SI/Binary prefix in benchmarks
* use a separate column per detail in CSV output of benchmark
* add `-aad_size` option to benchmark
* don't always print symmetric CSV headers
* always use M[i]B/s when output format is CSV
* Versal specific patches for benchmarks
This also removes the default define for `COUNTS_PER_SECOND` for Xilinx
targets, since I prefer to have a build failure over wrongly calculated
output.
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de >
2022-09-29 09:39:57 -06:00
Steffen Jaeckel
f4e258d196
Generic changes
...
* fix compilation warning
* adjust SHA3-384 test error-codes
The way the codes were constructed before, they were not unique.
* unify code
Instead of having `ifdef`'s in the code, define our own wrapper around
the keysource as required.
* add CMake option for help-text in wolfCrypt tests
* expose test `main()` as `wolfcrypt_test_main()`
* Don't overwrite previously set errors
* add FreeRTOS support for Xilinx demo
* move `fp_reverse` from `tfm.c` to `wolfmath.c` and rename to
`mp_reverse`.
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de >
2022-09-29 09:39:57 -06:00
tim-weller-wolfssl
14b776c9a4
Adding C library support furnction to write a buffer (always to UART)
2022-09-29 10:34:16 -05:00
Sean Parkinson
5a55ec6968
ARM32 assembly code: fixed scripts
...
Generation scripts fixed for ARM32.
Regenerated output inlcudes:
- support for ARM32 architectures less than 7
- SP code also ensures parameters are in specific registers
2022-09-29 09:04:05 +10:00
Sean Parkinson
754d274d8c
Merge pull request #5593 from rizlik/ticket_nonce_size
...
tls13: support ticketNonce with size bigger than MAX_TICKET_NONCE_SZ
2022-09-29 08:11:22 +10:00
Sean Parkinson
cec6341e23
Merge pull request #5640 from kaleb-himes/ARMv8-FIPSv2-MOD-TEST
...
Do not perform IV Wrap test when using cert3389 inlined armasm
2022-09-29 08:01:54 +10:00
Marco Oliverio
ae4228f928
tests: add WOLFSSL_TICKE_NONCE_MALLOC tests
2022-09-28 19:54:14 +02:00
Marco Oliverio
c508ff3da9
internal.h: allow customization of MAX_TICKET_NONCE_STATIC_SZ
2022-09-28 19:54:14 +02:00
Marco Oliverio
56d6087749
tls13: support ticketNonce bigger than MAX_TICKET_NONCE_SZ
...
to enable it, use WOLFSSL_TICKET_NONCE_MALLOC define
2022-09-28 19:54:14 +02:00
Marco Oliverio
aa5d074d23
dtls13: abide g++ compiler errors
...
```
src/tls13.c:5330:72: error: invalid conversion from 'void*' to 'const byte*' {aka 'const unsigned char*'} [-fpermissive]
5330 | ret = wc_HmacUpdate(&cookieHmac, ssl->buffers.dtlsCtx.peer.sa,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
| |
| void*
./wolfssl/wolfcrypt/hmac.h:191:55: note: initializing argument 2 of 'int wc_HmacUpdate(Hmac*, const byte*, word32)'
191 | WOLFSSL_API int wc_HmacUpdate(Hmac* hmac, const byte* in, word32 sz);
```
2022-09-28 18:42:39 +02:00
Juliusz Sosinowicz
d8e10d8ef4
DTLS 1.3: Always reset state on HRR
2022-09-28 18:42:39 +02:00
Juliusz Sosinowicz
c72d315325
DTLS 1.3: Don't add HRR to ssl->dtls13Rtx
...
Signed-off-by: Marco Oliverio <marco@wolfssl.com >
2022-09-28 18:42:38 +02:00
Juliusz Sosinowicz
145086f776
DTLS 1.3: Clear ssl->dtls13SendingAckOrRtx in ssl.c
2022-09-28 18:42:38 +02:00
Marco Oliverio
3c60926bfa
tests: silently dropping bad records after handshake in DTLS
2022-09-28 18:42:38 +02:00
Marco Oliverio
6e4a3ecdbd
tests: add negative version negotation tests
2022-09-28 18:42:38 +02:00
Marco Oliverio
b3ecdd2ecb
dtls13: support stateless cookie exchange on blocking socket
2022-09-28 18:42:38 +02:00
Marco Oliverio
0b525a52c4
tls13: send protocol_version alert on failed version negotiation
2022-09-28 18:42:38 +02:00
Marco Oliverio
88ec118e89
dtls13: drop unencrypted messages after epoch 1
2022-09-28 18:42:38 +02:00
Marco Oliverio
400671dc7c
dtls: drop non-handshake messages before cookie exchange
2022-09-28 18:42:38 +02:00
Hayden Roche
8cae05348c
Add a function to load system CA certs into a WOLFSSL_CTX.
...
This new function, wolfSSL_CTX_load_system_CA_certs, currently only supports
Linux-based OS's. It searches through conventional CA directories and once it
finds one, attempts to load CA certs from it. After the first directory is
found, we don't check the others.
This commit also adds a function wolfSSL_get_system_CA_dirs, which returns a
pointer to an array of directories where wolfSSL_CTX_load_system_CA_certs will
look for CA certs. This is used in a unit test, where we only want to expect
success if one of these directories actually exists on the test system.
Finally, this commit adds support for SSL_CTX_set_default_verify_paths to the
compatibility layer. It doesn't model the exact behavior of its OpenSSL
counterpart; it's mostly a wrapper around wolfSSL_CTX_load_system_CA_certs,
manipulating the return value of that function to conform to OpenSSL's
conventions.
2022-09-28 08:50:46 -07:00
David Garske
2d1f22c35a
Merge pull request #5639 from Anthony-Tatowicz/master
...
Add Irq install for Aruix example
2022-09-28 06:55:56 -04:00
kaleb-himes
d61656d5e7
Do not perform IV Wrap test when using cert3389 inlined armasm
2022-09-27 17:15:19 -06:00
Hayden Roche
f1e2165c59
Merge pull request #5638 from JacobBarthelmeh/release
2022-09-27 14:21:19 -07:00
Jacob Barthelmeh
eb5076bb89
update changelog for release 5.5.1
2022-09-27 13:40:00 -06:00
JacobBarthelmeh
ffe052e845
Merge pull request #5634 from douzzer/20220926-fixes
...
20220926-fixes
2022-09-27 11:49:20 -06:00
Anthony Tatowicz
13d53b5297
Add Irq install for Aruix example
2022-09-27 12:04:27 -05:00
JacobBarthelmeh
dde5ef558b
Merge pull request #5633 from SparkiDev/sp_mod_fix
...
SP int all: sp_mod
2022-09-27 10:23:03 -06:00
Daniel Pouzzner
cc03e3fdab
wolfcrypt/src/misc.c ByteReverseWords(): mollify MSVC re C4311.
2022-09-27 10:05:07 -05:00
Daniel Pouzzner
cfe0278d35
wolfcrypt/src/misc.c ByteReverseWords(): fix misaligned word accesses under armv7a-asm.
2022-09-27 02:02:31 -05:00
Daniel Pouzzner
1ffe4275ae
fix whitespace
2022-09-26 23:32:59 -05:00
Sean Parkinson
34fd412fd6
SP int all: sp_mod
...
sp_mod wasn't checking return of sp_init_size.
Add _sp_init_size change and change calls.
2022-09-27 10:05:13 +10:00
Sean Parkinson
8617de86c1
Merge pull request #5632 from JacobBarthelmeh/Testing
...
Misc. testing items
2022-09-27 08:25:18 +10:00
JacobBarthelmeh
1e348eb7bd
sanity check on return value
2022-09-26 10:40:41 -07:00
JacobBarthelmeh
cc4e8df56d
cast to fix warning in test case
2022-09-26 10:13:06 -07:00
John Safranek
9d9fa0132e
Merge pull request #5622 from lealem47/sniffer_sequence
...
Fix for sniffer to decode out of order packets
2022-09-26 07:53:00 -07:00
John Safranek
b4077d80c9
Merge pull request #5620 from JacobBarthelmeh/Certs
...
fix for return value of x509 print
2022-09-25 19:32:52 -07:00
Sean Parkinson
b1a69f6469
Merge pull request #5630 from dgarske/deos_cleanups
...
Support for DEOS RTEMS and minor build fixes
2022-09-26 09:06:49 +10:00
David Garske
55a0f6d97b
Support for RTEMS in the DEOS user_settings.h template and time. Fix for bio.c and OPENSSL_EXTRA which needs XATOI. Fix for SP math ECC with 384-bit and 521-bit curves enabled.
2022-09-25 10:41:05 -07:00
Daniel Pouzzner
f80fb7f1aa
Merge pull request #5625 from dgarske/esp32_cleanups
...
Fixes for various build configurations
2022-09-23 20:46:44 -05:00
David Garske
221fd275fd
Fixes for building without SHAKE.
2022-09-23 14:50:16 -07:00
David Garske
2421727b1c
Merge pull request #5441 from kareem-wolfssl/quietShutdown
...
Make wolfSSL quiet_shutdown functions available when using OPENSSL_EXTRA_X509_SMALL.
2022-09-23 14:40:29 -07:00
David Garske
606f58a851
Spelling and whitespace cleanups.
2022-09-23 13:58:58 -07:00
David Garske
b42631c721
Fix for ESP32 wolfcrypt_test entry point.
2022-09-23 13:58:49 -07:00
David Garske
792eac9484
Fixes for building the API unit test without filesystem NO_FILESYSTEM.
2022-09-23 13:58:17 -07:00
David Garske
7a69415e79
Fix for possible memory leak on failure in RSA/DH public key decode with heap based math.
2022-09-23 13:53:16 -07:00
David Garske
c29e602ea5
Fix for building with WOLFSSL_ASN_TEMPLATE and IGNORE_NAME_CONSTRAINTS.
2022-09-23 13:52:55 -07:00
David Garske
7970d5d794
Merge pull request #5152 from SparkiDev/armv7a_neon_asm
...
ARM ASM: ARMv7a with NEON instructions
2022-09-23 08:46:03 -07:00
John Safranek
62670d9263
Merge pull request #5619 from kaleb-himes/AZURE-fix2
...
Fix undesirable kyber dependencies when not building kyber (#2 )
2022-09-22 19:55:50 -07:00
Sean Parkinson
1b9656f72d
ARM ASM: add fpu directive to assembly files
2022-09-23 12:31:39 +10:00
Sean Parkinson
aa1a95e70b
Merge pull request #5621 from tmael/sp_1024_sakke
...
Wrap 1024 single precision math with WOLFCRYPT_HAVE_SAKKE
2022-09-23 08:52:05 +10:00
Lealem Amedie
a322e09150
Fix for sniffer to decode out of order packets
2022-09-22 15:12:51 -07:00
Tesfa Mael
7805ffeee0
Fix enable-sp=1024
2022-09-22 14:03:40 -07:00
John Safranek
f113e92495
Merge pull request #5612 from kareem-wolfssl/base16Ending
...
Update Base16_Encode so the ending null terminator is optional.
2022-09-22 13:24:19 -07:00
kaleb-himes
938ab16907
Also address assembly file
2022-09-22 14:15:46 -06:00
Jacob Barthelmeh
39815a53fa
fix for return value of x509 print
2022-09-22 14:09:50 -06:00
kaleb-himes
77676537f6
Fix undesirable kyber dependencies when not building kyber ( #2 )
2022-09-22 10:43:03 -06:00
David Garske
7ca9e4f084
Merge pull request #5616 from julek-wolfssl/dtls13.test-proxy-path
...
dtls13.test: Allow setting UDP_PROXY_PATH in env
2022-09-22 09:15:32 -07:00
John Safranek
13555bebcd
Merge pull request #5617 from kaleb-himes/FIX-AZURE-TEST
...
Fix undesirable kyber dependencies when not building kyber
2022-09-22 09:04:35 -07:00
John Safranek
f271bef7b5
Merge pull request #5618 from lealem47/dc
...
Fix for incorrect DN NID and confusion with DC
2022-09-21 15:00:25 -07:00
John Safranek
216d4afaad
Merge pull request #5611 from tim-weller-wolfssl/zd14815-updates
...
Updates to remove build warnings and test/example code update to avoid memory leak
2022-09-21 14:33:37 -07:00
Lealem Amedie
f177d9364a
Fix for incorrect DN NID and confusion with DC
2022-09-21 13:11:12 -07:00
tim-weller-wolfssl
62766b0758
Updates to remove warnings and build issues found with IAR tools. Update test function / example to avoid memory leak. Update to pass error codes along rather than mask them at lower levels.
...
Make logic to avoid masking return error conditionally compiled based on STSAFE configuration
Update logic at second crypto-callback location to return error code rather than mask it
2022-09-21 14:16:49 -05:00
John Safranek
913bbc8f79
Merge pull request #5613 from kareem-wolfssl/staticEccFix
...
Fix bad casts in wc_EccPublicKeyDecode when using WOLFSSL_ECC_CURVE_STATIC with custom curves.
2022-09-21 11:38:06 -07:00
Daniel Pouzzner
38d4df0c0f
Merge pull request #5610 from kareem-wolfssl/v5Fips
...
Restore v5-dev/v5-ready configure options.
2022-09-21 12:56:27 -05:00
David Garske
680182cab5
Merge pull request #5614 from rizlik/oobread
...
Fix: parsing oob read in dtls1.3
2022-09-21 10:08:32 -07:00
kaleb-himes
d672f10f7e
Fix undesirable kyber dependencies when not building kyber
2022-09-21 09:58:38 -06:00
JacobBarthelmeh
2bf583aa57
Merge pull request #5526 from miyazakh/qt_jenkins_fix
...
Fix qt nightly test failure
2022-09-21 09:38:45 -06:00
Juliusz Sosinowicz
f9b2ef47c9
dtls13.test: Allow setting UDP_PROXY_PATH in env
2022-09-21 16:49:53 +02:00
Jacob Barthelmeh
dc0b2553fc
handle certificates with RSA-PSS signature that have RSAk public keys
2022-09-21 08:24:09 -06:00
Marco Oliverio
400d3c6963
dtls13: Dtls13ParseUnifiedRecordLayer: add overflow check
2022-09-21 16:01:35 +02:00
Marco Oliverio
804081e7c2
fix: GetDtls13RecordHeader:requires correct minimum size
2022-09-21 16:01:35 +02:00
David Garske
a36604079b
Merge pull request #5609 from philljj/master
...
Fixes DTLS 1.3 client use-after-free error
2022-09-21 06:38:09 -07:00
Marco Oliverio
1a983b4a8f
session: use plain buffer to store ticket nonce in ticket
2022-09-21 14:51:07 +02:00
Sean Parkinson
2578f2c8f2
ARMv8 32 Inline ASM: fixes
...
Force parameters to use specific registers.
Shift/rotate amount must have '#' prepended.
2022-09-21 10:45:50 +10:00
Sean Parkinson
ca392fb200
ARM32 ASM Inline: fix SHA-256 inline asm to compile
2022-09-21 09:58:16 +10:00
Kareem
c6bd297bd2
Fix bad casts in wc_EccPublicKeyDecode when using WOLFSSL_ECC_CURVE_STATIC with custom curves.
2022-09-20 15:37:12 -07:00
Kareem
c146fcf581
Update Base16_Encode so the ending null terminator is optional.
2022-09-20 14:44:01 -07:00
Kareem
76afcc1da4
Restore v5-dev/v5-ready configure options as customers are currently using them.
2022-09-20 14:26:15 -07:00
David Garske
90c9363af8
Merge pull request #5538 from satoshiyamaguchi/trial5
...
Add wolfSSL_EVP_PKEY_new_CMAC_key to OpenSSL compatible API
2022-09-20 13:01:52 -07:00
jordan
427383233d
Fix formatting, add check to not support plain HTTP requests in DTLS
2022-09-20 14:41:11 -05:00
David Garske
624aca80dc
Merge pull request #5606 from julek-wolfssl/zd14813-cont
...
0 len sz is allowed
2022-09-20 09:49:17 -07:00
jordan
8336dbf366
Fixes DTLS 1.3 client use-after-free error
2022-09-20 09:17:08 -05:00
Satoshi Yamaguchi
c6ea68a118
Fix two not freed WOLFSSL_CMAC_CTX.
2022-09-20 23:10:22 +09:00
Marco Oliverio
05b6cb5279
internal: drops bad DTLS records on established connection
2022-09-20 11:18:30 +02:00
Marco Oliverio
655ac3e822
refactor: new define to remove some preprocessor directives
2022-09-20 11:18:26 +02:00
Kaleb Himes
43715d1bb5
Merge pull request #5607 from haydenroche5/140_3_version_fixes
...
Clean up some FIPS versioning logic in configure.ac and WIN10 user_settings.h.
2022-09-19 20:48:25 -06:00
Hayden Roche
d212974d5e
Clean up some FIPS versioning logic in configure.ac and WIN10 user_settings.h.
...
configure.ac: Get rid of v5-RC8, v5-RC9, v5-RC10, v5-RC11, v5-ready, and v5-dev.
v5-ready is now just ready and v5-dev just dev.
IDE/WIN10/user_settings.h: Make the FIPS blocks define HAVE_FIPS. Change WCv5.0
block to WCv5.0-RC12. Change FIPS Ready block to use HAVE_FIPS_VERSION_MINOR 3
instead of HAVE_FIPS_VERSION_MINOR 2.
2022-09-19 15:26:06 -07:00
David Garske
73dbc873bd
Merge pull request #5586 from julek-wolfssl/dtls-misc-security
...
Add missing minor security checks
2022-09-19 09:47:00 -07:00
David Garske
cf3d9df443
Merge pull request #5605 from julek-wolfssl/gitignore
...
Add async and fips test folders to gitignore
2022-09-19 09:36:06 -07:00
David Garske
0b81a584cc
Merge pull request #5604 from SparkiDev/mp_init_size_fizes_2
...
SP int: mp_init_size fixes when SP_WORD_SIZE == 8
2022-09-19 06:50:26 -07:00
Juliusz Sosinowicz
8ca4a6086e
0 len sz is allowed
...
In async mode, we always store all handshake messages before processing them. The server hello done message has a length of 0 but we still need to store it to process it.
2022-09-19 14:00:13 +02:00
Juliusz Sosinowicz
9eac8bf5a9
Add async and fips test folders to gitignore
2022-09-19 11:42:45 +02:00
Juliusz Sosinowicz
23e9cf2dc1
Test AEAD limits only without WOLFSSL_TLS13_IGNORE_AEAD_LIMITS
2022-09-19 10:30:29 +02:00
Sean Parkinson
dd32f30306
Merge pull request #5601 from douzzer/20220917-fixes
...
20220917-fixes
2022-09-19 13:50:25 +10:00
Sean Parkinson
e7dba670d6
SP int: mp_init_size fix for sp_mont_norm
...
sp_mont_norm should check wrong parameter when determining whether the
calculation values will fit.
2022-09-19 10:04:30 +10:00
Sean Parkinson
02e51953fd
SP int: mp_init_size fixes when SP_WORD_SIZE == 8
...
Setting an integer may have a value larger than one word being set.
Check size of SP int in this case.
2022-09-19 09:26:47 +10:00
Sean Parkinson
e43a7843b6
Merge pull request #5603 from kaleb-himes/scripts-update
...
Address Issue pointed out in (now deleted) comment on an old merge
2022-09-19 09:06:39 +10:00
kaleb-himes
9a193a3e02
Address Issue pointed out in (now deleted) comment on an old merge
2022-09-18 08:45:18 -06:00
Hideki Miyazaki
001592a8a3
fix qt nightly test
2022-09-18 13:56:55 +09:00
Daniel Pouzzner
ac0d7f4d84
src/internal.c:
...
in DtlsMsgNew(), iff WOLFSSL_ASYNC_CRYPT, allow sz==0 allocation, to fix infinite loop in ProcessReplyEx() around DoDtlsHandShakeMsg();
in DtlsMsgAssembleCompleteMessage() restore fix from 0603031362 for pointerOutOfBounds (undefined behavior) construct;
in ProcessReplyEx(), in WOLFSSL_DTLS13 case ack, check and propagate error from DoDtls13Ack() (fix from @guidovranken).
2022-09-17 13:02:51 -05:00
Daniel Pouzzner
0fc80f5f85
wolfcrypt/src/sp_int.c: catch and propagate errors from sp_init_size() in sp_invmod() and sp_gcd() to fix clang-analyzer-core.UndefinedBinaryOperatorResult.
2022-09-17 12:55:48 -05:00
Daniel Pouzzner
02cc7bf82e
fix whitespace/linelength/indentation.
2022-09-17 12:53:37 -05:00
Satoshi Yamaguchi
64f2a0cafe
Extend wolfSSL_EVP_PKEY_free for freing EVP_PKEY of CMAC.
...
Fix EVP_PKEY not freed in unit test (test_wolfSSL_EVP_PKEY_new_CMAC_key).
2022-09-17 14:44:45 +09:00
Chris Conlon
e6bd6a94a0
Merge pull request #5521 from TakayukiMatsuo/clientverify
2022-09-16 16:55:38 -06:00
JacobBarthelmeh
7a728c0c48
Merge pull request #5569 from SparkiDev/kyber
...
Kyber: Add option to build Kyber API
2022-09-16 14:56:02 -06:00
JacobBarthelmeh
c6f6086b15
Merge pull request #5576 from julek-wolfssl/dtls-windows
...
Fix build errors and warnings for MSVC with DTLS 1.3
2022-09-16 11:11:46 -06:00
JacobBarthelmeh
b780ad6da0
Merge pull request #5594 from julek-wolfssl/zd14813
...
Do not allow 0 size DtlsMsg
2022-09-16 10:21:54 -06:00
John Safranek
43b16f67b9
Merge pull request #5596 from SparkiDev/mac_m1_arm_sha256_fix
...
Aarch64 SHA-256 Mac M1 fix
2022-09-16 09:13:23 -07:00
David Garske
24d0112d2c
Merge pull request #5581 from SparkiDev/sp_int_size_fix
...
SP int: mp_init_size() fix
2022-09-16 08:29:06 -07:00
Hideki Miyazaki
a948c78ac7
addressed review comments. remove Qt case guard
2022-09-16 21:25:42 +09:00
Juliusz Sosinowicz
9ef10b5435
Check return of DtlsMsgCreateFragBucket()
2022-09-16 12:13:12 +02:00
Juliusz Sosinowicz
bf4be901e4
Add prototypes for w64wrapper functions
2022-09-16 11:28:29 +02:00
Sean Parkinson
4b3718543e
Aarch64 SHA-256 Mac M1 fix
...
Inline assembly is told K when finished is not important but K is
changing. Take a local copy of K and mark as a changing value.
2022-09-16 13:20:48 +10:00
Sean Parkinson
7062ed0a2c
ChaCha ARM 32-bit: get debug working
...
r7 is needed for debug.
Needed to use stack explicitly rather than let compiler use r7.
2022-09-16 11:29:30 +10:00
Sean Parkinson
e52730d008
SP int: mp_init_size() and check size fixes
...
Check size passed to mp_init_size() 1..SP_INT_DIGITS.
More checks of parameters to SP int functions to ensure result is big
enough to hold value calculated.
2022-09-16 10:13:33 +10:00
Hideki Miyazaki
a98cda3516
fix qsscertificate test failure
2022-09-16 07:48:05 +09:00
Sean Parkinson
523c16130d
Merge pull request #5579 from douzzer/20220911-fixes-re-multi-test
...
20220911-fixes-re-multi-test
2022-09-16 08:29:41 +10:00
Daniel Pouzzner
d18a654f74
wolfcrypt/src/sp_int.c: address peer review around _sp_zero(), sp_init(), and sp_init_size(), re sp_int_minimal.
2022-09-15 14:33:45 -05:00
Hayden Roche
4591e5635b
Handle WC_PENDING_E from ticketEncCb in DoClientTicket properly.
...
ticketEncCb can return WC_PENDING_E. If it does in DoClientTicket, we need to
propagate this up to the calling function (e.g. DoPreSharedKeys), rather than
treating it as a failure.
I tested this by running the following experiment
./examples/server/server -v 4 -r &
./examples/client/client -v 4 -r
and adding the following async simulation code to wc_ChaCha20Poly1305_Decrypt:
#ifdef WOLFSSL_ASYNC_CRYPT
static int testAsync = 0;
if ((testAsync++ % 2) == 0) {
return WC_PENDING_E;
}
#endif
Prior to these changes, you can see that the WC_PENDING_E will not be handled
properly in DoClientTicket (using gdb). A full TLS handshake proceeds from
there. With this commit, running the same experiment shows the pending error
being handled properly.
2022-09-15 11:35:51 -07:00
Daniel Pouzzner
5d2610c96d
wolfssl/wolfcrypt/sp_int.h and wolfcrypt/src/sp_int.c: add struct sp_int_minimal, with same structure as struct sp_int but only one digit, to allow error-free access to sp_ints allocated with ALLOC_SP_INT() with fewer than SP_INT_DIGITS digits, and use the new type in _sp_zero() and sp_init_size() to eliminate -Werror=array-bounds on _sp_zero() under gcc-13.
2022-09-15 13:16:27 -05:00
Daniel Pouzzner
23b16c09d7
linuxkm/Makefile: add support for $KBUILD_EXTRA_FLAGS.
2022-09-15 13:16:27 -05:00
David Garske
2a96d62e43
Merge pull request #5573 from embhorn/zd14802
...
Add WOLFSSL_ATECC_TFLXTLS for Atmel port
2022-09-15 08:59:40 -07:00
Juliusz Sosinowicz
4b3f6ada8a
Do not allow 0 size DtlsMsg
2022-09-15 16:18:24 +02:00
Juliusz Sosinowicz
1941fb2b35
Keep a separate drop counter for each epoch
2022-09-15 15:49:05 +02:00
Juliusz Sosinowicz
67473bac28
Code review fixes
...
- Mark old epochs as invalid so we don't attempt to decrypt with them
- Return a non-zero value if possible in unit tests
- Move Dtls13CheckAEADFailLimit to dtls13.c
- Reset state in processreply
2022-09-15 14:39:33 +02:00
Juliusz Sosinowicz
63ba2f7b8f
TLS 1.3: Check maximum records encrypted with one key set
2022-09-15 12:17:46 +02:00
Juliusz Sosinowicz
4e9106c355
Enforce maximum amount of failed decryptions in DTLS 1.3
2022-09-15 12:17:46 +02:00
TakayukiMatsuo
c7de58ebaf
Add code to fallback to S/W if TSIP cannot handle
2022-09-15 11:16:37 +09:00
Sean Parkinson
ad39e8f77d
Kyber: fix OQS memory leak
2022-09-15 09:18:47 +10:00
JacobBarthelmeh
37adf0ff06
Merge pull request #5592 from douzzer/20220914-fix-quic-test-default-build
...
20220914-fix-quic-test-default-build
2022-09-14 14:15:46 -06:00
JacobBarthelmeh
f21b021bb6
Merge pull request #5590 from SparkiDev/tlsx_symbol_fix
...
TLSX: function not used
2022-09-14 09:10:56 -06:00
JacobBarthelmeh
8b641df116
Merge pull request #5588 from SparkiDev/tls13_cs_fixes
...
TLSv1.3 cipher suites: fixes
2022-09-14 09:06:31 -06:00
Daniel Pouzzner
eef67478e9
tests/quic.c: gate QuicConversation_fail() definition to avoid -Wunused-function.
2022-09-14 09:46:07 -05:00
Juliusz Sosinowicz
17df33cef8
Fix TLS 1.3 testsuite for wolfssl64.sln solution
2022-09-14 11:39:27 +02:00
Sean Parkinson
e8d5cf9662
TLSX: function not used
2022-09-14 09:52:26 +10:00
Sean Parkinson
79d85f6c13
TLS cipher suite: improvements
...
wolfSSL_clear: check return from InitSSL_Suites() call.
TLS13: check ClientHello cipher suite length is even.
Silently remove duplicate cipher suites from user input.
Add tests of duplicate cipher suite removal.
2022-09-14 09:26:00 +10:00
JacobBarthelmeh
3cafde2519
Merge pull request #5589 from SparkiDev/sp_mac_m1_asm
...
SP; Mac M1 failure fix
2022-09-13 16:35:57 -06:00
John Safranek
fa8c158f3c
Merge pull request #5587 from tim-weller-wolfssl/dev-win-build-fips-update
...
Remove FIPS preprocessor defines from Windows build options
2022-09-13 13:47:51 -07:00
JacobBarthelmeh
12ec2272d6
Merge pull request #5585 from icing/groups-key-share
...
wolfSSL_set1_curves_list(), wolfSSL_CTX_set1_curves_list() improvements.
2022-09-13 10:36:25 -06:00
Eric Blankenhorn
1a0073b558
Add WOLFSSL_ATECC_TFLXTLS for Atmel port
2022-09-13 11:04:58 -05:00
Anthony Hu
7f2659bb9b
add test-tls13-pq-2.conf to include.am
2022-09-13 10:51:07 -04:00
Sean Parkinson
62c415fd50
Kyber: fixes
...
Don't define WOLFSSL_HAVE_KYBER unless configured.
Only compile code in ext_kyber.c when WOLFSSL_HAVE_KYBER defined.
Include config.h and settings in ext_kyber.c. This allowed
HAVE_VISIBILITY to be defined.
Cleanup kyber.h.
2022-09-13 10:07:28 -04:00
Anthony Hu
bcf4dbe697
Changes inspired by Feedback from Sean.
...
Define WOLFSSL_HAVE_KYBER when HAVE_LIBOQS is defined.
Fix some misleading debug output.
Fix benchmarking logic.
2022-09-13 10:07:28 -04:00
Anthony Hu
a2635be9e6
wolfCrypt support for external Kyber implementations (liboqs and pqm4)
2022-09-13 10:07:28 -04:00
Sean Parkinson
8c1e2c52e7
Kyber: Add option to build Kyber API
...
wolfSSL Kyber implementation not included.
Added tests and benchmarking.
2022-09-13 10:07:27 -04:00
Stefan Eissing
531f125925
Fix build without TLS13.
2022-09-13 11:18:27 +02:00
Stefan Eissing
bebb686217
Fixes for different build scenarios:
...
- fix the type cast in SMALL_STACK builds
- only use new behviour when wolfSSL_set_groups() is available
2022-09-13 11:10:59 +02:00
Juliusz Sosinowicz
112fc540bb
Fix build errors and warnings for MSVC with DTLS 1.3
2022-09-13 10:13:44 +02:00
Sean Parkinson
5e945f94b4
TLSv1.3 cipher suites: fixes
...
Handle multiple instances of the same cipher suite being in the server's
list.
Fix client order negotiation of cipher suite when doing pre-shared keys.
2022-09-13 17:25:11 +10:00
Sean Parkinson
38418b31f1
Merge pull request #5197 from JacobBarthelmeh/OCSP
...
RSA-PSS with OCSP and add simple OCSP response der verify test case
2022-09-13 15:10:00 +10:00
Sean Parkinson
99d60a0781
SP; Mac M1 failure fix
...
Give the compiler a hint that mask needs special attention.
2022-09-13 13:54:06 +10:00
JacobBarthelmeh
e867f0d312
Merge pull request #5574 from haydenroche5/ecc_nb_tls
...
Add support for non-blocking ECDHE/ECDSA in TLS/DTLS layer.
2022-09-12 16:24:00 -06:00
tim-weller-wolfssl
ba12d72e7a
Remove FIPS preprocessor defines from Windows build command-line options (values specified via user_settings.h)
2022-09-12 15:54:36 -05:00
JacobBarthelmeh
2eee35ef8f
Merge pull request #5582 from SparkiDev/small_stack_cache_fix
...
Small Stack Cache: make work again
2022-09-12 09:53:10 -06:00
JacobBarthelmeh
ba5aeb3501
Merge pull request #5583 from SparkiDev/psk_only_tls_fix
...
PSK only TLS: fix ENCRYPT_LEN
2022-09-12 09:26:28 -06:00
JacobBarthelmeh
be72549388
Merge pull request #5584 from SparkiDev/tls13_midbox_fix
...
TLS 1.3 Middle-Box compat: fix missing brace
2022-09-12 09:15:10 -06:00
Stefan Eissing
c6c4134542
wolfSSL_set1_curves_list(), wolfSSL_CTX_set1_curves_list() improvements.
...
- Use wolfSSL API wolfSSL_set_groups() and wolfSSL_CTX_set_groups()
to configure curves list
- This sets ssl->groups and ctx->groups accordingly and makes
TLSX_KEY_SHARE generation respect the selection and precedence.
- Add tests in quic to assert the order of selections.
2022-09-12 14:31:58 +02:00
Sean Parkinson
375b9c1a59
TLS 1.3 Middle-Box compat: fix missing brace
2022-09-12 13:11:49 +10:00
Sean Parkinson
005f77180b
PSK only TLS: fix ENCRYPT_LEN
...
Allow no PK algorithms and TLS to build and test.
Use PSK cipher suite with GCM if AES-CBC not available.
2022-09-12 11:21:01 +10:00
Sean Parkinson
e0a47ca6c1
Small Stack Cache: make work again
...
Fix Small Stack Cache option so that it works with various options
including ALT_ECC_SIZE.
Allow ALT_ECC_SIZE when SP math all or SP math is compiled in.
2022-09-12 10:52:34 +10:00
Sean Parkinson
2c4c7ba6da
ARM v7a ASM: 128-bit registers not supported
...
Cortex-A5 - Cortex-A9 only support 64-bit wide NEON.
Remove use of WOLFSSL_ARM_ARCH_NO_VREV.
Use WOLFSSL_ARM_ARCH_NEON_64BIT to indicate to use 64-bit NEON registers
and not 128-bit NEON registers.
2022-09-12 10:00:18 +10:00
JacobBarthelmeh
fa6bc79f8b
Merge pull request #5578 from douzzer/20220909-fixes
...
20220909-fixes
2022-09-09 16:37:35 -06:00
JacobBarthelmeh
460b6f1ecc
Merge pull request #5577 from tmael/vx_entropy
...
Improves entropy with VxWorks
2022-09-09 15:51:24 -06:00
JacobBarthelmeh
6c71777ca6
no verify on renewing ocsp response
2022-09-09 13:58:43 -07:00
Daniel Pouzzner
0603031362
fix whitespace in wolfssl/wolfcrypt/settings.h;
...
fix bugprone-macro-parentheses in wolfssl/ssl.h;
fix pointerOutOfBounds and declaration-after-statement in src/internal.c DtlsMsgAssembleCompleteMessage().
2022-09-09 15:25:06 -05:00
Tesfa Mael
82781043c4
Add entropy to VxWorks
2022-09-09 12:44:56 -07:00
JacobBarthelmeh
757a18ab7e
Merge pull request #5496 from SKlimaRA/SKlimaRA/SetCipherListBytes
...
Support for setting cipher list with bytes
2022-09-09 13:42:51 -06:00
David Garske
23ba1e7e98
Minor cleanups. Gate these API's on OPENSSL_EXTRA or WOLFSSL_SET_CIPHER_BYTES to keep code size reduced.
2022-09-09 10:49:49 -07:00
JacobBarthelmeh
6526ffc5f8
Merge pull request #5567 from haydenroche5/hmac_sha1_fix
...
Fix HMAC compat layer function for SHA-1.
2022-09-09 09:45:21 -06:00
Daniel Pouzzner
3bd91c6ab8
wolfcrypt/src/pkcs7.c: revert 57a7430b6a, which broke SCEP use case, and redo using a simple stack variable initialization approach.
2022-09-09 10:09:14 -05:00
Juliusz Sosinowicz
7418ddcae6
Refactor nofail tests into test_wolfSSL_client_server_nofail
2022-09-09 16:04:30 +02:00
Juliusz Sosinowicz
0a1332c4df
Additional checks for secure renegotiation
2022-09-09 15:33:27 +02:00
David Garske
f7c31dbf64
Merge pull request #5575 from SparkiDev/sp_int_no_64
...
SP int: default to 16 bit word size when NO_64BIT defined
2022-09-08 18:30:30 -07:00
Sean Parkinson
0db0032b31
ARM32 ASM: vrev not always available
...
Provide alternative assembly instructions to vrev when
WOLFSSL_ARM_ARCH_NO_VREV is defined.
2022-09-09 10:19:17 +10:00
Sean Parkinson
3b8f3a0897
SP int: default to 16 bit word size when NO_64BIT defined
2022-09-09 08:33:30 +10:00
Hayden Roche
14a521ca25
Make --enable-asynccrypt-sw imply --enable-asynccrypt.
...
Simplifies configuration.
2022-09-08 15:23:22 -07:00
JacobBarthelmeh
200ca9db4b
Merge pull request #5572 from tim-weller-wolfssl/zd14615-config-updates
...
Configuration consistency fixes for RSA keys and way to force disable of private keys
2022-09-08 13:19:11 -06:00
Hayden Roche
226a8b676d
Add support for non-blocking ECDHE/ECDSA in TLS/DTLS layer.
...
This requires the async code.
2022-09-08 11:34:59 -07:00
David Garske
e49efbc101
Merge pull request #5544 from haydenroche5/async_sw
...
Migrate async names from "test" to "software."
2022-09-08 10:18:26 -07:00
JacobBarthelmeh
f49d84e17a
fix typo and pipe ocsp response creation to /dev/null
2022-09-08 09:02:31 -07:00
David Garske
52653c654d
Merge pull request #5571 from julek-wolfssl/sk-cmp-param-fix
...
Set correct types in wolfSSL_sk_*_new functions
2022-09-08 08:47:20 -07:00
David Garske
7c153a49ec
Merge pull request #5570 from SparkiDev/sp_noasm
...
SP: config option to force no asm
2022-09-08 07:49:24 -07:00
David Garske
64376d4d9e
Merge pull request #5555 from julek-wolfssl/dtls-fragment-buckets
...
Don't over-allocate memory for DTLS fragments
2022-09-08 07:46:04 -07:00
Tim Weller
1b90d4fad2
Configuration consistency fixes and addition of new config option to disable private key
...
Add way to disable private keys in wolfcrypt (settings). Make RSA integer usage match structure configuration.
2022-09-08 09:36:18 -05:00
Juliusz Sosinowicz
28af88788a
Set correct types in wolfSSL_sk_*_new functions
...
- Use WOLF_SK_COMPARE_CB() to generate the correct types instead of using void* for the callback parameters.
- Remove WOLFSSL_STACK.comp entirely since it is not used anywhere. Ignore input parameters that used to set this member.
2022-09-08 11:55:32 +02:00
Sean Parkinson
81321fc10e
SP: config option to force no asm
...
Added to configure.ac the option to specify SP to be built with ASM as
x64 defaults to with asm.
2022-09-08 16:20:15 +10:00
Hayden Roche
4deae6dcc6
Remove duplicate defines for EVP_get_cipherbyname and EVP_get_digestbyname.
2022-09-07 16:32:25 -07:00
JacobBarthelmeh
9d6e157fc5
add asn template version
2022-09-07 16:15:19 -07:00
David Garske
4066568315
Merge pull request #5564 from douzzer/20220907-fixes
...
20220907-fixes
2022-09-07 16:03:37 -07:00
Sean Parkinson
5dc1732036
Fix define name
...
WOLFSSL_ARMASM_NO_CRYPTO -> WOLFSSL_ARMASM_NO_HW_CRYPTO
2022-09-08 08:39:00 +10:00
Hayden Roche
18450eb94b
Fix HMAC compat layer function for SHA-1.
...
This function would only accept the string "SHA" for SHA-1-based HMAC, but it
should also accept "SHA1." This is similar to how wolfSSL_EVP_get_digestbyname
allows both "SHA" and "SHA1." We didn't have a test for this in api.c. I added
one, and it failed before my fix here.
2022-09-07 15:25:31 -07:00
David Garske
d1ffe30f13
Merge pull request #5566 from kaleb-himes/OE40-45-support
...
Proposed changes based on customer report(s) under consideration by t…
2022-09-07 13:45:06 -07:00
David Garske
ac1a0293e2
Merge pull request #5565 from tmael/workbench_doc
...
Improve Workbench docs
2022-09-07 13:41:37 -07:00
Daniel Pouzzner
ef7377d64c
fix whitespace and line length.
2022-09-07 15:30:32 -05:00
Daniel Pouzzner
57a7430b6a
wolfcrypt/src/pkcs7.c: in wc_PKCS7_DecryptKtri(), refactor handling of OAEP keys to fix uninited value access detected by clang-analyzer-core.UndefinedBinaryOperatorResult; fix whitespace.
2022-09-07 15:14:26 -05:00
JacobBarthelmeh
28a82237d9
RSA-PSS signed OCSP responses
2022-09-07 13:12:43 -07:00
David Garske
9c88d8ac2c
Merge pull request #5547 from JacobBarthelmeh/mcux
...
Port to RT685 with FreeRTOS
2022-09-07 12:54:54 -07:00
Juliusz Sosinowicz
b2a80cbe65
Disable warning for MSVC
2022-09-07 12:05:29 -07:00
kaleb-himes
3ac985c2f1
Proposed changes based on customer report(s) under consideration by the team
2022-09-07 11:34:27 -06:00
Tesfa Mael
0f0aae72c2
Improve Workbench docs
2022-09-07 09:58:23 -07:00
Jacob Barthelmeh
22bad7b06b
fix spelling
2022-09-07 09:57:34 -06:00
David Garske
d75bb2de62
Merge pull request #5561 from SparkiDev/sp_math_openssl_fix
...
SP math: fix build configuration with opensslall
2022-09-07 07:12:13 -07:00
David Garske
bc1fca8c85
Merge pull request #5562 from SparkiDev/sp_int_521_fix
...
SP int: fix for SP_INT_DIGITS calc
2022-09-07 07:12:01 -07:00
Juliusz Sosinowicz
1d2cd7af0f
Expose API for src/api.c
2022-09-07 13:04:33 +02:00
Juliusz Sosinowicz
28895ed0cd
Use a union and struct for padding in DtlsFragBucket
...
Zero length arrays are not allowed so `byte padding[0]` is not a valid member. Changed to use a union and struct instead.
2022-09-07 13:04:26 +02:00
Juliusz Sosinowicz
8bf3e0829e
Don't over-allocate memory for DTLS fragments
...
Don't reserve the full message length of memory. Instead we only allocate memory for the fragments that we have already received. We also dynamically combine memory fragments when we receive overlap.
2022-09-07 13:04:06 +02:00
Sean Parkinson
1fe9f2d894
SP int: fix for SP_INT_DIGITS calc
...
Implementation of sp_mont_red needs words * 2 + 1.
2022-09-07 17:22:22 +10:00
Sean Parkinson
05634e286d
SP math: fix build configuration with opensslall
...
./configure '--disable-shared' '--enable-keygen' '--enable-certgen'
'--enable-certreq' '--enable-certext' '--enable-ocsp' '--enable-crl'
'--enable-pwdbased' '--enable-opensslall' '--enable-pkcs7'
'--enable-pkcs12' '--enable-sp' '--enable-sp-math' '--disable-rsa'
'--disable-dh' '--enable-ecc'
2022-09-07 15:42:33 +10:00
David Garske
12680a967a
Merge pull request #5560 from douzzer/20220906-fixes
...
20220906-fixes
2022-09-06 17:56:33 -07:00
Sean Parkinson
7d67ffac69
Fixup assembly to compile with ARMv7a
2022-09-07 09:30:06 +10:00
Sean Parkinson
805b0eb606
ARM ASM: ARMv7a with NEON instructions
...
Change to build assembly code for ARMv7a with NEON instruction set.
./configure -host=armv7a --enable-armasm
Added ARM32 SHA-256 NEON only implementation.
2022-09-07 09:29:56 +10:00
David Garske
602116c3f2
Merge pull request #5558 from embhorn/zd14776
...
Fix warning in DecodeAltNames
2022-09-06 16:00:02 -07:00
Chris Conlon
761fde31ad
Merge pull request #5478 from miyazakh/rsaesoaep
2022-09-06 15:45:40 -06:00
Daniel Pouzzner
bf29d6b2c7
wolfcrypt/test/test.c: refactor shake256_absorb_test() and shake256_test() to use a single buffer for "large_input", malloc()ed when WOLFSSL_SMALL_STACK, to stay within stack limits of all-max-func-stack-2k; move a couple declarations in openssl_test() to resolve declaration-after-statement.
2022-09-06 13:28:57 -05:00
Daniel Pouzzner
14082ceeb9
CMakeLists.txt: add SHAKE128 coverage.
2022-09-06 13:28:45 -05:00
David Garske
d72b401e8e
Merge pull request #5545 from icing/evp_chacha
...
Add ChaCha20 as available cipher in the EVP API.
2022-09-06 10:42:54 -07:00
Eric Blankenhorn
dcf215d52c
Fix warning in DecodeAltNames
2022-09-06 11:33:30 -05:00
David Garske
e2de8f3b6c
Merge pull request #5554 from rizlik/dtls_cid_fix
...
fix: dtls13: do not negotiate ConnectionID in HelloRetryRequest
2022-09-06 09:28:25 -07:00
David Garske
7b0128f9ac
Merge pull request #5541 from SparkiDev/ecc_sign_k_nondyn
...
ECC sign_k: don't have it dynamically allocated
2022-09-06 07:52:45 -07:00
David Garske
1a3c34ea99
Merge pull request #5557 from SparkiDev/sp_rsa_max_fix
...
RSA max and SP_INT_BITS: disabled RSA fix
2022-09-06 07:52:18 -07:00
Juliusz Sosinowicz
a33368f314
Merge pull request #5516 from embhorn/zd14732
2022-09-06 13:51:58 +02:00
Stefan Eissing
5927c4063a
Removing FIXME comments after the fixing has been done. doh.
2022-09-06 10:06:02 +02:00
Stefan Eissing
9b319b3782
Remove dependency on POLY1305 on testing CHACHA20 only.
2022-09-06 10:06:02 +02:00
Stefan Eissing
9f47999002
Add ChaCha20 as available cipher in the EVP API.
...
- wire the wc_ChaCha_* implementation into the EVP API
as `wolfSSL_EVP_chacha20`
- follow IV conversions of OpenSSL
- add test case
- have QUIC support use this for header protection when
CHACHA20_POLY1305 has been negotiated in the handshake.
2022-09-06 10:06:02 +02:00
Sean Parkinson
4b12d2f4ec
RSA max and SP_INT_BITS: disabled RSA fix
...
Checking WOLFSSL_MAX_RSA_BITS against SP_INT_BITS even though RSA is
disabled.
/configure --disable-shared --enable-sp --enable-sp-math --disable-rsa
--disable-dh --enable-ecc
2022-09-06 17:15:22 +10:00
David Garske
483d7189c7
Merge pull request #5512 from SparkiDev/tls13_64bit_milli
...
Make time in milliseconds 64-bits
2022-09-05 16:19:03 -07:00
David Garske
31b8edd192
Merge pull request #5552 from SparkiDev/ed_make_key_fixes
...
Ed make public key wasn't checking whether private key set
2022-09-05 16:13:41 -07:00
Sean Parkinson
e7dbb5b375
Merge pull request #5548 from dgarske/whitespace
...
Whitespace cleanup
2022-09-06 07:54:29 +10:00
Marco Oliverio
aee81764f2
fix: dtls13: do not negotiate ConnectionID in HelloRetryRequest
2022-09-05 17:00:09 +02:00
Stanislav Klima
38781bd7cf
added testing for wolfSSL_set_cipher_list_bytes()
2022-09-05 16:57:07 +02:00
Kaleb Himes
e76361d544
Merge pull request #5551 from SparkiDev/sha3_asm_fix
...
SHA-3: check BMI1 availablity for ASM
2022-09-05 05:03:52 -06:00
Sean Parkinson
f153e65102
SHA-3: check BMI1 availablity for ASM
...
Added benchmarking of SHAKE128 and SHAK256.
2022-09-05 14:11:02 +10:00
Sean Parkinson
f807c70637
Ed make public key wasn't checking whether private key set
...
Ed25519 and Ed448 make public key APIs now check whether the private key
was set.
The private key and public key flags setting and clearing also updated.
Testing of unset private key and calling make public key added for
Ed25519 and Ed448.
2022-09-05 12:21:51 +10:00
kaleb-himes
49065373aa
Merge branch 'fix_sha256_debug' of github.com:gojimmypi/wolfssl
2022-09-04 19:26:38 -06:00
Sean Parkinson
4ac113d135
ECDSA sign_k allocated when not WOLFSSL_NO_MALLOC
...
Fix up other WOLFSSL_NO_MALLOC issues.
2022-09-05 10:56:17 +10:00
Sean Parkinson
b95df7529c
Improve usage of 64-bit implementation of TimeNowInMilli
...
Change to use 64-bits for types stored - use WOLFSSL_32BIT_MILLI_TIME if
a 64-bit type is not available.
TimeNowInMill() returns 0 on error instead of GETTIME_ERROR.
2022-09-05 10:47:25 +10:00
Satoshi Yamaguchi
69ed2b56d4
Replace a variable of AES-128 key size to the constant AES_128_KEY_SIZE
2022-09-04 13:31:24 +09:00
Satoshi Yamaguchi
b52d193ee3
Fix an implicit type conversion
2022-09-03 23:56:54 +09:00
David Garske
aa036b6ea4
Merge pull request #5532 from anhu/sphincs
...
Add sphincs to wolfCrypt.
2022-09-02 11:56:11 -07:00
David Garske
232a750cc2
Whitespace cleanup.
2022-09-02 09:54:17 -07:00
David Garske
4a8a11315b
Merge pull request #5536 from SparkiDev/sha3_x64
...
SHA-3 improvements
2022-09-02 09:46:14 -07:00
JacobBarthelmeh
8ca63b93a4
Merge pull request #5539 from dgarske/ocsp_async
...
Fix for async with OCSP non-blocking in `ProcessPeerCerts`
2022-09-02 10:42:09 -06:00
David Garske
11bb8b3dc4
Merge pull request #5543 from SparkiDev/rsa_max_size_fix
...
RSA max key size checks
2022-09-02 09:26:19 -07:00
Anthony Hu
10ce703d71
Add sphincs to wolfCrypt.
...
Note that we will not support sphincs in TLS so nothing above wolfcrypt changes.
2022-09-02 11:53:55 -04:00
Sean Parkinson
daadd4a1b7
Merge pull request #5540 from dgarske/socksz
...
Fixes for building with 32-bit and socket size sign/unsigned mismatch
2022-09-02 16:33:41 +10:00
Hayden Roche
959386422e
Migrate async names from "test" to "software."
...
See async PR 52.
2022-09-01 17:53:18 -07:00
Sean Parkinson
3bf6baf596
RSA max key size checks
...
Detect when certificate's RSA public key size is too big and fail on
loading of certificate.
Fix unit test to only attempt to use 3072 bit RSA-PSS keys when
RSA_MAX_SIZE supports it.
2022-09-02 10:37:12 +10:00
Sean Parkinson
cef590131a
ECC sign_k: don't have it dynamically allocated
2022-09-02 09:18:42 +10:00
Sean Parkinson
23fd6456c2
Merge pull request #5534 from dgarske/zd14420
...
Fix for async session tickets
2022-09-02 08:50:35 +10:00
Sean Parkinson
ef451d316c
Make time in milliseconds 64-bits
...
Allow for longer session ticket lives.
2022-09-02 08:45:07 +10:00
David Garske
f530101ef1
Fix for async with OCSP non-blocking in ProcessPeerCerts. ZD 14754.
2022-09-01 14:39:52 -07:00
Stefan Eissing
65ca72c5a2
Improve EVP support for CHACHA20_POLY1305 ( #5527 )
...
* Add test case for OpenSSLs capability to init a evp context partially in several calls.
* EVP handling of CHACHA20_POLY1305 improvment
- save key at ctx for Init()s without IV
- reuse stored key for Init()s with new IV, reusing ctx
- free and zero key on ctx clenaup
* Adding type cast to XMALLOC to force compiler compatibility.
* EVP: using same DYNAMIC_TYPE in alloc and free of chacha20_poly1305 key.
Co-authored-by: Stefan Eissing <stefan.eissing@greenbytes.de >
2022-09-01 13:23:42 -07:00
David Garske
2695f36642
Fixes for building with 32-bit and socket size sign/unsigned mismatch.
...
Tested with: `./configure --enable-all CFLAGS="-m32 -DXSOCKLENT=int" LDFLAGS="-m32" && make`
2022-09-01 11:39:34 -07:00
David Garske
ba8ffc765d
Merge pull request #5513 from rizlik/hrr_default
...
DTLSv1.3: Do HRR Cookie exchange by default
2022-09-01 07:45:18 -07:00
David Garske
0222833f7e
Merge pull request #5535 from douzzer/20220831-analyzer-coddling
...
20220831-analyzer-coddling
2022-09-01 07:40:11 -07:00
Daniel Pouzzner
8ccef9f0d3
Merge pull request #5531 from embhorn/zd14665
...
Check return from call to wc_Time
2022-09-01 09:35:49 -05:00
Satoshi Yamaguchi
85776f0069
Add wolfSSL_EVP_PKEY_new_CMAC_key to OpenSSL compatible API
2022-09-01 18:00:43 +09:00
Marco Oliverio
08b89fbef9
server: add optional argument to -J disable hrr cookie
2022-09-01 09:37:35 +02:00
Marco Oliverio
401cfbd8e4
dtls13: enable hrr cookie by default
2022-09-01 09:37:35 +02:00
Marco Oliverio
edd723cc84
ssl: add new wolfSSL_disable_hrr_cookie() API to disable hrr cookie
...
Add a way to disable hrr cookie so it can be enabled by default for DTLS
connections.
2022-09-01 09:37:34 +02:00
Sean Parkinson
ce8959ea77
SHA-3 improvements
...
Add x86_64 assembly code:
- BMI2
- AVX2 (using ymm, slower than BMI2)
- AVX2 of 4 similtaneous hashes
Add SHAKE128 functions and tests.
Add Absorb and Squeeze functions for SHAKE128 and SHAK256 and tests.
Add doxygen for SHA-3 and SHAKE functions.
Update other generated x86_64 assembly files to include settings.h.
2022-09-01 17:11:58 +10:00
Daniel Pouzzner
ea3959f2f6
analyzer coddling:
...
in api.c test_wolfSSL_dtls12_fragments_spammer(), inhibit clang-analyzer-deadcode.DeadStores;
in asn.c ParseCRL_Extensions() old (!WOLFSSL_ASN_TEMPLATE) version, fix bounds check to prevent overshift;
in misc.c ctMaskCopy(), use `*(x + i)`, not x[i], to tiptoe around cppcheck-2.9 objectIndex bug.
2022-08-31 22:56:08 -05:00
David Garske
db6d69143e
Merge pull request #5533 from lealem47/crlPrintFix
...
Add missing DN nid to work with PrintName()
2022-08-31 18:32:55 -07:00
David Garske
fe583faf32
Merge pull request #5501 from haydenroche5/ecc_non_block
...
Add support for non-blocking ECC key gen and shared secret gen for P-256/384/521.
2022-08-31 18:31:28 -07:00
David Garske
96ab26e6e9
Fix for async session tickets. ZD14420
...
```
./configure --enable-all --enable-asynccrypt CFLAGS="-DWOLFSSL_NO_DEF_TICKET_ENC_CB" && make
./examples/server/server -v 4 -r &
./examples/client/client -v 4 -r
```
2022-08-31 15:28:49 -07:00
Lealem Amedie
2df1c25263
Add missing DN nid to work with PrintName()
2022-08-31 15:18:12 -07:00
Hayden Roche
41207f5d9b
Add support for non-blocking ECC key gen and shared secret gen for
...
P-256/384/521.
New functions:
- sp_ecc_make_key_256_nb
- sp_ecc_make_key_384_nb
- sp_ecc_make_key_521_nb
- sp_ecc_secret_gen_256_nb
- sp_ecc_secret_gen_384_nb
- sp_ecc_secret_gen_521_nb
This commit also tweaks the testing for ECDSA testing in test.c. Instead of
testing with one of P-256/384/521, we test with all that are available.
2022-08-31 14:34:26 -07:00
David Garske
38e4ecc27c
Merge pull request #5529 from anhu/wextra
...
Fix Windows CMakeList compiler options
2022-08-31 14:04:24 -07:00
Eric Blankenhorn
5a25525b2e
Check return from call to wc_Time
2022-08-31 15:20:07 -05:00
David Garske
9531552795
Merge pull request #5522 from tim-weller-wolfssl/update-ide-win10-build
...
Update ide win10 build files to add missing sp source files
2022-08-31 12:45:17 -07:00
David Garske
b1301d9dc4
Merge pull request #5518 from CallumMcLoughlin/master
...
Allow Post Quantum Keyshare for DTLS 1.3
2022-08-31 12:29:08 -07:00
David Garske
f0812fa21f
Added vcpkg instructions to the INSTALL file.
2022-08-31 11:41:43 -07:00
David Garske
8722a46d52
Merge pull request #5503 from julek-wolfssl/dtls-fragments
...
DTLS limit fragments
2022-08-31 09:53:09 -07:00
David Garske
3b8d230223
Merge pull request #5515 from anhu/custExtDoc
...
Improve `wc_SetCustomExtension` documentation
2022-08-31 08:35:04 -07:00
Anthony Hu
f7482d96e6
Windows cl.exe does not support -Wextra other flags
2022-08-31 10:32:55 -04:00
Tim Weller
1d9d8bdefb
Removed sp_c64.c due to reliance on 128-bit type, replaced with sp_x86_64.c and _asm.asm.
2022-08-31 07:15:05 -07:00
Tim Weller
71b1aca373
Merge branch 'master' into update-ide-win10-build
2022-08-31 06:32:20 -07:00
Juliusz Sosinowicz
54bd786707
DTLS limit fragments
...
- Limit the amount of fragments we store per a DTLS connection
- Error out when we reach the DTLS fragment connection limit
2022-08-31 14:24:20 +02:00
David Garske
44f81f8bc0
Merge pull request #5525 from JacobBarthelmeh/release
...
Release version 5.5.0
2022-08-30 10:35:13 -07:00
JacobBarthelmeh
4ce1cf1d7c
update RPM build
2022-08-30 08:50:41 -07:00
Jacob Barthelmeh
d75ce08d75
update readme for release 5.5.0
2022-08-30 09:31:28 -06:00
CallumMcLoughlin
43388186bb
Tidy up TLS 1.3 and DTLS 1.3 check
2022-08-30 19:59:36 +12:00
CallumMcLoughlin
565d1b33e5
Update examples to allow post quantum KEM within DTLS 1.3
2022-08-30 18:39:57 +12:00
gojimmypi
1afc92dd7b
internal.c: WC_SHA256_DIGEST_SIZE for wc_Sha256GetHash when WOLFSSL_DEBUG_TLS
2022-08-29 17:06:52 -07:00
JacobBarthelmeh
29f2dee991
handeling DER to internal of an OCSP response with no optional certificates
2022-08-29 15:25:50 -07:00
JacobBarthelmeh
ac3cdb42b7
free structure in test case and return 0 from ocsp renew script
2022-08-29 15:25:50 -07:00
JacobBarthelmeh
5b5f673c51
add simple ocsp response der verify test case
2022-08-29 15:25:50 -07:00
Tim Weller
69d60f5099
Merge branch 'master' into update-ide-win10-build
2022-08-29 09:13:51 -07:00
David Garske
a7f86f9473
Merge pull request #5517 from JacobBarthelmeh/Testing
...
misc. testing items from static analysis tools
2022-08-29 08:48:51 -07:00
JacobBarthelmeh
11c553ea1d
Merge pull request #5520 from julek-wolfssl/sni-tls-1.2
...
SNI can appear in ServerHello for TLS 1.2
2022-08-29 09:36:53 -06:00
Juliusz Sosinowicz
88deaf9b5c
SNI can appear in ServerHello for TLS 1.2
...
Co-authored-by: Eric Blankenhorn <eric@wolfssl.com >
2022-08-29 14:22:10 +02:00
CallumMcLoughlin
91d3cd7111
Allow Post Quantum Keyshare for DTLS 1.3
2022-08-28 17:35:28 +12:00
JacobBarthelmeh
1e673aee3b
scan-build warning fix
2022-08-26 16:29:11 -07:00
JacobBarthelmeh
ad0fd15a0d
static analysis fix from infer
2022-08-26 14:55:42 -07:00
JacobBarthelmeh
ce2cf3439d
subject info. acc. should contain a CA repo entry not OCSP
2022-08-26 14:39:20 -07:00
Eric Blankenhorn
1c83438eb3
Add compatibility layer macros
2022-08-26 14:56:35 -05:00
Anthony Hu
b1e9cc320b
Add documentation telling the user not to modify a buffer.
2022-08-26 14:27:27 -04:00
David Garske
e88bd66501
Merge pull request #5514 from julek-wolfssl/wolfSSL_EVP_MD_CTX_copy_ex-leak
...
Cleanup output object in wolfSSL_EVP_MD_CTX_copy_ex before copy
2022-08-26 11:08:17 -07:00
JacobBarthelmeh
1bf441de4d
add MCUXpresso IDE projects
2022-08-26 10:51:10 -07:00
JacobBarthelmeh
b3fa6f654e
no realloc, adjustable static test size, fsl RTC
2022-08-26 09:15:33 -06:00
David Garske
d84bfd511d
Merge pull request #5511 from SparkiDev/sp_submod_neg_fix
...
SP math: don't modify sign in sp_div
2022-08-26 08:07:37 -07:00
Juliusz Sosinowicz
2fb3f58c03
Cleanup output object in wolfSSL_EVP_MD_CTX_copy_ex before copy
2022-08-26 13:07:45 +02:00
Sean Parkinson
8b2719cc83
SP math: don't modify sign in sp_div
...
Not need to modify sign of a and d in sp_div().
Signs cached at start and used to calculate sign result.
2022-08-26 08:47:49 +10:00
David Garske
1976601811
Merge pull request #5505 from julek-wolfssl/dtls-plaintext
...
Ignore plaintext on established connections
2022-08-25 07:25:03 -07:00
David Garske
b9cee17b01
Merge pull request #5508 from SparkiDev/aes_ctr_arm32_neon_fix2
...
AES-CTR ARM32 ASM: Fix 128-bit counter increment
2022-08-25 07:04:48 -07:00
Sean Parkinson
bd13fcc92a
AES-CTR ARM32 ASM: Fix 128-bit counter increment
...
Include hash.h to sp_int.h for when no public key algorithms compiled in
- need WC_MAX_DIGEST_SIZE.
2022-08-25 14:54:00 +10:00
David Garske
842d415de0
Merge pull request #5507 from haydenroche5/general_names_leak
...
Fix wolfSSL_GENERAL_NAMES_free memory leak.
2022-08-24 21:05:53 -07:00
Sean Parkinson
2c829f19d3
Merge pull request #5506 from dgarske/dtlscid
...
Fixes for build warnings and string macros for DTLS CID
2022-08-25 13:52:55 +10:00
Hayden Roche
9f39ffdba7
Fix wolfSSL_GENERAL_NAMES_free memory leak.
...
This function was just freeing the stack object itself of GENERAL_NAMES with
wolfSSL_sk_free, but this doesn't free the data in the items of the stack. The
fix is to replace wolfSSL_sk_free with wolfSSL_sk_GENERAL_NAME_free.
2022-08-24 18:42:30 -07:00
David Garske
a0448155d5
Fix for type warnings in example for DTLS CID ./configure --enable-dtls --enable-dtlscid --enable-dtls13.
2022-08-24 16:02:05 -07:00
David Garske
8268214297
Merge pull request #5504 from ejohnstown/ppc-warn
...
API Test Fixes for GCC/PowerPC Warnings
2022-08-24 15:19:53 -07:00
Juliusz Sosinowicz
159a3c8b03
Ignore plaintext on established connections
2022-08-24 21:40:19 +02:00
Stanislav Klima
c4a61af311
drafted test case
2022-08-24 20:45:54 +02:00
Stanislav Klima
a668953f70
cr fix
2022-08-24 20:35:56 +02:00
John Safranek
9b65f5819c
API Test Fixes for GCC/PowerPC Warnings
...
1. In api.c, change the name of the devId global to testDevId.
2. In api.c, for the SNI test, some of the pointers were multiply
typecast eventually to `void **`. An older compiler didn't like
that. Just use void pointer.
2022-08-24 11:30:56 -07:00
Uriah-wolfSSL
7ea904c873
Added CertNew() and CertFree() info. ( #5502 )
...
* Updated wc_CertNew() dox for the return value listings, small changes to
description and add some detail to the example per peer review.
2022-08-24 13:09:50 -04:00
David Garske
9b12011d71
Merge pull request #5499 from SparkiDev/aes_ctr_arm32_asm
...
AES-CTR ARM32 crypto ASM fix
2022-08-24 09:59:49 -07:00
David Garske
53b74e2d32
Merge pull request #5498 from SparkiDev/tls_ecc_sig_fault
...
Check ECC signature in TLS
2022-08-24 09:59:06 -07:00
David Garske
124cff60f1
Merge pull request #5500 from SparkiDev/sp_int_div_ss_rework
...
Rework sp_div to work around static analysis error
2022-08-24 09:58:13 -07:00
Sean Parkinson
d087cbea1b
Rework sp_div to work around static analysis error
...
Fix _sp_exptmod_mont_ext() to handle when number of bits in exponent is
a multiple of the window size.
2022-08-24 12:31:21 +10:00
Sean Parkinson
9228354d29
AES-CTR ARM32 crypto ASM fix
...
Fix handling of counter to support incrementing across all bytes in
ARM32 crypto asm.
Added test cases for wrapping of counter when 2 blocks are being
encrypted to check assembly alternative path.
2022-08-24 10:51:56 +10:00
Sean Parkinson
2571f65e85
Check ECC signature in TLS
...
Verifying gnerated ECC signature in TLS handshake code to mitigate when
an attacker can gain knowledge of the private key through fault
injection in the signing process.
Requires WOLFSSL_CHECK_SIG_FAULTS to be defined.
2022-08-24 09:01:18 +10:00
David Garske
3b6124cf34
Merge pull request #5497 from douzzer/20220823-fixits
...
20220823-fixits
2022-08-23 13:45:02 -07:00
Daniel Pouzzner
8f70f98640
wolfcrypt/src/asn.c: refactor _SMALL_STACK code path in ParseCRL_Extensions() to fix memory leaks and heap-use-after-free.
2022-08-23 13:52:42 -05:00
Daniel Pouzzner
dcebd0d349
wolfssl/wolfcrypt/logging.h: when !WOLFSSL_VERBOSE_ERRORS, define WOLFSSL_ERROR_VERBOSE(e) as (void)(e) to avert clang-analyzer-deadcode.DeadStores, and avert bare semicolons.
2022-08-23 13:50:56 -05:00
David Garske
769fb7cbee
Merge pull request #5453 from rizlik/dtls_cid
...
Support ConnectionID Extension DTLS Negotiation
2022-08-23 11:29:25 -07:00
David Garske
cab6ecd130
Merge pull request #5404 from JacobBarthelmeh/PKCS7
...
fix for not having default pkcs7 signed attributes
2022-08-23 11:04:17 -07:00
David Garske
5c65974170
Fix for dynamic type macro typo.
2022-08-23 09:32:11 -07:00
David Garske
9d5305ad07
Merge pull request #5495 from julek-wolfssl/ticket-alignment
...
Remove WOLFSSL_GENERAL_ALIGNMENT from WOLFSSL_TICKET_ENC_SZ calculation
2022-08-23 08:13:42 -07:00
Marco Oliverio
3a8e6f2280
fix: add explicit cast to abide g++ compiler
2022-08-23 16:58:24 +02:00
Marco Oliverio
f3262005e4
add basic ConnectionID DTLS tests
2022-08-23 16:58:24 +02:00
Marco Oliverio
90fcd95f9b
server/client: add --cid option to use ConnectionID extension
2022-08-23 16:58:24 +02:00
Marco Oliverio
cfbd061625
add initial support for ConnectionID DTLS extension
2022-08-23 16:58:24 +02:00
Stanislav Klima
83fad7bb45
drafted setting cipher list with bytes api
2022-08-23 14:16:43 +02:00
Juliusz Sosinowicz
ae049706c6
Remove WOLFSSL_GENERAL_ALIGNMENT from WOLFSSL_TICKET_ENC_SZ calculation
2022-08-23 11:57:41 +02:00
Marco Oliverio
171af05e96
tlsx: expose TLSX_Push
...
To be able to implement extension in separate compilation unit
2022-08-23 10:00:06 +02:00
David Garske
bf9f4b88e4
Merge pull request #5494 from douzzer/20220822-bugprone-macro-parentheses
...
20220822-bugprone-macro-parentheses
2022-08-22 17:16:48 -07:00
David Garske
48463f6d54
Merge pull request #5388 from lealem47/crlPrint
...
Adding X509_CRL_print() function
2022-08-22 17:16:19 -07:00
Lealem Amedie
f9ca944106
Addressing some more feedback
2022-08-22 14:47:11 -07:00
Daniel Pouzzner
1063090e38
fix bugprone-macro-parentheses in WOLFSSL_CRYPTO_EX_DATA_IGNORE_PARAMS() added in 8b2fcd0643.
2022-08-22 16:34:28 -05:00
JacobBarthelmeh
bd49d37aaf
Merge pull request #5492 from embhorn/zd14694
...
Fix for AddPacketInfo with WOLFSSL_CALLBACKS
2022-08-22 14:59:29 -06:00
Lealem Amedie
91a7b8067c
Addressing some PR feedback
2022-08-22 12:04:15 -07:00
David Garske
c7c6fd98d7
Merge pull request #5491 from icing/quic-doc-update
...
Update of the QUIC documentation
2022-08-22 12:00:12 -07:00
David Garske
b9d9dc02bb
Merge pull request #5476 from julek-wolfssl/session-buffers
...
Remove WOLFSSL_SESSION_TYPE_REF buffers from WOLFSSL_SESSION
2022-08-22 11:59:39 -07:00
David Garske
c0815b3bc6
Merge pull request #5493 from kaleb-himes/openssl3_0_testing_supplemental
...
Supplemental fix in addition to #5470
2022-08-22 11:14:49 -07:00
David Garske
36facf52c9
Merge pull request #5490 from TakayukiMatsuo/no_rsa
...
Fixed build errors raised when NO_RSA is defined
2022-08-22 10:07:39 -07:00
David Garske
d50e740c97
Merge pull request #5488 from julek-wolfssl/get_ex_new_index-docs
...
Add documentation explaining get_ex_new_index API limitations
2022-08-22 09:51:36 -07:00
David Garske
a7e318a7ad
Merge pull request #5484 from lealem47/allocators
...
Adding allocator funcs for dtls peer (for wrappers)
2022-08-22 09:29:54 -07:00
David Garske
ce5a749fcb
Merge pull request #5489 from SparkiDev/aes_ctr_arm_asm
...
AES-CTR ARM crypto ASM fix
2022-08-22 09:28:22 -07:00
David Garske
1e5de8255e
Merge pull request #5472 from satoshiyamaguchi/trial3
...
Add/Extend PEM_read compatibility API's
2022-08-22 09:24:39 -07:00
Lealem Amedie
8f4b467f47
Fixing line lengths and SMALL_STACK code path
2022-08-22 09:17:23 -07:00
David Garske
689d45eb59
Merge pull request #5425 from SparkiDev/ecc_sp_uncomp_ret
...
ECC SP uncompress: use error return
2022-08-22 09:00:52 -07:00
Tim Weller
f98d8c5024
Update Windows 10 Visual Studio FIPS build file to include single-precision (sp) files to resolve missing symbols during link
2022-08-22 08:40:45 -07:00
kaleb-himes
77dec16b3b
Supplemental fix in addition to #5470
2022-08-22 08:00:40 -06:00
Eric Blankenhorn
22c44bd762
Fix for AddPacketInfo with WOLFSSL_CALLBACKS
2022-08-22 08:01:21 -05:00
Stefan Eissing
240c261772
Update of the QUIC documentation
...
- explain what the QUIC support is
- examples of ngtcp2 use
- what is needed for HTTP/3
2022-08-22 14:36:14 +02:00
Juliusz Sosinowicz
0dbd0ffb4e
Merge pull request #5483 from embhorn/zd14659
2022-08-22 14:28:29 +02:00
Juliusz Sosinowicz
e565d0d7de
Refactor and code review
...
- Refactor object hashing into one function
- Allow multiple WOLFSSL_ASSERT_SIZEOF_GE in one function
2022-08-22 14:19:48 +02:00
Juliusz Sosinowicz
8b2fcd0643
Add documentation explaining get_ex_new_index API limitations
2022-08-22 12:16:51 +02:00
Sean Parkinson
c7d28e3bb9
ECC SP uncompress: use error return
2022-08-22 16:21:30 +10:00
TakayukiMatsuo
48e7035af8
Fix build error when NO_RSA is defined
2022-08-22 14:03:19 +09:00
Sean Parkinson
f7a8d4a44a
AES-CTR ARM crypto ASM fix
...
Fix handling of counter to support incrementing across all bytes in ARM
crypto asm.
Added test cases for wrapping of counter.
Extracted ARM ASM for AES-CTR.
Use ASM to created encrypted temporary block.
2022-08-22 10:36:48 +10:00
Sean Parkinson
26c61f8e0f
Merge pull request #5473 from icing/quic-hello-retry
...
Respect disabled curves on HelloRetryRequests
2022-08-22 08:32:30 +10:00
Lealem Amedie
2059d05b7a
checking some ret values, fix trailing whitespace
2022-08-19 12:40:42 -07:00
Lealem Amedie
2a65220527
Adding X509_CRL_print() function
2022-08-19 12:21:35 -07:00
Lealem Amedie
da136e0c49
Adding allocator funcs for dtls peer (for wrappers)
2022-08-19 10:59:55 -07:00
David Garske
b417f94435
Merge pull request #5485 from SparkiDev/tls13_state_string_long
...
wolfSSL_state_string_long - update for TLS 1.3 and DTLS 1.3
2022-08-19 10:09:09 -07:00
David Garske
f3b9cfa71c
Merge pull request #5487 from icing/tls13_early_nr
...
Improved EarlyData Indicator reply fix based on PR #5486
2022-08-19 09:54:17 -07:00
Stefan Eissing
a7c0c4649e
Fixing Handshake Hash update when Preshared Keys offered by client,
...
but none of them was accepted.
- This applies to TLSv1.3 and QUIC
- QUIC test case to trigger the bug enabled
2022-08-19 15:56:20 +02:00
David Garske
1d0e83bd1a
Merge pull request #5474 from julek-wolfssl/zd14644-2
...
Match OpenSSL self signed error return.
2022-08-19 06:46:26 -07:00
Eric Blankenhorn
3d8562f07b
Fixes for build and runtime issues
2022-08-19 08:12:04 -05:00
Stefan Eissing
6cb0caa0a0
Adding disabledCurves as a member of WOLFSSL in the OPENSSL_EXTRA case.
...
- inheriting from WOLFSSL_CTX on creation
- enabling on WOLFSSL only when wolfSSL_set1_curves_list() is called
2022-08-19 11:03:23 +02:00
Stefan Eissing
7a5170b6e1
Improved EarlyData Indicator reply fix based on PR #5486
...
- PR #5486 had test failures in tls13.test and quit unit.test
- the extension was no longer added in SessionTicket messages
- added extra parameter to clarify how the TLSX is used
2022-08-19 10:07:06 +02:00
Stefan Eissing
a66516d3a5
Extending quic resumption tests.
2022-08-19 09:02:28 +02:00
Satoshi Yamaguchi
61c7003520
Fix whitespace
2022-08-19 12:38:07 +09:00
Sean Parkinson
4b8cd6c62b
wolfSSL_state_string_long - update for TLS 1.3 and DTLS 1.3
2022-08-19 09:41:01 +10:00
Juliusz Sosinowicz
06022e85a3
Fix avoidSysCalls logic
2022-08-18 19:43:40 +02:00
Daniel Pouzzner
969ad96dee
examples/{client,server}/{client,server}.c: remove spurious commas in --pqc help strings, and mollify clang-tidy bugprone-suspicious-missing-comma re --force-curve help strings. ( #5480 )
2022-08-18 13:32:58 -04:00
Juliusz Sosinowicz
4d0ea62857
Refactor ticket size to not accidentally go over WOLFSSL_TICKET_ENC_SZ
...
- Optimize memory usage. Write directly to ssl->session->ticket in CreateTicket() and use a hash to make sure the InternalTicket was encrypted.
- DoClientTicket does not fatally error out anymore. Errors in the ticket result in the ticket being rejected instead.
2022-08-18 19:08:43 +02:00
Stefan Eissing
6316e26bdc
Adding the forgotten wolfSSL_CTX_free() at the end of the new test_quic_key_share case.
2022-08-18 10:24:18 +02:00
Chris Conlon
e830a0f613
Merge pull request #5434 from satoshiyamaguchi/trial4
2022-08-17 17:04:36 -06:00
Peter Torelli
aa812c8aa9
Added support for P384 pre-share in server ( #5442 )
...
Added support for new server `--force-curve` option.
2022-08-17 15:30:48 -07:00
Chris Conlon
91a49da4b8
Merge pull request #5468 from SparkiDev/wolfssl_clear
2022-08-17 15:51:25 -06:00
Hideki Miyazaki
d494894268
Add to parse RSA ES OAEP Oid
2022-08-18 06:43:31 +09:00
David Garske
91d1bbbd44
Merge pull request #5477 from douzzer/20220817-make-quic-optional
...
20220817-make-quic-optional
2022-08-17 14:34:12 -07:00
Daniel Pouzzner
5b260ac52e
configure.ac: remove enable-quic from enable-all feature set;
...
remove ENABLED_QUIC="yes" from "$ENABLED_CURL" = "yes" setup section;
add ENABLED_CURVE25519=yes if $ENABLED_QUIC = yes;
tests/unit.c: move QuicTest() and SrpTest() before SuiteTest().
2022-08-17 14:25:38 -05:00
Juliusz Sosinowicz
68f71d0d96
Remove WOLFSSL_SESSION_TYPE_REF buffers from WOLFSSL_SESSION
2022-08-17 19:29:07 +02:00
Daniel Pouzzner
be378a346e
Merge pull request #5475 from dgarske/rsa_pss_async
...
Fixes for RSA PSS with `--enable-asynccrypt` in `ConfirmSignature`
2022-08-17 12:04:05 -05:00
David Garske
b9c9ad0339
Fixes for RSA PSS with --enable-asynccrypt in ConfirmSignature.
2022-08-17 08:20:06 -07:00
Stefan Eissing
3918a2e29a
Renaming the named_curve parameter to curve_id to avoid shadowing.
2022-08-17 17:01:18 +02:00
Juliusz Sosinowicz
008e947fec
Match OpenSSL self signed error return.
...
OpenSSL compat expects ASN_SELF_SIGNED_E when a self signed cert can't be verified. This is useful when translating the error with GetX509Error into a X509_V_ERR_* error.
2022-08-17 12:40:16 +02:00
Stefan Eissing
d6548b6b88
Small refactoring of named group handling for readability and de-duplicating of code.
...
- add wolfSSL_CTX_curve_is_disabled() and wolfSSL_curve_is_disabled()
to have common checks on wether a curve has been disabled by user
- add macros returning 0 for above function when OPENSSL_EXTRA is not
defined, enabling use without #fidef check
- add macros for checking if named groups are in a certain range
WOLFSSL_NAMED_GROUP_IS_FFHDE()
WOLFSSL_NAMED_GROUP_IS_PQC()
Fixed QuicTransportParam_free() use without case when compiling
with c++.
2022-08-17 11:46:48 +02:00
Satoshi Yamaguchi
f5a257c383
Add WOLFSSL_LEAVE to wolfSSL_PEM_read_RSA_PUBKEY and wolfSSL_PEM_read_PUBKEY
2022-08-17 14:23:50 +09:00
Sean Parkinson
7435402c30
Fixes to better handle re-use of a WOLFSSL object via wolfSSL_clear.
2022-08-16 15:44:05 -07:00
David Garske
3f7d56d957
Merge pull request #5471 from icing/quic-mem-leak
...
Fix memory leak in QUIC transport parameters extension
2022-08-16 13:22:20 -07:00
John Safranek
be2a6cbeb9
Merge pull request #5420 from Uriah-wolfSSL/ms_abi
...
Ms abi
2022-08-16 09:21:14 -07:00
Stefan Eissing
3434210b13
Fix memory leak in QUIC transport parameters extension
2022-08-16 18:13:25 +02:00
Satoshi Yamaguchi
091fc71c74
Fix EVP_PKEY not freed and FILE pointer not closed
2022-08-17 01:03:09 +09:00
Satoshi Yamaguchi
e1b3f14d35
Fix FILE pointer not closed in tests/api.c
2022-08-17 00:11:29 +09:00
Satoshi Yamaguchi
524f9ebd32
Add argument check and error message to wolfSSL_PEM_read_RSA_PUBKEY
2022-08-16 17:35:51 +09:00
David Garske
55eb460d1a
Merge pull request #5403 from SparkiDev/ecc_import_priv_order
...
ECC import priv: validate priv is less than order
2022-08-15 21:36:46 -07:00
David Garske
a954cf82e3
Merge pull request #5469 from anhu/init_CertName
...
Initialize the Enc memberss of CertName struct.
2022-08-15 20:42:26 -07:00
Sean Parkinson
8aa2bde3c2
Merge pull request #5470 from kaleb-himes/openssl3_0_testing
...
Allow for renegotiation testing with openssl 3.0 installed on jenkins…
2022-08-16 11:02:22 +10:00
kaleb-himes
1dd318741d
Allow for renegotiation testing with openssl 3.0 installed on jenkins slaves (also tested with openssl 1.1)
2022-08-15 16:33:06 -06:00
Anthony Hu
52ed047a44
Fix a mismatched decl and impl
2022-08-15 12:13:05 -04:00
Sean Parkinson
23a01b3276
SP: CT from_mp when sp_digit bits equal mp_digit bits.
...
Made constant time copy of values from an mp_int int array of sp_digit.
Stops OOB writes when mp_int is bigger than it should be.
2022-08-15 09:02:24 -07:00
Anthony Hu
5e7cff71fd
Initialize the Enc memberss of CertName struct.
...
Tested by reproducing the problem in an example and confirming fix makes problem
go away.
2022-08-15 11:43:33 -04:00
David Garske
e56a2355ca
Merge pull request #5464 from julek-wolfssl/zd14644
...
Translate the verify callback error to an X509_V_ERR_* value when OPENSSL_COMPATIBLE_DEFAULTS is defined
2022-08-15 06:30:36 -07:00
Uriah Pollock
7e00b32c71
Corrected line spacing incorrect arg passings.
2022-08-14 20:16:42 -05:00
David Garske
28f22859bb
Merge pull request #5451 from embhorn/zd14428
...
Fix TSIP ret value in TLSX_KeyShare_ProcessEcc
2022-08-14 11:27:20 -07:00
David Garske
dfb3616d50
Merge pull request #5465 from douzzer/20220812-fixes
...
20220812-fixes
2022-08-14 08:03:40 -07:00
Satoshi Yamaguchi
fba534dce0
Add wolfSSL_PEM_read_RSA_PUBKEY to OpenSSL compatible API
2022-08-14 16:08:22 +09:00
Derzsi Dániel
f515916f68
Add liboqs integration to CMake build system ( #5407 )
...
* Add liboqs integration to CMake build system
* Rephrase WOLFSSL_OQS option
* Add new FindOQS.cmake file to cmake/include.am
Co-authored-by: Disyer <denialmc1@gmail.com >
2022-08-12 16:23:24 -04:00
Daniel Pouzzner
e382905311
CMakeLists.txt: synchronize CMAKE_C_FLAGS with diagnostic flags set in autotools-generated Makefile (-Wall -Wextra -Wno-unused -Werror), and fix WOLFSSL_RSA_PSS to add -DWOLFSSL_PSS_LONG_SALT as needed by changes to test_wolfSSL_CertRsaPss() in fb531dacc2 (gating of those changes is also added in this commit).
2022-08-12 15:18:41 -05:00
Daniel Pouzzner
b4f1b6d04d
fix whitespace and C++-style comments.
2022-08-12 15:18:27 -05:00
David Garske
60437bba6e
Merge pull request #5378 from anhu/dilithium
...
Initial commit to add Dilithium NIST PQC winner.
2022-08-12 09:29:42 -07:00
Anthony Hu
0d78bd2127
Merge pull request #5459 from dgarske/docs
...
Improve documentation for CMAC
2022-08-12 10:37:07 -04:00
Juliusz Sosinowicz
551acd2b19
Translate verify callback error with compat layer
2022-08-12 16:27:31 +02:00
Juliusz Sosinowicz
126a570a37
Add HAVE_WOLFSSL_MSG_EX define when WOLFSSL_MSG_EX is available
2022-08-12 16:27:31 +02:00
David Garske
90c65bd50b
Merge pull request #5458 from icing/quic-earlydata
...
QUIC fixes for handling of early data
2022-08-11 17:52:29 -07:00
Chris Conlon
c66a21c40a
Add Zephyr support for nRF5340 with CryptoCell-312, PSA Crypto fixes ( #5418 )
...
* PSA: set AES key bits, define PSA_ALG_NONE/PSA_KEY_ID_NULL if needed
* Zephyr: add TimeNowInMilliseconds() for tls13.c, clock_settime() for test.c, update CMakeLists.txt
* Skip including unistd.h for Zephyr in benchmark.c
* Zephyr: update README, add nRF5340dk support to wolfssl_test sample app
* Zephyr: add wolfCrypt benchmark sample app
* Zephyr: add nRF5340 support to tls_thread sample app
* PSA: use specific hash algo with psa_sign/verify_hash()
* Zephyr: add support for PSA Crypto API with PK callbacks to wolfssl_tls_threaded sample app
* Zephyr: add new files to zephyr/include.am
2022-08-11 17:42:05 -07:00
David Garske
3f4b3605a6
Merge pull request #5460 from douzzer/20220811-quic-fixes-and-OLD-TLS-gating
...
20220811-quic-fixes-and-OLD-TLS-gating
2022-08-11 17:36:06 -07:00
Sean Parkinson
d4646696ed
Merge pull request #5448 from julek-wolfssl/ext-msg-check
...
Validate that extensions appear in correct messages
2022-08-12 08:39:42 +10:00
Sean Parkinson
2b38ba0300
Merge pull request #5455 from dgarske/zd14420
...
Fix for handling `WC_PENDING_E` from decrypt session ticket callback
2022-08-12 08:20:57 +10:00
Daniel Pouzzner
017c4e7a41
fix gating and unused-variable warnings in src/quic.c wolfSSL_quic_aead_is_{gcm,ccm,chacha20}();
...
fix TLS version gating in tests/quic.c;
fix gating in src/ssl.c for wolfSSLv2_client_method() and wolfSSLv2_server_method();
reorganize prototypes in wolfssl/ssl.h for wolf*_method*() to group systematically by protocol version and gate correctly on support for that version in the build.
2022-08-11 14:58:59 -05:00
David Garske
5445b183ed
Adding CMAC documentation. Fixes ZD14601.
2022-08-11 12:00:19 -07:00
Stefan Eissing
b3de591c6f
Rename of buffer to tmpbuffer to avoid collision with customer setup test.
2022-08-11 20:06:46 +02:00
David Garske
499b9c4f35
Merge pull request #5456 from SparkiDev/ssl_set1_curve_fix
...
wolfSSL_CTX_set1_curves_list: X25519 and X448 defines
2022-08-11 09:19:25 -07:00
Stefan Eissing
53fd4b37f2
QUIC fixes for handling of early data
...
- new internal field for keeping early data enabled status,
as QUIC does not call SSL_write_early_data() itself.
- using read_/write_early_data() methods in QUIC handshake
when early data is enabled. This triggers the internals
that emit the proper early data indication handlings.
2022-08-11 18:08:37 +02:00
David Garske
fef84e2c4c
Fixes for asn_public.h documentation. Fix spelling error.
2022-08-11 08:58:32 -07:00
Anthony Hu
82a900b438
Initial commit to add Dilithium NIST PQC winner.
...
Also:
* added HAVE_FALCON guards as needed.
* corrected minor falcon bugs as I found them.
* handling OID sum collision between DILITHIUM_LEVEL5 and DILITHIUM_AES_LEVEL3
Tested with the following commands:
examples/server/server -v 4 -l TLS_AES_256_GCM_SHA384 \
-c ~/tmp/dilithium_aes_level5_entity_cert.pem \
-k ~/tmp/dilithium_aes_level5_entity_key.pem \
-A ~/tmp/dilithium_aes_level5_root_cert.pem --pqc P521_KYBER_LEVEL5
examples/client/client -v 4 -l TLS_AES_256_GCM_SHA384 \
-c ~/tmp/dilithium_aes_level5_entity_cert.pem \
-k ~/tmp/dilithium_aes_level5_entity_key.pem \
-A ~/tmp/dilithium_aes_level5_root_cert.pem --pqc P521_KYBER_LEVEL5
with permutations of SHAKE,AES variants and levels 2,3,5
2022-08-11 11:38:31 -04:00
David Garske
5e6c45a6fb
Merge pull request #5397 from SparkiDev/cert_rsa_pss
...
Certs with RSA-PSS sig
2022-08-11 08:19:12 -07:00
David Garske
66644c2e31
Merge pull request #5457 from kaleb-himes/openssl-test-stuck-fix
...
Fix a very frequent stuck scenario with the openssl.test script
2022-08-11 07:43:23 -07:00
kaleb-himes
8efc8b0819
Fix up other test scripts using the same logic
2022-08-11 06:26:43 -06:00
Juliusz Sosinowicz
a317126509
Validate that extensions appear in correct messages
2022-08-11 10:53:10 +02:00
Sean Parkinson
dd2a6410d1
Merge pull request #5454 from dgarske/docs_hashtype
...
Improve the documentation for HMAC hash types
2022-08-11 16:50:55 +10:00
David Garske
87d96c9c96
Merge pull request #5452 from icing/quic-resume
...
QUIC session resumption and early data handshake handling.
2022-08-10 22:33:13 -07:00
David Garske
995100eed1
Fix for handling WC_PENDING_E from decrypt session ticket callback. ZD14420
2022-08-10 22:20:49 -07:00
David Garske
9ec61d4ce4
Merge pull request #5449 from douzzer/20220809-quic-fixes
...
20220809-quic-fixes
2022-08-10 21:56:45 -07:00
Sean Parkinson
4d8a713783
wolfSSL_CTX_set1_curves_list: X25519 and X448 defines
...
Support wolfSSL_CTX_set1_curves_list being available when X25519 and/or
X448 only defined.
Don't recognize X25519 or X448 if corresponding define is not set.
Enable test in api.c.
2022-08-11 14:13:04 +10:00
Sean Parkinson
fb531dacc2
Certs with RSA-PSS sig
...
Add support for parsing and verifying certificates with RSA-PSS
signatures. Including check PSS parameters in key with those in
signature algorithm.
Add support for parsing private RSA PSS key.
Add support for parsing public RSA PSS key.
2022-08-11 09:43:01 +10:00
kaleb-himes
a0e1c2567e
Fix a very frequent stuck scenario with the openssl.test script
2022-08-10 17:41:54 -06:00
Uriah Pollock
5ef47cc86f
Addressed code review.
2022-08-10 17:18:38 -05:00
Daniel Pouzzner
8197f958a9
address peer review on PR #5449 .
2022-08-10 13:33:57 -05:00
Daniel Pouzzner
f771181e1a
fixes for issues introduced in #5384 :
...
added numerous missing _SMALL_STACK code paths (PK objects on the stack);
in settings.h, enable WOLFSSL_SMALL_STACK_STATIC by default when WOLFSSL_SMALL_STACK is defined (NO_WOLFSSL_SMALL_STACK_STATIC to override);
fixes for unsafe strcat()s in tests/quic.c;
fix for unsafe macro WOLFSSL_IS_QUIC();
fix to exclude quic from enable-all when enable-linuxkm (quic needs opensslextra, and opensslextra currently only works in-kernel in cryptonly builds);
fix for signed/unsigned clash in wolfSSL_quic_receive().
2022-08-10 13:33:56 -05:00
David Garske
c707186b9f
Improve the documentation for HMAC hash types.
2022-08-10 09:23:01 -07:00
JacobBarthelmeh
b46693f8c8
Merge pull request #5445 from douzzer/20220808-fixes
...
20220808-fixes (unchecked snprintf() retvals)
2022-08-10 10:21:07 -06:00
Stefan Eissing
ea04ffc99f
QUIC session resumption and early data handshake handling.
...
In test with ngtcp2 example client using openssl, session resumption
against a QUIC wolfssl server failed. The error was tracked down to
wolfSSL believing EaryData needs to be handled and returning SUCCESS
from wolfSSL_SSL_do_handshake() after the server Finished had been
sent.
However the handshake was not complete and ngtcp2 invoked the
post_handshake processing for new data arriving from the client.
This failed a check in post processing that the ssl->handShakeState
actually was HANDSHAKE_DONE.
The workaround in this PR repeats do_handshake until the ssl
state acually says it is complete. This way, session resumption works.
Either this alternative do_handshake() is merged for QUIC protocol
hanlders. Or we need to fix the 'normal' do_handshake() to no return
SUCCESS when early data is expected on a QUIC WOLFSSL.
2022-08-10 15:17:30 +02:00
Eric Blankenhorn
bcb9f3f70d
Fix TSIP ret value in TLSX_KeyShare_ProcessEcc
2022-08-10 08:15:24 -05:00
Daniel Pouzzner
c07d0fe4b4
address peer review:
...
use camel case not underscores in variable names;
restore use of const int variables for buffer sizes in several spots (for ease of smallstack code paths should they be needed);
use more MISRAish flow control in X509PrintSignature().
also, capture the retval from several more snprintf()s to pass directly to wolfSSL_BIO_write(), avoiding frivolous strlen()s.
2022-08-09 23:23:11 -05:00
David Garske
eceee6ac95
Merge pull request #5444 from anhu/PQ_get_curve_name
...
Bugfix: wolfSSL_get_curve_name() will now print post-quantum group names.
2022-08-09 16:53:55 -07:00
Anthony Hu
57dc263d05
Make clang happy.
2022-08-09 14:35:59 -04:00
David Garske
fa97923005
Merge pull request #5384 from icing/quic
...
QUIC support for wolfSSL
2022-08-09 10:13:29 -07:00
Uriah Pollock
5049b16325
Param correction.
2022-08-08 19:43:54 -05:00
Daniel Pouzzner
371fbc698c
src/x509.c: mollify bugprone-unused-return-value warnings around XSNPRINTF();
...
fix various possible buffer overruns;
fix various runtime-error-driven memory leaks;
various refactors for efficiency, clarity, and safety, including refactors to eliminate unsafe XSTRNCAT() calls.
2022-08-08 18:55:38 -05:00
Uriah Pollock
f8c9393235
Added ABI tags for certs, wc_CertNew(), wc_CertFree()
...
wc_CertNew() and wc_CertFree() is for use by ABI type aplications, and
others, for having wolfCrypt perform the new/free of the certification
structure w/o the application needing too, and more importantly, needing
to contain knowledge of the structure.
2022-08-08 18:12:06 -05:00
Anthony Hu
ae0faa40cf
Bugfix: wolfSSL_get_curve_name() will now print post-quantum group names.
2022-08-08 17:51:45 -04:00
Chris Conlon
e3310984b6
Merge pull request #5443 from TakayukiMatsuo/doalert
2022-08-08 15:22:18 -06:00
Chris Conlon
039bf721c4
Merge pull request #5440 from miyazakh/sce_compile_failure
2022-08-08 10:36:15 -06:00
Uriah Pollock
b0aaf4a23d
Minor ABI updates.
2022-08-08 10:16:05 -05:00
Uriah Pollock
c9c19c82b3
Added next set of ABI for ECC APIs
2022-08-08 09:08:24 -05:00
Uriah Pollock
65d402d8d7
Revert "Revert "Removed duplicate WOLFSSL_ABI tag.""
...
This reverts commit e5c51b2638a374aa987c30be8598a78e3f370c7a.
2022-08-08 09:08:24 -05:00
Uriah Pollock
d283510aa9
Revert "Removed duplicate WOLFSSL_ABI tag."
...
This reverts commit d17021bc4e8e3f12b0c0406f7fe400ed4c0bc2cd.
2022-08-08 09:08:23 -05:00
Uriah Pollock
f2677c29ec
Removed duplicate WOLFSSL_ABI tag.
2022-08-08 09:08:23 -05:00
Uriah Pollock
cc8fb1f978
git push origin ms_abi
2022-08-08 09:08:23 -05:00
Uriah Pollock
b200d65a6a
Added new ABI reference hooks. This is round two, more to come.
2022-08-08 09:08:23 -05:00
Uriah Pollock
46f423b8b9
Added ABI macros for managing interface changes
2022-08-08 09:08:23 -05:00
Stefan Eissing
4431438fb2
add QUIC support.
2022-08-08 13:24:00 +02:00
David Garske
7004157869
Merge pull request #5387 from TakayukiMatsuo/tk14445
...
Suppress build errors when defining some disable macros
2022-08-07 20:09:41 -07:00
TakayukiMatsuo
9fd56c9c5c
Changes in response to other PRs
2022-08-08 02:10:14 +09:00
TakayukiMatsuo
79fb1783c4
Suppress build errors when defining some disable macros
2022-08-07 17:11:22 +09:00
David Garske
2d2c55f1c1
Merge pull request #5431 from haydenroche5/wolfssl_error
...
Expand error queue usage with new macro WOLFSSL_ERROR_VERBOSE.
2022-08-05 15:14:44 -07:00
David Garske
96fcc129ec
Merge pull request #5213 from JacobBarthelmeh/req
...
expand functions included in opensslextra and add REQ print out
2022-08-05 13:20:21 -07:00
Kareem
2288082d9a
Make wolfSSL quiet_shutdown functions available when using OPENSSL_EXTRA_X509_SMALL.
2022-08-05 11:51:34 -07:00
Hayden Roche
3bf21b5a05
Expand error queue usage with new macro WOLFSSL_ERROR_VERBOSE.
...
We have users who need to debug errors coming out of libwolfssl in production,
where --enable-debug isn't an option. Our error queue implementation is the
solution, but our usage of WOLFSSL_ERROR isn't consistent. This commit greatly
expands our usage of WOLFSSL_ERROR. There are too many error cases to tackle
all at once, and not all error cases are particularly meaningful or likely to be
hit in regular operation of the library. I've tried to focus on errors that
users are likely to hit, and I've chosen to ignore things like the mountain of
BUFFER_E and BAD_FUNC_ARG cases (for the most part). I've also tried to expand
WOLFSSL_ERROR usage in files where we haven't been using it historically
(e.g. aes.c), so the pattern is now there for other developers to follow. In
order to prevent these additions from exploding the size of libwolfssl, they're
all behind a new macro, WOLFSSL_ERROR_VERBOSE. If WOLFSSL_VERBOSE_ERRORS is
defined, WOLFSSL_ERROR_VERBOSE just maps to WOLFSSL_ERROR.
2022-08-05 10:32:18 -07:00
JacobBarthelmeh
d6c895d19d
use or with all/extra macro guard
2022-08-05 09:31:42 -07:00
JacobBarthelmeh
83f1ade1fc
use extension free function with opensslextra and remove debug printf
2022-08-05 09:15:35 -07:00
Satoshi Yamaguchi
cedfe9938a
Fix the comment about the argument of wolfSSL_PEM_read_RSAPrivateKey.
2022-08-06 00:15:49 +09:00
Satoshi Yamaguchi
4f181576ef
Fix the position of wolfSSL_PEM_read_RSAPrivateKey definition in pem.h
2022-08-06 00:14:30 +09:00
Juliusz Sosinowicz
192f081833
Merge pull request #5439 from SparkiDev/tls13_ext_msgs
2022-08-05 10:49:13 +02:00
Hideki Miyazaki
f30b3f1163
fix compile error
2022-08-05 16:00:09 +09:00
Sean Parkinson
c35b47f265
TLS !.3: restrict extension validity by message
...
Extensions ServerName, SupportedGroups and ALPN must not appear in
server_hello.
Removed server_hello from the valid checks.
2022-08-05 08:26:09 +10:00
Sean Parkinson
56be09005f
Merge pull request #5427 from julek-wolfssl/dtls-timeout-and-closed-socket
...
DTLS socket and timeout fixes
2022-08-05 08:13:14 +10:00
JacobBarthelmeh
ff512a34c6
adjust temporary buffer size and memory free'ing
2022-08-04 15:11:24 -07:00
David Garske
7465691c70
Merge pull request #5437 from douzzer/20220804-fixes
...
20220804 fixes
2022-08-04 13:55:03 -07:00
Daniel Pouzzner
9d5e633a96
wolfcrypt/src/pkcs12.c: add WOLFSSL_SMALL_STACK path in freeDecCertList().
2022-08-04 11:16:47 -05:00
Daniel Pouzzner
d7e33b3293
wolfcrypt/src/asn.c: fix null pointer deref in SetReqAttribSingle() (clang-analyzer-core.NonNullParamChecker).
2022-08-04 11:12:09 -05:00
David Garske
99dad91344
Merge pull request #5435 from douzzer/20220803-gcc-12-ASAN
...
20220803-gcc-12-ASAN
2022-08-04 08:41:26 -07:00
Juliusz Sosinowicz
6d4f0146ca
Refactor sending alert on decryption failure
...
Take sending of the alert outside of DecryptTls() and DecryptTls13(). The alert is now sent in ProcessReplyEx().
2022-08-04 12:06:26 +02:00
Juliusz Sosinowicz
ebcfa31993
Refactor checking socket type into a function
2022-08-04 11:35:27 +02:00
Juliusz Sosinowicz
3278210e1c
Silently discard DTLS msgs that fail decryption
...
Don't send alerts when decryption fails inside a DTLS connection.
TLS should always send a bad_record_mac when decryption fails.
2022-08-04 11:27:45 +02:00
Juliusz Sosinowicz
fd1e8c49eb
Reset timeout when reading a valid DTLS message
...
- Increment the DTLS 1.3 timeout on a long timeout
2022-08-04 11:27:45 +02:00
Juliusz Sosinowicz
67d518544b
EmbedReceiveFrom: fix when using a TCP socket
...
- recvfrom() returns 0 on a closed TCP socket
- TCP sockets set WOLFSSL_CBIO_ERR_ISR on a timeout
2022-08-04 11:27:45 +02:00
Sean Parkinson
9ea3e173d0
Merge pull request #5277 from JacobBarthelmeh/req_attr
...
expand subject name and req attribute support
2022-08-04 14:32:14 +10:00
David Garske
2c2a7750a4
Merge pull request #5414 from darktohka/feature/chacha20-poly1305-evp
...
Integrate chacha20-poly1305 into the EVP interface
2022-08-03 18:21:17 -07:00
Sean Parkinson
1dc848d8e3
Merge pull request #5429 from dgarske/sniffer_async2
...
Fix for sniffer to ensure the session was polled before trying to reprocess it
2022-08-04 08:18:55 +10:00
Sean Parkinson
e32cfb79e5
Merge pull request #5419 from dgarske/aurix
...
Support for Infineon AURIX IDE and minor compiler warnings.
2022-08-04 08:01:57 +10:00
David Garske
3f07900c1b
Merge pull request #5432 from embhorn/zd14172
...
Fix dead code warnings and build error
2022-08-03 15:01:20 -07:00
David Garske
791250c6c0
Merge pull request #5428 from TakayukiMatsuo/rx65n_fix
...
Fix build error and update manuals for Renesas RX boards
2022-08-03 11:04:25 -07:00
Daniel Pouzzner
6e8417e631
wolfssl/wolfcrypt/blake2-int.h: remove alignment specs on __blake2s_state and __blake2b_state, as they are unneeded, and are not honored by gcc-12+ in stack allocations, leading to (true positive) misaligned-access errors from ASAN.
2022-08-03 12:30:45 -05:00
Daniel Pouzzner
a7f0c92c0d
src/internal.c: in GetCipherKeaStr(), when gcc-12 or higher and __SANITIZE_ADDRESS__, wrap in a pragma to ignore -Wstringop-overread, due to false positives.
2022-08-03 12:30:29 -05:00
David Garske
664fe390d6
Merge pull request #5382 from icing/announce-pskkem-plain
...
Announce TLSX_PSK_KEY_EXCHANGE_MODES in non-resuming ClientHello
2022-08-03 07:40:24 -07:00
David Garske
0c1add08e3
Merge pull request #5416 from darktohka/feature/chacha20-outl-bytes
...
Ensure ChaCha20 updates out length during cipher update
2022-08-03 07:26:02 -07:00
David Garske
4937557ddc
Merge pull request #5422 from julek-wolfssl/dtls-async-fix
...
Fix dtls + async multi-test misc errors
2022-08-03 07:24:58 -07:00
Eric Blankenhorn
ecdccb6180
Fix build error with WOLFSSL_AES_DIRECT
2022-08-03 09:09:28 -05:00
Eric Blankenhorn
f713c75a73
Fix dead code warnings in evpCipherBlock and wc_CryptKey
2022-08-03 08:08:00 -05:00
David Garske
53e0483e47
Support for Infineon AURIX IDE. Fixes for Aurix compiler warnings.
2022-08-02 16:53:47 -07:00
Juliusz Sosinowicz
72b0f15075
Merge pull request #5424 from anhu/curl_ftps_fix
2022-08-02 23:22:11 +02:00
David Garske
9d2ed67a5c
Fix for sniffer to ensure the session was polled before trying to reprocess it.
2022-08-02 08:11:21 -07:00
Satoshi Yamaguchi
013ad0d564
Add wolfSSL_PEM_read_RSAPrivateKey to OpenSSL compatible API
2022-08-03 00:02:40 +09:00
Anthony Hu
fd412ed298
Fix so curl can do FTPS on TLS 1.3 with session resumption.
2022-08-02 10:51:14 -04:00
TakayukiMatsuo
3c51d872ea
Fix build error and update manuals
2022-08-02 16:45:37 +09:00
Sean Parkinson
9db4ae64b9
Merge pull request #5423 from douzzer/20220729-fixes
...
20220729-fixes
2022-08-02 08:03:53 +10:00
JacobBarthelmeh
99ed727179
add WOLFSSL_CERT_NAME_ALL macro guard and new values to set subject
2022-08-01 10:52:09 -07:00
Jacob Barthelmeh
52b80ea52a
expand functions included in opensslextra and add REQ print out
2022-08-01 09:21:43 -07:00
David Garske
4602e6d892
Merge pull request #5426 from rizlik/epoch_bits_fix
...
fix: dtls13: use correct buffer index to get epoch bits
2022-08-01 07:41:44 -07:00
Marco Oliverio
8878922f95
fix: dtls13: use correct buffer index to get epoch bits
...
Fixes: d079662765
2022-08-01 14:24:20 +02:00
Daniel Pouzzner
791508220f
wolfssl/internal.h: fix spurious assert failure on jumbo RSA key configurations (> 8192 bits); mollify bugprone-macro-parentheses.
2022-07-29 09:33:14 -05:00
Juliusz Sosinowicz
fb2feee9b6
Fix dtls + async multi-test misc errors
...
DTLS uses DtlsMsgStore() to process messages when using async crypto. A check was skipping the storing straight to DtlsMsgDrain().
2022-07-29 15:49:49 +02:00
Stefan Eissing
a943de7969
Changes after PR review.
...
- removed additions to REAME.md
- changed coding style of conditional PSKKEM announce
as requested.
2022-07-29 11:26:08 +02:00
Stefan Eissing
1db8013566
Update README with note about change in TLSX_PSK_KEY_EXCHANGE_MODES use.
2022-07-29 11:18:56 +02:00
Stefan Eissing
c8008e29b9
Announce TLSX_PSK_KEY_EXCHANGE_MODES in non-resuming ClientHello.
...
- can be reverted to previous style by defining NO_TLSX_PSKKEM_PLAIN_ANNOUNCE
- QUIC interop testing reveals that at least QUIC stacks refrain from
issuing session tickets unless the ClientHello shows this extension.
2022-07-29 11:18:56 +02:00
David Garske
da422eb422
Merge pull request #5406 from SparkiDev/mp_int_size
...
Maths bit size: ensure size is right
2022-07-28 15:36:58 -07:00
David Garske
d568e8c893
Merge pull request #5413 from SparkiDev/x509_san_crit
...
ASN template: allow SAN to be critical
2022-07-28 15:14:23 -07:00
David Garske
ac85000a02
Merge pull request #5415 from douzzer/20220728-fixes
...
20220728-fixes
2022-07-28 12:48:40 -07:00
David Garske
fde2097503
Merge pull request #5405 from SparkiDev/clang-x86
...
TFM: change inline x86 asm code to compile with clang
2022-07-28 08:42:17 -07:00
Disyer
e599bb5048
Mark chacha20-poly1305 as an AEAD cipher
2022-07-28 18:36:52 +03:00
Disyer
e3dd7677c8
Add tests for chacha20-poly1305 EVP integration
2022-07-28 18:21:12 +03:00
Disyer
e8febaf414
Ensure ChaCha20 updates out length during cipher update
2022-07-28 18:06:41 +03:00
Daniel Pouzzner
545ba58cc0
sp_int.c sp_div(): add missing (err == MP_OKAY) clause to fix null ptr deref.
2022-07-28 09:28:36 -05:00
Daniel Pouzzner
3ac04fa3ee
wolfcrypt/benchmark/benchmark.c: fix gating for #include <unistd.h>.
2022-07-28 09:28:36 -05:00
Disyer
52cc73a6a4
Integrate chacha20-poly1305 into the EVP interface
2022-07-28 13:01:35 +03:00
Sean Parkinson
70c38f2183
Cert: SAN extension critical
...
Add field to Cert to indicate SAN extension is critical.
Handle the field being set when encoding.
2022-07-28 14:16:56 +10:00
David Garske
824d44b705
Merge pull request #5412 from douzzer/20220726-multi-test-fixes
...
20220726-multi-test-fixes
2022-07-27 20:44:46 -07:00
David Garske
7b65a1f1c2
Merge pull request #5411 from anhu/selfsigned_template
...
Fix ASN template to use the subject as issuer if cert is selfsigned
2022-07-27 16:02:14 -07:00
David Garske
6ecf2c0a5e
Merge pull request #5399 from SparkiDev/sp_exptmod_reduce
...
SP int: exptmod ensure base is less than modulus
2022-07-27 15:43:16 -07:00
Anthony Hu
58cc326621
Calcuate ---> Calculate
2022-07-27 16:56:45 -04:00
Anthony Hu
33579045f2
Fix ASN template code to use the subject as issuer if cert is selfsigned.
2022-07-27 16:38:17 -04:00
Daniel Pouzzner
9256d6aa7c
src/internal.c: fixes for redundant assignments and preprocessor typo.
2022-07-27 14:42:00 -05:00
Daniel Pouzzner
c63e22701f
src/pk.c: fix type mismatch in return value.
2022-07-27 14:42:00 -05:00
Daniel Pouzzner
ed449d5b20
wolfsentry integration: avoid redundant and frivolous dispatches (ssl.c wolfSSL_connect(), wolfSSL_negotiate(), wolfSSL_accept(); tls13.c wolfSSL_connect_TLSv13(), wolfSSL_accept_TLSv13()).
2022-07-27 14:42:00 -05:00
Daniel Pouzzner
feb911c612
Merge pull request #5398 from dgarske/make_dist_small
...
Script to produce a small source/header only package
2022-07-27 14:33:59 -05:00
David Garske
a56d25d58e
Merge pull request #5408 from julek-wolfssl/FreeAsyncCtx-location
...
FreeAsyncCtx should only be called when advancing state
2022-07-27 09:59:28 -07:00
David Garske
0f0b7c553c
Keep .i files needed for fast math. Use test_paths.h from .in to remove user path info.
2022-07-27 08:33:27 -07:00
David Garske
6f282c2c57
Merge pull request #5402 from rizlik/dke_rsa
...
doClientKeyExchange improvements
2022-07-27 08:01:16 -07:00
Juliusz Sosinowicz
e9b3b5936f
FreeAsyncCtx should only be called when advancing state
...
The call to FreeAsyncCtx after SendBuffered was added to clean up state when we are ready to advance state. If we do not advance state, then clean up should be handled in the relevant state.
2022-07-27 14:14:22 +02:00
Sean Parkinson
460845ba49
Maths bit size: ensure size is right
...
Ensure WOLFSSL_MAX_RSA_BITS works.
Fix SP math size defines.
Regression testing maths implementations.
2022-07-27 18:58:30 +10:00
Sean Parkinson
788348dce2
TFM: change inline x86 asm code to compile with clang
2022-07-27 14:05:37 +10:00
Sean Parkinson
01aad13c38
Rework
2022-07-27 12:02:15 +10:00
JacobBarthelmeh
f31c8223f2
fix for not having default pkcs7 signed attributes
2022-07-26 16:45:44 -07:00
Sean Parkinson
9ac3c9ec05
ECC import priv: validate priv is less than order
...
Valid private key must be less than order.
Check on import when WOLFSSL_VALIDATE_ECC_IMPORT defined.
2022-07-27 09:29:07 +10:00
David Garske
9c480ece66
Fix to use the new outTmp.
2022-07-26 15:48:58 -07:00
Sean Parkinson
c2476e3858
SP int: exptmod ensure base is less than modulus
...
Ensure sp_div uses rem only when rem is big enough.
2022-07-27 08:48:28 +10:00
Hayden Roche
5f47adba3c
Merge pull request #5401 from dgarske/cmake_install_spmathall
2022-07-26 15:02:42 -07:00
Marco Oliverio
856ea2ffc8
internal.c: RsaDec improvements
2022-07-26 20:59:01 +02:00
Marco Oliverio
1727efbc2c
internal.c: rsa decription buffer handling
2022-07-26 20:59:01 +02:00
Marco Oliverio
2e1e8d2789
misc.c: introduce ctMaskCopy()
2022-07-26 20:59:01 +02:00
David Garske
344ad48f03
Fix for CMake not installing sp_int.h for SP math all.
2022-07-26 11:29:21 -07:00
David Garske
1003dfeefc
Merge pull request #5392 from JacobBarthelmeh/caam
...
more macro guards with CAAM builds
2022-07-26 09:41:21 -07:00
David Garske
9e213cab19
Fixes for the script (from Douzzer).
2022-07-26 08:50:27 -07:00
Chris Conlon
a5b1838d8f
Merge pull request #5393 from TakayukiMatsuo/leakfix
2022-07-26 09:44:19 -06:00
Chris Conlon
a05b38059e
Merge pull request #5385 from miyazakh/sce_jenkins_fail
2022-07-26 09:41:46 -06:00
David Garske
48016adf52
Script to produce a small source/header only package (with CMake support)
2022-07-25 17:08:13 -07:00
David Garske
a98642ba61
Merge pull request #5383 from julek-wolfssl/negating-ciphersuites
...
Expand SetCipherList()
2022-07-25 08:26:47 -07:00
David Garske
97970d87a5
Merge pull request #5350 from SparkiDev/sp_math_fixes_1
...
SP math
2022-07-25 08:18:55 -07:00
David Garske
7174e6766b
Merge pull request #5391 from embhorn/gh5366
...
Fix to copy TLS version with wolfSSL_write_dup
2022-07-25 07:56:14 -07:00
David Garske
cceb35abe2
Merge pull request #5394 from SparkiDev/pathlen_set_0
...
Cert path length: add flag to indicate path length set
2022-07-25 07:54:30 -07:00
David Garske
ec565250ed
Merge pull request #5395 from SparkiDev/encrypt_len_fix
...
ENCRYPT_LEN fix
2022-07-25 07:53:50 -07:00
TakayukiMatsuo
5a0afc512e
Fix memory leak in ECDHE with TSIP
2022-07-25 19:43:32 +09:00
Juliusz Sosinowicz
e7cd1562b4
Expand SetCipherList()
...
- support disabling ciphersuites starting from the default list
2022-07-25 11:14:16 +02:00
Sean Parkinson
8e20a5900c
ENCRYPT_LEN fix
...
Fix check for WOLFSSL_SP_MATH_ALL and WOLFSSL_SP_MATH instead of
WOLFSSL_SP_MATH twice.
2022-07-25 09:35:43 +10:00
Sean Parkinson
8fa2449a63
Cert path length: add flag to indicate path length set
...
A path length is allowed to be 0.
Can't check path len for 0 to determine when value is set.
Added flag to indicate path length is set.
2022-07-25 09:07:14 +10:00
Sean Parkinson
56bec875b4
Merge pull request #5390 from kareem-wolfssl/bnGenPrimeRsa
...
Update sp_rand_prime's preprocessor gating to match wolfSSL_BN_generate_prime_ex's.
2022-07-25 08:10:06 +10:00
JacobBarthelmeh
35d40f263e
more macro guards with CAAM builds
2022-07-22 16:19:55 -07:00
Eric Blankenhorn
4369873540
Fix to copy TLS version with wolfSSL_write_dup
2022-07-22 15:09:35 -05:00
Kareem
dc92ec2aa9
Update sp_rand_prime's preprocessor gating to match wolfSSL_BN_generate_prime_ex's.
2022-07-22 11:07:46 -07:00
Juliusz Sosinowicz
6f2889c07d
BIO_eof returns 1 when no more data remains in the BIO
2022-07-22 13:24:32 +02:00
Hideki Miyazaki
491ebb7a3d
fixed compile error due to degression
...
fixed memory leak in wc_SCE_EccVerify
2022-07-22 08:29:05 +09:00
Sean Parkinson
dc8b796d1d
Merge pull request #5347 from dgarske/async_sess_tick
...
Support for asynchronous session ticket callback
2022-07-22 08:04:48 +10:00
Daniel Pouzzner
02e512142c
Merge pull request #5359 from haydenroche5/unit_test_refactor
...
Begin refactor of api.c.
2022-07-21 15:52:40 -05:00
David Garske
281825db20
Merge pull request #5353 from rizlik/dtls13_async_fixes
...
Dtls13 async fixes
2022-07-21 13:24:35 -07:00
David Garske
69e2f5243c
Merge pull request #5326 from gojimmypi/ESP32_HW_Update_PR
...
Espressif ESP32 Hardware Acceleration Update and Cleanup
2022-07-21 12:09:09 -07:00
Marco Oliverio
163acb89af
dtls13: consider certificate_request processed on WC_PENDING_E
...
The error is due to the message triggered by the processing of the
message (Connect()->SendTls13Certificate/SendTls13CertificateVerify/SendTls13Verify). Consider
the message processed to avoid double processing.
2022-07-21 12:00:18 -07:00
Marco Oliverio
aca83b42d7
fix: dtls13: send immediately post-handshake certificate request
2022-07-21 12:00:18 -07:00
Marco Oliverio
53dde1dafe
dtls12: async: store the message only if async is really used
2022-07-21 12:00:18 -07:00
David Garske
964ea85d3d
Fix typos for dynamic types in dtls13.c.
2022-07-21 12:00:18 -07:00
Marco Oliverio
dce63fdfb3
async: fix issue with DTLSv1.3
2022-07-21 12:00:16 -07:00
Marco Oliverio
07afc594a8
dtls13: aesthetic only changes
2022-07-21 11:55:50 -07:00
David Garske
b5ce0b021e
Merge pull request #5381 from rizlik/async_fix
...
fix: async: don't rewind index if post-handshake connect() fails
2022-07-21 11:53:15 -07:00
David Garske
c5e7ccca2c
Merge pull request #5380 from danielinux/typo-doc
...
Fixed typo in dox_comments
2022-07-21 11:52:56 -07:00
Hayden Roche
daf5135642
Begin refactor of api.c.
...
- Modify all existing tests to return an int. This moves us in the direction of
being able to return error/success from a test rather than just calling abort
when something fails. Also, all tests now have the same signature, so they can
easily be members of an array of test cases.
- Wrap each test in a TEST_CASE struct, which just stores a pointer to the test
function and the name of the test, for now. In the future, other metadata can
be added (e.g. should this test be run/skipped) to TEST_CASE, if desired.
- Modify all tests to return 0 on success. Right now, this doesn't do us much
good because the failure mechanism isn't returning some value != 0, it's
abort.
- Add TestSetup and TestCleanup functions that run before and after each test,
respectively. The former does nothing right now, and the latter clears the
error queue, if the error queue is compiled in.
2022-07-21 10:12:26 -07:00
JacobBarthelmeh
1281d97b1e
Merge pull request #5373 from haydenroche5/error_queue_fix
...
Fix backwards behavior for various wolfSSL_ERR* functions.
2022-07-21 09:35:21 -06:00
Marco Oliverio
a235de25fe
fix: async: don't rewind index if post-handshake connect() fails
...
During post-handshake authentication async code mistakes connect() error code
with the error code of DoTls13CertificateRequest and wrongly rewinds the buffer.
The bug was never triggered because of side effects of ShrinkBuffer (removed in
40cb6e0853 )
2022-07-21 16:35:43 +02:00
Daniele Lacamera
a18b1939ac
Fixed typo in dox_comments
2022-07-21 10:19:51 +02:00
gojimmypi
c60fae8731
wc_Sha256Free checks lockDepth for Espressif RTOS
2022-07-21 09:08:10 +02:00
gojimmypi
bd28b52aaa
#include "wolfssl/wolfcrypt/settings.h"
2022-07-21 09:06:01 +02:00
gojimmypi
9da0ff0f31
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into ESP32_HW_Update_PR
2022-07-21 08:21:17 +02:00
gojimmypi
58aec606c6
wolfSSL license, not wolfSSH
2022-07-21 08:12:54 +02:00
gojimmypi
6937062b9a
wolfSSL license, not wolfSSH
2022-07-21 08:09:19 +02:00
JacobBarthelmeh
a4e3dc9638
Merge pull request #5379 from douzzer/20220720-fixes
...
20220720-fixes
2022-07-20 21:34:08 -06:00
David Garske
8605195709
Support for asynchronous session ticket callback (can return WC_PENDING_E). Requires wolfAsyncCrypt support. ZD 14420.
2022-07-20 16:43:17 -07:00
Daniel Pouzzner
542c53f3ac
snip out errant "#/" strings added to various text files by copyright boilerplate update in 8eaa85e412.
2022-07-20 18:23:28 -05:00
Daniel Pouzzner
a3fd714501
configure.ac: allow --enable-opensslextra with --enable-linuxkm if --enable-cryptonly is also given.
2022-07-20 18:21:29 -05:00
Daniel Pouzzner
3842889649
src/tls13.c: in SendTls13ClientHello(), move nullness check on WOLFSSL* ssl back to the start of the function.
2022-07-20 18:19:58 -05:00
David Garske
706ab6aac0
Merge pull request #5377 from kareem-wolfssl/rsaKeyEncipher
...
Don't require digital signature bit for static RSA cipher suites. Make wolfSSL_CTX_clear_options available without OPENSSL_EXTRA.
2022-07-20 15:28:55 -07:00
Sean Parkinson
bd2b510487
Merge pull request #5376 from dgarske/sniff_tlsv12_sessticket
...
Fixes for sniffer session ticket resumption with TLS v1.2
2022-07-21 08:22:33 +10:00
David Garske
9450fa1412
Merge pull request #5375 from LinuxJedi/se050-private-key-add
...
Add ECC private key insertion for SE050
2022-07-20 12:42:13 -07:00
Kareem
741d61574b
Make wolfSSL_CTX_clear_options available without OPENSSL_EXTRA.
2022-07-20 12:24:47 -07:00
Kareem
873890316c
Don't require digital signature bit for static RSA cipher suites.
2022-07-20 12:08:20 -07:00
David Garske
564f79c91a
Merge pull request #5371 from douzzer/20220719-linuxkm-get_thread_size-no-thunks
...
linuxkm: inhibit thunk generation in get_thread_size.
2022-07-20 11:48:48 -07:00
David Garske
1c7f64cce9
Fixes for sniffer session ticket resumption with TLS v1.2. ZD14531.
2022-07-20 11:18:19 -07:00
David Garske
b46a308544
Merge pull request #5361 from embhorn/zd14491
...
Fix for build with NO_TLS
2022-07-20 09:28:23 -07:00
Hayden Roche
e6da540fb3
Fix backwards behavior for various wolfSSL_ERR* functions.
...
wolfSSL_ERR_get_error and wolfSSL_ERR_peek_error_line_data should return the
earliest error in the queue (i.e. the error at the front), but prior to this
commit, they returned the latest/most recent one instead.
In DoAlert, we were adding an error to the queue for all alerts. However, a
close_notify isn't really an error. This commit makes it so DoAlert only adds
errors to the queue for non-close_notify alerts. In ReceiveData, similarly, we
were adding an error to the queue when the peer sent a close_notify, as
determined by ssl->error == ZERO_RETURN. Now, we don't add an error in this
case.
2022-07-20 08:56:48 -07:00
Andrew Hutchings
07d2940757
Fix issue caused by undo in IDE
2022-07-20 16:42:09 +01:00
David Garske
ab60865178
Merge pull request #5374 from julek-wolfssl/dtls-multiple-msgs
...
ShrinkInputBuffer should not be called in the middle of ProcessReply
2022-07-20 08:27:56 -07:00
Andrew Hutchings
d7b4abfa0b
Fixups to the SE050 ECC pkey insert function
2022-07-20 16:25:39 +01:00
David Garske
719e814841
Merge pull request #5370 from rizlik/dtls13_partial_read_fixes
...
dtlsv1.3 fixes
2022-07-20 08:03:29 -07:00
David Garske
e4c1e71b38
Merge pull request #5364 from embhorn/zd14519
...
Fix wolfSSL_Init error handling
2022-07-20 08:03:08 -07:00
David Garske
f4191a102b
Merge pull request #5304 from SKlimaRA/SKlimaRA/cert-pathlen
...
drafted pathlen for cert struct
2022-07-20 07:54:13 -07:00
David Garske
aab2459d1f
Merge pull request #5372 from JacobBarthelmeh/copyright
...
update copyright year to 2022
2022-07-20 07:52:05 -07:00
David Garske
c029b23043
Merge pull request #5308 from SparkiDev/ecies_gen_iv
...
ECIES: Google Pay generates IV and places it before msg
2022-07-20 06:46:14 -07:00
Marco Oliverio
2e0d53a07d
fix: dtls13: use correct handshaketype on hello retry request
2022-07-20 15:25:50 +02:00
Marco Oliverio
3850e6b554
fix: dtls13: use aes for record numbers encryption if using aes-ccm
2022-07-20 15:25:50 +02:00
Marco Oliverio
066f17faad
fix: dtls13: hello_retry_request type isn't an encrypted message
2022-07-20 15:25:50 +02:00
Marco Oliverio
c0fc87342c
tls13: avoid spurious state advances in connect/accept state machine
2022-07-20 15:25:50 +02:00
Marco Oliverio
11dfb713e9
openssl_compatible_default: use DTLSv1.0 as minDowngrade in DTLS
2022-07-20 15:25:46 +02:00
Marco Oliverio
6711756b03
dtls13: support stream-based medium
...
Don't assume that the underlying medium of DTLS provides the full message in a
single operation. This is usually true for message-based socket (eg. using UDP)
and false for stream-based socket (eg. using TCP).
Commit changes:
- Do not error out if we don't have the full message while parsing the header.
- Do not assume that the record header is still in the buffer when decrypting
the message.
- Try to get more data if we didn't read the full DTLS header.
2022-07-20 14:53:07 +02:00
Juliusz Sosinowicz
40cb6e0853
ShrinkInputBuffer should not be called in the middle of ProcessReply
2022-07-20 11:57:48 +02:00
Andrew Hutchings
ea34fb1643
Add ECC private key insertion for SE050
...
This adds a utility function which allows an ECC private key to be
inserted into the SE050's permanent storage.
2022-07-20 10:45:26 +01:00
Stanislav Klima
66c5a947fd
XSTRNCPY, fixed typos
2022-07-20 08:56:59 +02:00
Sean Parkinson
09bba3510f
ECIES: Google Pay ECIES
...
Generates IV and places it before msg
Uses 12 byte IV with AES-CTR
Add API to explicitly set KDF salt.
2022-07-20 09:30:47 +10:00
Jacob Barthelmeh
8eaa85e412
update copyright year to 2022
2022-07-19 10:44:31 -06:00
Eric Blankenhorn
8b904e9082
Fix for build with NO_TLS
2022-07-19 11:12:18 -05:00
Daniel Pouzzner
0dac3ec022
linuxkm: inhibit thunk generation in get_thread_size.
2022-07-19 10:20:04 -05:00
Stanislav Klima
1a44bad8cc
drafted test case for path len
2022-07-19 15:34:20 +02:00
Stanislav Klima
3d721bd533
more WOLFSSL_CERT_EXT
2022-07-19 11:00:36 +02:00
Stanislav Klima
6ce5f645f3
added ASN template code and WOLFSSL_CERT_EXT, still missing testcase
2022-07-19 10:38:47 +02:00
David Garske
9a3efb67b8
Merge pull request #5368 from lealem47/disableAes
...
Fix for --disable-aes without --disable-aesgcm
2022-07-18 15:05:59 -07:00
David Garske
feb3f889af
Merge pull request #5369 from embhorn/zd14522
...
Fix var init in wc_ecc_shared_secret
2022-07-18 14:17:53 -07:00
Lealem Amedie
cee9f9a871
Fix for --disable-aes without --disable-aesgcm
2022-07-18 10:26:20 -07:00
Chris Conlon
c63abe398f
Merge pull request #5321 from miyazakh/tsip_add_usecase
2022-07-18 09:35:43 -06:00
Eric Blankenhorn
f55fe7fccd
Fix var init in wc_ecc_shared_secret
2022-07-18 09:13:07 -05:00
David Garske
218ab7e396
Merge pull request #5362 from haydenroche5/ssl_set_options_public
...
Make wolfSSL_(get|set)_options available outside compat layer.
2022-07-15 10:36:29 -07:00
Eric Blankenhorn
e7303d697b
Fix wolfSSL_Init error handling
2022-07-15 09:30:30 -05:00
Andrew Hutchings
8a757ef7cf
Merge pull request #5363 from dgarske/se050_curve25519
...
Fixes for SE050 Curve25519 endianness
2022-07-15 08:49:27 +01:00
Hideki Miyazaki
15725400a7
addressed review comments 5
2022-07-15 13:46:30 +09:00
Hayden Roche
a1b7c29309
Make wolfSSL_(get|set)_options available outside compat layer.
...
Also make wolfSSL_CTX_get_options available.
2022-07-14 16:03:58 -07:00
David Garske
dec8a7fd93
Fixes for SE050 Curve25519 endianness (SDK assumes little endian). Fix for ECC se050_ecc_shared_secret use of wrong pointer on error handle free.
2022-07-14 15:34:50 -07:00
David Garske
6cc2665a81
Merge pull request #5358 from SparkiDev/sp_int_armv6
...
SP int ARM32: replace clz instruction when not supported
2022-07-14 15:32:00 -07:00
Chris Conlon
350ff552c4
Merge pull request #5351 from kojo1/renesas-csp
2022-07-14 16:10:34 -06:00
JacobBarthelmeh
abba59f735
order of array of names for asn template build
2022-07-14 13:15:59 -07:00
JacobBarthelmeh
8862e1f8cf
resolve name conflict
2022-07-14 09:41:36 -07:00
David Garske
e3c65d86d6
Merge pull request #5360 from LinuxJedi/se050-sign-fix-b
...
Missed a small part of my original SE050 sign fix
2022-07-14 06:39:11 -07:00
Hideki Miyazaki
fd885d89eb
Added multi thread use case
...
Improve not to use forward declaration struct definition
- include ssl.h rather than forward declaration struct to resolve struct name
- to include ssl.h, it needs to avoid cyclic reference for crypt structure. therefore, Sha and Aes definitions are moved to another header file
2022-07-14 17:25:21 +09:00
Andrew Hutchings
3f390efb24
Missed a small part of my original SE050 sign fix
...
Empty keyId handling now exists so we shouldn't return `BAD_FUNC_ARG`.
2022-07-14 07:47:33 +01:00
Andrew Hutchings
c211b90aab
Merge pull request #5357 from dgarske/se050_fixes
...
Fixes for SE050 ED25519 private key loading and Curve25519/ECC handle leak
2022-07-14 07:14:54 +01:00
Andrew Hutchings
5098cdcd76
Merge pull request #5356 from dgarske/asn_rfc8410
...
Fixes for ED25519/ED448 private key with public key export (RFC8410)
2022-07-14 07:11:03 +01:00
Jacob Barthelmeh
f6c4e295b1
add more subject name support and expande REQ attributes creation support
2022-07-13 22:02:49 -07:00
Jacob Barthelmeh
5dcb1ba21f
remove carriage return from CONF strings
2022-07-13 22:02:49 -07:00
Sean Parkinson
b69af856de
Ed ASN template: change for IMPLICIT public key in private key
...
Fix KATs in test.c to match new expected format.
2022-07-14 10:19:43 +10:00
Sean Parkinson
33b3ebb1e9
SP int ARM32: replace clz instruction when not supported
2022-07-14 09:37:28 +10:00
David Garske
2d5bc72c9b
Fixes for ED25519/ED448 private key with public key export (RFC8410). Added length only support.
2022-07-13 16:17:08 -07:00
David Garske
586ae71dac
Fixes for SE050 ECC and Curve25519 with TLS.
2022-07-13 10:50:10 -07:00
David Garske
a2b7b44163
Merge pull request #5342 from Uriah-wolfSSL/dtls_for_win
...
Example DTLS v1.3 build settings for Windows Visual Studio
2022-07-13 09:27:46 -07:00
David Garske
065991bab5
Merge pull request #5348 from douzzer/20220707-attend-return-values
...
20220707-attend-return-values
2022-07-13 08:50:29 -07:00
Stanislav Klima
1b6ce6150e
unsigned pathlen
2022-07-13 09:07:02 +02:00
Sean Parkinson
96fe356dd8
SP math
...
Enable ForceZero for SP math and all RSA.
Disable use of 128-bit type in SP unless WOLFSSL_UINT128_T_DEFINED is
defined.
2022-07-13 14:54:34 +10:00
Takashi Kojo
69bf0345c4
Renesas cs+ project. Remove depreciated algorithms
2022-07-13 10:24:44 +09:00
Daniel Pouzzner
dc231dc099
peer review: add explanatory comment for printf() macro in test.c; rearrange test.h to avoid awkward forward declaration and add some topical grouping.
2022-07-12 18:19:52 -05:00
Uriah-wolfSSL
a4e452ec6a
New file for adding needed configuration options to enable DTLS including DTLS version 1.3. This is an example file to be used for testing, eval, demos, etc.
2022-07-12 15:53:21 -05:00
Uriah-wolfSSL
357ace8408
* Updated README.txt w/ how to use user_settings_dtls.h.
...
* Added dtls13.c to build project files.
* Added user_settiings.dtls.h to include.am.
2022-07-12 15:53:21 -05:00
Daniel Pouzzner
b64949d564
wolfcrypt/benchmark/benchmark.c: fix gating for #include <errno.h>, and add #include <unistd.h> for _exit().
2022-07-11 23:15:43 -05:00
Daniel Pouzzner
ccc5952369
global fixup to check or explicitly ignore return values from failable library/system calls that weren't already being checked;
...
add wolfCrypt error codes IO_FAILED_E "Input/output failure" and SYSLIB_FAILED_E "System/library call failed";
tests/api.c and tests/unit.c: flush stdout for error message in Fail() macro, add fflush(stdout) after printf()s, print success message at end of unit_test(), and send several error messages to stderr instead of stdout;
wolfcrypt/test/test.c: add fallthrough macro definition of printf() that pairs it with fflush(stdout);
unit.h: in definition of macro AssertPtr(), add PRAGMA_GCC("GCC diagnostic ignored \"-Wpedantic\"");
sp_int.c: refactor several lingering instances of "if (0) { ... }" code pattern to #if 0 ... #endif.
2022-07-11 22:28:09 -05:00
David Garske
e30899b676
Merge pull request #5334 from LinuxJedi/se050-fixes
...
Fixes to SE050 port
2022-07-11 16:15:08 -07:00
JacobBarthelmeh
22c3a1fc6f
Merge pull request #5346 from dgarske/async_rel_v5.4.0
...
Async release v5.4.0 patches
2022-07-11 17:11:06 -06:00
David Garske
34c576d2a7
Fixes for possible NULL dereference for heap hint in pk.c Fix typo in api.c test for dynamic type.
2022-07-11 14:41:11 -07:00
David Garske
57aac1c50b
Merge pull request #5345 from JacobBarthelmeh/release
...
Release version 5.4.0
2022-07-11 11:10:10 -07:00
JacobBarthelmeh
a48129eb99
update README for release
2022-07-11 07:28:15 -07:00
JacobBarthelmeh
032d59b077
adjust sizeof type for getsockopt argument
2022-07-11 07:10:11 -07:00
JacobBarthelmeh
86662bca2f
update library version to 5.4.0
2022-07-08 16:04:26 -07:00
JacobBarthelmeh
7379e377ab
cast for g++ warning
2022-07-08 15:11:29 -07:00
JacobBarthelmeh
983b9fc5fb
Merge pull request #5343 from dgarske/ecc_oid_coding
...
Fixes for ECC OID encoding/decoding
2022-07-08 15:38:47 -06:00
David Garske
4892435004
Fix for wc_ecc_get_curve_id_from_oid with combinations of HAVE_OID_ENCODING and HAVE_OID_DECODING. Fix in SetCurve for unused outSz with HAVE_OID_ENCODING.
2022-07-08 13:00:09 -07:00
JacobBarthelmeh
66aed8193a
Merge pull request #5341 from dgarske/various_20220708
...
Various fixes and cleanups
2022-07-08 13:56:51 -06:00
David Garske
56325143f1
Merge pull request #5340 from anhu/micrium_alt_ecc_size
...
Gate ALT_ECC_SIZE on NO_MALLOC and STATIC_MEMORY since they conflict.
2022-07-08 09:53:07 -07:00
David Garske
720030b5a9
Improvements to error handling for AddSessionToClientCache.
2022-07-08 09:06:51 -07:00
David Garske
03a32250da
Fix for KCAPI HMAC forcing use of software for HKDF.
2022-07-08 09:06:30 -07:00
David Garske
3d124c093e
Fix PK function name in log. Remove the ECC logging (spams benchmark with --enable-debug).
2022-07-08 09:06:08 -07:00
David Garske
905f71d80d
Fix with macro redefinition error if building with NO_WOLFSSL_ALLOC_ALIGN.
2022-07-08 09:05:29 -07:00
JacobBarthelmeh
f7595cc77d
Merge pull request #5338 from julek-wolfssl/tcp-sendto
...
sendto can't specify addr on a TCP socket
2022-07-08 09:39:39 -06:00
Anthony Hu
2d6b6d62b2
Gate ALT_ECC_SIZE on NO_MALLOC and STATIC_MEMORY since they conflict.
2022-07-08 10:52:01 -04:00
David Garske
a2b75e313a
Merge pull request #5339 from douzzer/20220708-DUW_TEST-bugprone-macro-parentheses
...
tests/api.c: fix bugprone-macro-parentheses in DUW_TEST().
2022-07-08 07:46:20 -07:00
Daniel Pouzzner
48d3cf593e
tests/api.c: fix bugprone-macro-parentheses in DUW_TEST().
2022-07-08 07:57:29 -05:00
Juliusz Sosinowicz
251642a44a
sendto can't specify addr on a TCP socket
...
From the man page
If sendto() is used on a connection-mode (SOCK_STREAM, SOCK_SEQPACKET) socket, the arguments dest_addr and
addrlen are ignored (and the error EISCONN may be returned when they are not NULL and 0), and the error
ENOTCONN is returned when the socket was not actually connected.
2022-07-08 12:14:23 +02:00
David Garske
58cb91602d
Merge pull request #5337 from douzzer/20220707-DtlsUpdateWindowGTSeq-overshift
...
20220707-DtlsUpdateWindowGTSeq-overshift
2022-07-07 21:53:26 -07:00
David Garske
c9e9a421e9
Merge pull request #5336 from SparkiDev/aes_ctr_opt
...
AES-CTR: improve performance when multiple blocks
2022-07-07 21:51:08 -07:00
Daniel Pouzzner
91438c1087
wolfssl/wolfcrypt/settings.h: refactor Math Library Selection for clarity, and to include WOLFSSL_SP_MATH as an available math back end.
2022-07-07 21:02:16 -05:00
David Garske
49d292ec4f
Merge pull request #5335 from SparkiDev/ecc_imp_exp_fix
...
ECC import and export fixes
2022-07-07 17:52:20 -07:00
Daniel Pouzzner
b952c2f777
src/internal.c: add codepath in _DtlsUpdateWindowGTSeq() to avoid a word32 overshift.
2022-07-07 19:36:20 -05:00
Sean Parkinson
2bfac42d65
AES-CTR: improve performance when multiple blocks
...
When in and out aren't the same pointer, for multiples of block size
input:
- generate the counters into the output buffer
- encrypt output buffer
- XOR in the input
Faster than encrypting a block at a time.
2022-07-08 09:56:20 +10:00
Sean Parkinson
70b9833e98
ECC import and export fixes
...
On raw import, don't import ordinates that are larger than the curve
size.
On export of compressed point, don't export ordinate if it is larger
than the curve size.
2022-07-08 08:54:53 +10:00
David Garske
4e1e1e922a
Merge pull request #5278 from ejohnstown/dtls-seq
...
Refactor DTLS Window Update (Fix #5211 )
2022-07-07 10:22:21 -07:00
Chris Conlon
5e453ad932
Merge pull request #5323 from SparkiDev/sha512_arm32_asm_align
2022-07-07 09:47:37 -06:00
Juliusz Sosinowicz
e295328436
Fix window handling around word32 boundary
2022-07-07 17:37:10 +02:00
Andrew Hutchings
34d897e433
Fixes to SE050 port
...
This fixes the following things:
* Memory leaks in SE050 SHA messages
* Add key to SE050 for ECC sign hash function
* Remove circular include
* Correct prototype for `se050_hash_final`
* A few defined check fixes
2022-07-07 16:11:54 +01:00
David Garske
a771baf551
Merge pull request #5332 from SparkiDev/memusage_fix_2
...
SP math: fix configure.ac to allow its use
2022-07-07 07:40:13 -07:00
David Garske
738d79c5d5
Merge pull request #5330 from SparkiDev/aesni_no_sse4
...
AESNI: fix configure to use minimal compiler flags
2022-07-06 20:44:40 -07:00
Daniel Pouzzner
2111d6b179
Merge pull request #5322 from SparkiDev/sp_math_all_arm32_div_word_fix
...
SP math all: fix div word for ARM32
2022-07-06 22:18:07 -05:00
Sean Parkinson
74baa0dafa
SP math: fix configure.ac to allow its use
...
Choosing SP and SP math was resulting in only integer.c being used.
Fixed now.
Reorder realloc calls for memory logging to ensure scripts can match
allocate and free calls.
2022-07-07 12:16:12 +10:00
David Garske
644050a736
Merge pull request #5329 from douzzer/20220706-fips-and-aarch64-fixes
...
20220706-fips-and-aarch64-fixes
2022-07-06 18:39:38 -07:00
David Garske
cb6fa921a4
Merge pull request #5328 from haydenroche5/cmake_sp_math_all_default
...
Make changes to CMake to support SP math default.
2022-07-06 18:39:30 -07:00
John Safranek
8f3449ffea
Refactor DTLS Window Update ( Fix #5211 )
...
1. Rename _DtlsUpdateWindow() as wolfSSL_Dtls_UpdateWindow() and make
it public so it may be tested.
2. Rename the internal functions DtlsWindowUpdate(), DtlsWindowCheck(),
and DtlsUpdateWindowGTSeq() as _DtlsWindowUpdate() and
_DtlsWindowCheck(), and _DtlsUpdateWindowGTSeq().
3. When updating the DTLS sequence window, and the next sequence
number (lo) wraps to zero, increment the next sequence number (hi)
by 1.
4. Fix an off-by-one error that wrapped around when saving the
packet sequence number in the bit-field window.
5. Adding a test for wolfSSL_DtlsUpdateWindow() function. With many test
cases. It is set up in a table format with running check values.
6. Change location of incrementing the difference when calculating the
location for setting the bit.
7. Updated the check of the sequence difference in the GT scenario.
8. In the DTLS window update functions remove newDiff and just use diff.
9. Handle the cases where the DTLS window crosses the high order word
sequence number change.
10. Add a debug option to print out the state of the DTLS sequence number
window.
2022-07-06 18:20:06 -07:00
David Garske
90c2f4ad00
Merge pull request #5327 from kareem-wolfssl/connectRetFix
...
Fix storage of SendBuffered's return code in wolfSSL_Connect.
2022-07-06 17:53:04 -07:00
Sean Parkinson
9ba77300f9
AESNI: fix configure to use minimal compiler flags
2022-07-07 09:30:48 +10:00
Sean Parkinson
992c7b3b6f
SP math all: fix div word for ARM32
...
Fixup sp_mulmod NULL access.
2022-07-07 08:56:31 +10:00
Daniel Pouzzner
82b1dc0cd0
wolfcrypt/src/asn.c: move final return in DecodeECC_DSA_Sig() outside the NO_STRICT_ECDSA_LEN gate, to avoid no-return-from-non-void.
2022-07-06 17:39:59 -05:00
Daniel Pouzzner
eff4fe398b
src/include.am: fix gating around sha* and BUILD_ARMASM, to avoid empty-translation-unit warnings for sha{256,512}.c on armasm builds.
2022-07-06 17:37:43 -05:00
Daniel Pouzzner
7c49449a79
wolfcrypt/src/port/arm/armv8-sha512.c: gate out Sha512_Family_GetHash() in builds that have 224 and 256 bit hashes gated out, to fix unused function warning.
2022-07-06 17:35:15 -05:00
Daniel Pouzzner
6b6abfac54
examples/client/client.c: remove break after err_sys() to mollify clang-tidy unreachable-break sensor.
2022-07-06 17:32:26 -05:00
Daniel Pouzzner
19106a9510
configure.ac and tests/api.c: lock out compkey on FIPS 140-3 RC12 and ready, and add backward-compat code in test_wc_ecc_export_x963_ex() to allow RC12 compkey builds to pass unit.test.
2022-07-06 17:31:56 -05:00
Hayden Roche
d9bf39ffaa
Make changes to CMake to support SP math default.
...
We recently made SP math the default big integer math library. Some changes to
the CMake code are needed for this to work.
2022-07-06 14:14:12 -07:00
Kareem
44a49aeefa
Fix potentially uninitialized variables in Dtls13SetRecordNumberKeys.
2022-07-06 13:45:15 -07:00
Kareem
c8f5bd3d61
Fix storage of SendBuffered's return code in wolfSSL_Connect. Store in ret initially, only store in ssl->error if there's an error. This matches the logic in wolfSSL_accept.
2022-07-06 12:09:47 -07:00
David Garske
b2d1bf96ed
Merge pull request #5276 from rizlik/dtls13_client_downgrade
...
Dtls: improve version negotiation
2022-07-06 11:57:53 -07:00
David Garske
a7fa7875e4
Merge pull request #5244 from julek-wolfssl/wpas-dpp
...
Support for new DPP and EAP-TEAP/EAP-FAST in wpa_supplicant
2022-07-06 11:35:52 -07:00
David Garske
e92034cf6f
Merge pull request #5274 from JacobBarthelmeh/Certs
...
remove subject/issuer email from altEmailNames list
2022-07-06 10:48:21 -07:00
gojimmypi
e2484a97f2
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into ESP32_HW_Update_PR
2022-07-06 09:32:07 -07:00
gojimmypi
8bb6ff8dbb
Espressif HW acceleration update & cleanup
2022-07-06 09:30:49 -07:00
Jacob Barthelmeh
711b2bb17a
add a test case
2022-07-06 09:39:03 -06:00
David Garske
a171bebba4
Fix the wc_EccPublicKeyToDer_ex doxy.
2022-07-06 07:58:18 -07:00
Marco Oliverio
3abffc3a3c
doc: add documentation for wolfDTLS[v1_3]_*_method()
2022-07-06 16:18:44 +02:00
Marco Oliverio
683adb5917
tests: add dtls downgrade tests
2022-07-06 16:18:44 +02:00
Marco Oliverio
fd4836772b
examples: support DTLS version downgrading
2022-07-06 16:18:44 +02:00
Marco Oliverio
df7e81d187
dtls: support version negotiation
2022-07-06 16:18:44 +02:00
Marco Oliverio
8fe3f51ecb
dtls13: client: recompute transcript hash on downgrade
...
If a lower version is negotiated, the transcript hash must be recomputed using
the <= v1.2 rules.
2022-07-06 16:18:44 +02:00
Marco Oliverio
5d74c49ecb
dtls13: allow processing of HelloVerifyRequest to support downgrade
...
HelloVerifyRequest is used in DTLSv1.2 to perform a return routability check, so
it can be the legitim reply from a DTLSv1.2 server to a ClientHello.
2022-07-06 16:18:44 +02:00
David Garske
ec8149cd69
Merge pull request #5324 from julek-wolfssl/dtls13-hrr-fix
...
TLSX_COOKIE is only defined with WOLFSSL_SEND_HRR_COOKIE
2022-07-06 06:56:25 -07:00
Juliusz Sosinowicz
9b085a44be
sessionSecretCb should only be called when a ticket is present
2022-07-06 15:08:57 +02:00
Juliusz Sosinowicz
63b4c475d4
wolfSSL_set_session_secret_cb: fix for NULL input
2022-07-06 14:23:08 +02:00
Juliusz Sosinowicz
39e53c2b7c
Add wc_EccPublicKeyToDer_ex doxygen entry
2022-07-06 11:59:29 +02:00
Juliusz Sosinowicz
ef73409fd4
TLSX_COOKIE is only defined with WOLFSSL_SEND_HRR_COOKIE
2022-07-06 10:04:15 +02:00
Sean Parkinson
8b73feb8ef
SHA-512 ARM NEON: ensure data being hashed is 64-bit aligned
2022-07-06 16:18:18 +10:00
Jacob Barthelmeh
ff6edbff94
refactor name constraint checks
2022-07-05 17:20:50 -06:00
David Garske
9a256ca002
Merge pull request #5288 from haydenroche5/openldap
...
Add --enable-openldap option to configure.ac.
2022-07-05 16:04:51 -07:00
David Garske
4376ade9c8
Merge pull request #5123 from fabiankeil/configure-amd64-support
...
configure: Improve defaults for 64-bit BSDs
2022-07-05 13:52:02 -07:00
David Garske
08488b0fae
Merge pull request #5318 from embhorn/gh5314
...
Fix typos and bad macro names
2022-07-05 12:34:35 -07:00
Hayden Roche
f5a5d4ada5
Enhance OpenLDAP support.
...
- Add --enable-openldap to configure.ac
- Fix some issues around subject alt names and the WOLFSSL_GENERAL_NAME struct.
2022-07-05 10:40:07 -07:00
Fabian Keil
eb9a9ceef8
configure: Improve defaults for 64-bit BSDs
...
... by consistently treating host cpu "amd64" like host cpu "x86_64".
Tested on ElectroBSD amd64.
2022-07-05 19:37:31 +02:00
John Safranek
ded3f4e9b6
Merge pull request #5284 from julek-wolfssl/dtls-good-ch-cb
...
DTLS 1.3: additions for event driven server in wolfssl-examples
2022-07-05 10:14:59 -07:00
David Garske
1c009e8f91
Merge pull request #5311 from SparkiDev/ed_check_pubkey
...
Ed25519/Ed448: assume public key is not trusted
2022-07-05 09:25:50 -07:00
Eric Blankenhorn
394f36a0d7
Fix typos and bad macro names
2022-07-05 10:31:11 -05:00
Juliusz Sosinowicz
4caffee590
ForceZero the private key on import error
2022-07-05 13:44:31 +02:00
Juliusz Sosinowicz
20e5c98b2c
Error out when server indicates resumption but does full handshake
2022-07-05 09:42:39 +02:00
Juliusz Sosinowicz
fd7bf8d04d
Do resuming check as soon as we get a non-resumption msg
2022-07-05 08:49:00 +02:00
Juliusz Sosinowicz
144f2612e4
wc_ecc_export_x963_ex returns LENGTH_ONLY_E on a NULL output
2022-07-05 08:49:00 +02:00
Juliusz Sosinowicz
8e84560f71
CSR: confirm the signature when verify == VERIFY
2022-07-05 08:49:00 +02:00
Juliusz Sosinowicz
afaf41823c
wpa_supplicant uses larger challenge passwords for x509 requests
2022-07-05 08:49:00 +02:00
Juliusz Sosinowicz
5179741ddb
wpas: validate ecc points are on the curve
2022-07-05 08:48:37 +02:00
Juliusz Sosinowicz
ee3636f2e7
wc_EccPublicKeyToDer_ex: exporting the public key in compressed form
2022-07-05 08:48:18 +02:00
Juliusz Sosinowicz
448cde5a4b
Support for new DPP in wpa_supplicant
...
- Add null check to asn template code in MakeCertReq and test
- ENABLED_ECCCUSTCURVES can also be "all"
2022-07-05 08:48:18 +02:00
Sean Parkinson
4a962b7fb2
Ed25519/448: improvements
...
Check lengths of buffers in import functions.
priv/pub key set flag set on success only.
2022-07-05 09:02:05 +10:00
David Garske
1b64b82a6f
Merge pull request #5316 from LinuxJedi/fix-embos-mutex
...
Use the correct mutex type for embOS
2022-07-04 11:51:20 -07:00
David Garske
07b8f45d35
Merge pull request #5315 from rizlik/dtls_doDtls_fix
...
fix: examples/server: dtls mode checking
2022-07-04 10:20:20 -07:00
Andrew Hutchings
f8c67345d6
Use the correct mutex type for embOS
...
OS_MUTEX_Lock() is acutally a non-blocking mutex lock, for
wc_LockMutex() we need a blocking mutex. Switch to this.
2022-07-04 15:59:36 +01:00
Juliusz Sosinowicz
9dc2c27e3d
Expand wolfDTLS_SetChGoodCb() docs
2022-07-04 14:31:24 +02:00
Juliusz Sosinowicz
10c8a1668e
Reset cookie when resetting DTLS 1.3 state
2022-07-04 12:52:25 +02:00
Juliusz Sosinowicz
a8adde66c8
Use wc_HmacInit and wc_HmacFree in cookie logic
2022-07-04 12:51:50 +02:00
David Garske
00391a5ace
Rename callback to wolfDTLS_SetChGoodCb and add doxygen for it. Clarify DTLS_CTX.connected. Fix build errors for ./configure --enable-dtls --enable-dtls13 --disable-examples CFLAGS="-DNO_WOLFSSL_SERVER".
2022-07-04 11:08:39 +02:00
Juliusz Sosinowicz
7ea13bf5bf
Apply connected to sendto and address code review
2022-07-04 11:08:39 +02:00
Juliusz Sosinowicz
dd7073740b
DTLS 1.3: tie cookie to peer address
2022-07-04 11:08:39 +02:00
Juliusz Sosinowicz
e605cfeccb
Add docs for new features
2022-07-04 11:08:39 +02:00
Juliusz Sosinowicz
afdd5648aa
Address code review
2022-07-04 11:08:39 +02:00
Juliusz Sosinowicz
d72edd03b8
dtls: wolfSSL_set_dtls_fd_connected
...
wolfSSL_set_dtls_fd_connected sets the connected socket file descriptor. This descriptor should be called without addr and addr_len.
2022-07-04 11:08:39 +02:00
Juliusz Sosinowicz
c6aa4fc526
DTLS 1.3: allow the server to operate without maintaining state
2022-07-04 11:08:39 +02:00
Juliusz Sosinowicz
8fb48464e3
Add callback when we parse a verified ClientHello
2022-07-04 11:08:39 +02:00
Marco Oliverio
80f3db6e1d
fix: examples/server: dtls mode checking
...
This fixes using ssl to check if we are using dtls or not, when ssl is not yet
valid.
Fix: 060dfe1a69
2022-07-04 10:21:11 +02:00
Sean Parkinson
1077829f9d
Merge pull request #5313 from douzzer/20220701-sp_div-deadstore
...
fix clang-analyzer-deadcode.DeadStores in sp_div().
2022-07-04 08:32:50 +10:00
Sean Parkinson
7b9c214b3c
Merge pull request #4985 from kareem-wolfssl/iarWarningsFix
...
Fix compilation warnings from IAR.
2022-07-04 08:23:26 +10:00
Daniel Pouzzner
b16c2a2aef
fix clang-analyzer-deadcode.DeadStores in sp_div().
2022-07-01 23:49:58 -05:00
Daniel Pouzzner
5819332f89
Merge pull request #5312 from dgarske/fips_v5dev
...
FIPS in core hash using SHA2-256 and SHA2-384
2022-07-01 23:25:52 -05:00
David Garske
6c7db7318e
Merge pull request #5309 from kareem-wolfssl/arrayBoundFix
...
Pass in and check output length in SetCurve.
2022-07-01 18:58:42 -07:00
David Garske
b9be5c2c24
Update to FIPS v5-ready will use latest master. Support for FIPS in core hash using SHA2-256 and SHA2-384 in fips_test.h. Fixes for MATH_INT_T. Fix error: ‘tls13_kdf_test’ declared ‘static’ but never defined.
2022-07-01 15:40:21 -07:00
David Garske
bb68766bda
For ED255219 and ED448 if importing private only and public key is already set then check it.
2022-07-01 14:13:45 -07:00
Kareem
90749b7f88
Don't declare tls13_kdf_test if TLS 1.3 is not enabled, to avoid unused function warning.
2022-07-01 13:22:16 -07:00
Kareem
96aedc2f47
Fix SetCurve max sizes. Add fix for potentially uninitialized type in ProcessReplyEx.
2022-07-01 13:18:33 -07:00
Kareem
7a7d8d170d
Pass in and check output length in SetCurve.
2022-07-01 13:18:33 -07:00
David Garske
bd75e1d6a4
Merge pull request #5307 from kareem-wolfssl/miscfixes2
...
Fix a couple of STM32 bugs, and add some missing mutex frees.
2022-07-01 09:46:22 -07:00
David Garske
0459e83a59
Merge pull request #5310 from SparkiDev/memusage_fix_1
...
TLS memusage: reduce usage
2022-07-01 09:13:05 -07:00
Sean Parkinson
2c943282f0
Ed25519/Ed448: assume public key is not trusted
...
In defense against attack, assume the imported public key is not trusted
and check it matches the private key if set.
Added APIs that allow application to explicitly trust public key.
Original APIs default to not trusting public key.
2022-07-01 09:05:43 -07:00
Sean Parkinson
b9a8f18a97
Merge pull request #5300 from douzzer/20220629-multi-test-fixes
...
20220629-multi-test-fixes
2022-07-01 16:22:05 +10:00
Sean Parkinson
7d58dc5678
TLS memusage: reduce usage
...
Reduce the amount allocated to reduce maximum overall dynamic memory
usage.
Rework ServerKeyExchange by extracting the handling of the signed data.
2022-07-01 14:24:59 +10:00
Kareem
b2e7f4a8eb
Fix cast spacing. Don't cast in wolfSSL_X509_set_version, check is valid as is.
2022-06-30 16:26:43 -07:00
Kareem
7555cd0685
Fix a couple of STM32 bugs, and add some missing mutex frees.
2022-06-30 16:11:16 -07:00
David Garske
402a4dafd4
Merge pull request #5306 from kareem-wolfssl/ltc_ed235519
...
Fix missing return checks in KSDK ED25519 code.
2022-06-30 16:06:45 -07:00
Daniel Pouzzner
fc5f1f5eca
Merge pull request #5305 from dgarske/cryptonly
...
Improvements to configure.ac cryptonly and math selection
2022-06-30 17:55:27 -05:00
Daniel Pouzzner
2bdcbcc8be
src/tls13.c: fix whitespace.
2022-06-30 17:17:50 -05:00
Daniel Pouzzner
4f6527353b
src/{pk.c,x509.c}: style/clarity cleanups from dgarske.
2022-06-30 17:07:35 -05:00
Daniel Pouzzner
1a9388b935
src/pk.c: fix misuses around snprintf().
2022-06-30 17:07:35 -05:00
Daniel Pouzzner
28213ad198
src/x509.c: fix wolfSSL_X509_signature_print() to print raw signature algorithm as hex digits, not as an (unprintable) string; fix printed-null bug in wolfSSL_X509_NAME_print_ex() (relates particularly to calls from wolfSSL_X509_NAME_print_ex_fp()).
2022-06-30 17:07:35 -05:00
Daniel Pouzzner
5bd8288b37
fix printed-null bug in wolfssl_print_number().
2022-06-30 17:07:35 -05:00
Daniel Pouzzner
b7ec529f61
wolfcrypt/src/siphash.c: in wc_SipHash(), use FALL_THROUGH macro, not /* fall-through */.
2022-06-30 17:07:35 -05:00
Chris Conlon
867a1f7afa
Merge pull request #5289 from TakayukiMatsuo/tls13
2022-06-30 15:49:53 -06:00
Kareem
e09bbb1989
Fix compilation warnings from IAR.
2022-06-30 14:30:06 -07:00
Kareem
13beadbfc3
Fix missing return checks in KSDK ED25519 code.
2022-06-30 13:35:00 -07:00
David Garske
2f1e236305
Improvements to --enable-cryptonly in configure.ac output. Improvement to math select order in configure.ac and stray heap math=yes.
2022-06-30 12:42:55 -07:00
David Garske
ed1fdc410e
Merge pull request #5303 from SparkiDev/match_dyn_type_fix_1
...
Fix mismatched dynamic types
2022-06-30 08:56:43 -07:00
Stanislav Klima
26a62b4b9e
drafted pathlen for cert struct
2022-06-30 17:16:10 +02:00
TakayukiMatsuo
ba19737627
Add support for TLS1.3
2022-06-30 23:00:05 +09:00
David Garske
e8e35c9a92
Merge pull request #5301 from SparkiDev/aes_gcm_word_ct
...
AES-GCM: make word implementation of GMULT constant time
2022-06-29 20:26:33 -07:00
Sean Parkinson
1ba9ea9759
Fix mismatched dynamic types
2022-06-30 13:00:57 +10:00
David Garske
9cc928cb29
Merge pull request #5299 from SparkiDev/sp_submod_fix
...
SP int math; submod fix
2022-06-29 18:52:15 -07:00
Sean Parkinson
8b93d4510d
AES-GCM: make word implementation of GMULT constant time
...
If performance is impacted then define: AES_GCM_GMULT_NCT
2022-06-30 09:29:04 +10:00
Sean Parkinson
0159f17692
SP int math; submod fix
...
Fix for sp_submod() to reduce by modulus when a or b are equal to
modulus as well as when greater.
2022-06-30 08:53:25 +10:00
Sean Parkinson
f2acaa8ee9
Merge pull request #5242 from SKlimaRA/SKlimaRA/strict-verification
...
zd14249
2022-06-30 08:19:42 +10:00
David Garske
28d149a103
Merge pull request #5297 from ejohnstown/esp-build
...
ESP-IDF Build Cleanup
2022-06-29 14:03:02 -07:00
Daniel Pouzzner
e941a729a7
Merge pull request #5290 from embhorn/gh5270
...
Add support for aligned data with clang llvm
2022-06-29 12:14:42 -05:00
Kaleb Himes
2257030792
Merge pull request #5296 from dgarske/sniffer
...
Sniffer fixes (async TLS v1.3, async removal of `WC_HW_WAIT_E` and sanitize leak)
2022-06-29 09:16:54 -07:00
David Garske
999d3b3ab7
Merge pull request #5298 from douzzer/20220628-multi-test-and-crossbuild-fixes
...
20220628-multi-test-and-crossbuild-fixes
2022-06-29 09:14:59 -07:00
Daniel Pouzzner
5adf7e4eb7
wolfcrypt/src/asn.c wc_BuildEccKeyDer(): fix for clang-analyzer-deadcode.DeadStores.
2022-06-28 19:14:58 -05:00
Daniel Pouzzner
90aaeb283e
wolfcrypt/src/siphash.c: add missing !WOLFSSL_NO_ASM clause in gate around inline asm.
2022-06-28 18:19:58 -05:00
Daniel Pouzzner
ce61653a9a
wolfcrypt/src/asn.c: fixes for ARM portability (GetASN_Items()), unintended fallthrough (OidFromId()), and uninitialized variable (DecodeSubjInfoAcc()).
2022-06-28 18:18:42 -05:00
Daniel Pouzzner
17659ed48c
configure.ac: when --enable-fips=disabled, don't touch DEF_SP_MATH/DEF_FAST_MATH;
...
don't enable sp-math-all asm gates when !ENABLED_ASM;
add --with-arm-target to allow selecting thumb or cortex in conjunction with a full --host tuple (e.g. --host=armv6zk-softfloat-linux-gnueabi --with-arm-target=thumb).
2022-06-28 18:15:28 -05:00
David Garske
d76c46a96f
Fix for sniffer async issue with TLS v1.3.
2022-06-28 16:01:06 -07:00
David Garske
f51c29d3ca
Merge pull request #5293 from SparkiDev/asnt_setecc
...
ASN template: Handle HAVE_OID_ENCODING
2022-06-28 15:45:13 -07:00
John Safranek
e56394a2ab
ESP-IDF Build Cleanup
...
1. Update the list of files to leave out of the build. They are ones
that are included into ssl.c automatically.
2022-06-28 15:38:58 -07:00
Sean Parkinson
092b37f709
Merge pull request #5287 from haydenroche5/aes_ctr_clear_left_on_iv_set
...
Clear the leftover byte count in Aes struct when setting IV.
2022-06-29 08:30:01 +10:00
Sean Parkinson
28df62921a
Merge pull request #5292 from dgarske/freertos_memtrack
...
Fix for using track memory feature with FreeRTOS.
2022-06-29 08:00:36 +10:00
David Garske
e49f07694e
Fix for sniffer possible malloc of zero size causing a -fsanitize=address leak report.
2022-06-28 12:54:25 -07:00
David Garske
5ade360d9e
Fix to avoid using WC_HW_WAIT_E for sniffer. ZD14398
2022-06-28 12:38:57 -07:00
David Garske
b87b255d52
Merge pull request #5295 from rizlik/dtls13_bugfix
...
server: fix wrong minVersion setting when non in dtls
2022-06-28 09:35:23 -07:00
David Garske
741393e84f
Merge pull request #5291 from kaleb-himes/FRDM-K64-Fixes
...
Add necessary includes for cross-builds
2022-06-28 09:35:06 -07:00
Chris Conlon
14c65e0117
Merge pull request #5281 from miyazakh/example_japanese_translate
2022-06-28 10:08:06 -06:00
Chris Conlon
cb80ffc1b5
Merge pull request #5251 from kojo1/ja
2022-06-28 09:51:21 -06:00
David Garske
d4d7e2e5f2
Merge pull request #5294 from SparkiDev/sp_math_all_no_128bit
...
SP math all: don't use sp_int_word when SQR_MUL_ASM available
2022-06-28 07:38:42 -07:00
Marco Oliverio
060dfe1a69
server: fix wrong minVersion setting when non in dtls
2022-06-28 12:10:18 +02:00
Sean Parkinson
22336d30e5
SP math all: don't use sp_int_word when SQR_MUL_ASM available
...
1. _WIN64 doesn't have 128-bit type but now can use 64-bit sp_int_digit
when assembly code snippets are being used.
2. Fix sp_div() to support values closer to maximum size.
3. Fix builds to work for more configurations.
4. Have ECC uncompressed code keep intermediate values in range of
maximum (x^3 calculation fixed).
5. Fix configuation.ac's check of FIPS for using signed SP Math All.
Default now not signed as intended.
2022-06-28 15:51:53 +10:00
Sean Parkinson
3c3a90c988
ASN template: Handle HAVE_OID_ENCODING
...
When HAVE_OID_ENCODING is defined, the named curve OID is encoded rather
than the full OID.
Use SetCurve to get the OID encoding in ASN template implemenation.
2022-06-28 09:04:42 +10:00
David Garske
31498de7a9
Fix for using track memory feature with FreeRTOS.
2022-06-27 14:08:45 -07:00
kaleb-himes
9d11e9092f
Add necessary includes for cross-builds
2022-06-27 13:50:27 -06:00
David Garske
94e7eacc5f
Merge pull request #5072 from JacobBarthelmeh/Compatibility-Layer
...
add support for importing private only EC key to a WOLFSSL_EVP_PKEY s…
2022-06-27 12:34:00 -07:00
David Garske
456e463640
Merge pull request #5283 from SparkiDev/sp_arm32_asm_rework
...
SP ASM ARM32: reworked generation using common asm ruby code
2022-06-27 09:17:20 -07:00
David Garske
b84b808b1b
Merge pull request #5167 from ejohnstown/cac-ext
...
Add support for some FPKI certificate cases, UUID, FASC-N, PIV extension
2022-06-27 09:06:15 -07:00
Sean Parkinson
999fa8394e
SP ASM ARM32: reworked generation using common asm ruby code
...
Add support for ARMv6 and ARMv3.
2022-06-27 11:19:50 +10:00
Hayden Roche
10dfd8d129
Clear the leftover byte count in Aes struct when setting IV.
...
Setting the key already does this. The same needs to be done when setting the
IV.
2022-06-26 15:56:05 +04:00
David Garske
55414290df
Merge pull request #5286 from douzzer/20220624-multi-test-fixes-sp-math-default
...
20220624-multi-test-fixes-sp-math-default
2022-06-24 19:26:49 -07:00
Daniel Pouzzner
9211825121
sp_int.c: fix refactor of undefined-semantics shift in _sp_mul().
2022-06-24 18:04:51 -05:00
Daniel Pouzzner
790584113f
configure.ac: WOLFSSL_WPAS[_SMALL] requires OPENSSL_EXTRA.
2022-06-24 16:38:56 -05:00
Jacob Barthelmeh
49740c5543
initialize variables
2022-06-24 15:21:20 -06:00
Daniel Pouzzner
9a29dfc8cb
fix whitespace.
2022-06-24 16:08:38 -05:00
Daniel Pouzzner
047c662af8
fix math errors unmasked by change to sp-math-all as default math back end.
2022-06-24 15:56:54 -05:00
Daniel Pouzzner
940d0140f9
configure.ac fixes related to change in default math back end (to sp-math-all): wolfRand doesn't use fastmath;
...
FIPS v5-dev follows the non-FIPS default (now sp-math-all);
add -DWC_NO_CACHE_RESISTANT to AM_CFLAGS when $ENABLED_HARDEN != yes;
add ENABLED_BIGNUM sensor and use it in linuxkm math back end assert;
add configuration callout for "Side-channel Hardening" reporting value of $ENABLED_HARDEN.
2022-06-24 15:55:08 -05:00
Jacob Barthelmeh
1977a13754
improve comment for FPKI additions
2022-06-24 12:04:26 -06:00
JacobBarthelmeh
8dfcc76f50
Merge pull request #5279 from embhorn/gh5273
...
Fix config with WOLFSSL_WPAS_SMALL
2022-06-24 11:22:58 -06:00
David Garske
5ef507c78d
Merge pull request #5280 from douzzer/20220623-enable-dh-const
...
--enable-dh=const
2022-06-24 08:29:35 -07:00
Stanislav Klima
ce977e8c0b
requested review changes 2
2022-06-24 15:37:10 +02:00
David Garske
00b82888bc
Merge pull request #4759 from dgarske/sp_math_default
...
Enable wolfSSL SP Math all (sp_int.c) by default
2022-06-23 16:14:54 -07:00
Hideki Miyazaki
c34c32f621
translated Japanese messages
2022-06-24 08:09:28 +09:00
Jacob Barthelmeh
43e11ec756
improve comments for subject name email matching
2022-06-23 15:52:28 -06:00
JacobBarthelmeh
4de90efbe2
clear out PKEY when setting new key
2022-06-23 14:21:53 -07:00
Daniel Pouzzner
a5250482ce
examples/: refactor a couple help strings to avoid hitting clang-tidy bugprone-suspicious-missing-comma.
2022-06-23 15:25:23 -05:00
Daniel Pouzzner
768737d21e
configure.ac: support --enable-dh=const, and link with libm ("LT_LIB_M") only if ENABLED_DH = yes.
2022-06-23 15:00:59 -05:00
Jacob Barthelmeh
79ea30a957
memory free on failure, spelling, better function name
2022-06-23 13:40:45 -06:00
Eric Blankenhorn
02dde373d1
Add support for aligned data with clang llvm
2022-06-23 13:26:11 -05:00
David Garske
78d3284c3c
Fix for FIPS 140-2 and older ACVP math selection. Fix for building with "--disable-sp-math-all --disable-fastmath". Fix for building SAKKE with HAVE_WOLF_BIGINT.
2022-06-23 11:10:44 -07:00
David Garske
e2ad62b3d1
Merge pull request #5266 from rizlik/udp_help
...
examples: update usage() with DTLSv1.3 version
2022-06-23 09:27:53 -07:00
Eric Blankenhorn
7fb17e0584
Fix build error with --enable-opensslextra=x509small --enable-debug
2022-06-23 11:26:57 -05:00
Eric Blankenhorn
1cdc81546d
Fix config with WOLFSSL_WPAS_SMALL
2022-06-23 09:19:14 -05:00
Sean Parkinson
ee12c12e98
Fixes required to make SP Math default
...
fasthugemath means turn on fastmath
Use sp_int_digit and not sp_digit in sp_int.c.
test.c needs to use large static buffer when SP Math used like fastmath.
When building static memroy, SP math all without WOLFSSL_SP_NO_MALLOC is
a valid configuration.
Fix freeing of bigint in sp_int.c.
Cast x to a signed value to negate and then back to unsigned. (For
Windows builds.)
Remove warning about empty file on Windows about integer.obj.
Allow RSA verify only and RSA public only to be used with other public
key algorithms.
If building for FIPS, then older versions of RSA and ECC require SP Math
to support negative numbers.
Get old FIPS files building with SP int.
Disallow --enable-sp-math and --enable-sp-math-all.
When just --enable-sp-math on configuration line then disable SP Math
all.
2022-06-23 14:15:54 +10:00
Sean Parkinson
8d804f6378
Merge pull request #5260 from dgarske/sp_ecc_nb_hash
...
Fix for SP math ECC non-blocking to always check `hashLen`
2022-06-23 07:59:28 +10:00
Marco Oliverio
fdc4cdf5ec
examples: update usage() with DTLSv1.3 version
2022-06-22 18:50:18 +02:00
Sean Parkinson
acc9f3701a
Merge pull request #5261 from dgarske/sha3_shake_flags
...
Configure fixes for SHA3 and SHAKE256
2022-06-22 11:50:28 +10:00
Jacob Barthelmeh
40dda7e80f
fix XMALLOC in test and add filesystem macro guard
2022-06-21 17:24:14 -06:00
David Garske
deb0c3e6fa
Merge pull request #5272 from lealem47/skip
...
Display SKIP instead of PASS when tests skipped for make check
2022-06-21 16:06:58 -07:00
David Garske
4db7732d78
Fixes for --enable-sha3 reproducibility with small. Fixes for shake256 typo and making sure WOLFSSL_NO_SHAKE256 gets set when disabled. Replaces PR #4225 .
2022-06-21 16:02:42 -07:00
Jacob Barthelmeh
7d62fd09e4
remove subject/issuer email from altEmailNames list
2022-06-21 16:59:36 -06:00
David Garske
74d692d6d5
Fix for SP math ECC non-blocking to always check hashLen. ZD14141
2022-06-21 15:54:01 -07:00
Chris Conlon
9e1ecf3fb5
Merge pull request #5194 from TakayukiMatsuo/heaphint
2022-06-21 16:39:07 -06:00
Chris Conlon
7dbf1a5154
Merge pull request #5262 from miyazakh/qt_unit_failure
2022-06-21 16:35:37 -06:00
Chris Conlon
bd536d3c9d
Merge pull request #5229 from miyazakh/sce_example_update
2022-06-21 16:33:54 -06:00
Lealem Amedie
40d9473e6a
Display SKIP instead of PASS when tests skipped for make check
2022-06-21 13:11:08 -07:00
David Garske
b8cff49044
Merge pull request #5268 from anhu/micrium_dtls_guard
...
Fix missing WOLFSSL_DTLS guard in Micrium build
2022-06-21 12:01:47 -07:00
Anthony Hu
099afe4419
errant if
2022-06-21 11:33:08 -04:00
Anthony Hu
beddc777d4
milliseconds not only for DTLS13
2022-06-21 11:07:19 -04:00
Anthony Hu
f05bcb30e0
div by 4 in milliseconds
2022-06-21 10:48:48 -04:00
Anthony Hu
ff4eabb17f
same fix to MicriumReceive
2022-06-21 10:42:20 -04:00
Anthony Hu
1e84d1eb67
Change inspired by Rizlik review comments.
2022-06-21 10:22:44 -04:00
David Garske
d41745cd28
Merge pull request #5269 from anhu/micrium_xstr
...
Fixup XSTR processing for MICRIUM
2022-06-20 16:23:06 -07:00
Anthony Hu
0b0518bd55
Fixup XSTR processing for MICRIUM
2022-06-20 17:00:24 -04:00
Anthony Hu
73435389ed
Fix missing WOLFSSL_DTLS in Micrium build
2022-06-20 16:33:04 -04:00
David Garske
38ac96aefb
Merge pull request #5267 from douzzer/20220620-multi-test-fixes
...
20220620-multi-test-fixes
2022-06-20 12:13:39 -07:00
Daniel Pouzzner
69ca1d37c0
fixes for defects identified by wolfssl-multi-test: whitespace, missing void in arg lists, and -Wunused-but-set-variable found by clang-15 (prerelease).
2022-06-20 10:54:55 -05:00
Stanislav Klima
7c827d3a82
requested review changes
2022-06-20 11:27:09 +02:00
David Garske
db6c14e7f9
Merge pull request #5265 from SparkiDev/dh_api_names
...
DH: Fix names wolSSL_* -> wolfSSL_*
2022-06-19 20:24:12 -07:00
Sean Parkinson
fab05f2527
DH: Fix names wolSSL_* -> wolfSSL_*
2022-06-20 08:58:35 +10:00
Sean Parkinson
59e19cfd6c
Merge pull request #5258 from dgarske/stm32u5_bench
...
Fixes for STM32 Hash/PKA and additional benchmark
2022-06-20 08:33:25 +10:00
Hideki Miyazaki
b5cac49be9
fix qt_unit_test_failure
...
add/remove spaces and line-feed to be the same as before
2022-06-18 10:04:10 +09:00
David Garske
390908bccc
Merge pull request #5236 from SparkiDev/mem_zero
...
Check memory is zeroized
2022-06-17 12:01:34 -07:00
David Garske
92fcea39db
Fix for DES3 with STM32 and STM32_CRYPTO_AES_ONLY (broken in #5223 ) . Add U5 PKA support and benchmarks. Fix MD5 with OPENSSL_EXTRA and HAVE_MD5_CUST_API.
2022-06-17 11:50:29 -07:00
David Garske
9c5821569f
For STM32 hashing to wait for hash done on block size + 1 word. Updated the STM32U5 benchmarks. Added note about new GCM_TABLE_4BIT.
2022-06-17 09:07:45 -07:00
David Garske
2f6b5a97a4
Merge pull request #5257 from SparkiDev/i2d_RSA_fix
...
i2d AIPs move pointer on when a pointer to a buffer is passed in
2022-06-16 21:44:23 -07:00
Sean Parkinson
6a0682d422
i2d AIPs move pointer on when a pointer to a buffer is passed in
...
Restore behaviour to be compatible with OpenSSL.
Replace comparison of DER data using AsserStrEQ to use memcmp.
2022-06-17 12:36:06 +10:00
Sean Parkinson
66775d90d4
Merge pull request #5250 from dgarske/rsa_public
...
Fix to expose the RSA public DER export functions with certgen
2022-06-17 12:25:19 +10:00
Sean Parkinson
4fc709d2af
Merge pull request #5256 from dgarske/cert_chain_der
...
Fixes for loading a DER/ASN.1 certificate chain
2022-06-17 11:55:49 +10:00
David Garske
6795e1bf21
Attempt to fix issue with duplicate prototype wc_RsaKeyToPublicDer with FIPS v2 selftest.
2022-06-16 16:51:51 -07:00
David Garske
e34dda9383
Fix to expose the RSA public DER export function with certgen. The core function SetRsaPublicKey was being compiled, but the wrappers wc_RsaKeyToPublicDer and wc_RsaKeyToPublicDer_ex were not included.
2022-06-16 16:36:17 -07:00
David Garske
128ebf54e9
Fix for loading certificate DER chain longer than 2 deep. Fix to properly trap BUFFER_E in ProcessUserChain. ZD14048.
2022-06-16 16:19:37 -07:00
Hideki Miyazaki
fe8169c830
Add multi thread use case for RA6M4
...
fix devId conflict while using multi threads
update README
Fix TSIP examples bcause of updating user context
2022-06-17 07:44:12 +09:00
Sean Parkinson
2834c22ce0
Merge pull request #5204 from lealem47/basicConst
...
Encoding the X509 Basic Constraint when CA:FALSE
2022-06-17 08:33:57 +10:00
David Garske
f2abf1892c
Merge pull request #5255 from lealem47/i2d_RSA
...
Call RSA_To_Der instead of RSA_To_Der_ex in i2dd_RSA key funcs
2022-06-16 14:43:58 -07:00
David Garske
1322c1a0b2
Merge pull request #5248 from lealem47/no_aes
...
Fix build failure caused by missing NO_AES macro guard
2022-06-16 13:18:09 -07:00
Lealem Amedie
911f361285
Call RSA_To_Der instead of RSA_To_Der_ex in i2d_RSA key funcs
2022-06-16 12:26:47 -07:00
David Garske
8c0157c035
Merge pull request #5253 from rizlik/clang_uninit
...
kdf: fix clang uninitialized.Assign
2022-06-16 11:06:43 -07:00
John Safranek
8f7db87f01
Merge pull request #5249 from dgarske/rsa_ifc
...
Cleanup the RSA consistency check
2022-06-16 09:14:08 -07:00
Lealem Amedie
5e63740c6c
Ensuring that X509 Basic Constraint is set when CA:FALSE
2022-06-16 08:46:52 -07:00
David Garske
7560199f18
Merge pull request #5254 from rizlik/nigthly_fixes
...
dtls: abide deadstore static analyzer warnings
2022-06-16 07:42:38 -07:00
David Garske
8f0da12824
Merge pull request #5252 from SparkiDev/mod_zero
...
TFM: mp_exptmod_ex didn't handle exceptional cases
2022-06-16 07:42:17 -07:00
Marco Oliverio
6a0c6049ce
dtls: abide deadstore static analyzer warnings
2022-06-16 14:02:09 +02:00
Marco Oliverio
621f4f14af
kdf: fix clang uninitialized.Assign
...
commit f1ce0cc95d tigger static analyzer warnings
about unitialized assign.
2022-06-16 13:55:46 +02:00
David Garske
6d2a41b9fd
Enable wolfSSL SP Math all (sp_int.c) by default. If --enable-fastmath or USE_FAST_MATH is set the older tfm.c fast math will be used. To use the old integer.c heap math use --enable-heapmath or USE_INTEGER_HEAP_MATH.
2022-06-16 10:57:30 +10:00
Sean Parkinson
8145ee6cef
TFM: mp_exptmod_ex didn't handle exceptional cases
...
fp_exptmod_ex() changed to match execptional case handling in
fp_exptmod().
2022-06-16 10:47:00 +10:00
Sean Parkinson
1b29f7353a
Check memory is zeroized
...
Add a define WOLFSSL_CHECK_MEM_ZERO to turn on code that checks that
memory that must be zeroized before going out of use is zero.
Everytime sensitive data is put into a allocated buffer or stack buffer;
the address, its length and a name is stored to be checked later.
Where the stack buffer is about to go out of use, a call is added to
check that the required parts are zero.
wc_MemZero_Add() adds an address with length and name to a table of
addressed to be checked later.
wc_MemZero_Check() checks that the memory associated with the address is
zeroized where required.
mp_memzero_add() adds mp_int's data pointer with length and name to
table.
mp_memzero_check() checks that the data pointer is zeroized where
required.
Freeing memory will check the address. The length was prepended on
allocation.
Realloction was changed for WOLFSSL_CHECK_MEM_ZERO to perform an
allocate, check, copy, free.
2022-06-16 10:22:32 +10:00
Takashi Kojo
8f68e32ef1
initial tranlation of API headers in JA
2022-06-16 08:24:18 +09:00
David Garske
7e1549c684
Cleanup the RSA consistency check. Should only be enabled for FIPS v2 (3389), FIPS v5 or later. Can be forcefully enabled for non-FIPS using WOLFSSL_RSA_KEY_CHECK. The existing WOLFSSL_NO_RSA_KEY_CHECK macro will also disable it. This change was introduced in PR #4359 .
2022-06-15 14:46:23 -07:00
David Garske
fb704774a0
Merge pull request #4907 from rizlik/dtls13
...
DTLSv1.3 support
2022-06-15 13:57:02 -07:00
Lealem Amedie
9bcbd645d6
Fix build failure caused by missing NO_AES macro guard
2022-06-15 13:30:56 -07:00
David Garske
dab0d5a7b0
Merge pull request #5240 from SparkiDev/sp_armv6
...
SP ARM32: support for arch with no ldrd/strd and clz
2022-06-15 11:28:30 -07:00
David Garske
d9d8b7e2d8
Merge pull request #5245 from SparkiDev/force_zero
...
Memory zeroization fixes
2022-06-15 11:16:04 -07:00
David Garske
aa8df1af78
Fixes for building without DTLS v1.2 and TLS v1.2. Fixes for explicit cast warnings.
2022-06-15 10:49:18 -07:00
Marco Oliverio
3a9176bcc9
scripts: test for dtls13 retransmission
...
Co-authored-by: Juliusz Sosinowicz <juliusz@wolfssl.com >
2022-06-15 10:46:43 -07:00
Marco Oliverio
25cf98a417
test: add DTLSv1.3 test suites
2022-06-15 10:46:43 -07:00
Marco Oliverio
12a3efeca8
client/server: tolerate WANT_WRITE errors
2022-06-15 10:46:43 -07:00
Marco Oliverio
4e112419f5
examples: client/server: support DTLSv1.3 (-u -v4)
...
This commits add some new options to examples/[server,client] to support testing
of DTLS v1.3.
client: add waitTicket option
If this option is used, the client will wait until it receives a sessionTicket
from the server. This is useful when testing DTLS retransmission.
client: add waitKeyUpdate option
When this option is set, the client waits until the UpdateKey message is
acknowledged by the server. This is useful to test DTLS retransmission logic
2022-06-15 10:46:43 -07:00
Marco Oliverio
c1dc90d9b0
server: request cert only once if doing post-handshake auth
2022-06-15 10:46:43 -07:00
Marco Oliverio
ca05ad2dc0
dtls13: introduce wolfSSL_dtls_13_has_pending_msg() API
2022-06-15 10:46:43 -07:00
Marco Oliverio
e2abdf23a7
internal: return from wolfSSL_Peek() with sz 0 if we don't have data
...
This way we can use wolfSSL_Peek() invoked with sz == 0 to process pending
records and, if none of this records is an application data record, we will not
block.
2022-06-15 10:46:43 -07:00
Marco Oliverio
dfc9873c0f
dtls13: support KeyUpdate messages
2022-06-15 10:46:43 -07:00
Marco Oliverio
d1924928c0
dtls13: support retransmission
...
Introduce ACK and retransmission logic, encapsulated in a Dtls13RtxFsm
object. The retransmission or the sending of an ACK is scheduled by setting the
appropriate flag inside the Dtls13RtxFSM object but the actual writing on the
socket is deferred and done in wolfSSL_Accept/Connect.
* Retransmission
Each sent message is encapsulated in a Dtl13RtxRecord and saved on a list. If we
receive an ACK for at record, we remove it from the list so it will be not
retransmitted further, then we will retransmit the remaining
ones. Retransmission is throttled: beside link congestion, this also avoid too
many sequence numbers bounded with a record.
* ACK
For each received record we save the record sequence number, so we can send an
ACK if needed. We send an ACK either if explicitly needed by the flight or if we
detect a disruption.
Co-authored-by: Juliusz Sosinowicz <juliusz@wolfssl.com >
2022-06-15 10:46:43 -07:00
Marco Oliverio
d079662765
dtls13: support fragmentation, sending and receiving
...
This commit implements the core of the header parsing, building, and the sending
and receiving routines that handle fragmentation and defragmentation.
* In DTLSv1.3 the header used for protected messages is a variable-length header,
and it is described RFC9147 Section 4.
* Fragmentation happens after building the full message, if necessary. If the
underlying I/O can't send a fragment because of a WANT_WRITE error, the sending
of fragments will continue in the next invocation of
wolfSSL_connect/wolfSSL_accept/wolfSSL_write. In this case the message is saved
in a buffer inside the WolfSSL object.
* Defragmentation works like DTLSv1.2 defragmentation, and re-use
most of the same code.
* The Dtls13AddHeaders() function does not add the record layer header, but it
lefts space for it. It is eventually placed by BuildTls13Message() to allow
easier management of sequence numbers.
2022-06-15 10:46:43 -07:00
Marco Oliverio
173077b142
dtls: refactor DtlsUpdateWindow() window
...
split the DtlsUpdateWindow() function, so part of the code can be reused by
DTLSv1.3 code.
2022-06-15 10:46:43 -07:00
Marco Oliverio
30fb664163
internal.c: add runProcessingOneRecord section
...
DTLSv1.3 needs to do some operation per-record, this commit adds an appropriate
section to ProcessReplyEx.
2022-06-15 10:46:43 -07:00
Marco Oliverio
2696c3cdd3
dtls13: change encryption keys dynamically based on the epoch
...
In DTLSv1.3, because of retransmission and reordering, we may need to encrypt or
decrypt records with older keys. As an example, if the server finished message
is lost, the server will need to retransmit that message using handshake traffic
keys, even if he already used the traffic0 ones (as, for example, to send
NewSessionTicket just after the finished message).
This commit implements a way to save the key bound to a DTLS epoch and setting
the right key/epoch when needed.
2022-06-15 10:46:43 -07:00
Marco Oliverio
de04973051
dtls13: record number encryption and decryption
2022-06-15 10:46:43 -07:00
Marco Oliverio
60834ba516
dtls13: new methods and version negotiation
2022-06-15 10:46:42 -07:00
Marco Oliverio
9d22e11776
misc.c: introduce w64wrapper to handle 64bit numbers
...
as word64 is not always available, introduce an abstract type and companion
operations. They use a word64 if available and fallback on word32[2] otherwise.
2022-06-15 10:46:42 -07:00
Marco Oliverio
7586851734
dtls13: export functions
...
They will be used by DTLSv1.3 code
2022-06-15 10:46:42 -07:00
Marco Oliverio
d8ac35579c
dtls13: add autotools, cmake build options and vstudio paths
2022-06-15 10:46:42 -07:00
John Safranek
d51ba35ff9
Merge pull request #5246 from rizlik/dtls_header_fixes
...
dtls: handshake header parsing fixes
2022-06-15 09:33:41 -07:00
Marco Oliverio
6630a83182
dtls: handshake header parsing fixes
2022-06-15 12:00:26 +02:00
Sean Parkinson
e073500e8e
SP ARM32 ASM: Improve performance of P-256 mont mul/sqr
2022-06-15 16:39:13 +10:00
Sean Parkinson
af4fff80db
SP ARM32: support for arch with no ldrd/strd and clz
...
Defined WOLFSSL_SP_ARM_ARCH to be less than 7 to use alternative
instructions.
2022-06-15 12:07:49 +10:00
Sean Parkinson
f1ce0cc95d
Memory zeroization fixes
...
Zeroize secrets in stack buffers and allocated memory.
mp_forcezero to ensure private MP integers are zeroized.
Fix whitespace and add some comments.
2022-06-15 11:26:11 +10:00
Sean Parkinson
9656963f61
Merge pull request #5231 from dgarske/glitch_harden
...
Added sanity check on TLS encrypt to trap against glitching
2022-06-15 09:48:18 +10:00
Sean Parkinson
ed5470c991
Merge pull request #5239 from dgarske/asn_decode_ext
...
Fix for ASN template parsing of extended key usage
2022-06-15 09:29:44 +10:00
David Garske
0cac6cef39
Merge pull request #5237 from anhu/bench_psk
...
Support psk ciphersuites in benchmarks.
2022-06-14 16:12:15 -07:00
David Garske
ed6c9639d6
Merge pull request #5243 from douzzer/20220614-multi-test-fixups
...
20220614-multi-test-fixups
2022-06-14 16:11:44 -07:00
Daniel Pouzzner
f414e65d4b
linuxkm: eliminate duplicative WOLFSSL_KTHREADS macro (just use WOLFSSL_LINUXKM).
2022-06-14 12:45:30 -05:00
David Garske
2f4864cab2
Added sanity check on TLS encrypt to trap against glitching.
2022-06-14 09:37:44 -07:00
David Garske
7a25b9cd85
Merge pull request #5241 from SparkiDev/wycheproof_sp_arm64_asm
...
SP ASM: fixes for Wycheproof tests
2022-06-14 09:08:15 -07:00
Anthony Hu
22eee3206d
Fixups from review by dgarske
2022-06-14 11:13:28 -04:00
Daniel Pouzzner
a22da10956
linuxkm: tweak setup of wolfSSL_Mutex to assure complete type availability in applications (client modules).
2022-06-14 09:45:33 -05:00
Daniel Pouzzner
5a8c130040
fix whitespace
2022-06-14 09:43:05 -05:00
Stanislav Klima
a0dd92234b
draft
2022-06-14 13:37:49 +02:00
David Garske
fb10c90935
Fix for Cube HAL v2 back-to-back DES/DES3. Whitespace. Enable the new FIFO 16 block logic for all hardware that supports it.
2022-06-14 11:48:51 +02:00
David Garske
c52c2e5dfb
Fixes for STM32H7 hash and crypto.
2022-06-14 11:48:51 +02:00
David Garske
ad3f7e1de2
The STM32U5 does not support DES3 or AES 192-bit (only 128/256 bit)
2022-06-14 11:48:51 +02:00
David Garske
502cbc3847
Fix for STM32U5 hash/crypto support. ZD 14305.
2022-06-14 11:48:51 +02:00
Sean Parkinson
013066ca06
SP ASM: fixes for Wycheproof tests
...
ARM64 ASM: Fix P256 Montogomery Reduce.
Fix div to handle large dividend word.
2022-06-14 16:11:46 +10:00
David Garske
c0f49b57e1
Fix for ASN template parsing of DecodeExtKeyUsage. ZD 14344.
2022-06-13 16:50:20 -07:00
David Garske
af3a55a94c
Merge pull request #5220 from kaleb-himes/ZD14318
...
Resolves inter-library API conflict reported in ZD14318
2022-06-13 14:28:13 -07:00
David Garske
f401a3b53d
Merge pull request #5232 from cconlon/june10
...
test/benchmark.c: rename Android tag, reset vars in memcb_test()
2022-06-13 14:24:17 -07:00
Anthony Hu
4d4ee3b2db
Support psk ciphersuites in benchmarks.
...
Also fixed some small errors during shutdown in benchmarks.
Tested with:
./configure --enable-psk CFLAGS=-DWOLFSSL_STATIC_PSK
make all check
./examples/benchmark/tls_bench
2022-06-13 13:33:51 -04:00
Chris Conlon
364bf482eb
adjust wolfCrypt test/benchmark Android log TAG name, reset malloc/free counts in memcb_test()
2022-06-13 09:42:02 -06:00
David Garske
0b78961111
Merge pull request #5186 from SparkiDev/pk_c_rework_1
...
pk.c: rework
2022-06-13 08:35:09 -07:00
David Garske
5018da7f9f
Merge pull request #5234 from gojimmypi/PR_Espressif_Version_README
...
Add note regarding ESP-IDF Version
2022-06-13 08:34:25 -07:00
David Garske
9ee1833bd2
Merge pull request #5235 from SparkiDev/sess_sec_cb_fixup
...
Improve SessionSecret_callback code.
2022-06-13 08:21:45 -07:00
Sean Parkinson
1de54ed8d7
Improve SessionSecret_callback code.
2022-06-13 10:43:09 +10:00
Sean Parkinson
8899112456
Merge pull request #5230 from dgarske/tls_bench
...
Fix for TLS v1.1 length sanity check for large messages
2022-06-13 09:38:03 +10:00
gojimmypi
f35eb20954
Add note regarding ESP-IDF Version
2022-06-12 12:39:04 -07:00
David Garske
d5791d5c74
Fixes for TLS benchmarking app (tls_bench) for shutdown and formatting brace cleanups.
2022-06-10 13:48:46 -07:00
David Garske
cafe5646b6
Fix for TLS v1.1 length sanity check for large messages.
2022-06-10 13:35:06 -07:00
David Garske
afc63a3bfa
Merge pull request #5199 from embhorn/zd12999
...
Add doc for wolfSSL_dtls_retransmit
2022-06-10 10:57:17 -07:00
David Garske
d600a4b887
Spelling and Whitespace cleanups. Fix issue with trying to build pk.c directly and always getting warn even with WOLFSSL_IGNORE_FILE_WARN.
2022-06-10 09:06:55 -07:00
David Garske
ba3991af5e
Merge pull request #5228 from haydenroche5/strongswan
...
Add an --enable-strongswan option to configure.ac.
2022-06-10 08:19:32 -07:00
David Garske
49008b169c
Merge pull request #5087 from haydenroche5/x509_print
...
Add support for more extensions to wolfSSL_X509_print_ex.
2022-06-10 08:19:23 -07:00
Jacob Barthelmeh
c59ec54713
initialize variable to fix warning
2022-06-10 06:22:54 -06:00
Jacob Barthelmeh
ba20f54b5b
add UPN other name parsing and updating skip
2022-06-09 21:32:55 -06:00
Sean Parkinson
890abfbefc
pk.c: rework
...
Re-order RSA functions.
Add comments to RSA functions.
Rework RSA function implementations.
2022-06-10 09:54:32 +10:00
David Garske
df673b987e
Merge pull request #5227 from LinuxJedi/embOS-emNET
...
Support for SEGGER embOS and emNET
2022-06-09 08:04:29 -07:00
David Garske
9954afa538
Merge pull request #5222 from tmael/rsa_sanity
...
Add a sanity check in RsaPad_OAEP
2022-06-09 08:04:16 -07:00
Hayden Roche
f479600066
Add support for more extensions to wolfSSL_X509_print_ex.
...
- Key usage
- Extended key usage
- Subject alt name
Additionally, print out the criticality of the extensions.
2022-06-09 16:50:10 +02:00
Hayden Roche
df87eb5508
Add an --enable-strongswan option to configure.ac.
...
Also, clean up some repetition around adding `-DHAVE_OCSP`.
2022-06-09 16:24:41 +02:00
Andrew Hutchings
190476dafe
Support for SEGGER embOS and emNET
...
Adds support for embOS memory and mutex functions. Also adds support for
emNET's error codes, it uses a BSD compatible TCP/IP stack for network
functions.
There is no easy native way to detect that you are compiling with emNET
or embOS so these require the user to define WOLFSSL_EMBOS /
WOLFSSL_EMNET.
2022-06-09 11:34:55 +01:00
Tesfa Mael
2748bfc737
Add a check in RsaPad_OAEP
2022-06-08 10:07:26 -07:00
David Garske
9fb1143eba
Merge pull request #5218 from gojimmypi/PR_zepher_legacy_link
...
add link to new location for old zephyr references
2022-06-07 16:40:14 -07:00
kaleb-himes
37ee5e2540
Resolves inter-library API conflict reported in ZD14318
2022-06-07 14:48:27 -06:00
David Garske
85e18b2f06
Merge pull request #5219 from douzzer/20220607-strlcpy
...
use XSTRLCPY() and XSTRLCAT() in EncryptDerKey()
2022-06-07 09:34:40 -07:00
Daniel Pouzzner
088d378ba4
ssl.c:EncryptDerKey(): use XSTRLCPY() and XSTRLCAT() to build up cipherInfo, and remove XSTRCPY() macro from wolfssl/wolfcrypt/types.h (clang-tidy hates on it, albeit frivolously).
2022-06-07 08:22:48 -05:00
gojimmypi
047ed8ef61
minor change for commit author update
2022-06-06 16:47:40 -07:00
David Garske
fbb6faaa2f
Merge pull request #5191 from SparkiDev/sp_win_asm_xmm_nv
...
SP Winx64 ASM: XMM6-15 are non-volatile
2022-06-06 15:58:10 -07:00
David Garske
3c634e1f59
Merge pull request #5217 from SparkiDev/pk_enc_mem_2
...
ECC, DH: improve encrypted memory implementations
2022-06-06 15:27:10 -07:00
Daniel Pouzzner
711a900ff7
Merge pull request #5214 from lealem47/ghostFunc
...
Removing ghosts and updating defines in openssl/buffer.h
2022-06-06 17:05:33 -05:00
JacobBarthelmeh
4ffa63c938
Merge pull request #5216 from kojo1/static-mem
...
wc_MakeRsKey with Static memory pool
2022-06-06 14:42:32 -07:00
JacobBarthelmeh
86023378f8
free decoded cert in test case and x509
2022-06-06 14:31:41 -07:00
gojimmypi
8e69b1fa0e
add include.am
2022-06-06 13:10:37 -07:00
Lealem Amedie
07e0a6fa8e
Removing ghost functions and fixing overflow warning in ssl.c
2022-06-06 11:33:26 -07:00
David Garske
86312be79e
Merge pull request #5210 from kaleb-himes/new-azsphere-rev3
...
New azsphere example for CI testing
2022-06-06 10:00:43 -07:00
JacobBarthelmeh
2cd9ca0c8f
add support for asn template build
2022-06-06 09:42:03 -07:00
gojimmypi
927ee21752
add link to new location for old references
2022-06-06 08:39:40 -07:00
Sean Parkinson
0bcd38f7d8
ECC, DH: improve encrypted memory implementations
2022-06-06 08:40:09 +10:00
Takashi Kojo
7bfe6aa127
Extend HEAP_HINT to all InitRsaKey in api.c
2022-06-05 09:12:49 +09:00
David Garske
eb28d38fa8
Merge pull request #5212 from kaleb-himes/various-warnings
...
Fix various warnings and an uninitialized XFILE
2022-06-04 17:10:17 -07:00
Takashi Kojo
1b9f922ec3
wc_MakeRsKey with static mem pool
2022-06-05 09:04:42 +09:00
TakayukiMatsuo
dbfa207344
Merge pull request #5116 from embhorn/zd14172
...
Fix TSIP build with NO_AES_CBC
2022-06-04 17:51:16 +09:00
David Garske
802e3127c0
Merge pull request #5145 from JacobBarthelmeh/caam
...
CAAM support with QNX i.MX8, add AES-CTR crypto callback
2022-06-03 15:24:10 -07:00
kaleb-himes
873b2169f9
Add readme to include.am
2022-06-03 13:33:12 -06:00
David Garske
2af09a7151
Merge pull request #5205 from haydenroche5/evp_cipher_aes_gcm
...
Fix another AES-GCM EVP control command issue.
2022-06-03 11:47:57 -07:00
kaleb-himes
30d836dc90
Implement peer review feedback
2022-06-03 11:34:02 -06:00
kaleb-himes
96d5814bfe
Implement peer review feedback
2022-06-03 11:06:46 -06:00
David Garske
debb598499
Merge pull request #5008 from tmael/vx_6x
...
Add support for VxWorks 6.x
2022-06-03 09:40:39 -07:00
David Garske
1bb2a35164
Merge pull request #5207 from anhu/longer_sigalg_list
...
For inter-op with OQS's OpenSSL fork, support longer sigalg list.
2022-06-03 09:24:38 -07:00
JacobBarthelmeh
fdaf418fe0
fix spelling and remove dead else statement
2022-06-03 09:21:27 -07:00
kaleb-himes
3bcdef1972
Fix various warnings and an uninitialized XFILE
2022-06-03 09:52:53 -06:00
Chris Conlon
8fbd4d70e6
Merge pull request #5209 from TakayukiMatsuo/fix14172
2022-06-03 09:07:01 -06:00
kaleb-himes
e30ae359a4
Fix build err missing XSTRNCASECMP
2022-06-03 08:17:39 -06:00
kaleb-himes
55f3b7c277
New azsphere example for CI testing
2022-06-03 08:04:50 -06:00
TakayukiMatsuo
42754ce98b
Exclude calling some funcs when WOLFSSL_AEAD_ONLY is defined
2022-06-03 14:47:41 +09:00
Sean Parkinson
64eaf74e83
Merge pull request #5206 from dgarske/user_settings
...
Fixes for user settings with SP ASM and ED/Curve25519 small
2022-06-03 09:25:17 +10:00
Sean Parkinson
ee78e63b87
Merge pull request #5203 from dgarske/zd14289
...
Fix the supported version extension to always check minDowngrade
2022-06-03 08:31:36 +10:00
David Garske
8307a55429
Fixes --enable-usersettings with SP ASM and ED/Curve25519 small CURVED25519_SMALL.
2022-06-02 14:17:25 -07:00
David Garske
a6465c2bd0
Merge pull request #5202 from julek-wolfssl/wolfssl-multi-test/send-alert-refactor
...
wolfssl-multi-test fixes
2022-06-02 14:08:46 -07:00
Anthony Hu
0cda12d446
For inter-op with OQS's OpenSSL fork, support longer sigalg list.
2022-06-02 16:52:35 -04:00
Hayden Roche
fb3c611275
Fix another AES-GCM EVP control command issue.
...
With PR 5170, I added logic that requires a EVP_CTRL_GCM_SET_IV_FIXED command be
issued before a EVP_CTRL_GCM_IV_GEN command. This matches OpenSSL's behavior.
However, OpenSSL also clears the flag enabling EVP_CTRL_GCM_IV_GEN after
EVP_CTRL_GCM_SET_IV_FIXED if EVP_CipherInit is called with a NULL key.
Otherwise, the flag retains its value. We didn't mirror this logic, and that
caused problems in OpenSSH unit testing. This commit aligns our logic with
OpenSSL's and adds a regression test to test_evp_cipher_aes_gcm for this case.
2022-06-02 12:32:59 -07:00
David Garske
2dd27c8d4a
Fix the supported version extension to check the ssl->options.minDowngrade always.
2022-06-02 11:17:25 -07:00
Tesfa Mael
cd008aac6a
Add support for VxWorks 6.x
...
Use rand_r and define SEM_ID_NULL
Fix redefinition of typedef 'SOCKADDR'
2022-06-02 09:54:27 -07:00
David Garske
56c48b31ad
Merge pull request #5105 from tmael/rsa_oaep_nomalloc
...
Support RSA OAEP with nomalloc
2022-06-02 08:45:01 -07:00
Daniel Pouzzner
2e307e1cd3
tls13.c: fix null pointer deref in FreeDcv13Args().
2022-06-02 10:32:05 -05:00
Juliusz Sosinowicz
3d71956b48
wolfssl-multi-test fixes:
...
- Remove RetrySendAlert and SendAlert recursion
- args possible NULL dereference
2022-06-02 16:08:25 +02:00
Sean Parkinson
fb9f90b98b
Merge pull request #5200 from dgarske/qat_fsanitize
...
Fixes for buffers when testing with Intel QAT hardware
2022-06-02 08:35:24 +10:00
Juliusz Sosinowicz
9f2e3a2405
Merge pull request #5198 from dgarske/qat_ecc_marker
2022-06-01 21:35:47 +02:00
David Garske
5672e2a885
Fixes for buffers when testing with Intel QAT hardware and fsanitize=address:
...
* PKCS7 should use allocated buffer for RSA.
* PKCS7 small stack typo for `keyAlgArray` size in `wc_PKCS7_AddRecipient_KTRI`.
* Fix for use of `free`, which should be `XFREE` in api.c.
* Cleanup old RSA benchmarking MDK5/WINCE code no longer needed with `WC_DECLARE_ARRAY_DYNAMIC_DEC` and `WC_DECLARE_ARRAY_DYNAMIC_EXE`.
2022-06-01 12:07:57 -07:00
Hayden Roche
8b9d2ad657
Merge pull request #5196 from douzzer/20220601-multi-test-fixes
2022-06-01 11:41:26 -07:00
David Garske
9cfcdfc7aa
Merge pull request #5149 from julek-wolfssl/store-frags-v2
...
Re-use async to support WANT_WRITE while sending fragments
2022-06-01 10:52:54 -07:00
Eric Blankenhorn
2543970419
Add doc for wolfSSL_dtls_retransmit
2022-06-01 12:03:36 -05:00
David Garske
cced5bd700
Merge pull request #5195 from LinuxJedi/ULL-fix
...
Fix 64bit postfix for constants
2022-06-01 09:40:26 -07:00
David Garske
19c51dac45
Fix for QAT ECC to gate use of HW based on marker. Introduced in PR #4997 .
2022-06-01 09:36:21 -07:00
David Garske
494a9fe41a
Merge pull request #5193 from SparkiDev/tls13_send_ticket
...
TLS 1.3: send ticket
2022-06-01 08:37:52 -07:00
Daniel Pouzzner
b212853bce
evp.c: in EvpCipherAesGCM(), make sure ctx->gcmAuthIn is non-null before clearing it; fix whitespace.
2022-06-01 10:29:40 -05:00
Juliusz Sosinowicz
d29c656d4f
SendAlert: clear output buffer to try and send the alert now
2022-06-01 16:48:57 +02:00
Andrew Hutchings
11a7756527
Fix 64bit postfix for constants
...
GCC 4.0.4 PowerPC 32bit cross-compiler complains when `UL` is used
instead of `ULL` for 64bit constants.
2022-06-01 15:04:29 +01:00
Juliusz Sosinowicz
df10e1fad2
Store RetrySendAlert error in ssl->error
2022-06-01 14:59:10 +02:00
TakayukiMatsuo
13135e72db
Add a global variable for heap-hint, mainly in case heap info cannot be referenced by TSIP
2022-06-01 10:24:03 +09:00
Sean Parkinson
be743b2204
TLS 1.3: send ticket
...
Can send a new session ticket any time after handshake is complete with
TLS v1.3.
Added API for server application to do this.
Added tests.
2022-06-01 10:36:01 +10:00
Sean Parkinson
3944a8737a
WIN64: compiling with __clang__ _udiv128 not defined
2022-06-01 08:54:57 +10:00
Sean Parkinson
dd0b9fb871
SP Winx64 ASM: XMM6-15 are non-volatile
...
Put the used non-volatile XMM registers on the stack at the start and
get them off again at the end.
2022-06-01 08:46:27 +10:00
Sean Parkinson
81cd1e652e
Merge pull request #5170 from haydenroche5/evp_cipher_aes_gcm
...
Fix EVP_CTRL_GCM_IV_GEN with AES-GCM.
2022-06-01 08:20:33 +10:00
Juliusz Sosinowicz
c74315f1ef
Save pending alerts when using async io
...
- Don't overwrite ssl->error
- Clear the error in ssl->error because the return of SendBuffered is now stored in ret instead
2022-05-31 18:17:11 +02:00
Chris Conlon
0554b02215
Merge pull request #5177 from JacobBarthelmeh/PKCS7
2022-05-31 09:46:14 -06:00
Chris Conlon
da91578bc7
Merge pull request #5180 from miyazakh/tsipv_up
2022-05-31 09:41:47 -06:00
David Garske
2ed85926d5
Merge pull request #5187 from kareem-wolfssl/hsHashesNull
...
Confirm ssl->hsHashes is not NULL before attempting to dereference it.
2022-05-30 10:41:35 -07:00
Juliusz Sosinowicz
8aa2da532c
Combine preproc check into one statement
2022-05-30 15:27:36 +02:00
Daniel Pouzzner
c83120d8c8
Merge pull request #5097 from tmael/c89_fixes
...
Fix for c89, use WOLF_C89
2022-05-28 08:29:42 -05:00
David Garske
baaff96045
Merge pull request #5188 from kaleb-himes/PR5174-SUPPLEMENT
...
Supplement to @julek-wolfssl's fantastic find, just allow for proper expansion
2022-05-27 20:36:20 -07:00
Juliusz Sosinowicz
6245395f34
Simulate WANT_WRITE only with async I/O support
2022-05-27 23:23:18 +02:00
David Garske
a91a2482e7
Merge pull request #5158 from anhu/ECDHE_PSK
...
Add TLS 1.2 ciphersuite ECDHE_PSK_WITH_AES_128_GCM_SHA256 from RFC 8442
2022-05-27 13:25:48 -07:00
Kareem
e061bc23f4
Fix asn1.h NOLINT comments.
2022-05-27 13:05:56 -07:00
kaleb-himes
f5bbad185f
Supplement to @julek-wolfssl's fantastic find, just allow for proper expansion
2022-05-27 13:52:26 -06:00
Juliusz Sosinowicz
8cb4819b53
Fix curve group matching on secure renegotiation
2022-05-27 21:26:55 +02:00
Juliusz Sosinowicz
84bca63b2e
Add WOLFSSL_NO_ASYNC_IO to low resource build
2022-05-27 21:26:55 +02:00
Juliusz Sosinowicz
50c0b3d2a2
Add testing/docs for blocking write
...
- Fix case where message grouping can make CheckAvailableSize return a WANT_WRITE
- CheckAvailableSize in tls13.c will not return a WANT_WRITE since it only does so for DTLS <=1.2
2022-05-27 21:26:55 +02:00
Daniel Pouzzner
decf9972bb
fix whitespace.
2022-05-27 14:22:22 -05:00
Daniel Pouzzner
8c10c3776d
wolfcrypt/src/asn.c: in C89 codepath of GetFormattedTime(), add buffer size checks before calls to sprintf().
2022-05-27 14:20:38 -05:00
Tesfa Mael
aca199cb05
Fix to compile with c89
...
strncasecmp and snprintf are unavailable in C89
use // static analyzer suppressions
2022-05-27 14:20:37 -05:00
Kareem
6e6c4500d6
Fix comments in asn1.h to use ANSI C style.
2022-05-27 11:01:29 -07:00
Kareem
98ec442b37
Confirm ssl->hsHashes is not NULL before attempting to dereference it.
2022-05-27 10:57:23 -07:00
Anthony Hu
df06db114d
Add TLS 1.2 ciphersuite ECDHE_PSK_WITH_AES_128_GCM_SHA256 from RFC 8442
...
Testing:
./autogen.sh
./configure --enable-psk
make all check
$ ./examples/server/server -j -l ECDHE-PSK-AES128-GCM-SHA256
SSL version is TLSv1.2
SSL cipher suite is TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256
SSL curve name is SECP256R1
Client message: hello wolfssl!
$ ./examples/client/client -s -l ECDHE-PSK-AES128-GCM-SHA256
SSL version is TLSv1.2
SSL cipher suite is TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256
SSL curve name is SECP256R1
I hear you fa shizzle!
2022-05-27 11:05:55 -04:00
Hideki Miyazaki
81ad463026
fix a compile error by clang
2022-05-27 11:37:26 +09:00
Juliusz Sosinowicz
4e8c362152
Allocate ssl->async seperately to the SSL object
2022-05-26 23:08:48 +02:00
Juliusz Sosinowicz
733fe1a8d3
Use WOLFSSL_ASYNC_IO for WOLFSSL_NONBLOCK_OCSP
...
- Enable ssl->async to store function arguments for non-blocking OCSP
- Remove ssl->nonblockarg
2022-05-26 23:08:48 +02:00
Juliusz Sosinowicz
c151dcec50
Re-use async to support WANT_WRITE while sending fragments
...
- Async I/O can be turned off with WOLFSSL_NO_ASYNC_IO
- WOLFSSL_ASYNC_IO functionality enabled in SendCertificateVerify() and SendServerKeyExchange() to allow safe re-entry into SendHandshakeMsg()
- Testing size of structs is refactored int WOLFSSL_ASSERT_SIZEOF_GE()
2022-05-26 23:08:48 +02:00
David Garske
f93b23b524
Merge pull request #5169 from kareem-wolfssl/miscFixes
...
Misc. fixes
2022-05-26 12:52:39 -07:00
David Garske
0b6f7c1533
Merge pull request #5176 from embhorn/zd14227
...
Fix to move wolfSSL_ERR_clear_error outside gate for OPENSSL_EXTRA
2022-05-26 08:33:52 -07:00
David Garske
ea895e99b7
Merge pull request #5184 from SparkiDev/asn_templ_make_cert_ext
...
ASN template: properly handle WOLFSSL_CERT_EXT
2022-05-26 06:53:10 -07:00
Eric Blankenhorn
2800d00bb4
Fix to move wolfSSL_ERR_clear_error outside gate for OPENSSL_EXTRA
2022-05-26 06:11:45 -05:00
Sean Parkinson
cacf5aeb7e
ASN template: properly handle WOLFSSL_CERT_EXT
...
Encoding extensions didn't properly handle WOLFSSL_CERT_EXT not being
defined.
2022-05-26 10:01:59 +10:00
Hideki Miyazaki
a5fa98e5f0
addressed code review
...
update Copyright year
2022-05-26 08:50:02 +09:00
JacobBarthelmeh
ad49aea17d
fix for setting AES-CCM decrypt nonce with crypto callback
2022-05-25 13:59:56 -07:00
David Garske
fa80aa6505
Merge pull request #5132 from JacobBarthelmeh/req
...
Add support for additional CSR attributes
2022-05-25 13:35:46 -07:00
David Garske
e8d779ab78
Merge pull request #5077 from gojimmypi/ESP8266_Development
...
Add ESP-IDF WOLFSSL_ESP8266 setting for ESP8266 devices
2022-05-25 12:46:10 -07:00
David Garske
17d7098bf6
Merge pull request #5168 from rizlik/dtls_resume
...
internal.c: dtls: HelloVerifyRequest on resumption
2022-05-25 11:23:08 -07:00
David Garske
2d8cc055f0
Merge pull request #5179 from SparkiDev/sp_armv6_fix_1
...
SP ARM32 ASM: moving large immediate value
2022-05-25 09:59:47 -07:00
David Garske
da1cbfda46
Merge pull request #5178 from cconlon/nounaligned
...
Add define to skip SHA-512 unaligned memory test in test.c
2022-05-25 09:55:29 -07:00
Hayden Roche
3cf636163b
Fix EVP_CTRL_GCM_IV_GEN with AES-GCM.
...
Discovered the AES-GCM flow using this command didn't work in our OpenSSH port.
This commit makes the behavior match OpenSSL and adds testing using known
OpenSSL-generated test vectors to prevent regressions. This was one of those
problems where two ends of a connection would work fine if they were both using
wolfSSL but not if one was using OpenSSL (i.e. OpenSSH interop with AES-GCM
was broken).
2022-05-25 07:00:15 -07:00
Daniel Pouzzner
c3e4c6b6bc
Merge pull request #5174 from julek-wolfssl/ocsp-typo
...
Typo in testing script
2022-05-25 08:16:58 -05:00
Juliusz Sosinowicz
b664cea735
Typo in testing script
2022-05-25 12:10:27 +02:00
Hideki Miyazaki
0d59d36a80
update TSIP VER to 1.15 for RX65N and RX72N
...
fix -140 error when enabling -O2
fix no_crypto_hash
2022-05-25 18:31:23 +09:00
Marco Oliverio
6c0b65d655
internal.c: dtls: HelloVerifyRequest on resumption
2022-05-25 10:38:32 +02:00
Sean Parkinson
d2cb0278f6
SP ARM32 ASM: moving large immediate value
...
ARMv6 and early doesn't support moving an immediate value larger than 8
bits. Compiler doesn't have enough spare registers to handle it.
2022-05-25 10:58:32 +10:00
JacobBarthelmeh
a1fb385450
free recipent list in error cases
2022-05-24 15:12:39 -07:00
David Garske
5aea58d1e8
Merge pull request #5175 from douzzer/20220524-shellcheck-warnings
...
20220524-shellcheck-warnings
2022-05-24 14:21:49 -07:00
David Garske
a5225af1c7
Merge pull request #4973 from JacobBarthelmeh/CSharp
...
add example C# PSK client
2022-05-24 13:37:14 -07:00
Kareem
bcb5ff5ed9
Increase MAX_ECC_STRING to include the trailing \0 for longer order strings (in eg. SECP160R1). Note that this now matches the check in wc_EccPublicKeyDecode.
2022-05-24 13:20:52 -07:00
Kareem
03e086a139
Code review feedback.
2022-05-24 13:12:59 -07:00
David Garske
74cbd08ff5
Merge pull request #5164 from cconlon/x509date
...
Remove WOLFSSL_ALT_NAMES restriction on notBefore/notAfter use in Cert struct
2022-05-24 12:41:00 -07:00
Chris Conlon
321d404d6b
add define to skip unaligned memory tests in test.c
2022-05-24 11:55:21 -06:00
Daniel Pouzzner
5c14bef6a8
global fixes for shellcheck warnings SC2027, SC2069, SC2154, SC2141, SC3014, SC3037 (all true positives). note, does not fix SC2057 in ocsp-stapling.test, which is addressed by PR #5174 .
2022-05-24 12:13:14 -05:00
Daniel Pouzzner
b66fa1680a
fix whitespace.
2022-05-24 12:13:14 -05:00
Chris Conlon
6a26dab73a
X.509 cert validity for CertFromX509() and EncodeCert() shouldn't be protected by WOLFSSL_ALT_NAMES
2022-05-24 10:28:46 -06:00
David Garske
5f148c3dcc
Merge pull request #5172 from SparkiDev/jenkins_fixes_5
...
benchmark.c: fix Jenkins failure where byte, word32 not defined
2022-05-24 08:09:47 -07:00
Sean Parkinson
fab9e29513
benchmark.c: fix Jenkins failure where byte, word32 not defined
2022-05-24 12:10:01 +10:00
Kareem
350f1d6496
Only use __builtin_offsetof on GCC 4+. It is not supported in GCC 3 or earlier.
2022-05-23 14:44:56 -07:00
Kareem
26a92977f0
Remove MCAPI project's dependency on zlib version.
2022-05-23 14:29:44 -07:00
Kareem
b329a16832
Update Zephyr fs.h path.
2022-05-23 13:45:30 -07:00
kareem-wolfssl
465a6ceb64
Merge pull request #4920 from SparkiDev/old_timing_pad_verify
...
Make old less secure TimingPadVerify implementation available
2022-05-23 13:43:59 -07:00
David Garske
6424af120c
Merge pull request #5161 from SparkiDev/sp_armv7a
...
SP ARM 32: Fixes to get building for armv7-a
2022-05-23 10:01:49 -07:00
JacobBarthelmeh
36db5ef929
add test case for UUID and FASC-N
2022-05-23 09:17:42 -07:00
JacobBarthelmeh
cdfdefe9af
improve checking on UUID getter function
2022-05-22 17:18:20 -07:00
JacobBarthelmeh
9e4de4bfc8
add FASC-N and UUID alt. name support
2022-05-22 17:18:20 -07:00
John Safranek
62cb2b4ca9
ASN.1 Additions for FPKI/CAC
...
1. Add some OIDs used in the Federal PKI Policy Authority standard.
2. Added the SubjectDirectoryAttributes extension to certificate
parsing. (limited to country of citizenship)
3. Rename constant label SUBJECT_INFO_ACCESS to SUBJ_INFO_ACC_OID
4. Added the SubjectInfoAccess extension to certificate parsing.
(limited to one URL)
5. Add the SSH extended key usage flags.
6. Use some of the template changes on the new certificate items.
2022-05-22 17:18:20 -07:00
David Garske
b5d65b9579
Merge pull request #5159 from kareem-wolfssl/fipsv3HmacMd5
...
Allow using 3DES and MD5 with FIPS 140-3, as they fall outside of the FIPS boundary.
2022-05-20 18:40:29 -07:00
David Garske
9a74745246
Merge pull request #5163 from haydenroche5/evp_pkey_derive_guard
...
Remove unneeded FIPS guard on wolfSSL_EVP_PKEY_derive.
2022-05-20 17:12:24 -07:00
Chris Conlon
ec39ee2cb6
Merge pull request #5070 from miyazakh/crypto_only_flwup
2022-05-20 17:08:29 -06:00
David Garske
d80b282fdd
Merge pull request #5156 from anhu/HAVE_AES_GCM
...
Rename HAVE_AES_GCM guard to HAVE_AESGCM in the tests.
2022-05-20 15:03:57 -07:00
David Garske
04ddd0abe4
Merge pull request #5095 from haydenroche5/decoded_cert_crit_fields
...
Make the critical extension flags in DecodedCert always available.
2022-05-20 15:03:39 -07:00
David Garske
2fc129e236
Merge pull request #5162 from rliebscher/master
...
Remove unused warning in ecc.c
2022-05-20 11:42:39 -07:00
Hayden Roche
a6b948ae59
Remove unneeded FIPS guard on wolfSSL_EVP_PKEY_derive.
2022-05-20 11:29:01 -07:00
Jacob Barthelmeh
f19b426a3f
fix for files included in make dist
2022-05-20 09:26:53 -06:00
René Liebscher
a8024a32c5
Remove unused warning in ecc.c
...
When WOLFSSL_ECIES_OLD is defined you get an unused warning
in ecc.c / wc_ecc_encrypt_ex().
Just suppress it by "using" the parameter.
2022-05-20 16:05:10 +02:00
David Garske
9427ebc5be
Merge pull request #5160 from haydenroche5/tls_unique
...
Provide access to "Finished" messages outside the compat layer.
2022-05-19 21:30:30 -07:00
Sean Parkinson
b6290f1590
Merge pull request #5157 from douzzer/20220519-multi-test-fixes
...
20220519-multi-test-fixes
2022-05-20 13:47:09 +10:00
Sean Parkinson
bc5262a5d0
SP ARM 32: Fixes to get building for armv7-a
...
Change ldrd to either have even first register or change over to ldm
with even first register.
Ensure shift value in ORR instruction has a hash before it.
Don't index loads and stores by 256 or more - make them post-index.
div2 for P521 simplified.
2022-05-20 12:15:58 +10:00
Hayden Roche
6d9fbf7ab3
Provide access to "Finished" messages outside the compat layer.
...
Prior to this commit, if you wanted access to the Finished messages from a
handshake, you needed to turn on the compatibility layer, via one of
OPENSSL_ALL, WOLFSSL_HAPROXY, or WOLFSSL_WPAS. With this commit, defining any
of these causes WOLFSSL_HAVE_TLS_UNIQUE to be defined (a reference to the
tls-unique channel binding which these messages are used for) in settings.h.
This allows a user to define WOLFSSL_HAVE_TLS_UNIQUE to access the Finished
messages without bringing in the whole compat layer.
2022-05-19 16:34:13 -07:00
Daniel Pouzzner
efc8d36aa5
configure.ac: add whitespace separators to "((" groupings to mollify shellcheck SC1105 "Shells disambiguate (( differently or not at all. For subshell, add spaces around ( . For ((, fix parsing errors."
2022-05-19 18:19:11 -05:00
Daniel Pouzzner
6984cf83b2
scripts/ocsp-stapling.test: fix whitespace.
2022-05-19 16:45:50 -05:00
JacobBarthelmeh
e35c1e5a61
setup of default build config
2022-05-19 14:54:22 -06:00
JacobBarthelmeh
8de3765af9
clean up namespace and remove settings files
2022-05-19 14:28:23 -06:00
JacobBarthelmeh
d8817266be
trim down sln
2022-05-19 13:54:07 -06:00
JacobBarthelmeh
6dc47580ce
fixing dependency for new project
2022-05-19 13:45:09 -06:00
Kareem
832a7a40a6
Allow using 3DES and MD5 with FIPS 140-3, as they fall outside of the FIPS boundary.
2022-05-19 12:06:20 -07:00
JacobBarthelmeh
249afbbfc9
update output directory and add psk client example
2022-05-19 12:11:00 -06:00
Daniel Pouzzner
5988f35593
src/wolfio.c: in EmbedReceiveFrom((), clear peer before recvfrom() to fix clang-analyzer-core.UndefinedBinaryOperatorResult; add DTLS_ prefix to macros SENDTO_FUNCTION and RECVFROM_FUNCTION, and gate their definitions on their being undefined to allow overrides.
2022-05-19 11:31:24 -05:00
Daniel Pouzzner
f2e9f5349f
wolfcrypt/src/asn.c: refactor DecodeBasicOcspResponse() to keep DecodedCert off the stack in WOLFSSL_SMALL_STACK builds.
2022-05-19 11:28:34 -05:00
Daniel Pouzzner
368854b243
scripts/: refactor TLS version support tests to use -V, rather than -v (which makes frivolous connection attempts).
2022-05-19 11:18:34 -05:00
Anthony Hu
cf81ae79e4
HAVE_AESGCM
2022-05-19 11:30:58 -04:00
Anthony Hu
9c2903c176
Remove HAVE_AES_GCM guard as it is never defined.
2022-05-19 01:20:55 -04:00
David Garske
4a3ff40eb3
Merge pull request #5138 from haydenroche5/issuer_names
...
Add ability to store issuer name components when parsing a certificate.
2022-05-18 16:56:55 -07:00
Sean Parkinson
cd41c8beaf
Merge pull request #5147 from rizlik/do_alert_reset
...
internal.c:reset input/processReply state if exiting after DoAlert()
2022-05-19 09:36:44 +10:00
Daniel Pouzzner
b53484be10
Merge pull request #5155 from cconlon/configFix
...
Fix --enable-openssh FIPS detection syntax in configure.ac
2022-05-18 17:34:43 -05:00
Chris Conlon
628a34a43d
fix --enable-openssh FIPS detection syntax in configure.ac
2022-05-18 12:52:07 -06:00
Chris Conlon
1026c7141e
Merge pull request #5148 from JacobBarthelmeh/PKCS7
2022-05-18 11:44:20 -06:00
Marco Oliverio
be172af3cd
internal.c: check that we have data before processing messages
...
We should never encounter this bug under normal circumstances. But if we enter
processReplyEx with a wrongly `ssl->options.processReply` set to
`runProcessingOneMessage` we check that we have some data.
2022-05-18 18:49:33 +02:00
Marco Oliverio
6940a5eaae
internal.c:reset input/processReply state if exiting after DoAlert()
2022-05-18 18:35:29 +02:00
John Safranek
40063f7487
Merge pull request #5109 from rizlik/dtls_peer_matching_fix
...
wolfio: dtls: fix incorrect peer matching check
2022-05-18 09:12:26 -07:00
Hideki Miyazaki
5de9c45161
resolve merge and conflict
2022-05-18 11:37:22 +09:00
David Garske
ac3fc89df9
Merge pull request #5151 from SparkiDev/tls13_premaster
...
TLS 1.3: pre-master secret zeroizing
2022-05-17 19:18:43 -07:00
Hideki Miyazaki
54a96cef06
add test case
2022-05-18 11:16:10 +09:00
Hideki Miyazaki
88abc9f3c1
addressed review comments
...
add to call wc_ecc_rs_to_sig and wc_ecc_verify_has
2022-05-18 11:16:07 +09:00
Hideki Miyazaki
c1f117413f
get crypto only compiled with openssl extra
2022-05-18 11:16:03 +09:00
Sean Parkinson
1765e2c482
Merge pull request #5150 from haydenroche5/benchmark_main_void
...
Fix main signature in benchmark.c.
2022-05-18 10:10:07 +10:00
Hayden Roche
04ff6afbad
Add ability to store issuer name components when parsing a certificate.
...
This is turned on when `WOLFSSL_HAVE_ISSUER_NAMES` is defined. This allows the
user to inspect various issuer name components (e.g. locality, organization,
etc.) by using these new fields in a `DecodedCert`.
2022-05-17 16:29:52 -07:00
Sean Parkinson
2f91028f2d
TLS 1.3: pre-master secret zeroizing
2022-05-18 08:52:38 +10:00
Hayden Roche
fd535242a0
Fix main signature in benchmark.c.
...
If `NO_CRYPT_BENCHMARK` is defined, the main function is `int main()`, but it
should be `int main(void)`.
2022-05-17 14:28:43 -07:00
Jacob Barthelmeh
8b46c95f06
macro guard for build with disable ecc
2022-05-17 11:36:09 -06:00
Tesfa Mael
d6935ed3be
Review comments
2022-05-17 09:21:20 -07:00
David Garske
c9ae021427
Merge pull request #5143 from julek-wolfssl/x509-ret-empty-name
...
Return subject and issuer X509_NAME obj even when not set
2022-05-17 09:16:54 -07:00
David Garske
50cc6d0422
Merge pull request #5139 from cconlon/opensshfips
...
Modify --enable-openssh to not enable non-FIPS algos for FIPS builds
2022-05-17 09:16:21 -07:00
Marco Oliverio
6df65c0162
wolfio: dtls: fix incorrect peer matching check
...
Ignore packet if coming from a peer of a different size *or* from a different
peer. Avoid whole memcmp of sockaddr_in[6] struct because is not portable (there
are optional fields in struct sockaddr_in).
2022-05-17 11:01:55 +02:00
Sean Parkinson
fc12c68601
Merge pull request #5146 from dgarske/kcapi_keywrap
...
Fix to allow enabling AES key wrap (direct) with KCAPI
2022-05-17 08:16:00 +10:00
Jacob Barthelmeh
1dc5e4cee5
add padding for variable ecc signature size
2022-05-16 15:26:29 -06:00
David Garske
ec619e3f35
Merge pull request #5107 from julek-wolfssl/wpas-ex-data-leak
...
Call ctx->rem_sess_cb when a session is about to be invalid
2022-05-16 13:27:08 -07:00
David Garske
579a37bdf0
Merge pull request #5117 from cconlon/getrandom
...
add support for Linux getrandom() with WOLFSSL_GETRANDOM
2022-05-16 12:36:30 -07:00
Chris Conlon
0ef4707859
Merge pull request #5137 from JacobBarthelmeh/docs
2022-05-16 12:18:14 -06:00
Juliusz Sosinowicz
7f8f0dcffe
Refactor cache ex_data update/retrieve into one function
...
- Add explicit pointer cast
2022-05-16 13:01:05 +02:00
Juliusz Sosinowicz
d996086a6d
Return subject and issuer X509_NAME obj even when not set
...
This allows the user to set the attributes of the subject and issuer name by calling X509_REQ_get_subject_name and adding attributes to it.
2022-05-16 12:49:34 +02:00
JacobBarthelmeh
fb9b96d498
fix for index increment and change test case expected return values
2022-05-13 14:07:29 -07:00
David Garske
6b1e3003fb
Merge pull request #5142 from SparkiDev/ssl_move_pk
...
ssl.c rework
2022-05-13 12:56:14 -07:00
Jacob Barthelmeh
3a4feddf75
update code for continued support with i.MX6
2022-05-13 13:21:45 -06:00
David Garske
643cd78ea2
Fix to allow enabling AES key wrap (direct) with KCAPI.
2022-05-13 11:15:32 -07:00
David Garske
1a57e3065a
Small cleanups. Missing (void), spelling and formatting. Also fixes for variations of 25519/448 build.
2022-05-13 09:24:59 -07:00
John Safranek
7305616452
Merge pull request #5080 from JacobBarthelmeh/DH
...
with WOLFSSL_NO_DH186 restriction allow odd DH param size generations
2022-05-13 08:57:33 -07:00
David Garske
50f53f9576
Merge pull request #5129 from LinuxJedi/remove-python-wrappers
...
Remove the Python wrappers from wolfSSL source
2022-05-13 08:36:33 -07:00
David Garske
630c5ef364
Merge pull request #5140 from SparkiDev/sp_fixes_7
...
SP fixes
2022-05-12 21:57:48 -07:00
Sean Parkinson
852d5169d4
ssl.c rework
...
Move the public key APIs out of ssl.c and into pk.c.
(RSA, DSA, DH and EC)
2022-05-13 11:12:44 +10:00
Sean Parkinson
eea537e5ea
Merge pull request #5124 from kaleb-himes/WIN_MULTICONFIG
...
Address issues ID'd by new windows multi-config test
2022-05-13 09:39:15 +10:00
Sean Parkinson
e8160f049e
SP fixes
...
Fix div_word without using div.
Fix ARM32 and Cortex-M builds to work for 4096 again.
2022-05-13 09:37:24 +10:00
Chris Conlon
c3a79f50d8
modify --enable-openssh to not enable non-FIPS algos for FIPS builds
2022-05-12 16:53:57 -06:00
Chris Conlon
e6ce735ed8
add support for Linux getrandom() with WOLFSSL_GETRANDOM
2022-05-12 16:51:38 -06:00
Sean Parkinson
6aaee73585
Merge pull request #5133 from rizlik/cookie_keyshare_fix
...
tls13: fix cookie has keyShare information check
2022-05-13 08:01:59 +10:00
Sean Parkinson
d1308fcdfc
Merge pull request #5122 from rizlik/tls13_pad_calc
...
internal.c: fix pad-size when more records are received at once
2022-05-13 07:59:36 +10:00
Sean Parkinson
52fc3844a6
Merge pull request #5127 from rizlik/wolfss_msg_fix
...
wolfcrypt: logging: use do{}while(0) to disable WOLFSSL_MSG* macro
2022-05-13 07:55:18 +10:00
JacobBarthelmeh
988236ca70
remove port print out
2022-05-12 13:07:04 -07:00
JacobBarthelmeh
8124368319
Merge pull request #5136 from douzzer/20220512-stderr
...
print errors to stderr, not stdout
2022-05-12 13:59:41 -06:00
Daniel Pouzzner
c4920021d8
print errors to stderr, not stdout;
...
fix whitespace in internal.c;
add missing error handling in examples/server/server.c around recvfrom().
2022-05-12 13:07:32 -05:00
Daniel Pouzzner
60864f19da
Merge pull request #5130 from JacobBarthelmeh/examples
...
print out test errors to stderr instead of stdout
2022-05-12 12:44:45 -05:00
John Safranek
2cf87a8049
Merge pull request #5084 from julek-wolfssl/zd14101-dtls-want-write
...
DTLS fixes with WANT_WRITE simulations
2022-05-12 09:36:40 -07:00
Andrew Hutchings
7316a275ae
Add EXTRA_DIST entry for include.am
2022-05-12 17:00:02 +01:00
Andrew Hutchings
c3d4c3086e
Add README to point to the new Python locations
2022-05-12 16:55:26 +01:00
David Garske
05ce8329c9
Merge pull request #5067 from miyazakh/compat_altcertchain
...
"veify ok" if alternate cert chain mode is used
2022-05-12 08:54:51 -07:00
David Garske
7a95be1a97
Merge pull request #5126 from JacobBarthelmeh/crl
...
do not error out on CRL next date if using NO_VERIFY
2022-05-12 08:44:29 -07:00
Kaleb Himes
9ca1206bf3
Merge pull request #5131 from SparkiDev/sp_win_fixes_1
...
SP: Windows build fixes
2022-05-12 09:56:27 -05:00
Juliusz Sosinowicz
44be4e1cc8
Reset ret in client and server after wolfSSL_dtls_got_timeout()
...
- Do UDP connect only with simulateWantWrite to accommodate macOS that doesn't like sendto being called on connected UDP sockets
- Call wolfSSL_dtls_get_current_timeout only on a DTLS connection
2022-05-12 16:48:04 +02:00
Juliusz Sosinowicz
9914da3046
Fix resumption failure and use range in connect state logic
2022-05-12 15:46:08 +02:00
Juliusz Sosinowicz
a31b76878f
DTLS fixes with WANT_WRITE simulations
...
- WANT_WRITE could be returned in unexpected places. This patch takes care of that.
- Change state after SendBuffered only if in a sending state to begin with.
- Adapt client and server to simulate WANT_WRITE with DTLS
2022-05-12 15:46:08 +02:00
Marco Oliverio
829e9f5277
tls13: fix cookie has keyShare information check
...
Fix the check to see if the cookie has key_share information or not (needed to
reconstruct the HelloRetryRequest). At the moment, it looks like we never send a
cookie without KeyShare extension. Indeed the HelloRetryRequest is sent only
because the client didn't provide a good KeyShareEntry in the first
ClientHello. When we will support DTLSv1.3, the HelloRetryRequest will be used
as a return-routability check and it may be sent without the KeyShare extension.
2022-05-12 12:10:58 +02:00
Marco Oliverio
8e3d7fc6f4
wolfcrypt: logging: use do{}while(0) to disable WOLFSSL_MSG* macro
...
otherwise statement of the type:
if (condtion)
WOLFSSL_MSG("");
after preprocessing will become:
if (condition)
;
The empty body emits a warning from the compiler.
2022-05-12 09:59:27 +02:00
JacobBarthelmeh
36739bca62
cleanup memory on structure free
2022-05-11 21:57:13 -07:00
Jacob Barthelmeh
818ac2b8dd
add more REQ attribute support
2022-05-11 22:27:48 -06:00
John Safranek
798d81723b
Merge pull request #5128 from rizlik/dtls_bidrectional_shutdown
...
Support DTLS bidirectional shutdown in the examples
2022-05-11 17:00:44 -07:00
Sean Parkinson
f5b0d3c0b4
SP: Windows build fixes
2022-05-12 08:25:46 +10:00
Sean Parkinson
36575ff480
Merge pull request #5125 from douzzer/20220510-strncmp-misuse
...
s/strncmp/strcmp/g
2022-05-12 08:22:00 +10:00
Hideki Miyazaki
5d93a48ddf
veify ok if alternate cert chain mode for verifyCallback
2022-05-12 06:15:18 +09:00
Jacob Barthelmeh
5caef7eaba
avoid dead store with test case
2022-05-11 11:53:17 -06:00
Jacob Barthelmeh
9bee0281cb
print out test errors to stderr instead of stdout
2022-05-11 11:40:54 -06:00
Andrew Hutchings
fd9e1e21ed
Remove the Python wrappers from wolfSSL source
...
The wolfCrypt and wolfSSL Python wrappers are maintained in the
wolfCrypt-py and wolfSSL-py trees respectively. The duplicates in this
tree are stale. The content has been checked and any important changes
have been ported over to their respective trees.
2022-05-11 15:02:51 +01:00
kaleb-himes
eb6f9152db
Revert modifications addressed by wolfSSL/scripts PR #235
2022-05-11 07:27:16 -06:00
Marco Oliverio
761ab6b17a
tests: add bidirectional shutdown UDP tests
2022-05-11 13:27:37 +02:00
Juliusz Sosinowicz
257c55a311
examples: allow bidirectional shutdown in UDP
...
This commit allows the examples to perform a bidirectional shutdown also when
using UDP. It is useful to test DTLS retransmission.
Signed-off-by: Marco Oliverio <marco@wolfssl.com >
2022-05-11 13:27:24 +02:00
Marco Oliverio
27e73818c5
tests: run test_wolfSSL_dtls_export() over UDP instead of TCP
2022-05-11 12:20:15 +02:00
Marco Oliverio
692a01238e
tests: support udp in test_server_nofail()
2022-05-11 12:19:09 +02:00
Sean Parkinson
dca71d36f6
SP: Script changed, generated result update
2022-05-11 10:51:19 +10:00
Daniel Pouzzner
d90a89898c
wolfssl/test.h:OCSPRespFreeCb(): fix non-void return of and from void function.
2022-05-10 15:14:21 -05:00
Daniel Pouzzner
9fbb4a923f
src/internal.c:GetCipherKeaStr(): allow "ECDH" (in addition to "ECDHE") as a suite clause that maps to KEA "ECDH".
2022-05-10 15:12:00 -05:00
Daniel Pouzzner
77fa0ccb82
src/tls.c:BuildTlsFinished(): work around false positive -Wmaybe-uninitialized.
2022-05-10 15:10:23 -05:00
Jacob Barthelmeh
531120131a
do not error out on CRL next date if using NO_VERIFY
2022-05-10 14:00:21 -06:00
Daniel Pouzzner
26673a0f28
where appropriate, use strcmp/strcasecmp, not strncmp/strncasecmp;
...
add macro XSTRCASECMP();
update XSTRNCASECMP() for XC32 >= 1.00 to use strncasecmp.
2022-05-10 12:20:12 -05:00
kaleb-himes
cb6a138caf
Implement peer review feedback
2022-05-10 08:43:18 -06:00
Marco Oliverio
f06ac9965c
internal.c: fix: plaintext check account for the current record only
2022-05-10 13:12:09 +02:00
Marco Oliverio
db23d8a0cf
internal.c: don't skip records if we don't process early-data
...
If we don't process early data, we want to skip only the current record and not
all the received data
2022-05-10 13:04:43 +02:00
Marco Oliverio
445c1e6ceb
internal.c: don't check TLS13 plaintext limit twice
...
Plaintext size is checked before decryption in TLS 1.3
2022-05-10 12:51:50 +02:00
Sean Parkinson
0747a16893
Merge pull request #5119 from JacobBarthelmeh/fuzzing
...
adjust setting of input pointer with BER pkcs7 edge case
2022-05-10 09:40:51 +10:00
kaleb-himes
d5f7beefd4
Address issues ID'd by new windows multi-config test
2022-05-09 16:50:56 -06:00
Chris Conlon
063e757f6b
Merge pull request #5121 from miyazakh/sce_example_update2
2022-05-09 14:15:13 -06:00
Marco Oliverio
d133fa6143
server: check that the first packet of udp connection is clientHello
...
Used to allow for bi-directional shutdown tests with UDP and DTLS
2022-05-09 13:45:27 +02:00
Marco Oliverio
0c7e9a0104
internal.c: fix pad-size when more records are received at once
...
don't consider the end of the record the end of received data as more records
may be read at once when DTLS will be supported.
2022-05-09 11:00:31 +02:00
Sean Parkinson
59fdf05155
Merge pull request #5111 from kaleb-himes/ABI-check-test-rev2
...
Refactor wolfSSL_ASN1_TIME_adj to use GetFormattedTimeString (new API)
2022-05-09 09:15:57 +10:00
Sean Parkinson
d95b2e69b5
Merge pull request #5112 from JacobBarthelmeh/Testing
...
fix for indef buffer check with pkcs7
2022-05-09 09:03:10 +10:00
Chris Conlon
b76c70d969
Merge pull request #5120 from dgarske/v5.3.0_cubepack
2022-05-08 07:50:20 -06:00
Hideki Miyazaki
75d90aaf2f
update key data and add fixes
...
Fix Aes gcm memory curruption
- fix delta size calculation
- add logging SEGGER printf for RA6M4
- update client example
Added test cases
- Fixed aes buffer overflow
- Fixed usable
- Fixed sce - no-sce use case
- Add logging SEGGER printf for RA6M4
2022-05-07 10:43:43 +09:00
David Garske
421f54e60a
Merge pull request #5118 from douzzer/20220405-declaration-after-statement
...
20220405 declaration after statement
2022-05-06 16:16:52 -07:00
Tesfa Mael
74b3df4f6c
Refactor tmpF in RsaMGF1
2022-05-06 16:14:47 -07:00
David Garske
bc877dab2a
Changes to support v5.3.0 cube pack for ST.
2022-05-06 15:49:11 -07:00
David Garske
1e1a722332
Merge pull request #5113 from JacobBarthelmeh/docs
...
fix markdown in readme notes
2022-05-06 14:20:16 -07:00
Jacob Barthelmeh
576f0aa045
adjust setting of input pointer with BER pkcs7 edge case
2022-05-06 14:22:53 -06:00
Daniel Pouzzner
6be3dae6d3
Merge pull request #5104 from tmael/32_bit_ssize
...
Fix for stack and heap measurements of a 32-bit build
2022-05-06 14:32:06 -05:00
Tesfa Mael
ad2119b2f8
Review comments
2022-05-06 12:00:32 -07:00
David Garske
36877d78b4
Merge pull request #5078 from julek-wolfssl/wpas-tls13
...
Clean up wolfSSL_clear() and add some more logging
2022-05-06 11:45:43 -07:00
Daniel Pouzzner
b59ac022c9
fix comment explaining ConstantCompare() in AES_GCM_decrypt_C().
2022-05-06 13:36:54 -05:00
Daniel Pouzzner
ccc9b1535d
fix whitespace.
2022-05-06 13:34:32 -05:00
Daniel Pouzzner
99b44f15ef
fix various -Wdeclaration-after-statement, with and without --enable-smallstack.
2022-05-06 13:34:32 -05:00
David Garske
3e774be88c
Minor text and formatting cleanups.
2022-05-06 11:01:40 -07:00
David Garske
e1aefc08ac
Merge pull request #5110 from douzzer/20220405-NETWORK_UNSHARE_HELPER
...
$NETWORK_UNSHARE_HELPER
2022-05-06 09:46:36 -07:00
David Garske
88443dea8c
Merge pull request #5114 from SparkiDev/ct_fixes_2
...
SP: Div fixes for constant time
2022-05-06 09:44:11 -07:00
Juliusz Sosinowicz
b6b007de3c
Call ctx->rem_sess_cb when a session is about to be invalid
...
Allow the user to register a session remove callback with wolfSSL_CTX_sess_set_remove_cb() that will be called when the session is about to be free'd or evicted from cache.
2022-05-06 16:34:28 +02:00
kaleb-himes
ef89e2e637
Rename utc_str[_buf] -> time_str[_buf] (semantic change)
2022-05-06 08:18:14 -06:00
kaleb-himes
3e1ba5d4d4
Implement peer review feedback and leave some breadcrumbs in the event of future updates
2022-05-06 07:50:39 -06:00
Eric Blankenhorn
b19f70d182
Fix TSIP build with NO_AES_CBC
2022-05-06 07:31:13 -05:00
Juliusz Sosinowicz
7e9896d162
Only clear session when we didn't complete a handshake
...
- Allow overriding buffer size with `WOLFSSL_MSG_EX_BUF_SZ`
- Allow disabling `WOLFSSL_MSG_EX` by defining `NO_WOLFSSL_MSG_EX`
2022-05-06 12:35:49 +02:00
Sean Parkinson
9ffc300641
SP: Div fixes for constant time
...
Implement div words for different platforms.
Use implementation not using a divide instruction unless
SP_DIV_WORD_USE_DIV or we know there is a div instruction.
Fix Thumb implementation of div word.
2022-05-06 16:02:18 +10:00
Jacob Barthelmeh
a9c7bc9d00
fix markdown in readme notes
2022-05-05 17:12:55 -06:00
Jacob Barthelmeh
853db0841f
fix for indef buffer check with pkcs7
2022-05-05 16:25:28 -06:00
kaleb-himes
ecf449dfe0
Refactor wolfSSL_ASN1_TIME_adj to use GetUnformattedTimeString (new API)
2022-05-05 16:25:25 -06:00
Sean Parkinson
a4eaa31b5e
Merge pull request #5101 from dgarske/sniffer_async_test
...
Improve the sniffer asynchronous test case to support multiple concurrent streams
2022-05-06 08:14:32 +10:00
Daniel Pouzzner
4d4145e6a0
add support for $NETWORK_UNSHARE_HELPER to the relevant scripts/.
2022-05-05 15:59:11 -05:00
Daniel Pouzzner
19e8bb05f3
wolfcrypt/src/aes.c: fix shiftTooManyBitsSigned in AES_GCM_decrypt_C().
2022-05-05 15:54:31 -05:00
Tesfa Mael
ffe5599013
Fix testsuite 32-bit build
2022-05-05 08:08:09 -07:00
David Garske
6e880495dc
Merge pull request #5102 from SparkiDev/ct_valgrind_fixes_1
...
Constant time changes
2022-05-05 07:43:00 -07:00
Sean Parkinson
189c9ab234
Constant time changes
...
GCM: make borrow constant time.
AES-GCM decrypt: compare at end and constant time.
Random: array_add touchs all elements every time.
RSA-OAEP: look for padding byte in constant time (look at every byte in
array).
SP
- reduce conditional use (make them bit ops)
- Fix point adds to not use double when adding infinity to infinity
- Implement signed div as __divi3 is not constant time.
- Move check sof input variables to API.
2022-05-05 12:26:57 +10:00
David Garske
e81670a3c0
Merge pull request #5106 from douzzer/20220504-linuxkm-wc-port-h
...
linuxkm_wc_port.h: move several more definitions outside the BUILDING_WOLFSSL gate
2022-05-04 13:09:19 -07:00
David Garske
9767631ebe
Merge pull request #5100 from anhu/enable-wolfssh
...
For consistency, add --enable-wolfssh
2022-05-04 13:02:54 -07:00
Daniel Pouzzner
af8865d13e
linuxkm_wc_port.h: move several more definitions outside the BUILDING_WOLFSSL gate, as they are needed for applications to include various wolfssl headers.
2022-05-04 13:16:45 -05:00
Tesfa Mael
bdd6072ede
Check nomalloc with verify inline
2022-05-04 09:33:38 -07:00
JacobBarthelmeh
f12fd6ab8b
fix spelling
2022-05-04 09:11:12 -07:00
David Garske
af8f18b634
Merge pull request #5103 from danielinux/rsa-encryptsize
...
wc_RsaEncryptSize needed in verify only and no-PSS builds
2022-05-04 07:53:06 -07:00
Anthony Hu
fff3402ed4
WOLFSSL ---> WOLFSSH
2022-05-04 09:28:08 -04:00
Daniele Lacamera
e606cccb10
wc_RsaEncryptSize needed in verify only and no-PSS builds
2022-05-04 14:20:44 +02:00
Tesfa Mael
97f54e8e0a
Support RSA OAEP with no malloc
2022-05-03 22:57:47 -07:00
Tesfa Mael
ca955032a0
Fix 32-bit enable-trackmemory build
2022-05-03 20:48:38 -07:00
Tesfa Mael
a9d28da7ce
Fix 32-bit enable-stacksize build
2022-05-03 20:16:56 -07:00
David Garske
5f539b3921
Improve the sniffer asynchronous test case to support multiple concurrent streams.
2022-05-03 16:43:15 -07:00
Anthony Hu
cb929e1247
For consistency, add a --enable-wolfssl; keep --enable-ssl for backwards compat.
2022-05-03 12:08:13 -04:00
Sean Parkinson
e722c15be8
Merge pull request #5098 from JacobBarthelmeh/Release
...
- prep for release 5.3.0
2022-05-03 10:48:53 +10:00
David Garske
628a91efda
Fix for size calculation for encrypt then mac without openssl extra enabled. Fix for cast warning.
2022-05-02 17:11:48 -06:00
JacobBarthelmeh
6f5be32d3a
update rpm spec
2022-05-02 17:08:38 -06:00
Jacob Barthelmeh
94e34d7a98
use NO_SESSION_CACHE_REF with titan cache due to session rows too big error
2022-05-02 17:08:38 -06:00
Jacob Barthelmeh
29401334d3
prepare for release 5.3.0
2022-05-02 17:08:38 -06:00
David Garske
48cb185ce9
Merge pull request #5096 from JacobBarthelmeh/Testing
...
- static analysis test fixes
2022-05-02 10:05:08 -07:00
JacobBarthelmeh
14ff3d1f0f
fix for macro guard with test case building with trusted peer certs
2022-04-29 14:46:35 -07:00
JacobBarthelmeh
35f46018a5
Merge pull request #5094 from SparkiDev/mrg_armv8_old_c_2
...
Move delaration to before code statements.
2022-04-29 11:02:32 -06:00
Jacob Barthelmeh
9d7a02b28e
remove uint from test case and put variable declaration at top of scope
2022-04-29 10:40:44 -06:00
Jacob Barthelmeh
38c01b9d9f
fix for infer diff report
2022-04-29 10:34:38 -06:00
Hayden Roche
895522aa18
Make the critical extension flags in DecodedCert always available.
...
Prior to this commit, these were guarded by OPENSSL_EXTRA ||
OPENSSL_EXTRA_X509_SMALL. Adding them into the struct for non-compatibility
layer builds only increases memory usage slightly and is useful for the user.
2022-04-28 15:46:16 -07:00
Sean Parkinson
ef4d484f85
Move delaration to before code statements.
2022-04-29 08:13:20 +10:00
JacobBarthelmeh
ea8e9ee699
Merge pull request #5063 from kaleb-himes/ZD13349
...
Ensure supported curves and curve size(s) WIN FIPS
2022-04-28 11:50:19 -06:00
JacobBarthelmeh
df4dd7d5b3
Merge pull request #5088 from dgarske/sniffer_async_2
...
Fix to properly trap errors in sniffer (broken after async additions)
2022-04-28 09:47:05 -06:00
Kaleb Himes
2ec7951de6
Merge pull request #4803 from danielinux/tirtos-update-202201
...
Update TIRTOS support
2022-04-28 10:12:32 -05:00
Kaleb Himes
9970b68e45
Add HAVE_TLS_EXTENSIONS
2022-04-28 09:10:13 -06:00
David Garske
881b9e5b07
Merge pull request #5093 from SparkiDev/rsa_fermat_fix
...
Fix use of WC_RSA_NO_FERMAT_CHECK
2022-04-28 06:40:08 -07:00
Sean Parkinson
f91936944d
Fix use of WC_RSA_NO_FERMAT_CHECK
2022-04-28 16:29:48 +10:00
Sean Parkinson
67838e099d
Merge pull request #5092 from ejohnstown/cert-ext-gen-test
...
Certificate Extension Generation Test
2022-04-28 10:25:28 +10:00
JacobBarthelmeh
8b39f863e6
fix for buffer size and key cover
2022-04-27 13:14:22 -07:00
John Safranek
3294a3f8f8
Certificate Extension Generation Test
...
The test for certificate extensions requires both the test certs option
and the certificate generation option to run. The certs for the test are
generated by wolfCrypt. This disables the extensions test if
certificate generation is disabled.
2022-04-27 13:08:28 -07:00
Kaleb Himes
22802604c0
Merge pull request #5090 from dgarske/public_dh
...
Fix for DH public FFDHE incorrectly getting enabled
2022-04-27 13:08:46 -05:00
David Garske
277d6dc5dd
Fix minor clang-tidy warnings for async.
2022-04-27 10:22:19 -07:00
David Garske
93e8133453
Merge pull request #4896 from elms/compat/const_casting_fun
...
Casting away `const` for improved compatibility
2022-04-27 09:35:58 -07:00
David Garske
7e803f346d
Merge pull request #5076 from JacobBarthelmeh/fuzzing
...
fix for sanity check on PKCS7 indef read
2022-04-27 09:34:34 -07:00
David Garske
8bf228d346
Merge pull request #5083 from SparkiDev/d2i_ecpriv_der
...
d2i_ECPrivateKey() takes DER encoded data
2022-04-27 09:32:04 -07:00
David Garske
1d64c735ce
Merge pull request #5086 from elms/cmake/ocsp_crl
...
cmake: Add CRL, OCSP, and OCSP stapling options
2022-04-27 09:31:51 -07:00
David Garske
ad68bb9a7a
Merge pull request #5091 from SparkiDev/mrg_armv8_old_c
...
Can't declare variables in for statements
2022-04-27 09:31:19 -07:00
gojimmypi
83f4f9e5ef
Espressif notes for user_settings.h preference
2022-04-27 08:41:33 -07:00
David Garske
fbc2ccca1e
Fix to properly trap errors in sniffer SetupKeys after async changes. Fix minor scan-build warnings.
2022-04-27 08:28:36 -07:00
Kaleb Himes
11bdb8550e
Correction
2022-04-27 08:33:56 -06:00
JacobBarthelmeh
c0d7f3b2e6
add support for i.MX8 with QNX CAAM
2022-04-27 02:27:05 -07:00
Sean Parkinson
ac48438bd0
Can't declare variables in for statements
2022-04-27 11:10:53 +10:00
gojimmypi
7233732159
move ESP8266-specific to separate section
2022-04-26 17:58:14 -07:00
Sean Parkinson
f86f4a8ca0
d2i_ECPrivateKey() takes DER encoded data
...
Code was incorrectly using data as a private key instead of DER
decoding.
Fixed i2d_EcPrivateKey() to output DER encoded data.
2022-04-27 09:39:50 +10:00
elms
ec38048711
cmake: Add CRL, OCSP, and OCSP stapling options
2022-04-26 16:23:46 -07:00
David Garske
25e8bd6b45
Merge pull request #5044 from SparkiDev/sp_read_radix_10_oob
...
SP Math
2022-04-26 16:21:11 -07:00
David Garske
67029dc4e7
Fix to make sure the old public DH API's are not enabled unless FIPS v2 or older. Broken in PR #5018 .
2022-04-26 15:39:54 -07:00
elms
321e44226a
Casting away const for improved compatibility
...
This is appears to be an existing pattern.
Fixes #4893
2022-04-26 14:31:40 -07:00
Chris Conlon
a6d019ecf9
Merge pull request #5073 from JacobBarthelmeh/PKCS7
2022-04-26 14:41:13 -06:00
David Garske
cbc27f7de4
Merge pull request #5085 from douzzer/20220426-multi-test
...
20220426 multi-test fixups
2022-04-26 11:15:59 -07:00
John Safranek
7436a41bc7
Merge pull request #5046 from SparkiDev/cppcheck_fixes_8
...
cppcheck: fixes
2022-04-26 10:37:42 -07:00
John Safranek
7e8598f75b
Merge pull request #5081 from dgarske/sniffer_decrypt
...
Restore sniffer internal decrypt function. This allows decrypting TLS…
2022-04-26 09:37:32 -07:00
David Garske
67a3326e6d
Merge pull request #5082 from SparkiDev/sp_c++
...
CPP protection for extern references to asm code
2022-04-26 08:33:15 -07:00
Daniel Pouzzner
4e02d7e404
fix clang-tidy-Customer-CFG-7 readability-redundant-preprocessor.
2022-04-26 10:20:26 -05:00
David Garske
704a18d103
Merge pull request #5079 from tmael/rsa_vfg
...
Fix no malloc RSA test
2022-04-26 08:11:44 -07:00
Daniel Pouzzner
e6d267ef16
src/ssl.c wolSSL_DH_new_by_nid(): fix cppcheck nullPointer report.
2022-04-26 09:58:07 -05:00
Daniel Pouzzner
5e1a358dff
wolfcrypt/src/evp.c wolfSSL_EVP_PKEY_free(): fix clang-diagnostic-implicit-fallthrough.
2022-04-26 09:57:54 -05:00
Daniel Pouzzner
2c5db7b64c
fix whitespace.
2022-04-26 09:57:25 -05:00
Sean Parkinson
0be79a8629
CPP protection for extern references to asm code
2022-04-26 10:17:25 +10:00
Sean Parkinson
8737d46bb1
Merge pull request #5018 from haydenroche5/libspdm
...
Make changes to compatibility layer to support libspdm.
2022-04-26 09:55:22 +10:00
Sean Parkinson
d362b6dd08
Merge pull request #5033 from haydenroche5/ec_key_print_fp
...
Add wolfSSL_EC_KEY_print_fp to compat layer.
2022-04-26 09:51:37 +10:00
David Garske
273ed1df76
Restore sniffer internal decrypt function. This allows decrypting TLS v1.2 traffic ignoring AEAD errors.
2022-04-25 16:28:09 -07:00
Sean Parkinson
20e5e654a3
cppcheck: fixes
...
CBIORecv/Send are only assigned once.
IOCB_ReadCtx/WriteCtx only assigned once.
BuildMessage checks output and input wiht sizeOnly every call - state
machine doesn't cache these.
Renamed alias_tbl variables to something unique.
Other cppcheck fixes.
Also reworked pem_read_bio_key().
2022-04-26 09:26:41 +10:00
JacobBarthelmeh
1181081c38
Merge pull request #5075 from dgarske/cryptocb
...
Fix for PKCS7 with Crypto Callbacks
2022-04-25 17:23:28 -06:00
Masashi Honma
3ab5ccd04f
Add support for EVP_PKEY_sign/verify functionality ( #5056 )
...
* Fix wolfSSL_RSA_public_decrypt() return value to match Openssl
* Add support for EVP_PKEY_verify_init() and EVP_PKEY_verify()
* wpa_supplicant SAE public key functionality requires this function.
* Add DSA support for EVP_PKEY_sign/verify()
* Add ECDSA support for EVP_PKEY_sign/verify()
* Add tests for EVP_PKEY_sign_verify()
* Fix "siglen = keySz" at error cases
* Fix wolfSSL_DSA_do_sign() usage
1. Check wolfSSL_BN_num_bytes() return value
2. Check siglen size
3. Double the siglen
* Check return code of wolfSSL_i2d_ECDSA_SIG() in wolfSSL_EVP_DigestSignFinal()
* Add size calculations to `wolfSSL_EVP_PKEY_sign`
* Add size checks to wolfSSL_EVP_PKEY_sign before writing out signature
* Use wc_ecc_sig_size() to calculate ECC signature size
Signed-off-by: Masashi Honma <masashi.honma@gmail.com >
Co-authored-by: Juliusz Sosinowicz <juliusz@wolfssl.com >
2022-04-25 14:19:56 -07:00
Jacob Barthelmeh
9bf4a94796
with WOLFSSL_NO_DH186 restriction allow odd DH param size generations
2022-04-25 15:13:24 -06:00
John Safranek
bfd24cfa23
Merge pull request #5071 from dgarske/scan-build
...
Fixes for various nightly scan-build errors and warnings
2022-04-25 13:30:43 -07:00
Tesfa Mael
85ef91ce6d
Move up local variable at the beginning
2022-04-25 12:40:31 -07:00
David Garske
34d541109d
Additional scan-build warning fixes.
2022-04-25 09:55:36 -07:00
Tesfa Mael
18a6a7c4a7
Fix RSA nomalloc test
2022-04-25 09:50:50 -07:00
Jacob Barthelmeh
cd2c7e1438
guard on test case for ecc curves
2022-04-25 09:01:24 -06:00
Juliusz Sosinowicz
4013f83e4f
Add some missing logs and implement WOLFSSL_MSG_EX()
...
WOLFSSL_MSG_EX() uses XVSNPRINTF to allow for formatted strings to be printed. It uses a 100 byte internal stack buffer to format the log message.
2022-04-25 15:59:07 +02:00
gojimmypi
15a48e411d
Add WOLFSSL_ESP8266 for ESP-IDF
2022-04-23 12:30:34 -07:00
David Garske
70ad19467c
Merge pull request #5068 from cconlon/jniPKCallbacks
...
Don't enable PK Callbacks with JNI FIPS builds
2022-04-22 16:08:29 -07:00
David Garske
4ecf3545d7
Improve scan-build fix for ProcessPeerCertParse checking of empty dCert. With WOLFSSL_SMALL_CERT_VERIFY it is NULL.
2022-04-22 16:07:24 -07:00
David Garske
e9b80e53fa
Fix issue with InitX509Name.
2022-04-22 16:02:54 -07:00
David Garske
74cd2fd910
Fix for integer.c possible uses of mp_int input with DP NULL.
2022-04-22 16:02:54 -07:00
David Garske
ea2841fa7a
Make sure ASN1 isDynamic is always set to 0. SK Cipher doesn't have free (data is contained in the SK).
2022-04-22 16:02:54 -07:00
David Garske
84a33183a6
Various scan-build fixes.
2022-04-22 16:02:54 -07:00
David Garske
3755b88a02
Fix InitX509Name to set dynamicName on init.
2022-04-22 16:02:53 -07:00
David Garske
c41b1b1b9b
Fix to ensure args->dCert is set for ProcessPeerCertParse.
2022-04-22 16:02:53 -07:00
David Garske
a6a89d3316
Fix for integer.c s_mp_add output to make sure it grows if not set.
2022-04-22 16:02:53 -07:00
David Garske
5a75e0f6c6
Fix for MCAPI CRYPT_AES_CTX size with ./configure --enable-pkcallbacks --enable-mcapi --enable-ecc --enable-sha512 --with-libz --enable-opensslextra.
2022-04-22 16:02:53 -07:00
David Garske
293d7e1241
Fix for report of Use of memory after it is freed. Force the dataIsAlloc set to 0.
2022-04-22 16:02:53 -07:00
David Garske
8fb1bb8781
Merge pull request #5074 from embhorn/zd14105
...
Fix for mingw builds
2022-04-22 15:27:58 -07:00
David Garske
9cbf92df01
Fix for PKCS7 sign to allow providing a public key only if using crypto callback w/devId. ZD13949.
2022-04-22 14:29:43 -07:00
Jacob Barthelmeh
d96bd30398
fix for sanity check on PKCS7 indef read
2022-04-22 15:28:03 -06:00
Eric Blankenhorn
b543aa0148
Fix for mingw builds
2022-04-22 14:35:46 -05:00
John Safranek
bf16696d8c
Merge pull request #5036 from dgarske/sniffer
...
Fixes for minor sniffer and async issues
2022-04-22 12:24:33 -07:00
David Garske
ed58cfdc0f
Add DEBUG_CRYPTOCB and wc_CryptoCb_InfoString to help with debugging crypto callbacks.
2022-04-22 12:20:55 -07:00
Jacob Barthelmeh
d5927a58dd
add store of PKCS7 cert used for verify
2022-04-22 11:26:34 -06:00
Jacob Barthelmeh
8ea953f8c0
add support for importing private only EC key to a WOLFSSL_EVP_PKEY struct
2022-04-22 10:20:42 -06:00
David Garske
cb1dbb75f8
Fixes for sniffer-gen.sh.
2022-04-22 08:25:00 -07:00
Juliusz Sosinowicz
8c4887c166
Free session in wolfSSL_clear
...
- Define `NO_SESSION_CACHE_REF` in wpa build
2022-04-22 15:54:04 +02:00
David Garske
6606984101
Fix for building sniffer without ECC while Curve25519 is enabled.
2022-04-21 16:54:11 -07:00
David Garske
2fa1e19fe7
Fix for ./configure --enable-sniffer --enable-session-ticket --disable-ecc && make.
2022-04-21 13:28:38 -07:00
Chris Conlon
cfa338314d
do not enable PK Callbacks with JNI in FIPS mode
2022-04-21 11:06:54 -06:00
Daniel Pouzzner
4a4b019e30
tests/api.c: in test_wc_ecc_verify_hash_ex(), check that passing zero r and/or s to wc_ecc_verify_hash_ex() returns MP_ZERO_E.
2022-04-21 07:21:42 +02:00
Hayden Roche
cfab451328
Merge pull request #5024 from dgarske/zd13538
2022-04-20 13:08:13 -07:00
Hayden Roche
7964fa4195
Merge pull request #5055 from elms/cmake/out_of_src
2022-04-20 11:16:50 -07:00
David Garske
f9acaab6fe
Fix memory leak with pcap bpf_program not calling pcap_freecode.
2022-04-19 16:45:49 -07:00
David Garske
ec76f79e9d
Fixes for sniffer decrypt broken in PR #4875 . The TLS v1.2 sniffer decrypt did not have ssl->curRL set for proper auth tag calculation and was placing the data at offset + 8 to leave room for explicit IV.
2022-04-19 16:31:27 -07:00
David Garske
49f510544a
Merge pull request #5057 from haydenroche5/pem_write_ec_rsa_pub
...
Add wolfSSL_PEM_write_RSAPublicKey and wolfSSL_PEM_write_EC_PUBKEY.
2022-04-19 16:19:38 -07:00
kaleb-himes
696c5eed25
Ensure supported curves and curve size(s) WIN FIPS
2022-04-19 16:16:15 -06:00
elms
29392ac6b3
spell fix: OSCP -> OCSP
2022-04-19 15:11:08 -07:00
Elms
d4e8922dfd
cmake: fixup install lib structure for windows
2022-04-19 15:11:08 -07:00
Elms
a7cc438c9c
cmake: out of source support
...
Add `WOLFSSL_BUILD_OUT_OF_TREE` option to force not changing the
source tree. Also defaults to `CMAKE_DISABLE_SOURCE_CHANGES` to avoid
failures
2022-04-19 15:11:08 -07:00
Daniel Pouzzner
5d0654ee56
Merge pull request #5062 from dgarske/clang_str
...
Fix for issue with `error: format string is not a string literal`
2022-04-19 14:27:36 -05:00
Hayden Roche
d7085069d6
Add wolfSSL_PEM_write_RSAPublicKey and wolfSSL_PEM_write_EC_PUBKEY.
...
These were compatibility layer stubs before.
2022-04-19 09:42:10 -07:00
David Garske
95a85d16d2
Fix for issue with error: format string is not a string literal.
2022-04-19 08:49:05 -07:00
David Garske
70a0983bbc
Fix for minor warning with chain input enabled and async disabled.
2022-04-18 16:17:37 -07:00
John Safranek
52b176b6a1
Merge pull request #5060 from cconlon/ecFipsReady
...
ECDH_compute_key: allow setting of globalRNG with FIPS 140-3 / Ready
2022-04-18 16:15:14 -07:00
David Garske
710f49795f
Fix for session cache locking with session stats in get_locked_session_stats.
2022-04-18 14:29:42 -07:00
David Garske
659d33fdaf
Fixes for minor sniffer and async issues:
...
* Sniffer: Remove old restrictions for max strength, encrypt-then-mac and forcing openssl-extra.
* Fix bound warning with strncpy in sniffer.c.
* Fix for async DH issue.
* Fix for SP math all not initializing raw big int.
* Fix for array bounds warning with "-O3" on SetEccPublicKey.
* Fix a sniffer async edge case with TLS v1.2 static RSA and extended master.
* Improved the sniffer test script detection of features.
* Disable ECC custom curve test with Intel QuickAssist.
2022-04-18 11:46:40 -07:00
David Garske
9172abc969
Merge pull request #5059 from julek-wolfssl/missing-XFCLOSE
...
Add missing XFCLOSE()
2022-04-18 14:16:36 -04:00
Chris Conlon
567ae7ca55
Merge pull request #5061 from miyazakh/sce_keydata_update
2022-04-18 09:14:34 -06:00
Hideki Miyazaki
6e70cdf3b5
Update key data for sce example
2022-04-17 14:29:44 +09:00
John Safranek
e89b4cce4c
Merge pull request #5045 from SparkiDev/wycheproof_armasm
...
Wycheproof testing of Aarch64 ASM
2022-04-15 11:23:45 -07:00
John Safranek
8eed940e3a
Merge pull request #5040 from SparkiDev/wycheproof_intelasm
...
Wycheproof fixes
2022-04-15 11:19:57 -07:00
John Safranek
3ab87ba2ed
Merge pull request #5039 from SparkiDev/ecc_pub_api
...
ECC: make public APIS for add and double points
2022-04-15 11:09:37 -07:00
Chris Conlon
35cb3c8a79
ECDH_compute_key: allow setting of globalRNG with FIPS 140-3 / Ready
2022-04-15 09:36:14 -06:00
Chris Conlon
6c16b9c0b5
Merge pull request #5054 from miyazakh/tsipV1p15_grose
...
Update Renesas TSIP version to 1.15 on GR-ROSE
2022-04-15 09:34:09 -06:00
Eric Blankenhorn
a70e188758
Merge pull request #5058 from douzzer/20220414-clang-tidy-intmath
...
20220414-clang-tidy-intmath
2022-04-15 10:17:27 -05:00
Juliusz Sosinowicz
a6319fc2a9
Add missing XFCLOSE()
2022-04-15 16:26:31 +02:00
Daniel Pouzzner
607a24b499
fixes for clang-tidy and sanitizer hygiene with --disable-fastmath.
2022-04-14 21:06:04 -05:00
Daniel Pouzzner
096889927d
wolfcrypt/src/port/devcrypto/devcrypto_aes.c: remove redundant "int ret" in wc_AesCtrEncrypt() (supersedes #5052 ).
2022-04-14 20:23:31 -05:00
Eric Blankenhorn
2e3ebd7d8c
Merge pull request #5053 from kaleb-himes/CLOUD_PORTING_A
...
Change void cast(s) to be non-conditional and consolidate condition l…
2022-04-14 14:21:42 -05:00
Hideki Miyazaki
2fbe030e5e
update tsip version to 1.15
2022-04-14 06:42:11 +09:00
kaleb-himes
d706e2be32
Change void cast(s) to be non-conditional and consolidate condition logic
2022-04-13 10:25:43 -06:00
Chris Conlon
947c72937f
Merge pull request #5049 from miyazakh/unused_param
2022-04-13 09:02:26 -06:00
Chris Conlon
6cd87d56d4
Merge pull request #5042 from TakayukiMatsuo/certupdate
2022-04-13 09:00:10 -06:00
Daniel Pouzzner
26b5d032b7
Merge pull request #5050 from SparkiDev/ecc_import_fail
...
ECC: fix import failure return
2022-04-13 08:02:27 -05:00
Sean Parkinson
824b7a3f3f
ECC: fix import failure return
...
Passing in x=0 and y=0 meant to return ECC_INF_E.
Passing in x=0, y=not 0 or x=not 0, y=0 now checks whether the point is
valid and forces a return of BAD_FUNC_ARG when IS_POINT_E is returned
from check.
2022-04-13 14:03:13 +10:00
Hideki Miyazaki
c5056f408f
fix unused parameter when using CRYPTO_CB_ONLY_RSA
2022-04-13 07:48:18 +09:00
Sean Parkinson
55e13d40b3
SP Math
...
sp_read_radix_10: check _sp_add_d doesn't error due to overflow
_sp_add_d: Don't change value of used for result until it is known to be
valid.
2022-04-13 08:33:30 +10:00
Sean Parkinson
6cc91c8f9b
Wycheproof testing of Aarch64 ASM
...
Fix which bytes are incremented for AES-GCM - only 4 bytes are counter.
Fix Curve25519 to reduce to below modulus at end.
2022-04-12 11:45:14 +10:00
Hayden Roche
0ef7435580
Make changes to compatibility layer to support libspdm.
...
- Add support for ASN1_TIME_compare, DH_new_by_nid, OBJ_length, OBJ_get0_data,
and ChaCha20-Poly1305 and HKDF in the EVP layer.
- Map EC_POINT_get_affine_coordinates to
wolfSSL_EC_POINT_get_affine_coordinates_GFp and EC_POINT_set_affine_coordinates
to wolfSSL_EC_POINT_set_affine_coordinates_GFp.
- Add kdf.h compatibility header.
2022-04-11 15:07:27 -07:00
Hayden Roche
0717135e49
Add wolfSSL_EC_KEY_print_fp to compat layer.
2022-04-11 13:02:38 -07:00
TakayukiMatsuo
830db63bcf
Update certificate signature data for TSIP in response to /certs update
2022-04-12 02:55:58 +09:00
John Safranek
e87ded85b4
Merge pull request #5041 from embhorn/zd13969
...
Add ability to set ECC Sign userCTX using WOLFSSL_CTX
2022-04-11 09:38:52 -07:00
Eric Blankenhorn
ab6dc8d669
Add ability to set ECC Sign userCTX using WOLFSSL_CTX
2022-04-11 08:41:27 -05:00
Sean Parkinson
2995c96f11
Wycheproof fixes
...
Curve25519: reduce to less than mod at end of curve25519, optimize to
not use imulq when andq can be used instead.
x86_64 Karatsuba Mul: Don't put add carry into overflow and then
continue adding zero. Overflow is lost.
2022-04-11 15:09:40 +10:00
Sean Parkinson
b6db087a62
ECC: make public APIS for add and double points
...
Use internal API internally.
2022-04-11 09:19:23 +10:00
Sean Parkinson
0298a29a6f
Merge pull request #5037 from JacobBarthelmeh/hsm
...
fix for function rename
2022-04-11 08:48:28 +10:00
JacobBarthelmeh
cd1344bbed
Merge pull request #5032 from kaleb-himes/ZD13946
...
Add logic equivalent to configure.ac in settings.h for poly1305
2022-04-08 15:13:16 -06:00
Jacob Barthelmeh
83ad0b7010
fix for function rename
2022-04-08 15:05:08 -06:00
David Garske
79e2b2b4ce
Merge pull request #5030 from LinuxJedi/add-iar-msp430
...
Add IAR MSP430 example
2022-04-08 13:15:42 -07:00
kaleb-himes
5d46d10933
Address peer feedback
2022-04-08 10:12:24 -06:00
David Garske
c84c465fc6
Merge pull request #5035 from douzzer/20220408-fuzz-6262033210802176
...
oss-fuzz 6262033210802176
2022-04-08 08:34:16 -07:00
Andrew Hutchings
50bc20e340
Fix include.am for MSP430
2022-04-08 16:26:48 +01:00
David Garske
6a21a90f41
Merge pull request #5034 from SparkiDev/sp_wycheproof_fixes
...
SP fixes from Whycheproof tests
2022-04-08 08:20:56 -07:00
Andrew Hutchings
997feecd6e
Remove unused header from MSP430 example
2022-04-08 15:42:38 +01:00
Andrew Hutchings
676fe19e2f
Fixes to the MSP430 example
...
* Fix include.am missing line
* Fix macros
* Add "static" keyword where needed
* Make compatible with MSP430 GCC
* Add MSP430 GCC Makefile
* Fix watchdog issue with GCC, also fixes IAR when large data model is
used
* Fix comment style
* Fix typo in RNG (makes it ever so slightly more random)
* Add example output to README
2022-04-08 15:08:55 +01:00
Daniel Pouzzner
1c570fae3b
wolfcrypt/src/asn.c GetLength_ex(): test for overlong length spec before using length as shift operand.
2022-04-08 08:15:02 -05:00
Sean Parkinson
ed7e1f9770
SP fixes from Whycheproof tests
...
EC point add is a double if affine ordinates are the same.
Fix AVX2 implementation of mod inv to do conversion from 26 bits in
32-bit registers to 64 bits in 64-bit registers. Also handle negative
value.
RSA OAEP: loop down to last byte. Must have a separator.
Div for x86_64: fix to have all 1s when high word equals divisor.
2022-04-08 15:01:06 +10:00
Chris Conlon
9859492222
Merge pull request #5029 from haydenroche5/asn1_time_diff_2038
2022-04-07 16:45:11 -06:00
David Garske
5ea38b059e
For improved compatibility populate the extension value for NID_subject_alt_name.
2022-04-07 11:10:03 -07:00
David Garske
5231dc63fa
Merge pull request #5031 from douzzer/20220407-clang-tidy
...
20220407 clang-tidy
2022-04-07 09:03:56 -07:00
kaleb-himes
c1421b1be8
Add logic equivalent to configure.ac in settings.h for poly1305
2022-04-07 09:00:26 -06:00
Andrew Hutchings
be742cabda
Add missing include.am
2022-04-07 15:39:32 +01:00
Daniel Pouzzner
288fdbcc3e
fix readability-named-parameter.
2022-04-07 08:02:24 -05:00
Daniel Pouzzner
28cefb0d1a
fix clang-analyzer-core.NonNullParamChecker.
2022-04-07 08:01:00 -05:00
Daniel Pouzzner
4efd06fdc1
fix readability-inconsistent-declaration-parameter-name.
2022-04-07 07:59:59 -05:00
Daniel Pouzzner
0083afc279
fix whitespace.
2022-04-07 07:59:07 -05:00
Andrew Hutchings
2663f5abaf
Add IAR MSP430 example
...
A basic MSP430 example for IAR IDE.
2022-04-07 11:07:27 +01:00
Hayden Roche
161d74879a
Change time2epoch to TimeToUnixTime.
2022-04-06 21:38:24 -07:00
Sean Parkinson
284ebacc57
Merge pull request #4916 from JacobBarthelmeh/hsm
...
Add SECO use and expand cryptodev
2022-04-07 10:21:32 +10:00
David Garske
80766566fc
Fixes for X509_add_ext and new test case.
2022-04-06 16:35:53 -07:00
Sean Parkinson
87dc197284
Merge pull request #5028 from douzzer/20220406-cppcheck
...
fixes to mollify cppcheck (sizeofDivisionMemfunc, zerodivcond, shiftTooManyBits, signConversionCond)
2022-04-07 08:45:24 +10:00
Jacob Barthelmeh
e9aae8b571
use hash grow function with cmac
2022-04-06 15:08:19 -06:00
David Garske
f6f6d91ae1
Merge pull request #5027 from LinuxJedi/fix-dox
...
Minor documentation cleanup
2022-04-06 14:01:08 -07:00
Daniel Pouzzner
9b2d927de7
Merge pull request #5026 from danielinux/fix_unititialized_var
...
Fixed unused variable in asn.c
2022-04-06 13:03:47 -05:00
David Garske
1b5af2fdd9
Merge pull request #5022 from SparkiDev/wycheproof_fixes
...
Wycheproof fixes/changes
2022-04-06 10:29:17 -07:00
David Garske
49e72633b8
Merge pull request #5025 from SparkiDev/ssl_move_x509
...
ssl.c break out
2022-04-06 10:10:18 -07:00
JacobBarthelmeh
2a0b726c15
add AES init functions to ECB test case
2022-04-06 09:42:38 -07:00
Daniel Pouzzner
4e8c180290
fixes to mollify cppcheck (sizeofDivisionMemfunc, zerodivcond, shiftTooManyBits, signConversionCond).
2022-04-06 11:36:01 -05:00
Andrew Hutchings
5ea9d11295
Minor documentation cleanup
...
Fixes two things across all the Doxygen:
1. Remove WOLFSSL_API from each definition
2. Add missing parameter names from functions
2022-04-06 16:17:36 +01:00
JacobBarthelmeh
91d883d99f
macro guard on ECB test case and use realloc for hash
2022-04-06 07:04:17 -07:00
Daniele Lacamera
3d9a1647d4
Fixed unused variable in asn.c
2022-04-06 15:35:28 +02:00
Sean Parkinson
25aa0af260
ssl.c break out
...
Move the X509 API out of ssl.c into x509.c
2022-04-06 17:25:26 +10:00
Sean Parkinson
e9187f5f00
Wycheproof fixes/changes
...
Allow Chachac20-Poly1305 to take an empty msg.
Allow AES-SIV to have an empty nonce.
Don't allow the length to be malleable. Must use the smallest number of
bytes to represent value.
ECDSA and DSA signature values are positive.
Add Sha512-224 and Sha512-256 OIDs.
ASN template - ensure the ECDSA/DSA signature uses all data.
Curve25519/Curve448 - WOLFSSL_ECDHX_SHARED_NOT_ZERO means shared secret
can't be 0.
Curve25519/Curve448 - check public value is less than order.
ECC - x or y may be zero but not both.
Ed25519/Ed448 - check S is less than order.
Ed448 - ge_p3_dbl can be simplified for ASM.
Prime check (integer.c/tfm.c/sp_int.c): Don't allow negative values and
make sure random candidate doesn't have bits higher than those in a set
when bits not a multiple of 8.
RSA: support Sha512-224 and Sha512-256.
RSA: Fix check for invalid in decryption. Affects plaintexts 256 bytes
and longer.
RSA: Don't allow base be larger than modulus.
RSA: Check small ciphertext (1 or 0) on decrypt when not using OAEP.
RSA: WOLFSSL_RSA_DECRYPT_TO_0_LEN allows decrypted value to be 0.
SP math all: fix div to handle large a and d when checking size of
remainder.
SP math all: set sign of result in sp_mod_2d()
2022-04-06 15:35:01 +10:00
JacobBarthelmeh
a338b4c933
refactor SHA grew function, revert benchmark devid, increase SHA_CTX size, add AES ECB cryptocb test
2022-04-05 14:45:18 -07:00
David Garske
4f5aa81031
Merge pull request #5000 from ejohnstown/tls13-wctest
...
Add TLSv1.3 KDF to wolfCrypt Test
2022-04-05 10:45:35 -07:00
David Garske
6a3f98627e
Merge pull request #5013 from anhu/wc_CheckCertSigPubKey
...
Add new public API wc_CheckCertSigPubKey()
2022-04-05 09:48:08 -07:00
David Garske
99fbd6f160
Merge pull request #4963 from SparkiDev/tls13_psk_multi_id
...
TLS 1.3 PSK: multiple ids for a cipher suite
2022-04-05 09:47:14 -07:00
David Garske
e9a238ca86
Merge pull request #5021 from JacobBarthelmeh/certs
...
allow up to and including CTC_MAX_SKID_SIZE (32 byte hash)
2022-04-05 09:46:34 -07:00
David Garske
97b85552e8
Merge pull request #5023 from douzzer/20220405-strict-aliasing
...
enforce strict aliasing rules
2022-04-05 09:46:12 -07:00
John Safranek
eefc0f2f57
Add TLSv1.3 KDF to wolfCrypt Test
...
Added a test for the TLSv1.3 KDF to the wolfcrypt test. It uses 6
different test cases from the CAVP tests. A set of 8 session keys are
generated using multiple exporters.
2022-04-05 08:56:15 -07:00
Daniel Pouzzner
328de3ed63
remove -Wno-strict-aliasing from AX_HARDEN_CC_COMPILER_FLAGS and AX_HARDEN_CXX_COMPILER_FLAGS in m4/ax_harden_compiler_flags.m4, and fix strict aliasing infractions in api.c.
2022-04-05 08:10:16 -05:00
Daniel Pouzzner
e3409a40a5
configure.ac: when $ENABLED_LINUXKM_DEFAULTS, set -DWOLFSSL_OLD_PRIME_CHECK only if $ENABLED_FIPS == no.
2022-04-05 08:10:03 -05:00
Daniel Pouzzner
b2a2a8af4a
fix whitespace.
2022-04-05 08:09:48 -05:00
Sean Parkinson
df9335ee0a
Merge pull request #4988 from tmael/sp_loop
...
Fixes for Diab C89 and armclang
2022-04-05 08:20:47 +10:00
Sean Parkinson
8dd07bbb73
Merge pull request #5011 from dgarske/ecc_key_decode
...
Fix to check if `wc_EccPublicKeyToDer` has enough output buffer space
2022-04-05 08:03:03 +10:00
Sean Parkinson
77485d987e
Merge pull request #5010 from haydenroche5/asn1_time_diff_2038
...
Fix year 2038 problem in wolfSSL_ASN1_TIME_diff.
2022-04-05 07:58:36 +10:00
Sean Parkinson
c3a9520eb5
Merge pull request #5016 from dgarske/async_fixes
...
Fixes for async in wolfCrypt test
2022-04-05 07:56:08 +10:00
Anthony Hu
fc6e10ff42
Another test fixup.
2022-04-04 17:42:25 -04:00
Jacob Barthelmeh
68ebb051e5
allow up to and including CTC_MAX_SKID_SIZE (32 byte hash)
2022-04-04 15:19:17 -06:00
Hayden Roche
f39bd5e02b
Merge pull request #5014 from dgarske/kcapi_ecc_import
2022-04-04 14:08:29 -07:00
David Garske
829a8a4039
Merge pull request #5009 from embhorn/zd13980
...
Fix build errors for NO_WOLFSSL_SERVER and NO_WOLFSSL_CLIENT
2022-04-04 12:43:49 -07:00
David Garske
6513e2ce8f
Merge pull request #5019 from douzzer/20220404-linux5v18-etc
...
20220404 linux5v18 etc
2022-04-04 11:08:18 -07:00
David Garske
bb4698a9e8
Merge pull request #5020 from douzzer/20220402-fips-linuxkm-pie-only-on-linuxkm
...
--enable-fips=v5 --disable-linuxkm-pie
2022-04-04 11:08:06 -07:00
Hayden Roche
9c1e2a83d1
Fix year 2038 problem in wolfSSL_ASN1_TIME_diff.
...
Prior to this commit, this function used XMKTIME (mktime) to convert the
passed in WOLFSSL_ASN1_TIMEs to Unix timestamps. On platforms where time_t is
32 bits long, times after the year 2038 can't be represented with this type. To
fix this, we need to not use XMKTIME. With this commit, the static function
time2epoch is added to ssl.c, which uses the date time information to compute
seconds since the Unix epoch without the use of mktime. It returns the seconds
as a long long. This is sufficient to make the function work for years > 2038 on
the platform of the user who discovered this problem in the first place (Yocto
Linux on ARMv7).
2022-04-04 11:01:21 -07:00
Anthony Hu
400c7238ef
Test fixup.
2022-04-04 13:43:06 -04:00
Anthony Hu
ae9926cc42
Missing flag in unit test.
2022-04-04 12:39:10 -04:00
David Garske
9b5ad6f218
Merge pull request #4968 from miyazakh/cryptonly
...
add WOLF_CRYPTO_CB_ONLY_RSA and WOLF_CRYPTO_CB_ONLY_ECC
2022-04-04 08:31:41 -07:00
David Garske
757c93c6d5
Merge pull request #4945 from kaleb-himes/ZD13795
...
Fix for ZD13795 and also remove all-caps parameter
2022-04-04 08:25:10 -07:00
Daniel Pouzzner
04385f8557
configure.ac: fips 140-3: don't insist on linuxkm-pie unless configuring an actual linuxkm build.
2022-04-04 10:14:22 -05:00
Daniel Pouzzner
0d6c283f7a
fixes for -Werror=declaration-after-statement in debug builds.
2022-04-04 09:29:26 -05:00
Daniel Pouzzner
492704992a
wolfssl/wolfcrypt/settings.h: #ifdef WOLFSSL_LINUXKM, make sure config.h is included only once, before masking out inapplicable autodetected features.
2022-04-04 09:28:06 -05:00
Sean Parkinson
0fba16a394
Merge pull request #4998 from haydenroche5/get_conv_form
...
Add wolfSSL_EC_KEY_get_conv_form to compatibility layer.
2022-04-04 08:47:14 +10:00
Hayden Roche
880afe0d89
Add wolfSSL_EC_KEY_get_conv_form to compatibility layer.
2022-04-02 13:57:33 -07:00
David Garske
54aa211fee
Merge pull request #5015 from douzzer/20220401-Wvla-Wdeclaration-after-statement
...
fix codebase for -Wvla -Wdeclaration-after-statement
2022-04-01 18:48:00 -07:00
Hideki Miyazaki
8e4abb0011
addressed code review comment
2022-04-02 09:18:28 +09:00
Anthony Hu
c522baa75e
Unit tests.
2022-04-01 18:34:21 -04:00
Daniel Pouzzner
ae3996fd0e
fix codebase for -Wvla -Wdeclaration-after-statement; fix some whitespace.
2022-04-01 14:44:10 -05:00
Anthony Hu
211007fb44
WOLFSSL_ASN_API ---> WOLFSSL_API
2022-04-01 15:24:40 -04:00
David Garske
bd0e222fec
Merge pull request #5012 from julek-wolfssl/evp-enc-dec-block
...
Implement `EVP_EncodeBlock` and `EVP_DecodeBlock`
2022-04-01 12:24:23 -07:00
David Garske
6ec0c22a28
Fixes for async in wolfCrypt test.
2022-04-01 12:04:31 -07:00
David Garske
ded168f238
Add check for buffer space in wc_EccPublicKeyToDer. Refactor SetEccPublicKey to put public key directly into output buffer and eliminate small stack. Fixes ZD 13904.
2022-04-01 11:46:27 -07:00
David Garske
9c572efa40
Disable the public key check in import private key for KCAPI. Fix type warning in KCAPI AES.
2022-04-01 11:27:17 -07:00
David Garske
e1965094ad
Add check for ULONG_MAX in SP math to detect if pre-processor correctly handles 64-bit types.
2022-04-01 09:24:46 -07:00
Anthony Hu
edea6428d9
Add new public API wc_CheckCertSigPubKey()
2022-04-01 11:40:25 -04:00
Eric Blankenhorn
ef16ce806c
Fix build errors for NO_WOLFSSL_SERVER and NO_WOLFSSL_CLIENT
2022-04-01 08:04:41 -05:00
Juliusz Sosinowicz
6dffa8a13d
Implement EVP_EncodeBlock and EVP_DecodeBlock
2022-04-01 13:29:40 +02:00
Tesfa Mael
4db45cea4e
Fixes to build with diab and armclang
2022-03-31 20:48:28 -07:00
David Garske
99af84f1e2
Whitespace cleanups.
2022-04-01 09:36:53 +09:00
Hideki Miyazaki
d3a379adac
add WOLF_CRYPTO_CB_ONLY_RSA and WOLF_CRYPTO_CB_ONLY_ECC
2022-04-01 09:36:52 +09:00
Chris Conlon
b45cd921b6
Merge pull request #5005 from dgarske/renesas_spell
2022-03-31 17:44:04 -06:00
Sean Parkinson
7b21cd8cf0
Merge pull request #5001 from dgarske/kcapi_ecc
...
KCAPI ECC/AES optimizations to further reduce page memory use
2022-04-01 08:36:23 +10:00
Sean Parkinson
79444fdb56
Merge pull request #4997 from dgarske/qat_eckg
...
Support for Intel QuickAssist ECC KeyGen acceleration
2022-04-01 08:32:21 +10:00
Sean Parkinson
1add8703e2
Merge pull request #4996 from haydenroche5/bn_rand
...
Improve wolfSSL_BN_rand.
2022-04-01 08:12:22 +10:00
Anthony Hu
5a8fc919ef
Merge pull request #5006 from dgarske/mcapi_test
2022-03-31 18:06:13 -04:00
David Garske
33d2f2687f
Merge pull request #5007 from douzzer/20220331-ignore-readability-avoid-const-params-in-decls
...
20220331-ignore-readability-avoid-const-params-in-decls
2022-03-31 15:05:22 -07:00
Daniel Pouzzner
01f9f7df5f
Merge pull request #5002 from JacobBarthelmeh/Compatibility-Layer
...
sanity check before copy with new memory bio
2022-03-31 15:08:26 -05:00
David Garske
0f0fdea7ff
Merge pull request #5004 from julek-wolfssl/apache-enable-etm
...
Allow encrypt then mac with apache
2022-03-31 12:08:50 -07:00
Daniel Pouzzner
773170464e
undo changes to header files (see b7cecbacb) made to mollify clang-tidy's overly pedantic readability-avoid-const-params-in-decls -- keep declarations and definitions fully aligned, to mollify broken compilers.
2022-03-31 14:02:08 -05:00
David Garske
acb04bec0c
Fix mcapi_test.c to include the settings.h before crypto.h.
2022-03-31 10:54:53 -07:00
David Garske
61f6b5e29c
Peer review feedback.
2022-03-31 10:04:23 -07:00
David Garske
064888bb2a
Add KCAPI ECC support for using a private key id.
2022-03-31 09:05:03 -07:00
David Garske
f8007b2d8f
Further KCAPI AES/ECC memory optimizations. Adds KCAPI_USE_XMALLOC option for AES and ECC to reduce page memory use in certain KCAPI cases that allow it.
2022-03-31 08:58:22 -07:00
David Garske
1993851274
Renesas spelling, code formatting and whitespace fixes.
2022-03-31 08:02:00 -07:00
David Garske
90fe2ab894
Merge pull request #4999 from embhorn/zd13969
...
Add wolfSSL_CTX_SetCertCbCtx to set user context for CB
2022-03-31 07:43:47 -07:00
Juliusz Sosinowicz
4b5649edc9
Allow encrypt then mac with apache
2022-03-31 15:55:57 +02:00
Hayden Roche
3f03f4e40a
Handle case where bits is 0 properly.
2022-03-30 16:56:53 -07:00
David Garske
1de5165dcc
KCAPI ECC optimization to further reduce page memory use.
2022-03-30 15:01:01 -07:00
JacobBarthelmeh
8136c55a39
sanity check before copy with new memory bio
2022-03-30 14:02:03 -07:00
Hayden Roche
a914d782c0
Merge pull request #4810 from anhu/engine_fla
2022-03-30 13:43:09 -07:00
David Garske
c905c613e9
Support for Intel QuickAssist ECC KeyGen acceleration.
2022-03-30 13:07:47 -07:00
Eric Blankenhorn
ea38e1aab5
Add wolfSSL_CTX_SetCertCbCtx to set user context for CB
2022-03-30 12:27:11 -05:00
David Garske
366f159fbb
Merge pull request #4991 from gojimmypi/patch-2
...
Overhaul Espressif ESP-IDF wolfSSL setup_win.bat
2022-03-30 06:56:49 -07:00
David Garske
2029bf0a0b
Merge pull request #4992 from JacobBarthelmeh/Compatibility-Layer
...
support creating new mem bio of length 0
2022-03-30 06:55:53 -07:00
Sean Parkinson
d9df00cdfb
Merge pull request #4994 from dgarske/kcapi
...
KCAPI ECC memory optimizations and KCAPI AES build fix
2022-03-30 11:50:39 +10:00
Hayden Roche
2077690bf0
Improve wolfSSL_BN_rand.
...
- Previously, this function would round up the requested bits to the next
multiple of 8. With this commit, the function returns a number of exactly the
number of bits requested, which is the same behavior as OpenSSL. This problem
was discovered by a user using the compatibility layer with OpenSSH's ssh-keygen
utility.
- This function now respects the top and bottom parameters.
- Improved unit testing.
2022-03-29 18:08:21 -07:00
gojimmypi
409a0acb88
fine tuning on wolfcrypt\test\test_paths.h
2022-03-29 16:07:10 -07:00
gojimmypi
d72d28ac60
copy errors are now only warnings
2022-03-29 15:39:09 -07:00
Kaleb Himes
1dc3808aae
Merge pull request #4986 from cconlon/sslFipsReady
...
Fix FIPS defines in wolfSSL_RSA_sign_generic_padding() / RSA_verify_ex()
2022-03-29 16:02:17 -05:00
gojimmypi
d287863a35
Update setup_win.bat
...
more copy error checking. remove trailing whitespace.
2022-03-29 12:52:50 -07:00
David Garske
d10e72bc98
Fix for KCAPI AES with WOLFSSL_NO_KCAPI_AES_CBC.
2022-03-29 12:50:28 -07:00
Chris Conlon
4ad2f68071
fix defines for FIPS around RSA-PSS in wolfSSL_RSA_sign_generic_padding() and wolfSSL_RSA_verify_ex()
2022-03-29 10:03:16 -06:00
David Garske
0989a14395
Merge pull request #4995 from douzzer/20220328-multi-test-fixes
...
fix reproducible-build for libtool 2.4.7
2022-03-29 08:00:45 -07:00
Daniel Pouzzner
e9b941e16e
configure.ac: fix --enable-reproducible-build to cope with update from libtool-2.4.6 to -2.4.7.
2022-03-29 07:53:43 -05:00
Daniel Pouzzner
8edf237f75
Merge pull request #4993 from SparkiDev/sakke_gen_table_tmp_size_fix
...
SP: fix number of temps alloced in sp_ecc_gen_table
2022-03-28 21:32:35 -05:00
Sean Parkinson
194138f0b8
Merge pull request #4990 from dgarske/async_fix
...
Fixes for async ECC
2022-03-29 10:30:38 +10:00
David Garske
9a8be82653
Merge pull request #4987 from julek-wolfssl/ffmpeg
...
Add support for `--enable-ffmpeg`
2022-03-28 16:33:20 -07:00
Sean Parkinson
f50514b228
SP: fix number of temps alloced in sp_ecc_gen_table
...
Ony affects SAKKE and as a result of point add changes.
2022-03-29 09:11:45 +10:00
David Garske
1abcd4b035
Reduce KCAPI ECC page memory allocation sizes.
2022-03-28 15:40:07 -07:00
David Garske
05f377011b
Fix for building with KCAPI AES enabled.
2022-03-28 15:05:58 -07:00
Jacob Barthelmeh
f7f94cede0
support creating new mem bio of length 0
2022-03-28 15:52:42 -06:00
Anthony Hu
0627437048
Suggestions from haydenroche5
2022-03-28 17:44:00 -04:00
David Garske
12349f39e6
Merge pull request #4974 from kareem-wolfssl/iotsafe
...
IOTSafe workarounds
2022-03-28 13:49:44 -07:00
gojimmypi
b203726623
Overhaul Espressif ESP-IDF wolfSSL setup_win.bat
...
# Description
This is a replacement to https://github.com/wolfSSL/wolfssl/pull/4989 , per the [comment](https://github.com/wolfSSL/wolfssl/pull/4989#issuecomment-1080998040 )
Overhauled `win_setup.bat` for more robust and flexible install of wolfSSL to ESP-IDF `component` directory.
Functionally, there are no significant changes. However this version:
- more verbose output
- show directories used
- more error checking
- check for existing wolfSSL component; prompt to purge or update
- save and optionally re-use `config.h` and `user_settings.h`
- optionally target an alternate ESP-IDF path (useful for VisualGDB)
- offer tips and reminders upon completion
# Testing
Tested on Windows 10 with both ESP-IDF command prompt and stand-alone DOS prompt (e.g. for VisualGDB)
# Checklist
- [ ] added tests
- [ ] updated/added doxygen
- [ ] updated appropriate READMEs
- [ ] Updated manual and documentation
cc: @dgarske
2022-03-28 11:54:50 -07:00
David Garske
5b0735cdb4
Fixes for async ECC broke in PR #4982 .
2022-03-28 11:29:33 -07:00
Kareem
52902f1d37
IoTSafe: Add SP_RSA to user_settings.h template.
2022-03-28 10:25:05 -07:00
Juliusz Sosinowicz
6dc86e7df1
Add support for --enable-ffmpeg
2022-03-28 12:47:19 +02:00
Kareem
be938ed197
IoTSafe Workarounds: Address code review feedback.
2022-03-25 16:17:53 -07:00
JacobBarthelmeh
25d5a624d2
Merge pull request #4975 from cconlon/smallStack
...
smallstack cleanup for OpenSSL Compatibility Functions
2022-03-25 17:06:59 -06:00
John Safranek
0ee01f08bc
Merge pull request #4984 from douzzer/20220325-multi-test-cleanup
...
20220325 multi-test fixes
2022-03-25 15:06:34 -07:00
David Garske
3af3274dcd
Merge pull request #4982 from SparkiDev/sp_x64_improvements
...
SP ASM improvements
2022-03-25 13:04:01 -07:00
David Garske
07f9ca60ac
Fix for async without threading. ./configure --enable-asynccrypt --enable-all CFLAGS="-DWC_NO_ASYNC_THREADING".
2022-03-25 12:43:04 -07:00
David Garske
0930086fa1
Fix for increased mcapi (used by Microchip) ctx sizes if PK callbacks is enabled due to key id/label.
2022-03-25 12:36:07 -07:00
Daniel Pouzzner
008c8509c6
multi-test fixes: whitespace in wolfcrypt/src/random.c and wolfcrypt/test/test.c, bugprone-macro-parentheses and -Wenum-compare in WS_RETURN_CODE() (wolfssl/ssl.h), and clang-analyzer-deadcode.DeadStores in api.c.
2022-03-25 13:26:41 -05:00
David Garske
04e2b6c62a
Merge pull request #4983 from douzzer/20220324-gcc-12-fixes
...
fixups for warnings from gcc-12
2022-03-24 19:16:27 -07:00
Sean Parkinson
7eb95674ee
Merge pull request #4966 from dgarske/kcapi
...
Fixes for KCAPI AES GCM and ECC
2022-03-25 10:18:16 +10:00
Sean Parkinson
fd66f6bcec
SP ASM improvements
...
Change Karatsuba implementations for x86_64.
Fix ECC code to better handle corner cases.
Add 'lower' versions of functions wehn an input is known to be less than m.
Add mont_add/dbl/tpl/sub for P384.
Change ECC point add to be cache-attack resistant.
Change mod_exp to be cache-attack resistant.
2022-03-25 10:04:25 +10:00
John Safranek
14522f25ff
Merge pull request #4904 from kaleb-himes/OE22_NS9210_FIX
...
Fix up random.h conflicts with cert 3389 releases and some NETOS issues
2022-03-24 16:07:23 -07:00
Sean Parkinson
feb58a8455
Merge pull request #4956 from julek-wolfssl/bind-9.18.0
...
bind 9.18.0 fixes
2022-03-25 08:27:34 +10:00
Daniel Pouzzner
12776b3772
fixups for warnings from gcc-12:
...
src/internal.c: use XMEMCMP(), not ==, to compare array elements (fixes conflict of 74408e3ee3 vs 617eda9d44 );
fix spelling of NAMEDGROUP_LEN (was NAMEDGREOUP_LEN);
src/ssl.c: in CheckcipherList() and wolfSSL_parse_cipher_list(), use XMEMCPY(), not XSTRNCPY(), to avoid (benign) -Wstringop-truncation;
scripts/sniffer-tls13-gen.sh: fix for shellcheck SC2242 (exit 1, not -1).
2022-03-24 16:33:36 -05:00
David Garske
b509e174bb
Whitespace fix.
2022-03-24 10:19:28 -07:00
Anthony Hu
ceae169a34
Merge pull request #4969 from dgarske/pk_pubkey
2022-03-24 12:40:03 -04:00
David Garske
624f1499f0
Merge pull request #4978 from julek-wolfssl/issue/4970
...
Prefer status_request_v2 over status_request when both are present
2022-03-24 08:30:12 -07:00
David Garske
5a0d794e88
Merge pull request #4980 from anhu/iv_docs
...
Correction about AES using IV in docs
2022-03-24 08:29:55 -07:00
Juliusz Sosinowicz
29c0c9bf48
Rebase fixes
2022-03-24 13:41:50 +01:00
Juliusz Sosinowicz
850b8c5c3b
OpenSSL compatible API
...
`WOLFSSL_ERROR_CODE_OPENSSL` breaks ABI compatiblity due to changing the expected return code. Let's only do this when building with the full compatibility layer.
2022-03-24 12:16:59 +01:00
Juliusz Sosinowicz
88d5059c36
Jenkins fixes
...
`WS_RETURN_CODE` was not functioning properly in master
2022-03-24 12:16:59 +01:00
Juliusz Sosinowicz
98bc8402db
Refactor memory BIO
...
- use the `WOLFSSL_BUF_MEM` struct to resize the internal memory buffer
- add a `WOLFSSL_BIO_RESIZE_THRESHOLD` define that will be used to determine how often to shrink the internal buffer. This should cut down on the number of free/malloc calls made significantly. This should help with our inefficient 1 byte reads in `loadX509orX509REQFromPemBio`.
- implement `wolfSSL_BUF_MEM_resize` which allows bi-directional buffer size manipulation
2022-03-24 12:16:59 +01:00
Juliusz Sosinowicz
ae9b01c5b8
bind 9.18.0 fixes
...
- return `1` from `wolfSSL_BIO_set_mem_eof_return` instead of `0` for success
- bind requires ALPN
- `OPENSSL_COMPATIBLE_DEFAULT` defined for bind
- `WOLFSSL_ERROR_CODE_OPENSSL` defined when using compatibility layer
- return `bio->eof` on no pending data to read in memory BIO (defaults to `WOLFSSL_BIO_ERROR`)
- `flags` is no longer an input parameter in `wolfSSL_ERR_get_error_line_data`
- allow lazy parameter loading in `wolfSSL_DH_set0_key`
- implement reference counter in `WOLFSSL_EC_KEY`
- load serial number from `x509->serialNumber` if `x509->serial` is empty
2022-03-24 12:16:59 +01:00
Anthony Hu
f71a85d5f9
Merge pull request #4979 from dgarske/sniffer_tidy
2022-03-23 15:13:20 -04:00
Anthony Hu
1bc71da1df
Correction about AES using IV in docs
2022-03-23 13:35:13 -04:00
David Garske
6e550c8d75
Fix for KCAPI ECC KeyGen. Disable ECC consistency checks with KCAPI. Allow public AddSignature (used to be public). Fix KCAPI ECC SharedSecret output size.
2022-03-23 09:37:50 -07:00
David Garske
8bafa7f601
Fix for KCAPI ECC sign (was not returning the signature, since ret always 0).
2022-03-23 09:37:50 -07:00
David Garske
c9e3094cb0
Fixes for KCAPI ECC verify. Cleanup of the pubkey_raw. Fix KCAPI AES possible used uninitialized.
2022-03-23 09:37:50 -07:00
David Garske
8d695f97c9
Fix for KCAPI KcapiEcc_LoadKey parameter to kcapi_kpp_keygen. Added option to release handle on load. Fixes for KCAPI sign output length. Added additional argument checking.
2022-03-23 09:37:50 -07:00
David Garske
318350f63b
Fix for ecc_check_privkey_gen with KCAPI. Fix KCAPI ECDSA to ensure we don't leak handle for multiple sign/verify calls.
2022-03-23 09:37:50 -07:00
David Garske
9f2dc408a0
Fixes for KCAPI AES GCM. Add guards for algorithm macros on KCAPI.
2022-03-23 09:37:50 -07:00
David Garske
1b0e5f4806
Allow disabling DRBG with KCAPI. Add KCAPI /dev/hwrng support.
2022-03-23 09:37:50 -07:00
David Garske
5fe6f1c875
For KCAPI do not force enable ECC curves, set K or seed callback, disable AES GCM tests with non standard IV.
2022-03-23 09:37:50 -07:00
David Garske
b04954dc98
Merge pull request #4977 from SparkiDev/ssl_move_x509_store
...
ssl.c: move out X509 store APIs to new file
2022-03-23 09:36:33 -07:00
David Garske
f129c32273
Fixes for whitespace, script bug and bit-field type.
2022-03-23 09:31:04 -07:00
Anthony Hu
b6e590836d
initialize ENABLE_FIPS
2022-03-23 10:29:59 -04:00
Juliusz Sosinowicz
4412496adb
Prefer status_request_v2 over status_request when both are present
...
Reported in https://github.com/wolfSSL/wolfssl/issues/4970
2022-03-23 11:20:22 +01:00
Sean Parkinson
90f53aed34
ssl.c: move out X509 store APIs to new file
2022-03-23 13:59:54 +10:00
Anthony Hu
3dd2219548
Don't over-write ENABLED_FIPS with no if user didn't specify anything.
2022-03-22 20:33:27 -04:00
Daniel Pouzzner
d864fc9a3f
Merge pull request #4972 from julek-wolfssl/asn-time-tz-diff
...
`mktime` may return a negative due to timezones around the unix epoch
2022-03-22 14:03:59 -05:00
David Garske
cf0e4a0e3d
Merge pull request #4976 from anhu/kill_tabs
...
Get rid of tabs I added previously.
2022-03-22 11:35:00 -07:00
Chris Conlon
906ea4ad03
smallstack reduction for wolfSSL_EC_POINT_invert
2022-03-22 10:00:17 -06:00
Chris Conlon
64a309e245
smallstack reduction for wolfSSL_ASN1_INTEGER_to_BN
2022-03-22 10:00:17 -06:00
Chris Conlon
ddc1899d48
smallstack reduction for wolfSSL_EC_POINT_get_affine_coordinates_GFp
2022-03-22 10:00:17 -06:00
Chris Conlon
94e1b87ae0
smallstack reduction for wolfSSL_X509_set_ext, wolfSSL_EC_POINT_mul, wolfSSL_ECDSA_do_sign, wolfSSL_i2d_X509_NAME, wolfSSL_X509_REQ_sign
2022-03-22 10:00:13 -06:00
Anthony Hu
c41bef6486
Get rid of tabs I added previously.
2022-03-22 11:56:15 -04:00
David Garske
aa38d99538
Fix for TLS PK callback issue with Ed25519/Ed448 and public key not being set.
2022-03-22 08:33:54 -07:00
JacobBarthelmeh
c377a709e1
Merge pull request #4953 from cconlon/apiVersionDiff
...
More checks on OPENSSL_VERSION_NUMBER for API prototype differences
2022-03-21 16:59:06 -06:00
Anthony Hu
2babac6cb5
Merge pull request #4875 from dgarske/sniffer_async
2022-03-21 16:47:23 -04:00
Chris Conlon
210eb6283c
smallstack reduction for wc_ecc_import_x963_ex, mp_jacobi
2022-03-21 14:43:43 -06:00
Chris Conlon
851ff9e661
smallstack reduction for PrintPubKeyRSA, PrintPubKeyDSA, PrintPubKeyDH
2022-03-21 14:43:43 -06:00
Chris Conlon
339e44bd87
smallstack reduction for wc_ecc_import_point_der_ex()
2022-03-21 14:43:43 -06:00
David Garske
59665a44b5
Fixes for allowing server to have a public key set when using external key with PK callbacks.
2022-03-21 13:14:24 -07:00
David Garske
29c120356e
Sniffer asynchronous support.
...
* Adds stateful handling of DH shared secret computation in `SetupKeys`.
* Improved the decrypt handling to use internal functions and avoid generating alerts on failures.
* Fix for sniffer resume due to missing `sessionIDSz` broken in #4807 .
* Fix sniffer test cases to split resume (session_ticket) tests.
* Add `snifftest` list of build features so test script can gate running resume test.
2022-03-21 12:05:08 -07:00
Kareem
af70edb99d
Strip trailing zeroes from cert buffer when using IOTSAFE_NO_GETDATA.
2022-03-21 10:53:36 -07:00
Jacob Barthelmeh
4951646c91
touch up class name and function comments
2022-03-21 10:56:09 -06:00
Jacob Barthelmeh
fb3d38c3e8
add example C# PSK client
2022-03-21 10:19:45 -06:00
David Garske
c213c725d7
Merge pull request #4971 from SparkiDev/fp_div2_mod_ct_oob
...
TFM fp_div_2_ct: rework to avoid overflow
2022-03-21 09:11:41 -07:00
David Garske
8bf14ba1d3
Merge pull request #4957 from JacobBarthelmeh/Compatibility-Layer
...
alter return value and add error string
2022-03-21 09:10:04 -07:00
David Garske
08d6474878
Merge pull request #4954 from SparkiDev/rsa_fermat
...
RSA: check for small difference between p and q
2022-03-21 09:09:38 -07:00
David Garske
b90df0a6aa
Merge pull request #4951 from ejohnstown/wolfrand
...
wolfRand for AMD
2022-03-21 09:09:19 -07:00
Juliusz Sosinowicz
d7037da0b5
mktime may return a negative due to timezones around the unix epoch
2022-03-21 17:07:13 +01:00
Juliusz Sosinowicz
9763030675
Merge pull request #4845 from cconlon/pkcs7compat
2022-03-21 15:26:37 +01:00
Sean Parkinson
8dbd8b0ad6
RSA: check for small difference between p and q
2022-03-21 10:58:14 +10:00
Sean Parkinson
aa14607a6f
TFM fp_div_2_ct: rework to avoid overflow
...
Don't set the overflow word. Instead integrate the div by 2 into the
function so that the overflow word doesn't need to be stored.
2022-03-21 10:43:06 +10:00
Sean Parkinson
2f52d3cd20
Merge pull request #4965 from dgarske/aes_win_clang
...
Fixes for Windows AESNI with clang
2022-03-21 08:24:21 +10:00
Hayden Roche
dcaa218ed8
Merge pull request #4927 from cconlon/upRef
2022-03-18 18:10:36 -07:00
Hayden Roche
7ea6b73c7b
Merge pull request #4928 from cconlon/compatCleanups
2022-03-18 16:23:56 -07:00
Hayden Roche
2637e5e361
Merge pull request #4926 from cconlon/namePrintRFC5523
2022-03-18 15:53:07 -07:00
Chris Conlon
c491a6c829
EVP_PKEY_copy_parameters: correctly mark inner struct owned
2022-03-18 16:37:45 -06:00
David Garske
a79daa5ea8
Merge pull request #4959 from haydenroche5/asn1_time_diff_bug
...
Fix bug in wolfSSL_ASN1_TIME_diff.
2022-03-18 14:28:23 -07:00
Chris Conlon
582f0d82e4
address review feedback for PKCS7 compat additions
2022-03-18 12:07:44 -06:00
JacobBarthelmeh
bfee3dffc6
Merge pull request #4967 from dgarske/pubkey_size
...
Fix for `wc_EccPublicKeyToDer` incorrectly requiring too much buffer
2022-03-18 09:22:52 -06:00
David Garske
bcce015496
Merge pull request #4964 from julek-wolfssl/wolfSSL_get_session-docs
...
Update `wolfSSL_get_session` docs
2022-03-18 06:51:27 -07:00
David Garske
bb27fa4555
Fix for wc_EccPublicKeyToDer incorrectly requiring too much buffer. Merge error included old ASN code and incorrectly excluded ASN template. ZD13904.
2022-03-17 18:51:37 -07:00
Sean Parkinson
ef66a12a24
Merge pull request #4961 from dgarske/cust_fixups
...
Various portability improvements (Time, DTLS epoch size, IV alloc)
2022-03-18 11:38:57 +10:00
Sean Parkinson
f117308135
Merge pull request #4921 from dgarske/private_keyid
...
Added private key id/label support - improve PK callback public key use
2022-03-18 11:36:28 +10:00
David Garske
b546b2a5ec
Improve logic around private key id/label. Adds WOLF_PRIVATE_KEY_ID.
2022-03-17 14:48:30 -07:00
David Garske
f954aef973
Fixes for Windows AESNI with clang. Improve 32-bit support.
2022-03-17 14:05:24 -07:00
David Garske
ae25a48509
Improve the build message to not always allocate the IV (16 byte) (use fixed buffer if <= 16 bytes).
2022-03-17 14:01:57 -07:00
David Garske
3fba5d17c3
Various portability improvements:
...
* Change DTLS epoch size word16.
* Allow override of the `RECORD_SIZE` and `STATIC_BUFFER_LEN`.
* Remove endianness force from game build.
* Add `gmtime_s` option.
* Fix for macro conflict with `MAX_KEY_SIZE`.
* Expose functions `wolfSSL_X509_notBefore`, `wolfSSL_X509_notAfter`, `wolfSSL_X509_version` without `OPENSSL_EXTRA`.
2022-03-17 14:00:55 -07:00
JacobBarthelmeh
54477d1bea
improvements around keystore key update
2022-03-17 12:04:52 -06:00
Jacob Barthelmeh
40c79b1134
add macro guards to handle build with QNX CAAM
2022-03-17 12:04:52 -06:00
Jacob Barthelmeh
9bf2962852
default to strict NVM operations with key generation
2022-03-17 12:04:52 -06:00
Jacob Barthelmeh
090932b65c
FIPS benchmark of cmac and ecb
2022-03-17 12:04:52 -06:00
JacobBarthelmeh
55b42dd85a
Add SECO use and expand cryptodev
2022-03-17 12:04:52 -06:00
Juliusz Sosinowicz
1fd090d094
Update wolfSSL_get_session docs
...
Recommend using `wolfSSL_get1_session` and `NO_SESSION_CACHE_REF` for session resumption purposes. `wolfSSL_get_session` should not be used unless to inspect the current session object.
2022-03-17 12:56:28 +01:00
Sean Parkinson
f76105a93b
TLS 1.3 PSK: multiple ids for a cipher suite
...
When WOLFSSL_PSK_MULTI_ID_PER_CS is defined, multiple identities can be
returned for a cipher suite.
The first byte of the identity is the count of identites that have been
seen so far for the cipher suite.
2022-03-17 09:31:25 +10:00
David Garske
aa8e5a29d4
Merge pull request #4947 from cconlon/compatSmallStack
...
Stack/smallstack cleanup for OpenSSL compatibility functions
2022-03-15 16:47:23 -07:00
Chris Conlon
a52539c489
Merge pull request #4958 from TakayukiMatsuo/example
2022-03-15 17:39:07 -06:00
David Garske
5b268c0852
Merge pull request #4960 from anhu/stm32_pq_bench
...
Add Post-quantum KEM benchmark for STM32
2022-03-15 16:36:08 -07:00
John Safranek
f80faebfe5
wolfRand for AMD
...
1. Add configure option to enable AMD's RDSEED.
2. Add seed parameters when building specifically for AMD using RDSEED.
3. Update the wolfCrypt test to play nice with the larger seed size.
2022-03-15 15:20:08 -07:00
Anthony Hu
fbfb1fee91
Add Post-quantum KEM benchmark for STM32
2022-03-15 14:49:40 -04:00
Hayden Roche
6e6aa5b0c1
Fix bug in wolfSSL_ASN1_TIME_diff.
...
This function should not error out if one of the passed in times is the Unix
epoch. This amounts to erroring out when the XMKTIME returns < 0, rather than
<= 0.
2022-03-15 10:52:05 -07:00
JacobBarthelmeh
d0e83be596
alter return value and add error string
2022-03-15 10:26:59 -07:00
TakayukiMatsuo
365a4de154
Fix settings and removed warnings
2022-03-16 02:12:45 +09:00
Daniel Pouzzner
d531e21f34
Merge pull request #4946 from dgarske/async_earlydata
...
Fixes for TLS v1.3 early data with async
2022-03-15 12:12:09 -05:00
David Garske
9c29102c43
Merge pull request #4948 from SparkiDev/tls12_pa_failsafe
...
TLS: add peer authentication failsafe for TLS 1.2 and below
2022-03-15 09:42:56 -07:00
Chris Conlon
6762cd90da
add tests for PKCS7_sign(), PKCS7_final(), SMIME_write_PKCS7()
2022-03-15 10:21:22 -06:00
Chris Conlon
ce514e6fc5
add PKCS7_sign, PKCS7_final, SMIME_write_PKCS7. add signer cert verify support to PKCS7_verify, support for PKCS7_TEXT, PKCS7_DETACHED, PKCS7_STREAM
2022-03-15 10:21:22 -06:00
Chris Conlon
ba4f3379ba
remove unimplemented wc_MIME_* prototypes in asn.h
2022-03-15 10:21:22 -06:00
Chris Conlon
a7d5e6400d
add support for PKCS7_TEXT flag to PKCS7_verify()
2022-03-15 10:21:22 -06:00
David Garske
2febed01a5
Merge pull request #4949 from SparkiDev/ssl_move_conf
...
ssl.c: move TXT and CONF APIs out into conf.c
2022-03-15 09:02:42 -07:00
Chris Conlon
f7c5c9f713
extra checks for OPENSSL_VERSION_NUMBER for API prototype differences
2022-03-15 09:41:51 -06:00
Chris Conlon
7c63dd6245
smallstack reduction for wolfSSL_set_accept_state()
2022-03-15 09:40:51 -06:00
Chris Conlon
062003916c
stack/smallstack reduction for wolfssl_x509_make_der(), d2iGenericKey(), PrintPubKeyEC(), wolfSSL_EC_POINT_add()
2022-03-15 09:40:48 -06:00
Sean Parkinson
343e8bccdd
ssl.c: move TXT and CONF APIs out into conf.c
2022-03-15 12:09:24 +10:00
David Garske
4ec49d2189
Merge pull request #4943 from SparkiDev/sp_arm64_perf_1
...
SP ASM performance improvements
2022-03-14 18:40:51 -07:00
David Garske
e3276ca683
Merge pull request #4939 from SparkiDev/aes_gcm_align
...
AES-GCM: stack alignment issues
2022-03-14 18:37:11 -07:00
Sean Parkinson
9ed061cc96
TLS: add peer authentication failsafe for TLS 1.2 and below
...
Tightened the TLS 1.3 failsafe checks too.
2022-03-15 08:51:44 +10:00
Sean Parkinson
eeb7f72a07
AES-GCM: stack alignment issues
...
Don't expect stack to be aligned.
vmovdqu is no longer slower than vmovdqa.
2022-03-15 08:49:43 +10:00
Anthony Hu
b3319bd952
Undo the logic around enable sha as its enabled by default already.
2022-03-14 16:29:13 -04:00
David Garske
34e491f39f
Merge pull request #4950 from SparkiDev/regression_fixes_3
...
TLS 1.3 script test: wait for server to write file
2022-03-14 13:24:06 -07:00
Anthony Hu
821e293ed4
Fix to add test where needed.
2022-03-14 15:54:39 -04:00
Anthony Hu
b3e28fab67
Make the code simpler.
2022-03-14 13:51:05 -04:00
Anthony Hu
ea500bd1c8
--enable-engine=fips-v2,fips-readyetc., etc.
2022-03-14 13:51:05 -04:00
Anthony Hu
07ee2bcecf
Created new --enable-engine and --enable-engine-witout-fips flags
2022-03-14 13:51:05 -04:00
Sean Parkinson
2c1ecacbfc
TLS 1.3 script test: wait for server to write file
...
Also fixes for:
./configure --enable-psk --disable-rsa --disable-ecc --disable-dh
C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK
./configure --disable-shared --enable-curve448 --enable-ed448
--disable-rsa --disable-dh --enable-tls13 --disable-ecc --enable-certgen
--enable-keygen
2022-03-14 14:42:47 +10:00
Daniel Pouzzner
4966eb7897
Merge pull request #4944 from douzzer/20220310-asn-template-EncodeExtensions-overrun
...
wolfcrypt/src/asn.c: fix buffer underrun in EncodeExtensions() and leak in ParseCRL_Extensions()
2022-03-13 21:21:07 -05:00
Sean Parkinson
cdb45b12c5
Merge pull request #4884 from haydenroche5/i2d_x509_name_fix
...
Improve wolfSSL_i2d_X509_name.
2022-03-14 11:57:07 +10:00
Sean Parkinson
20562b3f78
DecodeNameConstraints (ASN Template): free ASNGetData
2022-03-14 09:14:19 +10:00
David Garske
a816f329cc
Merge pull request #4856 from anhu/stm32u5
...
Enable support for STM32U585 and PQC for STM32
2022-03-11 14:49:46 -08:00
Daniel Pouzzner
fb0c9b2a66
ssl.c: use InitHandshakeHashes(), not FreeHandshakeHashes(), to reset ssl->hsHashes.
2022-03-11 16:26:24 -06:00
David Garske
dd8fb41f66
Fixes for TLS v1.3 early data with async.
2022-03-11 14:03:46 -08:00
Daniel Pouzzner
830431ccdf
scripts/tls13.test: fix whitespace.
2022-03-11 13:54:50 -06:00
Daniel Pouzzner
82ab7bf32c
ssl.c: fix hash state memory leaks in wolfSSL_clear() and wolfSSL_TicketKeyCb().
2022-03-11 13:40:01 -06:00
Anthony Hu
8cba961bac
Comment fixups, bad braces, and stray &.
2022-03-11 12:14:02 -05:00
Chris Conlon
9fff321e3e
address PR review feedback on EVP_PKEY changes
2022-03-11 10:11:02 -07:00
Chris Conlon
82c6f58eb0
define BIO_CTRL_SET, BIO_CTRL_GET
2022-03-11 09:53:56 -07:00
Chris Conlon
6e6108bb98
remove duplicate BIO_CLOSE/BIO_NOCLOSE definition, already in openssl/bio.h
2022-03-11 09:53:56 -07:00
Chris Conlon
238072c84d
map BIO_s_accept to BIO_s_socket for basic use
2022-03-11 09:53:56 -07:00
Chris Conlon
2639c5e268
X509V3_set_ctx arg check fix, debug log cleanup
2022-03-11 09:53:51 -07:00
Daniel Pouzzner
385ece92d8
ECCSI and SAKKE: fix smallstackcache memory leaks in library, and blue-moon undefined behavior bugs in test.c eccsi_test(() and sakke_test().
2022-03-11 10:06:18 -06:00
kaleb-himes
fc92584bd2
Address the one that was missed
2022-03-11 08:36:36 -07:00
Daniel Pouzzner
64953299cf
scripts/tls13.test: retries (up to 10) for early data scenarios, to mitigate race noted in #4918 .
2022-03-11 08:18:14 -06:00
Daniel Pouzzner
7602eef98f
src/ssl.c: use strlcpy(), not strncpy(), to make string_fortified happy (else "error: ‘__builtin_strncpy’ specified bound 46 equals destination size").
2022-03-11 08:15:44 -06:00
Daniel Pouzzner
b2ae7f4230
wolfssl/openssl/asn1.h: in ASN1_SIMPLE(), use OFFSETOF() macro.
2022-03-11 07:59:08 -06:00
Sean Parkinson
c3eab0dcdd
Fixes from sanitizer build
...
Fix OID index in SetNameRdnItems for multi attributes.
Stop warning about strncpy to small.
Fix casting in ASN1_SIMPLE to use consistent type.
2022-03-11 14:27:50 +10:00
David Garske
cf030de48a
Merge pull request #4930 from SparkiDev/tfm_alloc_fails
...
TFM: handle more alloc failure cases gracefully
2022-03-10 15:42:21 -08:00
Sean Parkinson
3ea5e56c26
SP ASM performance improvements
...
Mostly improving Aarch64 assembly.
Change Karatsuba implementations.
Specialised code for exponentiating to 0x10001 for RSA.
2022-03-11 08:42:46 +10:00
David Garske
570daa6a7f
Enable support for STM32U585 and PQ on M4
2022-03-10 14:19:01 -05:00
kaleb-himes
0eef90f951
Fix for ZD13795 and also remove all-caps parameter
2022-03-10 11:40:32 -07:00
Daniel Pouzzner
c78bfa4db8
scripts/tls13.test: when $early_data = yes, print the matching line counts.
2022-03-10 11:56:20 -06:00
Daniel Pouzzner
227804f034
wolfcrypt/src/asn.c: in ParseCRL_Extensions(), add missing FREE_ASNGETDATA().
2022-03-10 11:45:37 -06:00
Daniel Pouzzner
170b125b39
wolfcrypt/src/asn.c: fix buffer underrun in EncodeExtensions(), due to faulty iteration limit calculation, when smallstack build.
2022-03-10 09:38:19 -06:00
Sean Parkinson
6b7f0d4ee7
Merge pull request #4905 from anhu/custom_ext_parse
...
Injection and parsing of custom extensions in X.509 certificates.
2022-03-10 10:39:05 +10:00
David Garske
b30ada1608
Merge pull request #4940 from ejohnstown/wolfrand
...
Fix wolfRand Build
2022-03-09 15:42:19 -08:00
Sean Parkinson
47895fe78d
Merge pull request #4942 from dgarske/sp_math_opensslextra
...
Fixes to support building opensslextra with SP math
2022-03-10 08:53:21 +10:00
Sean Parkinson
b4df909df0
Merge pull request #4934 from haydenroche5/x509_v_err_sync
...
Sync up X509_V_ERR codes with OpenSSL.
2022-03-10 08:37:10 +10:00
Anthony Hu
98f733767b
Use MAX_OID_SZ
2022-03-09 17:20:50 -05:00
Chris Conlon
e1da313b91
EVP_PKEY_copy_parameters: add support for EVP_PKEY_DH
2022-03-09 14:34:09 -07:00
David Garske
141cf822f2
Merge pull request #4941 from douzzer/20220309-script-cleanup
...
20220309 script cleanup
2022-03-09 13:30:50 -08:00
Chris Conlon
bcfe8bf2e2
Merge pull request #4933 from haydenroche5/x509_set_ext_ext_key_usage
2022-03-09 13:22:49 -07:00
David Garske
3a62857dbd
Fixes to support building opensslextra with SP math. Disables some of the compatibility layer BN and ECC point handling.
2022-03-09 11:53:56 -08:00
Anthony Hu
b043225dbd
Fixes inspired by review by SparkiDev.
2022-03-09 13:39:53 -05:00
John Safranek
d6fb454063
Fix wolfRand Build
...
1. Remove the v3 FIPS build from configure and automake. This was for
the old FIPS Ready build, which is now fixed to the certificate 3389
configuration.
2. Remove AES-GCM, PKCS12, and SHA-3 from wolfRand build. They were
getting reenabled later in the configure.
2022-03-09 10:35:39 -08:00
Daniel Pouzzner
abfc788389
script cleanup: use #!/bin/bash on all scripts that use "echo -e" (/bin/sh is sometimes a non-Bourne/non-POSIX shell, e.g. dash/ash, with no support for "echo -e"); fix whitespace.
2022-03-09 12:28:22 -06:00
Daniel Pouzzner
67cc8ed482
tests/api.c: fix test_wolfSSL_BIO_Qt_usecase() "function declaration isn’t a prototype".
2022-03-09 12:27:19 -06:00
David Garske
4ff82e22e6
Merge pull request #4938 from douzzer/20220308-shellcheck-errors
...
fixes for shell script errors detected by shellcheck --severity=error.
2022-03-08 12:51:11 -08:00
Chris Conlon
70857f7b3c
Merge pull request #4923 from miyazakh/set_bio
...
Set bio read/write flag obviously
2022-03-08 13:08:33 -07:00
David Garske
c256d8ca92
Merge pull request #4936 from julek-wolfssl/no-force-ecc-ca
...
Don't force a ECC CA when a custom CA is passed with `-A`
2022-03-08 10:58:35 -08:00
Daniel Pouzzner
c9a7393923
fixes for shell script errors detected by shellcheck --severity=error.
2022-03-08 12:51:48 -06:00
David Garske
a4229c6cf8
Merge pull request #4932 from SparkiDev/tls_hmac_fix
...
TLS HMAC: fix number of blocks to not process
2022-03-08 10:06:11 -08:00
David Garske
4a912f29d1
Merge pull request #4843 from tmael/sp_diab
...
Support (no)inline with Wind River Diab compiler
2022-03-08 10:00:16 -08:00
Juliusz Sosinowicz
3c64731c4f
Don't force a ECC CA when a custom CA is passed with -A
...
The following config would fail `../configure --enable-opensslall CFLAGS="-DOPENSSL_COMPATIBLE_DEFAULTS" && make -j check`. This is because `test-fails.conf` `ECC no signer error` test expects a failure while the ECC CA was being added as a trusted cert due to `OPENSSL_COMPATIBLE_DEFAULTS`.
2022-03-08 15:02:43 +01:00
Daniel Pouzzner
031c97f835
Merge pull request #4931 from douzzer/20220307-early-data-and-c99-fixes
...
enable-earlydata vs enable-fips/enable-asynccrypt
2022-03-08 07:34:58 -06:00
Hideki Miyazaki
f71be0546c
addressed review comments
2022-03-08 18:20:30 +09:00
Hayden Roche
31736307fd
Sync up X509_V_ERR codes with OpenSSL.
...
We defined these codes to values that didn't match those in OpenSSL. This is a
problem if a user is porting code from OpenSSL to wolfSSL that uses hardcoded
versions of these values. While the user's code should be fixed to not use
hardcoded values, we can make the port smoother by syncing the values up.
2022-03-07 15:58:46 -08:00
Anthony Hu
2cbe28fcf9
Sequences are constructed
2022-03-07 18:50:38 -05:00
David Garske
872ed28882
Merge pull request #4925 from kareem-wolfssl/nullSslMethod
...
Add SSL_R_NULL_SSL_METHOD_PASSED.
2022-03-07 15:36:56 -08:00
Chris Conlon
f49983b3b3
EVP_PKEY_keygen: add DH keygen support, fixes to EVP_PKEY_set1/get1_DH
2022-03-07 16:32:23 -07:00
Chris Conlon
939ce713df
EVP_PKEY_derive: set internal DH key if needed
2022-03-07 16:32:22 -07:00
Chris Conlon
f3f0d49fce
EVP_PKEY_CTX_new: set curve NID from pkey if available
2022-03-07 16:32:22 -07:00
Chris Conlon
85f85cc76a
add DH_up_ref() and unit test
2022-03-07 16:32:22 -07:00
Chris Conlon
8e0f5f9289
EVP_PKEY_get1/set1_EC_KEY: modify for EC_KEY_up_ref support
2022-03-07 16:31:09 -07:00
Chris Conlon
76014260f6
add EC_KEY_up_ref() and unit test
2022-03-07 16:31:09 -07:00
David Garske
9b808bde20
Fixes for building with HAVE_EX_DATA no compat layer.
2022-03-07 17:20:58 -06:00
Hayden Roche
39d975a3c3
Add extended key usage support to wolfSSL_X509_set_ext.
2022-03-07 15:20:01 -08:00
Daniel Pouzzner
0231304607
fixes for make check with --enable-all (now including --enable-earlydata) with fips or asynccrypt:
...
in scripts/tls13.test, use fips-compatible server-side cipher suite for "TLS v1.3 cipher suite mismatch" test, and modernize some syntax;
in configure.ac, omit earlydata from enable-all when asynccrypt, pending fix;
also in configure.ac, fix AC_CHECK_DECLS()-overriding-AC_CHECK_FUNCS() kludge, to fix CPPFLAGS=-std=c99 builds.
2022-03-07 17:19:31 -06:00
Sean Parkinson
0a91d42f2c
TLS HMAC: fix number of blocks to not process
...
Change made to line for static analysis.
Change was made incorrectly due to bracketting.
This fixes it.
2022-03-08 08:10:52 +10:00
Hayden Roche
a9cc1ca877
Merge pull request #4924 from dgarske/coexist_fixes
2022-03-07 13:00:22 -08:00
Anthony Hu
d77d9b93dc
This fixes a make check error.
...
The flags activated code that didn't account for the new oid encoding. This
code fixes that.
2022-03-07 15:47:47 -05:00
John Safranek
0e0ac14bbf
Merge pull request #4901 from SparkiDev/kcapi_ecdh_fixes
...
Fixes for KCAPI ECDH/DH and page alignment
2022-03-07 11:01:16 -08:00
David Garske
e7041d2315
Merge pull request #4929 from SparkiDev/siphash_clang
...
SipHash: Replace gcc specific ASM instruction with generic
2022-03-07 10:34:13 -08:00
Sean Parkinson
3b4ba669d4
Merge pull request #4922 from dgarske/async_disable_fixes
...
Fixes for async disables around the DevCopy calls
2022-03-07 13:51:09 +10:00
Sean Parkinson
1ca35f6cca
TFM: handle more alloc failure cases gracefully
2022-03-07 13:20:39 +10:00
Sean Parkinson
d5989dc15e
SipHash: Replace gcc specific ASM instruction with generic
...
clang would not compile movxzb.
Replaced with movzbq.
2022-03-07 08:49:28 +10:00
Sean Parkinson
a68261cd82
Merge pull request #4757 from kareem-wolfssl/xstatstruct
...
Add separate "struct stat" definition XSTAT_TYPE to make overriding XSTAT easier.
2022-03-07 08:32:05 +10:00
Sean Parkinson
7006efe97f
Merge pull request #4861 from JacobBarthelmeh/ECC
...
Deterministic ECDSA: fix for larger curve sizes
2022-03-07 08:26:35 +10:00
Sean Parkinson
84beb5ed7b
Merge pull request #4918 from miyazakh/enableall_earlydata
...
enable early data when specifying `--enable-all` option
2022-03-07 08:05:36 +10:00
Hideki Miyazaki
6bc3b7fc9d
addressed jenkins failure
2022-03-06 07:41:37 +09:00
Hideki Miyazaki
a572c19268
set bio flag obviously
...
fix nightly Qt test
2022-03-06 07:41:36 +09:00
Daniel Pouzzner
9be0633ce3
Merge pull request #4824 from dgarske/fips_ready_user
...
User settings template for FIPS v5 ready
2022-03-05 07:52:03 -06:00
Chris Conlon
2fc47fedee
Merge pull request #4900 from miyazakh/esp_waituntil
...
Fix wait-until-done in rsa hw primitive acceleration of ESP-IDF port
2022-03-04 17:32:06 -07:00
Chris Conlon
930a3d85e1
add support to X509_NAME_print_ex() for RFC5523 basic escape
2022-03-04 17:19:33 -07:00
David Garske
0c3b9c733f
Fixes for KCAPI ECDH/DH and page alignment. ZD 13763
2022-03-04 15:06:16 -08:00
Kareem
f162d7f530
Add SSL_R_NULL_SSL_METHOD_PASSED.
2022-03-04 15:11:09 -07:00
Kareem
719ed213d5
Add separate "struct stat" definition XSTAT_TYPE to make overriding XSTAT easier.
2022-03-04 14:54:56 -07:00
Anthony Hu
0a1c052c40
doxygen for wc_SetCustomExtension()
2022-03-04 16:24:27 -05:00
Kareem
e6189a638c
IOTSafe workarounds: Allow reading files with no GetSize command available, allow sign command response with no padding.
2022-03-04 14:03:47 -07:00
Anthony Hu
806cd4fbba
doxygen for myUnknownExtCallback()
2022-03-04 15:32:11 -05:00
David Garske
3839b0e675
Fixes for building wolfSSL along side openssl.
2022-03-04 12:06:24 -08:00
David Garske
ce8ef8f7c6
Merge pull request #4913 from kareem-wolfssl/makeClean
...
Allow disabling forced 'make clean' at the end of ./configure.
2022-03-04 12:02:08 -08:00
Chris Conlon
e1829e614d
Merge pull request #4820 from haydenroche5/evp_pkey_paramgen
...
Add wolfSSL_EVP_PKEY_paramgen to the compatibility layer.
2022-03-04 11:49:21 -07:00
Jacob Barthelmeh
a4a4bdc20f
fix typo, add macro guard, remove dead code path
2022-03-04 10:49:11 -07:00
Hideki Miyazaki
90355df4b0
disable early data for --enable-distro
...
addressed jenkins failure
2022-03-04 17:00:29 +09:00
David Garske
e91f0f173b
Fixes for async disables around the DevCopy calls. ZD13824
2022-03-03 16:33:18 -08:00
Kareem
09e7b7150f
Allow overriding make command used for make clean with make.
2022-03-03 15:51:26 -07:00
Hayden Roche
9ec30f02a6
Merge pull request #4898 from kaleb-himes/140-2-ready
2022-03-03 14:43:02 -08:00
Anthony Hu
3ad94c63f5
Pass the tests!
2022-03-03 17:02:26 -05:00
Anthony Hu
7ec61dfe05
Make jenkins happy
2022-03-03 15:44:00 -05:00
Kaleb Himes
0e8066dda0
Fix typo
2022-03-03 11:45:42 -07:00
Jacob Barthelmeh
d1212f9247
add P521 test case and fix for k generation
2022-03-03 10:44:24 -07:00
David Garske
2567cd5e5a
Merge pull request #4912 from julek-wolfssl/ZD13742
...
Check `input` size in `DecodeNsCertType`
2022-03-03 08:22:49 -08:00
David Garske
3a5f78b55a
Merge pull request #4919 from julek-wolfssl/ZD13737
...
Reported in ZD13737
2022-03-03 08:22:11 -08:00
Anthony Hu
949f8b5be1
Revert back to word16 API.
2022-03-03 10:41:05 -05:00
Sean Parkinson
63e4ba5854
Merge pull request #4906 from julek-wolfssl/ZD13606-master
...
Fix issues reported in ZD13606
2022-03-03 21:27:22 +10:00
Sean Parkinson
85fc2bb7fa
Make old less secure TimingPadVerify implementation available
...
For customers that don't need full side channel security.
2022-03-03 21:17:25 +10:00
Juliusz Sosinowicz
bdb7399398
Reported in ZD13737
...
Implement `wolfSSL_BIO_eof` support for most available BIO's
2022-03-03 10:25:09 +01:00
Juliusz Sosinowicz
c7c3ee00bb
Address code review
...
- Use functions instead of accessing `BIO` members
- Add `wolfSSL_BIO_method_type`
2022-03-03 10:09:41 +01:00
Hideki Miyazaki
b45bbdc078
enable early data when enabled all
2022-03-03 16:36:03 +09:00
David Garske
dad2332a95
Merge pull request #4917 from kaleb-himes/TIRTOS_KDF_ADD
...
Add the new kdf.c file to the TIRTOS build
2022-03-02 17:02:47 -08:00
Jacob Barthelmeh
56de8cd622
add check on hash size passed in
2022-03-02 16:52:04 -07:00
Anthony Hu
a54045113a
fixes from review by dgarske
2022-03-02 17:39:15 -05:00
David Garske
5d0614c630
Merge pull request #4911 from SparkiDev/enc_pem_cbc_padding
...
ASN PemToDer: remove padding when AES_CBC encrypted
2022-03-02 14:32:45 -08:00
Sean Parkinson
59970d94f5
Merge pull request #4908 from dgarske/tick_pad
...
Fix for padding in session tickets
2022-03-03 08:20:35 +10:00
kaleb-himes
25556dea8d
Add the new kdf.c file to the TIRTOS build
2022-03-02 14:56:46 -07:00
David Garske
d86122a5e7
Merge pull request #4909 from JacobBarthelmeh/PKCS12
...
refactor PKCS12 parse key creation
2022-03-02 12:37:06 -08:00
Kareem
deea6261e9
Allow disabling forced 'make clean' at the end of ./configure.
2022-03-02 13:20:22 -07:00
Anthony Hu
0053bd3af1
Now we can inject as wellgit checkout custom_ext_parse
2022-03-02 15:16:39 -05:00
Jacob Barthelmeh
aa18209c99
free buffer since pkey struct makes its own copy
2022-03-02 09:59:21 -07:00
Juliusz Sosinowicz
f846aceee2
Check input size in DecodeNsCertType
2022-03-02 17:17:17 +01:00
Sean Parkinson
8b24be04e8
ASN PemToDer: remove padding when AES_CBC encrypted
2022-03-02 11:33:44 +10:00
David Garske
119f2d2651
Fix for padding in session tickets. Adds padding based on WOLFSSL_GENERAL_ALIGNMENT. Increases enc_len to 32-bit. Related to PR #4887
2022-03-01 15:40:57 -08:00
Sean Parkinson
d1ba82d5e5
Merge pull request #4903 from julek-wolfssl/psk-resuming-certs
...
OpenSSL considers PSK resuming
2022-03-02 08:57:40 +10:00
Jacob Barthelmeh
b03233a35e
handle free'ing up items in fail case
2022-03-01 15:24:53 -07:00
Hideki Miyazaki
c3e7ff0e61
addressed code review
2022-03-02 07:09:33 +09:00
Jacob Barthelmeh
45ff8af026
refactor PKCS12 parse key creation
2022-03-01 14:49:59 -07:00
David Garske
b21036947c
Merge pull request #4894 from SparkiDev/sp_p521_hashlen_fix
...
SP P521: hash len needs special attention when 521 bits
2022-03-01 12:04:51 -08:00
David Garske
71056f6591
Merge pull request #4902 from SparkiDev/tlsx_usc_leak
...
TLSX: supported groups in temporary not always freed
2022-03-01 12:04:35 -08:00
Juliusz Sosinowicz
a104cf887e
Ticket failure should result in a regular handshake
2022-03-01 10:34:43 +01:00
Juliusz Sosinowicz
645f385031
Fix BioReceive for closed connection
...
The pending check was forcing a `WOLFSSL_CBIO_ERR_WANT_WRITE` return even though the underlying socket was closed and `WOLFSSL_BIO_FLAG_READ|WOLFSSL_BIO_FLAG_RETRY` was not set. The `wolfSSL_BIO_ctrl_pending(ssl->biord) == 0` is old and I can't find a reason to keep checking it. I left it just in the case where there is output data pending.
2022-03-01 10:34:20 +01:00
Juliusz Sosinowicz
5aef687414
OpenSSL considers PSK resuming
...
- `SSL_VERIFY_FAIL_IF_NO_PEER_CERT` check passes on a TLS 1.3 PSK connection that isn't a ticket
2022-03-01 10:09:24 +01:00
Sean Parkinson
605d701113
SP P521: hash len needs special attention when 521 bits
...
Need to right shift number down when hash is more than 521 bits.
Previously handled at a byte level and now at bit level.
Always return err from sp_*_ecc_mulmod_add_only_*().
When ECC add and double points are public and only have SP
implementation, check that the point ordinates are the right size.
2022-03-01 09:56:22 +10:00
Sean Parkinson
1aff4399d1
Merge pull request #4899 from dgarske/kcapi
...
Improvements to KCAPI support
2022-03-01 08:52:55 +10:00
Anthony Hu
cb95aed41b
Parsing of custom extensions in X.509 certificates.
2022-02-28 16:35:19 -05:00
David Garske
9644a04db2
Peer review fix.
2022-02-28 11:32:12 -08:00
kaleb-himes
ac7bd0aae8
Fix up random.h conflicts with cert 3389 releases and some NETOS issues
2022-02-28 12:09:50 -07:00
Chris Conlon
c22282a8aa
Merge pull request #4864 from TakayukiMatsuo/rsk65n
2022-02-28 09:12:24 -07:00
Juliusz Sosinowicz
92bd5a4076
Merge pull request #4891 from dgarske/multi_test
2022-02-28 15:28:39 +01:00
David Garske
1cb7342f61
Merge pull request #4895 from SparkiDev/benchmark_threaded
...
Benchmark: support multi-threaded testing
2022-02-27 21:41:07 -08:00
Sean Parkinson
350881b1bb
TLSX: supported groups in temporary not always freed
...
Fix handling of errors so that temporary is always freed.
2022-02-28 11:40:58 +10:00
Sean Parkinson
f3df4400d5
Merge pull request #4886 from dgarske/zd13745
...
Adds CSR userId support in subject name
2022-02-28 10:15:41 +10:00
Hideki Miyazaki
4f4a509e8c
fix wait until in rsa primitive
2022-02-26 09:52:14 +09:00
David Garske
9bdef1577b
Fixes for hmac.
2022-02-25 15:19:52 -08:00
David Garske
cc2eb0ab71
KCAPI Testing fixes.
2022-02-25 15:16:55 -08:00
Chris Conlon
870ff5b352
Merge pull request #4890 from miyazakh/objinfo
...
fix to use EXT_KEY_USAGE_OID in object_info
2022-02-25 16:02:48 -07:00
David Garske
ce6b6951d2
Fix issue with missing OID's for ASN template.
2022-02-25 14:23:01 -08:00
David Garske
ae1072afad
Cleanup mess of ASN_NAME_MAX.
2022-02-25 14:23:01 -08:00
David Garske
a2381ba954
Adds CSR userId support in subject name. Minor build fixes for ASN template.
2022-02-25 14:22:59 -08:00
David Garske
08d1e5cb60
Merge pull request #4897 from anhu/bad_macro
...
Correct bad macros
2022-02-25 14:18:57 -08:00
David Garske
3fdb6f0a4a
Only use pthreads if supported in config.
2022-02-25 13:05:04 -08:00
kaleb-himes
27c445235c
Add a cert 3389 ready option
2022-02-25 13:50:06 -07:00
David Garske
821fd3c898
Peer review fixes. Check idSz and add comment about session variable use.
2022-02-25 11:38:05 -08:00
Anthony Hu
1a9faa1f7e
fix suggested by dgarske
2022-02-25 14:00:07 -05:00
David Garske
e3e1426b91
Improve benchmark threading macros and text output. Thread protections on variables. Fixes for testing with async.
2022-02-25 10:51:19 -08:00
Anthony Hu
997a3aabc6
Correct bad macros
2022-02-25 13:19:35 -05:00
David Garske
a39a1c1d87
More fixups from cppcheck and clang-tidy.
2022-02-25 10:03:17 -08:00
Sean Parkinson
56adf831a3
Benchmark: support multi-threaded testing
2022-02-25 14:12:03 +10:00
John Safranek
5859b90ad8
Merge pull request #4841 from haydenroche5/vs_resource_file_update
...
Update Visual Studio resource files.
2022-02-24 15:29:46 -08:00
Hayden Roche
c33ae4c245
Improve wolfSSL_i2d_X509_NAME and wolfSSL_i2d_X509_NAME_canon.
...
Like other i2d functions, these functions should be able to take a NULL output
parameter and return the necessary output buffer size. This commit adds this
ability. This commit also removes some redundant code in wolfSSL_i2d_X509_NAME.
2022-02-24 14:48:52 -08:00
David Garske
269ab86002
Fixes for DoClientTicket changes.
2022-02-24 14:28:50 -08:00
David Garske
c2987a9ef9
Fix for IPv6 sockaddr_len set but not read.
2022-02-24 14:09:08 -08:00
David Garske
6dd7a289e7
Fix for "set but not used".
2022-02-24 13:43:56 -08:00
David Garske
6e24e21d5a
Fix for heap pointer in wolfSSL_DupSession.
2022-02-24 12:56:39 -08:00
David Garske
2b794f03c1
Fixes for multi-test pass. Breaks from PR #4807 .
2022-02-24 11:48:40 -08:00
Anthony Hu
07fdca1d62
Merge pull request #4885 from SparkiDev/asn_templ_bad_name
2022-02-24 12:44:27 -05:00
David Garske
86e08525cb
Merge pull request #4852 from elms/fix/more_oot
...
automake: fix fips touch and cleanup
2022-02-24 09:04:05 -08:00
David Garske
5fdc339e34
Merge pull request #4889 from SparkiDev/sp_int_iar
...
SP math all: IAR doesn't accept comment lines in assembly
2022-02-24 08:37:51 -08:00
Hideki Miyazaki
de81447b2d
fix to use EXT_KEY_USAGE_OID in object_info
2022-02-24 15:18:32 +09:00
Sean Parkinson
3d5b933f3c
SP math all: IAR doesn't accept comment lines in assembly
...
Replace assembly comment lines with C comment lines.
2022-02-24 16:06:31 +10:00
Sean Parkinson
bb50777f1a
ASN template: handle short OIDs
...
cert_asn1_test was constructing a BER encoding of a certificate that
didn't have all the components. It was trying to test putting in a bad
OID in the certificate name.
The original ASN.1 parsing code stopped at the bad name. ASN.1 template
code does the whole structure and then digs into the name.
A complete certificate should have always been used.
2022-02-24 15:36:56 +10:00
Sean Parkinson
b13826a3a5
Merge pull request #4840 from haydenroche5/visual_studio_cleanup
...
Clean up Visual Studio output and intermediate directories.
2022-02-24 15:07:13 +10:00
Hayden Roche
25407e955b
Update Visual Studio resource files.
...
- Add a resource file for the wolfSSL FIPS VS solution.
- Update copyright year in existing wolfssl.rc.
2022-02-23 16:53:26 -08:00
elms
d1895e5679
automake: fix fips touch and cleanup
...
This fixes an issue with yocto that only occurs when using `devtool`
which builds out of tree.
2022-02-23 14:11:31 -08:00
Hayden Roche
51d66877f7
Add wolfSSL_EVP_PKEY_paramgen to the compatibility layer.
...
Currently, it only supports ECC, which is all we need it for for the OpenSplice
port we're working on. In the ECC case, all it needs to do is set the group
appropriately. The logic is very similar to `wolfSSL_EVP_PKEY_keygen`, minus
the final step of actually generating the key.
2022-02-23 13:59:15 -08:00
Hayden Roche
666cf508a2
Merge pull request #4874 from dgarske/ocsp_ipv6
2022-02-23 13:37:16 -08:00
David Garske
fbc7d5a6b2
Minor textual fixes. Thanks Hayden.
2022-02-23 09:43:10 -08:00
David Garske
0824a64c92
Merge pull request #4807 from julek-wolfssl/stunnel-5.61
...
stunnel 5.61 support
2022-02-23 09:41:51 -08:00
David Garske
b84086a482
Merge pull request #4883 from SparkiDev/ssl_bio_move
...
BIO: move APIs out of ssl.c
2022-02-23 09:38:54 -08:00
David Garske
0afc5e2cf1
Merge pull request #4881 from SparkiDev/sp_asm_shift_fix
...
SP asm: fix for modexp corner case
2022-02-23 09:37:25 -08:00
David Garske
8623b0c089
Merge pull request #4849 from SparkiDev/sp_p521
...
SP: Add support for P521
2022-02-23 09:33:49 -08:00
David Garske
3a34a4cd1d
Merge pull request #4882 from SparkiDev/even_mod_check
...
RSA/DH: check for even modulus
2022-02-23 09:33:12 -08:00
Juliusz Sosinowicz
2c978a96b2
Prevent possibility of an infinite retry loop and resource exhaution
...
Reported in ZD13606
2022-02-23 10:07:21 +01:00
Juliusz Sosinowicz
fb943a2f23
Rebase and make wolfSSL_CTX_up_ref always available
...
`wolfSSL_CTX_up_ref` is a small and potentially useful API for users so it doesn't need to be restricted only to the compatibility layer. The reference counting mechanisms are always available anyway. This just exposes the functionality to the user.
2022-02-23 09:55:52 +01:00
Juliusz Sosinowicz
d1f53055e9
Peeking can't return a WOLFSSL_ERROR_WANT_READ in compatibility mode
2022-02-23 09:47:34 +01:00
Juliusz Sosinowicz
617eda9d44
Fix misc memory issues
...
- Make `InternalTicket` memory alignment independent
2022-02-23 09:47:34 +01:00
Juliusz Sosinowicz
b402102e58
Add backwards compatibility for wolfSSL_get_session
...
Before this pull request, `wolfSSL_get_session` always returned a pointer to the internal session cache. The user can't tell if the underlying session hasn't changed before it calls `wolfSSL_set_session` on it. This PR adds a define `NO_SESSION_CACHE_REF` (for now only defined with `OPENSSL_COMPATIBLE_DEFAULTS`) that makes wolfSSL only return a pointer to `ssl->session`. The issue is that this makes the pointer returned non-persistent ie: it gets free'd with the `WOLFSSL` object. This commit leverages the lightweight `ClientCache` to "increase" the size of the session cache. The hash of the session ID is checked to make sure that the underlying session hasn't changed.
2022-02-23 09:47:34 +01:00
Juliusz Sosinowicz
ceff401269
Fixes for Jenkins tests
...
- Move test to `HAVE_IO_TESTS_DEPENDENCIES`
- Implement `wolfSSL_trust_peer_cert`
- have{cipher} options weren't being set with only RSA enabled
2022-02-23 09:47:34 +01:00
Juliusz Sosinowicz
91b08fb691
Allocate ssl->session separately on the heap
...
- Refactor session cache access into `AddSessionToCache` and `wolfSSL_GetSessionFromCache`
2022-02-23 09:47:34 +01:00
Juliusz Sosinowicz
1d712d47ba
Access to session cache is now atomic
...
- Adding and getting sessions to and from the local cache is now atomic.
- The new internal `wolfSSL_GetSessionFromCache` requires a destination object to be supplied when retrieving from the cache so that items can be retrieved independently from the cache. For most existing calls, the destination is `ssl->session`.
-`PREALLOC_SESSION_TICKET_LEN` defines how much memory is temporarily allocated for the ticket if it doesn't fit in the static session buffer.
2022-02-23 09:47:34 +01:00
Juliusz Sosinowicz
afca455cda
stunnel 5.61 support
...
- New/Implemented API
- `SSL_has_pending`
- `wolfSSL_CertManagerLoadCRLFile`
- `wolfSSL_LoadCRLFile`
- `wolfSSL_CTX_LoadCRLFile`
- `wolfSSL_CTX_add_session`
- Calling chain certificate API (for example `wolfSSL_CTX_use_certificate_chain_file`) no longer requires an actual chain certificate PEM file to be passed in as input. `ProcessUserChain` error in `ProcessBuffer` is ignored if it returns that it didn't find a chain.
- Add `WOLFSSL_TICKET_HAVE_ID` macro. When defined tickets will include the original session ID that can be used to lookup the session in internal cache. This is useful for fetching information about the peer that doesn't get sent in a resumption (such as the peer's certificate chain).
- Add `ssl->ticketSessionID` field because `ssl->session.sessionID` is used to return the "bogus" session ID sent by the client in TLS 1.3
- `OPENSSL_COMPATIBLE_DEFAULTS` changes
- Define `WOLFSSL_TRUST_PEER_CERT` and certificates added as CA's will also be loaded as trusted peer certificates
- Define `WOLFSSL_TLS13_MIDDLEBOX_COMPAT`
- Seperate `internalCacheOff` and `internalCacheLookupOff` options to govern session addition and lookup
- `VerifyServerSuite` now determines if RSA is available by checking for it directly and not assuming it as the default if static ECC is not available
- `WOLFSSL_SESSION` changes
- `ssl->extSession` added to return a dynamic session when internalCacheOff is set
- `ssl->session.refPtr` made dynamic and gets free'd in `SSL_ResourceFree`
- If `SSL_MODE_AUTO_RETRY` is set then retry should only occur during a handshake
- `WOLFSSL_TRUST_PEER_CERT` code now always uses `cert->subjectHash` for the `cm->tpTable` table row selection
- Change some error message names to line up with OpenSSL equivalents
- Run `MatchSuite` again if certificate setup callback installed and successful
- Refactor clearing `ASN_NO_PEM_HEADER` off the error queue into a macro
- `wolfSSL_get_peer_certificate` now returns a duplicated object meaning that the caller needs to free the returned object
- Allign `wolfSSL_CRYPTO_set_mem_functions` callbacks with OpenSSL API
- `wolfSSL_d2i_PKCS12_bio` now consumes the input BIO. It now supports all supported BIO's instead of only memory BIO.
- stunnel specific
- Always return a session object even if we don't have a session in cache. This allows stunnel to save information in the session external data that will be transfered to new connections if the session is reused
- When allocating a dynamic session, always do `wolfSSL_SESSION_set_ex_data(session, 0, (void *)(-1)`. This is to mimic the new index callback set in `SSL_SESSION_get_ex_new_index`.
- Fix comment in `wolfSSL_AES_cbc_encrypt`
- Trusted peer certificate suite tests need to have CRL disabled since we don't have the issuer certificate in the CA store if the certificates are only added as trusted peer certificates.
tested
2022-02-23 09:47:34 +01:00
Sean Parkinson
2eb044dc60
SP: Add support for P521
2022-02-23 14:51:47 +10:00
Sean Parkinson
d33b787993
BIO: move APIs out of ssl.c
...
Get configuration working: --enable-all CFLAGS=-DNO_BIO
2022-02-23 14:11:30 +10:00
Sean Parkinson
b5ed5c9b99
RSA/DH: check for even modulus
2022-02-23 09:51:15 +10:00
David Garske
194466c35a
Peer review fixes.
2022-02-22 15:22:27 -08:00
Sean Parkinson
5b6130889e
SP asm: fix for modexp corner case
...
When exponent bit length is a multiple of the window size and the top
word has only window bits in it, then n is shifted down by an undefined
value (size of a word). The n value is not used after this.
Check for this condition and don't attempt to shift n.
2022-02-23 09:17:08 +10:00
David Garske
2beb27972b
OCSP IPv6 support with --enable-ipv6 or WOLFSSL_IPV6. Improve the logic around C99 and getaddrinfo.
2022-02-22 15:07:05 -08:00
David Garske
fef8a57eb2
Merge pull request #4880 from julek-wolfssl/plain-alert
...
Detect if we are processing a plaintext alert
2022-02-22 10:11:08 -08:00
David Garske
e8c9a413ca
Merge pull request #4878 from SparkiDev/sp_x64_oob_write_fix_1
...
ECC with SP math: OOB write
2022-02-22 09:53:32 -08:00
David Garske
b40226099d
Merge pull request #4877 from SparkiDev/sp_x64_asm_fix_1
...
SP asm: fix map function to use p not point
2022-02-22 09:50:53 -08:00
Sean Parkinson
d10900e124
ECC with SP math: OOB write
...
Don't let input points ordinates be greater than modulus in length.
2022-02-22 17:00:23 +10:00
Sean Parkinson
78f116b27f
SP asm: fix map function to use p not point
2022-02-22 16:33:24 +10:00
Sean Parkinson
2a750acf03
Merge pull request #4873 from dgarske/async_v5.2.0
...
Asynchronous Release v5.2.0: TLS 1.3 HelloRetryRequest
2022-02-22 10:35:17 +10:00
David Garske
250a06f759
Merge pull request #4865 from SparkiDev/sp_int_mont_red
...
SP int: Montgomery Reduction
2022-02-21 16:20:17 -08:00
David Garske
31abc99f6f
Fix for async handling of TLS v1.3 hello retry broken in #4863 .
2022-02-21 14:14:20 -08:00
David Garske
6a81cc976e
Merge pull request #4872 from SparkiDev/tls13_empty_cert_cli
...
TLS 1.3: fail immediately if server sends empty certificate message
2022-02-21 14:10:40 -08:00
David Garske
38d4da56ab
Merge pull request #4857 from julek-wolfssl/ZD13631
...
Reported in ZD13631
2022-02-21 14:01:51 -08:00
David Garske
d834c50c85
Merge pull request #4858 from julek-wolfssl/ZD13611
...
Reported in ZD13611
2022-02-21 14:01:42 -08:00
David Garske
e6c07a296d
Merge pull request #4866 from ejohnstown/release
...
Prepare for release 5.2.0
2022-02-21 09:09:58 -08:00
Sean Parkinson
9263e6ead3
TLS 1.3: fail immediately if server sends empty certificate message
2022-02-21 21:34:13 +10:00
TakayukiMatsuo
eb9220a0b5
Modify example app to work with FreeRTOS+IoT
2022-02-21 12:46:43 +09: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
Juliusz Sosinowicz
c5875cfc5a
Detect if we are processing a plaintext alert
2022-02-16 10:50:44 +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
Jacob Barthelmeh
a5ce2a33eb
add macro guard around test case
2022-02-15 11:58:59 -07:00
Juliusz Sosinowicz
15d0dd258a
Add cert test for UID name component
2022-02-15 14:05:46 +01:00
Sean Parkinson
ea5785f6fd
SP int: Montgomery Reduction
...
Improve performance for ECC curves when all bits in words are used (mask
is 0).
On 64-bit platforms, improves performance for 256 and 384 bit curves.
On 32-bit platforms, improves performance for 224, 256, 384 bit curves.
2022-02-15 17:19:57 +10: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
Jacob Barthelmeh
f0a0cd1078
fix for larger curve sizes with deterministic ECC sign
2022-02-14 09:55:38 -07:00
Juliusz Sosinowicz
445ed2f234
Reported in ZD13631
...
`ssl->peerVerifyRet` wasn't being cleared when retrying with an alternative cert chain
2022-02-14 11:01:59 +01: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
Juliusz Sosinowicz
4e5380668c
Reported in ZD13611
...
The `UID` name component could not be parsed if it appears in a subject or issuer name
2022-02-12 00:36:07 +01:00
David Garske
40b171124f
Fixes to resolve a few make check issues.
2022-02-11 15:20:25 -08: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
Tesfa Mael
f49b7107a0
Add __inline__ for Diab compiler
2022-02-08 19:54:26 -08:00
Tesfa Mael
32c80781bf
Prevent diab compiler from inlining functions
2022-02-08 19:25:13 -08: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
David Garske
7ec1e69dba
Fixes for supporting the openssl compatibility layer. Adds ChaCha/Poly, DH extra and verify callbacks.
2022-02-08 10:18:41 -08:00
Hayden Roche
6930cc0b21
Clean up Visual Studio output and intermediate directories.
...
Currently, wolfssl.vcxproj and IDE/WIN10/wolfssl-fips.vcxproj do not use the
same scheme for their output and intermediate directories. Further, across
configuration/platform combinations, wolfssl.vcxproj isn't consistent, either.
For example:
```
Release|x64
OutDir: $(SolutionDir)$(Platform)\$(Configuration)\
IntDir: $(Platform)\$(Configuration)\obj\
Release|Win32
OutDir: $(SolutionDir)$(Configuration)\
IntDir: $(Configuration)\obj\
```
This commit makes every configuration/platform combo for all Visual Studio
projects follow the same pattern:
```
OutDir: $(SolutionDir)$(Platform)\$(Configuration)\
IntDir: $(Configuration)\$(Platform)\$(ProjectName)_obj\
```
The `$(ProjectName)_obj` piece gets rid of a Visual Studio warning about not
mingling the intermediate objects of disparate builds.
2022-02-08 09:23:27 -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
David Garske
5169a3cf89
Improve header comments and logic. Remove NO_PWDBASED and added CRL.
2022-02-07 15:58:10 -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
David Garske
50700c3c28
Make sure Rabbit and HC128 are disabled when building FIPS against older wolfSSL.
2022-02-03 14:53:11 -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
db6d924d4b
User settings template for FIPS v5.
2022-02-03 13:35:13 -08: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
Daniele Lacamera
f323964e8a
Update TIRTOS module
...
Use SP_MATH by default. Added missing object files.
2022-01-27 16:23:23 +01: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
toddouska
830de9a9fb
Merge pull request #3760 from JacobBarthelmeh/Release
...
prepare for release v4.7.0
2021-02-15 14:29:51 -08:00
toddouska
30462fcf95
Merge pull request #3756 from SparkiDev/sp_math_dh_agree
...
DH SP math: return key size error with DH Agree
2021-02-15 12:26:04 -08:00
toddouska
917205442b
Merge pull request #3757 from SparkiDev/sp_smallstack_fixes
...
sp_lcm small stack: fix size of temporary
2021-02-15 12:25:13 -08:00
toddouska
888fab501b
Merge pull request #3758 from SparkiDev/sp_exch_fix
...
SP math all: sp_exch fixed up
2021-02-15 12:23:28 -08:00
toddouska
742731a65f
Merge pull request #3759 from JacobBarthelmeh/Testing
...
fix for haproxy and nginx build, remove execute bit on certs
2021-02-15 12:21:56 -08:00
Jacob Barthelmeh
847938f4d6
prepare for release v4.7.0
2021-02-16 02:41:37 +07:00
Eric Blankenhorn
b7b07e1945
Adding wolfSSL_CTX_get_TicketEncCtx
2021-02-15 11:28:46 -06:00
Jacob Barthelmeh
f4519018eb
remove execute bit on smime bundles
2021-02-15 23:33:31 +07:00
Jacob Barthelmeh
0b0f370384
fix for haproxy and nginx build
2021-02-15 22:09:44 +07:00
Sean Parkinson
ba1c67843a
Merge pull request #3752 from JacobBarthelmeh/Jenkins
...
changes from nightly Jenkins test review
2021-02-15 16:32:40 +10:00
JacobBarthelmeh
c5190d1294
Merge pull request #3753 from dgarske/wpas_revert
...
Fixes for hostapd (revert some configure.ac changes in PR #3289 )
2021-02-15 09:45:27 +07:00
Sean Parkinson
e4f8545e36
SP math all: sp_exch fixed up
2021-02-15 10:29:45 +10:00
Sean Parkinson
e187a74b1c
sp_lcm small stack: fix size of temporary
...
Temporary sp_int needs to be allocated to be 1 digit larger than a or b
for the div operation.
Change sp_div to check sizes of r and rem when passed in.
Fix sp_invmod, sp_gcm, sp_submod to use temporary sp_int sizes that work
with calls to sp_div().
2021-02-15 09:48:18 +10:00
Sean Parkinson
4b1c89ab38
DH SP math: return key size error with DH Agree
...
SP math requires SP to support DH operations.
When SP doesn't support bit size, WC_KEY_SIZE_E must be returned.
2021-02-15 09:04:43 +10:00
Sean Parkinson
505514415d
Merge pull request #3748 from JacobBarthelmeh/Testing
...
always check index into certs
2021-02-15 08:20:28 +10:00
David Garske
98b5900266
Revert of changes in PR #3289 , which should not have removed the HAVE_SECRET_CALLBACK and WOLFSSL_PUBLIC_ECC_ADD_DBL. These are required for hostapd.
2021-02-12 14:11:17 -08:00
toddouska
fc005f941c
Merge pull request #3750 from embhorn/buffer_conflict
...
Fix use of 'buffer' in test
2021-02-12 13:59:18 -08:00
Elms
bde1a2209a
tests: add include for ecc.h to fix compile error
...
fix testsuite implicit definition of `wc_ecc_fp_free` with
`./configure --enable-fpecc --enable-ecc --enable-stacksize`
2021-02-13 01:31:01 +07:00
David Garske
f311c9a038
Merge pull request #3751 from SparkiDev/aes_gcm_type
...
AES-GCM type fixes: internal functions now have word32 type parameters
2021-02-12 10:12:26 -08:00
Jacob Barthelmeh
1c852f60ab
fix for g++ build
2021-02-12 23:26:54 +07:00
Jacob Barthelmeh
7e72fafd44
do not turn on FP_64BIT by default on Aarch64
2021-02-12 23:16:04 +07:00
Jacob Barthelmeh
a49c867b38
increase test buffer size for updated pkcs7 bundle
2021-02-12 23:16:04 +07:00
Jacob Barthelmeh
0938a0055d
always use MAX_CHAIN_DEPTH for args->certs buffer
2021-02-12 15:18:14 +07:00
Sean Parkinson
3926ccd39b
AES-GCM type fixes: internal functions now have word32 type parameters
...
Lengths were signed int for decrypt while unsigned int for encrypt.
Use word32 across the board.
Also fix AES-NI code on Windows to cast lengths to word64 before
multiplying by 8 to avoid averflow.
2021-02-12 08:30:08 +10:00
Eric Blankenhorn
2ac826c37e
Fix use of 'buffer' in test
2021-02-11 15:58:26 -06:00
toddouska
ae073b7ce2
Merge pull request #3741 from elms/test/openssl_distcheck_fix
...
testing: fix openssl test for `distcheck`
2021-02-11 13:53:09 -08:00
toddouska
81dcf0d28b
Merge pull request #3640 from tmael/evp_rsa2
...
Remove EVP_PKEY_RSA2
2021-02-11 13:51:46 -08:00
toddouska
1283a4d9f0
Merge pull request #3686 from embhorn/zd11571
...
Fix Free/SafeRTOS with XMALLOC_USER
2021-02-11 13:50:55 -08:00
toddouska
d40ea03621
Merge pull request #3703 from SparkiDev/sp_int_malloc
...
SP int: Rework allocation of temporaries
2021-02-11 13:49:45 -08:00
toddouska
f0ce6ada0f
Merge pull request #3702 from guidovranken/zd11603
...
Prevent dangling pointer in TLSX_Cookie_Use
2021-02-11 12:31:02 -08:00
toddouska
3eeeb39fb7
Merge pull request #3711 from dgarske/ecc_encrypt_rng
...
Fix for `--enable-eccencrypt` with timing resistance enabled
2021-02-11 12:28:13 -08:00
toddouska
80b9949052
Merge pull request #3739 from kaleb-himes/FusionRTOS-Porting-R3
...
Fusion RTOS porting round 3
2021-02-11 12:25:55 -08:00
JacobBarthelmeh
e87e818c6e
Merge pull request #3749 from dgarske/zd11624_pkcs11
...
Fix another PKCS11 case where the ECC key type is not set
2021-02-12 01:36:41 +07:00
Eric Blankenhorn
2c2bdca200
Fix typo
2021-02-11 12:27:43 -06:00
toddouska
39cb84de25
Merge pull request #3697 from julek-wolfssl/openvpn-2.5-missing-stuff
...
OpenVPN master additions
2021-02-11 08:56:45 -08:00
David Garske
f006479645
Fix another PKCS11 case where the ECC key type is not set and causes failures. Broke in PR #3687 .
2021-02-11 08:04:58 -08:00
Jacob Barthelmeh
90140fc5a4
always check index into certs
2021-02-11 21:50:51 +07:00
David Garske
d05dc921a7
Merge pull request #3745 from douzzer/enable-reproducible-build
2021-02-11 06:39:28 -08:00
Daniel Pouzzner
d64315a951
configure.ac: add --enable-reproducible-build: put ar and ranlib in deterministic mode, and leave LIBWOLFSSL_CONFIGURE_ARGS and LIBWOLFSSL_GLOBAL_CFLAGS out of the generated config.h. relates to PR #3417 .
2021-02-11 00:12:05 -06:00
Sean Parkinson
b330196c28
SP int: Rework allocation of temporaries
...
Allocate only as much is as needed.
Use macros to simplify code.
Don't use an sp_int if you can use an array of 'sp_int_digit's.
2021-02-11 10:34:40 +10:00
toddouska
acdc267104
Merge pull request #3718 from SparkiDev/sp_int_fast_nct
...
SP int: allow faster NCT exptmod to be compiled in
2021-02-10 16:14:39 -08:00
toddouska
032cc1645c
Merge pull request #3713 from SparkiDev/tls_def_sess_ticket_cb
...
TLS Session Ticket: default encryption callback
2021-02-10 16:13:33 -08:00
toddouska
389a5e0301
Merge pull request #3684 from SparkiDev/sp_fixes_5
...
SP fixes: even mod testing, ECC compilation with SP
2021-02-10 16:10:21 -08:00
toddouska
6983aa9331
Merge pull request #3700 from SparkiDev/sp_math_lshb
...
SP math lshb: check space for result
2021-02-10 16:01:27 -08:00
toddouska
67b1280bbf
Merge pull request #3545 from kabuobeid/smime
...
Added support for reading S/MIME messages via SMIME_read_PKCS7.
2021-02-10 15:59:32 -08:00
Sean Parkinson
0403f5f18d
Merge pull request #3744 from JacobBarthelmeh/Certs
...
run renewcerts.sh script
2021-02-11 09:43:49 +10:00
Sean Parkinson
5151e1f749
Merge pull request #3715 from JacobBarthelmeh/Testing
...
openssl x509 small with req cert gen
2021-02-11 09:39:15 +10:00
Sean Parkinson
7efaf14fce
Merge pull request #3727 from JacobBarthelmeh/Prime
...
check prime is prime with ecc compressed keys
2021-02-11 09:22:40 +10:00
Elms
d67934f6b8
scripts: remove use of realpath and fix external.test
...
`external.test` could fail quietly for not finding `ping.test` for
out-of-tree builds. Make it look relative to the script location.
2021-02-10 14:18:32 -08:00
JacobBarthelmeh
ac96e58928
Merge pull request #3743 from dgarske/zd11624
...
Fix for copy/paste error for ECC key type
2021-02-11 04:02:54 +07:00
Jacob Barthelmeh
41e5e547c4
run renewcerts.sh script
2021-02-11 03:12:54 +07:00
kaleb-himes
223ba43c2c
Add debug message regarding failure
2021-02-10 12:15:43 -07:00
kaleb-himes
9e6ab4ab70
Address indendation, fix return on stub, remove warning
2021-02-10 11:26:29 -07:00
David Garske
c9c4a7ee68
Fix spelling errors.
2021-02-10 10:17:51 -08:00
David Garske
0c75099111
Fix for copy/paste error in PR 3728, which makes sure the ECC key type is specified.
2021-02-10 10:14:31 -08:00
kaleb-himes
4c171524dd
Address missed CloseSocket item and revert some white space changes
2021-02-10 09:14:54 -07:00
Elms
9b6f382b2c
testing: fix openssl test for distcheck
...
Previously missed case of cert locations for out-of-tree build. Use
relative path from script location for certificate path
2021-02-10 07:15:22 -08:00
Jacob Barthelmeh
3c0563908f
openssl x509 small with req cert gen
...
add test for build case with x509small and add back in function
adjust macro guard for i2d_X509_NAME implementation
add macro guard on test case
2021-02-10 21:48:29 +07:00
kaleb-himes
7e428f90f2
Revert zero return, to be handled in stand-alone PR
2021-02-10 05:31:57 -07:00
kaleb-himes
15f9902e94
Address new file issue by Jenkins and peer feedback on return val of time
2021-02-10 04:16:34 -07:00
Sean Parkinson
64bc4b663d
SP fixes: even mod testing, ECC compilation with SP
...
Even mod inversion will sometimes work with integer.c.
Don't call SP code to perform ECC ops unless WOLFSSL_HAVE_SP_ECC is
defined.
2021-02-10 14:38:58 +10:00
Sean Parkinson
794cb5c7a9
TLS Session Ticket: default encryption callback
...
Encrypts with ChaCha20-Poly1305 or AES-GCM.
Two keys in rotation.
Key used for encryption until ticket lifetime goes beyond expirary
(default 1 hour). If key can still be used for decryption, encrypt with
other key.
Private random used to generate keys.
2021-02-10 14:31:54 +10:00
kaleb-himes
89b97a0fbf
Implement peer feedback
2021-02-09 18:42:23 -07:00
toddouska
b704c3b3f8
Merge pull request #3693 from SparkiDev/curve448_ppc64
...
Curve448 PPC64: 'char' is not always signed - use type 'sword8'
2021-02-09 16:08:06 -08:00
toddouska
75d0496f77
Merge pull request #3722 from SparkiDev/sp_clang_fix
...
test.c: don't check key NULL when not small stack
2021-02-09 16:07:04 -08:00
toddouska
157ad65a6e
Merge pull request #3677 from SparkiDev/ecdsa_keep_e
...
ECDSA: don't modify the e mp_int (hash) value
2021-02-09 16:06:05 -08:00
toddouska
47b2e8342b
Merge pull request #3698 from SparkiDev/sp_math_no_asm_fix
...
SP math: fix one word Montgomery Reduction for non-asm
2021-02-09 16:04:38 -08:00
toddouska
32424f715c
Merge pull request #3699 from SparkiDev/sp_ecdsa_vfy_fix
...
SP ECC verify: check point for z=0 and set to infinity
2021-02-09 16:02:51 -08:00
toddouska
27475291b1
Merge pull request #3733 from SparkiDev/sp_int_mont_red_size
...
SP int: mont_red - check size of a relative to m
2021-02-09 16:00:24 -08:00
toddouska
ae3706d5e5
Merge pull request #3734 from SparkiDev/sp_int_8_bit
...
SP int: fixes for 8-bit digits
2021-02-09 15:59:26 -08:00
toddouska
2f47934184
Merge pull request #3735 from SparkiDev/sp_int_32_bit
...
SP int SP_WORD_SIZE=32: cast down explicitly
2021-02-09 15:56:49 -08:00
toddouska
fc30f379ee
Merge pull request #3736 from SparkiDev/sp_int_neg_zero
...
SP int neg: fix handling of negative zero and mp_cond_copy
2021-02-09 15:48:21 -08:00
kaleb-himes
cfadc7e25a
Merge branch 'FusionRTOS-Porting-R3' of https://github.com/kaleb-himes/wolfssl into FusionRTOS-Porting-R3
2021-02-09 16:47:44 -07:00
kaleb-himes
3472191af5
Remove ++ from VisualDSP dir, seems to be causing issues with make dist
2021-02-09 16:39:00 -07:00
toddouska
f63f0ccb94
Merge pull request #3740 from SparkiDev/tls13_one_hrr_sh
...
TLS 1.3: Only allow one ServerHello and one HelloRetryRequest
2021-02-09 14:59:10 -08:00
Sean Parkinson
ca3c5bf6c4
SP math lshb: check space for result
2021-02-10 08:58:58 +10:00
toddouska
33bfee0f1a
Merge pull request #3717 from kaleb-himes/OE11_ACVP
...
XSTRNCASECMP for OE11 ACVP (CMSIS RTOS)
2021-02-09 14:52:21 -08:00
Sean Parkinson
9792e062c3
SP int: allow faster NCT exptmod to be compiled in
...
For small builds, this may be needed to get the right performance.
2021-02-10 08:51:32 +10:00
toddouska
9a7aba265a
Merge pull request #3716 from kaleb-himes/OE10_ACVP_OE13_ACVP_WPAA
...
OE10 and OE13 ACVP updates for armv8 PAA
2021-02-09 14:50:42 -08:00
Kaleb Himes
73d7709724
Update comment about location for porting changes.
2021-02-09 15:39:12 -07:00
kaleb-himes
6d23728a56
Fusion RTOS porting round 3
2021-02-09 15:33:06 -07:00
toddouska
250b59f8fd
Merge pull request #3688 from julek-wolfssl/correct-cert-free
...
Use wolfSSL_X509_free to free ourCert
2021-02-09 12:41:12 -08:00
Chris Conlon
012841bba3
Merge pull request #3738 from embhorn/cmp_layer_high
...
Compatibility layer API
2021-02-09 08:33:41 -07:00
David Garske
47d5f6f624
Merge pull request #3714 from SparkiDev/sp_int_rsavfy
2021-02-09 07:28:40 -08:00
Chris Conlon
71b495c422
Merge pull request #3712 from miyazakh/RND_bytes
...
handle size greater than RNG_MAX_BLOCK_LEN
2021-02-09 08:26:30 -07:00
Sean Parkinson
5818923762
Merge pull request #3723 from douzzer/AesCcmEncrypt-zero-inSz-null-in
...
AES-CCM null payload buffers with inSz zero
2021-02-09 17:22:03 +10:00
Daniel Pouzzner
bdd4ceb445
aes.c: fix overwide code text in wc_AesCcmEncrypt().
2021-02-08 21:50:29 -06:00
Sean Parkinson
4d70d3a3c4
TLS 1.3: Only allow one ServerHello and one HelloRetryRequest
2021-02-09 12:51:53 +10:00
Sean Parkinson
539ef512fc
SP int neg: fix handling of negative zero and mp_cond_copy
...
mp_cond_copy: copy sign when available.
Check for zero and ensure sign is MP_ZPOS.
2021-02-09 11:03:06 +10:00
Kareem Abuobeid
a4e819c60a
Added support for reading S/MIME messages via SMIME_read_PKCS7.
2021-02-08 17:14:37 -07:00
Sean Parkinson
763f388471
SP int: get rsavfy and rsapub working again
2021-02-09 09:58:23 +10:00
toddouska
0d499a28e5
Merge pull request #3725 from elms/build/fix_distcheck
...
build: fix `make distcheck`
2021-02-08 15:57:04 -08:00
Sean Parkinson
3217c7afae
Merge pull request #3732 from miyazakh/setverifydepth
...
issue callback when exceeding depth limit rather than error out
2021-02-09 09:51:45 +10:00
toddouska
f14f1f37d2
Merge pull request #3673 from elms/ssl_api/get_verify_mode
...
SSL: add support for `SSL_get_verify_mode`
2021-02-08 15:40:19 -08:00
toddouska
58f9b6ec01
Merge pull request #3676 from SparkiDev/tls13_blank_cert
...
TLS 1.3: ensure key for signature in CertificateVerify
2021-02-08 15:27:05 -08:00
Daniel Pouzzner
7a583d5b4b
aesccm_test(): test for (and require) BAD_FUNC_ARG when in or out pointer to wc_AesCcm{En,De}crypt() is null and inSz > 0.
2021-02-08 16:43:38 -06:00
Daniel Pouzzner
b8a019dedd
AES-CCM: allow null payload buffers in wc_AesCcmEncrypt() and wc_AesCcmDecrypt() when inSz is zero, and add to aesccm_test() a test for this, tolerating early BAD_FUNC_ARG (for FIPS and arch-specific 3rd party code), and a test for the zero-length string, that must succeed.
2021-02-08 16:34:09 -06:00
David Garske
dda4c3b3c4
Merge pull request #3724 from embhorn/zd11646
...
Move var declaration to top
2021-02-08 11:09:28 -08:00
Elms
12eddee104
scripts: fix tests for out of tree distcheck
...
Copying or using certs from directory relative to scripts source directory.
2021-02-08 10:43:31 -08:00
Eric Blankenhorn
6cff3f8488
Adding X509_LOOKUP_ctrl
2021-02-08 12:17:14 -06:00
Eric Blankenhorn
47b9c5b054
Adding X509_STORE_CTX API
2021-02-08 08:25:14 -06:00
Eric Blankenhorn
de47b9d88a
Adding X509_VERIFY_PARAM API
2021-02-08 08:25:14 -06:00
Jacob Barthelmeh
812b44d58e
guard check on prime with macro WOLFSSL_VALIDATE_ECC_IMPORT
2021-02-08 20:25:01 +07:00
Sean Parkinson
36d124ed2f
Merge pull request #3730 from guidovranken/zd11650
...
SP math: Better error propagation
2021-02-08 14:17:43 +10:00
Sean Parkinson
c3cc36c55f
SP int SP_WORD_SIZE=32: cast down explicitly
2021-02-08 13:20:12 +10:00
Sean Parkinson
7986b37aa5
SP int: fixes for 8-bit digits
...
Fix mask type in mp_cond_copy to be at least 16 bits to handle 'used'
being larger than 8-bit but mp_digit being 8-bit.
When large numbers are used with 8-bit words, mul/sqr partial sums will
overflow a word. Fix implementations to handle this.
2021-02-08 12:24:28 +10:00
Hideki Miyazaki
f13186827a
issue callback when exceeding depth limit rather than error out
2021-02-08 11:01:45 +09:00
Sean Parkinson
aefddaf2b8
SP int: mont_red - check size of a relative to m
2021-02-08 10:07:15 +10:00
Jacob Barthelmeh
cced2038b8
conditional compile and check on idx
2021-02-08 06:10:04 +07:00
Guido Vranken
358dbd5090
_sp_exptmod_base_2: Break out of loops on error
2021-02-08 00:09:29 +01:00
Sean Parkinson
2933db8915
Merge pull request #3729 from guidovranken/zd11649
...
SHA 256,512: Only write hash if no error has occurred
2021-02-08 08:47:51 +10:00
Sean Parkinson
ea4b3110e8
Merge pull request #3728 from dgarske/zd11624
...
Fix for PKCS11 not properly exporting the public key due to a missing key type field
2021-02-08 08:32:04 +10:00
Guido Vranken
bc707d67c3
SP math: Better error propagation
...
ZD 11650
2021-02-06 09:09:41 +01:00
Guido Vranken
3fd2647383
SHA 256,512: Only write hash if no error has occurred
...
ZD 11649
2021-02-06 08:15:30 +01:00
Jacob Barthelmeh
644636e0f8
only check prime value with custom curves
2021-02-06 05:46:19 +07:00
Elms
e26f1529c0
build: revert change so make generates testsuite.test
...
A change to `include.am` caused `make check` to generate, but `make`
without arguments to not generate it.`
2021-02-05 14:39:07 -08:00
Elms
c17597a4fb
build: arbitrary path for make check
...
To support builds in other directories, unit.test and wolfcrypt test
must be aware of the source and build directory.
2021-02-05 12:10:32 -08:00
David Garske
70b382e6cf
Fix for PKCS11 not properly exporting the public key due to a missing key type field. This broke due to changes in PR #3687 . Also resolved mismatch of enum types for the key type check.
2021-02-05 11:49:31 -08:00
Jacob Barthelmeh
c2be5dbe2b
check prime is prime with ecc compressed keys
2021-02-06 01:54:25 +07:00
Elms
93ea355217
build: fix make distcheck
...
Need to check if `unit.test` was run from make process and set
different path to run unit test executable.
Writing files in the dist is not allowed during distcheck so write
files to subdirectory used build during distmake
2021-02-05 07:25:07 -08:00
Eric Blankenhorn
e4d79bf49e
Move var declaration to top
2021-02-05 08:41:42 -06:00
Sean Parkinson
c4afce76f7
test.c: don't check key NULL when not small stack
2021-02-05 14:57:00 +10:00
kaleb-himes
4ade6eb802
XSTRNCASECMP for OE11 ACVP (CMSIS RTOS)
2021-02-03 16:03:20 -07:00
kaleb-himes
776964f7c7
OE10 and OE13 ACVP updates for armv8 PAA
2021-02-03 15:38:08 -07:00
Hideki Miyazaki
431e1c8ffe
handle size greater than RNG_MAX_BLOCK_LEN
2021-02-03 12:23:36 +09:00
David Garske
714aa97490
Merge pull request #3710 from cconlon/0202
...
fix and update README.md markdown
2021-02-02 16:15:53 -08:00
David Garske
72a8a1069a
Fix to only set missing RNG if needed. Resolves unit test, which already sets the RNG on the private key and the incoming context is not provided (use local).
2021-02-02 14:16:21 -08:00
David Garske
04e7fa3657
Fix for --enable-eccencrypt with timing resistance enabled. The ECC shared secret was missing the RNG. Fixes https://github.com/wolfSSL/wolfssl-examples/issues/243
2021-02-02 13:55:42 -08:00
Chris Conlon
7eb71b1bb1
Merge pull request #3344 from guidovranken/PKCS7_EncodeSigned-leak-fix
...
Check the right size before freeing flatSignedAttribs in PKCS7_EncodeSigned
2021-02-02 13:53:20 -07:00
Guido Vranken
f833d96ba3
Check the right size before freeing flatSignedAttribs in PKCS7_EncodeSigned
2021-02-02 10:15:00 -08:00
Chris Conlon
30c1c4a4f8
fix and update README.md markdown
2021-02-02 10:38:09 -07:00
Juliusz Sosinowicz
542e0d79ec
Jenkins Fixes
...
- explicit conversions
- not all curves available for wolfSSL_CTX_set1_groups_list
- group funcs depend on HAVE_ECC
- `InitSuites` after `ssl->suites` has been set
2021-02-02 12:06:11 +01:00
Juliusz Sosinowicz
8a669615f8
Generate correct GCM tag
2021-02-02 12:06:11 +01:00
Juliusz Sosinowicz
921fd34876
Detect version even if not compiled in
2021-02-02 12:06:11 +01:00
Juliusz Sosinowicz
69dca4fd08
Rebase fixes
...
- wolfSSL_CTX_set1_groups_list and wolfSSL_set1_groups_list should use wolfSSL_CTX_set1_groups and wolfSSL_set1_groups respectively because it converts to correct groups representation
- Change to using "SHA1" as main name for SHA1
2021-02-02 12:06:11 +01:00
Juliusz Sosinowicz
46821196ab
Fix call to wolfSSL_connect when in wolfSSL_connect_TLSv13
...
If a client is:
- TLS 1.3 capable
- calls connect with wolfSSL_connect_TLSv13
- on an WOLFSSL object that allows downgrading
then the call to wolfSSL_connect should happen before changing state to HELLO_AGAIN. Otherwise wolfSSL_connect will assume that messages up to ServerHelloDone have been read (when in reality only ServerHello had been read).
Enable keying material for OpenVPN
2021-02-02 12:06:11 +01:00
Juliusz Sosinowicz
ff43d39015
GCC complains about empty if
2021-02-02 12:06:11 +01:00
Juliusz Sosinowicz
f5cf24dbdc
SHA1 should not be called SHA. Leave alias for compatibility.
2021-02-02 12:06:11 +01:00
Juliusz Sosinowicz
5d5d2e1f02
Check that curves in set_groups functions are valid
2021-02-02 12:06:11 +01:00
Juliusz Sosinowicz
c18701ebe7
Implement RFC 5705: Keying Material Exporters for TLS
2021-02-02 12:06:11 +01:00
Juliusz Sosinowicz
fdde2337a4
Add static buffer to wolfSSL_ERR_error_string
...
Add ED448 and ED25519 to wolfssl_object_info
Add more error messages
2021-02-02 12:06:11 +01:00
Juliusz Sosinowicz
6ed45a23d9
Fix getting cipher suites in compat layer
2021-02-02 12:06:11 +01:00
Juliusz Sosinowicz
294e46e21a
Set options when creating SSL
2021-02-02 12:06:11 +01:00
Juliusz Sosinowicz
3494218d98
Implement missing functionality for OpenVPN 2.5
2021-02-02 12:06:11 +01:00
David Garske
5577a2215f
Merge pull request #3708 from JacobBarthelmeh/Testing
2021-02-01 10:11:16 -08:00
David Garske
ab5f9831ab
Merge pull request #3707 from douzzer/test-openssl-small-stack
...
wolfcrypt/test/test.c: smallstack refactor of openssl test routines.
2021-02-01 09:30:04 -08:00
Jacob Barthelmeh
a7066a9be2
add stdint to test.c if using non blocking ecc test
2021-02-01 23:07:03 +07:00
Jacob Barthelmeh
fd01f79f86
add guard for rsa public only
2021-01-31 23:43:53 +07:00
Daniel Pouzzner
d14f4f8451
wolfcrypt/test/test.c: smallstack refactor of openssl test routines.
2021-01-30 00:01:15 -06:00
David Garske
f5f19fda42
Merge pull request #3704 from douzzer/aesgcm-table-small-stack
...
--enable-aesgcm=table --enable-smallstack
2021-01-29 19:53:08 -08:00
Daniel Pouzzner
d0b20f90d5
wolfcrypt/test/test.c: use HEAP_HINT, not NULL, for XREALLOC() too.
2021-01-29 20:16:51 -06:00
Daniel Pouzzner
8c0100e60e
blake2b.c/blake2s.c: refactor so that smallstack code paths match performance of !smallstack path.
2021-01-29 17:19:42 -06:00
Daniel Pouzzner
a332cf36b5
add DYNAMIC_TYPE_AES and DYNAMIC_TYPE_CMAC to enum in types.h, and use these where appropriate;
...
in test.c: use use HEAP_HINT, not NULL in XMALLOC/XFREE calls;
fix a couple typos in aes_test() re WOLFSSL_ASYNC_CRYPT;
add various missing WOLFSSL_SMALL_STACK_STATIC qualifiers;
and streamline old smallstack refactor on-stack declarations declarations to use the much neater [1] construct.
2021-01-29 17:17:31 -06:00
David Garske
eae4124908
Merge pull request #3705 from lechner/repology-packaging-status
...
Show packaging status across Linux distributions in README.md
2021-01-29 14:48:26 -08:00
Felix Lechner
2033970369
Show packaging status across Linux distributions in README.md (from Repology)
...
Repology offers badges for wolfSSL's packaging status across all known
Linux distributions. [1] In Markdown documents, the HTML version with
a right-hand alignment uses up less space. It is added here.
The badge itself provides a hyperlink to more information [2]
including repositories in which wolfSSL is not yet represented.
[1] https://repology.org/project/wolfssl/badges
[2] https://repology.org/project/wolfssl/versions
2021-01-29 10:40:32 -08:00
Daniel Pouzzner
0f6ae330da
wolfcrypt: smallstack refactors of AES code for lkm compatibility with --enable-aesgcm=table.
2021-01-28 22:51:28 -06:00
Sean Parkinson
91299c5abd
Merge pull request #3701 from dgarske/pkcs7_devId
...
Fixes for PKCS7 with crypto callback (devId) with RSA and RNG
2021-01-29 10:56:41 +10:00
David Garske
4f6deb8ae9
Merge pull request #3594 from haydenroche5/zd10911
...
Fix issue with DoHandShakeMsgType/ShrinkInputBuffer when encryption i…
2021-01-28 16:55:04 -08:00
Hayden Roche
fc845da9f0
Fix issue with DoHandShakeMsgType/ShrinkInputBuffer when encryption is on (e.g.
...
during renegotiation).
This issue was brought to light by ZD 10911. When encryption is on (indicated
by the return value of IsEncryptionOn), DoHandShakeMsgType will finish up by
incrementing the input buffer index past the padding and MAC (if encrypt-then-
mac is enabled). In ProcessReply, if there are more messages to be read, the
index is decremented back before the padding and MAC. The issue arises when
ShrinkInputBuffer is called in between and copies data from the dynamic input
buffer to the static one. That function will get called with the index post-
increment, and thus the padding and MAC won't get copied into the static buffer,
which isn't what we want, since ProcessReply is going to decrement the index
since it thinks the padding and MAC are still there. This commit makes it so
the padding and MAC get included in the call to ShrinkInputBuffer when
encryption is on.
2021-01-28 15:37:00 -06:00
Guido Vranken
3da6b8364e
Prevent dangling pointer in TLSX_Cookie_Use
...
ZD 11603
2021-01-28 18:53:35 +01:00
David Garske
2bd63d27bf
Fixes for PKCS7 with crypto callback (deviceId), where it was not being used for RSA and RNG. ZD 11163.
2021-01-28 09:52:13 -08:00
David Garske
311a0d25dd
Merge pull request #3696 from JacobBarthelmeh/Testing
...
fix for tested x509 small build
2021-01-28 06:59:26 -08:00
Sean Parkinson
590597a0e2
SP ECC verify: check point for z=0 and set to infinity
2021-01-28 14:43:51 +10:00
Sean Parkinson
0ccb0d5fce
SP math: fix one word Montgomery Reduction for non-asm
...
Set the word size for x86.
2021-01-28 09:54:58 +10:00
Jacob Barthelmeh
bbcb98a8f7
fix for tested x509 small build
2021-01-27 23:00:24 +07:00
Sean Parkinson
7486cad291
Curve448 PPC64: 'char' is not always signed - use type 'sword8'
...
Ensure type 'sword8' is signed.
2021-01-27 18:16:25 +10:00
Sean Parkinson
c739b4d474
ECDSA sign: cleanup comments and variables
...
Remove mod at end as mulmod does this.
Change mp_add to mp_addmod_ct to keep the size of numbers to less than
order for mp_mulmod.
2021-01-27 09:39:11 +10:00
John Safranek
a1e083b5b1
Merge pull request #3689 from douzzer/fips-option-check-source
...
configure.ac: check compatibility of chosen FIPS option with source
2021-01-26 12:29:52 -08:00
John Safranek
d0e2566ad8
Merge pull request #3679 from julek-wolfssl/dtls-window
...
Correct old DTLS msg rcv update
2021-01-26 12:20:59 -08:00
Juliusz Sosinowicz
3d4f836c00
Correctly insert out of order msgs to queue
2021-01-26 15:12:08 +01:00
Juliusz Sosinowicz
4da9ade290
Use wolfSSL_X509_free to free ourCert
2021-01-26 11:32:05 +01:00
Daniel Pouzzner
a89087ed2d
configure.ac: check compatibility of chosen FIPS option with the source tree, for early prevention of accidental attempts to build FIPS with non-FIPS source, or non-FIPS with FIPS source.
2021-01-25 17:56:28 -06:00
toddouska
6e0e507dad
Merge pull request #3660 from dgarske/sess_ticket_aes_gcm
...
Added support for AES GCM session ticket encryption
2021-01-25 15:00:03 -08:00
toddouska
f91dcb950c
Merge pull request #3670 from dgarske/keil
...
Fix for ARM Keil MDK compiler issue with `DECLARE_VAR_INIT`.
2021-01-25 14:57:05 -08:00
toddouska
27ef5b9a3d
Merge pull request #3675 from SparkiDev/tls_no_ticket
...
TLS Session Ticket: Option to disable for TLS 1.2 and below
2021-01-25 14:54:10 -08:00
toddouska
f35f57c378
Merge pull request #3683 from SparkiDev/sp_int_mont_red_1
...
SP math all: fix 1 word Montgomery Reduce
2021-01-25 14:47:35 -08:00
toddouska
d201820e3a
Merge pull request #3687 from guidovranken/x963-export-reject-invalid-keys
...
Reject undefined keys (eg. state is ECC_STATE_NONE) from X963 export …
2021-01-25 14:46:59 -08:00
toddouska
cf9e4f0caf
Merge pull request #3518 from julek-wolfssl/openssh-fixes-v2
...
Fixes for openssh
2021-01-25 14:45:56 -08:00
Elms
234bf0c209
SSL: add const for *get_verify_mode to match openSSL
2021-01-25 10:37:50 -08:00
Elms
a2917ae29c
SSL: cleanup verify_mode coding style
2021-01-25 10:29:36 -08:00
David Garske
05e1ee1694
Cleanup to use fixed sizes from defines for DECLARE_VAR. Resolves issue with Visual Studio and using a variable (even const) to declare an array size.
2021-01-25 09:14:12 -08:00
Guido Vranken
29f7eebef7
Reject undefined keys (eg. state is ECC_STATE_NONE) from X963 export functions
...
Additionally, harmonize the failure conditions of wc_ecc_export_x963 and
wc_ecc_export_x963_compressed.
2021-01-25 16:22:21 +01:00
Eric Blankenhorn
f7408560c6
Fix Free/SafeRTOS with XMALLOC_USER
2021-01-25 09:10:15 -06:00
Sean Parkinson
4f0ed55232
SP math all: fix 1 word Montgomery Reduce
...
May have 3 words in partial result before shifting down.
2021-01-25 10:19:27 +10:00
David Garske
fb9836ed28
Merge pull request #3678 from guidovranken/zd11556
...
Fix wc_ecc_sign_hash memory leak. ZD 11556.
2021-01-22 18:06:56 -08:00
Tesfa Mael
d29518ecac
Remove duplicate macro
2021-01-22 13:02:30 -08:00
Elms
21ac86adb3
SSL: refactor SSL verify mode to be more compatible
...
This follows the bit flag pattern closer. Still doesn't support
`SSL_VERIFY_CLIENT_ONCE` and maybe other flags.
2021-01-22 12:17:07 -08:00
David Garske
13468d34e3
Apply same VS fixes to api.c as well.
2021-01-22 10:50:18 -08:00
David Garske
46aee19de3
Fix for Visual Studio issue with non-cost in array declaration.
2021-01-22 10:44:38 -08:00
toddouska
920c443864
Merge pull request #3250 from JacobBarthelmeh/Benchmark
...
add brainpool benchmark
2021-01-22 10:08:21 -08:00
David Garske
cd4dae8f09
Merge pull request #3674 from ejohnstown/alerts
...
Alerts
2021-01-22 09:16:56 -08:00
Juliusz Sosinowicz
b918fb9efe
Correct old DTLS msg rcv update
2021-01-22 14:33:33 +01:00
Jacob Barthelmeh
6fa1556daf
guard -ecc-all with HAVE_SELFTEST macro
2021-01-22 16:13:31 +07:00
Guido Vranken
905f0b1f5a
Fix wc_ecc_sign_hash memory leak. ZD 11556.
2021-01-22 09:55:30 +01:00
Sean Parkinson
a84f1c813a
TLS Session Ticket: Option to disable for TLS 1.2 and below
...
Customer may want session ticket supported with TLS 1.3 but not TLS 1.2
and below.
2021-01-22 13:19:29 +10:00
Sean Parkinson
9c34ecc130
ECDSA: don't modify the e mp_int (hash) value
...
Multiple loops of generating signatures require the same e value.
2021-01-22 12:51:21 +10:00
Sean Parkinson
fad1e67677
TLS 1.3: ensure key for signature in CertificateVerify
2021-01-22 11:54:53 +10:00
David Garske
9012317f5b
Fix copy/paste typo.
2021-01-21 17:41:11 -08:00
David Garske
1ee40ad7bd
Fix to always init the variable (not just when from heap). Cleanup of the DECLARE_ uses to make sure all allocations succeeded.
2021-01-21 17:12:29 -08:00
John Safranek
6f21995ec5
Alerts
...
Expand the guard around sending the PSK identity alert with a more limited option than enabling it with all the other alerts.
2021-01-21 16:42:54 -08:00
David Garske
4b47bf7b4e
Merge pull request #3090 from lechner/utf8
...
Convert a header file to UTF-8 encoding.
2021-01-21 16:32:27 -08:00
David Garske
2017de1b0f
Merge pull request #3617 from haydenroche5/cmake_user_settings
...
Add support for user settings to CMake.
2021-01-21 16:21:55 -08:00
David Garske
07f459b8d7
Merge pull request #3650 from kojo1/RsaSetRNG
...
add wc_RsaSetRNG to doc
2021-01-21 16:21:00 -08:00
David Garske
830b3cb676
Merge pull request #3653 from kojo1/fopen_binMode
...
binary mode, fopen
2021-01-21 16:20:07 -08:00
David Garske
aa64a8e835
Merge pull request #3672 from embhorn/zd11547
...
Fix FIPS compile errors
2021-01-21 16:08:53 -08:00
Elms
95d83c9856
SSL: refactor to allow session override or mode
2021-01-21 16:03:02 -08:00
toddouska
1acd6dfab2
Merge pull request #3635 from SparkiDev/hmac_openssl_fix
...
HMAC OpenSSL API: initialise HMAC ctx on new and allow key length of 0
2021-01-21 15:57:30 -08:00
toddouska
a8cfc23683
Merge pull request #3642 from SparkiDev/ecdsa_set_k_one_loop
...
ECDSA set k: WOLFSSL_ECDSA_SET_K_ONE_LOOP only tries k and fails when…
2021-01-21 15:56:36 -08:00
toddouska
5837d5e8de
Merge pull request #3649 from dgarske/stm_aesgcm_perf
...
STM32 AES GCM crypto hardware performance improvements
2021-01-21 15:55:58 -08:00
toddouska
85f08466f9
Merge pull request #3655 from SparkiDev/ext_cache_sess
...
SESSION: internal cache sessions can't be freed same as external
2021-01-21 15:54:16 -08:00
toddouska
e9e96dff6a
Merge pull request #3662 from embhorn/gh3659
...
Check method for NULL
2021-01-21 15:50:58 -08:00
toddouska
7b12dddf75
Merge pull request #3666 from SparkiDev/tls13_tick_before_group
...
TLS 1.3: don't group and wait on send session ticket
2021-01-21 15:49:52 -08:00
toddouska
22e6d52b7b
Merge pull request #3667 from SparkiDev/sp_fixes_4
...
SP int: fix _sp_mul_d inclusion checks
2021-01-21 15:49:03 -08:00
toddouska
b825e51d23
Merge pull request #3664 from SparkiDev/sp_math_all_ppc64
...
SP math all: Fixes for PPC64 compiler
2021-01-21 15:48:34 -08:00
toddouska
848ae3e514
Merge pull request #3668 from SparkiDev/jenkins_fixes_2
...
Compress: fix unused vars
2021-01-21 15:46:30 -08:00
toddouska
344ad2a3f8
Merge pull request #3625 from SparkiDev/disable_alg_fix
...
Disable algs: fix code to compile with various algs off/on
2021-01-21 15:45:29 -08:00
John Safranek
fe7be3e15f
Alerts
...
Alerts the server sends between receiving the client's CCS message and before it sends its own CCS message should not be encrypted.
2021-01-21 14:48:10 -08:00
Elms
7112a6dd78
SSL: add test and fix SSL_get_verify_mode
2021-01-21 14:20:27 -08:00
David Garske
fbe5fe1945
Merge pull request #3669 from embhorn/gh3657
...
Protect use of globalRNG
2021-01-21 14:09:59 -08:00
Elms
af3d842663
SSL: add support for SSL_get_verify_mode
2021-01-21 13:45:20 -08:00
John Safranek
3e4c3d13fe
Merge pull request #3671 from julek-wolfssl/dtls-scr-2
...
DTLS secure renegotiation fixes
2021-01-21 13:37:05 -08:00
Eric Blankenhorn
fd8527c15e
Fix FIPS compile errors
2021-01-21 15:27:42 -06:00
Jacob Barthelmeh
b418936f72
account for FIPS and g++ builds
2021-01-22 04:21:23 +07:00
Jacob Barthelmeh
177f4aecb6
add all curves to benchmark
2021-01-22 03:20:41 +07:00
Jacob Barthelmeh
e3fa462d72
add brainpool benchmark of key generation
2021-01-22 02:55:26 +07:00
JacobBarthelmeh
fe37137f12
add brainpool benchmark
2021-01-22 02:44:11 +07:00
Juliusz Sosinowicz
d8a01c6f8b
DTLS: client re-send on duplicate HelloRequest as well
2021-01-21 12:45:16 +01:00
Juliusz Sosinowicz
969de38764
Reset dtls_start_timeout on a timeout
2021-01-21 12:45:16 +01:00
Juliusz Sosinowicz
774fdc9fd6
Free HS data on rehandshake
...
When we call _Rehandshake before we receive application data and the receive application data during the renegotiation process then it is possible for the send queue to be preemptively deleted
2021-01-21 12:45:16 +01:00
David Garske
17f101ef13
Fix for ARM Keil MDK compiler issue with DECLARE_VAR_INIT.
2021-01-20 16:57:30 -08:00
Eric Blankenhorn
02114e7739
Protect use of globalRNG
2021-01-20 16:30:18 -06:00
Eric Blankenhorn
a3cbcf255f
Fix from review
2021-01-20 11:34:02 -06:00
David Garske
57b06f700d
Merge pull request #3656 from haydenroche5/windows_rsa_public_decrypt
...
Allow wolfSSL_RSA_public_decrypt on Windows.
2021-01-20 09:09:49 -08:00
Hayden Roche
12abb5191d
Allow wolfSSL_RSA_public_decrypt on Windows.
2021-01-20 06:57:59 -06:00
Sean Parkinson
55be60a63e
Compress: fix unused vars
...
configure: C_EXTRA_FLAGS="-fdebug-types-section -g1" --disable-memory
--enable-mcapi --enable-ecc --enable-sha512 --with-libz
2021-01-20 13:09:43 +10:00
Sean Parkinson
e3182ff06e
SP int: fix _sp_mul_d inclusion checks
...
configuration: --disable-asn --disable-filesystem --disable-shared --enable-cryptonly --enable-sp=smallrsa2048 --enable-sp-math --disable-dh --disable-ecc --disable-sha224 --enable-rsavfy --enable-rsapss
2021-01-20 12:38:10 +10:00
Sean Parkinson
7ec8d70eee
TLS 1.3: don't group and wait on send session ticket
...
The state machine goes on and frees the handshake resources which frees
the digest for the client Finished message.
2021-01-20 10:57:37 +10:00
David Garske
9044f709c1
Add support for STM32_AESGCM_PARTIAL build option to speedup platforms that allow AAD header sizes that are not a multiple of 4 bytes. ZD 11364.
2021-01-19 13:54:53 -08:00
David Garske
ea5af87de3
Revert of uint32_t and uint8_t changes in PR #3658 , which caused warnings.
2021-01-19 13:54:26 -08:00
David Garske
9ea5041d9d
Benchmark for GMAC (AES GCM GHASH).
2021-01-19 13:42:25 -08:00
John Safranek
eaa1bc1ace
Merge pull request #3595 from julek-wolfssl/dtls-only-resend-on-timeout
...
Only resend previous flight on a timeout from the network layer
2021-01-19 10:43:13 -08:00
David Garske
59305e9346
Fix for new include to pull in the AES GCM IV sizes in FIPS mode.
2021-01-19 07:53:36 -08:00
David Garske
8d1d616b39
Cleanup for the AES GCM IV and CCM IV sizes, which are missing with some FIPS builds.
2021-01-19 07:53:36 -08:00
David Garske
219cbd47eb
Added support for AES GCM session ticket encryption. If ChaCha/Poly is disabled it will use AES GCM. Thanks Sean for the code in ZD 11511.
2021-01-19 07:53:36 -08:00
Sean Parkinson
523119289b
SP math all: Fixes for PPC64 compiler
2021-01-19 21:30:36 +10:00
David Garske
209c4c08e1
Merge pull request #3663 from SparkiDev/sp_int_fixes_3
...
SP int: make sp_copy more available
2021-01-18 22:02:34 -08:00
Sean Parkinson
7d869a43b4
ECDSA set k: WOLFSSL_ECDSA_SET_K_ONE_LOOP only tries k and fails when it fails
2021-01-19 14:07:03 +10:00
Sean Parkinson
949af909bf
SP int: make sp_copy more available
2021-01-19 11:01:00 +10:00
Sean Parkinson
6a5e802cc4
Disable algs: fix code to compile with various algs off/on
...
benchmark.c: Only X25519/Ed25519/X448/Ed448 now compiles
asn.c/asn.h: Only DSA now compiles
2021-01-19 09:54:21 +10:00
toddouska
a13e9bde29
Merge pull request #3599 from julek-wolfssl/nginx-mem-leak
...
Fix memory leaks
2021-01-18 15:31:50 -08:00
toddouska
5b7e6ccc14
Merge pull request #3613 from SparkiDev/sp_rand_prime_len
...
SP rand_prime: fix length check
2021-01-18 15:23:15 -08:00
toddouska
279c3f4c1b
Merge pull request #3614 from SparkiDev/aes_test_fix
...
AES test: Remove unneeded loop
2021-01-18 15:22:06 -08:00
toddouska
78d2b3b440
Merge pull request #3616 from SparkiDev/sp_int_funcs
...
SP int: Hide func decls if only available with WOLFSSL_SP_MATH_ALL
2021-01-18 15:21:39 -08:00
toddouska
267b00e0a2
Merge pull request #3620 from haydenroche5/zd11434
...
Clamp the normalization value at the end of sp_mont_norm.
2021-01-18 15:21:03 -08:00
toddouska
85faf974aa
Merge pull request #3621 from SparkiDev/sp_mac_arm64
...
SP arm64 MAC: stop non-ct mod inv from using x29
2021-01-18 15:19:46 -08:00
toddouska
87a0ee5ef4
Merge pull request #3622 from SparkiDev/sp_int_fixes_2
...
SP math all: doco fix and don't assign 0 to o
2021-01-18 15:19:06 -08:00
toddouska
4b5d7d0595
Merge pull request #3624 from SparkiDev/tls13_set_groups
...
TLS 1.3 key share: add a key share from supported list
2021-01-18 15:18:14 -08:00
toddouska
8ae609d078
Merge pull request #3626 from SparkiDev/tls13_middlebox_fix
...
TLS send change cipher: Don't set keys when negotiating TLS 1.3
2021-01-18 15:14:58 -08:00
toddouska
1e9394d5a8
Merge pull request #3627 from elms/EVP/ofb_rc4_size
...
EVP: return proper cipher type and block size
2021-01-18 15:13:55 -08:00
Eric Blankenhorn
50843b22cd
Check method for NULL
2021-01-18 16:18:49 -06:00
toddouska
563e3c6b60
Merge pull request #3628 from SparkiDev/even_mp_test
...
RSA/DH test: even number error check fixup
2021-01-18 13:39:54 -08:00
toddouska
cd78a5dfb2
Merge pull request #3630 from SparkiDev/no_fs_all
...
X509 API no file system: hide wolfSSL_X509_NAME_print_ex_fp
2021-01-18 13:39:21 -08:00
toddouska
d514cc31b3
Merge pull request #3631 from SparkiDev/rsa_vfy_only_sp_fixes
...
RSA: verify only build fixes
2021-01-18 13:38:52 -08:00
toddouska
5a7e79cbfd
Merge pull request #3632 from SparkiDev/all_not_tls13_fix
...
Configuration: enable all, disable TLS 1.3 - turn off TLS 1.3 only op…
2021-01-18 13:37:34 -08:00
toddouska
3bae6e2dc2
Merge pull request #3633 from SparkiDev/ecc_gen_z_fix
...
ECC gen z: convert blinding value to Montgomery form before using
2021-01-18 13:36:13 -08:00
toddouska
fff3c77568
Merge pull request #3644 from dgarske/zd11476
...
Fix for sniffer with TLS v1.2 static ECDH ciphers
2021-01-18 13:32:57 -08:00
toddouska
b1c8825e74
Merge pull request #3647 from dgarske/zd11424
...
Fix for TLS v1.3 early data mac digest
2021-01-18 13:31:44 -08:00
toddouska
67d4f7c37b
Merge pull request #3658 from SparkiDev/curve25519_uint64_t
...
Curve25519: replace uint64_t with word64
2021-01-18 13:29:16 -08:00
Sean Parkinson
ac76ef8ee7
Curve25519: replace uint64_t with word64
...
Remove usages of stdint.h types
Added a sword type for signed words.
2021-01-18 17:30:36 +10:00
Sean Parkinson
eda1b52ee2
TLS 1.3 integrity only: initialize HMAC
...
Ensure the HMAC object is initialized when allocated.
2021-01-15 11:27:26 +10:00
Sean Parkinson
878f797a2b
SESSION: internal cache sessions can't be freed same as external
...
refMutex is initialized for external sessions but not internal.
Differentiate by ensuring the refCount is always 1 or more for external
and 0 for internal.
2021-01-15 11:02:34 +10:00
John Safranek
0ac43bb095
Merge pull request #3618 from haydenroche5/ocsp_self_signed_issue
...
Modify ParseCertRelative to ensure issuerKeyHash gets parsed and copi…
2021-01-14 14:22:06 -08:00
Takashi Kojo
d72f0a50f4
binary mode fopen to avoid auto expand to CR/LF on Widonws
2021-01-15 06:05:55 +09:00
Takashi Kojo
e21fddf553
add wc_RsaSetRNG to doc
2021-01-14 10:42:49 +09:00
Sean Parkinson
5a4dfc1a29
Don't set encrypt side if sending early data
...
Make check to see if early data has been or is going to be sent.
Last message encrypted with this key is EndOfEarlyData message.
2021-01-14 09:44:09 +10:00
David Garske
22ce25afba
Merge pull request #3648 from douzzer/disable-ecc-enable-dsa
...
--disable-ecc --enable-dsa
2021-01-13 14:00:20 -08:00
Daniel Pouzzner
1e49bc2e82
asn.c/asn.h: fix --disable-ecc --enable-dsa.
2021-01-13 13:55:06 -06:00
David Garske
d7aa8e1795
Fix for issue where mac digest changes between early data and server_hello, which can leave section of response uninitialized. ZD11424
2021-01-13 11:10:12 -08:00
Sean Parkinson
382deb1f86
Merge pull request #3645 from douzzer/sp_copy_pedantic_error_handling
...
sp_copy() pedantic error handling
2021-01-13 10:05:35 +10:00
Daniel Pouzzner
f8013580df
sp_int.c: fix 4 instances of "Value stored to 'o' is never read" found by LLVM9 scan-build.
2021-01-12 15:01:28 -06:00
Daniel Pouzzner
fb82114866
sp_int.c: pay attention to the return value from sp_copy(), for general hygiene and to eliminate an inlining-related warning in sp_todecimal().
2021-01-12 14:58:29 -06:00
David Garske
aaec9832e4
Fix for sniffer with TLS v1.2 static ECDH ciphers. The sniffer will now correctly try using the key for ECC if the RSA key decode fails. ZD 11476.
2021-01-12 09:49:32 -08:00
Sean Parkinson
129f3fd13f
HMAC OpenSSL API: initialise HMAC ctx on new and allow key length of 0
2021-01-12 09:16:24 +10:00
Elms
8fec1de07c
EVP: address CTR block size
2021-01-11 12:03:01 -08:00
Elms
3b07f5d8e3
EVP: expand tests for EVP_CIPHER_block_size
2021-01-11 12:03:01 -08:00
Elms
a6535528f3
EVP: add tests for openssl block size (including RC4)
2021-01-11 12:03:01 -08:00
Elms
0cccf58fec
EVP: return proper cipher type for AES OFB
2021-01-11 12:03:01 -08:00
David Garske
88faef9bd9
Merge pull request #3641 from JacobBarthelmeh/Testing
...
add ca-cert-chain.der to renewcerts.sh, update ed25519 certs and gen …
2021-01-11 11:00:55 -08:00
Jacob Barthelmeh
e2b411805d
add ca-cert-chain.der to renewcerts.sh, update ed25519 certs and gen script
2021-01-12 00:40:15 +07:00
Hayden Roche
a3cc4110b0
Clamp the normalization value at the end of sp_mont_norm.
2021-01-11 09:59:11 -06:00
Hayden Roche
798d9ed0d5
Various CMake changes.
...
- Add support for user settings to CMake.
- Update version number.
- Add an option to enable/disable generation of config.h and the HAVE_CONFIG_H
define.
2021-01-08 12:15:58 -06:00
Juliusz Sosinowicz
a745947498
Code review changes
2021-01-08 15:27:30 +01:00
Juliusz Sosinowicz
23a4d64caf
wolfSSL_EVP_PKEY_set1_EC_KEY should generate PKCS8 internal DER buffer
...
This PKCS8 buffer should include both the private and the public parts of the key.
2021-01-08 15:27:30 +01:00
Juliusz Sosinowicz
cd4affddac
Set ecc_key.rng when using ECC_TIMING_RESISTANT
...
Set ecc_key.rng to either a local rng struct or the globalRNG object when using ECC_TIMING_RESISTANT
Add helpful logs to some ecc functions
2021-01-08 15:18:00 +01:00
Juliusz Sosinowicz
0fe3efb8b4
Add option to only resend previous DTLS flight on a network read timeout
2021-01-07 19:13:35 +01:00
Chris Conlon
c57fee136a
Merge pull request #3568 from miyazakh/espidf_unittest
...
fix wolfssl unit test on ESP-IDF
2021-01-07 09:18:18 -07:00
Sean Parkinson
f955c92008
ECC gen z: convert blinding value to Montgomery form before using
2021-01-07 11:30:58 +10:00
David Garske
209ad82df2
Merge pull request #3629 from ejohnstown/aarch64
...
M1 Support
2021-01-06 14:12:45 -08:00
David Garske
931dc5b29f
Merge pull request #3619 from tmael/fuzz_math
...
Fix for OSS-Fuzz issue #29103 : out-of-bounds read in TLSX_CSR_Parse()
2021-01-06 14:10:28 -08:00
John Safranek
d4e13796c2
M1 Support
...
We separate out 64-bit desktop support based on the Intel check. With
the advent of the new Apple chip, ARM can also be a desktop processor.
Detect it like we do the Intel 64-bit, and treat it similarly with
respect to fast and normal math.
2021-01-06 09:21:07 -08:00
Sean Parkinson
fa86c1aa91
Configuration: enable all, disable TLS 1.3 - turn off TLS 1.3 only options
...
configuration: --enable-all --disable-tls13
Post-handshake authentication and HRR cookie are enable with
'--enable-all' but disabling TLS 1.3 caused configure to fail.
Don't enable these TLS 1.3 only options when TLS 1.3 is disabled.
Also fix up tests that don't work without TLS 1.3 enabled.
2021-01-06 14:19:57 +10:00
Sean Parkinson
cd0670cbd7
RSA: verify only build fixes
...
configuration: --disable-ecc --disable-dh --disable-aes --disable-aesgcm
--disable-sha512 --disable-sha384 --disable-sha --disable-poly1305
--disable-chacha --disable-md5 --disable-sha3 --enable-cryptonly
--disable-inline --enable-rsavfy --disable-asn --disable-oaep
--disable-rng --disable-filesystem --enable-sp=rsa2048 --enable-sp-math
Fixes to make code build again.
2021-01-06 11:58:15 +10:00
Sean Parkinson
5accd57c21
X509 API no file system: hide wolfSSL_X509_NAME_print_ex_fp
...
configuration: --enable-all --disable-filesystem
wolfSSL_X509_NAME_print_ex_fp has XFILE as a parameter and cannot be
compiled with --disable-filesystem
2021-01-06 11:05:58 +10:00
Sean Parkinson
10722fba14
RSA/DH test: even number error check fixup
...
Configuration: --enable-sp=3072
Test only enabled when SP is used.
Return codes checked are those we expect from SP.
Code, with configuration, is compiled so that 2048-bit operations are
not going to SP and the error returns were not correct.
2021-01-06 09:39:24 +10:00
Hideki Miyazaki
b8997d0b47
revert test_wolfssl.c changes
...
add test.c as src target
2021-01-05 16:20:42 +09:00
Hideki Miyazaki
99d4a7417a
fix wolfssl unit test on ESP-IDF
2021-01-05 16:08:05 +09:00
Sean Parkinson
a6b69b6864
TLS send change cipher: Don't set keys when negotiating TLS 1.3
2021-01-05 14:32:48 +10:00
Sean Parkinson
f196c60c66
TLS 1.3 key share: add a key share from supported list
2021-01-05 13:08:48 +10:00
Sean Parkinson
1b94309a6c
SP math all: doco fix and don't assign 0 to o
...
o is not used after that point so no need to zero it.
2021-01-05 10:40:34 +10:00
Sean Parkinson
2a2b194d71
SP arm64 MAC: non-ct mod inv not use so many registers
2021-01-05 10:23:14 +10:00
Tesfa Mael
46e260dd61
Correct unsigned arithmetic
2021-01-04 15:48:27 -08:00
Chris Conlon
54f072fd8d
Merge pull request #3607 from douzzer/WOLFSSL_TEST_SUBROUTINE
...
test.c: add WOLFSSL_TEST_SUBROUTINE macro to make subtests optionally static
2021-01-04 10:10:56 -07:00
Hayden Roche
96ece3ac7d
Modify ParseCertRelative to ensure issuerKeyHash gets parsed and copied into the
...
decoded cert for self-signed CA certs.
The bit of code that does this copy was previously inside a conditional that's
only entered if the certificate is not self-signed. The primary purpose of this
conditional is to set the maxPathLen field. It's possible that the copying of
the issuerKeyHash was mistakenly included in the "else" block here, when it
should be outside.
2021-01-04 10:34:09 -06:00
Sean Parkinson
b5403fe6b9
SP int: Hide func decls if only available with WOLFSSL_SP_MATH_ALL
2021-01-04 16:39:51 +10:00
Sean Parkinson
413bde9146
Merge pull request #3608 from tmael/sp_squre
...
Fix SP integer square
2021-01-04 16:29:40 +10:00
Sean Parkinson
faf7d307b4
Merge pull request #3606 from dgarske/zd11438
...
Fix for possible ECC sign memory leak with custom "k"
2021-01-04 15:39:53 +10:00
Tesfa Mael
01c27068c1
Correct SP x->used with sp_clamp()
2021-01-03 20:08:06 -08:00
Sean Parkinson
68c2e36ad5
AES test: Remove unneeded loop
2021-01-04 12:43:34 +10:00
Sean Parkinson
40ab08be45
SP rand_prime: fix length check
...
-ve length indicates to use a BBS prime (last two bits set)
2021-01-04 12:31:59 +10:00
John Safranek
ef56bc09f1
Merge pull request #3596 from julek-wolfssl/dtls-multiple-hellorequest
...
Calling wolfSSL_Rehandshake during renegotiation should not be an error
2020-12-31 13:53:32 -08:00
David Garske
fbb3e9fca3
Merge pull request #3605 from tmael/cm_free
...
Free mutex and fix tls13.test script
2020-12-31 08:40:35 -08:00
David Garske
c9ac64d77d
Merge pull request #3609 from douzzer/lkm_kvmalloc
...
use kvmalloc()/kvfree() for heap allocations in the linuxkm build
2020-12-31 08:37:53 -08:00
Daniel Pouzzner
9dc8721032
linuxkm: on kernels >= 4.12, use kvmalloc()/kvfree() and a partial implementation of realloc() leveraging them, rather than kmalloc()/kfree()/krealloc(). this makes large allocations possible and relatively safe. note that the realloc() implementation fails gracefully when the supplied pointer is larger than the page size, but otherwise works normally.
2020-12-31 00:30:35 -06:00
Daniel Pouzzner
a2dec7ce9c
test.c: work around toolchain/ecosystem bug on aarch64 linux 4.14.0-xilinx-v2018.3.
2020-12-30 20:03:13 -06:00
Tesfa Mael
9598c03716
Free mutex and fix test script
2020-12-30 17:40:15 -08:00
Daniel Pouzzner
3d88676ff1
test.c: add WOLFSSL_TEST_SUBROUTINE macro to qualify all previously global subtest handlers, defaulting to the empty string. this restores the version<=4.5 test.c namespace allowing end users to call the tests directly piecemeal. --enable-linuxkm[-defaults] sets -DWOLFSSL_TEST_SUBROUTINE=static for extra namespace hygiene.
2020-12-30 16:12:08 -06:00
David Garske
060ebd1ca2
Fix for possible ECC sign memory leak when using WOLFSSL_ECDSA_SET_K and wc_ecc_sign_set_k, where the k is not valid. ZD 11438.
2020-12-30 09:54:54 -08:00
David Garske
7fb2c0f63f
Merge pull request #3603 from haydenroche5/zd11434
...
Ensure that all leading zeros are skipped in sp_tohex.
2020-12-30 08:28:52 -08:00
David Garske
1b6a988dc0
Merge pull request #3601 from tmael/mp_rand_p
...
Add parameter check in sp_rand_prime()
2020-12-30 08:20:18 -08:00
Hayden Roche
81f70fba5f
Ensure that all leading zeros are skipped in sp_tohex.
2020-12-30 08:32:01 -06:00
Tesfa Mael
d366ca74af
Review comments and cast
2020-12-29 19:48:45 -08:00
John Safranek
c482d16029
Merge pull request #3544 from haydenroche5/ocsp_stapling_bug
...
Fix bug where OCSP stapling wasn't happening even when requested by client
2020-12-29 14:23:10 -08:00
Chris Conlon
da007ecd7b
Merge pull request #3409 from kojo1/mqx
...
add IDE/MQX
2020-12-29 13:53:37 -07:00
David Garske
c6abb59343
Merge pull request #3593 from tmael/sp_cast
...
casting fix for clang-12
2020-12-29 09:51:37 -08:00
tmael
837e9856f5
Merge pull request #3590 from dgarske/stcube_rel
...
Fixes for STM Cube Pack rename
2020-12-29 09:37:39 -08:00
David Garske
dc21d56545
Merge pull request #3600 from douzzer/low-resources-fixes
...
--enable-lowresource --enable-sp-math-all
2020-12-29 08:01:51 -08:00
Daniel Pouzzner
2bd0d4c467
wolfcrypt/src/evp.c: fix wolfSSL_EVP_CipherUpdate_GCM() to not fail when inl is zero, to properly handle realloc implementations that return NULL for zero-size allocations.
2020-12-28 23:49:48 -06:00
Daniel Pouzzner
fbcfc6adbf
test.c: rehab fail codes in ecc_test_curve_size().
2020-12-28 21:56:39 -06:00
Daniel Pouzzner
b0ca598d59
sp_int.h and ecc.h: add one more to SP_INT_DIGITS and FP_SIZE_ECC, to accommodate extra digit used by sp_mul(), sp_mulmod(), sp_sqr(), and sp_sqrmod().
2020-12-28 18:06:18 -06:00
Tesfa Mael
cedec3ae28
Add parameter check
2020-12-28 15:53:56 -08:00
Daniel Pouzzner
764b3cf09d
examples/client/client.c: add missing !defined(NO_SESSION_CACHE) gate around wolfSSL_get_session() for "print out session" code.
2020-12-28 17:49:58 -06:00
Juliusz Sosinowicz
8c07aafc43
Fix memory leaks
...
- Freeing the session object depends on the callback return
- The session object is malloc'ed when ssl->options.internalCacheOff
- wolfSSL_CTX_use_certificate needs to own the cert when KEEP_OUR_CERT because either it is up ref'ed or copied
2020-12-28 22:33:01 +01:00
Juliusz Sosinowicz
54479359f3
Calling wolfSSL_Rehandshake during renegotiation should not be an error
...
If we call wolfSSL_Rehandshake during a renegotiation then it should not result in a SECURE_RENEGOTIATION_E. wolfSSL_Rehandshake might be called when multiple HelloRequest messages are processed or the user could call this API during renegotiation. Either way wolfSSL should not treat this as an error if renegotiation is enabled.
2020-12-24 12:10:04 +01:00
David Garske
8b517975d1
Fixes from peer review.
2020-12-23 16:54:29 -08:00
elms
4280861af0
Merge pull request #3591 from dgarske/wolftpm
...
Added helper configure option '--enable-wolftpm`
2020-12-23 12:22:44 -08:00
Tesfa Mael
5c4011b3b4
cast to int
2020-12-23 12:09:35 -08:00
David Garske
b2155e6e26
Merge pull request #3592 from douzzer/verbose-heap-instrumentation
...
--enable-trackmemory=verbose
2020-12-23 11:40:45 -08:00
Daniel Pouzzner
d5dd35c739
add --enable-trackmemory=verbose, and add WOLFSSL_TEST_MAX_RELATIVE_HEAP_{BYTES,ALLOCS} and -m/-a (runtime counterparts) to wolfcrypt_test(). also add -h to wolfcrypt_test() to print available options.
2020-12-23 12:03:06 -06:00
David Garske
daa6833f37
Added helper configure option '--enable-wolftpm` to enable options used by wolfTPM. This enables (cert gen/req/ext, pkcs7, cryptocb and aes-cfb).
2020-12-23 08:09:24 -08:00
David Garske
e0f36baebe
Fixes for STM Cube Pack rename.
2020-12-23 07:02:12 -08:00
Daniel Pouzzner
542ad0a81b
linuxkm/module_hooks.c: separate cleanup into static libwolfssl_cleanup(), and call it from wolfssl_init() if wolfcrypt_test() fails.
2020-12-22 21:57:17 -06:00
David Garske
9c87f979a7
Merge pull request #3586 from tmael/cc310_tests
...
Fix Cryptocell and revert test.c use of static const
2020-12-22 16:58:25 -08:00
Daniel Pouzzner
f06361ddf6
add WOLFSSL_SMALL_STACK_STATIC macro, and use it to conditionally declare const byte vectors in test.c static for stack depth control -- currently only enabled for linuxkm, but should be compatible with any target with a TLB (virtual memory).
2020-12-22 17:12:57 -06:00
David Garske
90b14e260d
Merge pull request #3588 from JacobBarthelmeh/Release
...
fix regression of --enable-wpas=small build
2020-12-22 14:32:33 -08:00
Tesfa Mael
56071ac21f
Fix for Cryptocell tests
2020-12-22 16:23:16 -06:00
Jacob Barthelmeh
81980aa7b6
fix regression of --enable-wpas=small build
2020-12-23 01:30:34 +07:00
Chris Conlon
85d0a71747
Merge pull request #3587 from JacobBarthelmeh/Release
...
add blog link to README and adjust for nginx build
2020-12-22 08:50:21 -07:00
Jacob Barthelmeh
8ecc2f1771
add blog link to README and adjust for nginx build
2020-12-22 20:14:38 +07:00
toddouska
5eddcb24dd
Merge pull request #3584 from JacobBarthelmeh/Release
...
prepare for release 4.6.0
2020-12-21 14:20:14 -08:00
toddouska
8b48353c18
Merge pull request #3585 from dgarske/async_rel
...
Fixes in preparation for release
2020-12-21 14:15:45 -08:00
David Garske
53e79f1053
Fix for mp_radix_size with radix 2 and mp_int equal to zero. Fix applies to normal and fast math only. ZD11419.
2020-12-21 12:41:32 -08:00
Jacob Barthelmeh
47c186df34
prepare for release 4.6.0
2020-12-22 02:33:58 +07:00
David Garske
b4111e2f65
Fix for possible leaks with wc_ecc_sign_set_k when building with WOLFSSL_CUSTOM_CURVES enabled. ZD11416.
2020-12-21 11:27:14 -08:00
Chris Conlon
476a3e5d4f
fix wc_curve25519_generic() ifdef on NXP LTC builds
2020-12-21 23:57:39 +07:00
David Garske
1c0a6b92ad
Fix RSA hash warning for operations with no hash specified.
2020-12-21 08:37:15 -08:00
David Garske
28420b6e4d
Fix for building with --with-intelqa and custom curves disabled.
2020-12-21 08:36:48 -08:00
David Garske
e6c71a1465
Merge branch 'master' into mqx
2020-12-21 07:28:26 -08:00
Jacob Barthelmeh
8c16bd2450
fix for infer memory leak report and for clang unused warning
2020-12-21 17:24:35 +07:00
Jacob Barthelmeh
5bd9c1b60d
fix for haproxy build
2020-12-21 17:24:35 +07:00
Jacob Barthelmeh
4de1c1b037
add cert gen to lighty build for function wolfSSL_PEM_write_bio_X509
2020-12-21 17:24:35 +07:00
Jacob Barthelmeh
4ef5956757
fix for declaring variable with Windows build
2020-12-21 17:24:35 +07:00
Jacob Barthelmeh
f30d4c1b0b
fix for nightly g++ build test
2020-12-21 17:24:35 +07:00
JacobBarthelmeh
9c64630c56
Merge pull request #3582 from douzzer/scan-build-fix-20201218
...
fix deadstore in ssl.c warned by LLVM11 scan-build.
2020-12-21 17:23:13 +07:00
Daniel Pouzzner
4d1d891a34
src/ssl.c: fix deadstore in wolfSSL_PEM_X509_X509_CRL_X509_PKEY_read_bio() warned by LLVM11 scan-build.
2020-12-18 17:30:25 -06:00
toddouska
0df41d865f
Merge pull request #3580 from douzzer/fix-mp-read-bin-bit-accounting
...
fix mp_read_unsigned_bin() calculation of mp_int.used_bits
2020-12-18 14:41:16 -08:00
toddouska
fcf060b19b
Merge pull request #3581 from cconlon/releasefixes_selftest
...
Release fixes for CAVP selftest builds
2020-12-18 14:15:53 -08:00
toddouska
ea3c385021
Merge pull request #3579 from SparkiDev/sp_math_all_4096
...
SP math all: enable 4096-bit support by default for x64
2020-12-18 14:14:36 -08:00
toddouska
7e5f838f48
Merge pull request #3577 from dgarske/releasefixes_async
...
Release fixes for asynchronous crypto
2020-12-18 14:10:01 -08:00
toddouska
fe92d29eb5
Merge pull request #3574 from cconlon/releasefixes
...
Release fixes for Jenkins tests, example client
2020-12-18 14:06:27 -08:00
toddouska
cdc0753bfb
Merge pull request #3571 from JacobBarthelmeh/Testing
...
Some initial testing and clean up
2020-12-18 14:05:26 -08:00
toddouska
814ed3f5a6
Merge pull request #3439 from julek-wolfssl/libest
...
Compatibility layer additions for cisco/libest
2020-12-18 14:03:34 -08:00
toddouska
bdd4799400
Merge pull request #3578 from SparkiDev/x509_len
...
ASN X509: Don't allow any more data after signature
2020-12-18 09:54:39 -08:00
Chris Conlon
a222be1fa3
rename dup to dupl, fix variable shadow warning on i386 selftest compiler
2020-12-18 10:53:55 -07:00
Chris Conlon
ae984508cc
fix CAVP selftest v2 build, issue with pkcs7.h
2020-12-18 10:26:19 -07:00
Juliusz Sosinowicz
6226edb394
Use CSR with smaller key size 4096 -> 2048
2020-12-18 12:48:25 +01:00
Daniel Pouzzner
b0ec2bf058
wolfcrypt/src/integer.c: fix mp_read_unsigned_bin() accounting on mp_int.used_bits to avoid spurious .used > .alloc condition at loop exit.
2020-12-18 02:05:18 -06:00
Sean Parkinson
7f5a85ae85
Reduce stack usage
2020-12-18 13:15:50 +10:00
Sean Parkinson
e452b74470
SP math all: enable 4096-bit support by default for x64
2020-12-18 10:20:33 +10:00
David Garske
e49409b13a
Fix api.c tests using "free()" instead of "XFREE" causing issues with custom allocators.
2020-12-17 16:08:46 -08:00
Sean Parkinson
a4f8a21b9b
ASN X509: Don't allow any more data after signature
2020-12-18 10:02:38 +10:00
David Garske
ce0a2f3bc9
Fixes for Cavium Nitrox and Intel QuickAssist.
2020-12-17 15:53:28 -08:00
David Garske
73a5ee5ffb
Fix for async post handshake auth. The re-handshake was not resetting the processReply state.
2020-12-17 15:10:11 -08:00
Chris Conlon
420a040774
fix WOLFSSL_ASYNC_CRYPT usage in test.c, test_wolfSSL_OBJ_ln() in api.c
2020-12-17 11:08:36 -07:00
Jacob Barthelmeh
97bc5e870c
fix for default OCSP cmp value and fix for WOLFSSL_NO_CLIENT_AUTH build
2020-12-18 00:36:00 +07:00
Chris Conlon
e8785666c4
fix NXP LTC build with wc_curve25519_generic(), only supports single basepoint
2020-12-17 09:50:18 -07:00
toddouska
b11b08bb10
Merge pull request #3543 from WKJay/master
...
Port for RT-Thread
2020-12-17 08:36:09 -08:00
Juliusz Sosinowicz
f2694134b0
Fix after rebase
2020-12-17 17:28:29 +01:00
Chris Conlon
71c6654687
Merge pull request #3573 from douzzer/scripts-nix-unportable-timeout-wrapper
...
scripts/: nix `timeout` wrappers in ocsp-stapling[2].test
2020-12-17 09:13:43 -07:00
Juliusz Sosinowicz
c03744db61
Refactor wc_CheckPrivateKey
...
- Change wc_CheckPrivateKey to wc_CheckPrivateKeyCert and wc_CheckPrivateKey
- wolfSSL_X509_check_private_key no longer needs to decode cert to check key
- Fix scope in api.c
2020-12-17 14:27:46 +01:00
Juliusz Sosinowicz
dc266bc524
Call X509_REQ_get_extensions and X509_get_ext_by_NID on a CSR object
2020-12-17 14:27:46 +01:00
Juliusz Sosinowicz
383df620bf
Add CSR test with Extension Request attribute
2020-12-17 14:27:46 +01:00
Juliusz Sosinowicz
24b89928dc
Code review names changes and refactoring
2020-12-17 14:27:46 +01:00
Juliusz Sosinowicz
3231cfe9e0
Refactor extension stack generation
2020-12-17 14:27:46 +01:00
Juliusz Sosinowicz
8b9f8029a8
Sanity check protocol version.
2020-12-17 14:27:46 +01:00
Juliusz Sosinowicz
22ae66dfe1
wolfSSL_BIO_do_connect should look for a socket bio in the chain
2020-12-17 14:27:46 +01:00
Juliusz Sosinowicz
2dd28ec5b3
Check if downgrading is allowed in SetSSL_CTX
...
Pkcs7 cert limit based on build
2020-12-17 14:27:46 +01:00
Juliusz Sosinowicz
77c730361e
Jenkins fixes
2020-12-17 14:27:46 +01:00
Juliusz Sosinowicz
25f5427bdd
Rebase and test fixes
2020-12-17 14:27:46 +01:00
Juliusz Sosinowicz
b528a1a344
Plug memory leaks
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
7df8f2e2bb
Internal unit tests
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
f5c463148f
check null
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
031ce68546
Differentiate between server and client sessions
...
This is important is the client and server share memory space. If a server and client both save the same session in SessionCache it may cause inconsistencies. The hash of the sessionID will be the same causing one of the sides to overwrite the other. A possible problem is that the peer certificate will be incorrect for one of the sides.
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
8edeaae3e2
Add DSA support to x509 certs
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
031ca80fe7
Fix max SSL version handling for client
...
Enable CRL when adding one to store
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
2197748a51
Implement wolfSSL_X509_check_private_key
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
cb84213ffd
Support more extensions
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
cd20512b90
wolfSSL_X509_REQ_add1_attr_by_txt for libest
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
911d5968b4
Store more certs in PKCS7 struct
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
acf3156fac
Dynamically allocate memory in wolfSSL_i2d_PKCS7_bio
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
c405c3477f
Protect against invalid write in RsaPad_PSS
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
2a9bb906a9
Implement wolfSSL_BIO_*_connect and wolfSSL_BIO_set_conn_port
...
Forgot to commit csr.dsa.pem for api.c
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
78a20ec3ae
Extension manipulation
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
65c6a71bde
Init wolfSSL_X509_REQ_add_extensions
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
6a635b339c
Fixes
...
- Fix challengePw copy in ReqCertFromX509
- Proper header length in wolfSSL_PEM_X509_X509_CRL_X509_PKEY_read_bio
- Special case for extended key usage in wolfSSL_OBJ_cmp
- Numerical input in wolfSSL_OBJ_txt2obj can just be encoded with EncodePolicyOID. Searching for the sum can return wrong values since they are not unique.
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
b808124a47
Add DSA support to ConfirmSignature and add DSAwithSHA256
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
2a20896e44
Add CRL loading to wolfSSL_PEM_X509_INFO_read_bio
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
86d2177876
wolfSSL_X509_resign_cert updates x509 der buffer as well
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
932ef25e79
Set default digest NID
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
2689d499b9
Tests starting to pass
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
ff7b8d3715
Don't attempt TLS 1.3 if server options disable it
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
2e2beb279d
WIP
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
8e62bf2588
Pass libest estclient_simple example
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
aaba7ed286
OpenSSL Compat layer
...
Implement/stub:
- wolfSSL_X509V3_EXT_add_nconf
- wolfSSL_EVP_PKEY_copy_parameters
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
ff2574b3cb
OpenSSL Compat layer
...
Implment/stub:
- wolfSSL_X509_NAME_delete_entry
- wolfSSL_X509_get_ext_by_OBJ
- wolfSSL_a2i_ASN1_INTEGER
- X509V3_parse_list
- wolfSSL_TXT_DB_write
- wolfSSL_TXT_DB_insert
- wolfSSL_EVP_PKEY_get_default_digest_nid
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
753a3babc8
OpenSSL Compat layer
...
Implement/stub:
- wolfSSL_NCONF_get_number
- wolfSSL_EVP_PKEY_CTX_ctrl_str
- wolfSSL_PKCS12_verify_mac
- wc_PKCS12_verify_ex
- wolfSSL_BIO_new_fd
- wolfSSL_X509_sign_ctx
- wolfSSL_ASN1_STRING_cmp
- wolfSSL_ASN1_TIME_set_string
- X509V3_EXT_add_nconf
- X509V3_set_nconf
Implement TXT_DB functionality:
- wolfSSL_TXT_DB_read
- wolfSSL_TXT_DB_free
- wolfSSL_TXT_DB_create_index
- wolfSSL_TXT_DB_get_by_index
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
e7f1d39456
OpenSSL Compat layer
...
Implement WOLFSSL_CONF_VALUE:
- wolfSSL_CONF_VALUE_new
- wolfSSL_CONF_VALUE_new_values
- wolfSSL_CONF_add_string
- wolfSSL_X509V3_conf_free
- wolfSSL_sk_CONF_VALUE_push
- wolfSSL_NCONF_load
- wolfSSL_NCONF_free
- wolfSSL_CONF_new_section
- wolfSSL_CONF_get_section
Implment some buffer functions
- wolfSSL_strlcat
- wolfSSL_strlcpy
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
42d4f35a98
Implement OpenSSL Compat API:
...
- Implement lhash as a stack with hash members
- wolfSSL_lh_retrieve
- wolfSSL_LH_strhash
- IMPLEMENT_LHASH_COMP_FN
- IMPLEMENT_LHASH_HASH_FN
- wolfSSL_sk_CONF_VALUE_new
- wolfSSL_sk_CONF_VALUE_free
- wolfSSL_sk_CONF_VALUE_num
- wolfSSL_sk_CONF_VALUE_value
- wolfSSL_NCONF_new
- wolfSSL_NCONF_get_string
- wolfSSL_NCONF_get_section
- wolfSSL_lh_WOLFSSL_CONF_VALUE_retrieve
- wolfSSL_CONF_modules_load
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
be98404b3b
Implement wolfSSL_X509_REQ_verify
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
4aa30d0bde
Add CSR parsing capabilities to ParseCertRelative and wc_GetPubX509
...
- wolfSSL_BIO_get_mem_data now returns the last memory BIO in the chain
- Change wolfSSL_BIO_pending calls to wolfSSL_BIO_get_len calls to get accurate length depending on BIO
- Refactor X509 and X509_REQ functions to reuse similar code
- X509 and X509_REQ i2d functions now generate their DER outputs instead of returning the input DER
- Signature generated by wolfSSL_X509_resign_cert is now saved in the x509->sig buffer and added when calling *i2d
- Add test_wolfSSL_d2i_X509_REQ
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
1a50d8e028
WIP
...
- wolfSSL_BIO_ctrl_pending ignore BASE64 bio's as well now
- Save the last Finished messages sent or received in the WOLFSSL struct
- Implement wolfSSL_CTX_set_max_proto_version
- wolfSSL_d2i_X509_bio now uses wolfSSL_BIO_read so that the entire chain is properly read from the BIO
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
a7ec58003e
PKCS7 changes
...
- Allow PKCS7_EncodeSigned to be called with a zero content length
- wc_HashUpdate now doesn't error out on zero length data
- First cert in wolfSSL_PKCS7_encode_certs is treated as main cert and the PKCS7 struct is initialized with it
- wolfSSL_BIO_get_mem_data returns the buffer from the last bio in chain
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
85b1196b08
Implement/stub:
...
- X509_REQ_print_fp
- X509_print_fp
- DHparams_dup
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
728f4ce892
Implement/stub:
...
- wc_DhKeyCopy
- SSL_CTX_set_srp_strength
- SSL_get_srp_username
- X509_REQ_get_attr_by_NID
- X509_REQ_get_attr
- X509_ATTRIBUTE
- wolfSSL_DH_dup
Add srp.h file with SRP_MINIMAL_N
2020-12-17 14:26:49 +01:00
Juliusz Sosinowicz
b52e11d3d4
Implement/stub the following:
...
- X509_get0_extensions
- X509_to_X509_REQ
- i2d_X509_REQ_bio
- X509v3_get_ext_count
- i2d_PKCS7_bio
Additional changes:
- Added a wc_PKCS7_VerifySignedData call to wolfSSL_d2i_PKCS7_bio to populate the PKCS7 struct with parsed values
- wc_PKCS7_VerifySignedData_ex -> wc_PKCS7_VerifySignedData
2020-12-17 14:26:30 +01:00
Juliusz Sosinowicz
3721d80e84
Implement wolfSSL_PKCS7_to_stack and wolfSSL_d2i_ASN1_OBJECT
...
- I also implemented wolfSSL_c2i_ASN1_OBJECT which was previously a stub.
- More configure.ac flags added to libest option
2020-12-17 14:26:30 +01:00
Juliusz Sosinowicz
1e26238f49
Implement/stub the following functions:
...
- X509_REQ_sign_ctx
- X509_REQ_get_subject_name
- X509_REQ_set_version
- X509_NAME_print_ex_fp
- X509_STORE_CTX_get0_parent_ctx
- wolfSSL_PKCS7_encode_certs
Add cms.h file to avoid including the OpenSSL version.
2020-12-17 14:26:30 +01:00
Juliusz Sosinowicz
777bdb28bc
Implement/stub the following:
...
- `NID_pkcs9_challengePassword` - added
- `wolfSSL_OPENSSL_cleanse` - implemented
- `wolfSSL_X509_REQ_add1_attr_by_NID` - stubbed
- `wolfSSL_c2i_ASN1_OBJECT` - stubbed
2020-12-17 14:26:30 +01:00
Juliusz Sosinowicz
7bd0b2eb44
Implement ASN1_get_object
2020-12-17 14:26:30 +01:00
Juliusz Sosinowicz
a9d502ef85
Add --enable-libest option to configure.ac
...
Refactoring and adding defines for functions
2020-12-17 14:26:30 +01:00
WKJay
641a2a8cb0
update RTTHREAD/readme.md
2020-12-17 08:44:45 +08:00
WKJay
498e3eb6fe
Add include.am
2020-12-17 08:42:53 +08:00
Chris Conlon
6d9cf6b31e
fix for wc_AesFeedbackCFB8() on big endian platforms
2020-12-16 16:38:38 -07:00
toddouska
b4fddf3f24
Merge pull request #3572 from dgarske/zd11381
...
Fix for `wc_SetAltNamesBuffer`
2020-12-16 15:33:12 -08:00
Daniel Pouzzner
eeefe043ec
scripts/: nix timeout wrappers in ocsp-stapling.test and ocsp-stapling2.test, for portability.
2020-12-16 17:31:53 -06:00
Chris Conlon
7e1a066963
Merge pull request #3555 from kojo1/doc-PSS_Sign-Verify
...
Doc wc_RsaPSS_Sign/Verify/CheckPadding
2020-12-16 15:18:24 -07:00
David Garske
51c3f87811
Fix for wc_SetAltNamesBuffer broken in PR #2728 . The SetAltNames was changed in PR 2728 to rebuild the SAN OID, so only the flattened list of DNS entries is required. Fix is in SetAltNamesFromDcert to use already has a parsed DecodedCert and flatten the alt names DNS_Entry list. ZD 11381
2020-12-16 12:28:28 -08:00
Chris Conlon
502e471cde
fix spelling of Nitrox in configure option summary
2020-12-16 13:08:32 -07:00
Chris Conlon
f375cff685
enable AES-CTR for libsignal build
2020-12-16 12:44:01 -07:00
Chris Conlon
16ce8e077a
only call wolfSSL_UseKeyShare() in example client with TLS 1.3
2020-12-16 12:06:35 -07:00
Jacob Barthelmeh
9a968bdf53
disable XChaCha with armasm
2020-12-17 01:58:36 +07:00
Jacob Barthelmeh
a948066f86
some infer fixes
2020-12-17 01:49:48 +07:00
JacobBarthelmeh
f6c3eae1de
g++ build fix
2020-12-16 15:05:33 -05:00
toddouska
5f30727b32
Merge pull request #3531 from vppillai/patch-1
...
support TNGTLS certificate loading for Harmony3
2020-12-16 09:21:28 -08:00
toddouska
7f20b97927
Merge pull request #3569 from SparkiDev/cppcheck_fixes_5
...
cppcheck: fixes
2020-12-16 09:04:59 -08:00
toddouska
cee91c91f5
Merge pull request #3532 from julek-wolfssl/nginx-1.7.7
...
Changes for Nginx 1.7.7
2020-12-16 09:01:27 -08:00
toddouska
b0464c93e2
Merge pull request #3542 from SparkiDev/sp_mod_odd
...
SP: ensure modulus/prime is odd before performing RSA/DH/ModExp ops
2020-12-16 08:51:10 -08:00
Vysakh P Pillai
3063264f00
formatting updates
2020-12-16 18:05:58 +05:30
Vysakh P Pillai
63f8fbe92f
update formatting
2020-12-16 17:59:36 +05:30
Sean Parkinson
6dc06993bf
SP: ensure modulus/prime is odd before performing RSA/DH/ModExp ops
2020-12-16 21:49:09 +10:00
Sean Parkinson
75c062a298
cppcheck: fixes
2020-12-16 17:28:20 +10:00
Takashi Kojo
010c8db54e
duplicated \ingroup, missing closing comment
2020-12-16 08:52:12 +09:00
Sean Parkinson
922ca916a9
Merge pull request #3554 from ejohnstown/psk-fix
...
PSK Alert
2020-12-16 09:40:04 +10:00
toddouska
bab2f55661
Merge pull request #3563 from SparkiDev/base64_cr
...
Base64: Cache attack resistant decode
2020-12-15 15:16:09 -08:00
Hayden Roche
c47b98bca1
Allow OCSP stapling and NO_WOLFSSL_CLIENT to coexist.
2020-12-15 16:56:21 -06:00
Hayden Roche
eb6473b00f
Fix bugs that made it so client side wasn't verifying certificate status.
2020-12-15 16:56:21 -06:00
Hayden Roche
801aa18b9e
Fix bug where OCSP stapling wasn't happening even when requested by client.
...
The OCSP request that we created didn't have a URL for the OCSP responder, so
the server couldn't reach out to the responder for its cert status.
2020-12-15 16:56:21 -06:00
Daniel Pouzzner
7f44247954
Merge pull request #3567 from SparkiDev/sp_math_fix
...
SP math all: fixes for different compilers and configs
2020-12-15 15:37:25 -06:00
Juliusz Sosinowicz
575f4ba140
Nginx 1.7.7 changes
...
- Push error when decryption fails
- If wolfSSL_CTX_use_certificate keeps passed in cert then it should either copy it or increase its reference counter
- Make wolfSSL_PEM_read_bio_DHparams available with FIPS
2020-12-15 19:32:55 +01:00
JacobBarthelmeh
e0b0c329b3
build fix for --enable-afalg
2020-12-15 10:50:57 -07:00
Jacob Barthelmeh
c048ce5f99
build fix for --enable-ip-alt-name
2020-12-15 23:56:04 +07:00
toddouska
38a11368e0
Merge pull request #3557 from JacobBarthelmeh/Cert-Report2
...
Strict alt names check with DIR name constraint
2020-12-15 08:51:55 -08:00
toddouska
f362c6ecf5
Merge pull request #3562 from SparkiDev/session_mutex
...
SESSION mutex: copying a session overwrote mutex
2020-12-15 08:50:57 -08:00
Vysakh P Pillai
aa2e02807d
Avoid conversions to PEM and register DER certificate chain
2020-12-15 16:15:36 +05:30
Sean Parkinson
356b419532
SP math all: fixes for different compilers and configs
2020-12-15 17:37:59 +10:00
Sean Parkinson
972d6cfefc
Base64: Cache attack resistant decode
2020-12-15 17:22:02 +10:00
Sean Parkinson
52f63ca44b
SESSION mutex: copying a session overwrote mutex
...
New session creation function, NewSession, that doesn't initialize
mutex.
Calling functions, wolfSSL_SESSION_new() and wolfSSL_SESSION_copy(),
initialize the mutex.
2020-12-15 17:20:40 +10:00
Sean Parkinson
65d0cc62fd
Merge pull request #3566 from douzzer/STACK_SIZE_CHECKPOINT_WITH_MAX_CHECK-decl-order
...
C89 decl order in STACK_SIZE_CHECKPOINT_WITH_MAX_CHECK()
2020-12-15 17:01:22 +10:00
WKJay
4f15cfde16
Add rt-thread porting files
2020-12-15 14:49:49 +08:00
Daniel Pouzzner
87e5b55033
don't special case get_digit_count for SP, i.e. eliminate sp_get_digit_count(), to fix -Waddress in sp_get_digit_count macro use in api.c:test_get_digit_count() (sp_get_digit_count() was a non-inline function before commit 91d23d3f5a (sp-math-all)).
2020-12-14 20:14:39 -06:00
John Safranek
123c713658
Key Change
...
Move the setting of the key in the handshake from right before
sending the finished message to between building change cipher spec
and sending it. This way there won't be any opportunity to send a
message after the change cipher spec that won't be encrypted.
2020-12-14 18:13:26 -08:00
John Safranek
f8e674e45d
PSK Alert
...
When the server cannot match the client's identity, the server sends a unknown_psk_identity alert to the client.
2020-12-14 17:56:19 -08:00
toddouska
7fe24daf6c
Merge pull request #3561 from dgarske/st_cube_rel
...
ST Cube Pack Fixes
2020-12-14 16:20:18 -08:00
toddouska
3f6a444bef
Merge pull request #3564 from SparkiDev/tls13_add_sess
...
TLS 1.3: Don't add a session without a ticket
2020-12-14 16:09:52 -08:00
toddouska
43182b9389
Merge pull request #3548 from gstrauss/HAVE_SNI
...
put all SNI code behind simpler preprocessor directive HAVE_SNI
2020-12-14 16:08:53 -08:00
Daniel Pouzzner
70808647ef
move decl of _ret to top in STACK_SIZE_CHECKPOINT_WITH_MAX_CHECK(), for C89 happiness.
2020-12-14 17:50:28 -06:00
toddouska
bd871280d7
Merge pull request #3497 from elms/erf32/se_acceleration
...
ERF32: HW acceleration
2020-12-14 15:43:15 -08:00
toddouska
56e2c0e268
Merge pull request #3534 from douzzer/linuxkm-cryptonly
...
--enable-linuxkm --enable-cryptonly
2020-12-14 15:14:54 -08:00
David Garske
428c6b4301
Merge pull request #3523 from SparkiDev/pkcs11_fixes_2
...
Pkcs11 fixes 2
2020-12-14 14:09:26 -08:00
David Garske
032b289835
Merge pull request #3559 from tmael/cc310_ecc_k
...
Fix Cryptocell ecc build err
2020-12-14 10:50:30 -08:00
Sean Parkinson
fb5b415e83
TLS 1.3: Don't add a session without a ticket
...
TLS 1.3 doesn't support resumption with PSK (session ticket or with the
PSK callback).
2020-12-14 14:03:31 +10:00
David Garske
337e95e52b
Fix for AES GCM with hardware crypto and missing wc_AesSetKeyLocal. Broken in PR #3388 .
2020-12-13 13:59:30 -08:00
David Garske
757c07801a
Updates to v4.5.1.
2020-12-13 13:59:30 -08:00
Takashi Kojo
203b7739c9
fix paths, add download site in README
2020-12-13 19:42:20 +09:00
Takashi Kojo
d3aacf4934
add IDE/MQX
2020-12-13 17:41:14 +09:00
Takashi Kojo
6154f29a31
Merge https://github.com/wolfssl/wolfssl
2020-12-13 17:27:53 +09:00
Tesfa Mael
4ee5ae0115
Fix Cryptocell ecc build err
2020-12-11 15:12:42 -08:00
Takashi Kojo
b2a66a10f4
add XXX_ex APIs, corret spelling, descriptions
2020-12-12 07:29:24 +09:00
John Safranek
0e9926bd83
Merge pull request #3553 from haydenroche5/cert_status_fix
...
Fix OCSP cert status check in internal.c
2020-12-11 13:27:29 -08:00
Daniel Pouzzner
2804cb2521
wolfcrypt/test/test.c: more smallstack refactoring in aes_test().
2020-12-11 14:17:25 -06:00
Daniel Pouzzner
0b42f3ae72
wolfcrypt/src/dsa.c: disable MSVC warning C4127 (compiler bug) as in wolfcrypt/src/tfm.c and src/internal.c.
2020-12-11 14:16:44 -06:00
Daniel Pouzzner
f2e1595eef
wolfcrypt/src/dsa.c: use do{}while(0) with break, rather than goto, for top level flow control in wc_DsaSign() and wc_DsaVerify() smallstack refactor.
2020-12-11 14:16:44 -06:00
Daniel Pouzzner
53c6d33695
test.c:aes_test(): add WOLFSSL_SMALL_STACK codepaths for WOLFSSL_AESNI test.
2020-12-11 14:16:44 -06:00
Daniel Pouzzner
1c0df61247
wolfssl/test.h and wolfcrypt/test/test.c: add STACK_SIZE_CHECKPOINT_WITH_MAX_CHECK(), recognize macro WOLFSSL_TEST_MAX_RELATIVE_STACK_BYTES, and add to wolfcrypt_test() runtime settability of relative cumulative stack depth assert threshold using "-s stacksize".
2020-12-11 14:16:44 -06:00
Daniel Pouzzner
2ed75402b8
wc_DsaSign(): removal several redundant mp_clear()s preceded by mp_forcezero()s.
2020-12-11 14:16:44 -06:00
Daniel Pouzzner
bfff28ab28
ecc.c: fix mp_init_multi() vs mp_clear() dynamics in wc_ecc_verify_hash_ex() and mp_sqrtmod_prime().
2020-12-11 14:16:44 -06:00
Daniel Pouzzner
ec96e5ad74
wolfSSL_BN_is_odd(): fix function signature to match header (unsigned long reverted to WOLFSSL_BN_ULONG).
2020-12-11 14:16:44 -06:00
Daniel Pouzzner
525382fb13
test.c:pkcs7authenveloped_run_vectors(): small stack refactor, and reenable for WOLFSSL_LINUXKM.
2020-12-11 14:16:44 -06:00
Daniel Pouzzner
18984abc9e
configure.ac: replace --enable-stacksize-verbose with --enable-stacksize=verbose, and change _LINUXKM_DEFAULTS ENABLED_SP_DEFAULT and ENABLED_SP_MATH_ALL_DEFAULT from small to yes.
2020-12-11 14:16:44 -06:00
Daniel Pouzzner
4efa85dc03
linuxkm/module_hooks.c: add support for WOLFCRYPT_ONLY.
2020-12-11 14:16:44 -06:00
Daniel Pouzzner
f73fc23282
ecc.c: add smallstack codepaths to ecc_mul2add().
2020-12-11 14:16:44 -06:00
David Garske
cb8c6608f3
Merge pull request #3558 from douzzer/fix-mp_mod_2d-sub-byte-clearing
...
fix mp_mod_2d() for DIGIT_BIT != sizeof(mp_digit)*8
2020-12-11 08:43:51 -08:00
Elms
40087f1fd0
SiLabs: AES return code fixup and comment cleanup
2020-12-10 22:56:11 -08:00
Sean Parkinson
8b2bd1277a
Merge pull request #3551 from douzzer/fix-unit-test-EVP-arc4-32-bit
...
32 bit targets vs test_wolfSSL_EVP_X_STATE_LEN()
2020-12-11 16:46:10 +10:00
Sean Parkinson
3e8e7aa17f
Merge pull request #3550 from douzzer/sp-math-all-sp-word-typo
...
sp_int.c: fix typos in _sp_mul_4() and _sp_sqr_4().
2020-12-11 16:16:48 +10:00
Daniel Pouzzner
ef1284165f
wolfcrypt/src/integer.c: fix sub-byte clearing step of mp_mod_2d() to work when DIGIT_BIT != sizeof(mp_digit)*8.
2020-12-10 23:50:30 -06:00
Jacob Barthelmeh
04e22b0747
add restriction to excluded DIR name constraint
2020-12-11 10:00:11 +07:00
Jacob Barthelmeh
f00263889b
add test case
2020-12-11 08:20:48 +07:00
Sean Parkinson
a075540343
Merge pull request #3552 from tmael/shiftNeg
...
Check shift value
2020-12-11 10:19:27 +10:00
Tesfa Mael
9042843e42
Fix shift and clear digits
2020-12-10 16:13:30 -08:00
toddouska
2c652151ac
Merge pull request #3510 from SparkiDev/sp_modinv_nct
...
SP modinv: add non-constant time modinv
2020-12-10 16:06:12 -08:00
toddouska
cb61dc7d2f
Merge pull request #3522 from douzzer/cleanups-20201119
...
misc cleanups re sp-math-all, FIPS, smallstack
2020-12-10 15:58:33 -08:00
Takashi Kojo
47f7e46ffe
Add wc_RsaPSS_Sign/Verify/CheckPadding
2020-12-11 07:58:39 +09:00
Jacob Barthelmeh
17f32c3e05
add strict check on name constraints with DIR alt names
2020-12-11 05:22:46 +07:00
Daniel Pouzzner
e9a79b2e0d
configure.ac: fix rebase error, re enable-sp-asm on ARM.
2020-12-10 14:46:22 -06:00
Glenn Strauss
59cefd2c99
match preproc defs around wolfSSL_ctrl()
...
match preproc defs around wolfSSL_ctrl() in src/ssl.c
2020-12-10 15:46:20 -05:00
Glenn Strauss
9d095066eb
wrap SNI-related code with HAVE_SNI
...
perhaps some of this code should additionally be wrapped in
- #ifndef NO_WOLFSSL_SERVER
It is fragile and ugly to litter the code with the likes of
- #if defined(OPENSSL_ALL) || (defined(OPENSSL_EXTRA) && (defined(HAVE_STUNNEL) || \
- defined(WOLFSSL_NGINX) || defined(HAVE_LIGHTY) || \
- defined(WOLFSSL_HAPROXY) || defined(WOLFSSL_OPENSSH) ))
while it is much clearer and much more maintainable to wrap SNI-related
code with an SNI-specific feature-define HAVE_SNI (and possibly further
restrict with feature-define #ifndef NO_WOLFSSL_SERVER).
2020-12-10 15:46:20 -05:00
Daniel Pouzzner
f4af6c053c
wolfssl/openssl/aes.h: restore ALIGN16 attribute to pad member of struct WOLFSSL_AES_KEY.
2020-12-10 14:21:19 -06:00
Daniel Pouzzner
0fa4bde5b5
configure.ac: move --enable-sp-asm handling to follow --enable-sp-math-all handling, so that $ENABLED_SP requirement is properly met.
2020-12-10 14:21:08 -06:00
Daniel Pouzzner
f277339528
add explicit casts to XMALLOC()s, even for (void *), to avoid warnings in C++ and MSVC/MSVS builds, and to avoid false positives on simple text searches.
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
f47cdfcaed
wolfcrypt/test/test.c: fix skipped initialization warned by LLVM11 scan-build.
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
3b8e7d546a
sp_int.h: force C linkage, so that enable-sp-math-all is compatible with CC=g++.
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
741098c108
sp_int.c, srp.c: fixes for 5 deadcode.DeadStores found by LLVM11 scan-build.
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
f49e9bf954
dsa.c, srp.c, wolfcrypt/test/test.c: smallstack refactors: wc_DsaExportKeyRaw(), wc_DsaSign(), wc_SrpSetKey(), ecc_test_cdh_vectors(), ecc_test_custom_curves().
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
1fc2c7714c
hmac.c: include wc_port.h rather than settings.h, to pick up WOLFSSL_LINUXKM namespace tweaks.
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
f4ecaf05c0
openssl/aes.h: refactor WOLFSSL_AES_KEY typedef to inline sizeof(Aes) long words, rather than computing the size of Aes from its members.
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
b723c7ddbe
bn.h and ssl.c: define WOLFSSL_BN_ULONG to be target-native unsigned long, revert *_word() bn.h API functions to use WOLFSSL_BN_ULONG, and change wolfSSL_BN_get_word() to return WOLFSSL_BN_ULONG rather than unsigned long, for consistency.
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
27a6de2c2f
configure.ac, wolfssl/wolfcrypt/settings.h, wolfssl/wolfcrypt/wc_port.h: update linuxkm defaults and settings for compatibility with sp-math-all, and change linuxkm default math from sp-math to sp-math-all; refactor enable-all and enable-all-crypto logic to allow piecemeal exclusion of options from the command line.
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
78b2b3ca3b
ssl.c:wolfSSL_BN_get_word_1(): remove dead logic inadvertently retained.
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
f7bf0a78fb
test.c:ecc_test_curve_size(): use a macro, not a static const size_t, for size of exportBuf, to make MS Visual Studio happy.
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
89e6b1eebc
wc_ecc_mulmod_ex(): be more careful freeing temp key.
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
e6b587772f
fix pointer type clash in wolfSSL_BN_mod_word(); restore accidentally removed WOLFSSL_KEY_GEN gate in dsa_test().
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
cbc190f13c
wolfcrypt/src/ecc.c: smallstack refactors of wc_ecc_mulmod_ex() and mp_sqrtmod_prime().
2020-12-10 14:16:21 -06:00
Daniel Pouzzner
ad2cb67047
wolfcrypt/test/test.c: _SMALL_STACK refactors of dsa_test(), srp_test(), openssl_pkey1_test(), and ecc_test_curve_size(); add missing FIPS gates.
2020-12-10 14:16:20 -06:00
Daniel Pouzzner
5286cb1a46
optimize domain check in wolfcrypt/src/integer.c and wolfcrypt/src/tfm.c.
2020-12-10 14:16:20 -06:00
Daniel Pouzzner
53cfa55941
src/ssl.c and wolfssl/openssl/bn.h: refactor _word mp routines to consistently accept/return target-native unsigned long type, for compatibility with sp-math-all. needed because WOLFSSL_BN_ULONG can, surprisingly, be only 16 bits, when sp-math-all in a 32 bit build.
2020-12-10 14:16:20 -06:00
Daniel Pouzzner
7cfe1e2143
sha3.h: rename struct Sha3 to struct wc_Sha3 for consistency, and compatibility with FIPS source.
2020-12-10 14:16:20 -06:00
Daniel Pouzzner
cfc08cc13f
configure.ac: remove smallstackcache from linuxkm default options; add several feature exclusions to enable-all and enable-all-crypto to make them compatible with fips=ready; render the FIPS option in the feature summary at end.
2020-12-10 14:16:20 -06:00
Daniel Pouzzner
2a2ba896ec
documentation typo: wc_InitSha356() sounds like an interesting algorithm but, alas, we will have to settle for wc_InitSha256().
2020-12-10 14:16:20 -06:00
Daniel Pouzzner
c5e2ccabb1
fix --enable-stacksize-verbose: relocate declarations for HAVE_STACK_SIZE_VERBOSE global variables from wolfssl/test.h to wolfssl/wolfcrypt/logging.h, matching their location in wolfcrypt/src/logging.c.
2020-12-10 14:16:20 -06:00
toddouska
b93109cf1c
Merge pull request #3540 from SparkiDev/int_toradix_fix
...
MP integer: fix map string for toradix and read_radix
2020-12-10 12:01:45 -08:00
toddouska
cd3b91a8fe
Merge pull request #3536 from SparkiDev/arm64_rev
...
ByteReverseWord32 AARCH64: Use proper instruction - REV32
2020-12-10 11:59:00 -08:00
Elms
9ba78eb825
SiLabs: Clarify comments and fix sig buffer size
2020-12-10 10:45:55 -08:00
Hayden Roche
a6378de4f0
Fix OCSP cert status check in internal.c
...
I missed one line in internal.c when I recently modified the OCSP ASN code.
2020-12-10 10:32:30 -06:00
Tesfa Mael
4bd49d2b28
Update with a proper check
2020-12-09 17:05:56 -08:00
Elms
93fc37f87b
SiLabs: add cleanup and address PR comments
2020-12-09 16:28:39 -08:00
Sean Parkinson
2862a9ce56
SP modinv: add non-constant time modinv
...
Can only be used in ECC verify - sign operation must be constant time.
Not used for small code.
2020-12-10 09:24:22 +10:00
Tesfa Mael
44903ff8ae
Check shift value
2020-12-09 15:04:28 -08:00
John Safranek
ad1118326b
Merge pull request #3546 from dgarske/gh_no_rng
...
Fix for `WC_NO_RNG` with GreenHills
2020-12-09 14:30:44 -08:00
Chris Conlon
21625ab0c2
Merge pull request #3533 from JacobBarthelmeh/PKCS7
...
fix for PKCS7 decompress
2020-12-09 14:00:42 -07:00
Elms
586a75302b
SiLabs: extra check on importing key to se_key buffer
2020-12-09 12:54:24 -08:00
Daniel Pouzzner
181f439028
api.c: in test_wolfSSL_EVP_X_STATE_LEN(), fix assert on size of EVP state to work on 32 bit targets.
2020-12-09 14:04:16 -06:00
Daniel Pouzzner
2de261c2de
sp_int.c: fix typos in _sp_mul_4() and _sp_sqr_4().
2020-12-09 12:10:46 -06:00
toddouska
f31b41fcca
Merge pull request #3495 from haydenroche5/httpd
...
Add OpenSSL compatibility functions for latest version of Apache httpd
2020-12-09 09:55:13 -08:00
toddouska
b7aa0ebf57
Merge pull request #3458 from julek-wolfssl/EVP_Cipher-api
...
EVP_Cipher should return length written.
2020-12-09 09:52:44 -08:00
toddouska
367f28b917
Merge pull request #3443 from SparkiDev/tls13_psk_no_dhe
...
TLS 1.3: PSK only
2020-12-09 09:45:34 -08:00
toddouska
7834dee991
Merge pull request #3503 from SparkiDev/dtls_mtu_write
...
DTLS MTU: check MTU on write
2020-12-09 09:42:44 -08:00
toddouska
6c62899ea8
Merge pull request #3535 from SparkiDev/sp_fixes_4
...
SP: change implicit casting downs to be explicit
2020-12-09 09:25:57 -08:00
toddouska
0b78137dfa
Merge pull request #3537 from SparkiDev/sp_int_configs
...
SP math all: fixes for configurations that don't specify size
2020-12-09 09:16:46 -08:00
toddouska
cbf8e754e0
Merge pull request #3541 from SparkiDev/rsavfy_sp
...
SP: Get RSA verify only to build with DH
2020-12-09 09:15:45 -08:00
toddouska
b726ec52d2
Merge pull request #3547 from haydenroche5/benchmarking_tput
...
Fix RX/TX throughput reporting in example server.
2020-12-09 09:15:00 -08:00
David Garske
ec6163c0f6
Merge pull request #3549 from ejohnstown/sniffer-fix
...
Sniffer Test Filename Fix
2020-12-09 08:18:51 -08:00
John Safranek
3e8bad7ae9
Sniffer Test Filename Fix
...
1. When using multiple filenames, keep the original entered string
around so it may be reused for each IP address.
2. Strip the trailing newline from the entered filename list.
2020-12-08 17:16:34 -08:00
Sean Parkinson
d34b0072a2
ARM: identify ARM CPU for Thumb and Cortex
...
Better detailed check of CPU architecture for 32-bit byte reversal asm
2020-12-09 08:54:18 +10:00
Hayden Roche
5fdc4cf6e1
Fix RX/TX throughput reporting in example server.
...
- I observed that client TX throughput < client RX throughput, but server TX
throughput > server RX throughput. Turns out this is just a typo in the
printing of the stats. The RX stat was being printed as the TX stat and vice-
versa.
- I added a note to scripts/benchmark.test about a 2 second sleep we do waiting
for the server to come up. If you were to time this script with the time
command, you'll see that 2 seconds in the result, which might be confusing
if you didn't realize the sleep was there.
2020-12-08 16:49:09 -06:00
Elms
ef4db5b808
SiLabs: simplify init
2020-12-08 13:16:13 -08:00
Elms
620fe2da14
SiLabs: Fix tests and wc_ecc_import_private_key
2020-12-08 12:22:35 -08:00
David Garske
9ced741ef3
Fix for WC_NO_RNG with GreenHills.
2020-12-08 12:16:41 -08:00
Jacob Barthelmeh
bc50b7b836
fix order of arguments with PKCS7 decompression
2020-12-08 23:11:59 +07:00
Jacob Barthelmeh
081cea7405
set optional limit on max decompression buffer size
2020-12-08 20:16:27 +07:00
Elms
919c2a2dfb
SiLabs: address PR comments to cleanup
2020-12-07 16:16:11 -08:00
Elms
3abc4719ae
SiLabs: cleanup TODOs
2020-12-07 15:32:44 -08:00
Elms
44243278a5
SiLabs: renable ecc_ssh_test and disable AES non-12Byte IV
2020-12-07 15:04:00 -08:00
WKJay
227faedcc7
Port for RT-Thread
2020-12-07 16:22:28 +08:00
Sean Parkinson
9b894048fd
PKCS #11 : only open/close session when performing op, use C_Sign for RSA
...
Was opening and closing sessions when operations not compiled in were
being attempted (e.g. hashing during certificate signing).
C_Sign can be used with X509 RSA (raw) as it does the same operations as
C_Decrypt. Use the function matching hig level operation where
supported.
Make debugging functions take a CK_ULONG rather than an int - to avoid
casting.
2020-12-07 10:15:43 +10:00
Sean Parkinson
dbe4ce0e24
SP: Get RSA verify only to build with DH
...
Fix configuration: --enable-rsavfy --enable-sp --enable-cryptonly
[--enable-sp-asm]
2020-12-07 09:46:14 +10:00
Sean Parkinson
9bbef90546
MP integer: fix map string for toradix and read_radix
2020-12-07 09:12:53 +10:00
Glenn Strauss
034248b964
add more missing HAVE_LIGHTY
2020-12-05 15:52:17 -05:00
Sean Parkinson
281ba96bd0
SP math all: fixes for configurations that don't specify size
2020-12-04 16:47:11 +10:00
Sean Parkinson
d475463c91
Merge pull request #3528 from JacobBarthelmeh/Testing
...
fix build with ARM64 SP, FP_ECC and WC_NO_CACHE_RESISTANT
2020-12-04 12:17:24 +10:00
Sean Parkinson
a72393eb33
ByteReverseWord32 AARCH64: Use proper instruction - REV32
2020-12-04 12:05:33 +10:00
Sean Parkinson
56cb4c8ea7
SP: change implicit casting downs to be explicit
2020-12-04 11:52:39 +10:00
Hayden Roche
03c7e52f5f
Add OpenSSL compatibility functions for Apache httpd's OCSP module.
2020-12-03 11:22:43 -06:00
Hayden Roche
bca43654df
Make changes to OCSP ASN code.
...
- Use OcspEntry in OcspResponse instead of CertStatus. OcspEntry is more
analogous to an OCSP SingleResponse, which contains issuer name and key
hashes. Correspondingly, remove these hashes from OcspResponse, since they'll
now be stored per SingleResponse in an OcspEntry.
- Add a hashAlgoOID to OcspEntry (corresponds to hashAlgorithm in CertId in RFC
6960). This makes OcspEntry more closely resemble an OCSP SingleResponse.
- Change WOLFSSL_OCSP_CERTID to map to OcspEntry. OcspEntry contains all the
information that an OCSP CertID contains, and is a better fit than
OcspRequest.
- Add a pointer to the raw CertId in an OCSP SingleResponse to OcspEntry, along
with a size field to indicate how many bytes the CertId occupies. This will
be used in an OpenSSL compatibility function, i2d_OCSP_CERTID, which yields
the raw bytes of the CertId.
2020-12-03 11:22:43 -06:00
Vysakh P Pillai
c31f20706b
use const variable as the size for an array
2020-12-03 22:25:28 +05:30
Jacob Barthelmeh
fbf56bcf96
fix for PKCS7 decompress
2020-12-03 18:57:25 +07:00
Vysakh P Pillai
376cac5ab1
Implement review comments
2020-12-03 08:25:40 +05:30
toddouska
69d642206d
Merge pull request #3513 from SparkiDev/ecc_vfy_r_s_check
...
ECC verify: validate r and s before any use
2020-12-02 14:33:38 -08:00
toddouska
9f5141a333
Merge pull request #3524 from SparkiDev/ocsp_resp_free
...
OCSP callback: call embed free in test callback
2020-12-02 13:48:09 -08:00
toddouska
b4c7b5e6ce
Merge pull request #3525 from SparkiDev/tls13_session
...
TLS 1.3: always add session when sending finished message
2020-12-02 13:47:38 -08:00
toddouska
36b73b738b
Merge pull request #3526 from SparkiDev/aes_prefetch
...
AES: When not X86_64, PreFetch*() not used
2020-12-02 13:28:58 -08:00
toddouska
d75a983766
Merge pull request #3527 from SparkiDev/ecc_safe
...
ECC add and dbl point: always use safe add and dbl
2020-12-02 13:28:10 -08:00
toddouska
0be45e731b
Merge pull request #3529 from SparkiDev/ocsp_single_ext
...
OCSP: Handle extensions in singleResponse
2020-12-02 13:26:46 -08:00
Vysakh P Pillai
3a2675fb63
implement additional review comments
2020-12-02 22:30:02 +05:30
Vysakh P Pillai
9e475b01be
implement review comments
2020-12-02 22:15:02 +05:30
Kaleb Himes
fd158411e8
Merge pull request #3494 from JacobBarthelmeh/CSharp
...
pin the C# verify callback
2020-12-02 06:08:41 -07:00
Vysakh P Pillai
ecc6ec4d97
support TNGTLS certificate loading for Harmony3
...
Changes to atmel.c file that lets a user to
1. Use Harmony3 generated configurations to initialize the device in atmel_init().
2. Read the device certificate chain from ECC608 TNGTLS and initialize the ctx with it to use as device certificate.
- This is the true purpose of going with TNGTLS
2020-12-02 13:53:46 +05:30
Sean Parkinson
3d9b4f10f0
AES: When not X86_64, PreFetch*() not used
...
When WC_INLINE is defined then compiler doesn't mind. Otherwise, this is
a warning.
2020-12-02 09:04:48 +10:00
Juliusz Sosinowicz
0d87dfa493
EVP_Cipher should return length written.
2020-12-01 18:36:36 +01:00
Elms
dbcb42e509
SiLabs: fix unused variable #if
2020-12-01 08:56:01 -08:00
Sean Parkinson
9b5b9fd85d
OCSP: Handle extensions in singleResponse
2020-12-01 16:41:20 +10:00
Elms
099ed25da8
SiLabs: fixing compiler warnings and better error checking
2020-11-30 21:01:49 -08:00
Elms
e1e8ca48c3
SiLabs: README and include updates
2020-11-30 21:01:49 -08:00
Elms
9f7ef0b3e6
SiLabs: Add ECC hardware acceleration support
2020-11-30 21:01:49 -08:00
Elms
a9f8b6e5b7
SiLabs: TRNG hardware acceleration
2020-11-30 21:01:49 -08:00
Elms
e501346047
SiLabs: add AES-CCM hardware acceleration support
2020-11-30 21:01:49 -08:00
Elms
79c31a5f2c
SiLbs: SHA and AES-{GCM,CBC} hardware acceleration using se_manager
2020-11-30 21:01:49 -08:00
Elms
1899a72d27
Micrium: benchmark fixes
...
* Time update for v5.8 to avoid rollover issues
* define `XSNPRINTF`
* `printf` based on Micrium version
2020-11-30 16:32:30 -08:00
Elms
6e21f547ff
Micrium: fix compiler warnings
2020-11-30 16:32:30 -08:00
Elms
0cbf8c7f28
Micrium: readme url fix and add additional link to k70 example with TCP
2020-11-30 16:32:30 -08:00
Elms
165cb443e7
Micrium v5.8 support
...
* OS error type change from uc OS3 to v5
* detect if network or TCP is available
* XMEMCMP change workaround
2020-11-30 16:32:30 -08:00
John Safranek
6fc64263f2
Merge pull request #3519 from julek-wolfssl/scr-timeout
...
Adapt wolfSSL_dtls_got_timeout to secure renegotiation usage
2020-11-30 11:40:35 -08:00
JacobBarthelmeh
42a63e8cc8
fix build with ARM64 SP, FP_ECC and WC_NO_CACHE_RESISTANT
2020-11-29 20:26:55 -08:00
Sean Parkinson
6bb38a1066
ECC add and dbl point: always use safe add and dbl
...
Can be using basepoint or public key at any time. Can't tell difference.
Always use the safe versions.
For private key operations, only working on the basepoint and will never
do any timinig different operations.
No impact on performance.
2020-11-30 11:44:50 +10:00
Sean Parkinson
22a8be412b
TLS 1.3: always add session when sending finished message
2020-11-27 09:46:02 +10:00
Sean Parkinson
40154d69cf
OCSP callback: call embed free
...
Leaks memory if not called.
Configuration:
./configure --disable-shared --enable-ocsp --enable-sni
C_EXTRA_FLAGS="-DWOLFSSL_NONBLOCK_OCSP"
Leaking test:
valgrind ./examples/client/client -X -C -h www.globalsign.com -p
443 -A certs/external/ca-globalsign-root.pem -g -o -N -v d -S
www.globalsign.com
2020-11-27 09:16:24 +10:00
Sean Parkinson
35acfa0f42
SP ECC: check the length of public key ordinates and private key
...
Do quick bit length check before loading the MP integers into fixed size
arrays.
Changed ECC to use SP key check function if SP enabled and not only with
SP Math.
2020-11-27 08:49:30 +10:00
Sean Parkinson
38740a1caa
Fix dynamic type name
2020-11-27 08:37:16 +10:00
Sean Parkinson
5ca8e8f87c
PKCS#11: Label fixes and add support for checking private key
...
Check private key matches the public key passed in.
Need to use a new API to pass in the token to use to perform PKCS #11
operations with.
2020-11-27 08:37:16 +10:00
Sean Parkinson
43aeac4cf4
PKCS #11 SSL: detect key size when certificate set
2020-11-27 08:31:45 +10:00
Sean Parkinson
19f10cd382
PKCS #11 : implement identifying keys by label
2020-11-27 08:31:45 +10:00
toddouska
84a9e16805
Merge pull request #3388 from SparkiDev/aesgcm_4bit_table
...
AES-GCM: GMULT using 4-bit table
2020-11-25 15:45:28 -08:00
toddouska
86bbaad7fa
Merge pull request #3505 from kojo1/EVP-gcm
...
set tag for zero inl case 2
2020-11-25 15:43:27 -08:00
toddouska
dc76a4d522
Merge pull request #3511 from cconlon/zd11268
...
return err from fp_invmod_slow() when fp_add() fails
2020-11-25 15:41:12 -08:00
toddouska
e882159a02
Merge pull request #3516 from cconlon/zd11287
...
wc_ecc_rs_to_sig(): move r and s zero check before StoreECC_DSA_Sig()
2020-11-25 15:36:30 -08:00
David Garske
9f07f3e96e
Merge pull request #3520 from ejohnstown/vrf-fix
...
Verify Callback Fix
2020-11-25 11:37:06 -08:00
JacobBarthelmeh
1668b7060c
Merge pull request #3500 from cconlon/zd11011v2
...
PKCS#7: verify extracted public key in wc_PKCS7_InitWithCert
2020-11-26 02:26:08 +07:00
JacobBarthelmeh
719403cd0c
Merge pull request #3509 from kojo1/openssl-version
...
OPENSSL_VERSION_NUMBER to be defined by the user
2020-11-26 02:10:24 +07:00
toddouska
a0cd75081d
Merge pull request #3514 from SparkiDev/aesni_sse4
...
AESNI compile flags: clang doesn't need -msse4
2020-11-25 08:55:35 -08:00
Sean Parkinson
ca5ffc0743
AESNI compile flags: clang can't have -msse4
...
Setting the SSE4 architecture with clang creates executables that can't
run on old machines.
2020-11-25 10:32:42 +10:00
Sean Parkinson
d0703f8931
AES-GCM: GMULT using 4-bit table
...
When 64-bit data type available and not big endian code is faster.
--enable-aesgcm=4bit
2020-11-25 08:47:50 +10:00
John Safranek
4baf923218
Verify Callback Fix
...
1. Removed a flag set that would force all certificates in a chain
to be verified. There was a compile time option to make that happen
already.
2. Replace some options for some test failure test cases that were added
and immediately removed.
(ZD 11292)
2020-11-24 11:46:10 -08:00
Juliusz Sosinowicz
95132b1c55
Make renegotiation information available outside of OPENSSL_EXTRA
2020-11-24 17:03:40 +01:00
Juliusz Sosinowicz
41d58465c0
Adapt wolfSSL_dtls_got_timeout to secure renegotiation usage
...
Reset DTLS stored messages on a FreeHandshakeResources call even if secure renegotiation is enabled. Without this, in a server initiated rehandshake, the server would keep old messages (ChangeCipherSpec and Finished) even when it sent a HelloRequest message.
2020-11-24 16:06:35 +01:00
Sean Parkinson
b1f9aba0ca
SP div: stop overflow on divide
2020-11-24 16:14:14 +10:00
Sean Parkinson
b9a2725429
ECC verify: validate r and s before any use
...
SP code assumes r and s are valid values.
Code for ATECC508A, ATECC608A and CRYPTOCELL assumes that the r and s
are the size of the key when converting to byte arrays.
2020-11-24 16:14:14 +10:00
John Safranek
f5c2bef78f
Merge pull request #3492 from julek-wolfssl/dtls-scr-optimizations
...
Save the HelloRequest message just like other handshake mesasges
2020-11-20 11:50:51 -08:00
Juliusz Sosinowicz
69bea008dd
Save the HelloRequest message just like other handshake mesasges
...
Implement a timeout mechanism for non-blocking sockets
2020-11-20 11:41:19 +01:00
John Safranek
2d79e38436
Merge pull request #3485 from julek-wolfssl/dtls-scr-seq-correct-num
...
Fix overlapping sequence number error.
2020-11-19 14:19:13 -08:00
Chris Conlon
64429693ff
add MP_ZERO_E unit tests for wc_ecc_rs_to_sig()
2020-11-19 14:41:02 -07:00
Chris Conlon
f8fd3f8bc1
wc_ecc_rs_to_sig: check r,s for zero before StoreECC_DSA_Sig()
2020-11-19 14:35:35 -07:00
Chris Conlon
1d599272e7
add unit test for wc_PKCS7_InitWithCert() with malformed cert
2020-11-19 14:19:55 -07:00
David Garske
d4c59e369e
Merge pull request #3335 from julek-wolfssl/RSA-PSS-padding-in-EVP_Digest-API
...
Enable RSA-PSS padding in EVP_Digest* API
2020-11-19 09:31:12 -08:00
toddouska
43f8eac8ba
Merge pull request #3362 from SparkiDev/sp_math_all
...
Implement all relevant mp functions in sp_int
2020-11-19 08:10:11 -08:00
Sean Parkinson
91d23d3f5a
Implement all relevant mp functions in sp_int
2020-11-19 11:58:14 +10:00
toddouska
aa9ed17afa
Merge pull request #3512 from dgarske/openssl_pem
...
Fix for missing `wolfSSL_PEM_write_bio_PrivateKey` with WebRTC
2020-11-18 16:17:46 -08:00
toddouska
de6f1c1ae2
Merge pull request #3508 from JacobBarthelmeh/DH
...
fix for no filesystem build with DH test case
2020-11-18 16:15:42 -08:00
toddouska
3808865f57
Merge pull request #3504 from SparkiDev/fp_div_oob_read
...
TFM div: fix initial value of size in q so clamping doesn't OOB read
2020-11-18 16:15:08 -08:00
toddouska
ca281f976e
Merge pull request #3493 from dgarske/zd11245
...
Sniffer fixes for handling TCP `out-of-range sequence number`
2020-11-18 16:14:09 -08:00
Takashi Kojo
7c68136a8b
OPENSSL_VERSION_NUMBER to be defined by the user
2020-11-19 09:13:05 +09:00
toddouska
a280df1892
Merge pull request #3488 from kabuobeid/x509_objtxt_lname
...
Return long names instead of short names in wolfSSL_OBJ_obj2txt().
2020-11-18 16:10:46 -08:00
toddouska
6860d419c6
Merge pull request #3483 from SparkiDev/mp_rshb_word
...
rshb: handle cases of shift amount being multiple of DIGIT_BIT
2020-11-18 16:07:57 -08:00
toddouska
b0979f4225
Merge pull request #3476 from dgarske/sniffer_hrr
...
Fixes for TLS sniffer with v1.3 (HRR and Certs)
2020-11-18 16:07:11 -08:00
toddouska
3adeff672b
Merge pull request #3472 from SparkiDev/pickhashsigalgo_rework
...
TLS PickHashSigAlgo: rework
2020-11-18 15:58:59 -08:00
toddouska
dedde4c058
Merge pull request #3456 from JacobBarthelmeh/Certs
...
strict certificate version allowed from client
2020-11-18 15:55:50 -08:00
toddouska
9183c35fb8
Merge pull request #3446 from haydenroche5/client_want_write_sim
...
Add an option to the example client to simulate WANT_WRITE errors.
2020-11-18 15:54:09 -08:00
toddouska
9bde34ef5b
Merge pull request #3438 from douzzer/harmonize-CCM8-cipher-names
...
add "CCM8" variants to cipher_names "CCM-8" ciphers, for OpenSSL compat
2020-11-18 15:52:52 -08:00
Chris Conlon
f02187eef7
fix additional err returns in fp_invmod_slow()
2020-11-18 16:29:13 -07:00
Sean Parkinson
d8b58286d1
TLS 1.3: PSK only
...
Support building with only TLS 1.3 and PSK without code for (EC)DHE and
certificates.
Minimise build size for this configuration.
2020-11-19 09:21:24 +10:00
Chris Conlon
fa08930921
Merge pull request #3498 from ethanlooney/30th_branch
...
Added unit tests for blake2b
2020-11-18 13:34:21 -07:00
David Garske
4cfe5a1bc1
Fix for missing wolfSSL_PEM_write_bio_PrivateKey with WebRTC. If keygen or certgen is not specified this was incorrectly being excluded with opensslextra or opensslall.
2020-11-18 11:30:53 -08:00
Chris Conlon
68744c4da0
return err from fp_invmod_slow() when fp_add() fails
2020-11-18 10:25:15 -07:00
tmael
3b552fecc9
Merge pull request #3481 from dgarske/no_ecc
...
Fixes for various build configurations
2020-11-17 17:11:27 -08:00
Sean Parkinson
c17f8b58e4
Merge pull request #3506 from dgarske/sp_check_ecc
...
Fixes for SP math only with ECC check key
2020-11-18 09:19:54 +10:00
Ethan Looney
3692c760b9
Changed key to size BLAKE2B_KEYBYTES
2020-11-17 14:03:08 -07:00
Chris Conlon
3640bf241c
Merge pull request #3507 from ethanlooney/32nd_branch
...
Doxygen - Removed link/button to annotated.html page as it is currently broken
2020-11-17 13:40:27 -07:00
Juliusz Sosinowicz
a0a3a2b74c
Review changes
2020-11-17 19:15:12 +01:00
David Garske
508ba85b69
Fixes for SP math only with ECC check key. Fix SP math when loading an ECC public only and calling wc_ecc_check_key. Fix for missing ecc_check_privkey_gen with SP math only. Applies to: /configure --enable-sp --enable-sp-math CFLAGS="-DWOLFSSL_VALIDATE_ECC_IMPORT".
2020-11-17 08:13:08 -08:00
David Garske
8fe6186621
Merge pull request #3496 from haydenroche5/pre_commit_stash_fix
...
Modify pre-commit.sh to only stash and stash pop if there are modified files not add to the index
2020-11-17 07:54:50 -08:00
Juliusz Sosinowicz
b4754d5706
CAVP, Windows, and FIPS tests
2020-11-17 15:06:35 +01:00
Juliusz Sosinowicz
d18e2d7386
Refactoring and use salt length discover if available
2020-11-17 15:06:35 +01:00
Juliusz Sosinowicz
fa03113460
enum wc_HashType switch
...
switch needs to handle all possible enum values or else the compiler generates warnings
2020-11-17 15:04:57 +01:00
Juliusz Sosinowicz
248dd12993
Enable RSA-PSS padding in EVP_Digest* API
2020-11-17 15:04:57 +01:00
Jacob Barthelmeh
9cdbff8ee7
fix for no filesystem build with DH test case
2020-11-17 18:27:32 +07:00
Ethan Looney
7467b4c456
Removed link/button to annotated.html page as it is currently broken
2020-11-16 14:25:22 -07:00
Ethan Looney
549c446aaa
Removed leftovers from merge conflict
2020-11-16 13:17:49 -07:00
David Garske
710cb7c9f5
Fixes for ECC tests with WOLFSSL_NO_MALLOC defined.
2020-11-16 12:17:30 -08:00
David Garske
e5a0a264b3
Fix for coverity report with possible use of uninitialized value "err" in WC_ECC_NONBLOCK case. More fixes for building with WOLFSSL_NO_MALLOC.
2020-11-16 12:17:28 -08:00
David Garske
40387ab0a0
Fixes for building with WOLFSSL_NO_MALLOC and/or NO_ASN_CRYPT defined.
2020-11-16 12:17:28 -08:00
David Garske
f3b176d7e3
Fix for unused parameter with NO_ASN in ECC.
2020-11-16 12:17:28 -08:00
David Garske
4a790cd024
Fixes for building with --disable-ecc and --disable-dh.
2020-11-16 12:17:27 -08:00
Ethan Looney
48f2d917b9
Added unit tests for blake2b
2020-11-16 13:06:51 -07:00
Chris Conlon
4e37036cba
Merge pull request #3499 from ethanlooney/31st_branch
...
Added blake2s unit tests
2020-11-16 09:37:31 -07:00
JacobBarthelmeh
4efbb2fc70
Merge pull request #3418 from cconlon/zd11003
...
PKCS#7: check PKCS7 VerifySignedData content length against total bundle size
2020-11-16 18:14:41 +07:00
Takashi Kojo
10380c6850
(ctx->gcmBuffer != NULL && ctx->gcmBufferLen == 0)
2020-11-16 15:48:39 +09:00
Sean Parkinson
a00c75c51b
DTLS MTU: check MTU on write
2020-11-16 09:30:04 +10:00
Sean Parkinson
837de435ba
TFM div: fix initial value of size in q so clamping doesn't OOB read
2020-11-16 09:29:13 +10:00
David Garske
e9f0cb234b
Merge pull request #3425 from haydenroche5/cmake
...
CMake improvements
2020-11-14 08:35:54 -08:00
Chris Conlon
c436bc44e6
verify extracted public key in wc_PKCS7_InitWithCert
2020-11-13 17:23:40 -07:00
Ethan Looney
0541a59edd
Added blake2s unit tests
2020-11-13 14:43:50 -07:00
Hayden Roche
cd61fbd0fe
Modify pre-commit.sh to only stash and stash pop if there are modified files not
...
added to the index.
Before this change, if there was nothing to stash, the last thing you stashed
would get popped at the end of the script.
2020-11-13 13:38:58 -06:00
Kareem Abuobeid
da06ef8c3f
Return long names instead of short names in wolfSSL_OBJ_obj2txt().
2020-11-13 12:03:26 -07:00
David Garske
d4e1340027
Merge pull request #3486 from douzzer/refactor-gccish-macros
...
sha256.c/sha512.c: refactor 4 instances of gccism ({}) to WC_INLINE functions
2020-11-13 09:26:00 -08:00
Hayden Roche
8f6c21d600
CMake improvements.
...
- Begin adding options to enable/disable different features.
- Increase minimum CMake version to 3.2.
- Support installation of the built files.
- Add checks for necessary include files, functions etc.
- Generate options.h and config.h.
- Use GNUInstallDirs to support installation, which is designed to be somewhat
cross-platform.
- Export wolfssl CMake target during installation, so others using CMake can
link against wolfssl easily.
- Disallow in-source builds.
- Place the generation of BUILD_* flags (controlled with AM_CONDITIONALs
in configure.ac) in a separate function in functions.cmake,
generate_build_flags.
- Implement the logic to conditionally add source files from
src/include.am in a function in functions.cmake, generate_lib_src_list.
- Exclude tls_bench from Windows. Doesn't compile with MSVC. WIP.
- Update INSTALL with latest CMake build instructions.
- Add a cmake/include.am to ensure CMake files get added to the distribution.
2020-11-13 11:25:04 -06:00
David Garske
7f559b1d1a
Merge pull request #3487 from ejohnstown/sbf
...
Scan-Build Fixes
2020-11-13 09:24:17 -08:00
Hayden Roche
3d5c747ed5
Modify a couple tests to use WANT_WRITE simulation.
2020-11-13 10:35:56 -06:00
Hayden Roche
2fc594d319
Modify example server to be resilient to WANT_WRITE errors.
2020-11-13 10:33:10 -06:00
Hayden Roche
e035eb8f8a
Add an option to the example client to simulate WANT_WRITE errors.
...
- Add this option as "-6."
- Turn on non-blocking mode if WANT_WRITE simulation is enabled.
- Create a send IO callback that gets registered when this option is turned on.
This callback alternates between letting the TX through and returning a
WANT_WRITE error.
2020-11-13 10:30:24 -06:00
John Safranek
28be1d0cb3
Scan-Build Fixes
...
1. Fix some potential uninitialized pointer errors in the functions sp_RsaPublic_2048, sp_RsaPublic_3072, and sp_RsaPublic_4096 for small stack builds.
To recreate:
$ scan-build ./configure --enable-sp=small --enable-smallstack --enable-smallstackcache CPPFLAGS="-DECC_CACHE_CURVE -DHAVE_WOLF_BIGINT"
2020-11-12 20:58:25 -08:00
John Safranek
1e348b991d
Scan-Build Fixes
...
1. Fix a potential dereference of NULL pointer.
To recreate:
$ scan-build ./configure --enable-sp --enable-sp-asm --enable-sp-math
2020-11-12 20:58:17 -08:00
Jacob Barthelmeh
3773d33070
pin the C# verify callback
2020-11-13 11:57:20 +07:00
JacobBarthelmeh
a8333b09a0
memory cleanup with test case
2020-11-12 20:24:47 -08:00
David Garske
f02cc650a2
Fixes for handling TCP out-of-range sequence number.
2020-11-12 16:09:09 -08:00
David Garske
c7053e9a36
Fix scenario where FreeHandshakeResources is called and server hello is recevied and WOLFSSL arrays is NULL.
2020-11-12 16:09:00 -08:00
Chris Conlon
53c6698678
Merge pull request #3445 from kojo1/EVP-gcm
...
set tag for zero inl case
2020-11-12 15:49:45 -07:00
Chris Conlon
735fb19ea9
break out on error parsing PKCS#7 SignedData inner OCTET_STRING
2020-11-12 15:44:25 -07:00
David Garske
b931b1bd4d
Fix to not allow free for globally cached sessions. Resolves a false-positive scan-build warning.
2020-11-12 12:51:41 -08:00
John Safranek
38867ae2bf
Scan-Build Fixes
...
1. Added a check to see if the "d" in sp_div() ended up with a negative used length. Return error if so.
To recreate:
$ scan-build ./configure --enable-sp --enable-sp-asm --enable-sp-math
2020-11-12 10:24:11 -08:00
David Garske
cdf44f6ff6
Pass static ephemeral keys for TLS v1.2 as well.
2020-11-12 09:18:24 -08:00
John Safranek
e996a7d15b
Scan-Build Fixes
...
1. Fixed a couple possible 0 byte allocations.
2. Fixed a couple missed frees due to error conditions.
3. Fixed a possible double free.
To recreate:
$ scan-build ./configure --disable-shared --enable-opensslextra=x509small --disable-memory
$ scan-build ./configure --disable-shared --enable-opensslextra --disable-memory
2020-11-12 09:06:59 -08:00
David Garske
a6f2081af1
Fixes for key loading errors in snifftest application.
2020-11-12 08:59:11 -08:00
David Garske
a53b734c83
Fix for client_hello keyshare with multiple entries. Fix for change_cipher_spec after finished.
2020-11-12 08:59:11 -08:00
David Garske
ea21ddf540
Fix to only free existing key in SetStaticEphemeralKey if the incoming algorithm type has been specified.
2020-11-12 08:59:11 -08:00
David Garske
5cda549d00
Allow passing multiple keys (comma separated) with the sniffer test tool. This allows setting both DH and ECC static ephemeral keys. Do not fail on resume not found.
2020-11-12 08:59:11 -08:00
David Garske
720919198f
Fix for Scan-buld and when building without ECC or DH.
2020-11-12 08:59:11 -08:00
David Garske
71d9f1e9bd
Static ephemeral refactor to support loading both DHE and ECDHE keys. Added ability to specify key using snifftest input at run-time. Improved snifftest key loading for named keys and static ephemeral.
2020-11-12 08:59:11 -08:00
David Garske
1c87f3bdc1
Improve sniffer resume logic.
2020-11-12 08:59:10 -08:00
David Garske
d208779974
Added test case for TLS v1.3 with HRR (hello_retry_request)
2020-11-12 08:59:10 -08:00
David Garske
b74f0fb6b8
Fixes for sniffer with hello_retry_request. Fix for TLS v1.3 certificate processing.
2020-11-12 08:59:10 -08:00
David Garske
c7bb602a30
Merge pull request #3482 from douzzer/scan-build-fixes-20201110
...
scan-build fixes -- 1 null deref, 34 unused results
2020-11-12 07:45:45 -08:00
Daniel Pouzzner
1cbc2e8608
openssl.test: recognize TLS13-AES128-CCM-8-SHA256 and TLS13-AES128-CCM8-SHA256 as equivalent while iterating through $wolf_ciphers.
2020-11-11 23:23:28 -06:00
Daniel Pouzzner
7850d71ccb
add wolfSSL_get_cipher_suite_from_name(); add flags arg to GetCipherSuiteFromName(); fix GetCipherSuiteFromName() to prevent spurious substring matching; add SUITE_ALIAS() macros for use defining CipherSuiteInfo, and add CipherSuiteInfo.flags slot and associated logic, to allow alternative cipher names to be recognized; add "CCM8" cipher name variants wherever applicable, including the unit.test conf files, to recognize and test the OpenSSL variants; add tests in client_test() and server_test() to confirm correct forward and backward mapping of cipher names/aliases.
2020-11-11 22:47:47 -06:00
Daniel Pouzzner
68ebca8573
wolfcrypt/test/test.c: fix typos in aesgcm_test() malloc checks.
2020-11-11 22:47:47 -06:00
toddouska
d3e3b21c83
Merge pull request #3393 from dgarske/zd11104
...
Fix for TLS ECDH (static DH) with non-standard curves
2020-11-11 14:22:37 -08:00
toddouska
197c85289b
Merge pull request #3468 from SparkiDev/sp_c_mul_d
...
SP C32/64 mul_d: large div needs mul_d to propagate carry
2020-11-11 14:06:25 -08:00
Daniel Pouzzner
f96fbdb7d1
sha256.c/sha512.c: refactor 4 instances of gccism ({}) to WC_INLINE functions.
2020-11-11 13:44:26 -06:00
Daniel Pouzzner
5fe1586688
fix 34 deadcode.DeadStores detected by llvm11 scan-build.
2020-11-11 13:04:14 -06:00
JacobBarthelmeh
fe2dcf76fe
Merge pull request #3413 from cconlon/zd11011
...
PKCS#7: check PKCS7 SignedData private key is valid before using it
2020-11-11 22:55:03 +07:00
Jacob Barthelmeh
4705ebde88
add guard on test case for cert gen
2020-11-11 21:53:52 +07:00
Juliusz Sosinowicz
d49038ae24
Fix overlapping sequence number error.
...
wolfSSL wants to use the same sequence number for the ServerHello as the ClientHello. This is an issue when this sequence number is already taken.
2020-11-11 15:35:05 +01:00
Jacob Barthelmeh
979216d595
add test case for rejecting version 2 x509
2020-11-11 18:57:09 +07:00
Sean Parkinson
5f0d788bfb
TLS PickHashSigAlgo: rework
...
Make default to pick lowest hash with RSA and ECC (TLS 1.2 and lower).
WOLFSSL_STRONGEST_HASH_SIG picks the strongest hash.
WOLFSSL_ECDSA_MATCH_HASH will pick the hash to match the ECC curve.
2020-11-11 10:06:09 +10:00
Sean Parkinson
f5561b926c
rshb: handle cases of shift amount being multiple of DIGIT_BIT
...
tfm.c and integer.c fixed
2020-11-11 10:04:14 +10:00
Takashi Kojo
d7ea8b953b
fold long lines
2020-11-11 08:43:16 +09:00
Takashi Kojo
eab3bf9ab4
Add a test case for zero len plain text
2020-11-11 08:43:16 +09:00
Takashi Kojo
417ff1b0f2
set tag for zero len case
2020-11-11 08:43:16 +09:00
Takashi Kojo
1d2eb44bfb
Merge https://github.com/wolfssl/wolfssl
2020-11-11 08:34:03 +09:00
David Garske
68209f91fb
Merge pull request #3465 from kaleb-himes/DOX_UPDATE_wc_RsaPublicEncrypt
...
Address report on issue #3161
2020-11-10 14:52:20 -08:00
David Garske
fcd73135f5
Merge pull request #3479 from tmael/ocsp_NULL
...
Check <hash> input parameter in GetCA
2020-11-10 14:46:05 -08:00
Daniel Pouzzner
958fec3b45
internal.c:ProcessPeerCerts(): fix a core.NullDereference detected by llvm9 and llvm11 scan-builds.
2020-11-10 16:40:28 -06:00
Chris Conlon
7b50cddf8c
Merge pull request #3387 from ethanlooney/27th_branch
...
Added unit test for evp.c
2020-11-10 13:27:33 -07:00
David Garske
8645e9754e
Only set ssl->ecdhCurveOID if not already populated.
2020-11-10 09:47:38 -08:00
David Garske
1d531fe13b
Peer review fixes.
2020-11-10 09:47:37 -08:00
David Garske
fa1af37470
Fix for FIPS ready CAVP tests. For now it requires ECC 192-bit.
2020-11-10 09:47:37 -08:00
David Garske
5de80d8e41
Further refactor the minimum ECC key size. Adds --with-eccminsz=BITS option. Fix for FIPSv2 which includes 192-bit support. If WOLFSSL_MIN_ECC_BITS is defined that will be used.
2020-11-10 09:47:37 -08:00
David Garske
b13848e568
Fix tests to handle ECC < 224 not enabled.
2020-11-10 09:47:37 -08:00
David Garske
6bd98afdd0
Only allow TLS ECDH key sizes < 160-bits if ECC_WEAK_CURVES is defined.
2020-11-10 09:47:37 -08:00
David Garske
c697520826
Disable ECC key sizes < 224 bits by default. Added --enable-eccweakcurves or ECC_WEAK_CURVES to enable smaller key sizes. Currently this option is automatically enabled if WOLFSSL_MIN_ECC_BITS is less than 224-bits.
2020-11-10 09:47:36 -08:00
David Garske
62dca90e74
Fix for server-side reporting of curve in wolfSSL_get_curve_name if client_hello includes ffdhe, but ECC curve is used.
2020-11-10 09:47:36 -08:00
David Garske
d7dee5d9e6
Fix for ECC minimum key size, which is 112 bits.
2020-11-10 09:47:36 -08:00
David Garske
6ac1fc5cff
Fix include.am typo.
2020-11-10 09:47:36 -08:00
David Garske
10f459f891
Added TLS v1.2 and v1.3 test cases for ECC Koblitz and Brainpool curves (both server auth and mutual auth). Cipher suites: ECDHE-ECDSA-AES128-GCM-SHA256, ECDH-ECDSA-AES128-GCM-SHA256 and TLS13-AES128-GCM-SHA256.
2020-11-10 09:47:36 -08:00
David Garske
fb9ed686cb
Fix for TLS with non-standard curves. The generted ECC ephemeral key did not use the same curve type as peer. Only the server was populating ssl->ecdhCurveOID. Now the curveOID is populated for both and as a fail-safe the peer key curve is used as default (when available).
2020-11-10 09:47:36 -08:00
David Garske
045fc4d686
Fixes to support overriding minimum key sizes for examples.
2020-11-10 09:47:36 -08:00
David Garske
bfb6138fc5
Merge pull request #3480 from douzzer/fix-sniffer-printf-null-Wformat-overflow
...
TraceSetNamedServer() null arg default vals; FIPS wc_MakeRsaKey() PRIME_GEN_E retries; external.test config dependencies
2020-11-10 09:37:36 -08:00
Daniel Pouzzner
5625929c83
scripts/external.test: skip test when -UHAVE_ECC.
2020-11-10 01:27:45 -06:00
Daniel Pouzzner
196ae63eb2
scripts/external.test: skip test when -DWOLFSSL_SNIFFER (staticCipherList in client.c is incompatible).
2020-11-10 00:03:02 -06:00
Daniel Pouzzner
bd38124814
ssl.c: refactor wolfSSL_RSA_generate_key() and wolfSSL_RSA_generate_key_ex() to retry failed wc_MakeRsaKey() on PRIME_GEN_E when -DHAVE_FIPS, matching non-FIPS behavior, to eliminate exposed nondeterministic failures due to finite failCount.
2020-11-09 21:24:34 -06:00
toddouska
3050f28890
Merge pull request #3467 from cconlon/rc2vs
...
rc2.c to Visual Studio projects, fix warnings
2020-11-09 13:52:03 -08:00
David Garske
f02c3aab2e
Merge pull request #3475 from ejohnstown/nsup
...
Hush Unused Param Warning
2020-11-09 11:04:05 -08:00
Daniel Pouzzner
4b1a779fcc
tests: fix for fips-test -Wunused-variable on "rng"
2020-11-09 11:54:49 -06:00
David Garske
7e3efa3792
Merge pull request #3474 from douzzer/lighttpd-update-1.4.56
...
lighttpd support update for v1.4.56
2020-11-09 09:24:58 -08:00
Tesfa Mael
a5caf1be01
Check for NULL
2020-11-09 08:45:48 -08:00
Daniel Pouzzner
22bcceb2d3
src/sniffer.c: guard against null arguments to TraceSetNamedServer(), to eliminate -Werror=format-overflow= warnings from gcc.
2020-11-06 17:40:12 -06:00
Chris Conlon
c0c452b0a1
reset content length in PKCS7_VerifySignedData for multiPart OCTET_STRING bundles
2020-11-06 16:36:58 -07:00
Kaleb Himes
937a7ce8ce
Merge pull request #3448 from dgarske/crypto_cb
...
Improve the crypto callback for ASN
2020-11-06 15:26:11 -07:00
John Safranek
884a9b59ab
Merge pull request #3461 from dgarske/fips_ready_wopensslextra
...
Fix for FIPS ready with openssl compat
2020-11-06 13:14:06 -08:00
Ethan Looney
a6e0d3eb29
Changed hardcoded values to variables, changed where some variables were defined, etc
2020-11-06 14:04:27 -07:00
Chris Conlon
ac4c8a0112
Merge pull request #3419 from ethanlooney/29th_branch
...
Added case for Logging.c unit test
2020-11-06 13:10:24 -07:00
toddouska
4110297b62
Merge pull request #3473 from embhorn/zd11198
...
wc_SetIssuerRaw should copy raw subject to issuer
2020-11-06 10:48:37 -08:00
toddouska
b4e7f196df
Merge pull request #3470 from SparkiDev/config_fix_3
...
TLS configurations fixes
2020-11-06 10:35:51 -08:00
toddouska
3f25cda354
Merge pull request #3469 from SparkiDev/cpuid_sp_asm
...
cpuid and SP ASM: ensure WOLFSSL_X86_64_BUILD is defined
2020-11-06 10:34:40 -08:00
John Safranek
abd6f6ce18
Hush Unused Param Warning
...
Removed a guard check for NO_WOLFSSL_STUB from wolfSSL_X509_print_ex().
To recreate:
$ ./configure --enable-opensslextra CPPFLAGS="-DNO_WOLFSSL_STUB"
$ make
2020-11-06 10:30:47 -08:00
toddouska
f3d961b1b1
Merge pull request #3453 from dgarske/ZD11159
...
Fix for possible memory leak when overriding error for verify callback
2020-11-06 10:18:52 -08:00
toddouska
f9ec7c472a
Merge pull request #3440 from ejohnstown/ntf3
...
Nightly Test Fix
2020-11-06 10:15:23 -08:00
Hayden Roche
2cad844d29
Merge pull request #3421 from dgarske/apache_httpd
...
Apache httpd w/TLS 1.3 support
2020-11-06 12:14:58 -06:00
David Garske
0d2e28ce80
Fix for error: unused function 'MonthStr'
2020-11-06 10:11:48 -08:00
Daniel Pouzzner
dcff103c84
tests/api.c: fixes for compilability re NO_BIO
2020-11-05 22:19:16 -06:00
Daniel Pouzzner
4030523eb5
ssl.c: remove duplicate definition of wolfSSL_CTX_check_private_key().
2020-11-05 21:57:33 -06:00
Glenn Strauss
f9e48ee361
build updates for lighttpd: recommend -DNO_BIO
...
(cherry picked from commit bfe12839e18ccc3ab95cfc33b34c875ebe55c14a)
2020-11-05 20:40:43 -06:00
Glenn Strauss
92c3296e13
preprocessor -DNO_BIO to omit OpenSSL BIO API
2020-11-05 20:40:43 -06:00
Glenn Strauss
030eb9347c
lighttpd: allow ssl3, tls1.0 if explicitly enabled
2020-11-05 20:40:43 -06:00
Glenn Strauss
7cee131e37
restore --enable-lighty with --enable-all
...
protect lighttpd recommendations (and recommended restrictions)
to when building wolfSSL specifically for use by lighttpd, and
omit these optional settings when building `--enable-all`
2020-11-05 20:40:43 -06:00
David Garske
a9a495270c
Fix to disable CRL monitor for single threaded or lighttpd. Do not set --enable-lighty with --enable-all.
2020-11-05 20:40:43 -06:00
Glenn Strauss
daca327ba3
expose (get|set)_(app|ex)_data with HAVE_EX_DATA
...
when OPENSSL_EXTRA_X509_SMALL is set
2020-11-05 20:40:43 -06:00
Glenn Strauss
d01616a357
unhide some non-fs funcs hidden by NO_FILESYSTEM
2020-11-05 20:40:43 -06:00
Glenn Strauss
bcf1f0375b
build updates for lighttpd: recommended flags
2020-11-05 20:40:43 -06:00
Glenn Strauss
f4e2db831e
enable SNI_Callback for lighttpd
2020-11-05 20:40:43 -06:00
Glenn Strauss
be7592fb43
implement wolfSSL_dup_CA_list()
...
wolfSSL_dup_CA_list() duplicates a WOLF_STACK_OF(WOLFSSL_X509_NAME)
(replaces stub function)
2020-11-05 20:40:43 -06:00
Glenn Strauss
e5ed227a87
build updates for lighttpd: -DOPENSSL_ALL
...
avoid potential for WolfSSL to silently omit expected functionality
2020-11-05 20:40:43 -06:00
Glenn Strauss
503de43cbd
build updates for lighttpd
...
Update configure.ac and various #ifdefs to enable WolfSSL to
build features for use by lighttpd.
Change signature of wolfSSL_GetVersion() to take const arg.
Pass (const WOLFSSL*) to wolfSSL_GetVersion() for use with
SSL_CTX_set_info_callback(), where OpenSSL callback takes (const SSL *)
2020-11-05 20:40:43 -06:00
kaleb-himes
182a3e6bc2
Also addressing opensslall, pkcs7 and combinations
2020-11-05 17:29:30 -07:00
Ethan Looney
232ac03bbe
Changed it to only the inverse
2020-11-05 14:38:23 -07:00
Ethan Looney
0aee4b78cd
Changed md5 to sha256 in DigestFinal_ex function
2020-11-05 14:36:42 -07:00
Eric Blankenhorn
a92e31f6cb
Fix from review
2020-11-05 14:47:10 -06:00
David Garske
d784bd61cd
Merge pull request #3462 from kabuobeid/wolfrand_freescale_ecc_fix
...
Fix build issue when building wolfrand on a Freescale platform.
2020-11-05 12:29:49 -08:00
Ethan Looney
06f1a1870d
Added inverse case
2020-11-05 13:05:15 -07:00
David Garske
1dc7293b19
Fix the return code. openssl uses void on these, but let's go ahead and do a return code.
2020-11-05 09:31:12 -08:00
David Garske
063fb2cfa0
Merge pull request #3455 from douzzer/linuxkm-install-rules
...
add "module", "modules_install", and "clean_module" rules for linuxkm
2020-11-05 09:09:35 -08:00
Kaleb Himes
648c5e4735
Merge pull request #3471 from douzzer/fix-scan-build-20201104
...
fix various possibly spurious scan-build null deref reports.
2020-11-05 09:36:42 -07:00
Eric Blankenhorn
fa9a0a4b49
Copy raw subject to issuer
2020-11-05 09:06:02 -06:00
Daniel Pouzzner
5751319e00
fix various possibly spurious scan-build null deref reports.
2020-11-04 23:11:42 -06:00
Kaleb Himes
b40543b342
Merge pull request #3466 from douzzer/fix-benchmark-dh-key-size
...
fix bench_dh() key size initialization
2020-11-04 20:33:06 -07:00
Sean Parkinson
78309cd7aa
SP C32/64 mul_d: large div needs mul_d to propagate carry
...
Change implementation to pre-calc products to allow for reordering of
operations.
2020-11-05 12:50:33 +10:00
Sean Parkinson
8a42ee7ffd
TLS configurations fixes
...
--enable-leanpsk --disable-tls13:
ensure WriteSEQ is defined when !WOLFSSL_NO_TLS12 (tls.c)
CFLAGS=-DWOLFSSL_NO_CLIENT_AUTH -disable-tls13"
TLS server was expecting certificate from peer when verifyPeer is
set. Fix with checks for !WOLFSSL_NO_CLIENT_AUTH.
2020-11-05 12:21:19 +10:00
Sean Parkinson
2588fe366e
cpuid and SP ASM: ensure WOLFSSL_X86_64_BUILD is defined
...
WOLFSSL_X86_64_BUILD is defined only when fast math is enabled.
Define it when SP ASM is enabled and on an x86_64 host.
Undo cpuid code being enabled when WOLFSSL_SP_ASM as it shouldn't for
non-Intel CPUs.
2020-11-05 11:16:27 +10:00
Kareem Abuobeid
37952b2776
Fix build issue when building wolfrand on a Freescale platform.
2020-11-04 16:52:59 -07:00
David Garske
3b4ec74174
Fixes for openssl compatibility. Added SSL_CTX_set_post_handshake_auth and SSL_set_post_handshake_auth API's for enabling or disabling post handshake authentication for TLS v1.3.
2020-11-04 15:05:50 -08:00
David Garske
eb19306f16
Merge pull request #3459 from haydenroche5/sniffer_fixes
...
Fix a couple of issues related to the sniffer.
2020-11-04 14:09:43 -08:00
Daniel Pouzzner
2d149b1bef
benchmark.c: backport fixes to bench_dh() DH key size initialization from SparkiDev:sp_math_all.
2020-11-04 15:35:58 -06:00
Daniel Pouzzner
3858bda7e9
add "module", "modules_install", and "clean_module" rules to BUILD_LINUXKM section of Makefile.am, and add working install rule to linuxkm/Makefile, so that "make module" and "make modules_install" now work when --enable-linuxkm; fix "make dist" logic in Makefile.am and scripts/include.am to be unaffected by --enable-linuxkm; don't build wolfcrypt/benchmark or testwolfcrypt when --enable-linuxkm and --enable-crypttests.
2020-11-04 14:13:39 -06:00
Chris Conlon
6953049305
fix Visual Studio type conversion warnings
2020-11-04 11:11:40 -07:00
Chris Conlon
83b0847e66
add rc2.c to Visual Studio projects
2020-11-04 10:37:47 -07:00
kaleb-himes
288ad68b4d
Address report on issue #3161
2020-11-04 10:37:46 -07:00
Hayden Roche
3b1c536418
Fix a couple of issues related to the sniffer.
...
- Fix an issue in sniffer.c where some pointer math was giving a warning.
- Fix an issue in snifftest.c where a local variable was never read.
- Ignore non-TCP/IP packets in snifftest.c. Fixes some tests with pcaps with
other types of packets.
2020-11-04 10:46:11 -06:00
David Garske
00dd22adc4
Merge pull request #3464 from SparkiDev/sha512_valgrind_fix
...
SHA-512 AVX2: use register for wk other than rsp
2020-11-04 07:15:04 -08:00
Sean Parkinson
235ea98b90
SHA-512 AVX2: use register for wk other than rsp
...
Valgrind thinks that stack values are uninitialised when the stack
pointer is added to.
The asm code was moving rsp around rather than use another register.
Put length to hash onto stack and use that register instead.
2020-11-04 12:02:34 +10:00
toddouska
b76ac0b842
Merge pull request #3442 from SparkiDev/config_fix_2
...
Configuration fixes
2020-11-03 14:48:49 -08:00
toddouska
e52efc7a8a
Merge pull request #3441 from SparkiDev/ecdsa_vfy_safe
...
ECDSA verification: handle doubling of infinity
2020-11-03 14:47:45 -08:00
toddouska
2acef1c114
Merge pull request #3436 from haydenroche5/chacha_msvc_fix
...
Fix MSVC compile issue in chacha.c.
2020-11-03 14:44:43 -08:00
toddouska
63bf5dc56c
Merge pull request #3426 from SparkiDev/rsa_pss_fix
...
RSA-PSS: Handle edge case with encoding message to hash
2020-11-03 14:43:56 -08:00
toddouska
3cce86d7a8
Merge pull request #3420 from dgarske/small_pk
...
ECC memory reductions with key and signature parsing
2020-11-03 14:42:43 -08:00
toddouska
9f9901e10e
Merge pull request #3417 from douzzer/fix-ipv6-ocsp-tests
...
Fix ipv6 ocsp tests
2020-11-03 14:38:32 -08:00
David Garske
d6b219bd38
Fix for ./configure --enable-fips=ready --enable-opensslextra.
2020-11-03 14:23:08 -08:00
Ethan Looney
813a94ab9a
Added bad and good case to EVP_DigestFinal_ex test
2020-11-03 14:57:30 -07:00
Jacob Barthelmeh
39d0b032e8
strict certificate version allowed from client
2020-11-03 19:30:56 +07:00
David Garske
f8176dd646
Merge pull request #3454 from SparkiDev/sp_def_fix
...
SP C64/32: Fix define check
2020-11-02 17:07:56 -08:00
Sean Parkinson
b3f6c483bf
SP C64/32: Fix define check
...
WOLFSSL_SP_DH -> WOLFSSL_HAVE_SP_DH
2020-11-03 08:42:55 +10:00
Ethan Looney
48073fb678
Removed unnecessary test
2020-11-02 14:22:01 -07:00
Ethan Looney
cf05a060f7
Removed cases that caused fips test to fail
2020-11-02 14:16:02 -07:00
Ethan Looney
05d01dcccd
Added if defined checks for rc4 and fips
2020-11-02 14:11:07 -07:00
Ethan Looney
251f3e15d4
Added fips check for specific size
2020-11-02 14:11:07 -07:00
Ethan Looney
7412374496
Changed from hardcoded values, changed types and deleted comments
2020-11-02 14:11:07 -07:00
Ethan Looney
8122c031bf
Added ifdef's, changed key sizes to relevant sizes
2020-11-02 14:11:07 -07:00
Ethan Looney
b46f87ffe6
Added unit test for evp.c
2020-11-02 14:11:07 -07:00
David Garske
89c39dcfe5
Fix for possible memory leak when overriding error for verify callback on cert 0 (peer) if OPENSSL_EXTRA or OPENSSL_EXTRA_X509_SMALL and KEEP_PEER_CERT is not defined.
2020-11-02 12:04:56 -08:00
John Safranek
29c7351fe0
Merge pull request #3383 from kaleb-himes/ACVP_TESTING_UPDATE
...
In ACVP testing NIST needs to see failed decryption output
2020-11-02 10:42:28 -08:00
Chris Conlon
87abb5257e
Merge pull request #3447 from dgarske/microchip
...
Fixes for building with Microchip
2020-11-02 10:09:13 -07:00
JacobBarthelmeh
a411dab74f
Merge pull request #3410 from cconlon/zd11001
...
PKCS#7: Reset variables correctly in VerifySignedData
2020-11-02 11:33:52 +08:00
John Safranek
d24add10f2
Nightly Test Fix
...
When performing a fast_mp_montgomery_reduce(), scan-build didn't like
that the destination buffer was fully zeroed out. We were only zeroing
what was expected to be used. This zeroes only the expected to be used
section of the output buffer.
2020-11-01 18:58:05 -08:00
David Garske
0df5079f8b
Fixes for building with Microchip. The min/max patch allows non PIC32MZ parts to build in MPLABX. The cryptoauthlib already defines SHA_BLOCK_SIZE, so undef to prevent redef error.
2020-10-30 12:46:14 -07:00
Ethan Looney
8728eaf93f
Removed duplicate return check and added return check
2020-10-30 13:19:12 -06:00
David Garske
64b081f3c9
Improve the SHA256 crypto callback for ASN, so a wc_Sha/wcSha256 context exists for certificate hashing.
2020-10-30 12:18:19 -07:00
Chris Conlon
54fe98716d
Merge pull request #3415 from kojo1/config-options
...
Config options
2020-10-30 11:55:11 -06:00
Takashi Kojo
22816b53de
set tag for zero len case
2020-10-30 16:13:37 +09:00
David Garske
e4f3f8b80a
Further tuning of the zero trim / is leading set logic for new ECC signature encoding/decoding API's.
2020-10-29 15:59:51 -07:00
Sean Parkinson
bd3841c7d1
Merge pull request #3444 from julek-wolfssl/aad-reset
...
AAD should be reset on Init call
2020-10-30 08:11:26 +10:00
David Garske
95c8a48285
Trim leading zero's first, then check for MSB being set.
2020-10-29 08:38:55 -07:00
Juliusz Sosinowicz
aff14091e0
AAD should be reset on Init call
2020-10-29 12:13:35 +01:00
Sean Parkinson
320afab227
Configuration fixes
...
--enable-sp --enable-sp-asm --disable-fastmath:
cpuid.h - check for WOLFSSL_SP_ASM as well
-enable-curve448 --enable-ed448 --disable-rsa --disable-dh
--enable-tls13 --disable-ecc --enable-certgen --enable-keygen:
api.c - certificate loaded that was RSA but RSA disabled
--enable-sp --enable-sp-asm --enable-sp-math:
cpuid.c - check for WOLFSSL_SP_ASM as well
--disable-shared --disable-ecc --disable-dh --enable-cryptonly
--enable-rsavfy --disable-asn --disable-rng --disable-filesystem:
test.c - rsa_test()
'CC=clang -fsanitize=address' '-enable-distro' '--enable-stacksize':
testsuit.c - echoclient_test_wrapper needs to free ECC FP cache when
it is in a separate thread
2020-10-29 16:21:06 +10:00
Sean Parkinson
32ea0910de
ECDSA verification: handle doubling of infinity
2020-10-29 12:12:01 +10:00
David Garske
ef7a987759
Peer review fixes.
2020-10-28 17:09:15 -07:00
Daniel Pouzzner
7d177e78d7
don't include wolfssl/options.h in logging.c, use AM_CFLAGS (not wolfssl/options.h) to communicate HAVE_WC_INTROSPECTION to the compiler, and use config.h (not wolfssl/options.h) to communicate LIBWOLFSSL_CONFIGURE_ARGS and LIBWOLFSSL_GLOBAL_CFLAGS to the compiler (for logging.c).
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
fda84576b0
name the new introspection routines wolfSSL_configure_args() and wolfSSL_global_cflags() for consistency, and move the prototypes to logging.h.
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
139b0431cb
ocsp-stapling*.test: prefix waited servers with "timeout 60" to avoid deadlock failure modes; grep output from "openssl s_client" in "test interop fail case" for expected error message ("self signed certificate in certificate chain").
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
a5d96721ac
wolfcrypt/src: remove wc_debug.c and move its contents to logging.c.
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
0568ec304f
pass -4 flag to openssl and nc only when IPV6_SUPPORTED.
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
94a3f86dcd
scripts/ocsp-stapling*.test: check if IPv6 is supported by the installed openssl and nc executables, and if not, don't attempt to wrestle the version. with no IPv6 support, and an --enable-ipv6 wolfssl build, skip the test entirely. also, restore a couple -b (bind-all-interfaces) flags to examples/server/server recipes in case that's useful.
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
94d4ea3a57
examples/client/client.c:client_usage_msg[][]: add correct sensing and reporting of WOLFSSL_SP_4096.
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
1ba0883f4c
introspection tweaks: rename wolfcrypt/src/debug.c to wolfcrypt/src/wc_debug.c; restore BUILD_WC_DEBUG gating for autotools inclusion of wc_debug.o and disable opportunistically when ENABLED_LEANTLS, ENABLED_LEANPSK, or ENABLED_LOWRESOURCE; add HAVE_WC_INTROSPECTION gate for libwolfssl_configure_args() and libwolfssl_global_cflags().
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
f37c25f9c0
wc_XChaCha20Poly1305_crypt_oneshot(): use ForceZero, not XMEMSET(), to safely clear the AEAD state before return.
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
7a5cbaa9bc
fix scripts/ocsp-stapling*.test to accommodate IPv6 examples/ client/server build.
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
b918e1fd4c
examples/: add -@ and -# flags to client and server, printing libwolfssl_configure_args() and libwolfssl_global_cflags() respectively.
2020-10-28 17:28:05 -05:00
Daniel Pouzzner
8be2d7690a
add API functions libwolfssl_configure_args() and libwolfssl_global_cflags() to retrieve build parameters at runtime.
2020-10-28 17:28:01 -05:00
toddouska
931eea30f5
Merge pull request #3397 from cconlon/rc2
...
RC2 ECB/CBC and PKCS#12 Integration
2020-10-28 15:06:47 -07:00
Hayden Roche
90258b6f34
Fix MSVC compile issue in chacha.c.
...
Use XMEMSET instead of initializing with {}.
2020-10-28 14:57:59 -05:00
toddouska
112cce8cf2
Merge pull request #3407 from SparkiDev/pkcs11_sign_vfy
...
PKCS #11 : changes for signing and loading RSA public key from private
2020-10-28 12:53:58 -07:00
toddouska
6a98601895
Merge pull request #3427 from SparkiDev/ecdsa_shamir_precomp
...
ECC Shamir's Trick: infinity in precomp
2020-10-28 12:08:40 -07:00
toddouska
3a9758f257
Merge pull request #3433 from dgarske/sniffer_sni
...
Fix for Sniffer with SSLv3 where SNI is not supported
2020-10-28 12:06:37 -07:00
David Garske
a15769b12e
Merge pull request #3435 from ejohnstown/ntf2
...
Nightly Test Fix 2
2020-10-28 06:39:15 -07:00
Hayden Roche
91f0d8bfef
Fix MSVC compile issue in chacha.c.
...
MSVC generates a syntax error when you initialize
an array with {}. {0} has the same effect and compiles.
2020-10-27 21:14:15 -05:00
David Garske
4277ec62f9
Merge pull request #3431 from kaleb-himes/NO_FILESYSTEM_FIX
...
Remove file system constraint on wolfSSL_CTX_check_private_key()
2020-10-27 15:25:59 -07:00
John Safranek
6a77a8d8d6
Compatibility Layer
...
When making a AUTHORITY KEY object, if the ASN1 OBJECT fails, the key object is leaked.
2020-10-27 14:51:35 -07:00
David Garske
a43d239271
Fix for Sniffer with SSLv3 where SNI is not supported. ZD 11169.
2020-10-27 11:26:02 -07:00
David Garske
76e84e0830
Merge pull request #3423 from ejohnstown/nightly-test-fix
...
Nightly Scan-Build Test Fixes
2020-10-27 08:31:19 -07:00
kaleb-himes
f934fb03bd
Remove file system constraint on wolfSSL_CTX_check_private_key()
2020-10-27 08:57:46 -06:00
Sean Parkinson
fb2288c46d
RSA-PSS: Handle edge case with encoding message to hash
...
When the key is small relative to the digest (1024-bit key, 64-byte
hash, 61-byte salt length), the internal message to hash is larger than
the output size.
Allocate a buffer for the message when this happens.
2020-10-27 12:39:06 +10:00
John Safranek
7dbd6102d2
Compatibility Layer
...
When wolfSSL_X509_NAME_ENTRY_create_by_txt() needs to make a new ASN.1 object ID, actually store it in the name entry.
2020-10-26 16:10:44 -07:00
David Garske
2ebb47ec32
Merge pull request #3424 from douzzer/fix-save-vector-registers-gating
...
wc_port.h: improve/fix gating on {SAVE,RESTORE}_VECTOR_REGISTERS()
2020-10-26 15:33:00 -07:00
Daniel Pouzzner
fd5a309a47
wc_port.h: improve gating on {SAVE,RESTORE}_VECTOR_REGISTERS() to assure no-op fallback definitions in non-autotools builds.
2020-10-26 12:06:18 -05:00
Sean Parkinson
74b834a78c
Merge pull request #3422 from ejohnstown/ecc-name
...
Tautological Name Fix
2020-10-26 10:12:51 +10:00
John Safranek
9c1049f112
Compatibility Layer
...
1. Changed the ASN1_OBJECT member of the X509_NAME_ENTRY to be a pointer
rather than an object. It could lead to a double free on the name
entry.
2. The ASN1_OBJECT allocator should set the dynamic flag, as the
deallocator is the one that uses it.
3. General changes to treat the member as a pointer rather than a
member.
4. In the api test, we were iterating over the name members in the name
checking the NIDs. After the loop we freed the name member object.
This led to a double free error.
2020-10-25 14:38:07 -07:00
John Safranek
f5f883597e
RSA PSS Fix
...
1. Change the utility function in wc_encrypt that returns the size of a
hash to initialize the size to HASH_TYPE_E, like the other utility
functions.
2. When getting the hash size returns an error, RSA-PSS verify inline
should return a BAD_FUNC_ARG error.
2020-10-24 13:06:42 -07:00
John Safranek
3f5620089e
PKCS7: In EncodeEncryptedData, free the attribs and flattenedAttribs if
...
they were allocated, not based on if they should be allocated.
2020-10-24 12:41:10 -07:00
John Safranek
bfccf35eaf
Tautological Name Fix
...
Depending on the build option WOLFSSL_ECC_CURVE_STATIC, the name in the
ecc_set may be a pointer (default) or an array. With the above set with
the CFLAG -Wtautological-pointer-compare you'll get a build error.
Changed the comparison in the for loop with this problem to check the
name's pointer only if appropriate.
2020-10-23 15:23:16 -07:00
Takashi Kojo
277edbb514
fix for --disable-tls13 --enable-sniffer
2020-10-24 07:14:43 +09:00
Takashi Kojo
02536461e6
fix for --enable-opensslall --disable-sha224
2020-10-24 07:06:24 +09:00
David Garske
685a35e097
Add missing stdint.h reference.
2020-10-23 13:42:25 -07:00
Chris Conlon
e24ac4211d
Merge pull request #3405 from kojo1/EVP-gcm-zero
...
set tag including if(inl == 0) case
2020-10-23 14:35:47 -06:00
Ethan Looney
a5f86729f9
Deleted comment
2020-10-23 13:52:06 -06:00
David Garske
a50e88430f
Add OPENSSL_init_crypto and OPENSSL_init_ssl API's.
2020-10-23 12:13:08 -07:00
David Garske
6dbc1cb75d
Add support for TLS v1.3 compatibility API SSL_verify_client_post_handshake for the server-side to support rehandshake. Required for Apache v2.4.39 with TLS v1.3.
2020-10-23 12:13:08 -07:00
David Garske
589057245f
Improvement to ECC wc_ecc_rs_raw_to_sig to reduce memory use (avoid the mp_int). Additional test cases. Fixes for previous function changes.
2020-10-23 11:00:46 -07:00
Chris Conlon
c27d5f57c4
check PKCS7 content length is not larger than bundle if not using separate header/footer
2020-10-23 09:56:34 -07:00
John Safranek
a7b325f542
Merge pull request #3414 from kabuobeid/wolfrand_build_fix
...
Fix wolfrand build failure.
2020-10-22 22:54:05 -07:00
Sean Parkinson
24af0497b5
PKCS #11 : changes for signing and loading RSA public key from private
2020-10-23 14:02:59 +10:00
David Garske
ff092c02d2
Merge pull request #3396 from SparkiDev/fips_armasm
...
FIPS ARMASM: get build working
2020-10-22 15:26:24 -07:00
David Garske
05094460b2
Merge pull request #3353 from douzzer/XChaCha
...
XChaCha
2020-10-22 15:25:56 -07:00
Kareem Abuobeid
42583b5270
Fix wolfrand build failure, caused by defining NO_ASN without NO_CERTS.
2020-10-22 14:48:37 -07:00
Ethan Looney
2bd761bb4c
Added a case for logging.c unit test with debug not enabled
2020-10-22 14:51:07 -06:00
David Garske
0065756efc
Improvement to ECC wc_ecc_sig_to_rs to reduce memory use (avoid the mp_int).
2020-10-22 13:34:19 -07:00
David Garske
cb8e625e32
Fix to allow import of private key with ATECC. Its okay to load private key material into ecc_key struct.
2020-10-22 13:26:00 -07:00
tmael
6265006553
Merge pull request #3403 from elms/cppcheck/cleaup_fixes
...
Address some cppcheck issues
2020-10-22 12:56:19 -07:00
David Garske
be8e4d1949
Fix to reduce memory use with small stack on ECC key import.
2020-10-22 12:41:49 -07:00
Chris Conlon
1ced948391
check PKCS7 SignedData private key is valid before using it
2020-10-22 10:37:11 -07:00
Chris Conlon
df382f382f
fix case in PKCS7_VerifySignedData where pkiMsgSz may not be set correctly
2020-10-22 09:23:32 -07:00
David Garske
f75dc4727d
Merge pull request #3408 from ejohnstown/opt-fix
...
Example Client OCSP Option Fix
2020-10-22 09:00:04 -07:00
Chris Conlon
5e78a0107d
check Rc2EcbEncrypt/Decrypt returns during CBC ops
2020-10-22 09:57:34 -06:00
Chris Conlon
d1f13a6570
rearrange Rc2 struct for optimal alignment
2020-10-22 09:43:40 -06:00
John Safranek
e28303b40a
In DoServerKeyExchange(), when reading the DH key from the server, the
...
client was checking it too strictly. The pubkey value should be checked
as strictly as the generator, for too large. The public key value is
checked mathematically elsewhere.
2020-10-21 21:47:32 -07:00
Daniel Pouzzner
81849e64b8
scripts/openssl.test: for "-psk" cases, use "-psk key", not "-psk=key", for OpenSSL 1.0.2 compatibility.
2020-10-21 23:30:14 -05:00
John Safranek
ca7161a86f
Example Client OCSP Option Fix
...
1. Before checking to see if the must staple flag is on the 'W' option,
check the length of myoptarg.
2020-10-21 23:23:45 -05:00
John Safranek
d2dac8e4b8
Example Client OCSP Option Fix
...
1. Before checking to see if the must staple flag is on the 'W' option,
check the length of myoptarg.
2020-10-21 13:30:51 -07:00
Daniel Pouzzner
b468ea77ea
linuxkm: use EXPORT_SYMBOL_NS(x, WOLFSSL) if available, else fall back to EXPORT_SYMBOL(x).
2020-10-21 14:37:43 -05:00
Daniel Pouzzner
c910c94824
rename API wc_XChaCha20Poly1305_{encrypt,decrypt}_oneshot to wc_XChaCha20Poly1305_{Encrypt,Decrypt} for consistency; remove stray debugging printf in XChaCha20Poly1305_test().
2020-10-21 14:36:46 -05:00
Daniel Pouzzner
299e88a993
minor fixes and commentary.
2020-10-21 14:08:41 -05:00
Daniel Pouzzner
99b76241bd
wolfcrypt/test/test.c: remove debugging printf in XChaCha20Poly1305_test().
2020-10-21 14:08:41 -05:00
Daniel Pouzzner
e1d3f2c7b4
chacha20_poly1305.c: add _SMALL_STACK code in wc_XChaCha20Poly1305_crypt_oneshot().
2020-10-21 14:08:41 -05:00
Daniel Pouzzner
1949378d61
wc_Chacha_purge_current_block(): init "scratch" buffer to zeros, to avoid "garbage value" warnings.
2020-10-21 14:08:41 -05:00
Daniel Pouzzner
f65947ae09
rename wc_XChaCha_init() to wc_XChacha_SetKey() for consistency, and add a counter argument to provide for future random access scenarios; refactor wc_Chacha_purge_current_block() to use a dummy wc_Chacha_Process() call for intrinsically correct counter dynamics.
2020-10-21 14:08:41 -05:00
Daniel Pouzzner
6142c22948
add wc_XChaCha_init(), wc_XChaCha20Poly1305_Init(), wc_XChaCha20Poly1305_encrypt_oneshot(), wc_XChaCha20Poly1305_decrypt_oneshot(), and wc_Poly1305_EncodeSizes64(). also, remove redundant arg check (typo) in wc_Poly1305Update().
2020-10-21 14:08:41 -05:00
Elms
c3dba3f9af
Add additional checks to sp_ecc_point_new
2020-10-21 09:59:39 -07:00
Sean Parkinson
00ee24b998
ECC Shamir's Trick: infinity in precomp
...
Code now handles generating and having infinity in the precomp.
2020-10-21 11:58:31 +10:00
toddouska
e4eda3e125
Merge pull request #3384 from SparkiDev/tls13_sess_tick_compat
...
TLS session tickets: cannot share between TLS 1.3 and TLS 1.2
2020-10-20 15:56:03 -07:00
toddouska
7aae784a53
Merge pull request #3399 from dgarske/zd11128
...
Fix for TLS sniffer with non-standard curves
2020-10-20 15:14:53 -07:00
toddouska
7c38be407c
Merge pull request #3398 from dgarske/async_test
...
Fixes for `--enable-asynccrypt` tests
2020-10-20 15:13:51 -07:00
toddouska
a1afc6ca4f
Merge pull request #3389 from tmael/ocsp_status
...
Process multiple OCSP responses
2020-10-20 15:11:42 -07:00
toddouska
1e43d65d2a
Merge pull request #3392 from SparkiDev/ocsp_must_staple
...
TLS OCSP Stapling: MUST staple option
2020-10-20 15:07:08 -07:00
Sean Parkinson
ffd55ac1fe
Merge pull request #3406 from ejohnstown/dh-fix-2
...
DH Fix 2
2020-10-21 08:05:42 +10:00
toddouska
c863ca54a3
Merge pull request #3308 from julek-wolfssl/thread-safety
...
Introduce thread safety to unsafe functions in wolfSSL
2020-10-20 14:56:04 -07:00
toddouska
7c89d10e53
Merge pull request #3260 from julek-wolfssl/non-blocking-scr
...
(D)TLS non-blocking SCR with example
2020-10-20 13:45:19 -07:00
John Safranek
2c5a4ba508
DH Fix 2
...
1. Add some missing frees for the error cases when the server DH public
key is rejected.
2020-10-20 10:32:09 -07:00
David Garske
a575403ca3
Merge pull request #3404 from haydenroche5/cmake
...
Tweak CMakeLists.txt
2020-10-20 06:58:00 -07:00
Takashi Kojo
6767646e54
set tag for zero len case
2020-10-20 19:11:35 +09:00
Sean Parkinson
ebde736ee7
Merge pull request #3400 from ejohnstown/dh-fix
...
DH Fix
2020-10-20 11:45:18 +10:00
David Garske
fb35013bf2
Merge pull request #3402 from douzzer/lkm-kernel_time_t
...
Linux __kernel_time_t version test
2020-10-19 17:28:48 -07:00
Hayden Roche
06977ebbdf
Tweak CMakeLists.txt
...
- Change minimum CMake version from 2.6 to 3.0, which has support for targets.
- Favor explicit file lists in CMakeLists.txt over globs.
- Use target_compile_options to specify -DNO_MAIN_DRIVER for the unit_test target.
2020-10-19 16:38:51 -05:00
Hayden Roche
31b6c507f9
Tweak CMakeLists.txt
...
- Add generated CMake files/directories to .gitignore.
- Use lowercase for CMake commands, UPPERCASE for variables.
- Favor the CMake "option" command over SET(... CACHE BOOL ...).
- Use CMAKE_CURRENT_SOURCE_DIR in place of CMAKE_CURRENT_BINARY_DIR.
- Use CMAKE_USE_PTHREADS_INIT instead of CMAKE_HAVE_PTHREAD_H.
- Use target_include_directories on the wolfssl library target instead of include_directories.
2020-10-19 16:07:48 -05:00
Elms
86b2118550
Address some cppcheck issues
2020-10-19 11:47:53 -07:00
Daniel Pouzzner
48f4b927f6
wc_port.h: fix threshold of change in __kernel_time_t typedef from kernel 5.0.0 to 5.5.0 to accommodate Ubuntu 20.02 (kernel 5.4) -- see 2a785996cc (diff-2cd5bedb19d5e0a575d6f73a6c3290ecf8d9c01eb7567ba6fa282cb1b0ce2d54)
2020-10-19 13:27:00 -05:00
John Safranek
cd05ed3347
iDH Fix
...
1. Changed the bounds of checking the key from comparisons to constants
to comparisons against WOLFSSL object settings for the DH key bounds.
2. Removed redundant bounds check on the server's prime.
2020-10-19 08:08:04 -07:00
Chris Conlon
79dea1c85c
add test-servercert-rc2.p12 to include.am
2020-10-19 08:01:19 -06:00
Juliusz Sosinowicz
147cb8e60c
Jenkins scope fixes
2020-10-19 12:46:11 +02:00
Sean Parkinson
f0d400a506
Merge pull request #3401 from kojo1/EVPcipher_tbl
...
cipher_tbl for EVP_get_cipherbyname
2020-10-19 14:28:59 +10:00
Takashi Kojo
a87f7c9185
cipher_tbl for EVP_get_cipherbyname
2020-10-19 06:17:15 +09:00
John Safranek
4f8c2b971f
Move the binSz check variable to a spot where it is only declared in the same condition it is used and initialize it to zero.
2020-10-17 19:07:44 -07:00
John Safranek
fc86e6a960
Fix a double error return.
2020-10-16 18:18:47 -07:00
John Safranek
ec0aab1a23
DH Fix
...
1. Check the length values for the DH key domain and public key in the
server key exchange message to make sure they are within the bounds
set by the configuration. (Minimum key size is 2048 bits for DH.)
2020-10-16 16:28:27 -07:00
David Garske
85b4170047
Fix for TLS sniffer with non-standard curves. If curve not provided in key share data, then use private key curve. ZD 11128.
2020-10-16 16:13:42 -07:00
David Garske
fbd98be7af
Fixes for --enable-asynccrypt tests after PR #3244 .
2020-10-16 15:55:17 -07:00
John Safranek
4364700c01
DH Fix
...
These changes fix several fuzz testing reports. (ZD 11088 and ZD 11101)
1. In GetDhPublicKey(), the DH Pubkey is owned by the SSL session. It
doesn't need to be in the check for weOwnDh before freeing. There
could be a chance it leaks.
2. In GeneratePublicDh() and GeneratePrivateDh(), the size of the
destination buffer should be stored at the location pointed to by the
size pointer. Check that before writing into the destination buffer.
3. Ensure the size of the private and public key values are in the size
value before generating or getting the DH keys.
2020-10-16 15:35:23 -07:00
Chris Conlon
d4bbe529fb
switch RC2 struct name to Rc2 for consistent camel case across algorithms
2020-10-16 15:19:47 -06:00
Chris Conlon
062df01737
add PKCS12 RC2 test case, example p12 bundle
2020-10-16 12:02:20 -06:00
Chris Conlon
2c0f4b619e
add RC2-40-CBC support to PKCS#12 parsing
2020-10-16 12:02:20 -06:00
Chris Conlon
0854efe168
add API unit tests for RC2
2020-10-16 12:02:20 -06:00
Chris Conlon
a6923ff100
initial implementation of RC2-CBC
2020-10-16 12:02:16 -06:00
Chris Conlon
4c75037bdb
initial implementation of RC2-ECB
2020-10-16 12:00:56 -06:00
David Garske
b58ea5842a
wolfSSL RC2 template.
2020-10-16 11:46:40 -06:00
Juliusz Sosinowicz
24030d5f32
Move globalRNG and co to ssl.c
2020-10-16 17:33:28 +02:00
David Garske
ab88ab160c
Merge pull request #3395 from douzzer/misc-fixes-20201015
...
misc fixes for coverage and buildability
2020-10-16 07:28:48 -07:00
Sean Parkinson
aeb44c5352
FIPS ARMASM: get build working
2020-10-16 16:41:18 +10:00
Sean Parkinson
07e69829d7
TLS 1.3 PSK: fix for session ticket timeout
...
Return straightaway if the ticket is out of date.
Need to fallback to full handshake.
2020-10-16 14:48:29 +10:00
Sean Parkinson
a595e3cc48
Merge pull request #3394 from ejohnstown/wolfssh-update
...
wolfSSH Update
2020-10-16 09:08:37 +10:00
Sean Parkinson
60b0b0170b
TLS OCSP Stapling: MUST staple option
...
Can enable OCSP Must Staple option to mean that if the client sends a
request for an OCSP Staple then it must receive a response.
2020-10-16 09:03:27 +10:00
David Garske
9793414d78
Merge pull request #3381 from SparkiDev/ecc_ct_fix
...
ECC mulmod: some curves can't do order-1
2020-10-15 14:46:46 -07:00
Daniel Pouzzner
eb7a79aa5e
misc fixes for coverage and buildability: add MD2 to --enable-all*; fix spelling of "Sno" to "no" for $ENABLED_BLAKE2S default; when ENABLED_QSH add -DWOLFSSL_STATIC_DH -DWOLFSSL_STATIC_PSK (relates to ZD11073); add missing gating for !defined(WOLFSSL_DEVCRYPTO) in api.c:test_wc_Sha256FinalRaw(); fix tests/api.c:IsValidCipherSuite() to build under gcc10 (relates to ZD11073).
2020-10-15 15:05:29 -05:00
John Safranek
69ac13c2e9
wolfSSH Update
...
Originally, wolfSSH required some algorithms to be enabled in wolfCrypt
to work correctly. wolfSSH is now more flexible with how wolfCrypt is
configured, and these combinations do not have to be restricted.
2020-10-15 11:37:31 -07:00
David Garske
49b3fb21c8
Merge pull request #3391 from ejohnstown/autoconf-fix
...
Automake Fixes
2020-10-15 10:12:27 -07:00
Sean Parkinson
134e1be189
TLS session tickets: cannot share between TLS 1.3 and TLS 1.2
...
When parsing ticket, check TLS version to see whether they are version
compatible.
2020-10-15 13:02:06 +10:00
John Safranek
c2bb359eb4
Automake Fixes
...
1. A couple cert scripts don't need to be included in the makefile or the distribution.
2020-10-14 17:23:58 -07:00
toddouska
f69fa13e02
Merge pull request #3357 from guidovranken/StoreECC_DSA_Sig-fix
...
Improve StoreECC_DSA_Sig bounds checking
2020-10-14 16:53:46 -07:00
David Garske
b18d43abb9
Fix for possible uninitialized use of prev.
2020-10-14 15:52:51 -07:00
toddouska
026ba4e750
Merge pull request #3368 from dgarske/zd11057
...
Fix for possible malformed encrypted key with DES3 causing negative length
2020-10-14 15:32:48 -07:00
David Garske
751f64b4aa
Fix for OCSP single response last optional part handling and restore original size arg since its required for the ASN elements.
2020-10-14 14:55:18 -07:00
David Garske
10b1884993
Added support for handling an OCSP response with multiple status responses.
2020-10-14 14:47:24 -07:00
toddouska
1c4b15d427
Merge pull request #3369 from dgarske/sniffer_ccm
...
Add AES CCM support to sniffer
2020-10-14 14:31:57 -07:00
toddouska
8898abcc99
Merge pull request #3378 from dgarske/zd11085
...
Fixes SSLv3 use of ECDH in sniffer
2020-10-14 14:30:15 -07:00
toddouska
3f4bf9144b
Merge pull request #3366 from SparkiDev/pkcs11_lookup
...
PKCS #11 : improve key lookup
2020-10-14 14:22:56 -07:00
Tesfa Mael
5ac3e7d542
Process multiple ocsp responses
2020-10-14 01:10:07 -07:00
David Garske
232028d03b
Merge pull request #3386 from ejohnstown/dh-maint
...
Fuzz Fix
2020-10-13 15:47:11 -07:00
David Garske
b68828d3c9
Merge pull request #3361 from tmael/ocsp-nocheck
...
Add support for id-pkix-ocsp-nocheck
2020-10-13 15:46:02 -07:00
David Garske
048a3a8d5b
Merge pull request #3374 from JacobBarthelmeh/Testing
...
NO_FILESYSTEM build on Windows
2020-10-13 13:26:46 -07:00
John Safranek
422683f4c3
Fuzz Fix
...
GetPublicDhKey() assumes the ssl session owns the DH public key parts, and
tries to free them. They belong to the CTX initially, so it shouldn't be
freeing them, necessarily.
1. Add a check for weOwnDh first, then free the buffers if needed.
2. If there is a problem reading the keys, free the new buffers before exiting.
3. Set weOwnDh once the buffers and values have been stored
successfully.
2020-10-13 10:15:58 -07:00
Jacob Barthelmeh
6aa0eacc62
use correct key buffer for example private key
2020-10-13 09:26:54 -06:00
Sean Parkinson
f0db2c177e
ECC mulmod: some curves can't do order-1
...
Change implementation of timing resistant scalar multiplication to use
Joye double-add ladder.
No longer have fake operations being performed therefore can remove the
order adding operations.
Still need to check for boundary condition: order-1 wil not work with
SECP256K1 as it results in an add of order/2 and (order/2)+1 times base
point which are the negatives of each other. The sum is infinity and not
handled by maths.
Added mp_cond_swap_t - Conditionally swap in constant time.
2020-10-13 09:55:35 +10:00
David Garske
0d685e4f28
Merge pull request #3358 from douzzer/wolfSSL_get_ocsp_producedDate
...
add wolfSSL_get_ocsp_producedDate().
2020-10-12 15:21:10 -07:00
David Garske
de6164df5a
Merge pull request #3382 from ejohnstown/aes-clear
...
AES Clear Temp
2020-10-12 15:17:00 -07:00
David Garske
4396e10500
Merge pull request #3379 from ejohnstown/mfix
...
Maintenance Fixes
2020-10-12 14:53:56 -07:00
Chris Conlon
1f78297c5c
Merge pull request #3372 from miyazakh/Renesas_APRA6M
...
added set up guide for APRA6M board
2020-10-12 14:23:06 -06:00
Chris Conlon
2a1efda140
Merge pull request #3380 from kojo1/mqx
...
minor fix for MQX, Kinetis
2020-10-12 14:03:20 -06:00
kaleb-himes
8826823724
In ACVP testing NIST needs to see failed decryption output
2020-10-12 12:05:44 -06:00
John Safranek
5ead4386b3
AES Clear Temp
...
ForceZero()'ed a couple local variables that have keying material at some point.
2020-10-12 10:30:34 -07:00
John Safranek
0ca202f389
Rename SKIP_SUITE to something more descriptive. Add some comments.
2020-10-12 09:49:02 -07:00
Tesfa Mael
a4bfa0dec7
Add support for id-pkix-ocsp-nocheck
2020-10-11 19:47:50 -07:00
Takashi Kojo
ce97eadae1
fix for MQX
2020-10-11 06:57:33 +09:00
Daniel Pouzzner
9de5eea1d9
configure.ac: supplement AC_CHECK_FUNCS() (function link test) with AC_CHECK_DECLS() (function declaration test) to avoid false positives. fixes various build failure modes.
2020-10-09 22:18:51 -05:00
Hideki Miyazaki
bf59d169dd
Update include.am to include new README files
2020-10-10 09:57:05 +09:00
John Safranek
a05a305d70
Fix unused parameters in SKIP_SUITE.
2020-10-09 15:59:14 -07:00
John Safranek
6cfb038d11
Fix a bad ifdef.
2020-10-09 15:54:44 -07:00
John Safranek
2d85061c47
Maintenance Fixes
...
Improve the reporting of the NTRU based cipher suites with the function
wolfSSL_sk_CIPHER_description().
2020-10-09 15:01:39 -07:00
John Safranek
d8299e2764
Maintenance Fixes
...
When building the list of ciphers with wolfSSL_get_ciphers_compat(),
skip the fake indicator ciphers like the renegotiation indication
and the quantum-safe hybrid since they do not have encryption or mac
algorithms associated to them.
2020-10-09 15:01:38 -07:00
John Safranek
aeeeb666a7
Maintenance Fixes
...
1. The test_wolfSSL_X509V3_EXT_print() test was using stderr for output,
changed to stdout.
2. A call to XFREAD wasn't typecasting its output to the size of the
variable getting the output in decodedCertCache_test().
2020-10-09 15:01:32 -07:00
John Safranek
724eb96047
Merge pull request #3377 from douzzer/PR3371
...
fix pkcs7compressed_test() (test gated on HAVE_LIBZ), broken by PR#3244.
2020-10-09 15:00:15 -07:00
David Garske
f3fbb921c0
Fixes SSLv3 use of ECDH. The public key length byte needs to be skipped for import with SSLv3 and TLS (not TLS v1.3). ZD 11085
2020-10-09 12:01:41 -07:00
Daniel Pouzzner
29d4de6307
fix pkcs7compressed_test() (test gated on HAVE_LIBZ), broken by PR#3244.
2020-10-09 12:42:14 -05:00
JacobBarthelmeh
bfb10ddfb5
NO_FILESYSTEM build on Windows
2020-10-09 09:45:00 -07:00
David Garske
3e69318ac7
Merge pull request #3373 from danielinux/imx-rt1060-shaonly-fix
...
Fixed SHA256 support for IMX-RT1060
2020-10-09 09:30:11 -07:00
Daniele Lacamera
9cb2c9f1ac
Fixed SHA256 support for IMX-RT1060
2020-10-09 13:36:53 +02:00
Hideki Miyazaki
1765eeddb2
added set up guide for APRA6M board
...
added TLS 1.3 settings into user_settings.h
2020-10-09 19:52:20 +09:00
Daniel Pouzzner
570f55a0e3
wolfSSL_get_ocsp_producedDate*(): gate on !defined(NO_ASN_TIME), and in client_test(), gate call to strftime() on HAVE_STRFTIME and add fallback code; add HAVE_STRFTIME test to configure.ac.
2020-10-08 23:26:28 -05:00
Daniel Pouzzner
7a77b6d990
rename wolfSSL_get_ocsp_producedDate(WOLFSSL *, struct tm *) to wolfSSL_get_ocsp_producedDate_tm(), and add wolfSSL_get_ocsp_producedDate() accessing the raw ASN.1 producedDate; fix location of prototypes in ssl.h to obtain proper conditionalization; omit frivolous nullness test on ssl->ocspProducedDate (always true).
2020-10-08 22:47:16 -05:00
Daniel Pouzzner
e162d0f889
add wolfSSL_get_ocsp_producedDate().
2020-10-08 22:47:16 -05:00
toddouska
4d11e3c83b
Merge pull request #3365 from SparkiDev/ticket_align
...
SSL session ticket: decrypted ticket access aligned
2020-10-08 15:01:41 -07:00
toddouska
8bc3d33c4e
Merge pull request #3360 from SparkiDev/ecc_safe_add
...
ECC add points: more cases where add point is a double or infinity
2020-10-08 14:55:04 -07:00
toddouska
f0c5fb76bb
Merge pull request #3359 from ejohnstown/tfm-read-radix-16
...
TFM Read Radix 16 OOB Read
2020-10-08 14:52:42 -07:00
toddouska
c69e9927fa
Merge pull request #3354 from SparkiDev/mac_arm_asm_2
...
ARM ASM ChaCha20: Fix calc of left over bytes
2020-10-08 14:49:33 -07:00
toddouska
6b4b92a549
Merge pull request #3356 from embhorn/zd11044
...
Allow wolfSSL_EVP_get_hashinfo with x509small
2020-10-08 14:48:28 -07:00
toddouska
e0f3ceefa2
Merge pull request #3349 from vaintroub/remove_gccism
...
#3348 - Fix MSVC build
2020-10-08 14:47:15 -07:00
David Garske
8a57eead51
Add AES CCM support to sniffer. ZD 11078.
2020-10-08 13:58:31 -07:00
David Garske
d33d100526
Fix for possible malformed encrypted key with DES3 causing negative length. If length is less than DES_BLOCK_SIZE then it could result in a negative der->length. ZD 11057
2020-10-08 13:07:07 -07:00
JacobBarthelmeh
46f8f53268
Merge pull request #3367 from kaleb-himes/NTRU_MAINTENANCE
...
Fix NTRU + QSH build
2020-10-08 14:04:21 -06:00
kaleb-himes
d9eaeb4a3b
Fix NTRU + QSH build
2020-10-08 09:13:00 -06:00
Sean Parkinson
15aa0a2f8c
PKCS #11 : improve key lookup
...
Refactor the find key by template to eliminate duplicate code.
Improve documentation.
Add more informative debugging information.
2020-10-08 13:36:30 +10:00
Sean Parkinson
4f6c1db9a2
Merge pull request #3355 from douzzer/enable-more-all
...
--enable-all coverage update, plus --enable-all-crypto and --enable-linuxkm-defaults
2020-10-08 09:52:56 +10:00
Sean Parkinson
257551b134
ECC add points: more cases where add point is a double or infinity
...
Extract method to perform safe point add (handling double and infinity
result).
Replace all instances of the extracted code.
2020-10-08 09:26:10 +10:00
Sean Parkinson
8d82fb2add
SSL session ticket: decrypted ticket access aligned
...
Decrypted session ticket using encrypted ticket buffer.
Alignment not correct on platforms requiring 32-bit aligned access.
Copy the decrypted data into temporary for access.
Also zeroize the unencrypted tickets after use.
2020-10-08 08:56:49 +10:00
Sean Parkinson
270da3c33c
Merge pull request #3364 from dgarske/zd11064
...
Fix for sniffer without TLS v1.3
2020-10-08 08:10:21 +10:00
David Garske
4f3632c7a6
Fix for sniffer without TLS v1.3 (--enable-sniffer --disable-tls13). ZD11064.
2020-10-07 11:08:05 -07:00
Daniel Pouzzner
1c492dc0b6
cosmetic cleanups.
2020-10-06 22:14:08 -05:00
John Safranek
413b0d171d
TFM Read Radix 16 OOB Read
...
Change the location of the update of the write index when in
fp_read_radix_16(). It will do multiple writes into a word, and update
the index when the word is full and there is more to write. If there
isn't more to write, the index isn't incremented. This ensures the used
value in the mp_digit is correct, and not off-by-one when the last word
is full.
2020-10-06 17:03:03 -07:00
Guido Vranken
4c5c1d5dac
Improve StoreECC_DSA_Sig bounds checking
2020-10-06 23:11:50 +02:00
Eric Blankenhorn
6bc34cb1a8
Allow wolfSSL_EVP_get_hashinfo with x509small
2020-10-06 11:18:08 -05:00
Juliusz Sosinowicz
a7fdfbaf40
Passing scr-app-data in to -i to client sends a message during SCR
...
Modify mygetopt so that if an argument expects a value and that value is the next argument then myoptarg is set to a NULL pointer.
2020-10-06 17:28:23 +02:00
Daniel Pouzzner
c18f7010cf
configure.ac: remove enable_apachehttpd and enable_secure_renegotiation from new --enable-all (valgrind woes).
2020-10-02 18:54:45 -05:00
Kaleb Himes
84ee1509b7
Merge pull request #3311 from tmael/neclab
...
Update release notes
2020-10-02 15:50:20 -06:00
Daniel Pouzzner
d900e57ae4
improve --enable-linuxkm-defaults fidelity.
2020-10-01 18:07:48 -05:00
Chris Conlon
232eb6a620
Merge pull request #3323 from danielinux/nxp_imxrt_dcp
...
Added support for NXP DCP (i.MX-RT series)
2020-10-01 16:44:58 -06:00
Daniel Pouzzner
a522207b14
fix memory leaks in src/internal.c:DoSessionTicket() and testsuite/testsuite.c:file_test().
2020-10-01 14:38:26 -05:00
Daniel Pouzzner
2ed8f93592
src/internal.c: fix memory leaks in ProcessPeerCerts() and GetDhPublicKey().
2020-10-01 14:38:26 -05:00
Daniel Pouzzner
7fb8457459
fix whitespace.
2020-10-01 14:38:26 -05:00
Daniel Pouzzner
c37ba164bf
configure.ac: don't include enable_certgencache=yes in --enable-all[-crypto] feature sets, to avoid memory leak false alarms.
2020-10-01 14:38:26 -05:00
Daniel Pouzzner
24b20352f8
configure.ac: refactor-for-clarity enable-all[-crypto] feature selection logic conditionalized on sp-math and linuxkm.
2020-10-01 14:38:26 -05:00
Daniel Pouzzner
a3185310ca
tests/api.c: clean up and parameterize key/buffers sizes in test_wc_CheckProbablePrime().
2020-10-01 14:38:26 -05:00
Daniel Pouzzner
70474659a0
wc_ShaFinal(): remove superfluous ret=0 when WOLF_CRYPTO_CB, complained by PRB-scan-build-distro-check.
2020-10-01 14:38:26 -05:00
Daniel Pouzzner
fd3815c708
configure.ac: include enable_xchacha in --enable-all-crypto.
2020-10-01 14:38:26 -05:00
Daniel Pouzzner
a4bd213099
configure.ac: improve --enable-all coverage and make it compatible with --enable-sp-math, add --enable-all-crypto (crypto-only subset of --enable-all), and add --enable-linuxkm-defaults ("Enable feature defaults for Linux Kernel Module").
2020-10-01 14:38:26 -05:00
Daniel Pouzzner
79978f5c7a
ecc_check_pubkey_order(): add missing braces.
2020-10-01 14:38:26 -05:00
Daniel Pouzzner
3ef242e889
tests/api.c: change RSA keysize from 1024 to 2048 for sp-math compatibility, in test_wc_CheckProbablePrime(), test_wc_CheckProbablePrime(), test_wc_RsaPSS_Verify(), test_wc_RsaPSS_VerifyCheck(), test_wc_RsaPSS_VerifyCheck(), test_wc_RsaPSS_VerifyCheckInline(), and test_wolfSSL_DC_cert().
2020-10-01 14:38:26 -05:00
Daniele Lacamera
cec3d542d1
Rework of DCP after reviewer's comments.
...
- using wolfSSL_CryptHwMutexLock/UnLock as DCP mutex.
- fixed AES Free
- using separate per-channel key store
2020-10-01 11:36:03 -07:00
Daniele Lacamera
ce62f46442
Fixed comments
2020-10-01 11:36:03 -07:00
Daniele Lacamera
9244bbbf83
NXP-DCP: Fixed AES-GCM setkey; added AES direct.
2020-10-01 11:36:03 -07:00
Daniele Lacamera
05098f7ab8
Reentrant DCP driver. DCP protected by mutex.
2020-10-01 11:36:03 -07:00
Daniele Lacamera
a07f9ded63
Added support for NXP DCP (i.MX-RT series)
2020-10-01 11:36:03 -07:00
David Garske
050252e5d4
Merge pull request #3340 from kabuobeid/fsanitize_thread
...
Fix issues found by -fsanitize=thread.
2020-10-01 11:28:05 -07:00
Kareem Abuobeid
d59784e646
Fix issues found by -fsanitize=thread.
2020-09-30 14:24:20 -07:00
toddouska
20d28e1b65
Merge pull request #3221 from julek-wolfssl/wolfSSL_dtls_import-const-buf
...
Change buffer in wolfSSL_dtls_import to be const
2020-09-30 10:45:25 -07:00
toddouska
bb6c612209
Merge pull request #3312 from kabuobeid/apple_arm64
...
Added instructions for building for Apple ARM64.
2020-09-30 10:44:22 -07:00
toddouska
74259fe9ce
Merge pull request #3351 from dgarske/sniffer_sesstick
...
Fix for sniffer with TLS v1.2 session ticket
2020-09-30 10:42:56 -07:00
toddouska
9bfe4f1fb2
Merge pull request #3341 from SparkiDev/fp_sqr_size
...
TFM mp_sqr: error on number overflow
2020-09-30 10:35:01 -07:00
Sean Parkinson
f76165a3fa
ARM ASM ChaCha20: Fix calc of left over bytes
2020-09-30 15:57:33 +10:00
Sean Parkinson
a1991da458
TFM mp_sqr: error on number overflow
...
Change mp_sqr to return an error if the result won't fit into the fixed
length dp.
2020-09-30 08:54:20 +10:00
Kareem Abuobeid
0a791a957e
Added instructions for building for Apple ARM64.
2020-09-29 15:12:34 -07:00
toddouska
fc988ad3e7
Merge pull request #3325 from julek-wolfssl/openssl-compat-aes-gcm-2-part-aad
...
Buffer AAD in wolfSSL_EVP_CipherUpdate_GCM so that whole value is hashed
2020-09-29 13:46:44 -07:00
toddouska
d415bbf2eb
Merge pull request #3346 from SparkiDev/mac_arm_asm
...
ARM asm: fixes for compiling on Mac and ChaCha20 streaming
2020-09-29 13:36:13 -07:00
David Garske
3e0d478543
Fix for sniffer with TLS v1.2 session ticket. Logic broken in PR #3044 . ZD 10926.
2020-09-29 11:11:32 -07:00
Juliusz Sosinowicz
2153009efa
Fix access violation in Visual Studio Test
2020-09-29 19:47:58 +02:00
Vladislav Vaintroub
efe7c42775
Fix MSVC build
...
Don't use GCC-specific extensions
Fixes #3348
2020-09-29 18:00:21 +02:00
Juliusz Sosinowicz
52be7c94b8
Introduce thread safety to unsafe functions in wolfSSL
...
Add warnings to one shot hash functions
2020-09-29 16:29:45 +02:00
Juliusz Sosinowicz
78e003e7de
Plug leak
2020-09-29 12:24:59 +02:00
Sean Parkinson
66ed9b1522
ARM asm: fixes for compiling on Mac and ChaCha20 streaming
...
Don't set the CPU to generic on Mac.
Implement streaming for ChaCha20.
2020-09-29 13:38:02 +10:00
Sean Parkinson
46b9531bec
Merge pull request #3345 from dgarske/sp_spell
...
Fix spelling error and sync with latest scripts
2020-09-29 08:46:52 +10:00
David Garske
30a74e0597
Merge pull request #3343 from ejohnstown/test-ecc521
...
Test ECC-521 Only
2020-09-28 14:06:42 -07:00
Juliusz Sosinowicz
07f6c19156
Update EVP_CIPHER to handle multi-part AAD
2020-09-28 20:42:23 +02:00
David Garske
a85c93e44a
Fix spelling error and sync with latest scripts.
2020-09-28 10:41:31 -07:00
toddouska
d01dae00bc
Merge pull request #3342 from SparkiDev/arm64_clang_fix
...
SP ARM64: Fix assembly for clang
2020-09-28 09:57:19 -07:00
John Safranek
dbf18b8532
Test ECC-521 Only
...
Update benchmark and wolfcrypt test to support using only ECC-521 in a custom curve list.
2020-09-28 09:22:24 -07:00
Chris Conlon
d143015059
Merge pull request #3336 from ethanlooney/26th_branch
...
Added unit test for Des3
2020-09-28 10:14:31 -06:00
Juliusz Sosinowicz
942168c62d
Add decrypt tests
2020-09-28 15:59:50 +02:00
Sean Parkinson
b61b3e34dd
SP ARM64: Fix assembly for clang
...
clang doesn't auto correct size of register (declared byte n but 64-bit
usage)
clang doesn't always handle use of x29 (FP or Frame Pointer) in inline
assembly code correctly - reworked sp_2048_sqr_8 to not use x29.
2020-09-28 12:35:58 +10:00
David Garske
7d33312f4b
Merge pull request #3339 from ejohnstown/dtls-flag
...
DTLS Flag
2020-09-25 17:05:22 -07:00
toddouska
e1f54b1df1
Merge pull request #3296 from dgarske/sniffer_fixes
...
Fixes for Sniffer (Max Fragment, ECC Static and SNI)
2020-09-25 12:50:07 -07:00
toddouska
8266680ab7
Merge pull request #3338 from SparkiDev/dh_fips3
...
DH EXTRA test: Disable DH test unless not FIPS or FIPS > 2
2020-09-25 12:42:40 -07:00
Ethan Looney
e49505fbb8
Added key free
2020-09-25 13:42:19 -06:00
toddouska
6f1d626671
Merge pull request #3337 from SparkiDev/evp_xts_3
...
EVP AES XTS: check correct define
2020-09-25 12:42:09 -07:00
toddouska
2d97acadc9
Merge pull request #3331 from dgarske/armasm
...
Fixes for ARM ASM and API unit test bad build macros
2020-09-25 12:41:30 -07:00
John Safranek
b36877c20b
DTLS Flag
...
Fix an ifdef flag that should have been WOLFSSL_DTLS, not HAVE_DTLS.
2020-09-25 10:49:34 -07:00
Juliusz Sosinowicz
84f0fc56ef
check ClientWrite return
2020-09-25 11:35:23 +02:00
Juliusz Sosinowicz
7e38b6bee6
Test 2 part GCM data and EVP context re-use
2020-09-25 11:03:58 +02:00
Sean Parkinson
c798c7f396
DH EXTRA test: Disable DH test unless not FIPS or FIPS > 2
...
statickeys/dh-ffdhe2048.der is an alternate format that is supported
when WOLFSSL_DH_EXTRA is defined.
The decoding is not supported when FIPS and FIPS version is less than 3.
Fix test to not use file unless not FIPS or FIPS > 2.
2020-09-25 11:41:59 +10:00
Sean Parkinson
d514189710
EVP AES XTS: check correct define
...
HAVE_AES_CTX -> WOLFSSL_AES_XTS
2020-09-25 11:17:04 +10:00
David Garske
5ef5c279b5
Fix for previous max fragment commit to correctly process a TLS packet with multiple handshake messages. Fix to free the wolfSSL objects first then wolfSSL_CTX.
2020-09-24 15:53:12 -07:00
David Garske
bbaf4090b8
Fixes for sniffer when using static ECC keys. Adds TLS v1.2 ECC key fallback detection and fixes new ECC RNG requirement for timing resistance.
2020-09-24 15:03:26 -07:00
Ethan Looney
4662690fdc
Added unit test for Des3
2020-09-24 14:05:14 -06:00
David Garske
7cfbc598ed
Fix to not assume TLS v1.3 based on extended key share extension.
2020-09-24 13:05:01 -07:00
David Garske
bc960a9c25
Fix for sniffer with SNI enabled to properly handle WOLFSSL_SUCCESS error code in ProcessClientHello. ZD 10926
2020-09-24 13:05:01 -07:00
David Garske
adedde7d16
Fix to not treat cert/key not found as error in myWatchCb and WOLFSSL_SNIFFER_WATCH. The key can be pased as argument to ./snifftest and if built with sniffer watch let's keep trying to parse instead of throwing an error.
2020-09-24 13:05:01 -07:00
David Garske
7e2d44ba9a
Fix possible unused rhSize.
2020-09-24 13:05:01 -07:00
David Garske
b5163bd1fa
Added support for 802.11Q VLAN frames. Fix build error with unused "ret" when building with WOLFSSL_SNIFFER_WATCH. Fixed bad characters in sniffer README.md configure example.
2020-09-24 13:05:01 -07:00
David Garske
ce1c1fe0a6
Fix for sniffer using HAVE_MAX_FRAGMENT in "certificate" type message. ZD 10903
2020-09-24 13:05:01 -07:00
toddouska
1668f6f626
Merge pull request #3244 from douzzer/20200820-linuxkm
...
Linux Kernel Module support
2020-09-24 12:57:22 -07:00
toddouska
1eed409bdf
Merge pull request #3332 from SparkiDev/sp_cortexm_fix_1
...
SP Cortex-M4 assembly: Fix for GCC compile
2020-09-24 12:55:21 -07:00
toddouska
1e293e4be4
Merge pull request #3321 from SparkiDev/evp_xts_2
...
EVP CIPHER: fix block size, mode and table
2020-09-24 12:49:38 -07:00
toddouska
d75d3108b0
Merge pull request #3314 from SparkiDev/evp_hmac_sha3
...
Test wolfSSL_HMAC with SHA-3
2020-09-24 12:48:40 -07:00
Chris Conlon
b3fc5eb254
Merge pull request #3326 from ethanlooney/25th_branch
...
Added unit tests for PKCS7
2020-09-24 13:33:57 -06:00
Chris Conlon
679b107044
Merge pull request #3333 from miyazakh/espidf_pkcs7
...
add user settings of pkcs7 for ESP-IDF port
2020-09-24 09:58:00 -06:00
Chris Conlon
6780e5eb0b
Merge pull request #3290 from ethanlooney/22nd_branch
...
Added unit tests for RSA.c
2020-09-24 09:54:11 -06:00
Hideki Miyazaki
a22b2085b1
add settings for pkcs7
...
add wrapper to check the return value of snprintf
fixed unit test
fixed uninitialized variable
2020-09-24 17:20:45 +09:00
David Garske
3adb64b196
Merge pull request #3330 from ejohnstown/tfm-no-64bit
...
TFM NO 64-BIT
2020-09-23 18:47:48 -07:00
Sean Parkinson
ec59acbae0
SP Cortex-M4 assembly: Fix for GCC compile
...
b<cond>.n not allowed with GCC.
Fix sizeof to use tmp_arr not tmp which is now a pointer.
2020-09-24 11:03:50 +10:00
Daniel Pouzzner
09b9ac8b86
add AM_CONDITIONAL([BUILD_DEBUG],...) to configure.ac, and use it to gate inclusion of wolfcrypt/src/debug.c in src/include.am; remove superfluous includes from wolfcrypt/src/debug.c.
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
6a3da9477e
fix --enable-stacksize[-verbose] (HAVE_STACK_SIZE[_VERBOSE]) to work correctly in testsuite.c.
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
38cb4a2d69
blake2{b,s}.c: return and propagate meaningful error codes.
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
fda22f851a
random.c: use "DRBG_internal", not "__DRBG", for typedef struct DRBG_internal, to avoid possible conflict with reserved-label restrictions with some compilers.
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
6a7a87545a
wc_MakeRsaKey(): add missing allocation failure checks for WOLFSSL_SMALL_STACK.
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
0f3283ce7b
add wc_curve25519_generic().
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
4742a17006
configure.ac: move AC_ARG_ENABLE([linuxkm] before AC_ARG_ENABLE([filesystem], and add ENABLED_FILESYSTEM_DEFAULT=no when ENABLED_LINUXKM.
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
529549f117
settings.h: protect against double definitions in _LINUXKM case.
2020-09-23 18:32:17 -05:00
Daniel Pouzzner
fc592e8434
tests/api.c: in test_wc_PKCS7_BER(), provide for !NO_DES3 && !NO_RSA && WOLFSSL_SP_MATH case.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
10bf7a2086
examples/: fix undersized array lengths in client_usage_msg and server_usage_msg.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
8a6216363d
ecc.c: add (void)rng to wc_ecc_mulmod_ex2() to cover WOLFSSL_SP_MATH case.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
a571378b5f
blake2.h/blake2b.c: fix typos.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
0c9ba76a93
fix rebase error on aes.c
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
60506af5f5
add WOLFSSL_API wrappers wc_InitBlake2b_WithKey(), wc_InitBlake2s_WithKey(), and wc_curve25519_make_priv().
2020-09-23 18:32:16 -05:00
David Garske
c0823c8a7e
Refactor of AES wc_AesSetKeyLocal and wc_AesSetKey for software only use. Added missing aes argument check on wc_AesSetKeyDirect.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
a75f88cbcd
wolfssl/test.h: gate strerror() in err_sys_with_errno() on HAVE_STRING_H && HAVE_ERRNO_H as in PR #3291 .
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
bf054838a1
wc_port.h: WOLFSSL_LINUXKM: fix typo in WOLFSSL_ARMASM definition of RESTORE_VECTOR_REGISTERS().
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
da6a5566b6
wc_port.h: for WOLFSSL_LINUXKM, gate kernel includes and libwolfssl-specific preprocessor directives on BUILDING_WOLFSSL, to avoid disrupting environment for builds of other kernel components.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
185994cb0b
scripts/: tweak scripts/include.am to run ocsp tests before rather than after testsuite and unit.test; revert POSIXish scripts/*.test to use /bin/sh.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
8b53b181dd
add bwrapping on all other scripts/*.test except those that make Internet connections, and remove test for setuid bit, as some systems are configured to not require setuid/CAP_NET_ADMIN for CLONE_NEWNET.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
1c3415e26f
wolfssl/test.h:err_sys_with_errno(): printing the errno msg seems to blow up all the parse tests, so only do it when -DDEBUG_TEST_ERR_SYS_WITH_ERRNO.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
1ebd851b2e
wolfssl/test.h: if SO_REUSEPORT is defined, use it in tcp_listen() and udp_accept(). also, add err_sys_with_errno(), identical to err_sys() unless defined(HAVE_STRING_H) && defined(HAVE_ERRNO_H), in which case strerror(errno) is appended to the rendered message. changed to use err_sys_with_errno() wherever applicable.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
62bbef2f2e
wolfcrypt/test/test.c: add missing gating for -DBENCH_EMBEDDED.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
92fa0f18f0
Makefile.am: use an aux variable to add linuxkm to $SUBDIRS when BUILD_LINUXKM is true, to avoid recursion into linuxkm/ for "make distdir". solution by John Safranek, with a million thanks.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
291febb270
configure.ac: clean up AC_ARG_ENABLE() for linuxkm, and make AC_ARG_WITH for linux-source and linux-arch unconditional.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
2609fa9aeb
test.c:rsa_test(): fix cpp gating for clearing of keypub buffer.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
453698ba27
add explanatory comments for do_div(), used when WOLFSSL_LINUXKM.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
8496a64ed4
linuxkm/Kbuild: the x86 _asm object files still reference "_GLOBAL_OFFSET_TABLE_", so they can't work in the kernel as-is.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
7c2aefcfdd
linuxkm: enable the rest of the _asm implementations for x86, wrapped in {SAVE,RESTORE}_VECTOR_REGISTERS().
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
331fe47eb6
linuxkm: add ASFLAGS_FPU_DISABLE_SIMD_ENABLE ASFLAGS_FPU_ENABLE_SIMD_DISABLE ASFLAGS_FPUSIMD_DISABLE ASFLAGS_FPUSIMD_ENABLE to facilitate erroring for unexpected fp/simd instructions in Kbuild, while allowing expected ones.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
96fe6dc049
test.h: fix math in final "stack used" message when -DHAVE_STACK_SIZE_VERBOSE.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
60a686f48c
tidying suggested by Sean in review.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
a9cad51b65
sp_mod_word(): add unoptimized alternative if -U__GNUC__.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
c8cd042bdd
configure.ac: for linuxkm, make --enable-sp-math the default, and add additional exclusions --enable-fastrsa and --with-libz.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
5f972d2ae6
test.c: now that sp math is fixed and working in linuxkm, reenable prime_test() for WOLFSSL_LINUXKM, and add a small stack refactor for it.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
fdbd6addd0
sp_int.c: add sp_mod_word() gated on WOLFSSL_SP_MOD_WORD_RP for runtimes lacking intrinsic support for int128 % int64; for linuxkm, use WOLFSSL_SP_DIV_WORD_HALF and the new WOLFSSL_SP_MOD_WORD_RP.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
8f130f3642
test.c: tweaks to accommodate clang's belligerent -Wparentheses-equality.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
447a238e8e
test.c: missed a _SMALL_STACK spot in rsa_ecc_certgen_test().
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
5bfb5a3a83
test.c: fix missed spot in rsa_certgen_test(), and do another _SMALL_STACK refactor of a missed object in rsa_ecc_certgen_test().
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
fdf87fe152
test.c: another missed spot.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
ebca451c93
test.c: missed a spot -- inadvertently unused return value.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
99501ffefd
m4/ax_linuxkm.m4: use test "$var" = "" construct, not test -z "$var", for maximal portability.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
43c12ede50
ge448_double_scalarmult_vartime(): streamline WOLFSSL_SMALL_STACK refactor.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
80961ea913
test.c:ecc_decode_test(): WOLFSSL_SMALL_STACK refactor
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
5801719ac3
wolfcrypt/src/asn.c:wc_GetKeyOID(): stack->heap refactor.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
dbe0273bf4
test.c: additional WOLFSSL_SMALL_STACK refactoring, covering --enable-sp-math and various missed spots.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
4f5bbbdca8
rsa.c:wc_CheckProbablePrime(): WOLFSSL_SMALL_STACK refactor
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
af6bd1d163
configure.ac: tidying linuxkm reqs/exclusions tests at end.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
16267a1889
configure.ac: error when ENABLED_LINUXKM but $KERNEL_ARCH is empty (no default, no user value).
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
cd88a2c7df
wolfcrypt/test/test.c: when WOLFSSL_LINUXKM, don't do the large-malloc-incurring wc_scrypt()s in scrypt_test().
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
76cba38971
wolfcrypt/src/ge_448.c: redo small stack refactor of ge448_double_scalarmult_vartime(), so that when -UWOLFSSL_SMALL_STACK, code is effectively unchanged.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
f4981d4c91
linuxkm/module_exports.c.template: include openssl compat layer headers in case user configuration needs them.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
8331079c36
configure.ac: --enable-compkey gates in the recursive do_mp_jacobi(). mutex with --enable-linuxkm.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
dc4b15a265
test.c: fix gating on heap deallocation in hc128_test() to match earlier tweak to gating on allocation.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
b52d50d903
test.c: various improvements and fixes pursuant to dgarske's comments on PR #3244
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
a80b0c1982
test.c: don't exclude prime_test when -DOLD_PRIME_CHECK, but to exclude it when -DWOLFSSL_LINUXKM.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
170322956b
wolfssl/test.h: polish implementation of HAVE_STACK_SIZE_VERBOSE, now enabled with --enable-stacksize-verbose; internal symbol renamed from original DEBUG_STACK_SIZE_VERBOSE, helper functions and macros refactored to be formally threadsafe and to track the overall high water mark (reports same "stack used" value as --enable-stacksize after final return); add "setting stack relative offset reference mark in funcname() to x" message at entry; add configure mutexing of --enable-stacksize[-verbose] relative to --enable-linuxkm.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
63e3eae416
src/wolfio.c: update patch to wolfIO_HttpProcessResponse() (PR #3204 ).
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
b99908ae66
configure.ac: refactor test -z "${KERNEL_ROOT}" into "${KERNEL_ROOT}" = "", and remove new AM_CFLAGS="$AM_CFLAGS -msse4" (bringing back identical to logic in master) now that $CFLAGS_SIMD_ENABLE et al take care of it.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
d033b1fe24
m4/ax_linuxkm.m4: add autosensing of -msse4.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
5589565051
linuxkm: add autotools detection of usable compiler flags for enabling and disabling SIMD and fp registers and auto-vectorization, and integrate into linuxkm makefiles.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
5d1bea4ff7
linuxkm/Makefile: rename KERNEL_OPT to KERNEL_EXTRA_CFLAGS.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
767f1972e3
aes.{c,h}: move SIMD includes from aes.h to aes.c, to avoid compiler errors on other .c's compiled -mno-sse for linuxkm.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
5504d9cd4e
linuxkm: dial in SIMD options in Kbuild; add boilerplate at the top of all files added for linuxkm.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
4f38fb2f78
linuxkm/Kbuild: gate EXPORT_SYMBOL(wolfcrypt_test) on -UNO_CRYPT_TEST.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
cd14cfb092
linuxkm: override-disable SIMD instructions for all .c.o's, with exceptions enumerated in Kbuild (currently only aes.c), and couple -msse with -fno-builtin-functions; export ENABLED_ASM for use as a pivot in Kbuild; use asm/i387.h, not asm/simd.h, for kernel_fpu_{begin,end}() protos.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
3626332334
wolfcrypt/src/aes.c for linuxkm: add missing vector register push/pops.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
87b2384cac
linuxkm settings.h: define NO_STDIO_FILESYSTEM
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
69052ff535
linuxkm: explanatory message and error exit on attempted make install.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
e881d92366
add linuxkm/module_exports.c.template to linuxkm/include.am $EXTRA_DIST.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
05bca8b0ee
when BUILD_LINUXKM, suppress building the library; rename $KROOT/$KARCH to $KERNEL_ROOT/$KERNEL_ARCH; remove SIMD enablement from linuxkm CFLAGS; add linuxkm support for -DKERNEL_OPT=x.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
360c749703
add {SAVE,RESTORE}_VECTOR_REGISTERS() macros for kernel_fpu_{begin,end} when WOLFSSL_LINUXKM, to allow safe use of AESNI and SIMD instructions in the kernel.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
2c564a7728
update .gitignore with more artifacts from linuxkm build.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
9549a5f973
linuxkm: add linuxkm/module_exports.c.template, and autogenerate linuxkm/module_exports.c.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
e8b69f8a6a
dh_test(): fix missing casts for XMALLOC().
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
7bc33f4ec1
linuxkm: retain noinline from kernel headers, and use it directly in wolfssl/wolfcrypt/sp.h.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
9aa3a4c559
linuxkm/Kbuild: make dependency on get_thread_size order-only, to suppress frivolous rebuilds on kernel 4.x.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
f440089e92
dh_test(): fix typo (undersized dynamic buffers).
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
8b19a9b58c
benchmark.c: fix always-true tests for DECLARE_VAR_IS_HEAP_ALLOC.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
f106fea0d8
rsa_no_pad_test(): fix uninited pointer.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
4ea8b46177
dh_test(): refactor remaining bare returns to ERROR_OUT().
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
2ee218761e
dh_test(): missed a spot in last commit.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
ca1a991de5
wolfcrypt/test/test.c: fix an error-path leak in dh_test(), and deal with possible -Wdeclaration-after-statement for XFILE file.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
a7381f8a48
test.c:rsa_test(): fix uninited pointer
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
6c32a730c2
more work on DECLARE_VAR -- fix allocation failure handling in bench_rsa_helper() to avoid uninitialized variables.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
426de2101a
more work on DECLARE_VAR -- proper handling of failed allocations. WIP.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
d8e71e8dd2
linuxkm/Kbuild: disable objtool on AESNI asm objects -- they work in the kernel as-is, despite "unannotated intra-function call" and "BP used as a scratch register" warnings.
2020-09-23 18:32:16 -05:00
Daniel Pouzzner
3c91ce9342
wolfcrypt/src/sp_int.c: undo 8efb1142f1f2744ff128033df8a3a2d43e42fd93 to take dgarske's better wc_bigint_init()-based take on it (aa870861921a317cca9a978a75a7de127809e100).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
d7450b85f7
linuxkm/Makefile: use -Wno-declaration-after-statement (needed for heapful DECLARE_VAR() et al).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
c5d28c16b5
wolfcrypt/src/sp_int.c: clear whole struct in sp_init() and sp_init_multi(), to fix uninited pointer free()s in sp_free() when --enable-sp-math -DHAVE_WOLF_BIGINT.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
9b7c753165
wolfssl/wolfcrypt/types.h: make DECLARE_VAR() et al use heap allocation not only when WOLFSSL_ASYNC_CRYPT but also when WOLFSSL_SMALL_STACK.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
ce8f2e65de
wolfcrypt/src/sha256.c: undo c801de9d23c2f3348b84fdb8d893f81e6c3c2849 (dgarske has better&correct fix in 76e1760f915934bdc4911f3ae41abe6803ae094a).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
571bf897c4
wolfcrypt/test/test.c: stack->heap refactor for dh_test().
2020-09-23 18:32:15 -05:00
David Garske
66b59bda9b
Fix for expected fail test in openssl_test for partial block. Fix for mp_test with ECC disabled, which uses mp_init_copy.
2020-09-23 18:32:15 -05:00
David Garske
0f8cf32122
Fix for possible leak in openssl_test because EVP free not called with WOLFSSL_SMALL_STACK_CACHE (SHA256/SHA512). Added return code checking to the openssl_test in wolfCrypt test.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
32e30d23c6
wolfcrypt/test/test.c: fix uninitialized values in aesofb_test().
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
e09487de1f
sha256.c: add missing _SMALL_STACK_CACHE initialization in InitSha256().
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
922b023aea
wolfcrypt/src/random.c: rename the DRBG internal type __DRBG, because some customer is compiling libwolfssl with a "g++" override, which precludes typedefs and structs with different types but equal labels.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
9611f7abfd
linuxkm/Makefile: add no-op distdir rule.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
03fe9c15c0
linuxkm/Makefile: add do-nothing dist rule, and refactor setness tests for libwolfssl.ko to be make-dist-compatible.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
f56c6d1d8f
wolfcrypt/test/test.c and wolfssl/test.h: implement DEBUG_STACK_SIZE_VERBOSE, measuring and reporting stack usage separately for each test. to use, ./configure --enable-stacksize && make CFLAGS+=-DDEBUG_STACK_SIZE_VERBOSE; also, remove a throwaway dev pragma that snuck into an earlier commit.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
925afe3b74
cast XMALLOC() return values assiduously, for Visual Studio compatibility.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
195b5d2d2c
lkm: add linuxkm/include.am, and include it in Makefile.am.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
d86b0601b9
lkm: tweak Kbuild to work on 4.x (hardcoded fallback stack size); add linuxkm/get_thread_size.c.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
c194fb3beb
lkm: add autodetection of kernel stack frame size; reactivate objtool scrutiny since _asm files are indeed not yet kernel-compatible; delete linuxkm/lkm_testcrypto.c and use wolfcrypt/test/test.c.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
535822f4df
wolfcrypt/test/test.c: refactor for stack size and namespace control, allowing embedding of wolfcrypt_test() in kernel module.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
f5975d95db
src/ssl.c: use heap for workspace in wolfSSL_X509_sign(), wolfSSL_d2i_RSAPrivateKey_bio(), and wolfSSL_CTX_use_RSAPrivateKey().
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
9ca94d6ca7
wolfcrypt/src/ge_448.c: refactor ge448_double_scalarmult_vartime() to use heap for workspace unless WOLFSSL_NO_MALLOC.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
1735bd7430
lkm_testcrypto.c: refactor subtests at end of dh_test() to use ERROR_OUT() with proper codes.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
217ec4ebd3
lkm: tweaks to self-test dynamics/messages.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
554879da00
lkm: self-test working now (certain options, which ones TBD, crash kernel).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
34fd53b4fc
linuxkm: WIP support for wolfcrypt_test() at module load time.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
0c35998178
linuxkm/module_hooks.c: log "cleanup complete" at unload time.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
92df5692b1
wolfcrypt/src/ecc.c: revert to commit g0fa5af9, which has all the necessary fixes.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
0cfe9ca5d6
configure.ac: --enable-linuxkm: improved defaults and consistency checking.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
92406e17ca
wolfssl/wolfcrypt/settings.h: for _LINUXKM, set WOLFSSL_SP_DIV_64 to help avoid gcc xdivti3() references.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
5efdee4277
wolfssl/wolfcrypt/types.h: tweak _LINUXKM macros XMALLOC(), XFREE(), and XREALLOC() to dummy-use "heap" and "dynamic type" arguments.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
add78dfba9
wolfcrypt/src/sp_int.c: add _LINUXKM do_div codepaths for a couple more 64 bit divisions, in sp_div_word() and sp_mod_d().
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
9ab1df690a
wolfcrypt/src/ecc.c: fix uncompilable !WOLFSSL_SP_MATH && WOLFSSL_SMALL_STACK_CACHE implementations of ecc_key_tmp_init() and ecc_key_tmp_free() (the latter misnamed ecc_key_tmp_final()).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
836915d05f
linuxkm: configure.ac more incompatible options: --enable-fastmath, --enable-iopool, and --enable-fips; linuxkm/Makefile: reduce -Wframe-larger-than from 65536 to kernel-compatible 5000; wolfssl/wolfcrypt/settings.h: unset HAVE_THREAD_LS when WOLFSSL_LINUXKM; wolfssl/wolfcrypt/types.h: when NO_INLINE and __GNUC__, #define WC_INLINE __attribute__((unused)) rather than to nothing to avoid -Wunused-function warnings; wolfssl/wolfcrypt/wc_port.h: #undef noinline after Linux kernel header includes (another macro conflict).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
03d5a4eadd
wolfcrypt/src/integer.c: mp_div_d(): refactor another 64 bit division to use do_div() when WOLFSSL_LINUXKM.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
2a3fd57b36
linuxkm/Kbuild, linuxkm/module_hooks.c: tweaks for buildability on kernel 4.9 (may also fix build on 3.x).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
2591479866
linuxkm: add macros mapping malloc(), free(), and realloc() to the kernel equivalents, don't set WOLFSSL_NO_MALLOC, and reduce -Wframe-larger-than= from 256k to 64k; tweak fix for HAVE_INTEL_RDSEED conflict with WOLFSSL_LINUXKM; add clean rule to linuxkm/Makefile.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
911b23d2b4
configure.ac: check for incompatible combinations, and restore check for non-empty $KROOT when --enable-linuxkm.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
2bcdfce6df
wolfcrypt/src/evp.c: tweak to silence gcc -Wmaybe-uninitialized.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
dff5344d82
configure.ac: when --enable-asm (default on), for gcc amd64 target always include -msse4 even if not --enable-intelasm (it's needed for TFM_X86_64 inline asm).
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
c0d831ea3a
whoops, can't assert on non-empty "$(AM_CCASFLAGS)$(CCASFLAGS)" in linuxkm/Makefile -- they are often legitimately empty.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
1aa15632ce
initial buildability of full libwolfssl.ko loadable kernel module for Linux via ./configure --enable-linuxkm && make.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
0e480d1a14
Linux KM compilability cont'd: conform to C89isms (declarations before statements); iffdef WOLFSSL_LINUXKM use do_div() for long long division rather than C operator (avoids unresolvable compile-time callouts to libgcc function); misc gating and relocations for includes.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
603da9e747
fix whitespace.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
14e3da9206
.gitignore: add *~ for emacs backup files.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
bc1c85842d
WIP: autotools support for LKM
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
0f783077f8
fix stray whitespace
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
dd825d90c4
more LKM WIP: polish up the struct DRBG refactor ("struct DRBG_internal"), tweaks for buildability on 3.x kernels (now builds on 3.x, 4.x, and 5.x up to 5.8.1), move a slew of #[un]def[ines] from wc_port.h to settings.h where they belong, misc cleanup.
2020-09-23 18:32:15 -05:00
Daniel Pouzzner
3c2155f4a9
linuxkm WIP -- update for kernels 4.9.x (LTS representative) and 5.8.x (latest).
2020-09-23 18:32:15 -05:00
David Garske
6425ebb60e
Linux Kernel Module support using "--enable-linuxkm".
2020-09-23 18:32:15 -05:00
David Garske
8d2c8b0c89
And the CAVP self test.
2020-09-23 16:23:55 -07:00
Sean Parkinson
4136e132b2
EVP CIPHER: fix block size, mode and table
...
Block size incorrect for GCM - 1.
Add block size for more ciphers in wolfSSL_EVP_CIPHER_block_size().
Add more ciphers to WOLFSSL_CIPHER_mode().
Cipher table was compiling in entries without support.
2020-09-24 09:18:25 +10:00
toddouska
1c07de883c
Merge pull request #3306 from SparkiDev/tls13_pha_psk
...
TLS 1.3: Post-handshake Authentication and resumption secret
2020-09-23 16:06:55 -07:00
David Garske
f77157bfea
Looks like FinalRaw was added post FIPS v2.
2020-09-23 16:06:21 -07:00
David Garske
5e1c0f886f
Fix for FIPS and raw hash API's.
2020-09-23 15:59:35 -07:00
David Garske
3c28fe3640
Fixes for bad build options around new hash unit tests. Cleanup indent and newlines.
2020-09-23 15:45:31 -07:00
David Garske
b34bf65b66
Fix for --enable-armasm missing wc_Sha256FinalRaw. Reproduced with ./configure --enable-all --enable-cryptocb --enable-armasm && make.
2020-09-23 15:32:43 -07:00
toddouska
2bb8427ab2
Merge pull request #3320 from dgarske/stmcube
...
STM32 Cube Pack and AES GCM improvements
2020-09-23 14:39:53 -07:00
Chris Conlon
b7fb202ad3
Merge pull request #3294 from miyazakh/espidf_win
...
Add setup script for ESP-IDF windows
2020-09-23 14:15:17 -06:00
Ethan Looney
95995d2272
Removed forgotten comment
2020-09-23 13:42:33 -06:00
Ethan Looney
59294708a8
Changed test function call, uses internal AssertIntEQ instead of single call
2020-09-23 13:22:59 -06:00
David Garske
c46301f111
Merge pull request #3328 from ejohnstown/fips-ready-fix
...
FIPS Ready Windows Fix
2020-09-23 12:18:23 -07:00
John Safranek
9dfbf896a8
TFM NO 64-BIT
...
When diabling 64-bit fastmath using the flag NO_TFM_64BIT, the sizes of
fp_digit and fp_word get smaller. Using them in math with an int gives
incorrect values. Changed the fp_cmp_mag_ct to return a fp_digit since
its return value is used with an fp_digit. Compare its result against
a FP_LT cast as a fp_digit.
2020-09-23 12:17:41 -07:00
David Garske
ecd5a015eb
Merge pull request #3317 from ejohnstown/evp-fix
...
EVP Fix
2020-09-23 11:10:07 -07:00
toddouska
b0998fb030
Merge pull request #3327 from SparkiDev/pkcs11_ecc
...
PKCS#11 fix: Generate ECC key for decrypt/sign or derive
2020-09-23 09:28:53 -07:00
toddouska
ad00cf0fc8
Merge pull request #3268 from dr-m/intel-intrinsics
...
Use Intel intrinsic functions for RDSEED and RDRAND
2020-09-23 09:24:47 -07:00
toddouska
2f74817e32
Merge pull request #3288 from embhorn/zd10901
...
Fix mp_radix_size off by 1 error
2020-09-23 09:19:02 -07:00
toddouska
cee99de6e1
Merge pull request #3324 from JacobBarthelmeh/Testing
...
fix WOLFSSL_X509_NAME parse of empty field and add test case
2020-09-23 09:15:24 -07:00
Sean Parkinson
4ed3438be0
TLS 1.3: Post-handshake Authentication and resumption secret
...
The master secret in arrays is not available post-handshake.
Use the master secret in the session when calculating resumption secret.
2020-09-23 17:09:06 +10:00
John Safranek
07e1baadc9
EVP Fix
...
Change a few missed strings to use the constant names.
2020-09-22 15:55:46 -07:00
David Garske
f1effea638
Improve the IDE/WIN10 readme to clarify the difference between this and IDE/WIN.
2020-09-22 15:55:08 -07:00
Sean Parkinson
e539322a88
PKCS#11 fix: Generate ECC key for decrypt/sign or derive
...
Add debugging information to PKCS#11.
2020-09-23 08:30:22 +10:00
John Safranek
54c4258c4b
FIPS Ready Windows Fix
...
1. Modify the WIN10 FIPS solution user_settings.h to check for a
FIPS Ready flag and to override HAVE_FIPS_VERSION to 3 if set.
2. Removed some redundant constants from the EVP file.
2020-09-22 15:23:36 -07:00
David Garske
41ebc9161a
Fix include.am for the renamed configuration example wolfSSL_conf.h
2020-09-22 15:18:11 -07:00
David Garske
99d96246bd
Fix for STM32 issue with some Cube HAL versions (such as F777) which could modify non-block aligned bytes in the output buffer during decrypt. For TLS these bytes are the authentication tag. Workaround is to save off the incoming expected authentication tag. ZD 10961.
2020-09-22 15:04:30 -07:00
Ethan Looney
1d4e7d8278
Added unit tests for PKCS7
2020-09-22 14:50:08 -06:00
Juliusz Sosinowicz
77969ae042
Buffer AAD in wolfSSL_EVP_CipherUpdate_GCM so that whole value is hashed
2020-09-22 21:58:57 +02:00
Ethan Looney
53b82fccdb
Fixed valgrind issues -2
2020-09-22 13:26:52 -06:00
John Safranek
87d042e37d
EVP Fix
...
Clean up a bad guard check for AES-CTR.
2020-09-22 09:46:27 -07:00
Chris Conlon
8816577824
Merge pull request #3319 from kojo1/no_dh
...
fix NO_DH guard
2020-09-22 10:33:01 -06:00
John Safranek
fc425b74fc
EVP Fix
...
Add a few more guard flag checks to leave out things appropriately.
2020-09-22 09:06:30 -07:00
David Garske
4922baee30
Updates to README.md. Fix tabs to spaces.
2020-09-22 08:26:20 -07:00
Marko Mäkelä
99a481b28e
Use Intel intrinsic functions for RDSEED and RDRAND
...
Starting with GCC 9 or clang 9, we can actually use <immintrin.h>
without any problems. We only have to flag such
functions where such instructions are being used.
The benefit of using intrinsic functions over inline assembler
is that the compiler is given more flexibility. In particular,
clang -fsanitize=memory (MemorySanitizer, MSAN) will not raise
bogus alarms about memory being uninitialized.
Both intrinsic functions are available starting with GCC 5 and
clang 3.8. The RDRAND wrapper is available starting with clang 3.7
via <immintrin.h>. Before GCC 9 and clang 9, the RDSEED wrapper is
not available via <immintrin.h> but via <x86intrin.h>, and only after
jumping through some hoops to enable it.
2020-09-22 09:45:46 +03:00
Jacob Barthelmeh
cb3338bd57
fix WOLFSSL_X509_NAME parse of empty feild and add test case
2020-09-21 18:44:13 -06:00
Sean Parkinson
f4db9c8986
Test wolfSSL_HMAC with SHA-3
...
Add more support for HMAC with SHA-3.
2020-09-22 09:39:09 +10:00
David Garske
0f48ae77ef
Added the wolfSSL configuration template that is used for the Cube pack. This will be the source for the template going forward. Added some useful debugging options and increased the timeout for the TLS example.
2020-09-21 15:35:35 -07:00
Takashi Kojo
83cdd1c314
fix NO_DH guard
2020-09-22 07:30:21 +09:00
David Garske
deaf3b4b40
Merge pull request #3318 from wolfSSL/revert-3310-stmcubemx/add_401
...
Revert "stmcubemx: add flags for STM32F401"
2020-09-21 15:05:10 -07:00
toddouska
d3ac2eebe3
Revert "stmcubemx: add flags for STM32F401"
2020-09-21 15:02:56 -07:00
elms
3067e28c4a
Merge pull request #3310 from elms/stmcubemx/add_401
...
stmcubemx: add flags for STM32F401
2020-09-21 14:46:50 -07:00
John Safranek
4f8dbf4f3e
EVP Fix
...
There are some cases when the EVP wrapper code could call strncmp with
a null pointer. This was refactored to remove this possibility.
2020-09-21 14:31:42 -07:00
toddouska
47a720bdc6
Merge pull request #3315 from SparkiDev/evp_xts
...
EVP XTS key length: two keys used so double length
2020-09-21 13:56:35 -07:00
toddouska
b0dca724d4
Merge pull request #3303 from dgarske/spcortexm
...
Fixes for building with SP Cortex-M ASM in Rowley CrossWorks and the GCC-ARM examples
2020-09-21 13:53:36 -07:00
toddouska
0e66f9d835
Merge pull request #3299 from dgarske/ocsp_certchain
...
Fix for possible NULL use if certChain not loaded and OCSP cert request called
2020-09-21 13:40:21 -07:00
toddouska
1274a01dc7
Merge pull request #3289 from dgarske/wpas_small
...
Fixes for building `--enable-wpas=small` with WPA Supplicant v2.7
2020-09-21 13:37:58 -07:00
toddouska
0f6d391ea1
Merge pull request #3295 from SparkiDev/tls13_p521
...
TLS 1.3: Fix P-521 algorithm matching
2020-09-21 13:36:48 -07:00
toddouska
117d0e3916
Merge pull request #3273 from dgarske/xilinx_vitis
...
Xilinx SDK / Vitis improvements
2020-09-21 13:31:06 -07:00
toddouska
793a7bd8c7
Merge pull request #3228 from SparkiDev/expired_cert_crl
...
Script to find exipred CRLs and certificates
2020-09-21 13:29:32 -07:00
Sean Parkinson
d7525f0f86
EVP XTS key length: two keys used so double length
2020-09-21 11:02:07 +10:00
Hideki Miyazaki
0fd65a2ae3
added ESP-IDF setup script for windows
...
fixed warnings when using v4.0 esp-idf
added new file, setup_win.bat to include.am
2020-09-20 17:13:39 +09:00
Kaleb Himes
5afd313912
Merge pull request #3298 from ejohnstown/fix-client-usage
...
Fix Client Usage
2020-09-18 17:32:19 -06:00
Tesfa Mael
f1b4c52c78
Update release note credits
2020-09-18 13:11:10 -07:00
Elms
13c54627e2
stmcubemx: add flags for STM32F401
2020-09-18 09:17:32 -07:00
David Garske
b4aed22eb1
Remove execute bit on files.
2020-09-18 09:16:31 -07:00
David Garske
3eb12cc8e9
Port for Xilinx (xilffs) file system support.
2020-09-18 09:16:31 -07:00
David Garske
0ae9adcfd9
Add Xilinx SDK printf support.
2020-09-18 09:16:31 -07:00
David Garske
63e993b9c1
Fix to allow XTIME override for Xilinx. Spelling fixes in Xilinx README.md.
2020-09-18 09:16:31 -07:00
David Garske
b4c964f729
Fix for possible NULL buffer use if certChain not loaded and OCSP cert request called.
2020-09-18 09:15:44 -07:00
David Garske
135cf1680f
Fixes for building with SP Cortex-M ASM in Rowley CrossWorks and the generic IDE/GCC-ARM examples.
2020-09-18 09:15:21 -07:00
David Garske
9deb85ceb1
Fixes to reduce code size.
2020-09-18 09:14:41 -07:00
David Garske
cd6283d3a2
Fix last commit macro logic.
2020-09-18 09:14:41 -07:00
David Garske
d37adefe98
Fixes for edge case builds with certificate req/gen/ext without --enable-opensslextra.
2020-09-18 09:14:41 -07:00
David Garske
d61be6f030
Restore the normal --enable-wpas macro.
2020-09-18 09:14:41 -07:00
David Garske
780e8a4619
Fixes for building --enable-wpas=small with WPA Supplicant v2.7.
2020-09-18 09:14:41 -07:00
Kaleb Himes
eb466668ce
Merge pull request #3304 from douzzer/20200917-fix-script-races-and-bwrap-unit-test
...
20200917 fix script races and bwrap unit test
2020-09-18 08:33:16 -06:00
Sean Parkinson
409daa665d
Script to find exipred CRLs and certificates
...
Check for expiration in 3 months.
First argument is the offset. e.g. "+1 year"
2020-09-18 11:26:27 +10:00
Sean Parkinson
d63ff07edc
TLS 1.3: Fix P-521 algorithm matching
...
Digest size compared to key size - P521 has large key size.
Fixed to round down.
Added P-521 keys and certificates.
Added testing of P-521 keys and certificcates to unittest.
2020-09-18 10:51:55 +10:00
Daniel Pouzzner
a1d231b4dc
tests/api.c:test_wolfSSL_ERR_print_errors(): add missing gating on !defined(NO_ERROR_STRINGS).
2020-09-17 12:03:44 -05:00
Daniel Pouzzner
cc1d016d1e
configure.ac: define BUILD_TESTS as ENABLED_EXAMPLES, rather than ENABLED_EXAMPLES && !ENABLED_LEANTLS; add missing preprocessor gating in tests/api.c test_wolfSSL_EVP_Digest() and test_wolfSSL_i2d_PrivateKey().
2020-09-17 12:03:44 -05:00
Daniel Pouzzner
9df9fb7936
unit.test: add bwrap wrapper script at scripts/unit.test.
2020-09-17 12:03:44 -05:00
Daniel Pouzzner
5ed2fe8092
scripts/: more race elimination/mitigation.
2020-09-17 12:03:44 -05:00
Daniel Pouzzner
26901d1cd9
scripts/ocsp-stapling2.test: eliminate races.
2020-09-17 12:03:44 -05:00
David Garske
d22de947b7
Merge pull request #3300 from elms/fix/sp_iar_v6.70
...
CortexM SP ASM compiling for IAR 6.70
2020-09-17 09:41:52 -07:00
Elms
cd077d74c1
CortexM SP ASM compiling for IAR 6.70
...
* asm can handle pointers but not arrays, use redirection pointers
* branch width must be specified explicitly
2020-09-16 16:23:51 -07:00
toddouska
0694eafb5e
Merge pull request #3286 from dgarske/aesctr_aesni
...
Fix for AES CTR with AESNI
2020-09-16 15:11:11 -07:00
toddouska
fe92fa6f3f
Merge pull request #3282 from SparkiDev/sp_mod_exp_bits
...
SP mod exp: support exponents of different lengths
2020-09-16 15:07:31 -07:00
toddouska
86e5a2c528
Merge pull request #3276 from SparkiDev/jacobi_iterative
...
ECC mp_jacobi: iterative implementation
2020-09-16 15:04:20 -07:00
toddouska
85da1a1d0a
Merge pull request #3271 from SparkiDev/tls13_peek
...
TLS 1.3: allow wolfSSL_peek() to return WANT_READ
2020-09-16 15:02:42 -07:00
toddouska
533bc099eb
Merge pull request #3265 from SparkiDev/cpuid_set
...
Allow the CPU Id flags to be programmatically set
2020-09-16 15:00:30 -07:00
toddouska
ab7408f7d6
Merge pull request #3258 from dgarske/nxp_hw
...
Fixes for NXP MMCAU/LTC mutex locking and build
2020-09-16 14:57:58 -07:00
toddouska
a3fca7f593
Merge pull request #3247 from JacobBarthelmeh/Compatibility-Layer
...
Compatiblity Layer Fixes for serial number / ASN1 time / and order of name components
2020-09-16 14:53:51 -07:00
John Safranek
30443dbf23
Fix Client Usage
...
A string in the client's usage text was made optional depending on the
NO_PSK option, but there was still an attempt to print it. This lead to
a NULL being printed instead. Fixed the print statement.
2020-09-16 13:37:01 -07:00
Juliusz Sosinowicz
04b4ef3e3b
Don't send null byte
2020-09-16 14:02:51 +02:00
Ethan Looney
da4478bdf1
Fixed valgrind issues
2020-09-15 12:58:52 -06:00
Kaleb Himes
b22d2a2195
Merge pull request #3291 from douzzer/ocsp-stapling-script-happy-birthday
...
fix birthday problem in ocsp-stapling*.test
2020-09-15 08:47:39 -06:00
Eric Blankenhorn
5d69c9f1dc
Move neg check
2020-09-15 09:12:45 -05:00
Daniel Pouzzner
b669f8eeb9
scripts/: tweak scripts/include.am to run ocsp tests before rather than after testsuite and unit.test; revert POSIXish scripts/*.test to use /bin/sh.
2020-09-14 16:06:45 -05:00
Eric Blankenhorn
6451c4e471
Fix for negative values
2020-09-14 10:00:02 -05:00
Juliusz Sosinowicz
b9527600f4
Return size of consumed buffer
2020-09-14 09:22:47 +02:00
Daniel Pouzzner
d8dc6be5b9
scripts/ocsp-stapling2.test: try using a static prechecked port for the servers on ready_file5 too.
2020-09-12 01:13:35 -05:00
Daniel Pouzzner
51046d45d3
add bwrapping on all other scripts/*.test except those that make Internet connections, and remove test for setuid bit, as some systems are configured to not require setuid/CAP_NET_ADMIN for CLONE_NEWNET.
2020-09-12 00:20:38 -05:00
Daniel Pouzzner
1e9971f64c
scripts/ocsp-stapling*.test: add bwrap attempt at top, to isolate network namespace.
2020-09-11 18:20:27 -05:00
David Garske
2ac5835ee8
Fix for CAAM to evaluate before the keylen check. Added checking to make sure keylen cannot overrun buffer.
2020-09-11 15:07:31 -07:00
Daniel Pouzzner
8f25456f86
scripts/ocsp-stapling*.test, wolfssl/test.h: refactor scripts/ocsp-stapling*.test for orthogonality and robustness, with retries and early failure detection. also, reduce sleeps in ocsp-stapling-with-ca-as-responder.test to 0.1, matching sleeps in other 2 scripts. finally, in wolfssl/test.h, #ifdef SO_REUSEPORT do that when binding ports, and add optional rendering of errno strings for failed syscalls using err_sys_with_errno() when -DDEBUG_TEST_ERR_SYS_WITH_ERRNO.
2020-09-11 15:30:37 -05:00
Ethan Looney
a466a57f1d
Added fips check and cast variable to word32
2020-09-11 14:28:10 -06:00
John Safranek
3e77dcab5d
Merge pull request #3285 from julek-wolfssl/DtlsCheckWindow-window-check
...
Fix window check
2020-09-11 11:35:02 -07:00
John Safranek
01ad4d59a1
Merge pull request #3263 from douzzer/20200828-neg-SN-invalid-padding
...
GetASNInt(): check for invalid padding on negative integer.
2020-09-11 08:48:43 -07:00
Eric Blankenhorn
4688f5fa59
Handle leading zero
2020-09-11 08:39:34 -05:00
David Garske
6fcdd848c9
Refactor of AES wc_AesSetKeyLocal and wc_AesSetKey for software only use. Added missing aes argument check on wc_AesSetKeyDirect.
2020-09-10 15:57:36 -07:00
Sean Parkinson
5010572856
Merge pull request #3287 from dgarske/sp_mask
...
Fix for wrong cast type and added "U" and "UL".
2020-09-11 08:14:13 +10:00
Ethan Looney
7dce2e7f2c
Added unit tests for RSA.c
2020-09-10 14:47:51 -06:00
Eric Blankenhorn
78a1670334
Fix mp_radix_size off by 1 error
2020-09-10 09:58:26 -05:00
David Garske
f68eee0788
Fix for wrong cast type and added "U" and "UL".
2020-09-09 16:35:05 -07:00
Sean Parkinson
7a0fba20cf
Merge pull request #3281 from dgarske/sp_mask
...
Fix in SP math for casting signed -1 to unsigned
2020-09-10 08:43:30 +10:00
David Garske
dfc8ed5a73
Fix for AES CTR with AESNI. The flag to indicate use of AES was not set with wc_AesSetKeyDirect.
2020-09-09 14:53:08 -07:00
Juliusz Sosinowicz
e34ccaf481
Fix window check
...
If `curLT` then diff needs to be decremented. For example: `diff` = 1 represents last packet so it would be the `window[idx] & (1 << 0)` bit of the window variable.
2020-09-09 23:27:49 +02:00
Juliusz Sosinowicz
a65ffe15bc
Implement non-blocking SCR on server side
2020-09-09 21:41:20 +02:00
Chris Conlon
29a840aee0
Merge pull request #3280 from dgarske/ebsnet
...
Fix for bad pre-processor logic
2020-09-09 13:17:45 -06:00
Sean Parkinson
3ecbc7762a
SP mod exp: support exponents of different lengths
2020-09-09 15:23:04 +10:00
John Safranek
39b5448601
Merge pull request #3279 from dgarske/minor_fixes
...
Minor build fixes for typo and CMake
2020-09-08 16:45:52 -07:00
David Garske
b8bdeec940
Fix in SP math for casting signed -1 to unsigned.
2020-09-08 14:18:09 -07:00
JacobBarthelmeh
58e03b2d26
Merge pull request #3272 from embhorn/zd10650
...
Check for non-blocking return code in BioSend
2020-09-08 14:25:16 -06:00
David Garske
7b8fa42ae1
Fix for bad pre-processor logic. Some compilers are unhappy with the #sslpro even in a block of code not used!
2020-09-08 13:12:11 -07:00
David Garske
6f5a7e87c5
Fix for CMake to only set ranlib arguments for Mac. Fix for stray typo of , -> ;. Fixes #3275 and Fixes #3278
2020-09-08 11:07:12 -07:00
Juliusz Sosinowicz
234705a80c
Change buffer in wolfSSL_dtls_import to be const
2020-09-08 09:25:34 +02:00
Sean Parkinson
6fb1feadc7
ECC mp_jacobi: iterative implementation
...
Slightly faster and less stack used.
2020-09-08 10:05:52 +10:00
Sean Parkinson
5b43977b95
Merge pull request #3277 from julek-wolfssl/failing-nightly-532c2f5
...
wolfSSL_SESSION_free: Fix failing nightly
2020-09-08 08:11:37 +10:00
Juliusz Sosinowicz
ee2d051536
Fix failing nightly
...
Failed tests when configured with `./configure --enable-dtls --enable-opensslextra --enable-sessioncerts`. Valgrind discovered a use after free bug. Nulling session->peer fixes the issue.
2020-09-07 14:36:57 +02:00
Sean Parkinson
93bb12ce86
TLS 1.3: allow wolfSSL_peek() to return WANT_READ
...
When handshake message is processed in wolfSSL_peek() then return
WANT_READ from peek instead of blocking waiting for application data.
Server may send an alert if the client certificate is invalid.
The server also may send NewSesionTicket after client has sent finished
message.
To detect alert before handling application data, then the socket needs
to be checked for data. If the data is an alert then wolfSSL_peek() will
handle the alert, but if it is a NewSessionTicket then wolfSSL_peek()
will process it and block waiting for application data - so return
WANT_READ if no application data seen after processing handshake
message.
2020-09-07 08:30:24 +10:00
Sean Parkinson
70854b8eec
Allow the CPU Id flags to be programmatically set
2020-09-04 09:01:27 +10:00
toddouska
7fd51cf9d9
Merge pull request #3267 from SparkiDev/no_client_auth
...
Get builds with WOLFSSL_NO_CLIENT_AUTH compiling and testing
2020-09-03 15:55:38 -07:00
David Garske
e2b0b11732
Fix for AES CBC with NXP MMCAU locking.
2020-09-03 15:28:45 -07:00
David Garske
a9ff89eafa
Refactor of the MMCAU and LTC hardware mutex locking.
2020-09-03 15:28:45 -07:00
David Garske
e791b78d23
Fix to add wrapper for new timing resistant wc_ecc_mulmod_ex2 function version in HW ECC acceleration. Broken in PR #2982 .
2020-09-03 15:26:10 -07:00
toddouska
8753b5b947
Merge pull request #3257 from kojo1/user-mutex
...
fix guard, user define mutex
2020-09-03 15:21:53 -07:00
toddouska
a626ac39f2
Merge pull request #3253 from SparkiDev/chacha20_stream_fix
...
ChaCha20: Enable streaming with Intel x86_64 asm
2020-09-03 15:18:00 -07:00
toddouska
862eea3962
Merge pull request #3252 from SparkiDev/fe448_32bit_fix
...
Curve448: fix 32-bit implementation
2020-09-03 15:12:28 -07:00
toddouska
d8ee6fc96d
Merge pull request #3251 from SparkiDev/rsa_pkcs11_dox
...
Add doxygen comments for wc_InitRsaKey_Id()
2020-09-03 15:10:20 -07:00
toddouska
9901eb9272
Merge pull request #3249 from SparkiDev/tls13_early_data_fix
...
TLS 1.3 Early Data: fix
2020-09-03 14:49:39 -07:00
toddouska
db805524de
Merge pull request #3248 from SparkiDev/aes_cbc_oob
...
AES-CBC check for input size of 0
2020-09-03 13:40:34 -07:00
Jacob Barthelmeh
682b1468b8
free test certificate when test is done
2020-09-02 16:05:05 -06:00
toddouska
b3acd57de5
Merge pull request #3254 from dgarske/leaks
...
Fixes valgrind leak reports (related to small stack cache)
2020-09-02 10:44:49 -07:00
toddouska
9268de229a
Merge pull request #3266 from dgarske/unit_test
...
Fix for DH compute key compatibility function failure
2020-09-02 10:23:23 -07:00
JacobBarthelmeh
914905f1bc
Merge pull request #3193 from embhorn/zd10457_b
...
Fix CheckHostName matching
2020-09-02 10:36:02 -06:00
toddouska
6f56c3c800
Merge pull request #3204 from dgarske/ocsp_nonblock
...
Fix for OCSP response in non-blocking mode and testing script improvements
2020-09-01 15:56:52 -07:00
Chris Conlon
97241331ac
Merge pull request #3246 from ethanlooney/23rd_branch
...
Added ecc.c unit tests to api.c - final PR
2020-09-01 14:44:14 -06:00
Jacob Barthelmeh
fd2074da00
fix for order of components in issuer when using compatiblity layer api to generate cert
2020-09-01 09:27:45 -06:00
Sean Parkinson
89b9a77eca
Get builds with WOLFSSL_NO_CLIENT_AUTH compiling and testing
...
Fix build for no client or server and no client auth.
Fix tests to detect when no client auth compiled and test is trying to
do client auth.
2020-09-01 15:27:46 +10:00
David Garske
c587ff72d2
Fix for occasional unit.test failure in test_wolfSSL_EVP_PKEY_derive.
2020-08-31 14:04:51 -07:00
Ethan Looney
568184f53f
Changed len from hardcoded value to sizeof oid
2020-08-31 13:42:23 -06:00
Ethan Looney
c8d93d4d5e
Added ecc.c unit tests to api.c
2020-08-31 13:42:23 -06:00
David Garske
e9b1ceae7e
Merge pull request #3255 from tmael/big_endian
...
Make ByteReverseWords available for big and little endian
2020-08-31 07:34:50 -07:00
David Garske
28b2be37cd
Merge pull request #3259 from ejohnstown/sniffer-no-oldtls
...
Sniffer without OldTls
2020-08-31 07:34:24 -07:00
Sean Parkinson
54c8774103
ChaCha20: Enable streaming with Intel x86_64 asm
2020-08-31 09:06:51 +10:00
Sean Parkinson
91c131fbd8
Curve448: fix 32-bit implementation
...
Fix small define check
2020-08-31 09:05:06 +10:00
Sean Parkinson
db864be6a4
TLS 1.3 Early Data: fix
...
Will process early data packets now.
Added test to check output of server for early data being received.
2020-08-31 09:03:05 +10:00
Sean Parkinson
d2802f2d15
Merge pull request #3264 from dgarske/iar_sp
...
Fix for building SP math with IAR
2020-08-31 08:40:50 +10:00
Sean Parkinson
f444c63560
Merge pull request #3262 from julek-wolfssl/missing-cipherExtraData-2
...
HAVE_SESSION_TICKET can also be defined without TLS 1.2
2020-08-31 08:34:54 +10:00
David Garske
5692135819
Fix for building SP math with IAR to force noinline. ZD 10839
2020-08-28 11:04:28 -07:00
Daniel Pouzzner
9c76f19625
GetASNInt(): check for invalid padding on negative integer.
2020-08-28 12:43:21 -05:00
Juliusz Sosinowicz
c6d1d524fc
HAVE_SESSION_TICKET can also be defined without TLS 1.2
2020-08-28 16:05:28 +02:00
Juliusz Sosinowicz
605b274442
Jenkins fixes
2020-08-28 12:04:11 +02:00
Sean Parkinson
015c73686f
Merge pull request #3261 from dgarske/zd10848
...
Fixes for several implicit cast warnings
2020-08-28 16:49:03 +10:00
David Garske
94b0dcb7e9
Peer review feedback to add explicit parenthesis on cast.
2020-08-27 16:18:54 -07:00
David Garske
0d2e37cc42
Fixes for several implicit cast warnings. ZD 10848.
2020-08-27 13:51:55 -07:00
Juliusz Sosinowicz
52df9d6c69
TLS and DTLS both need to support APP DATA during SCR
...
Also some misc fixes
2020-08-27 21:13:19 +02:00
David Garske
21d17b17d0
Fix typo in code comment for ECC curve cache. Fix for valgrind report of possible use of uninitialized value with ChaCha/Poly AEAD test.
2020-08-27 12:01:24 -07:00
David Garske
32b46e344d
Fix for ECC curve cache without custom curves enabled.
2020-08-27 11:18:55 -07:00
David Garske
3e685fdb5b
Fix for DTLS DoClientHello HMAC free (function has another exit point).
2020-08-27 10:02:15 -07:00
Jacob Barthelmeh
ab52bcf43d
add overried for max entries and certificate generation size
2020-08-26 19:22:57 -06:00
John Safranek
5b39976cc0
Sniffer without OldTls
...
1. Put a guard around the call to DeriveKeys() when building with
--enable-sniffer --disable-oldtls. Disabling OldTls removes the
DeriveKeys() function. Similar logic used in internal.c.
2020-08-26 16:47:44 -07:00
Eric Blankenhorn
ea5c290d60
Fix CheckHostName matching
2020-08-26 14:03:17 -05:00
David Garske
9af0e5528e
New openssl_test return code checking requires fix from PR #3243 .
2020-08-26 10:22:00 -07:00
Tesfa Mael
b90acc91d0
Make ByteReverseWords available for big and little endian
2020-08-26 10:13:06 -07:00
David Garske
1b2b3de2c9
Fixes for missing free calls on hash tests.
2020-08-26 09:48:46 -07:00
David Garske
6d5731b8e9
Fixes for HMAC_CTX cleanup not being called to free SHA2 resources with WOLFSSL_SMALL_STACK_CACHE. Added return code checking and cleanup for openssl_test.
2020-08-26 09:45:26 -07:00
David Garske
5c76afc41c
Fix for SHA256 missing initialization of small stack cache variable. Fixes issue with Intel ASM and WOLFSSL_SMALL_STACK_CACHE
2020-08-26 09:44:32 -07:00
David Garske
3878af96cd
Fix for SP init and free with HAVE_WOLF_BIGINT. Fix for sp_free macro typo. Fix to expose mp_init_copy with ECC disabled because its used by mp_test.
2020-08-26 09:42:29 -07:00
David Garske
61545df606
Fix to make sure DTLS cookie HMAC free gets called. Note: This does not cover the many error case paths.
2020-08-26 09:41:26 -07:00
David Garske
14e1489365
Fix for SRP leaks with WOLFSSL_SMALL_STACK_CACHE
2020-08-26 09:41:09 -07:00
Jacob Barthelmeh
bc58dde700
fix for serial number containing 0's and for RNG fail case
2020-08-26 00:03:39 -06:00
Sean Parkinson
e2b5de2657
Add doxygen comments for wc_InitRsaKey_Id()
2020-08-26 09:04:40 +10:00
David Garske
6a984da53f
Fixes and Improvements to OCSP scripts. Fix for OCSP test with IPV6 enabled (use -b bind to any on server). Fix to use random port number for the oscp-stapling.test script. Reduce delay times in scripts.
2020-08-25 10:55:41 -07:00
Juliusz Sosinowicz
8b934624f5
DTLS non-blocking scrwith example
2020-08-25 11:26:20 +02:00
Sean Parkinson
3a25faea60
AES-CBC check for input size of 0
...
Don't need to do anything when size is 0.
2020-08-25 13:36:45 +10:00
Jacob Barthelmeh
ef9beaf271
adjust sanity check on serial number size to match fix
2020-08-24 18:15:05 -06:00
Jacob Barthelmeh
c7136498ec
add test case
2020-08-24 17:19:03 -06:00
Jacob Barthelmeh
c4a6fba591
fix for ASN1 time and serial number
2020-08-24 17:00:19 -06:00
toddouska
d077efcbb3
Merge pull request #3237 from SparkiDev/mp_oob_1
...
Fix out of bounds read when writing to very long buffer
2020-08-24 15:28:00 -07:00
toddouska
c5cab6afba
Merge pull request #3236 from dgarske/retcheck
...
Various fixes and improvements (return codes, build warns and func doc)
2020-08-24 15:27:04 -07:00
toddouska
7e6100593e
Merge pull request #3223 from SparkiDev/fp_gcd_fix
...
Check the error return from fp_mod in fp_gcd
2020-08-24 15:24:20 -07:00
toddouska
cf208901fd
Merge pull request #3218 from guidovranken/wc_PKCS12_PBKDF_ex-leak-fix
...
In wc_PKCS12_PBKDF_ex, free outer loop variable if inner loop fails
2020-08-24 15:23:47 -07:00
David Garske
a23b30bc18
Merge pull request #3245 from tmael/ctx_pKey
...
Correct a mismatch of directives
2020-08-24 14:39:43 -07:00
David Garske
749025963e
Merge pull request #3239 from SparkiDev/ed448_cast
...
Ed448: Fix compiler warning Intel -m32
2020-08-24 10:13:25 -07:00
David Garske
7ee2b61a5a
Peer review feedback to also check EAGAIN and always have supported.
2020-08-24 08:18:25 -07:00
David Garske
47cc8d232a
Fix in ED448 wc_ed448_check_key function for possible dereference of a null pointer.
2020-08-24 07:31:06 -07:00
Sean Parkinson
4f44df96dc
MP: integer OOB write fix
...
mp_to_unsigned_bin_len() now checks length passed in is greater than or
equal length to write.
2020-08-24 22:48:52 +10:00
Sean Parkinson
955a53dce3
Ed448: Fix compiler warning Intel -m32
2020-08-24 16:29:48 +10:00
Sean Parkinson
e30361e186
Fix out of bounds read when writing to very long buffer
...
mp_to_unsigned_bin_len() didn't handle buffers longer than maximum MP
size. Fixed tfm and sp_int versions.
2020-08-24 09:18:07 +10:00
David Garske
085f55195a
Fix for handling OCSP response in non-blocking mode.
2020-08-21 15:50:34 -07:00
David Garske
7d45e85b03
Add ED448 to the "all" options.
2020-08-21 15:47:02 -07:00
David Garske
083f143c89
Fixes for warnings with minimum ECC build.
2020-08-21 15:47:02 -07:00
David Garske
51c2960407
Added function comment for wolfSSL_i2a_ASN1_OBJECT. Added heap context for wolfSSL_CertManagerCheckOCSP
2020-08-21 15:47:02 -07:00
David Garske
5f059306fd
Fix for case with ssl->error not being set.
2020-08-21 15:47:02 -07:00
David Garske
03b7ac559a
Fix for example return code checking.
2020-08-21 15:47:02 -07:00
toddouska
44e575b8c4
Merge pull request #3227 from dgarske/release-4.5.0-async
...
Release 4.5.0 async
2020-08-21 15:34:20 -07:00
David Garske
fd2aece058
Fix for building ECC_CACHE_CURVE without WOLFSSL_CUSTOM_CURVES.
2020-08-20 16:16:18 -07:00
David Garske
3fbaccc8a1
Fix for API unit test test_wolfSSL_X509_sign, which can have a varying length depending on if MSB is set. About 1 in 200 tests would fail.
2020-08-20 15:33:28 -07:00
David Garske
dd517fd81c
Fixed several compiler warnings with inline variable declaration, deprecated func decl and small stack use of invaid memory (heap). Thanks @douzzer for these.
2020-08-20 15:13:43 -07:00
David Garske
92cf0d7b10
Fix numerous maybe-uninitialized errors in WOLFSSL_SP_SMALL and WOLFSSL_SMALL_STACK cases.
2020-08-20 15:05:20 -07:00
David Garske
25f9d15980
Fix for benchmark example when using the ECC encrypt (--enable-eccencrypt) and timing resistance. New timing resistance RNG requirements for ECC Shared Secret.
2020-08-20 14:25:06 -07:00
David Garske
1d55b2f526
Fixes for several memory leaks related to HAVE_WOLF_BIGINT.
2020-08-20 14:25:06 -07:00
David Garske
79c0fd3f29
Fix for ECC make key test not waiting for async completion.
2020-08-20 14:25:05 -07:00
David Garske
0011b7b376
Fix possible ECC curve cache leak for custom curves. Fix possible memory leak with wc_DhKeyDecode and WOLFSSL_DH_EXTRA. Fix leak in dh_test with new call to DH key import.
2020-08-20 14:25:05 -07:00
toddouska
0fa5af9929
Merge pull request #3224 from ejohnstown/release-update
...
Release v4.5.0 Supplement
2020-08-20 09:34:58 -07:00
John Safranek
05671d183c
update README/ChangeLog
2020-08-19 10:53:26 -07:00
Sean Parkinson
549c47de65
Handle when k is 1 or order + 1 for timing resistant ECC
2020-08-19 10:50:37 -07:00
John Safranek
362e328180
NTRU fixes
...
1. When configuring for NTRU, enable static RSA.
2. The echoserver should not try to use NTRU with TLSv1.3.
2020-08-19 10:46:03 -07:00
David Garske
1f10e77b0f
Fix for SP math with WOLFSSL_VALIDATE_ECC_KEYGEN. Fixes logic error on point x/y zero check.
2020-08-19 09:30:32 -07:00
John Safranek
55632a0567
Two more out of order DTLS message fixes.
2020-08-18 17:54:25 -07:00
Sean Parkinson
38b717eb42
Clear MP in ECC to free allocated memory
2020-08-18 17:54:25 -07:00
John Safranek
113753370d
Long Test Fixes
...
1. Sniffer was trying to log a NULL pointer as a string. Logged a string instead.
2. Few misc fixes in ECC.
2020-08-18 17:54:25 -07:00
Tesfa Mael
fbe0e04388
Correct mismatch of directives
2020-08-18 16:44:43 -07:00
Sean Parkinson
3a7ad4f03b
Check the error return from fp_mod in fp_gcd
...
Error can occur when using small stack and memory allocation fails.
2020-08-19 08:50:27 +10:00
John Safranek
6e49a63e50
fix call to MakeAnyCert from wc_MakeNtruCert(); it was missing the new parameter
2020-08-17 17:12:11 -07:00
John Safranek
c1090cff3f
update rpm-spec.in
2020-08-17 14:42:20 -07:00
toddouska
028bddd7ab
Merge pull request #3215 from ejohnstown/release-4.5.0
...
Release Update
2020-08-17 13:51:23 -07:00
John Safranek
5c6da52ac1
Update release notes.
2020-08-17 09:20:53 -07:00
Sean Parkinson
cb5d6a5c12
Check ECC scalar before multiplication
...
A k with more bits than in order doesn't work in ECC scalar
multiplication.
Check private key length in wc_ecc_check_key()
Check private key length in ecc_make_pub_ex()
2020-08-17 08:39:39 -07:00
John Safranek
3be7f3ea3a
Reject DTLS application data messages in epoch 0 as out of order.
2020-08-14 17:21:39 -07:00
John Safranek
ef5271dd9f
fips-check script shouldn't force FIPS-ready build to be v2.
2020-08-14 14:31:50 -07:00
John Safranek
3f6861ee82
FIPS Ready Fix with ECC Timing Resistance
...
Commit 6467de5 added some timing resistance to ECC shared secret
agreement. It involved adding an RNG object to the ecc keys so
a random z value can be added to the mix. The older FIPS release
has ECC outside the boundary, so it uses the new ECC code. FIPSv2
has ECC inside the boundary, but all the TLS code checks for that
version of FIPS and leaves out the calls to the new functions as
it is using an older version of ecc.c. FIPS Ready uses the latest
version of ecc.c but compiles as FIPSv2. So, the code outside of
the crypto layer is treating ECC as FIPSv2 and not calling the new
functions, but the crypto layer assumes the RNG should be present,
and errs out on testing.
1. Added a separate option for FIPS Ready to the enable-fips
configure option. `--enable-fips=ready`. It will treat FIPS
Ready as the next kind of FIPS release. FIPS Ready will be
treated like FIPS v3 in the build.
2. Changed the C preprocessor checks for FIPS version 2 to be
checks for not version 2, with respect to ECC Timing Resistance
and FIPS builds.
2020-08-14 10:54:55 -07:00
John Safranek
1dc0a76436
Patch from Jacob. When parsing a certificate name, if an item is unknown, its NID is set to 0. Don't try to add NID's of 0.
2020-08-13 17:01:26 -07:00
John Safranek
e16496512e
Merge pull request #3216 from SparkiDev/rel_fixes_1
...
Fixes from C++ and address access checking
2020-08-13 15:32:16 -07:00
Eric Blankenhorn
7744f0d543
Check for non-blocking return code in BioSend
2020-08-13 15:33:20 -05:00
John Safranek
7e6863e78b
resolving build issues for FIPSv2 OE2 with --enable-opensslextra
2020-08-13 13:24:44 -07:00
John Safranek
64084bcba2
Add a void to the empty parameter list for the function wolfSSL_SESSION_new().
2020-08-13 13:18:29 -07:00
Guido Vranken
087fa7cbec
In wc_PKCS12_PBKDF_ex, free outer loop variable if inner loop fails
2020-08-13 19:22:36 +02:00
Sean Parkinson
bc74bfebdd
Fixes from C++ and address access checking
...
Fix access of table for cache resistance.
Don't name variable public or private.
Cast from void*
2020-08-13 15:19:49 +10:00
John Safranek
ceed98b952
Modify the openssl test script to run the openssl commands in an eval.
2020-08-12 16:59:10 -07:00
John Safranek
3bd27f7912
fix a bad path in renewcerts
2020-08-12 15:17:21 -07:00
John Safranek
95337e666c
Release Update
...
1. Update the usual versions.
2. Update README and ChangeLog.
3. Modify genecc and renewcerts to update two certificate files that had expired.
4. Update the expired certificate files.
2020-08-12 14:43:47 -07:00
John Safranek
e30341ea83
Merge pull request #3190 from embhorn/zd10712
...
Sanity check key sizes
2020-08-12 09:37:40 -07:00
toddouska
21ed05b85e
Merge pull request #3214 from dgarske/snifferFreeFix
...
Fix for SSL sniffer free to properly cleanup globals
2020-08-11 20:27:09 -07:00
toddouska
fa146870bd
Merge pull request #3155 from julek-wolfssl/openssh-fixes-cherry-picked
...
Additional OpenSSL compat stuff for OpenSSH
2020-08-11 16:32:31 -07:00
toddouska
532c2f50e8
Merge pull request #3083 from julek-wolfssl/openssl-compat-X509V3_EXT_i2d
...
Implement more OpenSSL compatibility functions
2020-08-11 15:01:41 -07:00
David Garske
65bcc03885
Fix for SSL sniffer free to properly cleanup globals (resolves issue with then calling ssl_InitSniffer -> ssl_FreeSniffer then ssl_InitSniffer again). ZD 10757.
2020-08-11 14:07:32 -07:00
toddouska
1681ed1b85
Merge pull request #3211 from cconlon/jniconfig
...
Update "enable-jni" option for current JSSE requirements
2020-08-11 12:39:54 -07:00
Jacob Barthelmeh
5cede22d1e
wait to set size till after sanity check
2020-08-11 12:59:01 -06:00
Daniel Pouzzner
e4fe6b6573
Merge pull request #3210 from dgarske/rsa_checkkey_sp
...
Fix for `unit.test` error with SP and RSA 1024-bit key gen
2020-08-11 12:00:41 -05:00
toddouska
87a00df2ea
Merge pull request #3118 from julek-wolfssl/aead-only-fix
...
Check for WOLFSSL_AEAD_ONLY in wolfSSL_dtls_import_internal
2020-08-11 09:33:47 -07:00
toddouska
4e6bc02257
Merge pull request #2982 from SparkiDev/ecc_sc
...
ECC now calls mp_submod_ct and mp_addmod_ct
2020-08-11 09:26:56 -07:00
JacobBarthelmeh
8b7f588aaf
Merge pull request #3108 from SparkiDev/openssl_interop
...
Update OpenSSL interopability testing
2020-08-11 09:42:43 -06:00
Juliusz Sosinowicz
6e14b224da
Add NULL check in wolfSSL_EC_POINT_invert
2020-08-11 10:11:48 +02:00
Sean Parkinson
93cdfd7132
Update OpenSSL interopability testing
...
Added TLS 1.3 testing.
Added Ed25519 and Ed448 testing.
Added tesitng of OpenSSL client against wolfSSL server.
Fixed builds of Curve25519/Curve448/Ed25519/Ed448 in different
configurations.
2020-08-11 16:44:45 +10:00
Sean Parkinson
6467de5a88
Randomize z ordinates in scalar mult when timing resistant
...
An RNG is required for shared secret calculation now.
Use wc_ecc_set_rng() to set an RNG against the ECC object.
ECC verification does not need timing resistance and does not randomize
z ordinates.
2020-08-11 16:12:47 +10:00
Sean Parkinson
3ce933c90a
Make fp_montgomery_reduce constant time
2020-08-11 16:12:10 +10:00
Sean Parkinson
0102902445
Add and use a mp_cmp_mag that is constant time.
2020-08-11 16:12:10 +10:00
Sean Parkinson
8b05160349
Reworked ECC mulmod and fix size of k
...
When using wc_ecc_mulmod_ex2(), the k size can be fixed to be one bit
longer than order.
2020-08-11 16:12:10 +10:00
Sean Parkinson
9ef9671886
ECC uses CT vers of addmod, submod and div_2_mod
...
The TFM implementations of mp_submod_ct, mp_addmod_ct,
mp_div_2_mod_t are more resilient to side-channels.
2020-08-11 16:12:10 +10:00
toddouska
4f30e37094
Merge pull request #3074 from julek-wolfssl/dtls-multiple-app-records
...
Handle 2+ dtls APP data records in one udp packet
2020-08-10 14:52:04 -07:00
toddouska
242df3d11a
Merge pull request #3209 from SparkiDev/jenkins_fixes_1
...
Fixes from Jenkins failures
2020-08-10 14:30:27 -07:00
toddouska
98b4272e5b
Merge pull request #3202 from ejohnstown/abi-server
...
ABI Update for Server
2020-08-10 14:25:05 -07:00
David Garske
26aaf473db
Fix for unit.test error with RSA 1024-bit key gen when using ./configure --enable-keygen --enable-sp. Issue started in PR #3119
2020-08-10 12:40:29 -07:00
Juliusz Sosinowicz
a50affb408
Malloc enough space
2020-08-10 16:08:46 +02:00
Eric Blankenhorn
50647ccdb1
Sanity check key sizes
2020-08-10 07:19:33 -05:00
Juliusz Sosinowicz
ef4b29ebc7
Jenkins fixes
2020-08-10 12:49:18 +02:00
Juliusz Sosinowicz
55d4817956
Jenkins fixes
2020-08-10 12:39:16 +02:00
Juliusz Sosinowicz
da190b8177
Don't map back to affine in wc_ecc_mulmod. It is done in ecc_map later.
2020-08-10 12:33:18 +02:00
Sean Parkinson
3444b115ba
Fix valgrind check to ignore bash leak
2020-08-10 14:02:50 +10:00
Sean Parkinson
0232239959
Ignore test-log-dump-to-file.txt
...
Sometimes left behind by unit.test
2020-08-10 12:46:53 +10:00
Sean Parkinson
7bb2a69161
Fix memory leak in api.c
...
When testing wc_ecc_import_raw(), the mp_int's in the ecc object are
initialized.
For small math, this throws away the allocated buffer.
Must free the object before importing.
2020-08-10 12:42:46 +10:00
Sean Parkinson
72d1352bd6
Fix ARM builds
...
Need to include options.h in assembly now.
bufPt declared in block but not outside.
poly1305_block and poly1305_blocks need prototype - declaration in
wolfcrypt/src/port/arm/armv8-poly1305.c (__arch64__ only).
2020-08-10 11:59:10 +10:00
Sean Parkinson
920c97963c
Fix Jenikins failure - ToTraditional not declared
...
./configure --disable-asn --disable-ecc -disable-rsa --enable-psk
--enable-testcert
2020-08-10 10:57:07 +10:00
Sean Parkinson
19ade820b0
Merge pull request #3208 from dgarske/sp_nonblock
...
Fixes and improvements for SP ECC non-blocking
2020-08-10 09:59:23 +10:00
David Garske
b25eccb07e
Merge pull request #3203 from tmael/libwebsockets
...
Enable HAVE_EX_DATA for libwebsockets
2020-08-08 14:34:18 -07:00
David Garske
62e78b7cf4
Fix state machine after script rebase.
2020-08-07 16:56:58 -07:00
David Garske
bc03b5793c
Add state for ECC verify non-blocking and mont_inv_order to reduce maximum blocking time.
2020-08-07 16:48:16 -07:00
David Garske
f7fcef5f32
Fix for build error / typo for ECC 256-bit non-blocking only.
2020-08-07 16:47:08 -07:00
David Garske
c0a664a8e5
Merge pull request #3200 from douzzer/20200805
...
Add an error-checking wc_curve25519_make_pub() routine to the API for use by Wireguard
2020-08-07 16:32:52 -07:00
toddouska
1724347f7a
Merge pull request #3091 from julek-wolfssl/sess-serialization
...
Expose session serialization outside of `OPENSSL_EXTRA`
2020-08-07 15:41:27 -07:00
toddouska
89e6f3bcd5
Merge pull request #3206 from SparkiDev/ed448_oob
...
ED448: Fix out of bounds read in import public
2020-08-07 15:36:11 -07:00
toddouska
17cc941b29
Merge pull request #3195 from SparkiDev/sp_ecc_cache
...
SP ECC Cache Resitance
2020-08-07 15:35:06 -07:00
JacobBarthelmeh
dd6238fb77
Merge pull request #3174 from embhorn/zd10655
...
Fix CheckAltNames to handle IP type
2020-08-07 16:04:56 -06:00
Daniel Pouzzner
0faff24a65
refactor wc_curve25519_make_key() to use wc_curve25519_make_pub() to complete the pair. also, add call to fe_init() in the non-NXP codepath of wc_curve25519_make_pub() (note fe_init() is currently a no-op).
2020-08-07 13:02:35 -05:00
Juliusz Sosinowicz
cbd9b3717f
Map points to Montgomery form for arithmetic.
2020-08-07 18:18:30 +02:00
Juliusz Sosinowicz
ea6edb6913
Fix memory leak
2020-08-07 17:39:48 +02:00
Chris Conlon
b03e1dd2a9
Merge pull request #3197 from ethanlooney/19th_branch
...
Added asn.c unit tests
2020-08-07 09:25:50 -06:00
Eric Blankenhorn
064bfa583d
Fix CheckAltNames to handle IP type
2020-08-07 10:12:56 -05:00
David Garske
9e1012b48a
Merge pull request #3205 from SparkiDev/sp_fixes_3
...
SP ECC: initialize infinity in make key
2020-08-07 07:12:04 -07:00
Sean Parkinson
4c00af1136
ED448: Fix out of bounds read in import public
...
Fix formatting
2020-08-07 14:11:11 +10:00
Sean Parkinson
1ea3dc5f55
SP ECC: initialize infinity in make key
2020-08-07 12:15:31 +10:00
Daniel Pouzzner
f6acbd5f97
test_wc_curve25519_make_pub(): fix order of args to wc_curve25519_make_pub().
2020-08-06 18:37:00 -05:00
Tesfa Mael
6379ca8e10
libwebsockets requires *CRYPTO_EX_DATA* APIs
2020-08-06 16:29:39 -07:00
Daniel Pouzzner
c325001d0d
note argument endianness and return values in intro comment for wc_curve25519_make_pub().
2020-08-06 18:07:39 -05:00
toddouska
82d927d40f
Merge pull request #3199 from dgarske/openssl_sha
...
Fix for building openssl compat without SHA-1
2020-08-06 15:59:26 -07:00
Daniel Pouzzner
0f59e632e1
tests/api.c: add test_wc_curve25519_make_pub(); fix some old stray tabs; remove weird extra string-terminating null in test_wolfSSL_sk_CIPHER_description().
2020-08-06 17:52:48 -05:00
Daniel Pouzzner
758665e347
Fix for TLS anonymous cipher and PKCS11 cast warnings. (author=dgarske)
2020-08-06 17:49:55 -05:00
Sean Parkinson
132adeac14
Merge pull request #3188 from julek-wolfssl/missing-cipherExtraData
...
Move `cipherExtraData` so that it is available when HAVE_SESSION_TICKET
2020-08-07 08:18:57 +10:00
Daniel Pouzzner
52a2222c79
curve25519.c: call the new API routine wc_curve25519_make_pub(), not wc_curve25519(), for clarity and consistency (hat tip to Jacob).
2020-08-06 14:48:29 -05:00
John Safranek
14ff41a88c
ABI Update for Server
...
Added WOLFSSL_ABI tags to the functions wolfTLSv1_2_server(),
wolfTLSv1_3_server(), and wolfSSL_accept().
2020-08-06 11:17:25 -07:00
toddouska
e121139178
Merge pull request #3179 from ejohnstown/suitesz
...
Suite Size Check
2020-08-06 11:05:10 -07:00
toddouska
15be5476e9
Merge pull request #3185 from SparkiDev/fp_check_max
...
tfm: Check for overflow and return error (fixed max size)
2020-08-06 10:54:26 -07:00
toddouska
4e9d49556e
Merge pull request #3194 from SparkiDev/unit_fix_1
...
Fix unit.test to not fail randomly
2020-08-06 10:51:12 -07:00
toddouska
462f4f9e45
Merge pull request #3196 from cconlon/cavpmarvell
...
Add fips-check.sh target for marvell-linux-selftest, selftest v2 support
2020-08-06 10:45:03 -07:00
Daniel Pouzzner
b2e7c09b71
ksdk_port.c: third time's the charm? (typo, s/curve25529_bCurveParam/curve25519_bCurveParam)
2020-08-06 12:02:01 -05:00
Daniel Pouzzner
7ae789dbb0
wolfcrypt/src/curve25519.c: fix typo in wc_curve25519() -- CURVE25519_KEYSIZE, not CURVE25519_KEY_SIZE; add static kCurve25519BasePoint at top level
2020-08-06 11:45:54 -05:00
Daniel Pouzzner
5cad0b10e5
fix typo in wolfcrypt/src/port/nxp/ksdk_port.c ("curve_bCurveParam" vs correct curve25529_bCurveParam) introduced in aadec345ab.
2020-08-06 11:35:04 -05:00
Ethan Looney
77bb300409
Removed unnecessary pointers, matched Xfree arugments and checked the return values of generated keys
2020-08-06 09:21:41 -07:00
Ethan Looney
afcb40724e
Added proper ifdef's to EccPrivateKeyToDer
2020-08-06 08:06:06 -07:00
David Garske
435eabfb4b
Fix build error with unused variables. Added compat function for X509_add_ext.
2020-08-06 07:51:04 -07:00
Juliusz Sosinowicz
25619119b4
Change implicit conversions to explicit conversions
2020-08-06 15:52:11 +02:00
Juliusz Sosinowicz
f1e2a3c8b9
Code review changes
2020-08-06 15:52:11 +02:00
Juliusz Sosinowicz
139a192185
Implement wolfSSL_d2i_X509_NAME
2020-08-06 15:52:11 +02:00
Juliusz Sosinowicz
ca3a608408
Implement functions
...
- `wolfSSL_d2i_ECPrivateKey`
- `wolfSSL_EC_POINT_add`
- `wolfSSL_EC_POINT_invert`
2020-08-06 15:52:11 +02:00
Juliusz Sosinowicz
2529ce21b0
Implement wolfSSL_EC_GROUP_dup
2020-08-06 15:52:11 +02:00
Juliusz Sosinowicz
ea8dd31de0
Implement wolfSSL_i2d_PUBKEY and refactor wolfSSL_i2d_PrivateKey
2020-08-06 15:52:11 +02:00
Juliusz Sosinowicz
1f0d6d5f31
New functions implemented
...
- `EC_POINT_is_on_curve`
- `i2d_EC_PUBKEY`
- `i2d_ECPrivateKey`
- `wc_ecc_point_is_on_curve`
2020-08-06 15:52:11 +02:00
Juliusz Sosinowicz
88b9bf3fba
Fix memory leak with EncryptDerKey
2020-08-06 15:52:11 +02:00
Juliusz Sosinowicz
e131d6be5b
group->curve_nid is now set to the real NID of the curve
2020-08-06 15:52:11 +02:00
Juliusz Sosinowicz
471a9bd9fd
Handle 2+ dtls APP data records in one udp packet
...
Just return one message at a time if processing application data
2020-08-06 14:03:38 +02:00
Juliusz Sosinowicz
c28b7b59c3
Fix jenkins leaks
2020-08-06 13:47:26 +02:00
Juliusz Sosinowicz
ad2e710563
Fix missing free
2020-08-06 13:47:26 +02:00
Juliusz Sosinowicz
a6651a21f8
Fix segfault
2020-08-06 13:47:26 +02:00
Juliusz Sosinowicz
229c5e9563
wolfSSL_X509V3_EXT_i2d cont.
2020-08-06 13:47:26 +02:00
Juliusz Sosinowicz
dfee8d0346
wolfSSL_X509V3_EXT_i2d now copies structs instead of trying to convert to DER format
2020-08-06 13:47:26 +02:00
Juliusz Sosinowicz
fe1f815761
wolfSSL_X509V3_EXT_i2d: NID_ext_key_usage
2020-08-06 13:45:36 +02:00
Juliusz Sosinowicz
e89015b58a
WIP: wolfSSL_X509V3_EXT_i2d
2020-08-06 13:45:36 +02:00
Juliusz Sosinowicz
3621af9996
Implement new OpenSSL API
...
- i2d_PKCS8PrivateKey_bio
- X509V3_EXT_i2d
- SSL_renegotiate_pending
2020-08-06 13:45:36 +02:00
Juliusz Sosinowicz
42c8f8f9b5
Check for WOLFSSL_AEAD_ONLY in wolfSSL_dtls_import_internal
2020-08-06 13:44:09 +02:00
Daniel Pouzzner
18178e056d
add missing const qualifiers to arch variants of curve25519(), and to nxp_ltc_curve25519().
2020-08-05 21:12:50 -05:00
David Garske
4a167c0f2c
Merge pull request #3119 from tmael/do178-fix
...
DO-178 fix
2020-08-05 16:30:00 -07:00
Sean Parkinson
8afd629a30
Fix unit.test to not fail randomly
...
Get the serial number from the certificate to calculate the encoding size.
Fix making of the certificate to copy serial number out if not already set.
2020-08-06 08:52:21 +10:00
Ethan Looney
9671901de6
Added a free call to SetSubjectBuffer
2020-08-05 15:52:09 -07:00
Sean Parkinson
83caf39caa
SP ECC Cache Resitance
...
SP ECC improved cache attack resistant implementation.
On by defualt and turn off with WC_NO_CACHE_RESISTANT.
2020-08-06 08:21:08 +10:00
Chris Conlon
e5e87db6aa
add HAVE_EX_DATA, OPENSSL_ALL, HAVE_ALPN to enable-jni configure option
2020-08-05 15:43:26 -06:00
David Garske
c421445ba9
Added no SHA-1 hash support for OPENSSL compatibility. Fix for ./configure --enable-opensslextra --disable-sha. This allows using SHA2-256 for the hashing including the derived issuerHash and subjectHash. Adds issuer hash openssl compatibility function X509_issuer_name_hash.
2020-08-05 14:43:24 -07:00
Daniel Pouzzner
ffa2cdd2d1
add public function wc_curve25519() "compute the public key from an existing private key, using bare vectors."; rename existing _LOCAL functions wc_curve25519_GetBasePoint() and wc_curve25519() to nxp_ltc_curve25519_GetBasePoint() and nxp_ltc_curve25519() respectively; add const qualifiers opportunistically to existing _LOCAL function curve25519()
2020-08-05 16:28:17 -05:00
Ethan Looney
49e5d8efea
Added additional ifdef's to Ed25519 functions and cast derSz to word32
2020-08-05 12:31:50 -07:00
Ethan Looney
633e950942
Added asn.c unit tests
2020-08-05 10:57:32 -07:00
Chris Conlon
d12b80abdf
Merge pull request #3192 from ethanlooney/21st_branch
...
Added check for wolfmath.c for digits == 0 and test for api.c
2020-08-05 09:51:51 -06:00
JacobBarthelmeh
1034139214
Merge pull request #3081 from kaleb-himes/GH2998_REWORK_FOLLOWUP
...
Cleanup of example client/server buffer sizes
2020-08-05 09:31:30 -06:00
Sean Parkinson
6c4bcb3b59
tfm: Check for overflow and return error (fixed max size)
2020-08-05 10:42:32 +10:00
Tesfa Mael
5d7649c959
Review comment in sp_int file
2020-08-04 15:37:20 -07:00
Daniel Pouzzner
def3192073
Merge pull request #3189 from SparkiDev/ed448_pkcb_fix
...
Fix calls to Ed448 sign and verify in test.h
2020-08-04 17:23:45 -05:00
toddouska
0bdaa2d572
Merge pull request #3169 from dgarske/stmcube
...
STM Cube fixes and documentation improvements
2020-08-04 15:08:04 -07:00
Ethan Looney
42856287ee
Added check for wolfmath.c for digits == 0 and test for api.c
2020-08-04 13:25:10 -07:00
toddouska
8d00b015c1
Merge pull request #3182 from dgarske/configall_noold
...
Fix to NOT enable SSLV3 and TLS v1.0 with `--enable-all`
2020-08-04 12:25:59 -07:00
Chris Conlon
5641e2ae50
Merge pull request #3173 from ethanlooney/18th_branch
...
Added unit tests for wolfmath.c
2020-08-04 09:10:21 -06:00
Sean Parkinson
c6f83645fe
Fix calls to Ed448 sign and verify in test.h
2020-08-04 09:56:14 +10:00
toddouska
0df2da47ff
Merge pull request #3180 from embhorn/zd10697
...
Fix OOB in fp_read_radix_16
2020-08-03 16:44:01 -07:00
toddouska
a536e8acd6
Merge pull request #3187 from SparkiDev/config_fix_1
...
Fixes for different configurations
2020-08-03 16:41:50 -07:00
toddouska
48be407852
Merge pull request #3186 from SparkiDev/rsa_pss_oob
...
RSA PSS check input length is hash length
2020-08-03 16:41:15 -07:00
toddouska
87f5dac3c4
Merge pull request #3170 from kaleb-himes/FIPS_USER_SETTINGS
...
Remove fixed len constraint in FIPS mode
2020-08-03 16:35:26 -07:00
toddouska
bfb4b2079b
Merge pull request #3163 from dgarske/nrf52
...
Fixes for building against latest nRF52 SDK
2020-08-03 16:33:49 -07:00
toddouska
3e84f1c53f
Merge pull request #2882 from dgarske/example_configs
...
Added area for template user_settings files in `examples/config`
2020-08-03 16:32:57 -07:00
Ethan Looney
7f381275b1
Removed comment and changed len equal to variables instead of numbers
2020-08-03 13:31:11 -07:00
Juliusz Sosinowicz
6c92116124
Move cipherExtraData so that it is available when HAVE_SESSION_TICKET
2020-08-03 15:32:49 +02:00
Sean Parkinson
d0969ea1ce
Fixes for different configurations
...
Fix SkipInt() to work with DSA.
Fix protection around SetBitString16Bit() - when WOLFSSL_CERT_GEN and
WOLFSSL_CERT_EXT defined is only use.
WOLFSSL_RSA_VERIFY_ONLY and PSS means testing of PSS won't work.
Fix g++ build around ASN1_SEQUENCE - const variable required to be
initialized.
2020-08-03 14:55:09 +10:00
Sean Parkinson
3ffa4350e8
RSA PSS check input length is hash length
...
Input is the hash of the message and the hash type is the hash used to
generate the hash/input.
2020-08-03 12:17:03 +10:00
David Garske
4f91d60d22
Fixes for build issues without OPENSSL_EXTRA defined.
2020-07-31 15:25:58 -07:00
David Garske
776b1a2d17
Fix for ED25519 with user_settings.h. Fixes for build warnings. Fix spelling error. Added template for wolfBoot key/sign tools.
2020-07-31 15:17:53 -07:00
David Garske
197c21a508
Fix for --enable-all (also used by --enable-distro) to NOT enable SSLV3 and TLS v1.0.
2020-07-31 13:54:08 -07:00
Eric Blankenhorn
d21d95c629
Fix OOB in fp_read_radix_16
2020-07-31 15:19:40 -05:00
David Garske
3531b581b5
Added return code check wolfSSL_CryptHwMutexInit
2020-07-31 12:01:09 -07:00
David Garske
904241cba4
Fix to only init the RNG once for nRF51/nRF52x.
2020-07-31 11:56:32 -07:00
John Safranek
fd4f8fe7a0
Suite Size Check
...
1. Check that the cipher suite size is even when doing the Client
Hello message.
2. Check that the cipher suite size is a multiple of three when doing
the Old Client Hello message.
3. Check that the hash/signature algorithm list size is even when
processing the extensions.
2020-07-31 11:44:24 -07:00
toddouska
ff08a01f94
Merge pull request #3171 from SparkiDev/tls13_fin_fix
...
TLS 1.3: Client requires cert_vfy before finished when not PSK
2020-07-31 11:28:24 -07:00
toddouska
e7fe460fac
Merge pull request #2746 from dgarske/cmake
...
Adds CMake support to wolfSSL
2020-07-31 11:14:59 -07:00
David Garske
71cc5381ad
Added new examples/config area with template user_settings.h files and instructions for using.
2020-07-31 11:01:58 -07:00
Ethan Looney
b627610cde
Added bad test cases for get_digit and corrected comment formatting
2020-07-31 09:44:10 -07:00
David Garske
db20fb6ca1
Fixes for using CMake with Visual Studio. Improvements to documentation for portability.
2020-07-30 16:44:36 -07:00
David Garske
c30ffad622
Fix for STM PKA ECC parameters. Improvements to the STM AES GCM code. Cleanup of hardware mutex code.
2020-07-30 16:00:19 -07:00
David Garske
48e1dfc910
Remove the STM Cube .ioc files. These examples have been moved to the wolf Cube pack ( https://www.wolfssl.com/files/ide/I-CUBE-WOLFSSL-WOLFSSL.pack )
2020-07-30 14:45:52 -07:00
Ethan Looney
c52930bb8a
Added freerng to 'test_mp_rand'
2020-07-30 09:37:05 -07:00
Tesfa Mael
d03971e233
Add comment to clarify errno in test
2020-07-30 09:18:45 -07:00
Tesfa Mael
493510e2ea
Review comments
2020-07-30 09:18:45 -07:00
Tesfa Mael
4cc7f9e4a9
Check correct returned value
2020-07-30 09:18:45 -07:00
Tesfa Mael
cebb283822
DO-178 changes
2020-07-30 09:18:45 -07:00
Ethan Looney
3381eb2094
Added tests for Sha512.c
2020-07-30 09:18:45 -07:00
Kaleb Himes
d96f86fcd9
Merge branch 'master' into GH2998_REWORK_FOLLOWUP
2020-07-30 09:47:48 -06:00
Chris Conlon
1168bdd05b
Merge pull request #3165 from ethanlooney/17th_branch
...
Added unit tests for wc_port.c
2020-07-30 09:08:28 -06:00
Sean Parkinson
4c0105ed9d
Merge pull request #3175 from ejohnstown/dtls-speed-redux
...
DTLS Test Speed Fix Redux
2020-07-30 22:17:40 +10:00
David Garske
a38f7a4fca
Added STM32F1 Cube HAL support (we had StdPeriLib, not Cube).
2020-07-29 17:22:41 -07:00
John Safranek
397d1ab19c
DTLS Test Speed Fix Redux
...
1. Fix the check for XSLEEP_US in the client.
2. Added XSLEEP_MS to mirror XSLEEP_US, in terms of XSELECT().
2020-07-29 16:51:08 -07:00
toddouska
64f6dc08f7
Merge pull request #3164 from SparkiDev/tls13_ocsp2
...
TLS 1.3 server MUST NOT use OCSP Status V2
2020-07-29 16:23:24 -07:00
David Garske
46ef82e2fd
For for STM32 with TLS v1.3 and AES-GCM. The IV was not being reset after using hardware causing the aes->reg to be incorrect.
2020-07-29 15:39:49 -07:00
David Garske
e4650a9151
Fixes for STM32 Crypto hardware acceleration locking to work with multiple threads. Fix for api.c missing devId in new RNG test. Added STM32F207 to configuration template.
2020-07-29 14:55:35 -07:00
Ethan Looney
b4cd0886bb
Changed test returns for 'get_digit' to remove implicit conversion errors
2020-07-29 14:23:03 -07:00
Chris Conlon
7861a22d28
add marvell-linux-selftest target to fips-check.sh
2020-07-29 15:10:47 -06:00
Chris Conlon
c6b4fa3be3
add selftest version for newer 4.1.0 validation
2020-07-29 15:10:47 -06:00
David Garske
dafc2bf8d4
Added redirect note for OpenSTM32 to STM32Cube example. PR #3031 . Updates to README.md from ST.
2020-07-29 12:04:14 -07:00
Ethan Looney
7c59c74e07
Added unit tests for wolfmath.c
2020-07-29 10:34:15 -07:00
Ethan Looney
b524926837
Deleted unneeded xfopen and xfclose
2020-07-29 09:31:37 -07:00
Kaleb Himes
80678d96b6
Change to inline comment
2020-07-29 10:10:33 -06:00
Chris Conlon
af92c531bf
Merge pull request #3168 from ethanlooney/16th_branch
...
Added semicolons to two functions to fix doxygen issues and deleted ssl param and replaced it with ctx param
2020-07-29 09:31:14 -06:00
Sean Parkinson
f59a1fa295
TLS 1.3: Client requires cert_vfy before finished when not PSK
2020-07-29 10:21:34 +10:00
toddouska
e618257f21
Merge pull request #3167 from dgarske/test_fixups
...
Fixes for `mutex_test` and API unit test `derSz`
2020-07-28 16:45:58 -07:00
David Garske
4cbf3c3dcd
Fixes for the STM Cube TLS in-memory example for CMSIS RTOS v2.
2020-07-28 15:52:02 -07:00
Chris Conlon
70aa11f0a9
Merge pull request #3153 from ethanlooney/15th_branch
...
Added unit tests for Logging.c
2020-07-28 16:35:31 -06:00
Kaleb Himes
567f1b8be4
Add to settings.h w a warning directive
2020-07-28 15:52:36 -06:00
David Garske
1ed66f11a9
Fixes for STM32L5 benchmarks.
2020-07-28 13:56:23 -07:00
kaleb-himes
ffdc2eddf6
Remove fixed len constraint in FIPS mode
2020-07-28 13:34:52 -06:00
David Garske
223f848dae
Expanded documentation for using the wolfSSL Cube pack. Added STM32 benchmarks for several boards.
2020-07-28 12:08:12 -07:00
David Garske
9160a126e4
Fixes for running wolfCrypt test/benchmark with SECP256R1 disabled. Improved detection of ECC key generation size.
2020-07-28 11:43:48 -07:00
toddouska
ff12da30df
Merge pull request #2713 from akmcomau/16bit
...
Updates for 16bit processors / Disable ATECC transport key
2020-07-28 09:27:27 -07:00
Ethan Looney
5af4872bab
Changed lock type to 0
2020-07-28 09:16:43 -07:00
Ethan Looney
0448004535
Added semicolons to two functions to fix doxygen issues and deleted ssl param and replaced it with ctx param
2020-07-28 08:39:23 -07:00
David Garske
25fcd082d7
Improve the mutex_test test with pthreads. Fixes #3109
2020-07-28 08:19:32 -07:00
David Garske
8440973d99
Fix for derSz calculation on non-const value keySz. ZD 10654
2020-07-28 08:18:42 -07:00
toddouska
c67aeba806
Merge pull request #3156 from dgarske/armasm
...
Fixes for building with `WOLFSSL_ARMASM` when `user_settings.h` is used
2020-07-27 16:45:25 -07:00
toddouska
f46e08e9ea
Merge pull request #3158 from kaleb-himes/ZD10580_R2
...
Address buffer underflow, thanks to J.S. for the report on ZD10580
2020-07-27 16:42:42 -07:00
toddouska
5ef7ff6054
Merge pull request #3149 from SparkiDev/tls13_no_cli_cert_err
...
TLS 1.3: Client with no certificate an error with define
2020-07-27 16:40:07 -07:00
David Garske
13eab0aeab
Also check for NRF52_SERIES, since NRF52 is only for NRF52832_XXAA.
2020-07-27 15:26:55 -07:00
David Garske
99f72faedb
Fix for nRF5x AES GCM so key is set. Fixes GMAC test. Don't force enable wolf memory and no ASN time for WOLFSSL_NRF5x.
2020-07-27 14:30:41 -07:00
David Garske
8b25b48621
Improvements to CMake support based on feedback from users.
2020-07-27 12:13:08 -07:00
David Garske
b273ba771e
Add new file to automake.
2020-07-27 11:04:37 -07:00
David Garske
9a281e5e3a
Adds CMake support to wolfSSL:
...
* Build wolfSSL as a library and builds all examples / tests.
* Added instructions in the INSTALL file.
* Fix for evp.c when being included directly due to improperly placed `WOLFSSL_EVP_INCLUDED`.
2020-07-27 11:04:37 -07:00
Ethan Looney
e7429c8504
Added unit tests for wc_port.c
2020-07-27 09:32:25 -07:00
Chris Conlon
6b3b37604f
Merge pull request #3159 from ethanlooney/16th_branch
...
Added doxygen comments and changed footer date to 2020
2020-07-27 09:24:59 -06:00
Chris Conlon
b0ed250f09
Merge pull request #3162 from ethanlooney/18th_branch
...
Changed ifndef(NO_SHA224) to ifdef(WOLFSSL_SHA224)
2020-07-27 09:21:28 -06:00
Sean Parkinson
76a35f2a77
TLS 1.3: Client with no certificate an error with define
...
WOLFSSL_NO_CLIENT_CERT_ERROR
2020-07-27 09:54:51 +10:00
Sean Parkinson
b775058f49
TLS 1.3 server MUST NOT use OCSP Status V2
...
Parses the extension but does not use the information.
TLSX code change to ensure that the OCSP Status V2 extension is not
written out in EncryptedExtension, CertificateRequest nor Certificate
messages.
2020-07-27 09:32:14 +10:00
Sean Parkinson
7883156f49
Merge pull request #3160 from dgarske/ecc_nb_noctx
...
Fix for ECC non-blocking only to allow calling without context set
2020-07-27 08:53:42 +10:00
David Garske
8417e0b725
Fixes for building against latest nRF52 SDK. Allow nRF5x AES GCM to be enabled (uses software, but ECB is accelerated). Fix in wolfCrypt test for building AES GSM only with NO_AES_DECRYPT.
2020-07-24 15:46:17 -07:00
Ethan Looney
b734b13120
Changed ifndef(NO_SHA224) to ifdef(WOLFSSL_SHA224) due to 'NO_SHA224' not existing
2020-07-24 14:24:50 -07:00
Ethan Looney
7b357cff39
Changed param's, examples and brief's
2020-07-24 12:54:29 -07:00
toddouska
e84defb268
Merge pull request #3044 from dgarske/sniffer_tls13
...
TLS v1.3 sniffer support
2020-07-24 11:46:38 -07:00
Ethan Looney
6088a7bd79
Added if defined debug check to only print to file if debug is enabled
2020-07-24 10:03:49 -07:00
David Garske
6324aec179
Fix for ./configure --enable-sp=yes,nonblock --enable-sp-math CFLAGS="-DWC_ECC_NONBLOCK_ONLY".
2020-07-24 09:30:45 -07:00
David Garske
38cef2b3c9
Merge pull request #3151 from ejohnstown/dtls-size
...
DTLS Size Fix
2020-07-24 08:19:50 -07:00
toddouska
8789ebb02e
Merge pull request #3152 from ejohnstown/dtls-test-speedup
...
DTLS Test Speedup
2020-07-23 16:53:39 -07:00
David Garske
1559d66261
Fix for WC_ECC_NONBLOCK_ONLY case to also check WC_ECC_NONBLOCK.
2020-07-23 15:41:09 -07:00
John Safranek
fd1a1bd0f7
Add some missing frees to the example client when using in the return-not-exit mode for tests.
2020-07-23 14:32:48 -07:00
David Garske
20ef2daa9f
Fix for ECC non-blocking to allow calling without context set and block when WC_ECC_NONBLOCK_ONLY is defined. In FIPS mode we need "blocking".
2020-07-23 14:31:41 -07:00
Ethan Looney
6bc4bfd7f2
Added doxygen comments to include all missing ABI functions and changed footer date from 2017 to 2020
2020-07-23 13:25:18 -07:00
JacobBarthelmeh
81475fac96
Merge pull request #3154 from embhorn/zd10651
...
Fix build error with X509_SMALL config
2020-07-23 13:34:29 -06:00
John Safranek
839044d9e1
1. Remove dead assignment from client test.
...
2. Fix memory leak in example server test.
3. Use verify callback on certificates to allow callback to fail
them.
4. Restore the forced failure test cases.
5. Make the verify action thread local.
2020-07-23 12:26:49 -07:00
JacobBarthelmeh
303d0dfedb
Merge pull request #3157 from embhorn/zd10631
...
Fix build issue with OPENSSL_EXTRA_X509_SMALL
2020-07-23 13:18:28 -06:00
kaleb-himes
3c5c0f88d4
Address buffer underflow, thanks to J.S. for the report on ZD10580
2020-07-23 12:20:41 -06:00
Ethan Looney
563806c497
Changed the log dump txt file's directory to include /tests and added it to make clean
2020-07-23 10:12:40 -07:00
Martin Akman
1f8d4149a5
Merge in master
2020-07-23 21:39:18 +10:00
Martin Akman
d02e52e07b
More updates from code review
2020-07-23 21:28:51 +10:00
Sean Parkinson
568fc8f5bd
Fixes for compiling for ARM64 iOS
...
Fix bug in ChaCha20 assembly code (was writing one byte too many).
Fix the assembly code to have APPLE format.
Change Poly1305 inline assembly as requested by compiler.
Initialize variables that will be set anyway - compiler complaint.
Change to use the assembly code files for Curve25519 and SHA-512.
Ed25519 not suported with ARM assembly.
2020-07-23 18:08:37 +10:00
toddouska
e198f6e73b
Merge pull request #3141 from SparkiDev/tls_cert_alert
...
Send more detail alerts for bad certificates
2020-07-22 16:46:14 -07:00
toddouska
ab7535c3f6
Merge pull request #3135 from SparkiDev/fp_set_bit
...
fp_set_bit: return error when bit offset is too large
2020-07-22 16:40:17 -07:00
toddouska
d75e6d4f55
Merge pull request #3131 from JacobBarthelmeh/Testing
...
add sanity check on padSz
2020-07-22 16:39:27 -07:00
toddouska
ea21d56463
Merge pull request #3127 from SparkiDev/mp_sub_d
...
mp_sub_d (integer.c): return error when digit is too big
2020-07-22 16:38:37 -07:00
Ethan Looney
f7e4c1c8ad
Added SetLoggingCb check
2020-07-22 15:44:13 -07:00
Eric Blankenhorn
9b421ce497
Fix for config failure
2020-07-22 17:22:46 -05:00
Chris Conlon
5f2de9e176
Merge pull request #3130 from TakayukiMatsuo/master
...
Add support for "X72N Envision Kit" evaluation board
2020-07-22 16:22:14 -06:00
John Safranek
98ae3a2352
Added a suite test use case to cover the new error check. Also fixed and issue with passing a couple flags to the test case runner, and some other changes to support the new test.
2020-07-22 13:20:23 -07:00
David Garske
fe08f23a50
Improved test sleep. Cleanup sleep calls.
2020-07-22 13:08:57 -07:00
David Garske
3a2be13043
Remove execute bit on file.
2020-07-22 12:52:53 -07:00
David Garske
c5371a2dbd
Fix for kResumeMsg unused if NO_SESSION_CACHE defined.
2020-07-22 12:15:14 -07:00
Eric Blankenhorn
39271e9234
Fix build issue with OPENSSL_EXTRA_X509_SMALL
2020-07-22 14:08:57 -05:00
David Garske
1af38c5c55
Fixes for building with WOLFSSL_ARMASM when user_settings.h is used.
2020-07-22 10:47:35 -07:00
Ethan Looney
5e515c12fb
Removed unneeded comment
2020-07-22 08:28:43 -07:00
John Safranek
c8e9d058f0
DTLS Test Speedup
...
Change the example client to use select instead of sleep.
If building for the standalone client, it will wait 1 second.
If built for no main driver, it'll wait 10ms rather than 1 second.
2020-07-21 18:40:18 -07:00
David Garske
11b0d963d3
Fix for example client to send HTTP GET on resume with "-g". Fixes issue with ./scripts/openssl.test.
2020-07-21 15:42:33 -07:00
Sean Parkinson
056ee0987c
Merge pull request #3146 from dgarske/sp_nonblock
...
ECC non-blocking support
2020-07-22 08:36:21 +10:00
Ethan Looney
953e7cf181
Changed sz type from int to long
2020-07-21 15:28:17 -07:00
Eric Blankenhorn
89913076f1
Fix build error with X509_SMALL config
2020-07-21 16:36:30 -05:00
David Garske
639f73fe1f
Fix for client writes to not include the null term.
2020-07-21 13:42:01 -07:00
David Garske
4e637ddf10
Cleanup on example client/server messages and sizes. Original PR #3023 caused sending extra null characters in normal (non HTTP) example cases.
2020-07-21 13:34:25 -07:00
David Garske
8ead28f2f4
Merge pull request #3150 from ejohnstown/sctp-test
...
SCTP Test
2020-07-21 12:46:13 -07:00
Ethan Looney
b500a54fc5
Added new file to read in and dump error message and added cleanup within cleanup script
2020-07-21 12:30:43 -07:00
Ethan Looney
e8034619ba
Add more if defined to ERR_print_errors_fp
2020-07-21 12:30:43 -07:00
David Garske
9268ae1397
Fix line length issues. Add debug msg in test to show number of non-blocking iterations.
...
```
$ ./configure --enable-ecc=nonblock --enable-sp=yes,nonblock CFLAGS="-DWOLFSSL_PUBLIC_MP" --enable-debug && make
$ ./wolfcrypt/test/testwolfcrypt
...
ECC non-block sign: 18063 times
ECC non-block verify: 35759 times
ECC test passed!
```
2020-07-21 10:41:25 -07:00
Sean Parkinson
c45e192581
Send more detail alerts for bad certificates
2020-07-22 00:07:23 +10:00
TakayukiMatsuo
c204eb0fb1
commented out NO_ASM_TIME macro to enable certificate validation
2020-07-21 16:09:16 +09:00
John Safranek
5d5aa129ca
When attempting to send a message with DTLS, if it is too large, return an error rather than splitting it across records. (ZD 10602)
2020-07-20 16:14:53 -07:00
John Safranek
10c293a76c
SCTP Test
...
1. Removed test cases for DTLSv1.0 that used AEAD ciphers.
2. Cleaned up some typos in the test configs.
3. Fixed typo in a WOLFSSL_SCTP ifdef check.
2020-07-20 15:03:48 -07:00
toddouska
61d81dd878
Merge pull request #3123 from SparkiDev/mp_rshb
...
rshb check range of n
2020-07-20 13:08:45 -07:00
David Garske
29abd72c39
Merge pull request #3024 from kaleb-himes/ZD10411
...
Update arduino script to reflect includes of inline files
2020-07-20 11:29:49 -07:00
David Garske
e6017de19d
Fix in snifftest to try loading private key into static ephemeral and private key. Updated pcap files (were missing TCP packets).
2020-07-20 11:10:46 -07:00
Chris Conlon
ddb2923c19
Merge pull request #3133 from ethanlooney/13th_branch
...
Added unit tests for Hash.c - Fixed hash formatting errors
2020-07-20 10:03:28 -06:00
Chris Conlon
86745dd7fc
Merge pull request #3134 from ethanlooney/14th_branch
...
Added unit tests for Random.c
2020-07-20 10:02:22 -06:00
Sean Parkinson
52d363390a
rshb check range of n
2020-07-20 11:12:35 +10:00
Sean Parkinson
a8f121b5f8
Merge pull request #3144 from JacobBarthelmeh/examples
...
increase example client key share group array size
2020-07-20 08:38:20 +10:00
David Garske
23a3ead758
Framework for new TLS v1.3 sniffer tests.
2020-07-17 15:56:56 -07:00
David Garske
9409d8682f
Fix for building without session-ticket.
2020-07-17 15:22:35 -07:00
David Garske
e15e0828bf
Cleanup of the SHOW_SECRET debugging. Use only latest wolf API's (not older Cyassl names).
2020-07-17 15:22:35 -07:00
David Garske
3be390d50d
Added TLS v1.3 session resumption support. TLS v1.3 uses session tickets and a resumption secret is derived after the "finished" message. This uses the internal static wolf session cache to retain the resumption secret between sniffer sessions.
2020-07-17 15:22:35 -07:00
David Garske
1b051d9c5b
TLS v1.3 sniffer support:
...
* Added TLS v1.3 sniffer support using static ephemeral key.
* Add support for using a static ephemeral DH and ECC keys with TLS v1.3 using `WOLFSSL_STATIC_EPHEMERAL`.
* Adds new API's `wolfSSL_CTX_set_ephemeral_key` and `wolfSSL_set_ephemeral_key`.
* Expanded TLS extension support in sniffer.
* Refactor of the handshake hashing code.
* Added parameter checking to the TLS v1.3 key derivations (protects use of "DoTls13Finished" if handshake resources have been free'd).
* Added support for loading DH keys via `wc_DhImportKeyPair` and `wc_DhExportKeyPair`, enabled with `WOLFSSL_DH_EXTRA`.
* Added sniffer documentation `sslSniffer/README.md`.
2020-07-17 15:22:35 -07:00
David Garske
80f5fe1494
Added documentation for wc_ecc_set_nonblock.
2020-07-17 15:20:23 -07:00
David Garske
90ee12f51a
Added test case for ECC non-blocking. ./configure --enable-ecc=nonblock --enable-sp=yes,nonblock CFLAGS="-DWOLFSSL_PUBLIC_MP" && make.
2020-07-17 15:13:50 -07:00
David Garske
547144bc9c
Adds ECC non-blocking sign/verify support when used with SP math. New --enable-sp=nonblock and --enable-ecc=nonblock options. Example ./configure --enable-ecc=nonblock --enable-sp=yes,nonblock.
2020-07-17 15:13:50 -07:00
David Garske
080ccd9820
Merge pull request #3145 from JacobBarthelmeh/Compatibility-Layer
...
sanity check on return value for wolfSSL_X509_NAME_ENTRY_get_object
2020-07-17 15:05:25 -07:00
Ethan Looney
ef71099225
Removed duplicate semicolon and deleted unneeded initrng
2020-07-17 10:34:38 -07:00
JacobBarthelmeh
01a01c373f
sanity check on return value for wolfSSL_X509_NAME_ENTRY_get_object
2020-07-17 11:03:12 -06:00
Jacob Barthelmeh
e55ca1a8cf
increase example client key share group array size
2020-07-17 10:26:34 -06:00
Ethan Looney
93c6e99aef
Added a ret check
2020-07-17 08:45:39 -07:00
David Garske
4ff6b6a908
Merge pull request #3142 from SparkiDev/sp_int_small
...
Fix SP math for small builds. Fixes #3139
2020-07-17 08:33:05 -07:00
Sean Parkinson
0336fdb98d
Fix SP math for small builds
2020-07-17 12:00:14 +10:00
TakayukiMatsuo
cd025d4e03
Added RX72NEnvisionkit/include.am
2020-07-17 09:30:40 +09:00
Ethan Looney
96e59118fc
Changed the if defined order and to include fips and selftest
2020-07-16 15:50:03 -07:00
Ethan Looney
2275b89654
Removed unnecessary comments and added HashInit's and checked that they returned errors when they should
2020-07-16 12:38:55 -07:00
toddouska
50f228af0a
Merge pull request #3125 from SparkiDev/mp_leading_bit
...
Change mp_leading_bit (integer.c) to not to require a copy
2020-07-16 11:05:09 -07:00
toddouska
859a1eebe4
Merge pull request #3124 from SparkiDev/sp_add_d
...
Fix sp_add_d
2020-07-16 10:56:28 -07:00
toddouska
9137794cb4
Merge pull request #3105 from embhorn/zd10457_a
...
Adding wolfSSL_X509_check_ip_asc
2020-07-16 10:53:27 -07:00
Sean Parkinson
eb7a01342f
fp_set_bit: return error when bit offset is too large
...
If the bit to set is beyond the predefined maximum size then return an
error.
Same for fp_is_bit_set().
2020-07-16 12:34:31 +10:00
Eric Blankenhorn
f2b279e834
Update from review
2020-07-15 20:57:04 -05:00
toddouska
fbe0c8cba7
Merge pull request #3122 from JacobBarthelmeh/Compatibility-Layer
...
fix X509 multiple OU's and refactor
2020-07-15 15:06:22 -07:00
toddouska
925e9d9213
Merge pull request #3075 from julek-wolfssl/dtls-no-cookie
...
DTLS session resumption fixes
2020-07-15 14:07:34 -07:00
toddouska
edf88c3da1
Merge pull request #3073 from SparkiDev/tls13_dox
...
Update TLS 1.3 function Doxygen documentation
2020-07-15 13:58:07 -07:00
Ethan Looney
d54a51cd20
Added if not defined wc_no_rng
2020-07-15 13:56:12 -07:00
Ethan Looney
7a642e2b78
Added unit tests for Random.c
2020-07-15 12:55:19 -07:00
Ethan Looney
6be76e84ec
Fixed formatting for Shake256Hash
2020-07-15 12:52:17 -07:00
Ethan Looney
9a07df9631
Changed hash size to 144 for Shake256Hash
2020-07-15 12:52:17 -07:00
Ethan Looney
379212acec
Initialized variable data
2020-07-15 12:52:17 -07:00
Ethan Looney
aaa6e892da
Added unit tests for hash.c
2020-07-15 12:52:17 -07:00
Eric Blankenhorn
525a3cb9c3
Move API out of OPENSSL_EXTRA
2020-07-15 10:48:11 -05:00
Eric Blankenhorn
d1a82589f9
Adding wolfSSL_X509_check_ip_asc
2020-07-15 10:48:11 -05:00
David Garske
12478a4534
Merge pull request #3128 from tmael/fips_ossl
...
Correct string truncation of XSTRNCAT
2020-07-14 17:17:27 -07:00
Sean Parkinson
e754076c37
Change mp_leading_bit (integer.c) to not to require a copy
2020-07-15 09:20:15 +10:00
Sean Parkinson
ddad95d52c
mp_sub_d (integer.c): return error when digit is too big
...
Code can't handle subtracting a number (an mp_digit) larger than
DIGIT_BIT. Now returns an error rather than giving wrong result.
2020-07-15 09:18:35 +10:00
Sean Parkinson
51e49dbfac
Fix sp_add_d
2020-07-15 09:15:04 +10:00
Jacob Barthelmeh
a8736dd89d
set heap hint for name malloc
2020-07-14 14:23:49 -06:00
toddouska
1caa6f860b
Merge pull request #3088 from kaleb-himes/ZD10539
...
Change Hash union to wc_Hmac_Hash
2020-07-14 11:23:30 -07:00
toddouska
2dcf4c1696
Merge pull request #3087 from SparkiDev/sp_math_mod
...
Fix div implementation in SP int
2020-07-14 11:19:15 -07:00
Jacob Barthelmeh
173b9833fc
fixes for edge build cases and static memory
2020-07-14 09:07:23 -06:00
TakayukiMatsuo
20682ef0aa
Add support for RX72N Envision Kit
2020-07-14 11:33:19 +09:00
Tesfa Mael
aee208f1b1
Correct build
2020-07-13 17:29:12 -07:00
Chris Conlon
4938baa892
Merge pull request #3121 from ethanlooney/12th_branch
...
Added unit tests for Sha3.c
2020-07-13 17:29:45 -06:00
Jacob Barthelmeh
85437e4097
add sanity check on padSz
2020-07-13 17:17:57 -06:00
Jacob Barthelmeh
63c8f7d1b1
x509 small build and memory free
2020-07-13 15:51:27 -06:00
Chris Conlon
a77085960e
Merge pull request #3103 from TakayukiMatsuo/master
...
Supprted TSIP v1.09 for target board GR-ROSE
2020-07-13 14:35:07 -06:00
Ethan Looney
c5b8181005
Added a free call for shake256_copy
2020-07-13 09:58:00 -07:00
Chris Conlon
cbfda8e596
Merge pull request #3111 from ethanlooney/tenth_branch
...
Changed EXTRACT_ALL from NO to YES in order to document every function using Doxygen
2020-07-13 10:05:54 -06:00
Jacob Barthelmeh
d880d59974
fix for init of renegotiation and fix for compiler warnings
2020-07-13 00:31:40 -06:00
Jacob Barthelmeh
eec5f4a109
set initial NID value and account for null character on string
2020-07-12 19:54:50 -06:00
TakayukiMatsuo
af1b532758
Applied review comments to the code
2020-07-11 17:17:33 +09:00
Chris Conlon
ed9648770d
Merge pull request #3120 from ethanlooney/11th_branch
...
Added unit tests for Sha512.c
2020-07-10 17:12:23 -06:00
Jacob Barthelmeh
2aaeb2a2df
fix X509 multiple OU's and refactor
2020-07-10 17:12:20 -06:00
Ethan Looney
84aa7d746a
Added unit tests for Sha3
2020-07-10 15:43:08 -07:00
toddouska
a90d6b2a5e
Merge pull request #3039 from tmael/cov-fix2
...
Coverity fix in wolfSSL 4.4.0 - part 2
2020-07-10 13:06:22 -07:00
toddouska
b8078ab789
Merge pull request #3092 from dgarske/sniffer_loadbuf
...
Added sniffer API's to load buffer directly
2020-07-10 12:58:45 -07:00
Ethan Looney
7e23273d1c
Changed directory for Doxygen's search to only the necessary header files
2020-07-10 12:51:21 -07:00
toddouska
b931dc0d6e
Merge pull request #3110 from JacobBarthelmeh/SGX
...
add SP build for SGX
2020-07-10 10:29:50 -07:00
Ethan Looney
295aa4ac55
Added tests for Sha512.c
2020-07-10 10:15:32 -07:00
kaleb-himes
64c0d53a2d
Use portable friendly XVALIDATE_DATE in ssl.c and add wc_ to default
2020-07-10 09:43:24 -06:00
Ethan Looney
03839ea641
Changed EXTRACT_ALL from NO to YES in order to document every function
2020-07-10 08:16:15 -07:00
David Garske
ed0f2bb8f5
Added sniffer API's to load buffer directly, not file. ZD 10547
2020-07-09 08:54:26 -07:00
TakayukiMatsuo
942226dc5a
Merge branch 'master' of https://github.com/wolfSSL/wolfssl to get updated ocsp tests
2020-07-09 07:47:54 +09:00
Sean Parkinson
b952f18eb4
Merge pull request #3104 from JacobBarthelmeh/nginx
...
Nginx 1.15.7
2020-07-09 08:46:30 +10:00
Sean Parkinson
3e0d0677ee
Merge pull request #3116 from embhorn/zd10570
...
Sanity check in DoTls13HandShakeMsgType
2020-07-09 08:42:37 +10:00
Sean Parkinson
e37bd2ade6
Merge pull request #3113 from guidovranken/scrypt-return-memory-e
...
Return MEMORY_E from wc_scrypt if allocation fails
2020-07-09 08:28:51 +10:00
Tesfa Mael
890500c1b1
Fix Coverity
2020-07-08 08:20:43 -07:00
TakayukiMatsuo
1e94f0478c
Added resetting size info output-buffer before calling export APIs
...
Added resetting size into output-buffer before calling export APIs
2020-07-08 08:20:43 -07:00
Eric Blankenhorn
b9855b51bf
Sanity check in DoTls13HandShakeMsgType
2020-07-08 07:55:05 -05:00
Eric Blankenhorn
5f5040686e
Merge pull request #3112 from kaleb-himes/INTERNAL_OCSP_STAPLING_FIX
...
Put both potential roots for login.live.com into collection for stapl…
2020-07-07 20:46:09 -05:00
Guido Vranken
7f66671449
In wc_PKCS12_PBKDF_ex, break out of outer loop on error
2020-07-08 01:38:02 +02:00
Guido Vranken
43e1eee55d
Return MEMORY_E from wc_scrypt if allocation fails
2020-07-08 01:04:37 +02:00
kaleb-himes
aa704420fd
Fix typo in include.am
2020-07-07 16:39:39 -06:00
toddouska
c8dcd59565
Merge pull request #3082 from JacobBarthelmeh/Testing
...
restrict the cert version allowed
2020-07-07 15:37:01 -07:00
kaleb-himes
42f3a6d7a4
Put both potential roots for login.live.com into collection for stapling test
2020-07-07 16:02:48 -06:00
Chris Conlon
6196698d8b
Merge pull request #3099 from ethanlooney/eighth_branch
...
Added unit tests to sha256.c for sha224 and sha256.
2020-07-07 15:37:38 -05:00
Jacob Barthelmeh
333f4ccced
add SP build for SGX
2020-07-07 10:43:44 -06:00
TakayukiMatsuo
a95b31041c
Added NO_ASN_TIME macro to avoid cert expiration validation
2020-07-07 18:40:41 +09:00
Sean Parkinson
80246dfbc3
Merge pull request #3102 from guidovranken/free-tlsx
...
In TLSX_SupportedFFDHE_Set, free TLSX list if TLSX_PopulateSupportedG…
2020-07-07 08:25:13 +10:00
Ethan Looney
296b562113
Fixed formatting and forgotten curly bracket
2020-07-06 12:33:06 -07:00
Ethan Looney
1b7a96627c
Changed formatting
2020-07-06 12:05:55 -07:00
toddouska
301e5c03b9
Merge pull request #3097 from SparkiDev/sp_int_mul_of
...
Fix SP int size of result checks
2020-07-06 11:17:01 -07:00
toddouska
b8314a70f9
Merge pull request #3089 from kaleb-himes/ZD10539_LICENSING
...
Add or later verbage to LICENSING and sync header license versions
2020-07-06 11:11:11 -07:00
toddouska
514254e294
Merge pull request #3069 from SparkiDev/gnu-stack
...
Add section to asm files to avoid exe stack
2020-07-06 11:08:24 -07:00
JacobBarthelmeh
e194a11cb8
add wolfSSL_SESSION_new and change to peek error
2020-07-06 10:47:46 -06:00
Ethan Looney
dfde73620c
Added if defined cases for tests using hashes
2020-07-06 08:07:03 -07:00
TakayukiMatsuo
9554e54e8f
Resolved conflict
2020-07-06 10:58:58 +09:00
Sean Parkinson
1af2e5cf02
Fix div implementation in SP int
2020-07-06 08:52:44 +10:00
Guido Vranken
04d063f2ba
In TLSX_SupportedFFDHE_Set, free TLSX list if TLSX_PopulateSupportedGroups fails
2020-07-05 23:41:50 +02:00
TakayukiMatsuo
464cd49e45
Supprted TSIP v1.09 for target board GR-ROSE
2020-07-04 23:40:10 +09:00
Sean Parkinson
0e79943a5c
Fix SP int size of result checks
...
sp_lshb: Only put values in extra word id necessary
2020-07-03 09:12:27 +10:00
Ethan Looney
5f3a287a6a
Added tests to sha256.c for sha224 and sha256.
2020-07-02 14:30:30 -07:00
Takashi Kojo
fd257ee8b9
fix guard
2020-07-03 05:42:44 +09:00
Chris Conlon
655022cfc5
Merge pull request #3095 from ethanlooney/sixth_branch
...
Added additional tests for curve25519 and fixed a print format error from previous tests.
2020-07-02 10:07:55 -05:00
Juliusz Sosinowicz
3efd8a8576
Jenkins fixes
2020-07-02 14:59:07 +02:00
Ethan Looney
3242fa3669
Fixed formatting, redundant if's and added a comment explaining why a value was chosen.
2020-07-01 16:01:50 -07:00
JacobBarthelmeh
df9a1a2a0e
revert error peek function
2020-07-01 16:26:38 -06:00
Juliusz Sosinowicz
fd79ebfe8d
TLS 1.3 requires chacha and poly1305 for myTicketEncCb
2020-07-01 20:24:50 +02:00
Ethan Looney
f526a11126
Added additional tests for curve25519 and fixed a print format error from previous tests
2020-07-01 10:19:40 -07:00
Ethan Looney
a59560a1d5
Added tests to curve25519.c and fixed a print error from previous curve25519 tests
2020-07-01 09:32:03 -07:00
tmael
f89686a1ec
Merge pull request #3086 from SparkiDev/sp_c_mod_fix
...
Fix normalization in all SP C divs
2020-07-01 09:02:29 -07:00
Chris Conlon
eb4b575b3a
Merge pull request #3085 from ethanlooney/fourth_branch
...
API tests for Curve448
2020-06-30 17:24:07 -05:00
Ethan Looney
4ad904909c
Added a return check
2020-06-30 12:40:20 -07:00
Ethan Looney
78efb48acf
Added two more tests to hit xmemset lines
2020-06-30 12:40:20 -07:00
Ethan Looney
b7e682e677
Added more tests to api.c for curve448
2020-06-30 12:40:20 -07:00
Chris Conlon
94654c7a46
Merge pull request #3062 from TakayukiMatsuo/branch-2
...
Added testcases for wc_curve25519_export_key_xx
2020-06-30 14:27:24 -05:00
Juliusz Sosinowicz
e63a80f1af
Use NO_SESSION_CACHE as well in preproc checks
2020-06-30 21:21:43 +02:00
JacobBarthelmeh
e6746639af
add SSL_SESSION_up_ref and fix for get lib
2020-06-30 13:16:28 -06:00
kaleb-himes
8d37f57990
Change variable name from Hash to hashAlg
2020-06-30 12:50:26 -06:00
Juliusz Sosinowicz
b57cf802eb
Expose session serialization outside of OPENSSL_EXTRA
...
Use `./configure CFLAGS='-DHAVE_EXT_CACHE'` to enable session serialization without `OPENSSL_EXTRA`.
2020-06-30 20:17:21 +02:00
Felix Lechner
24e10bf4ab
Convert a header file to UTF-8 encoding.
...
The file contained characters from the ISO 8859-1 legacy text
encoding. This commit onverts the file to UTF-8.
2020-06-30 11:14:52 -07:00
kaleb-himes
970391319b
Add or later verbage to LICENSING and sync header license versions
2020-06-30 12:13:13 -06:00
kaleb-himes
55985ad1b4
Change Hash union to wc_Hmac_Hash
2020-06-30 12:01:57 -06:00
Ethan Looney
c39bd55aca
Removed comment, deleted redundent WC_RNG initialization and fixed indentation
2020-06-30 09:32:10 -07:00
toddouska
2c11f96c9d
Merge pull request #3048 from embhorn/zd10216
...
Override CRL error for NO_VERIFY
2020-06-29 15:35:53 -07:00
Sean Parkinson
4e584595f0
Fix normalization in all SP C divs
2020-06-30 08:32:42 +10:00
Ethan Looney
e32e206d7c
Added a return check
2020-06-29 12:55:42 -07:00
Ethan Looney
7fb4a98009
Added two more tests to hit xmemset lines
2020-06-29 09:48:22 -07:00
Ethan Looney
6745733e2e
Added more tests to api.c for curve448
2020-06-29 09:30:17 -07:00
Chris Conlon
b6aaedd3b4
Merge pull request #3080 from ethanlooney/second_branch
...
Added additional tests to curve448.c through api.c
2020-06-29 11:21:15 -05:00
David Garske
7a2384deaf
Merge pull request #3071 from kojo1/user-mutex
...
User defined mutex
2020-06-28 21:45:30 -07:00
Jacob Barthelmeh
14d0b4e7d6
adjust test case
2020-06-26 10:25:50 -06:00
Chris Conlon
7bd5da70a6
Merge pull request #3066 from kaleb-himes/DOX_UPDATES
...
Update v23 methods to reflect TLSv1.3
2020-06-26 10:59:04 -05:00
Ethan Looney
1c1ddaa6c2
Added checks to initial returns and free rng
2020-06-25 16:40:38 -07:00
Sean Parkinson
a10500e5a7
Merge pull request #3079 from tmael/sp_mod
...
Correct SP mod calculation
2020-06-26 08:38:07 +10:00
Sean Parkinson
f6d26b4e81
Merge pull request #3072 from kaleb-himes/SANITY_CHECKS
...
ed25519 and ed448 check sigLen against expected
2020-06-26 08:31:55 +10:00
Jacob Barthelmeh
0c7b851bd3
restrict the cert version allowed
2020-06-25 15:45:18 -06:00
David Garske
e2afbae6aa
Merge pull request #3054 from JacobBarthelmeh/CRL
...
fix for x509 store add crl
2020-06-25 09:52:12 -07:00
JacobBarthelmeh
26f0a74d29
Merge pull request #3023 from kaleb-himes/GH2998-REWORK
...
cleanup GET messages
2020-06-25 10:22:09 -06:00
John Safranek
73c26c5188
Merge pull request #3078 from dgarske/dup_defines
...
Remove duplicate macros in VS user_settings.h files.
2020-06-25 09:09:30 -07:00
kaleb-himes
17466727b2
Implement peer review feedback
2020-06-25 09:43:22 -06:00
John Safranek
4dbdfdea08
Merge pull request #3077 from kaleb-himes/ZD10235_CONFIG
...
configure.ac change == to = when not C code
2020-06-25 08:21:01 -07:00
Tesfa Mael
60d6f616c2
Fix typo
2020-06-25 08:06:14 -07:00
Tesfa Mael
a8f5602e10
Correct mod calculation
2020-06-25 08:01:05 -07:00
Ethan Looney
fe7d9ea7c1
changed RNG to WC_RNG
2020-06-24 15:40:58 -07:00
Ethan Looney
79981e3cf7
Added additonal tests to curve448.c
2020-06-24 15:40:38 -07:00
Ethan Looney
86b7f18502
Added additional tests to curve448.c through api.c
2020-06-24 15:40:22 -07:00
David Garske
a10ee78980
Remove duplicate macros in VS user_settings.h files.
2020-06-24 15:08:49 -07:00
toddouska
07c5f36d6d
Merge pull request #3068 from SparkiDev/modexp-cr
...
Use temp with mont mul in constant time exptmod
2020-06-24 13:19:06 -07:00
kaleb-himes
308562e853
configure.ac change == to = when not C code
2020-06-24 13:41:03 -06:00
JacobBarthelmeh
483b970772
Merge pull request #3061 from embhorn/zd10457
...
Remove multiple defines of GEN_IPADD
2020-06-24 11:33:16 -06:00
kaleb-himes
fdce5152c5
Address peer feedback
2020-06-24 11:25:12 -06:00
toddouska
9cd6f92d19
Merge pull request #3058 from JacobBarthelmeh/Certs
...
Fix and test case for malformed name constraint
2020-06-24 10:15:08 -07:00
Jacob Barthelmeh
b8b2f7ef7d
vs build warning fixes
2020-06-24 10:57:31 -06:00
Sean Parkinson
be5648986c
Update TLS 1.3 function Doxygen documentation
...
Give parameters a name in function prototypes.
2020-06-24 12:35:47 +10:00
Kaleb Himes
23ddc1c4c2
Merge pull request #3067 from SparkiDev/tls13-test-fix
...
Cleanup after TLS 1.3 tests
2020-06-23 17:35:48 -06:00
kaleb-himes
722961f55c
ed25519 and ed448 check sigLen against expected
2020-06-23 17:32:00 -06:00
Eric Blankenhorn
ec755f8dd9
Override CRL error for NO_VERIFY
2020-06-23 18:09:03 -05:00
Sean Parkinson
582240a84d
Merge pull request #3051 from embhorn/zd10451
...
Sanity check wc_ecc_import_raw x, y, and key
2020-06-24 08:52:10 +10:00
Takashi Kojo
55bb95823c
coding template
2020-06-24 07:31:20 +09:00
Jacob Barthelmeh
8511d07698
store chain is free'd when store is free'd
2020-06-23 15:42:32 -06:00
Jacob Barthelmeh
ae90119af4
remove double free in test case
2020-06-23 14:45:31 -06:00
Eric Blankenhorn
7cc64377d0
Sanity check wc_ecc_import_raw x, y, and key
2020-06-23 08:54:47 -05:00
Takashi Kojo
1253be0142
Remove user_setting.h and user-mutex.c example files
2020-06-23 17:30:03 +09:00
Sean Parkinson
e8e455bf39
Add section to asm files to avoid exe stack
...
For Linux ELF need a note section for GNU to indicate stack is not
executable.
2020-06-23 11:58:46 +10:00
Sean Parkinson
7c615967a9
Use temp with mont mul in constant time exptmod
...
For cache attack resistance.
2020-06-23 10:45:31 +10:00
Sean Parkinson
392e09c474
Cleanup after TLS 1.3 tests
...
Make sure the server is dead after each test.
Client may not connect to server if cipher suite not supported and
return error as expected.
2020-06-23 09:14:51 +10:00
Sean Parkinson
5b07905818
Merge pull request #3065 from dgarske/sp_revert
...
Fix SP cache resistant build (reverts part of PR 2970)
2020-06-23 08:42:00 +10:00
toddouska
877b9975eb
Merge pull request #3064 from dgarske/dox_sni
...
Fixes for dox SNI documentation / examples.
2020-06-22 13:38:41 -07:00
toddouska
180439ca34
Merge pull request #3060 from dgarske/git3059_cryptocell
...
Fixes for CryptoCell
2020-06-22 13:37:37 -07:00
toddouska
93bd0dbfe1
Merge pull request #2980 from dgarske/psoc6
...
Fix for `WOLFSSL_ALT_CERT_CHAINS` with long chain
2020-06-22 13:36:35 -07:00
kaleb-himes
646ecb54c2
Update v23 methods to reflect TLSv1.3
2020-06-22 12:04:16 -06:00
David Garske
a29250e87d
Revert SP changes in https://github.com/wolfSSL/wolfssl/pull/2970 that broke --enable-sp CFLAGS="-DWOLFSSL_SP_CACHE_RESISTANT". This was generated with latest scripts.
2020-06-22 07:56:54 -07:00
David Garske
6ecb88da47
Fixes for dox SNI documentation / examples.
2020-06-22 07:37:04 -07:00
JacobBarthelmeh
b88342eeaf
memory handling fixes
2020-06-19 10:08:42 -07:00
JacobBarthelmeh
22d6774966
Merge pull request #2909 from SKlimaRA/SKlimaRA/crl-and-pkcb
...
ParseCrl fix, GetPrivateKeySigSize moved from client only section and Coverity fixes.
2020-06-19 10:51:50 -06:00
TakayukiMatsuo
771d60c085
Replaced some hard-tabs with spaces in wc_curve25519_export_key_raw_ex()
2020-06-19 13:40:16 +09:00
David Garske
6b1a6309ce
Fixes for CryptoCell. Fix for signature wrapper signing to allow larger signing input buffer. Cleanup of some duplicate code. Fix for bad cryptocell ECC make key result check (-9628). Fixes #3059 . Thanks Sylwester.
2020-06-18 13:40:30 -07:00
Eric Blankenhorn
a5664b5ba9
Remove multiple defines of GEN_IPADD
2020-06-18 15:40:22 -05:00
toddouska
f8c6c783db
Merge pull request #3047 from SparkiDev/curve448_dox
...
Add Doxygen documentation for Curve448/Ed448
2020-06-18 13:05:59 -07:00
David Garske
352328348a
For example client "-H verifyFail", which was not setting the verify callback.
2020-06-18 12:54:47 -07:00
David Garske
823b3d90d8
Add braces around new debug message to avoid compiler warning.
2020-06-18 12:12:28 -07:00
toddouska
248b8c9b62
Merge pull request #3057 from kaleb-himes/FIPSv2_plus_OPENSSLALL
...
Resolve issues with FIPSv2 when opensslall set
2020-06-18 10:12:06 -07:00
toddouska
48cd6f36ff
Merge pull request #2967 from dgarske/ecc_null
...
Fixes for ECC key import
2020-06-18 10:10:49 -07:00
Jacob Barthelmeh
1e431e1ade
add test case and fixes from review
2020-06-18 10:57:25 -06:00
David Garske
667d9ca896
Fix to catch the issue in this PR with alt cert chains, which only happens if the verify callback is used and the chain is long enough. Cleanup of the myVerify callback to allow specific actions. Fix the suites.c to not crash if no newline at end of file. Added helpful debug message to show that a CA was found.
2020-06-18 09:26:50 -07:00
David Garske
efa169e595
Fix for invalid files in include.am. Improvement to new alt-chain tests to catch case this PR fixes.
2020-06-18 08:33:59 -07:00
David Garske
d70f6b7ede
Fix for tests/test-chains.conf with new intermediate CA.
2020-06-18 08:33:59 -07:00
David Garske
9be61c61f5
Add alternate chain test case where peer presents chain (INT -> INT2 -> PEER) and only INT2 is loaded as trusted. Update existing alternate chain partial test cases to use INT2. Fix for test suite to allow extra newlines in .test files.
2020-06-18 08:33:59 -07:00
David Garske
5a5bc34aa5
Added second intermediate CA to testing certs. This creates a chain that looks like: ROOT (www.wolfssl.com) -> INT (wolfSSL Intermediate CA) -> INT2 (wolfSSL Intermediate2 CA) -> PEER (wolfSSL Client Chain / wolfSSL Server Chain).
2020-06-18 08:33:59 -07:00
David Garske
0ef5a3d00e
Fix for WOLFSSL_ALT_CERT_CHAINS incorrectly failing on success case.
2020-06-18 08:33:59 -07:00
David Garske
21e0f863b9
Fix for NO_WOLFSSL_SERVER typo.
2020-06-18 08:33:58 -07:00
Juliusz Sosinowicz
03c5359fcd
Add session resumption testing for DTLS
2020-06-18 14:18:02 +02:00
Juliusz Sosinowicz
b590e06f42
DTLS fixes
...
- `SendFinished` resetting`dtls_expected_peer_handshake_number` should depend on side and if we are resuming a connection
- No need to do a cookie exchange on session resumption
2020-06-18 12:13:52 +02:00
TakayukiMatsuo
28819bd45e
Made two lines wrap around in test_wc_curve25519_export_key_raw_ex()
2020-06-18 12:25:21 +09:00
TakayukiMatsuo
a855d6355e
Added cleanup to test_wc_curve25519_export_key_raw_ex
2020-06-18 12:25:21 +09:00
TakayukiMatsuo
1d98c960cf
Added resetting size info output-buffer before calling export APIs
...
Added resetting size into output-buffer before calling export APIs
2020-06-18 12:24:03 +09:00
David Garske
13753d56bb
Cleanup in wc_ecc_sign_hash_ex for blinding value to not call free twice (mp_clear already does mp_free).
2020-06-17 17:11:54 -07:00
David Garske
0fd5eda5af
Fix for test_wolfSSL_DTLS_either_side, which was not properly free'ing in error case. Improves the test shared context logic to make it explicit.
2020-06-17 17:08:09 -07:00
toddouska
220e2634af
Merge pull request #3056 from dgarske/nullcipher_noaes
...
Fixes for a few build edge cases (async w/o DTLS, null cipher w/o AES)
2020-06-17 16:48:48 -07:00
toddouska
f20a2de284
Merge pull request #3055 from dgarske/ocsp_resp
...
Fix for possible use of NULL in the OCSP response nonce
2020-06-17 16:45:53 -07:00
toddouska
3acc31400c
Merge pull request #3053 from SparkiDev/ed448_fixes
...
Fix ED448 calls to use context and correct variable name
2020-06-17 16:41:40 -07:00
Jacob Barthelmeh
dafd35e4c1
remove unused variable
2020-06-17 15:55:08 -06:00
Jacob Barthelmeh
f75659641a
test on malformed name constraint
2020-06-17 14:33:10 -06:00
kaleb-himes
e2fb4c55b8
Resolve issues with FIPSv2 when opensslall set
2020-06-17 14:03:02 -06:00
David Garske
3fb432cef8
Fix for building async without DTLS.
2020-06-17 11:20:08 -07:00
David Garske
81892f4594
Fix for use of WC_MAX_SYM_KEY_SIZE in macro. Fixes build case with --enable-nullcipher --disable-aes.
2020-06-17 11:16:33 -07:00
David Garske
0a38ab8ac2
Fix for possible use of NULL is the OCSP response nonce. This is optional and may not be provided in the OCSP response and should be skipped if not set in the response. ZD 10475.
2020-06-17 11:00:05 -07:00
Jacob Barthelmeh
82921f8650
fix for x509 store add crl
2020-06-17 11:30:18 -06:00
Kaleb Himes
b1aa903c1b
Merge pull request #3052 from julek-wolfssl/infinite-loop-fuzzer
...
Alert level must be cleared or ProcessReply will loop indefinitely
2020-06-16 18:55:15 -06:00
Sean Parkinson
6bb73fb25d
Fix ED448 calls to use context and correct variable name
...
Added basic test of OpenSSL compatability APIs:
- wolfSSL_ED25519_generate_key
- wolfSSL_ED25519_sign
- wolfSSL_ED25519_verify
- wolfSSL_ED2448_generate_key
- wolfSSL_ED448_sign
- wolfSSL_ED448_verify
2020-06-17 10:05:50 +10:00
Juliusz Sosinowicz
90caeaf925
Alert level must be cleared or ProcessReply will loop indefinitely
2020-06-16 23:21:54 +02:00
JacobBarthelmeh
7c6dccd4a0
Merge pull request #3038 from embhorn/zd10457
...
Unused var error
2020-06-16 14:10:54 -06:00
Sean Parkinson
7a15639927
Add Doxygen documentation for Curve448/Ed448
...
Update Curve25519/Ed25519 Doxygen documentation too.
Make public key is a public API - check pubKey pointer is not NULL.
2020-06-16 22:16:13 +10:00
Chris Conlon
b9f13dba61
Merge pull request #3030 from TakayukiMatsuo/usertime
...
ASN1_TIME_new in correct macro condition
2020-06-15 17:49:44 -05:00
toddouska
aa7168df0b
Merge pull request #3045 from SparkiDev/aes_small_fix
...
AES small table fix
2020-06-15 14:19:09 -07:00
toddouska
096d0073ef
Merge pull request #3043 from dgarske/renesas_ra6m3
...
Renesas requested name change to "RA6M3"
2020-06-15 14:18:19 -07:00
toddouska
9d932d09bf
Merge pull request #3042 from dgarske/xcode_updates
...
Updates to Xcode projects to add new files / features
2020-06-15 14:16:14 -07:00
toddouska
74098340ff
Merge pull request #3031 from dgarske/stm32cubeide
...
Adding STM32CubeIDE support
2020-06-15 14:14:43 -07:00
Jacob Barthelmeh
f020b0f24a
add check on decode subtree return value
2020-06-15 14:41:05 -06:00
Sean Parkinson
3f344b7d89
AES small table fix
...
Symbol not needed when only compiling AES algorithms (AES-GCM, AES-CCM,
AES-CTR) not using AES decrypt.
Allow AES-CCM to be compiled without AES-GCM.
2020-06-15 14:46:39 +10:00
Takashi Kojo
8ff1b474bc
Tentative: User defined mutex
2020-06-14 07:12:13 +09:00
David Garske
baaf741c79
Merge pull request #3037 from JacobBarthelmeh/CSharp
...
add peer certificate print to callback with C#
2020-06-12 13:32:50 -07:00
toddouska
1e07563411
Merge pull request #2984 from julek-wolfssl/dtls-scr
...
Add secure renegotiation to DTLS 1.2
2020-06-12 11:22:55 -07:00
toddouska
6166902f66
Merge pull request #2990 from julek-wolfssl/fix-leak
...
Fix leak in SetIndividualInternal
2020-06-12 11:17:40 -07:00
toddouska
4c2dee77d8
Merge pull request #3028 from julek-wolfssl/CRYPTO_memcmp
...
Implement CRYPTO_memcmp
2020-06-12 11:16:18 -07:00
David Garske
eea22eb65d
Renesas requested name change to "RA6M3".
2020-06-12 10:58:20 -07:00
David Garske
d43d75bf81
Updates to xcode projects to add new files.
...
Ran updated iPhone X benchmarks:
```
RNG 330 MB took 1.010 seconds, 326.879 MB/s
AES-128-CBC-enc 920 MB took 1.005 seconds, 915.507 MB/s
AES-128-CBC-dec 6095 MB took 1.000 seconds, 6092.130 MB/s
AES-192-CBC-enc 820 MB took 1.000 seconds, 819.644 MB/s
AES-192-CBC-dec 4860 MB took 1.001 seconds, 4855.794 MB/s
AES-256-CBC-enc 710 MB took 1.005 seconds, 706.419 MB/s
AES-256-CBC-dec 3935 MB took 1.001 seconds, 3930.830 MB/s
AES-128-GCM-enc 1245 MB took 1.003 seconds, 1241.589 MB/s
AES-128-GCM-dec 575 MB took 1.001 seconds, 574.547 MB/s
AES-192-GCM-enc 1235 MB took 1.001 seconds, 1234.343 MB/s
AES-192-GCM-dec 570 MB took 1.003 seconds, 568.521 MB/s
AES-256-GCM-enc 1230 MB took 1.003 seconds, 1226.034 MB/s
AES-256-GCM-dec 570 MB took 1.001 seconds, 569.199 MB/s
3DES 10 MB took 1.386 seconds, 7.213 MB/s
MD5 95 MB took 1.037 seconds, 91.629 MB/s
SHA 80 MB took 1.013 seconds, 78.943 MB/s
SHA-256 1625 MB took 1.000 seconds, 1624.565 MB/s
SHA3-224 60 MB took 1.010 seconds, 59.399 MB/s
SHA3-256 60 MB took 1.073 seconds, 55.921 MB/s
SHA3-384 45 MB took 1.042 seconds, 43.195 MB/s
SHA3-512 35 MB took 1.164 seconds, 30.063 MB/s
HMAC-MD5 95 MB took 1.044 seconds, 91.014 MB/s
HMAC-SHA 80 MB took 1.007 seconds, 79.480 MB/s
HMAC-SHA256 1705 MB took 1.001 seconds, 1703.126 MB/s
RSA 2048 public 32800 ops took 1.003 sec, avg 0.031 ms, 32716.405 ops/sec
RSA 2048 private 1200 ops took 1.041 sec, avg 0.868 ms, /33 ops/sec
DH 2048 key gen 2354 ops took 1.000 sec, avg 0.425 ms, 2353.254 ops/sec
DH 2048 agree 2500 ops took 1.013 sec, avg 0.405 ms, 2467.525 ops/sec
ECC 256 key gen 46503 ops took 1.000 sec, avg 0.022 ms, 46502.069 ops/sec
ECDHE 256 agree 14100 ops took 1.005 sec, avg 0.071 ms, 14034.697 ops/sec
ECDSA 256 sign 29600 ops took 1.003 sec, avg 0.034 ms, 29500.554 ops/sec
ECDSA 256 verify 11000 ops took 1.007 sec, avg 0.092 ms, 10921.516 ops/sec
```
2020-06-12 10:39:26 -07:00
toddouska
f30eb0197b
Merge pull request #3032 from JacobBarthelmeh/PKCS12
...
fix error checking when parsing a PKCS12 DER into an internal structure
2020-06-12 09:57:40 -07:00
JacobBarthelmeh
2b5ed1564c
add error function and print out
2020-06-12 09:45:23 -07:00
Eric Blankenhorn
0f36cdf066
Unused var error
2020-06-12 10:43:01 -05:00
Unknown
cab8dd3731
Ignore duplicate or out of order CCS message
...
Init variables since compiler complains they might be used without initialization.
2020-06-12 12:27:48 +02:00
Juliusz Sosinowicz
ac028e551d
Code Review
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
69802ed1a9
Missing ssl->heap in FreeBuildMsgArgs
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
3980d6117d
Fix Jenkins
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
01b446f469
Fix SessionTicket length in unencrypted case
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
f2d2dadc89
ASYNC: Fix issues with TLS and DTLS
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
eb7a49a1d7
ASYNC: Working TLS SCR
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
a7c4d88876
ASYNC: Working AES128-SHA
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
7b604ad714
WIP
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
73105305cf
WIP
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
a107688891
Fix asynchronous DTLS issue
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
d88f6f1156
DTLS test cases
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
4e60e4b3b7
DTLS Message Grouping
...
Flush output buffer when we suspect that the grouped messages may exceed MTU.
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
d2542dcf38
Restore StoreKeys functionality for TLS case
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
c2ca9f614e
Jenkins tests fixes
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
eb910a64d0
Comments and formatting
2020-06-12 11:36:43 +02:00
Juliusz Sosinowicz
651a7a97b9
Add secure renegotiation to DTLS 1.2
...
- Hash of fragmented certificate was not calculated as a single message and instead we were hashing individual fragments which produced the wrong digest, shared secret, etc...
- Reset handshake number after server Finished packet is sent or received (depending on side)
- Reserve space in buffer for cipher stuff
- Take `DTLS_RECORD_EXTRA` and `DTLS_HANDSHAKE_EXTRA` into size and offset calculations for DTLS path
- Fix renegotiation in DTLS with AES128-SHA
- Fix renegotiation in DTLS with AES-GCM
- Support HelloVerify request during secure renegotiation
- Save renegotiation handshake messages for retransmission in timeout
- Handle cipher parameters from different epochs. DTLS may need to resend and receive messages from previous epochs so handling different sets of encryption and decryption parameters is crucial.
2020-06-12 11:36:43 +02:00
David Garske
255cc016b3
Merge pull request #3034 from kaleb-himes/FORUM_DSA_ISSUE
...
Seperate QT and DSA dependencies
2020-06-11 15:40:12 -07:00
David Garske
ad7e636e34
Adds STM32H7 support. Tested on NUCLEO-H753ZI board.
...
STM32H753ZI at 480MHz
```
Running wolfCrypt Benchmarks...
------------------------------------------------------------------------------
wolfSSL version 4.4.1
------------------------------------------------------------------------------
wolfCrypt Benchmark (block bytes 1024, min 1.0 sec each)
RNG 250 KB took 1.047 seconds, 238.777 KB/s
AES-128-CBC-enc 4 MB took 1.004 seconds, 3.623 MB/s
AES-128-CBC-dec 4 MB took 1.004 seconds, 3.623 MB/s
AES-192-CBC-enc 4 MB took 1.000 seconds, 3.613 MB/s
AES-192-CBC-dec 4 MB took 1.000 seconds, 3.613 MB/s
AES-256-CBC-enc 4 MB took 1.000 seconds, 3.613 MB/s
AES-256-CBC-dec 4 MB took 1.000 seconds, 3.613 MB/s
AES-128-GCM-enc 3 MB took 1.004 seconds, 3.380 MB/s
AES-128-GCM-dec 3 MB took 1.004 seconds, 3.356 MB/s
AES-192-GCM-enc 3 MB took 1.004 seconds, 3.380 MB/s
AES-192-GCM-dec 3 MB took 1.003 seconds, 3.359 MB/s
AES-256-GCM-enc 3 MB took 1.000 seconds, 3.369 MB/s
AES-256-GCM-dec 3 MB took 1.004 seconds, 3.356 MB/s
CHACHA 850 KB took 1.020 seconds, 833.333 KB/s
CHA-POLY 650 KB took 1.015 seconds, 640.394 KB/s
POLY1305 4 MB took 1.004 seconds, 4.037 MB/s
SHA-256 3 MB took 1.004 seconds, 3.088 MB/s
HMAC-SHA256 3 MB took 1.004 seconds, 3.015 MB/s
RSA 2048 public 78 ops took 1.023 sec, avg 13.115 ms, 76.246 ops/sec
RSA 2048 private 4 ops took 1.682 sec, avg 420.500 ms, 2.378 ops/sec
DH 2048 key gen 6 ops took 1.165 sec, avg 194.167 ms, 5.150 ops/sec
DH 2048 agree 6 ops took 1.165 sec, avg 194.167 ms, 5.150 ops/sec
ECC 256 key gen 96 ops took 1.004 sec, avg 10.458 ms, 95.618 ops/sec
ECDHE 256 agree 50 ops took 1.027 sec, avg 20.540 ms, 48.685 ops/sec
ECDSA 256 sign 64 ops took 1.000 sec, avg 15.625 ms, 64.000 ops/sec
ECDSA 256 verify 32 ops took 1.039 sec, avg 32.469 ms, 30.799 ops/sec
Benchmark complete
Benchmark Test: Return code 0
```
2020-06-11 15:17:29 -07:00
David Garske
3b86a4db20
Adding STM32CubeIDE support (and deprecation of OpenSTM32).
...
* Updated example to add support for CMSIS v2 and static memory.
* Improved example to support more build options.
* Added support for detecting Cube HAL and including `wolfSSL.wolfSSL_conf.h`.
2020-06-11 14:45:17 -07:00
JacobBarthelmeh
d97c23edd8
set dynamic flag
2020-06-11 12:46:21 -07:00
JacobBarthelmeh
6af052faae
add peer certificate print to callback
2020-06-11 10:57:26 -07:00
Chris Conlon
cc13c9f062
Merge pull request #3035 from ejohnstown/changelog
...
Fix changelog error
2020-06-11 10:19:10 -05:00
toddouska
29bdc7d8b5
Merge pull request #3015 from tmael/cov-fix
...
Coverity fix in wolfSSL 4.4.0
2020-06-10 17:07:47 -07:00
John Safranek
f7c233af9c
Fix error in the changelog. AES-CTR with AES-NI wasn't actually added.
2020-06-10 15:15:11 -07:00
Juliusz Sosinowicz
d5577c9404
Explicit convert
2020-06-10 18:43:27 +02:00
Kaleb Himes
2fe08e1951
Update comment
...
Thanks @dgarske, great catch!
2020-06-09 17:10:57 -06:00
kaleb-himes
80e888c1c8
Seperate QT and DSA dependencies
2020-06-09 16:47:35 -06:00
Chris Conlon
fb51a2298e
Merge pull request #3019 from kaleb-himes/ZD10380
...
init components as best practice
2020-06-09 17:23:55 -05:00
toddouska
e993cb6cc0
Merge pull request #2942 from dgarske/tls13_on
...
Enable TLS v1.3 by default
2020-06-09 13:30:02 -07:00
toddouska
48783c1982
Merge pull request #2996 from dgarske/stm32hal
...
Fixes and improvements for STM32 crypto hardware
2020-06-09 13:24:27 -07:00
toddouska
c023efb2aa
Merge pull request #3025 from JacobBarthelmeh/Compatibility-Layer
...
fix macro to match *_FLAGS_*
2020-06-09 13:19:29 -07:00
toddouska
7a7bfce565
Merge pull request #3026 from cconlon/selftestfixes
...
Fix warnings with NetBSD gcc compiler
2020-06-09 13:18:44 -07:00
toddouska
ef742c4a42
Merge pull request #3027 from danielinux/psoc6_crypto
...
Cypress PSoC6 wolfcrypt driver
2020-06-09 13:17:37 -07:00
toddouska
8fc908989a
Merge pull request #3029 from SparkiDev/aes-ccm-fix
...
Fix optimized AES-CCM - counter
2020-06-09 13:13:42 -07:00
Jacob Barthelmeh
3a430522da
fix error checking when parsing a PKCS12 DER into an internal structure
2020-06-08 14:23:40 -06:00
Kaleb Himes
72360dee38
Also bring over openSSL headers
2020-06-08 11:39:06 -06:00
David Garske
8b6b54603f
Add STM32WB55 crypto hardware support for AES.
2020-06-08 08:48:59 -07:00
Tesfa Mael
28913a276f
Include GCM in latest FIPS and Windows build
2020-06-08 08:38:59 -07:00
David Garske
5837c70e99
Support for STM32L5 PKA ECC sign/verify acceleration.
2020-06-08 08:37:55 -07:00
David Garske
16c0160e63
Added support for STM32L5.
2020-06-08 08:37:55 -07:00
David Garske
21a34bde8c
Fix whitespace.
2020-06-08 08:37:55 -07:00
David Garske
6f82f15d1b
Performance improvements for STM32 AES CBC and GCM crypto hardware.
...
* AES CBC:
- Do all blocks, not just one at a time.
* AES GCM:
- Use local stack for authentication header if < block size.
- Use hardware GHASH for all authentication header sizes.
Tested with STM32F437II (old/new Cube HAL/StdPeriLib), STM32F777ZI (CubeMX) and STM32L4A6ZG (CubeMX).
2020-06-08 08:37:55 -07:00
David Garske
efe9da0994
Fix for STM32 crypto hash with WOLFSSL_SMALL_STACK_CACHE possible free of invalid pointer.
2020-06-08 08:37:55 -07:00
David Garske
dff7c0fcfa
Fix for hardware mutex protection in case where STM32 hardware acceleration is used for RNG or HASH only.
2020-06-08 08:37:55 -07:00
David Garske
42ee313286
Fix for using WOLFSSL_SMALL_STACK_CACHE with STM32 SHA256 hardware acceleration.
2020-06-08 08:37:55 -07:00
David Garske
8791573dfe
Fix for building with NO_PUBLIC_GCM_SET_IV when ChaCha20/Poly1305 is enabled. Cleanup use of not used STD_PERI_LIB.
2020-06-08 08:37:54 -07:00
Tak
b883617c0d
Moved wolfSSL_ASN1_TIME_new() to under #ifndef NO_ASN_TIME condition
2020-06-08 14:10:20 +09:00
Sean Parkinson
d543e305f1
Fix optimized AES-CCM - counter
...
AES-NI optimized 4 block at a time was not incrementing counter
poprerly.
2020-06-08 10:48:19 +10:00
David Garske
3af4316cfd
Fix for session test with TLS v1.3 and session tickets not enabled. Cleanups in AddSession.
2020-06-05 13:33:03 -07:00
David Garske
fb5c9e5268
Adjust static memory case with TLS v1.3 enabled.
2020-06-05 11:11:23 -07:00
David Garske
3b8455fcd0
Fix for building without ECC and DH (TLS v1.3 cannot be enabled).
2020-06-05 10:26:32 -07:00
Juliusz Sosinowicz
a75f83c9f2
Implement CRYPTO_memcmp
2020-06-05 16:44:12 +02:00
Daniele Lacamera
254dd9f823
Added new files to include.am
2020-06-05 15:28:49 +02:00
Daniele Lacamera
76ab8bfb6b
Added psoc6 ECDSA verification support
2020-06-05 11:30:29 +02:00
Daniele Lacamera
b1947478bb
Added support for SHA512 via psoc6 crypto
2020-06-05 11:30:29 +02:00
Daniele Lacamera
82520572b0
Initial support for psoc6_crypto (sha256 only)
2020-06-05 11:30:29 +02:00
David Garske
dffc677561
Fix for TLS v1.3 with --enable-sniffer.
2020-06-04 16:42:40 -07:00
David Garske
7879e83ae0
Fixes for building with ./configure --enable-tls13 --disable-rsa --disable-ecc --enable-psk. Fix to properly detect if missing a asymmetric key algorithm (required by TLS v1.3).
2020-06-04 16:31:19 -07:00
David Garske
1d01b87741
Fix to detect if NO_CERTS / --disable-asn is used in scripts/tls13.test.
2020-06-04 16:08:08 -07:00
David Garske
66fdc2c536
Disable TLS v1.3 if none of these are available "ECC, CURVE25519, CURVE448 or DH".
2020-06-04 15:31:19 -07:00
David Garske
93be04f380
Can't send empty list for the client when sniffer is enabled or it will use AES128-SHA.
2020-06-04 15:31:18 -07:00
David Garske
ad93813d75
Fix for expected failure case on client write. Resolves test-fails.con server TLSv1.3 fail on no client certificate test.
2020-06-04 15:31:18 -07:00
David Garske
d4fdd1e590
Fix for TLS v1.3 test PSK callback to support cipher list. Add support for GetCipherSuiteFromName to accept a name ending with colon.
2020-06-04 15:31:18 -07:00
David Garske
3b63e55a68
Fix for TLS v1.3 PSK tests work with additional cipher suites (not just TLS13-AES128-GCM-SHA256) and the echo server/client.
2020-06-04 15:31:18 -07:00
David Garske
8823a581d0
Add PSK user context support (Fixes #2952.).
2020-06-04 15:31:18 -07:00
David Garske
0228d1eeea
Cleanups for the TLS v1.3 build requirements. Add check for TLS v1.3 call to EncodeSigAlg.
2020-06-04 15:31:18 -07:00
David Garske
ab2afbd37b
Allow the TLS 13 draft 18 build option and just use the final version. This allows the automated test scripts to pass.
2020-06-04 15:31:18 -07:00
David Garske
4d8cf5b571
Fixes for building TLSv1.3 with FIPS v1 (no RSA PSS or HKDF).
2020-06-04 15:31:18 -07:00
David Garske
8300754ecd
Fix for "testsuite" with TLSv1.3 and --enable-sniffer.
2020-06-04 15:31:18 -07:00
David Garske
ba8227bcf7
Fix for building TLS v1.3 with NO_WOLFSSL_CLIENT.
2020-06-04 15:31:18 -07:00
David Garske
b417a76613
Fixes for build TLS v1.3 with NO_CERTS.
2020-06-04 15:31:18 -07:00
David Garske
093d9981fb
Disable fast-rsa if RSA PSS is enabled (not supported).
2020-06-04 15:31:18 -07:00
David Garske
cd1c2d5fae
Enable TLS v1.3 by default. Remove old TLS v1.3 draft build support.
2020-06-04 15:31:18 -07:00
David Garske
ca9dc7d509
Fix for wc_ecc_import_unsigned failing if first private key byte is zero ( Fixes #2950 ). Fix wc_ecc_is_point to return better code IS_POINT_E on failure (was returning -1). Improved ECC import API unit tests. Added WOLFSSL_VALIDATE_ECC_IMPORT and WOLFSSL_VALIDATE_ECC_KEYGEN to --enable-all.
2020-06-04 15:25:56 -07:00
toddouska
3529d9a40d
Merge pull request #3016 from kaleb-himes/FIPSv2-MAINTENANCE
...
New OpenSSL features relying on changes in module files must account for locked FIPS versions of those files
2020-06-04 15:08:17 -07:00
JacobBarthelmeh
976db2545d
Merge pull request #3007 from embhorn/zd10318
...
Fix OOB access in ParseCRL
2020-06-04 13:11:59 -06:00
toddouska
23d1550439
Merge pull request #2989 from julek-wolfssl/openvpn
...
Additional OpenSSL compat layer stuff
2020-06-04 11:57:55 -07:00
toddouska
b48699c1f0
Merge pull request #3022 from cconlon/jnisni
...
enable SNI by default for JNI/JSSE build
2020-06-04 11:07:56 -07:00
toddouska
79465d70f7
Merge pull request #3020 from SparkiDev/tls13_psk_cr
...
TLS 1.3: Never send CertiifcateRequest when PSK
2020-06-04 11:07:22 -07:00
Jacob Barthelmeh
c8b87eab5f
fix macro to match *_FLAGS_*
2020-06-04 11:53:46 -06:00
kaleb-himes
27f37df0e0
Update arduino script to reflect includes of inline files
2020-06-04 09:50:47 -06:00
kaleb-himes
2285071fbc
Use old convention, consolidate assignments
2020-06-04 09:34:49 -06:00
kaleb-himes
923fc30043
Change to memcpy
2020-06-03 17:36:40 -06:00
kaleb-himes
8c3f7a77ca
cleanup GET messages
2020-06-03 16:53:36 -06:00
kaleb-himes
5a4d84ecad
Consolidate to one-line where possible
2020-06-03 16:19:34 -06:00
toddouska
c3407e2052
Merge pull request #3004 from SparkiDev/asn1_int_lead_0_any
...
Define to allow badly formed ASN integers
2020-06-03 14:55:04 -07:00
toddouska
4ddbe546a3
Merge pull request #2993 from dgarske/math_fixes
...
Improvements around the ECC max bits calculation
2020-06-03 14:53:51 -07:00
Eric Blankenhorn
4b10f6aa03
Update from review
2020-06-03 15:56:46 -05:00
Chris Conlon
0b9d06e529
return value from FailTestCallBack to prevent NetBSD noreturn warning
2020-06-03 14:45:31 -06:00
Tesfa Mael
d000ceb495
Resolve Warnings
2020-06-03 13:42:37 -07:00
Chris Conlon
cafcaa4181
enable SNI by default for JNI/JSSE build
2020-06-03 14:24:10 -06:00
Chris Conlon
504b887851
fix NetBSD warnings in ASN1_INTEGER_set() tests around int max/min
2020-06-03 14:14:43 -06:00
Chris Conlon
1c1a01fffe
rename dup to resolve NetBSD global shadow warnings
2020-06-03 14:11:12 -06:00
Chris Conlon
d220168384
Merge pull request #3017 from kojo1/supplicant-error
...
alertWhy: unknown_ca for ASN_NO_SIGNER_E
2020-06-03 10:44:31 -05:00
Tesfa Mael
6176f8537f
Typecast to fix conversion loses
2020-06-02 22:06:14 -07:00
Sean Parkinson
0d1ed9efc7
TLS 1.3: Never send CertiifcateRequest when PSK
...
Server must not send a CertificateRequest when authenticating with a
PSK.
Increase the max size of the signature algorithms as ED448 has been
added.
2020-06-03 12:48:31 +10:00
Tesfa Mael
d5241bbcc6
Coverity fix
2020-06-02 15:35:27 -07:00
kaleb-himes
8cd92f68f2
init components as best practice
2020-06-02 14:28:50 -06:00
toddouska
dc1472692a
Merge pull request #3011 from dgarske/nomalloc
...
Fixes for using static memory with no malloc
2020-06-02 11:46:29 -07:00
toddouska
c7331fa699
Merge pull request #3008 from embhorn/zd10320
...
Fix possible NULL dereference error in TLSX_SecureRenegotiation_Parse
2020-06-02 11:13:17 -07:00
kaleb-himes
6ab5f2d9d7
remove unused variables
2020-06-01 17:56:03 -06:00
kaleb-himes
0604e7d208
no priv or pub in dhKey struct in FIPS
2020-06-01 17:36:27 -06:00
kaleb-himes
bc02f2c74e
Revert GCM_NONCE_MID_SZ changes
2020-06-01 17:13:23 -06:00
kaleb-himes
6217118ee4
Account for unmodifiable FIPS module files when adding new OpenSSL functionality
2020-06-01 16:28:32 -06:00
Takashi Kojo
5bcd121ab5
alertWhy: unknown_ca for ASN_NO_SIGNER_E
2020-06-02 05:54:16 +09:00
David Garske
b947f69f60
Fix to correct SP 4096-bit enable. Correct nonexistent WOLFSSL_SP_NO_4096, which should be WOLFSSL_SP_4096.
2020-06-01 10:49:08 -07:00
David Garske
bfe1760c17
Improvements to the ECC max bits calculation used with fast math (USE_FAST_MATH and ALT_ECC_SIZE). Updated example code comments to reflect accurate calculation.
2020-06-01 10:48:52 -07:00
toddouska
9c73a4bdbc
Merge pull request #3009 from embhorn/zd10358
...
Fix OOB access in RsaUnPad
2020-06-01 09:29:10 -07:00
Chris Conlon
aeefc09579
Merge pull request #3013 from miyazakh/fix_espidf_buildfail
...
fix build failrue on esp-idf
2020-06-01 09:56:29 -06:00
Hideki Miyazaki
5f783f0198
fix build failrue on esp-idf
2020-05-30 15:19:37 +09:00
toddouska
63a1ccda9b
Merge pull request #3012 from SparkiDev/ecc_mulmod_fix
...
Fix ecc mulmod to only do one more bit than modulus len
2020-05-29 13:07:18 -07:00
toddouska
2ee8f335b7
Merge pull request #2992 from SparkiDev/tls13_enc_alert_2
...
Actually make TLS 1.3 alerts encrypted when possible
2020-05-29 13:04:49 -07:00
Sean Parkinson
2eb9e05518
Fix ecc mulmod to only do one more bit than modulus len
2020-05-29 11:21:37 +10:00
David Garske
e498e07390
Merge pull request #3005 from cconlon/608a
...
ATECC608A improvements for use with Harmony 3 and PIC32MZ
2020-05-28 16:10:39 -07:00
David Garske
10a1cad2dc
Fix for TFM _fp_exptmod_nct with WOLFSSL_NO_MALLOC.
2020-05-28 15:15:52 -07:00
David Garske
fd51eecb4f
Fix for using signature wrapper with WOLFSSL_NO_MALLOC. Improve wc_SignatureVerifyHash to use RSA verify inline.
2020-05-28 15:12:01 -07:00
David Garske
7ce7d244f8
Fix for using static memory AES GCM test.
2020-05-28 15:12:01 -07:00
toddouska
5962931b21
Merge pull request #2947 from SparkiDev/tls13_integ_fix
...
Fix TLS 1.3 integrity only for interop
2020-05-28 13:48:43 -07:00
toddouska
5360783d7e
Merge pull request #3003 from JacobBarthelmeh/Testing
...
fix for gcc 10+ error on snprintf
2020-05-28 13:28:30 -07:00
Eric Blankenhorn
233a5ca6b8
Fix OOB access
2020-05-28 14:14:19 -05:00
Eric Blankenhorn
4e8f5fce66
Fix NULL dereference error
2020-05-28 12:17:29 -05:00
Eric Blankenhorn
91fb6216a9
Fix OOB access
2020-05-28 09:39:44 -05:00
David Garske
99d8be4f4d
Merge pull request #3002 from ejohnstown/bump-minor-ver
...
Bump Patch Version
2020-05-27 21:09:38 -07:00
Sean Parkinson
3fec01c0aa
Actually make TLS 1.3 alerts encrypted when possible
...
Pervious fix didn't work.
This time, if TLS 1.3 and encryption is on then it will encrypt the
alert.
2020-05-28 10:57:33 +10:00
Sean Parkinson
8dee048b04
Define to allow badly formed ASN integers
...
Define: WOLFSSL_ASN_INT_LEAD_0_ANY
Allows positive integers to have a leading 0 byte.
DER/BER encoding specifies that leding 0 only on negative numbers
(highest bit of first octet set).
2020-05-28 08:50:21 +10:00
Chris Conlon
896fcd9aec
add WOLFSSL_ATECC6088A, Trust&GO support, PIC32 HAL compatibility, 608A expansions
2020-05-27 16:49:29 -06:00
Chris Conlon
8ebd121cac
add extern prototype for PIC32 pic32_time()
2020-05-27 16:46:40 -06:00
Chris Conlon
d8a6d16f72
add MICROCHIP_TCPIP_BSD_API for using Microchip TCP/IP with BSD API
2020-05-27 16:46:40 -06:00
Chris Conlon
b8e1fe666b
include errno.h with MICROCHIP_PIC32 for GetLastError use
2020-05-27 16:46:40 -06:00
Sean Parkinson
1cc9a8ffbf
Merge pull request #3001 from DKubasekRA/DKubasekRA-fix-ctMask16LT
...
Reverted comparison in ctMask16LT
2020-05-28 08:24:48 +10:00
JacobBarthelmeh
8e9f518caa
fix for gcc 10+ error on snprintf
2020-05-27 16:20:39 -06:00
John Safranek
19fba3648c
Bump Patch Version
...
1. Increase the patch level of the version number in configure.ac.
2. Added a template for the next version in ChangeLog.md.
3. Bumped version.h.
2020-05-27 10:11:58 -07:00
DKubasekRA
5ef738855c
Reverted comparison in ctMask16LT
2020-05-27 10:43:36 +02:00
toddouska
e388885407
Merge pull request #2997 from kaleb-himes/ZD10356
...
Fix a seg fault when cert not loaded prior to key check
2020-05-26 16:19:43 -07:00
toddouska
c5ebf23c25
Merge pull request #2994 from JacobBarthelmeh/Xilinx
...
add additional sanity check on pointer before free
2020-05-26 16:18:58 -07:00
Kaleb Himes
5179503e8f
Merge pull request #2995 from julek-wolfssl/va-copy-check
...
Enable wolfSSL_BIO_vprintf on Windows
2020-05-26 08:58:05 -07:00
Sean Parkinson
eed5943b6f
Fix TLS 1.3 integrity only for interop
...
Make key size the size of the digest.
2020-05-25 16:02:53 +10:00
Chris Conlon
165fce7c57
Merge pull request #2988 from miyazakh/peakmem
...
added WOLFSSL_LEAVE for measuring peak memory script
2020-05-22 15:37:30 -06:00
kaleb-himes
53d2a17b43
Fix a seg fault when cert not loaded prior to key check
2020-05-22 15:03:11 -06:00
Juliusz Sosinowicz
de61a8e5d3
Enable wolfSSL_BIO_vprintf on Windows
...
Enable wolfSSL_BIO_vprintf use with WOLFSSL_BIO_MEMORY and WOLFSSL_BIO_SSL on Windows with the HAVE_VA_COPY flag
2020-05-21 19:41:40 +02:00
toddouska
d27c023dd9
Merge pull request #2983 from dgarske/stm_stdperilib
...
Fixes for building with STM32 StdPeriLib and CubeMX
2020-05-21 10:39:36 -07:00
Jacob Barthelmeh
cd1a50bfb6
add additional sanity check on pointer before free
2020-05-21 11:19:17 -06:00
Juliusz Sosinowicz
a67e1fc2ad
Fix implicit conversions
2020-05-21 13:20:42 +02:00
Juliusz Sosinowicz
70c55ce30a
Set offset in cipher struct
2020-05-21 12:51:23 +02:00
Juliusz Sosinowicz
986c8f351c
Fix leak in SetIndividualInternal
...
SetIndividualInternal should not do mp_init on mpi since it should have been zero'ed during allocation and if it isn't zero'ed then it must mean that memory has already been allocated to it
2020-05-20 20:34:45 +02:00
David Garske
363b9528af
Fix for STM32 AES only (L4) AES Decrypt Direct (ECB).
2020-05-20 11:23:14 -07:00
David Garske
de4d2e6436
Fix for CubeMX HAL headerSize (older CubeMX HAL uses actual bytes, not multiple of 32-bit). Fix for GMAC case in STM32_CRYPTO_AES_ONLY.
2020-05-20 10:49:26 -07:00
toddouska
a6f5bc84e6
Merge pull request #2987 from JacobBarthelmeh/Xilinx
...
Update for RSA calls to Xilsecure
2020-05-20 09:03:52 -07:00
toddouska
516f329f23
Merge pull request #2975 from JacobBarthelmeh/Testing
...
init FP mutex on wolfCrypt init
2020-05-20 09:01:46 -07:00
David Garske
19848076ec
Merge pull request #2986 from kaleb-himes/ZD9610_REPORT2
...
Fix building with openssl extra x509 small writes to heap without alloc
2020-05-20 08:10:43 -07:00
Juliusz Sosinowicz
5f7832909b
BIO_new_mem_buf with negative len should take strlen of buf as len
2020-05-20 16:55:16 +02:00
Juliusz Sosinowicz
4a85bf8108
Additional OpenSSL compat layer stuff
...
- Add X509_get0_notBefore and X509_get0_notAfter
- Implement EVP_PKEY_get0_DSA and DSA_bits
- OpenSSL_version now prints "wolfSSL $VERSION"
- Remove define guards in `wolfSSL_internal_get_version` as all protocols are defined regardless in `wolfssl/internal.h`and this function just returns the string description of the protocol
2020-05-20 16:55:16 +02:00
JacobBarthelmeh
d09b947478
update for test case and sha3
2020-05-19 19:27:38 -06:00
JacobBarthelmeh
03ed495f84
free temporary buffer
2020-05-19 19:27:29 -06:00
JacobBarthelmeh
6a7a8fa5b7
updated RSA calls to Xilsecure
2020-05-19 19:27:21 -06:00
David Garske
2033be9aed
Fixes for building against older STM32 CubeMX HAL.
2020-05-19 17:42:36 -07:00
David Garske
13e6462ea7
Fixes for build with STM32 Standard Periperal Library (StdPeriLib).
2020-05-19 17:42:36 -07:00
David Garske
99ebae9f7c
Merge pull request #2985 from cconlon/iarwarn
...
fix minor IAR warnings in test.c
2020-05-19 16:42:47 -07:00
kaleb-himes
08c02b037c
Fix building with openssl extra x509 small writes to heap without alloc
2020-05-19 17:12:36 -06:00
toddouska
0af4e76c40
Merge pull request #2978 from SparkiDev/curve448_cast
...
Curve448 - cast down
2020-05-19 15:55:32 -07:00
toddouska
7901f74d0b
Merge pull request #2977 from SparkiDev/tlsx_ks_ecc_fix
...
KeyShare ECC shift index range check
2020-05-19 15:49:41 -07:00
toddouska
754c96965a
Merge pull request #2974 from SparkiDev/tls13_enc_alert
...
If encryption setup, TLS 1.3 alerts encrypted
2020-05-19 15:48:54 -07:00
Chris Conlon
9efd9afdfb
fix minor IAR warnings in test.c
2020-05-19 14:12:13 -06:00
toddouska
45def39c18
Merge pull request #2972 from ejohnstown/portability
...
Script Portability
2020-05-18 14:53:27 -07:00
John Safranek
ba9fd89314
Script Portability
...
1. The openssl interop test script should check that it should run before
doing anything else.
2. The process to create a random port number was using a non-portable
option to the head command. Changed to use the od tool reading from
/dev/random.
3. Ran into a sed that doesn't use the -i option, so changed it to cp its
own bak file and sed from that.
2020-05-18 09:04:41 -07:00
Sean Parkinson
adb3bdd26e
Curve448 - cast down
2020-05-18 09:07:20 +10:00
Sean Parkinson
5b918f7ace
KeyShare ECC shift index range check
2020-05-18 08:49:38 +10:00
toddouska
c4fee4ce38
Merge pull request #2969 from julek-wolfssl/fix-lut-cache
...
Fix LUT cache implementation
2020-05-15 15:15:18 -07:00
Jacob Barthelmeh
b615dbe9d5
add additional FP_ECC lock sanity check for case where wolfCrypt_Init is not called
2020-05-15 11:50:05 -06:00
toddouska
684654cd25
Merge pull request #2962 from tmael/fips_solaris
...
FIPS on Solaris
2020-05-15 10:15:09 -07:00
toddouska
bdddb00ebc
Merge pull request #2973 from kaleb-himes/FIPS-OE6
...
for OE6 sp_arm32.c asm code is inlined in rsa.c and ecc.c
2020-05-14 10:55:54 -07:00
toddouska
91bfa31f70
Merge pull request #2968 from dgarske/stm32_hal_v2
...
Fixes for STM32 CubeMX HAL with AES GCM
2020-05-14 10:55:04 -07:00
toddouska
fbfb28d5ee
Merge pull request #2926 from SparkiDev/tls13_failnocert
...
Fail when WOLFSSL_VERIFY_FAIL_IF_NO_PEER_CERT set in TLS1.3
2020-05-14 10:53:18 -07:00
Tesfa Mael
f894d4c0d2
FIPS on Solaris
2020-05-14 10:11:54 -07:00
Juliusz Sosinowicz
24634a02c9
Fix comment
2020-05-14 10:54:45 +02:00
toddouska
88b8ea04f6
Merge pull request #2971 from SparkiDev/sp_cortexm_comment
...
Fix SP Cortex-M ASM comments
2020-05-13 16:30:14 -07:00
toddouska
902e3a2d97
Merge pull request #2970 from SparkiDev/sp_arm32_divw
...
Fix div word in SP ARM32
2020-05-13 16:29:31 -07:00
toddouska
6f750c07b5
Merge pull request #2964 from SparkiDev/tls13down_tls12
...
Only check downgrade when TLS 1.2 and no flag set
2020-05-13 16:25:02 -07:00
JacobBarthelmeh
1876fe1c22
init FP mutex on wolfCrypt init
2020-05-13 13:59:35 -07:00
Sean Parkinson
0295b5ae3b
If encryption setup, TLS 1.3 alerts encrypted
2020-05-13 16:14:47 +10:00
Sean Parkinson
57756bfa8d
Remove unused 4096-bit functions
2020-05-13 10:23:05 +10:00
kaleb-himes
9a8fc94181
for OE6 sp_arm32.c asm code is inlined in rsa.c and ecc.c
2020-05-12 16:28:39 -06:00
David Garske
778b5dd9d5
Fixes for STM32 CubeMX HAL with AES GCM. Fix AES GCM authentication header size, which expects size as number of 32-bit values. Fix the authentication size round up logic. Fix to use software for authentication tag if authentication data size is not multiple of 4. Fix to ensure 32-bit aligned buffers are used.
2020-05-12 08:27:43 -07:00
Sean Parkinson
786e21b107
Fix SP Cortex-M ASM comments
2020-05-12 23:28:39 +10:00
Sean Parkinson
479b54e78e
Fix div word in SP ARM32
2020-05-12 23:14:57 +10:00
Juliusz Sosinowicz
3d2cbdd3e8
Fix LUT cache implementation
...
- Make sure that the cache is actually set (and not just depend on the LRU_count)
- test_wolfSSL_EC should also be run without ECC_SHAMIR
2020-05-12 13:48:59 +02:00
toddouska
6c9a0e440e
Merge pull request #2959 from dgarske/wpas_tiny
...
Added wpa_supplicant support with reduced code size option
2020-05-11 08:55:22 -07:00
Sean Parkinson
ed4899dd91
Only check downgrade when TLS 1.2 and no flag set
...
The flag, SSL_OP_NO_TLSv1_2, indicates not to negotiate TLS v1.2.
2020-05-11 13:18:50 +10:00
Sean Parkinson
7c98451f24
Merge pull request #2961 from kaleb-himes/WOLFSSL_EXAMPLES
...
Fix failing build for rsa_verify_only example
2020-05-11 09:31:31 +10:00
Hideki Miyazaki
5dfc36d32a
added WOLFSSL_LEAVE for measuring peak memory script
2020-05-09 17:03:17 +09:00
JacobBarthelmeh
81dc0ac56f
Merge pull request #2956 from tmael/hkdf
...
Check HKDF-Expand length of output <= 255*HashLen
2020-05-08 16:36:40 -06:00
kaleb-himes
82c86447e7
Fix failing build for rsa_verify_only example
2020-05-08 16:18:30 -06:00
David Garske
51b5f84d00
Merge pull request #2938 from JacobBarthelmeh/Xilinx
...
add Xilinx Vitis 2019.2 example and update README
2020-05-08 15:05:19 -07:00
David Garske
10aa8a4ffc
Added support --enable-wpas=small for reduced code size when building against the WPA supplicant with EAP-TLS. This does not use OPENSSL_EXTRA, which helps reduce code size.
2020-05-08 13:38:26 -07:00
toddouska
6b930d996c
Merge pull request #2958 from julek-wolfssl/ASN_IP_TYPE-without-openssl
...
Support IP alternative subject name without OpenSSL
2020-05-08 13:27:27 -07:00
toddouska
4a44b7b781
Merge pull request #2954 from SparkiDev/sp_rsa_pq_len
...
Only use SP for RSA private operations if P and Q half bits
2020-05-08 08:30:30 -07:00
Juliusz Sosinowicz
b5886e0e37
Add option --enable-ip-alt-name
...
This commit adds the configure option `--enable-ip-alt-name` that enables support for the IP alternative subject name parsing in `wolfcrypt/src/asn.c:DecodeAltNames`.
2020-05-08 13:20:24 +02:00
Tesfa Mael
b39e384cfd
Review comment
2020-05-07 13:39:53 -07:00
toddouska
cb0fb88e44
Merge pull request #2955 from JacobBarthelmeh/Testing
...
fix for scep build without aes
2020-05-07 08:44:39 -07:00
toddouska
3ef7e588d2
Merge pull request #2932 from kaleb-himes/ZD10223
...
Fix building with one-side only tls13/dtls
2020-05-07 08:43:36 -07:00
David Garske
943f6c4447
Merge pull request #2957 from SparkiDev/sp_c_cr_fix
...
SP C: Fix array size for cache resistant modexp
2020-05-07 06:26:39 -07:00
Juliusz Sosinowicz
9e68de0fb7
Add test certs for ASN_IP_TYPE
2020-05-07 11:52:49 +02:00
Sean Parkinson
b331804c27
SP C: Fix array size for cache resistant modexp
2020-05-07 10:00:14 +10:00
Jacob Barthelmeh
6619db580d
fix for scep build without aes
2020-05-06 16:58:54 -06:00
Tesfa Mael
2ab478f8fd
Check length of output <= 255*HashLen
2020-05-06 15:47:39 -07:00
Sean Parkinson
c4af5db4b9
Only use SP for RSA private operations if P and Q half bits
2020-05-07 08:46:48 +10:00
JacobBarthelmeh
c962aa4181
add sprj file
2020-05-06 12:13:22 -07:00
toddouska
be3c39ed1c
Merge pull request #2948 from JacobBarthelmeh/SanityChecks
...
update armv8 aes gcm sanity checks
2020-05-06 10:31:09 -07:00
Jacob Barthelmeh
3b6b59cea0
add 2019.2 Xilinx example and update README
...
fix to remove xml extension
add missing project file
update project
update dist include
rm prj files
2020-05-06 09:54:06 -06:00
toddouska
5e45767cc3
Merge pull request #2943 from JacobBarthelmeh/Testing
...
check on length of unwrap before memmove
2020-05-05 11:09:06 -07:00
Jacob Barthelmeh
0f6fef8384
update armv8 aes gcm sanity checks
2020-05-05 09:47:05 -06:00
Sean Parkinson
74040c62af
Merge pull request #2944 from dgarske/sp_cacheres
...
Fixes for C32/C64 SP math with `WOLFSSL_SP_CACHE_RESISTANT`
2020-05-05 10:43:00 +10:00
Sean Parkinson
09bc460c2e
Merge pull request #2946 from dgarske/gcc9
...
Fix for GCC9 warning
2020-05-05 10:29:56 +10:00
David Garske
8161dfe3aa
Fix for GCC9 warning.
...
```
src/tls.c:201:13: note: in expansion of macro 'XSTRNCMP'
201 | if (XSTRNCMP((const char*)sender, (const char*)client, SIZEOF_SENDER) == 0)
| ^~~~~~~~
In file included from src/tls.c:33:
./wolfssl/internal.h:4312:19: note: referenced argument declared here
4312 | static const byte client[SIZEOF_SENDER] = { 0x43, 0x4C, 0x4E, 0x54 };
| ^~~~~~
```
2020-05-04 15:07:28 -07:00
David Garske
174b4d5159
Cleanup of SP with small stack. Expand support for WOLFSSL_SP_NO_MALLOC. Fix for evp.c when included directly.
2020-05-04 14:23:32 -07:00
Chris Conlon
df067b6781
Merge pull request #2919 from kaleb-himes/ZD10194
...
Fix for Freescale common examples that predated hardening warning
2020-05-04 13:43:07 -06:00
kaleb-himes
62d67c3da1
Don't need if not using TLS 1.2
2020-05-04 12:54:36 -06:00
toddouska
da01961254
Merge pull request #2939 from JacobBarthelmeh/SanityChecks
...
sanity check on PemToDer type
2020-05-04 11:26:33 -07:00
toddouska
d848495a66
Merge pull request #2937 from dgarske/wolfio_tcpcon_fd
...
Fix issue with failed TCP connect using invalid socket file descriptor
2020-05-04 11:22:54 -07:00
David Garske
8e0f5ef8ce
Fixes for WOLFSSL_SP_CACHE_RESISTANT with small stack.
2020-05-04 11:22:12 -07:00
David Garske
c28ad38b16
Fix for cast issue caused by PR #2900 . Applies to WOLFSSL_SP_CACHE_RESISTANT and c32/c64 versions only.
2020-05-04 10:49:59 -07:00
Jacob Barthelmeh
082e51d778
check on length of unwrap before memmove
2020-05-04 10:32:05 -06:00
Jacob Barthelmeh
9f735b4d6e
sanity check on PemToDer type
2020-05-01 16:41:18 -06:00
toddouska
3944c8eb73
Merge pull request #2935 from ejohnstown/hush-tfm
...
Hush TFM Warnings
2020-05-01 08:26:42 -07:00
David Garske
31502ec3f9
Fix issue with failed TCP connect using invalid socket file descriptor on close. Fixes #2936
2020-05-01 07:32:00 -07:00
John Safranek
b6bd86d2b1
TFM Warnings
...
When building in VS, the MSC will complain about some constants getting
implicitly promoted to 64-bit. Added some type-casts to hush the warnings.
2020-04-30 19:43:18 -07:00
toddouska
f772bc8d9a
Merge pull request #2923 from dgarske/pic32mz
...
Fixes for PIC32MZ crypto hardware cache and large hash
2020-04-30 16:22:13 -07:00
toddouska
df9dd3012f
Merge pull request #2934 from SparkiDev/tls13_cookie_ks
...
TLS13: Prepend the SupportedVersions extension to list
2020-04-30 14:58:11 -07:00
toddouska
a1489d981c
Merge pull request #2930 from JacobBarthelmeh/SanityChecks
...
check on tag length for AES-CCM
2020-04-30 14:51:20 -07:00
Sean Parkinson
7879d3762a
TLS13: Prepend the SupportedVersions extension to list
...
Must have SupportedVersions at start of list for Cookie to be
constructed correctly.
Application can set the key share extension before handshake and
SupportedVersions will be added after. Extensions written in order of
adding to list.
Prepend SupportedVersions so that it will always appear in the correct
place so when reconstructing HelloRetryRequest, the extensions will
always be in the same order.
2020-04-30 08:46:23 +10:00
Jacob Barthelmeh
505fbed4df
fix AES-CCM tag size check on decryption
2020-04-29 15:15:54 -06:00
toddouska
7e267546cb
Merge pull request #2933 from SparkiDev/tls13_rsa8192
...
Allow TLS 1.3 CertificateVerify to handle 8192-bit RSA
2020-04-29 11:24:44 -07:00
Sean Parkinson
390f066028
Allow TLS 1.3 CertificateVerify to handle 8192-bit RSA
2020-04-29 12:37:41 +10:00
Sean Parkinson
e9b433a998
Merge pull request #2928 from julek-wolfssl/evp-aes-gcm-fix
...
Fix AES-GCM in EVP layer to have compatiblity with OpenSSL
2020-04-29 09:00:04 +10:00
Jacob Barthelmeh
b73e52f33f
move AES-CCM tag check into a local function
2020-04-28 14:46:06 -06:00
kaleb-himes
951cb4aaf4
Fix building with one-side only tls13/dtls
2020-04-28 14:33:00 -06:00
toddouska
f770d28ff0
Merge pull request #2916 from dgarske/testfixes
...
Improvements to ECC key decode and tests
2020-04-28 09:57:44 -07:00
toddouska
a585e4115e
Merge pull request #2927 from SparkiDev/tls13_ccs
...
In TLS 1.3, don't allow multiple ChangeCipherSpecs in a row
2020-04-28 09:52:46 -07:00
toddouska
cb6fc56f3b
Merge pull request #2921 from dgarske/fixes_g++
...
Fixes for G++ and enable-all
2020-04-28 09:51:34 -07:00
Juliusz Sosinowicz
c02c408409
Only 80 characters a line
2020-04-28 12:38:02 +02:00
Sean Parkinson
a104caef13
Merge pull request #2929 from dgarske/sp_rsalowmem
...
Fix for SP math with `RSA_LOW_MEM` (ARM only)
2020-04-28 08:43:31 +10:00
Jacob Barthelmeh
c85a53c631
add macro guard for fips and selftest builds
2020-04-27 15:36:53 -06:00
David Garske
6185e0f477
Remove execute bit on files.
2020-04-27 11:16:02 -07:00
David Garske
327cdefc24
Fix for SP math with RSA_LOW_MEM, which was broken in PR #2892 .
2020-04-27 08:59:54 -07:00
Juliusz Sosinowicz
01a6dded72
Fix AES-GCM in EVP layer to have compatiblity with OpenSSL
...
- Tag checking in AES-GCM is done in Final call
- Reset `WOLFSSL_EVP_CIPHER_CTX` structure after Final call
- Don't zero `ctx->authTag` struct in Init call so that user can get the AES-GCM tag using `EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, AES_BLOCK_SIZE, tag)`
- `ctx->authTag` is only zeroed before authenticated, non-confidential data Update call since this means we are entering a new Udate-Final cycle. This doesn't need to be done in the decrypt case since the tag should be supplied by the user before the final call using `EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, AES_BLOCK_SIZE, tag)`
2020-04-27 15:52:01 +02:00
David Garske
1e726e19a4
Fix for XMALLOC cast.
2020-04-27 06:48:41 -07:00
Sean Parkinson
c153873337
Fail when WOLFSSL_VERIFY_FAIL_IF_NO_PEER_CERT set in TLS1.3
2020-04-27 16:17:03 +10:00
Sean Parkinson
df1b7f34f1
In TLS 1.3, don't allow multiple ChangeCipherSpecs in a row
2020-04-27 15:27:02 +10:00
David Garske
3c93a7b757
Fix Value stored to 'ret' is never read.
2020-04-24 11:31:12 -07:00
David Garske
a4caa42793
Improve the Base64 line size for NO_ASN case. Fix report of unread ret.
2020-04-24 11:26:55 -07:00
David Garske
589712f870
PIC32MZ Fix for cache coherency to enable write-through (no write allocation) to resolve descriptor corruption. ZD 10212.
2020-04-24 09:13:28 -07:00
David Garske
0f11369680
PIC32MZ Fix for WOLFSSL_PIC32MZ_LARGE_HASH: Only submit to hardware if update data provided matches expected. ZD 10211.
2020-04-24 09:01:51 -07:00
David Garske
cfc0aeb857
Fix for RSA and KeyGen only in test.c.
2020-04-24 08:56:31 -07:00
David Garske
41fc208195
Fixes for isHMAC checks.
2020-04-24 08:51:56 -07:00
David Garske
5fa7bb5b9f
Fix possible unused args.
2020-04-24 07:48:41 -07:00
David Garske
6d025f8c0f
Refactor of the EVP macType to use enum wc_HashType to resolve issues with invalid casting.
2020-04-24 07:43:44 -07:00
TakayukiMatsuo
922ab1e944
Merge remote-tracking branch 'upstream/master' into branch-1
2020-04-24 18:00:29 +09:00
TakayukiMatsuo
bcc408442b
Added test cases for wc_curve25519_key_export_xx
2020-04-24 17:50:17 +09:00
David Garske
28b686a8ca
* Exposed useful sizes MAX_X509_HEADER_SZ and PEM_LINE_SZ
...
* Refactor the PEM saving code in `test.c`, so its not using large 4K buffer and calculates based on DER.
* Enable ECC key generation test even without `WOLFSSL_KEY_GEN`.
* Added `ECC_KEYGEN_SIZE` macro for ECC key generation testing.
* Refactor ECC DER key generation to use `ECC_BUFSIZE`.
2020-04-23 16:11:54 -07:00
David Garske
81f959336b
Added support for important private key DER using wc_EccPublicKeyDecode. Added ECC key generation and decode test case.
2020-04-23 16:07:43 -07:00
David Garske
b07dfa425d
Fixes for ./configure CC="g++" --enable-all && make. Resolves issues with implicit casts and use of reserved template keyword.
2020-04-23 15:26:04 -07:00
David Garske
5376763638
Merge pull request #2913 from SparkiDev/sp_cortexm4_ecc
...
Improve performance of SP Cortex M asm
2020-04-23 09:47:05 -07:00
toddouska
7318121d3a
Merge pull request #2915 from dgarske/async_v4.4.0
...
Fixes for async release v4.4.0
2020-04-23 09:26:08 -07:00
toddouska
54aa50e628
Merge pull request #2912 from SparkiDev/sp_movbe
...
Only use Intel instruction movbe when available
2020-04-23 09:25:02 -07:00
David Garske
6132176715
Merge pull request #2917 from ejohnstown/postrelease
...
Minor wolfCrypt Test Fixes
2020-04-23 07:16:07 -07:00
Sean Parkinson
7a0cbe084e
Improve performance of SP Cortex M asm
2020-04-23 11:05:42 +10:00
John Safranek
a064cb3943
Fix a couple of wolfCrypt test issues found during the long release build test.
2020-04-22 11:30:57 -07:00
toddouska
e116c89a58
Merge pull request #2906 from ejohnstown/release-rollup
...
Release Rollup
2020-04-22 10:43:44 -07:00
David Garske
4592e0ec95
Fix for use of incorrect devId for wolfSSL_SHA3_256_Init.
2020-04-22 10:16:20 -07:00
David Garske
88d04e5eeb
Fix for NULL == NULL test case in test_wolfSSL_EC_get_builtin_curves.
2020-04-22 10:15:52 -07:00
David Garske
36a556f927
Resolve issues with the openssl compatibility CRYPTO_malloc and CRYPTO_free.
2020-04-22 10:15:16 -07:00
kaleb-himes
12e4718c67
Fix for Freescale common examples that predated hardening warning
2020-04-22 11:06:36 -06:00
John Safranek
83152c767f
touch dates
2020-04-21 10:50:59 -07:00
John Safranek
bf680b4a92
Fix for QAT with Shake256. Fix for XFREE missing semicolon.
2020-04-21 10:38:27 -07:00
John Safranek
7b6cc2056b
Update release date in readme and changelog.
2020-04-21 10:21:59 -07:00
John Safranek
ccd096e1bb
Memory Leak Fix
...
1. In `wolfSSL_d2i_DHparams()`, when setting the internal key on a
WOLFSSL_KEY, set the flag inSet.
2. Not a leak, but in `wolfSSL_EVP_PKEY_set1_DH()`, only allocate one
buffer to store the flat key. Saves an alloc, memcpy, and free.
2020-04-21 10:21:59 -07:00
John Safranek
61f3783111
Fixes to test.c for the following build configurations:
...
1. ./configure --disable-rsa --enable-certgen --enable-certreq
2. ./configure --disable-ecc --enable-pkcs7
2020-04-21 10:21:59 -07:00
John Safranek
c134626946
Update credit names on vuln notice in README.
2020-04-21 10:21:59 -07:00
John Safranek
087675e31e
Update the RPM build spec.
2020-04-21 10:21:59 -07:00
John Safranek
4331b7df18
Update the VS library build resource.
2020-04-21 10:21:58 -07:00
John Safranek
bf4f50ab93
Add Azure Sphere file missing from release.
2020-04-21 10:21:58 -07:00
John Safranek
a29eac035b
Update credit for vulnerability report.
2020-04-21 10:21:58 -07:00
John Safranek
836e77508d
Remove notes for reverted DTLS commits.
2020-04-21 10:21:58 -07:00
John Safranek
7cbf496329
Encrypt key requirements check
...
The file wc_encrypt.c offers a function named wc_CryptKey(), which
requires PWDBASED and ASN. Added the check for ASN.
2020-04-21 10:21:58 -07:00
John Safranek
e84cd1a887
Updated the README file and ChangeLog for some spelling and omissions.
2020-04-21 10:21:58 -07:00
John Safranek
27011ff7ff
Release Rollup
...
1. Update configure with the new version.
2. Update the ChangeLog.
3. Update the readme.
2020-04-21 10:21:53 -07:00
Jacob Barthelmeh
231c488ddf
check on tag length for AES-CCM
2020-04-20 13:44:41 -06:00
JacobBarthelmeh
0cfde0794b
Merge pull request #2848 from julek-wolfssl/wpa-supplicant-openssl-compat
...
Added partial support for wpa_supplicant, hostapd, and cjose:
2020-04-20 12:17:55 -06:00
Sean Parkinson
75c14e4c8e
Only use Intel instruction movbe when available
2020-04-20 09:09:45 +10:00
John Safranek
f87f09fcd7
Merge pull request #2910 from embhorn/zd10169
...
Fix forbidden iv length 0 with AES-GCM
2020-04-16 16:01:03 -07:00
Stanislav Klima
8112c81fc5
Added missing NO_CERTS check.
2020-04-16 23:30:11 +02:00
Eric Blankenhorn
6b3642db36
Fix forbidden iv length 0 with AES-GCM
2020-04-16 13:48:56 -05:00
toddouska
75deec250c
Merge pull request #2908 from ejohnstown/dtls-revert
...
DTLS Revert
2020-04-16 09:58:48 -07:00
toddouska
9918ee8b68
Merge pull request #2907 from SparkiDev/sp_arm64_reg
...
SP ARM64 - use fewer registers in mont_reduces
2020-04-16 09:58:07 -07:00
Juliusz Sosinowicz
dd68074104
Fix merge issues
2020-04-16 10:09:15 +02:00
Stanislav Klima
eab451339c
Fixed dereference after null check.
2020-04-16 09:52:02 +02:00
Stanislav Klima
83044d7560
Fixed dereference after null check.
2020-04-16 09:46:15 +02:00
John Safranek
40ea386509
Revert "DTLS Fix"
...
This reverts commit 04dcb8f774 .
2020-04-15 21:33:33 -07:00
John Safranek
78a9185d0b
Revert "DTLS Fuzz Fix"
...
This reverts commit 70d03f3ba0 .
2020-04-15 21:33:27 -07:00
Sean Parkinson
da5d9a923b
SP ARM64 - use fewer registers in mont_reduces
2020-04-16 09:20:04 +10:00
Juliusz Sosinowicz
36403c1dad
Merge remote-tracking branch 'wolfSSL/master' into wpa-supplicant-openssl-compat
2020-04-15 16:55:03 +02:00
Stanislav Klima
314ff1137b
Fixed resource leak.
2020-04-15 16:29:11 +02:00
Stanislav Klima
68a2e03bd4
Fixed resource leak.
2020-04-15 16:27:34 +02:00
Stanislav Klima
1a80975d9e
Fixed resource leaks.
2020-04-15 15:47:32 +02:00
Stanislav Klima
e19334266e
This function is required by HAVE_PK_CALLBACKS option and it's used by server as well.
2020-04-15 14:43:12 +02:00
Stanislav Klima
74893edaf0
Fix of size constraint for parsing.
2020-04-15 14:36:36 +02:00
Juliusz Sosinowicz
1d3fd5cd07
Code review
...
- make `wc_ecc_export_point_der_compressed` a local function
- use `int` for `shortKeySize` in `wc_ecc_import_point_der_ex`
- check for null return value from `wolfSSL_OBJ_nid2obj` and `wolfSSL_d2i_PUBKEY`
- add comments to `ssl.c`
- check `lnlen` in `wolfSSL_OBJ_ln2nid`
2020-04-15 12:53:38 +02:00
toddouska
ebb490204a
Merge pull request #2898 from embhorn/zd9856
...
Fix EVP API to return NID types / SHA3 for RSA sign
2020-04-14 16:09:00 -07:00
toddouska
f97a56b9ce
Merge pull request #2905 from ejohnstown/dtls-fuzz
...
DTLS Fuzz Fix
2020-04-14 14:19:09 -07:00
Eric Blankenhorn
d9472b895f
Fix conflicts after rebase
2020-04-14 15:24:52 -05:00
Eric Blankenhorn
19ca00bcd4
Adding support for SHA3 in wolfSSL_RSA_sign_ex
2020-04-14 14:31:00 -05:00
Eric Blankenhorn
1487917214
Fix EVP_MD_CTX_type to return NID
2020-04-14 14:27:21 -05:00
Eric Blankenhorn
be437c0bd2
Fix EVP API to use NID instead of WC_ types
2020-04-14 12:47:10 -05:00
John Safranek
70d03f3ba0
DTLS Fuzz Fix
...
Only save a next epoch message if it is in the next epoch, not any future epoch.
2020-04-14 10:13:37 -07:00
toddouska
9c1b90170a
Merge pull request #2903 from SparkiDev/test_4096
...
Fix testing using 4096 bits keys and parameters
2020-04-14 09:25:00 -07:00
toddouska
06c6e583c8
Merge pull request #2891 from julek-wolfssl/refactor-evp-functions
...
Move EVP functions to evp.c
2020-04-14 09:22:51 -07:00
toddouska
a2892f66c0
Merge pull request #2889 from JacobBarthelmeh/SanityChecks
...
sanity check on input length before secure renegotiation compare
2020-04-14 09:21:29 -07:00
David Garske
b6d6b1db77
Added new DH 4096-bit key to gencertbuf.pl.
2020-04-14 07:11:07 -07:00
Juliusz Sosinowicz
dad0bc0159
Keep compatibility with old OPENSSL_EXTRA_X509_SMALL functions
2020-04-14 12:52:23 +02:00
Juliusz Sosinowicz
0b3a331265
Revert wc_OBJ_sn2nid
2020-04-14 11:48:14 +02:00
Juliusz Sosinowicz
0ded4d4ccb
wolfSSL_RSA_*_PKCS1_PSS rewrite
2020-04-14 11:48:14 +02:00
Juliusz Sosinowicz
89f7a51838
Add option to enable DPP support in wpa_supplicant (note DPP not yet supported as of this commit)
2020-04-14 11:48:14 +02:00
Juliusz Sosinowicz
20e669a65a
New API
...
Add `wc_ecc_import_point_der_ex` for correct importing DER ECC point and keep `wc_ecc_import_point_der` old functionality
2020-04-14 11:48:14 +02:00
Juliusz Sosinowicz
dbe4e778d3
Test fixes
...
- Add `parameter` to `WOLFSSL_X509_ALGOR`
- Implement `wolfSSL_ASN1_TYPE_new`, `wolfSSL_ASN1_TYPE_free`, and `wolfSSL_ASN1_TYPE_set`
- Fix leak where `pval` in `wolfSSL_X509_ALGOR_set0` was lost if `aobj` was provided
2020-04-14 11:48:14 +02:00
Juliusz Sosinowicz
18093a6b0b
Code review changes
...
- Don't include `ENABLED_OPENSSLALL` with `ENABLED_WPAS`
- Return length in `wolfSSL_i2d_DHparams`
- Implement `wolfSSL_EC_POINT_mul` with independent multiplication and addition if `ECC_SHAMIR` not defined
- Implment `ASN1_SIMPLE` without `offsetof` by using a dummy struct
- Style fixes
2020-04-14 11:48:14 +02:00
Juliusz Sosinowicz
9722082372
Fix nid2* and *2nid functions
2020-04-14 11:48:14 +02:00
Juliusz Sosinowicz
eb549f7095
Test fixes
2020-04-14 11:45:32 +02:00
Juliusz Sosinowicz
ef5eefac91
Test fixes
2020-04-14 11:45:32 +02:00
Juliusz Sosinowicz
b4d9007a48
Test fixes
...
Config fixes
Fix windows FIPS
2020-04-14 11:45:32 +02:00
Juliusz Sosinowicz
680a481e61
Test fixes
...
Remove redundant macros
2020-04-14 11:45:32 +02:00
Juliusz Sosinowicz
9ced70edc1
Test fixes
...
Free `x509->key.pkey` in `FreeX509
Fix type conversions
Fix memory leaks and use of uninitialized memory
2020-04-14 11:45:32 +02:00
Juliusz Sosinowicz
73b4d78d5b
Added partial support for wpa_supplicant, hostapd, and cjose:
...
- Moved `SetECKeyInternal` and `SetECKeyExternal` to `internal.h` to allow usage outside of `ssl.c`
- Added `asn1t.h`
- Implemented the `IMPLEMENT_ASN1_FUNCTIONS` macro for a small subset of ASN1 tags
-- So far only `X509_ALGOR` and `ASN1_BIT_STRING` are supported
- Implemented `BN_mod_add` function
- Allow for setting of `EC_KEY` export form through EC_KEY_set_conv_form
- Implemented `i2o_ECPublicKey`
- Implemented `EC_POINT_copy`
- Implemented deriving DH and ECDH keys in `EVP_PKEY_CTX`. Functions added:
-- `EVP_PKEY_derive_init`
-- `EVP_PKEY_derive_set_peer`
-- `EVP_PKEY_derive`
- Implemented `EVP_PKEY_get0_DH`
- Implemented `X509_ALGOR_new`
- Implemented `X509_ALGOR_free`
- Implemented `X509_ALGOR_set0`
- Implemented `X509_PUBKEY_new`
- Implemented `X509_PUBKEY_free`
- Implemented `X509_PUBKEY_set`
- Implemented `RSA_padding_add_PKCS1_PSS`
- Implemented `RSA_verify_PKCS1_PSS`
- Changed second parameter of `wolfSSL_d2i_PUBKEY` to be constant
- Corrected long names in `asn.h`
- Added `wc_ecc_get_generator` as a way to get the generator point of a curve
- Added `wc_ecc_export_point_der_ex` to export an ECC point in compressed or uncompressed format with one API
- Added `wc_ecc_export_point_der_compressed` to export a point in an `ecc_point` structure in compressed DER format
- Added 'wc_RsaSSL_Verify_ex` which adds the option to choose a padding type
- Added `wc_RsaPad_ex` and `wc_RsaUnPad_ex` to `rsa.h` as `WOLFSSL_LOCAL` functions
- `CopyDecodedToX509` now fills `x509->key` and `x509->algor` when populating x509
- `wolfSSL_EVP_CipherInit` now uses `wc_AesGcmSetExtIV` to set the IV so that it is copied to `ctx->iv` by `wolfSSL_StoreExternalIV`
- Added error checking to `wolfSSL_EVP_PKEY_get_der`
- `wolfSSL_X509_ALGOR_get0` now attempts to return something in all parameters
- Refactored `wolfSSL_EC_KEY_new` to use `*_new` functions when available
- Added `setupPoint` to set the internal point if not yet set
- Always set external point in `wolfSSL_ECPoint_d2i`
- Added compressed point support to `wolfSSL_EC_POINT_point2oct`
- Fix `wolfSSL_EC_POINT_mul` so that it will calculate the full `generator * n + q * m` then OpenSSL does
- Added `WOLFSSL_RSA_GetRNG` helper function to get a `WC_RNG` from `WOLFSSL_RSA`
- Correct short names in `wolfssl_object_info`
- Added all currently supported curves to `wolfssl_object_info`
- Added `oidCurveType` to `oid2nid`
- Add more padding types to `wolfSSL_RSA_public_decrypt`
- Fix `keysize` in `wc_ecc_import_point_der`
- Added tests for new additions
2020-04-14 11:45:32 +02:00
Sean Parkinson
ba401c9bde
Fix testing using 4096 bits keys and parameters
...
RSA PKCS #1.5 padding for signing is not reliant on a random.
2020-04-14 12:03:51 +10:00
Sean Parkinson
416f0775d3
Merge pull request #2900 from dgarske/sp_no_malloc
...
Added option to build SP small without malloc
2020-04-14 09:40:11 +10:00
toddouska
3cb0c600ba
Merge pull request #2894 from SparkiDev/ecc_cr_fix
...
Change constant time and cache resistant ECC mulmod
2020-04-13 16:36:22 -07:00
JacobBarthelmeh
f309173518
Merge pull request #2899 from embhorn/zd9564
...
Adding check for invalid SAN ext with no entries
2020-04-13 15:31:06 -06:00
toddouska
ee0289bea6
Merge pull request #2825 from julek-wolfssl/self-include-options
...
OpenVPN changes
2020-04-13 13:11:18 -07:00
toddouska
aadec345ab
Merge pull request #2871 from vaintroub/master
...
Fix clang warnings (issue #2870 )
2020-04-13 09:02:51 -07:00
David Garske
1f5a7bffaa
Build fixes for WOLFSSL_NO_MALLOC in wolfCrypt test.
2020-04-13 07:39:06 -07:00
David Garske
b01ce168ea
Fixes for SP small with no malloc in sp_256_ecc_mulmod_10 and sp_384_ecc_mulmod_15.
2020-04-13 07:19:06 -07:00
toddouska
4748254b60
Merge pull request #2896 from embhorn/zd9916
...
Fix wc_KeyPemToDer with PKCS1 and empty key
2020-04-10 15:38:07 -07:00
David Garske
d412ccb6f8
Added new option WOLFSSL_SP_NO_MALLOC for building small SP without malloc. Added SP documentation. Added ./configure --enable-sp=yes,nomalloc supprt. https://github.com/wolfSSL/scripts/pull/79
2020-04-10 11:13:55 -07:00
Eric Blankenhorn
8644fdca7d
Update from review
2020-04-10 08:29:31 -05:00
Sean Parkinson
ffd06e359f
Change constant time and cache resistant ECC mulmod
...
Ensure points being operated on change to make constant time.
2020-04-10 09:28:20 +10:00
toddouska
0a40bbe2a9
Merge pull request #2897 from ejohnstown/omit-omit
...
Omit -fomit-frame-pointer from CFLAGS
2020-04-09 16:01:34 -07:00
toddouska
cf8459e518
Merge pull request #2892 from SparkiDev/cppcheck_fixes_4
...
Fixes from cppcheck
2020-04-09 16:01:11 -07:00
Eric Blankenhorn
7d82c4e3f2
Adding check for invalid SAN ext with no entries
2020-04-09 16:49:52 -05:00
Eric Blankenhorn
c3e0575914
Fix from review
2020-04-09 12:52:32 -05:00
Juliusz Sosinowicz
f6b9b2e0eb
Remove redundant guards
2020-04-09 18:26:23 +02:00
toddouska
2bf9dc4037
Merge pull request #2895 from dgarske/qat_tls13
...
Fix for asynchronous TLS v1.3 issue
2020-04-09 09:25:36 -07:00
Juliusz Sosinowicz
9cbbd164e0
Fix test errors
2020-04-09 14:54:09 +02:00
Sean Parkinson
6621465433
Merge pull request #2890 from JacobBarthelmeh/Testing
...
set ChaCha counter state for TLS 1.3 AEAD
2020-04-09 10:28:50 +10:00
John Safranek
7a6de91296
Omit -fomit-frame-pointer from CFLAGS.
2020-04-08 14:06:11 -07:00
Eric Blankenhorn
4d6e33b1dd
Fix wc_KeyPemToDer with PKCS1 and empty key
2020-04-08 11:34:24 -05:00
toddouska
97d798743a
Merge pull request #2893 from SparkiDev/tls13_capable_fix
...
Another place where TLS 1.3 capable check is required
2020-04-08 09:09:19 -07:00
David Garske
5e5af8e93a
Fix for asynchronous TLS v1.3 issue where connect or accept state is incorrectly advanced when there is data to queued to send.
2020-04-08 07:26:21 -07:00
Sean Parkinson
7001599782
Another place where TLS 1.3 capable check is required
2020-04-08 11:36:47 +10:00
Sean Parkinson
411aee6e05
Fixes from cppcheck
...
Added PRIVATE_D version of rsa private key operation for SP
implementation for specific platforms.
WC_NO_RNG results in warnings when RNG calls don't do anything.
Added ifdef checks for variables not used otherwise.
Remove superfluous if statements like when checking ret == 0.
Change names of globals that are generic and are used locally before
global definition.
Remove definition of variable len that isn't used except as a
replacement for sz which is parameter.
Don't subtract two variables when one has just been assigned the value
of the other.
Fix shifting of signed value.
Fix parameter checking in aes.c and des3.c for platform specific code.
2020-04-08 09:46:22 +10:00
toddouska
9e08efe8e0
Merge pull request #2885 from SparkiDev/sp_x64_ecc_tweak
...
Tweak the SP x86_64 ECC assembly
2020-04-07 14:27:12 -07:00
toddouska
6e8d3f224d
Merge pull request #2888 from SparkiDev/tls13_down_rand
...
Fix downgrade fixed random to match spec
2020-04-07 14:22:07 -07:00
toddouska
690b546260
Merge pull request #2887 from dgarske/nodir
...
Fix for building with `NO_WOLFSSL_DIR`
2020-04-07 14:14:34 -07:00
toddouska
b6f98a3cde
Merge pull request #2886 from kaleb-himes/ZD10106
...
Avoid leak when HAVE_AESGCM and NO_AES_DECRYPT. Thanks to G.G. on ZD …
2020-04-07 14:13:43 -07:00
Juliusz Sosinowicz
4c0ea10e45
Move EVP functions to evp.c
2020-04-07 22:36:50 +02:00
toddouska
ebcf86070d
Merge pull request #2883 from miyazakh/esp_aescounter
...
add aes counter on esp32
2020-04-07 13:24:53 -07:00
toddouska
77b75ef3a2
Merge pull request #2881 from dgarske/ecc_asn
...
Fixes for building ECC without ASN
2020-04-07 13:09:37 -07:00
toddouska
dec111722f
Merge pull request #2880 from SparkiDev/tls_csr_ext_empty
...
GNU TLS server sends empty CSR extension
2020-04-07 13:08:21 -07:00
toddouska
c002df4cce
Merge pull request #2879 from ejohnstown/dtls-fix
...
DTLS Fix
2020-04-07 13:07:30 -07:00
toddouska
154dd552e9
Merge pull request #2877 from SparkiDev/tls_hmac_trunc
...
Allow use of truncated HMAC with TLS_hmac checking
2020-04-07 13:06:36 -07:00
toddouska
65cf5a0d46
Merge pull request #2802 from embhorn/zd9764
...
Fix for bidirectional shutdown
2020-04-07 13:03:54 -07:00
toddouska
f742693062
Merge pull request #2867 from SparkiDev/aes-ccm-aesni
...
For CCM using AES-NI, do 4 blocks at a time if possible
2020-04-07 13:03:23 -07:00
toddouska
4a4f383485
Merge pull request #2842 from julek-wolfssl/set_curve_groups_list
...
Check length to avoid XSTRNCMP accessing memory after `list`
2020-04-07 13:02:18 -07:00
Jacob Barthelmeh
bf332b459b
set ChaCha counter state for TLS 1.3 AEAD
2020-04-07 10:36:23 -06:00
Jacob Barthelmeh
1ce0268477
sanity check on input length before secure renegotiation compare
2020-04-07 10:10:03 -06:00
Sean Parkinson
e6affa386f
Fix downgrade fixed random to match spec
2020-04-07 09:42:08 +10:00
David Garske
31ea4b388c
Fix for building with NO_WOLFSSL_DIR when compatibility layer is enabled. ZD 10117.
2020-04-06 10:33:16 -07:00
kaleb-himes
4ec0591e45
Avoid leak when HAVE_AESGCM and NO_AES_DECRYPT. Thanks to G.G. on ZD #10106 for the report
2020-04-06 09:43:24 -06:00
Juliusz Sosinowicz
06f23223e4
Allow wolfSSL to include options.h with EXTERNAL_OPTS_OPENVPN header
2020-04-06 15:06:15 +02:00
Sean Parkinson
9c67bc2864
For CCM using AES-NI, do 4 blocks at a time if possible
2020-04-06 11:11:28 +10:00
Sean Parkinson
7dad0d3965
Tweak the SP x86_64 ECC assembly
...
Put back fixes undone in previous commits:
- Fix casting warning in SP when mp_digit < sp_digit
- SP fix check for NULL in EC point_new
2020-04-06 11:02:30 +10:00
Hideki Miyazaki
302e1d6818
add aes counter on esp32
2020-04-04 14:04:44 +09:00
David Garske
1831193c20
* Fixes for building ECC without ASN.
...
* Fix to expose `wc_ecc_import_private_key_ex` and its ability to import a private key even when `NO_ASN` is defined.
* Remove execute bit on CSharp files.
2020-04-03 10:55:31 -07:00
Sean Parkinson
c0dc3091e1
GNU TLS server sends empty CSR extension
2020-04-03 16:03:41 +10:00
toddouska
9a1687d00e
Merge pull request #2836 from dgarske/fips_ld
...
Example for FIPS Linker Descriptor (.ld)
2020-04-02 14:28:30 -07:00
toddouska
8128a269f3
Merge pull request #2876 from SparkiDev/sp_arm64
...
Improve speed of AArch64 assembly
2020-04-02 14:26:48 -07:00
Juliusz Sosinowicz
48e40fac2b
OpenVPN changes
...
Include <wolfssl/options.h> in settings.h for OpenVPN
Additional API fixes
2020-04-02 20:23:13 +02:00
toddouska
6126aca387
Merge pull request #2874 from SparkiDev/tls13_cert_hash
...
When picking hash alg for ECC certs use key size
2020-04-02 09:52:10 -07:00
toddouska
86adb7f9c5
Merge pull request #2873 from SparkiDev/aes_small
...
Smaller table version of the AES encrypt/decrypt
2020-04-02 09:50:58 -07:00
toddouska
5df5ab5931
Merge pull request #2862 from dgarske/iar_ropi
...
Support for IAR with position independent code (ROPI)
2020-04-02 09:49:00 -07:00
toddouska
06442c410d
Merge pull request #2861 from dgarske/zynqmp
...
Fixes for Xilinx SDK and Zynq UltraScale+ MPSoC
2020-04-02 09:46:48 -07:00
Juliusz Sosinowicz
b1a80973dd
size_t -> int
2020-04-02 18:45:53 +02:00
Sean Parkinson
c48ea3f567
When picking hash alg for ECC certs use key size
2020-04-02 11:53:35 +10:00
John Safranek
04dcb8f774
DTLS Fix
...
If the finished message (well, next epoch handshake message) is received,
store it. Process it after a change cipher spec message.
2020-04-01 17:17:51 -07:00
Sean Parkinson
e23a6b46b0
Allow use of truncated HMAC with TLS_hmac checking
2020-04-02 08:52:40 +10:00
Eric Blankenhorn
b1ec15de3e
Only try shutdown once in example
2020-04-01 17:48:17 -05:00
Eric Blankenhorn
3f7ce61dbd
Updates from review
2020-04-01 11:14:25 -05:00
Sean Parkinson
df1819b79f
Improve speed of AArch64 assembly
...
Improve point_dbl and point_dbl_n for all platforms.
2020-04-01 15:06:50 +10:00
David Garske
47d1cb8415
Changes to support IAR with position independent code (ROPI). Updated example wolfSSL IAR project to use "ropi" (Position indipendance for code and read-only data).
2020-03-31 08:17:09 -07:00
Martin Akman
568ce62b81
Updates from code review
2020-03-31 18:29:06 +10:00
David Garske
3bd52b166b
Merge pull request #2863 from miyazakh/dtls_benchmark
...
added dtls benchmark
2020-03-27 12:06:06 -07:00
Sean Parkinson
9339808ea1
Smaller table version of the AES encrypt/decrypt
...
Use WOLFSSL_AES_SMALL_TABLES.
Much slower. Decrypt much slower then encrypt.
2020-03-27 15:53:01 +10:00
Hideki Miyazaki
99b9f46e58
fixed not working on mac
...
fixed case of -s or -c
2020-03-27 12:33:51 +09:00
toddouska
ddb4b5eb89
Merge pull request #2872 from SparkiDev/rsa_pub_fix
...
Fix performance of RSA public key ops with TFM
2020-03-26 11:56:23 -07:00
toddouska
16fa1a4747
Merge pull request #2855 from JacobBarthelmeh/PKCS12
...
maintenance to PKCS12 create for outputting encrypted bundles
2020-03-26 10:41:04 -07:00
JacobBarthelmeh
1bc2ecff6a
Merge pull request #2849 from dgarske/csharp_wrapper
...
CSharp wrapper improvements
2020-03-26 09:10:24 -06:00
Sean Parkinson
c82531a41a
Fix performance of RSA public key ops with TFM
...
Have a constant and non-constant time modular exponentation available in
tfm.c.
Call the non-constant time version explicitly when performing RSA public
key mod exp.
2020-03-26 17:33:07 +10:00
David Garske
a6034a38c7
Fix for building with WOLFSSL_SMALL_STACK_CACHE only (no WOLFSSL_SMALL_STACK).
2020-03-25 16:04:45 -07:00
Vladislav Vaintroub
d57d194de3
Fix clang warnings (issue #2870 )
...
The warning was "comparison of array 'ecc_sets[i].name' not equal to a null
pointer is always true [-Wtautological-pointer-compare]"
Compiler is correct, ecc_sets[i].name is an array of size 16, thus
can't be NULL
Also, fix build error on Windows by changing uint8_t to "unsigned char"
(alternative fix could be including stdint.h)
2020-03-25 23:07:12 +01:00
David Garske
3717982d47
Fix to build wolfssl/testsuite in Any CPU case.
2020-03-25 14:53:58 -07:00
David Garske
70773f3b3e
Added "WOLFSSL_ARMASM" ifdef checks on ARMv8 port files.
2020-03-25 12:54:40 -07:00
toddouska
93fd1b1eeb
Merge pull request #2869 from JacobBarthelmeh/Testing
...
add single quotes around -? in test scripts
2020-03-25 11:03:19 -07:00
toddouska
083b8f680f
Merge pull request #2868 from JacobBarthelmeh/Certs
...
refactor decrypt content with PKCS12 and fix for AES-256 + HMAC SHA25…
2020-03-25 11:02:34 -07:00
Jacob Barthelmeh
2116c20f5d
add test case for PKCS12 to DER and back
2020-03-25 10:38:18 -06:00
David Garske
469de9a580
Fix for CSharp solution to eliminate Debug/Release. Only DLL Debug and DLL Release should be available.
2020-03-25 08:57:58 -07:00
Jacob Barthelmeh
0a6b93fda2
add single quotes around -? in test scripts
2020-03-24 22:40:48 -06:00
Jacob Barthelmeh
59ab600d76
refactor decrypt content with PKCS12 and fix for AES-256 + HMAC SHA256 case
2020-03-24 22:23:44 -06:00
Hideki Miyazaki
9fac21f463
replace the size at bench_embedded
2020-03-25 08:09:42 +09:00
toddouska
26f539400a
Merge pull request #2866 from SparkiDev/curve448_gcc_bug
...
Curve448 - 128-bit impl workaround for compiler
2020-03-24 09:55:43 -07:00
toddouska
e66334e56b
Merge pull request #2865 from SparkiDev/sp_cast_fix
...
Fix casting warning in SP when mp_digit < sp_digit
2020-03-24 09:52:26 -07:00
toddouska
b92e5d83c5
Merge pull request #2864 from JacobBarthelmeh/ARMv8
...
Fix for clang warning with ARM assembly build
2020-03-24 09:51:11 -07:00
Hideki Miyazaki
75eca61b3e
address review comments
2020-03-24 20:35:21 +09:00
Sean Parkinson
c95e7f88aa
Curve448 - 128-bit impl workaround for compiler
...
Old gcc compilers can keep track of the 128-bit multiplication and left
shift results' size.
Split all multiplication and left shift results into separate variables.
Add/subtract into the correct variable at end.
Don't want variable declarations after statements so reduce doesn't use
'tr' anymore.
2020-03-24 16:28:14 +10:00
Sean Parkinson
a7d265bf46
Fix casting warning in SP when mp_digit < sp_digit
2020-03-24 12:41:25 +10:00
David Garske
7fabd74a90
Merge pull request #2859 from SparkiDev/tfm_ec_invmod_ct
...
Constant time EC map to affine for private operations
2020-03-23 19:16:45 -07:00
Jacob Barthelmeh
dde1c3bc08
Fix for clang warning with ARM assembly build
2020-03-23 15:08:28 -06:00
David Garske
5c424769a0
Added DH and Curve/Ed25519.
2020-03-23 09:08:45 -07:00
Hideki Miyazaki
7d4b4e4994
added dtls benchmark
2020-03-22 17:56:28 +09:00
David Garske
a8f2c97e13
Added CSharp example for multi-threaded TLS server. Refactor to separate the ssl and ctx handles.
2020-03-20 16:10:19 -07:00
David Garske
97f08393e2
Added wolfCrypt Xilinx SDK project. Fix for stsafe.h inclusion of ssl.h with WOLFCRYPT_ONLY.
2020-03-20 14:40:17 -07:00
David Garske
2706d6d48a
Improve the benchmark to use snprintf then printf. Resolve issue showing results with xil_printf.
2020-03-20 12:34:08 -07:00
David Garske
3127a7e9e5
Fixes for building with bare-metal on Xilinx SDK with zynqmp. Added Zynqmp benchmark timer support.
2020-03-20 12:22:47 -07:00
toddouska
9b8752e314
Merge pull request #2858 from SparkiDev/netscape_cert_ext
...
Recognise Netscape Certificate Type extension
2020-03-19 16:33:25 -07:00
toddouska
0c3667ba93
Merge pull request #2857 from SparkiDev/sp_null_check
...
SP fix check for NULL in EC point_new
2020-03-19 16:30:59 -07:00
toddouska
33b95b8ad7
Merge pull request #2854 from JacobBarthelmeh/Certs
...
add +1 for string null terminator
2020-03-19 16:24:42 -07:00
toddouska
49f01450de
Merge pull request #2853 from SparkiDev/dtls_mtu
...
Allow setting of MTU in DTLS
2020-03-19 16:23:39 -07:00
toddouska
f4a8430115
Merge pull request #2851 from JacobBarthelmeh/SanityChecks
...
add space for null terminator and check on header pointer
2020-03-19 16:00:57 -07:00
Sean Parkinson
1de07da61f
Constant time EC map to affine for private operations
...
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign.
2020-03-20 08:59:41 +10:00
Jacob Barthelmeh
ce6aeebdb4
fixes for static analysis checks
2020-03-19 16:34:02 -06:00
Sean Parkinson
62a593e72e
Recognise Netscape Certificate Type extension
...
Checks the bit string is valid but doesn't store or use value.
(Some certificates have this extension as critical)
2020-03-19 12:43:03 +10:00
Sean Parkinson
c776a4219a
SP fix check for NULL in EC point_new
2020-03-19 08:56:52 +10:00
David Garske
a28fc5e70b
Peer review feedback. Handle socket.Connect() failures.
2020-03-18 13:33:15 -07:00
Jacob Barthelmeh
09dedfbe17
maintenance to PKCS12 create for outputting encrypted bundles
2020-03-18 12:00:57 -06:00
David Garske
00630baa53
Merge pull request #2826 from miyazakh/fix_csharp_dtlsexample
...
fix dtl server example of CSharp when freeing stuff
2020-03-18 09:26:14 -07:00
Jacob Barthelmeh
2bf39307f1
add +1 for string null terminator
2020-03-18 10:25:56 -06:00
Sean Parkinson
e17e064ce2
Allow setting of MTU in DTLS
2020-03-18 12:36:11 +10:00
toddouska
eb6f44e491
Merge pull request #2847 from tmael/memLeak
...
Fix memory leak
2020-03-17 13:31:10 -07:00
toddouska
d0767164c8
Merge pull request #2846 from SparkiDev/sp_rsa_priv_fix
...
Fix SP RSA private op
2020-03-17 13:28:11 -07:00
JacobBarthelmeh
aff80ab0d3
adjust test case for no ECC
2020-03-17 08:56:55 -07:00
JacobBarthelmeh
9fc8c8e0b6
add space for null terminator and check on header pointer
2020-03-16 15:14:29 -07:00
JacobBarthelmeh
74781a3d45
Merge pull request #2829 from cconlon/pkcs7multioctets
...
PKCS7/CMS EnvelopedData support for fragmented encrypted content
2020-03-16 13:12:23 -06:00
toddouska
321a43edee
Merge pull request #2850 from JacobBarthelmeh/SanityChecks
...
sanity check on IV size
2020-03-16 09:36:17 -07:00
Jacob Barthelmeh
2d950f1ab4
sanity check on IV size
2020-03-15 18:46:11 -06:00
David Garske
00a49dffd0
Add new files to autoconf.
2020-03-13 20:40:18 -07:00
David Garske
6498cb48bc
CSharp wrapper improvements. Added TLS client example. Added TLS v1.3 methods. Added set_verify and CTX_set_verify. Added example code for CTX_set_cipher_list.
2020-03-13 14:54:57 -07:00
Tesfa Mael
a6b01904d2
Release mem during failure
2020-03-13 14:22:06 -07:00
toddouska
bcc720ef68
Merge pull request #2773 from SKlimaRA/master
...
Coverity issues fixes.
2020-03-13 10:20:45 -07:00
toddouska
464631f920
Merge pull request #2841 from JacobBarthelmeh/Certs
...
add function wolfSSL_X509_NAME_ENTRY_create_by_txt
2020-03-13 10:17:52 -07:00
toddouska
fa4ccbe728
Merge pull request #2844 from JacobBarthelmeh/SanityChecks
...
set inital state of TLS 1.3 peerSuites structure
2020-03-13 10:16:53 -07:00
Tesfa Mael
452b4c03a6
Fix memory leak
2020-03-12 23:24:44 -07:00
Sean Parkinson
6321eabf86
Fix SP RSA private op
...
tmpa - tmpb can be less than -p.
Need to conditionally add p twice.
C and multiple platform fix.
2020-03-12 09:33:52 +10:00
Jacob Barthelmeh
0be0cf44e4
fix for returning NULL when text not found and add test case
2020-03-10 09:54:31 -06:00
Stanislav Klima
93326a7aeb
Changed dst NULL check.
2020-03-10 09:55:27 +01:00
Jacob Barthelmeh
fb0ad6532f
set inital state of TLS 1.3 peerSuites structure
2020-03-09 15:13:01 -06:00
Stanislav Klima
3fcbcbf42a
Revert "Logically dead code."
...
This reverts commit 2db62f744a .
2020-03-09 17:45:15 +01:00
toddouska
87ff2fa47d
Merge pull request #2839 from ejohnstown/hmac-init
...
HMAC Init
2020-03-06 11:05:30 -08:00
toddouska
ab8bfc241d
Merge pull request #2833 from JacobBarthelmeh/Compatibility-Layer
...
compile for NO_WOLFSSL_STUB
2020-03-06 11:04:36 -08:00
Chris Conlon
4ad8a2bacb
store wc_PKCS7_DecodeEnvelopedData encryptedContentTotalSz in existing variable instead of adding another
2020-03-06 10:50:00 -07:00
Juliusz Sosinowicz
fe9a876895
Check length to avoid XSTRNCMP accessing memory after list
2020-03-06 17:13:59 +01:00
Jacob Barthelmeh
1035d73a05
add function wolfSSL_X509_NAME_ENTRY_create_by_txt
2020-03-05 16:29:55 -07:00
John Safranek
9fe2ddacf4
HMAC Init
...
1. wc_HmacSetKey() has a check against the hmac's type that assumes one
has called wc_HmacInit() on the object first. In FIPS Ready builds we
do not have wc_HmacInit() in the boundary. This change removes that check
and action when making a FIPS build. The free called doesn't do anything
in the FIPS build case.
2. Initialize the Hmac's macType to WC_HASH_TYPE_NONE. Check the macType
against that rather than 0. There are some build configs where none isn't
0.
2020-03-05 13:38:02 -08:00
toddouska
a6385a2b48
Merge pull request #2840 from SparkiDev/tls_show_fddhe
...
Fix to show the FFDHE group when negotiated
2020-03-05 08:33:49 -08:00
toddouska
59b9483cde
Merge pull request #2837 from SparkiDev/sp_x64_rsa_priv
...
Fix SP x64 RSA Private op
2020-03-05 08:33:11 -08:00
toddouska
f24622596f
Merge pull request #2827 from kaleb-himes/ZD9976
...
Fix infinite loop with small sha1 inputs. Thanks to Peter W. on ZD997…
2020-03-05 08:32:14 -08:00
Sean Parkinson
6fcfde0651
Fix to show the FFDHE group when negotiated
2020-03-05 12:37:49 +10:00
toddouska
9f6cf8a154
Merge pull request #2834 from dgarske/various_tls
...
Fix for TLS server with TLSv1.2 or less `wolfSSL_get_curve_name`
2020-03-04 16:24:28 -08:00
toddouska
9b54af199c
Merge pull request #2822 from dgarske/notime_openssl
...
Fixes for building NO_ASN_TIME with OPENSSL_EXTRA
2020-03-04 16:22:18 -08:00
toddouska
e1215e0e1b
Merge pull request #2810 from SparkiDev/tls13_mut_auth
...
Allow mutual authentication to be required for TLS server side
2020-03-04 16:21:03 -08:00
Sean Parkinson
3707eea2f3
Fix SP x64 RSA Private op
...
tmpa - tmpb can be less than -p.
Need to conditionally add p twice.
2020-03-04 15:54:17 +10:00
David Garske
fca5895090
Example for FIPS Linker Descriptor to explicitly set wolfCrypt FIPS boundaries.
2020-03-03 15:47:30 -08:00
David Garske
c5b4fe1283
Fix for namedGroup missing.
2020-03-03 15:35:56 -08:00
Jacob Barthelmeh
bb76495233
compile for NO_WOLFSSL_STUB
2020-03-03 14:03:11 -07:00
Chris Conlon
44d2fc55e6
scan-build fixes for wc_PKCS7_DecodeEnvelopedData()
2020-03-03 10:27:22 -07:00
David Garske
730c95cf38
Fix for TLS server incorrectly showing "FFDHE_2048" for "SSL curve name is" when using ECDHE and TLS v1.2 or less. The PickHashSigAlgo should be resetting ssl->namedGroup to indicate a named group was not used.
2020-03-03 09:20:58 -08:00
David Garske
4895fd7b0b
Added "either" side functions for SSLv3. These are only enabled with WOLFSSL_EITHER_SIDE and WOLFSSL_ALLOW_SSLV3. ZD 9984.
2020-03-03 09:18:11 -08:00
David Garske
41ff54f873
Fix for typo with wc_ecc_init in documentation.
2020-03-03 09:16:48 -08:00
Chris Conlon
d8eeefb4b7
initialize explicitOctet to 0 in pwc_PKCS7_DecodeEnvelopedData()
2020-03-02 09:13:11 -07:00
John Safranek
127e304901
DTLS Fix
...
An endpoint's retransmit pool was being reset when receiving its peer's
change cipher spec message. When the finished message was lost, and
retransmits need to happen, they weren't available, so nothing happened.
Moved the reset to the finished case rather than CCS.
2020-03-01 16:43:10 -08:00
Sean Parkinson
8cccb9008b
Change to work for other TLS versions
...
Send alert when client doesn't send a certificate on request.
2020-03-02 08:50:57 +10:00
Sean Parkinson
6334dd9cb0
Allow mutual authentication to be required for TLS 1.3
2020-03-02 08:50:57 +10:00
Chris Conlon
debb792690
fix PKCS7 encrypted content decoding for streaming API usage
2020-02-28 17:55:19 -07:00
David Garske
92114fef75
Fixes for building NO_ASN_TIME with OPENSSL_EXTRA. Fixes #2820 .
...
* `./configure --enable-opensslextra CFLAGS="-DNO_ASN_TIME"`
2020-02-28 09:35:17 -08:00
toddouska
805034bca3
Merge pull request #2830 from SparkiDev/sp_ff_x86_64
...
Improve performance of RSA/DH ops on x64
2020-02-28 09:03:22 -08:00
toddouska
5b58130210
Merge pull request #2806 from SparkiDev/curve448
...
Add Curve448, X448, Ed448 implementations
2020-02-28 08:59:08 -08:00
Sean Parkinson
441027a502
Improve performance of RSA/DH ops on x64
...
Focus on 3072-bit ops but others improved as well.
2020-02-28 10:42:37 +10:00
Sean Parkinson
2c6eb7cb39
Add Curve448, X448, Ed448 implementations
2020-02-28 09:30:45 +10:00
Chris Conlon
d21e370822
add support for PKCS7/CMS EnvelopedData with fragmented encrypted content
2020-02-27 14:42:57 -07:00
toddouska
c7a2510d97
Merge pull request #2823 from SparkiDev/sp_div_fix
...
Fix for SP x64 div
2020-02-27 12:57:35 -08:00
toddouska
a313b9d2cb
Merge pull request #2821 from dgarske/crl_bitmask
...
Fix for CRL bit-mask enum value issue
2020-02-27 12:54:08 -08:00
toddouska
b7d0b81443
Merge pull request #2818 from dgarske/rsa_sha3only
...
RSA with SHA-3 only and RSA 4096-bit tests
2020-02-27 12:44:29 -08:00
toddouska
6dabe82c65
Merge pull request #2814 from SparkiDev/curve25519_x64_fix
...
Curve25519 x64 asm: Fix negate and add fe_sq_n
2020-02-27 12:21:53 -08:00
toddouska
60afebdb86
Merge pull request #2811 from miyazakh/fix_espidf_buildtest_failure
...
fixed build failure and warnings in ESP-IDF port
2020-02-27 12:21:14 -08:00
toddouska
1288c6b249
Merge pull request #2809 from dgarske/conf_usersettings
...
Fix to enable inclusion of all .c files when using `--enable-usersettings`
2020-02-27 12:10:07 -08:00
toddouska
ed7a5b17d8
Merge pull request #2808 from dgarske/mdk5
...
Fix for minor typos in the MDK5 examples
2020-02-27 12:06:50 -08:00
toddouska
3349dbc852
Merge pull request #2807 from dgarske/arg_checks
...
Added missing argument checks for public API's in `wolfio.c`
2020-02-27 12:03:32 -08:00
toddouska
eddf4abf8e
Merge pull request #2775 from embhorn/api_port
...
openSSL compatibility API for EVP, BIO, and SSL_SESSION
2020-02-27 11:51:21 -08:00
kaleb-himes
d9e221806b
Fix infinite loop with small sha1 inputs. Thanks to Peter W. on ZD9976 for the report
2020-02-27 09:39:22 -07:00
Hideki Miyazaki
2d530499e3
fix dtl server example when freeing stuff
2020-02-27 21:56:25 +09:00
Sean Parkinson
f568f394b1
Merge pull request #2824 from julek-wolfssl/EVP-aesgcm
...
Fix AES-GCM IV length in wolfSSL_EVP_CIPHER_iv_length
2020-02-27 14:06:56 +10:00
Juliusz Sosinowicz
3b822ad3d5
Fix AES-GCM IV length in wolfSSL_EVP_CIPHER_iv_length
2020-02-26 22:11:36 +01:00
Sean Parkinson
2a5d7a2ac3
Fix for SP x64 div
...
Check the top half of number being divided to see if it is greater than
or equal.
If it is then the first div_word may crash as the result is more than
64-bits. So subtract modulus from the top to keep value small.
2020-02-26 10:53:35 +10:00
Martin Akman
3bbd8be5c9
ATECC: Don't init transport key if not used
2020-02-25 22:03:55 +10:00
David Garske
4b83b88a29
Fix for CRL bit-mask enum value issue. ZD 9948.
2020-02-24 18:52:50 -08:00
Sean Parkinson
969e4dccc5
Merge pull request #2803 from julek-wolfssl/EVP-aesgcm
...
Evp aesgcm
2020-02-25 08:24:30 +10:00
David Garske
ef2c1ae738
Fix for examples/benchmark/tls_bench.c:114:20: error: unused variable 'kShutdown' with WOLFCRYPT_ONLY.
2020-02-23 19:01:46 -08:00
David Garske
7a3138f841
Merge pull request #2817 from miyazakh/rename_enum_tisp
...
Rename enumeration definition
2020-02-23 18:40:48 -08:00
David Garske
da882f3912
Added wolfCrypt RSA 4096-bit test support using USE_CERT_BUFFERS_4096 build option (./configure CFLAGS="-DUSE_CERT_BUFFERS_4096").
2020-02-23 18:40:13 -08:00
David Garske
c8e618a817
Fix build for WOLFSSL_RSA_VERIFY_ONLY.
2020-02-23 15:58:28 -08:00
David Garske
e80c696d5f
Fix for RSA with SHA3 only (resolves warning with unsed RsaMGF1.
2020-02-23 13:54:48 -08:00
Hideki Miyazaki
3187624d9e
rename common naming enum
2020-02-22 11:35:02 +09:00
David Garske
0f188be892
Merge pull request #2805 from ejohnstown/update-config
...
configure
2020-02-21 09:35:52 -08:00
Sean Parkinson
c9ce065f8a
Curve25519 x64 asm: Fix negate and add fe_sq_n
2020-02-21 11:37:45 +10:00
Sean Parkinson
5716862a8a
Merge pull request #2813 from julek-wolfssl/openssh-8.1
...
Remove redundant wolfSSL_EVP_CIPHER_CTX_iv_length call
2020-02-21 09:52:44 +10:00
Eric Blankenhorn
403c263e0b
Fix valgrind issue
2020-02-20 17:28:34 -06:00
Eric Blankenhorn
b74dac6171
Fix WIN test
2020-02-20 17:28:34 -06:00
Eric Blankenhorn
60dea0c53a
Fix VS error
2020-02-20 17:28:34 -06:00
Eric Blankenhorn
e4188d935b
Fix WIN error
2020-02-20 17:28:34 -06:00
Eric Blankenhorn
b4563e6af3
Fix CFB and OFB
2020-02-20 17:28:34 -06:00
Eric Blankenhorn
61ebfd571c
Fix new file error
2020-02-20 17:28:34 -06:00
Eric Blankenhorn
a64e1540ba
Adding EVP support for SHA3
2020-02-20 17:28:34 -06:00
Eric Blankenhorn
6eda4e7b46
Fix in test
2020-02-20 17:28:34 -06:00
Eric Blankenhorn
95f973a5be
Adding test and dox for ERR_print_errors_cb
2020-02-20 17:28:34 -06:00
Eric Blankenhorn
936312f77e
Adding ERR_print_errors_cb
2020-02-20 17:28:33 -06:00
Jacob Barthelmeh
a0ddb05a07
change evp with cfb1 expect input size in bytes
2020-02-20 17:28:33 -06:00
Eric Blankenhorn
1a96558b6e
Adding macro and XTS support functions
2020-02-20 17:28:33 -06:00
Eric Blankenhorn
922b308029
Fix from review
2020-02-20 17:28:33 -06:00
Jacob Barthelmeh
3eee891cf5
fix redefinition warning on older clang compiler
2020-02-20 17:28:33 -06:00
Jacob Barthelmeh
51d55ed1c8
account for different peer certificate in test case, g++ build fix, static memory size increase
2020-02-20 17:28:33 -06:00
Jacob Barthelmeh
a9accb6c39
add more macro guards for builds
2020-02-20 17:28:33 -06:00
Jacob Barthelmeh
b67ade5164
account for cavp build
2020-02-20 17:28:33 -06:00
Jacob Barthelmeh
76eec8884b
clean up memory after test and don't leak x509 with get session peer
2020-02-20 17:28:33 -06:00
Eric Blankenhorn
258382048d
Fix test failures
2020-02-20 17:28:33 -06:00
Eric Blankenhorn
018f313cca
Fix clang warning
2020-02-20 17:28:33 -06:00
Eric Blankenhorn
5a87dbe094
Adding tests for EVP_CIPHER_CTX_reset
2020-02-20 17:28:33 -06:00
Eric Blankenhorn
64dcf5740a
Fix for AES_XTS
2020-02-20 17:28:33 -06:00
Eric Blankenhorn
e421d9f52c
Fix in evp_aes_xts init
2020-02-20 17:28:33 -06:00
Jacob Barthelmeh
d7c1b9561f
fix for cfb1 mode and add EVP tests
2020-02-20 17:28:33 -06:00
Jacob Barthelmeh
d6be24c4f7
add 192/256 key size tests of EVP cfb8
2020-02-20 17:28:33 -06:00
Jacob Barthelmeh
d4428ebc0c
add EVP cfb1 test and update some EVP code
2020-02-20 17:28:32 -06:00
Jacob Barthelmeh
887eeb3c47
add EVP tests for cfb128
2020-02-20 17:28:32 -06:00
Jacob Barthelmeh
9d61ba6c62
initial cfb1/cfb8 support added
2020-02-20 17:28:32 -06:00
Eric Blankenhorn
9c4e0807e2
Adding EVP_aes_###_xts tests (not complete)
2020-02-20 17:28:32 -06:00
Eric Blankenhorn
16ce670897
Revert "Testing aes_*_xts"
...
This reverts commit 776eeb756c70b052849323d7645622a3f1d2b76a.
2020-02-20 17:28:32 -06:00
Eric Blankenhorn
3197d67e62
Testing aes_*_xts
2020-02-20 17:28:32 -06:00
Jacob Barthelmeh
49def96998
add test for get0 session peer certificate
2020-02-20 17:28:32 -06:00
Jacob Barthelmeh
653235cd57
add stub implementation for SSL_MODE_AUTO_RETRY
2020-02-20 17:28:32 -06:00
Jacob Barthelmeh
b83a5840d6
add stub function for wolfSSL_EVP_mdc2
2020-02-20 17:28:32 -06:00
Jacob Barthelmeh
c2c3e0d4aa
add initial implementation for wolfSSL_SESSION_get0_peer
2020-02-20 17:28:32 -06:00
Jacob Barthelmeh
ab49120652
add aesofb benchmark
2020-02-20 17:28:32 -06:00
Jacob Barthelmeh
df0d5f3b08
add EVP_aes_*_ofb implementation and tests, add support for inline with OFB
2020-02-20 17:28:32 -06:00
Jacob Barthelmeh
e837894578
add AES-OFB mode
2020-02-20 17:28:32 -06:00
Jacob Barthelmeh
65732c2269
add bio retry and set close tests
2020-02-20 17:28:32 -06:00
Jacob Barthelmeh
3137312911
update to implementation of BIO_MD type
2020-02-20 17:28:32 -06:00
Eric Blankenhorn
62f20db48e
Adding more EVP and SSL API
2020-02-20 17:28:32 -06:00
Jacob Barthelmeh
8f7af875a4
add BIO_f_md and BIO_get_md_ctx tests
2020-02-20 17:28:32 -06:00
Eric Blankenhorn
0abc814792
EVP_MD_CTX_reset and EVP_aes fixes
2020-02-20 17:28:31 -06:00
Eric Blankenhorn
ba25161f6c
Adding BIO and EVP api
2020-02-20 17:28:31 -06:00
David Garske
49a9239cf2
Merge pull request #2804 from SparkiDev/sp_cache_resist_fix
...
Fix cache resist compile to work with SP C code
2020-02-20 15:05:18 -08:00
David Garske
da2980172b
Merge pull request #2812 from kaleb-himes/FAILING_FIPS_IN_MASTER
...
Fix failing FIPS tests in master stemming from PR #2733
2020-02-20 14:29:16 -08:00
Juliusz Sosinowicz
70ef925a48
Remove redundant wolfSSL_EVP_CIPHER_CTX_iv_length call
2020-02-20 18:32:56 +01:00
kaleb-himes
1f003967df
Fix failing FIPS tests in master stemming from PR #2733
2020-02-20 09:20:59 -07:00
Stanislav Klima
d4a9279a6c
Revert "Resource leak." to resolve the conflict (this fix is unapplicable, because the leaking code was removed).
...
This reverts commit 451d0a470a .
2020-02-20 15:12:02 +01:00
Hideki Miyazaki
f7018c4765
fixed build failure and warnings
...
fixed unit test app failure
2020-02-20 18:40:16 +09:00
Sean Parkinson
c62f31cd27
Fix cache resist compile to work with SP C code
2020-02-20 10:10:05 +10:00
David Garske
418c508eba
Fixes for SCTP example to check build options.
2020-02-19 12:28:49 -08:00
David Garske
6036f604a6
Added missing argument checks for public API's in wolfio.c.
2020-02-19 12:18:00 -08:00
David Garske
75183262ad
Minor typos and fixes to the MDK5 examples.
2020-02-19 12:03:14 -08:00
David Garske
baace2c0e3
Fix to enable inclusion of all .c files when using the --enable-usersettings option.
2020-02-19 11:58:33 -08:00
JacobBarthelmeh
e72b87f372
Merge pull request #2733 from julek-wolfssl/openssh-8.1
...
Openssh 8.1
2020-02-19 10:14:35 -07:00
Juliusz Sosinowicz
cc597add48
Don't always include wolfssl/openssl/bn.h
2020-02-19 11:17:31 +01:00
John Safranek
9953f2d01d
1. Remove duplicate AM_CONDITIONAL statments from configure.ac.
...
2. Update copyright year in configure.ac.
2020-02-18 16:16:59 -08:00
JacobBarthelmeh
17c3bb00d8
Merge pull request #2798 from ejohnstown/vxworks-strings
...
VxWorks Strings
2020-02-18 17:10:31 -07:00
Juliusz Sosinowicz
26e2d6eacf
Adressing Todd's comments
...
Check for HAVE_GETADDRINFO beside WOLF_C99
Move STR_SIZEOF to wolfssl/wolfcrypt/types.h and rename to XSTR_SIZEOF to prevent collision in client projects
Remove wolfssl/openssl/ssl.h and wolfssl/internal.h from crypto layer
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
b736a65fa8
Fix redefinition issue
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
2218f7b95d
Fix merge issues
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
d6686f1320
Remove usage of res in wolfSSL_BN_clear_bit
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
5a766bd5bb
Change STR_SIZEOF declaration file
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
1512485926
Fix user-rsa tests
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
5c4d3df4f3
Fix broken Windows FIPS build
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
f55cfd7ba7
Fix missing wolfSSL_i2d_RSAPrivateKey references
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
3fcec191a4
Refactor wolfSSL_RSA_To_Der
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
5ed1c233b7
Sean comments
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
dac23dfe15
Add DSA and DH free to wolfSSL_EVP_PKEY_set1_EC_KEY
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
7aaa89aedc
Cleanup bn_one in wolfSSL_Cleanup
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
43ce272cb3
Variable declaration at start of scope
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
eedbce7c0a
Null-check keyFormat
...
Zero all of WOLFSSL_DH struct
Fix macros for self-test
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
97a4889bb3
Undo some stuff
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
1df9963b80
sha3.h
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
7ce7017521
Fix memory leaks when compiling with SMALL_STACK
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
f765b711bf
More macro preproc stuff
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
48b39a34c7
Properly Init mp_int number
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
b592b241c7
Fix Segfault in wolfSSL_EC_KEY_dup
...
Fix more header stuff
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
b58f26945d
Different configuration fixes
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
480227704d
Fix missing stuff in headers
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
59b001c484
Fix header definitions when running CAVP self test
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
50f8fb1475
Enable wc_RsaKeyToDer even when key generation is turned off
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
e6547c75cd
Reimplement external data as it was before: a fixed size vector. This makes external data implementation easier as it doesn't require allocation or cleanup. Only zeroing the entire structure that it is in (which happens in all structures anyway) and then calling the appropriate getter and setter functions to manipulate external data.
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
9a0d3ba369
Check boundaries in B64 decode
...
ERR_get_error will always return a positive error code
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
58c239a49f
Fix stuff after rebase
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
d6a160c637
Fix error codes for OpenSSL compatiblity
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
6e72a299d7
Don't undef HAVE_GETADDRINFO as it disables defines in projects using wolfSSL
...
Change test_wolfssl_EVP_aes_gcm so that changing the tag will fail the authentication check
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
ab56d078a4
keygen-moduli passed
...
Handle trailing newlines in wolfSSL_BN_hex2bn
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
ae948e2a07
Pass try-ciphers
...
define EVP_CIPHER_CTX_set_iv as wolfSSL_EVP_CIPHER_CTX_set_iv
add wolfSSL_GetLoggingCb functionality when compiling without enable-debug
fix initialization vector handling of all cipher modes when using our EVP layer. The IV was incorrectly handled in initialization as well as not being updated after processing
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
fbedabe601
OpenSSH changes
...
- increase FP_MAX_BITS for OpenSSH
- Add helpful loggin API (names are self-explanatory)
-- wolfSSL_GetLoggingCb
-- WOLFSSL_IS_DEBUG_ON
- Define WOLFSSL_EC_METHOD as an alias of WOLFSSL_EC_GROUP
- Add wolfSSL_EC_GROUP_method_of which really just returns the group itself
- Add wolfSSL_EC_METHOD_get_field_type which gets the curve type of the WOLFSSL_EC_GROUP(remember that WOLFSSL_EC_METHOD is an alias of WOLFSSL_EC_GROUP for now)
- Modify Base64_Decode so that it accepts arbitrary PEM line length
- Modify PemToDer so that it accepts private keys with a custom -----BEGIN * PRIVATE KEY----- header
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
84a2ca7a4e
Map the Jacobian point back to affine space in wolfSSL_EC_POINT_get_affine_coordinates_GFp
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
aea95232d1
WIP
...
Add EC_POINT conversion to BIGNUM (EC_POINT_point2bn)
Add setting affine coordinates for EC_POINT (EC_POINT_set_affine_coordinates_GFp)
Add bit clearing for BIGNUM (BN_clear_bit)
Add supporting unit tests in api.c
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
89e35e2547
openssh 8.1 compiles
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
b5c52d7c70
openssh WIP and some light refactoring
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
41de1bb156
WIP
2020-02-18 21:36:26 +01:00
Juliusz Sosinowicz
b05cfaa601
Add aes-gcm to wolfSSL_EVP_get_cipherbyname and wolfSSL_EVP_get_cipherbynid
2020-02-18 21:34:23 +01:00
Stanislav Klima
6f3623f220
Moved infinite loop check to the other bad func arg check.
2020-02-18 09:59:59 +01:00
Eric Blankenhorn
41d3ba0efa
Tests and examples for bidirectional shutdown
2020-02-17 16:47:47 -06:00
Eric Blankenhorn
59fb81c950
Add fix
2020-02-17 16:47:47 -06:00
toddouska
2566986d41
Merge pull request #2632 from SparkiDev/sp_p384
...
Add support for P384 curve into SP
2020-02-17 11:46:09 -08:00
toddouska
bf1ec3004a
Merge pull request #2787 from dgarske/size_reduc
...
Adds options to disable the hash wrappers and base64 decode
2020-02-17 11:44:37 -08:00
toddouska
651ffe2c12
Merge pull request #2789 from JacobBarthelmeh/SanityChecks
...
fix return with error on process peer cert
2020-02-17 11:44:02 -08:00
toddouska
f2e1266f2d
Merge pull request #2791 from dgarske/async_fixes
...
Fixes for asynchronous crypto issues
2020-02-17 11:43:13 -08:00
toddouska
14b7355411
Merge pull request #2792 from SparkiDev/rsa_kg_blind_fix
...
Fix for rsa key gen blinding - don't call lcm
2020-02-17 11:42:25 -08:00
toddouska
44c327ee14
Merge pull request #2795 from SparkiDev/tls13_secret_cb
...
Call secret callback when TLS 1.3 secrets generated
2020-02-17 11:41:16 -08:00
toddouska
fda322829f
Merge pull request #2796 from JacobBarthelmeh/Compatibility-Layer
...
free existing cert store when setting a new one
2020-02-17 11:37:56 -08:00
Sean Parkinson
8972bf6278
Add support for P384 curve into SP
2020-02-17 15:46:34 +10:00
John Safranek
defa54f40d
Merge pull request #2800 from tmael/trim-padding
...
Trim trailing padding bytes from a key
2020-02-14 16:05:44 -08:00
JacobBarthelmeh
30936e7ad4
Merge pull request #2793 from kaleb-himes/ZD9865
...
Fix issue in wolfSSL_EVP_PKEY_assign_RSA when RSA key not zeroized
2020-02-14 16:40:52 -07:00
Tesfa Mael
aaaa191937
Trim trailing padding byte
2020-02-14 12:54:35 -08:00
David Garske
8f6a614d17
Merge pull request #2797 from kaleb-himes/JENKINS_STUFF
...
--disable-supportedcurves --enable-opensslextra - NIGHTLY DISABLE OPT…
2020-02-14 09:01:03 -08:00
Sean Parkinson
614e675a00
Call secret callback when TLS 1.3 secrets generated
2020-02-14 08:42:47 +10:00
Chris Conlon
b62064f6a8
Merge pull request #2737 from JacobBarthelmeh/dks7g2
...
changes for build with s7g2
2020-02-13 14:07:44 -07:00
toddouska
cabe30828c
Merge pull request #2786 from cconlon/android-debug
...
add Android debug for logcat
2020-02-13 10:12:40 -08:00
toddouska
fba40d14d4
Merge pull request #2785 from ottok/bugfix/menu-js-width
...
Wrap JavaScript source on multiple lines to make it readable
2020-02-13 10:07:13 -08:00
toddouska
b038e2e8f0
Merge pull request #2771 from JacobBarthelmeh/Windows
...
change public Timeval to WOLFSSL_TIMEVAL
2020-02-13 09:38:42 -08:00
John Safranek
63a005d71b
VxWorks Strings
...
When building for VxWorks, set HAVE_STRINGS_H as it uses strings.h, not string.h.
2020-02-13 09:08:54 -08:00
kaleb-himes
bb7508f570
--disable-supportedcurves --enable-opensslextra - NIGHTLY DISABLE OPTIONS TEST
2020-02-12 15:57:00 -07:00
Jacob Barthelmeh
8e1adb125c
free existing cert store when setting a new one
2020-02-12 15:45:44 -07:00
Jacob Barthelmeh
0814f61b11
fix code formating and turn on HW acc. by default
2020-02-12 10:31:34 -07:00
Stanislav Klima
1b13178182
Fixes possible compile error if NO_PKCS7_STREAM is defined.
2020-02-12 13:46:12 +01:00
Stanislav Klima
1a38c26097
Prevent infinite loop.
2020-02-12 13:29:33 +01:00
Stanislav Klima
109173d756
Fix two resource leaks.
2020-02-12 12:57:40 +01:00
kaleb-himes
5b7fc7b133
Address failure when blinding disabled and key not initialized to zero
2020-02-11 14:39:30 -07:00
David Garske
d1397656ef
Merge pull request #2790 from ejohnstown/abi-tweak
...
ABI Additions
2020-02-10 15:07:35 -08:00
Chris Conlon
61221742b7
Merge pull request #2734 from aaronjense/renesas-ra-port
...
Renesas RA e2studio projects for Client, Server, Test and Benchmark
2020-02-10 14:49:03 -07:00
Sean Parkinson
669d9b1ae4
Fix for rsa key gen blinding - don't call lcm
2020-02-10 08:51:43 +10:00
David Garske
f322b71526
wolfCrypt fixes for asynchronous (--enable-asynccrypt):
...
* Fix for ECC and using NULL curve->order (wasn't loaded).
* Fix for typo on heap.
* Fix for QT case where GetInt failure retry did not "init" the mp_int.
2020-02-07 13:34:43 -08:00
Jacob Barthelmeh
3c077a3cef
add NO_OLD_TIMEVAL_NAME macro for backwards compatibility
2020-02-07 11:56:30 -07:00
John Safranek
7648997e37
ABI Additions
...
Added the functions wolfSSL_GetRNG(), wolfSSL_CTX_GetDevId(),
wc_ecc_import_x963(), and wc_RNG_GenerateBlock() to the ABI
testing.
2020-02-06 13:33:38 -08:00
Jacob Barthelmeh
17bedbac67
fix return with error on process peer cert
2020-02-06 11:53:42 -07:00
JacobBarthelmeh
61a5fe3108
add macro for trng and gce driver names
2020-02-06 09:20:07 -08:00
JacobBarthelmeh
17cfe2589b
Merge pull request #2748 from tmael/fix_cppcheck
...
Fix cppcheck
2020-02-05 16:02:22 -07:00
Stanislav Klima
da3df4f9c6
Changing logic to remove dead code section.
2020-02-05 19:36:37 +01:00
Stanislav Klima
0964272dc6
Resource leak fix.
2020-02-05 18:28:50 +01:00
David Garske
ba9dc11e62
Adds options to disable the hash wrappers (NO_HASH_WRAPPER) and base64 decode (NO_WOLFSSL_BASE64_DECODE).
2020-02-05 11:58:44 -05:00
Stanislav Klima
bbfefd3cde
Sanity check NULL dereference.
2020-02-05 16:59:20 +01:00
JacobBarthelmeh
e75b1b5cb9
add suport for AES acceleration
2020-02-04 16:10:20 -08:00
JacobBarthelmeh
b7d772700a
update sha256 support for endian
2020-02-04 16:03:45 -08:00
Chris Conlon
b8b0b7da03
add Android debug for logcat
2020-02-04 10:07:26 -07:00
Tesfa Mael
e664a4f206
Review comments
2020-02-04 08:55:37 -08:00
Tesfa Mael
b67fd249e2
Fix for cppcheck
2020-02-04 08:55:37 -08:00
Chris Conlon
b29fe41a35
Merge pull request #2738 from SparkiDev/cppcheck_fixes_3
...
Changes to clear issues raised by cppcheck
2020-02-03 17:02:40 -07:00
toddouska
63a73be3f0
Merge pull request #2777 from dgarske/constchar
...
Fixes for char strings not marked as const.
2020-02-03 11:12:55 -08:00
toddouska
4ee022f788
Merge pull request #2776 from julek-wolfssl/set_curve_groups_list
...
Add SSL_CTX_set1_groups_list and SSL_set1_groups_list APIs
2020-02-03 11:11:59 -08:00
toddouska
6f2230e459
Merge pull request #2774 from SparkiDev/sp_x86_64_asm
...
Improve performance of SP Intel 64-bit asm
2020-02-03 11:08:17 -08:00
toddouska
61e78880a5
Merge pull request #2769 from dgarske/zd9791
...
Fix for `wc_EccPublicKeyDecode` to use the length from ASN sequence
2020-02-03 11:05:17 -08:00
toddouska
c98876d440
Merge pull request #2768 from julek-wolfssl/openvpn-config
...
Add --enable-openvpn build option
2020-02-03 11:01:06 -08:00
toddouska
0551b1f2de
Merge pull request #2765 from SparkiDev/client_read_write
...
Client using common read and write func
2020-02-03 11:00:15 -08:00
Otto Kekäläinen
967235c1f3
Wrap JavaScript source on multiple lines to make it readable
...
Closes : wolfSSL/wolfssl#2783
2020-02-03 20:15:18 +02:00
Sean Parkinson
cc2bf03e73
Client using common read and write func
2020-02-03 09:17:27 +10:00
Juliusz Sosinowicz
420e597c16
Move functions to ssl.c
2020-02-01 10:06:53 +01:00
JacobBarthelmeh
6ec136208c
add sha256 hardware acceleration
2020-01-31 14:26:04 -08:00
David Garske
d63bdf257d
Merge pull request #2337 from MKinclRA/fix-visual-studio-2019-build
...
Added stdio.h include to types.h.
2020-01-31 12:59:58 -08:00
David Garske
26794e7b5e
Merge pull request #2778 from ejohnstown/fix-abi
...
Fix ABI
2020-01-31 06:49:16 -08:00
Martin Akman
20c0beb9e5
'WOLFSSL_USE_FLASHMEM' to store constant tables in flash memory
2020-01-31 23:43:17 +10:00
Martin Akman
6c1e0ff049
ATECC: Option to disable I2C transport key
2020-01-31 23:32:48 +10:00
Martin Akman
809472febc
Added VERY_SMALL_SESSION_CACHE
2020-01-31 23:32:48 +10:00
Martin Akman
14dc5fe2e3
Fixes for 16bit processors
2020-01-31 23:32:48 +10:00
Juliusz Sosinowicz
e13d9f7f1b
Add SSL_CTX_set1_groups_list and SSL_set1_groups_list APIs
2020-01-31 06:38:38 +01:00
David Garske
3d233d624c
Merge pull request #2770 from JacobBarthelmeh/Testing
...
fix typo in wolfSSL_sk_X509_EXTENSION_pop_free
2020-01-30 18:55:54 -08:00
JacobBarthelmeh
aa498a7956
Merge pull request #2767 from dgarske/freertos
...
Fix for evp.c included and FREERTOS realloc
2020-01-30 15:53:05 -07:00
John Safranek
4bc0f79dd9
Fix ABI
...
Someone removed some of the WOLFSSL_ABI tags from the ssl.h header file. It looks like it was a bad manual merge.
2020-01-30 14:07:27 -08:00
David Garske
928f641064
Fixes for char strings not marked as const. The const is an optimization to allow use from flash, which saves RAM space on embedded devices.
2020-01-30 13:53:06 -08:00
Chris Conlon
0fda8cc3b3
Merge pull request #2756 from dgarske/changelog
...
Template for ChangeLog.md for next release
2020-01-30 10:47:12 -07:00
David Garske
ba49427cc4
Cleanup include.am whitespace.
2020-01-30 08:44:52 -08:00
David Garske
32f478d335
Better fix for using the ASN.1 provided length, not provided inSz. Confirmed CheckBitString will check case where inSz < ASN.1 length.
2020-01-30 08:38:22 -08:00
toddouska
75e30a33f1
Merge pull request #2764 from SparkiDev/rsa_q_modinv_p
...
Constant time q modinv p in RSA key gen
2020-01-30 08:08:07 -08:00
David Garske
3df9ca3fae
Fix to use TBD version for next release.
2020-01-30 06:26:45 -08:00
David Garske
6cf63b1738
Template for ChangeLog.md for next release. New PR's should update this document if its worth mention in the change log.
2020-01-30 06:26:45 -08:00
David Garske
e5426f85c9
Fix for evp.c when being included directly due to improperly placed WOLFSSL_EVP_INCLUDED. Fix for FREERTOS to expose XREALLOC for normal math.
2020-01-30 06:22:08 -08:00
David Garske
9bfbdfe695
Fix for wc_EccPublicKeyDecode to use the length from ASN sequence, not the provided inSz. Also checked the case where the sequence number is larger than supplied inSz and it will properly return ASN_PARSE_E. ZD 9791
2020-01-30 06:20:29 -08:00
Kaleb Himes
a90cc51a5f
Merge pull request #2772 from dgarske/cert_tests
...
Fixes for build with opensslextra and 3072-bit cert buffers
2020-01-30 06:47:51 -07:00
Sean Parkinson
55ea2facdd
Changes to clear issues raised by cppcheck
2020-01-30 14:24:32 +10:00
Sean Parkinson
81bebd8e5c
Improve performance of SP Intel 64-bit asm
...
RSA: Only constant time copy out when doing private key op
Improve performance of sp_count_bits
2020-01-30 12:23:38 +10:00
Stanislav Klima
c938cb35ca
Logically dead code.
2020-01-29 17:35:15 +01:00
Stanislav Klima
ed88e8d1c5
Logically dead code.
2020-01-29 17:34:58 +01:00
Stanislav Klima
2db62f744a
Logically dead code.
2020-01-29 17:34:40 +01:00
Stanislav Klima
37386f5fb5
NULL dereference.
2020-01-29 17:34:19 +01:00
Stanislav Klima
670ba75ea4
Missing varargs cleanup.
2020-01-29 17:33:59 +01:00
Stanislav Klima
2d36624d84
NULL dereference.
2020-01-29 17:33:38 +01:00
Stanislav Klima
c3fabb1da6
NULL dereference.
2020-01-29 17:33:21 +01:00
Stanislav Klima
df0b0a6e91
NULL dereference.
2020-01-29 17:31:14 +01:00
Stanislav Klima
70cb97c116
NULL dereference.
2020-01-29 17:30:57 +01:00
Stanislav Klima
972790fb86
Resource leak.
2020-01-29 17:30:35 +01:00
Stanislav Klima
451d0a470a
Resource leak.
2020-01-29 17:30:14 +01:00
Stanislav Klima
96d1593735
Possible use after free.
2020-01-29 17:29:52 +01:00
Stanislav Klima
77b69ebf56
Logically dead code.
2020-01-29 17:29:23 +01:00
David Garske
e183d95c86
Fix for moved file.
2020-01-29 07:22:07 -08:00
David Garske
5677a96c80
Fixes to resolve openssl_pkey1_test with updated test buffer sizes.
2020-01-29 06:51:47 -08:00
David Garske
5aabebddd8
Fix more 3072-bit cert buffer edge case builds (certext/certgen).
2020-01-29 06:43:35 -08:00
David Garske
3f1c3392e5
Fixes for build with opensslextra and 3072-bit cert buffers. Adds 3072-bit RSA public key der. Eliminates duplicate 3072-bit client cert/key.
2020-01-29 06:37:06 -08:00
Jacob Barthelmeh
a9e9120fa0
change public Timeval to WOLFSSL_TIMEVAL
2020-01-28 17:11:46 -07:00
Jacob Barthelmeh
59af7a8e35
fix typo in wolfSSL_sk_X509_EXTENSION_pop_free
2020-01-28 16:50:54 -07:00
John Safranek
3bdb7d8188
Merge pull request #2761 from JacobBarthelmeh/Testing
...
add close on pre to echoserver example
2020-01-28 09:29:29 -08:00
Juliusz Sosinowicz
044ad957e5
Add --enable-openvpn build option
2020-01-28 15:29:24 +01:00
David Garske
1ea7755232
Merge pull request #2742 from tmael/dsa_mem_leak
...
Fix mem leak in DSA
2020-01-28 06:25:58 -08:00
Tesfa Mael
43b7258d3b
Review comments
2020-01-27 12:44:16 -08:00
Aaron Jense
91a9117e1b
Renesas RA e2studio projects for Client, Server, Test and Benchmark
2020-01-27 13:22:32 -07:00
JacobBarthelmeh
695b126a1c
Merge pull request #2739 from dgarske/pkcs8_ed25519
...
Added PKCS8 support for ED25519
2020-01-24 10:56:40 -08:00
David Garske
b9f39b7c06
Merge pull request #2759 from ejohnstown/config-maint
...
Deprecate some configure flags
2020-01-24 10:40:19 -08:00
David Garske
126dceee1f
Merge pull request #2763 from SparkiDev/sp_int_div_word
...
Add support to sp_int.c for platforms that do not divide an sp_int_wo…
2020-01-23 18:37:04 -08:00
Sean Parkinson
b4cadae4e2
Constant time q modinv p in RSA key gen
2020-01-23 14:52:29 -08:00
Sean Parkinson
ec877aa91e
Add support to sp_int.c for platforms that do not divide an sp_int_word by an sp_int_digit
2020-01-23 14:39:19 -08:00
toddouska
945d34533c
Merge pull request #2727 from JacobBarthelmeh/Windows
...
update to ECC key parsing custom curves for Windows
2020-01-23 13:57:06 -08:00
Chris Conlon
d1e39668aa
Merge pull request #2740 from aaronjense/compatibility-fixes
...
Compatibility Layer Fixes
2020-01-23 08:25:40 -08:00
Chris Conlon
c7340fd90b
Merge pull request #2750 from ejohnstown/mingw
...
mingw update
2020-01-23 08:00:15 -08:00
Chris Conlon
1c56d62753
Merge pull request #2754 from dgarske/crypttest_3072
...
wolfCrypt Test 3072-bit Support
2020-01-23 07:55:19 -08:00
Jacob Barthelmeh
d9253afc04
add close on pre to echoserver example
2020-01-22 16:23:46 -08:00
John Safranek
f2db85c07c
Deprecate some configure flags
...
1. Add C_EXTRA_FLAGS and C_FLAGS to CFLAGS.
2. Remove the cached copied of C_EXTRA_FLAGS and C_FLAGS.
3. The option.h is set only on CFLAGS, CPPFLAGS, and the AM_ versions.
2020-01-22 14:26:16 -08:00
David Garske
06e3c90073
Merge pull request #2732 from kaleb-himes/ZD9730-spellchecker
...
Fixing some typos. Thanks to Fossies for the report
2020-01-22 13:52:56 -08:00
David Garske
e3efdc4b5d
Merge pull request #2755 from SparkiDev/rsa_enc_3072
...
Fix masking of 16 bits
2020-01-22 13:40:21 -08:00
Sean Parkinson
55d485cc45
Fix masking of 16 bits
2020-01-22 10:39:36 -08:00
David Garske
b022b651b3
wolfCrypt test fixes for hard coded "256" byte buffers to support 3072-bit RSA. Requires PR #2755
2020-01-22 10:04:53 -08:00
David Garske
84a878bda2
Fix for include .am issue.
2020-01-22 09:11:00 -08:00
David Garske
2a5c623c97
Fix for RSA without SHA512 build error. Fix or renew cert PEM to DER.
2020-01-22 08:15:34 -08:00
David Garske
e3e862c8b6
Test case fixes for sig wrapper test and DH.
2020-01-21 22:25:11 -08:00
David Garske
4d9dbc9ec3
Adds 3072-bit RSA tests using USE_CERT_BUFFERS_3072.
2020-01-21 22:16:54 -08:00
Takashi Kojo
37cad6e9ba
%zu, pragma: not supported,
2020-01-22 08:12:51 +09:00
John Safranek
aabdec214e
MinGW uses the Win32 setsockopt() function which uses a char for
...
SO_REUSEADDR's option. Everything else uses an int.
2020-01-21 10:53:19 -08:00
David Garske
2cd3474e9d
Improve "keyFormat" to always set based on "algId" and let the later key parsing code produce failure.
2020-01-20 20:49:55 -08:00
David Garske
0489cc97a8
Fix for ProcessBuffer with PEM private keys, where PemToDer call was only setting eccKey. Cleanup to use "keyFormat" OID sum.
2020-01-20 20:49:55 -08:00
David Garske
de8e5ffd6e
Cleanup asn.c use of WOLFSSL_LOCAL (only required in the header).
2020-01-20 20:49:55 -08:00
David Garske
77426e78e1
Added test case for PKCS8 ED25519 encrypted private key.
2020-01-20 20:47:47 -08:00
David Garske
40c8562dc2
Added PKCS8 support for ED25519.
2020-01-20 20:47:47 -08:00
David Garske
7707234901
Merge pull request #2743 from JacobBarthelmeh/Compatibility-Layer
...
adjust set1 curves list function for TLS extension sent
2020-01-20 16:19:55 -08:00
David Garske
98f14eff9f
Refactor to combine duplicate ECC param parsing code.
2020-01-20 16:17:12 -08:00
John Safranek
23427085af
1. Add an indent to a new line in user settings.
...
2. Remove the execute bit from the changed files.
2020-01-20 12:30:32 -08:00
Takashi Kojo
a08ab1fc7a
fix mnGW error
2020-01-20 12:19:18 -08:00
Jacob Barthelmeh
c581c56999
update return value of local GetCurveByOID
2020-01-20 10:40:56 -07:00
Jacob Barthelmeh
3508579f4c
add check on NETX duo build and return value of opening driver
2020-01-20 09:33:14 -07:00
John Safranek
a624ae14df
Merge pull request #2725 from kaleb-himes/ZD9735
...
Remove redundant packing flag
2020-01-18 21:21:32 -08:00
toddouska
66daac4c94
Merge pull request #2709 from JacobBarthelmeh/Testing
...
set chacha20 similar to aes-ctr when handling leftover stream and add…
2020-01-17 15:05:24 -08:00
Jacob Barthelmeh
356636e88d
fix typo
2020-01-17 15:13:52 -07:00
JacobBarthelmeh
87859f9e81
Merge pull request #2747 from dgarske/sizeof_long
...
Improvements for detection of 64-bit support
2020-01-17 15:10:44 -07:00
toddouska
204ef9543a
Merge pull request #2728 from ejohnstown/maint-x509
...
Maintenance: X509
2020-01-17 13:51:02 -08:00
toddouska
92877a1214
Merge pull request #2730 from SparkiDev/sp_div_word_fix
...
Fix for div_word builds of SP C code
2020-01-17 13:15:44 -08:00
toddouska
60afa72330
Merge pull request #2731 from SparkiDev/auth_key_id_set
...
Fix when extAuthKeyIdSet is set.
2020-01-17 13:14:22 -08:00
toddouska
cca545f76c
Merge pull request #2735 from dgarske/ecc_sign
...
Fixes for ECC sign with `WOLFSSL_ECDSA_SET_K`
2020-01-17 13:13:38 -08:00
toddouska
dadcce3eb8
Merge pull request #2741 from SparkiDev/ecc_no_cache
...
Fix for ecc and no cache resistance - set M[2]
2020-01-17 13:09:53 -08:00
Jacob Barthelmeh
c5932a9874
account for leantls and selftest builds
2020-01-17 13:32:59 -07:00
kaleb-himes
9760ed07a9
Based on peer feedback, remove WOLFSSL_PACK from sniffer.h
2020-01-17 12:27:46 -07:00
Jacob Barthelmeh
bd4a9c69dd
convert name to oidsum to curve type for setting supported curves
2020-01-17 11:56:46 -07:00
Jacob Barthelmeh
d8c5353466
adjust set1 curves list function for TLS extension sent
2020-01-16 13:21:14 -07:00
David Garske
c38d5e9a29
Further improved to use HAVE_LIMITS_H and ULL instead of ui64
2020-01-16 09:06:44 -08:00
David Garske
541bf3e639
Improvements for detection of 64-bit support. Adds support for IBM s390x. Improves detection on Windows. Adds new WC_USE_LIMITS_FOR_SIZEOF option to use limits.h to detect sizeof long. Fixes #2600 and Fixes #2745 .
2020-01-16 07:15:18 -08:00
Tesfa Mael
fbf91f7397
Fix mem leak in DSA
2020-01-15 16:03:42 -08:00
Sean Parkinson
584d8498f8
Fix for ecc and no cache resistance - set M[2]
...
Need to have a value in order to maintain timing resistance.
Small maths fails also.
2020-01-16 09:35:34 +10:00
Aaron Jense
3db7b44be4
Compatibility Layer Fixes
2020-01-15 13:49:47 -07:00
Jacob Barthelmeh
bd44091111
refactor solution
2020-01-15 09:29:10 -07:00
JacobBarthelmeh
c01cd808da
changes for build with s7g2
...
add project info
add project info
adjust wolfssl library template
change TRNG collection
fix include.am
fix argument for TRNG
rename example templates
comment out DEBUG_WOLFSSL
change include.am
update license
2020-01-14 17:48:41 -07:00
David Garske
989f3d3684
Fix for FREE_VAR call on sharedA.
2020-01-14 14:35:20 -08:00
David Garske
e429dd8f0b
Peer review feedback minor cleanup.
2020-01-14 14:33:23 -08:00
David Garske
e9bbf89287
Fix for WOLFSSL_ECDSA_SET_K with normal math. The sign_k mp_int was not initialized.
2020-01-14 14:13:12 -08:00
David Garske
95b6076fe1
Fixes for ECC sign with WOLFSSL_ECDSA_SET_K, which was not loading all curve params for the wc_ecc_make_pub_ex call and not correctly setting ALLOC_CURVE_SPECS for WOLFSSL_SMALL_STACK. Cleanup around the loading of curve specs.
2020-01-13 16:25:37 -08:00
David Garske
22f49d8597
Fixes for building with ECC sign/verify only.
2020-01-13 15:35:08 -08:00
David Garske
8974827fbe
Added WOLFSSL_ECC_CURVE_STATIC build option to allow using fixed arrays for ECC parameters. This is enabled by default on Windows. Fixed several compiler warnings. Fixed build macro for key->deallocSet.
2020-01-13 07:15:17 -08:00
John Safranek
c69bd5169f
Switch strncpy to memcpy in the altname store function.
2020-01-10 20:34:14 -08:00
John Safranek
8d1b20706c
Maintenance: X509
...
1. Add a test for the new alt name handling.
2. Added an API to set altnames in a WOLFSSL_X509 struct. Just adds
DNS_entries.
3. Removed the "static" from a bunch of constant byte arrays used inside
some of the ASN.1 code.
2020-01-10 20:26:35 -08:00
John Safranek
5dcffa6b40
Maintenance: X509
...
1. Fix for issue #2724 . When making a certificate out of an X.509
structure, the subject alt names weren't getting correctly copied.
2. Added a function to flatten the DNS_entries into a sequence of
GeneralNames.
3. Put the proper certificate extension wrapping around the flattened
general names.
2020-01-10 20:26:35 -08:00
John Safranek
7571fbdbfb
Maintenance: X509
...
1. Fix for issue #2718 . Added a flag to the X509 structure when someone
sets the issuer name.
2. When making a certificate out of the X509, if the issuer name is set
clear the self-signed flag in the cert.
3. Propigate the flat X509_NAMEs to the string the cert building code
uses.
2020-01-10 20:25:43 -08:00
JacobBarthelmeh
6b4551c012
Merge pull request #2654 from cariepointer/qt-512-513
...
Add Qt 5.12 and 5.13 support
2020-01-10 17:34:23 -07:00
John Safranek
71f8f3031d
Merge pull request #2729 from dgarske/telit_time
...
Fixes for the Telit time functions
2020-01-10 14:51:39 -08:00
David Garske
1f104e52a3
Merge pull request #2715 from ejohnstown/maint-dtls
...
Maintentance: DTLS
2020-01-10 14:43:15 -08:00
kaleb-himes
9b8d4e91c2
Fixing some typos. Thanks to Fossies for the report
2020-01-10 11:45:51 -07:00
Carie Pointer
544ff3f9ac
Fix length in wolfSSL_sk_CIPHER_description
2020-01-10 11:26:57 -07:00
Jacob Barthelmeh
99d657af4f
adjust test cases
2020-01-10 10:31:56 -07:00
Chris Conlon
26a075cfec
Merge pull request #2716 from cariepointer/apache-fixes
...
Fixes for Apache nightly Jenkins tests
2020-01-10 10:20:43 -07:00
Carie Pointer
ef99086aee
Fix valgrind errors
2020-01-10 10:08:39 -07:00
Carie Pointer
de3536a067
More fixes from review
2020-01-09 17:28:20 -07:00
Jacob Barthelmeh
0c25588ad1
adjust TEST_SMALL_CHACHA_CHUNKS size and add more tests
2020-01-09 17:13:57 -07:00
Jacob Barthelmeh
1538e631a8
revert size of ChaCha structure and delay counter increment
2020-01-09 16:39:48 -07:00
Jacob Barthelmeh
a1944c477a
set chacha20 counter in TLS AEAD use
2020-01-09 16:39:48 -07:00
Jacob Barthelmeh
8e24bf6c2c
add macro guard for optimized versions
2020-01-09 16:39:48 -07:00
JacobBarthelmeh
0ec7b311d8
set chacha20 similar to aes-ctr when handling leftover stream and add test case
2020-01-09 16:39:48 -07:00
cariepointer
a9cf16cc2b
Merge branch 'master' into apache-fixes
2020-01-09 16:33:35 -07:00
Sean Parkinson
6e8f3faedd
Fix when extAuthKeyIdSet is set.
...
Was set when extension is seen - extension may not have hash.
But is used to indicate that the hash is set - ie look up by hash.
2020-01-10 09:28:45 +10:00
Sean Parkinson
03c42423eb
Fix for div_word builds of SP C code
2020-01-10 09:02:26 +10:00
toddouska
f3b2815e1f
Merge pull request #2708 from julek-wolfssl/nginx-fix
...
Nginx fix
2020-01-09 15:00:59 -08:00
toddouska
3c9f7809f1
Merge pull request #2714 from JacobBarthelmeh/Docs
...
update linux sgx readme for wolfssl/options.h creation
2020-01-09 14:58:22 -08:00
toddouska
51f44cb09b
Merge pull request #2719 from dgarske/nxp_k64_mmcau
...
Fixes for NXP K64
2020-01-09 14:57:11 -08:00
toddouska
21f82a5662
Merge pull request #2721 from SparkiDev/sp_small_stack_fixes
...
Fix in SP C impl for small stack
2020-01-09 14:55:44 -08:00
toddouska
99045a2fea
Merge pull request #2723 from SparkiDev/rsa_vfy_only_fix
...
Rsa vfy only fix
2020-01-09 14:55:10 -08:00
toddouska
3ea69676eb
Merge pull request #2726 from ejohnstown/maint-ren
...
Maintenance: Secure Renegotiation
2020-01-09 14:54:13 -08:00
toddouska
11a0b117f8
Merge pull request #2706 from dgarske/chapoly_aead_iuf
...
New API's for ChaCha20/Poly1305 AEAD init/update/final
2020-01-09 14:49:26 -08:00
Carie Pointer
0938cdde52
Remove dup->dynamicName = 1 call
2020-01-09 14:09:38 -08:00
Carie Pointer
47040f1dae
EC_KEY_dup fixes
2020-01-09 14:35:57 -07:00
David Garske
8fb586f3ee
Fixes for the Telit time functions. ZD 9733
2020-01-09 11:17:19 -08:00
Jacob Barthelmeh
41f134ae31
update to ECC key parsing custom curves for Windows
2020-01-08 14:45:59 -07:00
John Safranek
1f0f3eb97d
Maintenance: Secure Renegotiation
...
Allow sending application data during the secure renegotiation.
2020-01-08 11:50:18 -08:00
Carie Pointer
b9c99709f7
Fixes from review
2020-01-08 12:48:01 -07:00
kaleb-himes
187702efb9
bring sniffer.h inline with types.h
2020-01-08 09:45:59 -07:00
David Garske
bc1cb4ead8
Fix to keep existing behavior where AAD is optional for wc_ChaCha20Poly1305_Encrypt and wc_ChaCha20Poly1305_Decrypt.
2020-01-07 18:58:26 -08:00
Carie Pointer
f13cee2689
Add comments above functions
2020-01-07 17:30:25 -07:00
Sean Parkinson
b27ec58d20
Fix RSA verify only build
2020-01-08 10:18:37 +10:00
Carie Pointer
28cf563c76
Fixes from PR review: styling and formatting, remove duplicate code
2020-01-07 17:01:53 -07:00
Sean Parkinson
89d8a90781
Get code compiling with SP math and RSA key gen again.
2020-01-08 09:51:26 +10:00
Sean Parkinson
1f1a173d56
Fix in SP C impl for small stack
...
Memset correct size and only when pointer is not NULL.
2020-01-08 08:57:20 +10:00
toddouska
d257003341
Merge pull request #2711 from cconlon/copyright2020
...
update copyright to 2020
2020-01-07 08:40:15 -08:00
toddouska
190623cbb2
Merge pull request #2705 from dgarske/atecc_leak
...
Fix for possible ECC memory leak when using ATECC and TLS
2020-01-07 08:39:39 -08:00
toddouska
709d17904a
Merge pull request #2693 from SparkiDev/mp_rand
...
Improve speed of mp_rand
2020-01-07 08:39:11 -08:00
Carie Pointer
9e4836a863
Fix for jenkins test failure
2020-01-07 08:11:05 -08:00
toddouska
b7ac709617
Merge pull request #2692 from SparkiDev/rsa_gen_modinv
...
Add blinding of mod inverse to RSA key gen
2020-01-07 07:56:38 -08:00
David Garske
56e57f3216
Refactor Poly1305 AEAD / MAC to reduce duplicate code. Tested with TLS v1.3 interop and AEAD test vectors.
2020-01-07 07:04:01 -08:00
David Garske
0f0d307b76
Fix to avoid duplicate symbol for CheckRunTimeSettings when SP and TFM are built. Specifically with these build options: USE_FAST_MATH, WOLFSSL_SP and WOLFSSL_SP_MATH.
2020-01-07 05:43:59 -08:00
David Garske
acfe9717f8
Fix for K64 MMCAU with WOLFSSL_SMALL_STACK_CACHE. Moved random test prior to cipher tests (was getting called first time in GMAC test).
2020-01-07 05:39:17 -08:00
David Garske
914cd00e40
Merge pull request #2717 from SparkiDev/sp_cortexm_r7
...
Don't use r7 with Cortex-M SP assembly
2020-01-07 05:28:43 -08:00
Juliusz Sosinowicz
e0ab92058b
Check CRL extension errors but don't require them
2020-01-07 11:55:07 +01:00
Sean Parkinson
34a462b342
Don't use r7 with Cortex-M SP assembly
...
r7 not available when compiling Cortex-M4 in debug.
2020-01-07 12:53:34 +10:00
David Garske
d68d5229e1
Refactor wc_ChaCha20Poly1305_Encrypt and wc_ChaCha20Poly1305_Decrypt to use the new ChaChaPoly_Aead context and init/update/final functions.
2020-01-06 17:07:09 -08:00
Carie Pointer
681ecf0e58
Fixes for wolfSSL_CTX_load_verify_locations_ex
2020-01-06 14:32:32 -08:00
Carie Pointer
991ee662c0
Return 0 in ParseCRL_Extensions if there are no CRL extensions to parse
2020-01-06 08:42:37 -08:00
Jacob Barthelmeh
f593ff8776
update linux sgx readme for wolfssl/options.h creation
2020-01-06 09:27:17 -07:00
JacobBarthelmeh
ce0475a8e0
Merge pull request #2689 from tmael/pkey_freeMutex
...
Free EVP ctx pkey
2020-01-06 23:15:00 +07:00
Sean Parkinson
75637445ee
Improve speed of mp_rand
2020-01-06 09:39:29 +10:00
Carie Pointer
26eea36d7f
Fix X509_NAME issues for Apache
2020-01-03 15:40:52 -08:00
Chris Conlon
45c5a2d39c
update copyright to 2020
2020-01-03 15:06:03 -08:00
Juliusz Sosinowicz
443b7ed0c4
Accept newline and null teminator at end of X509 certificate
2020-01-02 10:52:02 +01:00
David Garske
01c7cc6502
Fixes to avoid declaring any variables mid-function and always initializing.
2019-12-31 11:43:13 -08:00
David Garske
784d95afbe
Improved state handling.
2019-12-31 10:34:06 -08:00
David Garske
7d2adb2fc0
Merge pull request #2707 from tmael/rsa_cc310
...
Cryptocell RSA improvements to sign/verify more digest types
2019-12-31 09:19:25 -08:00
David Garske
bff6dcec24
Added support for AAD calc only. Allows Init, UpdateAad and Final sequence. Verfied again with customer test cases.
2019-12-31 08:25:23 -08:00
David Garske
f01999b322
Peer review feedback.
2019-12-31 08:08:33 -08:00
David Garske
b901a2cd35
Use byte for bit-field. Line length cleanup.
2019-12-30 18:05:25 -08:00
toddouska
4f71bcfa7c
Merge pull request #2704 from ejohnstown/renegotiation
...
Maintenance: Renegotiation
2019-12-30 16:45:31 -08:00
Tesfa Mael
f58a9e81e9
Cryptocell rsa improvements to sign/verify more digest types
2019-12-30 16:31:30 -08:00
David Garske
1ee9d182cf
New API's for ChaCha20/Poly1305 AEAD init/update/final:
...
* Provides a context for AEAD to allow "chunked" updates of data then a final calculation for the authentication tag.
* New API's are on by default and can be disabled using NO_CHACHAPOLY_AEAD_IUF.
2019-12-30 15:20:55 -08:00
toddouska
abc96f20fb
Merge pull request #2696 from embhorn/cert_vfy_CB
...
CertManager verify callback
2019-12-30 11:57:44 -08:00
Juliusz Sosinowicz
1bf6eb466f
CRL extensions are optional so ext errors should be skipped
2019-12-30 19:08:59 +01:00
Tesfa Mael
4004963c6a
test pkey references count
2019-12-30 09:31:23 -08:00
David Garske
f51d940e34
Fix for ECC memory leak when using ATECC and non SECP256R1 curves for sign, verify or shared secret. Fixes #2701 .
2019-12-30 08:35:30 -08:00
toddouska
3b7b71c9e0
Merge pull request #2700 from JacobBarthelmeh/HardwareAcc
...
Hardware calls for DSP use
2019-12-27 13:58:43 -08:00
toddouska
deac82c8ed
Merge pull request #2683 from dgarske/various_items
...
Various cleanups and fixes
2019-12-27 13:53:39 -08:00
toddouska
95daec5326
Merge pull request #2633 from tmael/cc_310
...
Update Cryptocell readme
2019-12-27 12:58:19 -08:00
toddouska
78fa84be00
Merge pull request #2649 from SparkiDev/rsa_pubonly
...
Fix RSA public key only builds
2019-12-27 12:55:34 -08:00
toddouska
dd28f26c44
Merge pull request #2699 from JacobBarthelmeh/Testing
...
big endian changes
2019-12-27 12:52:30 -08:00
Juliusz Sosinowicz
38f466bdfe
Keep untrustedDepth = 0 for self signed certs
2019-12-27 17:48:34 +01:00
John Safranek
add7cdd4e2
Maintenance: Renegotiation
...
1. Found a corner case where secure renegotiation would fail trying to
inappropriately use a session ticket.
2. Explicitly split renegotiation into Rehandshake and SecureResume.
2019-12-26 16:39:44 -08:00
David Garske
e8afcbf031
Merge pull request #2702 from embhorn/spelling
...
Correct misspellings and typos from codespell tool
2019-12-26 08:19:20 -08:00
Eric Blankenhorn
8580bd9937
CertManager verify callback
...
Execute verify callback from wolfSSL_CertManagerLoadCA
2019-12-26 09:29:03 -06:00
JacobBarthelmeh
ac0acb3c37
fix for test case with big endian
2019-12-26 05:57:26 -07:00
Eric Blankenhorn
b83804cb9d
Correct misspellings and typos from codespell tool
2019-12-24 12:29:33 -06:00
JacobBarthelmeh
ad9011a863
initial DSP build and success with Debug mode
...
build dps with ARM neon 64
fix for release mode build
add in threading protection and seperate out rng
added callback function and updates to README
update default handle to lock, and add finished handle call
cleanup after veiwing diff of changes
2019-12-23 14:17:58 -07:00
JacobBarthelmeh
5348ecb1f2
initial makefile and build with hexagon
2019-12-23 13:49:06 -07:00
JacobBarthelmeh
ca59bc2d16
big endian changes
2019-12-23 12:33:59 -07:00
Tesfa Mael
99a7aff31e
Increment pkey references count
2019-12-20 22:38:54 -08:00
Tesfa Mael
48e59eaeb1
Free EVP ctx pkey
2019-12-20 22:38:54 -08:00
toddouska
3f13b49fa3
Merge pull request #2695 from JacobBarthelmeh/Release
...
prepare for release v4.3.0
2019-12-20 11:10:34 -08:00
Jacob Barthelmeh
e1433867ce
fix for expected nightly config test report
2019-12-20 09:46:12 -07:00
Jacob Barthelmeh
5675a2b3c5
prepare for release v4.3.0
2019-12-20 08:43:34 -07:00
Sean Parkinson
9d94b48056
Add blinding of mod inverse to RSA key gen
2019-12-20 12:17:42 +10:00
toddouska
45d55c8f38
Merge pull request #2676 from SparkiDev/sp_cortexm_perf
...
Improve Cortex-M RSA/DH assembly code performance
2019-12-19 15:03:59 -08:00
John Safranek
6c7e86f366
Maintentance: DTLS
...
1. Client wasn't skipping a handshake state when the server sends a
hello without a hello verify. It ended up resetting the handshake hash
and resending Hello with its next messages.
2019-12-19 11:48:05 -08:00
toddouska
51f956490f
Merge pull request #2661 from SparkiDev/parse_cert_rel_fixes
...
Cleanup ParseCertRelative code
2019-12-19 11:03:56 -08:00
toddouska
3342a19e29
Merge pull request #2578 from cariepointer/ZD-9478-and-9479
...
Add sanity checks for parameters in wc_scrypt and wc_Arc4SetKey
2019-12-19 10:59:05 -08:00
David Garske
2aa8fa2de6
Merge pull request #2688 from kaleb-himes/GH2552
...
use const to declare array rather than variable sz - VS doesn't like …
2019-12-19 08:52:30 -08:00
JacobBarthelmeh
e10ace21df
Merge pull request #2690 from SparkiDev/sp_int_fixes_1
...
Fix SP to build for different configurations
2019-12-19 08:52:52 -07:00
Sean Parkinson
36f697c93d
Fix SP to build for different configurations
...
Was failing:
--enable-sp --enable-sp-math
--enable-sp --enable-sp-math --enable-smallstack
2019-12-19 15:15:19 +10:00
kaleb-himes
95c0c1f2a5
use const to declare array rather than variable sz - VS doesn't like this
2019-12-18 16:08:26 -08:00
Sean Parkinson
64a1045dc3
Cleanup ParseCertRelative code
...
Fix for case:
- can't find a signer for a certificate with the AKID
- find it by name
Has to error as the signer's SKID is always set for signer and would
have matched the AKID.
Simplify the path length code - don't look up CA twice.
Don't require the tsip_encRsaKeyIdx field in DecodedCert when
!WOLFSSL_RENESAS_TSIP - use local variable.
2019-12-19 08:53:24 +10:00
toddouska
6922d7031c
Merge pull request #2685 from embhorn/coverity_fixes
...
Coverity fixes
2019-12-18 14:06:48 -08:00
toddouska
531fedfbb4
Merge pull request #2687 from ejohnstown/dtls-cap
...
DTLS Handshake Message Cap
2019-12-18 13:50:52 -08:00
David Garske
031e78e103
Merge pull request #2606 from kaleb-himes/DOCS_UPDATE_19_NOV_2019
...
Add dox documentation for wc_ecc_make_key_ex
2019-12-18 13:49:57 -08:00
toddouska
0057eb16f8
Merge pull request #2686 from ejohnstown/crl-skid
...
Check name hash after matching AKID for CRL
2019-12-18 13:48:59 -08:00
toddouska
573d045437
Merge pull request #2682 from SparkiDev/akid_name_check
...
Check name hash after matching AKID
2019-12-18 13:08:19 -08:00
David Garske
c054293926
Merge pull request #2684 from JacobBarthelmeh/build-tests
...
fix for g++ build warning
2019-12-18 12:09:29 -08:00
Eric Blankenhorn
52893877d7
Fixes from review
2019-12-18 13:25:25 -06:00
John Safranek
6c6d72e4d6
Find CRL Signer By AuthKeyId
...
When looking up the signer of the CRL by SKID/AKID, also verify that the
CRL issuer name matches the CA's subject name, per RFC 5280 section 4.1.2.6.
2019-12-18 10:17:51 -08:00
kaleb-himes
2607cf3429
Fix up based on peer feedback
2019-12-18 10:55:20 -07:00
toddouska
5a04ee0d8b
Merge pull request #2640 from dgarske/alt_chain
...
Fixes for Alternate chain processing
2019-12-18 09:38:45 -08:00
toddouska
b89121236f
Merge pull request #2635 from dgarske/async_date
...
Fix for async date check issue
2019-12-18 09:34:08 -08:00
toddouska
74a8fbcff4
Merge pull request #2666 from SparkiDev/b64_dec_fix
...
Bade64_Decode - check out length (malformed input)
2019-12-18 09:30:41 -08:00
toddouska
c2e5991b50
Merge pull request #2681 from ejohnstown/crl-skid
...
Find CRL Signer By AuthKeyId
2019-12-18 09:29:17 -08:00
Jacob Barthelmeh
b5f645ea00
fix for g++ build warning
2019-12-18 10:01:52 -07:00
David Garske
22f0b145d3
Various cleanups and fixes:
...
* Fix for key gen macro name in benchmark.c
* Fix for possible RSA fall-through warning.
* Fix for building `WOLFSSL_STM32_PKA` without `HAVE_ECC`.
* Added option to build RSA keygen without the DER to PEM using `WOLFSSL_NO_DER_TO_PEM`.
* Added options.h includes for test.c and benchmark.c.
* Added printf warning on the math size mismatch in test.c.
* Added support for benchmarking larger sizes.
* TLS benchmarks for HiFive unleashed.
2019-12-18 07:09:26 -08:00
David Garske
b126802c36
Clarify logic for skipping call to AddCA.
2019-12-18 06:04:26 -08:00
Sean Parkinson
c1218a541b
Check name hash after matching AKID
...
RFC 5280, Section 4.1.2.6:
If the subject is a CA (e.g., the basic constraints extension, as
discussed in Section 4.2.1.9, is present and the value of cA is TRUE),
then the subject field MUST be populated with a non-empty distinguished
name matching the contents of the issuer field (Section 4.1.2.4) in all
certificates issued by the subject CA.
The subject name must match - even when the AKID matches.
2019-12-18 17:57:48 +10:00
Sean Parkinson
6ccd146b49
Bade64_Decode - check out length (malformed input)
2019-12-18 17:06:58 +10:00
Tesfa Mael
69a0c1155f
Review comment
2019-12-17 17:36:38 -08:00
John Safranek
ef6938d2bc
DTLS Handshake Message CAP
...
Cap the incoming DTLS handshake messages size the same way we do for
TLS. If handshake messages claim to be larger than the largest allowed
certificate message, we error out.
2019-12-17 16:55:58 -08:00
toddouska
7e74d02da5
Merge pull request #2677 from SparkiDev/p12_pbkdf_tmp_fix
...
PKCS#12 PBKDF - maximum tmp buffer size
2019-12-17 16:48:08 -08:00
toddouska
ff026efe49
Merge pull request #2670 from SparkiDev/dec_pol_oid_fix
...
DecodePolicyOID - check out index
2019-12-17 16:47:36 -08:00
toddouska
892e951c8a
Merge pull request #2669 from SparkiDev/name_joi_fix
...
Decode X.509 name - check input length for jurisdiction
2019-12-17 16:46:30 -08:00
toddouska
435d4bf427
Merge pull request #2658 from SparkiDev/asn_date_check
...
Check ASN date characters are valid
2019-12-17 16:39:35 -08:00
toddouska
f81ce71c25
Merge pull request #2660 from JacobBarthelmeh/Compatibility-Layer
...
add --disable-errorqueue option
2019-12-17 16:37:02 -08:00
toddouska
06563ed3fa
Merge pull request #2642 from SparkiDev/sp_exptmod
...
sp_int: support for more values in sp_exptmod
2019-12-17 16:36:12 -08:00
John Safranek
037c319bab
Find CRL Signer By AuthKeyId
...
1. Add parsing of CRL extensions, specifically the Auth Key ID extension.
2. To verify CRL, search for CA signer by AuthKeyId first, then by name. If NO_SKID is set, just use name.
3. Update the ctaocrypt settings.h for the NO_SKID option with CRL so FIPS builds work.
2019-12-17 15:33:39 -08:00
toddouska
feeb18600f
Merge pull request #2636 from SparkiDev/mp_exptmod_fixes
...
Handle more values in fp_exptmod
2019-12-17 15:22:24 -08:00
toddouska
138377f30e
Merge pull request #2641 from SparkiDev/sp_c32_lshift
...
Fix lshift in SP 32-bit C code - FFDHE
2019-12-17 15:17:17 -08:00
toddouska
5ee9f9c7a2
Merge pull request #2637 from SparkiDev/ecc_cache_resist
...
Improve wc_ecc_mulmod_ex cache attack resistance
2019-12-17 15:16:16 -08:00
toddouska
028d9e5443
Merge pull request #2634 from SparkiDev/pkcs7_libz_fix
...
Fix missing variable declaration
2019-12-17 15:13:13 -08:00
David Garske
a176789f13
Fix for async issue with "badDate" and "criticalExt" check getting skipped on call to ConfirmSignature with WC_PENDING_E response. Added log message when date failure is skipped.
2019-12-17 15:03:00 -08:00
toddouska
06e5e81b1b
Merge pull request #2663 from embhorn/zd5050
...
Clarify wolfSSL_shutdown error on subsequent calls
2019-12-17 14:59:35 -08:00
Carie Pointer
5711d12364
Remove SSL_library_init() calls in unit tests to fix valgrind issues
2019-12-17 15:54:10 -07:00
Eric Blankenhorn
774a758f59
Fixes in test and example code
2019-12-17 15:56:40 -06:00
toddouska
ab14a26be0
Merge pull request #2650 from dgarske/boot_tpm
...
Fix API visibility for ED25519 check key
2019-12-17 13:45:39 -08:00
Carie Pointer
cfd91fb0b8
Add check for length == 0 in wc_Arc4SetKey
2019-12-17 13:28:50 -07:00
David Garske
e8594daab6
Merge pull request #2678 from tmael/night_valgrind
...
Fix memory leak detected with Valgrind
2019-12-17 09:11:30 -08:00
Tesfa Mael
88188b79e2
Fix mem leak
2019-12-16 18:03:11 -08:00
Sean Parkinson
8d7d2c74ee
PKCS#12 PBKDF - maximum tmp buffer size
...
Use WC_MAX_BLOCK_SIZE - only an issue if PBKDF is using SHA-3
algorithms.
2019-12-17 09:56:08 +10:00
Sean Parkinson
a71eb11b38
Improve Cortex-M RSA/DH assembly code performance
...
Performance of modular exponentiation improved by about 30%.
2019-12-17 09:03:34 +10:00
David Garske
8d8ab655fa
Merge pull request #2671 from ejohnstown/maint-conf
...
Maintenance: Configure
2019-12-16 13:38:02 -08:00
Chris Conlon
c0716b9e3f
Merge pull request #2673 from Naruto/feature/fix_readme_miss
...
fix spell miss of zephyr README.md
2019-12-16 12:31:55 -07:00
Eric Blankenhorn
af5c98a6a8
Fixes in wolfCrypt test
2019-12-16 10:22:42 -06:00
Naruto TAKAHASHI
7fbadeaa17
fix spell miss of zephyr README.md
2019-12-16 21:36:43 +09:00
Eric Blankenhorn
0bb8ae8564
Fixes for new defects in wolfCryot and wolfSSL (excluding test code)
2019-12-13 17:17:13 -06:00
David Garske
f2115b2c2b
Merge pull request #2652 from ejohnstown/maintenance-error
...
Maintenance: Error Strings
2019-12-13 15:03:32 -08:00
John Safranek
0348123261
Maintenance: Configure
...
1. Remove some redundant AM_CONDITIONAL macros checking for OCSP and CRL.
2. Moved the AM_CONDITIONAL macro setting BUILD_PKCS12 to the other AM_CONDITIONALS.
2019-12-13 15:02:03 -08:00
Chris Conlon
1a594d92ba
Merge pull request #2668 from ejohnstown/maintenance-scanbuild
...
Fixed a couple initialization issues scan-build indicated
2019-12-13 14:13:48 -07:00
Sean Parkinson
6a2975c742
DecodePolicyOID - check out index
2019-12-13 12:13:38 +10:00
Sean Parkinson
b3cbab4bf3
Decode X.509 name - check input length for jurisdiction
2019-12-13 11:55:15 +10:00
John Safranek
e7af2d2ba9
Fixed a couple initialization issues scan-build indicated.
2019-12-12 16:50:37 -08:00
John Safranek
a3cc2aa6ff
Merge pull request #2665 from kaleb-himes/ZD-9590-CCM-Benchmarking
...
Add CCM Decryption to benchmarking
2019-12-12 16:48:12 -08:00
Sean Parkinson
e063fb1631
sp_int.c: Strip leading zeros in sp_read_radix
2019-12-13 09:08:55 +10:00
kaleb-himes
0a38d7c178
Add CCM Decryption to benchmarking
2019-12-12 13:53:30 -07:00
Eric Blankenhorn
51d5abd63f
Clarify wolfSSL_shutdown error on subsequent calls
2019-12-12 13:16:52 -06:00
Sean Parkinson
adc14f7552
sp_int: Check size of numbers for overflow
2019-12-12 18:36:23 +10:00
Jacob Barthelmeh
2e5258fe15
add --disable-errorqueue option
2019-12-11 11:19:58 -07:00
Sean Parkinson
dffb59ea52
sp_int: support for more values in sp_exptmod and fix
...
SP C - fix mont reduce with fast mul_add
2019-12-11 11:10:18 +10:00
toddouska
093a31ed49
Merge pull request #2655 from kaleb-himes/ZD-9592
...
Remove forcing NO_SKID on unsuspecting CRL users
2019-12-10 16:33:16 -08:00
Carie Pointer
c66ca1b774
Remove unused dNSName malloc from wolfSSL_X509_get_ext_d2i
2019-12-10 17:00:16 -07:00
Sean Parkinson
05dafd0adb
Check ASN date characters are valid
2019-12-11 09:22:26 +10:00
John Safranek
74e54393ab
Remove a bitfield indicator from a structure member that didn't require it.
2019-12-10 13:17:30 -08:00
Carie Pointer
b08d180bc9
WOLFSSL_DH redefined error fix
2019-12-09 16:13:18 -07:00
Carie Pointer
4511557f01
More jenkins test fixes
2019-12-09 15:57:53 -07:00
kaleb-himes
2b66a9f1ec
Address reviewed items
2019-12-09 14:44:59 -07:00
Carie Pointer
9ad970d8a4
Fixes for jenkins test failures
2019-12-09 14:04:52 -07:00
kaleb-himes
e8c7d6f818
Account for ASN disabled
2019-12-07 05:06:41 -07:00
kaleb-himes
bbdf0d101f
Improve Decoded CRL initialization
2019-12-07 04:23:02 -07:00
kaleb-himes
072fe8fd6d
More complete fix for removing NO_SKID condition as default with CRL enabled
2019-12-07 03:39:57 -07:00
tmael
8450c4ae39
Merge pull request #2643 from ejohnstown/maintenance-prime
...
Maintentance: Prime
2019-12-06 18:50:51 -08:00
JacobBarthelmeh
05e672428d
Merge pull request #2645 from cconlon/cmsrsacb
...
CMS SignedData RSA sign callback for raw digest
2019-12-06 17:13:32 -07:00
Carie Pointer
ee13dfd878
Add Qt 5.12 and 5.13 support
...
Co-Authored-By: aaronjense <aaron@wolfssl.com >
Co-Authored-By: MJSPollard <mpollard@wolfssl.com >
Co-Authored-By: Quinn Miller <quinnmiller1997@users.noreply.github.com >
Co-Authored-By: Tim Parrish <timparrish@users.noreply.github.com >
2019-12-06 14:27:01 -07:00
Chris Conlon
6081bdaad6
free PKCS7 before creating new in API test
2019-12-06 12:00:33 -07:00
John Safranek
19a4371d48
Maintenance: Error Strings
...
1. One of the error string was >80 bytes long. Shortened it.
2. The function that copies an error string to an output array needs to
ensure the string is still null terminated.
3. Added a check to the wolfCrypt test to see that error strings aren't
>= 80 bytes long.
2019-12-06 09:53:39 -08:00
Chris Conlon
b4f67dabcf
Merge pull request #2647 from kojo1/SN-size
...
EXTERNAL_SERIAL_SIZE to build option
2019-12-06 09:13:07 -07:00
David Garske
b28f6aeb34
Work to support wolfBoot with wolfTPM. Fix missing visibility marker for wc_ed25519_check_key.
2019-12-06 06:53:23 -08:00
Sean Parkinson
2528121925
Fix RSA public key only builds
...
Client side only and no client auth
2019-12-06 20:42:27 +10:00
Takashi Kojo
87ec950221
Rollback the define in internal.h
2019-12-06 10:31:28 +09:00
toddouska
9fd5628148
Merge pull request #2631 from SparkiDev/mp_invmod_fix
...
mp_invmod handles more inputs
2019-12-05 16:21:33 -08:00
toddouska
7e391f0fd5
Merge pull request #2629 from SparkiDev/dsa_blinding
...
Blinding for DSA sign
2019-12-05 16:20:21 -08:00
toddouska
4b31a180c8
Merge pull request #2626 from SparkiDev/sp_invmod_fixes
...
Fix sp_invmod to handle more input values
2019-12-05 16:18:55 -08:00
toddouska
8cc4c62c14
Merge pull request #2625 from SparkiDev/set_ser_num_2
...
Support 20-byte serial numbers and disallow 0.
2019-12-05 16:17:54 -08:00
toddouska
bd8a612d6c
Merge pull request #2624 from ejohnstown/maintenance-ASN1
...
Maintenance: ASN.1
2019-12-05 16:16:42 -08:00
toddouska
7ec448ac0c
Merge pull request #2617 from embhorn/zd9553
...
Fix for vasprintf with AIX
2019-12-05 16:15:24 -08:00
toddouska
7631fdafa1
Merge pull request #2612 from SparkiDev/sp_div_small_a
...
sp_div improved to handle when a has less digits than d
2019-12-05 16:14:05 -08:00
toddouska
6d40c20f2c
Merge pull request #2609 from JacobBarthelmeh/Compatibility-Layer
...
Fix for EVP CipherUpdate decrypt and add test case
2019-12-05 16:12:26 -08:00
toddouska
312d5c98b3
Merge pull request #2535 from julek-wolfssl/nginx-1.15
...
Nginx 1.15.0 & 1.16.1
2019-12-05 14:40:45 -08:00
toddouska
a13ebf5258
Merge pull request #2543 from embhorn/zd5706
...
Update DoVerifyCallback to check verify param hostName and ipasc
2019-12-05 14:38:47 -08:00
Takashi Kojo
d74a1888bb
move it to build option
2019-12-06 06:28:25 +09:00
John Safranek
2c0fda4168
Maintentance: Prime
...
1. Revisited the option enables around the wolfCrypt prime test. Added a
check for key generation to the check for public MP.
2019-12-05 12:23:42 -08:00
Tesfa Mael
4f8a37ef7b
Remove wc_RsaSSL_VerifyInline from Cryptocell
2019-12-05 10:40:21 -08:00
Chris Conlon
be97444d24
add api test for wc_PKCS7_SetRsaSignRawDigestCb()
2019-12-05 10:33:49 -07:00
Chris Conlon
2063fa502f
add CMS RSA sign callback for raw digest
2019-12-05 10:33:49 -07:00
Sean Parkinson
0552fbc5de
Fix lshift in SP 32-bit C code - FFDHE
2019-12-05 09:08:30 +10:00
David Garske
9b437384de
Allow AddCA for root CA's over the wire that do not have the extended key usage cert_sign set.
2019-12-04 14:14:37 -08:00
David Garske
b01c558adb
Fix to not send alert until after the verify cert callback and alternate chain logic has been evaluated.
2019-12-04 12:41:23 -08:00
David Garske
acd4bc3305
Added logging for SendAlert call.
2019-12-04 11:02:22 -08:00
John Safranek
44fc3e14b1
Maintenance: ASN.1
...
1. Fix some preprocessor flag checking for function EncodePolicyOID. It
also needs to be available for OpenSSL Compatibility.
2. Fix for a name string for a test that can get left in or out
incorrectly.
2019-12-04 10:26:37 -08:00
David Garske
3646051434
Fix for alternate chain logic where presented peer's CA could be marked as trusted.
...
When building with `WOLFSSL_ALT_CERT_CHAINS` a peer's presented CA could be incorrectly added to the certificate manager, marking it as trusted.
Began in PR #1934
ZD 9626
2019-12-04 06:56:36 -08:00
Sean Parkinson
2a0c037f98
Improve wc_ecc_mulmod_ex cache attack resistance
2019-12-04 11:08:28 +10:00
Sean Parkinson
c5f9a601e8
Handle more values in mp_exptmod
...
Handle prime (modulus) of 0 and 1.
Handle exponent of 0.
Fix for base of 0 in fp_exptmod and hadnle base of 0 in mp_exptmod.
fp_exptmod - Don't modify X's sign during operation when passed in as negative.
2019-12-04 09:32:08 +10:00
Sean Parkinson
fd4fb28a2e
Fix missing variable declaration
...
--enable-scep --with-libz
PKCS#7 decompress code
2019-12-03 11:07:29 +10:00
Sean Parkinson
b9a82204e2
Blinding for DSA sign
2019-12-03 09:36:33 +10:00
Tesfa Mael
889f111454
Update CC readme
2019-12-02 14:55:21 -08:00
David Garske
7e45ae2ec6
Merge pull request #2621 from JacobBarthelmeh/SanityChecks
...
sanity check on "a" input to invmod
2019-12-02 10:57:01 -08:00
Jacob Barthelmeh
2efa91632e
revert adding import check in configure.ac
2019-12-02 08:56:00 -07:00
David Garske
bfaa970d84
Merge pull request #2628 from tmael/nightly_valgrind
...
Fix Valgrind Known Configs Test
2019-11-29 08:59:58 -08:00
Sean Parkinson
204045223f
Fix sp_invmod to handle more input values
2019-11-29 11:54:36 +10:00
Sean Parkinson
bd7a572a8f
mp_invmod handles more inputs
...
Value to invert: a
Modulus: b
integer.c - normal math
- a is one, or a mod b is one
tfm.c - fast math
- b is -ve (error), or b is zero
- a is zero or a mod b is zero
2019-11-29 09:08:44 +10:00
David Garske
f0c070b2cf
Merge pull request #2630 from SparkiDev/poly1305_avx2_fix
...
Poly1305 AVX2 asm fix
2019-11-28 09:28:22 -08:00
Sean Parkinson
06ca07c79f
Poly1305 AVX2 asm fix
...
Missed carry when converting from 26 in 64 bits to 64 in 64 bits.
2019-11-28 16:01:29 +10:00
Sean Parkinson
16ac0d8eb6
Support 20-byte serial numbers and disallow 0.
2019-11-28 10:21:48 +10:00
Sean Parkinson
245a2b7012
sp_int: clamp more results
2019-11-28 10:01:54 +10:00
Sean Parkinson
dadbeff433
sp_int: When setting digit of 0, set used to 0
2019-11-28 10:01:54 +10:00
Sean Parkinson
2ac0ac8776
Fix for sp_div when a > d but same bit length
2019-11-28 10:01:54 +10:00
Sean Parkinson
8315ae892f
sp_div improved to handle when a has less digits than d
2019-11-28 10:01:54 +10:00
toddouska
b396ed0984
Merge pull request #2627 from SparkiDev/rsa_sign_vfy
...
Change signature generation to verify by default
2019-11-27 14:08:07 -08:00
toddouska
e1ebb39296
Merge pull request #2618 from ejohnstown/maintenance-prime
...
Maintenance: Prime
2019-11-27 14:06:23 -08:00
toddouska
ff85cc7740
Merge pull request #2622 from SparkiDev/ber_to_der_rework
...
Rework BER to DER to not be recursive
2019-11-27 14:05:36 -08:00
Eric Blankenhorn
1026c4359d
Cast XMALLOC
2019-11-27 14:47:48 -06:00
Tesfa Mael
acdfc514b3
Use memset initialize
2019-11-27 11:09:57 -08:00
John Safranek
cc722468be
Maintenance: ASN.1
...
1. Add an additional check in GetCertHeader() to see that sigIndex is
bounded by maxIdx.
2019-11-27 10:43:51 -08:00
Eric Blankenhorn
806db8096c
Replace use of vasprintf
2019-11-27 11:00:28 -06:00
Juliusz Sosinowicz
b06cee333c
Add error on EOF
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
29a8262ea4
Only test X509_NAME_print_ex when defines enabled
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
0f4a002f4f
Formatting
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
9be1b4cfd8
Remove tabs
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
944d5e1045
Don't count null char in better way
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
7c1a1dfd1f
Variable declaration at start of scope
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
308c5f3370
Fix implicit cast
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
5f39e12b21
Fix leak in SSL_CTX_set0_chain
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
8dde06bbca
Fix compile errors
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
dd07344499
SSL_SESSION_dup
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
3c9d191a5b
Don't propogate ASN_NO_PEM_HEADER from wolfSSL_load_client_CA_file
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
1962159d89
more NGINX defines
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
b71758895e
Add support for SSL_CTX_set0_chain
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
b7913116c0
Remove redeclaration
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
9fbc167d0c
Declare at start of scope
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
d9ab0c4bcb
Check bounds
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
ea5ac675ed
WIP
2019-11-27 17:46:15 +01:00
Juliusz Sosinowicz
f0abd4ea82
WIP
2019-11-27 17:45:49 +01:00
Juliusz Sosinowicz
9064de1e75
Set proper WOLFSSL_ASN1_TIME in thisupd and nextupd in wolfSSL_OCSP_resp_find_status
2019-11-27 17:45:49 +01:00
Juliusz Sosinowicz
31c0abd610
wolfSSL_X509_NAME_print_ex should not put the null terminator in the BIO
2019-11-27 17:45:49 +01:00
Juliusz Sosinowicz
de3c11d55c
opensslall required
2019-11-27 17:45:49 +01:00
Juliusz Sosinowicz
a892f2a95a
Changes for nginx 1.15
...
- ssl.c: add to check to overwrite existing session ID if found
- evp.c: wolfSSL_EVP_DecryptFinal* was checking for wrong value
2019-11-27 17:45:49 +01:00
Tesfa Mael
2e487a2463
Init uninitialised values
2019-11-27 07:46:33 -08:00
Sean Parkinson
23878512c6
Change signature generation to verify by default
2019-11-27 10:47:03 +10:00
Sean Parkinson
776f4af7f6
Rework BER to DER to not be recursive
2019-11-27 10:20:32 +10:00
toddouska
1b63ab0e73
Merge pull request #2623 from SparkiDev/set_ser_rand
...
Generating serial number - clear top bit
2019-11-26 16:14:54 -08:00
John Safranek
2de52c7666
Maintenance: Prime
...
When returning a result from mp_prime_is_prime for normal math, the
result should be MP_YES or MP_NO, not a bare number (1 or 0).
2019-11-26 15:44:30 -08:00
toddouska
7cb5fe5e2a
Merge pull request #2620 from tmael/ALPN_input
...
Fix alpn buffer overrun
2019-11-26 15:31:56 -08:00
toddouska
57df5c10c9
Merge pull request #2619 from dgarske/async_mem
...
Fix for Intel QuickAssist asynchronous build
2019-11-26 15:29:04 -08:00
toddouska
0d69950d07
Merge pull request #2615 from SparkiDev/mp_exptmod_neg_p
...
Handle negative modulus with negative exponent in exptmod
2019-11-26 15:20:54 -08:00
toddouska
95c9dc9fe8
Merge pull request #2614 from ejohnstown/maintenance-OCSP
...
Maintenance: OCSP
2019-11-26 15:19:27 -08:00
toddouska
9b7cd6bdfd
Merge pull request #2613 from tmael/evp_aes_gcm
...
Set default IV length for EVP aes gcm
2019-11-26 15:18:27 -08:00
toddouska
5d41ef171c
Merge pull request #2610 from ejohnstown/maintenance-DTLS
...
Maintenance: DTLS
2019-11-26 15:17:22 -08:00
toddouska
9ecafa7afe
Merge pull request #2557 from tmael/cert_store_ls_x509
...
Retrieve a stack of X509 certs
2019-11-26 15:16:09 -08:00
John Safranek
55540c6bd3
Replace a compile option check around some filenames for certificate testing.
2019-11-25 16:13:01 -08:00
John Safranek
1ac0b1fc0b
Maintenance: ASN.1
...
1. Undo an earlier change with respect to parsing a long length with
length zero. If BerToDer is disabled, this will be treated as a zero
length. With BerToDer enabled, the conversion will do the right thing.
2019-11-25 16:08:32 -08:00
John Safranek
5e0ca866df
Maintenance: ASN.1
...
1. For certificates, when copying a member of a container, one shouldn't read
beyond the enclosing context.
2019-11-25 16:08:32 -08:00
John Safranek
d389133f33
Maintenance: ASN.1
...
1. Update the ParseCRL function to always obey the length value of a tag.
2019-11-25 16:08:31 -08:00
John Safranek
9753bf627b
Maintenance: ASN.1
...
1. Remove the function Word32ToString and replace with calls to
XSNPRINTF().
2. Simplify DecodePolicyOID(), which converts an ASN.1 OID to a text
string in the form a.b.ccccc.d... Return an error if it gets too long.
2019-11-25 16:08:26 -08:00
Jacob Barthelmeh
7c3a4a1975
update comment to reflect new sanity check
2019-11-25 10:57:09 -07:00
Jacob Barthelmeh
316b8b0b4d
add early return to normal math and WOLFSSL_VALIDATE_ECC_IMPORT to enable-all and enable-fpecc builds
2019-11-25 10:47:08 -07:00
Sean Parkinson
6325269236
Generating serial number - clear top bit
...
If the top bit is set then the encoding routine will drop a byte of the
serial number.
Better to ensure number is positive, top bit clear, and use as much of
the serial number data as possible.
2019-11-25 15:36:11 +10:00
Jacob Barthelmeh
9a0a48e093
sanity check on "a" input to invmod
2019-11-22 15:47:05 -07:00
Tesfa Mael
8bc3b7df35
Free x509
2019-11-22 14:31:59 -08:00
Eric Blankenhorn
dc25b79db6
Fix from review
2019-11-22 15:10:13 -06:00
John Safranek
3432a8a1fc
Maintenance: Prime
...
1. Prime test should return NO for 1. (ex function, normal math and fast
math)
2. Call mp_init() on the k value for the primality test case in the
wolfCrypt test.
2019-11-22 13:02:59 -08:00
John Safranek
481da3dcc1
Maintenance: Prime
...
1. Added a test case for checking "1" as a prime number to the wolfCrypt
test.
2. Allow the wolfCrypt prime test for SP builds.
3. Modify the prime test to use mp_mul rather than mp_mul_d, as the SP
math library doesn't export sp_mul_d.
2019-11-22 11:39:19 -08:00
Tesfa Mael
cf127ec05f
Fix buffer overrun
2019-11-22 10:33:17 -08:00
David Garske
be88bce36d
Fix for issues with wolfSSL_OBJ_nid2sn and wc_OBJ_sn2nid and logic finding max item when WOLFSSL_CUSTOM_CURVES and ECC_CACHE_CURVE are defined. Improvements to wolfSSL_EC_get_builtin_curves to avoid using "min" as variable name and eliminate using a local static.
2019-11-22 10:09:10 -08:00
John Safranek
0a924af894
Maintenance: Prime
...
1. Prime test should return NO for 1. (sp math)
2019-11-22 10:01:21 -08:00
David Garske
ffb3dfd6ec
Fixes for minor test.c build configuration issues.
2019-11-22 07:01:10 -08:00
David Garske
cdc50d7753
Revert header change in #2504 for asynchronous crypto quickassist_mem.h.
2019-11-22 05:59:57 -08:00
Sean Parkinson
50c4347748
More corner cases in tfm
...
Handle zero base in fp_exptmod better().
Handle negatives in fp_gcd().
Return FP_OKAY when writing out 0 with mp_toradix().
2019-11-22 09:56:02 +10:00
John Safranek
71943844d6
Maintenance: OCSP
...
1. Add a couple more bounds checks to wolfIO_HttpProcessResponseBuf().
2019-11-21 14:51:35 -08:00
John Safranek
452ba5b502
Maintenance: Prime
...
1. Prime test should return NO for 1. (normal math and fast math)
2019-11-21 13:49:26 -08:00
Eric Blankenhorn
b57294eff7
Fix for vasprintf with AIX
2019-11-21 12:23:15 -06:00
John Safranek
edb07cf68e
Merge pull request #2587 from guidovranken/ocsp-resp-decoder-bounds-fix
...
Properly limit array access in OCSP response decoder
2019-11-21 10:13:49 -08:00
Tesfa Mael
428d51e664
IV is set in the evp ctx level
2019-11-21 09:58:03 -08:00
toddouska
e883a2f696
Merge pull request #2611 from SparkiDev/sp_int_add_fix
...
Fix sp_add to handle carries properly
2019-11-21 08:59:09 -08:00
Sean Parkinson
f56a74b6b7
Handle negative modulus with negative exponent in exptmod
2019-11-21 14:55:13 +10:00
John Safranek
6720bc3890
Maintenance: OCSP
...
1. Add some minimum bounds checking on the HTTP responses as some can
end up being too short.
2019-11-20 17:25:03 -08:00
Tesfa Mael
f95d5eebff
Add FreeX509() to clean up when sk stack is empty
2019-11-20 17:02:13 -08:00
Tesfa Mael
6c732725b0
Test evp aes gcm with default IV length
2019-11-20 16:37:15 -08:00
toddouska
b33ce2207d
Merge pull request #2608 from SparkiDev/use_heap
...
When disabled memory, ensure all heap and types are used
2019-11-20 16:18:07 -08:00
toddouska
a2d036dcba
Merge pull request #2601 from SparkiDev/certs_exts_fix
...
ProcessPeerCerts allocating memory for exts with OPENSSL_EXTRA properly
2019-11-20 16:17:28 -08:00
Sean Parkinson
a20db0b8ad
Fix sp_add to handle carries properly
2019-11-21 09:47:17 +10:00
John Safranek
ce0136e968
Maintenance: Integers
...
In TFM and Integer, rshb() shouldn't try to shift a value that is 0.
This leads to using a negative offset to a pointer, but isn't used.
2019-11-20 13:55:57 -08:00
Jacob Barthelmeh
6f98d5d348
remove extra parentheses that clang complained about
2019-11-20 14:49:47 -07:00
John Safranek
71690fc73a
Maintenance: DTLS
...
1. Updated the window scrolling. There was a couple off-by-one errors in
the DTLS window handling. They canceled each other out, but there was a
rare case where they would shift too much.
2019-11-20 13:46:23 -08:00
John Safranek
188eb45433
Maintenance: DTLS
...
Removed redundant sequence increment when sending the Server Hello message.
2019-11-20 13:08:01 -08:00
Jacob Barthelmeh
1eb1755f07
add another evp decrypt test case
2019-11-20 12:29:22 -07:00
Jacob Barthelmeh
9880ad6926
updates to EVP_CipherUpdate for handling storage of last block
2019-11-20 11:57:06 -07:00
John Safranek
19d8ef405c
Maintenance: DTLS
...
When encrypting with AES-GCM, AES-CCM, or PolyChacha, do not increment
the DTLS sequence number. The sequence number should only be incremented
in BuildMessage. This was done because the sequence number used to be
incremented after calculating the HMAC or after the encrypt for AEAD
ciphers. The HMAC has been separated from the sequence increment.
2019-11-20 10:56:56 -08:00
Takashi Kojo
4896a48955
fix EVP_CipherUpdate padding
2019-11-20 11:49:30 -07:00
toddouska
88fb7efb8c
Merge pull request #2602 from SparkiDev/certs_exts_free
...
ProcessPeerCerts jump to error handling instead of returning
2019-11-20 09:25:48 -08:00
toddouska
2a7fb69523
Merge pull request #2604 from SparkiDev/disabled_curve_fix
...
TLS supported curve extension - validate support fix
2019-11-20 09:17:50 -08:00
toddouska
ccc8a49fcb
Merge pull request #2607 from SparkiDev/tls13_serverhello_cs
...
TLS 1.3 client detects non-TLS 1.3 cipher suite in ServerHello
2019-11-20 09:16:16 -08:00
toddouska
d5a1adab5d
Merge pull request #2605 from SparkiDev/set_ser_num
...
Added output size to SetSerialNumber
2019-11-20 09:15:36 -08:00
toddouska
1ba366920c
Merge pull request #2581 from SparkiDev/ecc_fixes_add
...
Add deterministic ECDSA sig gen. Fix corner cases for add point.
2019-11-20 09:12:28 -08:00
Tesfa Mael
f1fbabbb60
Use default 96-bits IV length when unset
2019-11-20 09:09:12 -08:00
Sean Parkinson
d441cee6fb
When disabled memory, ensure all heap and types are used
2019-11-20 17:06:42 +10:00
Sean Parkinson
917e5b0405
TLS 1.3 client detects non-TLS 1.3 cipher suite in ServerHello
2019-11-20 12:22:00 +10:00
Sean Parkinson
13c6346158
Check error returns from mp calls
2019-11-20 11:09:50 +10:00
Sean Parkinson
79b35860e0
Added output size to SetSerialNumber
...
Some internal calls were passing in output size as max number size.
2019-11-20 10:52:48 +10:00
kaleb-himes
ad3e105303
Add dox documentation for wc_ecc_make_key_ex
2019-11-19 17:06:52 -07:00
Sean Parkinson
c7f7d1b193
TLS supported curve extension - validate support fix
...
Check curve name is in range before checking for disabled
2019-11-20 09:38:06 +10:00
Tesfa Mael
62eaa27b41
Review comment, avoid double-free
2019-11-19 15:29:48 -08:00
toddouska
1a3455110e
Merge pull request #2599 from dgarske/cleanup_script
...
Useful script to cleanup test files created
2019-11-19 11:59:50 -08:00
toddouska
5c4da3e6fa
Merge pull request #2598 from dgarske/max_file_sz
...
Improvements to file size checks
2019-11-19 11:59:21 -08:00
toddouska
5de27443d0
Merge pull request #2596 from dgarske/mqx_fio_cleanup
...
Support for MQX 5.0 and cleanup of the MQX includes
2019-11-19 11:49:03 -08:00
David Garske
7b160a8cf3
Make MAX_WOLFSSL_FILE_SIZE overridable.
2019-11-19 07:46:50 -08:00
David Garske
9a4614f6e1
Fix for possible uninitialized memSz in bio.c
2019-11-19 05:35:22 -08:00
David Garske
e7bff37421
Add settings.h build macro note.
2019-11-19 05:33:59 -08:00
Sean Parkinson
1b8f136d29
ProcessPeerCerts jump to error handling instead of returning
2019-11-19 13:17:29 +10:00
Sean Parkinson
f08dfb4afc
ProcessPeerCerts allocating memory for exts with OPENSSL_EXTRA properly
2019-11-19 13:03:20 +10:00
toddouska
e6292eca9c
Merge pull request #2597 from ejohnstown/octeon-global
...
Sync OCTEON Sniffer
2019-11-18 17:06:30 -08:00
toddouska
c6dac64438
Merge pull request #2594 from ejohnstown/maintenance-BLAKE2
...
Maintenance BLAKE2
2019-11-18 17:05:01 -08:00
John Safranek
fea1f1d6e5
Maintenance: ASN.1
...
1. Reject as an error any ASN.1 length value that is multibyte of length 0.
2019-11-18 17:02:19 -08:00
toddouska
7a5c8f4e07
Merge pull request #2584 from SparkiDev/sp_rsa4096
...
SP now has support for RSA/DH 4096-bit operations
2019-11-18 15:38:47 -08:00
toddouska
b646b7258b
Merge pull request #2585 from dgarske/webrtc_m79
...
Support for Google WebRTC (ref m79)
2019-11-18 15:33:49 -08:00
toddouska
20c82f3c4b
Merge pull request #2586 from dgarske/STM32_HW
...
STM32 Crypto hardware fixes and improvements
2019-11-18 15:22:19 -08:00
toddouska
90f7a96721
Merge pull request #2593 from ejohnstown/maintenance-DH
...
Maintenance: DH
2019-11-18 15:18:16 -08:00
toddouska
12dfe027ed
Merge pull request #2595 from dgarske/hmac_devid
...
Adds PBKDF2 and Hash wrapper heap ctx and crypto callback support
2019-11-18 15:16:19 -08:00
Tesfa Mael
74dd142a51
Review comment
2019-11-18 15:13:59 -08:00
David Garske
abee442c1e
Useful script to cleanup test files created.
2019-11-18 15:08:54 -08:00
toddouska
6ffd931db1
Merge pull request #2564 from SparkiDev/tlsext_list_fix
...
Modify linked list traversal - fix for compiler bug
2019-11-18 15:04:26 -08:00
John Safranek
a1e33e7ec9
Maintenance: OCSP
...
1. Check array index bounds before using them in arrays.
2. When processing an HTTP buffer, check that the new buffer size is
valid before allocating a new one.
2019-11-18 14:15:55 -08:00
David Garske
48d0b53074
Fix for wolfSSL_cmp_peer_cert_to_file compiler warning with size_t vs long.
2019-11-18 14:01:16 -08:00
David Garske
ca5549ae91
Improvements for XFTELL return code and MAX_WOLFSSL_FILE_SIZE checking.
...
Fixes #2527
2019-11-18 13:49:06 -08:00
John Safranek
8347d00bf2
Maintenance BLAKE2
...
1. Remove the BLAKE2 HMAC from wolfSSL and its testing.
2019-11-18 13:31:15 -08:00
David Garske
1542482cd5
Cleanup of the MQX file headers for STDIO. Cleanup of fio.h and nio.h includes to use wc_port.h. ZD 9453.
2019-11-18 12:14:34 -08:00
David Garske
b780982aa4
Adds "devId" crypto device and "heap" context for Hash wrappers and PBKDF
...
* Adds new hash wrapper init `wc_HashInit_ex`.
* Adds new PBKDF2 API `wc_PBKDF2_ex`.
ZD 9494 (using PBKDF2)
2019-11-18 11:26:56 -08:00
John Safranek
14c986360d
Maintenance BLAKE2
...
1. Remove BLAKE2 support from HMAC.
2. Update doxy header for HMAC with removal of BLAKE2 and addition of SHA-3.
2019-11-18 10:45:30 -08:00
David Garske
cb9f16d3cb
Fix for proper sizing of in-memory buffer for TLS benchmarking (32 is not always the max digest size).
2019-11-18 10:34:15 -08:00
David Garske
12d2d17d18
Minor cleanups to TLS bench tool configuration.
2019-11-18 10:29:50 -08:00
David Garske
95b83272dd
Implementation for SSL_CTX_add1_chain_cert.
2019-11-18 10:19:48 -08:00
JacobBarthelmeh
c9f7741dfb
Merge pull request #2567 from aaronjense/scan-build-fix
...
Scan-Build Fixes for PKCS7 and PKCS12
2019-11-18 10:21:14 -07:00
toddouska
ea04dbede1
Merge pull request #2583 from ejohnstown/rng-ebsnet
...
RNG-EBSNET
2019-11-18 09:15:30 -08:00
David Garske
7e17904c54
Fix for AES GCM Decrypt auth tag. ZD 9507
2019-11-18 06:46:50 -08:00
David Garske
b676c69561
Fix for DES mutex return code. Fix TLS bench thread shutdown. README.md updates.
2019-11-18 06:46:20 -08:00
Tesfa Mael
520a032b71
Add show x509 test
2019-11-15 13:23:08 -08:00
Tesfa Mael
6ca12787ae
retrieve a stack of X509 certs in a cert manager and a store ctx
2019-11-15 13:23:08 -08:00
David Garske
7819fedca7
Update for OpenSTM32 project. Adds TLS benchmarking tool, which test client/server for each cipher suite.
2019-11-15 12:10:09 -08:00
David Garske
0c2c4fd91b
Improvements to tls_bench tool in wolfSSL lib for embedded use.
2019-11-15 12:09:19 -08:00
David Garske
961f9c4ecc
Cleanup for invalid use of NO_SHA512 in api.c unit test.
2019-11-15 12:08:50 -08:00
David Garske
a7e415d077
Fix for AEC CTR mode with STM32 and CubeMX.
2019-11-15 12:08:25 -08:00
David Garske
27d95d1dfd
Add mutex protection on STM32 RNG, AES/DES and Hashing crypto hardware calls for thread safety. Fixes #2580
2019-11-15 12:08:11 -08:00
David Garske
2a9449182c
* Make the wc_Stm32_Aes_Init API always available for STM32. ZD 9503
...
* Fix for SHA256 hash context to only be included for `STM32_HASH_SHA2`. ZD 9503
2019-11-15 12:07:08 -08:00
Chris Conlon
4282346eef
Merge pull request #2551 from kaleb-himes/ZD5815-EBSNET
...
Implement porting efforts from ZD5241 and ZD5815
2019-11-15 09:24:10 -07:00
John Safranek
3cd5a97473
Maintenance
...
1. When getting the DH public key, initialize the P, G, and Pub pointers
to NULL, then set that we own the DH parameters flag. This allows
FreeSSL to correctly clean up the DH key.
2019-11-14 14:42:58 -08:00
John Safranek
604219f2fc
Sync OCTEON fix
...
1. For OCTEON builds, leave out the "-DCVMX_BUILD_FOR_LINUX_HOST" option
from CFLAGS by default so it makes standalone host builds.
2. Add a check of the variable OCTEON_HOST for linux to add back in the
"-DCVMX_BUILD_FOR_LINUX_HOST" to CFLAGS.
2019-11-14 14:21:44 -08:00
John Safranek
2ace532e45
Sync OCTEON fix
...
1. The sniffer's global device ID wasn't tagged as global.
2. Make sure the sniffer's global device ID is used.
2019-11-14 14:21:44 -08:00
John Safranek
7c78130f70
Sync OCTEON fix
...
The preprocessor selection for the WOLFSSL_GLOBAL macro for OCTEON wasn't getting selected.
2019-11-14 14:21:44 -08:00
Kaleb Himes
4a2f8482b5
Remove static RSA setting
...
Customer confirmed their tests are passing without static rsa enabled.
2019-11-14 15:16:32 -07:00
Eric Blankenhorn
8c6c4e2432
Add unique error codes to verify failures
2019-11-14 16:02:02 -06:00
Chris Conlon
22042830d6
Merge pull request #2588 from kojo1/BasicConst2
...
BasicConstraint, compatibility
2019-11-14 13:16:30 -07:00
Takashi Kojo
dccb2e165e
if integer it is valid format with CA = False,
2019-11-14 14:51:58 +09:00
Sean Parkinson
cc880e39ae
Add deterministic ECDSA sig gen. Fix corner cases for add point.
...
In verify, two points are added and they may either be the same point
(different z) or result in infinity.
If they are the same point then a double needs to be performed instead.
Detection of infinity added.
Calculation of wc_ecc_sig_size fixed to handle wehn there are more bits
in the order than in the modulus.
2019-11-14 12:49:45 +10:00
Guido Vranken
a3fca34471
Properly limit array access in OCSP response decoder
2019-11-14 03:19:07 +01:00
Sean Parkinson
411b130369
Add new 4096-bit cert and key to distribution
2019-11-14 09:13:24 +10:00
John Safranek
8f08f001d2
Update the EBSNET GenerateSeed function with a better seed. It was
...
reseeding itself every few bytes and failing the simple entropy check.
2019-11-13 14:50:58 -08:00
David Garske
af142b307b
Support for WebRTC (ref m79):
...
* Fixed `set1_curves_list` API's to use `const char*` for names.
* Fixed `ossl_typ.h` to include `ssl.h` compatibility.
* Added `SSL_CTX_up_ref`.
* Added `wolfSSL_set1_curves_list`
* Added `TLS_method` and `DTLS_method`
* Added `SSL_CIPHER_standard_name`.
* Added `X509_STORE_CTX_get0_cert`
* Added `SSL_CTX_set_cert_verify_callback`.
* Enabled "either" side support when `--enable-opensslall` is used.
* Changed `SSL_CIPHER_get_rfc_name` to use `wolfSSL_CIPHER_get_name` instead of stub.
2019-11-13 12:34:33 -08:00
toddouska
99292158e4
Merge pull request #2573 from JacobBarthelmeh/staticmemory
...
handle case to avoid memcpy when staticmemory IO pool gives same buffer
2019-11-13 11:29:13 -08:00
toddouska
76e7e7349b
Merge pull request #2575 from tmael/valgrind_dhtest
...
Fix memory leak in dh_test
2019-11-13 11:28:04 -08:00
toddouska
46bc8e092a
Merge pull request #2582 from ejohnstown/abi-current
...
ABI
2019-11-13 11:24:45 -08:00
Aaron Jense
dab7d09570
Fix the possibility that memory is not free'd when GetLength returns 0
2019-11-13 11:55:45 -07:00
Aaron Jense
0beeb2356b
Fix scan-build not recognizing FlatAttrib array being initialized
2019-11-13 11:50:26 -07:00
JacobBarthelmeh
e3fb746f1d
Merge pull request #2503 from dgarske/openvpn
...
wolfSSL Compatibility support for OpenVPN
2019-11-13 11:04:08 -07:00
David Garske
546442c130
Fix for CAVP test issue trying to use AES_128_KEY_SIZE and AES_IV_SIZE.
2019-11-12 09:43:09 -08:00
Sean Parkinson
5221c082f1
SP now has support for RSA/DH 4096-bit operations
2019-11-12 12:04:06 +10:00
David Garske
d8e40dea3f
Fixes from peer review:
...
* Reduced codesize when building with `OPENSSL_EXTRA_X509_SMALL`.
* Additional argument checks in `wolfSSL_ASN1_BIT_STRING_set_bit`, `wolfSSL_ASN1_STRING_to_UTF8`, `wolfSSL_RSA_meth_new`, `wolfSSL_RSA_meth_set`.
* Fix for compiler warnings in asn.c using strncmp to duplicate string. "specified bound depends on the length of the source argument"
2019-11-11 15:39:23 -08:00
John Safranek
682cf6deac
wolfSSL ABI
...
Hide the RNG and ecc_key allocators from FIPS mode builds.
2019-11-11 15:16:39 -08:00
David Garske
d17748b1ad
Fix for EC_GROUP_order_bits and added unit test.
2019-11-11 14:58:23 -08:00
David Garske
2bae1d27a1
wolfSSL Compatibility support for OpenVPN
...
* Adds compatibility API's for:
* `sk_ASN1_OBJECT_free`
* `sk_ASN1_OBJECT_num`
* `sk_ASN1_OBJECT_value`
* `sk_X509_OBJECT_num`
* `sk_X509_OBJECT_value`
* `sk_X509_OBJECT_delete`
* `sk_X509_NAME_find`
* `sk_X509_INFO_free`
* `BIO_get_len`
* `BIO_set_ssl`
* `BIO_should_retry` (stub)
* `X509_OBJECT_free`
* `X509_NAME_get_index_by_OBJ`
* `X509_INFO_free`
* `X509_STORE_get0_objects`
* `X509_check_purpose` (stub)
* `PEM_read_bio_X509_CRL`
* `PEM_X509_INFO_read_bio`
* `ASN1_BIT_STRING_new`
* `ASN1_BIT_STRING_free`
* `ASN1_BIT_STRING_get_bit`
* `ASN1_BIT_STRING_set_bit`
* `DES_check_key_parity`
* `EC_GROUP_order_bits`
* `EC_get_builtin_curves`
* `EVP_CIPHER_CTX_cipher`
* `EVP_PKEY_get0_EC_KEY`
* `EVP_PKEY_get0_RSA`
* `EVP_PKEY_get0_DSA` (stub)
* `HMAC_CTX_new`
* `HMAC_CTX_free`
* `HMAC_CTX_reset`
* `HMAC_size`
* `OBJ_txt2obj`
* `RSA_meth_new`
* `RSA_meth_free`
* `RSA_meth_set_pub_enc`
* `RSA_meth_set_pub_dec`
* `RSA_meth_set_priv_enc`
* `RSA_meth_set_priv_dec`
* `RSA_meth_set_init`
* `RSA_meth_set_finish`
* `RSA_meth_set0_app_data`
* `RSA_get_method_data`
* `RSA_set_method`
* `RSA_get0_key`
* `RSA_set0_key`
* `RSA_flags`
* `RSA_set_flags`
* `RSA_bits`
* `SSL_CTX_set_ciphersuites`
* `SSL_CTX_set_security_level` (stub)
* `SSL_export_keying_material` (stub)
* `DSA_bits` (stub)
* Changes to support password callback trial and NO_PASSWORD. Replaces PR #2505 .
* Renamed `wolfSSL_SSL_CTX_get_client_CA_list` to `wolfSSL_CTX_get_client_CA_list`.
* Cleanup of "sk" compatibility.
2019-11-11 14:58:23 -08:00
John Safranek
5a21cec030
wolfSSL ABI
...
Add ABI tags to the functions wolfSSL_Cleanup() to match wolfSSL_Init(),
wolfSSL_X509_free to match wolfSSL_load_certificate_file() which
allocates memory.
2019-11-11 10:16:58 -08:00
Tesfa Mael
68e4014c3f
memset DhKeys
2019-11-11 09:43:10 -08:00
toddouska
8246e02756
Merge pull request #2502 from cariepointer/gcm-tls10-fix
...
Return error with AES-GCM and negotiated versions < TLSv1.2
2019-11-08 15:06:54 -08:00
John Safranek
c6fa49d4b4
wolfSSL ABI
...
Add the ABI tag to the prescribed list of functions in the header and source files.
2019-11-08 15:06:18 -08:00
toddouska
44552fe707
Merge pull request #2536 from dgarske/nxp_mmcau_align
...
Fix NXP MMCAU when data pointer is not aligned
2019-11-08 15:02:43 -08:00
toddouska
801ffd4712
Merge pull request #2571 from SparkiDev/asn1_cert_parse_fix
...
Ensure space for name string. Reset policy count.
2019-11-08 15:02:02 -08:00
Carie Pointer
a2cdb87067
Add check for if length is <= 0 in wc_Arc4SetKey
2019-11-08 14:54:39 -07:00
Tesfa Mael
99ee4a407d
Fix mem leak for valgrind
2019-11-08 12:09:46 -08:00
Carie Pointer
39eaaddeae
Add tests for AEAD cipher suites with TLSv1.1 and TLSv1.0
2019-11-08 10:04:58 -08:00
JacobBarthelmeh
e329431bc1
Merge pull request #2572 from kaleb-himes/GH2559
...
Address logical fallacies and syntax issues in example server, addres…
2019-11-08 10:18:12 -07:00
Carie Pointer
1d02943658
Sanity check in wc_scrypt for invalid params <= 0
2019-11-08 09:40:07 -07:00
John Safranek
c69b6fb6d1
wolfSSL ABI
...
1. Add a blank #define WOLFSSL_ABI to tag functions as part of the ABI
to remind developers there are rules about those functions specifically.
2. Added allocators and deallocators for WC_RNG objects and ecc_key
objects so they don't have to be used on the stack.
3. Add tests for the new allocators.
2019-11-07 13:03:12 -08:00
kaleb-himes
f0d3d5d71c
80-character per-line coding standard format fix
2019-11-07 13:33:38 -07:00
Kaleb Himes
95796c80b7
Add prototype for ebsnet_fseek
...
Customer confirmed prototype was not present in vfile.h, added prototype to wolfSSL header.
2019-11-07 13:31:02 -07:00
kaleb-himes
5ce88b5086
seperate sanity checks on size and rnd allocation
2019-11-07 13:12:17 -07:00
Jacob Barthelmeh
fd3e4abb46
handle case to avoid memcpy when staticmemory IO pool gives same buffer
2019-11-07 11:36:20 -07:00
kaleb-himes
ad192786b1
Remove double assignment to pt caught by scan-build test
2019-11-07 11:35:36 -07:00
kaleb-himes
e24059691c
Address logical fallacies and syntax issues in example server, addresses GH issue #2559
2019-11-07 10:30:12 -07:00
Sean Parkinson
c06efb6c1f
Ensure space for name string. Reset policy count.
...
Only set the name string in one place, keeping a length of the name type
to copy. Also only move cert data index once.
Reset certificate extension policy number/count in case of malicious
cert with multiple policy extensions.
2019-11-07 13:51:50 +10:00
David Garske
0fe5d40507
Merge pull request #2568 from aaronjense/iar-build-fix
...
Fix changed sign warning for IAR build
2019-11-06 15:47:15 -08:00
Eric Blankenhorn
caaab11f60
Update from review
2019-11-06 15:58:50 -06:00
toddouska
b2270a068f
Merge pull request #2566 from SparkiDev/malloc_unused_fix
...
Fix unused parameter when XMALLOC doesn't use params
2019-11-06 13:08:48 -08:00
toddouska
c137c5a3e0
Merge pull request #2565 from SparkiDev/rsa_kg_sp_math
...
SP Math and RSA Key Gen working again
2019-11-06 13:08:19 -08:00
toddouska
1becdb9f3b
Merge pull request #2563 from SparkiDev/x509_dname_index
...
Check domain name location index hasn't exceed maximum before setting
2019-11-06 13:07:42 -08:00
toddouska
c995417d54
Merge pull request #2554 from SparkiDev/sp_misrac
...
MISRA-C changes to SP plus cppcheck fixes
2019-11-06 13:06:28 -08:00
toddouska
15d4da1e14
Merge pull request #2562 from JacobBarthelmeh/staticmemory
...
fix for memory management on edge case with staticmemory
2019-11-06 13:04:33 -08:00
toddouska
ba34b0d09f
Merge pull request #2547 from SparkiDev/rsa_pss_salt_len
...
Compile options for larger salt lengths in RSA-PSS
2019-11-06 13:03:15 -08:00
tmael
969488434a
Merge pull request #2544 from JacobBarthelmeh/SanityChecks
...
add null checks (QSH and CRYPTOCELL)
2019-11-06 12:18:00 -08:00
Aaron Jense
ea77cd743e
Fix changed sign warning for IAR build
2019-11-06 09:59:31 -08:00
JacobBarthelmeh
cd7001904a
Merge pull request #2561 from ejohnstown/x509-loss
...
X.509 and Secure Renegotiation
2019-11-06 10:53:18 -07:00
Sean Parkinson
d4ca48a513
Fix unused parameter when XMALLOC doesn't use params
2019-11-06 15:46:19 +10:00
Sean Parkinson
65cd8a930e
SP Math and RSA Key Gen working again
2019-11-06 15:24:12 +10:00
Tesfa Mael
a6e4926d2f
Init variables
2019-11-05 15:14:47 -08:00
Sean Parkinson
d2c4798459
Modify linked list traversal - fix for compiler bug
...
KeyShare and PreSharedKey traverse linked list using a handle.
Customer reported their compiler couldn't handle the assignment, so,
using a temporary.
2019-11-06 08:57:33 +10:00
Chris Conlon
77c36b5ea9
Merge pull request #2542 from kojo1/BasicConst
...
x.509 basic constratint
2019-11-05 15:38:07 -07:00
Sean Parkinson
52f28bd514
Check domain name location index hasn't exceed maximum before setting
2019-11-06 08:31:04 +10:00
Jacob Barthelmeh
890eb415b1
fix for memory management on edge case with staticmemory
2019-11-05 15:13:26 -07:00
David Garske
165105af95
Merge pull request #2558 from danielinux/pwbased-no-asn
...
Allow pwdbased module to compile without ASN
2019-11-05 13:26:45 -08:00
David Garske
e48cf88a70
Merge pull request #2556 from embhorn/arm-test-fix
...
Fix for ARM platforms
2019-11-05 12:25:56 -08:00
David Garske
c337ce2703
Merge pull request #2560 from cconlon/cavppss
...
use wc_RsaPSS_CheckPadding() for selftest build instead of extended
2019-11-05 12:09:25 -08:00
John Safranek
72e1afbe99
X.509 and Secure Renegotiation
...
1. When retaining the handshake resources for a session using resumption, do not delete the peer's certificate. If keeping peer certificates is enabled, the certificate needs to exist so it may be examined.
2. Free the saved peer certificate when receiving a peer certificate during a renegotiation.
2019-11-05 11:03:34 -08:00
Chris Conlon
e429558166
use wc_RsaPSS_CheckPadding() for selftest build instead of extended
2019-11-05 10:48:36 -07:00
Daniele Lacamera
51ea806d8b
Allow pwdbased module to compile without ASN
2019-11-05 10:16:46 +01:00
Jacob Barthelmeh
1361e4dbef
remove extra setting of ecc key size with CRYPTOCELL build
2019-11-04 23:25:47 -07:00
toddouska
e2b7bee9c8
Merge pull request #2533 from cariepointer/apache_bio_want_read
...
Apache: Return WANT_READ in wolfSSLReceive if BIO retry and read flags are set
2019-11-04 16:52:28 -08:00
Sean Parkinson
32f93be0b6
Replace magic PSS salt length numbers with enums
2019-11-05 09:03:30 +10:00
toddouska
5141623f48
Merge pull request #2548 from SparkiDev/rsa_check
...
Add more checks of RSA key
2019-11-04 13:05:35 -08:00
toddouska
28da0075d1
Merge pull request #2545 from SparkiDev/scrypt_iters
...
Add scrypt API that takes iterations rather than cost
2019-11-04 13:01:32 -08:00
toddouska
b723acf0f6
Merge pull request #2534 from SparkiDev/pss_1024_sha512_tls12
...
Pass the length of the RSA key in bits to PSS padding check in TLS
2019-11-04 11:42:55 -08:00
toddouska
f4afa4bc87
Merge pull request #2540 from SparkiDev/etm_rehand
...
Fix Encrypt-Then-MAC when rehandshaking
2019-11-04 11:41:44 -08:00
Eric Blankenhorn
16899b55b2
Fix for ARM platforms
2019-11-04 11:54:36 -06:00
David Garske
e2fb359538
Merge pull request #2549 from JacobBarthelmeh/Testing
...
fix for macro typo's
2019-11-04 08:05:09 -08:00
David Garske
683658de20
Merge pull request #2553 from miyazakh/fix_esp_buildfail
...
fix esp build failure
2019-11-04 07:44:01 -08:00
Sean Parkinson
f590f6522d
MISRA-C changes to SP plus cppcheck fixes
2019-11-04 16:13:48 +10:00
Sean Parkinson
35ec2bc6d4
Compile options for larger salt lengths in RSA-PSS
...
Salt length larger than the hash size allowed in RSA-PSS.
Passing -2 to PSS pad function uses maximum salt length.
Passing -2 to PSS un-pad function makes it discover salt length.
2019-11-04 14:27:02 +10:00
Hideki Miyazaki
0c8ab5b0e4
fix esp build failure
2019-11-03 12:19:59 +09:00
Takashi Kojo
76404c937e
#ifdef guard
2019-11-02 13:01:40 +09:00
David Garske
2084006b61
Merge pull request #2550 from cconlon/mmcau
...
fix mmCAU classic XFREE on aligned ptr
2019-11-01 15:59:57 -07:00
kaleb-himes
ffb80126ff
Implement porting efforts from ZD5241 and ZD5815
2019-11-01 16:00:06 -06:00
Jacob Barthelmeh
6ba3aa88ca
fix for build after CI tests
2019-11-01 14:47:50 -06:00
Chris Conlon
98a2322dd9
Merge pull request #2525 from tmael/open_coexist
...
Raise an error when opensslcoexist option is used with openssl[all][extra]
2019-11-01 11:32:46 -06:00
Chris Conlon
e07e07f831
Merge pull request #2537 from JacobBarthelmeh/PKCS7
...
fix for pkcs7 verify streaming
2019-11-01 10:15:44 -06:00
Chris Conlon
be2cb302ea
fix mmCAU classic XFREE on aligned ptr
2019-11-01 09:56:28 -06:00
Eric Blankenhorn
54f023ac2c
Clarify ipasc parameter usage
2019-11-01 10:33:49 -05:00
Jacob Barthelmeh
efca350cba
fix for macro typo's
2019-11-01 09:21:21 -06:00
Sean Parkinson
54c7619f81
Add more checks of RSA key
...
Check d is in valid range, p*q == n, and dP, dQ and u are valid.
2019-11-01 16:25:57 +10:00
Sean Parkinson
7623777857
Add scrypt API that takes iterations rather than cost
...
iterations = 1 << cost but matches APIs in other products and standard
2019-11-01 10:15:42 +10:00
Eric Blankenhorn
6839110507
Update from review
2019-10-31 17:45:33 -05:00
toddouska
9e852b3867
Merge pull request #2539 from dgarske/mutex_ref
...
Fixes for cases where mutex was not being free'd
2019-10-31 13:10:04 -07:00
toddouska
b27c1df348
Merge pull request #2538 from SparkiDev/cppcheck_fixes_2
...
Fixes for errors using cppcheck
2019-10-31 13:08:19 -07:00
toddouska
ac76b4b692
Merge pull request #2541 from SparkiDev/x25519_gcc_avx2
...
Fix loading and setting using RIP register with GCC
2019-10-31 13:07:27 -07:00
toddouska
626e0efd99
Merge pull request #2530 from SparkiDev/pkcs11_tls_client
...
Use the public key type as private key type with PKCS #11
2019-10-31 13:06:32 -07:00
toddouska
fca0705a0b
Merge pull request #2526 from aaronjense/libwebsockets-build-fix
...
libwebsockets build fixes
2019-10-31 13:05:46 -07:00
Jacob Barthelmeh
550fbcfff7
add null checks (QSH and CRYPTOCELL)
2019-10-31 10:07:47 -06:00
Eric Blankenhorn
58d800fbb7
Adding support for IP address verification
2019-10-31 09:15:22 -05:00
Eric Blankenhorn
9fc33e461c
Check names in verify callback.
2019-10-31 09:15:22 -05:00
Takashi Kojo
2ef4d1a16e
Keep else to GetBoolean
2019-10-31 17:29:46 +09:00
Takashi Kojo
4f602e02ba
accept ASN_INTEGER for compatibility
2019-10-31 12:06:59 +09:00
Sean Parkinson
adff4e719a
Fix loading and setting using RIP register with GCC
2019-10-31 12:14:05 +10:00
Sean Parkinson
4be36ef2bd
Fix Encrypt-Then-MAC when rehandshaking
...
New, encrypted handshakes change over to ETM correctly now.
2019-10-31 09:14:42 +10:00
David Garske
28d466cb10
Fix to ensure 4-byte alignment is default for MMCAU with SHA1, SHA256 and MD5.
2019-10-30 13:34:57 -07:00
David Garske
760a90ef5d
Fixes for cases where mutex is not being free'd.
2019-10-30 10:11:06 -07:00
Sean Parkinson
c354b240f2
Fixes for errors using cppcheck
2019-10-30 14:48:21 +10:00
Jacob Barthelmeh
a0955f8221
fix for pkcs7 verify streaming
2019-10-29 16:47:30 -06:00
David Garske
7f42b71571
Fix NXP MMCAU when data pointer is not aligned.
2019-10-29 13:45:25 -07:00
David Garske
6bc16a4acb
Merge pull request #2532 from aaronjense/mp-public-defines
...
Fix for configure used in wolfssl-examples/signature/rsa_vfy_only.…
2019-10-29 08:46:03 -07:00
Sean Parkinson
eb03e5de1e
Pass the length of the RSA key in bits to PSS padding check in TLS
2019-10-29 11:56:35 +10:00
Carie Pointer
e8db4cc2a0
Apache: Return WANT_READ in wolfSSLReceive if BIO retry and read flags are set
2019-10-28 15:08:00 -07:00
toddouska
140796d2aa
Merge pull request #2504 from ejohnstown/sync-octeon
...
Synchronous OCTEON Sniffer Support
2019-10-28 12:25:57 -07:00
David Garske
0aeb87f284
Merge pull request #2529 from SparkiDev/etm_max
...
Fix check for plaintext length when using Encrypt-Then-MAC
2019-10-28 11:59:32 -07:00
toddouska
51e8abf126
Merge pull request #2531 from SparkiDev/nginx_unittest
...
Fix unittest to pass when compiling for NGINX
2019-10-28 11:27:22 -07:00
Aaron Jense
34c37c58f4
Fixes for configure used in wolfssl-examples/signature/rsa_vfy_only and fix for wrong WOLFSSL_MP_PUBLIC defines.
...
./configure CFLAGS=-DWOLFSSL_PUBLIC_MP --disable-asn --disable-filesystem --enable-static --enable-shared --enable-cryptonly --enable-sp=smallrsa2048 --enable-sp-math --disable-dh --disable-ecc --disable-sha224 --enable-rsavfy
2019-10-28 09:50:59 -06:00
Sean Parkinson
8a92e1eae6
Fix check for plaintext length when using Encrypt-Then-MAC
2019-10-28 16:28:52 +10:00
Carie Pointer
ad9522c765
Add WOLFSSL_OLDTLS_AEAD_CIPHERSUITES to allow AEAD cipher suites in TLSv1.0 and TLSv1.1
2019-10-25 09:51:11 -07:00
David Garske
b80b10b980
Merge pull request #2498 from danielinux/stm32wb55
...
Support for STM32_PKA accelerator
2019-10-24 15:41:08 -07:00
Daniele Lacamera
9f34826173
stm32_pka: fixed remarks from code review
2019-10-24 21:48:35 +02:00
Daniele Lacamera
390b936331
stm32_pka: using XMEMCPY
2019-10-24 20:49:43 +02:00
Daniele Lacamera
f97452c859
STM32_PKA: using XMEMSET
2019-10-24 20:46:03 +02:00
Daniele Lacamera
025754e774
Fixed alignment/padding for hash. ECC tests passing on target.
2019-10-24 20:32:47 +02:00
John Safranek
17f44d4d29
OCTEON Sync
...
1. Add attributes to the OCTEON functions so they aren't optimized.
2. Disable the same test cases for OCTEON as we do QAT in sync.
2019-10-24 10:00:20 -07:00
David Garske
3ac4aa5a9b
Merge pull request #2524 from cconlon/cau_iar
...
mmCAU Classic AES key alignment, IAR warnings fixes
2019-10-24 09:23:20 -07:00
Daniele Lacamera
3677e4d735
[stm32hal-pka] Fixed after reviews, fix result allocation for sign/mulmod
2019-10-24 16:06:38 +02:00
Tesfa Mael
0b93109b3a
throw error when opensslcoexist configured with opensslall or opensslextra
2019-10-23 15:51:19 -07:00
toddouska
400dcfebba
Merge pull request #2516 from danielinux/freescale-ltc-spmath
...
Fixed Freescale LTC crypto module to compile with SP math
2019-10-23 15:11:43 -07:00
toddouska
28cc7daa68
Merge pull request #2511 from tmael/BN_bn2hex
...
Fix for hex digits with fastmath and normal integer
2019-10-23 15:10:40 -07:00
John Safranek
954d1ad13e
Sniffer Update
...
1. Add ssl_SetWatchKeyCallback_ex() which was missing.
2. Fix linking issue with OCTEON libraries.
2019-10-23 15:03:50 -07:00
Chris Conlon
cb7b4af986
Merge pull request #2523 from JacobBarthelmeh/SanityChecks
...
fix for selftest build
2019-10-23 15:24:16 -06:00
JacobBarthelmeh
4135850a32
Merge pull request #2522 from dgarske/rel_async_4.2.0
...
Fixes for building with async (rel v4.2.0 prep)
2019-10-23 14:33:00 -06:00
Jacob Barthelmeh
5b9e005802
fix for selftest build
2019-10-23 12:09:20 -06:00
John Safranek
b8f4b1a712
QAT Header Hiding
...
For the sync QAT, the QAT headers are included into the library after it
has been built and is being used. The actual headers should only be used
when building wolfSSL and should be hidden from the user.
1. Most of the functions in the sync QAT and OCTEON headers don't need
to be exported. Move all of that into the source files. Only export the
init and deinit functions.
2. Remove inline from the OCTEON support functions.
3. Remove the AES-ECB files for sync OCTEON as unused.
4. Configure defaults to OCTEON2 build, can be overridden with variable.
2019-10-23 09:58:11 -07:00
John Safranek
1ad23334bf
Sync Sniffer API Cleanup
...
1. Switched the IntelQa sync API back to local.
2. Added two functions to setup and cleanup the IntelQA device.
3. Changed the Octeon functions to match the IntelQa functions.
4. Updated sniffer, wolfcryptest, and benchmark.
2019-10-23 09:58:11 -07:00
John Safranek
b0dafbcd1b
Sync Octeon Sniffer
...
Added back some changes from a dropped commit.
1. The Octeon README should be a stub.
2. Changed the license notice in the octeon sync files back to GPLv2.
3. Added a flag to Aes that needed a build guard around it.
4. Replaced the disable for sniffer session stats.
2019-10-23 09:58:11 -07:00
John Safranek
54f0b1a44a
Sync QAT Fixes
...
1. The QAT callback's worker functions need to copy the IV into the AES IV register. QAT doesn't update it automatically.
2. Update the GMAC test to set its device to INVALID_DEVID.
3. Always allocate NUMA buffers before running crypto operation and store the results.
4. The QAT does not like non-multiple of 4 iv lenths, and aad lengths. Or 0. Remove a few test cases for those.
5. QAT wasn't getting a pointer to store the auth tag for GCM. Then store it.
2019-10-23 09:58:11 -07:00
John Safranek
825f311959
add OCTEON and QAT to wolfCrypt test, update SHA-1 to reset ret when it will do the software sha
2019-10-23 09:58:10 -07:00
John Safranek
41e0712eb0
Synchronous Cavium OCTEON Support for Sniffer
...
1. Fixes for AES-GCM.
2019-10-23 09:58:10 -07:00
John Safranek
67b11b8ece
Fixing some play-nice between sync QAT and sync Octeon.
2019-10-23 09:58:10 -07:00
John Safranek
989c964a95
Synchronous Cavium OCTEON Support for Sniffer
...
1. Add configure option for sync IntelQA that uses the crypto callback API.
2. Make a synchonous copy of the quickassist files.
3. Tie in the crypto device to the sniffer.
4. When making a sniffer build, define static DH enabled.
5. The readme files in the Cavium were being added to the distro optionally, changed to always add the readme files.
6. Added an include of the cavium_octeon header in the wc_ports.c.
7. Updated the Cavium OCTEON callback for AES-GCM.
8. Add the global tag to the list of crypto callback function pointers.
9. Add an accessor to the OCTEON crypto callback module to return the device ID of the OCTEON device.
10. Add a new version of ssl_SetWatchKeyCallback which takes an additional parameter of a device ID. This ID is used to set up the wolfSSL_CTXs in the sniffer session trackers.
11. Update the benchmark to use sync OCTEON and QAT.
2019-10-23 09:58:10 -07:00
David Garske
7386bd4df1
Fixes for building with ./configure --enable-asynccrypt --enable-all CFLAGS="-DWC_ASYNC_NO_CRYPT"
2019-10-22 13:37:16 -07:00
David Garske
48c4b2fedc
Merge pull request #2521 from JacobBarthelmeh/Release
...
prepare for release version 4.2.0
2019-10-22 09:12:33 -07:00
Sean Parkinson
8ce3b3a5e6
Use the public key type as private key type with PKCS #11
2019-10-22 10:34:44 +10:00
Sean Parkinson
a3c09f6794
Fix unittest to pass when compiling for NGINX
2019-10-22 08:47:49 +10:00
Jacob Barthelmeh
1cbc2536cc
prepare for release version 4.2.0
2019-10-21 16:32:41 -06:00
Jacob Barthelmeh
32f537cb6c
wrap time_t requirement in ssl.h by openssl extra build to fix sgx build
2019-10-21 16:29:31 -06:00
Jacob Barthelmeh
497818525a
check on keygen for make rsa key function
2019-10-21 14:54:17 -06:00
David Garske
9b8f1dadd0
Merge pull request #2520 from JacobBarthelmeh/Testing
...
Testing
2019-10-21 12:20:53 -07:00
Aaron Jense
eaa8f2a957
libwebsockets build fixes
...
1. Add --enable-libwebsockets option
2. Add OPENSSL_NO_EC (used in libwebsockets)
3. Add SSL_MODE_RELEASE_BUFFERS and debug message for when wolfSSL_CTX_set_mode doesn't recognize a mode.
2019-10-21 12:03:18 -06:00
David Garske
132877ea0b
Merge pull request #2519 from ejohnstown/dtls-fips-fix
...
Fix DTLS+OPENSSLALL+FIPS Failure
2019-10-21 10:00:23 -07:00
Jacob Barthelmeh
09a0859865
fix for fortress and no sha build with encrypted keys
2019-10-21 09:37:24 -06:00
Jacob Barthelmeh
e24787c8e4
add ecc header for fp_ecc cache free
2019-10-21 09:21:46 -06:00
Jacob Barthelmeh
ea45da5fa8
change add_all_* to be evp table init and fix valgrind report
2019-10-20 01:13:43 -06:00
John Safranek
26793359a2
Fix DTLS+OPENSSLALL+FIPS Failure
...
There was a problem with the combination of DTLS, OpenSSL Compatibility,
and FIPSv2 where the DTLS server would fail out because a HMAC key was
too short. FIPS requires a HMAC key be a minimum size. The DTLS server
uses HMAC to generate the first cookie key when initialized. When using
OpenSSL, the feature for creating a DTLS endpoint with its side being
set late is tested. The DTLS cookie wasn't getting set at init because
the server was "neither" at the time. Added a call to set cookie when
initializing a neither endpoint into a server.
2019-10-18 16:30:27 -07:00
Chris Conlon
42ddd63952
exclude packed __attribute__ on IAR ICC < 9
2019-10-18 16:33:01 -06:00
Chris Conlon
c18ff36959
fix uninitialized variable warning in IAR-EWARM 7.50.2
2019-10-18 14:08:23 -06:00
Chris Conlon
c4afbb3685
align AES key if needed when using MMCAU classic
2019-10-18 14:02:43 -06:00
Kaleb Himes
0eefa80d74
initialize max pathlen to preserve ASN no signer error
2019-10-18 11:30:08 -06:00
Jacob Barthelmeh
a0a572cf3e
fix sha256 build on armv8
2019-10-18 11:04:45 -06:00
David Garske
0e73af8b88
Merge pull request #2515 from JacobBarthelmeh/Testing
...
Initial pass on test cycle
2019-10-17 16:02:17 -07:00
JacobBarthelmeh
7135e9e500
Merge pull request #2517 from dgarske/x509_date
...
Fix to restore notBefore/notAfter functions
2019-10-17 16:59:20 -06:00
David Garske
fb8d2d4b2f
Fix to restore notBefore/notAfter functions that were removed in PR #2462 . These are not openssl compatibility functions, but are used by JSSE.
2019-10-17 13:02:00 -07:00
toddouska
78e1336598
Merge pull request #2514 from dgarske/fix_async_next_iv
...
Various fixes for asynchronous mode
2019-10-16 13:52:47 -07:00
Jacob Barthelmeh
b7d4c9f839
fix build with no server and enable all
2019-10-16 14:19:50 -06:00
Daniele Lacamera
f41f67d231
Fixed Freescale LTC crypto module to compile with SP math
2019-10-16 15:44:58 +02:00
Jacob Barthelmeh
b4a3ad6e2d
fix test case for enckeys + des3 with md5 disabled
2019-10-15 17:07:05 -06:00
Jacob Barthelmeh
acd0a55d47
add new certs to extra dist
2019-10-15 14:23:01 -06:00
Tesfa Mael
1267987c31
Review comment
2019-10-15 12:24:57 -07:00
Tesfa Mael
1a18e3bba8
Add leading zero padding for odd hex ASCII digits
2019-10-15 11:54:58 -07:00
David Garske
5c07391f1b
Various fixes for asynchronous mode:
...
* Fix for AES CBC issue with IV (QAT only).
* Fix for test cases with QAT.
* Remove poorly placed debug for AES CFB.
2019-10-15 11:18:55 -07:00
David Garske
928eb36b5e
Merge pull request #2513 from JacobBarthelmeh/UnitTests
...
update external test certificate
2019-10-15 11:18:01 -07:00
JacobBarthelmeh
63e74554a8
fix for warning when using c++ compiler
2019-10-15 10:07:02 -07:00
JacobBarthelmeh
bb6eeefe26
fix for build with --enable-all and gcc-9 on Linux
2019-10-15 09:56:26 -07:00
Jacob Barthelmeh
4bde06fbe3
fix for pkcs11 found running build_test.pl script
2019-10-15 10:25:46 -06:00
Jacob Barthelmeh
b27504b222
update external test certificate
2019-10-15 10:11:38 -06:00
Tesfa Mael
441f3a7f1f
Add leading zero for odd number of hex digits
2019-10-14 16:43:45 -07:00
Jacob Barthelmeh
95c036a08a
static analysis tests for memory management
2019-10-14 17:17:46 -06:00
toddouska
d30e4ac74f
Merge pull request #2499 from ejohnstown/sniffer-features
...
Sniffer Features
2019-10-14 15:35:55 -07:00
JacobBarthelmeh
c3e99e1394
Merge pull request #2510 from tmael/bio_base64
...
Fix a return value from wolfSSL_BIO_BASE64_write()
2019-10-14 15:44:14 -06:00
John Safranek
f0dfe5355b
Sniffer for IPv6
...
1. Better length checking on the IPv6 extension headers.
2. Removed the default size update analogous to the IPv4 header check
function. It cannot ever be 0, so the update was unnecessary.
2019-10-14 10:17:37 -07:00
toddouska
df77088d5c
Merge pull request #2461 from kaleb-himes/ZD_5541_PathLenConstraint
...
addressing non RFC compliance in handling of pathLen constraint
2019-10-14 09:41:09 -07:00
toddouska
9560b905af
Merge pull request #2509 from cconlon/selftest_version
...
Add CAVP selftest version API prototype
2019-10-14 09:23:16 -07:00
toddouska
2c3e4a2d18
Merge pull request #2508 from ejohnstown/dtls-fix
...
DTLS Redundant Check
2019-10-13 10:05:44 -07:00
toddouska
afb1c5f252
Merge pull request #2431 from JacobBarthelmeh/coldfire
...
M68K (coldfire MCF5441X) wolfcrypt build and examples
2019-10-13 09:16:03 -07:00
Jacob Barthelmeh
f2a3da94b6
refactor some openssl extra functions for cryptonly use
2019-10-11 16:40:08 -06:00
Tesfa Mael
54b6148259
Add comment
2019-10-11 15:19:02 -07:00
Tesfa Mael
ccc500e13f
Correct return value from wolfSSL_BIO_BASE64_write()
2019-10-11 14:52:53 -07:00
kaleb-himes
9357db4d0c
check value of ret in test cases
2019-10-11 15:27:15 -06:00
kaleb-himes
306b280ccd
Add test cases and implement peer suggestions
...
Fix failing jenkins test cases
Add detection for file size with static memory
Account for cert without pathLen constraint set including test cases
Resolve OCSP case and test where cert->pathLen expected to be NULL
2019-10-11 15:03:38 -06:00
Jacob Barthelmeh
d7fe000cfe
M68K (coldfire MCF5441X) wolfcrypt build and examples
...
fix for make dist and cleanup makefile
add aes file to Makefile
macro guards and entropy warning
add AES to build
2019-10-11 14:56:34 -06:00
Chris Conlon
fd6328aa8e
adjust NETBSD selftest tag in fips-check.sh for CAVP version API
2019-10-11 14:29:41 -06:00
Chris Conlon
2c6c88266b
add prototype for wolfCrypt CAVP version in selftest.h
2019-10-11 14:18:04 -06:00
toddouska
cd934a95a4
Merge pull request #2445 from JacobBarthelmeh/SanityChecks
...
sanity check on resulting ecc size
2019-10-11 10:53:20 -07:00
kaleb-himes
9c5fd165d0
addressing non RFC compliance in handling of pathLen constraint
2019-10-10 16:45:29 -06:00
John Safranek
774c0c5c3c
Remove a redundant sequence number check for epoch 0.
2019-10-10 14:21:14 -07:00
John Safranek
fabc6596b3
Merge pull request #2369 from JacobBarthelmeh/Testing
...
fix for inject clear alert from client test case
2019-10-10 13:25:51 -07:00
David Garske
d781734b55
Merge pull request #2507 from cariepointer/apache_updates
...
Apache updates
2019-10-10 12:45:01 -07:00
JacobBarthelmeh
65d1c3b8ce
Merge pull request #2506 from tmael/bio_mem_base64
...
Fix for BIO and base64 encoding/decoding
2019-10-10 13:41:38 -06:00
Carie Pointer
1d7f0de5b5
Fixes from review, adds some error checking, and adds const variables
2019-10-10 09:13:35 -07:00
Carie Pointer
4fa2b71848
Minor changes requested from review
2019-10-09 15:38:26 -07:00
Carie Pointer
af8968ee5e
Add REQUIRES_AEAD and move functionallity for checking AEAD ciphers to CipherRequires()
2019-10-09 14:37:39 -07:00
Carie Pointer
d137cab427
Update in XSTRCAT call
2019-10-09 13:12:34 -07:00
Carie Pointer
2312d0e125
Dynamically allocate buffer in wolfSSL_X509V3_EXT_print
2019-10-09 12:54:23 -07:00
Tesfa Mael
e22563ed00
BIO chain test
2019-10-09 11:38:07 -07:00
Carie Pointer
d89f9ddc42
Update X509V3_EXT_print for different extension types
2019-10-09 11:10:27 -07:00
Carie Pointer
5adcee9f2c
Update testsuite to expect ADH-AES256-GCM-SHA384 to fail with TLSv1.0 and TLSv1.1
2019-10-09 08:36:47 -07:00
Daniele Lacamera
99209d78a3
STM32 PKA: added include statement
2019-10-09 13:19:57 +02:00
Daniele Lacamera
0dfc64678c
STM32 PKA: added function prototype
2019-10-09 13:15:56 +02:00
Daniele Lacamera
3465a487d3
STM32 PKA fix: remove reverse array operations
2019-10-09 10:22:04 +02:00
John Safranek
89db0da0aa
Synchronous Quick Assist Support for Sniffer
...
1. Fixed a compiler warnings.
2. Fixed a memory issue when using the storage callback with QAT.
2019-10-08 16:49:38 -07:00
Tesfa Mael
b7fe49c8b4
NULL terminate a character sequence
2019-10-08 15:42:39 -07:00
Tesfa Mael
a84fbeae6b
Fix for a memory BIO and handle BIO chains
2019-10-08 12:26:54 -07:00
John Safranek
ff15b3cfaa
better display of the IPv6 addresses in the sniffer
2019-10-08 11:34:36 -07:00
Carie Pointer
136bc45857
Update wolfSSL_X509_NAME_print_ex for printing X509_NAME in reverse order
2019-10-07 11:36:00 -07:00
Carie Pointer
98b8cd35d8
Add ALT_NAMES_OID to switch in wolfSSL_X509_set_ext and update X509V3_EXT_print
2019-10-07 11:29:35 -07:00
Carie Pointer
b247b4565c
Fixes for build warnings with apache httpd
2019-10-07 11:15:55 -07:00
Carie Pointer
df22115920
Return error with AES-GCM and negotiated versions < TLSv1.2
2019-10-07 08:28:00 -07:00
David Garske
625bd121f2
Merge pull request #2495 from JacobBarthelmeh/staticmemory
...
check on if free'ing ctx/method back to heap hint
2019-10-07 08:10:05 -07:00
John Safranek
8ec90339d9
Change the sniffer testsuite to do the IPv6 test when the "-6" option is
...
on the command line.
2019-10-05 19:26:41 -07:00
John Safranek
f025f08315
Sniffer touches for Windows.
2019-10-04 17:06:35 -07:00
John Safranek
a467c75390
Change the GPL version back to v2 for the quickassist_sync files.
2019-10-04 14:56:42 -07:00
John Safranek
b6b57154e5
Add the new IPv6 sniffer test file to the automake list.
2019-10-04 14:54:17 -07:00
John Safranek
89ff909d73
Sniffer IPv6
...
1. Sorted out IPv6 configuration for sniff test.
2. Tests the sniffer using an IPv6 file.
2019-10-04 14:54:17 -07:00
John Safranek
ebd435ae46
skip IPv6 extended headers
2019-10-04 14:54:17 -07:00
John Safranek
a5bfb8a18b
Change the IP address wrappers to include the version. Makes comparing
...
easier. Hard-coded some IPv6 localhost tests.
2019-10-04 14:54:17 -07:00
John Safranek
d1d2eb0edd
Add IPv6 to the sniffer.
2019-10-04 14:54:17 -07:00
John Safranek
8b21082abe
Use wrapper macros for all touches of the sniffer statistics mutex.
2019-10-04 14:54:17 -07:00
John Safranek
1b057df610
When enabling SHOW_SECRETS one of the array counter variables for a
...
secret had a type mismatch. Changed the index to a word32 to match the
boundary variable's type.
2019-10-04 14:54:17 -07:00
John Safranek
841e469340
Convert the data the snifftest is about to print into printable text.
...
Anything that isprint() or isspace() is kept, anything else is changed
to a period.
2019-10-04 14:54:17 -07:00
John Safranek
725243b132
Changed how the sniffer calculates the sslFrame size, sslBytes, and the
...
end of packet pointer. The end of packet pointer is based on sslFrame
and sslBytes. sslBytes is calculated from the total length in the IP
header, rather than the caplen. The caplen may include things like
Ethernet's FCS, which throws packet processing off.
2019-10-04 14:54:17 -07:00
John Safranek
b2fb6d1a81
Move some stats captures to a different location.
2019-10-04 14:54:17 -07:00
John Safranek
3256fef7f9
Sniffer Chain Buffers
...
1. Fixed an issue when a TLS record is split across two chain buffers.
The second buffer was being treated as a new record.
2. Fixed an issue with STARTTLS_ALLOWED where the input buffer isn't
getting cleared and the skipped data just builds up blocking TLS
records.
2019-10-04 14:54:17 -07:00
John Safranek
53c7f864b2
Add midding function prototype.
2019-10-04 14:54:17 -07:00
John Safranek
b6ca72549c
Sniffer Fixes
...
Added a flag to disable the normally enabled session stats, WOLFSSL_NO_SESSION_STATS.
2019-10-04 14:54:17 -07:00
John Safranek
dea5e73852
Sniffer Chain Input
...
Add a new method for handling input records where the input is in the form of an iovec list.
2019-10-04 14:54:17 -07:00
John Safranek
62ac388f55
Store Data Callback
...
Added a callback and support to allow one to handle storing the data
directly without reallocating the data buffer. Also added an example
that uses this callback if the callback is enabled in the build.
2019-10-04 14:54:17 -07:00
John Safranek
98e94a6f0f
Added a preprocessor guard around ssl_GetSessionStats().
2019-10-04 14:54:17 -07:00
John Safranek
a0ad39cf70
Sniffer Stats
...
Moved the increment of the resume misses statistic.
2019-10-04 14:54:17 -07:00
John Safranek
73273f4fec
Sniffer Memory
...
1. Modify the sniffer code to use XMALLOC and XFREE.
2. Added some new dynamic memory types for the sniffer.
2019-10-04 14:54:17 -07:00
John Safranek
0e1073f622
Sniffer Statistics
...
Addded two more statistics, cache hits and cache inserts.
2019-10-04 14:54:17 -07:00
John Safranek
4292936efc
wolfSSL Global
...
1. Renamed the global variable tag to WOLFSSL_GLOBAL.
2. Tagged several more global variables with WOLFSSL_GLOBAL.
2019-10-04 14:54:17 -07:00
John Safranek
bbc208ad33
Updated some more globals in the sniffer and session cache with being shared.
2019-10-04 14:54:17 -07:00
John Safranek
a991cc42f4
Add function wolfSSL_get_cipher_name_iana_from_suite() a wrapper around
...
internal API GetCipherNameIana().
2019-10-04 14:54:17 -07:00
John Safranek
87a8447f0d
1. Added a tag for global variables in environments where they aren't
...
shared across threads by default.
2. Set the Trace file and flag up with the shared flag.
2019-10-04 14:54:17 -07:00
John Safranek
743a6ab829
Update the decrypted packet and byte counts.
2019-10-04 14:54:17 -07:00
toddouska
dd9635d8ff
Merge pull request #2469 from embhorn/sk_types
...
Sk types
2019-10-04 14:44:25 -07:00
toddouska
30829cec09
Merge pull request #2482 from SparkiDev/cppcheck_fixes_1
...
Fixes from using cppcheck tool
2019-10-04 14:39:31 -07:00
David Garske
b213a962e9
Merge pull request #2493 from ejohnstown/sync-qat
...
Synchronous Quick Assist Support for Sniffer
2019-10-04 11:45:08 -07:00
Daniele Lacamera
c26a7ccb68
Fix copy-paste from LTE module
2019-10-04 20:37:38 +02:00
Daniele Lacamera
52bf19eefd
Added initial support for STM32_PKA ECC accelerator
2019-10-04 20:15:33 +02:00
David Garske
0d43c1f3d7
Merge pull request #2488 from aaronjense/openssh-fixes
...
Fix defines that aren't in configure.ac
2019-10-04 10:35:07 -07:00
David Garske
d48e904c16
Merge pull request #2496 from embhorn/test_ASN1_INTEGER_set
...
Add conditional check to test_wolfSSL_ASN1_INTEGER_set test case failing for 32-bit platform
2019-10-04 10:33:37 -07:00
John Safranek
48d872187d
Synchronous Quick Assist Support for Sniffer
...
1. Add a HardwareStop for the QAT sync build in wolfCrypt_Cleanup();
2019-10-04 09:01:59 -07:00
David Garske
a258b84018
Merge pull request #2497 from danielinux/openssl-cleanup
...
Fix include path issue for openssl compatibility for dh.h.
2019-10-04 08:23:37 -07:00
Eric Blankenhorn
f47a9c8b20
Add conditional to 64-bit tests
2019-10-04 09:41:48 -05:00
Daniele Lacamera
3183ccc0c8
x509.h: include the correct header
2019-10-04 15:04:35 +02:00
Daniele Lacamera
5f1dcc3b0c
Removed inclusion of openSSL header
2019-10-04 10:22:38 +02:00
Jacob Barthelmeh
82fc96b7f3
adjust onHeap to be a bit field
2019-10-04 08:44:00 +07:00
tmael
197b22973b
Merge pull request #2490 from dgarske/riscv
...
Consolidate RISC-V examples and fix `make dist` file error
2019-10-03 15:08:49 -07:00
David Garske
12bf46296e
Consolidate RISC-V examples. Fix make dist file error.
2019-10-03 11:08:50 -07:00
David Garske
f5a4b82302
Merge pull request #2492 from ejohnstown/titan-cache
...
Titan Session Cache
2019-10-03 09:52:51 -07:00
John Safranek
177bab84e5
Synchronous Quick Assist Support for Sniffer
...
1. Add missing deinitializers for the QAT as the sniffer exits.
2019-10-03 09:15:50 -07:00
JacobBarthelmeh
df2c27af32
check on if free'ing ctx/method back to heap hint
2019-10-03 08:39:18 -07:00
John Safranek
c0a4143942
Titan Session Cache
...
1. Added a new build option for a TITAN session cache that can hold just over 2 million session entires.
2. Reordered the cache options from largest to smallest.
2019-10-02 14:36:38 -07:00
John Safranek
3b989329cd
Merge pull request #2491 from aaronjense/fix-shadow-ret
...
Fix shadow redeclaration
2019-10-02 12:17:35 -07:00
John Safranek
9a5eb1bb67
Synchronous Quick Assist Support for Sniffer
...
1. Add configure option for sync IntelQA that uses the crypto callback API.
2. Refactor the IntelQA configure checks so they are usable by both the sync and async options.
3. Make a synchonous copy of the quickassist files.
4. Replace the printfs in the code with a logging macro.
5. Added padding to the AES_KEY structure for WOLF_CRYPTO_CB.
6. Tie in the crypto device to the sniffer.
7. When setting up the symmetric operation, add a build case for the sniffer to use malloc instead of realloc. Sniffer usually uses the middle of another buffer for the input data rather than the beginning of the buffer as it has the TCP/IP data to handle as well.
8. Add the raw key to the DES3 structure.
9. Copy the functions from qa_mem over to qa_sync.
2019-10-02 10:08:46 -07:00
Aaron Jense
0340b323cd
Fix shadow redeclaration
2019-10-02 09:41:06 -06:00
Aaron Jense
91222bc887
Fix defines that aren't in configure.ac
2019-10-02 09:14:47 -06:00
David Garske
43e391528d
Merge pull request #2489 from ejohnstown/sniffer-etm
...
Sniffer and Encrypt-Then-Mac
2019-10-02 08:05:25 -07:00
Chris Conlon
ca817c50aa
Merge pull request #2481 from dgarske/nxp_mmcau
...
Improvements to SHA-1, SHA-256 and MD5 performance
2019-10-01 15:16:50 -06:00
John Safranek
7261ed8b6f
Sniffer and Encrypt-Then-Mac
...
The sniffer doesn't know how to deal with ETM. If the sniffer is enabled, disble ETM.
2019-10-01 13:00:55 -07:00
Sean Parkinson
901ee627fc
Fixes from using cppcheck tool
...
Various fixes for uninitialized variable use.
sniffer.c: close file when seek fails
tls.c: fix QSH_GET_SIZE macro
wolfio.c: uIPGenerateCookie: use the parameter, _ctx, instead of self
referencing.
wolfssl_adds.c: check for equivalent to XBADFILE to indicate error.
SP: change right shift of signed value to unsigned
sp_int.h: define 128-bit types
types.h: change a XMALLOC define to not use (,,) - cppcheck doesn't like
it and is unnecessary.
2019-10-01 09:22:00 +10:00
David Garske
ea68e146c7
Merge pull request #2487 from JacobBarthelmeh/Fuzzer
...
fix for infinite loop with CSR2
2019-09-30 10:38:26 -07:00
Kaleb Himes
caa5ba7551
Merge pull request #2411 from ejohnstown/wolfrand
...
wolfRand
2019-09-30 11:11:18 -06:00
Chris Conlon
056c374f85
Merge pull request #2486 from miyazakh/update_tisp_readme
...
update tsip porting readme
2019-09-30 10:07:46 -06:00
Jacob Barthelmeh
e7c2892579
fix for infinite loop with CSR2
2019-09-30 21:32:25 +07:00
Hideki Miyazaki
5486b535d1
update tsip readme
2019-09-29 17:09:08 +09:00
John Safranek
43476e80d4
Merge pull request #2462 from dgarske/webrtc
...
Support for Google WebRTC
2019-09-27 14:24:11 -07:00
Chris Conlon
ab4a78fdae
Merge pull request #2485 from aaronjense/HAproxy-defines
...
Fix defines for HAProxy build
2019-09-27 14:37:42 -06:00
David Garske
4c89a21d12
Updates from peer review. Refactor to combine some BIO elements into ptr. Revert change to BIO_set_fd.
2019-09-27 11:19:42 -07:00
David Garske
b47039b7ec
Fix for possible unused local32 warning.
2019-09-27 09:22:18 -07:00
Aaron Jense
bfa20c53b0
Fix defines for HAProxy build
2019-09-27 09:18:27 -06:00
David Garske
937a344682
Merge pull request #2484 from SparkiDev/armv8-x18-redo
...
Refix stopping use of x18 register
2019-09-26 18:55:59 -07:00
Sean Parkinson
5bcf54b9e2
Refix stopping use of x18 register
2019-09-27 09:41:54 +10:00
Sean Parkinson
1f393c9dde
Merge pull request #2483 from JacobBarthelmeh/BuildOptions
...
early data and enc-then-mac build fixes
2019-09-27 08:00:53 +10:00
David Garske
78f6bbcdb8
Adjusted the alignement macro to use WC_HASH_DATA_ALIGNMENT for shared settings across hash algos.
2019-09-26 11:53:24 -07:00
David Garske
6bfe6761d8
Disable the new hashing aligned build option by default. Does not increase performance... the memcpy is faster than the alignment check on modern CPU's. Embedded systems may benefit from this though, so leaving support for it in place.
2019-09-26 11:49:33 -07:00
David Garske
4c709f1f2c
Improvements to SHA-1, SHA-256 and MD5 performance:
...
* Added detection for buffer alignment to avoid memcpy.
* Added MD5 and SHA-1 support for XTRANSFORM_LEN to process blocks.
* Cleanups for consistency between algorithms and code commenting.
* Enhancement for NXP MMCAU to process more than one block at a time.
* Improved MMCAU performance: SHA-1 by 35%, SHA-256 by 20% and MD5 by 78%.
```
NXP K64 w/MMCAU after:
MD5 8 MB took 1.000 seconds, 7.910 MB/s
SHA 4 MB took 1.005 seconds, 3.644 MB/s
SHA-256 2 MB took 1.006 seconds, 2.306 MB/s
NXP K64 w/MMCAU before:
MD5 4 MB took 1.004 seconds, 4.450 MB/s
SHA 3 MB took 1.006 seconds, 2.670 MB/s
SHA-256 2 MB took 1.008 seconds, 1.913 MB/s
```
2019-09-26 11:32:59 -07:00
Eric Blankenhorn
a1b324f7f8
Adding sk_free support for CONF_VALUE
2019-09-26 11:28:59 -05:00
David Garske
9571f2fce8
Merge pull request #2447 from SparkiDev/sp_const
...
Change static globals to const where possible
2019-09-26 09:11:23 -07:00
David Garske
34e0eb498a
Fix for X509_set_subject_name and X509_set_issuer_name API unit test macro enables.
2019-09-26 08:42:35 -07:00
David Garske
606b76d06e
Fix for WPAS certificate size difference. Fix so BIO_METHOD is compatible. Moved BIO stuff into bio.h.
2019-09-26 08:42:35 -07:00
David Garske
a5f9d38c0d
Remove the BIO method custom... its not compat. Fix bio->ptr to be void*.
2019-09-26 08:42:35 -07:00
David Garske
872d222b59
* Adds the following openssl compatibility API's:
...
- SSL_CIPHER_get_id
- SSL_CIPHER_get_rfc_name
- SSL_get_cipher_by_value
- X509_print_ex
- X509_NAME_add_entry_by_NID
- X509_time_adj
- X509_time_adj_ex
- DTLSv1_get_timeout
- DTLSv1_handle_timeout
- DTLSv1_set_initial_timeout_duration
- SSL_CTX_set_current_time_cb
- PEM_write_bio_RSA_PUBKEY
- PEM_read_bio_RSA_PUBKEY
- PEM_write_bio_PUBKEY
- EVP_PKEY_missing_parameters
- EVP_PKEY_cmp
- BN_is_negative
- BIO_set_retry_write
* Improvements to the notBefore and notAfter date handling.
* Improvements to BIO and BIO_METHOD
- Moved structure to public area to allow for dereferencing
- Renamed members to provide compatibility.
- Added support for custom BIO methods for read/write.
* Added advanced openssl compatibility test cases for key and certificate generation.
* Fix for `ASN1_STRING_set` to allow NULL data.
* Fix to populate public key information on `EVP_PKEY_assign_RSA` and `EVP_PKEY_assign_EC_KEY`.
* Fix naming for `X509_get_notBefore` and `X509_get_notAfter` functions.
* Added `wc_EccPublicKeyDerSize`.
* Improvements to `wc_RsaPublicKeyDerSize`, so dummy memory doesn't have to be allocated.
* Made the `wc_*PublicKeyDerSize` functions public.
* Eliminate use of snprintf for UTC to generalized time conversion in `wolfSSL_ASN1_TIME_to_generalizedtime`.
2019-09-26 08:42:35 -07:00
Sean Parkinson
42d04a36d6
Change static globals to const where possible
...
Change parameters to functions to be const where possible (and
necessary).
2019-09-26 23:05:02 +10:00
Sean Parkinson
4a6925e2ef
Merge pull request #2480 from dgarske/nightly_20190925
...
Fixes for minor build issues
2019-09-26 17:34:21 +10:00
Jacob Barthelmeh
c6c7f67dfd
add check on AEAD only mode with enc-then-mac functions
2019-09-26 12:30:17 +07:00
Jacob Barthelmeh
8139fbd026
early data and enc-then-mac build fixes
2019-09-26 12:12:19 +07:00
Jacob Barthelmeh
f1b68873ef
add check on dependencies for tests
2019-09-26 11:43:12 +07:00
David Garske
02c5d36f72
Fixes for --enable-opensslextra or --enable-opensslall with NO_WOLFSSL_CLIENT or NO_WOLFSSL_SERVER defined.
2019-09-25 20:11:54 -07:00
David Garske
9d05e9c0b7
Fixes for minor nightly build tests.
2019-09-25 11:07:32 -07:00
David Garske
bcd8a521f5
Merge pull request #2479 from tmael/aes_gcm
...
Initialize AES GCM set key
2019-09-20 14:34:25 -07:00
Eric Blankenhorn
425548565f
Fix after rebase
2019-09-20 16:16:10 -05:00
Eric Blankenhorn
f01e943448
Adding support for STACKOF(CONF_VALUE)
2019-09-20 16:06:13 -05:00
Eric Blankenhorn
082d0e459d
Updates from review
2019-09-20 16:04:14 -05:00
Eric Blankenhorn
793df114f3
Adding stack object type support to sk_value
2019-09-20 16:02:58 -05:00
Tesfa Mael
74386fd0d0
Initialize GCM AAD in case wc_AesInit() wasn't called
2019-09-20 12:04:33 -07:00
John Safranek
b92509144b
Merge pull request #2475 from dgarske/qat_key
...
Fixes and improvements for async
2019-09-20 10:44:33 -07:00
Tesfa Mael
54cdab8005
Initialize AES GCM set key
2019-09-20 10:17:08 -07:00
Chris Conlon
8636bac12f
Merge pull request #2478 from miyazakh/fix_iar_build
...
Fix build failure on IAR EWRX
2019-09-20 09:01:56 -06:00
Sean Parkinson
3f10a37eda
Merge pull request #2477 from dgarske/keil_sp
...
Fixes for using Keil with single precision math.
2019-09-20 10:42:46 +10:00
David Garske
d762d2fa5d
Merge pull request #2450 from aaronjense/microsoft-azure-sphere
...
Visual Studio Solution for Azure Sphere Devices
2019-09-19 17:13:46 -07:00
cariepointer
2dafd2102c
Add Apache HTTP Server compatibility and --enable-apachehttpd option ( #2466 )
...
* Added Apache httpd support `--enable-apachehttpd`.
* Added `SSL_CIPHER_get_version`, `BIO_new_fp`, `SSL_SESSION_print` and `SSL_in_connect_init` compatibility API's.
* Fix to expose `ASN1_UTCTIME_print` stub.
* Pulled in `wolfSSL_X509_get_ext_count` from QT.
* Added `X509_get_ext_count`, `BIO_set_callback`, `BIO_set_callback_arg` and `BIO_get_callback_arg`.
* Added `wolfSSL_ERR_print_errors`.
* Added `BIO_set_nbio` template.
* Fixes for building with Apache httpd.
* Added DH prime functions required for Apache httpd.
* Fix and move the BN DH prime macros.
* Fix for `SSL_CTX_set_tlsext_servername_arg` to have return code.
* Only add the `BN_get_rfc*_prime_*` macro's if older than 1.1.0.
* Added `ERR_GET_FUNC`, `SSL_CTX_clear_extra_chain_certs` prototypes.
* Added `wolfSSL_CTX_set_client_cert_cb` template and `OPENSSL_load_builtin_modules` stub macro.
* Added `X509_INFO` templates (`X509_INFO_new`, `X509_INFO_free`, `sk_X509_INFO_new_null`, `sk_X509_INFO_num`, `sk_X509_INFO_value`, `sk_X509_INFO_free`). Added `sk_X509_shift`.
* Added BIO_set_callback, BIO_get_callback, BIO_set_callback_arg, BIO_get_callback_arg
* add BIO_set_nbio, ERR_print_errors and tests
* add X509 INFO stack push function
* Add ASN1_UTCTIME_print and unit test
* Add X509_get_ext_count unit test
* initial commit of wolfSSL_PEM_X509_INFO_read_bio
* Added `sk_X509_NAME_new`, `sk_X509_NAME_push`, `sk_X509_NAME_find`, `sk_X509_NAME_set_cmp_func` and `sk_X509_NAME_free`. Grouped `sk_X509_NAME_*` functions.
* Cleanup sk X509 NAME/INFO pop free template.
* Advance openssl compatibility to v1.1.0 for Apache httpd. Added TLS version macros. Implemented sk X509 NAME/INFO pop and pop_free.
* Added `TLS_client_method` support.
* Added `SSL_get_server_tmp_key` and `EC_curve_nid2nist`.
* Added `SSL_CTX_set_min_proto_version` and `SSL_CTX_set_max_proto_version`. Fix for `BN_get_rfc*_prime_*` with the v1.1.0 change.
* add test cases for PEM_X509_INFO_read_bio
* Fixes for `BN_get_rfc*_prime_*` macros. Added template for `SSL_DH_set0_pqg`. Fix for `SSL_OP_NO_` to use Macro's (as is done in openssl). Added `SSL_set_verify_result`. Added stub for `OPENSSL_malloc_init`.
* Apache httpd compatibility functions. BIO setter/getters.
* implement ASN1_TIME_check and add test case
* add SSL_get_client_CA_list
* add initial implementation of wolfSSL_DH_set0_pqg
* Add apache support to OBJ_txt2nid and unit test, add stub for OBJ_create
* add X509_STORE_CTX_get1_chain, sk_free, sk_X509_dup
* Add sk_SSL_COMP_num and SSL_COMP struct
* implement and test of SSL_SESSION_print
* add SSL_CTX_set_client_cert_cb
* expand BIO_printf and add test case
* Added `OCSP_CERTID_dup`. Added `ASN1_TYPE`.
* add implementation for wolfSSL_get_server_tmp_key
* add wolfSSL_BIO_puts and test case
* Add X509_EXTENSION_get_object and X509_EXTENSION_get_data
* add helper for bio flag set and null x509 stack
* add test adn implementation for wolfSSL_i2d_PrivateKey
* Added `ASN1_OTHERNAME`, `ACCESS_DESCRIPTION` and `GENERAL_NAME`. Added `sk_ACCESS_DESCRIPTION_pop_free` and `ACCESS_DESCRIPTION_free` stubs.
* add wolfSSL_PEM_read_bio_ECPKParameters
* add BIO_vfree
* add X509_up_ref
* add X509_STORE_CTX_set_ex_data
* add _GNU_SOURCE macro and wolfSSL_EVP_read_pw_string
* add wolfSSL_EVP_PKEY_ref_up function
* X509_get_ext, X509V3_EXT_print, and d2i_DISPLAYTEXT stubs
* add X509_set_issuer_name
* add wolfSSL_sk_SSL_CIPHER_* functions and tests
* add prototype for sk_X509_EXTENSION and ACCESS_DESCRIPTION
* fix casting to avoid clang warning
* adjust test_wolfSSL_X509_STORE_CTX test case
* Added `OpenSSL_version`
* renegotiate functions and additional stack functions
* add aditional stub functions
* Add Apache httpd requirements for ALPN, CRL, Cert Gen/Req/Ext and SecRen. Fix for `sk_X509_INFO_new_null`.
* add ocsp stub functions
* Proper fix for `sk_X509_INFO_new_null`. Added templates for `X509_get_ext_by_NID` and `X509_add_ext`. Added templates for `ASN1_TIME_diff` and `ASN1_TIME_set`.
* x509 extension stack additions
* Fixed template for `OCSP_id_get0_info`.
* add X509 stub functions
* add X509_STORE_CTX_get0_store() and unit test
* Added `EVP_PKEY_CTX_new_id`, `EVP_PKEY_CTX_set_rsa_keygen_bits`, `EVP_PKEY_keygen_init`, `EVP_PKEY_keygen` and `BN_to_ASN1_INTEGER`.
* x509v3 stubs and req add extensions
* Add OBJ_txt2obj and unit test; add long name to wolfssl_object_info table for use by OBJ_* functions
* wolfSSL_set_alpn_protos implementation
* Added `EVP_SignInit_ex` and `TLS_server_method` implementation. Added stubs for `RSA_get0_key` and `i2d_OCSP_REQUEST_bio`. Fix typo on `OCSP_response_create`. Fix warning in `wolfSSL_set_alpn_protos`.
* Added `X509_EXTENSION_free` stub. Fixed a few macro typos/adding missing.
* add X509_STORE_CTX_get0_current_issuer and unit test
* add OBJ_cmp and unit test
* add RSA_get0_key and unit test
* add OCSP_check_nonce
* Implement X509_set_notAfter/notBefore/serialNumber/version,X509_STORE_CTX_set_depth,X509V3_set_ctx.
* Modify wolfSSL_X509_set_notAfter/notBefore and add tests for each.
* Add test_wolfSSL_X509_set_version w/ fixes to _set_version and fix _set_notBefore/notAfter tests
* add OCSP_id_get0_info and unit test, move WOLFSSL_ASN1_INTEGER to asn_public.h from ssl.h
* inital implementation of wolfSSL_X509_sign
* add debugging messages and set data for BIO's
* Add i2d_OCSP_REQUEST_bio.
* implementation of some WOLFSSL_BIO_METHOD custom functions
* fix for ASN time structure and remove log node
* initial eNULL support and sanity checks
* fixes after rebasing code
* adjust test cases and ASN1_TIME print
* Various fixes for memory leaks
* Apache compatibility in CTX_set_client_CA_list for X509_NAME use; add X509_NAME_dup as supporting function
* Add initial X509_STORE_load_locations stub for Apache
* Updates to X509_get_ext_d2i to return GENERAL_NAME struct instead of ASN1_OBJECT for alternative names and add supporting GENERAL_NAME functions
* Add X509_STORE_load_locations implementation; add wolfSSL_CertManagerLoadCRL_ex; initial renegotiation fixes/updates
* Fix for freeing peer cert in wolfSSL_Rehandshake instead of FreeHandShakeResources during secure renegotiation
* Add X509_ALGOR and X509_PUBKEY structs for X509_PUBKEY_get0_param and X509_get_X509_PUBKEY implementation
* Initial implementation of wolfSSL_X509_get_X509_PUBKEY and wolfSSL_X509_PUBKEY_get0_param
* Add implementation for X509_get0_tbs_sigalg and X509_ALGOR_get0
* Add OBJ_nid2ln implementation
* Fix compile errors in tests/api.c for some build options
* Updates to X509_STORE_load_locations for non-CRL types; Add additional DETECT_CERT_TYPE enum and logic for detecting certificate type in ProcessFile
* Add X509_STORE_load_locations unit test and minor error handling fixes
* Add unit test for X509_sign
* Set correct alert type for revoked certificates; add/fix a few WOLFSSL_ENTER messages
* Add X509_ALGOR member to X509 struct; refactoring and unit tests for wolfSSL_X509_ALGOR_get0 and wolfSSL_X509_get0_tbs_sigalg
* Add X509_PUBKEY member to X509 struct; refactoring and unit tests for wolfSSL_X509_get_X509_PUBKEY and wolfSSL_X509_PUBKEY_get0_param
* Stack fixes after rebase
* Secure renegotiation refactoring: add ACCEPT_BEGIN_RENEG to AcceptState for use in wolfSSL_SSL_in_connect_init; free old peer cert when receiving new cert to fix memory leak
* Move enc-then-mac enable option in configure.ac for apache httpd compatibility
* Simplify wolfSSL_SSL_in_connect_init logic
* Remove unneeded wolfSSL_CertManagerLoadCRL_ex
* Fixes for jenkins test failures
* SSL_get_secure_renegotiation_support for print statement in Apache
2019-09-19 17:11:10 -07:00
Hideki Miyazaki
2f818f9508
Fix build failure on IAR EWRX
2019-09-20 09:07:51 +09:00
Sean Parkinson
dfc00bf057
Merge pull request #2476 from dgarske/pkcb_tls13
...
Fix for TLS v1.3 and PK callbacks
2019-09-20 08:10:43 +10:00
David Garske
3b6112e317
Fixes for using Keil with single precision math.
2019-09-19 14:34:30 -07:00
toddouska
c16b02a265
Merge pull request #2471 from dgarske/test_date_override
...
Fix for verify callback override not adding to trusted CA list
2019-09-19 13:54:24 -07:00
Chris Conlon
33a83cdba0
Merge pull request #2436 from miyazakh/Renesas_TSIP_Port
...
Support renesas tsip
2019-09-19 14:44:33 -06:00
toddouska
2dbf3f81fc
Merge pull request #2474 from SparkiDev/sp_int_prime
...
Add support for prime checking to sp_int.c
2019-09-19 13:44:22 -07:00
toddouska
fd1d65c4f9
Merge pull request #2470 from SparkiDev/build-fixes
...
Fixes from overnight build failures
2019-09-19 13:38:25 -07:00
toddouska
cc452adff1
Merge pull request #2465 from JacobBarthelmeh/Fuzzer
...
sanity check on length before read
2019-09-19 13:34:42 -07:00
David Garske
523b1801ed
Cleanup of the wc_ecc_sign_hash function to separate the async logic. This improves the ECC r/s local case to appease static analyzers. Fixes https://github.com/wolfSSL/wolfssl/issues/2342 .
2019-09-19 13:33:02 -07:00
John Safranek
ab86e78cbe
Merge pull request #2458 from JacobBarthelmeh/Certs
...
macro guards for re-defines
2019-09-19 12:54:26 -07:00
David Garske
6aecdf59c1
Fixes for async build and tests.
2019-09-19 12:30:05 -07:00
David Garske
ae25027135
Fix for TLS v1.3 and PK callbacks.
2019-09-19 12:07:14 -07:00
David Garske
1493b94b27
Eliminate async NUMA allocation for wc_ecc_gen_k. Additional DECLARE_VAR checks. Improve mp_rand to avoid alloc in async case.
2019-09-19 11:34:59 -07:00
Jacob Barthelmeh
f532143094
adjust CheckASNTag to be GetASNTag
2019-09-19 02:09:51 -06:00
Hideki Miyazaki
5c5aa45a5e
addressed review comments
...
tsip_usable() reconstruction
2019-09-19 14:35:23 +09:00
Hideki Miyazaki
a37b604da9
addressed review comments
2019-09-19 11:18:52 +09:00
Hideki Miyazaki
63d61c490d
addressed review comments
2019-09-19 11:18:52 +09:00
Hideki Miyazaki
a6b2d1621b
Free memory for a msg buffer when calling wc_ShaxxxFree()
2019-09-19 11:18:52 +09:00
Hideki Miyazaki
778a2065ab
Replaced key information by dummy data
2019-09-19 11:18:52 +09:00
Hideki Miyazaki
cb0184fe98
update Readme, added file header etc
2019-09-19 11:18:52 +09:00
Hideki Miyazaki
a292e69d3f
update readme
2019-09-19 11:18:52 +09:00
Hideki Miyazaki
5c6f6fdb7d
Renesas TSIP Support
...
merged from private repo
removed unneccessary #include
make line as 80 characters
added simple tls server
Disable TLS-linked API use when being SERVER SIDE, still use certificate verify API
Added utility tools, generate signature arrays etc
added vars to store tsip hmac keys
fix build failure when disabling dc_printf
2019-09-19 11:18:52 +09:00
Sean Parkinson
0bc16d47e2
Add support for prime checking to sp_int.c
...
This allows SP to support:
- DH parameter checking
- DH parameter generation
- RSA key generation
Improved performance of sp_mod operation.
Reworked some functions to have one exit point (return statement).
Fixed sp_sub_d().
Changed tests to perform 2048-bit RSA key generation only when using SP
math.
Fixed Intel x86_64 C file to not have DH specific functions available
unless WOLFSSL_HAVE_SP_DH is defined.
Fixed tfm to return an error when t is not the correct size in
fp_isprime_ex().
2019-09-19 09:08:15 +10:00
Aaron Jense
bdbe0943cf
Add function to print network interface and IP Address
2019-09-18 19:57:19 +01:00
Aaron Jense
4ef8f53c9e
PR Review Changes
...
1. Add more documentation
2. Add cleanup functions for client and server before return
3. Add the ability for client to use a hostname for SERVER_IP
2019-09-17 14:59:43 -06:00
toddouska
946a0f593f
Merge pull request #2472 from SparkiDev/enc_then_mac_fix
...
Enc-Then-MAC: when message size is less than digest size return error
2019-09-17 08:57:26 -07:00
Chris Conlon
f0e774d1e1
Merge pull request #2420 from kojo1/KDS-proj
...
add KDS sample project
2019-09-17 11:53:04 -04:00
Chris Conlon
bdad0fa53f
Merge pull request #2443 from miyazakh/fix_esp_examples
...
Fixed examples for esp-idf
2019-09-17 11:47:39 -04:00
David Garske
0e5de0c076
Fix to only AddCA when its CA type and veryNone is not set.
2019-09-17 07:56:02 -07:00
Sean Parkinson
2c2907c2a5
Enc-Then-MAC: when message size is less than digest size return error
2019-09-17 11:23:43 +10:00
David Garske
b7c08988dc
Fix for verify callback override of intermediate CA provided by peer not being added to trusted CA list.
...
Feature: Added support for testing date override at build-time using `TEST_BEFORE_DATE`.
```
./examples/server/server -H overrideDateErr -A ./certs/ca-cert.pem -k ./certs/server-key.pem -c ./certs/intermediate/server-chain.pem &
./examples/client/client -D -A ./certs/ca-cert.pem -k ./certs/client-key.pem -c ./certs/intermediate/client-chain.pem
```
2019-09-16 14:47:55 -07:00
Jacob Barthelmeh
708556d5c7
adjust sha3 typedef
2019-09-16 10:40:56 -06:00
Jacob Barthelmeh
3b7b81fea7
add local CheckASNTag function
2019-09-15 23:06:11 -06:00
David Garske
326f02d76d
Fix for buffer overrun check logic.
2019-09-15 23:04:13 -06:00
Jacob Barthelmeh
e6c48327c1
sanity check on length before read
2019-09-15 23:04:13 -06:00
Sean Parkinson
000fc64f27
Fixes from overnight build failures
...
ssl.c: Certificate store fields freed without being NULLed and then
freed again.
integer.c: Compiler complained that a->dp may be NULL in mp_set_bit when
setting bit.
pkcs12.c: ret is zero after GetLength and this is an error but data is
freed only when ret != 0.
pkcs7.c: derArr was not zeroized for full allocated size.
2019-09-16 10:21:08 +10:00
toddouska
9d69f17f17
Merge pull request #2468 from tmael/RSA_inline
...
Fix for RSA inline
2019-09-13 13:46:33 -07:00
toddouska
9d3d170411
Merge pull request #2456 from dgarske/freedom_unleashed
...
Support for SiFive HiFive Unleashed board
2019-09-13 11:58:11 -07:00
toddouska
40fc86dfd2
Merge pull request #2464 from SparkiDev/rshift_neg
...
Use constant time comparison in MaskMac with scanStart and macStart
2019-09-13 11:56:12 -07:00
toddouska
a2d3da2831
Merge pull request #2463 from ejohnstown/maintenance-dtls
...
Maintenance DTLS
2019-09-13 11:53:20 -07:00
toddouska
6894dde4e9
Merge pull request #2460 from dgarske/debug_buffer
...
Improvements to `WOLFSSL_BUFFER` function
2019-09-13 11:49:20 -07:00
John Safranek
b70f22e21a
1. Use the session deallocator on the deserialized session in the client.
...
2. Free the flatten session if the size check fails.
2019-09-12 16:04:34 -07:00
Chris Conlon
09541082d6
Merge pull request #2416 from kojo1/OCSP-error
...
Detail error code
2019-09-12 16:51:34 -04:00
Tesfa Mael
4e62d1f509
Fix for RSA inline
2019-09-11 22:57:54 -07:00
John Safranek
c27a4b3865
TLS Maintenance
...
When serializing the WOLFSSL_SESSION, serialize everything.
2019-09-11 16:44:54 -07:00
John Safranek
852d50adcf
DTLS Maintenance
...
To go with the fix for the functions wolfSSL_(i2d|d2i)_SSL_SESSION,
modify the example client to use a serialized session record for
resumption instead of the direct reference into the session cache. This
change only happens when OPENSSL_EXTRA and HAVE_EXT_CACHE are defined.
2019-09-11 15:29:57 -07:00
Sean Parkinson
2a1a9f36cc
Use constant time comparison in MaskMac with scanStart and macStart
...
Right shift of a negative value is undefined.
Add an 'int' return version of constant time greater than equal.
Change equal and not equal to be constant time in more situations.
2019-09-11 10:57:23 +10:00
David Garske
ed06f34f55
Updated benchmarks running at 1.5GHz (default is 1 GHz).
2019-09-10 16:09:18 -07:00
John Safranek
22c398494e
DTLS Maintenance
...
The options to switch on and off the code to serialize/deserialize items
in the struct need to match the options for the struct.
(ZD5130, ZD5590)
2019-09-10 16:01:48 -07:00
John Safranek
e93e3b60da
DTLS Maintenance
...
Allow the DTLS server to retransmit a stored flight of messages in an additional acccept state.
(ZD5644)
2019-09-10 11:51:38 -07:00
David Garske
def36ddfe8
Added instructions for installing Debian on Unleashed board.
2019-09-10 09:16:35 -07:00
David Garske
66b76a4420
Improvements to WOLFSSL_BUFFER function to eliminate recursive call and use snprintf for string safety. Adds support for build-time change of LINE_LEN.
2019-09-10 08:57:35 -07:00
David Garske
645f8ddd31
Update RISC 64-bit detection to use __riscv_xlen.
2019-09-10 07:47:28 -07:00
Jacob Barthelmeh
eb2aa3dce1
macro guards for re-defines
2019-09-09 19:24:45 -06:00
toddouska
99252cc936
Merge pull request #2399 from dgarske/ovs
...
Compatibility changes for OpenVSwitch
2019-09-09 16:02:27 -07:00
David Garske
95d3289fa2
Merge pull request #2437 from kaleb-himes/ZD_5546_IAR_CC_CHECK
...
Fix failing IAR builds, thanks to Joseph C. for the report
2019-09-09 11:42:19 -07:00
Aaron Jense
88036db223
Visual Studio Solution for Azure Sphere Devices
2019-09-09 10:50:56 -06:00
David Garske
ab5c12fd17
Added parenthesis around types.h pointer size macro.
2019-09-09 09:01:18 -07:00
David Garske
c0317ad198
Fix to only expose SSL_want when OPENSSL_EXTRA is defined.
2019-09-09 08:07:30 -07:00
David Garske
342d03a294
Added SSL_want.
2019-09-09 08:07:30 -07:00
David Garske
2cf26a1353
Compatibility changes for OpenVSwitch.
2019-09-09 08:07:30 -07:00
julek-wolfssl
c52801754c
Fips ready ( #2422 )
...
* Changes to update stunnel support
* Required additions for building fips-ready with speedups
* Fix SetASNIntRSA
2019-09-09 02:47:02 -07:00
julek-wolfssl
02419e248f
Fix clang 3.8 arm ( #2449 )
...
* Fix 'value size does not match register size' error in clang with arm assembly
* More readable casting
2019-09-09 02:46:48 -07:00
Hideki Miyazaki
87d0c70695
erase compiler complaint, not used var
2019-09-09 08:25:02 +09:00
Hideki Miyazaki
7433b20d43
renamed wolfSSL_CTX_IsPrivatePkSetForkeyType to wolfSSL_IsPrivatePkSet
2019-09-09 08:25:02 +09:00
Hideki Miyazaki
348be7fb00
Fix jankis test, known customer config. complaining unused var
2019-09-09 08:25:02 +09:00
Hideki Miyazaki
82d531562c
Fixed build warnings due to esp-idf update
...
Fixed server application TLS communicatio failure
2019-09-09 08:25:02 +09:00
julek-wolfssl
4c88d94d13
Chacha20 and poly1305 without x18 ( #2454 )
...
* Remove use of x18 and organize new optimizations
* Fix invalid operand
2019-09-08 16:03:04 -07:00
Sean Parkinson
afb15f6521
Merge pull request #2455 from JacobBarthelmeh/HardwareAcc
...
change detection of AESNI support to read bit 25 from ECX
2019-09-09 08:29:00 +10:00
David Garske
ebe99cf5ef
Support for SiFive HiFive Unleashed board.
2019-09-06 16:04:34 -07:00
toddouska
37328544ad
Merge pull request #2453 from SparkiDev/armv8_x18
...
ARM64 assembly - x18 not able to be used
2019-09-06 15:45:02 -07:00
toddouska
85b123046b
Merge pull request #2377 from SparkiDev/sha2_cs_oldtls
...
Disallow SHA-2 ciphersuites from TLS 1.0 and 1.1 handshakes
2019-09-06 15:41:15 -07:00
Sean Parkinson
3e12d260b8
ARM64 assembly - x18 not able to be used
...
Fix Curve25519/Ed25519, SHA-512 and SP code to not use x18.
2019-09-06 15:49:24 +10:00
Sean Parkinson
a975ba9e97
Disallow SHA-2 ciphersuites from TLS 1.0 and 1.1 handshakes
2019-09-06 09:31:14 +10:00
Jacob Barthelmeh
171902f1fb
change detection of AESNI support to read bit 25 from ECX
2019-09-05 17:02:44 -06:00
David Garske
1785089798
Merge pull request #2433 from kaleb-himes/ZD_5602_MINGW_XSNPRINTF
...
Resolve XSNPRINTF unconditional use in asn.c breaking mingw32 builds
2019-09-05 11:37:21 -07:00
toddouska
d6685edfa0
Merge pull request #2440 from SparkiDev/tlsfuzzer_fixes
...
Fixes for fuzz testing
2019-09-05 09:01:10 -07:00
toddouska
eaeaaf12c1
Merge pull request #2446 from SparkiDev/gplusplus_fix_1
...
Fixes for g++ compilation
2019-09-04 16:28:42 -07:00
toddouska
bf7296aefb
Merge pull request #2438 from SparkiDev/armv8-poly1305-clang
...
Fix ARMv8 Poly1305 inline assembly code to compile with clang 3.5
2019-09-04 16:28:02 -07:00
Sean Parkinson
56df8162bd
Fixes for g++ compilation
2019-09-04 10:09:36 +10:00
toddouska
b35fd4f1aa
Merge pull request #2441 from JacobBarthelmeh/UnitTests
...
strncpy gcc warning fixes
2019-09-03 15:44:10 -07:00
toddouska
0927f93b07
Merge pull request #2442 from JacobBarthelmeh/HardwareAcc
...
build fix for aesccm + devcrypto=cbc + wpas and afalg
2019-09-03 15:42:41 -07:00
toddouska
b19e785c2c
Merge pull request #2418 from dgarske/sha3_keccak256
...
Added support for older KECCAK256
2019-09-03 15:42:05 -07:00
toddouska
492ce6ac91
Merge pull request #2414 from dgarske/pkcs8_asn1
...
Added support for loading a PKCS8 ASN.1 formatted private key
2019-09-03 15:36:31 -07:00
Jacob Barthelmeh
03967d62f4
sanity check on resulting ecc size
2019-09-03 10:54:11 -06:00
Sean Parkinson
46790080a7
Fix ARMv8 Poly1305 inline assembly code to compile with clang 3.5
2019-09-02 09:52:25 +10:00
Sean Parkinson
60befc82c5
Fixes for fuzz testing
...
Changes
- Don't ignore decryption errors when doing TLS 1.3 and after Client
Finished.
- Put out an alert when TLS 1.3 decryption fails.
- Properly ignore RSA pss_pss algorithms when checking for matching
cipher suite.
- Check X25519 public value before import in TLS v1.2-
- REcognise TLS 1.3 integrity-only cipher suites as not negotiable with
TLS 1.2-.
- Send decode_error alert when bad message data in CertificateVerify.
- Negotiate protocol version in TLS 1.3 using extension and keep
decision when using TLS 1.2 parsing.
- Must have a signature algorithms extension in TLS 1.3 if not doing
PSK.
- More TLS v1.3 alerts.
- MAX_PSK_ID_LEN needs to be modified at compile time for tlsfuzzer to
work.
- change the good ecc public key to be a real public key when compiled
to check imported public keys
- Fix early data in TLS 1.3
- Make max early data size able to be changed at compile time - default
4K but fuzzer sends 16K
- Fix HRR, PSK and message hashes: Don't initialize hashes in parsing
ClientHello as need to keep hash state from previous ClientHello and
HelloRetryRequest
2019-09-02 08:58:14 +10:00
Jacob Barthelmeh
9fd38dc340
build fix for aesccm + devcrypto=cbc + wpas and afalg
2019-08-30 16:15:48 -06:00
Jacob Barthelmeh
2a750cd18d
strncpy gcc warning fixes
2019-08-30 13:34:51 -06:00
toddouska
ef20276ab5
Merge pull request #2424 from SparkiDev/enc_then_mac
...
Add support for Encrypt-Then-MAC to TLS 1.2 and below
2019-08-30 11:09:04 -07:00
toddouska
adc548fc61
Merge pull request #2428 from ejohnstown/ecckey-test-fix
...
Fix ECC key decode test
2019-08-30 11:07:00 -07:00
toddouska
347a859ffc
Merge pull request #2435 from JacobBarthelmeh/SanityChecks
...
sanity check on ticket encrypt callback
2019-08-30 10:18:58 -07:00
Chris Conlon
09f80c7f5f
Merge pull request #2439 from miyazakh/fix_espidf_issues
...
Fix build warnings while compiling wolfssl under esp-idf
2019-08-29 16:24:42 -06:00
toddouska
db2468154f
Merge pull request #2434 from tmael/phase2_compatibility_APIs
...
Adding phase 2 compatibility APIs
2019-08-29 12:26:27 -07:00
tmael
b8d2ccee83
Merge branch 'master' into phase2_compatibility_APIs
2019-08-29 09:16:41 -07:00
toddouska
9034e3a0fe
Merge pull request #2432 from embhorn/api_p2
...
Adding compatibility API phase 2
2019-08-29 09:05:01 -07:00
Juliusz Sosinowicz
5f77627857
Fix SetASNIntRSA
2019-08-29 16:24:09 +02:00
Hideki Miyazaki
d6bac37def
Fix build warnings while compiling wolfssl under esp-idf
2019-08-29 17:44:44 +09:00
Sean Parkinson
24e98dd05e
Add support for Encrypt-Then-MAC to TLS 1.2 and below
...
An extension is used to indicate that ETM is to be used.
Only used when doing block ciphers - HMAC performed on encrypted data.
2019-08-29 09:00:30 +10:00
Tesfa Mael
87e876d8c6
Match padding macro values and restore EVP non-AES-GCM
2019-08-28 15:45:07 -07:00
kaleb-himes
46b4654564
Fix failing IAR builds, thanks to Joseph C. for the report
2019-08-28 12:44:05 -06:00
Tesfa Mael
a76f719aac
Fix review comment
2019-08-28 10:42:57 -07:00
JacobBarthelmeh
411f15bec3
Merge pull request #2429 from cconlon/cmssig
...
Add internal PKCS7 content digest check
2019-08-28 09:41:10 -06:00
Eric Blankenhorn
0c9ba1b361
Adding compatibility API phase 2
2019-08-28 09:29:49 -05:00
Tesfa Mael
625c3074b9
Review comments, sanity check
2019-08-27 17:06:36 -07:00
Tesfa Mael
59dddda3a9
Updated with review comments
2019-08-27 15:37:00 -07:00
Tesfa Mael
dc5d11fef4
Updated with review comments
2019-08-27 15:14:58 -07:00
John Safranek
7fcb85b743
ECC-FP Cache Memory Leak
...
Each test case for ECC should be cleaning up the FP cache if it uses
the cache. Only a couple cases were getting freed.
2019-08-27 14:43:25 -07:00
David Garske
4ec90be4d6
Added --enable-hashflags option.
2019-08-27 13:28:33 -07:00
toddouska
a49f447e47
Merge pull request #2413 from dgarske/load_ca_nodate
...
Refactor of the verify option for processing X.509 files
2019-08-27 13:20:30 -07:00
Chris Conlon
e6252a94ce
check attrib->value and attrib->valueSz before use
2019-08-27 14:18:23 -06:00
Tesfa Mael
f9e364f893
Updated wolfSSL_EVP_Cipher() for AES GCM
2019-08-27 11:36:39 -07:00
Jacob Barthelmeh
10431738c7
sanity check on ticket encrypt callback
2019-08-27 11:41:27 -06:00
Tesfa Mael
208e9f3fcf
Fix Windows build
2019-08-27 08:49:27 -07:00
Tesfa Mael
e9d1f32441
Fix Windows build
2019-08-27 08:11:31 -07:00
Tesfa Mael
e8f468e2cf
correct ifdef directive
2019-08-26 19:17:41 -07:00
Tesfa Mael
00dadafddb
Add HAVE_FAST_RSA around RSA_print()
2019-08-26 16:54:10 -07:00
Kaleb Himes
6f9210d6af
Peer review feedback changes
...
Case ```__GNUC__``` already covered, just check for MINGW or CYGWIN cases now.
2019-08-26 16:53:52 -06:00
Tesfa Mael
b2555d38bc
Jenkins PRB enable options test
2019-08-26 15:43:58 -07:00
Tesfa Mael
9b3fee223f
Typecast to correct type
2019-08-26 14:17:13 -07:00
Tesfa Mael
6311ae425c
RSA_generate_key() needs WOLFSSL_KEY_GEN
2019-08-26 13:47:54 -07:00
toddouska
0f60ee8a85
Merge pull request #2402 from schlatterbeck/master
...
Fixes for 16-bit systems
2019-08-26 12:41:47 -07:00
Tesfa Mael
5e28dd94a2
OpenSSL compatible APIs:
...
ASN1_STRING_type
EVP_aes_128_gcm
EVP_CIPHER_CTX_ctrl
EVP_PKEY_sign
EVP_PKEY_sign_init
RSA_print
RSA_NO_PADDING
RSA_PKCS1_PSS_PADDING
2019-08-26 12:20:18 -07:00
kaleb-himes
ea4e7b2669
Resolve XSNPRINTF unconditional use in asn.c breaking mingw32 builds
2019-08-26 13:19:53 -06:00
Chris Conlon
256ac4a515
Merge pull request #2427 from miyazakh/fix_espbuild_failure
...
fix uninitialized var for esp idf build failure fix
2019-08-26 10:11:44 -06:00
Chris Conlon
61d01ab7f3
add unit test for PKCS7 invalid detached content
2019-08-26 09:43:20 -06:00
David Garske
76b9476b9a
Remove debug printf.
2019-08-23 16:24:45 -07:00
David Garske
99329b0fc4
Improvements to the CRL verify handling.
2019-08-23 16:09:39 -07:00
Chris Conlon
12687e5a2a
internally check PKCS7 content digest against messageDigest attribute
2019-08-23 16:40:12 -06:00
toddouska
2c97b040ff
Merge pull request #2419 from dgarske/ctx_sec_reneg
...
Adds use secure renegotiation at CTX level
2019-08-23 12:55:30 -07:00
toddouska
1bad2bed3c
Merge pull request #2404 from dgarske/strict_cipher
...
Added strict cipher suite check on client server_hello processing
2019-08-23 12:42:57 -07:00
toddouska
681de3e41a
Merge pull request #2375 from dgarske/stm32_cubemx_halv2
...
Fixes for STM32F7 and latest CubeMX HAL
2019-08-23 12:28:51 -07:00
toddouska
6209e8ff24
Merge pull request #2412 from JacobBarthelmeh/PKCS12
...
adjust wc_i2d_PKCS12 API
2019-08-23 10:30:04 -07:00
Juliusz Sosinowicz
63538fedde
Required additions for building fips-ready with speedups
2019-08-23 10:22:31 -07:00
toddouska
54fb08d6df
Merge pull request #2426 from JacobBarthelmeh/Fuzzer
...
sanity check on buffer size before reading short
2019-08-23 10:17:31 -07:00
John Safranek
2ba6c66d44
Fix ECC key load test
...
When using the configure options '--enable-certgen --enable-certext CPPFLAGS=-DWOLFSSL_VALIDATE_ECC_IMPORT', the ecc_decode_test() will fail the "good" test case. It is using the point (1, 1) in the test, and that fails the key validation. Changed the good key to one of the keys we have in the certs directory. The additional validation checks that the point is on the curve, and is validated in FIPS mode.
2019-08-22 14:18:59 -07:00
Hideki Miyazaki
8b2a1f13c4
fix uninitialized ver for esp idf build failure fix
2019-08-23 06:08:11 +09:00
David Garske
0e6bb4717e
Merge pull request #2425 from JacobBarthelmeh/SanityChecks
...
sanity check on buffer size
2019-08-22 12:30:06 -07:00
Jacob Barthelmeh
b83aebafb1
help out static analysis tool
2019-08-22 11:49:10 -06:00
Jacob Barthelmeh
65aeb71d6c
sanity check on buffer size before reading short
2019-08-22 11:36:35 -06:00
Jacob Barthelmeh
c6e4aebcdf
sanity check on buffer size
2019-08-22 09:23:02 -06:00
David Garske
cf83561b64
Merge pull request #2417 from SparkiDev/sp_mod_exp_cast_fix
...
SP Mod exp cast fix
2019-08-22 05:55:27 -07:00
David Garske
6544b5df88
Merge pull request #2423 from SparkiDev/fe_math_mac
...
Curve25519/Ed25519 x86_64 assembly working on Mac again
2019-08-22 05:54:49 -07:00
Sean Parkinson
132f60e77f
Curve25519/Ed25519 x86_64 assembly working on Mac again
2019-08-22 09:27:39 +10:00
Juliusz Sosinowicz
37f1522825
Changes to update stunnel support
2019-08-21 16:18:04 -07:00
Juliusz Sosinowicz
05d86ade20
Merge remote-tracking branch 'wolfSSL/master'
2019-08-21 16:17:55 -07:00
David Garske
e298b3290d
Fix to initialize hash flag.
2019-08-21 06:36:37 -07:00
Takashi Kojo
7deab4c54f
add KDS sample project
2019-08-21 11:12:09 +09:00
David Garske
67c3751836
Adds new wolfSSL_CTX_UseSecureRenegotiation API for setting secure renegotiation at the WOLFSSL_CTX level.
2019-08-20 16:43:28 -07:00
David Garske
a5d222a20e
Make public the hash set/get flags functions.
2019-08-20 16:25:48 -07:00
David Garske
154930d128
Added support for older KECCAK256 used by Ethereum. Uses existing hash flag API's.
...
To use add build flag `CFLAGS="-DWOLFSSL_HASH_FLAGS"`.
Example:
```c
wc_Sha3_SetFlags(&sha, WC_HASH_SHA3_KECCAK256);
```
2019-08-20 16:14:37 -07:00
David Garske
24bfea1ad2
Fixes for various build options (!NO_RSA, HAVE_ECC, NO_PKCS8, NO_PKCS12). Added new NO_CHECK_PRIVATE_KEY to allow reduce code size when not required.
2019-08-20 10:38:08 -07:00
David Garske
644e7a8f45
Fixes for PKCS8 w/wo encryption as DER/ASN.1. Fixes for building with --disable-oldnames. Fix to enable the PKCS8 enc test without openssl comat. Added additional PKCS8 tests.
2019-08-19 16:27:46 -07:00
Sean Parkinson
5530336617
SP Mod exp cast fix
2019-08-20 08:50:57 +10:00
Takashi Kojo
fd0390430d
Give error code resolution to wolfSSL_CertManagerCheckOCSPResponse
2019-08-20 07:22:54 +09:00
Jacob Barthelmeh
01a3b59e28
fix cast and initialization of variable
2019-08-19 14:54:53 -06:00
David Garske
3e1c103c78
Added support for loading a PKCS8 ASN.1 formatted private key (not encrypted).
2019-08-16 16:09:00 -07:00
David Garske
586b74b05f
Refactor of the verify option for processing X.509 files. Adds support for ignoring date checks when loading a CA using the WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY flag on wolfSSL_CTX_load_verify_buffer_ex and wolfSSL_CTX_load_verify_locations_ex.
2019-08-16 15:19:55 -07:00
toddouska
7d4023f6a1
Merge pull request #2408 from dgarske/coverity
...
Minor fixes to resolve Coverity static analysis checks
2019-08-16 14:45:13 -07:00
Jacob Barthelmeh
487e66394e
adjust wc_i2d_PKCS12 API
2019-08-16 15:19:33 -06:00
David Garske
3f992ce39d
Additional STM32F7 fixes with HALv2.
2019-08-16 12:31:28 -07:00
David Garske
eb68ad162b
Enable strict cipher suite checking by default. Changed to enable by default and can be disabled using WOLFSSL_NO_STRICT_CIPHER_SUITE.
2019-08-16 10:20:25 -07:00
John Safranek
e8986f389f
wolfRand
...
1. Updated fips-check.sh to make an archive for wolfRand.
2. Updated configure.ac to provide a wolfRand build.
2019-08-16 09:33:41 -07:00
toddouska
dea4f2fb1a
Merge pull request #2410 from SparkiDev/poly1305_x64_fix
...
Fix Poly1305 on Intel AVX2
2019-08-16 09:08:27 -07:00
Sean Parkinson
8454bd1077
Fix Poly1305 on Intel AVX2
...
Fix define checks for other x86_64 assembly code files
2019-08-16 17:42:19 +10:00
David Garske
0d13b385ab
Fixes for possible cases where DerBuffer is not free'd in AddCA error cases.
2019-08-15 17:01:30 -07:00
David Garske
aee766e11b
Minor fixes for AES GCM with GMAC and STM32 HALv2.
2019-08-15 16:57:38 -07:00
John Safranek
e7f0ed4b98
wolfRand
...
1. Excluded wc_encrypt.c from the wolfRand build.
2019-08-15 16:22:16 -07:00
John Safranek
9d53e9b6d5
wolfRand
...
1. Add fips.h to the install if doing a wolfRand build.
2019-08-15 16:22:16 -07:00
John Safranek
63fe2a219e
wolfRand
...
In configure.ac,
1. Change some whitespace in the FIPS enable section.
2. Reorganize the FIPS section a little bit.
3. When enabling wolfRand, also force cryptonly.
4. Treat wolfRand like FIPSv2 at build time.
In the source include.am,
5. Add checks against BUILD_FIPS_RAND as appropriate.
6. Add the SHA-256 assembly to the wolfRand source list.
2019-08-15 16:22:16 -07:00
John Safranek
a229e1e8e4
wolfRand
...
1. Rearrange some of the macros in the FIPS section to separate out the
different flavors of FIPS with their own flags to set them apart.
2. Add automake flags for FIPSv1 and wolfRand.
2019-08-15 16:22:16 -07:00
John Safranek
0931b574a7
wolfRand
...
1. Refactored src/include.am to use the new changes in configure for
multiple FIPS versions.
2. Added conditions for wolfRand.
2019-08-15 16:22:16 -07:00
John Safranek
14316f8e24
wolfRand
...
Refactor the configure.ac script to make adding additional FIPS options
easier.
2019-08-15 16:22:16 -07:00
toddouska
489af0cd2b
Merge pull request #2386 from SparkiDev/tls13_integ_only
...
TLS 1.3 and Integrity-only ciphersuites
2019-08-15 16:02:12 -07:00
toddouska
51c31695bd
Merge pull request #2391 from SparkiDev/tfm_dh_2
...
Specialized mod exponentiation for base 2 in tfm.c and integer.c
2019-08-15 15:59:20 -07:00
toddouska
b06dbf16c2
Merge pull request #2397 from JacobBarthelmeh/PKCS7
...
updates to CMS and callback functions
2019-08-15 15:56:41 -07:00
toddouska
089ca6d6e8
Merge pull request #2403 from JacobBarthelmeh/HardwareAcc
...
build with devcrypto and aesccm
2019-08-15 15:54:41 -07:00
toddouska
0a1a81ab42
Merge pull request #2407 from embhorn/api_p1_2
...
Adding phase 1 API from other projects
2019-08-15 14:13:10 -07:00
Eric Blankenhorn
1b841363cc
Adding tests
2019-08-15 12:27:23 -05:00
David Garske
ed7ac6fb26
Coverity fixes to make static analysis happy.
2019-08-14 15:42:47 -07:00
Eric Blankenhorn
b2b24a06f3
Adding API
2019-08-14 15:09:17 -05:00
toddouska
cb33ada380
Merge pull request #2395 from embhorn/api_p1
...
Adding compatibility API phase 1
2019-08-13 17:19:22 -07:00
David Garske
e75417fde1
Added build option to enforce check for cipher suite in server_hello from server. Enabled using WOLFSSL_STRICT_CIPHER_SUITE. Some cipher suites could be allowed if they were supported a build-time even though not sent in the cipher suite list in client_hello.
...
Example log output for test case where `client_hello` sent a cipher suite list and server choose a cipher suite not in the list:
```
wolfSSL Entering DoServerHello
ServerHello did not use cipher suite from ClientHello
wolfSSL Leaving DoHandShakeMsgType(), return -501
wolfSSL Leaving DoHandShakeMsg(), return -501
```
RFC 5246: 7.4.1.3: Server Hello: `cipher_suite: The single cipher suite selected by the server from the list in ClientHello.cipher_suites.`
2019-08-13 15:56:19 -07:00
Eric Blankenhorn
48fa6a458c
Adding compatibility API phase 1
2019-08-13 17:09:56 -05:00
toddouska
fa79ef0940
Merge pull request #2396 from tmael/expanding_OpenSSL_compatibility
...
Phase 1 of the OpenSSL Compatibility APIs
2019-08-13 14:56:09 -07:00
Jacob Barthelmeh
e8e1d35744
build with devcrypto and aesccm
2019-08-13 14:12:45 -06:00
Tesfa Mael
9301cce9ac
Check a null pointer dereference
2019-08-13 11:48:20 -07:00
Tesfa Mael
b1ad0525ea
cast to correct static analysis issue
2019-08-13 10:45:24 -07:00
Tesfa Mael
b7bd710bc8
Add small stack option
2019-08-13 10:29:37 -07:00
Tesfa Mael
1acd24deb8
Review comment to reduce stack usage
2019-08-13 10:15:57 -07:00
Tesfa Mael
b9ddbb974a
perform domain name check on the peer certificate
2019-08-13 09:55:28 -07:00
Jacob Barthelmeh
20d9d5b0da
account for KARI bundle without CERT when callback is set
2019-08-12 17:37:09 -06:00
Jacob Barthelmeh
883d5778a3
handle optional parameters with KARI ECC key
2019-08-12 16:41:35 -06:00
Jacob Barthelmeh
f4d9991e3a
remove restriction on key wrap type with callback
2019-08-12 15:34:20 -06:00
Ralf Schlatterbeck
63c6c47165
Fixes for 16-bit systems
...
Systems with sizof(int) == 2 default to expressions with that size.
So we have to do some explicit casts or use unigned long constants in
some cases.
In ssl.h the prototype of a function was not matching the definition.
This resulted in a type incompatibility on a 16-bit system.
2019-08-10 18:27:29 +02:00
Jacob Barthelmeh
6054a851ce
move decrypt content callback function to more generic spot
2019-08-09 17:38:30 -06:00
David Garske
e7c6fc221d
Fixes to handle byte swapping on Key and IV for STM32F7 with latest CubeMX.
2019-08-09 15:40:26 -07:00
David Garske
0a4ac0e380
Merge pull request #2401 from SparkiDev/aesni_null_iv
...
Set the IV to zero when NULL IV and using AESNI
2019-08-09 12:57:48 -07:00
Sean Parkinson
d4cf6e37e8
DH base 2 impl - better error handling
2019-08-09 12:12:59 -06:00
Sean Parkinson
dd48c825ed
Constant compare the HMAC result when using NULL cipher and TLS 1.3
2019-08-09 11:50:07 -06:00
Sean Parkinson
34fe643938
Set the IV to zero when NULL IV and using AESNI
2019-08-09 11:23:14 -06:00
JacobBarthelmeh
1396ca085b
Merge pull request #2400 from dgarske/pkcs7_typo
...
Fix for dynamic type typo in PKCS7
2019-08-09 10:34:41 -06:00
David Garske
8e4fa1c786
Fix for dynamic type typo in PKCS7.
2019-08-08 20:14:39 -07:00
Tesfa Mael
4bff2b6bef
Fixed valgrind issue
2019-08-06 15:49:36 -07:00
Tesfa Mael
1371fc8327
Review comments
2019-08-06 13:23:18 -07:00
Tesfa Mael
c1938969aa
Convert to pointer to pass static memory
2019-08-06 10:47:30 -07:00
Tesfa Mael
000c38ae1f
Use wolfSSL_PKCS7_free, not wc_PKCS7_Free
2019-08-06 07:46:57 -07:00
Tesfa Mael
eccc85b9fa
Add NO_RSA conditional
2019-08-05 17:51:31 -07:00
Tesfa Mael
f5f5947616
New OpenSSL compatible APIs:
...
wolfSSL_PEM_write_bio_PKCS7
wolfSSL_PKCS7_SIGNED_new
wolfSSL_X509_subject_name_hash
wolfSSL_CTX_use_PrivateKey_ASN1
wolfSSL_get0_param
wolfSSL_X509_VERIFY_PARAM_set1_host
2019-08-05 17:35:37 -07:00
David Garske
8e83fb2e67
Fix to resolve AES GCM auth calucation for GMAC where no in/out data is used.
2019-08-05 14:03:02 -07:00
Jacob Barthelmeh
99ddf65a96
add decrypt callback to wc_PKCS7_DecodeEnvelopedData
2019-08-05 10:49:15 -06:00
toddouska
ab4924b86b
Merge pull request #2388 from SparkiDev/sp_ccc_table_size
...
Fix precomputation tables to not include infinity field.
2019-08-05 08:39:58 -07:00
Sean Parkinson
4f714b9788
Add a timing resistant version
...
Make mod operations work on the same bit size as closely as possible.
Check fp_mod return in first use.
2019-08-05 10:57:40 +10:00
toddouska
c34657b20f
Merge pull request #2390 from dgarske/altname
...
Fix for scan-build warning with altName->name possible use of NULL
2019-08-02 15:49:13 -07:00
toddouska
6f54a2ec6b
Merge pull request #2389 from dgarske/crypt_init_count
...
Fixes for wolfCrypt init/cleanup reference count
2019-08-02 15:48:36 -07:00
toddouska
9acd952ea1
Merge pull request #2374 from dgarske/ecc_params
...
ECC improvement to get curve param and example curve macro check fix
2019-08-02 15:44:20 -07:00
toddouska
31461dbfb5
Merge pull request #2373 from dgarske/mpint
...
Improvements to atoi, mp_int allocations and STSAFE-A100 error handling
2019-08-02 15:43:20 -07:00
toddouska
da6fa384d4
Merge pull request #2273 from danielinux/Riot-OS-GNRC
...
RIOT-OS support with GNRC TCP/IP sockets
2019-08-02 15:42:11 -07:00
David Garske
f5c1c33dba
Fixes for newer STM CubeMX HAL for STM32F7.
2019-08-02 15:12:09 -07:00
David Garske
e83116fc0b
Resolution for FIPS/CAVP build errors where wc_ecc_get_curve_params is not present in older wolfSSL versions.
2019-08-02 13:25:11 -07:00
David Garske
18002d4545
Merge pull request #2387 from JacobBarthelmeh/Benchmark
...
fix help print out of benchmark
2019-08-02 08:24:47 -07:00
David Garske
d1fbdb3ddf
Added API unit test for wc_ecc_get_curve_params.
2019-08-02 06:20:14 -07:00
David Garske
0e1d81e63f
Added ability to define your own XATOI
2019-08-02 06:16:41 -07:00
David Garske
b4673344c0
Adds new wc_ecc_get_curve_params API for getting the ecc_set_type params for a curve index. Fix for example client and server using wrong macro for detecting ECC 256-bit enabled.
2019-08-02 05:50:00 -07:00
Sean Parkinson
2a22179068
Specialized mod exponentiation for base 2 in tfm.c and integer.c
2019-08-02 15:50:08 +10:00
Sean Parkinson
51dfc35aac
TLS 1.3 and Integrity-only ciphersuites
2019-08-02 11:00:18 +10:00
David Garske
3cf30f1e96
Fix to allow proper calling with counts for wolfCrypt_Init and wolfCrypt_Cleanup. Old code was not tracking case such as wolfCrypt_Init -> wolfCrypt_Init -> wolfCrypt_Cleanup and was causing cleanup to be performed, when it shouldn't.
2019-08-01 12:44:03 -07:00
David Garske
fb8fc4d800
Fix for scan-build warning with altName->name possible use of NULL pointer.
2019-08-01 11:54:28 -07:00
toddouska
4f0fd2c2f9
Merge pull request #2302 from SparkiDev/ecc_pubkey_check
...
Add checks of public key for ECC and curve25519
2019-08-01 11:50:02 -07:00
toddouska
7098fdff29
Merge pull request #2382 from SparkiDev/dsa_ct
...
Use a fixed number of bits with DSA gen and sign
2019-08-01 11:48:53 -07:00
Daniele Lacamera
a8d2b6b3c8
Removed exception for EXIT_TEST in RIOT
2019-08-01 15:50:16 +02:00
Daniele Lacamera
34b2d257cd
[RIOT-OS/GNRC] Renamed GNRC callback functions
2019-08-01 15:50:16 +02:00
Daniele Lacamera
e77161ae9a
Riot-OS/GNRC support: reworked after reviewers' comments
2019-08-01 15:50:16 +02:00
Daniele Lacamera
1db036eb75
RIOT-OS support with GNRC UDP/IP sockets
2019-08-01 15:50:16 +02:00
Sean Parkinson
1792fe34b9
Fix precomputation tables to not include infinity field.
...
Fixes to ARM code
- put in it instruction before conditional for old compilers.
- fix small code size version of compare
- handle not being able to shift by the full size - want result to be
zero
Casts as required by compiler to reduce bit size explicitly.
2019-08-01 20:53:41 +10:00
Jacob Barthelmeh
6a52e0a138
fix help print out of benchmark
2019-07-31 11:47:26 -06:00
toddouska
c400c38588
Merge pull request #2381 from SparkiDev/tls13_sv
...
Check suite size length is valid as well as space for compression
2019-07-30 16:04:00 -07:00
toddouska
d4ab1c7e86
Merge pull request #2383 from SparkiDev/sp_dh_2
...
Special implementation of mod exp when base is 2 in SP
2019-07-30 16:02:38 -07:00
Sean Parkinson
dcab47efd8
Improve wc_curve25519_check_public function doc
2019-07-31 08:44:43 +10:00
toddouska
81a9779fc4
Merge pull request #2385 from dgarske/minor_items
...
Minor cleanups for spelling and cast warnings
2019-07-30 15:22:29 -07:00
toddouska
8b8cc41a1a
Merge pull request #2384 from JacobBarthelmeh/PKCS7
...
add aditional sanity checks on buffer
2019-07-30 15:21:09 -07:00
toddouska
0a60c2bb2c
Merge pull request #2379 from JacobBarthelmeh/sessionExport
...
reduce size of state only save and add option to remove peer info
2019-07-30 15:09:39 -07:00
toddouska
21c8ad03d3
Merge pull request #2378 from SparkiDev/tls13_nopskdheke_ks_fix
...
Fix for TLS 1.3 to always send Key Share
2019-07-30 15:08:38 -07:00
toddouska
f314613fa1
Merge pull request #2376 from SparkiDev/dsa_sign
...
Generate k for DSA signature as per FIPS 186-4 B.2.2
2019-07-30 15:06:26 -07:00
David Garske
91251eb319
Fixes for minor compiler cast warnings.
2019-07-29 08:14:27 -07:00
David Garske
e3653a7a07
Various spelling corrections.
2019-07-29 08:14:07 -07:00
Sean Parkinson
23af4e92f3
Special implementation of mod exp when base is 2 in SP
2019-07-29 12:58:07 +10:00
Jacob Barthelmeh
ec18ae0fbc
add aditional sanity checks on buffer
2019-07-28 19:21:09 -06:00
Sean Parkinson
4778dac49f
Add checks of public key for ECC and curve25519
2019-07-29 10:42:44 +10:00
Sean Parkinson
d7b893f250
Use a fixed number of bits with DSA gen and sign
2019-07-29 09:33:11 +10:00
Sean Parkinson
741d7bdb67
Check suite size length is valid as well as space for compression
2019-07-29 08:47:45 +10:00
Jacob Barthelmeh
ca87861915
reduce size of state only save and add option to remove peer info
2019-07-26 14:54:44 -06:00
Sean Parkinson
9e26bc40bb
Generate k for DSA signature as per FIPS 186-4 B.2.2
2019-07-26 09:08:23 +10:00
David Garske
8ce2dd4bf7
Additional STSAFE return code cleanups.
2019-07-25 08:22:31 -07:00
David Garske
fe598fc6fc
Improvements to the STSAFE-A100 error code handling.
2019-07-24 09:01:44 -07:00
David Garske
2cd64c748a
Only require XATOI for build-cases that need it.
2019-07-23 15:36:59 -07:00
David Garske
b658f2e7c3
Refactor for all fp_int and mp_int allocations to use DYNAMIC_TYPE_BIGINT. This allows customers to setup a static pool for these allocations if desired.
2019-07-23 15:36:59 -07:00
David Garske
b0444bcfa1
Refactor to add XATOI for standard library function.
2019-07-23 15:36:59 -07:00
toddouska
50fbdb961f
Merge pull request #2366 from JacobBarthelmeh/Release
...
updating readme and prepare for release
2019-07-23 11:03:29 -07:00
Jacob Barthelmeh
77fda069a8
prepare for release version 4.1.0
2019-07-23 09:27:39 -06:00
Jacob Barthelmeh
2befc9d68f
fix for build with WOLFSSL_EXTRA
2019-07-23 09:27:39 -06:00
Jacob Barthelmeh
13957e7762
update server-ecc-self.pem before/after dates
2019-07-23 09:27:39 -06:00
Jacob Barthelmeh
589b056ecb
update gitignore and location of test cleanup
2019-07-23 09:27:39 -06:00
JacobBarthelmeh
8f5a0dc66a
Merge pull request #2370 from SparkiDev/arm64_fixes
...
Fix for AARCH64 on Linaro
2019-07-23 09:26:56 -06:00
Sean Parkinson
f8e2285ab8
Fix for AARCH64 on Linaro
...
Poly1305 using [wx]29 corrupts data - use [wx]30.
WOLFSSL_ARMASM is an ASM flag as well.
2019-07-23 09:56:18 +10:00
toddouska
7ca9b23b76
Merge pull request #2361 from dgarske/bench_vs
...
Fixes for wolfCrypt benchmark and test Visual Studio projects
2019-07-22 11:29:33 -07:00
toddouska
c443116189
Merge pull request #2364 from dgarske/stm32_cube_small_block
...
Fix for STM32 AES GCM crypto hardware with less than block size
2019-07-22 11:27:04 -07:00
toddouska
fc918f9052
Merge pull request #2367 from JacobBarthelmeh/PKCS7
...
fix for initialize PKCS7 structure with signer
2019-07-22 09:41:17 -07:00
Jacob Barthelmeh
db9a17c8a7
fix for inject clear alert from client test case
2019-07-22 10:34:20 -06:00
Jacob Barthelmeh
aec980b803
fix for initialize PKCS7 structure with signer
2019-07-19 16:23:14 -06:00
David Garske
aed1e433b2
Updates to benchmark/test Visual Studio projects to properly reference x64. Added missing files to VS projects. Example settings for enabling SP and AESNI in Visual Studio in IDE/WIN/user_settings.h.
2019-07-19 13:08:13 -07:00
toddouska
ab01cd9be1
Merge pull request #2354 from ejohnstown/fixes
...
Fixes for FIPS
2019-07-19 09:59:21 -07:00
David Garske
2abcffd4a7
Revert changes to fe_x25519_asm.S.
2019-07-18 12:15:55 -07:00
David Garske
0bcae86038
Fixes for wolfCrypt benchmark and test Visual Studio projects. Fixes for benchmark.c compile errors in bench_hmac with Visual Studio. Added README.md files for benchmark and test.
2019-07-18 11:39:59 -07:00
toddouska
45abd67bd1
Merge pull request #2362 from SparkiDev/chacha20_asm_fix
...
Fix chacha20 AVX1 assembly to not use register RBX
2019-07-18 08:43:44 -07:00
toddouska
b73c53471c
Merge pull request #2363 from JacobBarthelmeh/Testing
...
Fixes for builds
2019-07-18 08:38:50 -07:00
David Garske
6fd623248e
Add macro checks around new .c/.S files to allow wildcard include of source files (such as in Eclipse).
2019-07-18 06:49:36 -07:00
David Garske
7db3f8e2c6
Fixes for STM32 CubeMX AES GCM crypto hardware where less than a block size (16) is used.
2019-07-18 06:09:07 -07:00
Sean Parkinson
b399b08df7
Fix for TLS 1.3 to always send Key Share
...
Even if resuming or using PSK and not performing DHE key exchange, send
key share extension in case full handshake is required.
2019-07-18 11:01:43 +10:00
toddouska
d1700d3739
Merge pull request #2358 from ejohnstown/rsa-keygen-speedup
...
RSA Key Generation Speedup
2019-07-17 18:01:38 -07:00
Sean Parkinson
7fe4521083
Fix chacha20 AVX1 assembly to not use register RBX
2019-07-18 09:42:52 +10:00
Sean Parkinson
0555668f2c
Merge pull request #2356 from JacobBarthelmeh/OCSP
...
revert early free of OCSP buffer after finding it is revoked
2019-07-18 08:38:10 +10:00
John Safranek
3aad9a2673
FIPS Macro Fix
...
In a couple places the label WOLFSSL_FIPS was getting checked. Changed
to the correct HAVE_FIPS instead.
2019-07-17 15:35:12 -07:00
John Safranek
9c245b7fc5
Fixes
...
When building with GCC-8 and enable-intelasm set, GCC reported a memcpy
from and two the same pointer being possible. Added a check for the same
pointer and skipped the copy if the same.
2019-07-17 15:35:12 -07:00
John Safranek
c3c705f82b
FIPS, HMAC, and PKCS8
...
One of the tests for PKCS8 depended on keys encrypted with a password
that has only 8 letters. HMAC in FIPS mode requires a minimum of 12
bytes. Disabled that test case when FIPS is enabled. All components do
get tested just not all together in that case.
2019-07-17 15:35:12 -07:00
Jacob Barthelmeh
7e79e3a6bf
fix for build with disable filesystem
2019-07-17 16:28:58 -06:00
Jacob Barthelmeh
f63656f18b
macro guard on test case with disable AES
2019-07-17 15:22:29 -06:00
John Safranek
dc71f957f3
RSA-Key Gen Speedup
...
1. When doing the test divides on the first few primes, short circuit
out of the loop if the prospective possible prime divides evenly.
2019-07-17 13:43:15 -07:00
toddouska
8b6e66f095
Merge pull request #2353 from SparkiDev/ecc_nonce
...
Improve nonce use in ECC mulmod
2019-07-17 11:23:12 -07:00
John Safranek
9a2f4bb8f8
Merge pull request #2333 from kaleb-himes/WCv4.0.1-stable-master
...
WCv4.0.1-stable changes
2019-07-17 10:14:40 -07:00
Jacob Barthelmeh
af8395b17b
revert early free of OCSP buffer after finding it is revoked
2019-07-17 11:08:28 -06:00
JacobBarthelmeh
8bf8fcca60
Merge pull request #2352 from dgarske/async_v4.1
...
Fixes for Asynchronous support in v4.1
2019-07-16 17:32:18 -06:00
Sean Parkinson
483f6a5acd
Improve nonce use in ECC mulmod
2019-07-17 09:27:29 +10:00
toddouska
5f3fd3ae86
Merge pull request #2348 from cconlon/scepchanges
...
Changes to support SCEP Expansion
2019-07-16 15:26:15 -07:00
kaleb-himes
fdeb65dec8
WCv4.0.1-stable changes
...
CHAR_BIT to 8, simplify logic from peer review
Update build script
2019-07-16 15:58:56 -06:00
JacobBarthelmeh
cb2ed60305
Merge pull request #2351 from ejohnstown/watch-chain-deux
...
Sniffer Watch Cert Chain Part 2
2019-07-16 15:04:32 -06:00
David Garske
7b021d68c3
Fixes for asynchronous support in v4.1:
...
* Fixes PK callback null dereference.
* Fixes `DoCertificateVerify` verify handling.
* Fixes build issue with API tests.
2019-07-16 11:56:02 -07:00
David Garske
5067d1fc10
Merge pull request #2328 from kaleb-himes/ZD-5373-TIRTOS
...
Updating for TI hardware offload with latest version of wolfSSL
2019-07-16 11:43:56 -07:00
toddouska
8b8ff2ac34
Merge pull request #2336 from kaleb-himes/ZD-5388-OCSP-STATUS-UNHONORED
...
Honor the status from peer and do not do internal OCSP lookup regardless
2019-07-16 11:32:34 -07:00
toddouska
99d3ea9e56
Merge pull request #2350 from SparkiDev/rsa_pss_fix
...
Don't pick RSA PSS if not compiled in
2019-07-16 11:28:50 -07:00
John Safranek
4b0bb75909
Sniffer Watch Cert Chain Part 2
...
1. Check the sizes picked up out of the message against the expected
size of the record when looking at the certificate messages.
2. Renamed the cert and certSz in the watch callback with it being a
certChain.
2019-07-16 09:54:45 -07:00
Chris Conlon
2e308ea82c
Merge pull request #2260 from JacobBarthelmeh/PKCS7
...
PKSC7 firmware revision + callback / get SID
2019-07-16 10:51:38 -06:00
JacobBarthelmeh
9f1aa1a27c
Merge pull request #2349 from ejohnstown/watch-chain
...
Sniffer Watch Cert Chain
2019-07-16 10:43:37 -06:00
Chris Conlon
d51b958334
use ForceZero instead of MEMSET in PKCS7 signed attribute handling
2019-07-16 08:13:47 -07:00
Sean Parkinson
8112c1236d
Don't pick RSA PSS if not compiled in
2019-07-16 14:59:01 +10:00
Sean Parkinson
9af9941b90
Fixes for TLS 1.3 and OCSP Stapling
...
Create the OCSP Response for Stapling and TLS 1.3 when parsing.
When parsing OCSP stapling extension with TLS 1.3, use a new extension
object if it was created.
Set the extension size to 0 before writing extensions when sending a TLS
1.3 Certificate message.
2019-07-16 13:52:36 +10:00
toddouska
d620433d1d
Merge pull request #2209 from tmael/maintenanceDefects
...
Increased ciphers buffer size for testsuite and ECC API for getting curve from dp
2019-07-15 16:49:13 -07:00
toddouska
4e648dd35f
Merge pull request #2347 from JacobBarthelmeh/HardwareAcc
...
adjust time.h for port due to tm struct change
2019-07-15 15:27:58 -07:00
John Safranek
3cdb4f8bf0
Sniffer Watch Cert Chain
...
Modifed the sniffer watch callback so it provides a SHA-256 hash of the
peer certificate, as before, and the entire certificate chain sent by
the server in the Certificate handshake message. The chain is taken
directly from the message payload, unprocessed. It'll be a list of pairs
of 24-bit certificate length and a DER encoded certificate, all in
network byte order.
2019-07-15 14:07:22 -07:00
Chris Conlon
7367da3fb6
sort PKCS7 signed attributes when generating bundle
2019-07-15 13:27:49 -07:00
Jacob Barthelmeh
6e6c93624a
free test RSA key after use
2019-07-15 12:32:19 -06:00
Jacob Barthelmeh
cba8a7f155
free buffer when using small stack
2019-07-15 12:32:19 -06:00
Jacob Barthelmeh
4362ce5f6b
fix expected size and add sanity checks
2019-07-15 12:32:19 -06:00
Jacob Barthelmeh
a25d04044a
save rid for kari callback
2019-07-15 12:32:19 -06:00
Jacob Barthelmeh
60fc9b3a1d
add test for manual verify
2019-07-15 12:32:19 -06:00
Jacob Barthelmeh
d33a95352a
fix check on ret value and add test case
2019-07-15 12:32:19 -06:00
Jacob Barthelmeh
f79a119c82
add storing sig/digest if no certs in bundle
2019-07-15 12:32:19 -06:00
Jacob Barthelmeh
d7a86de969
add wrap CEK callback, test, and adjustment for fwWrappedFirmwareKey
2019-07-15 12:32:19 -06:00
Jacob Barthelmeh
84653a7fb5
improvements on test code
2019-07-15 12:32:19 -06:00
Jacob Barthelmeh
a7a51d8f33
scan-build warnings / fixes
2019-07-15 12:32:19 -06:00
Jacob Barthelmeh
ab0029f9ac
add setter function for ctx and pkcs7 callback, add test cases
2019-07-15 12:32:19 -06:00
Jacob Barthelmeh
2972b1c467
getter for signerinfo SID and decrypt callback
2019-07-15 12:26:11 -06:00
Chris Conlon
5743a1c80f
Merge pull request #2341 from miyazakh/fix_ricoh_buildfailure
...
fix build failure when enabling MYSQL_COMPATIBLE
2019-07-15 10:10:34 -06:00
Chris Conlon
9d9495f8b6
allow CSR challenge pass to be encoded as PrintableString
2019-07-12 16:23:48 -07:00
Jacob Barthelmeh
051112a101
adjust time.h for port due to tm struct change
2019-07-12 13:55:04 -06:00
toddouska
b4765a5c9e
Merge pull request #2340 from JacobBarthelmeh/Testing
...
fsanitize report fixes
2019-07-11 11:18:09 -07:00
toddouska
88f923a2a1
Merge pull request #2338 from ejohnstown/md5-null-suite
...
RSA-NULL-MD5 cipher suite
2019-07-11 11:15:48 -07:00
Hideki Miyazaki
3756a2c8c7
fix build failure when enabling MYSQL_COMPATIBLE
2019-07-11 09:00:03 +09:00
Jacob Barthelmeh
a6cc9af1fc
free old peer RSA key in secure renegotiation when getting new one
2019-07-10 17:07:16 -06:00
Jacob Barthelmeh
6c9fac2a71
add wolfSSL_RAND_Cleanup to match wolfSSL_RAND_seed call on init
2019-07-10 16:43:44 -06:00
Jacob Barthelmeh
85ce959031
free peer cert overwritten by secure renegotiation
2019-07-10 16:04:42 -06:00
John Safranek
45b280a53e
RSA Null MD5 cipher suite
...
1. Add the cipher suite TLS_RSA_WITH_NULL_MD5 for use with the sniffer.
2. Added TLS_RSA_WITH_NULL_MD5 to the suite test.
2019-07-10 14:32:14 -05:00
kaleb-himes
d7b50874f6
Fix leak in dh_test
2019-07-10 13:28:00 -06:00
toddouska
92bd585f25
Merge pull request #2329 from JacobBarthelmeh/SanityChecks
...
scan-build fixes
2019-07-10 10:23:39 -07:00
Martin Kinčl
996cef6db2
Added stdio.h include to types.h.
2019-07-10 18:26:43 +02:00
Chris Conlon
9cd6a992c5
Merge pull request #2295 from kojo1/RSA4096
...
Static RSA4096
2019-07-10 09:40:41 -06:00
toddouska
d88458a447
Merge pull request #2322 from SparkiDev/int_is_prime_fix
...
Fix prime testing to do t iterations of random values in range
2019-07-09 08:03:30 -07:00
toddouska
9daccb3300
Merge pull request #2320 from SparkiDev/tls_alerts
...
Send more alerts as per TLS specification
2019-07-09 08:02:32 -07:00
toddouska
964fd95a43
Merge pull request #2335 from SparkiDev/tls_pss_fix
...
Fix duplicate definitions in internal.h (new PSS defines)
2019-07-09 08:01:10 -07:00
kaleb-himes
3e6246af59
Honor the status from peer and do not do internal OCSP lookup regardless
...
Item 2) Suggestion from Sean implemented: "Limit the message types"
Item 3) Removed a hard tab
2019-07-09 07:09:09 -06:00
Sean Parkinson
e01f9961ac
Fix duplicate definitions in internal.h (new PSS defines)
2019-07-09 08:49:04 +10:00
kaleb-himes
b8c6bc0d7f
Changes following peer review, add defines to disable for any HW port
2019-07-08 16:28:35 -06:00
toddouska
b7986ccb17
Merge pull request #2332 from SparkiDev/poly1305_arm64
...
Improve perfomance of Poly1305 on ARM64
2019-07-08 15:08:25 -07:00
toddouska
4d13121de1
Merge pull request #2331 from SparkiDev/sp_c32_fix
...
Fix for C32 implementation in div
2019-07-08 15:06:16 -07:00
Chris Conlon
0bb6b388c0
Merge pull request #2312 from kojo1/RAND_bytes_2
...
RAND_bytes
2019-07-08 15:30:06 -06:00
toddouska
97a6dc9e7e
Merge pull request #2316 from SparkiDev/tls13_ext_fixes
...
TLS 1.3 extension fixes
2019-07-08 14:13:55 -07:00
toddouska
1bcec1b9ab
Merge pull request #2319 from SparkiDev/tls13_alerts
...
Improve alert sending in TLS 1.3 code from fuzz testing
2019-07-08 14:11:35 -07:00
Jacob Barthelmeh
efe276414b
set internal x509 elements to NULL after free
2019-07-08 15:11:03 -06:00
toddouska
79165ce8cb
Merge pull request #2315 from SparkiDev/tlsx_ext_debug
...
Print out extension data being parsed when WOLFSSL_DEBUG_TLS defined.
2019-07-08 13:59:11 -07:00
toddouska
44b8106da6
Merge pull request #2317 from SparkiDev/asn_nofs_fix
...
Fix for NO_FILESYSTEM builds
2019-07-08 13:32:27 -07:00
toddouska
bd40a59f3e
Merge pull request #2318 from SparkiDev/server_fuzz
...
Changes to server example for fuzz testing
2019-07-08 13:16:17 -07:00
toddouska
36920b1469
Merge pull request #2314 from SparkiDev/tls13_fixes
...
TLS 1.3 ClientHello rework and other fixes
2019-07-08 13:14:37 -07:00
toddouska
d824b78af0
Merge pull request #2323 from dgarske/various_fixes
...
Various fixes, improvements to build options for reduced code size and static benchmarks
2019-07-08 13:02:22 -07:00
toddouska
baf65f4f43
Merge pull request #2327 from JacobBarthelmeh/Compatibility-Layer
...
add wolfSSL_PEM_write_DHparams implementation
2019-07-08 12:58:10 -07:00
toddouska
e6ab7d165c
Merge pull request #2325 from JacobBarthelmeh/Testing
...
remove HAVE_CRL macro guard from X509 PEM write function
2019-07-08 12:57:15 -07:00
toddouska
66db74d827
Merge pull request #2313 from SparkiDev/tls13_reneg
...
Fix for TLS 1.3 and secure renegotiation
2019-07-08 12:56:02 -07:00
toddouska
406ff31fc8
Merge pull request #2311 from SparkiDev/tls12_ffdhe_fix
...
Better support for TLS 1.2 and FFDHE
2019-07-08 12:55:03 -07:00
toddouska
1070aba5e2
Merge pull request #2308 from SparkiDev/resumption_fix
...
Don't resume if stored session's ciphersuite isn't in client list
2019-07-08 12:52:59 -07:00
toddouska
2610d9ce94
Merge pull request #2307 from SparkiDev/pick_hash_sig
...
Improve hash and signature algorithm selection
2019-07-08 12:51:36 -07:00
toddouska
74324bb1b5
Merge pull request #2305 from SparkiDev/doalert_fix
...
Better handling of alerts
2019-07-08 12:50:26 -07:00
toddouska
60d6d71636
Merge pull request #2304 from SparkiDev/tls_sha224
...
Support to TLS for RSA SHA-224 signatures
2019-07-08 12:47:56 -07:00
toddouska
2a4b935e07
Merge pull request #2299 from JacobBarthelmeh/DTLS-MultiCore
...
DTLS export/import state only
2019-07-08 12:47:13 -07:00
toddouska
cc453c6c12
Merge pull request #2262 from ejohnstown/sniffer-watch
...
Sniffer watch
2019-07-08 12:45:35 -07:00
Jacob Barthelmeh
b5a5100068
move location of X509 free
2019-07-05 14:33:35 -06:00
David Garske
964dac96a7
Merge pull request #2321 from kaleb-himes/ARDUINO-UPDATE
...
Remove redundent setting WOLFSSL_ARDUINO and add guards
2019-07-05 11:35:30 -07:00
David Garske
011fa6bafd
Added PBKDF2 benchmark. Benchmark improvements to capture results in static buffer (helps benchmarking on systems without printf support). Added benchmark "-print" option to show summary. Added wolfCrypt test version header.
2019-07-05 11:29:14 -07:00
David Garske
c9f18bfe3b
Merge pull request #2326 from SparkiDev/sp_update_1
...
Changes to other SP implementations based on recent changes
2019-07-05 11:19:01 -07:00
Jacob Barthelmeh
4cf8923838
make wc_DhParamsToDer a static function to avoid DhKey redefenition
2019-07-05 11:58:40 -06:00
Sean Parkinson
8dccecc531
Improve perfomance of Poly1305 on ARM64
2019-07-05 14:41:46 +10:00
Sean Parkinson
61e1491407
Fix for C32 implementation in div
...
Changes to allow C32 to build on x86_64 when not using fast math.
2019-07-05 10:39:30 +10:00
Takashi Kojo
9b654d25d1
wolfSSL_RAND_seed(NULL, 0);
2019-07-04 18:31:57 +09:00
Jacob Barthelmeh
5dcd421580
scan-build fixes
2019-07-03 17:08:02 -06:00
Jacob Barthelmeh
ab9d89cb31
cast on return and move location of function declaration
2019-07-03 15:20:08 -06:00
Jacob Barthelmeh
02871d5ed4
add test case for wolfSSL_PEM_write_DHparams
2019-07-03 13:32:21 -06:00
John Safranek
0b5ee1b633
Merge pull request #2324 from dgarske/cryptocb_3des
...
Crypto callback DES3 support
2019-07-03 10:17:23 -07:00
Jacob Barthelmeh
8327984523
fix for leading bit check
2019-07-03 10:35:08 -06:00
Jacob Barthelmeh
f2bb5e8944
implementation of wolfSSL_PEM_write_DHparams
2019-07-02 17:42:33 -06:00
Sean Parkinson
7c393edf49
Changes to other SP implementations based on recent changes
2019-07-03 09:37:31 +10:00
David Garske
58fe2781f1
Fix for wc_CryptoCb_AesCbcEncrypt with improper find device logic. Fix for HMAC scan-build with ret. Cleanup of HMAC formatting.
2019-07-02 14:08:59 -07:00
Jacob Barthelmeh
a7acacff41
remove HAVE_CRL macro guard from X509 PEM write function
2019-07-02 14:37:33 -06:00
David Garske
d5f3fa2ff8
Added DES3 Crypto callback support.
2019-07-02 10:15:53 -07:00
David Garske
01c9fa1830
Added NO_TFM_64BIT option to disable 64-bit for TFM only (also enabled with NO_64BIT. This allows other areas like SHA512/ChaCha20 to still have the 64-bit type, but not use it for TFM.
2019-07-02 09:36:08 -07:00
David Garske
eba78cd87a
Improvements for disabled sections in pwdbased.c, asn.c, rsa.c, pkcs12.c and wc_encrypt.c. Adds --enable-pkcs12, HAVE_PKCS12/NO_PKCS12, HAVE_PKCS8 / NO_PKCS8 and HAVE_PBKDF1 / NO_PBKDF1.
2019-07-02 09:35:46 -07:00
Sean Parkinson
40864da533
Fix prime testing to do t iterations of random values in range
2019-07-02 14:42:03 +10:00
Sean Parkinson
0e33e2d9ee
Check PickHashSigAlgo return when doing CerticateRequest
...
Only check picking the hash and signature algorithm functions return
when a certificate is available to send to peer.
Include the ECC signature and hash algorithms in available list even
when using ECDSA certificates signed with RSA.
List is of capabilities not what is in certificate.
Certificate request sent to peer doesn't have to be an ECDSA certificate
signed with RSA.
Same treatment for RSA.
2019-07-02 11:53:04 +10:00
Sean Parkinson
28aa99c3e3
Always have support for SHA-224 signatures when SHA-224 built-in
2019-07-02 08:27:04 +10:00
John Safranek
21afcf17a8
Sniffer Watch Mode
...
1. Split the function ssl_SetWatchKey() into ssl_SetWatchKey_file()
which loads the key from a named file and ssl_SetWatchKey_buffer()
which loads the key from a provided buffer. file() uses buffer().
2019-07-01 13:50:28 -07:00
John Safranek
b02e1e8d59
Sniffer Watch Mode
...
Added some statistics tracking to the watch mode.
2019-07-01 13:50:28 -07:00
John Safranek
8be6c0c08c
Sniffer Watch Mode
...
Add some tests for the Watch mode that will also work with static ECDH.
2019-07-01 13:50:28 -07:00
John Safranek
b61803f165
Sniffer Watch Mode
...
Added the build option for the Watch mode for the sniffer. Instead of
setting a set of IP addresses and keys, you set a callback function.
When any TLS connection is started, the hook is called and a hash of the
peer certificate is given to the callback function. It has a chance to
load a private key into the sniffer session. Enable this option with the
build flag "WOLFSSL_SNIFFER_WATCH".
2019-07-01 13:50:28 -07:00
David Garske
fd71618f10
Added warning message if user IO read callback returns negative that is not supported.
2019-07-01 13:41:17 -07:00
David Garske
b2f919ec13
Fix to include errno.h in tls_bench.c
2019-07-01 13:41:17 -07:00
David Garske
354ec9cd9d
Add useful log message when SP math key size is invalid.
2019-07-01 13:41:17 -07:00
David Garske
f8e3e63938
Fix for building with USE_STSAFE_VERBOSE to avoid printf use.
2019-07-01 13:41:17 -07:00
toddouska
3652929573
Merge pull request #2310 from SparkiDev/alpn_sni_parse
...
ALPN and SNI Extension parsing improvements
2019-07-01 08:57:39 -07:00
toddouska
4500f2d773
Merge pull request #2309 from SparkiDev/fallback_scsv
...
Fallback SCSV (Signaling Cipher Suite Value) support on Server only
2019-07-01 08:55:02 -07:00
toddouska
08bd5000f1
Merge pull request #2306 from SparkiDev/tls_long_msg
...
Add detection of oversized encrypted data and plaintext
2019-07-01 08:51:20 -07:00
kaleb-himes
db17fce49a
Remove redundent setting WOLFSSL_ARDUINO and add guards
2019-07-01 09:02:21 -06:00
Sean Parkinson
b7e00eea1a
Send more alerts as per TLS specification
...
Requires WOLFSSL_EXTRA_ALERTS or OPENSSL_EXTRA to enable
2019-07-01 17:01:06 +10:00
Sean Parkinson
1fe69992e2
Improve alert sending in TLS 1.3 code from fuzz testing
2019-07-01 14:20:36 +10:00
Sean Parkinson
373bbf6660
Changes to server example for fuzz testing
2019-07-01 13:35:33 +10:00
Sean Parkinson
707156f53b
Fix for NO_FILESYSTEM builds
2019-07-01 13:26:28 +10:00
Sean Parkinson
4ff9d951f6
TLS 1.3 ClientHello rework and other fixes
...
Do version negotiation first. Look for, parse and negotiate with
SupportedVersions extension upfront. Only need to handle TLS 1.3
ClientHello after this.
Any version greater than TLS 1.2 in Legacy Version field is translated
to TLS 1.2.
Fix preMasterSz to when not using PreSharedKey.
Not finsing KeyShare in ClientHello sends a missing_extension alert.
Decoding signature algorithms in new TLS 1.3 range now returns error
when not recognized.
Don't allow RSA PKCS #1.5 signatures to be verified.
Fix accept when downgraded from TLS 1.3 to go to wolfSSL_accept.
Fix server state when sending ChangeCipherSpec for MiddleBox
compatability.
Send a new session ticket even when resuming.
2019-07-01 13:22:21 +10:00
Sean Parkinson
1d05503d20
TLS 1.3 extension fixes
...
When major version is TLS Draft then this is now ignored.
If version negotitation occurs but none matched then send an alert and
return an error.
Store the rsa_pss_pss_* signature algorithms in the bit mask.
KeyShare Entry parsing returns INVALID_PARAMETER when length is 0 and
results in a different alert being sent.
Check negotiated protocol version is not TLS 1.3 when determing whether
to parse point formats.
2019-07-01 12:20:37 +10:00
Sean Parkinson
4eaabd9be5
Print out extension data being parsed when WOLFSSL_DEBUG_TLS defined.
2019-07-01 11:58:43 +10:00
Sean Parkinson
60af8bdb7c
Fix for TLS 1.3 and secure renegotiation
2019-07-01 09:26:05 +10:00
Takashi Kojo
43ce956d9c
minor fix
2019-06-29 16:47:39 +09:00
Takashi Kojo
1634d9571c
RAND_seed in init, GlobalRNG before tmp.
2019-06-29 09:21:30 +09:00
Sean Parkinson
e96ede65ce
Don't resume if stored session's ciphersuite isn't in client list
...
Turn this check off with NO_RESUME_SUITE_CHECK.
2019-06-28 16:23:41 +10:00
Sean Parkinson
46a2a437d4
Better support for TLS 1.2 and FFDHE
...
If not FFDHE parameters in list then use existing.
If FFDHE parameters present but none matching then let the ciphersuite
match process fail when DHE must be used.
2019-06-28 16:12:23 +10:00
Sean Parkinson
1592d6f856
ALPN and SNI Extension parsing improvements
...
SNI will not have more than one type, only one entry in the list per
type and therefore no need to loop.
ALPN error checks improved.
2019-06-28 15:52:51 +10:00
Sean Parkinson
a3e4a2fd6e
Fallback SCSV (Signaling Cipher Suite Value) support on Server only
2019-06-28 15:35:56 +10:00
Sean Parkinson
8312ceb14c
Improve hash and signature algorithm selection
...
Return error when no hash-signature algorithm is possible.
2019-06-28 14:31:40 +10:00
Sean Parkinson
5f9a851adb
Add detection of oversized encrypted data and plaintext
2019-06-28 12:01:35 +10:00
Sean Parkinson
7d2ac604f5
Better handling of alerts
...
Better checking of encrypted alerts - check unencrypted data size
correctly before using data.
Send an alert if the alert isn't the right size.
Send an alert if the maximum alert count has been reached - but don't
send it if seeing close_notify alert.
2019-06-28 11:53:33 +10:00
Sean Parkinson
8a0c058782
Support to TLS for RSA SHA-224 signatures
2019-06-28 10:26:48 +10:00
Chris Conlon
f51a8fffde
Merge pull request #2265 from JacobBarthelmeh/Testing
...
fix check on ret value and add test case
2019-06-27 14:02:01 -06:00
Sean Parkinson
8bea016d69
Merge pull request #2277 from julek-wolfssl/arm-poly1305
...
ARM Poly1305
2019-06-27 09:21:09 +10:00
Takashi Kojo
c7d1424adf
word16 for consistency
2019-06-27 06:38:14 +09:00
Jacob Barthelmeh
e7fd45537d
update comments for DEGENERATE_SID use
2019-06-26 11:58:53 -06:00
Chris Conlon
7520137601
Merge pull request #2297 from miyazakh/esp_random
...
fix ed25519 sign msg test failure in ESP32
2019-06-26 11:54:34 -06:00
toddouska
da5357cadd
Merge pull request #2301 from SparkiDev/dh_pubval_check
...
Simple checks of DH public value from peer.
2019-06-26 09:20:49 -07:00
toddouska
0dbba5f056
Merge pull request #2300 from ejohnstown/fips-hash
...
FIPS Hash
2019-06-26 09:18:48 -07:00
toddouska
6478f92e04
Merge pull request #2294 from dgarske/read_fixes
...
Fixes to improve read error handling
2019-06-26 09:17:20 -07:00
Jacob Barthelmeh
cb4f9afd6d
free memory in test case
2019-06-25 15:24:39 -06:00
John Safranek
3a378520c0
FIPS Hash
...
Add the fips-hash.sh script to the Automake distribution.
2019-06-25 11:38:09 -07:00
toddouska
53c1a6c264
Merge pull request #2283 from dgarske/extern_c
...
Fixes for cpp extern c
2019-06-25 11:25:39 -07:00
toddouska
eceb460cff
Merge pull request #2287 from ejohnstown/sniffer-stats
...
Sniffer Statistics
2019-06-25 11:22:24 -07:00
David Garske
ef64cd300c
Fixes to improve read error handling.
...
* Improved `GetInputData` handling of non -1 return codes.
* Adds support for handling `WOLFSSL_CBIO_ERR_TIMEOUT` return code in non-DTLS case.
2019-06-25 07:11:14 -07:00
David Garske
dcdd6d6d6f
Cleanup around include of wolfmath.h and shared math macros. Fix for SP math case with WOLFSSL_BIGNUM.
2019-06-25 07:06:33 -07:00
David Garske
a9fff57063
Add extern "C" to headers. Some files are missing this, which can cause issues with some compilers when using the C++ mode.
2019-06-25 07:05:46 -07:00
Sean Parkinson
ee023c6bf4
Simple checks of DH public value from peer.
...
Add test for wc_DhCheckPubValue
2019-06-25 11:12:33 +10:00
Hideki Miyazaki
da6ed416be
use len for copy-length instead of sz
2019-06-25 08:39:46 +09:00
John Safranek
26384d4936
Sniffer Stats
...
Upgrade the sniffer stats to unsigned long ints.
2019-06-24 16:16:05 -07:00
toddouska
b957415609
Merge pull request #2245 from MKinclRA/coverity-issues
...
Coverity issues
2019-06-24 16:12:52 -07:00
John Safranek
851a547fd5
FIPS Hash
...
Add a script that updates the verifyCore value automatically. It isn't
included in the dist like fips-check.sh.
2019-06-24 16:01:05 -07:00
toddouska
15552be934
Merge pull request #2280 from cconlon/selftestccm
...
CAVP self test build fixes for AES-CCM and PKCS7
2019-06-24 15:55:18 -07:00
toddouska
036f6a1177
Merge pull request #2281 from ejohnstown/evp-legacy
...
Legacy EVP_CipherFinal addition
2019-06-24 15:54:43 -07:00
toddouska
785d984a3c
Merge pull request #2282 from SparkiDev/certvfy_tls13
...
Free RSA key later in TLS v1.3 CertificateVerify
2019-06-24 15:54:04 -07:00
toddouska
56d7da3130
Merge pull request #2284 from dgarske/api_test
...
Fixes for track memory and API unit test cleanup
2019-06-24 15:53:32 -07:00
toddouska
587e962331
Merge pull request #2288 from SparkiDev/ed25519_string_fix
...
Fix length of buffer to match string length for g++
2019-06-24 15:39:52 -07:00
toddouska
2ba89cb7a9
Merge pull request #2289 from SparkiDev/sp_prime_fix
...
When checking primes call only available SP ModExp functions
2019-06-24 15:39:03 -07:00
toddouska
c7964b62c0
Merge pull request #2290 from kaleb-himes/ZD-5253-X25519
...
Support CURVE25519 in `get_curve_name` when HAVE_ECC not defined
2019-06-24 15:37:34 -07:00
toddouska
358757cd2e
Merge pull request #2291 from ejohnstown/random-clean
...
Random Cleanup
2019-06-24 15:36:00 -07:00
toddouska
0100159079
Merge pull request #2293 from ejohnstown/aesni-fix
...
AES-NI Fix
2019-06-24 15:34:12 -07:00
toddouska
78956534f0
Merge pull request #2298 from SparkiDev/static_rsa
...
Improve handling of static RSA's decrypted pre-master secret
2019-06-24 15:24:18 -07:00
Jacob Barthelmeh
0e3881d418
add test case for state only export on DTLS session
2019-06-24 16:08:12 -06:00
John Safranek
8439beb525
Sniffer Statistics
...
1. Moved sslKeyFails.
2. Added sslEphemeralMisses, sslEncryptedConns, sslDecodeFails.
3. Removed the Rehandshake stats as the sniffer does not support rehandshaking.
4. Removed two of the per second stats as they seemed redundant.
5. Added a function to atomically read and reset the sniffer statistics.
2019-06-24 09:54:42 -07:00
John Safranek
0eaccb7259
Removed some redundant comments from the sniffer header.
2019-06-24 09:54:42 -07:00
John Safranek
0203a25b60
Sniffer Statistics
...
Added stats for encrypted and decrypted bytes and packet counts.
2019-06-24 09:54:42 -07:00
John Safranek
9715431921
Sniffer Statistics
...
1. Wrapped the added code for statistics in a preprocessor guard.
2. Added a check for the current cipher suite and if it is on the list
of allowed suites. Guarded by the statistics option.
3. Added more statistics from the list.
2019-06-24 09:54:42 -07:00
John Safranek
c600f7659a
Sniffer Statistics
...
Added more of the statistics.
2019-06-24 09:54:42 -07:00
John Safranek
2ee7d05dcc
Sniffer Statistics
...
1. Added a structure for all the statistics to be kept.
2. Added a global to track the statistics.
3. Added a copy function to get a copy of the statistics.
4. Added a reset function for the statistics.
5. Handle the alert messages in statistics.
2019-06-24 09:54:42 -07:00
Juliusz Sosinowicz
71fe3313d3
Cleanup poly1305 struct
2019-06-24 09:43:55 +02:00
Juliusz Sosinowicz
c826c605a3
Fix problems when building with Make
2019-06-24 09:42:07 +02:00
Juliusz Sosinowicz
f42c94e3bc
Cleanup code and align labels
2019-06-24 09:42:07 +02:00
Juliusz Sosinowicz
0fed159abd
Poly1305 ARM64 optimization
2019-06-24 09:42:07 +02:00
Sean Parkinson
f1f6ac9308
Improve handling of static RSA's decrypted pre-master secret
2019-06-24 17:09:22 +10:00
Hideki Miyazaki
1d9d9e2955
fix ed25519 sing msg test failure
...
better random number handling
2019-06-24 15:27:29 +09:00
Takashi Kojo
6d04d784c4
pkcsBlockLen in RsaUnPad may be > 256
2019-06-24 07:53:23 +09:00
Jacob Barthelmeh
b236a1c32f
add export/import window state only
2019-06-21 15:52:48 -06:00
kaleb-himes
c114bcaead
Addressed peer feedback, avoid double check when HAVE_CURVE25519 not set
2019-06-21 09:40:17 -06:00
kaleb-himes
49a631996c
Check other names when FFDHE returns NULL
2019-06-21 09:27:15 -06:00
John Safranek
fba89ae034
Random Cleanup
...
1. Remove redundant calls to the generate function when instantiating
and reseeding the DRBG.
2. Added note to the apparently redundant extra call to the generate
function when running the self test. This extra call is there to make
sure the internal state is updating correctly as a part of the KAT.
3. Removed duplicate enable argument clause for rng from configure.ac.
2019-06-20 16:02:35 -07:00
David Garske
f4548945f7
Merge pull request #2292 from ejohnstown/config-tweak
...
Autoconf Update
2019-06-21 00:53:02 +02:00
John Safranek
e4e6ed3701
AES-NI Fix
...
Replace some removed constants for AES-NI. They were removed when the
inline assembly that used that was exported to its own file.
For Windows, we're using the C intrinsic AES-NI functions, and those
still needed those constants.
2019-06-20 15:33:30 -07:00
John Safranek
a28e075290
Autoconf Update
...
Consolidate all the AM_CONDITIONAL statements in one place in the
configure process. This replaces the set of repeat checks of enable
flags to conditionally check the AM_CONDITIONAL.
2019-06-20 13:37:53 -07:00
toddouska
7225823f90
Merge pull request #2278 from SparkiDev/cert_asn1
...
Better length checks when parsing ASN.1 certificates
2019-06-20 11:18:02 -07:00
David Garske
2460effb0b
Merge pull request #2285 from SparkiDev/tlsx_len
...
Better checking of return values in TLSX for error codes.
2019-06-20 10:10:31 -07:00
kaleb-himes
ce251417f5
curve25519 in get_curve_name when HAVE_ECC not defined. Thanks to C.B. for the report.
2019-06-20 10:57:07 -06:00
Sean Parkinson
b631670cca
Fix for SP math build in OpenSSL bn.h
2019-06-20 21:40:58 +10:00
Sean Parkinson
c82c9b481b
When checking primes call only available SP ModExp functions
2019-06-20 18:05:25 +10:00
Sean Parkinson
e1b03aa056
Fix length of buffer to match string length for g++
2019-06-20 17:01:16 +10:00
Sean Parkinson
e7b3b31d9f
Change TLSX functions that return error with length to do so separately
2019-06-20 16:37:34 +10:00
David Garske
7bde02b3e7
Fix for track memory case where the "prev" wasn't getting initialized for the first malloc. Caused issue on last free with fsantize because pointers are not zero'd by default.
2019-06-19 11:23:37 -07:00
Chris Conlon
19cb31d429
Merge pull request #2286 from miyazakh/fix_make_dist
...
fix make dist
2019-06-19 09:38:07 -06:00
Hideki Miyazaki
4581342fb0
fix make dist
2019-06-19 09:32:56 +09:00
Sean Parkinson
71cb117dda
Better length checks when parsing ASN.1 certificates
2019-06-19 10:05:21 +10:00
Sean Parkinson
d378d3c009
Better checking of return values in TLSX for error codes.
2019-06-19 10:02:55 +10:00
David Garske
dd9dd6306e
API unit test fix to remove improperly placed wolfSSL_Cleanup() call in test_for_double_Free. This caused erronous report with fsanitize=address.
2019-06-18 16:22:19 -07:00
Sean Parkinson
c500fd5a86
Free RSA key later in TLS v1.3 CertificateVerify
2019-06-19 08:47:40 +10:00
Chris Conlon
c2032c64d2
CAVP self test build fixes for AES-CCM and PKCS7
2019-06-18 08:29:49 -07:00
toddouska
2cf4a74b47
Merge pull request #2279 from SparkiDev/test_fix
...
Fix for small stack in test.c
2019-06-17 13:36:03 -07:00
John Safranek
36fb4e2f2d
Add a legacy version of the wolfSSL_EVP_CipherFinal() function that
...
performs the decrypt in the old manner before a particular bug was
fixed. The old method didn't add padding when the data to encrypt was
multiple of the block_size in length. The decrypt happened to ignore the
error returned by checkPad.
2019-06-14 14:43:45 -07:00
Sean Parkinson
18ac566f48
Fix AVX2 ChaCha20 assembly
2019-06-14 10:22:27 +10:00
Sean Parkinson
a4bdfbf953
Fix for small stack in test.c
2019-06-14 08:43:36 +10:00
toddouska
2435ec2d6b
Merge pull request #2275 from SparkiDev/sha512_arm32
...
Add ARM32 NEON code for SHA-512/384
2019-06-12 16:19:20 -07:00
Juliusz Sosinowicz
53cac0499f
Merge remote-tracking branch 'wolfSSL/master'
2019-06-12 14:42:02 +02:00
Sean Parkinson
102ecac70c
Merge pull request #2237 from julek-wolfssl/proper-arm-chacha-poly1305
...
ARM Chacha20 assembly code
2019-06-12 22:21:47 +10:00
Juliusz Sosinowicz
911c8df185
Fix 256 byte assembly slowdown
2019-06-12 00:52:42 +02:00
Chris Conlon
1f3d9c04c0
Merge pull request #2274 from miyazakh/fix_printstat_tlsbench
...
minor fix order for printing stats in tls_bench
2019-06-11 16:23:38 -06:00
John Safranek
01ad44feef
Merge pull request #2276 from kaleb-himes/BOTH_FIPS_VERSION_TESTING
...
Adjustment to test.c for merge of WCv4.0.1 changes
2019-06-11 13:21:42 -07:00
David Garske
24042c973a
Merge pull request #2259 from tmael/port_SiFive_RISCV
...
Added support for RISC-V SiFive HiFive Freedom platforms
2019-06-10 20:38:43 -07:00
Tesfa Mael
48d4ed38ac
Include SIFIVE files for distribution
2019-06-10 14:06:42 -07:00
toddouska
de5ff0acea
Merge pull request #2254 from SparkiDev/curve25519_x64_2
...
Fix and improvements for X25519 x86_64 ASM code
2019-06-10 13:35:43 -07:00
toddouska
1f0a46331b
Merge pull request #2270 from dgarske/stsafe_tls
...
STSAFE Improvements to support Crypto Callbacks
2019-06-10 13:34:20 -07:00
David Garske
540c5cdd2f
Updated benchmarks with SPI "dual mode" I/O enabled.
2019-06-10 20:33:28 +02:00
Juliusz Sosinowicz
a48981c3c6
Chacha20 ARM optimization
2019-06-10 19:21:46 +02:00
David Garske
cdf0241ed0
Updated benchmark with SHA512 "slow" version, which performs faster with the RISC-V compiler optimizations.
2019-06-09 19:43:55 +02:00
kaleb-himes
c5aa13021a
Adjustment to test.c for merge of WCv4.0.1 changes
2019-06-07 16:09:35 -06:00
David Garske
d7ab3a6dec
Further user_settings.h cleanup / additions. Additional README.md comments.
2019-06-07 13:58:17 -07:00
toddouska
02c2782e39
Merge pull request #2272 from JacobBarthelmeh/SanityChecks
...
remove store of last block w/o padding and adjust padding last block case
2019-06-07 10:29:29 -07:00
Juliusz Sosinowicz
b4ca2824cb
Merge remote-tracking branch 'wolfSSL/master'
2019-06-07 14:55:21 +02:00
Hideki Miyazaki
efcf06ef7c
use tlsv1_2 client method when tls13 is enabled
2019-06-07 19:13:46 +09:00
Sean Parkinson
6a594218bc
Add ARM32 NEON code for SHA-512/384
...
Fix up ARM32 Curve25519 assembly code to use right directives.
Slight improvement to ARM64 SHA-512 assembly code.
Don't return error code from Transform functions - can't fail.
2019-06-07 15:02:48 +10:00
Hideki Miyazaki
292aa196fb
minor fix to print stats in tls_bench
2019-06-07 12:05:19 +09:00
tmael
a2f943984f
Merge pull request #2268 from kaleb-himes/GH-2263
...
debug fix + remove outl value check - outl is only written not read
2019-06-06 11:22:19 -07:00
Chris Conlon
f114932a03
Merge pull request #2271 from miyazakh/fix_nomutexlock_after_free
...
avoid mutex lock test after freeing it on NetBSD
2019-06-06 09:27:18 -06:00
David Garske
90228e1275
Merge pull request #2269 from SparkiDev/sp_cast
...
Fix casting of memory allocation to correct type
2019-06-06 06:14:59 -07:00
Jacob Barthelmeh
87d24f4488
add additional test case for evp
2019-06-06 16:14:00 +07:00
Jacob Barthelmeh
090899e74e
remove store of last block w/o padding and adjust padding last block case
2019-06-06 14:43:07 +07:00
David Garske
fdd01c8c8c
Added support for SHA512, ED25519/CURVE25519 and ChaCha20/Poly1305. Enabled ECC Single Precision (SP) support. Updated README.md wolfCrypt test/benchmarks. Pulled in fix "Fix casting of memory allocation to correct type" from Sean.
2019-06-05 20:21:48 -07:00
Hideki Miyazaki
64b8af728b
skip mutex lock after free
2019-06-06 11:06:29 +09:00
Sean Parkinson
4e3004639d
Fix casting of memory allocation to correct type
2019-06-06 09:11:19 +10:00
kaleb-himes
97780149a5
debug fix + remove outl value check - outl is only written not read
2019-06-05 13:38:13 -06:00
Tesfa Mael
25aeb8238e
Addressed review comment about id being undefined
2019-06-04 16:05:57 -07:00
David Garske
9f9155b6f2
Added STSAFE Crypto Callback support.
2019-06-04 15:57:31 -07:00
David Garske
074e770c98
* Fix to ensure user_settings.h can be included for bio.c and evp.c when IDE or compiler tries to build it directly. Allows for wildcard .c include along with WOLFSSL_IGNORE_FILE_WARN.
...
* Fix for building SP cortex M without RSA.
* Fix for type-cast warning with STSAFE-A100.
* Improved the RNG seed test to prevent type-case warning.
2019-06-04 15:57:31 -07:00
toddouska
fee81ce49e
Merge pull request #2257 from dgarske/sha256_regs
...
Added faster SHA256 build options
2019-06-04 14:05:54 -07:00
toddouska
77248e4e2a
Merge pull request #2255 from SparkiDev/sha512_arm
...
SHA-512 optimised for ARM64
2019-06-04 14:04:33 -07:00
Tesfa Mael
4f80c7c94e
Allow main to build when local debug flag is on
2019-06-04 13:12:27 -07:00
David Garske
19372c8199
Merge pull request #2266 from kaleb-himes/ZD-5154
...
Check correct allocation assignment. Thanks to R.A. for the report on…
2019-06-04 10:22:09 -04:00
David Garske
b4571f1f5a
Updates to documentation for SHA256 build options. Changed to enable Ch/Maj math based of specification by default.
...
The `WOLFSSL_SHA256_ALT_CH_MAJ` alternate Ch/Maj performance is the same.
The `SHA256_MANY_REGISTERS` is about 13% slower on 64-bit. On some platforms is slightly faster.
2019-06-03 14:17:47 -07:00
Kaleb Himes
290663f8b2
Feedback changes implemented
2019-06-03 15:13:02 -06:00
Chris Conlon
7601276411
Merge pull request #2267 from ejohnstown/aesgcm-selftest
...
NetBSD Selftest, TLSv1.3, and wolfCrypt v4
2019-06-03 14:31:33 -06:00
Chris Conlon
4367761367
Merge pull request #2261 from kaleb-himes/ZD-5172
...
PKCS7 w/ FIPS cert 3389 support
2019-06-03 11:28:27 -06:00
John Safranek
978928be83
NetBSD Selftest, TLSv1.3, and wolfCrypt v4
...
When building for TLSv1.3 and the NetBSD Selftest, need to use the old
pre-wolfCrypt v4 APIs for AES-GCM and AES-CCM.
2019-06-03 09:40:00 -07:00
kaleb-himes
80dd6cc143
Check correct allocation assignment. Thanks to R.A. for the report on ZD-5154
2019-06-03 08:34:51 -06:00
Jacob Barthelmeh
9fbe471156
fix check on ret value and add test case
2019-06-03 07:52:50 +07:00
Sean Parkinson
e429185535
Make Transform_SHA512_Len API local scope
2019-06-03 08:35:36 +10:00
toddouska
7624d90590
Merge pull request #2258 from dgarske/no_stdlib
...
Improvements for no standard lib and no malloc/free builds
2019-05-31 14:59:33 -07:00
Sean Parkinson
7726bbbff2
Fix extra distribution files for ARM port dir
2019-05-31 10:47:42 +10:00
Sean Parkinson
e01ae09809
X25519 when not AVX2
2019-05-31 10:12:46 +10:00
David Garske
a5fabda5c6
Added compile-time check for DRBG size. Added support for all build variations DRBG size.
2019-05-30 15:59:12 -07:00
toddouska
19c348b5c7
Merge pull request #2256 from dgarske/blake2s
...
Adds Blake2s support
2019-05-30 15:08:59 -07:00
Sean Parkinson
33d27a391a
Improve SHA-512 and Curve25519
2019-05-30 16:07:06 +10:00
Sean Parkinson
173163d1a3
SHA-512 optimised for ARM64
2019-05-30 16:04:15 +10:00
David Garske
af9d82963e
Add support for increasing CPU clock speed. New benchmarks with HiFive1 RevB hardware at 320MHz.
2019-05-29 12:11:16 -07:00
Tesfa Mael
fea89c52f4
configure with ECC256 only
2019-05-29 10:51:07 -07:00
kaleb-himes
5601aa4634
PKCS7 w/ FIPS cert 3389 support
2019-05-29 11:12:34 -06:00
David Garske
f1ecf33d94
Merge pull request #2253 from danielinux/cygwin-build-fix
...
Fix visibility tags for cygwin build
2019-05-29 06:29:47 -07:00
Tesfa Mael
765b075e50
Updated with review comments
2019-05-28 17:48:36 -07:00
Tesfa Mael
87fb9f73e9
Added RISC-V SiFive FE310 support
...
Added freedom-e-sdk based makefile
Updated ecc test code to not allocate more memory than requried
Run wolfcrypt and benchmark tests on the SiFive HiFive1 targets
2019-05-28 17:48:36 -07:00
David Garske
5ea13a09f6
Adds Blake2s support (--enable-blake2s), which provides 32-bit Blake2 support.
2019-05-28 10:30:19 -07:00
Martin Kinčl
d42bdf9c0b
Removed unused variable keyQ from _DhSetKey.
2019-05-27 12:44:10 +02:00
toddouska
263769765c
Merge pull request #2246 from ejohnstown/sniffer-logging
...
Sniffer Logging
2019-05-24 15:36:11 -07:00
David Garske
f26a9589ff
Added support for printf override using XPRINTF for wolfCrypt test/benchmark. Added ability to override snprintf with XSNPRINTF. If STRING_USER is defined no standard lib <string.h> or <stdio.h> will be included.
2019-05-23 22:03:38 -06:00
David Garske
a89a2839de
Fixes for building with WOLFSSL_NO_MALLOC. Fixes for static memory in bench embedded case. Added support for elimination of XMALLOC/XFREE when building with NO_WOLFSSL_MEMORY and WOLFSSL_NO_MALLOC. If used with WOLFSSL_MALLOC_CHECK will trap failures with malloc_check
2019-05-23 22:00:41 -06:00
David Garske
ebbfe769e3
Added faster SHA256_MANY_REGISTERS support (thanks Sean). The WOLFSSL_SHA256_BY_SPEC option restore old math, the new case is equivalent math, but easier for compiler to optimize.
2019-05-23 21:53:07 -06:00
Sean Parkinson
6564d03369
Fix and improvements for X25519 x86_64 ASM code
2019-05-24 09:43:08 +10:00
John Safranek
86b558300b
Sniffer Logging
...
1. When collecting the key size to log it, use the constant WOLFSSL_BIT_SIZE for the bytes->bits multiply.
2. When converting the size of the ECC key, break the steps out more explicitly. Also update the comment to be more accurate.
2019-05-23 13:02:52 -07:00
toddouska
9906a1045b
Merge pull request #2251 from SparkiDev/sp_c_div_word
...
SP - div word in C when __div64 or __div128 not available
2019-05-23 11:51:29 -07:00
toddouska
ac5a5dfd56
Merge pull request #2247 from SparkiDev/psk_once
...
Use TLS v1.3 PSK callback in extension allow for one call in client
2019-05-23 11:49:40 -07:00
toddouska
6fe4c3ff34
Merge pull request #2244 from dgarske/psk_pk
...
Fix for static RSA cipher suite with PK callback and no loaded private key
2019-05-23 11:43:20 -07:00
toddouska
cab4a8c9b1
Merge pull request #2240 from dgarske/x509small_showcerts
...
Added support for `SHOW_CERTS` with `OPENSSL_EXTRA_X509_SMALL`
2019-05-23 11:41:32 -07:00
toddouska
e7fdb1360a
Merge pull request #2239 from JacobBarthelmeh/Fuzzer
...
add sanity check on length of PSK identity
2019-05-23 11:40:13 -07:00
toddouska
a742cf9bf8
Merge pull request #2234 from JacobBarthelmeh/Testing
...
add sanity check on buffer index and regression tests
2019-05-23 11:32:38 -07:00
toddouska
5b5d03d5ac
Merge pull request #2232 from SparkiDev/curve25519_arm_2
...
Add ARM32 asm code for X25519 and Ed25519
2019-05-23 11:30:29 -07:00
Martin Kinčl
6cbe8219a3
Moved opening brace to the same line.
2019-05-23 16:13:34 +02:00
Martin Kinčl
ad8f9c6134
Changed memsetting mp_ints to boolean flag.
2019-05-23 13:22:09 +02:00
Daniele Lacamera
38d1e908d6
Fix visibility tags for cygwin build
2019-05-23 08:41:05 +02:00
David Garske
b53e94b49a
Merge pull request #2252 from kaleb-himes/ZD5137
...
Arduino refactor, default to fastmath and setup user_settings for user
2019-05-22 19:17:26 -04:00
Sean Parkinson
484f7a6c32
Merge pull request #2236 from tmael/sendAlertToTLSServer
...
send handshake failure alert to a server
2019-05-23 08:27:09 +10:00
Kaleb Himes
d8a3768464
Update README.md
2019-05-22 10:43:54 -06:00
kaleb-himes
827fc67e52
Arduino refactor, default to fastmath and setup user_settings for user
2019-05-22 10:38:26 -06:00
Tesfa Mael
ec4dad76e2
send protocol_version fatal alert message
2019-05-21 16:15:27 -07:00
Tesfa Mael
295dd4ff21
send protocol_version fatal alert message
2019-05-21 16:08:25 -07:00
Sean Parkinson
cb9e0a1973
SP - div word in C when __div64 or __div128 not available
...
Use WOLFSSL_SP_DIV_32 when using 32-bit C code.
Use WOLFSSL_SP_DIV_64 when using 64-bit C code.
2019-05-22 08:39:35 +10:00
JacobBarthelmeh
c77b99a8a4
Merge pull request #2248 from kaleb-himes/ZD-5141
...
Fix for potential leak on err: Thanks to Chris H. for the report
2019-05-20 16:11:40 -06:00
kaleb-himes
04f24881cb
Fix for potential leak on err: Thanks to Chris H. for the report
2019-05-17 16:48:58 -06:00
Martin Kinčl
be65e31cdc
Fixed possible buffer overflow in wc_DerToPemEx.
2019-05-17 19:23:55 +02:00
Martin Kinčl
c85eae1322
Fixed resource leak in mp_gcd.
2019-05-17 18:38:19 +02:00
Martin Kinčl
797dae9d74
Fixed use of uninitialized value in wc_ecc_sig_to_rs.
2019-05-17 18:04:39 +02:00
Sean Parkinson
1ce8e227d2
Use TLS v1.3 PSK callback in extension allow for one call in client
...
New compile time option WOLFSSL_PSK_ONE_ID. Indicates one identity
available. No need for client to call callback when generating binder -
already cached.
2019-05-17 08:01:40 +10:00
John Safranek
245db5d5ce
Expand Sniffer Logging
...
1. Moved the CopySessionInfo function to a better location for the additions.
2. Added accessors for a callback and application context data.
3. Added a callback that is called from ProcessClientKeyExchange when everything is known about the start of the current session.
4. Added the private key size and the server name indication to the SSLInfo record.
2019-05-16 14:09:20 -07:00
John Safranek
1781a9fd76
Sniffer Logging
...
1. Capture the SNI in the SSLInfo.
2. Save the private key length and capture it in the SSLInfo.
2019-05-16 10:57:45 -07:00
Martin Kinčl
27a9080ac3
Removed dead code from _DhSetKey.
2019-05-16 16:58:41 +02:00
Martin Kinčl
cae4d400b9
Removed dead code from wolfSSL_d2i_X509_fp_ex.
2019-05-16 16:54:40 +02:00
Martin Kinčl
6ab24a2ca3
Fixed unintentional integer overflow in SetValidity.
2019-05-16 16:45:10 +02:00
Martin Kinčl
3b544b8584
Fixed use of uninitialized value in wc_BufferKeyEncrypt.
2019-05-16 16:41:31 +02:00
Martin Kinčl
7a9d3db514
Fixed use of uninitialized value in wc_BufferKeyDecrypt.
2019-05-16 16:37:31 +02:00
Martin Kinčl
6c713e4b88
Fixed use of uninitialized values in wc_DhGenerateParams.
2019-05-16 16:31:12 +02:00
David Garske
fd50248139
Fix for static RSA cipher suite (AES128-GCM-SHA256) with PK callbacks and no private key set. ZD 5092
2019-05-15 19:35:30 -07:00
David Garske
651087ab5a
Merge pull request #2241 from ejohnstown/sniffer
...
Sniffer Update
2019-05-15 18:52:44 -07:00
David Garske
7a671eb70b
Merge pull request #2243 from JacobBarthelmeh/Windows
...
custom ECC curves on Windows
2019-05-15 18:51:01 -07:00
JacobBarthelmeh
aca46f42fb
Merge pull request #2242 from ejohnstown/micrium
...
Micrium Updates
2019-05-15 15:43:37 -06:00
Jacob Barthelmeh
b2a5516c63
custom ECC curves on Windows
2019-05-15 11:31:26 -06:00
Jacob Barthelmeh
88bf5d9676
add sanity check on buffer index and regression tests
...
macro guards on use case and adjustment for memory size
gcc-8 warning fix
adjustement to default memory bucket sizes
2019-05-14 15:55:24 -06:00
John Safranek
3b0a7e679a
Add an option for __inline w.r.t. using a GHC compiler.
2019-05-14 13:44:33 -07:00
John Safranek
5b658ebff5
Renamed #sslpro as #error.
2019-05-14 13:44:33 -07:00
John Safranek
0cdaf43a14
Rename the macro "STATIC" as "WC_STATIC" to prevent collisions.
2019-05-14 13:44:33 -07:00
John Safranek
a8b469eb7f
Sniffer
...
1. Refactor `ProcessClientKeyExchange()` so it can be expanded to handle ECC keys for ECDH support.
2. Add support to the sniffer for ECDH based cipher suites.
2019-05-14 13:33:52 -07:00
David Garske
10dde24363
Added support for SHOW_CERTS with OPENSSL_EXTRA_X509_SMALL for embedded debugging of certs. Minor build warning fixes with OPENSSL_EXTRA and STM32_HASH on IAR.
2019-05-14 09:24:59 -07:00
Jacob Barthelmeh
5aa5f350ba
add sanity check on length of PSK identity
2019-05-13 17:16:10 -06:00
John Safranek
9d4d877919
Sniffer
...
1. Added the null-cipher to the list of supported bulk ciphers.
2019-05-13 11:29:14 -07:00
David Garske
f923409f1f
Merge pull request #2235 from kaleb-himes/ZD-5116
...
Check appropriate flag for private vs public - Thanks to: E.M.
2019-05-13 10:29:48 -07:00
toddouska
dbeb5d702f
Merge pull request #2231 from JacobBarthelmeh/Fuzzer
...
sanity check on buffer size
2019-05-10 16:46:38 -07:00
Juliusz Sosinowicz
27e243085d
Merge remote-tracking branch 'wolfSSL/master'
2019-05-10 13:04:18 +02:00
Tesfa Mael
bf9f912b29
send handshake failure alert to a server
2019-05-09 17:01:36 -07:00
kaleb-himes
79bf578fd3
Check appropriate flag for private vs public - Thanks to: E.M.
2019-05-09 17:05:34 -06:00
JacobBarthelmeh
e43e03c30a
Merge pull request #2226 from tmael/defectEVP
...
Verify input parameters of EVP_CipherFinal
2019-05-09 14:35:16 -06:00
Tesfa Mael
1605ab86d2
Verify input arguments and handle incorrect length of a final block
2019-05-09 08:32:52 -07:00
Sean Parkinson
34dc41fe75
Merge pull request #2229 from JacobBarthelmeh/Testing
...
free any existing ke before updating
2019-05-09 11:48:59 +10:00
Sean Parkinson
4e2e207e67
Add ARM32 asm code for X25519 and Ed25519
...
Improvements to performance of ARM64 code for X25519 and Ed25519
2019-05-09 09:23:58 +10:00
Jacob Barthelmeh
9205ee70f4
add null check on pointer before passing to XFREE
2019-05-08 16:04:20 -06:00
Jacob Barthelmeh
94d9ce1dfa
sanity check on buffer size
2019-05-08 09:33:35 -06:00
toddouska
ff5bf7aea1
Merge pull request #2230 from dgarske/bench_threads
...
Added benchmarking `-thread <num>` argument support
2019-05-07 11:21:29 -07:00
toddouska
dcd6e02de9
Merge pull request #2228 from JacobBarthelmeh/Fuzzer
...
sanity check on buffer size before copy
2019-05-07 11:20:35 -07:00
toddouska
a36296a959
Merge pull request #2227 from dgarske/eccsigsz
...
Fix issue with ECC signature size leaking memory with normal math
2019-05-07 11:17:12 -07:00
Tesfa Mael
ade8f780a9
simplify to not expect null terminated strings
2019-05-07 11:11:41 -07:00
David Garske
891a645eaa
Added benchmarking -thread <num> argument support for asynchronous crypto to allow run-time selection of thread count. ZD 4903.
2019-05-07 07:07:56 -07:00
Jacob Barthelmeh
a130ce2eed
free any existing ke before updating
2019-05-06 15:51:42 -06:00
Jacob Barthelmeh
b1442633dd
sanity check on buffer size before copy
2019-05-06 15:36:58 -06:00
David Garske
3c1569dff7
Fix for issue with new wc_ecc_get_curve_order_bit_count function not free'ing memory when used with normal math. Started in https://github.com/wolfSSL/wolfssl/pull/2201
2019-05-06 11:41:50 -07:00
toddouska
683646e452
Merge pull request #2208 from SparkiDev/curve25519_arm
...
Curve25519 ARM64 assembly
2019-05-03 11:14:35 -07:00
toddouska
08531a0f31
Merge pull request #2225 from dgarske/unicode
...
Remove leading unicode UTF-8 BOM characters
2019-05-03 11:12:06 -07:00
Tesfa Mael
3e7a6054a9
Use the macro instead of sizeof()
2019-05-02 14:13:48 -07:00
Tesfa Mael
06eba2c1e2
Removed a redundant check
2019-05-02 13:58:55 -07:00
David Garske
1a76f0cd26
Remove leading unicode UTF-8[a] BOM characters (EF BB BF). Searched through repo and atmel.c was only one.
2019-05-02 13:21:43 -07:00
John Safranek
78c6ad4d84
Merge pull request #2217 from tmael/maintenanceOcspResponse
...
Fix for an OCSP Response signed by issuer
2019-05-02 10:14:01 -07:00
toddouska
0dd3305f06
Merge pull request #2221 from SparkiDev/rfc8032
...
Support Ed25519ctx and Ed25519ph sign/verify algorithms
2019-05-01 15:45:03 -07:00
toddouska
5e343b8e7e
Merge pull request #2201 from dgarske/siglen
...
Improvements to the maximum ECC signature calculations
2019-05-01 15:42:12 -07:00
toddouska
814c5776fd
Merge pull request #2051 from dgarske/build_fixups
...
Fixes for various build issues
2019-05-01 15:41:14 -07:00
Sean Parkinson
b25177ca6c
Include new ARMv8 curve25519 C file in distribution
2019-05-01 13:23:06 +10:00
Sean Parkinson
dc98832757
Add more tests for Ed25519ctx and Ed25519ph
2019-05-01 09:24:08 +10:00
toddouska
dc313ccf6e
Merge pull request #2222 from dgarske/win_dir
...
Fix for read directory functions with Windows
2019-04-30 15:19:34 -07:00
Kaleb Himes
e00ba1c66a
Merge pull request #2090 from vaintroub/fix_clang_cl
...
Disable MP_64BIT when compiling with clang-cl on Windows.
2019-04-30 13:36:39 -06:00
Chris Conlon
7cdda4d595
Merge pull request #2218 from abrahamsonn/iar
...
IAR-EWARM warning removal/formatting
2019-04-30 11:55:29 -07:00
David Garske
86101468fc
Fixes for know wolfSSL build issues in the following cases:
...
* Fixes for building wolfSSL from GitHub sources download, where .git does exist. The autogen.sh still needs to "touch" files for the build to work.
* Fix for FIPS case where `wc_RsaSetRNG` is not available.
* Added new `./configure --enable-usersettings` option to not populate the Makefile with build options and instead define `WOLFSSL_USER_SETTINGS` and expect a user provided `user_settings.h` file.
* Fix for `HAVE___UINT128_T` to match config.h generated value to eliminate warning.
2019-04-30 11:45:48 -07:00
David Garske
443fef6a6a
Further optimization of the ECC signature size calculation.
2019-04-30 08:50:19 -07:00
Sean Parkinson
9d736898cc
Support Ed25519 sign/verify algorithms ctx and ph
2019-04-30 16:57:20 +10:00
David Garske
8aacd7b802
Fix for read directory functions with Windows (wc_ReadDirFirst and wc_ReadDirNext). Fix to use bit-mask check instead of equality.
2019-04-29 20:47:52 -07:00
abrahamsonn
b68253c180
Merge branch 'iar' of https://github.com/abrahamsonn/wolfssl into iar
2019-04-26 15:41:27 -06:00
abrahamsonn
ef29aa94ea
Added build option checks to tls.c and tls13.c
...
Set tls.c and tls13.c to abort if the library is built with TLS 1.3 and not
HAVE_TLS_EXTENSIONS
2019-04-26 15:32:38 -06:00
abrahamsonn
ea797fd98e
Building with just bare TLS 1.3 settings
...
will produce the error that the wolfSSL struct doesn't have extensions.
2019-04-26 14:08:20 -06:00
abrahamsonn
bbb72946b7
initialized var.
2019-04-26 11:35:50 -06:00
abrahamsonn
1830a0a74c
Removed trailing whitespaces
2019-04-25 15:50:02 -06:00
Tesfa Mael
45703a8d72
handle OCSP verified certificate which is already loaded as CA
2019-04-25 10:55:12 -07:00
Chris Conlon
fdabe614f8
Merge pull request #2215 from miyazakh/Renesas_IDE
...
Clean up user_settings for CS+
2019-04-24 15:55:01 -07:00
Tesfa Mael
dfde631cb2
Free key at the end of the test
2019-04-24 11:49:53 -07:00
toddouska
12a7c32530
Merge pull request #2170 from tmael/nRF52840CryptoCell
...
Initial CryptoCell-310 support on nRF52840
2019-04-24 11:09:46 -07:00
toddouska
547c09e1d7
Merge pull request #2210 from JacobBarthelmeh/Compatibility-Layer-Part2
...
JSSE additions
2019-04-24 11:04:05 -07:00
toddouska
a87552b37f
Merge pull request #2213 from JacobBarthelmeh/HardwareAcc
...
add macro guards
2019-04-24 10:59:02 -07:00
Tesfa Mael
edef75c70f
Wrapped new unit test API with FIPS macros
2019-04-24 10:02:20 -07:00
Tesfa Mael
6b51f2d5b2
Added unit test for wc_ecc_get_curve_id_from_dp_params
2019-04-23 16:45:52 -07:00
Jacob Barthelmeh
2a6ab9549b
add macro guards
2019-04-23 13:51:58 -06:00
Jacob Barthelmeh
3e24212780
add sanity check on buffer size when copying public key
2019-04-23 13:42:49 -06:00
Tesfa Mael
5d2f34aa6d
Addressed review comments
2019-04-23 10:04:41 -07:00
David Garske
34c1d5cba0
Cleanups and fixes for CryptoCell port:
...
* Protection for .c includes.
* Improved make pub memory issue reporting.
* README.md updates.
* Cleanup of user_settings.h.
2019-04-23 10:04:41 -07:00
David Garske
6c65550eab
Added CryptoCell-310 support
...
- SHA-256
- AES CBC
- CryptoCell 310 RNG
- RSA sign/verify and RSA key gen
- RSA encrypt/decrypt, decrypt inline
- ECC sign/verify/shared secret
- ECC key import/export and key gen pairs
- Hardware RNG and RTC of nRF52840 for benchmark timing source
- readme doc
2019-04-23 10:04:41 -07:00
Hideki Miyazaki
90ce5c04dc
Clean up user_settings for CS+
2019-04-23 13:44:05 +09:00
Tesfa Mael
f8c9285b92
Added a WOLFSSL_CIPHER_LIST_MAX_SIZE macro
2019-04-22 16:30:38 -07:00
Tesfa Mael
393ca1b30c
Increased test suite ciphers buffer size (ticket #5000 ))
...
Enhancement to support ECC domain param HEX string or unsigned bin comparison (ticket #5035 )
2019-04-22 10:30:05 -07:00
Jacob Barthelmeh
de299848c1
initialize pubkey size to 0
2019-04-22 10:01:17 -06:00
Jacob Barthelmeh
82796d4b4c
remove pubKeyX509 from WOLFSSL_X509 structure
2019-04-19 15:15:02 -06:00
Jacob Barthelmeh
29101a29c9
free key in test case, initialize variables fix, macro guard on iana use
2019-04-19 09:47:15 -06:00
Jacob Barthelmeh
ec2849b885
macro guard on EncodePolicyOID use
2019-04-18 14:56:24 -06:00
Jacob Barthelmeh
efc96e40d1
add test cases
2019-04-18 10:41:51 -06:00
toddouska
378f5c0d4b
Merge pull request #2204 from dgarske/server_fixups
...
Improvements to TLS write handling in error cases
2019-04-18 09:21:27 -07:00
Jacob Barthelmeh
b291b51988
adjust get pubkey from X509
2019-04-18 09:31:01 -06:00
Jacob Barthelmeh
e1537b2a56
add case CRL_DIST_OID and fix key usage check
2019-04-18 09:31:01 -06:00
Chris Conlon
e4555b5bf5
add wolfTLSv1_3_method()
2019-04-18 09:31:01 -06:00
Jacob Barthelmeh
abced6c365
place tls 1.3 suites at beginning of list and alter parse on set cipher list
2019-04-18 09:31:01 -06:00
Jacob Barthelmeh
b787465b42
adjust TLS 1.3 capable check
2019-04-18 09:31:01 -06:00
Jacob Barthelmeh
083183e3b1
add get cipher iana list and parse iana list
2019-04-18 09:31:01 -06:00
Jacob Barthelmeh
db1fabbdd4
add WOLFSSL set IO callbacks
2019-04-18 09:31:01 -06:00
Jacob Barthelmeh
6976219b05
add x509 TBS getter function
2019-04-18 09:31:01 -06:00
Jacob Barthelmeh
7da46501cc
add certgen and certext to jni, add get timeout function
2019-04-18 09:31:01 -06:00
Jacob Barthelmeh
788443d3cf
set initial buffer size
2019-04-18 09:31:01 -06:00
Jacob Barthelmeh
494e469dd2
implement wolfSSL_OBJ_txt2nid for OIDs
2019-04-18 09:31:01 -06:00
Jacob Barthelmeh
72f3329faa
add wolfSSL_X509_verify function
2019-04-18 09:31:01 -06:00
Jacob Barthelmeh
bf3d876e6a
getter function for X509 public key
2019-04-18 09:31:01 -06:00
Sean Parkinson
0d3541594f
Curve25519 ARM64 assembly
...
Also in a C file but use the assembly code file if possible.
2019-04-18 14:41:57 +10:00
Chris Conlon
2cf264a9d5
Merge pull request #2207 from ejohnstown/evp-init-fix
...
EVP Init Fix
2019-04-17 17:16:42 -07:00
Chris Conlon
3f8e0a67e6
Merge pull request #2206 from miyazakh/Renesas_IDE_CSPlus
...
Updated Renesas example projects as the latest version of sw use
2019-04-17 17:15:31 -07:00
John Safranek
3bf01072d8
EVP Init Fix
...
When calling wolfSSL_EVP_DigestInit() with an unsupported string, the
macType should be set to NONE, rather than ignored. In a particular
build combination, functions using that EVP could false the type because
of memory garbage. Just set it in the else case.
2019-04-17 14:04:00 -07:00
Hideki Miyazaki
1ab5a022c6
updated as the latest version of sw use
2019-04-17 16:30:11 +09:00
David Garske
5bfc49f63f
Changed ECC_MAX_PAD_SZ to be overridable macro for rare case where user might require additional padding.
2019-04-15 14:56:04 -07:00
David Garske
4ee4cb2068
Improved readability for ECC signature max size calculations.
2019-04-15 11:08:08 -07:00
toddouska
013e4429da
Merge pull request #2202 from SparkiDev/curve25519_asm_file
...
Curve25519 converted from inline assembly to asm only
2019-04-12 16:31:08 -07:00
toddouska
3c63f70cde
Merge pull request #2203 from dgarske/atmel_typo
...
Fix for typo in atmel PK callbacks
2019-04-12 15:00:49 -07:00
David Garske
bd618970c1
Fixed API unit test for wc_ecc_sig_size to allow smaller result.
2019-04-12 12:36:20 -07:00
David Garske
68390b1ba3
Improvement to wolfSSL_write to not allow for VERIFY_MAC_ERROR or DECRYPT_ERROR errors. This resolves possible end user application implentation issue where a wolfSSL_read failure isn't handled and a wolfSSL_write is done anyways.
2019-04-12 11:29:28 -07:00
David Garske
364bf50a94
Fixed example server to not try and write on failure.
2019-04-11 11:30:41 -07:00
David Garske
02500365bf
Revert additional atmel.h changes for opaque types in PR #2199 .
2019-04-11 06:15:39 -07:00
David Garske
1d023b344d
Fix for typo in atmel PK callbacks from PR #2199 .
2019-04-11 06:02:37 -07:00
Sean Parkinson
e5bf2ed1d1
Curve25519 converted from inline assembly to asm only
...
Fixed large values (top bit set) in tables to be negative as the type is
signed.
Put C++ protection around function prototypes in fe_operations.h.
2019-04-11 16:17:48 +10:00
David Garske
ae9ef3998c
Enable the TFM speedups when used with --enable-ecccustcurves=all and fastmath and x86.
2019-04-10 21:06:17 -07:00
David Garske
1fffe4a463
Improvements to the maximum ECC signature claculations. The wc_ecc_sig_size function provides actual max based on curve order. The wc_ecc_sig_size_calc has also been adjusted to provide a more accurate maximum size.
2019-04-10 21:05:46 -07:00
toddouska
b6fcbe8436
Merge pull request #2199 from dgarske/contiki_16bit
...
Fixes for PK callbacks on 16-bit and ATECC
2019-04-09 14:56:26 -07:00
toddouska
35654530ba
Merge pull request #2198 from SparkiDev/sp_cortex4_iar
...
Cortex-M code changed to support IAR compiler
2019-04-09 14:41:00 -07:00
toddouska
173016ef47
Merge pull request #2196 from dgarske/stm32_aes_gcm
...
Improvement for STM32 GCM performance
2019-04-09 14:31:27 -07:00
toddouska
13909fc407
Merge pull request #2190 from dgarske/telit
...
Port for Telit IoT AppZone SDK
2019-04-09 14:26:59 -07:00
David Garske
a90001581e
Fixes for PK callbacks and ATECC. Fixes for PK callbacks on 16-bit system where unsigned int* is used. Fix for ATECC PK callback functions. Fix for atmel_ecc_create_pms to free the used slot.
2019-04-09 08:15:01 -07:00
Sean Parkinson
333b666f6b
Fixups updated and IAR defines
2019-04-09 10:59:24 +10:00
Chris Conlon
9b62141580
Merge pull request #2197 from abrahamsonn/doxygen-update
...
Updated doxygen script
2019-04-08 15:24:02 -07:00
David Garske
2c5f268f16
Port for Telit IoT AppZone SDK
...
* Added new `WOLFSSL_TELIT_M2MB` build option to enable support for RNG, Time, Mutex, FileSystem and Directory.
* Added `XTIME_MS` macro to simplify the tls13.c layer time requirement.
* Cleanup of the wolfCrypt benchmark and test printf remapping.
* Added wolfCrypt optional memory test enabled with `COMPLEX_MEM_TEST`.
* Added wolfCrypt test / benchmark feature for allowing "sleep" between long operations using `TEST_SLEEP()`.
* Fix for extern with `sp_ModExp_2048` when building with `--cpp` option.
2019-04-08 06:43:25 -07:00
Sean Parkinson
4f75d4eea2
Cortex-M code changed to support IAR compiler
2019-04-08 09:03:50 +10:00
John Safranek
c78b0c3a40
Merge pull request #2194 from dgarske/testcerts
...
Fix for test certs script
2019-04-05 15:13:39 -07:00
David Garske
bbf8ed408d
Fix for LowResTimer function ptoto not matching for 16-bit system.
2019-04-05 14:56:02 -07:00
David Garske
ce43044426
Improvement for STM32 GCM performance. ZD 4712.
2019-04-05 14:06:23 -07:00
David Garske
5c8cf9ecd2
Merge pull request #2195 from ejohnstown/vswarn
...
Fix VS Warning
2019-04-05 13:40:24 -07:00
abrahamsonn
460556ff45
Updated doxygen script
...
Changed check_api.sh grep call to be more friendly across machines, prior call
wasn't properly reporting API mismatch on some machines
2019-04-05 13:46:35 -06:00
John Safranek
6a964123a1
Add a pragma to ignore a particular warning when compiling the fast math file for Windows.
2019-04-05 10:08:41 -07:00
David Garske
f5f1fec840
Merge pull request #2193 from SparkiDev/hash_sha3
...
SHA-3 support in Hash
2019-04-05 09:04:33 -07:00
David Garske
2ad80df1c7
Fix for ./certs/gen-testcerts.sh sometimes reporting: "start date is invalid, it should be YYMMDDHHMMSSZ or YYYYMMDDHHMMSSZ".
2019-04-05 09:01:44 -07:00
David Garske
56d7766ba3
Merge pull request #2192 from SparkiDev/small_server
...
Fixes for small server build without client code
2019-04-05 06:18:57 -07:00
Sean Parkinson
cc5ba81245
SHA-3 support in Hash
2019-04-05 14:52:23 +10:00
Sean Parkinson
ad857c40d1
Fixes for small server build without client code
2019-04-05 09:38:14 +10:00
Chris Conlon
9c3cb2fbba
Merge pull request #2176 from miyazakh/no_signature_algo
...
Add macro definition to disable signature algorithms extension
2019-04-04 15:35:00 -07:00
David Garske
db83e6dd31
Merge pull request #2191 from ejohnstown/aesctr-sameio
...
AES-CTR In Place
2019-04-04 11:14:06 -07:00
Hideki Miyazaki
f81446bf69
Fixed compiling error while enabling opensslextra
2019-04-04 10:04:09 +09:00
John Safranek
a59488b299
AES-CTR In Place
...
Added a temp AES block in case in and out are the same pointer.
2019-04-03 15:02:00 -07:00
toddouska
b224f6fac9
Merge pull request #2181 from JacobBarthelmeh/Compatibility-Layer
...
update wolfSSL_i2d_RSAPrivateKey function
2019-04-03 09:16:10 -07:00
John Safranek
e13c903ad2
Merge pull request #2189 from dgarske/various_fixes
...
Various minor fixes
2019-04-02 09:21:31 -07:00
David Garske
51251bc421
Fix for ssl23.h include for openssl compat with cyassl.
2019-04-01 11:10:29 -07:00
John Safranek
e4059a65b9
Merge pull request #2177 from dgarske/async_rel_v4
...
wolfSSL Asynchronous release v4 fixes
2019-04-01 11:07:12 -07:00
David Garske
c7b5f772aa
Add missing cert to include.am for make dist, which is required for ./gencertbuf.pl.
2019-04-01 10:09:34 -07:00
David Garske
e8afb6ea51
Merge pull request #2174 from embhorn/zd4879
...
Fixes for static analysis issues
2019-04-01 08:48:40 -07:00
David Garske
26cbfcdee0
Fix for AES GCM decrypt test with Async.
2019-04-01 05:58:44 -07:00
David Garske
9ce32e3808
Merge pull request #2184 from ejohnstown/ecc-fix
...
Fix Clang Static-Analysis Finding
2019-04-01 05:46:22 -07:00
David Garske
9ad48067f6
Merge pull request #2183 from miyazakh/sess_reuse_unitest
...
Add unit test for session resumption re-using WOLFSSL obj
2019-04-01 05:45:08 -07:00
Hideki Miyazaki
817eaa6da4
protect compiling while enabling both WOLFSSL_TLS13 and WOLFSSL_NO_SIGALG
2019-03-30 10:41:57 +09:00
Hideki Miyazaki
6c0989ba4d
no_signature_algo
2019-03-30 10:41:40 +09:00
John Safranek
6d1a11eefb
Clang static analysis found a potential issue when checking an ECC key
...
when the curve cache is enabled. There was a chance it could dereference
NULL. Added some error checks to fix it.
2019-03-29 13:35:27 -07:00
Hideki Miyazaki
6968797848
fixed jenkins test failure
2019-03-30 01:35:35 +09:00
Hideki Miyazaki
1c22f14d1c
added unit test for session resumption re-using WOLFSSL obj
2019-03-29 20:13:41 +09:00
David Garske
1906179a1b
Fix for HAVE_ECC_CDH wolfCrypt test with async using the wrong size for x and y. With async the sizeof(sharedA) == 8 and it should be ECC_SHARED_SIZE.
2019-03-28 18:48:32 -07:00
David Garske
b0d65d2a3e
Remove remnant debug -Map from --with-intelqa build option.
2019-03-28 17:52:08 -07:00
David Garske
7e9e50c03b
Fix for Async TLS v1.3 wolfSSL_write with AES GCM offload. The args->idx was being incremented on the repeated call with BUILD_MSG_HASH state.
2019-03-28 17:52:08 -07:00
David Garske
5b21da4dc5
Fix for SHA-3 runtime detection for not supported in hardware using NOT_COMPILED_IN.
2019-03-28 17:52:08 -07:00
David Garske
d7c6683d9b
Fix for latest QAT v1.7 detection. The qat library requires usdm_drv.
2019-03-28 17:52:08 -07:00
Jacob Barthelmeh
b599dc2b9d
update wolfSSL_i2d_RSAPrivateKey function
2019-03-28 14:15:57 -06:00
John Safranek
9ea2dbea95
Merge pull request #2172 from dgarske/atecc
...
Fixes for ATECC support
2019-03-28 10:36:54 -07:00
Eric Blankenhorn
cffe7eccde
Fixes for high impact issues
2019-03-28 12:08:19 -05:00
David Garske
b1c791dbd9
Merge pull request #2180 from miyazakh/wolfsslclean_fix
...
Initialized sendVerify when calling wolfSSL_clear
2019-03-27 23:32:41 -07:00
JacobBarthelmeh
8c6316eb9c
Merge pull request #2179 from kojo1/X509_STORE_CTX
...
X509_STORE_CTX_free compatibility
2019-03-27 17:17:26 -06:00
David Garske
15c7463150
Merge pull request #2166 from SparkiDev/rsa_vfy_only
...
Fixes for RSA verify only builds
2019-03-27 12:01:14 -07:00
John Safranek
ed5feaf7ae
Merge pull request #2173 from dgarske/custcurves
...
Added `--enable-ecccustcurves=all` option.
2019-03-27 10:19:08 -07:00
Hideki Miyazaki
05987ec717
Initialized sendVerify when reseting WOLFSSL object
2019-03-27 10:18:43 +09:00
Sean Parkinson
b40e0888ad
Fixes for different build configurations
2019-03-26 08:06:19 +10:00
Sean Parkinson
b24e122a0d
Fixes for RSA verify only builds
2019-03-26 08:06:19 +10:00
John Safranek
7aa159ca6d
Merge pull request #2157 from kojo1/ocsp_staple
...
Expose CheckResponse as wolfSSL_CertManagerCheckOCSP_Staple
2019-03-25 13:48:29 -07:00
John Safranek
f493ff859c
Merge pull request #2178 from JacobBarthelmeh/Testing
...
add guard on test case for pkcs7 with no aes
2019-03-25 09:42:54 -07:00
JacobBarthelmeh
6b325929e5
Merge pull request #2175 from kojo1/BN_init
...
add BN_init
2019-03-25 09:04:36 -06:00
Takashi Kojo
3e42c6edcd
remove sk_X509_free for compatibility
2019-03-24 16:57:08 +09:00
Takashi Kojo
6c9e64129d
move #include "ocsp.h" after #define WOLF_STACK_OF(x)
2019-03-23 08:03:45 +09:00
Chris Conlon
d9e6b8a62d
Merge pull request #2168 from aaronjense/master
...
Remove NULL check before pub and priv have a chance to be set
2019-03-22 16:34:34 -06:00
Jacob Barthelmeh
3d747f7c87
add guard on test case for pkcs7 with no aes
2019-03-22 15:56:05 -06:00
Takashi Kojo
744c247e92
change CheckOCSP_staple to OCSPResponse, move to ssl.h
2019-03-22 13:56:32 +09:00
Takashi Kojo
441fb60679
fix cr
2019-03-22 09:40:55 +09:00
David Garske
50a854c4cf
Added --enable-ecccustcurves=all option.
2019-03-21 13:01:04 -07:00
David Garske
f7a7a97f8c
Fix to include the atmel.h with make install when using --with-cryptoauthlib.
2019-03-21 09:13:39 -07:00
David Garske
f66aa60385
Fix for build warning with x/y always true when not building with ALT_ECC_SIZE. Fix for build error with undefined wc_ecc_sign_hash_ex when building ATECC and WOLFSSL_PUBLIC_MP.
2019-03-21 09:13:39 -07:00
David Garske
e07e41d0aa
Fix for building ATECC without ATCAPRINTF defined.
2019-03-21 09:13:39 -07:00
JacobBarthelmeh
21f2beca9f
Merge pull request #2165 from ejohnstown/version-update
...
Version Update v4.0.0
2019-03-21 09:20:36 -06:00
John Safranek
5ab6d58504
Release Fixes
...
1. Pick up a few new files into the distrubution that were missed.
2019-03-20 15:01:54 -07:00
John Safranek
1c237af5b3
Release Fixes
...
1. Update the date in README and ChangeLog to today.
2019-03-20 11:08:10 -07:00
John Safranek
fbfd7a4dea
Release Fixes
...
1. Rearrange the deprecation cryptodev option so it doesn't overwrite the cryptocb option, and so it doesn't break its case in the build-test.
2. Fix the content length in the sample HTTP used by the example server.
3. Disable OCSP stapling in the example server if RSA is disabled.
4. Fix a variable in asn.c that was declared in the middle of its scope.
5. Retag the xmalloc, xrealloc, xfree functions used in the memory test as WOLFSSL_API like all the other allocators, instead of extern.
2019-03-20 11:01:24 -07:00
John Safranek
22b2ae7358
Release Fixes
...
1. Fix for the enable-afalg option from Jacob Barthelmeh.
2. Client fix for enable-sp+enable-sp-math option from David Garske.
3. Added a couple of typecasts to some mallocs.
4. Modified the option guard for the mask member of Options for the webserver build.
5. Added some more padding to the opaque structures used for SHA_CTX and AES_KEY.
6. Added WOLFSSL_API to the stack logging functions.
2019-03-19 13:55:17 -07:00
John Safranek
fb3ca1b53e
Release Fixes
...
1. The RNG internal state could be a memory leak if the seed generate
test fails. If the seed test fails, you have bigger problems.
2019-03-18 14:30:51 -07:00
Aaron Jense
fed2bc5f72
Remove NULL check before pub and priv have a chance to be set
2019-03-18 13:18:04 -06:00
John Safranek
eebf07b67c
Release Fixes
...
1. Fix two potentially unitialized variables, discovered on a VS build.
2019-03-18 10:14:16 -07:00
Takashi Kojo
384b240ea2
minor fix in test_wolfSSL_BN(), api.c
2019-03-17 13:37:17 +09:00
Takashi Kojo
6a3eccd344
add BN_init, working with tfm, only.
2019-03-17 13:28:04 +09:00
John Safranek
1ac74b0061
Release Fixes
...
1. Added some typecasting for g++ v8 permissive pointer use errors with void*.
2019-03-15 16:26:11 -07:00
John Safranek
ba8b104d7b
Updates for v4.0.0
...
Update the RPM spec.in file.
2019-03-15 14:03:45 -07:00
John Safranek
246c444b93
Updates for v4.0.0
...
Update the copyright dates on all the source files to the current year.
2019-03-15 10:37:36 -07:00
John Safranek
60d3dec246
Updates for v4.0.0
...
Add links to the doc README for the wolfSSL and wolfCrypt API references.
2019-03-15 09:43:29 -07:00
John Safranek
d42f3bbdb6
Updates for v4.0.0
...
Update the DLL version resource.
2019-03-15 09:42:45 -07:00
John Safranek
ce4b54944b
Updates for v4.0.0
...
Updated the README files and ChangeLog.
2019-03-15 09:42:45 -07:00
John Safranek
2817f6ed1a
Updates for v4.0.0
...
Bump the version number in configure.ac and updated the version.h. The
library version wasn't updated between v3.15.7-stable and the snapshot
v3.15.8, so I bumped it for this release.
2019-03-15 09:42:45 -07:00
John Safranek
0ef4b7e933
Merge pull request #2164 from JacobBarthelmeh/PKCS7
...
adjust location of where PKCS7 content is saved
2019-03-15 09:40:17 -07:00
Jacob Barthelmeh
45b6a3b67d
adjust location of where PKCS7 content is saved
2019-03-14 16:48:08 -06:00
David Garske
6ff2039b1f
Merge pull request #2163 from ejohnstown/config-fixes
...
Configuration Fixes
2019-03-14 15:21:41 -07:00
John Safranek
b1ea7c035f
Merge pull request #2118 from kojo1/ocsp_proxy
...
OCSP, CRL request with "Cache-Control: no-cache" for proxy
2019-03-14 13:26:03 -07:00
John Safranek
172fd6d233
Merge pull request #2148 from cconlon/pkcs7nullparam
...
add NULL param in CMS KARI OriginatorPublicKey parameters
2019-03-14 13:17:34 -07:00
John Safranek
8a1ad3fcff
Merge pull request #2160 from dgarske/fix_async
...
Fixes for asynchronous crypto and TLS
2019-03-14 11:56:46 -07:00
John Safranek
4b56af67a2
Merge pull request #2144 from embhorn/zd4871
...
Use snprintf with Win build
2019-03-14 11:42:09 -07:00
John Safranek
ac47e889f7
Merge pull request #2162 from JacobBarthelmeh/PKCS7
...
handle pkcs7 bundle with signed envelope and no certs list
2019-03-14 10:51:46 -07:00
John Safranek
3e3f746f3b
Configure Fixes
...
When enable-all and disable-rsa is configured, some of the tests needed
for all don't work because they only use RSA keys or certificates.
Disabled those test cases in that build combination.
2019-03-14 10:37:40 -07:00
Jacob Barthelmeh
e08b36ea9c
handle pkcs7 bundle with signed envelope and no certs list
2019-03-14 09:51:58 -06:00
David Garske
6361ec2f10
Fix for AES GCM and CCM ex to NOT increment counter or update IV if failure or async response code. Resolves TLS v1.3 with async simulator.
2019-03-13 23:32:53 -07:00
David Garske
397c2a4f8a
Fix for SetNameFromCert not used when building with --disable-filesystem.
2019-03-13 23:03:00 -07:00
David Garske
d19c37de2e
Fix for example client arg -4 not working.
2019-03-13 22:59:50 -07:00
David Garske
5a2cd5fc90
Fixes to resolve async crash (using stack pointer after return) due to 16-bit fixes in PR #2133 (commit 700eca4566). Revert to using the "unsigned int" length directly for word32 but cast it.
2019-03-13 22:59:00 -07:00
David Garske
3feef07c93
Merge pull request #2156 from kaleb-himes/ZD4888-XCODE-UPDATE
...
Add rules to copy wolfio.h, wolfmath.h and mem_track.h as well as fix…
2019-03-13 18:05:04 -07:00
John Safranek
6b89b1f97a
Configure Fixes
...
One of the external sites contacted for the OCSP stapling test
increased the size of one of their intermediate certificates. The test
failed silently as the certificate was ignored. Increased the
FP_MAX_BITS so that the test can pass with the enable-all option. That
option was setting the FP_MAX_BITS for 3072-bit certificates, and the
site in question is using a 4096-bit certificate.
2019-03-13 17:56:45 -07:00
John Safranek
27ea9d9bce
Configure Fixes
...
1. The combination enable-all and disable-rsa breaks some of the
testing. Added the NO_RSA guards as appropriate.
2. Disabled the OCSP stapling and CRL tests when RSA is disabled as they
use test certificates with RSA keys.
2019-03-13 17:54:33 -07:00
John Safranek
bca69488b2
Xcode Project Update
...
1. Disable the tls_bench() test in the Xcode iOS benchmark project. It isn't complete.
2019-03-13 15:11:51 -07:00
John Safranek
a42290dd57
Xcode Project Update
...
1. Removed redundant includes of files.
2. Moved all the files in the viewer into the appropriate directories.
3. Updated the copy rules so the missing include files are copied to the destination for all the three possible targets.
2019-03-13 15:11:38 -07:00
toddouska
2f4507e4f1
Merge pull request #2159 from JacobBarthelmeh/Testing
...
sanity check on padlen with pkcs7 decode
2019-03-13 12:58:49 -07:00
David Garske
508cda43a2
Fix for asynchronous build memory macros, which broke due to PR #2026 .
2019-03-13 12:14:43 -07:00
toddouska
f54a7e50ce
Merge pull request #2153 from ejohnstown/no-fips
...
No-FIPS/FIPS Build
2019-03-13 11:37:07 -07:00
toddouska
4c42630f2b
Merge pull request #2158 from JacobBarthelmeh/PKCS7
...
PKCS7 BER decode enveloped content
2019-03-13 11:33:52 -07:00
David Garske
41bc83c5ce
Merge pull request #2074 from kaleb-himes/HARMONYv3-ZD4785
...
Update support for entropy source with HARMONYv3
2019-03-13 09:36:01 -07:00
Jacob Barthelmeh
68c576e0d9
add macro guard around test case
2019-03-13 10:31:32 -06:00
Jacob Barthelmeh
06e5f8c39b
sanity check on padlen with pkcs7 decode
2019-03-13 10:00:43 -06:00
Jacob Barthelmeh
effca6c081
add test case for BER encoded PKCS7 content decoding
2019-03-13 08:53:15 -06:00
Jacob Barthelmeh
e810551aab
Fix to handle BER with PKCS7 enveloped decode
2019-03-13 08:46:15 -06:00
toddouska
0d48a4a1a7
Merge pull request #2133 from dgarske/fixes_16bit
...
Fixes for data types, cast warnings and shift operations when using 16-bit platform
2019-03-12 16:53:27 -07:00
toddouska
b4ba3d7ca6
Merge pull request #2136 from dgarske/asncapathlen
...
Fixes issue with CA path length for self signed root CA's
2019-03-12 14:11:15 -07:00
toddouska
28a1ff5d59
Merge pull request #2146 from dgarske/sigalgo_ecdh
...
ECDSA option to limit sig/algos to key size with `USE_ECDSA_KEYSZ_HASH_ALGO`
2019-03-12 14:08:10 -07:00
toddouska
696fe47de2
Merge pull request #2125 from embhorn/zd4297
...
Decoded cert cache feature
2019-03-12 14:02:47 -07:00
toddouska
70490a4db6
Merge pull request #1855 from ejohnstown/trust-ca
...
Trusted CA Key Indication Extension
2019-03-12 13:52:27 -07:00
John Safranek
7ac5f8fde1
Merge pull request #2147 from kaleb-himes/ZD4615-extAuthKeyIdNotSetInCAFix
...
Edge case fix for AKID not set in CA and two CAs with same issuer line
2019-03-12 11:59:10 -07:00
David Garske
03e0dd6ca3
Add back this path length check for self-signed CA as special case for the supplicant only.
2019-03-12 11:05:07 -07:00
kaleb-himes
764b783317
Add rules to copy wolfio.h, wolfmath.h and mem_track.h as well as fix up settings for clang and iPhone XR
2019-03-12 10:36:12 -06:00
David Garske
666e47faaa
Merge pull request #2152 from ejohnstown/readme-fix
...
Fix Readme
2019-03-12 09:18:39 -07:00
Chris Conlon
4ea1a7e651
Merge pull request #2154 from miyazakh/fix_DhkeySz
...
Fixed compile error under ESP-IDF framework
2019-03-12 09:54:10 -06:00
Hideki Miyazaki
ad32ace0a1
Fixed build-error due to FFDHE_2048 definition
2019-03-12 18:32:13 +09:00
David Garske
7d1bb05c0c
Fix return code for GetMacDigestSize.
2019-03-11 19:37:04 -07:00
David Garske
700eca4566
Fixes from peer review. Improved compatibility of API's. Clarification on integer.h mp_digit sizes.
2019-03-11 19:34:07 -07:00
John Safranek
f1af32b783
No-FIPS/FIPS Build
...
Update the fips-check script to create an archive with the current revision of the parts.
2019-03-11 17:13:02 -07:00
toddouska
57cdbffc2c
Merge pull request #2149 from dgarske/cryptocb_ret
...
Refactor of the crypto callback return code and new API version marker
2019-03-11 16:54:53 -07:00
toddouska
554af3dcfa
Merge pull request #2151 from JacobBarthelmeh/Testing
...
path include adjustment, rename internal OBJ function, and client pri…
2019-03-11 16:48:19 -07:00
toddouska
3710a0a6c8
Merge pull request #2135 from SparkiDev/ed25519_check_key
...
Implement check for Ed25519 private matching public
2019-03-11 16:18:43 -07:00
Eric Blankenhorn
2b59aefe80
Update from review
2019-03-11 18:14:37 -05:00
Eric Blankenhorn
8b6bd306f3
Update from review
2019-03-11 18:03:29 -05:00
toddouska
436a46a9f4
Merge pull request #2131 from dgarske/qat_v3.15.8
...
Fix for async wolfCrypt test with AES GCM.
2019-03-11 15:50:57 -07:00
toddouska
ab0beb354b
Merge pull request #2129 from SparkiDev/sp_prime
...
Improve SP code and support prime check using SP in tfm.c
2019-03-11 13:53:57 -07:00
toddouska
b8035371f4
Merge pull request #2124 from mstaz/ocsp_date_nonce_check_fix
...
Ocsp date and nonce check fix
2019-03-11 13:29:08 -07:00
toddouska
c0ee01bbf6
Merge pull request #2123 from dgarske/stm32_gcm
...
Fixes for STM32 AES GCM
2019-03-11 12:53:27 -07:00
John Safranek
1eb46c697f
1. In the loop in TCA parse, when checking the list of IDs that the
...
server has keys for, change the polarity of the comparison. If the
current ID is in the list, set the response flag and break out of
the loop.
2019-03-11 12:42:13 -07:00
John Safranek
9bd40353c2
1. Rename the parameters cert and certSz on the function
...
wolfSSL_UseTrustedCA() to certId and certIdSz.
2. Add better parameter checking to wolfSSL_UseTrustedCA() based on the
ID type.
2019-03-11 12:42:13 -07:00
John Safranek
8a4e8067f6
1. In the trusted CA extension code, add guards for NO_SHA around the cases that use SHA-1.
...
2. Check the trusted CA id pointer for NULL before copying.
3. Updated the api test for the NO_SHA change.
4. Remove the TCA options member as redundant.
2019-03-11 12:42:13 -07:00
John Safranek
201c85478e
Move the -5 option text into the localization array and add a Japanese translation.
2019-03-11 12:42:13 -07:00
John Safranek
a1ed8e7a67
Fix a fall-through bug in the server options parsing around a new
...
option.
2019-03-11 12:36:58 -07:00
John Safranek
2342ea15eb
Remove the CTX versions of the UseTrustedCA functions. A session needs
...
to be able to set a flag in the extension and that isn't allowed in the
CTX extensions.
2019-03-11 12:36:58 -07:00
John Safranek
cb57a5f3ed
Added a test case for TrustedCA to the unit test.conf file.
2019-03-11 12:36:58 -07:00
John Safranek
b7663a940e
Trusted CA Key Indication Extension
...
Added an API for enabling the Trusted CA Key Indication extension from
RFC6066 section 6. If the server doesn't have a match for the client,
the client will abandon the session.
2019-03-11 12:35:12 -07:00
toddouska
6e1b05316d
Merge pull request #2104 from ejohnstown/renegotiation-testing
...
Secure Renegotiation
2019-03-11 12:10:48 -07:00
toddouska
b3a1d6bff1
Merge pull request #2099 from miyazakh/Espressif_port_Phase2C
...
RSA primitive hw acceleration support on esp32
2019-03-11 12:04:26 -07:00
kaleb-himes
de21642db1
Update sanity check for set
2019-03-11 11:19:51 -06:00
John Safranek
616b75bfba
Fix Readme
...
Fix typo where DTLS was labeled v1.3, not v1.2.
2019-03-11 09:41:37 -07:00
Jacob Barthelmeh
9c9279817b
path include adjustment, rename internal OBJ function, and client print outs added
2019-03-11 09:57:04 -06:00
David Garske
3d9c660688
Refactor of the ECC crypto callback return code handling.
2019-03-11 08:28:45 -07:00
David Garske
68c04a95e0
Refactor of the crypto callback return code for cases when unavailable to use new error code CRYPTOCB_UNAVAILABLE. Retains support for original NOT_COMPILED_IN error code. Added new CRYPTO_CB_VER define for helping applications handle/detect changes to crypto callback interface (currently no way to determine changes at build-time between release cycles).
2019-03-08 16:50:45 -08:00
Kaleb Himes
1dcd6b92a0
Fix leak in wolfcrypt test app detected w/ WC_RSA_NO_PADDING set ( #2145 )
...
Fix leak in wolfCrypt test with `WC_RSA_NO_PADDING`
2019-03-08 14:13:38 -08:00
Takashi Kojo
ea13e0482a
wolfIO_HttpBuildRequest_ex
2019-03-09 06:31:52 +09:00
toddouska
3be4682cda
Merge pull request #2134 from dgarske/fixes_nightly
...
Fixes for minor nightly build errors
2019-03-08 10:15:46 -08:00
Chris Conlon
d8bec5e034
add NULL param in CMS KARI OriginatorPublicKey parameters
2019-03-08 09:13:22 -08:00
Eric Blankenhorn
d26a6b59a3
Wrapper for MSC < VS2015
2019-03-08 10:55:34 -06:00
kaleb-himes
413e3b36cb
Edge case fix for AKID not set in CA and two CAs with same issuer line
2019-03-07 11:30:13 -07:00
Eric Blankenhorn
be83a54f22
Handle older MSC versions
2019-03-07 12:07:00 -06:00
David Garske
619cf89106
Enhancement for ECDSA with USE_ECDSA_KEYSZ_HASH_ALGO to not send sig/algo hash sizes larger than the ECC key size.
2019-03-07 08:56:35 -08:00
David Garske
0e962aa6e5
Merge pull request #2130 from jrblixt/feature-WICED6_1-serverChange
...
examples server HTTP update needed for WICED HTTP parser.
2019-03-06 16:46:36 -08:00
Eric Blankenhorn
934c1b7952
Use snprintf with Win build
2019-03-06 14:55:51 -06:00
Chris Conlon
d699b65a25
Merge pull request #2026 from kojo1/mdk-CMSISv2
...
MDK CMSIS RTOSv2
2019-03-06 09:36:49 -07:00
Sean Parkinson
d61684f210
Merge pull request #2142 from ejohnstown/typecast-add
...
Add Typecasts
2019-03-06 16:21:20 +10:00
Sean Parkinson
f64c165a8b
Merge pull request #2141 from ejohnstown/win-build
...
windows build update for warnings
2019-03-06 16:15:21 +10:00
Sean Parkinson
b7deab9787
Merge pull request #2140 from JacobBarthelmeh/Testing
...
adjust comments on key type for function
2019-03-06 08:03:34 +10:00
Eric Blankenhorn
e897661402
Merge pull request #2139 from ejohnstown/ar-flags
...
AR flags configure update
2019-03-05 15:49:16 -06:00
John Safranek
e3ddfc42af
Add Typecasts
...
Add some typecasts to the RSA constant time data copy so it doesn't
misbehave with some embedded compilers that do the integer promotion in
a different order than expected.
2019-03-05 13:36:23 -08:00
John Safranek
5e573b518a
Fix a couple warnings from a windows build regarding uninitialized variables.
2019-03-05 09:55:18 -08:00
Jacob Barthelmeh
dc3b81f633
adjust comments on key type for function
2019-03-05 10:53:10 -07:00
John Safranek
42eacece82
AR flags configure update
...
In at least one environment the check for particular AR options was
failing due to a bash script bug. Deleted an extra pair of parenthesis
triggering an arithmetic statement when redundant grouping was desired.
2019-03-05 09:26:30 -08:00
Sean Parkinson
a364874b48
Implement check for Ed25519 private matching public
...
Add test SSL test that uses the Ed25519 private key only
2019-03-05 08:19:33 +10:00
David Garske
980970da86
Fixes issue with CA path length basic constraint checking for self signed root CA's. ZD 4863
2019-03-04 11:27:51 -08:00
David Garske
99b5188ee9
Fix for missing curve specs when using ATECC due to PR ( https://github.com/wolfSSL/wolfssl/pull/2115 ).
2019-03-04 09:48:33 -08:00
Chris Conlon
da27a4da10
Merge pull request #2119 from jrblixt/feature-WICED-Studio-v6_1-PR02262019
...
Feature wiced studio v6 1 pr02262019
2019-03-04 17:45:42 +01:00
jrblixt
222f9f4f47
Adjust count.
2019-03-01 20:04:20 -07:00
David Garske
8569d14cb3
Fixes for minor nightly build errors. Missing wc_ecc_fp_free declaration and "Value stored to 'useSupCurve' is never read".
2019-03-01 16:12:08 -08:00
David Garske
621e1656b4
Fixes for data types, cast warnings and shift operations when using 16-bit platform. Added new --enable-16bit build option, which defines WC_16BIT_CPU. Fix build error when using WOLFSSL_LEANPSK and NO_WOLFSSL_MEMORY.
...
Tested using `avr-gcc` version 8.3.0 with: `./configure --host=avr --enable-16bit --disable-filesystem --enable-singlethreaded CFLAGS="-DWOLFSSL_GENSEED_FORTEST -DWOLFSSL_USER_CURRTIME -DWOLFSSL_USER_IO -DWOLFSSL_NO_SOCK -DNO_WRITEV -DUSER_TICKS" --enable-tls13 --enable-compkey --enable-certgen --enable-certext --enable-keygen --enable-session-ticket --enable-maxfragment`. Also with `--enable-fastmath`.
2019-03-01 15:54:08 -08:00
jrblixt
5f332fa29e
review changes.
2019-03-01 14:06:27 -07:00
John Safranek
020b27bab2
wolfSSL_SecureResume() should be client only. Return an error if called
...
form the server.
2019-03-01 11:00:26 -08:00
David Garske
4f2d4420df
Cleanups for hard coded 12 and 16 in AES GCM code. Allow STM32 GCM IV 12 thru 16.
2019-03-01 10:50:08 -08:00
David Garske
e87433e2b6
Fix for async wolfCrypt test with AES GCM.
2019-03-01 09:56:38 -08:00
Sean Parkinson
5083330b86
Improve SP code and support prime check using SP in tfm.c
2019-03-01 20:24:08 +10:00
Max
de869080be
Added description for added ASN options.
2019-03-01 09:49:49 +01:00
David Garske
809c30a5b9
Merge pull request #2128 from SparkiDev/pkcs11_ecc_server_fix
...
PKCS #11 id RSA - TLS don't convert length a la ecc
2019-02-28 19:05:33 -08:00
David Garske
c45dade903
Merge pull request #2127 from SparkiDev/zephyr_fix_1
...
Fix spelling mistakes in text messages in Zephyr samples
2019-02-28 18:14:00 -08:00
Sean Parkinson
dc144df32a
PKCS #11 id RSA - TLS don't convert length a la ecc
2019-03-01 10:23:45 +10:00
Hideki Miyazaki
cce06e8c50
Addressed to review comments
2019-03-01 08:59:03 +09:00
Hideki Miyazaki
ee17bd7470
Re-apply spelling error correction
2019-03-01 08:59:03 +09:00
Hideki Miyazaki
6372634eda
Addressed to code review comments
2019-03-01 08:59:03 +09:00
Hideki Miyazaki
330bbb2f8b
RSA primitive hw acceleration support
2019-03-01 08:59:03 +09:00
Eric Blankenhorn
e8c3e8dd63
Decoded cert cache feature
2019-02-28 16:59:19 -06:00
Sean Parkinson
e78125e8d6
Fix spelling mistakes in text messages in Zephyr samples
2019-03-01 08:43:20 +10:00
David Garske
b528997d30
Merge pull request #2103 from SparkiDev/pkcs11_hmac
...
PKCS #11 support for HMAC with MD5, SHA, SHA-2
2019-02-28 09:50:59 -08:00
Max
fd089b4b6b
Changed define to configure all date checks in OCSP responses.
2019-02-28 10:49:58 +01:00
jrblixt
1f7f424075
Code review updates..
2019-02-27 17:27:58 -07:00
Sean Parkinson
edf6318985
PKCS#11 casting fix for clang
2019-02-28 09:31:17 +10:00
Sean Parkinson
a382a979cc
Merge pull request #2098 from kaleb-himes/ZD4793
...
Fix for single threaded case with double free on suites
2019-02-28 08:56:57 +10:00
toddouska
e2e3b835d6
Merge pull request #2100 from SparkiDev/tls13_vers
...
Support FFDHE in TLS 1.2 and below. Better TLS 1.3 version support.
2019-02-27 14:55:29 -08:00
toddouska
8f3f27065c
Merge pull request #2114 from dgarske/qat_bench
...
Fixes and improvements for async / QuickAssist
2019-02-27 14:49:32 -08:00
toddouska
469898aeeb
Merge pull request #2115 from dgarske/ecc_sign_hw
...
Fix for ECC sign with hardware to ensure the input is truncated
2019-02-27 14:41:57 -08:00
toddouska
b830447690
Merge pull request #2113 from JacobBarthelmeh/Testing
...
EVP decrypt with padding fix
2019-02-27 14:35:57 -08:00
Takashi Kojo
9e93bd1000
fix memory leak for multiple status
2019-02-28 07:34:26 +09:00
Takashi Kojo
2e41d25bca
fix wolfIO_HttpBuildRequestCrl
2019-02-28 07:23:35 +09:00
toddouska
4226fb66f9
Merge pull request #2117 from SparkiDev/pkcs11_id_fix_2
...
PKCS #11 use private key id double free issue fixed
2019-02-27 14:19:43 -08:00
toddouska
b189fc0ef8
Merge pull request #2120 from dgarske/nightly_fixes
...
Fixes for various nightly build configuration warnings
2019-02-27 14:15:40 -08:00
toddouska
5c6876e05e
Merge pull request #2121 from JacobBarthelmeh/Compatibility-Layer
...
rename function wolfSSL_sk_ASN1_OBJCET_pop
2019-02-27 14:12:10 -08:00
David Garske
95b08553a1
Merge pull request #2122 from tmael/portingDeos
...
Deos: Corrected a typo in TLS client connect call
2019-02-27 12:50:54 -08:00
David Garske
164eb30732
Fixes for STM32 AES GCM. Hardware does not correctly compute authTag if input is not a multiple of block size, so fall-back to software for tag only. Hardware also only supports IV of 12 or 16 bytes, so fall-back to software in those cases. ZD 4712
2019-02-27 11:07:03 -08:00
Tesfa Mael
9b500c6d56
Corrected a typo in TLS client connect call and removed .zip project
2019-02-27 10:00:06 -08:00
Jacob Barthelmeh
6ce28d74ff
rename function wolfSSL_sk_ASN1_OBJCET_pop
2019-02-26 16:55:03 -07:00
David Garske
77ffeccb0b
Fixes to QAT enables for benchmark for HMAC. Adds new NO_HW_BENCH to support using multi-threaded software only benchmarks.
2019-02-26 14:34:03 -08:00
Jacob Barthelmeh
b33023df2f
fix setting outlen with wolfSSL_EVP_CipherUpdate decryption
2019-02-26 15:27:25 -07:00
John Safranek
65c72ddfe1
Reverted an earlier change to the renegotiation resumption. Still need
...
to check the cert subject hash.
2019-02-26 14:26:09 -08:00
John Safranek
57d8e070f9
1. Remove the clearing of the sessionID from Rehandshake.
...
2. Put SecureResume in terms of a regular resume, using Get/SetSession
and then calling Rehandshake.
3. Add the startScr after checking secure_renegotiation enabled during a
resume.
2019-02-26 14:10:44 -08:00
David Garske
1512f4da90
Correct the output for multi-threaded benchmark usign -base10 option.
2019-02-26 13:38:33 -08:00
David Garske
326ee8c318
Revert change to PKCS12 tailList.
2019-02-26 11:27:08 -08:00
David Garske
a3af2fc960
Fix for single threaded case with double free on suites.
2019-02-26 11:03:02 -08:00
David Garske
38303cf27b
More spelling fixes.
2019-02-26 10:47:42 -08:00
David Garske
eecc823208
Fixes for scan-build warnings with ASN, PKCS12 and PKCS7.
2019-02-26 10:47:22 -08:00
jrblixt
e01723a435
Code review changes.
2019-02-26 10:42:02 -07:00
jrblixt
8a47af0edc
Added benchmark tests to WICED wolfcrypt test app.
...
Updated the user_settings.h loc per David.
TLS13; SNI; MAX_FRAG
Configure for wolfCrypt bench.
Update README.
2019-02-26 10:37:58 -07:00
Kiwamu Okabe
95658be0ce
WICED wolfCrypt-TLS_cli_srv-Https_cli
2019-02-26 10:37:48 -07:00
David Garske
9a129e89c1
Fixes for building with no filesystem and --enable-testcert or WOLFSSL_TEST_CERT. Fixes nightly expected configurations test.
2019-02-26 09:36:31 -08:00
Sean Parkinson
fe620b5250
Compile error when FP_MAX_BITS doesn't support FFHDE parameters
2019-02-26 16:44:59 +10:00
Sean Parkinson
a2f8747652
Fix DecodePrivateKey to return NOT_COMPILED_IN with PKCS#11
2019-02-26 09:22:03 +10:00
Sean Parkinson
cb830a088f
Fix for configurations without specific algorithms
2019-02-26 09:22:03 +10:00
Sean Parkinson
700e9896d4
PKCS #11 support for HMAC with MD5, SHA, SHA-2
2019-02-26 09:22:03 +10:00
David Garske
2bb5dd710c
Fix for curve load failure leak.
2019-02-25 15:19:31 -08:00
David Garske
b45241f6f8
Fix to use QAT for ECC sign and verify when SP is enabled and key was initialized with devId. Fixes issues with wolfCrypt test and QAT not properly calling "again" for the ECC sign, verify and shared secret.
2019-02-25 14:51:15 -08:00
Sean Parkinson
a44751cd39
PKCS #11 use private key id double free issue fixed
2019-02-26 08:27:59 +10:00
toddouska
efc1ab8c42
Merge pull request #2111 from SparkiDev/ed25519_fixes_1
...
Various improvements for testing
2019-02-25 13:55:28 -08:00
toddouska
0360b38de4
Merge pull request #2116 from SparkiDev/pkcs11_id_fix_1
...
Fixes for PKCS #11 private key id and ECC
2019-02-25 13:09:15 -08:00
David Garske
3785bafdf4
Merge pull request #2096 from kaleb-himes/ZD4707
...
Update for newer versions of the TI compiler
2019-02-25 13:05:43 -08:00
toddouska
603a9b2e59
Merge pull request #2110 from dgarske/spelling
...
Fixes for various spelling errors
2019-02-25 13:04:12 -08:00
toddouska
72a50b8d46
Merge pull request #2109 from dgarske/pkcs7_buf
...
Fix for proper detection of PKCS7 buffer overflow case
2019-02-25 13:02:09 -08:00
Max
aa70ac0be2
Added defines to force OCSP nonce check and omit OCSP date before check.
2019-02-25 14:40:19 +01:00
Sean Parkinson
0e914d81dc
Fixes for PKCS #11 private key id and ECC
2019-02-25 11:17:56 +10:00
Sean Parkinson
feea036ec9
Fix generation of certs_test.h
...
Fix formatting of certs_test.h:
- remove trailing spaces
- change leading tab stops to spaces
2019-02-25 09:00:26 +10:00
David Garske
712ecabf36
Fix for ECC sign with hardware to ensure the input is truncated to the key order.
2019-02-22 15:30:52 -08:00
David Garske
9ff976a6e1
Fixes for wolfCrypt test with asynchronous support enabled and --enable-nginx.
2019-02-22 13:47:34 -08:00
toddouska
b037334732
Merge pull request #2106 from dgarske/ecc_pubkey
...
Adds `ECC_PUBLICKEY_TYPE` to the support PEM header types
2019-02-22 12:09:10 -08:00
toddouska
04e3c4414d
Merge pull request #2102 from SparkiDev/pkcs11_aes_cbc
...
Add support to PKCS #11 for AES-CBC and NO_PKCS11 defines
2019-02-22 12:07:23 -08:00
toddouska
9b125c5797
Merge pull request #2107 from JacobBarthelmeh/Compatibility-Layer
...
remove null terminators on substrings
2019-02-22 10:26:06 -08:00
Jacob Barthelmeh
8b0bcdaf29
EVP decrypt with padding fix
2019-02-22 10:05:15 -07:00
Sean Parkinson
8bb4e23f8d
Various improvements for testing
...
Fix wc_ecc_fp_free() to be called when using HAVE_STACK_SIZE.
Increase size of replyin client.c so all HTTP reply is displayed.
Fix api.c to support only Ed25519 (not RSA and ECC)
Fix suites.c to detect when CA for client won't work (Ed25519 only)
For Static Memory add debugging and small profile.
Also allow realloc to be called with NULL.
Add more Ed25519 certs and keys.
Fix names of Ed25519 filenames for client and server.
Do NOT turn on ECC_SHAMIR by default with lowresource.
Enable WOLFSSL_STATIC_MEMORY_SMALL if low resource and no RSA.
2019-02-22 17:14:19 +10:00
Takashi Kojo
7b44fbe265
OCSP, CRL request with "Cache-Control: no-cache" for proxy
2019-02-22 09:23:06 +09:00
David Garske
ee3eb8fb4c
Fix for proper detection of buffer overflow case when calling wc_PKCS7_EncodeSignedData.
2019-02-21 13:32:28 -08:00
David Garske
289f51a77d
Fixes for various spelling errors.
2019-02-21 13:29:44 -08:00
Takashi Kojo
5e0a77704b
argument check
2019-02-22 06:17:45 +09:00
Takashi Kojo
801ef2c62c
add wolfSSL_CertManagerCheckOCSP_Staple
2019-02-22 05:39:38 +09:00
Takashi Kojo
28d8730948
exporse OcspEntry in asn.h
2019-02-22 05:20:54 +09:00
Jacob Barthelmeh
5932cdab15
cast on strlen return value
2019-02-21 13:04:38 -07:00
David Garske
55ca2c2da7
Added build-time override for benchmark thread count WC_ASYNC_BENCH_THREAD_COUNT.
2019-02-21 10:45:09 -08:00
John Safranek
39626bb349
1. Add a newline to the client's "non-blocking socket and renegotiation" notice.
...
2. Add suite test cases for more renegotiation setting combinations.
2019-02-21 10:06:55 -08:00
David Garske
5801e7773b
Merge pull request #2108 from miyazakh/server_help_in_jp
...
fixed examples/server to take additional parameter for "-?"
2019-02-21 05:55:32 -08:00
Sean Parkinson
ee4e27afe2
Fix lengths to support large DH params
2019-02-21 17:13:43 +10:00
Hideki Miyazaki
b68eab6450
fixed to take additioanl option for -?
2019-02-21 13:44:08 +09:00
Jacob Barthelmeh
18d3e04dbf
remove null terminators on substrings
2019-02-20 16:39:18 -07:00
Sean Parkinson
b0957c68fb
ForceZero the devKey field of Aes in PKCS#11
...
Don't memset the key field of AES in PKCS#11.
2019-02-21 08:22:56 +10:00
Sean Parkinson
b4996e35fa
Set MAX_PRF_HALF bigger for large FFDHE parameters
...
Stack size measurement is in a thread - free local fp_cache
2019-02-21 08:09:52 +10:00
John Safranek
7389553bd6
1. For secure renegotiation, remove the check of the peer certificate's
...
subject ID on renegotiation. Both endpoints are already
cryptographically linked on an encrypted channel.
2. The error code list has gaps where deprecated codes were deleted,
remove the redundant gaps where there aren't missing codes.
2019-02-20 11:45:21 -08:00
toddouska
9c9221432f
Merge pull request #2087 from ejohnstown/aesgcm
...
Update TLS for AES-GCM/CCM changes
2019-02-20 11:43:06 -08:00
John Safranek
a376e17aee
Switch the bound for the XMEMSET of the sessionID when starting a
...
renegotiation to use sizeof the sessionID rather than the constat used
to set the size of the array.
2019-02-20 11:26:33 -08:00
John Safranek
f78ba4649b
Update the help text so the Japanese translations of the new options are printed.
2019-02-20 11:23:00 -08:00
toddouska
b8dc772ef8
Merge pull request #2105 from dgarske/fix_stm_aesgcm
...
Fix for STM32 AES GCM
2019-02-20 09:23:11 -08:00
toddouska
3013cdd925
Merge pull request #2095 from SparkiDev/asm_macosx
...
Get Mac OS X working with the x86_64 assembly files
2019-02-20 09:19:29 -08:00
toddouska
025fba8ec6
Merge pull request #2093 from dgarske/tls13_async_dh
...
Fix for TLSv1.3 with DH key share when using QAT
2019-02-20 09:16:54 -08:00
toddouska
5d667ed1b8
Merge pull request #2075 from SparkiDev/port_zephyr
...
Zephyr port of crypto
2019-02-20 09:10:04 -08:00
David Garske
d81fb727a3
Adds ECC_PUBLICKEY_TYPE to the support PEM header types. Fixes #2097 .
2019-02-20 08:40:57 -08:00
John Safranek
1f6314746c
Secure Renegotiation
...
1. Split the wolfSSL_Rehandshake() function into wolfSSL_Rehadshake()
which performs a full handshake on secure renegotiation and
wolfSSL_SecureResume() which performs a session resumption on a
secure renegotiation.
2. Add option to example client to perform a secure resumption instead
of a full secure handshake.
2019-02-19 15:50:55 -08:00
David Garske
ba14564c49
Fix for STM32 AES GCM, which was incorrectly using software crypto when authInSz != 16. The wc_AesGcmEncrypt_STM32 and wc_AesGcmDecrypt_STM32 functions correctly handle all variations of authInSz.
2019-02-19 15:38:09 -08:00
David Garske
c2fbef2f7f
Refactor to populate preMasterSz on XMALLOC. Fix for DoClientKeyExchange and ecdhe_psk_kea, which assumes preMasterSz is zero. Fix for TLS v1.3 resumption not properly setting preMasterSz. Removed for TLS v1.3 PSK setup test for preMasterSz == 0, which is not required. Spelling fixes for tls13.c.
2019-02-19 13:01:21 -08:00
David Garske
dc1f0d7822
Fix for DH with QuickAssist to only use hardware for supported key sizes. Fix in random.c for seed devId when building async without crypto callbacks.
2019-02-19 11:57:55 -08:00
Takashi Kojo
161e815c03
remove hard tab
2019-02-20 04:14:17 +09:00
Sean Parkinson
520ae52ece
Add support to PKCS #11 for AES-CBC and NO_PKCS11 defines
...
Added PKCS #11 specific defines to turn off support for algorithms.
2019-02-19 13:50:12 +10:00
Sean Parkinson
e3997558a9
Fixes from review and added REAMEs and setup.sh
...
Add README.md and setup.sh.
Add READMEs with license information.
2019-02-19 11:47:45 +10:00
Sean Parkinson
5e1eee091a
Add threaded samples using buffers and sockets
2019-02-19 11:47:45 +10:00
Sean Parkinson
4302c02e67
Include zephyr directories in the release
2019-02-19 11:47:44 +10:00
Sean Parkinson
2c447b24cd
Fixes from review and add IDE files
2019-02-19 11:47:44 +10:00
Sean Parkinson
3366acc9ce
Zephyr port of crypto
2019-02-19 11:47:44 +10:00
Sean Parkinson
7aa5cd6f10
Support FFDHE in TLS 1.2 and below. Better TLS 1.3 version support.
...
Add support for the fixed FFDHE curves to TLS 1.2. Same curves in TLS
1.3 already. On by default - no checking of prime required.
Add option to require client to see FFDHE parameters from server as per
'may' requirements in RFC 7919.
Change TLS 1.3 ClientHello and ServerHello parsing to find the
SupportedVersions extension first and process it. Then it can handle
other extensions knowing which protocol we are using.
2019-02-18 14:51:59 +10:00
Takashi Kojo
b842b8583e
add CMSIS RTOSv2 and imporove other default values to user_settings.h template
2019-02-18 06:48:20 +09:00
Takashi Kojo
0ee1e103dd
update project files
2019-02-18 06:46:41 +09:00
Takashi Kojo
239f878bd1
fix indentation
2019-02-18 06:45:26 +09:00
Takashi Kojo
f3c2125259
add Mutex type for CMSIS RTOSv2
2019-02-18 06:45:01 +09:00
Takashi Kojo
1c6911634c
sprit DECLARE_ARRAY_DYNAMIC into declaration and execution
2019-02-18 06:43:26 +09:00
Takashi Kojo
98e53cb4eb
Improved user_settings.h, Abstract.txt
2019-02-18 06:41:53 +09:00
Takashi Kojo
c7f8f9fc90
Declarations have to come before executable statements
...
WOLFSSL_MDK5_COMPLv5: mdk5 compiler ver 5 regards macro with args as executable statement (This seems to be fixed with v6)
2019-02-18 06:39:06 +09:00
jrblixt
6c3ed46542
examples server HTTP update.
2019-02-15 15:45:30 -07:00
John Safranek
c0d1241786
Modify the TLSv1.3 calls to the AES-GCM and AES-CCM encrypt functions to
...
use the FIPS compatible APIs with external nonce.
2019-02-15 13:52:23 -08:00
kaleb-himes
d806134cbf
Update for newer versions of the TI compiler
2019-02-15 13:05:37 -07:00
toddouska
25dd5882f8
Merge pull request #2094 from dgarske/ecdsa_der_len
...
Adds strict checking of the ECDSA signature DER encoding length
2019-02-15 10:53:57 -08:00
toddouska
7275ee5f19
Merge pull request #2089 from SparkiDev/tls13_sup_ver
...
Make SupportedVersions respect SSL_OP_NO_TLSv*
2019-02-15 10:36:32 -08:00
toddouska
d9a5898e91
Merge pull request #2082 from SparkiDev/parse_kse
...
Fix length passed to key share entry parsing
2019-02-15 10:31:14 -08:00
toddouska
c04cade97c
Merge pull request #2083 from JacobBarthelmeh/Testing
...
Expected Configurations Test - NIGHTLY BUILD #505
2019-02-15 10:23:55 -08:00
Sean Parkinson
16f31cf8c6
Get Mac OS X working with the x86_64 assembly files
2019-02-15 15:08:47 +10:00
Sean Parkinson
e47797f700
Make SupportedVersions respect SSL_OP_NO_TLSv*
2019-02-15 08:26:03 +10:00
Vladislav Vaintroub
7328fce60d
Disable MP_64BIT when compiling with clang-cl on Windows.
...
__attribute__ ((mode(TI))) does not really work on clang-cl,
linking would fail with "unresolved external symbol __udivti3",
as reported in https://bugs.llvm.org/show_bug.cgi?id=25305
Fix to use default case with 28bit digits on clang-Windows.
2019-02-14 23:18:51 +01:00
David Garske
a9f29dbb61
Adds strict checking of the ECDSA signature DER encoding length. With this change the total signature size should be (sequence + r int + s int) as ASN.1 encoded. While I could not find any "must" rules for the signature length I do think this is a good change.
...
If the old length checking method is desired `NO_STRICT_ECDSA_LEN` can be used. This would allow extra signature byes at the end (unused and not altering verification result). This is kept for possible backwards compatibility.
Per RFC6979: `How a signature is to be encoded is not covered by the DSA and ECDSA standards themselves; a common way is to use a DER-encoded ASN.1 structure (a SEQUENCE of two INTEGERs, for r and s, in that order).`
ANSI X9.62: ASN.1 Encoding of ECDSA:
```
ECDSA-Sig-Value ::= SEQUENCE {
r INTEGER,
s INTEGER
}
```
Fixes #2088
2019-02-14 12:05:34 -08:00
John Safranek
e2d7b402e7
Update so TLSv1.3 will work. Needed to make the implicit IVs full sized
...
when copying. Added a flag to SetKeys() to skip the IV set (used for
TLSv1.3).
2019-02-14 12:04:32 -08:00
John Safranek
3223920fd9
Add a guard for AES-GCM and AES-CCM for the change in Encrypt for the
...
AES-AEAD type and macros.
2019-02-14 12:04:05 -08:00
John Safranek
cd7f8cc653
Update AES-GCM/CCM use in TLS with a wrapper to select the correct API
...
depending on using old FIPS, or non-FIPS/FIPSv2.
2019-02-14 12:04:05 -08:00
John Safranek
67e70d6cb6
Update TLS to use the new AES-GCM and AES-CCM APIs that output the IV on
...
encrypt rather than take the IV as an input.
2019-02-14 12:04:05 -08:00
David Garske
64cb07557d
Merge pull request #2091 from SparkiDev/pkcs11_fixes
...
Fix PKCS #11 AES-GCM and handling of unsupported algorithms
2019-02-14 09:49:02 -08:00
Sean Parkinson
5856d6b3dc
Fix PKCS #11 AES-GCM and handling of unsupported algorithms
2019-02-14 17:06:15 +10:00
Jacob Barthelmeh
275667f0e9
remove ocsp attempt with ipv6 enabled
2019-02-13 19:01:09 -07:00
toddouska
46bb2591c8
Merge pull request #2070 from dgarske/fix_cryptocb
...
Fixes and improvements to Crypto Callbacks and STM32 RNG performance
2019-02-13 12:44:19 -08:00
David Garske
d98ebc4da2
Reverted the Hmac_UpdateFinal change to call final as it causing constant timing issues. Improved the wc_HmacFree to handle the case were final isn't called for Crypto callbacks.
2019-02-13 10:24:53 -08:00
toddouska
272181bc2e
Merge pull request #2086 from dgarske/atecc_makekey
...
Fix for ATECC make key case when `curve_id == 0`
2019-02-13 09:52:54 -08:00
toddouska
817b82e453
Merge pull request #2084 from cconlon/cmsFeb19
...
Changes for CMS signedData default signed attributes
2019-02-13 09:49:55 -08:00
Chris Conlon
1fab970316
Merge pull request #2085 from miyazakh/esp-idf_fix_script
...
modified esp-idf setup script to avoid unnecessary file copy
2019-02-13 08:01:13 -07:00
David Garske
95db819d45
Fixes for warnings when building with --enable-pkcs11.
2019-02-12 16:05:48 -08:00
David Garske
e0b46734d6
Enhnacement to the tls_bench tool to support new -S command to indicate total size of data to exchange. Previously was just sending one packet back and forth. Imporved the shutdown handling code.
2019-02-12 16:03:10 -08:00
David Garske
1a8388641d
Change new hash SetFlag/GetFlag API's to private.
2019-02-12 16:03:10 -08:00
David Garske
c9521b56f2
Fix warning about HAL_RNG_GenerateRandomNumber type.
2019-02-12 16:03:10 -08:00
David Garske
eb8a2f3a03
Minor fixes to CryptoCb wolfCrypt test for AES test and hash support for update/final in same callback.
2019-02-12 16:03:10 -08:00
David Garske
454687f429
Fix for TLS HMAC constant timing to ensure final is called for dummy operations. Added devCtx to AES for CryptoCb.
2019-02-12 16:03:10 -08:00
David Garske
dcdb1d7094
Added flag to indicate if hash is copied.
2019-02-12 16:03:10 -08:00
David Garske
e7b23646a5
Updates to HMAC crypto callback support to capture raw KEY and require hmac struct.
2019-02-12 16:03:10 -08:00
David Garske
838652c03b
Added flags build option to hashing algorithms. This allows indicator to determine if hash will be "copied" as done during a TLS handshake.
2019-02-12 16:03:10 -08:00
David Garske
40a7bcfc20
Fix for new random seed crypto callback to properly reset error code in NOT_COMPILED_IN case.
2019-02-12 16:03:10 -08:00
David Garske
88d3abb1e6
Added Crypto callback HMAC support.
2019-02-12 16:03:10 -08:00
David Garske
18d5b3393c
Correct NULL cryptocb case.
2019-02-12 16:03:10 -08:00
David Garske
891abe130a
Added Crypto callback support for ASN CalcHashId. Added arg checking to cryptocb functions.
2019-02-12 16:03:10 -08:00
David Garske
9fc0610720
Fix to ensure hash devCtx is cleared.
2019-02-12 16:03:10 -08:00
David Garske
7e3082906e
Fix for ensuring devId is passed into symmetric init.
2019-02-12 16:03:10 -08:00
David Garske
dad88b4c81
Improvements to the STM32L4 random generation code for improved performance and error handling. Added new WOLFSSL_STM32_RNG_NOLIB define to support generic STM32 series RNG without external ST library.
2019-02-12 16:03:10 -08:00
Chris Conlon
08bcef7c0c
adjust wolfSSL_PKCS7_verify API test
2019-02-12 14:48:49 -07:00
Kaleb Himes
f824c8c769
Merge pull request #2077 from ejohnstown/ocsp-ecdsa
...
OCSP and ECDSA Signers
2019-02-12 09:50:37 -07:00
David Garske
acb983a154
Fix for ATECC make key case when curve_id == 0 (default). ZD 4383
2019-02-12 08:34:34 -08:00
toddouska
feae776ee3
Merge pull request #2078 from SparkiDev/ssl_priv_id
...
Support in SSL for setting a private key id
2019-02-12 07:56:47 -08:00
Hideki Miyazaki
e5f94e5884
modified script to avoid unnecessary file copy
2019-02-12 10:37:30 +09:00
Sean Parkinson
66ab6d8c22
Check FindObjectFinal call for error
2019-02-12 09:07:14 +10:00
Jacob Barthelmeh
acc0121e0f
account for WOLF_C99 with ipv6 test cases
2019-02-11 15:07:12 -07:00
Chris Conlon
fb6aaf2ae2
rearrange order of default CMS SignedData signed attributes for better interop compatibility
2019-02-11 14:48:37 -07:00
Chris Conlon
56736a3563
always include default signed attributes for CMS SignedData bundles, add function to remove if needed
2019-02-11 14:41:32 -07:00
toddouska
4e5ea71118
Merge pull request #2081 from dgarske/dh_max_sz
...
Fix to detect maximum DH key size
2019-02-11 13:21:08 -08:00
Sean Parkinson
e86aae00ed
Change to allow setting of devId for private key
2019-02-11 12:37:44 +10:00
Sean Parkinson
47922a4d87
Support in SSL for setting a private key id
...
Works with PKCS #11 to use key on device.
2019-02-11 10:38:38 +10:00
Sean Parkinson
88050de1ff
Fix length passed to key share entry parsing
2019-02-11 08:29:28 +10:00
David Garske
dd32df5df1
Merge pull request #2080 from kaleb-himes/ZD4795
...
fix typo revcd vs recvd and spell out to avoid confusion: received
2019-02-08 17:38:48 -08:00
David Garske
aa21a0e6df
Fix to increase maximum DH key size if using fast math and FP_MAX_BITS supports it.
2019-02-08 17:36:40 -08:00
kaleb-himes
b6d322cd14
fix typo revcd vs recvd and spell out to avoid confusion: received
2019-02-08 14:27:19 -07:00
John Safranek
6298074f93
OCSP and ECDSA Signers
...
OCSP uses an identified hash of the issuer's public key to identify the
certificate's signer. (Typically this is SHA-1, but can be any SHA
hash.) The AKID/SKID for the certificates usually are the SHA-1 hash of
the public key, but may be anything. We cannot depend on the AKID for
OCSP purposes. For OCSP lookups, wolfSSL calculates the hash of the
public key based on the copy saved for use with the handshake signing.
For RSA, that was fine. For ECDSA, we use the whole public key including
the curve ID, but for OCSP the curve ID isn't hashed. Stored the hash of
the public key at the point where we are looking at the key when reading
in the certificate, and saving the hash in the signer record.
2019-02-07 17:34:25 -08:00
toddouska
e52f4494f0
Merge pull request #2069 from dgarske/fix_8192
...
Fixes for handling 6144 and 8192 bit with TLS v1.3
2019-02-07 15:02:40 -08:00
toddouska
4f4d16d9e5
Merge pull request #2068 from dgarske/pkcs7_verify_degenerate
...
Fixes to handle degenerate PKCS 7 with BER encoding
2019-02-07 15:00:21 -08:00
kaleb-himes
9a67d2a869
Update support for entropy source with HARMONYv3
2019-02-06 13:25:05 -07:00
Jacob Barthelmeh
8666b7de9a
add test-ber-exp02-05-2022.p7b file for test
2019-02-06 11:11:27 -07:00
Jacob Barthelmeh
ec28376e7f
add PKCS7 BER verify test and fix for streaming
2019-02-06 11:05:15 -07:00
David Garske
f61d99526b
Merge pull request #2072 from JacobBarthelmeh/Testing
...
fix macro with pic32 mx build
2019-02-04 17:11:13 -08:00
David Garske
53bf510740
Merge pull request #2073 from JacobBarthelmeh/Jenkins
...
fix typo with getting cipher suite : Jenkins Nightly Build test 499
2019-02-04 17:10:57 -08:00
Jacob Barthelmeh
be4d6bc204
fix typo with getting cipher suite
2019-02-04 10:53:59 -07:00
Sean Parkinson
390f3f5fca
Merge pull request #4 from SparkiDev/pr_2069
...
Disallow SupportedGroups in ServerHello for TLS 1.3
2019-02-04 09:05:36 +10:00
Sean Parkinson
b7179c2a54
Disallow SupportedGroups in ServerHello for TLS 1.3
...
But allowed when downgrading to TLS 1.2.
2019-02-04 09:04:11 +10:00
Takashi Kojo
f8ff68ca7a
Merge branch 'master' of https://github.com/wolfssl/wolfssl
2019-02-03 16:19:59 +09:00
Takashi Kojo
099d813a8c
Fix headers
2019-02-03 15:44:41 +09:00
toddouska
73fbf845f2
Merge pull request #2066 from SparkiDev/sec_reneg_scsv
...
Fix empty renegotiation info ciphersuite handling
2019-02-01 10:05:59 -08:00
toddouska
8fc1780688
Merge pull request #2065 from SparkiDev/ossl_fix1
...
Changes to make symbols available for OpenSSL compat
2019-02-01 10:04:41 -08:00
toddouska
14a2343118
Merge pull request #2064 from SparkiDev/tls13_dhkeysz
...
Set the DH key size for TLS 1.3 when secret calculated
2019-02-01 10:04:15 -08:00
toddouska
4a5652f318
Merge pull request #2061 from SparkiDev/x86_asm_not_in_c
...
Pull out x86_64 ASM into separate files
2019-02-01 10:01:34 -08:00
toddouska
1258467b0a
Merge pull request #2054 from SparkiDev/pkcs11_rng
...
Add support for random and getting entropy (seed) with PKCS#11
2019-02-01 09:59:12 -08:00
toddouska
4a177a8a30
Merge pull request #1997 from tmael/portingDeos
...
Initial Deos RTOS port
2019-02-01 09:56:55 -08:00
David Garske
c080050c80
Fix to detect larger key size requirement based on FP_MAX_BITS. Fix for TLSv1.3 to allow server_hello for TLSX_SUPPORTED_GROUPS. ZD 4754.
2019-02-01 09:53:30 -08:00
David Garske
c82d11f47d
Cleanup of the PKCS7 stream long rc and braces.
2019-01-31 14:37:25 -08:00
David Garske
3a0afc3506
Fixes to handle degenerate PKCS 7 with BER encoding in PKCS7_VerifySignedData. Fix for PKCS7 API unit test with SHA512 disabled. ZD 4757.
2019-01-31 14:36:46 -08:00
Sean Parkinson
7822cef1ac
Pull out x86_64 ASM into separate files
2019-01-29 13:08:24 +10:00
Sean Parkinson
e8b46caf75
Fix empty renegotiation info ciphersuite handling
2019-01-29 12:51:49 +10:00
Sean Parkinson
574238dea0
Set the DH key size for TLS 1.3 when secret calculated
2019-01-29 08:59:49 +10:00
Chris Conlon
0b2bbc33bd
Merge pull request #2059 from miyazakh/openssl_bksize_digest
...
Added EVP_MD_CTX_block_size and exposed EVP_Digest()
2019-01-28 15:17:26 -07:00
John Safranek
1288036dbe
Merge pull request #2047 from kojo1/freeCRL
...
wolfSSL_CertManagerFreeCRL: exposing FreeCRL
2019-01-25 16:08:31 -08:00
Tesfa Mael
5c6b42e60d
cast to a char
2019-01-25 15:30:09 -08:00
toddouska
66987b4f2a
Merge pull request #2058 from SparkiDev/tls13_earlydata_bench
...
Added EarlyData support to benchmark loop
2019-01-25 14:31:54 -08:00
toddouska
67f615f42f
Merge pull request #2053 from dgarske/warn_secrets
...
Show warning if secrets debugging options are enabled
2019-01-25 14:26:47 -08:00
toddouska
0d8ca06928
Merge pull request #2052 from dgarske/atecc_fixes
...
Fixes for ATECC with PMS outlen and `ATECC_MAX_SLOT`
2019-01-25 14:26:09 -08:00
Jacob Barthelmeh
61e8d1ab92
fix macro with pic32 mx build
2019-01-25 14:13:51 -07:00
Hideki Miyazaki
e4abcc0a15
fixed api unit test
2019-01-25 09:38:19 +09:00
Hideki Miyazaki
53adb93ae4
Added EVP_MD_CTX_block_size and publicized EVP_Digest()
2019-01-25 09:05:36 +09:00
Sean Parkinson
743f8b576f
Add support for random and getting entropy (seed) with PKCS#11
...
Getting the seed from a device has been added.
If the HASH_DRBG is available, PKCS#11 will be used for generating the
seed.
Otherwise, all generated random data will come from PKCS#11 device.
2019-01-25 08:01:30 +10:00
Sean Parkinson
0fe7591b0f
Added EarlyData support to benchmark loop
2019-01-24 18:10:56 +10:00
Sean Parkinson
4ef6841465
Changes to make symbols available for OpenSSL compat
2019-01-24 08:38:05 +10:00
Tesfa Mael
2fa8e8bb94
realloc improvements
2019-01-22 19:21:51 -08:00
toddouska
d16c2ca7c6
Merge pull request #1865 from JacobBarthelmeh/Optimizations
...
--enable-afalg=xilinx
2019-01-22 14:19:54 -08:00
David Garske
7c4fa33937
Improve the error handling for non ECC_SECP256R1 curve in wc_ecc_make_key_ex.
2019-01-22 14:04:18 -08:00
David Garske
fd429bb656
Show warning if secrets debugging options (SHOW_SECRETS or WOLFSSL_SSLKEYLOGFILE) are enabled. The #warning can be ignored as error using ./configure CFLAGS="-W#warnings".
2019-01-22 13:29:25 -08:00
David Garske
c48786c649
Correct the ATECC slot maximum.
2019-01-22 12:14:05 -08:00
David Garske
7ce255aa4d
Fixes for ATECC with PMS outlen and ATECC_MAX_SLOT.
2019-01-21 18:45:42 -08:00
David Garske
eaf5c3042d
Merge pull request #2050 from toddouska/sub
...
remove outdated submission note
2019-01-21 18:41:38 -08:00
toddouska
952d0b3b6b
Merge pull request #2044 from dgarske/safertos
...
Fixes to resolve possible build issues with SafeRTOS.
2019-01-21 15:40:48 -08:00
toddouska
52e8e77390
Merge pull request #2046 from cconlon/addalert
...
add alert number and string for "unknown_ca" (48)
2019-01-21 15:39:47 -08:00
toddouska
d00dd9d7c9
Merge pull request #2049 from danielinux/ecc-verify-only
...
Allow ECC Verify-only operations with NO_ASN and SP_MATH
2019-01-21 15:37:55 -08:00
toddouska
e87dac66ac
Merge pull request #2021 from ejohnstown/dtls-resume
...
DTLS Update
2019-01-21 15:35:40 -08:00
Todd Ouska
f7c0a77c9c
reomved outdated submission note
2019-01-21 09:14:58 -08:00
Tesfa Mael
5ce6a9009e
perform mem copy in realloc
2019-01-20 22:55:51 -08:00
Daniele Lacamera
501a3a287b
Allow ECC Verify-only operations with NO_ASN and SP_MATH
2019-01-21 07:11:35 +01:00
Takashi Kojo
5539b0eb38
wolfSSL_CertManagerFreeCRL: exporsing FreeCRL
2019-01-20 10:11:19 +09:00
Jacob Barthelmeh
db5c63bb25
fix for benchmarking specific RSA key size with -rsa-sz
2019-01-18 16:47:10 -07:00
Chris Conlon
8ecee6a7e9
add unknown_ca alert number (48) and string
2019-01-18 15:36:33 -08:00
Jacob Barthelmeh
253915866d
make build more modular
2019-01-18 16:25:24 -07:00
JacobBarthelmeh
4fb6e65857
alignment check and authin size check
2019-01-18 16:25:24 -07:00
Jacob Barthelmeh
b8ebd41fbc
key size with AES-CMAC benchmark
2019-01-18 16:25:24 -07:00
Jacob Barthelmeh
f0a3045d62
af_alg sha3 addition
...
hardware acceleration with RSA
add AES-GCM hardware acceleration
refactor setting RSA IV flag
check and set AF_ALG flags
fix for default AF_ALG use
set buffer alignment with Xilinx RSA
macro guard after rebase
use ALIGN64
clean up test cases
2019-01-18 16:25:24 -07:00
Tesfa Mael
5dbd074f33
adding eclipse project
2019-01-18 14:46:40 -08:00
Tesfa Mael
1f26282bf2
update include.am and add function description
2019-01-18 14:46:39 -08:00
Tesfa Mael
58da860cd6
update readme with config info
2019-01-18 14:46:39 -08:00
Tesfa Mael
e51cc4e99d
Removed unneeded \n from WOLFSSL_MSG
2019-01-18 14:46:39 -08:00
Tesfa Mael
534fe6ab39
Updated with PR review comments
2019-01-18 14:46:39 -08:00
Tesfa Mael
739b57c753
Initial Deos RTOS port
...
- Added support for Deos with no file system
- Implemented a custom malloc since reusing and freeing memory is disallowed in avionics and mission critical applications.
- Added TLS client and server example with a TCP setup mailbox transport
- Timer starts at an offset of CURRENT_UNIX_TIMESTAMP specified by the user
- Uses rand_r() as a pseudo random number generator and uses the current time in seconds as a seed
- Uses strnicmp for XSTRNCASECMP instead of strncasecmp
- a readme doc included
2019-01-18 14:46:39 -08:00
David Garske
f2732a4ecd
Fixes to resolve possible build issues with SafeRTOS.
...
* Support for building `WOLFSSL_SAFERTOS` without heap.
* Allows `XSTRNCASECMP` macro to be customized.
* USER_TIME supports checks for existing `strct tm` and `time_t`.
2019-01-18 10:02:20 -08:00
John Safranek
c282f5b726
DTLS Nonblocking Updates
...
Modify the DtlsMsgPoolSend() function to keep track of the last message
retransmit. If a write would block, it allows the retransmit pick up
where it left off.
2019-01-18 09:15:11 -08:00
John Safranek
cc3c2ef683
DTLS Nonblocking Updates
...
Add command line option to the example server to fake a write block on a
specified DTLS sequence number in epoch 0.
2019-01-18 09:15:11 -08:00
John Safranek
aa4de6e170
DTLS Nonblocking Updates
...
Do not allow the DTLS message flight be retransmit without being
finished. This can happen if a non-blocking transmit times out the
response and the application tries to retransmit.
2019-01-18 09:15:11 -08:00
John Safranek
8356c3d7e2
DTLS Nonblocking Updates
...
1. Add a second select for tx.
2. Revised tcp_select to work for either rx or tx.
3. Updated client and server to use new tcp_select_tx() for checking the
tx socket if the nonblocking connect/accept would block on transmit.
2019-01-18 09:15:11 -08:00
John Safranek
63f6c1d280
DTLS Nonblocking Updates
...
1. Add error code for trying to retransmit a flight when transmitting
the flight hasn't finished.
2. Add function to retransmit the stored flight without updating the
timeout count.
2019-01-18 09:15:11 -08:00
John Safranek
91d81ea691
Add some more debug logging for DTLS retransmission support.
2019-01-18 09:13:28 -08:00
John Safranek
d3e2488552
DTLS Resume Fix
...
1. In DTLS, when transmitting the Change Cipher Spec message increment the
sequence number.
2. In DTLS, when client receives the CCS message, sanity check that the
server hello has been received in the case of resume.
2019-01-18 09:13:28 -08:00
toddouska
d07cf53bb1
Merge pull request #2034 from miyazakh/Espressif_port_Phase2B
...
Initial support atecc608a on 32se
2019-01-18 09:07:51 -08:00
toddouska
02ef2ede12
Merge pull request #2041 from dgarske/crypto_cb
...
Refactor and rename of cryptodev to cryptocb
2019-01-18 09:02:44 -08:00
toddouska
b632c8dcc1
Merge pull request #2043 from SparkiDev/tls13_psk_down
...
Fix PSK support when no PSK extension
2019-01-18 09:00:56 -08:00
toddouska
33f876bb20
Merge pull request #2029 from SparkiDev/sni_tls13
...
Fix SNI on client when downgrading from TLS 1.3
2019-01-18 08:59:47 -08:00
toddouska
fe97264ff9
Merge pull request #2028 from dgarske/spcortex
...
Added Cortex-M support for Single Precision (SP) math
2019-01-18 08:59:10 -08:00
toddouska
d02f7a75b9
Merge pull request #2019 from dgarske/arduino
...
Improvements to Arduino sketch
2019-01-18 08:54:42 -08:00
toddouska
aba726fcd3
Merge pull request #2004 from embhorn/prf_move
...
Moving PRF to wolfcrypt
2019-01-18 08:53:13 -08:00
David Garske
c6a0d32979
Merge pull request #2042 from ejohnstown/ocsp-script
...
OCSP Script Update
2019-01-18 08:51:08 -08:00
toddouska
2bcde06f90
Merge pull request #2001 from kojo1/embed_benchmark
...
Missing project file
2019-01-18 08:44:09 -08:00
David Garske
357e0c9d15
Fixes for better backwards compatibility.
2019-01-18 06:54:48 -08:00
Sean Parkinson
e18891aed8
Fix PSK support when no PSK extension
2019-01-18 16:13:07 +10:00
Hideki Miyazaki
9879425c5f
Addressed review comments
2019-01-18 10:53:48 +09:00
Hideki Miyazaki
4a5c380f32
Addressed review comments
2019-01-18 08:20:20 +09:00
Hideki Miyazaki
2753d2d548
clean up
2019-01-18 08:20:20 +09:00
Hideki Miyazaki
e519e1eb2a
Support atecc608a on 32se with example programs
2019-01-18 08:20:20 +09:00
David Garske
8fb7892013
Merge pull request #2040 from ejohnstown/fix-checks
...
Fix Checks
2019-01-17 12:54:25 -08:00
John Safranek
0459e9842e
OCSP Script Update
...
The check status variable GL_UNREACHABLE is not initialized and there
are times when it is checked and hasn't been set. Initialize it to zero.
2019-01-17 11:36:44 -08:00
David Garske
ee45cfdbcb
Refactor and rename of cryptodev to cryptocb. Refactor API names from wc_CryptoDev to use wc_CryptoCb. Backwards compatibility is retained for anyone using old WOLF_CRYPTO_DEV name. Added comment about fall-through case when CryptoCb return NOT_COMPILED_IN.
2019-01-17 11:01:14 -08:00
John Safranek
8edd7d0b17
Fix Checks
...
1. In the tls_bench, check the return code on wolfSSL_CTX_SetMinDhKey_Sz() as it is checked in the examples.
2019-01-17 10:32:34 -08:00
John Safranek
f6240e5558
Fix Checks
...
1. In the client, check the return code on wolfSSL_CTX_SetMinDhKey_Sz() as it is checked in the server. (Resolves issue #2037.)
2. In HashOutput(), check that the hsHashes exists for the session before hashing. (Resolves issue #2038.)
2019-01-17 09:52:00 -08:00
David Garske
91573735b1
Merge pull request #2036 from ejohnstown/fragsz
...
TLS Record Fragment Size Check Change
2019-01-17 08:56:45 -08:00
John Safranek
5e03ac13f6
TLS Record Fragment Size Check Change
...
Fixed a potential bug with respect to processing fragmented handshake
messages. If a handshake message is fragmented across multiple TLS
records and the last fragment's record has the next handshake message in
it, we would throw a buffer error instead of processing the next
message. Changed this so it will finish the handshake message and return
out to process the next message. Also changed the handling of the
handshake message to follow the calling pattern.
2019-01-16 15:53:57 -08:00
Eric Blankenhorn
02ff19a6c4
Moving PRF to wolfcrypt
2019-01-16 17:23:49 -06:00
Takashi Kojo
bcc2458be6
add t4_demo/t4_demo.mtpj in am
2019-01-17 06:39:49 +09:00
John Safranek
d5b06f93fd
Merge pull request #2031 from SparkiDev/sec_reneg_chrome
...
Changes to secure renegotiation for TLS 1.3 and Chrome
2019-01-16 12:00:08 -08:00
David Garske
c26cb53c05
Merge pull request #2035 from miyazakh/fix_cmake_build
...
fixed cmake build on esp-idf
2019-01-16 11:21:11 -08:00
toddouska
32ed53a991
Merge pull request #2012 from dgarske/cryptocb_sym
...
Added CryptoDev callback support for AES CBC, SHA1/SHA256 and RNG
2019-01-16 10:41:49 -08:00
toddouska
5d262e9123
Merge pull request #2027 from dgarske/fix_buildopts
...
Fixes for various build options and warnings
2019-01-16 10:32:19 -08:00
toddouska
d7ecdf110e
Merge pull request #2013 from dgarske/tls_bench
...
Enhancements to the TLS benchmark tool
2019-01-16 10:30:55 -08:00
toddouska
b683a5a6bb
Merge pull request #1945 from victork1996/bugfix/openssl-evp-bytes-to-key-compatibility
...
Fixed OpenSSL compatibility issues in wolfSSL_EVP_BytesToKey
2019-01-16 10:18:08 -08:00
David Garske
bb74dca6e7
Added certificate and private key to server example. Enable error strings, server side code and remove slow sha option for Arduino.
2019-01-16 10:07:56 -08:00
toddouska
b37c94a15c
Merge pull request #2022 from JacobBarthelmeh/OCSP
...
memory management with OCSP requests
2019-01-16 08:52:50 -08:00
Hideki Miyazaki
1226bc3379
fixed cmake build on esp-idf
2019-01-16 18:01:18 +09:00
Sean Parkinson
b2e4c86028
Changes to secure renegotiation for TLS 1.3 and Chrome
2019-01-15 09:47:23 -08:00
Sean Parkinson
53ad7728bf
Fix SNI on client when downgrading from TLS 1.3
2019-01-14 15:09:52 -08:00
David Garske
8352365160
Fixes to resolve Cortex-M issue with ECC.
2019-01-14 14:16:56 -08:00
Jacob Barthelmeh
e4132d32a4
add ocsp test for more code coverage
2019-01-14 13:52:13 -07:00
Jacob Barthelmeh
6ac384793f
memory management with OCSP requests
2019-01-14 09:49:50 -07:00
David Garske
809fed8f05
Fix to resolve unit test error with WOLFSSL_CIPHER_INTERNALNAME or NO_ERROR_STRINGS defined.
2019-01-13 11:06:04 -08:00
David Garske
864df5f9de
Make sure SP ASM is defined for WOLFSSL_SP_ARM_CORTEX_M_ASM.
2019-01-12 09:52:26 -08:00
David Garske
cfc66dab47
Fix compiler complaints when using Curve25519.
2019-01-11 21:16:13 -08:00
David Garske
3c2aa60862
Fix to allow RSA public only to build without verify only.
2019-01-11 21:11:40 -08:00
David Garske
45cd80b4b7
Fix define check of NO_CERT to be NO_CERTS.
2019-01-11 21:10:07 -08:00
David Garske
bcc177b23d
Fixes for build warnings.
2019-01-11 21:07:23 -08:00
David Garske
406d2ceb6b
Merge pull request #2023 from miyazakh/fix_no_hash_raw
...
fix no_hash_raw for esp32 hw acceleration
2019-01-11 21:04:04 -08:00
David Garske
56415928ff
Added Arduino TLS server sketch.
2019-01-11 17:20:35 -08:00
David Garske
ebd68e6afd
Fix to return the internal cipher suite name instead of NULL if NO_ERROR_STRINGS is defined. Fix for stray "if" in wolfSSL_SESSION_CIPHER_get_name.
2019-01-11 17:20:35 -08:00
David Garske
0ef4856039
Added connect and shutdown calls to Arduino sketch. Improved the get cipher suite. Improved error handling.
2019-01-11 17:20:35 -08:00
toddouska
141b263546
Merge pull request #2024 from dgarske/nb_timeout_det
...
Nonblocking connect timeout check
2019-01-11 17:12:48 -08:00
Takashi Kojo
8df27ffdcf
Fix for RTOSv2
2019-01-12 09:11:04 +09:00
Takashi Kojo
cb39768e09
SimpleServer: update projectfile
2019-01-12 08:52:59 +09:00
Takashi Kojo
92fd92c208
SimpleServer/main.c for RTOSv2 and RLnet4
2019-01-12 08:51:29 +09:00
Takashi Kojo
034d1dff21
remove unused project file
2019-01-12 08:05:11 +09:00
Takashi Kojo
64a528f318
remove unused code
2019-01-12 08:03:49 +09:00
Takashi Kojo
4821d06dff
fix worning
2019-01-12 07:50:15 +09:00
Takashi Kojo
6a25b42efb
fix worning
2019-01-12 07:49:49 +09:00
Takashi Kojo
50598dcbac
wc_port.c nad header files for ROTSv2
2019-01-12 07:49:20 +09:00
David Garske
f67b8fa6a3
Experimental SP Cortex M support for Single Precision math.
2019-01-11 14:38:34 -08:00
Takashi Kojo
6f760d796c
update project files: CryptTest, benchmark, SimpleClient
2019-01-12 07:31:25 +09:00
Takashi Kojo
cca27f6724
examples/celient.c, server.c: removing unused headers
2019-01-12 07:29:19 +09:00
Takashi Kojo
13f4086d53
SImpleClient/main.c for CMSIS-RTOSv2 and net4
2019-01-12 07:27:58 +09:00
Takashi Kojo
55fdeacf87
CryptTest, CryptBenchmark/main.c for CMSIS-RTOSv2
2019-01-12 07:26:41 +09:00
David Garske
a4a6895900
Fix for scan-build "Value stored to 'err' is never read`"
2019-01-11 09:42:41 -08:00
David Garske
6eea924a5c
Fix for non-blocking read timeout.
2019-01-11 08:45:34 -08:00
David Garske
3f46250994
Fix to timeout after 10 seconds in non-blocking mode if connect does not complete.
2019-01-10 17:12:37 -08:00
David Garske
ebc9533bc7
Fixes and improvements to the new Crypto callback code for AES and Hashing.
2019-01-09 17:39:05 -08:00
David Garske
ba0d488807
Added RNG Crypto callback support.
2019-01-09 14:36:40 -08:00
toddouska
e1fd7b86f7
Merge pull request #2014 from JacobBarthelmeh/Testing
...
add ocsp stapling test and initialize values
2019-01-09 10:41:56 -08:00
Hideki Miyazaki
bdc5dd41d1
fix no_hash_raw for esp32 hw acceleration
2019-01-09 16:56:47 +09:00
David Garske
003360237f
Fixes for building with NO_WOLFSSL_SERVER. Minor test.h cleanups.
2019-01-07 10:08:16 -08:00
Jacob Barthelmeh
26ae39a217
check if secure renegotiation struct available
2019-01-04 13:22:34 -07:00
Jacob Barthelmeh
a00eaeb877
add ocsp stapling test and initialize values
2019-01-04 13:16:47 -07:00
David Garske
df2a0f9a4f
Fixes for scan-build warnings.
2019-01-03 12:47:46 -08:00
David Garske
f3c08ae8b9
Better fixes for ret unused.
2019-01-03 12:42:31 -08:00
David Garske
ff0a4eb69a
Fix for float compare warning. Minor cleanups.
2019-01-03 11:40:04 -08:00
David Garske
a7251e4158
Fixes for minor Jenkins build warnings.
2019-01-03 11:22:01 -08:00
David Garske
ef916f2c55
Enhancements to the TLS benchmark tool:
...
* Added support for running as only Client (`-c`) or Server (`-s`).
* Added support for using sockets (in addition to in memory mode `-m`).
* Fixed support for 16KB test packet (memory version needed TLS header space). Changed to default to 16KB.
* Fixed so transfer is done on each connection and there is not transfer limit (instead "shutdown" message is used).
* Made pthread support optional and based on HAVE_PTHREAD.
* Tested non-blocking support with sockets or shared memory.
To use with localhost sockets and threading use `./examples/benchmark/tls_bench`
To use with threading and in-memory use `./examples/benchmark/tls_bench -m`
To use as separate server client applications with localhost sockets use: `./examples/benchmark/tls_bench -s` and `./examples/benchmark/tls_bench -c` in separate terminals.
```
./examples/benchmark/tls_bench -?
tls_bench 3.15.7 NOTE: All files relative to wolfSSL home dir
-? Help, print this usage
-c Run as client only, no threading and uses sockets
-s Run as server only, no threading and uses sockets
-h Host (default localhost)
-P Port (default 11112)
-e List Every cipher suite available
-i Show peer info
-l <str> Cipher suite list (: delimited)
-t <num> Time <num> (seconds) to run each test (default 1)
-p <num> The packet size <num> in bytes [1-16kB] (default 16384)
-v Show verbose output
-d Enable debug messages
-T <num> Number of threaded server/client pairs (default 1)
-m Use local memory, not socket
```
2019-01-03 10:57:39 -08:00
David Garske
1201ffb13f
Added CryptoDev callback support for AES CBC and SHA1/SHA256.
2019-01-02 14:34:26 -08:00
toddouska
656c7951cd
Merge pull request #2010 from dgarske/mdk_fixes
...
Fixes for MDK5 project
2019-01-02 12:39:35 -08:00
toddouska
ed80cf4f4d
Merge pull request #2009 from JacobBarthelmeh/Testing
...
fix for some warnings and edge case build
2019-01-02 12:38:51 -08:00
toddouska
2121607705
Merge pull request #2005 from dgarske/fix_sp_arm32_asm
...
Fix for SP ASM when building sources directly
2019-01-02 12:36:40 -08:00
toddouska
71bc571a8a
Merge pull request #2000 from kojo1/EVP_CipherInit
...
EVP_CipherInit: allow NULL iv, key for openSSL compatibility
2019-01-02 12:04:38 -08:00
toddouska
5677e71cba
Merge pull request #1987 from dgarske/32bit
...
Fixes for `--enable-32bit` option
2019-01-02 11:38:31 -08:00
toddouska
9c75753bd2
Merge pull request #1984 from miyazakh/Espressif_port_Phase2A
...
Support AES and SHA hw acceleration on esp32-wroom-32
2019-01-02 11:37:55 -08:00
John Safranek
d5509a4f37
Merge pull request #2007 from dgarske/fips_build
...
Fixes for a few FIPS build macro checks
2019-01-02 10:10:08 -08:00
David Garske
332dd75e5f
Fix missing semicolon for HAL_CRYP_AESECB_Decrypt call. Fix for NO_MULTIBYTE_PRINT in test.h. These fixes were pulled in from PR #1974 .
2018-12-31 13:53:12 -08:00
Jacob Barthelmeh
47f5282416
fixes for gcc 8 string warnings
2018-12-28 17:16:45 -07:00
Jacob Barthelmeh
a1459f6fec
fix build when QSH is enabled and TLS 1.3 is enabled
2018-12-28 17:16:34 -07:00
David Garske
fb0eb55f28
Improved FIPS version check logic for error-crypt.h.
2018-12-28 09:36:13 -08:00
David Garske
b5ff99a017
Fixes for a few minor build errors where HAVE_FIPS and HAVE_FIPS_VERSION are not checked.
2018-12-28 09:22:36 -08:00
David Garske
9df0fc9509
Added protection to ensure WOLFSSL_SP_ASM gets defined when required. Updated the SP macro comments in GCC-ARM user_settings.h. ZD 4556.
2018-12-28 08:48:28 -08:00
Hideki Miyazaki
30612ad3ed
addressed review comments
2018-12-28 11:48:39 +09:00
Hideki Miyazaki
965c68abdf
Chaged to match filename and standard in file header
2018-12-28 08:39:19 +09:00
Hideki Miyazaki
913fe6ea2b
addressed review comments
2018-12-28 08:39:19 +09:00
Hideki Miyazaki
e8bf2bbb02
removed multiple user_settings.h
2018-12-28 08:39:19 +09:00
Hideki Miyazaki
9d2294b967
Support AES and SHA hw acceleration on esp32-wroom-32
...
Removed unnecessary codes
Added README
Some clean up for maintenancebility
Removed unused methods
Removed unused methods
2018-12-28 08:39:19 +09:00
toddouska
c54e8e31bd
Merge pull request #2003 from dgarske/async_rel_3.15.7
...
Async release v3.15.7 prep
2018-12-27 13:55:12 -08:00
David Garske
cc8c6078b6
Fix to adjust WC_ASYNC_DEV_SIZE. Fix for tests/test-trustpeer.conf typo in include.am.
2018-12-27 11:08:49 -08:00
David Garske
2351047409
Fixes for various scan-build reports.
2018-12-27 11:08:30 -08:00
David Garske
1eccaae25f
Fix for DTLS async shrinking input buffer too soon and causing -308 (INCOMPLETE_DATA).
2018-12-27 11:07:32 -08:00
David Garske
5cb5b510ab
Added blocking support for PKCS 7 with async. Fix for RSA async key gen in wolfCryp test.
2018-12-27 11:07:07 -08:00
Jacob Barthelmeh
66442c4bd5
add initialization value for af_alg
2018-12-26 16:57:24 -07:00
toddouska
697c99a9ec
Merge pull request #1934 from dgarske/fix_alt_chain
...
Fixes and cleanups for processing peer certificates
2018-12-26 15:09:42 -08:00
toddouska
9c88218b62
Merge pull request #1998 from dgarske/async_fix_smallstack
...
Fix double free with async and small stack
2018-12-26 14:35:57 -08:00
David Garske
a7350b7d2e
Merge pull request #1994 from JacobBarthelmeh/Release
...
prepare for release 3.15.7
2018-12-26 10:49:35 -08:00
Takashi Kojo
f97696a546
AesSetKey_ to AesSetKey_ex
2018-12-26 13:52:41 +09:00
Takashi Kojo
6ff8febf0f
README: set properties of CC-RX
2018-12-25 15:37:30 +09:00
Takashi Kojo
1d5c50cc63
Missing project file
2018-12-25 07:14:56 +09:00
Takashi Kojo
0c828d14a0
Name conficted. filter out with NO_AES
2018-12-24 17:27:41 +09:00
Jacob Barthelmeh
a73bca090b
fix for nginx port
2018-12-23 22:19:03 -07:00
Jacob Barthelmeh
b6d61f2987
prepare for release 3.15.7
2018-12-23 22:18:48 -07:00
Takashi Kojo
ae09fbe8a2
EVP_CipherInit: allow NULL iv for openSSL compatibility
2018-12-24 12:00:21 +09:00
David Garske
86177d1830
Removes the forced 32-bit instruction (via -m32) from --enable-32bit option and replaces with comment. Some compilers do not support the -m32 option, plus to work properly it must be used with configure directly like ./configure CFLAGS="-m32" LDFLAGS="-m32". Removes the NO_64BIT option to allow building corect on x86_64 and aarch64 (math libs detect platform properly). Fixes #1985 .
2018-12-23 15:59:57 -08:00
toddouska
3eff20904a
Merge pull request #1991 from dgarske/rsa_nb_time
...
Adds RSA non-blocking time support
2018-12-21 15:58:54 -08:00
toddouska
75321d72f6
Merge pull request #1996 from JacobBarthelmeh/Testing
...
free internal OCSP buffers
2018-12-21 15:57:58 -08:00
David Garske
61757c83eb
Fix double free with ./configure --enable-asynccrypt --enable-smallstack.
2018-12-21 15:45:33 -08:00
David Garske
a358174b4b
Fix for DH prime test (extra leading spaces). Fix for new chain tests with CRL enabled. The current way of testing chain only loads root CA as trusted. The intermediate CA CRL isn't trusted or loaded and causes error.
2018-12-21 12:36:47 -08:00
Jacob Barthelmeh
6191cb1927
free internal OCSP buffers
2018-12-21 12:30:49 -07:00
David Garske
59a3b4a110
New tests for cert chains, alternate cert chains, trusted peer certs and DH prime cleanup:
...
* Added ECC and RSA intermediate CA's and server/client chain certificates for testing.
* Enhanced suites test to support expected fail arg `-H exitWithRet` in any test .conf file.
* Added new `test-altchains.conf` for testing with `WOLFSSL_ALT_CERT_CHAINS` defined.
* Added new `test-chains` for testing chains.
* Added new `test-dhprime.conf` for DH prime check tests.
* Added new `test-trustedpeer.conf` for testing `WOLFSSL_TRUST_PEER_CERT`.
* Refactor to add `-2` to disable DH prime check by default (except for new test-dhprime.conf).
* Added ability to run a specific test.conf file using syntax like `./tests/unit.test tests/test-altchains.conf`.
2018-12-21 09:54:55 -08:00
David Garske
00dd222aa5
Fix for example client with -X external tests to not disable for PSK build unless usePsk is set. Resolves issue with external tests being skipped if building with PSK enabled.
2018-12-21 08:21:59 -08:00
David Garske
9733076fe0
Fixes and cleanups for processing peer certificates:
...
* Fix with `WOLFSSL_ALT_CERT_CHAINS` to resolve issue with using a trusted intermediate to validate a partial chain. With the alt cert chain enabled a CA may fail with only `ASN_NO_SIGNER_E` and the connection is allowed if the peer's certificate validates to a trusted CA. Eliminates overly complex 1 deep error alternate chain detection logic. Resolves ZD 4525.
* Refactor and cleanup of ProcessPeerPerts to combine duplicate code and improve code commenting.
* Fix for CA path len check in `ParseCertRelative` to always check for self-signed case (was previously only in NO_SKID case).
* Improvement to include self-signed flag in the DecodedCert struct.
2018-12-21 08:20:04 -08:00
David Garske
3e31115654
Merge pull request #1993 from JacobBarthelmeh/Testing
...
Release Testing
2018-12-20 16:19:17 -08:00
Jacob Barthelmeh
d3274e28e8
fix for hash types with fips windows opensslextra build
2018-12-20 14:22:35 -07:00
Jacob Barthelmeh
7d11c3f67c
fix for reported nightly Jenkins build tests
2018-12-20 13:35:54 -07:00
David Garske
a4a4cd6a3c
Merge pull request #1992 from SparkiDev/tls13_group_hrr
...
Fix HelloRetryRequest to be sent immediately and not grouped
2018-12-20 11:14:30 -08:00
Jacob Barthelmeh
5d2d370bd5
fix for scan-build warning
2018-12-20 11:40:20 -07:00
Jacob Barthelmeh
164a762088
fix afalg/cryptodev + opensslextra build
2018-12-20 10:52:17 -07:00
Sean Parkinson
eba11e097a
Fix HelloRetryRequest to be sent immediately and not grouped
2018-12-20 16:41:38 +10:00
Jacob Barthelmeh
48c267dda8
fix warning with secure-renegotiation build and error with ntru build
2018-12-19 15:47:43 -07:00
Jacob Barthelmeh
165a80d02d
fix for build with cryptonly + rsapub
2018-12-19 15:30:22 -07:00
Jacob Barthelmeh
92d59c7df4
fix for cryptonly + rsavfy build
2018-12-19 14:36:32 -07:00
David Garske
413506f2b5
Adds new wc_RsaSetNonblockTime API and WC_RSA_NONBLOCK_TIME build option. This new function configures the maximum amount of blocking time in microseconds. It uses a pre-computed table along with the CPU speed in megahertz to determine if the next operation can be completed within the maximum blocking time provided.
2018-12-19 13:15:41 -08:00
Jacob Barthelmeh
fc926d3c61
fixes from infer testing
2018-12-19 11:56:29 -07:00
toddouska
986b5d3951
Merge pull request #1988 from JacobBarthelmeh/ARMv8
...
add -mstrict-align flag with armasm
2018-12-18 15:51:32 -08:00
toddouska
4068975190
Merge pull request #1983 from dgarske/x509small_verifycb
...
Include current cert as X509 in verify callback for small build
2018-12-18 15:40:00 -08:00
toddouska
58a2f518e8
Merge pull request #1981 from dgarske/qat_features
...
Added RSA Key Gen and SHA-3 support for Intel QuickAssist
2018-12-18 15:39:38 -08:00
toddouska
0a6732ee67
Merge pull request #1979 from SparkiDev/tls_sh_tlsx_parse
...
Fix TLS 1.2 and below ServerHello TLSX_Parse to pass in message type
2018-12-18 15:39:12 -08:00
toddouska
4a170c0399
Merge pull request #1971 from SparkiDev/tls13_old_hello
...
Don't expect old ClientHello when version is TLS 1.3
2018-12-18 15:38:44 -08:00
toddouska
f1c62f191d
Merge pull request #1941 from ejohnstown/rekey
...
Server Side Secure Renegotiation
2018-12-18 15:38:16 -08:00
Jacob Barthelmeh
c41d02e72f
fix for Aarch32 aesgcm sanity checks
2018-12-18 10:35:53 -07:00
Jacob Barthelmeh
412966ed80
add -mstrict-align flag with armasm
2018-12-17 17:36:48 -07:00
David Garske
443dbf251b
Fix to supply the X509 current_cert in the verify callback with OPENSSL_EXTRA_X509_SMALL defined or ./configure --enable-opensslextra=x509small.
2018-12-17 13:02:14 -08:00
David Garske
c478a2791a
Fix to disable the raw Hmac_UpdateFinal_CT HMAC calculation for async crypt. Resolves issue using -v 2 -l ECDHE-RSA-AES128-SHA with QAT.
2018-12-17 12:54:33 -08:00
David Garske
cbbe63ec62
Added QAT SHA3 support. Fix for SHA512/SHA384 with QAT and Intel ASM enabled.
2018-12-17 12:54:33 -08:00
David Garske
c23489e6ed
Added support for QAT RSA Key Generation.
2018-12-17 12:54:33 -08:00
JacobBarthelmeh
b60918b8cd
Merge pull request #1982 from kaleb-himes/DGE_REPORT_MAINTENANCE
...
Address maintenance item: external test w/ static mem
2018-12-17 13:52:33 -07:00
kaleb-himes
15b6c39929
Updates based on Jacobs Feedback
2018-12-17 09:42:15 -07:00
kaleb-himes
502e3c2b6d
Address maintenance item: external test w/ static mem
2018-12-14 09:30:03 -07:00
David Garske
249306f08c
Merge pull request #1978 from ejohnstown/dot-release
...
touch version for interstitial release
2018-12-13 10:27:41 -08:00
Sean Parkinson
c628562ee7
Fix the Old ClientHello detection with TLS 1.3 with new state
...
Put the clientState into CLIENT_HELLO_RETRY (new state) when waiting for
second ClientHello.
Chrome sends change_cipher_spec message, for reasons of compatability,
which meets the requirements of the Old ClientHello detection when state
of client is NULL.
2018-12-13 17:06:00 +10:00
Sean Parkinson
f90e5601ad
Fix TLS 1.2 and below ServerHello TLSX_Parse to pass in message type
2018-12-13 16:12:53 +10:00
toddouska
3e326aba15
Merge pull request #1973 from SparkiDev/tls13_max_ticket_nonce_sz
...
Increase maximum ticket nonce size to 8
2018-12-12 15:00:57 -08:00
toddouska
70cb4dcdb1
Merge pull request #1972 from SparkiDev/tls13_alpn
...
ALPN is returned in ServerHello even in TLS 1.3
2018-12-12 14:59:59 -08:00
toddouska
fb68b3a450
Merge pull request #1970 from cconlon/yoctoinstall
...
Add Yocto Project / OpenEmbedded build instructions to INSTALL file
2018-12-12 14:53:44 -08:00
toddouska
122114b840
Merge pull request #1969 from dgarske/atecc508a_fixes
...
Fixes for ATECC508A/ATECC608A and latest CryptoAuthLib
2018-12-12 14:53:12 -08:00
toddouska
2ef8be2718
Merge pull request #1968 from dgarske/fixes_stm32cube_aes
...
Fixes for STM32 AES GCM crypto hardware acceleration
2018-12-12 14:52:35 -08:00
toddouska
bdf447cec9
Merge pull request #1966 from cconlon/wctestbench
...
add define to use test/benchmark.h without path prefix
2018-12-12 14:50:32 -08:00
toddouska
3f7ced3ed5
Merge pull request #1960 from SparkiDev/sp_rsavfy
...
Allow a very small build based on SHA-256 and RSA verify
2018-12-12 14:49:42 -08:00
John Safranek
f715d9179c
Add check for buffer size versus pad size in DoCertificateStatus()
2018-12-12 12:48:30 -08:00
David Garske
8772b5dc51
Merge pull request #1976 from embhorn/test_fix
...
Fix failing nightly tests
2018-12-12 12:07:01 -08:00
John Safranek
eef48cd8a2
touch version for interstitial release
2018-12-12 11:49:32 -08:00
Eric Blankenhorn
cbc8f4ce38
Fix failing nightly tests
2018-12-12 09:48:34 -06:00
Sean Parkinson
d8adca91b3
Increase maximum ticket nonce size to 8
...
There is a TLS 1.3 server implementation that uses 8 bytes.
2018-12-12 09:56:05 +10:00
David Garske
c7b0aac47a
Merge pull request #1964 from embhorn/codecov
...
Code coverage tests and fixes
2018-12-11 15:08:56 -08:00
Eric Blankenhorn
195b995bc4
Fixes from review
2018-12-11 12:19:45 -06:00
Eric Blankenhorn
dc104985c3
Fixes from review
2018-12-11 11:41:39 -06:00
Eric Blankenhorn
59bfead3c8
Fixes from review
2018-12-11 11:30:13 -06:00
Eric Blankenhorn
1c0fa6fb58
Code coverage tests and fixes - default config
2018-12-11 08:56:21 -06:00
Sean Parkinson
c844b1c253
ALPN is returned in ServerHello when downgrading from TLS 1.3
...
TLS 1.3 Specification has extension returned in EncryptedExtensions.
2018-12-11 19:01:49 +10:00
Chris Conlon
a484749f4c
Merge pull request #1965 from ejohnstown/vx-mg-updates
...
VxWorks/Mongoose Updates
2018-12-10 15:56:33 -08:00
Chris Conlon
06d6b06928
add Yocto Project / OpenEmbedded build instructions to INSTALL file
2018-12-10 16:48:14 -07:00
David Garske
a936c609f3
Fixes for ATECC508A/608A CryptoAuthLib demo.
2018-12-10 11:40:37 -08:00
David Garske
7e0e512a5c
Minor build fixes for CryptoAuthLib with ATECC508A or ATECC608A.
2018-12-10 11:40:37 -08:00
David Garske
6552455968
Minor improvements to the STM32 CubeMX AES-GCM logic.
2018-12-10 11:40:06 -08:00
John Safranek
c7ffdc8b0b
VxWorks Update
...
1. Replace the WOLFSSL_PTHREADS option for VxWorks builds, but comment it out.
2. Added a comment about using the pthreads wrappers for mutexes in VxWorks.
2018-12-10 11:28:32 -08:00
John Safranek
dc82beea4e
Mongoose Update
...
1. Add a couple more OpenSSL compatibility layer functions to the the HAVE_WEBSERVER option.
2018-12-10 11:28:32 -08:00
John Safranek
bc4150af2c
Mongoose Update
...
1. HAVE_WEBSERVER option turns on a couple more functions that MG is
using for client side authentication.
2. If using webserver, those functions return and error.
2018-12-10 11:28:32 -08:00
John Safranek
70d345eda0
VxWorks Update
...
1. Remove pthreads enable from VxWorks build.
2. Add mutex wrappers for native VxWorks mutex semaphores.
2018-12-10 11:28:32 -08:00
Sean Parkinson
2208514c98
Merge pull request #1962 from dgarske/fix_fe25519_noavx2
...
Fix for Intel Speedups with no AVX2 (part 2)
2018-12-10 17:17:42 +10:00
Sean Parkinson
fb41510f12
Fixup for compiling verify only inline for PPC using GCC
2018-12-10 11:52:10 +10:00
Sean Parkinson
c122f6082f
Allow a very small build based on SHA-256 and RSA verify
2018-12-10 08:48:01 +10:00
David Garske
e4f60dc894
Merge pull request #1967 from kojo1/ShadowGlobal
...
Shadowed global: min in misc.c
2018-12-08 09:20:56 -08:00
David Garske
0a725f4d56
Fixes for AES with STM32 crypto hardware:
...
* Fixes to ensure the "const" input buffer is not modified for AES GCM calls with STM32 hardware crypto.
* Improvements to allow AES GCM hardware acceleration for inputs that are not a multiple of AES block size.
* Switched the wolfCrypt test for STM32_CRYPTO to use the standard AES GCM tests with 12-byte IV and less than 16-byte auth data.
* Fixes for building with the standard peripheral library.
* Fixes for building with `NO_AES_DECRYPT`.
`./configure --enable-debug --disable-shared --enable-cryptonly CFLAGS="-DNO_AES_DECRYPT"`
2018-12-07 17:23:38 -08:00
Takashi Kojo
8f3b05dd33
Shadowed global: min in misc.c
2018-12-08 09:40:31 +09:00
David Garske
43bc0233cb
Merge pull request #1963 from SparkiDev/ct_signed
...
GCC ARM compiler requires explicit signed declaration
2018-12-07 16:32:09 -08:00
Chris Conlon
d662291b3d
add define to use test/benchmark.h without path prefix
2018-12-07 10:27:51 -07:00
Sean Parkinson
fe8080ce4a
GCC ARM compiler requires explicit signed declaration
2018-12-07 15:01:18 +10:00
Sean Parkinson
0259178033
Merge pull request #1961 from kaleb-himes/ZD4553-MAINTENANCE
...
Test adjustments for testing with nginx in FIPS mode
2018-12-07 09:29:47 +10:00
David Garske
14c43959f0
Fixes for Curve25519 FE math build error with Intel Speedups enabled and no AVX2. These changes should have been part of PR #1958 and were missed.
2018-12-06 12:40:06 -08:00
kaleb-himes
7048efb5fa
Test adjustments for testing with nginx in FIPS mode
2018-12-06 13:02:58 -07:00
toddouska
6dfc723961
Merge pull request #1959 from SparkiDev/tls13_ems_down
...
Send EMS extension in ClientHello when downgradable from TLSv1.3
2018-12-06 07:42:55 -08:00
David Garske
d6ebd2d832
Merge pull request #1950 from SparkiDev/rsa_unpad
...
Make RsaUnPad constant time when Block Type 2 message
2018-12-06 06:08:15 -08:00
Sean Parkinson
f468e7f0b6
Merge pull request #1958 from dgarske/fix_fe25519_noavx2
...
Fix for Intel Speedups with no AVX2
2018-12-06 10:44:12 +10:00
Sean Parkinson
1d5b99eecc
Send EMS extension in ClientHello when downgradable from TLSv1.3
2018-12-06 09:41:22 +10:00
Sean Parkinson
8aa54e5453
Merge pull request #1956 from cconlon/selftestfix
...
CAVP selftest fix for wc_RsaPSS_CheckPadding_ex() in test.c
2018-12-06 09:12:59 +10:00
Sean Parkinson
ab03f9291b
Make RsaUnPad constant time when Block Type 2 message
2018-12-06 08:36:49 +10:00
John Safranek
b145aab6b2
Server Side Renegotiation
...
1. Fix testing issue with a client using the SCSV cipher suite to indicate desire for renegotiation.
2. Add indication to both the server and client examples that the renegotiation was successful.
2018-12-05 13:08:24 -08:00
John Safranek
ec76ab7e42
Server Side Renegotiation
...
1. Add an extra guard check around a call to SendHelloRequest() in the case where server renegotiation is disabled.
2. Replaced an accidental deletion of an include of the misc.h header for no inline builds.
2018-12-05 13:08:24 -08:00
John Safranek
69436b6d41
Server Side Secure Renegotiation
...
1. Fix spelling typo in a comment.
2. Correct the server's check of its secure renegotiation extension.
2018-12-05 13:08:24 -08:00
John Safranek
0abf7c4997
Server Side Secure Renegotiation
...
1. Add the server side renegotiation flag to the secure renegotiation option.
2. Changed the AddEmptyNegotiationInfo so it doesn't create an extension, just adds a reply if SCR is enabled.
3. Fix the server's reaction to the client sending the SCR extension.
2018-12-05 13:08:24 -08:00
John Safranek
175c91ab4e
Server Side Secure Renegotiation
...
1. Fix an incorrect function entry log string.
2. Restart the server's accept state assuming the client hello was
received when the client initiates renegotiation.
2018-12-05 13:08:24 -08:00
John Safranek
d168d60ade
Server Side Secure Renegotiation
...
1. Add enables to the example server for turning on secure renegotiation.
2. Add encryption assists to the handhshake message handler functions.
3. Add a hello request message function. Includes handshake timing pre/postambles.
2018-12-05 13:08:24 -08:00
David Garske
8355dd29cb
Fix for Curve25519 FE math build error with Intel Speedups enabled and no AVX2. Fixes to allow forcing NO_AVX2_SUPPORT. Reproducible with ./configure --enable-curve25519 --enable-ed25519 --enable-intelasm CFLAGS="-DNO_AVX2_SUPPORT".
2018-12-05 13:04:30 -08:00
toddouska
74eadf556e
Merge pull request #1946 from ejohnstown/dh-speedup
...
DHE Speed Up
2018-12-05 12:22:21 -08:00
toddouska
dfcfbc885d
Merge pull request #1955 from JacobBarthelmeh/Testing
...
add mynewt_port.c to make dist
2018-12-05 10:39:02 -08:00
toddouska
ac0f71f4c4
Merge pull request #1954 from JacobBarthelmeh/DH
...
remove restriction on max key size with wolfSSL_DH_generate_key
2018-12-05 10:38:31 -08:00
toddouska
cc93c43a52
Merge pull request #1953 from dgarske/qat2
...
Fixes for building with the latest QuickAssist v1.7 driver
2018-12-05 10:37:45 -08:00
toddouska
68e1091627
Merge pull request #1952 from cconlon/cmstestfix
...
Fix for PKCS7 unit test with AES disabled
2018-12-05 10:36:52 -08:00
Chris Conlon
ecdb27289c
Merge pull request #1951 from ejohnstown/ios-bench-touchup
...
Touch Up iOS Project
2018-12-05 08:08:39 -08:00
Jacob Barthelmeh
f4831b9fbb
add mynewt_port.c to make dist
2018-12-04 16:45:30 -07:00
John Safranek
188a15428d
Touch Up iOS Project
...
1. Remove the file async.c from the iOS Benchmark project.
2. Update the organization name in the Benchmark project to "wolfSSL Inc".
3. In the workspace project, change the path to the wolfSSL test to be a local relative path rather than an absolute path.
4. In the workspace project, remove the benchmark project and re-add it. It becomes a local relative reference with the correct name.
2018-12-04 15:29:41 -08:00
Jacob Barthelmeh
d90e66da80
remove restriction on max key size with wolfSSL_DH_generate_key
2018-12-04 16:20:31 -07:00
Chris Conlon
60a424d4e9
CAVP selftest fix for wc_RsaPSS_CheckPadding_ex() in test.c
2018-12-04 15:19:08 -08:00
David Garske
ec1bd3951e
Fixes for building with the latest QuickAssist v1.7 driver:
...
* Updated `--with-intelqa=` to support detection of QAT driver version and use different .so libs.
* Added include and lib reference for new libusdm.
* Added `QAT_ENABLE_RNG` option.
* Fix for dynamic type spelling error (`DYNAMIC_TYPE_SYMETRIC_KEY` -> `DYNAMIC_TYPE_SYMMETRIC_KEY`).
* Fix benchmark output to use "took" not "tooks".
2018-12-04 12:54:11 -08:00
John Safranek
a47e08c49e
DHE Speed Up
...
1. Add missing "-2" flags to the last line of most of the test conf files.
2018-12-04 12:04:12 -08:00
John Safranek
6254062438
Merge pull request #1948 from dgarske/fix_fips
...
Fix missing fips.h error
2018-12-04 11:32:37 -08:00
John Safranek
fa0b4cd2d5
DHE Speed Up
...
1. Modify all the test configuration files to disable the DHE prime test.
2. Add a test configuration that tests three cipher suites with the DHE prime test enabled.
2018-12-03 15:15:30 -08:00
John Safranek
a55f11cdd8
DHE Speed Up
...
1. Also apply the setting to the client side.
2. Updated the server and client command line options to use "-2" for disabling the DHE check.
2018-12-03 13:56:14 -08:00
Chris Conlon
4995051081
Merge pull request #1947 from miyazakh/fix_uninitialize_vars
...
Fixed uninitialized vars
2018-12-03 11:16:42 -08:00
Chris Conlon
9bda19fd25
fix for PKCS7 KEKRI array bounds check warning on gcc 8.2.0
2018-12-03 11:15:33 -08:00
Chris Conlon
28dc1cbb67
fix unit test for PKCS#7 with AES disabled
2018-12-03 12:00:04 -07:00
John Safranek
f74fb84337
Touch Up iOS Project
...
1. Fix iOS Benchmark reference to the async.c file.
2. Fix iOS Benchmark reference to the sp.c file. Changed to spr_c64.c.
3. Removed misc.c from iOS Benchmark as it is using inlined misc.h.
4. Added define of HAVE___UINT128_T to the user_settings.h so the
benchmark would build.
5. Wrapped the benchmark usage strings in NO_MAIN_DRIVER.
2018-12-03 10:38:56 -08:00
Hideki Miyazaki
ea769bcf38
Fixed uninitialized vars
2018-12-01 10:13:00 +09:00
David Garske
bdfa0e1745
Reapplying fix from PR #1423 . Fixes issue #1415 (again).
2018-11-30 14:32:55 -08:00
John Safranek
564a1ee499
Make the skip DH test flag build-conditional.
2018-11-30 09:19:11 -08:00
Chris Conlon
34d8437a2e
Merge pull request #1944 from ejohnstown/ios-touchup
...
Touch Up iOS Project for FIPS
2018-11-30 08:57:54 -08:00
John Safranek
ff1a1dc5d5
DHE Speed Up
...
When loading DH domain parameters into a CTX, test the prime
immediately. When loading them into a session, test the prime right
before using it during the handshake. Sessions that get their prime from
their context do not need to test their prime. Added a function to
disable testing the prime in a session. The goal is to speed up testing
as every single test case loads DH parameters whether they are used or
not.
2018-11-29 17:04:04 -08:00
Victor Kolesnikov
a8e21d1c09
Changed tabs to spaces to be consistent with the project's convention
2018-11-29 23:29:18 +02:00
Victor Kolesnikov
938e9ad7be
Fixed some OpenSSL compatibility issues in wolfSSL_EVP_BytesToKey
...
Fixed wrong error checks, changed return value to the size of the derived key, added support for the case where data == NULL and removed the assignment of constant value to info->ivSz (the correct value is assigned to it inside 'wc_EncryptedInfoGet')
2018-11-29 23:19:23 +02:00
Chris Conlon
2c48553a29
Merge pull request #1936 from kojo1/multi-byte
...
NO_MULTIBYTE option
2018-11-29 13:16:10 -08:00
Chris Conlon
bea93e9159
Merge pull request #1943 from abrahamsonn/doxygen-update
...
Doxygen update
2018-11-29 13:06:21 -08:00
John Safranek
af0bb278a1
Touch Up iOS Project
...
1. Updated a config item regarding the order of searching headers to the current recommendation from Apple.
2. Added the define flag CYASSL_USER_SETTINGS to the FIPS project so the user settings are loaded into the FIPS files.
2018-11-29 12:46:39 -08:00
abrahamsonn
48252524dc
Merge branch 'master' of https://github.com/wolfssl/wolfssl into doxygen-update
2018-11-29 10:16:33 -07:00
abrahamsonn
1b5ac2ea8d
Updated an API's documented return codes
...
Added ASN_BEFORE_DATE_E and ASN_AFTER_DATE_E to
wolfSSL_CTX_load_verify_locations
2018-11-29 10:03:38 -07:00
Takashi Kojo
bbea4aba59
IAR EWARM
2018-11-29 07:21:56 +09:00
Takashi Kojo
a203cd4901
NO_MULTIBYTE to NO_MULTIBYTE_PRINT
2018-11-29 07:04:01 +09:00
abrahamsonn
95c6c0df28
Updated doxygen with some more API
...
Added new DH API function signatures/some descriptions
2018-11-28 15:03:01 -07:00
Takashi Kojo
0e94ae529c
Rollback stacing
2018-11-29 06:52:43 +09:00
abrahamsonn
a3d1ea20ff
updated page list to include PKCS#11 page
2018-11-28 14:49:42 -07:00
toddouska
8c0a55d43b
Merge pull request #1939 from cconlon/selftestfix
...
exclude wolfSSL_EC_POINT_point2hex() in CAVP selftest build
2018-11-28 13:13:25 -08:00
abrahamsonn
424196cb03
Doxygen format updates
...
Updated the doxygen page list to include PKCS#11, and create the PKCS#11 page
2018-11-28 13:45:19 -07:00
abrahamsonn
c4919d191b
Added doxygen comment page
...
The new doxygen comment page (pkcs11.h) lets Doxygen know when running that
there are new API and that they will need a page created.
2018-11-28 13:36:00 -07:00
abrahamsonn
74b8c2795b
Merge branch 'master' of https://github.com/wolfssl/wolfssl into doxygen-update
2018-11-28 11:35:17 -07:00
toddouska
70305758d4
Merge pull request #1942 from SparkiDev/asn_trad_fix
...
Return ToTraditional API to original signature
2018-11-28 08:08:26 -08:00
toddouska
33db5babc9
Merge pull request #1940 from SparkiDev/pkcs11_cast
...
Fix for clang - cast down
2018-11-28 08:06:28 -08:00
toddouska
2827ef6a57
Merge pull request #1938 from SparkiDev/tls13_ext
...
Check for TLS 1.3 version in the method for extenstions.
2018-11-28 08:05:42 -08:00
toddouska
814e45a12b
Merge pull request #1925 from kaleb-himes/ZD4486-XCODE
...
i386 arch lacks registers to support some tfm assembly without correct CFLAGS
2018-11-28 08:04:09 -08:00
Sean Parkinson
310ffd0045
Check for TLS 1.3 version in the method for extenstions.
...
During parsing of ClientHello, ServerHello and HelloRetryRequest, the
SSL object version may not be set to the negotiated version.
2018-11-28 14:59:43 +10:00
Sean Parkinson
918c769284
Return ToTraditional API to original signature
2018-11-28 12:27:57 +10:00
Sean Parkinson
1a518c6c46
Fix for clang - cast down
2018-11-28 08:49:33 +10:00
kaleb-himes
6ed462f564
Provide example of appropriate CFLAGS for exposing registers on i386 required for inline assembly in tfm.c
2018-11-27 15:22:42 -07:00
David Garske
11810160b4
Merge pull request #1937 from tmael/portingMicriumIII
...
Micrium uC/OS-III port (updated readme & user_settings)
2018-11-27 11:08:53 -08:00
Chris Conlon
a5e3b18252
exclude wolfSSL_EC_POINT_point2hex() in CAVP selftest build
2018-11-27 09:12:55 -08:00
Tesfa Mael
216b2bf3fe
rerun benchmark tests
2018-11-26 18:17:10 -08:00
Takashi Kojo
3cee583f8d
NO_MULTIBYTE option in RTE/wolfssl/user_settings.h
2018-11-27 07:26:19 +09:00
toddouska
55bbffe3c6
Merge pull request #1932 from dgarske/maxfrag_reconf
...
Post-handshake max fragment size adjustment
2018-11-26 13:27:26 -08:00
toddouska
3afa9a3886
Merge pull request #1929 from ejohnstown/sniffer
...
Sniffer Updates
2018-11-26 13:24:31 -08:00
toddouska
4afa0f72fe
Merge pull request #1926 from cconlon/cms2
...
CMS expansion, SignedData detached signature support
2018-11-26 13:22:26 -08:00
Takashi Kojo
c529e011a7
NO_MULTIBYTE for multibyte non-supported IDEs
2018-11-26 08:11:31 +09:00
Tesfa Mael
d51d8d86b5
update readme
2018-11-21 12:08:54 -08:00
John Safranek
96b4ddad82
Sniffer Update
...
1. Collect the SSL Info capture into its own function.
2. Add a Trace function for the SSL Info.
3. When copying the IANA name for the cipher suite, use a strncpy
instead of a memcpy and cap the copy at the length of the destination.
Force a null terminator at the end of the destination, just in case.
4. Modify the snifftest to collect the SSL Info.
2018-11-21 11:29:28 -08:00
David Garske
7a24d4e46f
Adds new WOLFSSL_ALLOW_MAX_FRAGMENT_ADJUST macro around non-standard feature. This allows for adjustment of the maximum fragment size post handshake.
2018-11-21 10:30:24 -08:00
toddouska
4bf61a81e4
Merge pull request #1930 from tmael/portingMicriumIII
...
Micrium uC/OS-III port
2018-11-21 10:29:17 -08:00
toddouska
f87c327fae
Merge pull request #1933 from SparkiDev/tls13_ems
...
No Extended Master Secret in ServerHello if protocol TLSv1.3
2018-11-21 10:25:59 -08:00
toddouska
f11809aa62
Merge pull request #1923 from JacobBarthelmeh/Testing
...
cast to resolve warning, check size of time_t, and check for null tes…
2018-11-21 10:17:23 -08:00
toddouska
73dbd15b2b
Merge pull request #1896 from SparkiDev/openssl_extra2
...
More OpenSSL API support
2018-11-21 10:16:37 -08:00
Chris Conlon
09141d479e
store CMS detached variable when using streaming API
2018-11-21 10:12:36 -08:00
Chris Conlon
1244212d41
Merge pull request #1921 from miyazakh/Espressif_port_Phase1
...
Porting wolfssl into ESP-IDF development framework
2018-11-21 08:16:56 -08:00
Tesfa Mael
101966329e
add readme doc
2018-11-20 22:56:04 -08:00
Tesfa Mael
da71d7243e
adding new files for make dist
2018-11-20 18:40:25 -08:00
Sean Parkinson
5156641f2b
No Extended Master Secret in ServerHello if protocol TLSv1.3
2018-11-20 08:38:14 +10:00
Sean Parkinson
95bd340de5
Add support for more OpenSSL APIs
...
Add support for PEM_read and PEM_write
Add OpenSSL PKCS#7 signed data support
Add OpenSSL PKCS#8 Private key APIs
Add X509_REQ OpenSSL APIs
2018-11-20 07:54:24 +10:00
David Garske
e81436ffe9
Add support for altering the max-fragment size post-handshake using existing API wolfSSL_UseMaxFragment.
2018-11-19 13:26:48 -08:00
Tesfa Mael
b05782a5c9
use static const
2018-11-19 09:13:09 -08:00
Tesfa Mael
3a033cae8c
Add standard GPLv2 header
2018-11-19 08:59:48 -08:00
Tesfa Mael
7ac8acff09
fix IAR EWARM Error[Pe028]: expression must have a constant value
2018-11-19 00:19:58 -08:00
Tesfa Mael
2ad6ce351b
add micrium current_time and use correct serial function
2018-11-18 23:44:20 -08:00
Tesfa Mael
061757c909
remove WOLFSSL_TYPES, add defines in user settings
2018-11-18 23:44:20 -08:00
Tesfa Mael
11ccce809d
fix formatting, converted tabs to spaces
2018-11-18 23:44:20 -08:00
Tesfa Mael
ac8c4adc06
port to uC/OS-III
...
remove uC/OS-III eclipse project files
Adding wolfSSL client example for uC/TCP-IP with WinPcap running on Win7
Cleaned up user_settings and client example code
wolfSSL server example for uCOS-III/TCP-IP
Fixed typo and formating
Removed comments from user settings
serial (UART) interface isn't available on all targets
Updated to use PEM certs
add XSNPRINTF snprintf
define tx msg and size for clarity
2018-11-18 23:44:20 -08:00
Hideki Miyazaki
bc09f4bd30
Porting wolfssl into ESP-IDF development framework
2018-11-17 09:36:09 +09:00
John Safranek
3599798aac
Move a variable declaration to the start of a block instead of in the
...
middle.
2018-11-16 15:54:19 -08:00
John Safranek
6ee60bbb49
Sniffer Update
...
1. Adds a new function ssl_DecodePacketWithSessionInfo() that returns a
copy of the TLS session info (version and suite ID) for the packet that
is decoded.
2. Adds a new function DecodePacketInternal() that does the same work as
the old DecodePacket() with the additional Session Info behavior.
3. Both DecodePacket public functions call the internal version.
2018-11-16 15:00:06 -08:00
John Safranek
d2989d9f43
Sniffer Fix
...
Drop a handshake message if it is split across TLS records. The likely
messages dropped are certificate and certificate request, which are
ignored by the sniffer.
2018-11-16 15:00:06 -08:00
Chris Conlon
e756c5ffc9
use devId variable in test.c for PKCS7 examples
2018-11-16 15:54:32 -07:00
Chris Conlon
4295db218a
add CMS SignedData support for detached signatures
2018-11-16 15:54:32 -07:00
Chris Conlon
7f76af0b36
Merge pull request #1927 from JacobBarthelmeh/AES
...
additional macro guards for disabling aescbc with opensslextra
2018-11-16 15:53:04 -07:00
Jacob Barthelmeh
ee30b2b476
better name for time_t size macro guard
2018-11-16 15:51:38 -07:00
Jacob Barthelmeh
ae1b1d777a
compile out aescbc function declarations when off
2018-11-15 14:08:40 -07:00
Jacob Barthelmeh
c307fd7af4
additional macro guards for disabling aescbc with opensslextra
2018-11-15 13:40:04 -07:00
kaleb-himes
8399a7a517
i386 arch lacks registers to support some tfm assembly, detect and disable
2018-11-15 09:52:20 -07:00
JacobBarthelmeh
c592a1d6cb
Merge pull request #1924 from dgarske/fix_fipscheck
...
Fix to resolve issue with fips_check.sh
2018-11-14 09:05:20 -07:00
David Garske
ed79aa1dc5
Fix to resolve issue with fips_check.sh after --depth=1 change in PR #1920 . Fixes Jenkins report error: pathspec 'v3.6.0' did not match any file(s) known to git.
2018-11-13 06:30:05 -08:00
Jacob Barthelmeh
0f4a06594e
cast to resolve warning, check size of time_t, and check for null test case
2018-11-12 16:02:33 -07:00
toddouska
8689cc6a04
Merge pull request #1922 from SparkiDev/tls_pad_fix
...
Fix for checking of TLS padding when padding byte value > msg len
2018-11-12 13:20:35 -08:00
toddouska
2503a4c0de
Merge pull request #1920 from dgarske/check_speedup
...
Various script improvements for git clone calls
2018-11-12 13:17:14 -08:00
toddouska
0452594cf7
Merge pull request #1905 from SparkiDev/sp_thumb
...
Single Precision: ARM Thumb assembly implementation
2018-11-12 13:16:11 -08:00
toddouska
254b0f665b
Merge pull request #1918 from dgarske/async_rel_v3.15.5
...
wolfSSL Async Release v3.15.5 Fixes
2018-11-12 11:22:55 -08:00
Sean Parkinson
61c7be669b
Fix for checking of TLS padding when padding byte value > msg len
2018-11-12 17:37:34 +10:00
David Garske
533f4a5c77
Speedups for the git clone calls in check scripts to use --depth 1.
...
```
BEFORE CHANGE:
time ./fips-check.sh windows keep
Receiving objects: 100% (18408/18408), 12.61 MiB | 625.00 KiB/s, done.
Receiving objects: 100% (7045/7045), 110.48 MiB | 488.00 KiB/s, done.
real 5m4.604s
user 1m38.039s
sys 0m25.984s
AFTER CHANGE:
time ./fips-check.sh windows keep
Receiving objects: 100% (642/642), 1.02 MiB | 1.26 MiB/s, done.
Receiving objects: 100% (767/767), 24.15 MiB | 487.00 KiB/s, done.
real 1m43.194s
user 1m34.100s
sys 0m24.046s
```
2018-11-09 09:36:41 -08:00
David Garske
ba8d1962c7
Fix for test case wc_AesInit with bad argument. Adds bad arg check for API in FIPS mode.
2018-11-09 09:26:01 -08:00
David Garske
9f6167872f
Fixes for additional use of unititlized variable with async for AES and DH.
2018-11-08 15:56:51 -08:00
David Garske
b3d5999be9
Fix for unused variables with --disable-rsa --enable-tls13 case in InitSuites.
2018-11-08 15:54:06 -08:00
David Garske
d5dddd2b29
Fix for unused useSupCurve in example client with --disable-ecc.
2018-11-08 15:43:18 -08:00
David Garske
e9a10e3614
Scan-build fix for possible case where r and s aren't initalized for wc_ecc_verify_hash.
2018-11-08 15:40:06 -08:00
David Garske
fcb40570e2
Fixes for warnings with possible use of uninitialized variable in async with DES3 and AES.
2018-11-08 15:39:52 -08:00
David Garske
da76fb6861
Fixes for warning about possible uninitialized use of asyncDev for wc_Gmac and wc_GmacVerify.
2018-11-08 13:43:13 -08:00
toddouska
39506e61d1
Merge pull request #1916 from JacobBarthelmeh/Release
...
Prepare for release v3.15.5
2018-11-08 12:59:05 -08:00
toddouska
4a88626500
Merge pull request #1917 from SparkiDev/sp_def
...
Fix define to use letter S instead of 5
2018-11-08 10:39:52 -08:00
Jacob Barthelmeh
078db9e445
fix for nightly cavp test
2018-11-08 09:25:10 -07:00
Jacob Barthelmeh
cd37e3967c
prepare for release 3.15.5
2018-11-07 16:08:29 -07:00
Sean Parkinson
94c75aa3ed
Fix define to use letter S instead of 5
2018-11-08 08:25:29 +10:00
Jacob Barthelmeh
2468a19c82
static analysis fix on non default build and g++ warning
2018-11-07 14:50:07 -07:00
David Garske
6e4ab91ccf
Merge pull request #1915 from JacobBarthelmeh/Testing
...
fix side init for set connect/accept functions
2018-11-07 09:24:44 -08:00
JacobBarthelmeh
196791390b
Merge pull request #1911 from kaleb-himes/CRYPT_LOGIC_UPDATES-R2
...
Fix pre-processor checks in wolfCrypt test for unique configuration
2018-11-07 10:22:03 -07:00
JacobBarthelmeh
5a53048e8f
Merge pull request #1914 from kaleb-himes/FIX_x_OPT_SERVER
...
Fix -x option in server to continue in event of error (R)
2018-11-07 10:11:27 -07:00
toddouska
f7f6506a54
Merge pull request #1898 from cconlon/cmsupdates
...
wolfCrypt PKCS#7/CMS Expansion
2018-11-07 08:36:02 -08:00
toddouska
24e2a2b228
Merge pull request #1912 from dgarske/fix_BN_bn2hex
...
Fixes for compatibility function `BN_bn2hex`
2018-11-07 08:35:15 -08:00
Jacob Barthelmeh
100bf76748
sanity check on length befor checking ASN.1 tag
2018-11-06 18:35:13 -08:00
Jacob Barthelmeh
27db083733
make degenerate test structure dynamic to set the uninitialized dynamic flag
2018-11-06 18:35:13 -08:00
Jacob Barthelmeh
820ee0439a
handle degenerate case after rebase
2018-11-06 18:35:13 -08:00
Chris Conlon
9fa4f754ab
fix PKCS7/CMS conditional build errors
2018-11-06 18:35:13 -08:00
Jacob Barthelmeh
a2b2ce124e
add a check to help out static analysis tool
2018-11-06 18:35:13 -08:00
Jacob Barthelmeh
afbf09b970
fix for building with clang
2018-11-06 18:35:13 -08:00
Chris Conlon
773a81ef6a
CMS fixes for building with NO_ASN_TIME
2018-11-06 18:35:13 -08:00
Jacob Barthelmeh
448f91b56d
fixes after more fuzz testing
2018-11-06 18:35:13 -08:00
Chris Conlon
cc32466603
build fix for test.c when disabling CMS EncryptedData content type
2018-11-06 18:35:13 -08:00
Chris Conlon
9bef9bad8e
PKCS7/CMS build fixes when disabling individual AES sizes
2018-11-06 18:35:13 -08:00
Chris Conlon
4d9375b862
PKCS7/CMS build fixes when disabling AES
2018-11-06 18:35:13 -08:00
Chris Conlon
004b0d3793
PKCS7/CMS build fixes when disabling RSA, ECC, or AES-GCM/CCM
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
867bcb4545
small stack memory management
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
77a1dafed0
fix for fall through with gcc-7
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
62a2847d75
make internal stream buffer dynamic
...
formating and build without stream api
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
048a7f4c57
fix for memory leak after resetting stream state
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
5a59fdd6fd
scan-build warnings
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
b3506c836c
remove content type restriction and fix build with compkey
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
98efc1e9de
testing with verify signed stream function
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
752259e343
first addition of decode enveloped stream
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
5525f59852
first addition of verify sign stream data
2018-11-06 18:35:12 -08:00
Chris Conlon
47303ed445
fix decryption of EnvelopedData PWRI KEK size
2018-11-06 18:35:12 -08:00
Chris Conlon
b4d02d6d99
fix setting and checking CMS EnvelopedData version
2018-11-06 18:35:12 -08:00
JacobBarthelmeh
b0e4cb3572
valgrind testing
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
5d8f59d83b
initial AuthEnvelopedData stream and add debug messages
2018-11-06 18:35:12 -08:00
Chris Conlon
d69a3c1092
add single-shot API for generating CMS Signed Encrypted Compressed FirmwarePkgData
2018-11-06 18:35:12 -08:00
Chris Conlon
c9f75fe7b4
add test cases for CMS Signed-Encrypted and Signed-Compressed FirmwarePkgData to test.c
2018-11-06 18:35:12 -08:00
Chris Conlon
175e32b468
add single-shot API for generating CMS Signed Compressed FirmwarePkgData
2018-11-06 18:35:12 -08:00
Chris Conlon
ed7cd54a91
add single-shot API for generating CMS Signed Encrypted FirmwarePkgData
2018-11-06 18:35:12 -08:00
Chris Conlon
cc05c46318
add single-shot API for generating CMS Signed FirmwarePkgData
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
2cc89936e3
add semicolon after FALL_THROUGH
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
02df920269
use fall through and update api tests to use wc_PKCS7_New
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
83a150c4df
stream of PKCS7 decode encrypted
2018-11-06 18:35:12 -08:00
Chris Conlon
40ef246b1f
add CMS AuthEnvelopedData support for unauthAttrs
2018-11-06 18:35:12 -08:00
Chris Conlon
4315384051
update test.c error returns for PKCS7
2018-11-06 18:35:12 -08:00
Chris Conlon
06a6f8400b
add CMS AuthEnvelopedData support for authAttrs
2018-11-06 18:35:12 -08:00
Chris Conlon
bc94cdc11b
add CMS AuthEnvelopedData content type support
2018-11-06 18:35:12 -08:00
Chris Conlon
a4da14f4b0
allow CMS CompressedData to be disabled with NO_PKCS7_COMPRESSED_DATA
2018-11-06 18:35:12 -08:00
Chris Conlon
75349bbba5
add support for SubjectKeyIdentifier to KTRI CMS RecipientInfo types
2018-11-06 18:35:12 -08:00
Chris Conlon
794137c20c
add CMS EnvelopedData OtherRecipientInfo support
2018-11-06 18:35:12 -08:00
Chris Conlon
85e0c203ea
ignore pkcs7 test files
2018-11-06 18:35:12 -08:00
Chris Conlon
0b3930e24f
save and set PKCS7 isDynamic flag in wc_PKCS7_Init
2018-11-06 18:35:12 -08:00
Chris Conlon
13b30a6a21
add CMS EnvelopedData PasswordRecipientInfo support
2018-11-06 18:35:12 -08:00
Chris Conlon
dbb5bb7570
add CMS EnvelopedData KEKRecipientInfo support
2018-11-06 18:35:12 -08:00
Chris Conlon
ec07fe492e
misc CMS fixes from review and valgrind
2018-11-06 18:35:11 -08:00
Chris Conlon
1f8c4c2613
merge CMS changes with master
2018-11-06 18:35:11 -08:00
Chris Conlon
7841434744
add support for multiple certificates in CMS SignedData certificates field
2018-11-06 18:35:11 -08:00
Chris Conlon
897c6b455f
move CMS signed attribute OIDs into BuildSignedAttributes()
2018-11-06 18:35:11 -08:00
Chris Conlon
a25a637270
add CMS signingTime attribute support for SignedData
2018-11-06 18:35:11 -08:00
Chris Conlon
56f1b68442
use SetContentType() to set SignedData content type
2018-11-06 18:35:11 -08:00
Chris Conlon
ce1381dc9a
add contentType check to CMS compressed tests
2018-11-06 18:35:11 -08:00
Chris Conlon
6a06a3b63b
add CMS CompressedData test using FirmwarePkgData
2018-11-06 18:35:11 -08:00
Chris Conlon
c51cf4472e
add support for CMS CompressedData content type
2018-11-06 18:35:11 -08:00
Chris Conlon
32b70dd56c
add support for FirmwarePkgData in CMS SignedData EncapsulatedContentInfo
2018-11-06 18:35:11 -08:00
Chris Conlon
2a60fbd766
add support for SubjectKeyIdentifier in CMS SignedData SignerInfo
2018-11-06 18:35:11 -08:00
Chris Conlon
70ca95b357
add support for custom contentType with CMS SignedData type
2018-11-06 18:35:11 -08:00
toddouska
bdf07e64cf
Merge pull request #1901 from dgarske/rsa_nonblock
...
Added RSA non-blocking support
2018-11-06 16:39:43 -08:00
toddouska
5d8f4351ff
Merge pull request #1903 from dgarske/dhkeycheck
...
Speed improvements for DH public key prime checking
2018-11-06 16:35:27 -08:00
Jacob Barthelmeh
7a2a66743b
fix side init for set connect/accept functions
2018-11-06 16:48:06 -07:00
kaleb-himes
bc2bb78010
Fix -x option in server to continue in event of error (R)
2018-11-06 14:09:46 -07:00
toddouska
144ff68cfb
Merge pull request #1882 from SparkiDev/pkcs11_lib
...
Improvements for PKCS#11 library
2018-11-06 08:53:57 -08:00
toddouska
2c7ff56a3e
Merge pull request #1907 from JacobBarthelmeh/Testing
...
infer and g++ build fixes
2018-11-06 08:48:28 -08:00
David Garske
95092696bf
Fix to make sure mp_toradix and mp_radix_size are included for OPENSSL_EXTRA.
2018-11-06 08:38:47 -08:00
David Garske
efb1efcc0d
Fixes and additional tests for compatibility function BN_bn2hex. In the DEBUG_WOLFSSL case it was returning a (char*)"", which was trying to be free'd. We cannot return const char* here, since its assumed to be an allocated pointer. Fix the dynamic type for XMALLOC/XFREE to match, since OPENSSL_free is used to free returned value. Fix to add room for null term. Added missing API unit test for BN_print_fp. Exposed these functions for OPENSSL_EXTRA.
2018-11-06 05:55:25 -08:00
David Garske
1a4533f166
Merge pull request #1910 from embhorn/zd4324
...
Handle incomplete shutdown
2018-11-06 05:19:58 -08:00
JacobBarthelmeh
ee00852509
Merge pull request #1909 from ejohnstown/filedist
...
Added the resource.h and wolfssl.rc to the list of EXTRA_DIST files.
2018-11-05 14:40:04 -07:00
Eric Blankenhorn
d61ae3a02a
Handle incomplete shutdown
2018-11-05 10:30:48 -06:00
kaleb-himes
92d6dc36af
Fix pre-processor checks in wolfCrypt test for unique configuration
2018-11-02 15:22:11 -06:00
John Safranek
c1ca1f1b78
Remove DH prime check on selftest/fips builds.
2018-11-02 12:55:07 -07:00
David Garske
6372c3d6e1
* Added RSA non-blocking support enabled with WC_RSA_NONBLOCK. Adds new wc_RsaSetNonBlock function for enabling / non-block context. Added wolfCrypt test function rsa_nb_test to validate. Result is: RSA non-block sign: 8200 times and RSA non-block verify: 264 times
...
* Signature wrapper improvements to eliminate mallocs/frees unless small stack is used. If small stack is used only one allocation is done based on actual max (was previously was allocating too much and in the encoding case was reallocating a second buffer).
2018-11-02 12:41:23 -07:00
John Safranek
98291f8465
Update comment in dh.c.
2018-11-02 11:38:52 -07:00
John Safranek
1261247e2a
Added the resource.h and wolfssl.rc to the list of EXTRA_DIST files.
2018-11-02 11:30:29 -07:00
John Safranek
cfafbd9659
Added the prime check to the functions wolfSSL_SetTmpDh() and wolfSSL_CTX_SetTmpDh().
2018-11-02 11:01:39 -07:00
JacobBarthelmeh
1ffc1108a6
Merge pull request #1906 from cconlon/selftest-fixes
...
fixes for CAVP selftest build errors
2018-11-01 11:31:39 -06:00
Jacob Barthelmeh
a953a3141e
infer and g++ build fixes
2018-11-01 09:59:35 -06:00
Sean Parkinson
81650d6cef
Fix for subtract
...
Added cortex-m support using umull for faster implementation.
2018-11-01 15:21:51 +10:00
Sean Parkinson
2b3b19d1c8
Merge pull request #1904 from JacobBarthelmeh/PKCS7
...
add test for degenerate case and allow degenerate case by default
2018-11-01 08:36:15 +10:00
Jacob Barthelmeh
6dd4fba888
fix for clang warning
2018-10-30 17:41:03 -06:00
Jacob Barthelmeh
cc3ccbaf0c
add test for degenerate case and allow degenerate case by default
2018-10-30 17:04:33 -06:00
David Garske
f6093e1e0d
Fixes to remove DH prime checks for server side DH parameters.
2018-10-30 15:51:47 -07:00
Chris Conlon
def7a91e70
fix CAVP selftest build errors
2018-10-30 16:35:45 -06:00
David Garske
f4b0261ca7
Fix to not do prime test on DH key the server loaded. Now it will only do the prime test on the peer's provided public DH key using 8 miller rabbins. Refactored the fast math miller rabin function to reuse mp_int's, which improved peformance for mp_prime_is_prime_ex from 100ms to 80ms. Normal math mp_prime_is_prime_ex is ~40ms (as-is). Added test for wc_DhSetCheckKey.
2018-10-30 11:20:07 -07:00
Chris Conlon
2c0edae96f
Merge pull request #1889 from kojo1/t4_demo
...
Renesas RX demo
2018-10-30 10:14:02 -06:00
Sean Parkinson
ab458db504
Review comment changes
...
Add heap as a device initialization parameter.
Allocate slot info pointer wiht device heap pointer.
ForceZero user pin on token finalization.
Add comments to structure definitions.
2018-10-30 15:56:31 +10:00
Takashi Kojo
b64c527138
added files under t4_demo to include.am
2018-10-30 13:18:58 +09:00
David Garske
ba90674357
Merge pull request #1897 from WolfWalter/fix_sigrs_length
...
ATECC508 reference PK callback fix for signature length
2018-10-29 08:54:46 -07:00
toddouska
ae07ba93ad
Merge pull request #1894 from dgarske/pk_keysize
...
Fixes for key size detection when using PK callbacks
2018-10-26 09:46:10 -07:00
toddouska
d18c9cad61
Merge pull request #1895 from dgarske/test_384bit
...
Added ECC P-384 bit test certs and keys
2018-10-26 09:44:41 -07:00
toddouska
a6adfd434d
Merge pull request #1893 from dgarske/ecdsa_hashalgo
...
New build option to match ECDSA hash algo digest size with ephemeral key size
2018-10-26 09:43:07 -07:00
Wolf Walter
a47eeec145
fixed sigRs length
...
atmel_ecc_sign and atmel_ecc_verify expect sigRS length to be 64 Byte (32 Byte each).
2018-10-26 16:43:03 +02:00
David Garske
153c7cc684
Fix for unused variable in new fast-rsa function wc_RsaPublicKeyDecode_ex.
2018-10-25 11:12:33 -07:00
David Garske
3be7eacea9
Added client/server certs and keys for P-384-bit signed by P-384 CA. Fix for broken certs/ecc/genecc.sh script. Added simple P-384 cipher suite test.
2018-10-25 09:21:27 -07:00
David Garske
d21603334b
Added build option USE_ECDSA_KEYSZ_HASH_ALGO to alter the hash algorithm selection for ecc_dsa_sa_algo. With this build option we try and choose a hash algorithm digest size that matches the ephemeral key size, if not found then will match on next highest. We've seen cases with some Windows based TLS client's where they do not properly support hashing a smaller ephemeral key with a larger hash digest size (such as P-256 key and SHA512 hash).
2018-10-25 09:19:35 -07:00
David Garske
81651c351b
Added optional logging for example PK callbacks in test.h enabled with DEBUG_PK_CB.
2018-10-25 09:15:34 -07:00
David Garske
86758f9640
Fixes for key size detection when using PK callbacks (HSM) and no private key has been loaded (affects HAVE_PK_CALLBACKS on server side only when no dummy private key is loaded). Fix for possible leak during ECC min key size failure with small stack. Added new API wc_RsaPublicKeyDecode_ex for parsing an RSA public key for the modulus and exponent. Changed wolfSSL_CTX_SetTmpEC_DHE_Sz to support a size == 0 for using the long-term private key's size. Changed ECDHE_SIZE so it can be overridden and build-time. Added tests for wolfSSL_CTX_SetTmpEC_DHE_Sz and wolfSSL_SetTmpEC_DHE_Sz.
2018-10-25 09:15:23 -07:00
toddouska
23445546c5
Merge pull request #1892 from dgarske/ecdhe_keysize
...
Fix for ephemeral key size selection
2018-10-25 07:27:20 -07:00
David Garske
c4d6f886b7
Revert change from PR #1845 commit 24f9f12844. This ensure the ephemeral key is P-256 or the overridden value determined by wolfSSL_CTX_SetTmpEC_DHE_Sz and wolfSSL_SetTmpEC_DHE_Sz. This restores previous behavior from last release.
2018-10-24 09:48:03 -07:00
toddouska
0eb115e7a1
Merge pull request #1884 from kaleb-himes/ECC_DISABLED_TEST_FIX
...
Fixes to resolve skipped tests with ECC disabled
2018-10-24 09:30:47 -07:00
Sean Parkinson
7586e1df42
Only do early data in initial handshake when using PSK
2018-10-24 09:47:30 +10:00
toddouska
c173d72423
Merge pull request #1891 from SparkiDev/nginx-1.15.5
...
Add defines for latest nginx
2018-10-23 08:07:52 -07:00
Sean Parkinson
ef8b564d2e
Add defines for latest nginx
2018-10-23 22:08:44 +10:00
toddouska
22aa01a547
Merge pull request #1881 from SparkiDev/pkcs7_no_si
...
Return error when attempting to verify signed data without signers
2018-10-22 15:00:55 -07:00
toddouska
878b5925fc
Merge pull request #1877 from dgarske/pkcs8_ec
...
Added support for ECC private key with PKCS8 encoding
2018-10-22 14:59:10 -07:00
toddouska
42fecee77b
Merge pull request #1859 from SparkiDev/pkcs7-cons
...
Support constructed OCTET_STRING in PKCS#7 signed data
2018-10-22 14:52:50 -07:00
Chris Conlon
353f9018f5
Merge pull request #1890 from miyazakh/jamsg
...
Added Japanese message into the examples client and server
2018-10-22 13:44:11 -06:00
David Garske
0b720c4412
Fixes for TLSv1.3 early data.
2018-10-22 11:35:40 -07:00
Chris Conlon
96abf43238
Merge pull request #1888 from MJSPollard/nidFIX
...
Fixed compilation issues with Asio, Websocket++, and HAProxy
2018-10-22 10:19:05 -06:00
Hideki Miyazaki
6953677a8f
Keep the max line length to 80
2018-10-20 17:15:17 +09:00
Hideki Miyazaki
a27b4c2efb
Added Japanese message into the examples client and server
2018-10-20 13:40:01 +09:00
David Garske
7ce236f3af
Fix for new test_wolfSSL_PKCS8 changes to init/free the ecc_key.
2018-10-19 16:04:02 -07:00
Takashi Kojo
dabeccca27
README_en
2018-10-20 07:59:22 +09:00
Takashi Kojo
f2ef67446d
T4 demo
2018-10-20 07:21:52 +09:00
David Garske
c268829b68
Fix bug with SendClientKeyExchange and ifdef logic for ecdhe_psk_kea, which was preventing ECDHE-PSK from working if HAVE_CURVE25519 was defined. Disabled broken downgrade test in test-tls13-down.conf (@SpariDev will need to investigate). Various spelling fixes.
2018-10-19 13:21:56 -07:00
Carie Pointer
fac6ce794d
Fix HAProxy redefinition warning
2018-10-19 12:14:57 -06:00
MJSPollard
355184bc9b
added fix for failing asio and haproxy tests
2018-10-18 17:32:42 -06:00
David Garske
4a4ae446aa
Fix for unit.test fails with -H verifyFail.
2018-10-18 11:58:00 -07:00
David Garske
84fb23cfab
Merge pull request #1880 from kojo1/NID
...
NID definitions are in asn.h
2018-10-18 09:48:20 -07:00
Sean Parkinson
7551e49fed
Improvements for PKCS#11 library
2018-10-18 17:31:17 +10:00
Sean Parkinson
67bb558025
Return error when attempting to verify signed data without signers
2018-10-18 13:44:13 +10:00
Takashi Kojo
8a872891c5
NID_domainComponent is moved to asn.h
2018-10-18 09:28:15 +09:00
kaleb-himes
cdd8f6b950
Macro guard on cipher suite added - Thanks Jacob\!
2018-10-17 16:44:47 -06:00
kaleb-himes
dc519e6a45
When no cert specified using default, do not return failure in suite tests
2018-10-17 15:20:39 -06:00
David Garske
095337b1cf
Merge pull request #1878 from kaleb-himes/TEST_COVERAGE_3
...
Test coverage 3
2018-10-17 13:47:10 -07:00
toddouska
dcb105deff
Merge pull request #1876 from dgarske/max_frag_256
...
Added new 256-byte max fragment option `WOLFSSL_MFL_2_8`
2018-10-17 13:21:57 -07:00
David Garske
8b529d3d57
Add test for ECC private key with PKCS 8 encoding (no crypt) and -----BEGIN EC PRIVATE KEY----- header.
2018-10-17 10:01:29 -07:00
kaleb-himes
5ca822b1e9
Peer review changes requested
2018-10-17 10:46:45 -06:00
toddouska
7391f4db90
Merge pull request #1815 from dgarske/atecc508_fixes
...
Fixes for ATECC508A
2018-10-17 08:35:09 -07:00
toddouska
969098518f
Merge pull request #1873 from dgarske/fix_async_multi_rec
...
Fixes and improvements for wolfSSL asynchronous mode
2018-10-17 08:23:27 -07:00
kaleb-himes
2aa6f91144
Reset IV after update via call to encrypt
2018-10-16 18:31:16 -06:00
David Garske
0d7d8f54e0
Added support for ECC private key with PKCS8 parsing. Fix is to attempt pkcs8 parse for -----BEGIN EC PRIVATE KEY----- and if parse fails to treat as normal private key. ZD 4379.
2018-10-16 16:56:42 -07:00
David Garske
d7d102d90a
Added cipher suite unit tests for max fragment options 1-6 for TLS v1.2 and DTLS v1.2. Fix for client usage comment for max fragment.
2018-10-16 16:47:24 -07:00
David Garske
ab61cefa58
Fix max frag error case tests to use min/max.
2018-10-16 08:58:46 -07:00
David Garske
4adaeb8585
Added new 256-byte max fragment option WOLFSSL_MFL_2_8.
2018-10-15 17:06:21 -07:00
David Garske
e53694b351
Fix for shared secret callback for client side, where it was not using the provided peer's public key. Fix for ATECC508A to put it into idle mode after operations to prevent watchdog fault mode (can be disabled by defining WOLFSSL_ATECC508A_NOIDLE). Fixes for callbacks to support using software for non P-256 curves (can be disabled by defining WOLFSSL_ATECC508A_NOSOFTECC).
2018-10-15 16:01:04 -07:00
David Garske
bd57f5b385
Fix to resolve possible buffer overflow with atmel_get_rev_info when using byte.
2018-10-15 14:17:43 -07:00
David Garske
177bf49fa6
Updates to the atmel.c code to allow easier customization of the hardware interface.
2018-10-15 14:17:43 -07:00
David Garske
bb737ec99d
Fixes for building against latest CryptoAuthLib. Refactor to eliminate the atcatls function calls, since these have been removed from latest CryptoAuthLib. Cleanup of the slot assignment handling.
2018-10-15 14:17:43 -07:00
David Garske
d67cb9e875
Added new build option for Microchip CryptoAuthLib (--enable-cryptoauthlib). Build fixes with WOLFSSL_ATECC508A enabled.
2018-10-15 14:17:43 -07:00
David Garske
ba9f21bad6
Improvements to the ATECC508A README.md.
2018-10-15 14:17:42 -07:00
David Garske
c51c607e96
Fix to use inLen for raw public key copy. No need to throw an error for other curve types as this function may be used for software only import/export. In the TLS case with only SECP256R1 there are other places where an error will be thrown.
2018-10-15 14:17:42 -07:00
David Garske
53c2264327
Fix for checking the inLen when setting raw public key len for hardware. Finished the ATECC508A ECC functions to support native TLS with the WOLFSSL_ATECC508A option and SECP256R1. Added slot type for alloc/free. Added helper functions for setting the PK callbacks and custom content. Updated the README.md with build options. Added support for overriding the ATECC_MAX_SLOT. Added overridable define for encryption slot number ATECC_SLOT_I2C_ENC. Added new build option WOLFSSL_ATECC_PKCB for using just the reference PK callbacks.
2018-10-15 14:17:42 -07:00
David Garske
7074625048
Added slot callbacks. Improvements for the Atmel time support. Fix to make sure read encryption key is cleared from stack buffer.
2018-10-15 14:17:42 -07:00
David Garske
e78ddfce75
Fix for wc_ecc_import_x963_ex to handle ATECC508A raw public key. Cleanup of the ATECC508A encryption key support. Added new macro ATCA_TLS_GET_ENC_KEY to allow setting your own function at build-time for getting the encryption key.
2018-10-15 14:17:42 -07:00
David Garske
be318abbc2
Fixes for building with WOLFSSL_ATECC508A with latest atca.
2018-10-15 14:17:42 -07:00
David Garske
7c3313481a
Fix for memory cleanup cases in MakeTlsMasterSecret.
2018-10-15 13:22:55 -07:00
toddouska
f7eb8bf080
Merge pull request #1874 from JacobBarthelmeh/HardwareAcc
...
fix for afalg header install and macro set
2018-10-15 11:51:10 -07:00
Jacob Barthelmeh
23ef832dd3
fix for afalg header install and macro set
2018-10-12 15:45:46 -06:00
David Garske
a0608151cf
Fix for the WOLFSSL_NONBLOCK_OCSP case to reset the error code as well.
2018-10-12 11:20:13 -07:00
David Garske
5904a97378
Added comments in aes.c for locating software implementation of algorithm using Software AES.
2018-10-12 10:48:26 -07:00
David Garske
23a0f3cfa1
Added new WOLFSSL_SSLKEYLOGFILE define to output master secret used by Wireshark logging to file. Defaults to sslkeylog.log, but can be overridden using WOLFSSL_SSLKEYLOGFILE_OUTPUT.
2018-10-12 10:47:30 -07:00
David Garske
52210c9d16
Improved error trapping in BuildTlsHandshakeHash, without altering timing.
2018-10-12 10:45:47 -07:00
David Garske
fc77ed068c
Fix for verify callback to not report override when there is no error. Cleanup of the myVerify example callback return code handling.
2018-10-12 10:45:20 -07:00
David Garske
6fbeae8f11
Fixes for building with WC_ASYNC_NO_SHA256. Improvements with WC_ASYNC_NO_HASH or WC_ASYNC_ENABLE_ECC to avoid unnecessary memory allocations.
2018-10-12 10:44:26 -07:00
David Garske
fec726f10a
Fix for async issue with receiving multiple TLS records (server_key_exchange and server_hello_done) in same packet, which may miss call to DoHandShakeMsgType -> HashInput because ssl->error is still marked pending WC_PENDING_E.
2018-10-12 10:39:40 -07:00
Chris Conlon
45eb3ae72d
Merge pull request #1871 from miyazakh/work
...
Added Japanese messages that can be enabled by option switch
2018-10-12 10:54:59 -06:00
toddouska
0b78b75530
Merge pull request #1860 from dgarske/tls_either_side
...
Methods cleanup and new DTLS "either" side methods
2018-10-12 07:35:17 -07:00
Hideki Miyazaki
1a34b9da03
Added NO_RSA condition for build failure
2018-10-12 11:02:01 +09:00
David Garske
19905b7798
Merge pull request #1872 from ejohnstown/ext-skip
...
Skip Server Supported Curve Extension
2018-10-11 17:47:08 -07:00
David Garske
1fd791da21
Fix to check response code on InitSSL_Side calls.
2018-10-11 15:50:22 -07:00
John Safranek
b404d4805f
Skip Server Supported Curve Extension
...
Added a build option, WOLFSSL_ALLOW_SERVER_SC_EXT, that skips the
client's parsing of the supported curve extension if sent by the
server for sessions using < TLSv1.3. The server doesn't need to send it
and the RFCs don't specify what should happen if it does in TLSv1.2, but
it is sent in response from one particular Java based TLS server.
2018-10-11 15:21:32 -07:00
Hideki Miyazaki
63878f32ab
Fixed tests failures on jenkins
2018-10-11 21:43:39 +09:00
Hideki Miyazaki
b736012214
Fixed disable Option Test on jenkins
2018-10-11 19:40:35 +09:00
Hideki Miyazaki
e774bfcf60
Tweaked message in Usage
2018-10-11 18:06:02 +09:00
Hideki Miyazaki
b4b180c1b9
Added Japanese messages that are enabled by option switch
2018-10-11 15:42:50 +09:00
David Garske
9a0ecd4eb6
Merge pull request #1870 from tmael/AddressingCodeCoverage
...
Addressing code coverage
2018-10-10 14:46:32 -07:00
kaleb-himes
f9ff151ee7
wolfSSL_AES_cbc_encrypt unit test refactor, TODO: Decrypt
2018-10-10 16:16:57 -04:00
kaleb-himes
23797ab4cb
wolfSSL_AES_cbc_encrypt unit tests, TODO: Decrypt
2018-10-10 15:59:10 -04:00
Tesfa Mael
5d047cc4d9
Added test_wc_curve25519_size to increase code coverage
2018-10-10 12:46:25 -07:00
Tesfa Mael
8f1ad656c2
Improving code coverage
2018-10-09 16:13:26 -07:00
David Garske
0293686990
Added example client/server support for loading certificate and private key into WOLFSSL object using -H loadSSL. Added load_ssl_buffer function to load buffers into WOLFSSL objects. Changed wolfSSL_get_SSL_CTX API to always be exposed. Added TEST_LOAD_BUFFER build option to use the load_buffer and load_ssl_buffer calls for example client/server.
2018-10-09 12:54:41 -07:00
David Garske
7a3a314ece
Merge pull request #1868 from kaleb-himes/TEST_COVERAGE_2
...
Test coverage 2
2018-10-09 11:16:31 -07:00
toddouska
355048230f
Merge pull request #1866 from dgarske/openssl_leak_fix
...
Fix leaks in compatibility functions `wolfSSL_X509_print` and `wolfSSL_i2d_RSAPublicKey`
2018-10-08 09:38:26 -07:00
toddouska
7a02832547
Merge pull request #1849 from dgarske/asn_piv
...
Added ASN certificate PIV and GZIP support
2018-10-08 09:32:19 -07:00
Kaleb Himes
c6e3e34ff7
Remove unused macro
2018-10-08 09:35:37 -06:00
David Garske
1ed50a40e7
Fix for wolfSSL_i2d_RSAPublicKey leak.
2018-10-05 14:09:12 -07:00
kaleb-himes
66420db07c
Initializing coverage for CRL APIs
2018-10-05 15:05:03 -06:00
Takashi Kojo
93c85caec4
Merge pull request #1867 from miyazakh/work
...
fixed typo
2018-10-05 16:26:00 +09:00
Hideki Miyazaki
67cab29d81
fixed typo
2018-10-04 21:02:22 -07:00
David Garske
cec61ac3c9
Fix for leak in wolfSSL_X509_print, where the RsaKey is not free'd. Cleanup of formatting.
2018-10-04 16:51:51 -07:00
David Garske
1d7c4f96fa
Fix windows build warning with side data type mismatch.
2018-10-04 16:10:50 -07:00
David Garske
319096e7e7
Fix indent for error case.
2018-10-04 16:07:35 -07:00
David Garske
bbdb17975c
Adds build option WOLFSSL_EITHER_SIDE for deferring the "side" of the TLS session until first connect or accept. Added the DTLS generic v1.0 and v1.2 methods for "either" side. Added "either" methods unit tests. Added "either" -v e support to example client/server. Fix to expose wolfSSL_use_certificate_file and wolfSSL_use_PrivateKey_file without OPENSSL_EXTRA. Cleanup of the methods for (void)heap and log messages. Spelling fixes.
2018-10-04 15:47:50 -07:00
toddouska
846ae06ae9
Merge pull request #1863 from tmael/mingw32Fix
...
Fixed MINGW32 build errors
2018-10-04 09:15:01 -07:00
David Garske
0ec9b28402
Added GZIP compression tests. Added new wc_Compress_ex API to support GZIP compression option.
2018-10-03 16:29:45 -07:00
kaleb-himes
08654ce71d
Start hitting up the stubs, more to come
2018-10-03 17:01:12 -06:00
Tesfa
f83ea9a9d5
Fixed MINGW32 build errors
2018-10-03 13:58:51 -07:00
John Safranek
d473fd38ab
Merge pull request #1861 from dgarske/coding_cleanup
...
Cleanup of the base64/base16 start hex values
2018-10-03 09:36:49 -07:00
David Garske
c619bfebda
Add test for NIST PIV case.
2018-10-02 17:08:27 -07:00
David Garske
f0350c1efb
Refactor of the wc_ParseCertPIV to support detection of Identiv format header. Added flag to indicate Identiv type. Added wolfCrypt test for wc_ParseCertPIV function with Identiv PIV template.
2018-10-02 17:01:56 -07:00
David Garske
0c72dee315
Fixes for building with ./configure --enable-asn=nocrypt. Added wolfCrypt test template for certpiv_test, pending test PIV certs to use.
2018-10-02 15:18:57 -07:00
David Garske
680a863054
Added support for building with certificate parsing only. ./configure --enable-asn=nocrypt. Added new API for parsing PIV format certificates wc_ParseCertPIV with WOLFSSL_CERT_PIV build option. Added wc_DeCompress_ex with ability to decompress GZIP. Moved the ZLIB error codes into wolfCrypt.
2018-10-02 15:18:56 -07:00
Sean Parkinson
0829af7a05
Support constructed OCTET_STRING in PKCS#7 signed data
2018-10-03 07:51:37 +10:00
David Garske
cfba86d3ab
Further cleanup of the Base64 and Base16 encoding start/min value.
2018-10-02 14:38:08 -07:00
David Garske
be2f68d183
Cleanup of the base64 decode start hex 0x2b.
2018-10-02 08:33:45 -07:00
David Garske
4ca7460735
Merge pull request #1856 from ejohnstown/version-indication
...
Windows DLL Version Resource
2018-10-01 12:51:38 -07:00
David Garske
142111da3b
Merge pull request #1857 from kaleb-himes/MORE_TEST_COVERAGE
...
Add more coverage cases to unit tests
2018-10-01 12:19:12 -07:00
John Safranek
8f36a78a71
Exclude the version resource from the static library builds. It triggers a linker warning for Win32 builds and it isn't used in the static builds.
2018-10-01 10:37:45 -07:00
kaleb-himes
1f643800a6
Add more coverage cases to unit tests
2018-09-28 15:32:16 -06:00
John Safranek
05ca60a266
Add a version resource to the wolfSSL library for Visual Studio builds.
2018-09-28 11:46:22 -07:00
Chris Conlon
13bf2fc342
Merge pull request #1854 from dgarske/fix_ecdsa_sig_leak
...
Fix for leak with openssl compatibility API and normal math
2018-09-28 09:26:26 -06:00
David Garske
f19f803098
Fix for possible leak with openssl comatibility API wolfSSL_d2i_ECDSA_SIG when fast math is disabled.
2018-09-27 11:39:30 -07:00
David Garske
6d18f58f81
Merge pull request #1848 from JacobBarthelmeh/Benchmark
...
changes to benchmark app
2018-09-26 15:10:20 -07:00
Chris Conlon
d30c45a79c
Merge pull request #1637 from ghoso/openssl_compat201805
...
OpenSSL Compatibility APIs 2018/06
2018-09-26 14:54:14 -06:00
Kaleb Himes
5cd428eaa8
Merge pull request #1853 from dgarske/mp_add_d
...
Fixes for missing `mp_add_d`
2018-09-26 13:50:14 -06:00
JacobBarthelmeh
fc81467715
Merge pull request #1851 from dgarske/lighttpd_fix
...
Lighttpd fixes
2018-09-26 13:24:16 -06:00
Jacob Barthelmeh
d0abc10fe9
update RSA keygen benchmark and test with asynccrypt
2018-09-26 13:10:05 -06:00
Chris Conlon
8ccd715f31
Merge branch 'master' into openssl_compat201805
2018-09-26 11:06:26 -06:00
David Garske
441c0492f6
Fixes for missing mp_add_d. Fix for IDE/GCC-ARM user_settings.h to remove redudant USE_FAST_MATH option.
2018-09-26 08:34:08 -07:00
David Garske
6e629a51f8
Added test case for scenario where error is pushed, cleared then try to get current. Without fix to clear wc_current_node in wc_ClearErrorNodes this causes access to invalid/free'd memory.
2018-09-26 08:16:58 -07:00
David Garske
3c828c0547
Merge pull request #1850 from ejohnstown/const
...
DecodedCert der to const
2018-09-26 07:52:19 -07:00
David Garske
1bf7cad633
Fix for case where wc_ClearErrorNodes is called, but then wc_PullErrorNode is called and wc_current_node is populated with invalid ->next pointer.
2018-09-25 16:13:13 -07:00
David Garske
d7249068db
Fix for Lighttpd 1.4.49, which requires HAVE_EX_DATA.
2018-09-25 15:14:57 -07:00
John Safranek
18a27cfe75
Changed the DecodedCert's der pointer to be a pointer to const. The
...
DecodedCert doesn't own the der value, so it should be const. Had to
make many other changes downstream of this.
2018-09-25 12:55:52 -07:00
Go Hosohara
52b5fe569b
restore PR#1819 to pass Jenkins tests.
2018-09-25 18:04:27 +09:00
Go Hosohara
ff5506faf2
define wolfSSL_OPENSSL_add_all_alogrithms_noconf alias for wolfSSL_OpenSSL_add_all_algorithms_noconf and some fixes
2018-09-25 15:39:56 +09:00
Takashi Kojo
71863c462e
(void) for unused in NO_RSA case
2018-09-25 15:39:56 +09:00
Takashi Kojo
dc06bb075d
moving and consoridating NID defines to enum in asn.h
2018-09-25 15:39:56 +09:00
Takashi Kojo
01654dac1a
minor fix
2018-09-25 15:39:56 +09:00
Go Hosohara
cfa99c567b
merge PR #1820 Porting aid
2018-09-25 15:39:56 +09:00
Go Hosohara
ca9f62713d
fix test_wolfSSL_CTX_load_verify_locations() build error
2018-09-25 15:39:56 +09:00
Takashi Kojo
cf5377ec5b
Revert "fix api.c error code to fit into"
...
This reverts commit 9eddc2ed3598dbede3c6a3aa1e0b50e111369d63.
2018-09-25 15:39:56 +09:00
Takashi Kojo
921992e689
fix api.c error code to fit into
2018-09-25 15:39:55 +09:00
Go Hosohara
d9c0e1ddde
increase memory bucket size
2018-09-25 15:39:55 +09:00
Takashi Kojo
c28e981b9b
avoid shadow
2018-09-25 15:39:55 +09:00
Go Hosohara
c7cfa74577
Fix some flaws caused by rebase
2018-09-25 15:39:55 +09:00
Takashi Kojo
a189d00fc9
Refactor cs+ project
2018-09-25 15:39:55 +09:00
Takashi Kojo
3c93d4e638
KEEP_STORE_CERTS release elimination, limited to FreeX509 in X509_STORE_CTX
2018-09-25 15:39:55 +09:00
Takashi Kojo
226bc54b57
ctx->ourCert keeps duplicated x509
2018-09-25 15:39:55 +09:00
Takashi Kojo
8a046b0bac
WOLFSSL_KEEP_STORE_CERTS for wolfSSL_X509_free
2018-09-25 15:39:55 +09:00
Takashi Kojo
59beba6338
WOLFSSL_CIPHER_INTERNALNAME option
2018-09-25 15:39:55 +09:00
Go Hosohara
c3abb6c0cd
HAVE_HTTP_CLIENT is disabled if WOLFSSL_USER_IO is defined in wolfsssl/wolfio.h
2018-09-25 15:39:55 +09:00
Takashi Kojo
93e1221894
WOLFSSL_KEEP_STORE_CERTS for X509_STOREmake
2018-09-25 15:39:55 +09:00
Takashi Kojo
9ea88b5181
wc_PKCS12_free, EVP_PKEY_free for PKCS12 in test_wolfSSL_OBJ
2018-09-25 15:39:55 +09:00
Takashi Kojo
89dcbd6693
set dynamic flag when wolfSSL_ASN1_OBJECT_new()
2018-09-25 15:39:55 +09:00
Takashi Kojo
511b59cf73
set dynamic flag in ASN1_OBJECT_new
2018-09-25 15:39:55 +09:00
Takashi Kojo
9ae3ccb3ba
OBJ_sn2nid with OPENSSL_EXTRA_X509_SMALL
2018-09-25 15:39:55 +09:00
Takashi Kojo
094141b4ea
initiallizing asn1Name
2018-09-25 15:39:55 +09:00
Takashi Kojo
7d2a03f8c9
OBJ_obj2nid memory leak
2018-09-25 15:39:55 +09:00
Go Hosohara
2669b80943
Fix crashed issue if you call X509_free() after X509_STOER_CTX_free()
2018-09-25 15:39:55 +09:00
Go Hosohara
5de7a34fd4
Add memory free to prevent from leaking
2018-09-25 15:39:55 +09:00
Go Hosohara
1c627430c7
increase wolfcrypt test program memory size along to WOLFSSL structure modificaiton.
...
rebase with master branch
2018-09-25 15:39:55 +09:00
Go Hosohara
1d1f4df8cb
Fix XBADFILE typo
2018-09-25 15:39:55 +09:00
Takashi Kojo
7af43b6cf0
test_wolfSSL_OBJ with NO_DES3, NO_RSA
2018-09-25 15:39:55 +09:00
Takashi Kojo
7767d802b7
arg_obj check has done before
2018-09-25 15:39:55 +09:00
Takashi Kojo
c673884cbb
#ifdef HAVE_ECC to OBJ_nid2obj, and its test in api.c
2018-09-25 15:39:55 +09:00
Takashi Kojo
4d03b55fef
XBADFILE in bio.c
2018-09-25 15:39:55 +09:00
Go Hosohara
fd634141bd
wolfSSL_get_rbio,wolfSSL_get_wbio.
...
fix to check XBADFILE in wolfSSL_BIO_write_file.
2018-09-25 15:39:55 +09:00
Go Hosohara
fd01659baa
Obj_obj2nid
2018-09-25 15:39:55 +09:00
Go Hosohara
19c1a3a3f9
Fix i2d_RSAPublicKey() memory leak issue.
2018-09-25 15:39:55 +09:00
Go Hosohara
3f993c280c
Change buffer variable name for preventing from conflict with debug option.
2018-09-25 15:39:54 +09:00
Go Hosohara
3f82fb62a0
SSL_get_peer_cert_chain() count value check in api.c
2018-09-25 15:39:54 +09:00
Takashi Kojo
259d3b5720
WOLFSSL_USER_FILESYSTEM option
2018-09-25 15:39:54 +09:00
Takashi Kojo
1e87eae3b7
i2d_RSAPublicKey(rsa, NULL)
2018-09-25 15:39:54 +09:00
Takashi Kojo
52cee17668
use XSEEK_END
2018-09-25 15:39:54 +09:00
Takashi Kojo
e6612b34f7
use XFILE, BADFILE, XFxxxx
2018-09-25 15:39:54 +09:00
Takashi Kojo
787fa5d49a
get name in X509_NAME_get_entry
2018-09-25 15:39:54 +09:00
Go Hosohara
3bf776baf4
wolfSSL_ASN1_TIME_get_data() changed
2018-09-25 15:39:54 +09:00
Go Hosohara
29d3303995
Add tests for d2i_PKCS12_fp,i2d_RSAPublicKey,RSA_verify and X509_print
2018-09-25 15:39:54 +09:00
Go Hosohara
b588e6ab29
ERR_peek_last_error() and SSL_get_SSL_CTX reference error on opensslextra.
...
Implemented wolfSSL_X509_get_version().
2018-09-25 15:39:54 +09:00
Go Hosohara
e79cdefcde
X509_NAME_ENTRY_get_object
2018-09-25 15:39:54 +09:00
Go Hosohara
2922a93bf7
PEM_read_X509_CRL
2018-09-25 15:39:54 +09:00
Go Hosohara
050fa2f8f8
wolfSSL_X509_CA_num()
2018-09-25 15:39:54 +09:00
Go Hosohara
aaa26f3f41
wolfSSL_ASN1_TIME_get_data()
2018-09-25 15:39:54 +09:00
Go Hosohara
a002a6715f
wolfSSL_ASN1_TIME_get_length()
2018-09-25 15:39:54 +09:00
Go Hosohara
98ae3bb7fd
Add define for OpenSSL API.
2018-09-25 15:39:54 +09:00
Sean Parkinson
741301bb2c
Single Precision: ARM Thumb assembly implementation
...
Remove AVX2 code from platform specific code that doesn't support it.
Fix sp_lshd to memmove correct amount.
2018-09-25 09:10:45 +10:00
Sean Parkinson
c4e1cdf335
Merge pull request #1845 from dgarske/tls_curve_order
...
TLS supported curve selection fixes
2018-09-25 08:26:14 +10:00
Jacob Barthelmeh
27aaedf37c
add -rsa-sz which benches any RSA key size
2018-09-24 16:21:13 -06:00
JacobBarthelmeh
4855246fc6
Merge pull request #1847 from kaleb-himes/ASN_T_LONG
...
Address a potential out of bounds write
2018-09-24 10:51:49 -06:00
JacobBarthelmeh
3be25441fa
Merge pull request #1843 from dgarske/async_fixes
...
Fixes for wolfCrypt async use with TLS
2018-09-24 09:51:19 -06:00
JacobBarthelmeh
0efc637d2d
Merge pull request #1834 from SparkiDev/pkcs11
...
Support for PKCS#11
2018-09-24 09:41:45 -06:00
David Garske
038b5e8a66
Fix comment spelling error.
2018-09-24 07:23:54 -07:00
Sean Parkinson
d273d1dc81
Fixes from review
2018-09-24 08:44:31 +10:00
Sean Parkinson
3a72cf7996
Fixes from review
2018-09-24 08:41:25 +10:00
Sean Parkinson
f7f158cbd9
Fix encode and decoding of EC signature
2018-09-24 08:41:25 +10:00
Sean Parkinson
77a81057be
Casting fixes
2018-09-24 08:41:25 +10:00
Sean Parkinson
5744e4227d
Rewrote the public pkcs11 headers
...
Fixed file name in comment.
2018-09-24 08:41:25 +10:00
Sean Parkinson
8a5a03ea35
Support for PKCS#11
...
Support for RSA, ECDSA and AES-GCM operations.
2018-09-24 08:41:25 +10:00
David Garske
dfec7f2263
Fix for TLS v1.3 async case with cipher suite TLS_AES_128_GCM_SHA256 and RSA key type. Fix for issue with long cipher suite name test for TLS 1.3.
2018-09-21 16:30:05 -07:00
kaleb-himes
29d60ec7e9
Changed to MAX over LONG based on peer review
2018-09-21 17:09:37 -06:00
kaleb-himes
fc77590c4e
Address a potential out of bounds write
2018-09-21 17:02:56 -06:00
David Garske
b2575b0b60
Fix to only skip early key free if async pending.
2018-09-21 15:13:15 -07:00
David Garske
e07e8a6a6e
Merge pull request #1846 from cconlon/validity
...
fix daysValid seconds calculation
2018-09-21 12:02:11 -07:00
Chris Conlon
0591b18339
fix daysValid seconds calculation
2018-09-21 11:04:39 -06:00
David Garske
a643aeac41
* Fixes for async with TLS where keys are being free'd too soon.
...
* Fix for possible NULL RNG case in mp_rand.
* Fix for memory macros to handle expression for `HEAP`.
* Fix for possible unknown uint32_t type with mem track.
* Fix for double Alloc/Free print when using track and debug memory at same time.
* Fix for building with `./configure CFLAGS="-DECC_USER_CURVES -DNO_ECC256 -DHAVE_ECC160"`
* Performance improvements for cases with `WC_ASYNC_NO_HASH` and `WC_ASYNC_ENABLE_SHA256`.
2018-09-21 09:33:40 -07:00
David Garske
24f9f12844
Fix for the curve logic to pick the hightest strength, not just the default 256-bit. Added test for setting user curve. ./examples -H useSupCurve.
2018-09-21 09:27:48 -07:00
David Garske
39019c2418
Re-order the default supported curve groups by strength. Some TLS servers pick the top choice instead of the strongest.
2018-09-21 08:54:32 -07:00
David Garske
a5fffdbbb7
Merge pull request #1844 from kaleb-himes/CERT_UPDATE_FIX
...
Cert update fix
2018-09-20 18:06:16 -07:00
David Garske
dfb9db2b8d
Merge pull request #1832 from JacobBarthelmeh/HardwareAcc
...
Linux /dev/crypto SHA256 and AES
2018-09-20 18:05:35 -07:00
kaleb-himes
dc942bf9cb
Remove unnecessary duplicate revocation
2018-09-20 16:54:35 -06:00
kaleb-himes
ea06a3e8cb
Resolve some persistent error report when conf not passed to req
2018-09-20 16:50:02 -06:00
Jacob Barthelmeh
fe2f9d4aa4
minor adjustments and add README
2018-09-20 15:59:29 -06:00
David Garske
427c62e04a
Merge pull request #1841 from kaleb-himes/CERT_UPDATE_REFACTOR
...
Cert update refactor
2018-09-20 14:24:06 -07:00
kaleb-himes
54e04dd312
posix compliance enhancements for portability
2018-09-20 10:30:11 -06:00
toddouska
4177c2f316
Merge pull request #1839 from ejohnstown/rng
...
RNG Update
2018-09-20 08:49:39 -07:00
David Garske
c225b45364
Merge pull request #1842 from kaleb-himes/NO_SHA_CRL_ON_BUILD_FAILURE
...
Update certs to address nightly failure with disable sha enable crl
2018-09-20 06:09:29 -07:00
kaleb-himes
17ebb0ea49
Update certs to address nightly failure with disable sha enable crl
2018-09-19 15:22:08 -06:00
Kaleb Himes
afcdfd70fe
Merge pull request #1840 from embhorn/fix_renewcerts
...
Revert addition of OIDs to cnf
2018-09-19 15:11:20 -06:00
kaleb-himes
f3fd67c54b
White space updates and revert cnf changes in lieu of PR #1734
2018-09-19 14:54:19 -06:00
kaleb-himes
4f6ee556dc
Refactor the cert renewal scripts with error handling
...
Portability updates
2018-09-19 14:47:21 -06:00
Jacob Barthelmeh
96a7e366bc
testing with valgrind and static analysis tools
2018-09-19 14:29:33 -06:00
Jacob Barthelmeh
2e88151cfd
crypto only sha256 cryptodev
...
formating and refactoring
update configure for devcrypto
add AES algorithms to cyrptodev port
increase structure size for compatibility AES with cryptodev
add wc_devcrypto.h to install path
2018-09-19 10:41:29 -06:00
John Safranek
951bd5a01a
FIPSv2: RNG Update
...
1. Put the SeedTest function in the HASH_DRBG scope.
2018-09-19 07:22:04 -07:00
Eric Blankenhorn
b1b7093a1d
Revert addition of OIDs to cnf
2018-09-19 08:01:40 -05:00
John Safranek
8972867ada
FIPSv2: RNG Update
...
1. Updated the IDE/WIN10 user settings to enable RDSEED by default.
2. Updated the Windows GenerateSeed() function to take into account the
RDSEED enabled setting.
3. Exclude the TestSeed() function check for the "selftest" build as
well as old FIPS.
2018-09-18 16:08:35 -07:00
John Safranek
582cf3182e
FIPSv2: RNG Update
...
1. Update the SEED_BLOCK_SZ to 4 for non-FIPS builds.
2. Change fips-check.sh to skip copying over the random.{c,h} files for
now. Need the tagged versions of the other files and the new random for
now.
2018-09-18 14:36:43 -07:00
John Safranek
4aa85f956f
FIPSv2: RNG Update
...
1. The wolfcrypt test shouldn't check TestSeed() for old FIPS builds.
2018-09-18 14:36:42 -07:00
John Safranek
b9a850575f
FIPSv2: RNG Update
...
1. For non-FIPS builds, lower the entropy request size to the old value.
2. Added a consistency check to the result of the entropy source. The test
involves requesting an additional 64-bits, then doing a running
comparison of each block of 64-bits. The first block of bits is ignored.
3. Refactored the RNG seeding a bit. Renamed all variables with
"entropy" in the name as "seed". Renamed the constants for entropy sizes
as seed sizes. Changed the security strength to its actual value and
introduced an entropy scaling factor for the number of bits of entropy
per bit and a size for the NDRBG block size.
4. Changed it so the user can change the parameters for the RNG at the
build configuration. If using FIPSv2, triggers an error if the paramters
are changed.
2018-09-18 14:36:42 -07:00
Chris Conlon
085daa78cd
Merge pull request #1833 from dgarske/norng_fixes
...
Fixes for building without RNG enabled
2018-09-18 14:52:21 -06:00
David Garske
4981480215
Fix to make sure wc_RNG_GenerateBlock return code is checked in test.h GetRandomPort.
2018-09-18 12:55:52 -07:00
David Garske
9e305a01b4
More fixes for building with ./configure --disable-rng.
2018-09-18 11:17:39 -07:00
David Garske
d05423af7e
Merge pull request #1835 from danielinux/fix-fall-through-define-typo
...
Fixed typo in the definition of macro FALL_THROUGH
2018-09-18 07:01:15 -07:00
David Garske
b832b7bad3
Fixes for building with ./configure --enable-opensslextra --disable-hashdrbg --disable-rng --enable-cryptonly --disable-dh --disable-rsa --disable-ecc.
2018-09-17 09:38:45 -07:00
David Garske
14815431e7
Merge pull request #1836 from kaleb-himes/MP_SET_IMPL_DEC_FIX
...
mp_set pre-processor logic in fastmath breaking existing builds, norm…
2018-09-14 16:44:29 -07:00
David Garske
2e4c07ed93
Fixes and improvements for handling the --disable-rng case. Valid make check tests requires wolfCrypt only and no asymmetric crypto (./configure --disable-rng --enable-cryptonly --disable-dh --disable-rsa --disable-ecc).
2018-09-14 14:09:27 -07:00
kaleb-himes
301e91e4d3
mp_set pre-processor logic in fastmath breaking existing builds, normal math not effected
2018-09-14 14:29:19 -06:00
Jacob Barthelmeh
04c444af35
add wolfSSL version print out to benchmark app
2018-09-14 14:17:49 -06:00
David Garske
32d3cb6cfb
Fixes for case with Intel rand source and no DRBG (./configure --enable-intelasm --enable-intelrand --disable-hashdrbg). Fixes to wolfSSL_RAND_egd to better handle no DRBG case.
2018-09-14 09:48:57 -07:00
Daniele Lacamera
a7ab98be69
Removed typo in the definition of macro FALL_THROUGH
2018-09-14 11:02:23 +02:00
Chris Conlon
fb699acec4
Merge pull request #1831 from MJSPollard/benchmarkCSV
...
added option to print wolfcrypt benchmark tests in CSV format
2018-09-13 16:16:09 -06:00
David Garske
a4d502e22a
Additional fixes for no RNG cases. Specifically ./configure --disable-hashdrbg --disable-rng --enable-cryptonly
2018-09-13 14:07:08 -07:00
David Garske
77cd361bca
Fixes for building with WC_NO_RNG.
2018-09-13 13:23:55 -07:00
toddouska
e071f1ca7e
Merge pull request #1825 from SparkiDev/compat_apis_1
...
Add more compatability APIs.
2018-09-13 13:13:12 -07:00
Chris Conlon
8a6a9e7620
Merge pull request #1820 from kojo1/portingAid
...
Porting aid
2018-09-13 11:06:55 -06:00
MJSPollard
d4d6346ee5
fixed unused variable error
2018-09-13 08:47:01 -06:00
MJSPollard
7457ab3e14
added define to work with certain enabled options
2018-09-12 23:37:31 -06:00
MJSPollard
037151eae0
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into benchmarkCSV
2018-09-12 23:32:45 -06:00
abrahamsonn
1c25fc801e
Changed up some words
2018-09-12 16:58:32 -06:00
abrahamsonn
4f95ba0f69
Where did a bunch of those links even come from?
2018-09-12 16:51:45 -06:00
Sean Parkinson
0275366fb6
Fixes from code review
...
Document how length of ECDSA signature calculated.
Check parameter not NULL before use.
Formatting fix.
Also, disable RSA test of EVP_DigestSign/Verify* when HAVE_USER_RSA.
2018-09-13 08:47:09 +10:00
abrahamsonn
e809fc2d5d
Updated some of the links on the Doxygen page
2018-09-12 16:45:18 -06:00
toddouska
324235f698
Merge pull request #1823 from dgarske/cert_ext_only
...
Fix for build with cert extensions and openssl extra only
2018-09-12 13:03:37 -07:00
toddouska
581f72adf8
Merge pull request #1822 from dgarske/fixes_async
...
Fix for dh_test to make sure the provided agree size is populated
2018-09-12 13:03:04 -07:00
toddouska
5b985c7dbd
Merge pull request #1821 from dgarske/nxp-ltc
...
Fixes for NXP LTC support with K82
2018-09-12 13:02:21 -07:00
John Safranek
b330c6e035
Merge pull request #1801 from kaleb-himes/OCSP-GLOBALSIGN-FIXr2
...
Address issues when testing with WOLFSSL_OCSP_TEST set
2018-09-12 11:36:41 -07:00
David Garske
bd1d36f0aa
Merge pull request #1818 from aaronjense/IAR-EWARM-build-update
...
fixed compile time errors and warnings for IAR-EWARM projects
2018-09-12 11:15:59 -07:00
abrahamsonn
8aae8ceb2a
Changed mobile viewport scale
2018-09-12 10:16:45 -06:00
Sean Parkinson
df20daa1ae
Support RSA and ECC in wolfSSL_DigestSign/Verify*
2018-09-12 16:31:39 +10:00
Takashi Kojo
7ddc756d15
eliminate double semi-colon
2018-09-12 10:13:30 +09:00
Chris Conlon
66dc735454
Merge pull request #1830 from dgarske/renesas
...
Fixes for Renesas example projects
2018-09-11 15:40:00 -06:00
David Garske
4bbbb82a01
Merge pull request #1829 from embhorn/zd3928
...
Make DecodedCert elements available with WOLFSSL_CERT_EXT
2018-09-11 14:38:31 -07:00
MJSPollard
d280359548
added option to print wolfcrypt benchmark tests in CSV format
2018-09-11 14:49:54 -06:00
abrahamsonn
6876b7d98e
Removed comment from HTML header
2018-09-11 13:35:49 -06:00
abrahamsonn
93e3db3ae2
Merge branch 'master' of https://github.com/wolfssl/wolfssl into doxygen-update
2018-09-11 13:33:47 -06:00
David Garske
0ad77628f1
Merge pull request #1827 from kaleb-himes/CPP_POLY1305
...
Fix for HAVE_POLY1305 without one time auth
2018-09-11 10:00:39 -07:00
David Garske
ca83f97508
Merge pull request #1828 from cconlon/nucleusfix
...
Pass arguments through to Nucleus memory functions in 1.2 build
2018-09-11 09:41:01 -07:00
David Garske
a63da76e07
Fixes for Renesas example projects.
2018-09-11 09:38:24 -07:00
Aaron
d658701350
Added NO_WOLF_C99 define, replaced sp.c with relevant sp_*.c, removed evp.c and bio.c from compiling seperately from ssl.c
2018-09-11 11:16:04 -05:00
Eric Blankenhorn
01dc018cda
Make DecodedCert elements available with WOLFSSL_CERT_EXT
2018-09-11 10:41:12 -05:00
Chris Conlon
8060deb40a
pass arguments through to Nucleus memory functions in 1.2 build
2018-09-11 09:26:12 -06:00
Sean Parkinson
330a7048c7
Add more compatability APIs.
...
d2i_ECDSA_SIG, i2d_ECDSA_SIG, EVP_DigestVerifyInit,
EVP_DigestVerifyUpdate, EVP_DigestVerifyFinal, EVP_PKEY_id,
PEM_read_bio_PUBKEY
2018-09-11 09:28:03 +10:00
David Garske
f90b7d6c37
Merge pull request #1826 from embhorn/serialnumOID_new
...
`wolfSSL_CTX_load_verify_chain_buffer_format` and device serial number OID
2018-09-10 11:33:37 -07:00
David Garske
238f45d89d
Fix for build with ./configure --enable-certext --enable-opensslextra.
2018-09-10 08:22:17 -07:00
David Garske
f48e2067ae
Added new API wolfSSL_CTX_load_verify_chain_buffer_format for loading CA cert chain as DER buffer list including API unit test. Support for device serial number OID.
2018-09-10 08:15:17 -07:00
David Garske
2c5b0d82da
Fix for dh_test to make sure the provided agree size is populated. This resolves issue with async and QuickAssist DH.
2018-09-10 07:13:52 -07:00
David Garske
a2be7590d1
Fixes for NXP LTC support with K82. Fix for SHA384/512. Fix for AES CBC not storing previous IV. Fix for wc_AesSetKey arg check. Fix for AES GCM IV != 12 test. Changed LTC default in settings.h to not enable SHA512 and Ed/Curve25519. Tested using Rowley Crossworks v4.2.0 on a FRDM-K82F. There is an initial stack pointer issue with the arm-startup code here for Rowley still outstanding, but these fixes are valid as-is.
2018-09-10 07:13:32 -07:00
David Garske
8fdb6b79d0
Merge pull request #1824 from SparkiDev/tls_cam_no_aes
...
Camellia is a block cipher in TLS - can't turn on AEAD only define
2018-09-09 17:28:34 -07:00
Sean Parkinson
f8ac5b5f71
Merge pull request #1819 from dgarske/fix_load_loc
...
Fix for load location test to handle multiple failure codes
2018-09-10 08:36:19 +10:00
Sean Parkinson
2d413c5bb8
Camellia is a block cipher in TLS - can't turn on AEAD only define
2018-09-10 08:18:03 +10:00
Takashi Kojo
0d44252608
error pass though build flag WOLFSSL_PASSTHRU_ERR
2018-09-08 10:19:31 +09:00
Takashi Kojo
902008f5ea
refer unit_PassThrough flag at least once
2018-09-08 09:17:52 +09:00
Eric Blankenhorn
412eecd51a
Add wc_SetIssuerRaw and EncodeCert with raw fields ( #1798 )
...
* Make cert with raw issuer
* Add wc_SetIssuerRaw
* Use issuer raw in EncodeCert
2018-09-07 16:22:23 -07:00
David Garske
7d1ab5e9d2
Merge pull request #1817 from danielinux/fix-old-style-definitions
...
Remove old-style function definitions
2018-09-07 15:52:45 -07:00
David Garske
575382e5a9
Fix for load location test to handle multiple failure codes (failure may return ProcessFile error code or WOLFSSL_FAILURE). Moved expired certs and setup load location test for expired certs.
2018-09-07 15:30:30 -07:00
Takashi Kojo
e677c32714
test file access functions
2018-09-08 07:27:33 +09:00
Takashi Kojo
294a22e938
flag to pass throug errors for correcting as many error information as possible.
2018-09-08 06:02:20 +09:00
David Garske
c98f8842a3
Merge pull request #1816 from ejohnstown/ocsp-no-server
...
OCSP Stapling/No Server Build
2018-09-07 11:48:13 -07:00
Daniele Lacamera
27555d6eb7
Fix old-style function definitions
2018-09-07 09:13:20 +02:00
toddouska
a7fb48e157
Merge pull request #1783 from dgarske/load_loc
...
Enhanced load verify locations to support flags
2018-09-06 17:00:09 -07:00
John Safranek
15be0aceed
OCSP Stapling/No Server Build
...
In the case of OCSP Stapling being enabled and NO_WOLFSSL_SERVER being
set, there was a spot where the ocsp_stapling list was still being
touched even though it is left out of the build. Just needed to add the
right #ifdefs.
2018-09-06 16:56:09 -07:00
David Garske
ed14b68c38
Merge pull request #1813 from ejohnstown/bitfield
...
Bitfield Fixes
2018-09-06 16:01:59 -07:00
abrahamsonn
0a7b06857d
Merge branch 'master' of https://github.com/wolfssl/wolfssl into doxygen-update
2018-09-06 14:56:24 -06:00
abrahamsonn
6981d48a4d
Made some general Doxygen fixes
2018-09-06 14:54:13 -06:00
John Safranek
5360faac9d
Bitfield Fixes
...
A couple flags were being implemented as bitfields from an int type.
GCC-8 is being more strict of type and value checking and is treating
single bit ints as both 1 and -1 and complaining about value changes.
Change the two int bitfields to use word16 bitfields as is the
pattern elsewhere.
2018-09-06 13:46:00 -07:00
David Garske
d9a6484b75
Fix to improve return code logic in wolfSSL_CTX_load_verify_locations_ex.
2018-09-06 13:01:44 -07:00
David Garske
ae3d8d3779
* Fixed wolfSSL_CTX_load_verify_locations to continue loading if there is an error (ZD 4265).
...
* Added new `wolfSSL_CTX_load_verify_locations_ex` that supports flags `WOLFSSL_LOAD_FLAG_IGNORE_ERR`, `WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY` and `WOLFSSL_LOAD_FLAG_PEM_CA_ONLY`.
* Fix for `PemToDer` to handle PEM which may include a null terminator in length at end of file length causing wrong error code to be returned. Added test case for this. (ZD 4278)
* Added macro to override default flags for `wolfSSL_CTX_load_verify_locations` using `WOLFSSL_LOAD_VERIFY_DEFAULT_FLAGS`.
* Added tests for loading CA PEM's from directory using `wolfSSL_CTX_load_verify_locations` and `wolfSSL_CTX_load_verify_locations_ex` with flags.
* Added tests for `wolfSSL_CertManagerLoadCABuffer`.
* Updated the expired test certs and added them to `./certs/test/gen-testcerts.sh` script.
2018-09-06 12:51:22 -07:00
abrahamsonn
8719b888eb
Added some files to the .gitignore
...
Specifically, added
doc/doxygen_warnings
doc/html
doc/pdf
2018-09-06 13:02:30 -06:00
David Garske
d998d10f02
Merge pull request #1805 from dgarske/fix_csr
...
Fix for CSR generation email value
2018-09-05 19:44:41 -07:00
David Garske
a7821e0d6d
Merge pull request #1810 from quinnmiller1997/fp_mul_comba_7-typo
...
Fixed typo in fp_mul_comba_7
2018-09-05 19:43:47 -07:00
David Garske
30d968d6b0
Merge pull request #1811 from SparkiDev/tls_sig_ret
...
Fix CheckCertSignature return to be remembered past ParseCertRelative
2018-09-05 19:43:23 -07:00
Sean Parkinson
a3cc2119d7
Fix CheckCertSignature return to be remembered past ParseCertRelative
2018-09-06 10:42:49 +10:00
Quinn Miller
b8605fa544
Fixed typo in fp_mul_comba_7
2018-09-05 14:51:50 -06:00
kaleb-himes
0626338be2
Fix for HAVE_POLY1305 without one time auth
2018-09-05 14:41:57 -06:00
Chris Conlon
5ee09f77a1
Merge pull request #1796 from ghoso/e2studio
...
add project files for Renesas e2studio
2018-09-05 11:41:01 -06:00
David Garske
d432d346aa
Merge pull request #1809 from cconlon/stm32rngfix
...
enable RNG clock when WOLFSSL_STM32F427_RNG is defined
2018-09-04 17:21:01 -07:00
Eric Blankenhorn
28ad8e591d
Adding comment for empty case in GetNameType
2018-09-04 18:08:40 -05:00
toddouska
bac8b78a8c
Merge pull request #1803 from SparkiDev/tfm_stack
...
Small stack for fast math code
2018-09-04 15:57:59 -07:00
toddouska
d149795648
Merge pull request #1759 from dgarske/verifycbfail
...
Fix to resolve issue with verify callback not causing an error
2018-09-04 15:52:58 -07:00
toddouska
8e67ef33b2
Merge pull request #1799 from SparkiDev/cert_vfy_small
...
Smaller dynamic memory usage in TLS
2018-09-04 15:40:11 -07:00
toddouska
8584da60a8
Merge pull request #1802 from SparkiDev/tls13_0rtt_ch
...
Group Early Data message with ClientHello for faster delivery
2018-09-04 15:39:14 -07:00
toddouska
e1c4d3f5e6
Merge pull request #1808 from ejohnstown/vali-date
...
Validate Date
2018-09-04 15:33:41 -07:00
Chris Conlon
d3ea903c55
enable RNG clock when WOLFSSL_STM32F427_RNG is defined
2018-09-04 16:13:09 -06:00
John Safranek
e730cda550
Validate Date
...
The ValidateDate() function is wrapped by a macro so it may be replaced
in environments without ASN_TIME built in. In two cases, OCSP and CRL,
ValidateDate() is called directly instead of by the macro. This change
fixes that.
2018-09-04 13:39:26 -07:00
Sean Parkinson
17a70aee1b
Added test and minor fixes for CheckCertSignature
2018-09-03 10:50:47 +10:00
Sean Parkinson
4b208f4fe5
Make grouping EarlyData and ClientHello a configuration option
2018-09-03 08:48:28 +10:00
Sean Parkinson
4d0478a287
Fix fp_div_2d to return remainder correctly
...
If a == c are then a and c don't equal d:
calculate d before c
If a != c then a doesn't change in calculating c:
calculate d after c
2018-09-03 08:32:55 +10:00
David Garske
d2b9b230a0
Added additional verify callback override test cases.
2018-08-31 16:26:51 -07:00
David Garske
6171e29fe8
Fix for CSR generation after PR ( https://github.com/wolfSSL/wolfssl/pull/1734 ). This resolves issue with email name in CSR. (Thanks to Forum post https://www.wolfssl.com/forums/post4137.html ).
...
Failed examples:
```
145:d=5 hl=2 l= 16 prim: EOC
0000 - 69 6e 66 6f 40 77 6f 6c-66 73 73 6c 2e 63 6f 6d info@wolfssl.com
```
```
SET {
138 23: SEQUENCE {
140 3: OBJECT IDENTIFIER objectClass (2 5 4 0)
: Error: Spurious EOC in definite-length item.
```
Success Examples:
```
140:d=5 hl=2 l= 9 prim: OBJECT :emailAddress
151:d=5 hl=2 l= 16 prim: IA5STRING :info@wolfssl.com
```
```
SET {
138 29: SEQUENCE {
140 9: OBJECT IDENTIFIER emailAddress (1 2 840 113549 1 9 1)
151 16: IA5String 'info@wolfssl.com '
```
2018-08-31 11:20:04 -07:00
Sean Parkinson
41ab3d91fd
Small stack for fast math code
...
Any large stack usages have been changed to dynamic memory allocations
when WOLFSSL_SMALL_STACK is defined.
Modified functions to return error codes.
2018-08-31 17:55:49 +10:00
Go Hosohara
697c61af35
correct typo in IDE/include.am
2018-08-31 14:57:16 +09:00
Go Hosohara
00ff519b23
remove wrong configuration in IDE/include.am
2018-08-31 14:52:12 +09:00
Sean Parkinson
d089a4651a
Group Early Data message with ClientHello for faster delivery
2018-08-31 09:28:38 +10:00
Sean Parkinson
d86fc2dbbe
Smaller dynamic memory usage in TLS
...
Code doesn't require a DecodedCert which saves on dynamic memory usage.
WOLFSSL_SMALL_CERT_VERIFY: Don't have a DecodedCert allocated and verify
certificate signature in ProcessPeerCerts as this is maximum dynamic
memory usage.
WOLFSSL_SMALL_CERT_VERIFY is enabled with 'lowresource' configuration
option.
Fix sp_clear to work with NULL parameter.
Define a new function HashId that maps to the hashing function
available.
Set MAX_CERT_VERIFY_SZ to be the maximum based on what algorithms are
compiled in.
Fix usage of MAX_CERT_VERIFY_SZ in functions sending certificate verify
messages.
2018-08-31 08:29:28 +10:00
David Garske
ffc0f0fb26
Fix for building with SESSION_CERTS using pointer after free. Documented store->discardSessionCerts.
2018-08-30 13:57:21 -07:00
kaleb-himes
3729b12fae
Address issues when testing with WOLFSSL_OCSP_TEST set
2018-08-30 14:44:49 -06:00
David Garske
b369e524d4
Fix for the ECDSA verify callback override test case. Switched to AES128-GCM cipher suite (better cipher suite overall).
2018-08-30 11:48:08 -07:00
David Garske
3d0d10345a
Added test cases for ensuring forced error fails on client and server. Added test cases to ensure bad certificate can be overriden.
2018-08-30 11:17:21 -07:00
David Garske
944342b386
Fixes for verify callback failure override handling. Fixes the return codes in the failure cases.
2018-08-30 11:17:21 -07:00
David Garske
53c0003cad
Fix to resolve issue with verify callback not causing an error (if one not already present) when returning 0. Test case to follow shortly.
2018-08-30 11:17:21 -07:00
Go Hosohara
2551512718
add CS+ and e2studio settings in IDE/include.am
2018-08-30 13:50:50 +09:00
toddouska
31e37ea5df
Merge pull request #1797 from SparkiDev/stack_size
...
Small stack usage fixes
2018-08-29 16:19:46 -07:00
toddouska
fc64788092
Merge pull request #1795 from SparkiDev/tls13_no_tls12
...
Fixes to work when compiled with TLS 1.3 only
2018-08-29 16:16:46 -07:00
toddouska
d084a4bcb8
Merge pull request #1794 from SparkiDev/sp_armasm_modexp
...
Fix for SP ASM arm and no DH
2018-08-29 16:13:34 -07:00
toddouska
03fbad22a6
Merge pull request #1792 from SparkiDev/gcc_8_fixes
...
GCC 8 new warnings in -Wall fix
2018-08-29 16:12:19 -07:00
toddouska
818b0a3c9c
Merge pull request #1791 from SparkiDev/keyshare_ecc_free
...
Fix memory leak in KeyShare using ECC and not fast math
2018-08-29 16:11:32 -07:00
toddouska
ab487e25a0
Merge pull request #1790 from JacobBarthelmeh/SanityChecks
...
change grep message for RSA key size with tests
2018-08-29 16:11:14 -07:00
toddouska
4fd805ff1e
Merge pull request #1789 from JacobBarthelmeh/Fuzzer
...
sanity check on buffer before clearing it
2018-08-29 16:10:56 -07:00
toddouska
e4ccb2fe83
Merge pull request #1784 from dgarske/stsafe_server
...
Added ST-Safe PK callback example for Key Generation (TLS server only)
2018-08-29 16:07:14 -07:00
Go Hosohara
4d79eb121e
add include.am file and comment for related code of Renesas cs+ and e2studio
2018-08-29 11:06:13 +09:00
Sean Parkinson
4dbe86f1fd
Small stack usage fixes
...
Stack pointer logging added.
2018-08-29 10:16:51 +10:00
Go Hosohara
4d6f43277e
add project files for Renesas e2studio
2018-08-28 17:56:55 +09:00
Sean Parkinson
487c60df78
Fixes to work when compiled with TLS 1.3 only
...
TLS 1.3 Early Data can be used with PSK and not session tickets.
If only TLS 1.3 and no session tickets then no resumption.
External sites don't support TLS 1.3 yet.
2018-08-28 15:37:15 +10:00
Sean Parkinson
57620caac8
Fix for SP ASM arm and no DH
...
Fix mod exp in ARM asm to work for different size exponents.
In ASM code, mont_norm is not used in RSA so protect from no DH.
2018-08-28 11:24:38 +10:00
Sean Parkinson
551201c00c
GCC 8 new warnings in -Wall fix
2018-08-27 12:51:01 +10:00
Sean Parkinson
24694ef7b0
Fix memory leak in KeyShare using ECC and not fast math
2018-08-27 10:50:57 +10:00
Jacob Barthelmeh
46c04cafd3
change grep message for RSA key size with tests
2018-08-24 16:47:37 -06:00
Jacob Barthelmeh
d122b9f8b5
sanity check on buffer before clearing it
2018-08-24 16:29:43 -06:00
David Garske
205088d1bc
Merge pull request #1787 from ejohnstown/patches
...
Patches for various build errors
2018-08-24 14:46:28 -07:00
David Garske
459455328f
Merge pull request #1788 from ejohnstown/oid
...
OID handling in DecodeExtKeyUsage
2018-08-24 14:46:19 -07:00
John Safranek
1d9b482711
Merge pull request #1747 from kaleb-himes/XCODE-UPDATES
...
Xcode updates
2018-08-24 14:01:39 -07:00
John Safranek
86ce22c32e
Merge pull request #1785 from embhorn/zd4225
...
Fix for old certs not discarded when server does not resume session
2018-08-24 13:22:06 -07:00
David Garske
1005ca0703
Merge pull request #1786 from kaleb-himes/USER-HEAP-WITH-CM
...
Unloading from CM, and using custom heap, ensure XFREE has acces…
2018-08-24 11:56:48 -07:00
John Safranek
bd5e507617
OID
...
1. When checking an OID sum against an OID string based on context, skip the unknown OIDs instead of treating them as parse errors.
2. When getting an OID, pass the lower error upstream instead of just PARSE error.
2018-08-24 11:51:25 -07:00
John Safranek
4eb0d32fa8
Patches
...
1. Define Timeval in callbacks.h if the file sys/time.h is missing.
2. When picking the correct strtok() function, take into account MINGW64.
3. In the example server, changed the call to SSL_accept_ex() as it doesn't exist. Using wolfSSL_accept_ex(). Only a problem when setting WOLFSSL_CALLBACKS.
4. PickHashSigAlgo() is missing a ; when WOLFSSL_CALLBACKS is set.
2018-08-24 11:46:02 -07:00
David Garske
347fdccf1c
Added missing README.md.
2018-08-24 11:11:30 -07:00
David Garske
c96aeb4550
Added documentation and benchmarks for STM32 and STSAFE-A100 support.
2018-08-24 11:03:14 -07:00
toddouska
7f324d2c3b
Merge pull request #1781 from JacobBarthelmeh/Compatibility-Layer
...
fix for IV of DES_ncbc function
2018-08-24 10:16:21 -07:00
kaleb-himes
b7b99a2e92
Unloading from CM, and using custom heap, ensure XFREE has access to custom heap
2018-08-24 10:07:10 -06:00
Kaleb Himes
274b41dea5
Merge pull request #1782 from JacobBarthelmeh/SanityChecks
...
refactor CloseSocket for WOLFSSL_BIO free with USER IO
2018-08-24 09:08:05 -06:00
Eric Blankenhorn
498d8e6c15
Fix for old certs not discarded when server does not resume session
2018-08-24 07:53:35 -05:00
David Garske
88e6bd2915
Added ST-Safe server side PK callback example for key gen. Added helper API's for setting up the PK callbacks and custom context.
2018-08-23 15:57:14 -07:00
Jacob Barthelmeh
40551720ab
refactor CloseSocket and add guard
2018-08-23 16:30:53 -06:00
kaleb-himes
689da22799
Refactor and updates for XCODE projects following peer review
2018-08-23 15:41:35 -06:00
David Garske
c7dde6c682
Merge pull request #1656 from danielinux/contiki-port
...
Contiki port
2018-08-23 12:31:56 -07:00
toddouska
cc39f3211a
Merge pull request #1780 from dgarske/pkcs7_ex
...
Added new PKCS7 ex API's to support signing and validation of large data
2018-08-23 08:41:25 -07:00
toddouska
5d8a2a7702
Merge pull request #1778 from SparkiDev/sp_mem
...
Make ALT_ECC_SIZE with SP work
2018-08-23 08:25:44 -07:00
toddouska
554d40a62e
Merge pull request #1777 from dgarske/async_fixes
...
Build fixes for async
2018-08-23 08:23:20 -07:00
toddouska
0d171e591b
Merge pull request #1776 from SparkiDev/inline_cmpl_fix
...
Fix for clang builds with configs not using inline funcs
2018-08-23 08:22:39 -07:00
toddouska
54a379d8e0
Merge pull request #1775 from SparkiDev/tls_no_cert_vfy
...
Fix for no certificates and calling DoVerifyCallback.
2018-08-23 08:22:07 -07:00
toddouska
8477d5ba1b
Merge pull request #1773 from ejohnstown/critical-option
...
Certificate Extension Critical Check Optionality
2018-08-23 08:21:19 -07:00
JacobBarthelmeh
5ce1757e05
Merge pull request #1779 from dgarske/pic32mz_crypt_align
...
Fix for PIC32MZ crypto hardware alignment
2018-08-23 09:05:50 -06:00
Jacob Barthelmeh
f23eb37ade
fix for IV of DES_ncbc function
2018-08-23 09:03:09 -06:00
David Garske
57d72028f6
Fix for missing return code on wc_Pic32HashFree.
2018-08-22 16:38:55 -07:00
David Garske
d0d28c82cd
Added new PKCS7 ex API's for supporting signing and validation of large data blobs. New API's are wc_PKCS7_EncodeSignedData_ex and wc_PKCS7_VerifySignedData_ex. Includes header docx and unit tests for new API's. Cleanup for the PKCS7 small stack and const oid's.
2018-08-22 15:46:37 -07:00
David Garske
53af520911
Fix to resolve issue with PIC32MZ crypto hardware (AES/DES3 only) where an unaligned input/output buffer was not handled correctly. This results in a BUFFER_E. This was seen with DTLS v1.0 and TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA cipher suite. Fix is to allocate a dynamic buffer from heap if the input/output are not aligned. Tested and verified with a PIC32MZ2048EFM144 and the wolfssl_udp_client example for Harmony using DTLS v1.0 and the setudppacketoptions 192.168.0.107 11111 hello -> sendudppacket commands. Cleanups in older ctoacrypt/settings.h for PIC32MZ.
2018-08-22 13:39:03 -07:00
Daniele Lacamera
d7d2fb34af
fixed ifdef WOLFSSL_CONTIKI
2018-08-22 17:37:47 +02:00
Daniele Lacamera
bdb5d3c191
Improved support for contiki/uIP.
2018-08-22 09:15:10 +02:00
Daniele Lacamera
7bd16a2582
Fixed after second review
2018-08-22 09:15:10 +02:00
Daniele Lacamera
b74869a61a
Moved contiki + uIP support in the library
2018-08-22 09:15:10 +02:00
Daniele Lacamera
b7385476f0
Removed empty ifdef section
2018-08-22 09:15:09 +02:00
Daniele Lacamera
79a7518fdd
Using inline functions for XMALLOC/XFREE/XREALLOC in contiki
...
This is necessary to avoid the "unused variable" warnings
2018-08-22 09:15:09 +02:00
Daniele Lacamera
3d27a8dc53
Contiki port
2018-08-22 09:15:09 +02:00
Sean Parkinson
783c4a0c5e
Make ALT_ECC_SIZE with SP work
...
Change to more relevant dynamic types in SP also.
2018-08-22 16:02:51 +10:00
David Garske
9ae4ef2d5c
Build fixes for --enable-async --enable-all --with-intelqa. Resolves conflict for stat variable name. Fix for DH with async. Fix for async devSize.
2018-08-21 19:51:13 -07:00
Takashi Kojo
08c2d94011
return value check of XFSEEK
2018-08-22 10:46:46 +09:00
Sean Parkinson
31bd844d6f
Fix for clang builds with configs not using inline funcs
2018-08-22 11:16:57 +10:00
Sean Parkinson
fff5cff273
Fix for no certificates and calling DoVerifyCallback.
2018-08-22 10:57:19 +10:00
toddouska
776fd51720
Merge pull request #1768 from SparkiDev/tls13_final
...
Use final TLS 1.3 version value by default.
2018-08-21 12:29:51 -07:00
toddouska
e635e49635
Merge pull request #1772 from SparkiDev/tls13_point_ext
...
Send EC poiint format extension if downgradable from TLS 1.3
2018-08-21 12:27:10 -07:00
toddouska
a505f2b063
Merge pull request #1662 from SparkiDev/mem_track
...
Add memory usage tracking and logging
2018-08-21 12:25:49 -07:00
John Safranek
a0f1c9dbe4
Make the check of the certificate extension critical flag optional based on compile option.
2018-08-21 10:57:04 -07:00
Sean Parkinson
1ab17ac827
More changes to minimize dynamic memory usage.
...
Change define to WOLFSSL_MEMORY_LOG.
Fix for ED25519 server certificate - single cert to allow comparison
with ECC dynamic memory usage.
Free memory earlier to reduce maximum memory usage in a connection.
Make MAX_ENCODED_SIG_SZ only as big as necessary.
Change memory allocation type in sha256 from RNG to DIGEST.
If we know the key type use it in decoding private key
2018-08-21 14:41:01 +10:00
Sean Parkinson
d29118ba58
Merge pull request #1771 from dgarske/tls13only
...
Fixes for building with TLS v1.3 only enabled.
2018-08-21 14:25:54 +10:00
Sean Parkinson
103a0d351b
Send EC poiint format extension if downgradable from TLS 1.3
2018-08-21 10:11:12 +10:00
David Garske
389f56b5c7
Fix for building with TLS 1.3 only when AES CBC is enabled. Algorithm is allowed to be enabled, but the AES CBC cipher suites should not be. Fixed AEAD enable to check AES CBC based on HAVE_AES_CBC define.
2018-08-20 16:29:48 -07:00
Sean Parkinson
506c858ed6
Add memory usage tracking and logging
...
Add WOLFSSL_MEMORY_TRACKING to report allocations and frees with the
type.
Fix places where memory can be freed earlier.
2018-08-21 08:54:57 +10:00
David Garske
b12386fbb1
Fixes for building with TLS v1.3 only (./configure --disable-tlsv12 --enable-tls13 --disable-aescbc --enable-ed25519 --enable-curve25519)
2018-08-20 15:49:03 -07:00
Sean Parkinson
20950ffde8
Remove TODOs around TLS 1.3 draft version.
2018-08-21 08:41:50 +10:00
David Garske
3d16ed9c02
Merge pull request #1770 from ejohnstown/prime-fix
...
Prime Test Bug Fix
2018-08-20 13:24:05 -07:00
John Safranek
e4757f1283
Prime Test Bug Fix
...
Using the wrong size for the MR test check value. Converting from size
of FP_MAX_BITS to the DH prime size, dividing too much. Switched it to
its own constant.
2018-08-20 11:43:06 -07:00
toddouska
f3c4d5442e
Merge pull request #1757 from dgarske/pkcs8_pad
...
Fix to resolve padding issue with PKCS 8 encryption.
2018-08-20 09:32:34 -07:00
toddouska
0e1b8b7bd8
Merge pull request #1760 from dgarske/atmel_asf
...
Fixes for building with Atmel ASF (`WOLFSSL_ATMEL`)
2018-08-20 09:20:01 -07:00
toddouska
0f539616be
Merge pull request #1766 from JacobBarthelmeh/UnitTests
...
cleanup with test cases and access to FP_MAX_BITS
2018-08-20 09:19:14 -07:00
toddouska
683182f494
Merge pull request #1765 from SparkiDev/sp_fixes_1
...
Fixes for SP
2018-08-20 09:18:31 -07:00
toddouska
555714afa3
Merge pull request #1764 from SparkiDev/tls13_psk_cb
...
Separate PSK callback for TLS 1.3
2018-08-20 09:17:01 -07:00
toddouska
c8814a7ee1
Merge pull request #1769 from SparkiDev/tls13_dh
...
TLS 1.3: Always left-pad DH secret to length of prime
2018-08-20 09:13:50 -07:00
toddouska
3e08c27512
Merge pull request #1715 from SparkiDev/disable_aescbc
...
Config option to disable AES-CBC
2018-08-20 09:08:19 -07:00
Sean Parkinson
d104ae39e3
TLS 1.3: Always left-pad DH secret to length of prime
2018-08-20 14:20:50 +10:00
Sean Parkinson
3cdeccc36e
Use final TLS 1.3 version value by default.
2018-08-20 14:17:38 +10:00
David Garske
a7b5ed1c27
Merge pull request #1767 from aaronjense/dsa-unreachable-statement
...
silence warning for unreachable statement from some compilers.
2018-08-18 17:50:45 -07:00
Aaron Jense
79590f3310
silence warning for unreachable statement from some compilers.
2018-08-17 15:13:06 -06:00
Jacob Barthelmeh
ed9aaa93f4
include tfm in example client for veiwing FP_MAX_BITS
2018-08-17 11:06:40 -06:00
Jacob Barthelmeh
cc10c971cd
make sure that even if wolfSSL_Init has been called multiple times that wolfSSL_Cleanup gets called in tests
2018-08-17 11:04:21 -06:00
David Garske
ff635d5b2b
Merge pull request #1763 from aaronjense/ecc-check-key-type
...
Fix error with wolfCrypt-JNI having ECC_PRIVATEKEY_ONLY and d != NULL
2018-08-16 18:16:43 -07:00
Sean Parkinson
f1222c3f9f
Separate PSK callback for TLS 1.3
...
It is highly recommended that the PSK be different for each protocol.
Example callback already returns a different key for TLS 1.3.
New callback includes the ciphersuite, as a string, to use with the key.
2018-08-17 10:18:28 +10:00
Sean Parkinson
2ac2c24f22
Fixes for SP
...
More places to mask shifted n.
Fix conditional check on NO_3072 in sp_int.h
Disable prime checking when using SP maths.
Add support for mp_tohex to SP maths.
Fix wolfmath.c to support including SP maths.
2018-08-17 10:13:29 +10:00
Aaron Jense
93546694ca
modify for readability
2018-08-16 17:04:32 -06:00
Aaron Jense
aeb9ab8aea
Combine if statements
2018-08-16 16:25:53 -06:00
Aaron Jense
eb08c6f6fc
Fix error with wolfCrypt-JNI having ECC_PRIVATEKEY_ONLY and d != NULL
2018-08-16 15:29:46 -06:00
Sean Parkinson
f487b0d96a
Config option to disable AES-CBC
...
AEAD only detection and removeal of code.
Also in single threaded builds, reference the ctx suites in ssl object
if it exists.
2018-08-16 08:25:13 +10:00
David Garske
9db7ba2f0d
Fix for cast mismatch and spelling of state.
2018-08-15 12:00:44 -07:00
David Garske
c6e075f077
Fixes for building with Atmel ASF and no ECC508A.
2018-08-15 12:00:44 -07:00
David Garske
739bbd1355
Merge pull request #1750 from JacobBarthelmeh/SanityChecks
...
update condition for include of sys/time.h
2018-08-15 11:28:05 -06:00
toddouska
baab6755b2
Merge pull request #1756 from dgarske/norng
...
Fixes for building with `WC_NO_RNG`
2018-08-15 10:18:44 -07:00
toddouska
be0523b7cd
Merge pull request #1749 from JacobBarthelmeh/UnitTests
...
check max key size with ocsp stapling test
2018-08-15 10:18:12 -07:00
Jacob Barthelmeh
373258a0c2
account for NO_RSA and SP math when printing max RSA key size
2018-08-15 09:52:43 -06:00
Jacob Barthelmeh
c3ab52ed44
key size check on ocsp-stapling2 test
2018-08-15 09:52:43 -06:00
Jacob Barthelmeh
f74406d2c9
check max key size with ocsp stapling test
2018-08-15 09:52:43 -06:00
David Garske
3d16f891d4
Fix to check for buffer overrrun with the additional padding in PKCS12 EncryptContent function.
2018-08-14 19:20:24 -06:00
David Garske
cdff2869c2
Fixes for building with WC_NO_RNG (applies to wolfCrypt only builds). Tested with ./configure --enable-cryptonly CFLAGS="-DWC_NO_RNG" && make.
2018-08-14 18:53:25 -06:00
Eric Blankenhorn
2420af3cf2
Merge pull request #1758 from dgarske/certext
...
Fix for building certext without certgen
2018-08-14 17:00:51 -05:00
toddouska
9ad059542a
Merge pull request #1745 from dgarske/ecc_export_hex
...
Added new ECC export API's to support export as hex string
2018-08-14 14:19:23 -07:00
toddouska
e2de988f98
Merge pull request #1739 from dgarske/asio
...
Fixes to openssl compatibility for Boost.Asio with SSF
2018-08-14 14:18:08 -07:00
David Garske
d1e13a973c
Fix for building WOLFSSL_CERT_EXT without WOLFSSL_CERT_GEN due to missing CTC_MAX_EKU_OID_SZ. Change to allow --enable-certext without certgen.
2018-08-14 15:00:56 -06:00
David Garske
1c297b3ac4
Cleanup of some macro logic for enabling the mp_toradix.
2018-08-14 12:58:00 -06:00
David Garske
f23915baa1
Fix for BIO ssl case, which is not supported (for the Boost.Asio project this isn't required either).
2018-08-14 12:44:31 -06:00
David Garske
6ca56ee98c
Fix to handle carriage return case in PEM end of line character handling (for Windows). Cleanup to consolidate duplicate end of line character handling code.
2018-08-14 12:22:18 -06:00
David Garske
ff7d2fefdc
Fix for DH max size calc not including DH_Pub.
2018-08-14 12:22:18 -06:00
David Garske
7b83db0f65
Fix for PemToDer which was not properly handling extra new lines at end of file.
2018-08-14 12:22:18 -06:00
David Garske
eca64717be
Fix for BIO_wpending to work correctly.
2018-08-14 12:22:18 -06:00
David Garske
17e102d914
Fixes for asio build options (so includes OPENSSL_EXTRA). Fix for bad named variable shutdown. Fix for the side size in Options struct to support WOLFSSL_SIDE_NEITHER (3). Fix to set the side on wolfSS_connect() or wolfSS_accept().
2018-08-14 12:22:18 -06:00
David Garske
be33e69b22
Refactor to rename wc_ecc_export_int to wc_export_int for generic API for exporting an mp_int as hex string or unsigned bin.
2018-08-14 12:17:20 -06:00
David Garske
368227be2c
Fix to make sure fp_div_d is available.
2018-08-14 12:05:22 -06:00
David Garske
c073aee87c
Added new ECC export API's to support export as hex string. New API's are wc_ecc_export_ex and wc_ecc_export_int. For hex string use ECC_TYPE_HEX_STR as encType arg. Refactor to reduce duplicate code. Build fixes for NO_ECC_KEY_EXPORT.
2018-08-14 12:05:22 -06:00
David Garske
04c2b51b4d
Fix for padding size calculation and cast warning.
2018-08-14 11:49:21 -06:00
Jacob Barthelmeh
278fd9c054
update condition for include of sys/time.h
2018-08-14 10:51:05 -06:00
David Garske
d823d6f7b6
Fix to resolve padding issue with PKCS 8 encryption.
2018-08-14 10:51:04 -06:00
Kaleb Himes
64f553d944
Merge pull request #1755 from ejohnstown/scan-build-fix
...
Scan-Build Fix
2018-08-14 10:11:02 -06:00
David Garske
aee4aea64d
Merge pull request #1748 from JacobBarthelmeh/Testing
...
call hamc init with blake2 software test
2018-08-14 10:07:01 -06:00
toddouska
d4f908c372
Merge pull request #1728 from JacobBarthelmeh/HardwareAcc
...
Add build for AF_ALG
2018-08-13 16:27:51 -07:00
toddouska
a3627106ea
Merge pull request #1753 from dgarske/gcc_arm_fips
...
Enhancements to the GCC-ARM example
2018-08-13 16:20:13 -07:00
John Safranek
91d2b17139
Scan-Build Fix
...
1. Initialize the sz variable in wc_BerToDer().
2018-08-13 14:37:04 -07:00
David Garske
f44d42b1c8
Enhancements to the GCC-ARM example to support FIPS and additional build options. Added examples for memory overrides and standard library overrides. Fixes for building without test, benchmark or TLS. Changed the ARM startup code to only work for the Cortex M0 example using the define USE_WOLF_ARM_STARTUP.
2018-08-13 12:22:14 -06:00
John Safranek
5caaa94868
Merge pull request #1754 from dgarske/fix_fipsv2
...
Fix for FIPS PRB error with CAVP test
2018-08-13 11:18:33 -07:00
Jacob Barthelmeh
b71c2ddf38
call hamc init with blake2 software test
2018-08-13 08:58:01 -06:00
David Garske
93a7b76da5
Fix missing RSA_MIN_SIZE and RSA_MAX_SIZE and case where HAVE_FIPS_VERSION is not defined.
2018-08-13 08:18:51 -06:00
David Garske
80e46253d9
Fix for FIPS v1 CAVP case so the wc_RsaExportKey and wc_CheckProbablePrime functions are available. Cleanup to remove unused ERROR_OUT.
2018-08-13 06:25:55 -06:00
Eric Blankenhorn
bb574d28b2
Support for more cert subject OIDs and raw subject access ( #1734 )
...
* Add businessCategory OID
* Raw subject support methods
* Support for jurisdiction OIDs
* Wrap in WOLFSSL_CERT_EXT
* Adding tests
2018-08-12 12:53:29 -07:00
David Garske
6d10efe79c
Merge pull request #1752 from kaleb-himes/ocsp-stapling-pzero-take2
...
Use port 0 (dynamic) solution on servers and clients in addition to ocsp responders. Fix for OCSP tests when running concurrently.
2018-08-10 15:15:43 -07:00
kaleb-himes
280de47d06
Use pzero solutions on servers and clients in addition to ocsp responders
2018-08-10 14:17:17 -06:00
kaleb-himes
c288a214b1
give servers time to shut-down after client connection
2018-08-10 11:57:35 -06:00
kaleb-himes
ba3bc59771
further test control over ocsp-stapling tests
2018-08-10 11:44:16 -06:00
kaleb-himes
735e4a0986
ocsp stapling tests to wait until unit tests are complete
2018-08-10 11:18:04 -06:00
kaleb-himes
6113f68c21
make renewcerts-for-test use portable function declaration
2018-08-10 10:40:16 -06:00
kaleb-himes
35dbf9a6fe
address file restoration issue present when git not available
2018-08-10 10:24:42 -06:00
JacobBarthelmeh
a9a9dd257e
Merge pull request #1743 from kaleb-himes/ocsp-logic-update
...
update ocsp test case for portability and informative updates on use …
2018-08-08 10:45:26 -06:00
kaleb-himes
c7f1d810c3
update ocsp test case for portability and informative updates on use of environment variable
2018-08-07 10:42:18 -06:00
toddouska
cc1680dc98
Merge pull request #1741 from dgarske/verify_cb
...
Refactor of the verify callback
2018-08-06 13:12:54 -07:00
David Garske
56974c099e
Improved the logic for WOLFSSL_ALWAYS_VERIFY_CB to be more explicit and updated comments.
2018-08-06 11:40:35 -07:00
David Garske
c4ea50b956
Fix for issue with using CopyDecodedToX509 again for existing X509 and freeing the altNames in original. Fix was to use the ssl->peerCert directly for the index 0 cert. Improvement to make sure ex_data is always populated. Added NULL arg check on wolfSSL_get_peer_certificate.
2018-08-06 11:40:35 -07:00
David Garske
7d39a897dc
Refactor of the verify callback to eliminate duplicate code and provide consistency with various build options. Documented build options and added code comments in new DoVerifyCallback function. Added documentation in test.h myVerify function for arguments and return code. Fix from commit da1ac36 which added current_cert to WOLFSSL_X509_STORE_CTX, but is only required for ASIO compatibility and is not used.
2018-08-06 11:40:35 -07:00
David Garske
30d6c0c1fc
Merge pull request #1737 from ejohnstown/ocsp-free
...
OCSP Free
2018-08-06 09:08:01 -07:00
Jacob Barthelmeh
30e787b10c
create buffer with structure copy and set fd after close
2018-08-03 16:46:15 -06:00
Jacob Barthelmeh
7726786998
fix comment and remove duplicate free
2018-08-03 15:04:37 -06:00
David Garske
738a121d61
Merge pull request #1740 from ejohnstown/null-check
...
NULL Check
2018-08-03 13:53:53 -07:00
toddouska
b88d60ecbb
Merge pull request #1665 from ejohnstown/mr
...
Prime Number Testing
2018-08-03 12:50:27 -07:00
John Safranek
f6a8a2f5bd
NULL Check
...
When using the async option, the RSA key is checked on the first call to
DoTls13CertificateVerify() when the async state machine is set up. On
the subsequent call, the pointer to the key isn't checked again. Added a
check. (This was from a static analysis report.)
2018-08-03 11:09:43 -07:00
John Safranek
368b5b1072
Merge pull request #1729 from kaleb-himes/init-array
...
Initialize array to zero(s)
2018-08-02 16:33:37 -07:00
John Safranek
f45dbed8f9
OCSP
...
1. Modify the other OCSP Stapling scripts to better manage the OCSP responder.
2. Modify the client's W option to take:
- 1 for Stapling v1
- 2 for Stapling v2
- 3 for Stapling v2 MULTI
3. Modify the client to disallow stapling v2 with TLSv1.3.
2018-08-02 16:25:38 -07:00
David Garske
a43d4d16ba
Merge pull request #1719 from MJSPollard/OpenSSLAllFix
...
Added boost define and openssl bug fix with WOLFSSL_KEY_GEN
2018-08-02 15:20:27 -07:00
David Garske
a915c3a381
Merge pull request #1738 from ejohnstown/DH
...
DH SP Fix
2018-08-02 15:04:33 -07:00
Kaleb Himes
660c3300e1
Merge pull request #1730 from dgarske/dertoc
...
Added handy script for converting DER file to C array
2018-08-02 15:54:15 -06:00
John Safranek
5ae45436f4
OSCP
...
1. Added a missed attr files for the OSCP status files. Bare minimum attr.
2. Added the attr files to the automake include.
3. Fix out of bounds read with the OCSP URL.
2018-08-02 14:50:59 -07:00
JacobBarthelmeh
782ea74fbf
Merge pull request #1732 from kojo1/Ticket-4169-2
...
Ticket 4169: eliminate ssl->CBIORecv/Send overwritten in SSL_set_bio
2018-08-02 14:58:25 -06:00
JacobBarthelmeh
99b556c07d
Merge pull request #1735 from embhorn/zd4179
...
Fix for resource leak
2018-08-02 14:27:04 -06:00
John Safranek
c71f730d67
OSCP
...
1. Made killing the OCSP server process more reliable.
2. Added attr files for the OSCP status files. Bare minimum attr.
3. Added a NL to the error string from the client regarding external tests.
2018-08-02 11:32:36 -07:00
kaleb-himes
ddec878152
Disable external tests for OCSP scripts
2018-08-02 10:03:47 -06:00
Eric Blankenhorn
b248af6f84
Update from review
2018-08-02 10:59:07 -05:00
kaleb-himes
a178764a8b
Portability and self-cleanup changes to ocsp test scripts
2018-08-02 09:47:13 -06:00
kaleb-himes
93c2f3b170
Initialize array to zero(s)
2018-08-02 09:21:09 -06:00
Takashi Kojo
fd75f35801
fix cbioFlag check
2018-08-02 10:18:09 +09:00
John Safranek
6527c2a724
DH SP Fix
...
When doing the sp_2048_mod_exp_*() is processed, one of the index
variables is masked with 0x1f when it was updated. Added the masking to
the initial set of the index.
2018-08-01 16:32:22 -07:00
John Safranek
c87d6b27e2
OCSP Free
...
Free the OCSP request when creating the response only if there is an error making the request.
2018-08-01 15:34:43 -07:00
David Garske
0ccdefb8d0
Merge pull request #1733 from ejohnstown/des-iv
...
Fix DES IV value
2018-08-01 14:57:26 -07:00
John Safranek
7647d52d77
Prime Number Testing
...
1. Remove a copy-paste error when clearing up the RNG used to test a prime.
2. Tag a some const test values as static in the wolfCrypt test.
2018-08-01 14:49:06 -07:00
JacobBarthelmeh
244d931e75
Merge pull request #1721 from kaleb-himes/cleanup-debug
...
Cleanup debug errors
2018-08-01 15:01:25 -06:00
Eric Blankenhorn
ba2f0fd8fc
Fix for zd4179, 4181, 4182
2018-08-01 15:56:15 -05:00
John Safranek
5ca2ff187b
DES IV
...
Change the DES_IV_SIZE back to 8 bytes, rather than 16.
DES/DES3 was passing the wolfCrypt test becuase the main DES code uses
the DES_BLOCK_SIZE when handling the IV. The TLS/SSL code uses the
DES_IV_SIZE when generating the session keys.
2018-08-01 13:08:52 -07:00
Takashi Kojo
98f6ae16ca
copy cbioFlag from ctx to ssl
2018-08-02 04:48:39 +09:00
toddouska
8bc5bc227d
Merge pull request #1634 from ejohnstown/gcc-8-fixes
...
GCC-8 String Fixes
2018-08-01 12:13:10 -07:00
toddouska
da096497e0
Merge pull request #1727 from dgarske/memdocs
...
Documented memory build options
2018-08-01 12:12:34 -07:00
Jacob Barthelmeh
ce5e787afc
formating and sanity check on pointer with test case
2018-08-01 11:57:36 -06:00
David Garske
dba8131b19
Merge pull request #1731 from ejohnstown/redundant-cert
...
redundant certificate fix
2018-08-01 10:42:30 -07:00
David Garske
a72cbcf8eb
Merge pull request #1726 from ejohnstown/memcb-test
...
memory callback test fix
2018-08-01 10:05:14 -07:00
JacobBarthelmeh
cb756397b3
inital AES-CBC with af_alg
...
progress on AES-GCM with AF_ALG and add SHA256
add aes-gcm test cases and finish logic of aes-gcm with AF_ALG
formating of tabs and white space
add files to dist
adding ecb and ctr mode with af_alg
make length of buffers for ctr be AES_BLOCK_SIZE
formating and add support for sha256 copy/gethash
sanity checks on arguments
cast return values and valgrind tests
make it easier to use sha256 with af_alg
remove hard tabs
add endif for after rebase
2018-08-01 08:54:20 -06:00
Takashi Kojo
96c1a567f0
#4169 : CBIO set flag to escape from overwritten in SSL_set_bio
2018-08-01 19:16:42 +09:00
John Safranek
61ac7315e2
a certificate was named in an automake include that isn't actually in the tree, a similar named certificate is actually used
2018-07-31 17:25:35 -07:00
David Garske
72aef0ab11
Added handy script for converting DER file to C array. Example: ./scripts/dertoc.pl ./certs/server-cert.der server_cert_der_2048 server-cert.c.
2018-07-31 15:57:02 -07:00
John Safranek
f5b3de6b54
GCC-8 string fixes
...
1. Found one more case where a string is copied, potentially without the null. In wc_ports w.r.t. directory and file names.
2018-07-31 14:02:44 -07:00
John Safranek
7053830628
GCC-8 string fixes
...
Fix for the Windows directory search code.
2018-07-31 14:02:44 -07:00
John Safranek
af89458af0
GCC-8 string fixes
...
1. strncpy needs to include the source string's NULL.
2. Deleted a few redundant string modifications.
2018-07-31 14:02:44 -07:00
John Safranek
ed208efc4d
GCC-8 string fixes
...
1. Modify wolfSSL_get_ciphers() to limit the XSTRNCPY based on the dst buf length, not the src string.
2018-07-31 14:02:44 -07:00
John Safranek
2e1a1681ec
GCC-8 string fixes
...
1. strncat() does not like to copy single byte strings with "n = 1", as it won't null-terminate.
2. strncpy()'s len parameter is the size of the dst not the src.
3. Replaced the echoserver HTTP response composition of const strings with a copy of a single string.
2018-07-31 14:02:44 -07:00
John Safranek
50372b7033
Memory Callback
...
1. Allow SetAllocators to use NULL as a callback. Memory wrappers will use default with NULL.
2. Remove the ResetAllocators function. Use SetAllocators with NULL.
3. Modify memory tracker to save the old allocators on init and restore them on cleanup.
2018-07-31 09:30:03 -07:00
David Garske
0e1588f4ad
Documented memory build options. Added logging for normal wolf malloc/free opterations when using WOLFSSL_DEBUG_MEMORY and WOLFSSL_DEBUG_MEMORY_PRINT (previously only worked with WOLFSSL_STATIC_MEMORY and WOLFSSL_TRACK_MEMORY). Changed WOLFSSL_MALLOC_CHECK option to use WOLFSSL_MSG.
2018-07-31 09:03:40 -07:00
kaleb-himes
fe08b98117
Adjust guards following peer review
2018-07-31 09:50:44 -06:00
David Garske
2b3f94944d
Merge pull request #1723 from kaleb-himes/overhead-avoidance
...
avoid overhead call to alloc and free when sigSz invalid
2018-07-31 08:14:49 -07:00
toddouska
f18351fef5
Merge pull request #1718 from dgarske/memtest
...
New memory testing feature and fixes for null checks
2018-07-31 07:56:29 -07:00
toddouska
f5bd376450
Merge pull request #1720 from dgarske/stsafe_wolf
...
Added STM32L4/ST-Safe support. Fixes for AES CBC Decrypt w/CubeMX
2018-07-31 07:41:49 -07:00
David Garske
0f86494161
* Added support for STM32L4 AES hardware crypto.
...
* Added reference PK callbacks functions for ECC sign, verify and shared secret used by TLS in `wolfcrypt/src/port/st/stsafe.c`.
* Fix for wolfcrypt_test to not require args to be provided.
* Fix for wolfCrypt `ecc_test_buffers` to poperly init ecc_key (resolves devId issue).
* Fix for STM32 AES CBC Decrypt with CubeMX, which was not capturing the first input block for next IV.
* Refactor to combine STM32 hardware init code.
2018-07-30 13:58:19 -07:00
David Garske
656c0453a2
Fix for unit test abort().
2018-07-30 13:53:54 -07:00
David Garske
6a91fbcfdd
Fixes for warnings from Jenkins reports.
2018-07-30 13:53:54 -07:00
David Garske
4eff7b641b
First pass at bugs found with ./scripts/memtest.sh. Fixes for NULL pointer checks, making sure free'd pointers are reset, making sure pointers are initialized and making sure memory is always free'd. Fix for TicketInit() which was using non-thread safe RNG and key_ctx. Fix for possible double free case in wolfSSL_PEM_read_X509_CRL.
2018-07-30 13:53:54 -07:00
David Garske
6ed6876b1f
Enhanced the --enable-memtrack option to keep list of pointers allocated and reports leaked memory at end. Cleanup of the wolfCrypt_Init and wolfCrypt_Cleanup calls in unit.test and SrpTest memory tracking feature.
2018-07-30 13:53:54 -07:00
David Garske
2c3475c1d6
Added new build option --enable-memtest or WOLFSSL_FORCE_MALLOC_FAIL_TEST which enables random malloc failures for testing. This test supresses the abort() calls to detect seg faults. A new script ./scripts/memtest.sh starts the test. If an issue is found it can be reviewed with the ./scripts/memtest.txt log and reproduced using the seed printed at top of unit test as --- RNG MALLOC FAIL AT 295--- and rerun using ./tests/unit.test 295.
2018-07-30 13:53:35 -07:00
toddouska
62cb69ded6
Merge pull request #1724 from dgarske/pemtoder
...
Added API's to expose alloc/free of DerBuffer and new unit tests
2018-07-30 13:50:19 -07:00
toddouska
335f467b8c
Merge pull request #1714 from dgarske/pic32hashleak
...
Fixes for PIC32MZ hash memory leak
2018-07-30 13:48:59 -07:00
David Garske
50115e55b3
Merge pull request #1725 from kaleb-himes/USER_CONF_SIZES
...
Allow users to adjust upper bounds
2018-07-30 13:44:58 -07:00
kaleb-himes
ec238c0553
Allow users to adjust upper bounds
2018-07-30 13:44:40 -06:00
Chris Conlon
c71d8eb6ba
Merge pull request #1653 from Naruto/feature/mynewt
...
port apache mynewt
2018-07-30 13:33:25 -06:00
Chris Conlon
1079b0e3b3
Merge pull request #1716 from cariepointer/osp/haproxy
...
Define functions required by HAProxy and enable SSLV3 dependency
2018-07-30 13:26:38 -06:00
David Garske
0ef63048a0
Fix for new report in wc_BerToDer with uninitialized derSz.
2018-07-30 11:51:26 -07:00
David Garske
309d7a9d0d
Added API's to expose alloc/free of DerBuffer using wc_AllocDer and wc_FreeDer. Added unit tests for new API's and missing ones for wc_PemToDer and wc_CertPemToDer. ZD 4185.
2018-07-30 11:19:59 -07:00
Kaleb Himes
d19b78d81a
Fix typo in comment
2018-07-30 12:17:55 -06:00
kaleb-himes
166330030c
Handle case where external unassigned
2018-07-29 06:46:07 -06:00
Naruto TAKAHASHI
861fec1dc6
porting mynewt
2018-07-28 18:03:20 +09:00
kaleb-himes
0ee4b88e74
avoid overhead call to alloc and free when sigSz invalid
2018-07-27 16:25:10 -06:00
John Safranek
4b8507813e
Prime Number Testing
...
1. Also disable the new prime test from TLS while using SELFTEST.
2018-07-27 13:34:38 -07:00
kaleb-himes
afb2180e80
Cleanup debug errors
2018-07-27 14:00:19 -06:00
Kaleb Himes
04e16b8df8
Merge pull request #1717 from JacobBarthelmeh/Testing
...
sanity check on pkcs8 variable
2018-07-27 13:33:55 -06:00
MJSPollard
543cac65d8
Added boost define and openssl bug fix with WOLFSSL_KEY_GEN
2018-07-27 12:42:09 -06:00
Jacob Barthelmeh
74c4d31c07
sanity check on pkcs8 variable
2018-07-27 11:16:41 -06:00
John Safranek
31f1692cbf
Prime Number Testing
...
1. Disable the new prime test from TLS while using FIPS or setting the flag WOLFSSL_OLD_PRIME_CHECK.
2018-07-26 16:01:08 -07:00
John Safranek
4b2a591a93
Prime Number Testing
...
1. Added calls to wc_DhSetCheckKey() on the client side of TLS.
2. Added an API test to the wolfCrypt test.
3. Fixed a bug in the prime test found with the API test. Misuse of tertiary operator.
2018-07-26 14:43:04 -07:00
David Garske
efbabbfb29
Further improvements to hashing code to make sure wc_*Free is always called including wc_HashFree. Added new defines to disable PIC32MZ hardware features using NO_PIC32MZ_HASH, NO_PIC32MZ_RNG and NO_PIC32MZ_CRYPT.
2018-07-26 14:41:30 -07:00
Carie Pointer
a1f69f0d64
Define functions required by HAProxy and enable SSLV3 dependency
2018-07-26 12:53:21 -07:00
toddouska
90367df13c
Merge pull request #1710 from SparkiDev/ed25519_only
...
Changes to build with X25519 and Ed25519 only
2018-07-25 14:24:03 -07:00
toddouska
84c1b633fb
Merge pull request #1713 from JacobBarthelmeh/UnitTests
...
fix buffer types for ARC4 test
2018-07-25 14:17:10 -07:00
David Garske
92cb8f06ea
Fixes to make sure hash free is always called (resolves memory leaks with PIC32MZ hashing hardware). Only print Alloc/Free messages with track memory when WOLFSSL_DEBUG_MEMORY_PRINT is defined. Added test for ForceZero with 0 length.
2018-07-25 11:22:03 -07:00
David Garske
beceab2734
Fix for leak with WOLFSSL_PIC32MZ_HASH and TLS. The PIC32 update cache buffer was not always being free'd.
2018-07-25 11:22:03 -07:00
JacobBarthelmeh
74fbd06817
Merge pull request #1686 from cconlon/nucleus-update
...
Nucleus port and PB changes
2018-07-25 09:17:40 -06:00
Jacob Barthelmeh
003b7b28f4
fix buffer types for ARC4 test
2018-07-24 17:37:39 -06:00
toddouska
fe2aee11d8
Merge pull request #1712 from JacobBarthelmeh/Testing
...
check if internal of WOLFSSL_RSA struct is already set
2018-07-24 11:55:15 -07:00
toddouska
17c7ecb2bc
Merge pull request #1711 from dgarske/memtrack
...
Fix for memory tracking cleanup
2018-07-24 11:53:08 -07:00
toddouska
169cca355f
Merge pull request #1705 from cconlon/truestudio-project
...
Add wolfSSL library project for Atollic TrueSTUDIO
2018-07-24 11:52:11 -07:00
toddouska
018573bcf3
Merge pull request #1695 from JacobBarthelmeh/Optimizations
...
add some macro guards for CipherRequires function
2018-07-24 11:51:03 -07:00
Chris Conlon
0175447eb3
tie TRUESTUDIO files into include.am
2018-07-24 09:36:49 -06:00
Jacob Barthelmeh
f69c6e382c
check if internal of WOLFSSL_RSA struct is already set
2018-07-23 17:17:27 -06:00
toddouska
92bc891713
Merge pull request #1709 from SparkiDev/rsa_low_mem_fix
...
Fix for RSA_LOW_MEM and other configurations
2018-07-23 16:15:28 -07:00
toddouska
e618f34c2f
Merge pull request #1707 from kaleb-himes/ARM_GCC_EX_FIXES
...
Fixes for building without DRBG and ForceZero test
2018-07-23 16:14:43 -07:00
David Garske
ef076a68d3
Added new API wolfSSL_ResetAllocators to allow reset of memory callbacks to defaults. Added new CleanupMemoryTracker which restores memory callback functions. This resolves issue with trying to free memory allocated prior to InitMemoryTracker.
2018-07-23 16:03:08 -07:00
toddouska
ab3ffaa26a
Merge pull request #1706 from SparkiDev/sha384_not_sha512
...
Allow SHA384 to be compiled in without SHA512
2018-07-23 09:47:49 -07:00
Chris Conlon
69aa74d220
Merge pull request #1708 from ejohnstown/config-fix
...
Configure Fix
2018-07-23 10:43:12 -06:00
Sean Parkinson
6d3e145571
Changes to build with X25519 and Ed25519 only
...
Allows configurations without RSA, DH and ECC but with Curve25519
algorithms to work with SSL/TLS using X25519 key exchange and Ed25519
certificates.
Fix Ed25519 code to call wc_Sha512Free().
Add certificates to test.h and fix examples to use them.
2018-07-23 10:20:18 +10:00
Sean Parkinson
06b888a997
Fix for RSA_LOW_MEM and other configurations
...
Also cast return of XMALLOCs.
2018-07-23 08:47:11 +10:00
John Safranek
3957bb4ebe
Configure Fix
...
1. The check for options that start with an underscore to wrap them with another check was broken. Replaced with a use of grep. The old original version breaks on some shells.
2018-07-20 15:14:03 -07:00
kaleb-himes
c432bb5e82
Revert back to no tests for test.h consideration
2018-07-20 14:41:46 -06:00
kaleb-himes
887e3deee8
Move ForceZero test to api.c and turn on tests when inline disabled
2018-07-20 13:30:06 -06:00
kaleb-himes
027f18919a
Resolving some unwanted dependencies
2018-07-20 11:54:36 -06:00
Chris Conlon
7f19f914c0
create WOLFSSL_NUCLEUS_1_2 for older 1.2 version
2018-07-20 10:51:15 -06:00
David Garske
d54c7a7df8
Merge pull request #1704 from quinnmiller1997/crossworks
...
Added support for Jenkins testing in Rowley Crossworks
2018-07-20 08:15:16 -07:00
Sean Parkinson
9433fcb820
Allow SHA384 to be compiled in without SHA512
2018-07-20 09:42:01 +10:00
David Garske
c5a44c083a
Merge pull request #1703 from cconlon/truestudio
...
Fix Atollic TrueSTUDIO warning, add WOLFSSL_STM32F427_RNG
2018-07-19 15:59:11 -07:00
Chris Conlon
b6ac3379f0
add wolfSSL library project for Atollic TrueSTUDIO
2018-07-19 16:06:42 -06:00
Quinn Miller
6d0c49a425
Added support for Jenkins testing in Rowley Crossworks
2018-07-19 15:34:28 -06:00
David Garske
59f241e510
Merge pull request #1702 from ejohnstown/fips-ecc
...
FIPS build and ECC fixes
2018-07-19 13:56:03 -07:00
JacobBarthelmeh
a58d1cf030
Merge pull request #1655 from MJSPollard/wolfASIO
...
Added wolfSSL compatability for Asio C++ library
2018-07-19 13:44:07 -06:00
MJSPollard
19dd08e191
requested style changes
2018-07-19 11:05:56 -06:00
John Safranek
c9434c5ad8
FIPS build and ECC fixes
...
1. The fips-check script was missing the ecc file when building the FIPSv2 test directory. The correct file was sent in for testing.
2. When building with ECC import validation enabled, one usage of the ALLOC_CURVE_SPECS macro had an extra parameter. (copy-and-paste error)
2018-07-19 10:02:14 -07:00
Chris Conlon
213f79f06f
only require Nucleus XTIME when NO_ASN_TIME is not defined
2018-07-19 10:47:37 -06:00
MJSPollard
42985d8250
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into wolfASIO
2018-07-19 10:26:54 -06:00
Chris Conlon
5c940351b7
add include for task.h for FREERTOS in benchmark.c
2018-07-18 16:52:16 -06:00
Chris Conlon
5b9fbb5d42
add WOLFSSL_STM32F427_RNG support
2018-07-18 16:44:30 -06:00
Chris Conlon
27b7791f5e
fix TrueSTUDIO warning in PKCS12_create_key_bag()
2018-07-18 16:15:33 -06:00
MJSPollard
da1ac3643f
added current_issuer member in X509_STORE_CTX struct for SSF use
2018-07-18 16:01:16 -06:00
David Garske
70dfb9af72
Merge pull request #1700 from embhorn/zd4110
...
Move #if blocking wc_PubKeyPemToDer
2018-07-18 12:33:01 -07:00
MJSPollard
0dbd35ae01
websocketpp compat. addition, add new define for asio
2018-07-18 12:09:12 -06:00
MJSPollard
db8939c578
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into wolfASIO
2018-07-18 11:10:35 -06:00
toddouska
227e7cc8c7
Merge pull request #1690 from SparkiDev/tls_sha384_copy
...
Remove special case SHA-384 copy code
2018-07-18 09:37:50 -07:00
toddouska
aa2d6f8060
Merge pull request #1699 from dgarske/ecc508a_pkcb
...
Added reference PK callbacks for ATECC508A to support TLS
2018-07-18 09:35:58 -07:00
toddouska
436e774729
Merge pull request #1685 from SparkiDev/dh_max
...
Add support for maximum DH key size
2018-07-18 09:33:43 -07:00
David Garske
52aac6e641
Merge pull request #1697 from embhorn/zd4060
...
Dead code in wolfSSL_BIO_gets()
2018-07-18 09:22:35 -07:00
Eric Blankenhorn
0c59aa8e31
Move #if blocking wc_PubKeyPemToDer
2018-07-18 11:15:06 -05:00
John Safranek
17d5b6a42b
Merge pull request #1694 from SparkiDev/stack_ecc
...
Small stack support in ECC
2018-07-18 08:57:35 -07:00
David Garske
ebdfe9715e
Merge pull request #1698 from SparkiDev/ed25519_def
...
Fix define protection to be ED25519 not ECC
2018-07-17 20:05:47 -07:00
David Garske
74c391d138
Added reference PK callbacks (HAVE_PK_CALLBACKS) for ATECC508A device for wolfSSL TLS.
2018-07-17 19:02:56 -07:00
Sean Parkinson
0236a293e4
Fix define protection to be ED25519 not ECC
2018-07-18 10:12:57 +10:00
Sean Parkinson
ce092a96a2
Change default maximum to 4096 bits.
2018-07-18 08:40:43 +10:00
David Garske
a862ef860b
Merge pull request #1696 from quinnmiller1997/crossworks
...
Updated Rowley-Crossworks settings for CMSIS 4, added support for Jenkins testing
2018-07-17 13:32:34 -07:00
toddouska
1840ae7013
Merge pull request #1693 from SparkiDev/stack_rsa
...
Small stack fixes and ignore RSA fields in RSA_LOW_MEM
2018-07-17 12:24:00 -07:00
Eric Blankenhorn
6a6f5d01b4
Fix for zd4060
2018-07-17 14:20:14 -05:00
toddouska
f693c9cc8b
Merge pull request #1692 from SparkiDev/stack_hashalgs
...
Stack hashalgs
2018-07-17 12:20:02 -07:00
toddouska
96567112cd
Merge pull request #1691 from SparkiDev/stack_dh_tls
...
Small stack fixes
2018-07-17 12:15:26 -07:00
Chris Conlon
8fed6dfb27
Merge pull request #1687 from cariepointer/openssh-des3
...
Update configure to enable des3 when building OpenSSH
2018-07-17 12:03:18 -06:00
Quinn Miller
1766b69de2
Added suppport for Jenkins testing on FRDM-K64F and updated README
2018-07-17 11:30:33 -06:00
David Garske
d6c9d30aee
Merge pull request #1689 from ejohnstown/atomic-dtls
...
DTLS and Atomic Encrypt Callback
2018-07-17 09:37:50 -07:00
JacobBarthelmeh
eebbe0239a
Merge pull request #1683 from kaleb-himes/SGX_STATIC_LIB_FIX
...
Update SGX Static lib solution, solve through settings.h
2018-07-17 10:22:14 -06:00
Jacob Barthelmeh
7e5bf9b8a9
add some macro guards for CipherRequires function
2018-07-17 09:04:06 -06:00
Sean Parkinson
e6c22fbd85
Small stack support in ECC
...
Small stack builds now dynamically allocate large stack variables.
Cache option added to avoid repeated allocation of temporaries in add
points, double point and map.
Cached memory allocated in mulmod and mul2add.
2018-07-17 16:39:53 +10:00
Sean Parkinson
c01c79349e
Small stack fixes and ignore RSA fields in RSA_LOW_MEM
...
Fix asn.c and rsa.c small stack to not have large stack variables.
In RSA code don't load or store dP, dQ or u when using RSA_LOW_MEM as
they are not used.
Fix SP to recognize RSA_LOW_MEM means to use d, private exponent.
Fix wc_CheckRsaKey to work with SP.
Fix sp_int to support mp_set_int for wc_CheckRsaKey().
2018-07-17 11:05:38 +10:00
Sean Parkinson
befe15ddb9
Add configure option to cache when using small stack
2018-07-17 09:36:49 +10:00
Sean Parkinson
6ef800e5f7
Cache Sha256 for small stack when asked in random
...
Small stack builds see SHA-256 allocating W a lot.
Cache the SHA-256 object in DRBG when WOLFSSL_SMALL_STACK_CACHE is
defined.
Call free function on SHA-256 object now that it is required.
2018-07-17 09:33:24 +10:00
Sean Parkinson
88a2531652
Cache the data allocated in SHA-2 Transform functions
...
SHA-2 algorithms allocate W each call to transform when using
WOLFSSL_SMALL_STACK.
Put a pointer into the SHA-2 object to cache W.
Change code to call the SHA-2 Free functions now that they are required.
Only cache when WOLFSSL_SMALL_STACK_CACHE is defined.
2018-07-17 09:17:39 +10:00
Sean Parkinson
514a949557
Small stack fixes
...
Changes to DH and SSL/TLS code to dynamically allocate large stack
variables when compiled with WOLFSSL_SMALL_STACK.
2018-07-17 09:04:00 +10:00
Sean Parkinson
87f378efb5
Remove special case SHA-384 copy code
...
SHA-384 implementation has a GetHash API and TLS code uses it.
2018-07-17 08:16:46 +10:00
John Safranek
49fefe176e
DTLS and Atomic Encrypt Callback
...
When using the encrypt callback, the DTLS sequence number isn't incremented. Moved the increment to later in the BuildMessage() function.
2018-07-16 13:33:03 -07:00
Carie Pointer
ea769b831c
Fix tab indentation
2018-07-16 13:09:45 -07:00
Carie Pointer
dbe0ac6fec
Update configure to enable des3 when building OpenSSH
2018-07-16 09:49:23 -07:00
John Safranek
00fd7ff8de
Prime Number Testing
...
1. Added some new ifdef clauses to tfc and integer so that
the prime checking is available when using RSA, DSA, or DH.
A couple functions used were dependent on ECC being enabled.
2018-07-13 17:42:35 -07:00
toddouska
f0422bec41
Merge pull request #1681 from dgarske/pk_keygen
...
Added ECC and Curve25519 Key Generation PK callback support
2018-07-13 14:03:13 -07:00
Chris Conlon
f59fb0df8e
add custom print to test.c for PB
2018-07-13 14:58:48 -06:00
Chris Conlon
eeb50099d9
initial Nucleus port with PB changes
2018-07-13 14:58:37 -06:00
toddouska
1337f7ddec
Merge pull request #1674 from dgarske/derchainsz
...
Fix for max cert chain size calculation
2018-07-13 13:53:35 -07:00
kaleb-himes
ddd6563442
Dependencies for SGX project updated
2018-07-13 13:18:15 -06:00
toddouska
6c1778d373
Merge pull request #1669 from cconlon/mqxfixes
...
fixes for MQX classic 4.0 with IAR-EWARM
2018-07-13 11:59:28 -07:00
toddouska
223c71b96c
Merge pull request #1673 from ejohnstown/configure-update
...
Yet Another Configure Update
2018-07-13 11:55:08 -07:00
David Garske
0a19dc0940
Don't run new cert chain test if RSA is disabled (test chain contains RSA certs).
2018-07-13 11:41:06 -07:00
David Garske
2f00c0b465
Added test case for new server ECDHE PK callback.
2018-07-13 10:45:36 -07:00
JacobBarthelmeh
71d8946ee6
Merge pull request #1678 from cariepointer/osp/openssh
...
Move function prototypes from wolfss/ssl.h and openssl/ssl.h to appropriate header files for OpenSSH compatibility
2018-07-13 10:05:18 -06:00
Eric Blankenhorn
9bc0e0c4fc
Static analysis fixes ( #1658 )
...
* Static analysis fixes
* Fixes for zd4071, zd4074, zd4093-zd4094, zd4096, zd4097-zd4104.
* Add test cases.
2018-07-13 09:02:09 -07:00
JacobBarthelmeh
f22f33606a
Merge pull request #1684 from ejohnstown/distcheckfix
...
add missing certificates to the automake include
2018-07-13 09:41:10 -06:00
Sean Parkinson
ffc6cf4eb8
Add support for maximum DH key size
2018-07-13 17:36:42 +10:00
John Safranek
771e349925
Prime Number Testing
...
1. Moved a few functions around in tfm.c and integer.c.
2. Added some new ifdef clauses to tfc and integer so that the prime checking is available when using RSA, DSA, or DH.
3. Added an internal version of function wc_DhSetKey and wc_DsaImportParamsRaw that always checks to see if the prime value is prime. Modified the original function to be a wrapper.
2018-07-12 17:22:44 -07:00
John Safranek
0240cc7795
add missing certificates to the automake include
2018-07-12 17:06:02 -07:00
John Safranek
997a377310
Prime Number Testing
...
1. In wc_DhGenerateParams(), changed the call to mp_prime_is_prime() to
mp_prime_is_prime_ex().
2. In wc_MakeDsaParameters(), changed the call to mp_prime_is_prime() to
mp_prime_is_prime_ex().
3. Added wc_CheckProbablePrime_ex in RSA that also takes an RNG to call
mp_prime_is_prime_ex(). If RNG is NULL, call mp_prime_is_prime().
4. Rewrite wc_CheckProbablePrime() in terms of
wc_CheckProbablePrime_ex().
2018-07-12 15:00:13 -07:00
Carie Pointer
7d5da4d122
Fix typo in function name
2018-07-12 14:40:46 -07:00
David Garske
0ce6cbd4c4
Added API unit test for wolfSSL_CTX_use_certificate_chain_file_format.
2018-07-12 13:22:21 -07:00
kaleb-himes
1b965491d9
Solve through settings.h instead
2018-07-12 14:09:57 -06:00
John Safranek
f7c5b27bfc
Merge pull request #1675 from toddouska/zero-error
...
make SOCKET_PEER_CLOSED_E consistent between read and 2 write cases
2018-07-12 12:53:48 -07:00
Chris Conlon
cadd556b3a
cast result of bitwise not back to original type to prevent compiler warnings
2018-07-12 13:46:55 -06:00
David Garske
eeece1df1e
Fix for duplicate declaration of EccMakeKey.
2018-07-12 12:13:10 -07:00
David Garske
81d13e15d5
Added ECC and Curve25519 Key generation callback support for HAVE_PK_CALLBACKS. The TLS server side ECDHE could not correctly handle PK callback based shared secret calculation using a hardware based generated key. Refactor internal functions to use the callback ctx getter API.
2018-07-12 11:52:54 -07:00
John Safranek
d486df50aa
fix an error where mp_copy was used instead of mp_sub_d
2018-07-12 11:03:41 -07:00
MJSPollard
93d7891701
Added different tls version support for asio
2018-07-12 11:59:58 -06:00
MJSPollard
d8dff3e4de
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into wolfASIO
2018-07-12 11:57:34 -06:00
David Garske
40d0e7f711
Merge pull request #1677 from ejohnstown/gcc-arm-update
...
GCC-ARM README Update
2018-07-12 10:27:07 -07:00
Carie Pointer
c1af8d2190
Move function prototypes from wolfss/ssl.h and openssl/ssl.h to appropriate header files for OpenSSH compatibility
2018-07-12 08:13:51 -07:00
John Safranek
5908230d20
Prime Number Testing
...
1. Fixed variable name typo in DH for the FFDHE 8192-bit q value.
2. Updated some error strings in wolfSSL_BN_is_prime_ex().
3. Changed the calls to mp_prime_is_prime_ex() in fp_randprime() and
mp_randprime() so they go back to the 8 rounds of MR, which is more than
adequate in this situation.
2018-07-11 16:24:41 -07:00
John Safranek
2f638a0ae1
GCC-ARM README Update
...
Added directions for building wolfSSL using the gcc-arm-none-eabi tools.
2018-07-11 16:05:02 -07:00
toddouska
23687f44bc
Merge pull request #1643 from ejohnstown/altnames
...
Subject Alt Name Matching
2018-07-11 13:20:58 -07:00
Todd Ouska
d639939a07
make SOCKET_PEER_CLOSED_E consistent between read and 2 write cases
2018-07-11 13:00:29 -07:00
David Garske
05cfeae3ce
Fix for handling max cert chain size. It was not accounting for the 3 byte header in max size calculation.
2018-07-11 12:32:49 -07:00
John Safranek
eb32935081
Configure Update
...
1. Fix typo.
2. Change the parsing of the -D options to be more POSIX friendly.
Removed the "==" and replaced the multi escaped [] with a test command.
2018-07-11 12:01:05 -07:00
Chris Conlon
0f2b5ca181
fixes for MQX classic 4.0 with IAR-EWARM
2018-07-11 10:54:24 -06:00
toddouska
df6c496c4e
Merge pull request #1671 from SparkiDev/x25519_asm_fix
...
Fix for Curve25519 ASM
2018-07-11 09:50:57 -07:00
toddouska
c1a9945656
Merge pull request #1670 from JacobBarthelmeh/UnitTests
...
check that fp max bits is large enough before test
2018-07-11 09:49:22 -07:00
Sean Parkinson
9281f30deb
Fix for Curve25519 ASM
...
On rare occasions, multiplication and/or squaring result had top bit set
after overflow add - must to be reduced in that case.
2018-07-11 11:53:53 +10:00
John Safranek
239880a9de
Subject Alt Name Matching
...
1. Removed an external test tag from a failure test case. Ends up leaving a thread still running on exit.
2018-07-10 17:07:48 -07:00
David Garske
e2dec618d8
Merge pull request #1667 from ejohnstown/certgentime
...
Cert Gen Time
2018-07-10 14:40:37 -07:00
John Safranek
0e06f6413d
Prime Number Testing
...
1. Update the function wolfSSL_BN_is_prime_ex to use mp_prime_is_prime_ex.
2. Modified fast and normal mp_prime_is_prime_ex() to use random numbers
that are in the range 2 < a < n-2.
2018-07-10 14:30:53 -07:00
Chris Conlon
9ca5c65f33
Merge pull request #1645 from abrahamsonn/doxygen-appearance-fix
...
Doxygen appearance fix
2018-07-10 15:27:07 -06:00
Jacob Barthelmeh
58478c50af
check that fp max bits is large enough before test
2018-07-10 15:09:47 -06:00
MJSPollard
4cbae0bca3
changes to make jenkins tests work
2018-07-10 13:34:16 -06:00
MJSPollard
3fc7424e03
implemented requested changes
2018-07-10 11:52:41 -06:00
MJSPollard
d361a1aebd
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into wolfASIO
2018-07-10 11:04:53 -06:00
John Safranek
f1c3098bdc
Prime Number Testing
...
Made modifications to the primality testing so that the Miller-Rabin tests check against up to 40 random numbers rather than a fixed list of small primes.
2018-07-09 16:33:26 -07:00
toddouska
87499aa7bd
Merge pull request #1668 from ejohnstown/ignore-file
...
Ignore File
2018-07-09 11:18:44 -07:00
toddouska
376a4d3ca8
Merge pull request #1666 from dgarske/fix_always_verify
...
Fix for building with `WOLFSSL_ALWAYS_VERIFY_CB`
2018-07-09 11:13:28 -07:00
toddouska
90cf4ad7ad
Merge pull request #1648 from embhorn/pkcb
...
Add PK_CALLBACK support for RSA/ECC verify to ConfirmSignature
2018-07-09 11:05:48 -07:00
David Garske
9c2a5d2906
Further simplification of the PK verify wrapping to avoid malloc/free. Thanks Todd!
2018-07-06 16:21:43 -07:00
John Safranek
ed17963f21
Add fipsv2.c to the gitignore file.
2018-07-06 16:08:16 -07:00
toddouska
2e2a502683
Merge pull request #1659 from ejohnstown/configure-update
...
Configure Update
2018-07-06 16:08:11 -07:00
David Garske
85d58cbf8c
Fix for building with WOLFSSL_ALWAYS_VERIFY_CB.
2018-07-06 15:31:52 -07:00
John Safranek
5cc8771b43
Cert Gen Time
...
When generating the times for a generated certificate, calculate the
time differences based on the seconds from epoch rather then converting
back and forth between tm structures. One particular RTOS calculates the
date change when generating a certificate on the first of the month. It
leaves the certificate valid on the zeroth of the month.
2018-07-06 15:31:34 -07:00
David Garske
595beb3fec
Fixup for the removal of const.
2018-07-06 09:35:00 -07:00
David Garske
32f1b0a9c2
Added separate context for each SignatureCtx verify callback. Added missing ssl info to callback context.
2018-07-06 09:28:46 -07:00
David Garske
9bf8122af7
Merge pull request #1660 from JacobBarthelmeh/ARMv8
...
adjust macro guards for additional functions
2018-07-06 09:02:35 -07:00
toddouska
8ba4dda8a8
Merge pull request #1663 from dgarske/lib_isolate
...
Cleanup old `WOLFSSL` and `WOLFSSL_CTX` references in wolfCrypt
2018-07-05 16:09:56 -07:00
Eric Blankenhorn
80f98f7ab7
Merge pull request #1664 from JacobBarthelmeh/Testing
...
keep length value after call to wc_BerToDer
2018-07-05 18:05:28 -05:00
David Garske
3cbcc872c1
Improved PK callback support for ConfirmSignature so certificate verification uses the callbacks. Retained wolfSSL/wolfCrypt isolation (I.E. no wolfSSL references from wolfCrypt).
2018-07-05 14:04:06 -07:00
Jacob Barthelmeh
e44cb91a3b
keep length value after call to wc_BerToDer
2018-07-05 14:35:35 -06:00
David Garske
0e8e3b7441
Cleanup old WOLFSSL and WOLFSSL_CTX references in wolfCrypt that are no longer required.
2018-07-05 09:58:47 -07:00
Jacob Barthelmeh
c8e118cd12
adjust macro guards for additional functions
2018-07-03 16:52:29 -06:00
John Safranek
af65a9520a
Configure Update
...
Change the increment of the number of jobservers to be more posixish.
More compatible with HPUX's ksh.
2018-07-03 14:42:51 -07:00
toddouska
ae54bae2fa
Merge pull request #1654 from SparkiDev/tls13_stapling
...
TLS 1.3 OCSP Stapling
2018-07-03 12:56:28 -07:00
Michael Pollard
ad0f775911
Merge branch 'master' into wolfASIO
2018-07-03 11:14:16 -06:00
MJSPollard
ac0b31dee8
refactored and added defines for wolfSSL/Asio Compat
2018-07-03 11:07:15 -06:00
toddouska
f809a6a17b
Merge pull request #1651 from dgarske/pkcs7_dynamic
...
Added PKCS7 dynamic allocation support
2018-07-02 16:26:03 -07:00
toddouska
fbd5a4f67f
Merge pull request #1650 from dgarske/fix_armv8_aes
...
Fix ARMv8 AES code build error
2018-07-02 16:23:32 -07:00
toddouska
77f11a6be9
Merge pull request #1649 from embhorn/zd4043
...
Fix for memory leak in wolfSSL_BN_hex2bn
2018-07-02 16:22:57 -07:00
toddouska
9f35d211e0
Merge pull request #1644 from JacobBarthelmeh/Compatibility-Layer
...
add ca when getting chain from x509 store
2018-07-02 16:22:11 -07:00
toddouska
e17a16a45a
Merge pull request #1600 from dgarske/lighttpd
...
Changes to support Lighttpd 1.4.49
2018-07-02 16:18:41 -07:00
JacobBarthelmeh
df9ed87c5f
Merge pull request #1652 from ejohnstown/dhtestleak
...
Fixed a memory leak in the wolfCrypt test for DH key generation.
2018-07-02 17:05:22 -06:00
Sean Parkinson
52d9803d72
Merge pull request #1657 from JacobBarthelmeh/Testing
...
casts for tls 1.3 windows warnings
2018-07-03 08:25:01 +10:00
John Safranek
adb3cc5a5a
Subject Alt Name Matching
...
1. Added certificates for localhost where the CN and SAN match and differ.
2. Change subject name matching so the CN is checked if the SAN list doesn't exit, and only check the SAN list if present.
3. Added a test case for the CN/SAN mismatch.
4. Old matching behavior restored with build option WOLFSSL_ALLOW_NO_CN_IN_SAN.
5. Add test case for a correct certificate.
Note: The test for the garbage certificate should fail. If you enable the old behavior, that test case will start succeeding, causing the test to fail.
2018-07-02 13:39:11 -07:00
John Safranek
cf191a4d96
Fixed a memory leak in the wolfCrypt test for DH key generation.
2018-07-02 13:31:13 -07:00
Jacob Barthelmeh
201217bd97
casts for tls 1.3 windows warnings
2018-07-02 13:55:38 -06:00
David Garske
2bd4fb110c
Fix additional cases for use of unititlized PKCS isDynmaic in unit test.
2018-07-02 10:24:41 -07:00
MJSPollard
e319987579
Added wolfSSl compatability for Asio C++ library
2018-07-02 10:48:02 -06:00
David Garske
fb3d3dce0e
Fix for use of unititlized PKCS7.isDynamic case in unit test. Added return code checks for wc_PKCS7_Init.
2018-07-02 09:38:14 -07:00
Jacob Barthelmeh
a9ff79e321
check return value
2018-07-02 10:10:30 -06:00
Sean Parkinson
0bf3a89992
TLS 1.3 OCSP Stapling
...
Introduce support for OCSP stapling in TLS 1.3.
Note: OCSP Stapling v2 is not used in TLS 1.3.
Added tests.
Allow extensions to be sent with first certificate.
Fix writing out of certificate chains in TLS 1.3.
Tidy up the OCSP stapling code to remove duplication as much as
possible.
2018-07-02 16:59:23 +10:00
David Garske
3adbb07abe
Comment correction.
2018-06-29 15:07:56 -07:00
David Garske
733cb74ea8
Updated all PKCS7 XMALLOC/XFREE to use heap pointer (even small stack).
2018-06-29 15:05:37 -07:00
David Garske
07401d909c
Added support for dynamic allocation of PKCS7 structure using wc_PKCS7_New and wc_PKCS7_Free. Updated the test examples to use the dynamic method. Add API unit test for wc_PKCS7_New.
2018-06-29 15:04:28 -07:00
toddouska
33b72a3dfe
Merge pull request #1647 from ejohnstown/akid-not-crit
...
Add error case for critical Auth Key ID extension
2018-06-29 10:41:04 -07:00
David Garske
44c4e33290
Fix ARMv8 AES code to use the shared aes.h CTR_SZ and GCM_NONCE_MID_SZ.
2018-06-29 10:22:25 -07:00
Eric Blankenhorn
ebb3eb87d1
Update from review
2018-06-29 11:02:10 -05:00
JacobBarthelmeh
42ece70ff2
Merge pull request #1635 from ejohnstown/rpm-fixes
...
RPM Fixes
2018-06-29 09:44:11 -06:00
Eric Blankenhorn
c6890d518e
Fix resource leak in wolfSSL_BN_hex2bn
2018-06-29 09:44:01 -05:00
toddouska
54f2c3fe18
Merge pull request #1646 from dgarske/stm32l4_iar
...
Added support for the STM32L4 and fixed mixed enum warnings
2018-06-28 15:34:33 -07:00
toddouska
b4da4340a1
Merge pull request #1640 from SparkiDev/tls13_nb
...
Fix non-blocking and buffered I/O
2018-06-28 15:32:42 -07:00
toddouska
ea32f2dbef
Merge pull request #1638 from SparkiDev/nginx-ocsp
...
Fix support for OCSP and Nginx
2018-06-28 15:31:18 -07:00
Jacob Barthelmeh
e204b19923
add statusCb variable to OPENSSL_EXTRA build
2018-06-28 14:36:15 -06:00
John Safranek
6fa92fdd71
Add error case for critical Auth Key ID extension
2018-06-28 13:03:16 -07:00
David Garske
cd2971fb93
Abstracted code for setting options mask to improve wolfSSL_CTX_set_options, so it doesn't require allocating a WOLFSSL object.
2018-06-27 21:30:25 -07:00
David Garske
6dbca2b718
Fix to resolve the increased stack by allocating the temp ssl from the heap.
2018-06-27 19:44:34 -07:00
David Garske
66c2c65444
Changes to support Lighttpd 1.4.49:
...
* Fix for `wolfSSL_CTX_set_options` to work correctly when no certificate has been set for WOLFSSL_CTX, otherwise this operation fails with `Server missing certificate`.
* Fix for bad argument name `time`.
* Fix for `warning: type of bit-field`: Allowed types for bit-fields are int and unsigned int only.
* Exposed `ERR_remove_thread_state` and `SSL_CTX_set_tmp_ecdh` for lighttpd
* Renamed `WOLFSSL_ERR_remove_thread_state` to `wolfSSL_ERR_remove_thread_state` and setup old name macro.
* Add missing newline on asn1.h.
* Whitespace cleanup in ssl.c.
2018-06-27 19:44:34 -07:00
David Garske
7ae9e4359d
Added support for the STM32L4 with AES/SHA hardware acceleration. Fixed a few minor compiler warnings with mis-matched enum types.
2018-06-27 19:40:03 -07:00
Sean Parkinson
abaa5daf43
Fix non-blocking and buffered I/O
...
Fix states in TLS 1.3 connect and accept to be monotonically increasing
by 1.
Always have a new state after a buffer is constructed to be sent.
Add non-blocking support into TLS benchmark and support TLS 1.3.
2018-06-28 08:49:32 +10:00
Sean Parkinson
7fbe1d3049
Fix support for OCSP and Nginx
...
Store DER copy of CA certificate with signer when
WOLFSSL_SIGNER_DER_CERT is defined.
Keep the bad issuer error for later when compiling for OpenSSL
compatability.
Authority Info string needs to be passed back with a nul terminator.
2018-06-28 08:48:06 +10:00
abrahamsonn
f32bd77a1d
Updating appearance
...
In the past, Doxygen just listed API for wolfSSL and wolfCrypt in one long list.
Now there are two separate pages for the wolfSSL and wolfCrypt API references.
2018-06-27 16:29:37 -06:00
abrahamsonn
765d97ae01
1. Trailing whitespace removal
2018-06-27 16:22:12 -06:00
Jacob Barthelmeh
af75145602
adjust macro guards
2018-06-27 16:13:46 -06:00
Chris Conlon
ac3eb470f9
Merge pull request #1642 from ejohnstown/conner-doc-update
...
Doxy Update
2018-06-27 14:37:52 -06:00
Jacob Barthelmeh
c2c209fb89
add ca when getting chain from x509 store
2018-06-27 14:09:32 -06:00
John Safranek
47497f5aaa
Removed stray merge failure marker debris.
2018-06-27 10:40:03 -07:00
connerwolfssl
554275ba71
documentation fix, changes made to x509_print for wolfCLU
2018-06-27 10:29:18 -07:00
connerwolfssl
13b7dad0fa
documentation clean up, added check for asn generalized time
2018-06-27 10:22:47 -07:00
toddouska
5d767aa004
Merge pull request #1641 from ejohnstown/rename-inline
...
Rename INLINE
2018-06-27 09:34:41 -07:00
toddouska
0c74e778dc
Merge pull request #1633 from dgarske/bench_3072
...
Benchmark support for 3072-bit RSA and DH
2018-06-27 07:17:53 -07:00
John Safranek
3572b26bd9
Merge pull request #1636 from JacobBarthelmeh/Testing
...
add options for OCSP test and combine certs
2018-06-26 22:46:11 -07:00
toddouska
1b2876679b
Merge pull request #1631 from ejohnstown/wolfio-select
...
wolfIO Select Update
2018-06-26 19:27:20 -07:00
Jacob Barthelmeh
f031a6fc67
check on variable for printout
2018-06-26 17:03:04 -06:00
John Safranek
586874b997
Rename INLINE
...
1. Renamed the macro INLINE as WC_INLINE.
2. For FIPS and the "selftest" build, define INLINE as WC_INLINE. Allows the FIPS code to work unchanged.
2018-06-26 15:17:46 -07:00
Chris Conlon
d8086ded6a
Merge pull request #1639 from ejohnstown/selftest-fixes
...
netbsd-selftest fix
2018-06-26 15:38:03 -06:00
toddouska
d9b5948947
Merge pull request #1605 from dgarske/asyncfsanitize
...
Fixes for async to resolve runtime fsanitize issues
2018-06-26 14:27:07 -07:00
John Safranek
4151af4b4a
A few new functions in AES-GCM and DH don't exist in the netbsd-selftest build of wolfSSL. Option them out of the wolfCrypt self-test.
2018-06-25 17:49:11 -07:00
toddouska
a7d761c336
Merge pull request #1424 from ejohnstown/fipsv2
...
FIPSv2
2018-06-25 09:58:48 -07:00
Jacob Barthelmeh
8c9e0cd427
add options for OCSP test and combine certs
2018-06-22 15:58:27 -06:00
John Safranek
d13dfa309e
RPM Fixes
...
1. Fixed a few parsing checks in the dates in the RPM changelog.
2. Moved some file names between sections in the include.am and spec.in files.
3. Added the match-start-of-line to the regex for finding the -D items for the options file.
2018-06-22 11:55:09 -07:00
John Safranek
9d7bcf8ec7
wolfIO Select Update
...
1. In wolfIO_Select(), separate out the fd lists into separate read and write lists.
2. Check the read and write fds lists to see if the connect() succeeded or failed.
3. Windows doesn't use the nfds parameter to Select. Initialize it to zero and reset it to the right value when building for not-Windows.
4. Remove the warning disable for Windows.
GCC 8.1 checks that "restrict" pointer parameters don't point to the same thing and will error if they do.
2018-06-22 10:49:57 -07:00
John Safranek
e6c7952f50
Merge master into fipsv2. Resolved a conflict in api.c.
2018-06-22 09:52:26 -07:00
David Garske
ed1c56a4fc
Benchmark support for 3072-bit RSA and DH when USE_CERT_BUFFERS_3072 is defined.
2018-06-22 09:30:33 -07:00
David Garske
522f365279
Fix one more issue with PKCS7 and async, which is not supported.
2018-06-22 09:30:25 -07:00
David Garske
1cb5bbf8ea
Fixes for some async issues. Fixes an async issue with BuildMessage. Fixes for PKCS7 tests to not use async since it is not supported.
2018-06-22 09:30:25 -07:00
David Garske
71606dde45
Fixes for a few wolfCrypt test memory leaks. Fix for HMAC with empty input not supported on QuickAssist.
2018-06-22 09:30:25 -07:00
David Garske
ec132cd3f4
Fix fsanitize issue for mp_rand.
2018-06-22 09:30:25 -07:00
David Garske
623f1b58ac
Fix for min IV size check. Cleanup of the max IV to use new enum MAX_IV_SZ.
2018-06-22 09:30:25 -07:00
David Garske
64ba151c35
Experimental fixes for async to resolve runtime fsanitize issues with invalid memory access due to attempting realloc on non NUMA type. Tested with ./configure --with-intelqa=../QAT1.6 --enable-asynccrypt CC="clang -fsanitize=address" --enable-debug --disable-shared --enable-trackmemory CFLAGS="-DWOLFSSL_DEBUG_MEMORY -DWOLFSSL_DEBUG_MEMORY_PRINT" && make and sudo ./tests/unit.test.
2018-06-22 09:30:25 -07:00
toddouska
1179969dcf
Merge pull request #1630 from embhorn/zd3963
...
Add support for C99 tools without strings.h and add option to disable C99
2018-06-21 18:00:23 -07:00
toddouska
8e78623123
Merge pull request #1632 from JacobBarthelmeh/Release
...
prepare for release v3.15.3
2018-06-21 15:37:32 -07:00
Jacob Barthelmeh
8fd18e06f7
prepare for release v3.15.3
2018-06-21 12:22:27 -06:00
Jacob Barthelmeh
518c987c61
update CA for ocsp test
2018-06-21 12:13:33 -06:00
toddouska
9d86d323ef
Merge pull request #1628 from JacobBarthelmeh/Fuzzer
...
sanity check on hashing size
2018-06-20 17:46:38 -07:00
Jacob Barthelmeh
bf63003237
sanity check before reading word16 from buffer
2018-06-20 16:48:40 -06:00
Jacob Barthelmeh
2f43d5eece
update size to be used with fuzzing
2018-06-20 15:29:05 -06:00
Eric Blankenhorn
0dc9a19835
Remove check to include strings.h
2018-06-20 10:40:03 -05:00
Jacob Barthelmeh
777c89a257
sanity check on pointer
2018-06-20 09:37:36 -06:00
Jacob Barthelmeh
61655ef56d
comment on sz value and sanity check before fuzzing
2018-06-20 09:21:56 -06:00
Jacob Barthelmeh
83324f39d7
update IO callback function names with CSharp wrapper
2018-06-20 09:10:19 -06:00
Eric Blankenhorn
07810eb21e
Merge branch 'master' into zd3963
2018-06-20 10:05:20 -05:00
Eric Blankenhorn
6d3237a0b4
Add support for C99 tools withoutstrings.h and add option to disable C99 checking.
2018-06-20 09:49:33 -05:00
toddouska
c1362cca60
Merge pull request #1629 from JacobBarthelmeh/Certs
...
disable CRL with additional cn/alt test certs
2018-06-19 14:42:21 -07:00
toddouska
d481a3fb92
Merge pull request #1625 from JacobBarthelmeh/Testing
...
memory management with test cases
2018-06-19 14:41:18 -07:00
Jacob Barthelmeh
d8e278b6b3
revert free on sig and add comment
2018-06-18 18:15:26 -06:00
toddouska
e348522353
Merge pull request #1627 from ejohnstown/pkcs7-verify
...
Fix PKCS7 Sign Verify
2018-06-18 15:32:18 -07:00
toddouska
4e6a88caf9
Merge pull request #1626 from JacobBarthelmeh/UnitTests
...
fix for implicit declaration error
2018-06-18 15:30:06 -07:00
Jacob Barthelmeh
d3cd0b6b2e
disable CRL with additional cn/alt test certs
2018-06-18 16:10:45 -06:00
Jacob Barthelmeh
38f916a798
sanity check on hashing size
2018-06-18 15:50:44 -06:00
John Safranek
2fd000532a
A length value was set to zero in a situation where the existing value was needed.
2018-06-18 11:48:45 -07:00
Jacob Barthelmeh
c98aca32c4
static analysis report fixes
2018-06-15 17:00:45 -06:00
Jacob Barthelmeh
bade35bd76
update return value
2018-06-15 16:25:09 -06:00
Jacob Barthelmeh
0f9063d2a9
fix for implicit declaration error
2018-06-15 16:14:22 -06:00
Jacob Barthelmeh
a1295b3148
memory management with test cases
2018-06-15 15:43:42 -06:00
toddouska
c78a552eb3
Merge pull request #1598 from JacobBarthelmeh/Nucleus
...
wolfCrypt only Nucleus
2018-06-15 14:23:54 -07:00
toddouska
0d0aa74444
Merge pull request #1623 from dgarske/fix_atecc508a
...
Fixes for build with `WOLFSSL_ATECC508A` defined
2018-06-15 11:06:33 -07:00
toddouska
55945acd55
Merge pull request #1622 from cconlon/cavp-selftest-fix
...
fix CAVP self test build with newer raw hash functions
2018-06-15 11:02:15 -07:00
Jacob Barthelmeh
b90fa909ef
add warning for source of entropy
2018-06-15 11:40:05 -06:00
toddouska
495e3552d2
Merge pull request #1624 from JacobBarthelmeh/Testing
...
move location of wolfSSL_d2i_RSA_PublicKey to fix x509 small build
2018-06-15 10:39:08 -07:00
Jacob Barthelmeh
c03c10e1d4
move location of wolfSSL_d2i_RSA_PublicKey to fix x509 small build
2018-06-14 14:38:15 -06:00
toddouska
139a08a98e
Merge pull request #1621 from SparkiDev/tls13_no_cs
...
Allow NO_WOLFSSL_CLIENT/SERVER to compile and pass tests
2018-06-14 09:08:13 -07:00
David Garske
5b2bb44bc8
Fixes for build with WOLFSSL_ATECC508A defined.
2018-06-13 20:10:01 -07:00
toddouska
aa01fd8adf
Merge pull request #1619 from JacobBarthelmeh/HardwareAcc
...
RAW hash function APIs not supported with ARMv8 build
2018-06-13 16:07:53 -07:00
toddouska
15348d4936
Merge pull request #1612 from dgarske/fixmatchdomainname
...
Fixes for `MatchDomainName` to properly detect failures
2018-06-13 13:13:52 -07:00
John Safranek
534114d979
For the FIPSv2 build, remove the define for FP_MAX_BITS from the CFLAGS. Default value was appropriate.
2018-06-13 09:35:42 -07:00
David Garske
61056829c5
Added success test cases for domain name match (SNI) in common name and alternate name.
2018-06-13 09:26:54 -07:00
Chris Conlon
1db5d6ebd6
fix CAVP self test build with newer raw hash functions
2018-06-13 09:55:16 -06:00
Sean Parkinson
a03c15e598
Allow NO_WOLFSSL_CLIENT/SERVER to compile and pass tests
2018-06-13 11:42:16 +10:00
toddouska
e60262cbf1
Merge pull request #1604 from TimParrish/addAMDFunk
...
Update cpuid.c to optimize intelasm for performance on AMD processors
2018-06-12 16:19:33 -07:00
David Garske
8fa1592542
Fix to use SHA256 for the self-signed test certificates.
2018-06-12 16:12:29 -07:00
Jacob Barthelmeh
9dc560dd01
RAW hash function APIs not supported with ARMv8 build
2018-06-12 16:45:38 -06:00
David Garske
1f16b36402
Fixes for MatchDomainName to properly detect failures:
...
* Fix `MatchDomainName` to also check for remaining len on success check.
* Enhanced `DNS_entry` to include actual ASN.1 length and use it thoughout (was using XSTRLEN).
Added additional tests for matching on domain name:
* Check for bad common name with embedded null (CN=localhost\0h, Alt=None) - Note: Trouble creating cert with this criteria
* Check for bad alternate name with embedded null (CN=www.nomatch.com, Alt=localhost\0h)
* Check for bad common name (CN=www.nomatch.com, Alt=None)
* Check for bad alternate name (CN=www.nomatch.com, Alt=www.nomatch.com)
* Check for good wildcard common name (CN=*localhost, Alt=None)
* Check for good wildcard alternate name (CN=www.nomatch.com, Alt=*localhost)
2018-06-12 14:15:34 -07:00
Tim Parrish
9448b96afd
updated change log
2018-06-12 14:15:57 -06:00
Tim Parrish
26835bef79
Updated README.md
2018-06-12 13:54:50 -06:00
Tim Parrish
1dd7f83752
Merge branch 'addAMDFunk' of https://github.com/TimParrish/wolfssl into addAMDFunk
2018-06-12 13:50:07 -06:00
John Safranek
af7b676405
Merge pull request #1602 from dgarske/compat_withnotls
...
Fixes for building with openssl compatibility enabled and no SSL/TLS
2018-06-12 12:25:32 -07:00
Tim
d043b2c559
Merge branch 'addAMDFunk' of github.com:TimParrish/wolfssl into addAMDFunk
2018-06-12 13:17:53 -06:00
Tim
d518e0b7f6
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into addAMDFunk
2018-06-12 13:16:01 -06:00
John Safranek
5e516cc2e0
Merge branch 'master' into fipsv2
2018-06-12 10:10:50 -07:00
Tim Parrish
53b0d2cba3
updated readme to show that AMD processors are supported
2018-06-12 10:59:42 -06:00
David Garske
dac5f84f61
Fix build error with missing bio. Fix for pkey not being reset to NULL for d2i_PrivateKey failure case test.
2018-06-12 09:38:18 -07:00
David Garske
292e9535ae
Fix for wolfSSL_ERR_clear_error to call wc_ClearErrorNodes when its available (mismatched macros), which was incorrectly causing test_wolfSSL_ERR_put_error to fail. Added test_wolfSSL_PEM_PrivateKey test for ECC based key. Refactored the RNG test to only run the reseed test if TEST_RESEED_INTERVAL is defined. This is the test that was causing the tests/api.c to take so long to complete. Will add this macro to the enable options test.
2018-06-12 09:38:18 -07:00
David Garske
9cbd2b00d4
Added test for PEM_read_bio_PrivateKey using BIO loaded using BIO_new_mem_buf.
2018-06-12 09:38:18 -07:00
David Garske
e1890a4b0e
Added some bad argument checks on compatibility functions BIO_new_mem_buf and PEM_read_bio_PrivateKey.
2018-06-12 09:38:18 -07:00
David Garske
ad0a10441d
Fixes for building with openssl compatibility enabled and no TLS client/server.
...
Resolves issues building with:
`./configure --enable-opensslextra --disable-rsa --disable-supportedcurves CFLAGS="-DNO_WOLFSSL_CLIENT -DNO_WOLFSSL_SERVER" --disable-examples`
`./configure --enable-opensslextra --disable-ecc --disable-supportedcurves CFLAGS="-DNO_WOLFSSL_CLIENT -DNO_WOLFSSL_SERVER" --disable-examples`
Ticket 3872
2018-06-12 09:38:18 -07:00
toddouska
39f3df0778
Merge pull request #1610 from SparkiDev/ed25519_priv
...
Fix private-only keys and make them script generated
2018-06-12 08:34:38 -07:00
toddouska
8ecb9aacd3
Merge pull request #1592 from SparkiDev/psk_test_fix
...
Fix test to work with configurations not including AES-GCM
2018-06-12 08:33:44 -07:00
toddouska
82550b2f8c
Merge pull request #1617 from dgarske/fix_arduino
...
Fixes for Arduino
2018-06-12 08:31:51 -07:00
toddouska
cb8351c027
Merge pull request #1607 from SparkiDev/tls13_interop_ver
...
Return TLS 1.3 draft version in ServerHello
2018-06-12 08:30:48 -07:00
toddouska
766323e90f
Merge pull request #1613 from SparkiDev/tls13_post_auth
...
Fix post authentication for TLS 1.3
2018-06-12 08:29:38 -07:00
toddouska
83ffb64cda
Merge pull request #1599 from dgarske/pkcs7free
...
Fixes for PKCS7 error case that might leak memory
2018-06-12 08:28:19 -07:00
toddouska
3b74dbf86a
Merge pull request #1609 from SparkiDev/tls13_time
...
Don't include sys/time.h explicitly in tls13.c
2018-06-12 08:27:43 -07:00
toddouska
2c8f89ae33
Merge pull request #1611 from kaleb-himes/AN_UP2
...
Allow for wc_SetAltNamesBuffer call with larger than 16384 bytes
2018-06-12 08:26:58 -07:00
toddouska
49b82456eb
Merge pull request #1618 from cconlon/opensslcompat
...
Align return values for EVP_DigestUpdate/Final for OpenSSL Compatibility
2018-06-12 08:25:18 -07:00
toddouska
29410ada1e
Merge pull request #1595 from SparkiDev/tls13_cipher_down
...
Fix for downgrading from TLS 1.3 due to old cipher suite
2018-06-12 08:24:26 -07:00
toddouska
f2a20c4232
Merge pull request #1573 from SparkiDev/tls_pad_vfy
...
Constant time padding and HMAC verification in TLS
2018-06-12 08:22:32 -07:00
toddouska
22ddd41b61
Merge pull request #1581 from ejohnstown/update-configure
...
Update configure.ac
2018-06-12 08:17:35 -07:00
Sean Parkinson
b7caab938e
Fix post authentication for TLS 1.3
2018-06-12 09:49:23 +10:00
John Safranek
7827712fcc
FIPS Revalidation (acceptance fixes)
...
1. The Windows 10 wolfcrypt test project was missing the flag for USE_CERT_BUFFERS_256.
2. Add note to fips-check about using linuxv2 with Win10.
2018-06-11 15:27:52 -07:00
toddouska
35c8ba3188
Merge pull request #1601 from SparkiDev/ecdsa_sign
...
Change ECDSA signing to use blinding.
2018-06-11 14:13:24 -07:00
toddouska
637eaa08ba
Merge pull request #1614 from SparkiDev/tls13_log_file
...
Remove log file and change location to local
2018-06-11 13:51:51 -07:00
Chris Conlon
a472325f89
return WOLFSSL_FAILURE on error from EVP_DigestUpdate() and EVP_DigestFinal()
2018-06-11 14:27:08 -06:00
David Garske
7e5c41ca35
Fixes for some async issues in FIPSv2.
2018-06-11 12:41:15 -07:00
John Safranek
10070bb5fd
FIPS Revalidation (acceptance fixes)
...
1. Backed out some changes to AES-GCM with respect PIC32 only code. (This change will not be in the FIPS boundary.)
2018-06-11 10:21:19 -07:00
Sean Parkinson
74d4a02542
Remove log file and change location to local
2018-06-11 15:00:17 +10:00
David Garske
cf9c352d91
Fixes for Arduino. Don't use C99 for Arduino. Enhanced the script to create as new folder in IDE/ARDUINO/wolfSSL. Updated README.md.
2018-06-08 14:27:54 -07:00
John Safranek
ce2f393bc7
Autoconf Update
...
1. Remove many redundant macros.
2. Reorder several macros to more appropriate locations.
3. Several macros take lists of items to process, not just individual items. Combined duplicated macros' parameters into lists.
4. Some macros had unnecessary parameters.
5. Added some AX_REQUIRE_DEFINED() checks for the macros used.
6. Add cyassl/options.h to the AC_CONFIG_FILES list. It will be recreated from the template when running config.status the same as wolfssl/options.h
7. Remove the dist-dir rule from Makefile.am. This is prefering the process rather than automating that one step. Make dist will not run config.status.
* AC_PROG_CC must be before any macros that will try to compile for tests.
* AC_CHECK_SIZEOF takes a single type, no size values.
* Only one of the AC_CANONICAL_X macros are expanded. Removed AC_CANONICAL_BUILD since it is never actually used.
* Removed the AC_PROG_CXX and anything C++ related.
* Removed LT_LANG([C]) as it is the default and the C doesn't do anything.
2018-06-08 10:47:14 -07:00
John Safranek
df6fe0b07c
FIPS Revalidation (acceptance fixes)
...
1. Update the fips-check script to pull the FIPSv2 code from the main repositories.
2. Script cleanup.
3. Disable the api.test check of wc_ecc_mulmod() when WOLFSSL_VALIDATE_ECC_IMPORT is enabled.
2018-06-08 10:36:28 -07:00
David Garske
e99fc3026d
Fixed issue with MatchDomainName. Fixes issue #1606 . This is a valid and confirmed bug report in v3.15.0. Applies to ./configure --enable-sni case with wolfSSL_CTX_UseSNI where common name has wildcards. Pushing fix for visibility now and will add test case.
2018-06-08 10:09:53 -07:00
kaleb-himes
1123beb2d2
Allow for wc_SetAltNamesBuffer call with larger than 16384 buffers at user discretion
2018-06-08 10:16:40 -06:00
toddouska
bea0e6142a
Merge pull request #1608 from dgarske/maxcerfix
...
Resolves issue with reassembling large certificates
2018-06-08 08:25:14 -07:00
Sean Parkinson
5547a7b4bd
Fix private-only keys and make them script generated
2018-06-08 17:38:11 +10:00
Sean Parkinson
587f4ae79e
Don't include sys/time.h explicitly in tls13.c
2018-06-08 09:00:12 +10:00
David Garske
00ddeb07d8
Resolves issue with reassembling large certificates. The ProcessPeerCerts function was using the wrong max size check for certs. Built and test with ./configure CFLAGS="-DMAX_CERTIFICATE_SZ=20000".
2018-06-07 15:56:37 -07:00
John Safranek
391d1953fa
FIPS Revalidation (acceptance fixes)
...
1. Add a couple of missing options to user_settings.h for Win10 and configure.ac.
2. Clear the execute flag from the ecc.h.
2018-06-07 10:57:46 -07:00
Tim Parrish
c6e2585fbc
added check for AMD processor to asm.c
2018-06-07 10:35:54 -06:00
Sean Parkinson
020b69aba0
Return TLS 1.3 draft version in ServerHello
2018-06-07 22:01:42 +10:00
John Safranek
234228e5af
FIPS Revalidation (acceptance fixes)
...
1. Fixed some whitespace in api.c.
2018-06-06 17:50:55 -07:00
David Garske
e673cdf2d2
Merge pull request #1594 from kojo1/openSSL-Compat-CRL-STORE
...
FILE* to XFILE
2018-06-06 16:34:59 -07:00
David Garske
596cedc226
Merge pull request #1603 from ejohnstown/add-changelog
...
Add ChangeLog
2018-06-06 16:32:18 -07:00
Tim
59067825fc
Update cpuid.c to optimize intelasm for performance
2018-06-06 16:44:46 -06:00
John Safranek
a6dd93aa2e
Removed replaced the last two references to "CYASSL" macros with "WOLFSSL" in the example server.
2018-06-06 13:14:06 -07:00
John Safranek
7e9a32fffd
FIPS Revalidation
...
Merge branch 'master' into fipsv2. Using a merge instead of a rebase to retain commit IDs and tags.
2018-06-06 12:43:15 -07:00
John Safranek
e9d9e7c37c
replaced NEWS.md in Makefile.am with ChangeLog.md
2018-06-06 10:56:24 -07:00
Sean Parkinson
9b9568d500
Change ECDSA signing to use blinding.
2018-06-06 11:52:04 +10:00
John Safranek
1c17f55ee4
updated the readme/changelog with the correct release date
2018-06-05 16:10:08 -07:00
John Safranek
0c966d7700
Update ChangeLog and NEWS
...
While the GNU coding standard states that the NEWS file should be a list of the high level changes and the ChangeLog should be every change in detail, our public source repository contains the detailed log of all changes and the name "ChangeLog" makes more sense to me than "NEWS". Instead of keeping two copies of the README, one in plain text and one in MarkDown, only keeping the MarkDown copy. It displays better in the source repository, it is still plain text, and we aren't keeping two separate copies of the files.
2018-06-05 16:07:53 -07:00
David Garske
ab319ae599
Fixed a couple of places in PKCS7 error cases where key free (wc_FreeRsaKey or wc_ecc_free) might not be called.
2018-06-05 14:32:17 -07:00
John Safranek
b63d3173a1
update change log ( #1597 )
2018-06-05 12:42:43 -07:00
Sean Parkinson
4ac34b74bd
Fix test to work with configurations not including AES-GCM
2018-06-05 10:30:15 +10:00
John Safranek
ab5eeb9f79
Merge pull request #1596 from dgarske/leakfixes
...
Fix for possible leak with normal math and ECC verify fail for R and S
2018-06-04 13:30:09 -07:00
David Garske
5eca844e01
Fix for possible leak with normal math and verify fail for R and S in ECC verify.
2018-06-04 11:05:14 -07:00
Sean Parkinson
fcd2234841
Fix for downgrading from TLS 1.3 due to old cipher suite
...
TLS 1.3 specification doesn't allow downgrading based on cipher suite.
2018-06-04 12:42:41 +10:00
toddouska
caf88c81c2
Merge pull request #1593 from ejohnstown/fix-cert-includes
...
Fix Cert Includes
2018-06-01 11:32:18 -07:00
John Safranek
f1588e0ad9
Fix Cert Includes
...
1. Added files that were missing from the certs directory include.am files.
2. Fixed the duplicate items in the certs directory's include.am files.
3. Reorganized the certs directory include.am files to be a tree.
2018-05-31 17:38:47 -07:00
Takashi Kojo
3ff8c45aa8
FILE to XFILE
2018-06-01 09:30:20 +09:00
Jacob Barthelmeh
1cc6042f01
exlude unneeded files with Nucleus build
2018-05-31 15:27:37 -06:00
Jacob Barthelmeh
0c2199084e
single threaded wolfcrypt only Nucleus port
2018-05-31 15:04:44 -06:00
toddouska
70b3ba1c04
Merge pull request #1591 from ejohnstown/release-3.15.0
...
Release v3.15.0 Preparation
2018-05-31 12:07:43 -07:00
toddouska
c43a84547a
Merge pull request #1572 from dgarske/cryptodev
...
Added crypto device framework
2018-05-31 10:28:58 -07:00
John Safranek
dfca1beff0
Touch the version number on the library filename in the rpm spec.
2018-05-31 10:20:18 -07:00
John Safranek
8a61b7303a
Remove execute bit from a few files.
2018-05-31 10:14:47 -07:00
John Safranek
a4e6cfd3ac
Added new file NEWS.md to Makefile for dist builds.
2018-05-31 10:12:34 -07:00
John Safranek
6a2c30e593
Release v3.15.0
...
1. Update configure.ac for new version.
2. Update the version header.
3. Update the README files with the new changelog.
4. Moved all previous change logs from README files to NEWS files.
2018-05-30 20:00:09 -07:00
John Safranek
bca29395a3
Merge pull request #1590 from JacobBarthelmeh/Compatibility-Layer
...
add NO_OLD_SHA_NAMES macro and add back SHA512, SHA384
2018-05-30 19:56:17 -07:00
Jacob Barthelmeh
5849e9f1a1
update macro name in test case
2018-05-30 17:42:07 -06:00
John Safranek
e358fc03c7
Merge pull request #1589 from quinnmiller1997/pkcs7_fix
...
Fixed a filename in the pkcs7.h comments
2018-05-30 16:19:50 -07:00
Jacob Barthelmeh
587484a1ef
add NO_OLD_SHA_NAMES macro and add back SHA512, SHA384
2018-05-30 16:10:34 -06:00
Quinn Miller
4ecff14bd2
Fixed a filename in the pkcs7.h comments
2018-05-30 14:53:03 -06:00
David Garske
33d416a060
Fix two more scan-build issues with set but not used.
2018-05-30 13:23:08 -07:00
John Safranek
6d84755106
Merge pull request #1587 from cconlon/cavp-selftest-fix
...
Fix CAVP selftest build
2018-05-30 12:57:35 -07:00
David Garske
d7b560f2ab
Fix for scan-build warning about value being stored and not used. Changed the wc_RsaFunction API to public. Added ability to expose wc_RsaDirect with new define WC_RSA_DIRECT.
2018-05-30 12:44:55 -07:00
toddouska
999663fae1
Merge pull request #1498 from JacobBarthelmeh/Certs
...
update before/after dates with certificates
2018-05-30 10:09:49 -07:00
Chris Conlon
5d99079603
fix HAVE_SELFTEST build for CAVP selftest
2018-05-30 11:08:18 -06:00
David Garske
fc482235b0
Improved the CryptoDev test to include example callback with context.
2018-05-30 09:11:44 -07:00
David Garske
a2fdc6262d
Merge pull request #1586 from ejohnstown/suite-info
...
Rerefactor Cipher Suite List
2018-05-30 07:54:13 -07:00
Chris Conlon
5e4c6e35cc
Merge pull request #1542 from ghoso/openssl_compat201805
...
OpenSSL Compatibility APIs
2018-05-30 08:50:29 -06:00
Go Hosohara
b84f111d51
rebase with master branch and fix some code.
2018-05-30 17:15:07 +09:00
Go Hosohara
8cd357aa3a
d2i_PKCS12_fp
2018-05-30 12:10:41 +09:00
Go Hosohara
c715bb5ade
X509_check_ca
2018-05-30 12:08:27 +09:00
Go Hosohara
3f6b7c8833
Merge with openSSL-Compat-CRL-STORE on kojo1/wolfssl
2018-05-30 12:08:27 +09:00
Go Hosohara
0fb446ad36
i2c_ASN1_INTEGER
2018-05-30 12:03:58 +09:00
Go Hosohara
d7e4bbf1cf
ASN1_STRING_print_ex
2018-05-30 11:56:43 +09:00
Go Hosohara
5c11e1440f
ASN1_TIME_to_generalizedtime
2018-05-30 11:56:43 +09:00
Go Hosohara
b1ef0c808e
Add all stubs.
2018-05-30 11:56:42 +09:00
Go Hosohara
36ced360cb
Add Renesas CS+ project files.
2018-05-30 11:53:18 +09:00
Go Hosohara
5ff460bb7f
OPENSSL_add_all_algorightms_noconf
2018-05-30 11:53:18 +09:00
Go Hosohara
005284a127
ASN1_GENERALIZEDTIME_free
2018-05-30 11:53:17 +09:00
Go Hosohara
24ff55b085
RAND_poll
2018-05-30 11:53:17 +09:00
Sean Parkinson
fb7d74c197
FinalRaw parameter hash may not be aligned.
2018-05-30 09:10:46 +10:00
Sean Parkinson
e684156a1e
Constant time padding and HMAC verification in TLS
2018-05-30 09:10:46 +10:00
Jacob Barthelmeh
1a7d208a60
add crl2.pem to renew certs script
2018-05-29 16:57:30 -06:00
John Safranek
b2225a0bc0
Rerefactor Cipher Suite List
...
1. Do not add iana_name to the struct if disabling error strings.
2. Change the IANA_NAME macro to SUITE_INFO, and build the suite info records as appropriate for the error string enablement.
2018-05-29 14:34:57 -07:00
Kaleb Himes
cc58d3160f
Merge pull request #1579 from C-Treff/Tenasys_Review
...
time 64bit, test update
2018-05-29 14:06:44 -07:00
toddouska
0a35c37211
Merge pull request #1584 from SparkiDev/tls_many_nst
...
Allow multiple NewSessionTicket messages
2018-05-29 13:43:59 -07:00
toddouska
52179eba16
Merge pull request #1583 from dgarske/nomatch
...
Added test for common name failure with check domain name
2018-05-29 13:30:42 -07:00
toddouska
2cf853d1f1
Merge pull request #1582 from SparkiDev/tls13_only
...
Allow TLS 1.2 to be compiled out.
2018-05-29 13:26:54 -07:00
John Safranek
92dd231c27
Merge pull request #1585 from SparkiDev/new_compiler
...
New compilers
2018-05-29 12:25:56 -07:00
Chris Conlon
16738f1449
Merge pull request #1569 from kojo1/openSSL-Compat-CRL-STORE
...
openSSL compatibility APIs: X509_CRL, STORE
2018-05-29 09:47:22 -06:00
Sean Parkinson
f871bafe3a
Fix uninitialized
2018-05-29 11:06:26 +10:00
Sean Parkinson
68666101b7
Fix for g++ 7.3 - macro strings in asm
2018-05-29 09:25:38 +10:00
Sean Parkinson
1d8fb7be82
Allow multiple NewSessionTicket messages
...
Interopability testing with OpenSSL
2018-05-28 09:18:26 +10:00
Takashi Kojo
c60b60c50c
#if condition to refer wc_PKCS12_new, wc_d2i_PKCS12
2018-05-26 16:02:51 +09:00
Takashi Kojo
ba03f6e08b
wolfSSL_d2i_PKCS12_fp
2018-05-26 13:04:06 +09:00
Takashi Kojo
3939eadf9c
get derLen by RsaPublicKeyDerSize
2018-05-26 10:55:17 +09:00
Chris Conlon
af471a360d
Merge pull request #1574 from cariepointer/test/wolfcrypt
...
Add unit test for wc_SignatureGetSize
2018-05-25 11:29:58 -06:00
Carie Pointer
12dc346058
Change return value to 0 for null key when HAVE_USER_RSA is defined
2018-05-25 09:25:25 -06:00
Sean Parkinson
ba8e441e53
Allow TLS 1.2 to be compiled out.
2018-05-25 11:00:00 +10:00
Carie Pointer
65014248f9
Fix typos, update ret for if HAVE_USER_RSA defined
2018-05-24 16:32:27 -06:00
David Garske
a5c2e8b912
Added test for common name with invalid domain fails as expected when set with wolfSSL_check_domain_name.
2018-05-24 14:39:35 -07:00
toddouska
453daee965
Merge pull request #1523 from SparkiDev/ed25519_key
...
Allow Ed25519 private-only keys to work in TLS
2018-05-24 09:56:17 -07:00
toddouska
87f9d0f141
Merge pull request #1566 from ejohnstown/tcp-timeout
...
Fix TCP with Timeout
2018-05-24 09:07:50 -07:00
C-Treff
5d693b263d
removed more tabs
2018-05-24 09:56:54 +02:00
C-Treff
06e9354629
removed tabs
2018-05-24 09:48:18 +02:00
C-Treff
1d281ce515
replace memset by XMEMSET
...
replaced memset with XMEMSET as requested by @dgarske
INtime project files cleanup
2018-05-24 09:35:46 +02:00
Carie Pointer
005a0d4dff
Define devId if RSA is enabled
2018-05-23 20:17:11 -06:00
toddouska
d38a0039ed
Merge pull request #1549 from JacobBarthelmeh/Cert-Report1
...
fix for relative URI detection
2018-05-23 17:05:35 -07:00
toddouska
e4e0dfe9d3
Merge pull request #1564 from JacobBarthelmeh/PKCS12
...
Pkcs12
2018-05-23 16:59:13 -07:00
David Garske
6f221ff75c
Fix possible leak in PKCS for failure case with small stack enabled.
2018-05-23 16:21:49 -07:00
John Safranek
0315b378f5
Fix TCP with Timeout
...
Updated example client and server to use the new wolfSSL_dtls_set_using_nonblock() function.
2018-05-23 16:07:45 -07:00
toddouska
6a00bfc9f7
Merge pull request #1580 from JacobBarthelmeh/Testing
...
check on cipher suites for AEAD
2018-05-23 17:02:01 -06:00
Sean Parkinson
450741f8ef
Change checks for message chaching to happen once
...
Add compile option to remove Ed25119 client auth in TLS 1.2.
Cipher suite choice does not affect client auth.
2018-05-24 08:43:28 +10:00
Sean Parkinson
982119b495
Only cache messages when required.
2018-05-24 08:43:28 +10:00
Sean Parkinson
9358edf5dd
Fixes from code review
...
Include new private key files in release.
Set messages field to NULL after free.
2018-05-24 08:43:28 +10:00
Sean Parkinson
58f523beba
Allow Ed25519 private-only keys to work in TLS
...
Change Ed25519 in TLS 1.2 to keep a copy of all the messages for
certificate verification - interop with OpenSSL.
2018-05-24 08:43:28 +10:00
cariepointer
4eeb9c8c56
Merge branch 'master' into test/wolfcrypt
2018-05-23 16:35:10 -06:00
David Garske
72d168028e
Fixes to better handle PKCS7 error cases.
2018-05-23 15:29:33 -07:00
David Garske
9a75e5cf68
Fixes in PKCS7 for handling hardware based devId and no private key. Fix to handle scenario where kari->decoded is allocated, but not initalized (was causing use of unitliaized in FreeDecodedCert). Fix to handle hardware base RSA key size.
2018-05-23 14:48:10 -07:00
Chris Conlon
555efe0345
Merge pull request #1577 from TimParrish/firstUnitTest
...
First unit test
2018-05-23 15:24:56 -06:00
Carie Pointer
a18f220a5a
Remove trailing whitespaces
2018-05-23 14:39:36 -06:00
Carie Pointer
8bd41629ae
Split wc_SignatureGetSize test into wc_SignatureGetSize_ecc and wc_SignatureGetSize_rsa tests
2018-05-23 14:26:35 -06:00
Jacob Barthelmeh
9021091896
update comments
2018-05-23 14:04:41 -06:00
toddouska
690f98fb0f
Merge pull request #1578 from SparkiDev/test_cov
...
Improve coverage
2018-05-23 12:51:37 -06:00
John Safranek
b1ed852f36
Fix TCP with Timeout
...
wolfSSL remains agnostic to network socket behavior be it blocking or non-blocking. The non-blocking flag was meant for the default EmbedRecvFrom() callback for use with UDP to assist the timing of the handshake.
1. Deprecate wolfSSL_set_using_nonblock() and wolfSSL_get_using_nonblock() for use with TLS sockets. They become don't-cares when used with TLS sessions.
2. Added functions wolfSSL_dtls_set_using_nonblock() and wolfSSL_dtls_get_using_nonblock().
3. Removed a test case from EmbedReceive() that only applied to UDP.
4. Removed the checks for non-blocking sockets from EmbedReceive().
5. Socket timeouts only apply to DTLS sessions.
2018-05-23 11:29:16 -07:00
Jacob Barthelmeh
89fbb1b40d
only compile SEQ increment function in case of DTLS or HAVE_AEAD
2018-05-23 12:07:35 -06:00
Tim
4fd85853c5
I think I now understand the trailing white space...
2018-05-23 11:57:12 -06:00
Jacob Barthelmeh
29d9759aa0
check on cipher suites for AEAD
2018-05-23 11:53:33 -06:00
C-Treff
cd9f86d921
time 64bit, test update
...
64bit settings for time is mandatory for INtime. Changed the project file.
Test for ecc_test_buffers was unreliable, as the structs were not initialized befor usage.
2018-05-23 10:33:56 +02:00
Sean Parkinson
3bb4949e02
Improve coverage
...
Renumber errors in test.c to be unique.
Fix stack usage to work in --enable-distro --enable-stacksize builds.
2018-05-23 16:24:23 +10:00
Tim
124f45d449
re-upload
2018-05-22 17:45:04 -06:00
Tim
83e67a4197
additional changes made
2018-05-22 17:25:22 -06:00
toddouska
438f8da11f
Merge pull request #1559 from ejohnstown/update-ar
...
Hush ar warning
2018-05-22 17:22:48 -06:00
Tim
58ac951471
Changes made- Thank you
2018-05-22 16:00:40 -06:00
Chris Conlon
abf93c9c2c
Merge pull request #1575 from quinnmiller1997/Unit_Test
...
Added unit test for Blake2
2018-05-22 14:22:05 -06:00
Tim
b308fa9a39
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into firstUnitTest
2018-05-22 13:26:45 -06:00
Carie Pointer
6321008ef4
Modify wc_SignatureGetSize test for ECC and RSA specific API
2018-05-22 13:24:36 -06:00
Tim
d6809c029d
First unit test
2018-05-22 13:21:37 -06:00
Quinn Miller
f2ce8dcbca
Added unit test for Blake2
2018-05-22 10:47:44 -06:00
Carie Pointer
df24bc6096
Update unit test
2018-05-22 09:22:01 -06:00
Carie Pointer
6cc84d2301
Add initial test_wc_SignatureGetSize() method
2018-05-21 17:11:21 -06:00
Chris Conlon
be9ae9a3c4
Merge pull request #1570 from MJSPollard/MikePollardBranch
...
added Poly1305SetKey Unit Test
2018-05-21 16:35:15 -06:00
David Garske
85511067e4
Added crypto device framework to handle PK RSA/ECC operations using callbacks. Adds new build option ./configure --enable-cryptodev or #define WOLF_CRYPTO_DEV. Added devId support to PKCS7.
2018-05-21 14:31:08 -07:00
John Safranek
1b9cff1c5d
Hush ar warning
...
At some point, ar on Ubuntu started throwing the following warning:
ar: `u' modifier ignored since `D' is the default (see `U')
Add the "U" option to the ar flags if the version of ar supports it.
(The version used by macOS does not support the flag, for example.) The
AR_FLAGS set in configure will later be used by libtool.
2018-05-21 13:49:20 -07:00
toddouska
2021bcb188
Merge pull request #1560 from dgarske/ciphernamecleanup
...
Refactor of the cipher suite names to use single array
2018-05-21 14:24:53 -06:00
toddouska
e7de654b61
Merge pull request #1558 from dgarske/fsanitize
...
Fixes for fsanitize reports
2018-05-21 14:18:07 -06:00
toddouska
2d88e2efe7
Merge pull request #1567 from SparkiDev/intel_64_align
...
ForceZero - align 64-bit access on Intel 64-bit
2018-05-21 14:16:36 -06:00
MJSPollard
fb247a5d8d
added null check for key
2018-05-21 13:59:15 -06:00
Chris Conlon
6e13bfcfce
Merge pull request #1571 from aaronjense/unit-test-curve25519
...
Added unit-test for wc_curve25519_init and wc_curve25519_free
2018-05-21 13:42:11 -06:00
MJSPollard
2b49f69f1b
updated unit test
2018-05-21 12:44:59 -06:00
Aaron Jense
f214dbc3dd
Removed unneeded call on test_wc_curve25519_init
2018-05-21 11:50:52 -06:00
Aaron Jense
8197d9ec36
Added unit-test for wc_curve25519_init and wc_curve25519_free in tests/api.c
2018-05-21 10:59:02 -06:00
MJSPollard
f447fe22b0
added Poly1305SetKey Unit Test
2018-05-21 10:55:56 -06:00
Sean Parkinson
3a27d85c4e
Use sizeof instead of constant value
2018-05-21 21:26:25 +10:00
Takashi Kojo
22078d6811
wc_Sha512 type
2018-05-20 15:50:16 +09:00
Takashi Kojo
da8452ab29
Removed redundant #defines
2018-05-20 14:29:40 +09:00
Takashi Kojo
d347f5ca77
#define SHA384/512 WC_SHA384/512 -> wolfSSL_SHA384/512
2018-05-20 13:55:47 +09:00
Takashi Kojo
d10f0911a4
sHA384, SHA512 conflict with openSSL
2018-05-20 13:55:47 +09:00
Takashi Kojo
874022d938
fix #if conditions and others
2018-05-20 13:55:47 +09:00
Takashi Kojo
153bcb5297
d2i_X509_fp
2018-05-20 13:55:47 +09:00
Takashi Kojo
460becf739
SHA256, SHA384, SHA512
2018-05-20 13:55:47 +09:00
Takashi Kojo
c275dfc5ab
X509_STORE_add_crl
2018-05-20 13:55:46 +09:00
Takashi Kojo
4efe8740ad
Eliminate d2i_RSAPublicKey test when HAVE_FAST_RSA is enabled
2018-05-20 13:55:46 +09:00
Takashi Kojo
98ef7f43e1
use wolfSSL_X509_CRL_free instead of XFREE
2018-05-20 13:55:46 +09:00
Takashi Kojo
c26bcdd199
Enable RSA_LoadDer with HAVE_FAST_RSA
2018-05-20 13:55:45 +09:00
Takashi Kojo
03d68812a9
Fix #if condition for test
2018-05-20 13:55:45 +09:00
Takashi Kojo
ad71f44f3c
suppress i2d_RSAPublicKey with HAVE_FAST_RSA
2018-05-20 13:55:45 +09:00
Takashi Kojo
6cef2e5d31
memory leak in d2i_X509_CRL
2018-05-20 13:55:45 +09:00
Takashi Kojo
76686c9e20
fix error return, i2d_RSAPublicKey
2018-05-20 13:55:44 +09:00
Takashi Kojo
6580a1fefa
enable SetBitString, SetASNInt, SetASNIntMP with OPENSSL_EXTRA
2018-05-20 13:55:44 +09:00
Takashi Kojo
5d4c0c582e
skip d2i_X509_CRL_fp test. Done locally.
2018-05-20 13:55:44 +09:00
Takashi Kojo
2e4884b6f9
PEM_read_X509_CRL only with HAVE_CRL
2018-05-20 13:55:44 +09:00
Takashi Kojo
f56fd5db00
eliminate dupricated func prototypes
2018-05-20 13:55:44 +09:00
Takashi Kojo
138f9f8f66
add wc_RsaKeyToPublicDer in asn.c when OPENSSL_EXTRA, fix wolfSSL_i2d_RSAPublicKey
2018-05-20 13:55:43 +09:00
Takashi Kojo
03846b2d2d
d2i_RSAPublicKey, d2i_X509_CRL, d2i_X509_CRL_fp, X509_CRL_free, PEM_read_X509_CRL
2018-05-20 13:55:43 +09:00
John Safranek
6e697c21d9
Fix the include.am to include aes_asm.S with the correct filename.
2018-05-18 15:02:43 -07:00
David Garske
cf70b1a013
Revert ForceZero changes in favor of PR #1567 .
2018-05-18 05:29:09 -07:00
John Safranek
dd0489db8c
1. Added the pair-wise consistency test to the RSA Key Gen.
...
2. Modified an RSA key size test case so it didn't try to make a key that was too big.
2018-05-17 17:41:34 -07:00
Sean Parkinson
d63da10c96
ForceZero - align 64-bit access on Intel 64-bit
...
Test added to ensure ForceZero works.
2018-05-18 10:38:21 +10:00
Jacob Barthelmeh
f67046f485
better bounds checking
2018-05-17 16:55:59 -06:00
John Safranek
d8c33c5551
Fix TCP with Timeout
...
1. Take out DTLS support from EmbedReceive(). DTLS uses EmbedReceiveFrom().
2. Modify EmbedReceive() to return TIMEOUT if the session is set to blocking mode.
2018-05-17 15:53:38 -07:00
David Garske
096456f466
Merge pull request #1565 from embhorn/zd3883
...
wolfSSL_HMAC_Final parameter len should be optional
2018-05-17 13:19:19 -07:00
David Garske
b973d6e8b1
Fix to handle NO_ERROR_STRINGS case in unit test. The IANA names are disabled when NO_ERROR_STRINGS is defined.
2018-05-17 10:24:02 -07:00
Jacob Barthelmeh
b6a92a97ce
convert to byte to fix warning
2018-05-17 08:55:07 -06:00
Eric Blankenhorn
5cbb9e8341
wolfSSL_HMAC_Final parameter len should be optional
2018-05-17 08:53:21 -05:00
Jacob Barthelmeh
e1745428ac
add set short int helper function
2018-05-16 20:16:40 -06:00
David Garske
8163225180
Refactor of the cipher suite names to use single array, which contains internal name, IANA name and cipher suite bytes.
2018-05-16 15:29:27 -07:00
David Garske
dad574edb8
Fix to use proper type (size_t) for alignment check.
2018-05-16 14:34:16 -07:00
David Garske
52b66edf72
Fixes for a few more fsanitize issues. Added alignment for ForceZero. Added word32 aligned acceleration for ForceZeero. Added 'NO_ALIGNED_FORCEZERO' define to allow disabling aligned ForceZero acceleration. We cast the 24 left-shifts to word32 because compiler assumes signed int type, and a runtime value with MSB set results into runtime fsanitize error.
2018-05-16 13:27:13 -07:00
John Safranek
4dacd31ea4
Force to zero the buffer used to generate the DH private key.
2018-05-16 15:47:13 -04:00
John Safranek
6a31f103aa
Test Fixes
...
1. When building on VS, it didn't like using a variable for an array size. Fixed it so it was a constant.
2. In dh.c, there were a few #if that should have been #ifdef.
3. Tweaked a return value in the wolfCrypt test so it was read after being set.
2018-05-16 15:47:13 -04:00
John Safranek
12edf80e2b
FIPS Revalidation
...
1. ForceZero the odd block when using RDSEED to seed the DRBG.
2. When using FIPSv2 and Intel_ASM speedups, force RDSEED failure flag.
3. Annotate the ecc key pair checking code with NIST process references.
4. Add function to pair-wise check the DH key.
5. Add optional "Q" values for the FFDHE canned parameters from RFC 7919.
6. Enabled the ECC key checks by default for FIPS.
7. Added DH private key check function.
8. Enabled the DH key checks by default for FIPS.
2018-05-16 15:47:13 -04:00
John Safranek
ceed6e08fd
FIPS Revalidation
...
1. Add second RNG initialization API to let caller pass in a nonce.
2018-05-16 15:47:13 -04:00
John Safranek
20d8a4a376
FIPS Revalidation
...
1. Added missing pair-wise consistency test for RSA keys.
Note: This function is not available to old FIPS and user RSA.
2018-05-16 15:47:13 -04:00
John Safranek
1ff4ea1ec9
Test Fixes
...
1. Changed the ecc_sets table for Windows builds to use arrays instead of pointers to strings.
2. Updated the initializer to play nice with the Windows and not-Windows versions of the ecc_sets table.
This is a change for FIPS mode on Windows. The ecc_sets table has pointers to constants. When the FIPS POST runs, the pointers stored in the table are relocated pointers so the verify fails.
2018-05-16 15:47:13 -04:00
John Safranek
6b6ed2c42f
FIPS Revalidation
...
1. Created a new IDE project directory for WIN10.
2. Reverted the Windows IDE project files.
2018-05-16 15:47:13 -04:00
John Safranek
a8dbdd6c28
Test Fixes
...
1. Windows IDE project, clean up the preprocessor flags.
2. Add command line define to the MASM steps to set HAVE_FIPS and HAVE_FIPS_VERSION=2.
3. Disable the whole program optimization for the non-DLL builds for the file fips.c.
4. Tweaked the aes_asm.asm's code segment line to be dependant on the FIPS setting. Only place it specially for FIPSv2.
5. Reverted the Windows IDE project and copied the new setting to a WIN10 directory.
2018-05-16 15:47:13 -04:00
John Safranek
4d0a061acb
FIPS Revalidation
...
1. Updated the segment tags in the aes_asm.asm file so that it is linked in order between aes.obj and des3.obj.
2018-05-16 15:47:13 -04:00
John Safranek
3be824ad68
Test Fixes
...
1. Changed the _InitHmac() function in ssl.c to have a different name.
2. Added switch in ssl.c to use _InitHmac or _HMAC_Init depending on FIPS option.
2018-05-16 15:47:13 -04:00
John Safranek
f7fa648f77
Test Fixes
...
1. Found a problem in AES-GCM encrypt where it could step on the ciphertext with the correct sized IV.
2018-05-16 15:47:13 -04:00
John Safranek
1538ceef47
FIPS Revalidation
...
1. Update the Windows project settings.
2018-05-16 15:47:13 -04:00
John Safranek
dde1f87de9
Test Fixes
...
1. The intrinsic versions of AES_GCM_encrypt and AES_GCM_decrypt needed updates for variable length tags.
2018-05-16 15:47:13 -04:00
John Safranek
6d4777f3ca
Test Fixes
...
1. MSC doesn't allow for inline assembly. Restore the intrinsic version of AES_GCM_encrypt and AES_GCM_decrypt for MSC AES-NI builds. This is lacking AVX.
2018-05-16 15:47:13 -04:00
John Safranek
418cca5efd
Test Fixes
...
1. Something changed in the wolfSSL layer with respect to setting some constants for old FIPS mode, didn't take into account new FIPS mode.
2018-05-16 15:47:13 -04:00
John Safranek
b120a27c3e
FIPS Revalidation
...
1. Update the GenerateSeed() function for RDSEED on Windows to use the intrinsic function instead of inline assembly.
2018-05-16 15:47:13 -04:00
John Safranek
4f1dd3b9a7
Test Fixes
...
1. Update gitignore with some more VS outputs.
2. Update the Windows IDE user settings with FIPSv2 settings.
3. Remove redundant _InitHmac() function from ssl.c.
4. In wc_DhGenerateParams(), initialize the groupSz and bufSz to 0.
5. In wc_DhExportParamsRaw(), initialize pLen, qLen, and gLen to 0.
6. In wc_MakeRsaKey(), initialize isPrime to 0.
7. In ecc_test_make_pub(), initialize exportBuf and tmp to NULL and initialize the ECC key before any chance of trying to free it.
8. In fips_test.h header, update types.h include to use the wolfCrypt types rather than ctaocrypt types.
9. In fips_test.h header, change the visibility tags on all the function prototypes to use the WOLFSSL tags rather than CYASSL.
10. Change the wolfCrypt visibility tags to use CyaSSL's tags for old FIPS and the regular tags for new FIPS and non-FIPS builds.
2018-05-16 15:47:13 -04:00
John Safranek
eea4d6da50
Test Fixes
...
1. Modify RSA-PSS to be able to sign and verify SHA-384 and SHA-512 hashes with 1024-bit RSA keys.
2018-05-16 15:47:12 -04:00
John Safranek
dc31dbaeaf
FIPS Revalidation/Test Fixes
...
1. Added APIs to perform RSA-PSS verify and padding operation in the same call.
2. Change to RsaPSS sign and verify to pick the proper salt length if the key is 1024-bits and the hash is SHA-512.
2018-05-16 15:47:12 -04:00
John Safranek
27470aa704
FIPS Revalidation/Test Fixes
...
1. For FIPSv2 builds, changed the FP_MAX_BITS to 6144.
2. Fixed bug in HMAC-SHA-3 where the digest size was being used instead of the block size for processing the key.
2018-05-16 15:47:12 -04:00
John Safranek
8fb3a0c078
FIPS Revalidation
...
1. Add a copy of the DSA parameter generation function to DH for use without DSA.
2018-05-16 15:47:12 -04:00
John Safranek
6796ab5f8c
FIPS Revalidation
...
1. Bug fixes to AES-GCM. Separated out the internal and external IV set functions.
2018-05-16 15:47:12 -04:00
John Safranek
c2f964039e
FIPS Revalidation
...
1. Updated the configure.ac to add in the RSA direct function to FIPS builds
2018-05-16 15:47:12 -04:00
John Safranek
6d7599cf47
FIPS Revalidation
...
1. Add new APIs for AES-GCM so it can manage the IV per SP 800-38D.
2. Add new APIs for AES-CCM so it can manage the IV, similar to the behavior in AES-GCM.
3. Add new APIs for GMAC that use the new AES-GCM APIs.
2018-05-16 15:47:12 -04:00
John Safranek
4ba026c0bf
Test Fixes
...
1. Added error code for ECDHE FIPS KAT failure.
2018-05-16 15:47:12 -04:00
John Safranek
19da916102
Test Fixes
...
1. Removed redundant forward declaration of RsaKey from hmac.h.
2. Updated gitignore with the first and last files.
3. Updated autogen with touching the first and last files.
2018-05-16 15:47:12 -04:00
John Safranek
3685b7b176
Test Fixes
...
1. AesGcmEncrypt_ex requires the RNG, remove function if RNG disabled.
2. Fix a couple function name changes in the example server.
3. Removed the old FIPS wrapping added to dh.h, was redundant.
4. Move include of random.h in the aes.h file.
5. Fix where ecc.c was being left out of old FIPS builds.
6. Exclude the AES-GCM internal IV test case when building without the RNG.
7. Fix api test where AES-GCM Encrypt was called with a too-long IV in old FIPS mode. Non-FIPS and new FIPS are allowed longer IVs.
2018-05-16 15:47:12 -04:00
John Safranek
13ff245166
FIPS Revalidation
...
1. AES-GCM encrypt IV length allowed to be 8-bits.
2018-05-16 15:47:12 -04:00
John Safranek
90a5bde0f2
FIPS Revalidation
...
1. Update the const data and code segment tags for the Windown builds.
2018-05-16 15:47:12 -04:00
John Safranek
4b3933aa1b
FIPS Revalidation
...
1. Enabled ECC Cofactor DH for the FIPSv2 build.
2. Updated the wolfCrypt HMAC-SHA-3 test to leave out the set of test cases that use the four-byte key in FIPS mode.
2018-05-16 15:47:12 -04:00
John Safranek
33040a25d8
FIPS Revalidation
...
1. Change to configure.ac to automatically enable HKDF in FIPSv2 builds.
2018-05-16 15:47:12 -04:00
John Safranek
d0d2527950
FIPS Revalidation
...
1. Change to configure.ac to automatically enable AES-CTR in FIPSv2 builds.
2. Move the aes-ni asm file into the boundary if enabled.
3. Enable AES-ECB by default.
2018-05-16 15:47:12 -04:00
John Safranek
4bcd7b7986
AES-GCM
...
1. Updated the wolfCrypt GMAC test to leave out the test case with the 15-byte tag when building for FIPS.
2. Replace tabs with spaces.
2018-05-16 15:47:12 -04:00
John Safranek
eb1a76bf2a
FIPS Revalidation
...
1. Updated CMAC to allow tag length from 4 to 16 bytes, inclusive.
2018-05-16 15:47:12 -04:00
John Safranek
aa968eac98
FIPS Revalidation
...
1. Enable SHA-224 by default if building for FIPSv2.
2018-05-16 15:47:12 -04:00
John Safranek
fe8d46da95
FIPS Revalidation
...
1. Added new AES-GCM Encrypt API for FIPS where the IV is generated internally.
2. Fix the AES-NI guard flags so it can be used when FIPS enabled.
2018-05-16 15:47:12 -04:00
John Safranek
be61204fd7
FIPS Revalidation
...
1. Added CMAC to the boundary.
2. Added DHE to the boundary.
2018-05-16 15:47:12 -04:00
John Safranek
f6fe3744a7
FIPS Update
...
1. Moved the rest of the FIPS algorithms to FIPSv2.
2. Updated the fips-check and autogen scripts.
3. Updated the automake include for the crypto files.
4. Updated the example server to use the wolfSSL API and wolfSSL-based OpenSSL compatibility layer.
5. Added error code for the SHA-3 KAT.
6. Updated an test case in the API test for AES-GCM encrypt that is now considered a success case, but the FIPS mode was still treating as a failure.
2018-05-16 15:47:12 -04:00
John Safranek
df4d748f59
FIPS Update
...
1. Move SHA-224 and SHA-256 into FIPSv2.
2. Move HMAC into FIPSv2.
3. Move Hash_DRBG into FIPSv2.
2018-05-16 15:47:12 -04:00
John Safranek
6352208e04
FIPS Update
...
1. Add SHA-3 to the src/include.am so that it is always included in FIPSv2.
2. Tweak the SHA-3 header to follow the new FIPS pattern.
2018-05-16 15:47:12 -04:00
John Safranek
0c5d704c7f
AES-CCM FIPS
...
1. Add new error code for the AES-CCM FIPS KAT failure.
2. When enabling FIPSv2, force enable AES-CCM.
2018-05-16 15:47:12 -04:00
Jacob Barthelmeh
d373844a18
fix sequence with pkcs12 shrouded keybag creation
2018-05-16 10:16:15 -06:00
toddouska
8ff328cb39
Merge pull request #1551 from dgarske/asynccheck
...
Added new `async-check.sh` script
2018-05-16 08:02:11 -07:00
toddouska
b5e0499022
Merge pull request #1550 from dgarske/rsaverify
...
Check returned size matches signature size for RSA verify in openssl compatibility
2018-05-16 08:00:31 -07:00
toddouska
bbc178a704
Merge pull request #1548 from JacobBarthelmeh/Testing
...
fix ecc public key print with X509 print function
2018-05-16 07:59:19 -07:00
toddouska
8619062ae7
Merge pull request #1522 from dgarske/mbedtls_compat
...
Port for using AWS FreeRTOS
2018-05-16 07:57:55 -07:00
toddouska
1be8a6e4ef
Merge pull request #1502 from ejohnstown/update-m4
...
Update M4 Autoconf Files
2018-05-16 07:57:13 -07:00
Jacob Barthelmeh
566bb4cefe
version for PBE SHA1 DES oid
2018-05-16 08:38:50 -06:00
Jacob Barthelmeh
1ca62ee0a1
add error return for unsuported version
2018-05-15 22:51:11 -06:00
David Garske
f021375c4b
Fixes for fsanitize reports.
2018-05-15 17:23:35 -07:00
Jacob Barthelmeh
a6ad6b94d1
account for IGNORE_NAME_CONSTRAINTS when testing the parsing of a relative URI
2018-05-14 16:03:51 -06:00
Jacob Barthelmeh
63a0e872c5
add test for fail case when parsing relative URI path
2018-05-14 14:27:02 -06:00
John Safranek
9c33244158
Update ax_pthread.m4
...
The AX_PTHREAD macro has a check for side-effects of the pthread flag beyond the functions being available. It also checks for a particular macro being set when compiling the test file. When running the build through the scan-build static analysis, for some reason, the check value isn't set. The build fails. I commented the check out for now.
2018-05-11 17:39:51 -07:00
John Safranek
2a4d386a50
Update ax_pthread.m4
...
1. Updated to the most recent copy of ax_pthread.m4.
2. Removed the darwin-clang check m4.
3. Added a check to see if AX_PTHREAD added the flag `-Qunused-arguments` for clang and if so prepend `-Xcompiler` so libtool will use it. Otherwise when building on Sierra's clang you get "soft" warnings on the build of the dylib.
2018-05-11 10:21:47 -07:00
David Garske
83257d662a
Also check returned size matches for RSA verfiy in openssl compatability layer.
2018-05-11 17:09:07 +02:00
David Garske
af9507391a
Fixes and improvements for FreeRTOS AWS. Fixes for building openssl compatibility with FreeRTOS. Fixes for TLS 1.3 possibly uninitialized vars.
2018-05-11 16:40:32 +02:00
David Garske
cb2f1d6d7d
Added new async-check.sh script for setting up the async simulator for internal testing.
2018-05-11 16:38:24 +02:00
toddouska
7a4da340d4
Merge pull request #1547 from JacobBarthelmeh/Docs
...
add aes init function to docs
2018-05-09 16:40:36 -07:00
Jacob Barthelmeh
110c41613f
cast on return of malloc
2018-05-09 14:50:26 -06:00
Jacob Barthelmeh
d1192021a5
alter search behavior for testing if URI is a absolute path
2018-05-09 14:43:52 -06:00
Chris Conlon
c910d84507
Merge pull request #1527 from kojo1/RenesasCSPlus
...
Renesas CS+ projects
2018-05-09 10:07:16 -06:00
Takashi Kojo
66e59e4a6a
Rollback #if condition
2018-05-09 10:58:10 +09:00
Jacob Barthelmeh
bb979980ca
add test case for parsing URI from certificate
2018-05-08 16:24:41 -06:00
Jacob Barthelmeh
4ee957afa3
fix for relative URI detection
2018-05-08 10:19:51 -06:00
Jacob Barthelmeh
4f0893bda5
fix ecc public key print with X509 print function
2018-05-07 14:16:27 -06:00
Jacob Barthelmeh
fd691a5795
add aes init function to docs
2018-05-07 10:24:44 -06:00
toddouska
08165d5a16
Merge pull request #1540 from SparkiDev/tls13_ticket_fix
...
NewSessionTicket parsing error fix
2018-05-04 10:54:23 -07:00
toddouska
0fec651338
Merge pull request #1539 from cconlon/toradix
...
expose mp_toradix() when WOLFSSL_PUBLIC_MP is defined
2018-05-04 10:49:21 -07:00
toddouska
6e5258b56e
Merge pull request #1538 from dgarske/fixmatchdomainnull
...
Fix for handling match on domain name that may have a null terminator inside
2018-05-04 10:25:28 -07:00
Takashi Kojo
ecd2e75564
#ifndef FREESCALE_LTC_ECC with fe_init
2018-05-04 07:34:47 +09:00
Sean Parkinson
69ce10f292
NewSessionTicket parsing error fix
2018-05-04 08:18:54 +10:00
David Garske
3fd47bdff3
Fix for example client/server with -H exitWithRet option to make sure all cleanup is performed. Resolves valgrind report due to TicketCleanup() not being called.
2018-05-03 13:39:37 -07:00
Chris Conlon
bb7bcfd877
expose mp_toradix() when WOLFSSL_PUBLIC_MP is defined
2018-05-03 13:41:23 -06:00
toddouska
a2fa61cd3d
Merge pull request #1534 from SparkiDev/tls13_static_rsa
...
Fix TLS 1.3, change Client Hello version to work with static RSA (TLS 1.0 - TLS 1.2)
2018-05-03 12:38:55 -07:00
toddouska
1c09c06349
Merge pull request #1533 from SparkiDev/tls13_draft26
...
Allow building TLS 1.3 at draft 26
2018-05-03 12:37:39 -07:00
toddouska
74618d0e3c
Merge pull request #1532 from SparkiDev/test_fix
...
Fixes for tests
2018-05-03 11:44:01 -07:00
toddouska
73d85774df
Merge pull request #1525 from dgarske/sockclose
...
Cleanup of the socket close code
2018-05-03 11:42:30 -07:00
David Garske
325402cf5a
Minor fix for the expected failure case use of ssl after free. Renamed skipExit to exitWithRet.
2018-05-03 10:02:59 -07:00
David Garske
89a4c98670
* Added support for expected fail test cases with example client/server and suites unit test.
...
* Added test for certificate with bad alt name containing a null character mid byte stream.
* Fix for issue with suites unit test where last arg in file doesn't conain data for a param, causing it to skip test.
* Fix for last test in tests/test.conf not being run for `TLSv1.2 RSA 3072-bit DH 3072-bit`.
* Moved the `tls-cert-fail.test` tests into the new expected failure suite test (`./tests/test-fails.conf`). Now it explicilty checks RSA and ECC for the no signer and no sig tests.
2018-05-03 09:40:51 -07:00
David Garske
d43aa37041
Fix for handling match on domain name that may have a null terminator inside. The check should match on len from ASN.1 reguardless of a null character.
2018-05-03 09:33:05 -07:00
Sean Parkinson
996ee78d50
Fix Client Hello version to work with static RSA
2018-05-02 10:20:55 +10:00
Chris Conlon
d60b16c5b8
Merge pull request #1531 from kaleb-himes/FIPS-CHECK-SCRIPT
...
revert to default but exclude for sgx/netos
2018-05-01 15:14:00 -06:00
Sean Parkinson
27c3a70e13
Allow building TLS 1.3 at draft 26
2018-05-01 15:19:18 +10:00
Sean Parkinson
5845482fc0
Fixes for tests
...
Fix the benchmark client to set all groups supported.
Fix TLS 1.3 test script to work on PPC - check counter in separate test.
2018-05-01 14:27:38 +10:00
kaleb-himes
c5a39b9048
rever to default but exclude for sgx/netos projects
2018-04-30 15:17:58 -06:00
toddouska
65eb79e5cd
Merge pull request #1519 from dgarske/buildfixes
...
Build fixes for a few configurations
2018-04-30 11:49:16 -07:00
toddouska
d53716496a
Merge pull request #1521 from dgarske/tlsx_returncodes
...
Refactor of the TLSX code to support returning error codes
2018-04-30 11:46:41 -07:00
toddouska
3ad708fb20
Merge pull request #1514 from dgarske/certdates
...
Enhancements and cleanup to ASN date/time
2018-04-30 11:14:38 -07:00
toddouska
8311628f93
Merge pull request #1508 from kaleb-himes/FIPS-CHECK-SCRIPT
...
Fips check script
2018-04-30 10:50:03 -07:00
Takashi Kojo
4c5982949e
minor fix
2018-04-28 13:25:41 +09:00
toddouska
7de23d65ce
Merge pull request #1517 from dgarske/sighash
...
Added new signature wrapper functions to allow use of hash directly
2018-04-27 16:07:56 -07:00
Takashi Kojo
6e96318785
Readme.txt
2018-04-28 06:36:56 +09:00
toddouska
8ef777315a
Merge pull request #1516 from dgarske/gccarm
...
GCC-ARM IDE example improvements
2018-04-27 14:13:45 -07:00
Takashi Kojo
e69af98a7e
fix warnings
2018-04-28 06:06:45 +09:00
Takashi Kojo
3e9028387f
test project
2018-04-28 05:46:42 +09:00
Takashi Kojo
c5df9d56ad
wolfssl_lib project
2018-04-28 05:39:42 +09:00
Takashi Kojo
ac791610dd
USE_WOLF_TIMEVAL_T
2018-04-28 05:28:49 +09:00
Takashi Kojo
22a2b45108
duplicated fe_init for non-configure based IDE
2018-04-28 05:07:00 +09:00
Takashi Kojo
a91ac55e24
define valiable before exec statements
2018-04-28 05:05:45 +09:00
Takashi Kojo
2cc2f224f8
XTIME in LowResTimer
2018-04-28 05:03:51 +09:00
David Garske
e9dd44a667
Merge pull request #1524 from abrahamsonn/master
...
Doxygen landing page update
2018-04-27 11:44:00 -07:00
David Garske
3200040d1a
Cleanup of the socket close code used for examples, CRL/OCSP and BIO. Now only a single macro is responsible for closing a socket CloseSocket and all duplicate code is eliminated.
2018-04-27 10:29:19 -07:00
abrahamsonn
9424a96289
Doxygen landing page update
2018-04-27 10:56:13 -06:00
connerWolfSSL
e45f0efc3f
Documentation Fixes ( #1520 )
...
* Fixed documentation errors found by check_api script
* Formatting changes so that comments/API pairs are more obvious
2018-04-27 09:50:34 -07:00
David Garske
5c97374156
Fix for RSA RSS check to make sure RSA is enabled. Added TLS 1.3 DH check for key sizes.
2018-04-26 14:04:54 -07:00
David Garske
ef7b40dcab
Refactor of the TLSX code to support returning error codes.
...
* The `SANITY_MSG_E` responses in `TLSX_SupportedVersions_GetSize`, `TLSX_SupportedVersions_Write`, `TLSX_Cookie_GetSize` and `TLSX_Cookie_Write` would incorrectly be handled.
* Added build-time checks in `tls13.c` for dependencies on `HAVE_HKDF` and `WC_RSA_PSS`.
2018-04-26 11:30:57 -07:00
David Garske
fe4cbb2a03
Fix for Jenkins report Expected Configurations Test - NIGHTLY BUILD #267, building ./configure --disable-asn --disable-ecc --disable-rsa --enable-psk --enable-sni. Reported unused variables, parameters and function.
2018-04-26 05:47:48 -07:00
David Garske
04626c6a1f
Fixes build issue using wrong DES define for WC_MAX_SYM_KEY_SIZE macro. Reproduced using ./configure --enable-leanpsk --enable-des3. Fixes issue #1518 .
2018-04-26 05:35:04 -07:00
David Garske
fc02003f76
Added new signature wrapper functions to allow direct use of hash wc_SignatureVerifyHash and wc_SignatureGenerateHash. These new function abstract existing signature wrapper code, so minimal code size increase. Added test cases for new functions for RSA (with and without DER encoding) and ECC.
2018-04-25 13:10:53 -07:00
toddouska
c1d4f659ad
Merge pull request #1511 from ejohnstown/dist-tweak
...
Make Dist Automation Tweak
2018-04-25 10:56:40 -07:00
toddouska
107290b552
Merge pull request #1515 from dgarske/buildfixes
...
Fixes for various build configurations
2018-04-25 10:23:27 -07:00
toddouska
5c61810d4d
Merge pull request #1497 from SparkiDev/tls13_draft28
...
Tls13 draft28
2018-04-25 10:17:37 -07:00
David Garske
a9f32c30da
Fix for SGX build after C99 changes strings.h: No such file or directory.
2018-04-25 07:56:54 -07:00
David Garske
3c684886ad
Fixes to resolve building --enable-tls13 --disable-ecc --enable-curve25519 --enable-ed25519.
2018-04-25 07:54:53 -07:00
David Garske
089e1b6b9b
Fix for expected Configurations Test - NIGHTLY BUILD #265 and ifdef cleanup.
2018-04-25 07:54:53 -07:00
David Garske
2e6c195b43
GCC-ARM IDE improvements:
...
* Added documentation for `ECC_USER_CURVES`.
* Added option for RSA PSS padding support.
2018-04-24 15:26:53 -07:00
David Garske
65c9277213
More fixes from Jenkins testing.
2018-04-24 14:01:33 -07:00
toddouska
ff1559275d
Merge pull request #1512 from dgarske/c99
...
Fixes to resolve issues with c99 compliance
2018-04-24 13:36:41 -07:00
toddouska
1ddccf63dc
Merge pull request #1496 from JacobBarthelmeh/Compatibility-Layer
...
Compatibility layer
2018-04-24 13:33:33 -07:00
David Garske
e63afa08bd
Fix a couple of minor Jenkins issues.
2018-04-24 13:25:28 -07:00
David Garske
56025f38b9
Enhancements and cleanup to ASN date/time:
...
* Refactor the ASN get date logic to combine shared code.
* Added new API `wc_GetDateInfo` to get raw date, format and length.
* Added new API `wc_GetCertDates` to extract certificate before/after dates as `struct tm` type.
* Added new API `wc_GetDateAsCalendarTime` which parses the raw date string and convers to `struct tm`.
* Added tests for new API's.
* Added missing tests for `wc_SetAltNames`, `wc_SetAltNamesBuffer` and `wc_SetDatesBuffer`.
* Fixed build for older `NO_TIME_H` macro.
2018-04-24 13:04:36 -07:00
David Garske
b48a9ded15
Fix to allow user to force build using WOLF_C99 option.
2018-04-23 13:52:58 -07:00
David Garske
289a282183
Fixes to resolve issues with c99 compliance (building with ./configure CFLAGS="-std=c99").
...
* Fix for ReadDir checking for file flag to use `S_ISREG(ctx->s.st_mode)` syntax.
* Added macro for strsep `XSTRSEP`. Added wolf implementation as `wc_strsep` enabled as C99 or `USE_WOLF_STRSEP`.
* Fix to use `gethostbyname` for c99 instead of `getaddrinfo`.
* For c99 use wolf strtok `wc_strtok`.
* Exposed API's for `wc_strtok` and `wc_strsep` when available.
* Include `sys/time.h` when available from autocon `HAVE_SYS_TIME_H` or c99.
* include `<strings.h>` when `HAVE_STRINGS_H` or c99.
2018-04-23 13:47:22 -07:00
Eric Blankenhorn
568d24c63c
Coverity fixes ( #1509 )
...
* Coverity fixes 3
2018-04-23 09:20:28 -07:00
John Safranek
9831a8ac94
Added a dist-hook target to the Makefile to copy the default options.h.in over options.h.
2018-04-20 11:07:57 -07:00
thivyaashok
7d425a5ce6
Added support for an anonymous cipher suite ( #1267 )
...
* Added support for cipher suite TLS_DH_anon_WITH_AES256_GCM_SHA384
* Added test cases for verification of anonymous cipher suite
2018-04-20 10:35:37 -07:00
thivyaashok
853756a73c
Added a TLS alert message 115 ( #1391 )
...
Added a new TLS alert message `unknown_psk_identity` (115) from RFC 4279, section 2.
2018-04-20 10:23:57 -07:00
Sean Parkinson
94157634e1
TLS 1.3 fixes/improvements
...
Support Draft 28: able to compile code to return BAD_BINDER if no PSKs
match and certificates not to be used.
Change key share implementation to use server preference - server now
checks each client key share's group is in supported_groups extension.
Client and server examples modified to support server preference.
Application can set client's and server's supported groups by rank.
Server's supported groups is sent back in encrypted_extensions if
preferred group is not in client's list - able to be turned off at
compile time.
Application can query server's preferred group from client.
Able to compile using 0x0304 as version instead of draft version.
Fix state machine in TLS 1.3 to support unexpected hello_retry_request.
Also fixes non-blocking.
Fix resumption to use the named group from session.
Fix named group in session structure to be a 2-byte field.
Better detection of errors in message flow.
Fix DoTls13ClientHello when downgrading - don't do TLS 1.3 things.
Not downgrading on client fixed.
Downgrade protocol version from TLS 1.3 when not TLS 1.3 ciphersuite.
Get downgrading from TLS 1.3 and resumption working.
Change earlyData value to an enum.
Support no extensions data (as opposed to zero length extension data) in
TLS 1.3 ClientHello.
Check PSK cipher suite is available to both client and server before
using.
Check first PSK identity chosen when server says it is using early data
at client.
Check PSK extension is last in client_hello on server.
Check the PSK cipher suite to use is supported on client.
Check the returned cipher suite for pre-shared keys is the same as
client expects.
Send alert decrypt_error when verification fails in certificate_verify
or finished message doesn't match calculated value.
Fail when certificate messages recieved in handshake when using PSK.
Validate on the server that EndOfEarlyData message has been recieved
before finished message when server sent EarlyData extension.
2018-04-20 09:44:02 +10:00
kaleb-himes
3476a9b55a
versions for Baxter updated, new tag in fips v3.12.6
2018-04-19 15:24:22 -06:00
David Garske
9e4bb3fee1
Merge pull request #1504 from SparkiDev/nginx-pemenc
...
Key derivation for encrypted PEM uses salt length of 8 in OpenSSL
2018-04-19 11:23:39 -07:00
David Garske
f7cb5c5c15
Merge pull request #1507 from kaleb-himes/README-update
...
Bring special notes inline with commit 8edbca1b21b6fcd6d09910c66bbf35…
2018-04-19 11:17:25 -07:00
JacobBarthelmeh
b7c61a72c8
Merge pull request #1503 from kojo1/Ticket3793
...
HMAC with SHA2
2018-04-19 09:38:55 -06:00
kaleb-himes
23615dd15f
Bring special notes inline with commit 8edbca1b21
2018-04-18 09:58:03 -06:00
Takashi Kojo
bf950198f2
api.c: option conditions
2018-04-18 13:02:40 +09:00
Sean Parkinson
6689ee965a
Key derivation for encrypted PEM uses salt length of 8 in OpenSSL
2018-04-18 12:37:06 +10:00
Takashi Kojo
7c7913264b
remove printf
2018-04-18 09:25:24 +09:00
Takashi Kojo
56af3a5b36
add HMAC SHA2
2018-04-18 08:47:39 +09:00
Jacob Barthelmeh
57d40bc6d1
remove internal data types in ssl.h
2018-04-17 15:57:23 -06:00
John Safranek
11065f9222
added the missing macro file ax_require_defined.m4.
2018-04-17 13:23:17 -07:00
brian@tangent.org
48b3aa90d3
Update autoconf m4 files, except pthreads which should be its own commit
2018-04-17 13:20:33 -07:00
John Safranek
a116b5ba83
Merge pull request #1500 from BrianAker/patch-1
...
Adding Copyright notice to autoconf files.
2018-04-17 11:15:36 -07:00
toddouska
09706a4ed2
Merge pull request #1488 from SparkiDev/tls13_perf
...
Changes for interop and performance
2018-04-16 09:16:13 -07:00
Brian Aker
3179d6ce2b
Adding Copyright notice to autoconf files.
2018-04-14 22:30:02 -10:00
toddouska
942c720dc4
Merge pull request #1499 from ejohnstown/aes-asm
...
AES assembly file name change
2018-04-13 11:23:03 -07:00
Jacob Barthelmeh
e895bacbba
update before/after dates with certificates
2018-04-13 09:31:32 -06:00
Jacob Barthelmeh
f9eda5d790
free test certificate after use
2018-04-13 09:16:22 -06:00
Eric Blankenhorn
a0d8327320
Coverity fixes 2 ( #1493 )
...
* Coverity fixes for wolfcrypt folder
* Fixes for remaining issues
* Fixes for test files
2018-04-13 05:35:18 -07:00
Sean Parkinson
9600266483
WOLFSSL_FUNC_TIME changes
...
Warning in code about using this define.
Remove usage of WOLFSSL_FUNC_TIME from server.c.
2018-04-13 12:13:31 +10:00
Sean Parkinson
0b47811c46
Changes for interop and performance
...
Changes made to test.h to allow interop of PSK with OpenSSL.
Changes to allow server to pre-generate key share and perform other
operations at later time.
Fix ChaCha20 code header to have bigger state to support assembly code
for AVX1.
Fix Curve25519 code to use define instead.
Change Curve25519 to memset all object data on init.
Change Poly1305 to put both sizes into one buffer to avoid a second call
to wc_Poly1305Update().
Added WOLFSSL_START and WOLFSSL_END API and calls to show time of
protocol message function enter and leave to analyse performance
differences.
Moved Curve25519 code in KeyShare extension out of general ECC code.
2018-04-13 12:01:20 +10:00
John Safranek
425cee64a7
AES assembly file name change
...
Some versions of GCC on the Mac will not run the file aes_asm.s through the preprocessor. There are some ifdefs in the file that are included when they shouldn't be. This is not a problem on Linux. Renaming the file to have a capital S extension forces the assembler to run with the preprocessor.
2018-04-12 16:47:58 -07:00
toddouska
84f7bd8cde
Merge pull request #1494 from dgarske/wpas
...
Fix for building wpa_supplicant
2018-04-12 13:49:31 -07:00
toddouska
eacd98fe4e
Merge pull request #1491 from dgarske/config
...
Configure improvements and new options
2018-04-12 13:48:20 -07:00
toddouska
8f1e8be2d0
Merge pull request #1490 from dgarske/hashoid_cleanup
...
Hash OID cleanup
2018-04-12 13:46:47 -07:00
Jacob Barthelmeh
cfaed48f90
adjust GetInt call with ASN1 integer to big number
2018-04-12 14:40:20 -06:00
Jacob Barthelmeh
df06707496
Handle larger values with ASN1 INTEGER structure
2018-04-12 14:07:29 -06:00
David Garske
cf1230d232
Fix for building wpa_supplicant (./configure --enable-wpas) after PemToDer refactor in PR #1467 .
2018-04-12 06:53:44 -07:00
David Garske
1f7b954d47
Fix for wc_GetCTC_HashOID in FIPS mode. Uses the new wc_HashTypeConvert to handle conversion from unique WC_ALGO (int) to WC_HASH_TYPE_ALGO (enum wc_HashType).
2018-04-12 06:51:23 -07:00
David Garske
ce6728951f
Added a new --enable-opensslall option, which ensures all openssl features are enabled. Documented and tested building the various open source defines we support in our build.
2018-04-11 13:54:07 -07:00
David Garske
689203d310
Added some more features to the --enable-all. Added new --enable-webclient option.
2018-04-11 13:54:07 -07:00
David Garske
ee5d78f84f
Added new wc_OidGetHash API for getting the hash type from a hash OID. Refactor PKCS7 and PKCS12 to use new API and reduce duplicate ocde. Updated wc_GetCTC_HashOID to use wc_HashGetOID and maintain back compat.
2018-04-11 13:53:30 -07:00
toddouska
d85580691b
Merge pull request #1492 from dgarske/fix_noasn_pwdbased
...
Fixes for ASN disabled and PWDBASED enabled / Win FIPS
2018-04-11 12:09:30 -07:00
David Garske
83bfdb1594
Fix for issue with unique hash types on ctoacrypt FIPS using different values than WC_HASH_TYPE_*. Add new API wc_HashTypeConvert to handle the conversion between enum wc_HashType and int. For FIPS it uses a switch() to convert and for non-FIPS it uses a simple cast. Changed the pwdbased_test to return actual ret instead of adding values (made it difficult to track down error location).
2018-04-11 09:30:30 -07:00
David Garske
3f3e332a3a
Fix for evp.c statement will never be executed in wolfSSL_EVP_CIPHER_CTX_block_size.
2018-04-11 08:18:39 -07:00
David Garske
38aa56cc40
Fix for Windows FIPS build in current master. Resolves issue with missing DES/AES key size enums.
2018-04-10 20:07:14 -07:00
David Garske
565f394972
Fix for building without ASN and PWDBASED enabled (./configure --disable-asn --enable-pwdbased).
2018-04-10 16:36:11 -07:00
toddouska
e25da80766
Merge pull request #1467 from dgarske/asnpemtoder
...
PEM Encrypted Keys cleanup and PemToDer move to wolfCrypt asn.c
2018-04-09 16:33:30 -07:00
David Garske
a38576146e
* Added support for disabling PEM to DER functionality using WOLFSSL_PEM_TO_DER. This allows way to use with DER (ASN.1) certificates only in an embedded environment. This option builds, but internal make check requires PEM support for tests.
...
* More cleanup to move PEM functions from ssl.c to asn.c (`wolfSSL_CertPemToDer`, `wolfSSL_KeyPemToDer`, `wolfSSL_PubKeyPemToDer`). Renamed these API's to `wc_` and added backwards compatability macro for old function names.
2018-04-09 13:28:15 -07:00
David Garske
5a46bdf6f6
Added unit test for using encrypted keys with TLS. Only works with --enable-des3, since the keys are all encrypted with DES3 (also requires either --enable-opensslextra or --enable-enckeys).
2018-04-09 13:28:15 -07:00
David Garske
d68a6fb4c7
Make sure wc_encrypt.h includes the ciphers.
2018-04-09 13:28:15 -07:00
David Garske
98c186017a
Fixes for build failures. Added new WC_MAX_SYM_KEY_SIZE macro for helping determine max key size. Added enum for unique cipher types. Added CHACHA_MAX_KEY_SZ for ChaCha.
2018-04-09 13:28:15 -07:00
David Garske
2c72f72752
Fixes for FIPS, sniffer (w/o enc keys), scan-build issues and backwards compatability.
2018-04-09 13:28:15 -07:00
David Garske
9be11bf62c
Fix to correct missing wolfSSL_EVP_BytesToKey header int he NO_MD5 case.
2018-04-09 13:28:15 -07:00
David Garske
1f00ea2115
Fixes for various build issues with type casting and unused functions. Moved mystrnstr to wc_port.c. Added some additional argument checks on pwdbased.
2018-04-09 13:28:15 -07:00
David Garske
e60032b961
Fix for duplicate API defs.
2018-04-09 13:28:15 -07:00
David Garske
b01535b483
Fix for stray character.
2018-04-09 13:28:15 -07:00
David Garske
8a31f13cb6
Remove obsolete WOLFSSL_PEMPUBKEY_TODER_DEFINED header logic.
2018-04-09 13:28:15 -07:00
David Garske
6de8348918
Fixes for various build configurations. Added --enable-enckeys option to enable support for encrypted PEM private keys using password callback without having to use opensslextra. Moved ASN CryptKey function to wc_encrypt.c as wc_CryptKey. Fixup some missing heap args on XMALLOC/XFREE in asn.c.
2018-04-09 13:28:15 -07:00
David Garske
1315fad7dc
Added ForceZero on the password buffer after done using it.
2018-04-09 13:28:15 -07:00
David Garske
3a8b08cdbf
Fix to move the hashType out of EncryptedInfo. Fix for parsing "DEC-Info: ". Fix for determining when to set and get ivSz.
2018-04-09 13:28:15 -07:00
David Garske
c83e63853d
Refactor unqiue hash types to use same internal values (ex WC_MD5 == WC_HASH_TYPE_MD5). Refactor the Sha3 types to use wc_ naming.
2018-04-09 13:28:15 -07:00
David Garske
264496567a
Improvements to EncryptedInfo. Added build option WOLFSSL_ENCRYPTED_KEYS to indicate support for EncryptedInfo. Improvements to wc_PBKDF1 to support more hash types and the non-standard extra data option.
2018-04-09 13:28:15 -07:00
David Garske
f9e830bce7
First pass at changes to move PemToDer into asn.c.
2018-04-09 13:28:14 -07:00
toddouska
2ded38ec2b
Merge pull request #1485 from dgarske/tlskeygeneccorcurve
...
Fix TLS 1.3 with ED25519/CURVE25519 enabled and ECC disabled
2018-04-09 12:12:31 -07:00
David Garske
21833e245f
Fix TLS 1.3 with ECC disabled and CURVE25519 enabled. Resolves issue with using ./configure --disable-ecc --enable-curve25519 --enable-ed25519 --enable-tls13. Refactor TLSX_KeyShare_GenEccKey to support either ECC or CURVE25519. Fix for PemToDer to handle ED25519 without ECC enabled.
2018-04-09 10:10:08 -07:00
David Garske
2a460d3d05
Merge pull request #1484 from embhorn/coverity
...
Coverity fixes
2018-04-06 18:18:38 -07:00
Eric Blankenhorn
36b9b0b558
Updates from code review
2018-04-06 17:29:27 -05:00
Eric Blankenhorn
86767e727c
Fixes for CID 185033 185028 185142 185064 185068 185079 185147
2018-04-06 13:15:16 -05:00
Eric Blankenhorn
d2c1a1906d
Fixes for CID 184980 185017 185047 185167
2018-04-06 11:10:37 -05:00
toddouska
6090fb9020
Merge pull request #1483 from dgarske/winvs
...
Fixes for unused `heap` warnings
2018-04-06 09:01:49 -07:00
toddouska
e56209cee4
Merge pull request #1482 from dgarske/nourand
...
Added new define `NO_DEV_URANDOM` to disable the use of `/dev/urandom`
2018-04-06 09:00:37 -07:00
Eric Blankenhorn
920e6ed911
Fix warning in ssl.c
2018-04-06 09:30:54 -05:00
Eric Blankenhorn
c6ad885459
Coverity fixes for tls.c/n CID 184996 185112 185122
2018-04-06 09:08:00 -05:00
Eric Blankenhorn
ec429e50b1
Fixes for ssl.c
2018-04-06 07:45:12 -05:00
David Garske
426335b68f
Found additional VS unused heap warnings. Replace tabs with 4-spaces.
2018-04-05 12:28:32 -07:00
toddouska
2b48a074eb
Merge pull request #1480 from dgarske/extcache
...
Fix for HAVE_EXT_CACHE callbacks not being available without OPENSSL_EXTRA
2018-04-05 10:52:44 -07:00
David Garske
bab62cc435
Added new define NO_DEV_URANDOM to disable the use of /dev/urandom. Added better named define WC_RNG_BLOCKING to indicate block w/sleep(0) is okay.
2018-04-05 09:34:43 -07:00
David Garske
ede006b3e1
Merge pull request #1479 from JacobBarthelmeh/HardwareAcc
...
Fix PIC32 AES-CBC and add test case
2018-04-05 09:15:08 -07:00
Eric Blankenhorn
5439402c1d
Refactor for max record size ( #1475 )
...
* Added new internal function `wolfSSL_GetMaxRecordSize`.
* Modified tls_bench to use dynamic buffer based on max record size.
* Added comment for DTLS maxFragment calculation.
2018-04-05 09:11:58 -07:00
David Garske
412d4d76ee
Fix for HAVE_EXT_CACHE callbacks not being available without OPENSSL_EXTRA defined. Added tests for external cache callbacks.
2018-04-05 07:10:04 -07:00
toddouska
a1d6bc68de
Merge pull request #1478 from dgarske/fixeccmaxsize
...
Fix for ECC max bits
2018-04-04 16:27:15 -07:00
Jacob Barthelmeh
815219b589
fix pic32 AES-CBC and add test case
2018-04-04 16:09:11 -06:00
David Garske
bc76f57959
Fix for ECC max bits ( MAX_ECC_BITS).
2018-04-04 13:39:14 -07:00
David Garske
a78c6ba4ea
Fix for unused heap warnings.
2018-04-04 12:51:45 -07:00
toddouska
aa660bc9b8
Merge pull request #1477 from dgarske/fix_strtok
...
Fix for issue with `wc_strtok` function declaration
2018-04-04 12:35:38 -07:00
David Garske
2189827287
Fix for issue with wc_strtok function declaration not being available because of include order. Fixes issue #1469 .
2018-04-04 10:41:14 -07:00
toddouska
0da4a8f1fe
Merge pull request #1476 from dgarske/fix_haveextcache
...
Fix building with `HAVE_EXT_CACHE` when `OPENSSL_EXTRA` is not defined
2018-04-04 10:34:07 -07:00
toddouska
2deb977ecf
Merge pull request #1473 from dgarske/pkcs7_norsa
...
Enabled PKCS7 support without RSA
2018-04-04 10:33:11 -07:00
toddouska
960d2ec031
Merge pull request #1471 from JacobBarthelmeh/Fuzzer
...
sanity check on buffer read
2018-04-04 10:31:55 -07:00
toddouska
1196a3b64d
Merge pull request #1455 from dgarske/nitroxv
...
Nitrox V fixes and additions
2018-04-04 10:27:53 -07:00
David Garske
5702e8ee48
Fix building with HAVE_EXT_CACHE when OPENSSL_EXTRA is not defined. Fixes issue #1474 .
2018-04-04 09:02:52 -07:00
David Garske
c288d0815d
Added support for building and using PKCS7 without RSA (assuming ECC is enabled).
2018-04-03 09:26:57 -07:00
David Garske
0c898f513d
Nitrox V fixes and additions:
...
* Added support for ECC, AES-GCM and HMAC (SHA-224 and SHA3).
* Fixes for Nitrox V with TLS.
* ECC refactor for so key based `r` and `s` apply only when building with `WOLFSSL_ASYNC_CRYPT`.
* ECC refactor for `e` and `signK` to use key based pointer for Nitrox V.
* Improved the Nitrox V HMAC to use start, update and final API's instead of caching updates.
* Fix for Intel QuickAssist with unsupported HMAC hash algos using `IntelQaHmacGetType` (such as SHA3).
* Added new API `wc_mp_to_bigint_sz` to zero pad unsigned bin.
* Fix for AES GCM to gate HW use based on IV len in aes.c and remove the gate in test.c.
* Implemented workaround to use software for AES GCM Nitrox V hardware and 13 byte AAD length for TLS.
* New debug option `WOLFSSL_NITROX_DEBUG` to add pending count.
2018-04-03 09:14:20 -07:00
Eric Blankenhorn
adb817e8d2
Feature update for tls_bench test that will allow passing in arguments ( #1466 )
...
* Feature update for tls_bench test that will allow passing in command line arguments that enable test features.
* Fix type conversion errors.
* Fixed use of uninitialized data. Declare DH arrays as const.
2018-04-02 14:00:34 -07:00
Jacob Barthelmeh
6a1013888f
sanity check on buffer read
2018-04-02 14:30:58 -06:00
JacobBarthelmeh
b33feb9dbf
Merge pull request #1470 from kojo1/EVP
...
EVP_CipherUpdate return value for inlen == 0
2018-04-02 14:03:48 -06:00
Takashi Kojo
c60d9ff983
if(ret != 1) error
2018-04-01 13:27:08 +09:00
Takashi Kojo
1c0b84d47d
openSSL compatibility, EVP_CipherUpdate, if(inlen == 0)return 1;
2018-04-01 12:13:18 +09:00
kaleb-himes
effaa18b32
Fixing some kinks
2018-03-30 12:46:59 -06:00
Chris Conlon
87c1658ab8
Merge pull request #1464 from jrblixt/unitTest_api_addPkcs7-nightlyBuildFix2
...
Nightly build fix for PKCS#7 errors.
2018-03-29 15:26:11 -06:00
toddouska
86a5330b31
Merge pull request #1462 from ejohnstown/cxxflags
...
Configure Update
2018-03-28 16:41:15 -07:00
John Safranek
e59bb43878
Configure Update
...
Revise default compiler optimization flags enable name to something more descriptive.
2018-03-28 13:19:46 -07:00
toddouska
3a8a7b8a55
Merge pull request #1458 from dgarske/cleanupthreaded
...
wolfCrypt ECC FP cleanup for thread local storage cases
2018-03-28 12:25:20 -07:00
John Safranek
e6a19bb1e8
Configure Update
...
Add a disable option to turn off the default optimization options so the user may set their own in a CFLAGS.
2018-03-27 16:41:39 -07:00
jrblixt
1cd6075b9d
Nightly build fix.
2018-03-27 16:54:14 -06:00
David Garske
c9d840ed8d
Fix for the HAVE_THEAD_LS case with FP_ECC where starting a new thead and doing ECC operations and not calling wc_ecc_fp_free. Added missing wolfCrypt_Init to API docs.
2018-03-27 14:29:39 -07:00
toddouska
f62d372bbe
Merge pull request #1461 from cconlon/netbsd-update
...
update NetBSD fips-check version to include selftest ECDSA fix
2018-03-27 13:28:49 -07:00
toddouska
9de2bdce24
Merge pull request #1460 from dgarske/winecc
...
Enable ECC, AES-GCM and SHA-512/384 by default in VS
2018-03-27 13:28:23 -07:00
toddouska
504b13530e
Merge pull request #1459 from cconlon/selftest_fixes
...
Fix for wolfCrypt test and CAVP selftest build
2018-03-27 13:27:28 -07:00
John Safranek
477d2413cd
Configure Update
...
1. Initialize CXXFLAGS (C++ compiler flags) the same way we do CFLAGS.
2. Add CPPFLAGS (C preprocessor flags) to the options.h file with the other CFLAGS.
2018-03-27 10:23:44 -07:00
toddouska
9f231e0020
Merge pull request #1453 from dgarske/ecc508a_linux
...
Support for building with `WOLFSSL_ATECC508A` on other targets
2018-03-27 09:57:39 -07:00
David Garske
42e6ea8685
Added ECC_TIMING_RESISTANT to eliminate harden warnings.
2018-03-26 15:54:29 -07:00
David Garske
8fbc765dba
Enable ECC, AES-GCM and SHA-512/384 by default in Windows Visual Studio projects.
2018-03-26 15:09:51 -07:00
Chris Conlon
9edaac8e1c
update NetBSD fips-check version to include selftest ECDSA fix
2018-03-26 14:37:39 -06:00
Chris Conlon
021560035b
fix unused var warning for extNameConsOid with IGNORE_NAME_CONSTRAINTS
2018-03-26 09:43:37 -06:00
Chris Conlon
d2aa7d0a37
exclude ecc_import_unsigned test when building for CAVP selftest
2018-03-23 16:31:17 -06:00
Chris Conlon
c08f5b86cf
Merge pull request #1444 from jrblixt/unitTest_api_addPkcs-PR03162018
...
Unit test functions for PKCS#7.
2018-03-23 10:00:33 -06:00
toddouska
aee6f4d0ca
Merge pull request #1457 from dgarske/base16
...
Base16/64 improvements
2018-03-22 15:14:57 -07:00
jrblixt
316a2b9fb4
Review changes: Chris.
2018-03-22 15:35:25 -06:00
toddouska
a92696edec
Merge pull request #1454 from dgarske/noprivkey
...
Support for not loading a private key when using `HAVE_PK_CALLBACKS`
2018-03-22 12:47:22 -07:00
toddouska
040e0ab752
Merge pull request #1456 from dgarske/iocbname
...
Refactor IO callback function names to use `_CTX_`
2018-03-22 12:40:48 -07:00
toddouska
43f4faa7be
Merge pull request #1452 from cconlon/mcapifix
...
fix unused param warning with NO_ERROR_STRINGS
2018-03-22 12:39:19 -07:00
David Garske
3bf325290d
Base16/64 improvements:
...
* Add define `WOLFSSL_BASE16` to explicitly expose base16 support.
* Add `./configure --enable-base16` option (disabled by default in configure, but enabled in coding.h when required internally).
* Added base16 tests in test.c `base16_test`.
* Enabled base64 decode tests when `WOLFSSL_BASE64_ENCODE` is not defined.
2018-03-22 10:36:56 -07:00
David Garske
0cff2f8b10
Replace use of PUB_KEY_SIZE (from CryptoAuthLib) with new ECC_MAX_CRYPTO_HW_PUBKEY_SIZE.
2018-03-22 09:45:27 -07:00
David Garske
8c4bfd825a
Support for building the ATECC508A without WOLFSSL_ATMEL defined, which enables features specific to Atmel Studio Framework (ASF) and an embedded target. This allows for building with WOLFSSL_ATECC508A defined on other targets such as Linux.
2018-03-22 09:39:21 -07:00
Chris Conlon
2989c73411
Merge pull request #1447 from JacobBarthelmeh/PKCS7
...
remove pkcs7 requirement of x963kdf when ecc is disabled
2018-03-22 10:01:55 -06:00
David Garske
e564c973b6
Refactor IO callback function names to use _CTX_ to eliminate confusion about the first parameter.
2018-03-21 16:08:55 -07:00
David Garske
4b51431546
Fix for possible unused ctx in wolfSSL_CTX_IsPrivatePkSet when no ECC, RSA or ED25519.
2018-03-21 15:46:08 -07:00
toddouska
104f7a0170
Merge pull request #1451 from JacobBarthelmeh/Optimizations
...
Adjust X509 small build and add more macro guards
2018-03-21 15:15:27 -07:00
toddouska
f3d0879ed7
Merge pull request #1449 from dgarske/asn_nullterm
...
ASN improvements for building header/footer in `wc_DerToPemEx`
2018-03-21 15:13:46 -07:00
toddouska
2a356228be
Merge pull request #1445 from SparkiDev/wpas_fix
...
Fixes for wpa_supplicant
2018-03-21 15:11:43 -07:00
David Garske
dbb34126f6
* Added support for not loading a private key for server or client when HAVE_PK_CALLBACK is defined and the private PK callback is set. Tested with all cipher suites, TLS 1.2/1.3, client/server certs, RSA/ECC/ED25519.
...
* Added PK callback context tests for client/server examples (`SetupPkCallbackContexts`).
* Added new test define for `TEST_PK_PRIVKEY` to allows simulating hardware based private key.
* Added new test.h function for loading PEM key file and converting to DER (`load_key_file`).
* Added way to get private key signature size (`GetPrivateKeySigSize`).
* Added new ECC API `wc_ecc_sig_size_calc` to return max signature size for a key size.
* Added inline comments to help track down handshake message types.
* Cleanup of RSS PSS terminating byte (0xbc) to use enum value.
* Fixed bug with PK callback for `myEccVerify` public key format.
* Fixed bug with PK callback for ED25519 verify key buffer in DoServerKeyExchange.
2018-03-21 11:27:08 -07:00
Jacob Barthelmeh
26bb86690a
fix for unused parameter warning
2018-03-21 10:06:06 -06:00
Chris Conlon
14bb14c6ab
fix unused param warning with NO_ERROR_STRINGS
2018-03-21 09:56:08 -06:00
Jacob Barthelmeh
90f97f4a5a
fix for unused variable
2018-03-21 09:16:43 -06:00
Jacob Barthelmeh
0aa3b5fa0e
macros for conditionally compiling code
2018-03-21 00:09:29 -06:00
Jacob Barthelmeh
d9917049c4
use bit fields with WOLFSSL_CTX structure
2018-03-20 22:07:42 -06:00
Jacob Barthelmeh
087df8f1cd
more macro guards to reduce size
2018-03-20 17:15:16 -06:00
Sean Parkinson
c9c2e1a8a7
Don't base signature algorithm support on certificate
...
The signature algorithm support is what you can do with another key, not
what you can do with your key.
2018-03-21 08:33:54 +10:00
Jacob Barthelmeh
4d65e4cc1e
add WOLFSSL_NO_DH186 macro to optionally compile out DH186 function
2018-03-20 15:31:20 -06:00
Jacob Barthelmeh
df6ea54cd5
add support for PKCS8 decryption to OPENSSL_EXTRA_X509_SMALL build
2018-03-20 15:06:35 -06:00
jrblixt
2788183e79
Known config. tests fix.
2018-03-20 14:35:26 -06:00
toddouska
bba0a3e88c
Merge pull request #1448 from dgarske/ecc_cleanup
...
ECC import/export cleanups and additions
2018-03-20 11:05:15 -07:00
toddouska
38d1eea8cd
Merge pull request #1446 from SparkiDev/tls13_draft27
...
TLS v1.3 support for Draft 23 and Draft 27
2018-03-20 09:13:03 -07:00
toddouska
18879ce271
Merge pull request #1440 from dgarske/VerifyRsaSign_PKCallback
...
Added VerifyRsaSign PK callback
2018-03-20 09:02:18 -07:00
David Garske
764aec071c
Further improvement to the null termination and newline logic in wc_DerToPemEx.
2018-03-19 22:58:18 -07:00
David Garske
59aa893260
Cleanup ECC point import/export code. Added new API wc_ecc_import_unsigned to allow importing public x/y and optional private as unsigned char. Cleanup wc_ecc_sign_hash to move the hardware crypto code into a separate function. Added missing tests for wc_ecc_export_public_raw, wc_ecc_export_private_raw and new test for wc_ecc_import_unsigned.
2018-03-19 13:28:57 -07:00
toddouska
87c70e76a9
Merge pull request #1441 from dgarske/ocsp_nb
...
Fix for handling OCSP with non-blocking
2018-03-19 12:05:59 -07:00
David Garske
2cc1a1c5bf
Renamed callbacks for VerifySign to SignCheck. Switched the new callback context to use the one for the sign. Fix for callback pointer check on VerifyRsaSign. Added inline comments about the new RsaSignCheckCb and RsaPssSignCheckCb.
2018-03-19 10:19:24 -07:00
toddouska
cb8f8a953b
Merge pull request #1438 from SparkiDev/nginx_pem_write
...
Fix PEM_write_bio_X509 to work with new BIO code
2018-03-19 09:13:51 -07:00
toddouska
1040cf9caa
Merge pull request #1437 from dgarske/eccrsrawtosig
...
Added new ECC API `wc_ecc_rs_raw_to_sig`
2018-03-19 09:12:39 -07:00
Jacob Barthelmeh
467608b6c9
remove pkcs7 requirement of x963kdf when ecc is disabled
2018-03-19 10:08:46 -06:00
toddouska
7ce2efd572
Merge pull request #1431 from JacobBarthelmeh/Optimizations
...
more aes macro key size guards
2018-03-19 09:07:05 -07:00
toddouska
b28c6a394f
Merge pull request #1428 from JacobBarthelmeh/Certs
...
Update to certificate renew scripts
2018-03-19 09:05:15 -07:00
Sean Parkinson
bd53d7ba59
TLS v1.3 support for Draft 23 and Draft 27
...
Draft 24: Second ClientHello usees version 0x0303 - no change.
Draft 25: The record layer header is now additional authentication data to
encryption.
Draft 26: Disallow SupportedVersion being used in ServerHello for
negotiating below TLS v1.3.
Draft 27: Older versions can be negotiated (by exclusion of 0x0304) in
SupportedVersion - no change.
2018-03-19 16:15:02 +10:00
Sean Parkinson
b325e0ff91
Fixes for wpa_supplicant
2018-03-19 11:46:38 +10:00
John Safranek
465f1d491f
Merge pull request #1443 from cconlon/dhagree
...
check z against 1 in wc_DhAgree()
2018-03-17 20:15:31 -07:00
David Garske
250cd3b7eb
Merge pull request #1433 from SparkiDev/sp_size
...
Fix size on Intel and improve 32-bit C code performance
2018-03-16 17:05:46 -07:00
jrblixt
1aba6e9b44
Prepare for PR.
2018-03-16 17:07:28 -06:00
Chris Conlon
3118c8826b
check z against 1 in wc_DhAgree()
2018-03-16 15:59:48 -06:00
kaleb-himes
323abafc1c
backup updates for SGX and DB jobs
2018-03-16 15:34:30 -06:00
David Garske
fa73f7bc55
Fix for handling OCSP with non-blocking. The HashInput function was being called on the re-entry, which produced a bad mac response from server. Also cleanup for some of the WC_PENDING_E logic for the non-async cases to reduce code size.
2018-03-16 12:05:07 -07:00
David Garske
e858ec11ac
Fix unused arg when building with pk callbacks disabled.
2018-03-16 09:37:07 -07:00
David Garske
ed7774e94a
Added new callbacks for the VerifyRsaSign, which uses a private key to verify a created signature. The new callbacks API's are wolfSSL_CTX_SetRsaVerifySignCb and wolfSSL_CTX_SetRsaPssVerifySignCb. These use the same callback prototype as the CallbackRsaVerify and use the same context.
2018-03-15 14:43:41 -07:00
JacobBarthelmeh
f70351242b
Merge pull request #1432 from kojo1/mdk5
...
3.14.0 update on mdk5 pack
2018-03-15 14:47:14 -06:00
Sean Parkinson
3f99a2a391
Fix PEM_write_bio_X509 to work with new BIO code
2018-03-15 10:45:49 +10:00
Jacob Barthelmeh
a207cae0f4
add some more macro guards to reduce size
2018-03-14 17:24:23 -06:00
Jacob Barthelmeh
607bd96317
add ocsp cert renew and test-pathlen to script
2018-03-14 16:35:16 -06:00
Sean Parkinson
4d1986fc21
Improve speed of 32-bit C code
2018-03-15 08:33:04 +10:00
David Garske
9ccf876a21
Added new ECC API wc_ecc_rs_raw_to_sig to take raw unsigned R and S and encodes them into ECDSA signature format.
2018-03-14 10:59:25 -07:00
David Garske
d8fe341998
First pass at added PK_CALLBACK support for VerifyRsaSign.
2018-03-14 09:54:18 -07:00
toddouska
717ba83deb
Merge pull request #1434 from SparkiDev/tls13_multi_recs
...
Fix multiple handshake messages in last record of certs
2018-03-14 09:46:32 -07:00
toddouska
262aa7c9a4
Merge pull request #1429 from JacobBarthelmeh/Testing
...
fix for build with NTRU and certgen
2018-03-14 09:42:39 -07:00
Sean Parkinson
afe300acc0
Fix multiple handshake messages in last record of certs
2018-03-14 16:37:58 +10:00
Takashi Kojo
8d750a22b1
Update project files
2018-03-14 08:15:18 +09:00
Takashi Kojo
1de291be8d
macro INLINE
2018-03-14 07:14:07 +09:00
Sean Parkinson
c4dfa41088
SP improvements
...
Tag functions to not be inlined so llvm doesn't make huge builds.
Add sp_mod to support new DH key generation function.
2018-03-13 14:16:48 +10:00
Jacob Barthelmeh
8fb3ccacb7
opensslextra fixs and warning for unused variable
2018-03-12 18:05:24 -06:00
Jacob Barthelmeh
c41bc8205c
account for build with no aes and no des3
2018-03-12 16:41:26 -06:00
Jacob Barthelmeh
6b04ebe3a4
fix for compiling with different build settings
2018-03-12 16:12:10 -06:00
Jacob Barthelmeh
fa21fb4a27
more aes macro key size guards
2018-03-12 15:44:48 -06:00
toddouska
15805d626d
Merge pull request #1430 from SparkiDev/srp_test_fix
...
Fix SRP test to have 2048 bit test data
2018-03-12 11:33:50 -07:00
toddouska
b297d9dce0
Merge pull request #1427 from JacobBarthelmeh/Compatibility-Layer
...
return value on bad mutex with error nodes and add x509 host check to OPENSSL_EXTRA
2018-03-12 11:33:20 -07:00
Sean Parkinson
00203d66d5
Fix SRP test to have 2048 bit test data
2018-03-12 17:32:27 +10:00
Jacob Barthelmeh
8fdb99443a
fix for build with NTRU and certgen
2018-03-09 14:21:43 -07:00
David Garske
72f390a102
Merge pull request #1361 from connerWolfSSL/doxygen_project
...
wolfSSL with Doxygen Documentation
2018-03-09 13:17:54 -08:00
Jacob Barthelmeh
e41f5de556
default generate ed25519 cert with renew and add ecc crls to script
2018-03-09 14:09:34 -07:00
Jacob Barthelmeh
d9738563af
add ed25519 certificate generation to renewcerts.sh
2018-03-09 10:43:36 -07:00
Jacob Barthelmeh
f6b5427f2b
bad sig certificate renew script
2018-03-09 09:50:52 -07:00
Jacob Barthelmeh
849e1eb10d
updating renewcerts script
2018-03-09 00:35:14 -07:00
toddouska
3b4d1bc796
Merge pull request #1425 from dgarske/config_defaults
...
Enable ECC by default and for aarch64 more algos
2018-03-08 14:05:03 -08:00
toddouska
0ab4166a80
Merge pull request #1421 from JacobBarthelmeh/Optimizations
...
trim out more strings and fix DN tag
2018-03-08 14:03:10 -08:00
toddouska
1f9583c59c
Merge pull request #1409 from SparkiDev/tls13_old_ver_fix
...
Fix downgrading when WOLFSSL_TLS13 is defined (despite NO_OLD_TLS being defined)
2018-03-08 13:59:59 -08:00
toddouska
200077c62c
Merge pull request #1426 from cconlon/dh186
...
DH - Use q parameter when available, add wc_DhSetKey_ex()
2018-03-08 13:57:54 -08:00
Jacob Barthelmeh
e0afec0600
fix RSA macro, tickets without server, and add test case
2018-03-08 14:36:43 -07:00
Jacob Barthelmeh
e960e0544a
try to clear out error queue with failing mutex
2018-03-08 11:49:16 -07:00
Jacob Barthelmeh
2a0ef55a66
fix for check on return value with mutex error case
2018-03-08 11:26:22 -07:00
Jacob Barthelmeh
74475a26ba
compile more functions in with OPENSSL_EXTRA
2018-03-08 11:06:40 -07:00
connerwolfssl
0535a8a68a
Added isntall flag, improved pathing for using doxygen to generate documentation
2018-03-08 10:53:44 -07:00
Chris Conlon
0ac833790d
check q in wc_CheckPubKey_ex() if available in DhKey
2018-03-08 10:17:52 -07:00
Chris Conlon
6f95677bb8
add wc_DhSetKey_ex() with support for q and SP 800-56A
2018-03-08 09:36:44 -07:00
connerwolfssl
9e6b9a3793
Merge https://github.com/wolfssl/wolfssl into doxygen_project
2018-03-08 08:10:10 -07:00
Sean Parkinson
d6ffa0dd8e
Fix downgrade when doing TLS v1.3
2018-03-08 15:05:36 +10:00
Sean Parkinson
d35a3f1e69
Fixes from code review
...
If doing TLS v1.3 and version on ServerHello is below TLS v1.2 then
handle message with old code.
If doing TLS v1.3, downgrading and version ClientHello is less than
minimum downgrade then this is a version error.
2018-03-08 09:00:36 +10:00
David Garske
8edbca1b21
Enable ECC for all platforms by default. For aarch64 enable SHA512, SHA224, SHA3 and FastMath by default.
2018-03-07 09:41:07 -08:00
Jacob Barthelmeh
612a80609a
warning about extra set of parentheses
2018-03-07 10:35:31 -07:00
Jacob Barthelmeh
799a6b6d2d
fix warning of unused variable and add guard for disable ecc build
2018-03-07 10:35:31 -07:00
Jacob Barthelmeh
a9c6385fd1
trim out more strings and fix DN tag
2018-03-07 10:35:31 -07:00
David Garske
a4000ba196
Merge pull request #1418 from SparkiDev/sp_armasm
...
Add assembly code for ARM and 64-bit ARM
2018-03-07 09:18:16 -08:00
toddouska
91a59eb625
Merge pull request #1422 from JacobBarthelmeh/Compatibility-Layer
...
add stub code for flag with x509 check host
2018-03-07 08:55:21 -08:00
toddouska
35f8460e8a
Merge pull request #1419 from dgarske/stm32f1
...
Added support for `WOLFSSL_STM32F1`
2018-03-07 08:51:22 -08:00
toddouska
cd940ccb5c
Merge pull request #1417 from dgarske/asn_x509_header
...
Cleanup of the ASN X509 header logic
2018-03-07 08:50:00 -08:00
toddouska
71ba87bb4d
Merge pull request #1416 from dgarske/fix_pluton_ecc_sign
...
Fix for Pluton ECC sign (2nd try)
2018-03-07 08:47:46 -08:00
Sean Parkinson
89182f5ca9
Add assembly code for ARM and 64-bit ARM
...
Split out different implementations into separate file.
Turn on SP asm by configuring with: --enable-sp-asm
Changed small ASM code for ECC on x86_64 to be smaller and slower.
2018-03-07 11:57:09 +10:00
David Garske
602874cff4
Merge pull request #1423 from ejohnstown/touch-file
...
Fix issue with the creation of dummy fips.h header.
2018-03-06 16:29:05 -08:00
John Safranek
a7fe5e3502
Fix issue with the creation of dummy fips.h header.
2018-03-06 13:15:35 -08:00
Jacob Barthelmeh
3f80006b25
add stub code for flag with x509 check host
2018-03-06 11:55:20 -07:00
connerwolfssl
fcae6d46be
Merge https://github.com/wolfssl/wolfssl into doxygen_project
2018-03-06 10:16:21 -07:00
connerwolfssl
5a1bdff0bd
Added wolfssl vs doxygen api checking, removed storing warnings and errors in files
2018-03-06 10:13:13 -07:00
David Garske
5699afe63d
Fix for minor typos in OPENSTM32 README.md.
2018-03-06 09:09:44 -08:00
David Garske
5174ad77f2
Added support for WOLFSSL_STM32F1.
2018-03-06 09:07:43 -08:00
David Garske
b879d138af
Fix for using non-const as array sizer (resolves build error with VS).
2018-03-06 09:04:12 -08:00
David Garske
57e9b3c994
Cleanup of the ASN X509 header and XSTRNCPY logic.
2018-03-05 16:11:12 -08:00
David Garske
d75b3f99ac
Proper fix for Pluton ECC sign.
2018-03-05 15:29:34 -08:00
Sean Parkinson
317c890961
Fix minimum downgrade when NO_OLD_TLS is defined
2018-03-05 10:12:04 +10:00
Sean Parkinson
dee74e98dd
Fix downgrading when WOLFSSL_TLS13 is defined (despite NO_OLD_TLS being defined)
2018-03-05 10:11:51 +10:00
toddouska
e95fa69a9b
Merge pull request #1414 from JacobBarthelmeh/Certs
...
update certificate after dates
2018-03-02 15:17:25 -08:00
Jacob Barthelmeh
f223f8fdfd
update certificate after dates
2018-03-02 14:31:08 -07:00
toddouska
a82dc1ad22
Merge pull request #1413 from JacobBarthelmeh/Release
...
bump version to 3.14.0
2018-03-02 12:58:31 -08:00
toddouska
48cd2806af
Merge pull request #1412 from JacobBarthelmeh/PKCS12
...
clean up memory in error case with PKCS12 create
2018-03-02 12:37:12 -08:00
toddouska
2c12b0d678
Merge pull request #1411 from ejohnstown/dtls-null-fix
...
DTLS Import/Export with Null Cipher
2018-03-02 11:41:04 -08:00
Jacob Barthelmeh
922d65d97c
bump version to 3.14.0
2018-03-02 12:31:41 -07:00
Jacob Barthelmeh
ae23f777d6
clean up memory in error case with PKCS12 create
2018-03-02 11:35:16 -07:00
toddouska
53c0bf6a20
Merge pull request #1408 from JacobBarthelmeh/Release
...
Testing in preparation for release
2018-03-02 10:12:27 -08:00
toddouska
e698084eac
Merge pull request #1406 from dgarske/mmcau_sha256_cast
...
Fix for cast warning with NXP CAU and SHA256.
2018-03-02 10:10:14 -08:00
JacobBarthelmeh
edfe16ef8c
Merge pull request #1410 from dgarske/fix_pluton_ecc_sign
...
Fix for pluton ECC sign
2018-03-02 11:07:01 -07:00
John Safranek
da76ee0877
allow import of DTLS sessions with null cipher as the null cipher is allowed with dtls when enabled
2018-03-02 09:57:07 -08:00
Jacob Barthelmeh
223903717a
add sanity check for short read
2018-03-02 09:38:11 -07:00
Jacob Barthelmeh
f6869dfe09
AES ECB build with ARMv8 instructions enabled
2018-03-02 09:30:43 -07:00
David Garske
f6d770b5bd
Fix for pluton ECC sign.
2018-03-02 07:57:22 +01:00
Jacob Barthelmeh
223facc46a
sanity check on index before reading from input
2018-03-01 18:03:21 -07:00
Jacob Barthelmeh
ae21c03d69
check on certificate index when getting Name
2018-03-01 18:00:52 -07:00
Jacob Barthelmeh
e80e82a89b
sanity check on reading newline character
2018-03-01 18:00:52 -07:00
Jacob Barthelmeh
e7b0fefd7a
add sanity check on read index
2018-03-01 18:00:52 -07:00
Jacob Barthelmeh
d46a2b449d
fix for smallstack buffer size
2018-03-01 18:00:52 -07:00
Jacob Barthelmeh
df1c73c8e5
check for case that BER to DER API is available
2018-03-01 18:00:52 -07:00
Jacob Barthelmeh
db18e49920
gcc-7 warning about misleading indentation
2018-03-01 18:00:52 -07:00
Jacob Barthelmeh
2a368abd20
fix build for haproxy
2018-03-01 18:00:52 -07:00
JacobBarthelmeh
b25ebf64b9
Merge pull request #1407 from ejohnstown/new-ca-cert
...
added another CA to the wolfssl website ca file
2018-03-01 17:58:19 -07:00
John Safranek
ecb2463bbe
modify the client external test list to skip the test case when aes and aes-gcm are disabled
2018-03-01 15:22:38 -08:00
John Safranek
7b1f6967c8
added another CA to the wolfssl website ca file
2018-03-01 11:57:12 -08:00
connerwolfssl
ba40a71a3c
added script so ensure doxygen api documentation matches wolfssl api
2018-03-01 10:27:30 -07:00
David Garske
59c8d3cdf7
Fix for cast warning with NXP CAU and SHA256.
2018-03-01 08:06:29 +01:00
Chris Conlon
1b2e43478d
Merge pull request #1405 from ejohnstown/selftest-errors
...
added error codes for the FIPS pairwise agreement tests in the POST
2018-02-28 14:16:59 -07:00
John Safranek
d035c1dd81
added error code for the FIPS DH agreement KAT test in the POST
2018-02-28 10:54:53 -08:00
toddouska
b6aae0c2d1
Merge pull request #1402 from JacobBarthelmeh/Testing
...
Improve bounds and sanity checks
2018-02-28 09:45:19 -08:00
David Garske
02970c9a11
Merge pull request #1404 from JacobBarthelmeh/Compatibility-Layer
...
reduce impact of NO_OLD_SHA256_NAMES macro
2018-02-28 16:12:37 +01:00
Jacob Barthelmeh
25e7dbd17a
add comment on sanity check
2018-02-27 23:30:50 -07:00
John Safranek
5cc046eb6d
added error codes for the FIPS pairwise agreement tests in the POST
2018-02-27 12:42:25 -08:00
Jacob Barthelmeh
06163f2bbb
reduce impact of NO_OLD_SHA256_NAMES macro
2018-02-27 12:21:11 -07:00
toddouska
91141e43c9
Merge pull request #1403 from cconlon/shadow_warnings
...
Fix shadow warnings on older compilers in tls_bench example
2018-02-27 08:32:56 -08:00
Jacob Barthelmeh
00b6419964
use XSTRLEN and revert adding outLen parameter
2018-02-26 16:52:09 -07:00
Chris Conlon
306600cba6
resolve variable shadow warnings on older compilers in tls_bench example
2018-02-26 16:14:15 -07:00
Jacob Barthelmeh
e6c95a0854
sanity check on input size
2018-02-26 14:41:00 -07:00
Jacob Barthelmeh
5ef4296b3d
sanity check on buffer length with ASNToHexString
2018-02-26 14:25:39 -07:00
Jacob Barthelmeh
e4f40fb6c0
add sanity checks and change index increment
2018-02-26 13:55:56 -07:00
toddouska
f7d70e4650
Merge pull request #1401 from kaleb-himes/NETOS-SV
...
possible shadowed global variable declaration in NETOS
2018-02-26 12:21:13 -08:00
toddouska
442430d39e
Merge pull request #1392 from ejohnstown/rsa-decrypt-check
...
RSA Decrypt Bounds Checking
2018-02-26 12:19:37 -08:00
kaleb-himes
f58619bb9f
possible shadowed global variable declaration in NETOS
2018-02-26 11:48:33 -07:00
toddouska
68b8557878
Merge pull request #1400 from JacobBarthelmeh/Testing
...
possible shadowed global variable declaration
2018-02-26 10:37:17 -08:00
Jacob Barthelmeh
512a0be75e
possible shadowed global variable declaration
2018-02-26 09:52:51 -07:00
toddouska
b527f6fb81
Merge pull request #1397 from JacobBarthelmeh/Optimizations
...
Optimizations
2018-02-26 08:43:22 -08:00
toddouska
73dbc8f6e7
Merge pull request #1395 from JacobBarthelmeh/Certs
...
Add support for writing multiple OUs, DCs and for writing a unique EKU OID
2018-02-26 08:39:58 -08:00
John Safranek
a49553df6a
RSA Decrypt Bounds Checking
...
1. Added some bounds checking on the ciphertext passed into the RSA decrypt function. NIST SP 800-56B specifies that the ciphertext shouldn't be a number larger than the modulus.
2. Added an API test to check that the direct RSA decrypt function returns an error with a "bad" message.
3. Added an ifndef guard to disable the bounds check. Default is to keep the bounds check.
4. RSA Decrypt bounds check only checked the first time into wc_RsaFunction().
2018-02-23 17:04:05 -08:00
Jacob Barthelmeh
942f39de3b
cast return from XSTRLEN
2018-02-23 17:35:44 -07:00
Jacob Barthelmeh
9391c608cc
remove error string function when no error strings is defined
2018-02-23 17:31:20 -07:00
Jacob Barthelmeh
f2cbab95b0
change _EncodeName, add test with wc_MakeCertReq, add XMEMSET with Cert init
2018-02-23 17:22:48 -07:00
toddouska
1c2506f94c
Merge pull request #1393 from SparkiDev/sp_math_dh
...
DH public key check working with sp-math
2018-02-23 16:15:15 -08:00
toddouska
9b90cdc919
Merge pull request #1396 from JacobBarthelmeh/Testing
...
fix for static analysis warning of null dereference
2018-02-23 15:51:29 -08:00
toddouska
22e55e72c1
Merge pull request #1394 from cconlon/selftest
...
Add CAVP-only Self Test for special build
2018-02-23 15:50:06 -08:00
toddouska
be8cfcf587
Merge pull request #1379 from JacobBarthelmeh/Compatibility-Layer
...
Compatibility layer
2018-02-23 14:59:22 -08:00
Jacob Barthelmeh
9757effdc1
fix for static analysis warning of null dereference
2018-02-23 14:49:06 -07:00
Jacob Barthelmeh
79f13478df
add AES macro guards and reduce code in GetName
2018-02-23 13:45:42 -07:00
Jacob Barthelmeh
453aa16e8d
Add support for writing multiple OUs, DCs and for writing a unique EKU OID
2018-02-23 10:46:26 -07:00
Chris Conlon
ad53037852
add CAVP selftest option for special build
2018-02-23 10:14:56 -07:00
Sean Parkinson
30e8429a3f
DH public key check working with sp-math
2018-02-23 15:10:54 +10:00
JacobBarthelmeh
89390180a0
Merge branch 'master' into Compatibility-Layer
2018-02-22 15:24:31 -07:00
David Garske
6500c40015
Merge pull request #1386 from JacobBarthelmeh/RSA
...
add WC_RSA_NO_PADDING macro and WC_RSA_NO_PAD enum
2018-02-22 13:34:20 -08:00
toddouska
fcb82d561e
Merge pull request #1388 from cconlon/dh_check_pubkey
...
add wc_DhCheckPubKey_ex() with checks against large prime q
2018-02-22 13:10:03 -08:00
Chris Conlon
de4893486e
add wc_DhCheckPubKey_ex() with checks against large prime q
2018-02-22 11:09:06 -07:00
Jacob Barthelmeh
63802849a1
remove magic number
2018-02-22 09:55:20 -07:00
toddouska
41ae47fa3c
Merge pull request #1390 from SparkiDev/tls13_downgrade
...
Fix downgrading from TLS v1.3 to TLS v1.2
2018-02-22 08:53:48 -08:00
toddouska
dda7dbd7fd
Merge pull request #1389 from JacobBarthelmeh/CAAM
...
fix unused function warning with CAAM and AES
2018-02-22 08:51:34 -08:00
toddouska
4154492d4b
Merge pull request #1387 from JacobBarthelmeh/Testing
...
fix for unused variables
2018-02-22 08:46:32 -08:00
toddouska
06abc12d40
Merge pull request #1384 from SparkiDev/sp_math_dh
...
Enable DH public key check code with sp-math
2018-02-22 08:41:25 -08:00
toddouska
5c07aadc41
Merge pull request #1383 from SparkiDev/explicit_curve
...
Explicit curve
2018-02-22 08:32:44 -08:00
toddouska
20e7d2d426
Merge pull request #1380 from SparkiDev/ber_indef
...
Support indefinite length BER encodings in PKCS #7
2018-02-22 08:31:26 -08:00
Sean Parkinson
6bf5f06397
Fixes from code review
2018-02-22 14:59:19 +10:00
Sean Parkinson
7160384a19
Explicit curve data in public ECC key
...
Certificate's public key data contains more of the encoding.
PKCS #7 using public key from certificates calls proper decode.
2018-02-22 14:59:19 +10:00
Sean Parkinson
274110a10c
Added tests and fixes from testing
2018-02-22 14:58:37 +10:00
Sean Parkinson
da4024b46a
Fix downgrading from TLS v1.3 to TLS v1.2
...
Fix handling of ServerHello in TLS v1.3 to support TLS v1.2 when
downgrading.
Added support in client and server examples for using downgrade method:
wolfSSLv23_client_method_ex() or wolfSSLv23_server_method_ex().
Add tests, using downgrade version, of client or server downgrading from
TLS v1.3 to TLS v1.2.
2018-02-22 12:48:50 +10:00
Sean Parkinson
76b0464a3b
Fixes from review
2018-02-22 08:31:19 +10:00
Jacob Barthelmeh
312d1a2aaf
fix unused function warning with CAAM and AES
2018-02-21 15:21:07 -07:00
Jacob Barthelmeh
fd7ffc992f
fix for unused variables
2018-02-21 11:19:49 -07:00
Jacob Barthelmeh
08e199d78a
add support for async with wc_RsaDirect function
2018-02-21 11:09:38 -07:00
Jacob Barthelmeh
7374e2e751
add WC_RSA_NO_PADDING macro and WC_RSA_NO_PAD enum
2018-02-21 10:10:35 -07:00
Sean Parkinson
dc4edd0cd9
SNI fix for nginx
2018-02-21 23:48:43 +10:00
Sean Parkinson
d1f19e8ecc
Fix resumption code around when not available
...
Can't set a ticket if the encryption callback is NULL.
If no useable pre-shared key is found then we won't do PSK.
2018-02-21 17:45:13 +10:00
Sean Parkinson
7d4c693d7e
Enable DH public key check code with sp-math
2018-02-21 09:13:00 +10:00
Sean Parkinson
3dfc2d87f3
Fix leak when wc_PKCS7_InitWithCert is called in verify
2018-02-21 08:29:50 +10:00
Sean Parkinson
6dad94c0fa
Change wc_BerToDer signature to have length as param
...
Clean up code to make readable
2018-02-21 08:29:50 +10:00
Sean Parkinson
d09f26a69f
Support indefinite length BER encodings in PKCS #7
2018-02-21 08:29:50 +10:00
toddouska
7a2aa6bc13
Merge pull request #1382 from dgarske/cleanup_strncpy
...
Fixes for ensuring null termination on all strncpy calls
2018-02-20 08:18:08 -08:00
toddouska
d34309b141
Merge pull request #1381 from JacobBarthelmeh/Testing
...
macro guard for redefinition warning
2018-02-20 08:14:30 -08:00
toddouska
3586ae04dc
Merge pull request #1373 from JacobBarthelmeh/Optimizations
...
Some memory optimizations
2018-02-20 08:13:02 -08:00
Jacob Barthelmeh
a275022dbe
account for pwdbased being enabled with x509small
2018-02-19 17:32:39 -07:00
Jacob Barthelmeh
33b699f81a
macro guards on PEM strings
2018-02-19 17:32:39 -07:00
David Garske
e4df21df94
More cleanup for const strings.
2018-02-19 17:32:39 -07:00
Jacob Barthelmeh
772651c17a
update tests and benchmark for HAVE_AES_DECRYPT
2018-02-19 17:32:39 -07:00
Jacob Barthelmeh
4614bd4e56
scan-build warning and AES key size builds for ARMv8
2018-02-19 17:32:39 -07:00
Jacob Barthelmeh
94b7ab92f3
fix for unused variable
2018-02-19 17:32:39 -07:00
Jacob Barthelmeh
801ce67fc9
surround BIO function with macro guard
2018-02-19 17:32:39 -07:00
Jacob Barthelmeh
2a15b3912b
revert pkcs7 attrib structure for scep and add more macro guards for AES key size
2018-02-19 17:32:39 -07:00
Jacob Barthelmeh
8006b68cac
more macro guards
2018-02-19 17:32:39 -07:00
Jacob Barthelmeh
c9525d9c1d
add opensslextra=x509small build option
2018-02-19 17:32:39 -07:00
Jacob Barthelmeh
ae2306ebcf
more structure packing and macro guards
2018-02-19 17:32:39 -07:00
Jacob Barthelmeh
e187ce42da
more macro guards for asn
2018-02-19 17:28:53 -07:00
Jacob Barthelmeh
16a4aef18e
clean up of macro guards on OIDs
2018-02-19 17:28:53 -07:00
Jacob Barthelmeh
02753e53a5
add some of AES key size macros to benchmark.c and test.c
2018-02-19 17:28:53 -07:00
Jacob Barthelmeh
7143b09786
pack PKCS7 structure
2018-02-19 17:28:53 -07:00
Jacob Barthelmeh
c2f660c0fc
first round of adding AES key size macros
2018-02-19 17:23:49 -07:00
toddouska
08696449f6
Merge pull request #1349 from JacobBarthelmeh/PKCS7
...
pkcs7 attribute parsing
2018-02-19 15:36:55 -08:00
David Garske
44079e4bb8
Fixes for ensuring null termination on all strncpy calls. Cleanup of the null termination character '\0'; for char types.
2018-02-19 13:33:16 -08:00
Jacob Barthelmeh
b6f96d68be
macro guard for redefinition warning
2018-02-19 14:11:41 -07:00
Jacob Barthelmeh
a2d96bad49
update SHA names with mcapi build
2018-02-19 09:29:21 -07:00
Jacob Barthelmeh
165059226e
add HAVE_AES_ECB to enable all build
2018-02-16 17:06:26 -07:00
Jacob Barthelmeh
f569645212
add wolfSSL_SHA256 function
2018-02-16 16:57:45 -07:00
Jacob Barthelmeh
a651b08afa
add wolfSSL_AES_ecb_encrypt function
2018-02-16 15:08:31 -07:00
JacobBarthelmeh
223edab6d9
Merge pull request #1378 from dgarske/evp_gcc7_async_test
...
Fixes a few build errors with EVP/wolfCrypt test and async API test hang
2018-02-16 13:11:36 -07:00
toddouska
62c2145e74
Merge pull request #1376 from JacobBarthelmeh/Compatibility-Layer
...
add wolfSSL_PEM_read_bio_RSAPrivateKey function
2018-02-16 10:20:07 -08:00
David Garske
ae5dac8994
Fixes for GCC 7 build errors with evp.c and switch fall through. General EVP code formatting cleanup. Fix for wolfCrypt test un-used var when HAVE_AES_CBC not defined. Fix for async in test_wolfSSL_SESSION with err not being initialized.
2018-02-16 09:32:40 -08:00
Jacob Barthelmeh
488a795747
add wolfSSL_PEM_read_bio_RSAPrivateKey function
2018-02-15 22:34:50 -07:00
toddouska
74ebf510a3
Merge pull request #1374 from dgarske/pub_ecc_mul2add
...
Add option for `ecc_mul2add` to be made as exposed API
2018-02-15 14:21:42 -08:00
toddouska
cbd7612324
Merge pull request #1375 from dgarske/ifm_feedback
...
Add support for `WOLFSSL_NO_MALLOC` with memory callbacks
2018-02-15 14:19:21 -08:00
John Safranek
d8eff923f1
Merge pull request #1372 from JacobBarthelmeh/UnitTests
...
clear error node queue after test case and initialize logging buffer
2018-02-15 08:40:45 -08:00
David Garske
8c8ed06202
Added the WOLFSSL_NO_MALLOC option for the realloc callback as well.
2018-02-15 07:15:30 -08:00
David Garske
32547e280a
Added ecc_mul2add to ecc.h header and is exposed as an API if WOLFSSL_PUBLIC_ECC_ADD_DBL is defined.
2018-02-15 07:04:29 -08:00
David Garske
8285648e46
Fix to support using memory callbacks with no malloc / free using WOLFSSL_NO_MALLOC. Fix to only include <errno.h> if LWIP_PROVIDE_ERRNO is not defined.
2018-02-15 06:54:14 -08:00
toddouska
ad1fc26d4e
Merge pull request #1370 from JacobBarthelmeh/Testing
...
check on verify depth for certificates with opensslextra
2018-02-14 16:29:25 -08:00
Jacob Barthelmeh
1b98ccbac8
add else condition for logging string with OPENSSL_EXTRA
2018-02-14 17:21:42 -07:00
David Garske
9ff97997a6
Merge pull request #1360 from SparkiDev/sp_math
...
Minimal implementation of MP when using SP.
2018-02-14 15:49:23 -08:00
David Garske
a7a8ce8721
Merge pull request #1371 from ejohnstown/asn-fix
...
Update wc_GetKeyOID()
2018-02-14 15:10:01 -08:00
Sean Parkinson
641af487ea
Changed missed MP_API change
2018-02-15 08:23:49 +10:00
Jacob Barthelmeh
c1b1fbaf7e
clear error node queue after test case
2018-02-14 13:55:43 -07:00
John Safranek
0853fcb202
Update wc_GetKeyOID()
...
1. Check that the algoID is not NULL.
2. Initialize algoID to 0.
3. Moved the key variables around.
2018-02-14 12:43:02 -08:00
toddouska
9a4fe0fe4e
Merge pull request #1353 from dgarske/asn_strict
...
Added RFC 5280 "must" checks
2018-02-14 10:01:58 -08:00
Jacob Barthelmeh
2e15842ef2
revert verify depth check and increase array size to account for possible cert index
2018-02-14 10:01:22 -07:00
Sean Parkinson
09f1247007
Support WOLFSSL_PUBLIC_MP define in SP math
2018-02-14 15:30:33 +10:00
Sean Parkinson
b18fdea2ce
Fixes from code review
2018-02-14 11:09:20 +10:00
toddouska
4b5524b39a
Merge pull request #1368 from JacobBarthelmeh/PKCS12
...
add check for having ECC enabled when testing with ECC certificate
2018-02-13 11:42:11 -08:00
toddouska
8b5864c475
Merge pull request #1366 from ejohnstown/hmac-sha3
...
HMAC-SHA-3
2018-02-13 11:41:34 -08:00
toddouska
4d04f0951c
Merge pull request #1363 from SparkiDev/tls13_draft23
...
Support TLS v1.3 Draft 23
2018-02-13 11:39:53 -08:00
JacobBarthelmeh
9bb29c46e3
Merge pull request #1347 from kaleb-himes/SGX-FIPS-WINDOWS
...
windows configuration changes
2018-02-13 10:38:25 -07:00
Jacob Barthelmeh
6f1e5383da
check on verify depth for certificates with opensslextra
2018-02-13 10:29:23 -07:00
John Safranek
e48eb1ded8
added hmac-sha-3
2018-02-12 13:24:06 -08:00
Jacob Barthelmeh
c09e55c749
add check for having ECC enabled when testing with ECC certificate
2018-02-12 09:59:35 -07:00
toddouska
95ed1a88ed
Merge pull request #1364 from SparkiDev/aesni_authtagsz
...
AES-GCM AES-NI code now handles different tag lengths
2018-02-09 13:19:14 -08:00
toddouska
e254f25baf
Merge pull request #1359 from SparkiDev/nginx_fixes
...
Fixes to get Nginx working again.
2018-02-09 13:17:38 -08:00
toddouska
44be47a83b
Merge pull request #1358 from dgarske/fix_aesgcm_emb
...
Fix for missing `ret` in some `wc_AesGcmEncrypt` functions
2018-02-09 13:16:21 -08:00
toddouska
a27d2448e2
Merge pull request #1344 from dgarske/portability_cleanups
...
Portability cleanups and `tls_bench` fixes
2018-02-09 13:15:47 -08:00
toddouska
d827e93af9
Merge pull request #1329 from JacobBarthelmeh/PKCS12
...
PKCS12 reverse order that certificates are compared for keypair
2018-02-09 13:15:07 -08:00
Kaleb Himes
87179837e7
Merge pull request #1365 from cconlon/p7karifix
...
detect and set keyAgreeOID from CMS EnvelopedData if user has not set
2018-02-09 13:27:40 -07:00
Chris Conlon
fa676d96cf
detect and set keyAgreeOID from CMS EnvelopedData if user has not set
2018-02-09 09:37:51 -07:00
Sean Parkinson
35c993e55d
AES-GCM AES-NI code now handles different tag lengths
...
Encrypt and decrypt code modified.
AES-NI, AVX1 and AVX2 code modified.
Test of 15 byte tag added.
2018-02-09 17:21:06 +10:00
Sean Parkinson
0da8694ff3
Fix Hello Retry Request parsing of new KeyShare choice
2018-02-09 11:12:04 +10:00
Sean Parkinson
9a0c822582
Support TLS v1.3 Draft 23
...
Change KeyShare number.
Support SignatureAlgorithmsCert extension - nothing done with
information as only one chain supported on server.
Compiling for Draft 22 supported: --enable-tls-draft22
Compiling for Draft 18 still supported.
2018-02-09 10:42:15 +10:00
David Garske
e8a5af2651
Merge pull request #1362 from ejohnstown/aesgcmtest
...
Add AES-GCM Test Case
2018-02-08 16:41:06 -08:00
John Safranek
6907241180
Add AES-GCM Test Case
...
Added a new AES-GCM test case where the provided IV is of length 1 byte.
2018-02-08 11:37:21 -08:00
connerwolfssl
fab99f9f44
Merge https://github.com/wolfssl/wolfssl into doxygen_project
2018-02-08 10:13:43 -07:00
connerwolfssl
17e88b47f6
Migrated documentation directory to doc. README updated. Error fixes. Moved make options to doc/include.am
2018-02-08 10:05:30 -07:00
Sean Parkinson
a3a4f2d59c
Minimal implementation of MP when using SP.
...
--enable-sp-math to include minimal implementation of MP (only with
--enable-sp.)
Add futher functionality for ECC (conditionally compiled):
- check key
- is point on curve
- API to add and double projective points
- API to map from project to affine
- Uncompress point (including sqrt)
Some configuration options will not work with SP math - configure.ac
detects this and errors out.
Change test code to better support SP sizes only.
2018-02-08 15:50:17 +10:00
Sean Parkinson
297fb1a447
Fixes to get Nginx working again.
...
Only use weOwnDH as Nginx can change from client to server.
Allow TLS v1.3 with client method for Nginx.
2018-02-08 11:14:31 +10:00
Jacob Barthelmeh
62b8c0c3fd
add test case for order of certificates with PKCS12 parse
2018-02-07 16:52:39 -07:00
David Garske
fbdcd3c67f
Fix for missing ret in some wc_AesGcmEncrypt functions due to refactor in commit 0765aa0.
2018-02-07 15:40:28 -08:00
David Garske
c2a0de93b8
Fix to resolve wolfCrypt test for `cert_test nameConstraints test. Fixed ASN check to properly determine if certificate is CA type.
2018-02-07 12:48:33 -08:00
Kaleb Himes
266b6fe7a7
Merge pull request #1356 from JacobBarthelmeh/Compatibility-Layer
...
Fix for Windows FIPS build
2018-02-07 13:18:36 -07:00
David Garske
4a6bb20ba6
Refactor the VERIFY_AND_SET_OID macro to simplify so it works on older C compilers like Visual Studio.
2018-02-07 12:17:03 -08:00
David Garske
d78e45dbb6
Added check to enforce RFC 5280 Sec 4.2: "A certificate MUST NOT include more than one instance of a particular extension". Refactor of the DecodedCert struct to combine bit type options into bit-fields. Fix for wolfCrypt test for error codes to allow -161.
2018-02-07 11:15:22 -08:00
David Garske
d9002bb072
Fix to enforce RFC 5280 Sec 4.2.1.6: "The name MUST NOT be a relative URI". Verifies the URI contains "://". Can be disabled using WOLFSSL_NO_ASN_STRICT.
2018-02-07 11:15:22 -08:00
David Garske
f4ad808d12
Added check to enforce RFC 5280 Sec 4.2.1.10 rule: "The name constraints extension, which MUST be used only in a CA certificate". Added new define WOLFSSL_NO_ASN_STRICT to restore old behavior for compatability. Fix wc_port time HAVE_RTP_SYS (noticed it was missed during ASN time move to wc_port).
2018-02-07 11:15:22 -08:00
David Garske
3e05118995
* Added the tls_bench example to the build output when threading is supported.
...
* Fixed some `tls_bench` build issues with various configure options.
* Moved the `WOLFSSL_PACK` and `WC_NORETURN` macros into types.h.
* Added support for `__builtin_bswap32` and `__builtin_bswap64`. Since the performance of the builtins varries by platform its off by default, but can be enabled by customer using `WOLF_ALLOW_BUILTIN`. Quick check on x86 showed the 32-bit swap performance matched, but 64-bit swap was slower.
2018-02-07 11:13:13 -08:00
David Garske
e1c246f918
Merge pull request #1355 from JacobBarthelmeh/Testing
...
Fix for build with having opensslextra and IGNORE_NAME_CONSTRAINTS
2018-02-07 11:12:55 -08:00
toddouska
69db17fcda
Merge pull request #1352 from dgarske/freertos_static
...
Fix to allow `FREERTOS` and `WOLFSSL_STATIC_MEMORY`
2018-02-07 10:06:51 -08:00
toddouska
012fb31f00
Merge pull request #1351 from dgarske/fix_ipv6
...
Fix for building with IPV6
2018-02-07 10:04:41 -08:00
toddouska
7769ba83ad
Merge pull request #1346 from dgarske/stm32_hash_ctx
...
STM32 Hashing Improvements
2018-02-07 10:03:50 -08:00
Jacob Barthelmeh
47aa4bbe2f
handle disable md5 case
2018-02-07 10:44:16 -07:00
Jacob Barthelmeh
61da8ec1dc
Fix for Windows FIPS build
2018-02-07 10:13:28 -07:00
Jacob Barthelmeh
a1a1ca9991
Fix for build with having opensslextra and IGNORE_NAME_CONSTRAINTS
2018-02-07 09:54:24 -07:00
David Garske
9afd26e853
Fixes for better supporting FREERTOS with and without static memory. Added fallback case to use pvPortMalloc/vPortFree when heap ptr not available.
2018-02-06 09:28:27 -08:00
David Garske
b3b3a28616
Fix logic typo for IPV6 any addr.
2018-02-06 09:18:42 -08:00
David Garske
172989c3c4
Merge pull request #1343 from ghoso/dev201801
...
Fix decryption error when EVP_CipherInit is called mulitple times.
2018-02-05 16:51:08 -08:00
Sean Parkinson
82850422fc
Merge pull request #1338 from JacobBarthelmeh/Testing
...
set have session id flag
2018-02-05 14:58:55 -08:00
David Garske
0be1c10fcd
Moved the STM32 functions to their own .c file. Added GPL header. Finished testing on STM32 CubeMX with F4 and F7 and StdPeriLib with F4.
2018-02-05 12:57:06 -08:00
Kaleb Himes
4803b3316e
Update settings.h
2018-02-05 13:05:24 -07:00
David Garske
81b64742f3
Fix to allow FREERTOS and WOLFSSL_STATIC_MEMORY.
2018-02-05 11:55:35 -08:00
David Garske
1ca56f97a4
Fix warning with pointer compare to zero for IPV6 peer == INADDR_ANY in test.h. Fixes issue #1350 .
2018-02-05 11:03:19 -08:00
Jacob Barthelmeh
a196fac0c2
itterate through certificates with PKCS7
2018-02-05 10:52:54 -07:00
toddouska
0765aa0f20
Merge pull request #1342 from SparkiDev/aes_gcm_sb2
...
Improve performance of AES-GCM for AVX1 and AVX2
2018-02-02 10:56:14 -08:00
toddouska
7ad0ea808c
Merge pull request #1341 from JacobBarthelmeh/master
...
fix build for OLD_HELLO_ALLOWED macro
2018-02-02 10:53:16 -08:00
toddouska
02ef52c3cd
Merge pull request #1340 from dgarske/ecc_pub_import_wcurve
...
Adds curve information to public key import for `wc_EccPublicKeyDecode`
2018-02-02 10:52:06 -08:00
toddouska
d63373066b
Merge pull request #1331 from JacobBarthelmeh/Compatibility-Layer
...
add comments and better error checking for PKCS8 strip
2018-02-02 10:50:29 -08:00
toddouska
c66ebb6748
Merge pull request #1317 from SparkiDev/chacha20_sb_avx2
...
Improve performance of chacha20-poly1305 on AVX and AVX2.
2018-02-02 10:46:39 -08:00
Jacob Barthelmeh
19ce41c3cc
pkcs7 attribute parsing
2018-02-02 09:01:32 -07:00
connerwolfssl
f5c33a9362
added force flag to not through warning if no file present to remove
2018-02-01 10:23:10 -07:00
connerwolfssl
841e75afcf
Merge branch 'master' of https://github.com/wolfssl/wolfssl
2018-02-01 09:47:13 -07:00
connerwolfssl
a6bab49f8a
fixed bn.h header
2018-02-01 09:43:11 -07:00
kaleb-himes
15486ae379
windows configuration changes
2018-01-31 15:09:16 -07:00
David Garske
a4a5f4f27a
STM32 refactor to move hashing code into wolfssl/wolfcrypt/port/stm32.h. Supports CubeMX HAL or StdPeriLib with MD5, SHA1, SHA224 and SHA256. Detects if hardware supports SHA2. Adds hashing context save/restore and hashing clock/power optimizations. Fix for building *.c in wolfcrypt/src/port for caam_driver.c. Fix for warning with wolfSSL_CryptHwMutexUnLock when no threading defined and return code not checked.
2018-01-31 11:25:20 -08:00
JacobBarthelmeh
640015ed5f
Merge pull request #1345 from kaleb-himes/SGX-FIPS-UPDATES
...
Updates to settings necessary for SGX FIPS
2018-01-31 11:09:19 -07:00
JacobBarthelmeh
5b083497da
Merge pull request #1300 from kaleb-himes/SGX-FIPS-LINUX
...
Add build scripts for default SGX build and improve cleanup
2018-01-31 09:34:06 -07:00
Go Hosohara
0101440cc8
Fix decryption error when EVP_CipherInit is called mulitple times.
2018-01-31 17:08:06 +09:00
kaleb-himes
1af85cf9c4
Update include.am
2018-01-30 15:39:20 -07:00
kaleb-himes
7facff2fd2
Feedback update
2018-01-30 15:36:18 -07:00
kaleb-himes
229d98e1f8
Updates to settings necessary for SGX FIPS
2018-01-30 15:30:52 -07:00
kaleb-himes
03fe54dcc4
Update following review
2018-01-30 14:30:44 -07:00
Sean Parkinson
3d3b9f69a6
Test larger variable data size if available
2018-01-30 12:21:25 +10:00
Sean Parkinson
e82e3d3d6e
Improve performance of AES-GCM for AVX1 and AVX2
2018-01-30 12:00:13 +10:00
David Garske
9d7374348b
Fix the ecc_decode_test to use a real OID (instead of 1), so the tests work properly.
2018-01-29 15:58:04 -08:00
Jacob Barthelmeh
580a55ce49
fix build for OLD_HELLO_ALLOWED macro
2018-01-29 14:55:32 -07:00
David Garske
90a3daa887
Adds curve information to public key import for wc_EccPublicKeyDecode. Cleanup to remove the ECC_CHECK_PUBLIC_KEY_OID define. The call to wc_ecc_get_oid does the same check as CheckCurve.
2018-01-29 12:09:12 -08:00
Jacob Barthelmeh
ca5b1dbbcb
set have session id flag
2018-01-26 14:18:36 -07:00
Chris Conlon
d179e442b4
Merge pull request #1337 from dgarske/pkcs7_pad
...
Expose the PKCS 7 pad functionality `wc_PKCS7_PadData`
2018-01-26 10:01:07 -08:00
David Garske
058c2a7a25
Made public the wc_PKCS7_GetPadSize API. Cleanup to use GetPadSize for the wc_PKCS7_PadData.
2018-01-25 08:14:56 -08:00
Sean Parkinson
4d75f337bb
Fix AVX2 final func to reset state
2018-01-24 16:36:44 -08:00
dgarske
776e222143
Merge pull request #1336 from SparkiDev/sha256_freescale
...
Transform_Sha256 no longer passed a buffer - fix for FREESCALE
2018-01-23 14:51:30 -08:00
David Garske
138bc3e6cc
Enhancement to expose the PKCS 7 pad functionality (wc_PKCS7_PadData).
2018-01-23 13:21:56 -08:00
Sean Parkinson
11ea2689d8
Transform_Sha256 no longer passed a buffer - fix for FREESCALE
2018-01-23 12:45:17 -08:00
JacobBarthelmeh
e476cb2958
Merge pull request #1334 from dgarske/fix_asn_leak
...
Fix for possible leak in error case for `wc_RsaKeyToDer`
2018-01-22 23:20:39 -07:00
David Garske
4e10173eed
Fix for possible leak in error case for wc_RsaKeyToDer.
2018-01-22 16:17:08 -08:00
dgarske
79f4b963cd
Merge pull request #1333 from SparkiDev/tls13_no_server
...
Make TLSX_SetResponse available in client and server
2018-01-22 07:43:37 -08:00
Sean Parkinson
6e6085501d
Make TLSX_SetResponse available in client and server
2018-01-21 18:12:34 -08:00
dgarske
72b8b71082
Merge pull request #1332 from kojo1/part5
...
fix shadow global
2018-01-21 16:48:12 -08:00
Takashi Kojo
162326dfcb
fix shadow global
2018-01-22 01:19:45 +09:00
JacobBarthelmeh
4d1ebc0827
Merge pull request #1330 from wolfSSL/revert-1315-aes_gcm_sb
...
Revert "Improve AES-GCM code for Intel AVX1 and AVX2"
2018-01-19 17:49:19 -07:00
Jacob Barthelmeh
1428934ad5
add comments and better error checking for PKCS8 strip
2018-01-19 16:53:12 -07:00
toddouska
f06abdb3ae
Revert "Improve AES-GCM code for Intel AVX1 and AVX2"
2018-01-19 15:12:08 -08:00
toddouska
085d3dae14
Merge pull request #1315 from SparkiDev/aes_gcm_sb
...
Improve AES-GCM code for Intel AVX1 and AVX2
2018-01-19 15:09:34 -08:00
toddouska
9045a2562a
Merge pull request #1316 from JacobBarthelmeh/Testing
...
Fix for AES-CFB with --enable-armasm and fix for windows fips tests
2018-01-19 15:02:53 -08:00
toddouska
8d27a2720c
Merge pull request #1325 from SparkiDev/bench_rsa
...
Added option to benchmark RSA sign/verify instead of enc/dec
2018-01-19 14:52:40 -08:00
toddouska
0059266b21
Merge pull request #1328 from dgarske/fix_async_rsapss
...
Fixes for wolfCrypt test RSA PSS with async enabled
2018-01-19 14:52:09 -08:00
toddouska
d5c1cf4fc7
Merge pull request #1327 from dgarske/ignore_file_warn
...
Added `WOLFSSL_IGNORE_FILE_WARN` option
2018-01-19 14:51:31 -08:00
toddouska
2efe7f6d96
Merge pull request #1319 from JacobBarthelmeh/Compatibility-Layer-Part5
...
Compatibility layer part4
2018-01-19 14:49:12 -08:00
Jacob Barthelmeh
213a2d0a7d
reverse order that certificates are compared with private key when parsing PKCS12
2018-01-19 15:41:52 -07:00
Jacob Barthelmeh
be98e3e7f3
build condition for SendAlerts and fix free of x509 store
2018-01-19 09:48:02 -07:00
Jacob Barthelmeh
025ba1445e
add WOLFSSL_VERIFY_CB_ALL_CERTS macro
2018-01-18 18:26:32 -07:00
David Garske
8a0bbb0faf
Fixes for wolfCrypt test RSA PSS with async enabled.
2018-01-18 15:35:21 -08:00
dgarske
5d52466d6f
Merge pull request #1326 from ejohnstown/rsa-test-fix
...
RSA Key Generation Test Fix
2018-01-18 15:01:55 -08:00
dgarske
f61e56e5b6
Merge pull request #1312 from kojo1/mdk5
...
CMSIS pack 3.13.0
2018-01-18 14:48:37 -08:00
John Safranek
9654f19075
RSA Key Gen Test Fix
...
A recent change to the RSA key generation process is capping the number of attempts of finding a probable prime to a multiple of the prime's size, in FIPS builds. This means it might fail once in a while. (It could also fail for a couple other reasons but this is the most likely.) The API is changed to retry key generation until it succeeds. Non-FIPS builds keep trying until they find a prime.
2018-01-18 12:20:25 -08:00
Jacob Barthelmeh
584520c9b4
increase static memory bucket size with session certs
2018-01-18 10:59:20 -07:00
Jacob Barthelmeh
377f5c304c
update for async build and include for getenv
2018-01-18 09:05:21 -07:00
Sean Parkinson
f2079ca792
Added option to benchmark RSA sign/verify instead of enc/dec
2018-01-18 11:35:19 +10:00
Jacob Barthelmeh
2a308bdda9
add some comments and return domain name
2018-01-17 17:39:17 -07:00
Jacob Barthelmeh
a0f5126076
build option fixes
2018-01-17 16:40:06 -07:00
dgarske
db970b685a
Merge pull request #1324 from kaleb-himes/INLINE-STATUS
...
Add status of inline configure option to feature output
2018-01-17 15:36:50 -08:00
Takashi Kojo
98f85c9235
wolfssl_tcp_select
2018-01-18 07:25:09 +09:00
Takashi Kojo
f79a3e9ddb
Reverse ByteReversWOrd64
2018-01-18 07:10:55 +09:00
Takashi Kojo
cfe88b37f6
SOCK_LISTEN_MAX_QUEUE, listen arg
2018-01-18 07:04:48 +09:00
Takashi Kojo
1f0171d79b
hard tab
2018-01-18 07:03:19 +09:00
Takashi Kojo
c7ce6ce772
fix main.c under projects
2018-01-18 07:00:51 +09:00
David Garske
1276d21d8e
Added WOLFSSL_IGNORE_FILE_WARN option to ignore warning for .c files that do not need to be included.
2018-01-17 13:27:59 -08:00
kaleb-himes
ed95fca448
Add status of inline configure option to feature output
2018-01-17 14:20:49 -07:00
John Safranek
0b8c069119
Merge pull request #1323 from JacobBarthelmeh/RSA-min
...
adjustment to RSA key size check
2018-01-17 13:12:47 -08:00
toddouska
54acc2df51
Merge pull request #1318 from SparkiDev/tls13_draft22
...
Changes for TLS v1.3 Draft 22
2018-01-17 11:22:50 -08:00
Jacob Barthelmeh
19288ea127
casting values, update names, g++ build
2018-01-17 12:18:00 -07:00
Jacob Barthelmeh
fa3ab4fd61
adjustment to RSA key size check
2018-01-17 11:34:27 -07:00
Jacob Barthelmeh
676e2f1f63
add comments and remove 2999 bit rsa key test for now
2018-01-17 11:19:21 -07:00
dgarske
57cbd5e53c
Merge pull request #1322 from SparkiDev/poly1305_clang_fix
...
Fix clang using wrong registers in poly1305 AVX2 code
2018-01-17 08:30:33 -08:00
dgarske
2dc60b9e01
Merge pull request #1321 from SparkiDev/fe_init_small_fix
...
Fix fe_init implementation to appear for small Ed25519
2018-01-17 08:30:13 -08:00
Jacob Barthelmeh
bf57da1914
static analysis fixes, free buffer return in test case, fips build
2018-01-17 09:28:25 -07:00
Sean Parkinson
4915a784ec
Fix clang using wrong registers in poly1305 AVX2 code
2018-01-17 15:02:58 +10:00
Sean Parkinson
c09d972012
Fix fe_init implementation to appear for small Ed25519
2018-01-17 11:34:22 +10:00
Sean Parkinson
5f14de33e7
Changes for TLS v1.3 Draft 22
...
Middlebox compatibility available too.
2018-01-17 09:38:11 +10:00
Jacob Barthelmeh
60b329f7e5
fix example client error print out and ASN1_TIME_print after rebase
2018-01-16 15:39:58 -07:00
Takashi Kojo
b3ab0a9c11
simplify visibility control
2018-01-16 14:59:50 -07:00
Takashi Kojo
dce628ae8e
Eliminate dup _InitHmac
2018-01-16 14:59:48 -07:00
Takashi Kojo
56efe657fc
save iPad, oPad. test long key
2018-01-16 14:57:53 -07:00
Takashi Kojo
30e6ec5396
HMAC_CTX_copy, copy save_len, save_key
2018-01-16 14:54:44 -07:00
Takashi Kojo
e93d7d3c93
fix for MD5 case, "recover hmac", in HMAC_init
2018-01-16 14:54:44 -07:00
Takashi Kojo
937c759998
HMAC_Init, keylen arg check
2018-01-16 14:54:44 -07:00
Takashi Kojo
f38a321e64
HMAC_Init_ex with NULL key to recover Hmac initial state
2018-01-16 14:54:43 -07:00
Takashi Kojo
8f1fc8ad2e
Error return value of checkPad
2018-01-16 14:51:44 -07:00
Takashi Kojo
ed0d4d3b06
Add ECB in wolfSSL_EVP_get_cipherbyname
2018-01-16 14:51:44 -07:00
Takashi Kojo
13325606b7
Peer cert ASN PARSE ERROR
2018-01-16 14:51:42 -07:00
Takashi Kojo
6f44969e23
Signature check compatibility
2018-01-16 14:48:56 -07:00
Takashi Kojo
2fdf98ebd4
eliminate redandant pad block, DES3
2018-01-16 14:48:56 -07:00
Go Hosohara
e8d628f61b
wrap up no certificate alert related code in OPENSSL_EXTRA directive.
2018-01-16 14:48:55 -07:00
Takashi Kojo
f690a980bf
Avoid duplicated callback when error is overriden
2018-01-16 14:48:53 -07:00
Jacob Barthelmeh
92c9ff5f48
reset cipher suites after call to wolfSSL_set_options
2018-01-16 14:45:58 -07:00
Takashi Kojo
0a3d6534c7
add SanityCheckMsgReceived in ProcessOldClientHello
2018-01-16 14:42:17 -07:00
Go Hosohara
d6e22346e3
Regarding with commit #4899aad884880bb8ef1859ea6b57eded013cd2b4, send no certificate alert only if SSLv3, otherwise proceed with size 0 certificate.
2018-01-16 14:42:17 -07:00
Takashi Kojo
a918dfdb33
discard session chain in SSL_clear
2018-01-16 14:42:17 -07:00
Takashi Kojo
2a4766198a
add SendAlert(ssl, alert_fatal, bad_certificate);
2018-01-16 14:42:15 -07:00
Takashi Kojo
401db67bcd
WOLFSSL_MIN_DOWNGRADE, default: TLSv1_MINOR
2018-01-16 14:41:03 -07:00
Takashi Kojo
5a40d8b3c2
rollingback certErr_ovrdn, VerifyCallback
2018-01-16 14:41:01 -07:00
Takashi Kojo
dbad348537
DES3_cbc_encrypt with fragmentary size
2018-01-16 14:39:42 -07:00
Takashi Kojo
a19813eab2
CertificateVerify, getting past when the error is overridden by VerifyCallback
2018-01-16 14:39:40 -07:00
Takashi Kojo
2f1f86d5f2
VerifyCallback with any reason
2018-01-16 14:35:10 -07:00
Go Hosohara
8336e02931
send no certificate alert on SSLv3 if certificate size is 0.
2018-01-16 14:32:52 -07:00
Jacob Barthelmeh
b40218f7f4
certificate verify callback override
2018-01-16 14:32:50 -07:00
Go Hosohara
3d0c850e10
Change to send certificate message on SSLv3 even though certificate size is 0.
2018-01-16 14:27:50 -07:00
Jacob Barthelmeh
21a14403c6
wolfSSL_set_options behavior with downgrade version
2018-01-16 14:27:50 -07:00
Takashi Kojo
973bac429c
eliminate dupricate callbacks on -188 error
2018-01-16 14:27:48 -07:00
Takashi Kojo
2cee800127
verifyCallback and SendAlert on invalid certificate,
2018-01-16 14:24:00 -07:00
Takashi Kojo
4ab0934000
Merge branch 'Compatibility-Layer-Part5' of https://github.com/JacobBarthelmeh/wolfssl into Compatibility-Layer-Part5
2018-01-16 14:16:14 -07:00
Takashi Kojo
c80cadb25f
DES_set_odd_parity to MLB
2018-01-16 14:12:43 -07:00
Go Hosohara
a3ad8c5bae
Implement DomainComponent in wolfSSL_X509_NAME_get_index_by_NID() and wolfSSL_X509_NAME_get_entry().
2018-01-16 13:50:01 -07:00
Go Hosohara
aa99031346
restore WOLFSSL_NEITHER_END value.
2018-01-16 13:50:01 -07:00
Go Hosohara
4b13a0f301
Fix code review suggestion.
2018-01-16 13:50:01 -07:00
Go Hosohara
0edd97293d
Add read or write phrase at each transaction message in wolfSSL_state_string_long().
2018-01-16 13:50:01 -07:00
Go Hosohara
54a006f47d
correct wolfSSL_get_state() by code review suggestion.
2018-01-16 13:50:00 -07:00
Go Hosohara
eb9c225304
Change to 2 dimension array as messages store in wolfSSL_state_string_long().
2018-01-16 13:50:00 -07:00
Go Hosohara
fd05de8346
Fix some memory issues in wolfSSL_state_string_long().
2018-01-16 13:50:00 -07:00
Go Hosohara
a32ae3e516
Change to kick info callback when state transition occurs.
2018-01-16 13:50:00 -07:00
Takashi Kojo
7210e881a8
eliminate empty if body
2018-01-16 13:50:00 -07:00
Takashi Kojo
b6abf4596e
SetDhInternal in DH_compute_key
2018-01-16 13:49:59 -07:00
Jacob Barthelmeh
a643ae1907
return code of sk num, X509 store peer chain, and get text by NID fix
2018-01-16 13:49:58 -07:00
Jacob Barthelmeh
19244fc0c9
fix memory management
2018-01-16 13:44:53 -07:00
Jacob Barthelmeh
01cd58cc43
fix wolfSSL_DH_1536_prime
2018-01-16 13:44:53 -07:00
Jacob Barthelmeh
cc5e9e3dae
adjustment for verify callback and certificate error depth
2018-01-16 13:44:52 -07:00
Takashi Kojo
0b4e499e1d
MD4 in md_tbl
2018-01-16 13:37:27 -07:00
Takashi Kojo
47bca28b1d
Fix compatibility, inl == 0, EVP_CipherUpdate
2018-01-16 13:37:26 -07:00
Takashi Kojo
43ae3c9f59
ASN_PARSE_E in GetASNInt
2018-01-16 13:36:35 -07:00
Takashi Kojo
3af8975a66
shadow global value error with cross-compiler
2018-01-16 13:34:35 -07:00
Jacob Barthelmeh
a6e6cc781d
fix comment on function
2018-01-16 13:25:46 -07:00
Jacob Barthelmeh
934d149931
macro guards for checking if sha features used
2018-01-16 13:25:44 -07:00
Jacob Barthelmeh
a18c1abc13
add comments for SHA1 function
2018-01-16 10:39:22 -07:00
Jacob Barthelmeh
479b7e5ca8
SHA1 implementation and test
2018-01-16 10:39:22 -07:00
Jacob Barthelmeh
7cc7de9d4a
add set msg callback tests
2018-01-16 10:39:21 -07:00
Jacob Barthelmeh
990e1f3ddf
implement wolfSSL set msg callback function
2018-01-16 10:39:20 -07:00
Jacob Barthelmeh
01e6feb060
add hmac ctx copy testing to unit tests
2018-01-16 09:27:39 -07:00
Jacob Barthelmeh
47a2783cf1
size of buffer with DES ecb encrypt
2018-01-16 09:27:37 -07:00
Jacob Barthelmeh
982e9ab8ad
implement hmac ctx copy function
2018-01-16 09:25:51 -07:00
Jacob Barthelmeh
b9001d3c4d
implement X509 store ctx set error function
2018-01-16 09:12:02 -07:00
Jacob Barthelmeh
86112a574f
implement X509 store ctx get ssl idx
2018-01-16 02:29:51 -07:00
Jacob Barthelmeh
e1d71d7ab8
add macro guard to RSA key generation
2018-01-16 02:17:43 -07:00
Jacob Barthelmeh
c8381afdc1
implement asn1 object to nid function
2018-01-16 02:17:43 -07:00
Jacob Barthelmeh
189a4d74c0
implement get error line data function
2018-01-16 02:17:42 -07:00
Jacob Barthelmeh
f393eb9176
implement ssl set session id context
2018-01-16 02:17:42 -07:00
Jacob Barthelmeh
ede8127569
implement function for setting CTX verify depth
2018-01-16 02:17:40 -07:00
Jacob Barthelmeh
762b7144e0
implement WOLFSSL get app data and set app data functions
2018-01-16 02:13:16 -07:00
Jacob Barthelmeh
3089fa2d27
group sk x509 functions together and implement sk x509 pop free
2018-01-16 02:10:15 -07:00
Jacob Barthelmeh
b369112ed3
implement CTX check private key function
2018-01-16 01:53:05 -07:00
Jacob Barthelmeh
86deb23d2f
put a macro guard on stub functions and implement quick ones, alo update macro guards on recent BN and RSA tests
2018-01-16 01:51:00 -07:00
Jacob Barthelmeh
266132521c
implement RSA key generation compatibility function and BN get word
2018-01-16 01:50:58 -07:00
Jacob Barthelmeh
248dce258e
update dynamic type when freeing bio mem
2018-01-16 01:44:32 -07:00
Jacob Barthelmeh
39126cbb63
move variable declaration to top of function and silence compiler warning
2018-01-16 01:44:30 -07:00
Jacob Barthelmeh
fcb1a10a3c
upadte memory bio read and setting bios in ssl struct
2018-01-16 01:42:34 -07:00
Jacob Barthelmeh
d0d762c1a2
add 1536bit DH prime from RFC 3526
2018-01-16 01:28:24 -07:00
Takashi Kojo
bbff8f00ae
WOFLSSL_STUB: SSL_CTX_check_private_key
2018-01-16 01:27:36 -07:00
Takashi Kojo
d3f4845c55
EVP_PKEY_decrypt return value
2018-01-16 01:25:17 -07:00
Jacob Barthelmeh
47f234dce2
add wolfSSL_EVP_md4 function
2018-01-16 01:22:48 -07:00
Jacob Barthelmeh
ca50d13149
update const type compatibility
2018-01-16 01:18:32 -07:00
Jacob Barthelmeh
60ea23a6de
fix invalid check on unsigned type
2018-01-16 01:18:30 -07:00
Jacob Barthelmeh
ad6cc6be2e
fix clang build warnings and change return type
2018-01-16 01:12:11 -07:00
Jacob Barthelmeh
db3badb73a
add GENERAL NAME stack functions and fix WOLFSSL_BIO free with files
2018-01-16 01:12:09 -07:00
Jacob Barthelmeh
6455801518
add TLSv1 method, getter function for cipher key length, and start stack functions
2018-01-16 00:58:33 -07:00
Takashi Kojo
071e11ed58
Remove key->rsa setting in EVP_PKEY_get1_RSA
2018-01-16 00:29:08 -07:00
Takashi Kojo
2cc7057071
Rollback
2018-01-16 00:29:07 -07:00
Takashi Kojo
b7ffc263cf
set pkey->rsa in d2i_PUBKEY
2018-01-16 00:29:07 -07:00
Takashi Kojo
522e989292
set pkey->rsa in EVP_PKEY_get1_RSA
2018-01-16 00:29:07 -07:00
Jacob Barthelmeh
84bc5ba678
update DER to internal public key and add alert functions
2018-01-16 00:29:05 -07:00
Jacob Barthelmeh
1d792b0b44
detect SHA256, SHA384, and SHA512 NID types when signing
2018-01-16 00:19:53 -07:00
Jacob Barthelmeh
1f8df3e403
fix copy of RSA key from WOLFSSL_EVP_PKEY
2018-01-16 00:16:34 -07:00
Takashi Kojo
32ca91cd2f
fix return value type of fread
2018-01-16 00:16:34 -07:00
Jacob Barthelmeh
d1c05c1883
fix DER to internal private key function
2018-01-16 00:14:08 -07:00
Takashi Kojo
d7e844d7a2
Refined NO_WOLFSSL_STUB
2018-01-16 00:05:33 -07:00
Takashi Kojo
f49e58a169
Eliminat cross compiler warnings: BUF_MEM, SESSION_set_ex_data
2018-01-15 23:43:34 -07:00
Takashi Kojo
7baa65e515
OpenSSL_add_all_digests, ciphers() to wolfCrypt_Init()
2018-01-15 23:40:02 -07:00
Takashi Kojo
f5913d875f
return type compatibility AES_set_encrypt/decrypt_key
2018-01-15 23:39:52 -07:00
Takashi Kojo
31fe154d1c
removed STUB mark from wolfSSL_ERR_load_crypto_strings
2018-01-15 23:34:15 -07:00
Jacob Barthelmeh
18019f1bae
evp key flags and add WOLFSSL_BUF_MEM struct to WOLFSSL_BIO
2018-01-15 23:34:13 -07:00
Takashi Kojo
4ab9cc65f3
fix EVP_get_cipherbyname("RC4")
2018-01-15 23:17:05 -07:00
Jacob Barthelmeh
46a0cedb08
return value for printing asn1 time
2018-01-15 23:17:03 -07:00
Sean Parkinson
be1aba1f70
Improve performance of chacha20-poly1305 on AVX and AVX2.
...
Create an AVX2 version of the small block size chacha20 encryption code.
Only update the poly1305 once for the two lengths in chacha20-poly1305.
Poly1305 AVX2 uses AVX code to handle last bytes, store H whole.
Fix error codes in poly1305 test and add a longer data test case.
2018-01-16 13:45:36 +10:00
Takashi Kojo
9a2b1636f9
xstat2err stat shadows global
2018-01-15 18:26:10 -07:00
Jacob Barthelmeh
8db170250e
add support for file type BIO to PEM read private key
2018-01-15 18:03:24 -07:00
Takashi Kojo
90179e554e
add RC4 to EVP_get_cipherbyname
2018-01-15 18:03:24 -07:00
Takashi Kojo
8ae1b7823e
ecc.c, logging.c: local value shadows global
2018-01-15 18:03:21 -07:00
Jacob Barthelmeh
32bf163633
update base64 WOLFSSL_BIO encoding and checking session context ID
2018-01-15 17:54:46 -07:00
Jacob Barthelmeh
b5ab505d1e
testing with WOLFSSL_BIO write
2018-01-15 17:40:51 -07:00
Jacob Barthelmeh
cda44c89ac
account for different build options
2018-01-15 17:40:46 -07:00
Jacob Barthelmeh
dc4159546b
refactor WOLFSSL_BIO read/write to bio.c and update read and write for base64 formating
2018-01-15 17:22:54 -07:00
Takashi Kojo
91632d64f1
word32 casting inSz, wolfSSL_d2i_PrivateKey
2018-01-15 16:19:58 -07:00
Takashi Kojo
c20bff79ad
fix to fix EVP_CipherFinal stream cipher outlen
2018-01-15 16:19:57 -07:00
Jacob Barthelmeh
52a89349dd
resolves redefinition warnings with clang builds
2018-01-15 16:13:45 -07:00
Jacob Barthelmeh
60b21ffa62
add compat functions; rand egd, rand file, bio_f_base64, bio pop, bio set flags, crypto set id callback, crypto set locking callback, evp pkey get1 RSA, PEM write bio RSA private key, set info callback and alter ERR GET REASON
2018-01-15 16:06:36 -07:00
Jacob Barthelmeh
d0abfbf3f3
turn on AES Direct if AES-CFB is enabled
2018-01-15 16:00:31 -07:00
Jacob Barthelmeh
455ffc2ad7
fix for windows fips build
2018-01-15 15:39:33 -07:00
Takashi Kojo
6fd949279d
fix EVP_CipherFinal outlen for stream cipher
2018-01-15 13:48:31 -07:00
Takashi Kojo
27a9b23d2b
fix ToTraditionalInline inSz type
2018-01-15 13:46:19 -07:00
Jacob Barthelmeh
930930ebc4
update DER to internal function with private RSA key
2018-01-15 13:46:18 -07:00
Takashi Kojo
de2e7d4f75
fix some WOLFSSL_STUB api names
2018-01-15 13:46:17 -07:00
Takashi Kojo
9910c51e67
add #ifndef NO_WOLFSSL_STUB
2018-01-15 13:41:55 -07:00
Chris Conlon
3415b05732
Merge pull request #1311 from ejohnstown/rsakeygen
...
RSA Key Generation (FIPS 186-4)
2018-01-15 13:26:44 -07:00
Takashi Kojo
9e1283aedb
update WOLFSSL_STUB - Part2
2018-01-15 13:05:39 -07:00
Jacob Barthelmeh
0c4f9c39c9
adjust AES-CFB location in code or --enable-armasm build and use wc_AesEncryptDirect function calls
2018-01-15 13:00:25 -07:00
Takashi Kojo
6a129ca5c7
undate WOLFSSL_STUB - Part 1
2018-01-15 12:58:31 -07:00
Jacob Barthelmeh
e9f3d7f898
add the function ERR remove state and test for it
2018-01-15 10:56:54 -07:00
toddouska
2e6f97621a
Merge pull request #764 from JacobBarthelmeh/Compatibility-Layer-Part3
...
Compatibility layer part3
2018-01-13 09:57:14 -08:00
John Safranek
862e59f474
FIPS Update
...
1. White space changes. Converting tabs to spaces.
2. Add some comments explaining where a loop bound came from.
3. Added parameter checks to a function.
2018-01-12 15:37:22 -08:00
Jacob Barthelmeh
2945213871
update to d2i_PUBKEY function
2018-01-12 16:01:23 -07:00
toddouska
0590f2493e
Merge pull request #1314 from dgarske/cleanups
...
Minor fixes and cleanups for hash digest/block size
2018-01-12 13:00:53 -08:00
Jacob Barthelmeh
df7917fcd9
add --enable-aescfb, add comments, include of stdio with snprintf
2018-01-12 11:05:43 -07:00
dgarske
3f8ecb4e70
Merge pull request #1313 from JacobBarthelmeh/Testing
...
DHE suite with test case and set server/client method
2018-01-12 10:03:03 -08:00
Jacob Barthelmeh
d04775ecfb
Add check for AES with using AES cipher suite
2018-01-12 09:10:55 -07:00
Sean Parkinson
3d6d80fe21
Improve AES-GCM code for Intel AVX1 and AVX2
...
Improve AES-GCM Intel performance by converting to pure inline ASM.
Improve AES-GCM Intel code algorithmically.
Split out platform specific code for AES-GCM encrypt and decrypt.
Move C implementation of AES-GCM to separate function to speed up Intel
ASM code.
Modified test to try all input byte sizes up to large benchmark size
when defined.
2018-01-12 10:51:32 +10:00
Chris Conlon
e8179b29ff
Merge pull request #1299 from JacobBarthelmeh/PKCS7
...
handle degenerate case with PKCS7
2018-01-11 16:56:39 -07:00
Jacob Barthelmeh
f254a002a8
fix small stack with X509 print function
2018-01-11 15:41:23 -07:00
Jacob Barthelmeh
29ccc36fc2
refactor openssl test in test.c and update AES CFB compatibility function
2018-01-11 15:35:38 -07:00
Jacob Barthelmeh
953fc0d4a8
update CFB mode to handle partial AES block sizes
2018-01-11 15:28:56 -07:00
Jacob Barthelmeh
c2a6c6c395
add CFB mode for AES
2018-01-11 15:23:15 -07:00
Jacob Barthelmeh
857bbe65b5
update OID check for domain component
2018-01-11 14:47:12 -07:00
Takashi Kojo
e2a16190a6
add NID_domainComponent in X509_NAME_get_text_by_NID
2018-01-11 14:37:49 -07:00
Takashi Kojo
2fc494f66b
add NID_domainComponent
2018-01-11 14:37:49 -07:00
Takashi Kojo
289ad7a42c
add CRYPTO_cleanup_all_ex_data
2018-01-11 14:31:32 -07:00
Takashi Kojo
ae7783847c
accept no key, IV case in EVP_CipherInit
2018-01-11 14:31:32 -07:00
Jacob Barthelmeh
d39ca40fee
wrapper for Aes structure added and checks on structure size
2018-01-11 14:23:51 -07:00
Jacob Barthelmeh
f5d9cf0e5d
XSNPRINTF not defined in the case of having no filesystem
2018-01-11 14:17:25 -07:00
Jacob Barthelmeh
68d7d26839
account for C++ compiler and fast rsa option
2018-01-11 14:12:11 -07:00
Jacob Barthelmeh
064a54f552
static analysis and windows fix
2018-01-11 14:08:22 -07:00
Jacob Barthelmeh
d2f1ced52f
added x509 functions : x509 name cmp, i2d x509 name, i2d x509, x509 print
2018-01-11 14:04:03 -07:00
Jacob Barthelmeh
31186cd341
add RSA compat function and stub for x509 name compare
2018-01-11 13:30:02 -07:00
Jacob Barthelmeh
f968e65314
add macro for get thread id and update debug message for wolfSSL_HMAC
2018-01-11 11:54:24 -07:00
Jacob Barthelmeh
f2518ecbc4
RC4 compatibility functions added
2018-01-11 11:54:24 -07:00
Jacob Barthelmeh
40b56e724f
AES cbc wrapper and AES cbf stub function
2018-01-11 11:54:24 -07:00
David Garske
cf03aa4f52
Fix for building with FIPS where wolfCrypt FIPS already has enum value for MAX_DIGEST_SIZE.
2018-01-11 10:53:12 -08:00
Jacob Barthelmeh
4a9f5f3a7e
add DES cksum and DES set odd parity
2018-01-11 11:32:00 -07:00
David Garske
481f4765eb
Cleanup to remove duplicate MAX_DIGEST_SIZE in hmac.h and refactor to use WC_MAX_DIGEST_SIZE. Cleanup for HMAC to include hash.h and refactor HMAC_BLOCK_SIZE to WC_HMAC_BLOCK_SIZE. Fix build warning in benchmark.c with unused variable if features are disabled.
2018-01-11 09:52:49 -08:00
Jacob Barthelmeh
e442f8dccf
DHE suite with test case and set server/client method
2018-01-11 10:24:48 -07:00
toddouska
bb52b0a7b9
Merge pull request #724 from JacobBarthelmeh/Compatibility-Layer-Part2
...
Compatibility layer part2
2018-01-11 08:28:54 -08:00
toddouska
2cdcd560a2
Merge pull request #1307 from JacobBarthelmeh/Testing
...
fix check key pair match with ECC
2018-01-11 08:26:25 -08:00
toddouska
df3c775f1d
Merge pull request #1304 from cconlon/dsa1864
...
DSA 186-4 Key Generation, raw params and key import/export
2018-01-11 08:25:27 -08:00
Takashi Kojo
e4093a56f5
remove .uvguix
2018-01-11 07:14:13 +09:00
Takashi Kojo
f55fa9260d
user_settings.h under RTE
2018-01-11 06:55:51 +09:00
Takashi Kojo
c53961d4c5
fix MPU menu
2018-01-11 06:55:51 +09:00
Takashi Kojo
e0ab3888ec
remove NO_64BIT from STM32 options
2018-01-11 06:55:51 +09:00
Takashi Kojo
379c6d0ad8
dummy RTC
2018-01-11 06:55:50 +09:00
Takashi Kojo
a429f5ef98
add MPU menu to user_settings.h
2018-01-11 06:55:50 +09:00
Takashi Kojo
8c000c05ee
refactor MDK options in client/server.c
2018-01-11 06:55:50 +09:00
Takashi Kojo
d8ca8586c0
remove ByteReverseWord64 in sha512
2018-01-11 06:55:50 +09:00
Takashi Kojo
28e18e35f8
mdk5 error
2018-01-11 06:53:34 +09:00
Takashi Kojo
f49bd43ba1
add HAL_HASH, HAL_RNG to benchmark project
2018-01-11 06:53:33 +09:00
Takashi Kojo
f1cba97773
remove wolfssl_fgets
2018-01-11 06:53:33 +09:00
Takashi Kojo
109dd05bb3
Fix benchmark and test project
2018-01-11 06:53:33 +09:00
Takashi Kojo
d34fb44df2
listen parrameter for Keil tcp net
2018-01-11 06:53:33 +09:00
Takashi Kojo
cd0c5d4b93
refactor WOLFSSL_DMK_ARM and WOLFSSL_KEIL_TCP_NET in wolfio.h
2018-01-11 06:53:33 +09:00
Takashi Kojo
bb2e73566b
add WOLFSSL_CMSIS_RTOS option in internal.h
2018-01-11 06:53:32 +09:00
Takashi Kojo
c1fe2f36db
add WOLFSSL_CMSIS_RTOS option
2018-01-11 06:53:32 +09:00
Takashi Kojo
a53b7a8ced
clean up files under projects
2018-01-11 06:53:32 +09:00
Takashi Kojo
cf5708d156
Update SimpleServer, clean up other project files
2018-01-11 06:53:32 +09:00
Takashi Kojo
84c216a5f7
new user_settings.h for mdk5 config menu
2018-01-11 06:53:32 +09:00
Takashi Kojo
76e1a34fd0
update SimpleClient example
2018-01-11 06:53:32 +09:00
Takashi Kojo
3f922b4254
update CryptBenchmark
2018-01-11 06:53:31 +09:00
Takashi Kojo
b569dff905
update CryptTest project
2018-01-11 06:53:31 +09:00
Jacob Barthelmeh
59b9ab9097
place buffer on stack instead and zero it when done
2018-01-10 13:36:03 -07:00
John Safranek
d01d255985
FIPS Update
...
1. When configuring FIPSv2, force enable RSA-PSS and ECC.
2. Add more checks for FIPSv2 around the code.
2018-01-10 11:29:01 -08:00
John Safranek
788cc39498
FIPS Update
...
1. Switch in different versions of rsa.c depending on FIPS v1 or v2.
2. Add the Windows pragmas to rsa.c if building for FIPS v2.
3. Leave out FIPS wrappers from rsa.c if not building for FIPS v1.
2018-01-10 11:29:01 -08:00
John Safranek
6fdbe02291
ECC FIPS
...
Add the ECC API to the FIPS boundary. Included are ECDHE and ECDSA.
2018-01-10 11:29:01 -08:00
John Safranek
274c6ca492
RSA Update
...
1. Fix issue with new key gen options and using old FIPS releases.
2. Modify the FIPS configure option to handle an option for the updated FIPS.
2018-01-10 11:29:01 -08:00
John Safranek
a784142edf
RSA Update
...
1. Added FIPS wrappers for MakeRsaKey(), CheckProbablePrime(), and RsaFlattenPublicKey().
2. Update the API test so that it used appropriate key and message sizes for the RSA testing.
3. Add function to get all parts of a flattened RSA key.
2018-01-10 11:29:01 -08:00
John Safranek
84f6093068
RSA Update
...
1. Replaced MakeRsaKey() function wth a version that follows the NIST prescribed process closer.
2. Added an additional check to RSA key generation to ensure that |p-q| > 2^((nlen/2)-100) per NIST FIPS 186-4 sec B.3.1.
3. Added public API for checking a number being probably prime according to FIPS 186-4.
4. Added a large integer used to check the lower bound of a possible prime.
2018-01-10 11:13:23 -08:00
John Safranek
4afa7c7e22
RSA Update
...
Added mp wrappers for fp_abs() and fp_2expt().
2018-01-10 11:11:56 -08:00
John Safranek
32a345e2f2
Merge pull request #1309 from SparkiDev/pss_var_salt_len
...
Add support in PSS for salt lengths up to hash length
2018-01-10 11:00:47 -08:00
Jacob Barthelmeh
8c900a2391
added in comments and check on return code
2018-01-10 10:33:48 -07:00
Chris Conlon
d78a6cebd8
allow DSA raw export functions to return buffer sizes
2018-01-10 10:21:58 -07:00
Jacob Barthelmeh
9839809c99
add better comments and update return values
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
89973a7eaf
cast for call to ecc_point copy function
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
e9432005d4
build for no old names and fix valgrind report
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
439498b3c1
remove redefinitions and add guards
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
23b271da84
clean up after rebase
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
0deaf1e227
increase max memory bucket size to account for larger WOLFSSL structure with sessioncerts
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
a60db81d09
check on key type with SetRsaExternal and fix for function name after rebase
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
d1b24f2bb1
remove unneeded XFREE with small stack
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
13bc1f64b8
account for larger WOLFSSL structure with save session certs
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
cecdd50eab
make NID values avaliable with OPENSSL_EXTRA build
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
4d9675bebe
fix for PKCS12 create with small stack
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
d758c114b0
fix return value
2018-01-10 09:28:56 -07:00
Takashi Kojo
1b7f4ad1dd
return value check in EVP_PKEY_encrypt
2018-01-10 09:28:56 -07:00
Takashi Kojo
09eeafe4f0
add cipher name "DES-EDE3"
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
c0db7d02f7
cast for const qualifier match on argument
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
06891fa14a
session SSL object size increase with compatibility layer
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
513e3b7338
rebasing compatiblity layer on nginx work
2018-01-10 09:28:56 -07:00
Takashi Kojo
641af21cb0
Fix AES192-ECB in EVP_CipherInit
2018-01-10 09:28:56 -07:00
Takashi Kojo
5237a25699
Add rc4 to EVP_CipherUpdate
2018-01-10 09:28:56 -07:00
Takashi Kojo
21021aa408
Fix EVP_Cipher padding control
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
326d889658
initialize extra name entries to 0
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
ab0bc32d4c
resolve rebase by adding an error node pull function
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
7763a002f3
fix for static analysis warning
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
0f2a4be832
update tests and memory checking
2018-01-10 09:28:56 -07:00
Takashi Kojo
7a7f686f16
add test case for X509_get_pubkey, d2i_PrivateKey
2018-01-10 09:28:56 -07:00
Takashi Kojo
f802103923
add RSA_new, RSA_LoadDer in d2i_PrivateKey
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
00670233af
account for fast rsa when testing get rsa size
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
c8233177c3
fix bio gets and enhance x509 get public key
2018-01-10 09:28:56 -07:00
Takashi Kojo
734e728fba
Fix padding control: EVP_CipherUpdate
2018-01-10 09:28:56 -07:00
Takashi Kojo
150481699f
add BIO_new_file: ssl.c, tests/api.c
2018-01-10 09:28:56 -07:00
Takashi Kojo
546d31c51c
add X509_load_certificate_file
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
8928160df7
memset structures to 0 in Init functions
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
340963742a
memory bio flag mapped to wolfSSL
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
1765246cf7
bio gets test, certificate buffer tests, and increase max static memory bucket size with sessioncerts
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
ff8da2d4fe
windows and no filesystem build warnings
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
79ea6b78bb
add name entry and fix build without RSA
2018-01-10 09:28:56 -07:00
Takashi Kojo
03a4b9d2fe
return code checks for PKEY, EVP Sign test
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
54246053de
WOLFSSL_RSA in EVP_PKEY structure and fixes for PKCS12 build
2018-01-10 09:28:56 -07:00
Takashi Kojo
863034f20f
Fixed RSA_verify. Add test on EVP_Sign/Verify
2018-01-10 09:28:56 -07:00
Takashi Kojo
8e41d32950
EVP MD and PKEY test. Add PKEY_new/free
2018-01-10 09:28:56 -07:00
Takashi Kojo
49816b95e0
Type mismatch AssertInt(x, y, op, er) in api.c
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
7252a138e0
ASN1 object functions
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
492809203d
templates for upcoming compatibility functions
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
35ad1269a8
expand compatibility layer, hmac, dsa gen, pubkey from bio, pseudo rand
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
e391931711
error put function
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
704d765501
adjust compat. layer to not include wolfSSL headers where possible, add d2i for X509's, clang-3.3 build
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
e213e60471
PKCS 8 info function
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
03b0a07adb
add BN pseudo random function
2018-01-10 09:28:56 -07:00
Jacob Barthelmeh
c552de77f4
PKCS12 create function
2018-01-10 09:28:56 -07:00
David Garske
2e1068f30c
Added stubs for new OBJ_cleanup, OBJ_nid2obj, OBJ_obj2txt. Added openssl/objects.h for compatibility. Moved around OBJ function defs.
2018-01-10 09:28:30 -07:00
David Garske
aac050369a
Added API unit tests for new BUF_MEM. Fixed wolfSSL_BUF_MEM_grow handling of negative “len” input. Added GPLv2 header to new buffer.h.
2018-01-10 09:28:30 -07:00
David Garske
2a4ea5843d
Added new openssl compatibility functions for BUF_MEM_new, BUF_MEM_grow and BUF_MEM_free.
2018-01-10 09:28:30 -07:00
Takashi Kojo
c237980d47
typedef struct Aes in openssl/aes.h
2018-01-10 09:28:30 -07:00
Jacob Barthelmeh
d5a0b81e97
fix SSL_load_error_strings redefinition
2018-01-10 09:28:30 -07:00
Jacob Barthelmeh
392b1c6f36
EVP verify final type change. Resolve Ubuntu build and clang warning
2018-01-10 09:26:58 -07:00
Jacob Barthelmeh
921eb03a01
add PEM read bio private key function and update reading a memory bio
2018-01-10 09:26:58 -07:00
Takashi Kojo
f9eb8f8f6d
missing rename SSL_check_private_key, DSA_dup_DH
2018-01-10 09:26:58 -07:00
Jacob Barthelmeh
9290b2e464
RAND cleanup and no-op functions for compatibility -- brackets added to ssl.c if statements for gcc-6
2018-01-10 09:26:58 -07:00
Takashi Kojo
4f76e33bc7
add test on EVP_Encrypt/DecryptFinal
2018-01-10 09:26:58 -07:00
Takashi Kojo
d113acb5ab
add EVP_MD_CTX_type
2018-01-10 09:26:58 -07:00
Takashi Kojo
a29f15feff
add EVP_VerifyFinal, RSA_verify
2018-01-10 09:26:58 -07:00
Jacob Barthelmeh
54af9fb884
compatibility mapping for STORE_CTX functions and added test case
2018-01-10 09:26:58 -07:00
Jacob Barthelmeh
f0c19ba9b2
add internal to DER X509 function
2018-01-10 09:26:58 -07:00
Jacob Barthelmeh
11d42f5112
add X509 new function
2018-01-10 09:26:58 -07:00
Jacob Barthelmeh
7da0f50457
tests for added DES functions and fix check on DES key
2018-01-10 09:26:58 -07:00
Jacob Barthelmeh
cf6f4718e8
add public function to check if a DES key is weak
2018-01-10 09:26:58 -07:00
Takashi Kojo
bebe60a4c1
EVP PKEY RSA encrypt/decrypt, tentative
2018-01-10 09:26:58 -07:00
Takashi Kojo
a11e389bc8
EVP_PKEY templates
2018-01-10 09:26:58 -07:00
Jacob Barthelmeh
f695683fd0
begin BIO gets functions
2018-01-10 09:26:58 -07:00
Jacob Barthelmeh
2b75d0faf3
asn1 string compatibility
2018-01-10 09:26:58 -07:00
toddouska
b9197f96db
Merge pull request #1305 from JacobBarthelmeh/DH
...
add dh header to test.h and adjust macro guards
2018-01-10 08:09:51 -08:00
toddouska
36f621db1c
Merge pull request #1308 from JacobBarthelmeh/Compatibility-Layer
...
change place holders to be void* type and add comment to compatibilit…
2018-01-10 08:08:54 -08:00
Sean Parkinson
87109dd46e
Add support in PSS for salt lengths up to hash length
...
Added non-inline RSA-PSS verify
Added tests of RSA-PSS
Fixed comments in TLS v1.3 code
Added PSS salt length error
2018-01-10 10:16:32 +10:00
Jacob Barthelmeh
e77a05c3b2
change place holders to be void* type and add comment to compatibility header files
2018-01-09 17:08:54 -07:00
Jacob Barthelmeh
0bfa399b6c
fix check key pair match with ECC
2018-01-09 16:13:46 -07:00
connerwolfssl
fc754ba88e
Merge https://github.com/wolfssl/wolfssl
2018-01-09 14:15:39 -07:00
connerwolfssl
e6cef73658
html and pdf documentation for wolfssl, generated by doxygen
2018-01-09 14:12:06 -07:00
Jacob Barthelmeh
7d3c502c47
add dh header to test.h and adjust macro gaurds
2018-01-09 12:06:43 -07:00
Kaleb Himes
30f8f7d409
Make clean rules more portable
...
(If this directory were ever to move using ../../ is insufficient. Use the WOLFSS_ROOT variable instead.
2018-01-09 10:48:13 -07:00
Chris Conlon
09bb2e5837
clarify DSA variable names, use WOLFSSL_BIT_SIZE
2018-01-08 17:06:33 -07:00
toddouska
4c65726091
Merge pull request #1296 from JacobBarthelmeh/DH
...
add DH Agree callback
2018-01-08 15:19:12 -08:00
Chris Conlon
e42fea8710
add unit tests for DSA raw key and param import/export functions
2018-01-08 13:36:06 -07:00
Chris Conlon
fc563550c6
add DSA raw params import export, raw key export functions
2018-01-08 13:36:01 -07:00
Chris Conlon
61f6b9ce0f
add DSA 186-4 key generation
2018-01-08 09:54:27 -07:00
JacobBarthelmeh
11fdef0206
Merge pull request #1297 from cconlon/pkcs7signedfix
...
fix for PKCS#7 SignedData RSA signature types, include hash function
2018-01-05 13:34:12 -07:00
Jacob Barthelmeh
b22ae9de4c
add DH callback to example server and client
2018-01-05 11:56:59 -07:00
Chris Conlon
91138648aa
Merge pull request #1302 from dgarske/fix_readme
...
Fix typo in readme for enabling old TLS 1.0
2018-01-05 09:15:30 -07:00
dgarske
e1505bb857
Merge pull request #1301 from ejohnstown/drbg-warn
...
DRBG Warning Fix
2018-01-04 18:43:31 -08:00
David Garske
bc8625cbea
Fix typo in readme for enabling old TLS 1.0 using ./configure --enable-tlsv10.
2018-01-04 15:46:03 -08:00
John Safranek
983aa97f94
DRBG Warning Fix
...
1. Some compilers will warn on unused constants. Removed the constant DRBG_ERROR which is unused and causing warnings on a particular build.
2. Renumbered the remaining internal return codes.
2018-01-04 15:22:58 -08:00
toddouska
9315d18901
Merge pull request #1294 from dgarske/log_improve
...
Improvements to logging
2018-01-04 10:15:22 -08:00
Chris Conlon
34df8b98bf
fix for PKCS#7 SignedData RSA signature types, include hash function
2018-01-04 10:55:17 -07:00
kaleb-himes
effb751204
Add build scripts for default SGX build and improve cleanup
2018-01-04 10:38:56 -07:00
Jacob Barthelmeh
bc7b1a8a1f
handle degenerate case with PKCS7
2018-01-04 09:45:43 -07:00
Jacob Barthelmeh
915f628bc7
add DH Agree callback
2018-01-03 16:47:15 -07:00
dgarske
3f53e8d1dd
Merge pull request #1270 from JacobBarthelmeh/CAAM
...
add CAAM with INTEGRITY support
2018-01-03 08:14:46 -08:00
David Garske
ab3d1e85cf
Fix to disable log output for WOLFSSL_ERROR with WOLFSSL_NGINX defined. Cleanup on the loggingEnabled.
2018-01-02 19:30:33 -08:00
David Garske
d0bd52910f
Fix for issue with unit test where mutliple threads are outputting log data.
2018-01-02 18:20:23 -08:00
Jacob Barthelmeh
01f603ad65
add documentation, macro for no AES hw or HASH hw, use usleep when waiting for entropy
2018-01-02 15:00:35 -07:00
toddouska
f2375f3fee
Merge pull request #1271 from SparkiDev/chacha20_sb
...
Improve performance of small number of blocks for chacha20
2018-01-02 09:40:49 -08:00
Chris Conlon
d8ff36e692
Merge pull request #1285 from jrblixt/unitTest_api_addEcc-PR08042017
...
Add ECC unit test functions.
2017-12-29 15:02:07 -07:00
jrblixt
6c76a89785
Add ECC unit test functions.
...
Change per David RE: WOLFSSL_ATECC508A
Jenkins fix.
Changes per Chris.
2017-12-29 13:03:45 -07:00
David Garske
b53f2a1ac1
Improvements to logging. Added new build option WOLFSSL_DEBUG_ERRORS_ONLY to reduce logging/code size when building with DEBUG_WOLFSSL. Added new WOLFSSL_ERROR_MSG(const char* msg) API for logging errors. Exposed the logging API's. Improvements to the wolfCrypt logging_test. Moved wolfSSL_Debugging_ON and wolfSSL_Debugging_OFF to logging.h.
2017-12-29 10:44:51 -08:00
Chris Conlon
0af93ffd08
Merge pull request #1290 from jrblixt/unitTest_api_addEd25519-PR08092017
...
Added Ed25519 to unit test functions.
2017-12-29 11:31:48 -07:00
connerwolfssl
ad4cf69993
Moved doxygen API comments in to a seperate directory
2017-12-29 10:57:14 -07:00
jrblixt
8a51df9fd8
Spacing issue per Chris.
2017-12-29 09:48:35 -07:00
Kaleb Himes
272e37767b
Merge pull request #1293 from dgarske/bench_emb
...
Fix for building with `BENCH_EMBEDDED`
2017-12-29 09:19:50 -07:00
David Garske
f71047ef2d
Fix for building with BENCH_EMBEDDED. Fix for building without OPENSSL_EXTRA where wolfSSL_OPENSSL_malloc assumes size_t is defined. Improvements to the GCC-ARM IDE example.
2017-12-29 08:19:21 -08:00
toddouska
f492c4f120
Merge pull request #1264 from dgarske/wolf_extra
...
Adds new `WOLFSSL_EXTRA` define to expose useful compatibility API's
2017-12-28 16:10:09 -08:00
jrblixt
555551b745
Added Ed25519 to unit test functions.
2017-12-28 09:42:51 -07:00
Chris Conlon
83cb000958
Merge pull request #1289 from jrblixt/unitTest_api_addCmac-PR08162017
...
AES_CMAC unit test functions added.
2017-12-27 15:54:32 -07:00
Jacob Barthelmeh
84ecf94263
spelling mistakes, formatting, and change error name
2017-12-27 15:24:14 -07:00
Chris Conlon
0c709a9088
Merge pull request #1098 from jrblixt/unitTest_api_addSha3-PR08112017
...
Sha3 unit test functions.
2017-12-27 15:23:14 -07:00
David Garske
3c6443e1e5
Added wolfSSL_CTX_set_client_CA_list and wolfSSL_SSL_CTX_get_client_CA_list to WOLF_EXTRA.
2017-12-27 08:55:28 -08:00
David Garske
d75c2e2a91
Added new WOLFSSL_EXTRA define for expanded API's without openssl extra. Removed old GOAHEAD_WS, which had build errors and current project requires full openssl extra compatability. Fix unused arg build warnings for OCSP. The WOLFSSL_EXTRA adds: wolfSSL_CTX_set_quiet_shutdown, wolfSSL_set_quiet_shutdown, wolfSSL_set_accept_state and wolfSSL_set_connect_state.
2017-12-27 08:55:28 -08:00
dgarske
0e9cd7a3d7
Merge pull request #1292 from moisesguimaraes/fixes-ocsp-stapling
...
fixes OCSP Stapling v2 tests
2017-12-27 08:53:18 -08:00
Moisés Guimarães
263525d812
enables OCSPStapling CM for ocspstapling2
2017-12-26 22:57:20 -03:00
Moisés Guimarães
43c234029b
adds a call to wolfSSL_CTX_EnableOCSPStapling() on client.c to fix ocspstapling2 tests and removes unnecessary 'kill ' from the test scripts
2017-12-26 22:32:21 -03:00
Jacob Barthelmeh
22fc90006b
AES-XTS performance enhancement
2017-12-23 14:44:32 -07:00
Jacob Barthelmeh
cf1575fafb
AES-GCM performance enhancement
2017-12-23 14:44:32 -07:00
Jacob Barthelmeh
6d3166316b
set input size constraints for AES-ECB mode with driver
2017-12-23 14:44:31 -07:00
Jacob Barthelmeh
fe7dec0edb
refactor input/output with AES and fix sizes passed in
2017-12-22 12:18:04 -07:00
Chris Conlon
1bbe18bb8d
Merge pull request #1234 from abrahamsonn/readme-fix
...
README updates to attempt to improve GitHub search positioning
2017-12-21 16:29:03 -07:00
Chris Conlon
2660ff0b93
Merge pull request #1251 from kojo1/openSSL-Compat-201711
...
openSSL compatibility 201711
2017-12-21 16:25:46 -07:00
Jacob Barthelmeh
b3eef2b10e
formating and removing white space, also added sanity check on blob arguments
2017-12-21 14:26:22 -07:00
dgarske
d1ee0f3d0d
Merge pull request #1288 from cconlon/release3.13
...
wolfSSL 3.13.0 README and version updates
2017-12-21 12:01:38 -08:00
Chris Conlon
9c74c4d69b
update library version for 3.13.0 in rpm/spec.in
2017-12-21 10:09:29 -07:00
Chris Conlon
8bebadcd4b
update library version for 3.13.0 in configure.ac/version.h
2017-12-21 09:54:19 -07:00
Chris Conlon
d848a15fc8
update README for 3.13.0
2017-12-21 09:48:52 -07:00
dgarske
5f4cc1a5ed
Merge pull request #1287 from cconlon/inferfixes
...
Release fixes from Facebook infer
2017-12-20 17:57:17 -08:00
dgarske
212f2d0ca8
Merge pull request #1286 from cconlon/fixes
...
Release prep fixes
2017-12-20 16:32:45 -08:00
Chris Conlon
22f25fa9bb
add NULL ctx argument check to wolfSSL_X509_STORE_CTX_set_time()
2017-12-20 17:30:09 -07:00
Chris Conlon
8ab4e5d18c
fix NULL pointer dereference in wolfSSL_CTX_new() for ctx->srp if ctx is NULL
2017-12-20 17:21:57 -07:00
Chris Conlon
6bb60581ea
free WOLFSSL_BIGNUM when wolfSSL_BN_mod_inverse() fails if dynamic
2017-12-20 17:04:59 -07:00
jrblixt
4552c8a4a7
AES_CMAC unit test functions added.
2017-12-20 15:44:44 -07:00
Chris Conlon
adc8ca0f16
api.c fix for fast-rsa
2017-12-20 15:13:13 -07:00
Chris Conlon
be4d3c8321
fix for SetBitString() defined but not used
2017-12-20 15:02:35 -07:00
Chris Conlon
7bc5bcb86a
benchmark.c fixes for NO_MAIN_DRIVER, const arrays
2017-12-20 14:55:35 -07:00
Chris Conlon
fd292b1ae4
check key for NULL in wc_ecc_import_private_key_ex()
2017-12-20 14:45:46 -07:00
Jacob Barthelmeh
28582ad5d9
remove HMAC from driver, it was never completely stable yet
2017-12-20 14:21:15 -07:00
dgarske
51c3427a27
Merge pull request #1284 from cconlon/fixes
...
scan-build, valgrind, and test.c fixes
2017-12-20 13:06:26 -08:00
Jacob Barthelmeh
20e69460b0
minor change of variable name and add settings check
2017-12-20 13:59:20 -07:00
toddouska
0c01533fe4
Merge pull request #1280 from dgarske/crypto_hw
...
Add crypto hardware support for ECC sign
2017-12-20 11:34:39 -08:00
Chris Conlon
2460a3de3d
fix asn_test print in test.c
2017-12-20 12:28:27 -07:00
Chris Conlon
e97f8b5a9c
fix scanbuild issues, internal.c and tfm.c
2017-12-20 12:18:49 -07:00
Chris Conlon
f93ed32cb3
fix scanbuild issue, use of NULL pointer in wc_Sha256Update
2017-12-20 11:48:09 -07:00
dgarske
4dc49590db
Merge pull request #1282 from SparkiDev/tls13_win
...
Fix for building TLS v1.3 code on Windows
2017-12-20 10:38:27 -08:00
Chris Conlon
e4ac38c532
fix valgrind use of uninitialized value warning
2017-12-20 11:35:30 -07:00
Jacob Barthelmeh
351a673ec0
Add AES-CCM hardware acceleration support and other fixes
2017-12-20 11:16:11 -07:00
Jacob Barthelmeh
3a6d5b8f90
formating / add c files to distro / remove unneeded macros
2017-12-20 11:16:11 -07:00
Jacob Barthelmeh
5fa9455bf9
add CAAM with INTEGRITY support
2017-12-20 11:16:11 -07:00
jrblixt
98603d9e74
Sha3 unit test functions.
...
Code review changes per Chris.
2017-12-20 10:49:24 -07:00
David Garske
696ddc9b71
Added wolfSSL_CTX_SetDevId and wolfSSL_SetDevId to allow setting devId. Use #define macro to map the original async wolfSSL_CTX_UseAsync and wolfSSL_UseAsync API's to the new ones.
2017-12-20 09:08:01 -08:00
toddouska
ac8996c9bc
Merge pull request #1281 from dgarske/fix_ocsp_nb_checkall
...
Fix for OCSP non-blocking with check all flag set
2017-12-20 09:04:09 -08:00
toddouska
d94d90a22e
Merge pull request #1276 from dgarske/http_appstr_list
...
Fix for processing HTTP responses to accept a list of application strings
2017-12-20 09:03:14 -08:00
Chris Conlon
b40b13c0eb
Merge pull request #1279 from SparkiDev/fe_init_ed25519
...
Fix fe_init to be avaible when compiling ED25519 only
2017-12-20 09:12:42 -07:00
David Garske
4712376ce1
Fix for OCSP non-blocking with check all flag set.
2017-12-19 16:52:47 -08:00
Sean Parkinson
fa2db8b22e
Fix for building TLS v1.3 code on Windows
2017-12-20 10:32:33 +10:00
dgarske
9f51674be4
Merge pull request #1278 from cconlon/winfix
...
fix Windows Visual Studio warnings
2017-12-19 15:55:13 -08:00
Sean Parkinson
aa4f38143e
Fix fe_init to be avaible when compiling ED25519 only
2017-12-20 09:27:50 +10:00
Chris Conlon
574beff4cc
fix Windows Visual Studio warnings
2017-12-19 13:57:33 -07:00
David Garske
c0f2a0c77b
Support for crypto hardware on ECC sign using Crypto_EccSign.
2017-12-19 12:51:45 -08:00
dgarske
5235e256c7
Merge pull request #1277 from JacobBarthelmeh/Testing
...
Testing
2017-12-19 12:38:35 -08:00
Jacob Barthelmeh
89e57f4159
protect against AES-CCM copy to smaller local buffer
2017-12-19 11:55:40 -07:00
Jacob Barthelmeh
0d5a772348
revert macro to allow AES keywrap and AES XTS with ARM assembly
2017-12-19 11:49:30 -07:00
dgarske
d6472c7f71
Merge pull request #1272 from ejohnstown/pkcs5-fix
...
PKCS5 Fixes
2017-12-19 10:09:14 -08:00
David Garske
05d0176b84
Fix for processing HTTP responses to accept a list of application strings. Specifically for CRL which has both "application/pkix-crl" and "application/x-pkcs7-crl". Both CRL formats are the same and both parse correctly. Applies to --enable-crl with HAVE_CRL_IO only.
2017-12-19 09:54:03 -08:00
dgarske
ba4ff62953
Merge pull request #1169 from JacobBarthelmeh/Testing
...
fix DH free with switch from server to client side
2017-12-19 09:50:41 -08:00
dgarske
9a6a4f6e02
Merge pull request #1245 from danielinux/chibios_port
...
Chibios port
2017-12-19 09:19:38 -08:00
Chris Conlon
fd0088fb34
Merge pull request #1269 from ghoso/signal-dev
...
Add support for libsignal-protocol-c
2017-12-19 09:30:03 -07:00
Jacob Barthelmeh
b9cda18be9
change type with free to match malloc'd type
2017-12-19 09:08:41 -07:00
Jacob Barthelmeh
7662bd58f0
fix DH free with switch from server to client side
2017-12-19 09:08:41 -07:00
toddouska
5be8c7fa1a
Merge pull request #1275 from dgarske/fix_async_sim_wctest
...
Fix for wolfCrypt test with async
2017-12-19 07:19:04 -08:00
toddouska
d08572164f
Merge pull request #1148 from dgarske/fix_ecc508a
...
Fixes to `WOLFSSL_ATECC508A` support to allow import/export
2017-12-19 07:17:41 -08:00
toddouska
f939f407c5
Merge pull request #1268 from cconlon/eccpkcs8
...
Add ECC private key export for unencrypted PKCS#8
2017-12-19 07:16:21 -08:00
Sean Parkinson
31aa5e308d
Improve performance of small number of blocks for chacha20
2017-12-19 18:02:21 +10:00
Go Hosohara
bfed9f28d3
Modification for compliling application with libsignal-protocol-c.
2017-12-19 13:19:05 +09:00
John Safranek
e6334fdaf8
PKCS5 Fixes
...
1. Fix issue where optional and default items in the ASN.1 blob were not getting "parsed" correctly.
2. Added OIDs for the SHA based HMACs.
3. Removed some redundant constants from key decryption.
4. Updated the DecryptKey() function to handle AES256-CBC.
5. Updated the DecryptContent() function to act like DecryptKey().
2017-12-18 17:08:29 -08:00
toddouska
ddae61afbd
Merge pull request #1259 from dgarske/fix_ocsp_nonblock
...
Fixes for handling non-blocking OCSP
2017-12-18 16:43:24 -08:00
David Garske
6b4b17a07d
Fix for wolfCrypt test with async simulator, which requires polling on the ECC make key.
2017-12-18 16:39:53 -08:00
toddouska
680f78f2ae
Merge pull request #1274 from dgarske/fix_jenkins
...
Fixes to address Jenkins issues
2017-12-18 16:31:02 -08:00
David Garske
57c0b5d4ac
Adjustment to fix for --enable-32bit where time_t is not long.
2017-12-18 14:34:40 -08:00
David Garske
5b003918ef
Fix for #ifdef issue causing some X509 functions to be unavailable when DH and ECC were disabled. Fix for HashAlgoToType not being available if building with DH and ECC disabled and RSA PSS enabled.
2017-12-18 11:10:12 -08:00
David Garske
bbd27b491e
Fix for building with --enable-32bit where test assumes time_t is long.
2017-12-18 11:04:40 -08:00
Takashi Kojo
7a59275688
add arg check, wolfSSL_CTX_clear_options
2017-12-16 09:03:44 +09:00
Takashi Kojo
6421324287
add arg check
2017-12-15 05:45:45 +09:00
Chris Conlon
db7cd22645
remove ECC key conversion functions from WOLFSSL_KEY_GEN
2017-12-13 09:44:47 -07:00
Chris Conlon
43ef843257
add ECC private key export for unencrypted PKCS#8
2017-12-13 09:44:36 -07:00
toddouska
bacbc06856
Merge pull request #1263 from SparkiDev/fe_init_fix
...
Only implement and call fe_init when available
2017-12-12 16:25:09 -08:00
toddouska
26019b3441
Merge pull request #1262 from SparkiDev/benchmark
...
Improve benchmark program
2017-12-11 15:55:00 -08:00
dgarske
1bf8dc5246
Merge pull request #1265 from SparkiDev/sp_init_mp
...
Initialize mp for compilers that don't track if conditions
2017-12-11 09:19:16 -08:00
Sean Parkinson
704b332960
Add usage information
...
Only recognize on command line algorithms compiled in.
2017-12-11 11:40:11 +10:00
Sean Parkinson
8ee1996e39
Initialize mp for compilers that don't track if conditions
2017-12-11 09:44:47 +10:00
Kaleb Himes
137eb291cd
Merge pull request #1261 from SparkiDev/tls_def_fix
...
Fix placement of #endif
2017-12-08 07:57:10 -08:00
Sean Parkinson
c457ca462a
Only implement and call fe_init when available
2017-12-08 14:16:24 +10:00
Sean Parkinson
2954b67f96
Improve benchmark program
...
Supports command line choosing of algorithms to benchmark.
Display benchmarks in powers of 10 (1000, 1000*1000) instead of
powers of 2 (1024, 1024*1024).
2017-12-08 13:57:34 +10:00
David Garske
de05c563b6
Fix to handle non-blocking OCSP when WOLFSSL_NONBLOCK_OCSP is defined and not using async. OCSP callback should return OCSP_WANT_READ. Added ability to simulate non-blocking OCSP using TEST_NONBLOCK_CERTS.
2017-12-08 03:12:33 +01:00
Sean Parkinson
4f97a49213
Fix placement of #endif
2017-12-08 09:13:53 +10:00
toddouska
87690ce8bd
Merge pull request #1257 from dgarske/xcode_fixes
...
Xcode project improvements inc/benchmark tool
2017-12-07 08:44:03 -08:00
David Garske
bababf115a
Moved to IDE/XCODE. Fixed build warnings with xcode. Updated the user_settings.h to support fast math, ECC, timing resistance, single precision math, ARMv8, SHA3, ChaCha20/Poly1305, Ed/Curve25519 and ensure default disables are defined. Added Xcode iOS benchmark example. Runs wolfCrypt test, wolfCrypt benchmark and the new TLS benchmark by cipher suite.
2017-12-07 11:02:19 +01:00
dgarske
24ef88f6f0
Merge pull request #1258 from SparkiDev/sp_from_mp_fix
...
Fix loading of MP
2017-12-07 01:58:56 -08:00
Sean Parkinson
d78734f37d
Fix loading of MP
2017-12-07 17:50:47 +10:00
toddouska
4c4b02bb31
Merge pull request #1256 from SparkiDev/ed25519_perf
...
Ed25519 perf
2017-12-04 14:42:03 -08:00
toddouska
5a56757018
Merge pull request #1250 from SparkiDev/curve25519_asm
...
Intel ASM code for Curve25519
2017-12-04 14:38:12 -08:00
Takashi Kojo
d11581aaff
new lines, BAD_FUNC_ARG
2017-12-01 09:49:38 +09:00
Sean Parkinson
34ecfda145
Check for ADX instructions
2017-12-01 08:55:46 +10:00
Sean Parkinson
e8e5179d1c
Optimize the Ed25519 operations
2017-12-01 08:54:12 +10:00
Sean Parkinson
29943dc352
Redo reduce and muladd to be cleaner
2017-12-01 08:54:12 +10:00
Sean Parkinson
f2b8ffa919
Check for ADX instructions
2017-12-01 08:51:24 +10:00
Sean Parkinson
3cdf3565c8
Intel ASM code for Curve25519
...
AVX2 added as well
2017-11-30 12:34:05 +10:00
Takashi Kojo
98235f9e36
fix hard tabs
2017-11-30 09:08:59 +09:00
Sean Parkinson
57e5648a5d
Merge pull request #1247 from kaleb-himes/pre-processor-logic-fix
...
Proposed fix for build-time errors with (mp/fp)_s_rmap when debug ena…
2017-11-30 09:29:28 +10:00
toddouska
909b519139
Merge pull request #1254 from dgarske/fix_ecpoint_leak
...
Fix leak with `wolfSSL_EC_POINT_mul`
2017-11-29 14:51:56 -08:00
toddouska
eeca36dc75
Merge pull request #1249 from SparkiDev/avx2_fix
...
Make AVX2 code compile in on Mac
2017-11-29 14:49:30 -08:00
toddouska
8e91d9ffd9
Merge pull request #1244 from SparkiDev/sha3_fast
...
SHA-3 fast code is smaller and a bit faster
2017-11-29 14:45:57 -08:00
toddouska
ecb9e799a9
Merge pull request #1243 from dgarske/def_sec_reneg
...
Adds new define to enable secure-renegotiation by default
2017-11-29 14:40:23 -08:00
Takashi Kojo
b664a1187b
fix hard tabs, new line
2017-11-29 07:03:00 +09:00
David Garske
af1f48ccb5
Fix leak with EC Point mul, where inSet wasn't being set, which caused a leak.
2017-11-28 13:00:26 -08:00
Takashi Kojo
64caf325f8
add ctx == NULL checks, fix spacing
2017-11-28 10:16:24 +09:00
Chris Conlon
792672e77b
Merge pull request #1252 from kojo1/IAR-EWARM
...
update IAR-EWARM projects
2017-11-27 11:37:57 -07:00
dgarske
718455f9c6
Merge pull request #1248 from cconlon/oidfix
...
fix CTC_SHA224wECDSA oid sum
2017-11-27 09:13:03 -08:00
abrahamsonn
a4f5b2e29f
Added the requested changes
2017-11-27 09:50:12 -07:00
kaleb-himes
a14b67100b
refactor following feedback
2017-11-27 08:47:58 -07:00
Takashi Kojo
4cd39b4bfb
refine dummy current_time to avoid infinit waiting loop
2017-11-27 09:03:50 +09:00
Takashi Kojo
a3b2817036
refine user_settings.h for EWARM projects
2017-11-27 09:02:40 +09:00
Takashi Kojo
86a287be01
fix compile error with EWARM
2017-11-27 09:01:33 +09:00
Takashi Kojo
f53fca88e6
Eliminate unused macro options in project properties
2017-11-27 09:00:19 +09:00
Takashi Kojo
8a1de2f69d
update file listed in wolflib project
2017-11-27 07:59:06 +09:00
Takashi Kojo
8f31d36bcd
gurde SSL_get_peer_cert_chain->count check by macro option
2017-11-25 06:25:15 +09:00
Takashi Kojo
eb85accea9
Fix 'buffer' shadows a global (2)
2017-11-25 03:59:35 +09:00
Takashi Kojo
79b648c006
Fix ‘buffer’ shadows a global
2017-11-24 18:21:32 +09:00
Takashi Kojo
ac83445032
eliminate redundant dec, wolfSSL_CTX_get_options
2017-11-24 13:26:40 +09:00
Takashi Kojo
a320ca92fb
fix rebase miss
2017-11-24 08:21:27 +09:00
Takashi Kojo
fce1b90b63
SSL_get_peer_cert_chain(ssl)->count value check in api.c
2017-11-24 08:09:41 +09:00
Takashi Kojo
91c1a0a810
move (void) for Visual Studio
2017-11-24 08:07:32 +09:00
Takashi Kojo
803bd7c612
Review feedbacks: refactor test_SSL_set_options and add SSL_clear_option
2017-11-24 08:07:32 +09:00
Takashi Kojo
c6988b74b1
Remove unused files
2017-11-24 08:03:16 +09:00
Takashi Kojo
c195c85999
merge master
2017-11-24 08:03:16 +09:00
Sean Parkinson
f1befc0e87
Make AVX2 code compile in on Mac
...
Fix problems not seen due to AVX2 define being off.
2017-11-24 08:49:45 +10:00
Takashi Kojo
3c0a146cd7
SSL_CTX_clear_options return verue
2017-11-24 06:27:36 +09:00
Takashi Kojo
dace30cfac
Missing X509_STORE_CTX_free(ctx);
2017-11-24 06:27:36 +09:00
Takashi Kojo
a8bc2df19c
static bucket size for SSL
2017-11-24 06:27:36 +09:00
Takashi Kojo
05b9b39e06
free ctx->alpn_cli_protos
2017-11-24 06:27:36 +09:00
Takashi Kojo
196bcf6f51
remove unused velues
2017-11-24 06:27:36 +09:00
Takashi Kojo
279f12cc7d
fix test_wolfSSL_msgCb
2017-11-24 06:27:35 +09:00
Takashi Kojo
0d69376e95
SSL_CTX_clear_options macro switch
2017-11-24 06:05:01 +09:00
Takashi Kojo
527c94c06b
add test_wolfSSL_msgCb
2017-11-24 06:02:01 +09:00
Takashi Kojo
a9cbb0ee10
add api tests
2017-11-24 05:52:25 +09:00
Takashi Kojo
5f025de0f8
pull ssl->protoMsgCb() from Part5
2017-11-24 05:49:41 +09:00
Takashi Kojo
06455436d3
add ERR_load_BIO_strings
2017-11-24 05:49:41 +09:00
Takashi Kojo
5b16fe2f3c
add X509_STORE_CTX_set_verify_cb
2017-11-24 05:49:41 +09:00
Takashi Kojo
b8c5218ad3
add SSL_CTX_set_alpn_protos
2017-11-24 05:49:41 +09:00
Takashi Kojo
1bcec16509
add SSL_get_peer_cert_chain
2017-11-24 05:47:20 +09:00
Takashi Kojo
a320464c5a
add SSL_set_msg_callback_arg
2017-11-24 05:44:54 +09:00
Takashi Kojo
7e579e46aa
pull SSL_set_msg_callback from Part5
2017-11-24 05:42:35 +09:00
Takashi Kojo
12a9f41755
add SSL_CTX_clear_options
2017-11-24 05:38:24 +09:00
Takashi Kojo
d967129581
add BN_mod_mul
2017-11-24 05:38:24 +09:00
Chris Conlon
cf00f6ae1d
fix CTC_SHA224wECDSA oid sum
2017-11-22 17:07:13 -07:00
dgarske
8c15c65343
Merge pull request #1216 from abrahamsonn/windows-errors
...
Windows errors
2017-11-21 15:21:14 -08:00
abrahamsonn
2308b0769a
Changed "ifdef _WIN32" to "ifdef USE_WINDOWS_API"
2017-11-21 14:15:47 -07:00
Daniele Lacamera
ff64ca17f4
Merge branch 'origin/master' into chibios_port
2017-11-21 20:00:07 +01:00
Sean Parkinson
400d56a1a9
SHA-3 fast code is smaller and a bit faster
2017-11-21 12:22:08 +10:00
toddouska
01233edb44
Merge pull request #1242 from cconlon/pkcs7des
...
PKCS7 and SCEP need either AES or 3DES enabled, error out if not
2017-11-20 16:27:50 -08:00
David Garske
60a6da1c14
Adds new option to enable secure-renegotiation by default (used by IIS for client authentication). WOLFSSL_SECURE_RENEGOTIATION_ON_BY_DEFAULT.
2017-11-20 16:15:06 -08:00
Chris Conlon
e3a4f468c1
PKCS7 and SCEP need either AES or 3DES enabled, error out if not
2017-11-20 13:16:44 -07:00
toddouska
baf655df23
Merge pull request #1241 from SparkiDev/tls13_rec_pad
...
Handle reading record layer padding in TLS v1.3
2017-11-20 11:35:15 -08:00
Sean Parkinson
5ccf54dd1a
Handle reading record layer padding
2017-11-20 12:08:18 +10:00
toddouska
935f33ab54
Merge pull request #1240 from cconlon/tls13issue
...
fix illegal use of type warning on Windows for TLS 1.3
2017-11-17 13:12:41 -08:00
toddouska
21e391fbce
Merge pull request #1235 from SparkiDev/tls13_draft21
...
Update code to support Draft 21 of TLS v1.3
2017-11-17 13:11:03 -08:00
Chris Conlon
4839aca7ba
fix illegal use of type warning on Windows for TLS 1.3
2017-11-17 06:42:15 -07:00
toddouska
8badc334ea
Merge pull request #1239 from JacobBarthelmeh/AES
...
fix AES ECB sanity checks
2017-11-16 13:57:47 -08:00
abrahamsonn
6793a7bc4c
Voided 2 variables outside of their ifdef's
2017-11-16 14:54:54 -07:00
toddouska
53ec80b291
Merge pull request #1238 from cconlon/pkcs7cleanup
...
PKCS7 cleanup: remove dependencies on 3DES and SHA1
2017-11-16 13:51:57 -08:00
toddouska
653cce17e5
Merge pull request #1237 from cconlon/pkcs7encrypted
...
PKCS7: optionally compile out EncryptedData content type
2017-11-16 13:50:43 -08:00
toddouska
9d2c739d6d
Merge pull request #1236 from kaleb-himes/sean-changes
...
Fix AES-GCM code to compile with GCC 4.8.*
2017-11-16 13:50:08 -08:00
toddouska
947fceda6d
Merge pull request #1232 from dgarske/disable_oldtls_v1_0
...
Disable TLS v1.0 by default
2017-11-16 13:49:03 -08:00
toddouska
d741474f03
Merge pull request #1220 from SparkiDev/sha2_asm_perf
...
Improve speed of Intel AVX1/2 ASM for SHA-256 and SHA-512
2017-11-16 13:47:12 -08:00
dgarske
877b6c35a2
Merge pull request #1233 from kaleb-himes/TI_CRYPT_UPDATE
...
resolving build-time issues when using TI-CRYPT
2017-11-16 12:40:46 -08:00
Jacob Barthelmeh
a89280ac91
fix AES ECB sanity checks
2017-11-16 13:27:57 -07:00
Chris Conlon
30e8f5539b
PKCS7 cleanup: remove dependencies on 3DES and SHA1
2017-11-16 10:37:47 -07:00
Chris Conlon
ea7f2e4548
PKCS7: optionally compile out EncryptedData type with NO_PKCS7_ENCRYPTED_DATA
2017-11-16 09:15:02 -07:00
Sean Parkinson
20edc0e961
Remove use of data from SHA-2 data structures
...
Only compiled and used with Intel speed-up code
2017-11-16 08:59:21 +10:00
kaleb-himes
fd9a2a8d62
Change function to macro for GCC 4.8.*
...
GCC 4.8.* bug can't handle parameter that is a pointer to __m128i
2017-11-16 08:32:45 +10:00
toddouska
098edc2845
Merge pull request #1229 from dgarske/fix_static_rsa_pad
...
Fix for handling of static RSA padding failures
2017-11-15 12:31:38 -08:00
Sean Parkinson
9dd8baecc0
Fix when RORX implementations are compiled and used
2017-11-15 16:56:19 +10:00
Sean Parkinson
cb8e284464
Update code to support Draft 21 of TLS v1.3
2017-11-15 16:40:48 +10:00
abrahamsonn
901eab7e06
README updates to attempt to improve GitHub search positioning
2017-11-14 15:51:32 -07:00
kaleb-himes
9ce73cf1a6
Add stub functions for Aes/Des Init/Free in TI_CRYPT
2017-11-14 15:30:16 -07:00
abrahamsonn
fe7318455f
Incorrect placement of variable casting
2017-11-14 15:19:40 -07:00
David Garske
110409218c
Fix for sniffer to use TLS v1.2 client method.
2017-11-14 14:09:44 -08:00
David Garske
fd455d5a5e
Fix for handling of static RSA PKCS formatting failures so they are indistinguishable from from correctly formatted RSA blocks (per RFC5246 section 7.4.7.1). Adjusted the static RSA preMasterSecret RNG creation for consistency in client case. Removed obsolete PMS_VERSION_ERROR.
2017-11-14 14:05:50 -08:00
abrahamsonn
f17470b42b
Added more of the requested changes & made an attempt to remove merge conflicts
2017-11-14 15:05:32 -07:00
David Garske
d5cc3ca198
Disable TLS v1.0 by default. Added new --enable-tlsv10 option to force enable (only works if --enable-oldtls is set, which is on by default).
2017-11-14 14:01:31 -08:00
toddouska
cc65429946
Merge pull request #1231 from dgarske/fix_max_sigalgo
...
Fixes and cleanup for handling of sig/algo
2017-11-14 13:25:29 -08:00
dgarske
815cbd8f68
Merge pull request #1227 from moisesguimaraes/adds-client-side-get-sni
...
enables wolfSSL_SNI_GetRequest() at client side.
2017-11-14 13:22:37 -08:00
toddouska
a0931313dd
Merge pull request #1226 from SparkiDev/aes_gcm_avx1_avx2
...
Improve AES-GCM performance on AVX1 (IvyBridge) and AVX2
2017-11-14 13:03:22 -08:00
David Garske
20f5c61675
Added debug message when signature/algorithm list is truncated.
2017-11-14 10:31:48 -08:00
Sean Parkinson
67451cc3e2
Fix for older compilers and AVX2
2017-11-14 11:36:22 +10:00
Sean Parkinson
1ede982495
Improve speed of Intel AVX1/2 ASM for SHA-256 and SHA-512
2017-11-14 10:36:17 +10:00
toddouska
0ade0eb55b
Merge pull request #1224 from dgarske/get_version
...
Improvements to wolfSSL get/set version
2017-11-13 16:05:22 -08:00
toddouska
fd4b3b40ac
Merge pull request #1222 from dgarske/pem_public
...
Fixes for PEM public key functions
2017-11-13 16:03:04 -08:00
toddouska
69461ae5e2
Merge pull request #1217 from dgarske/sha_slow
...
New `--enable-lowresource` option and SHA256 not unrolled support
2017-11-13 16:02:01 -08:00
dgarske
35377d933e
Merge pull request #1228 from abrahamsonn/2275
...
Moved variable declaration to beginning of block
2017-11-13 15:19:27 -08:00
David Garske
b08a99057c
Cleanup of hashSigAlgo handling in DoClientHello.
2017-11-13 15:02:13 -08:00
David Garske
9f7e40ad5c
Fix to make sure provided sigalgo list doesn't overflow the buffer.
2017-11-13 14:52:53 -08:00
David Garske
2b5c4ffa7f
Enhancement to allow override of maximum sig/algos using new WOLFSSL_MAX_SIGALGO define (default is 32).
2017-11-13 14:35:15 -08:00
Moisés Guimarães
5da82f43ed
makes SNI.status available at client side
2017-11-13 16:10:23 -02:00
Moisés Guimarães
020a004bad
makes SNI.status available at client side
2017-11-13 15:39:24 -02:00
abrahamsonn
9f72f018e0
Moved variable declaration to beginning of block
2017-11-13 10:28:22 -07:00
Moisés Guimarães
fe5b512af7
fixes commnet typos
2017-11-13 14:59:47 -02:00
Moisés Guimarães
f82f03f982
fixes API visibility
2017-11-13 14:53:56 -02:00
Moisés Guimarães
a23b65751d
enables wolfSSL_SNI_GetRequest() at client side.
2017-11-13 13:58:14 -02:00
Sean Parkinson
6c848e7133
Improve AES-GCM performance on AVX1 (IvyBridge) and AVX2
2017-11-13 15:43:30 +10:00
dgarske
3b0d415ad9
Merge pull request #1223 from JacobBarthelmeh/Memory
...
fix for logging file names
2017-11-10 14:04:55 -08:00
Jacob Barthelmeh
149559e40f
change WOLFSSL_MAX_ERROR_SZ to be a macro instead of enum
2017-11-10 13:29:49 -07:00
David Garske
54c663ed49
Added new API wolfSSL_GetVersion to get version as wolfSSL value which can be passed into wolfSSL_SetVersion. Fixed duplicate CyaSSL_CTX_use_PrivateKey_buffer define. Added TLS1.3 to wolfSSL_SetVersion.
2017-11-10 11:13:48 -08:00
dgarske
686f18825a
Merge pull request #1209 from moisesguimaraes/tlsx-fix2
...
TLSX fixes
2017-11-10 08:44:58 -08:00
Moisés Guimarães
d7abd5c8fb
changes WOLFSSL_SKIP_UNSUPPORTED_EXTENSION to WOLFSSL_OLD_UNSUPPORTED_EXTENSION
2017-11-10 11:35:49 -02:00
Jacob Barthelmeh
39ad478973
make the WOLFSSL_MAX_ERROR_SZ overridable
2017-11-09 17:07:00 -07:00
Jacob Barthelmeh
7733ee7e89
fix for logging file names
2017-11-09 15:54:24 -07:00
dgarske
2ba5475cf3
Merge pull request #1219 from JacobBarthelmeh/master
...
fix unused variable warning
2017-11-09 14:33:49 -08:00
Jacob Barthelmeh
8ced766d61
fix warning for static analysis report
2017-11-09 13:16:29 -07:00
David Garske
717ebf0146
Fix for wolfSSL_PubKeyPemToDer so its available when NO_FILESYSTEM is defined (moved it out of NO_FILESYSTEM block). Added wc_DerToPemEx support for PUBLICKEY_TYPE.
2017-11-09 11:15:33 -08:00
David Garske
5a5fea7b46
Add USE_SLOW_SHA256 and USE_SLOW_SHA512 options for reduced code size of SHA. Existing USE_SLOW_SHA2 applies for SHA512 only. Cleanup formatting of the sha256.c and sha512.c code. Added new ./configure --lowresource option, which defines the memory reduction defines. Fix for make check resume.test scipt with NO_SESSION_CACHE defined.
2017-11-09 11:05:28 -08:00
Jacob Barthelmeh
40be578415
fix unused variable warning
2017-11-09 11:22:10 -07:00
dgarske
29b091eae6
Merge pull request #1221 from SparkiDev/warn_fix1
...
Fix warnings and g++ casting error
2017-11-09 09:35:54 -08:00
toddouska
127c849594
Merge pull request #1215 from dgarske/fix_stm32_cubemx_sha
...
Fix accidental removal of wc_Sha hashHandle for STM32 w/CubeMX
2017-11-09 09:07:34 -08:00
toddouska
ddec639712
Merge pull request #1218 from dgarske/fix_powerpc_debug
...
Fix for build error on PowerPC with enable debug
2017-11-09 09:06:43 -08:00
Sean Parkinson
6a825ea0ce
Fix warnings and g++ casting error
2017-11-09 17:30:59 +10:00
David Garske
a97ee6c232
Fix for build error on PowerPC with enable debug.
2017-11-08 09:21:05 -08:00
toddouska
55ec382093
Merge pull request #1212 from dgarske/emscripten
...
Fixes for building with Emscripten (adds `--disable-asm` option).
2017-11-07 09:19:49 -08:00
David Garske
1a69fb9430
Fix accidental removal of wc_Sha hashHandle for STM32 w/CubeMX. This was removed during merge of 6707be2 on 10/11/17. Thanks liubing for the report.
2017-11-07 09:10:12 -08:00
dgarske
a5f7b182bf
Merge pull request #1214 from moisesguimaraes/fix-tlsx-unreachable
...
Removes unreachable code in TLSX supported-curves and ec-point-format.
2017-11-07 08:49:15 -08:00
Moisés Guimarães
1c19c8847b
fixes while loop
2017-11-07 10:57:06 -03:00
Moisés Guimarães
7674a24972
removes unreachable code with a single return point
2017-11-07 10:43:47 -03:00
David Garske
7df0e7f286
Fix typo with with extra paren.
2017-11-06 16:24:12 -08:00
toddouska
90c5a64547
Merge pull request #1211 from dgarske/cleanup_hardcoded
...
Cleanup hard coded values
2017-11-06 16:10:34 -08:00
toddouska
2c5778215d
Merge pull request #1210 from dgarske/fix_ti_newnames
...
Fix for building with TI using new names.
2017-11-06 15:59:57 -08:00
David Garske
b8cc132e99
Added ability to force 32-bit mode using --enable-32bit. Added ability to disable all inline asembly using --disable-asm. Added check for __EMSCRIPTEN__ define in types.h to properly setup 64-bit type. Fixes for build combinations with SHA512 and CHACHA20.
2017-11-06 14:37:34 -08:00
David Garske
096e850adb
Fix a few places where there are break; and break; when TLS 1.3 is not defined. Fix TIRTOS logic for XSTRNCASECMP and XSTRTOK.
2017-11-06 13:59:36 -08:00
David Garske
e591576cdf
Cleanup of the RSA exponent hard coded value.
2017-11-06 10:23:06 -08:00
David Garske
231ebeea0e
Add unit test for BN_bn2hex. Cleanup math radix constants.
2017-11-06 09:16:37 -08:00
David Garske
d2938dd13a
Fix for building with TI using new names. Update TI settings for timing, blinding and strtok_r.
2017-11-06 08:25:35 -08:00
Daniele Lacamera
775487cab1
Support for ChibiOS.
2017-11-06 09:45:12 +01:00
toddouska
94c1aab67e
Merge pull request #1208 from dgarske/fix_nightlyreports
...
Fixes from nightly builds for time_t and no AES
2017-11-03 12:28:55 -07:00
Moisés Guimarães
b672616b38
fixes cast to void
2017-11-03 15:31:13 -03:00
Moisés Guimarães
caf5708bb6
adds unsupported_extension behavior to ALPN
2017-11-03 15:31:13 -03:00
Moisés Guimarães
56b38946ed
adds unsupported_extension behavior to Session Tickets and Supported Curves
2017-11-03 15:31:13 -03:00
Moisés Guimarães
c8e5558f3f
adds unsupported_extension behavior to CSR and CSR2
2017-11-03 15:31:13 -03:00
Moisés Guimarães
a636858a49
adds unsupported_extension behavior to THMAC
2017-11-03 15:31:13 -03:00
Moisés Guimarães
cd4eb2c5b1
adds unsupported_extension behavior to MFL
2017-11-03 15:31:13 -03:00
Moisés Guimarães
0dd2ba2d80
adds unsupported_extension behavior to SNI
2017-11-03 15:31:13 -03:00
David Garske
57ea7ba319
Various fixes from nightly Jenkins builds. Fix for new test_wolfSSL_ASN1_TIME_adj API unit test to skip generalized time test when on PowerPC (which has time_t as int). Fix for building with AES disabled and PKCS7 enabled. Fix for building without openssl_extra when time_t is not present.
2017-11-03 10:16:45 -07:00
JacobBarthelmeh
8f687e9905
Merge pull request #1206 from ejohnstown/vs-arm-update
...
VS-ARM Update
2017-11-02 17:14:00 -06:00
JacobBarthelmeh
5e02100921
Merge pull request #1192 from dgarske/client_staticmem
...
Added static memory support to client example
2017-11-02 14:49:33 -06:00
dgarske
1d1e904acb
Merge pull request #942 from ghoso/dev201705
...
New openssl compatibility functions for: `BN_mod_inverse`, `PKCS5_PBKDF2_HMAC_SHA1` and
`SSL_set_tlsext_status_type`.
2017-11-02 10:47:14 -07:00
David Garske
4084255fd5
Improve SSL failure cleanup case where ssl->ctx isn't set yet.
2017-11-02 09:48:43 -07:00
David Garske
229cecfb61
Fix static memory failure case (insuficient mem) in InitSSL case where ssl->ctx isn't set yet and SSL_ResourceFree is called NULL dereferece happens.
2017-11-02 09:48:43 -07:00
David Garske
72f44aba87
Fix for X509 FreeAltNames with static memory enabled.
2017-11-02 09:48:43 -07:00
David Garske
0e34f35c08
Increase the static memory pool in client to better support ECC or session certs.
2017-11-02 09:48:43 -07:00
David Garske
6369794b6f
Fixes for static memory with -r session resumption option on client. Fix for possible failed InitSSL cleanup using NULL ssl->ctx for static memory.
2017-11-02 09:48:43 -07:00
David Garske
a4f94366a4
Added static memory code to client example.
2017-11-02 09:48:43 -07:00
toddouska
a14ea92d78
Merge pull request #1204 from dgarske/ec_tests
...
Fixes and improvements for `EC_POINT_mul`
2017-11-02 08:50:34 -07:00
toddouska
cd4dd6bd40
Merge pull request #1207 from SparkiDev/rem_cov
...
Remove coverage rules not required.
2017-11-02 07:03:00 -07:00
Sean Parkinson
32cbff7257
Remove coverage rules not required.
2017-11-02 09:46:57 +10:00
toddouska
57853fa3e9
Merge pull request #1202 from dgarske/fix_nofs
...
Build fixes for building without filesystem
2017-11-01 10:14:22 -07:00
toddouska
d8ef0d7df1
Merge pull request #1203 from dgarske/fix_const2
...
Fix issue with `fp_s_rmap` not being const
2017-11-01 10:12:45 -07:00
toddouska
f91b2e19d7
Merge pull request #1205 from SparkiDev/tls_ext_fix
...
Fix TLS extension code
2017-11-01 10:10:10 -07:00
David Garske
cc7a5fd490
Fix for bug in wolfSSL_EC_POINT_free not freeing the internal ECC point. Unit test fixup for test_wolfSSL_EVP_PKEY_new_mac_key with malloc and size 0. Cleanup the EC_POINT unit test to not set Gxy->inSet, since its already 0.
2017-11-01 09:44:19 -07:00
Sean Parkinson
f4ae86dc1b
Fix TLS extension code
...
Don't respond with TLS v1.3 extensions if doing TLS v1.2 or lower.
Use calculated size in SendServerHello rather than fixed maximum.
2017-11-01 18:08:11 +10:00
Go Hosohara
9c9978ce9f
OpenSSL Compatibility functions on PR#942.
2017-11-01 13:00:47 +09:00
David Garske
8a016879f0
Fixes to WOLFSSL_ATECC508A support to enable use of wc_ecc_export_x963_ex and wc_ecc_import_x963_ex. These changes are experimental (builds, but not tested).
2017-10-31 16:17:03 -07:00
David Garske
72a33136f5
Fix for EC_POINT_mul population of result. Add NULL arg checks for a few compatability functions. Added unit tests for compatability layer API's EC_POINT_ and EC_GROUP_ in test_wolfSSL_EC. Cleanup of the EC_POINT_dump.
2017-10-31 16:09:39 -07:00
John Safranek
5b55d384a7
VS-ARM Update
...
1. Added HAVE_SUPPORTED_CURVES and WOLFSSL_SHA384 to the user settings file.
2017-10-31 13:19:10 -07:00
toddouska
68371c8e66
Merge pull request #1201 from moisesguimaraes/fix-tlsx-sig-algo
...
adds check for server side sig-algo extension
2017-10-31 11:40:30 -07:00
Moisés Guimarães
5cf175c49b
adds check for server side sig-algo extension
2017-10-30 23:02:36 -03:00
David Garske
fa01c41ea9
Build fixes for building without filesystem.
2017-10-30 15:25:47 -07:00
dgarske
2037a6c9ea
Merge pull request #1199 from JacobBarthelmeh/fast-rsa
...
increase test buffer size to account for edge case
2017-10-27 15:48:14 -07:00
dgarske
d42ebb836f
Merge pull request #1200 from JacobBarthelmeh/staticmemory
...
allow for adjusting static IO buffer size
2017-10-27 15:01:17 -07:00
David Garske
e8627f1f93
Fix issue with fp_s_rmap not being const.
2017-10-27 11:46:24 -07:00
Jacob Barthelmeh
92b71da6d2
allow for adjusting static IO buffer size
2017-10-26 16:40:16 -06:00
Jacob Barthelmeh
016f7357d2
increase test buffer size to account for edge case
2017-10-26 16:19:56 -06:00
toddouska
264c481c71
Merge pull request #1191 from SparkiDev/tls13_no_ecc
...
Fix no ECC builds with TLS13 code.
2017-10-26 10:49:59 -07:00
toddouska
ee489b12ef
Merge pull request #1198 from dgarske/fix_build
...
Fix build errors with various configs.
2017-10-26 09:46:50 -07:00
toddouska
aa95c6bdd1
Merge pull request #1197 from dgarske/fix_const
...
Fix `cipher_name_idx` to be const.
2017-10-26 09:45:30 -07:00
David Garske
94e0b06b9f
Fix build errors with configs for no ASN and no PKI with PSK.
2017-10-26 07:34:41 -07:00
David Garske
b4d802d524
Fix cipher_name_idx to be const.
2017-10-25 16:57:53 -07:00
JacobBarthelmeh
182028819d
Merge pull request #1195 from dgarske/rel_fixes2
...
Release updates for ec_point_formats and ASN1 SetSerialNumber bug
2017-10-24 15:20:15 -06:00
Sean Parkinson
323db1a95d
Fix no ECC builds with TLS13 code.
...
Fix tests so that having ECC disabled works as well.
Fix define protection for Draft 18 and HRR Cookie.
2017-10-24 09:11:24 -07:00
toddouska
8a01d725da
Merge pull request #1177 from dgarske/certreq_tests
...
Testing improvements for cert gen and TLS cert validation
2017-10-24 08:21:37 -07:00
toddouska
c0105b3008
Merge pull request #1175 from dgarske/cleanup_inlines
...
Cleanup to consolidate the inline helpers
2017-10-24 08:15:12 -07:00
David Garske
e0734d56df
Fix to handle valid serial number with MSB set. Cleanup to consolidate max serial number length check.
2017-10-24 06:49:00 -07:00
David Garske
2dfad0918a
Updated release notes for added ec_point_formats extension. Fix for setting serial number with random data where the MSB was cleared and resulted in a zero. Fix for build type mismatch error in wolfCrypt test with ed25519 and WOLFSSL_TEST_CERT defined.
2017-10-23 15:36:58 -07:00
Moisés Guimarães
96667b47ee
ec point format TLS extension ( #1034 )
...
* adds client support to ec_point_format
* adds ec_point_format support for server side
* makes ec-point-format activation dependent on supported-curves activation
* removes recursive functions preserving the writing order
* renames EllipticCurves to SupportedCurves
2017-10-23 14:06:20 -07:00
JacobBarthelmeh
d46ab1f724
Merge pull request #1194 from dgarske/rel_fixes
...
Release cleanup: Remove execute bit on all code files
2017-10-23 14:23:33 -06:00
David Garske
7f30397252
Remove execute bit on all code files.
2017-10-23 11:16:40 -07:00
JacobBarthelmeh
372e8b04d0
Merge pull request #1193 from dgarske/rel_v3.12.2
...
Release v3.12.2 (lib 14.0.0)
2017-10-23 11:53:55 -06:00
David Garske
911b6f95f8
Release v3.12.2 (lib 14.0.0). Updated copywright.
2017-10-22 15:58:35 -07:00
toddouska
39749ed5be
Merge pull request #1190 from dgarske/fix_ocspstaplingenable
...
Fix to not send OCSP stapling extensions in client_hello when not enabled
2017-10-20 12:16:56 -07:00
David Garske
d7ae1df778
Fix to add keyUsage keyAgreement for the ECC server certificate. Resolves issue with openssl test using "ECDH-ECDSA" cipher suite.
2017-10-20 11:26:15 -07:00
toddouska
c5f80760a8
Merge pull request #1145 from JacobBarthelmeh/HardwareAcc
...
init hardware acc. use of public RSA key with public key decode funct…
2017-10-20 10:32:18 -07:00
toddouska
bdefdfe860
Merge pull request #1165 from JacobBarthelmeh/mysql
...
add check for SIZEOF_LONG with sun and LP64
2017-10-20 10:16:58 -07:00
David Garske
024c8725ad
Testing improvements for cert gen and TLS cert validation:
...
* Fixes to support certificate generation (`WOLFSSL_CERT_GEN`) without RSA enabled.
* Added new ECC CA for 384-bit tests.
* Created new server cert chain (ECC CA for 256-bit that signs server-ecc.pem)
* Created new `./certs/ecc/genecc.sh` script for generating all ECC CA's, generated server cert req (CSR), signing with CA and the required CRL.
* Moved the wolfCrypt ECC CA / ECC cert gen test into `ecc_test` as `ecc_test_cert_gen`.
* Refactor duplicate code that saves DER to disk, converts DER to PEM and saves PEM to disk into SaveDerAndPem function.
* Changed `ecc_test_make_pub` and `ecc_test_key_gen` to use XMALLOC for temp buffers (uses heap instead of stack).
* Cleanup to combine all certificate subject information into global `certDefaultName`.
* Updated cert request info to use wolfSSL instead of Yassl.
* Cleanup to combine keyUsage into `certKeyUsage` and `certKeyUsage2`.
* Re-number error codes in rsa_test.
* Moved the certext_test after the ecc_test, since it uses a file generated in `ecc_test_cert_gen`.
2017-10-19 16:17:51 -07:00
David Garske
e904a38092
Fix to not send OCSP stapling extensions in client_hello when not enabled. Fix for typo in WOLFSSL_SHUTDOWN_NOT_DONE.
2017-10-19 11:18:34 -07:00
David Garske
5362d46da9
Fix issues building with inline disabled.
2017-10-18 14:26:34 -07:00
Chris Conlon
06f564dea3
Merge pull request #1189 from dgarske/fix_oldnames
...
Fix for building with `--disable-oldnames`
2017-10-18 13:34:26 -06:00
David Garske
c9558ee27b
Updated a few more old names. Added PR for new configs to Jenkins.
2017-10-18 10:38:27 -07:00
David Garske
f23ec7d5f2
Fix for building with --disable-oldnames.
2017-10-18 10:22:35 -07:00
David Garske
e82807024b
Switched word24 back to byte for compatability.
2017-10-18 09:08:22 -07:00
David Garske
7f2e6e1d8a
Cleanup to consolidate the inline helpers like cto, ato and bto into misc.c. Relocate the word24 typedef into types.h.
2017-10-18 09:06:48 -07:00
toddouska
1377577af5
Merge pull request #1187 from dgarske/build_fixes
...
Build fixes for various TLS 1.3 disable options
2017-10-18 08:59:46 -07:00
toddouska
c9516e20b2
Merge pull request #1158 from dgarske/openssl_compat
...
Minor openssl compatibility layer improvements to AES, MD5 and SSL.
2017-10-18 08:54:28 -07:00
toddouska
ccda176bfa
Merge pull request #1183 from SparkiDev/tls13_nu
...
Disallow upgrading to TLS v1.3
2017-10-18 08:53:00 -07:00
toddouska
9bea6cca52
Merge pull request #1186 from SparkiDev/sha2_asm
...
Fix SHA-256 Intel assembly code to work with 'fasthugemath'
2017-10-18 08:51:05 -07:00
toddouska
9920bdf097
Merge pull request #1103 from SparkiDev/sp_rsa
...
Single Precision maths for RSA, DH and ECC
2017-10-18 08:44:47 -07:00
dgarske
1bf9d092af
Merge pull request #1179 from ejohnstown/evp-aes
...
EVP-AES
2017-10-17 19:23:11 -07:00
John Safranek
1a7d58715a
Merge pull request #1188 from dgarske/ocsp_enables
...
Added missing API's for disabling OCSP stapling
2017-10-17 15:26:48 -07:00
David Garske
3d7e86f08d
Added missing API's for disabling OCSP stapling. Added OCSP stapling enable/disable for WOLFSSL.
2017-10-17 13:52:05 -07:00
dgarske
ddb5e57811
Merge pull request #1185 from cconlon/bench
...
Add HMAC benchmark, expand AES key size benchmarks
2017-10-17 11:15:12 -07:00
David Garske
b82a529ec2
Cleanup to move the secret length to ssl.h so its accessible for the compatability layer as well.
2017-10-17 09:56:34 -07:00
David Garske
aab1e060a0
Minor openssl compatability layer improvements to AES, MD5 and SSL.
2017-10-17 09:50:25 -07:00
David Garske
8659140494
Build fixes for various TLS 1.3 disable options (RSA, ECC and ED/Curve 25519).
2017-10-17 09:39:32 -07:00
JacobBarthelmeh
32103891e2
Merge pull request #1117 from dgarske/gcc_arm
...
Added simple GCC ARM Makefile example
2017-10-17 10:23:32 -06:00
Chris Conlon
e49560fbf0
add missing parameter in SHOW_INTEL_CYCLES
2017-10-17 09:31:21 -06:00
Chris Conlon
7dccd9d478
set hash size for PIC32MZ hardware crypto
2017-10-17 09:30:26 -06:00
Chris Conlon
d5b7c13fbf
change enc/dec labels for AES, move scrypt bench below HMAC
2017-10-17 09:30:26 -06:00
Chris Conlon
d65704c6b4
add benchmarks for AES-128/192/256-ECB
2017-10-17 09:30:16 -06:00
Sean Parkinson
c0472a3a89
Fix SHA-256 Intel assembly code to work with 'fasthugemath'
2017-10-17 18:35:18 +10:00
Sean Parkinson
c49188cc89
Turn off SP by default
2017-10-17 09:32:24 +10:00
Sean Parkinson
9e4e58fe8c
Disallow upgrading to TLS v1.3
...
Change SupportedVersions extension to only include TLS v1.3 if downgrade
is disabled.
Fix parsing of SupportedVersions extension
Don't upgrade
Only downgrade in SupportedVersions extension if option enabled
2017-10-17 08:52:12 +10:00
Sean Parkinson
f724206e37
Add test for 3072-bit RSA and DH and fix modexp
2017-10-17 08:36:39 +10:00
Sean Parkinson
90f8f67982
Single Precision maths for RSA (and DH)
...
Single Precision ECC implementation
2017-10-17 08:36:39 +10:00
Chris Conlon
9a6e4b2939
add separate benchmarks for AES-128/192/256-GCM
2017-10-16 14:43:39 -06:00
Chris Conlon
1e445e10a1
add separate benchmarks for AES-128/192/256-CTR
2017-10-16 14:43:38 -06:00
Chris Conlon
2b077b2792
add separate benchmarks for AES-128/192/256-CBC
2017-10-16 14:43:38 -06:00
Chris Conlon
1f72696359
add HMAC-MD5/SHA/SHA224/SHA384/SHA512 benchmarks
2017-10-16 14:43:38 -06:00
John Safranek
130e026139
Merge pull request #1184 from dgarske/fix_fips
...
Fix for FIPS build to support new names
2017-10-16 13:20:05 -07:00
David Garske
de34ec0f0c
Fix scan-build report of possible use of unitialized output[i].
2017-10-16 11:24:41 -07:00
David Garske
02ee22e73b
Support for mapping to new names with old for FIPS build. Fix to revert HMAC SHA224 type check, since SHA224 type isn't in FIPS wolfCrypt.
2017-10-16 09:57:22 -07:00
toddouska
819acd18a7
Merge pull request #1180 from SparkiDev/tls13_nd
...
Fixed DRAFT_18 define and fixed downgrading with TLS v1.3
2017-10-13 09:24:55 -07:00
toddouska
2c2217fcdc
Merge pull request #1181 from dgarske/cert_serial
...
Certificate serial number enhancements
2017-10-13 09:22:11 -07:00
toddouska
b79b816276
Merge pull request #1168 from dgarske/ctx_get_cm
...
Add method to get WOLFSSL_CTX certificate manager
2017-10-13 09:13:54 -07:00
toddouska
6fd53d31c2
Merge pull request #1157 from dgarske/old-names
...
Refactor SSL_ and hashing types to use wolf specific prefix
2017-10-13 09:09:44 -07:00
toddouska
04106a0089
Merge pull request #1174 from dgarske/ocsp_cb_ctx
...
Improvement to `wolfSSL_SetOCSP_Cb` to allow context per WOLFSSL object
2017-10-12 10:02:49 -07:00
toddouska
de77d5cc83
Merge pull request #1170 from dgarske/alt_cert_chains
...
Alternate certificate chain support `WOLFSSL_ALT_CERT_CHAINS`
2017-10-12 10:02:29 -07:00
David Garske
34cac68f81
Added wolfCrypt test example for setting a custom serial number. Changed CTC_SERIAL_SIZE to 16 (more common max).
2017-10-11 19:16:58 -07:00
David Garske
6548f32ee0
Enhancement to allow a serial number to be customized via Cert.serial and Cert.serialSz for cert request or generation. Fix to make sure serial number is always postive and has no leading zeros. Increase the size of the certificate serial number to 20 bytes.
2017-10-11 17:21:26 -07:00
David Garske
6021c37ec7
Refactor WOLF_SSL_ to WOLFSSL_ (much better).
2017-10-11 09:10:43 -07:00
David Garske
6707be2b0e
Added new --disable-oldnames option to allow for using openssl along-side wolfssl headers (without OPENSSL_EXTRA). Add --enable-opensslcoexist which makes sure oldnames is disabled. Refactor of SSL_ to WOLF_SSL_. Refactor of SHA, MD5, SHA224, SHA256, SHA512 and SHA384 to WC_ naming.
2017-10-11 09:10:42 -07:00
Sean Parkinson
7dca25ea88
Fixed DRAFT_18 define and fixed downgrading with TLS v1.3
...
Changed the define in configure.ac to match the one used in the code.
Fixed downgrading to disallow unless ssl->options.downgrade is set.
TLS 1.3 client method does not have downgrade on anymore.
Test changed to not expect downgrading to work.
Test of TLS v1.3 client downgrade is actually upgrading on server.
Fixed 80 character line problems.
2017-10-11 12:17:28 +10:00
John Safranek
09f8ddd0f0
EVP-AES
...
1. Fixed using wolfSSL_EVP_CipherFinal() when a message's size is a round multiple of a block size. It wasn't adding the appropriate padding.
2. Update the EVP_Cipher test to call CipherUpdate and CipherFinal instead. It checks a message that is 24 bytes long and a second that is 16 bytes long.
2017-10-10 13:44:06 -07:00
David Garske
4c8d228080
Added WOLFSSL_ALT_CERT_CHAINS option to enable checking cert aginst multiple CA's. Added new API's for wolfSSL_get_peer_alt_chain and wolfSSL_is_peer_alt_cert_chain, which allow a way to know if alternate cert chain is used and provides a way to get it (when SESSION_CERTS is defined). Cleanup of the defines to enable debugging certs (just use SHOW_CERTS now).
2017-10-10 08:55:35 -07:00
dgarske
35141c335d
Merge pull request #1178 from SparkiDev/asm_mulx_2
...
Fix for MULX asm
2017-10-09 18:33:29 -07:00
Sean Parkinson
898893fbcd
Fix for MULX asm
2017-10-10 09:41:17 +10:00
David Garske
280de41515
Improvement to wolfSSL_SetOCSP_Cb to set the context per WOLFSSL object (callback functions are same). Adding API unit tests next.
2017-10-06 12:18:21 -07:00
Jacob Barthelmeh
effad6e91c
clean up include paths for MySQL cmake build
2017-10-06 09:05:56 -06:00
dgarske
c945e65479
Merge pull request #1171 from ejohnstown/wolfssh
...
wolfSSH Option
2017-10-05 09:43:17 -07:00
dgarske
541f60801d
Merge pull request #1172 from SparkiDev/aesgcm_avx2_fix
...
Fix aesni code for avx2
2017-10-05 09:10:50 -07:00
Sean Parkinson
152c24f210
Fix aesni code for avx2
2017-10-05 13:02:33 +10:00
John Safranek
f344f04e60
wolfSSH Option
...
Added a configure convenience option for building wolfSSL to work with wolfSSH.
2017-10-04 16:11:52 -07:00
dgarske
d855fd9452
Merge pull request #1166 from JacobBarthelmeh/Compatibility-Layer
...
fix for wolfSSL_ASN1_TIME_print function
2017-10-04 14:10:53 -07:00
dgarske
75e04a08cd
Merge pull request #1167 from ejohnstown/install-update
...
update INSTALL with VS-ARM build
2017-10-04 13:58:23 -07:00
David Garske
c4052607d7
Updated README.md to include instructions for how to build on a different ARM architecture (like Raspberry Pi CortexA53). Moved the -T into SRC_LD so its easier to disable.
2017-10-04 13:53:39 -07:00
David Garske
6058362970
Fix bug in user_settings.h which was incorrectly setting FP_MAX_BITS to 512 when RSA was enabled. This resulted in RSA_FUNCTION MP_EXPTMOD_E: memory/config problem.
2017-10-04 13:53:39 -07:00
David Garske
614736cbb2
Add code to detect if Cortex M series and disable architecture specific code in armtarget.c. Improved Makefile.common to include toolchain prefix.
2017-10-04 13:53:39 -07:00
David Garske
d88d8c3ed8
Updates to GCC ARM README.md for the ARCHFLAGS and correct file to update.
2017-10-04 13:53:39 -07:00
David Garske
d4b18a6d3f
Added warning for IO callback stubs to make sure they get implemented.
2017-10-04 13:53:39 -07:00
David Garske
a02903c43e
Improvements to Makefile templates. Added missing Makefile. Added new static library support.
2017-10-04 13:53:39 -07:00
David Garske
2d67f46247
Minor cleanups for the GCC ARM example. Fixed build with DH enabled. Changed random.h to always make sure CUSTOM_RAND_TYPE is defined. Added TLS13 option to reference user_settings.h.
2017-10-04 13:53:39 -07:00
David Garske
69b25ee508
Added simple GCC ARM gcc-arm-none-eabi Makefile project example for wolfCrypt test/benchmark and wolfSSL Client.
2017-10-04 13:53:39 -07:00
David Garske
19ea4716f3
Add unit tests for wolfSSL_CTX_GetCertManager, wolfSSL_CTX_UnloadCAs, wolfSSL_CertManagerUnloadCAs and wolfSSL_CTX_get_cert_cache_memsize. Fixed comment typo PERSISTE_CERT_CACHE.
2017-10-03 10:00:20 -07:00
David Garske
dcf61bd10e
Added new API wolfSSL_CTX_GetCertManager for getting the WOLFSSL_CTX certificate manager.
2017-10-03 08:46:15 -07:00
John Safranek
5c636b4f4a
update INSTALL with VS-ARM build
2017-10-02 12:00:11 -07:00
Takashi Kojo
918a5fd5a6
Merge pull request #1164 from SparkiDev/asm_mulx
...
Get the multiplcation code using MULX to work consistently
2017-09-30 09:51:03 +09:00
Jacob Barthelmeh
9bf14a152f
change return value for wolfSSL_ASN1_TIME_print
2017-09-29 10:28:10 -06:00
Jacob Barthelmeh
cb94911e1f
add check for SIZEOF_LONG with sun and LP64
2017-09-28 16:39:30 -06:00
Jacob Barthelmeh
8cd0b7dfc7
fix for wolfSSL_ASN1_TIME_print function
2017-09-28 15:30:46 -06:00
JacobBarthelmeh
09e92c518d
Merge pull request #1163 from cconlon/mysql_sha
...
Add returns to OpenSSL compatibility SHA functions
2017-09-28 13:12:14 -06:00
JacobBarthelmeh
3b12b7223a
Merge pull request #1160 from dgarske/asn_extkeyusage
...
ASN Extended Key Usage Support
2017-09-28 11:31:04 -06:00
Chris Conlon
34ef7207f9
check hash function returns in wolfSSL_EVP_DigestInit
2017-09-28 11:19:51 -06:00
Chris Conlon
eff781c0aa
add int return to OpenSSL compatibility MD5 functions
2017-09-28 11:12:18 -06:00
JacobBarthelmeh
c836724685
Merge pull request #1162 from cconlon/mysql_compat
...
wolfSSL_ERR_peek_error() with WOLFSSL_MYSQL_COMPATIBLE
2017-09-28 09:51:07 -06:00
JacobBarthelmeh
7350bf93b3
Merge pull request #1153 from dgarske/fix_testbench_castwarns
...
Fix cast warnings with wolfCrypt test/benchmark
2017-09-28 09:41:21 -06:00
JacobBarthelmeh
fd9b2d3b8d
Merge pull request #1116 from dgarske/stm32_hash
...
Fixes for STM32 hardware acceleration
2017-09-28 09:35:36 -06:00
Sean Parkinson
0376a53f6b
Get the multiplcation code using MULX to work consistently
2017-09-28 09:12:29 +10:00
Chris Conlon
ef141c3ce9
add int return to OpenSSL compatibility SHA functions
2017-09-27 14:28:19 -06:00
Chris Conlon
6c85bc5d3d
enable functionality of wolfSSL_ERR_peek_error() when WOLFSSL_MYSQL_COMPATIBLE defined
2017-09-27 10:56:04 -06:00
dgarske
fadee8fbf2
Merge pull request #1161 from cconlon/mysql_compat
...
Enable ASN1_TIME_print when WOLFSSL_MYSQL_COMPATIBLE is defined
2017-09-26 15:44:50 -07:00
Chris Conlon
4f15cde2eb
Merge pull request #1155 from dgarske/fixes_pic32mz
...
PIC32MZ minor build warning fixes
2017-09-26 16:26:32 -06:00
Chris Conlon
e8dd7d0c4a
Merge pull request #840 from koichi-tsujino/EVP
...
add EVP_get_cipherbynid
2017-09-26 16:23:26 -06:00
Chris Conlon
b4f7997fdc
enable ASN1_TIME_print when WOLFSSL_MYSQL_COMPATIBLE is defined
2017-09-26 15:02:13 -06:00
dgarske
19aaa88c72
Merge pull request #1156 from ejohnstown/ios-android
...
iOS and Android Project Updates
2017-09-26 12:06:17 -07:00
David Garske
9eb7e2aafa
ASN1 Extended Key Usage support. Adds new wc_SetExtKeyUsage() API. Available only with --enable-certext or WOLFSSL_CERT_EXT.
2017-09-26 12:05:46 -07:00
John Safranek
931fbde41d
iOS/Android
...
1. Updated the iOS user_settings.h with the hardened settings.
2. Updated the iOS project file with Xcode's suggested settings.
3. Added an IDE project for building wolfSSL for Android using Visual Studio 2017.
2017-09-26 09:08:34 -07:00
Koichi Tsujino
b172585fc3
Resolved conflicts
2017-09-26 09:01:23 +09:00
Koichi Tsujino
e8f95b9252
add EVP_get_cipherbynid
2017-09-26 08:58:36 +09:00
dgarske
8f3aa49ef6
Merge pull request #1149 from ejohnstown/aesgcm-init
...
AES-GCM-NI Init
2017-09-25 16:13:55 -07:00
dgarske
d15704b2ba
Merge pull request #1159 from cconlon/session_cache
...
exclude wolfSSL_SSL_get0_session when NO_SESSION_CACHE is defined
2017-09-25 15:20:27 -07:00
Chris Conlon
46f7e786cb
exclude wolfSSL_SSL_get0_session when NO_SESSION_CACHE is defined
2017-09-25 14:07:17 -06:00
John Safranek
0ced1f4847
AESGCM Init
...
1. Update the AES-GCM with AES-NI 128-bit constant initializers so they work on both GCC/Clang and MSC.
* MSC uses a union for the type where the first member is a 16-byte array.
* GCC/Clang uses a 16-byte vector masking as a long long array.
2. Disable AES-GCM loop unrolling for Windows, when using AES-NI in 32-bit mode.
2017-09-22 15:28:47 -07:00
David Garske
ee6f88cd98
Fix cast warnings with wolfCrypt test/benchmark. Cleanup of 80 char max line length in wolfCrypt test.
2017-09-22 15:22:42 -07:00
JacobBarthelmeh
6451e12313
Merge pull request #1154 from dgarske/fix_async
...
Fixes for building with async
2017-09-22 16:01:28 -06:00
JacobBarthelmeh
763d5f26c7
Merge pull request #1031 from dgarske/math_update
...
Math updates
2017-09-22 15:26:34 -06:00
dgarske
2c4844d5ef
Merge pull request #1146 from ejohnstown/compat
...
OpenSSL Compatibility Additions and Fixes
2017-09-22 14:19:28 -07:00
David Garske
4a510218c2
Tested PPC32 with TFM_PPC32. Fixed warning with possible uninitialized use of sc0, sc1 and sc2.
2017-09-22 11:37:00 -07:00
David Garske
eec5f9bb41
Fixes for benchmark after buffers were moved into thread. Needed THREAD_LS_T and fixed benchmark alloc failure cleanup.
2017-09-22 11:35:46 -07:00
David Garske
218f944984
Fix for building async with AES XTS.
2017-09-22 11:12:23 -07:00
David Garske
a2ed22286f
Adds TFM_MIPS (tested on PIC32MZ2048EFM144 with XC32 v1.44). Adds check for mp_read_radix to return failure for invalid character. Adds checking for s_mp_sub response code. Improved mp_init_copy error handling. Improved init to use size where applicable. Asm PPC 32 changes to add r to register. Asm formatting cleanups.
2017-09-22 09:48:35 -07:00
JacobBarthelmeh
824eb55648
Merge pull request #1151 from dgarske/fix_asn_keyusage
...
Fixes bug with creation of the KeyUsage BitString
2017-09-21 10:41:08 -06:00
dgarske
f5c4a68ab3
Merge pull request #1152 from JacobBarthelmeh/Testing
...
fix for wolfSSL_X509_NAME_get_text_by_NID
2017-09-20 18:52:14 -07:00
Jacob Barthelmeh
80333979a9
fix for wolfSSL_X509_NAME_get_text_by_NID
2017-09-20 17:31:53 -06:00
David Garske
3f493770d4
Fixes bug with creation of the KeyUsage BitString which was always adding the optional second byte reguardless of len, which created invalid ASN if value provided was less than 256. Bug was introduced with ASN refactor in commit fd9e41dd99.
2017-09-20 15:00:24 -07:00
dgarske
2f96f1ae9f
Merge pull request #1150 from kaleb-himes/HASH_DRBG_UPDATE
...
Update HASH_DRBG Reseed mechanism and add test case
2017-09-20 13:15:17 -07:00
dgarske
1c2199be24
Merge pull request #1137 from JacobBarthelmeh/Windows
...
rename the file io.h to wolfio.h
2017-09-20 11:34:33 -07:00
kaleb-himes
5777b92745
Improved solution
2017-09-20 11:25:51 -06:00
dgarske
5e6213bfa1
Merge pull request #1140 from JacobBarthelmeh/RSA-fix
...
account for 8k keys with MySQL compatibility
2017-09-20 10:05:32 -07:00
dgarske
28c15bed1c
Merge pull request #1141 from SparkiDev/chacha_avx1
...
Fix ChaCha to check for AVX1
2017-09-20 09:57:20 -07:00
Jacob Barthelmeh
3763b88397
rename the file io.h to wolfio.h
2017-09-20 10:53:11 -06:00
kaleb-himes
60dca94821
Update HASH_DRBG Reseed mechanism and add test case
2017-09-20 10:36:36 -06:00
David Garske
4d8e1c9e5a
Minor build fixes for unused function and variable.
2017-09-19 12:48:57 -07:00
David Garske
816767744f
Fix for STM32 AES-CTR (tested on STM32F437). Improvement to the STM32 RNG code to detect improper RNG_CLK. Cleanup of the PIC32MZ Aes struct variables and the AES-CTR (tested on PIC32MZ2048).
2017-09-18 16:08:09 -07:00
John Safranek
2620cb4559
OpenSSL Compatibility Additions and Fixes
...
1. Added a check on the hex2bn function for null strings to be treated like the NULL pointer.
2. Added some more test cases to the big number unit test.
3. Added wolfSSL_EVP_add_cipher() analogous to wolfSSL_EVP_add_digest().
4. Implemented `RSA_public_encrypt()` and `RSA_private_decrypt()` for the OpenSSL compatibility layer.
5. Added `RSA_PKCS1_OAEP_PADDING` as an option to the new functions.
6. Fixed the constness on the `from` parameter in function `RSA_public_decrypt()`. Note: this does not allow OAEP to be used in FIPS mode.
7. Added size constants for EVP_MAX_BLOCK_LENGTH, RSA_PKCS1_PADDING_SIZE, and RSA_PKCS1_OAEP_PADDING_SIZE.
8. Added functions `wolfSSL_EVP_PKEY_new_mac_key()` and `wolfSSL_EVP_PKEY_get0_hmac()` for storing HMAC keys in an EVP_PKEY structure for use later.
9. Added the routines EVP_DigestSignXXX(). They only work w.r.t HMAC.
10. Added the ForceZero() to EVP_MD_CTX_cleanup().
11. Modified the EVP_MD_CTX structure to have a union with both the hasher and a wolfCrypt Hmac structure.
12. Added a mapping of SHA1->SHA to the list of digest name aliases in wolfSSL_EVP_get_digestbyname().
13. Changed the mapping of ssl3-sha1->SHA.
14. When using RSA blinding, the OpenSSL compatibility layer RSA object was attempting to decrypt without an RNG. Added an RNG if needed.
15. Add comment to wolfSSL_BN_hex2bn() to cover usage w.r.t. string length. Remember to keep the length even, front-pad with zeroes if needed.
16. Added tests for the new functions.
2017-09-18 13:53:44 -07:00
Kaleb Himes
c4e87c8cc4
Merge pull request #1121 from ejohnstown/solution-update
...
Update VS Solution Files
2017-09-15 18:22:44 -06:00
David Garske
a9e540fc07
Moved the bench_ buffer allocation/free into the thread, so the THREAD_LS has a unique one for each which resolves issues with benchmark when using the USE_QAE_THREAD_LS option.
2017-09-15 14:02:06 -07:00
dgarske
23903ec903
Merge pull request #1144 from kaleb-himes/FIPS-TEST
...
NULL plaintext input is supported in FIPS testing
2017-09-15 13:21:32 -07:00
David Garske
3f16fba4f8
Fix build warning with possible use of unitialized ret.
2017-09-15 10:41:43 -07:00
David Garske
27d607efa3
Fixes for AES on STM32 with StdPeriLib and fix for building with NO_STM32_CYPTO. Researching better solution for AES-CTR.
2017-09-15 10:39:09 -07:00
David Garske
dcab2f47ee
Fixes for STM32 hardware acceleration. Adds CubeMX HAL hashing support for MD5, SHA1, SHA224 and SHA256. Adds support for STM32F7 (WOLFSSL_STM32F7). Fixes issue with AES-GCM and STM32F2. Cleanup of the STM32 macros (adds NO_STM32_HASH, NO_STM32_CRYPTO and NO_STM32_RNG to optionally disable hardware acceleration).
2017-09-15 10:39:09 -07:00
kaleb-himes
63e8d63943
Update following review
2017-09-15 10:52:33 -06:00
Kaleb Himes
0b11b265f6
Merge pull request #1143 from SparkiDev/wpas_aesctr
...
Fix WPAS config to not use FORTRESS config
2017-09-15 10:39:13 -06:00
Kaleb Himes
5f0afcfe88
Merge pull request #1142 from JacobBarthelmeh/fast-rsa
...
fix for clang warning on RsaKey redefinition
2017-09-15 09:40:42 -06:00
kaleb-himes
1f7d73f626
NULL plaintext input is supported in FIPS testing
2017-09-14 20:14:21 -06:00
Sean Parkinson
00e073424a
Fix WPAS config to not use FORTRESS config
2017-09-15 10:49:07 +10:00
Jacob Barthelmeh
f97f9a6158
init hardware acc. use of public RSA key with public key decode functions
2017-09-14 17:07:19 -06:00
Jacob Barthelmeh
e10b2f027f
fix for clang warning on RsaKey redefinition
2017-09-14 15:08:15 -06:00
Jacob Barthelmeh
1b3a8f40b8
account for 8k keys with MySQL compatibility
2017-09-14 09:37:32 -06:00
Sean Parkinson
7721aca114
Fix ChaCha to check for AVX1
2017-09-14 09:07:04 +10:00
toddouska
afcef7d394
Merge pull request #1136 from JacobBarthelmeh/Testing
...
anon flag with interop script
2017-09-13 14:40:30 -07:00
toddouska
23fff62d8b
Merge pull request #1135 from dgarske/cy
...
Fix issue with empty array (requires C99 compliance).
2017-09-13 14:39:50 -07:00
toddouska
4c31c53f37
Merge pull request #1128 from JacobBarthelmeh/AES
...
AES XTS feature addition
2017-09-13 14:38:15 -07:00
toddouska
bea82ce214
Merge pull request #1118 from JacobBarthelmeh/mysql
...
downgrade with options set when using opensslextra feature
2017-09-13 14:12:09 -07:00
David Garske
a5eaecaa0e
Fix unit API test call to wolfSSL_CertManagerLoadCA when building without file system.
2017-09-11 06:51:27 -07:00
David Garske
932773735b
Cleanup the wolfIO_Send function.
2017-09-11 05:48:41 -07:00
Jacob Barthelmeh
398252ddad
add XtsAes structure and change XTS-AES API
2017-09-08 16:00:33 -06:00
David Garske
2c39219f2a
Fix issue with empty array (requires C99 compliance).
2017-09-08 11:24:55 -07:00
Kaleb Himes
c018a1abf3
Merge pull request #1130 from SparkiDev/cpuid_fix
...
MSVC fix around cpuid check
2017-09-08 11:04:50 -06:00
Jacob Barthelmeh
1d1fc66374
double check support of SSLv3 with interop testing
2017-09-08 10:50:23 -06:00
Jacob Barthelmeh
ee9d410326
anon flag with interop script
2017-09-07 16:58:37 -06:00
dgarske
a073d5d448
Merge pull request #1129 from JacobBarthelmeh/Testing
...
additional sanity checks
2017-09-06 15:34:26 -07:00
Jacob Barthelmeh
c482524b78
big endian testing and packing Aes struct
2017-09-01 15:32:55 -06:00
Jacob Barthelmeh
f7ea118dd7
downgrade with options set when using opensslextra feature
2017-09-01 13:47:56 -06:00
Sean Parkinson
6a226efd15
MSVC fix around cpuid check
2017-09-01 08:43:28 +10:00
Jacob Barthelmeh
8807b8af4f
additional sanity checks
2017-08-31 16:00:08 -06:00
Kaleb Himes
3da5ddd49e
Merge pull request #1123 from SparkiDev/poly1305_fix
...
Fix for the AVX implemetation of Poly1305
2017-08-31 10:21:00 -06:00
Jacob Barthelmeh
d48c940334
add comments for AES-XTS functions to aes.h
2017-08-30 17:52:26 -06:00
Jacob Barthelmeh
ef73c1df7c
add AES-XTS mode --enable-xts
2017-08-30 17:50:15 -06:00
dgarske
7ac0bab37e
Merge pull request #1114 from kojo1/tls1.3
...
bring up settings.h in tls13.c
2017-08-30 13:00:40 -07:00
toddouska
9aef8a91fd
Merge pull request #1120 from JacobBarthelmeh/Testing
...
fix creating shared secret with ECC private only key
2017-08-30 11:02:14 -07:00
toddouska
1ba77e4306
Merge pull request #1122 from JacobBarthelmeh/Compatibility-Layer
...
using memory bio with no filesystem and adjustment for Windows line e…
2017-08-30 10:58:30 -07:00
Sean Parkinson
3b351fd640
Fix to stop inlining of assembly code with fixed label
2017-08-30 10:51:44 +10:00
Jacob Barthelmeh
3dbe5d2af9
fixes for Windows build
2017-08-29 12:02:24 -06:00
Chris Conlon
34dc4a493d
Merge pull request #1124 from JacobBarthelmeh/UnitTests
...
fix memory management in unit test with --disable-fastmath
2017-08-29 09:06:14 -06:00
Jacob Barthelmeh
61ff3e136a
fix memory management in unit test with --disable-fastmath
2017-08-28 16:23:44 -06:00
Sean Parkinson
e6cf3c88f2
Fix for the AVX implemetation of Poly1305
...
Need one more multiple of r (0..6 instead of 0..5)
2017-08-28 11:44:27 +10:00
Jacob Barthelmeh
a8417c1078
using memory bio with no filesystem and adjustment for Windows line ending
2017-08-25 15:11:10 -06:00
John Safranek
6970333473
1. Set the base address of the 32-bit DLL builds.
...
2. Add LTCG option for 64-bit DLL Debug build. Fixes issue with VS2015.
3. Fixed sln issue where test tools linked against the DLL are built outside the DLL build directories.
2017-08-25 11:21:11 -07:00
Jacob Barthelmeh
a308a56044
fix creating shared secret with ECC private only key
2017-08-25 09:07:03 -06:00
dgarske
59358fd91d
Merge pull request #1119 from JacobBarthelmeh/Windows
...
cast to fix warning on Windows with Visual Studio
2017-08-25 07:04:42 -07:00
Jacob Barthelmeh
7918b31cae
cast to fix warning on Windows with Visual Studio
2017-08-24 15:22:32 -06:00
toddouska
23342337ab
Merge pull request #1115 from JacobBarthelmeh/Compatibility-Layer
...
fix advancing memory WOLFSSL_BIO when reading
2017-08-24 10:45:32 -07:00
toddouska
2d5194cdf0
Merge pull request #1113 from JacobBarthelmeh/Testing
...
add function to generate public ECC key from private key
2017-08-24 10:40:27 -07:00
Jacob Barthelmeh
b10e0b789b
fix error return value when unable to extract ECC public key
2017-08-23 14:45:08 -06:00
Jacob Barthelmeh
4b630b67fa
fix advancing memory WOLFSSL_BIO when reading
2017-08-23 11:37:19 -06:00
Chris Conlon
73b8be8fcc
Merge pull request #1039 from jrblixt/unitTest_api_addDsa-PR07192017
...
Add Dsa unit test functions.
2017-08-22 15:46:46 -06:00
David Garske
7c604bfc48
Fixes for building with WOLFSSL_ATECC508A.
2017-08-22 13:11:20 -07:00
Jacob Barthelmeh
c25832ad14
type cast the return of fread
2017-08-22 14:06:25 -06:00
Jacob Barthelmeh
71f4d546a8
add function to generate public ECC key from private key
2017-08-22 14:06:25 -06:00
toddouska
fbae4420ad
Merge pull request #1110 from dgarske/pic32mz_largehash
...
Fixes for PIC32MZ to support large hashing using hardware
2017-08-22 09:24:05 -07:00
toddouska
8865b272bb
Merge pull request #1112 from dgarske/async_sniff
...
Adds async blocking support for sniffer tool
2017-08-22 09:19:45 -07:00
Chris Conlon
439e803bd1
Merge pull request #1107 from JacobBarthelmeh/UnitTests
...
build option for certificate buffers with PKCS7 test
2017-08-22 10:05:36 -06:00
Takashi Kojo
7892714516
bring up settings.h before #ifdef WOLFSSL_TLS13
2017-08-22 20:13:17 +09:00
David Garske
07d137480d
Fix to PIC32MZ handling of hashing empty string. Changed default MPLABX/MCAPI user_settings.h to use 2048-bit. All tests passed!
2017-08-21 15:19:18 -07:00
David Garske
075adcb15b
Add wolfCrypt hash tests for empty string. Add large hash test for SHA2 384/512 and SHA3. Cleanup hashing error handling to call free. RSA spelling fixes. RSA error detail for bad padding.
2017-08-21 14:03:48 -07:00
David Garske
5a27e2f621
Fix so PIC32MZ works in caching mode after large hash. Reduced default block size for large hash to 256 (512 bytes total).
2017-08-21 11:10:16 -07:00
David Garske
2b7f4b0903
Adds async blocking support for sniffer tool.
2017-08-21 11:07:13 -07:00
David Garske
c9d6a4de6f
Fixes for building --enable-mcapi.
2017-08-21 09:18:53 -07:00
toddouska
c330c6b7f9
Merge pull request #1109 from JacobBarthelmeh/Testing
...
fix check on ephemeral key type before free'ing
2017-08-18 11:53:08 -07:00
toddouska
8a37af42bf
Merge pull request #1108 from dgarske/fix_async_misc
...
Fixes for async ECC encrypt, ParseCertRelative and API Unit test inits
2017-08-18 11:44:28 -07:00
toddouska
d7f7c27e0a
Merge pull request #1106 from JacobBarthelmeh/NTRU
...
QSH update
2017-08-18 11:35:48 -07:00
David Garske
74ed94ddb1
Fixes to support large hashing against HW without caching (in exclusive hardware access) Large hashing uses previous hash code with two descriptors and polling. Added wolfCrypt large hash tests for MD5, SHA and SHA256. Add missing MCAPI set size API's. Cleanup AES GCM large test. Changed MPLABX projects to default to PIC32MZ2048EFM144.
2017-08-18 11:25:30 -07:00
Jacob Barthelmeh
7460aaf5ea
build option for certificate buffers with PKCS7 test
2017-08-18 11:07:40 -06:00
Jacob Barthelmeh
c6e722170e
fix check on ephemeral key type before free'ing
2017-08-18 10:55:38 -06:00
toddouska
c9efcc4561
Merge pull request #1105 from dgarske/strtok
...
Enhancement to add strtok implementation for platforms where its not avail
2017-08-17 14:02:32 -07:00
David Garske
84a396b7dc
Additional init fixes for unit tests based on async valgrind report.
2017-08-17 12:41:18 -07:00
Jacob Barthelmeh
f6ad5524eb
remove invalid test-qsh version tests, revert if statement check in internal.c
2017-08-17 11:27:47 -06:00
David Garske
c06e672eb7
Added missing AES/DES3/HMAC init functions for helping with valgrind reports on unitialized use for async markers.
2017-08-17 09:58:46 -07:00
jrblixt
9909c8428c
Code review changes per Chris.
2017-08-16 16:08:50 -06:00
David Garske
3ca679c1d7
Added ability to force use of `USE_WOLF_STRTOK.
2017-08-16 13:21:31 -07:00
David Garske
9fb0862bc1
Fix for TI RTOS (WOLFSSL_TIRTOS) to use our wc_strtok for the XSTRTOK macro.
2017-08-16 13:21:31 -07:00
David Garske
ff6a136b8a
Enhancement to add strtok implementation for platforms where it is not available such as MinGW.
2017-08-16 13:21:31 -07:00
Jacob Barthelmeh
3fda99cbc4
seperate build of QSH from build of NTRU
2017-08-16 14:19:38 -06:00
David Garske
f7ca2f157d
Improvement on the ParseCertRelative fixes for intializing the event prior to operation. Fix possible uninitialized value with DecryptKey and DES3.
2017-08-16 13:19:31 -07:00
David Garske
68c04bd821
Fix for ECC encrypt/decrypt with async enabled. Reverts previous change from PR #1101 and adds return code checking for wc_AsyncWait. ECC shared secret needs to be in loop to call again for completion.
2017-08-16 12:04:57 -07:00
toddouska
53e05786da
Merge pull request #1101 from dgarske/fix_bench_async
...
Fixes for async multi-threading
2017-08-16 10:15:55 -07:00
toddouska
ad4849d692
Merge pull request #1100 from JacobBarthelmeh/Testing
...
Fix for test script: add ECDH-RSA server for interop tests
2017-08-16 09:54:16 -07:00
toddouska
0ed03987df
Merge pull request #1099 from cconlon/micrium
...
Update Micrium uC/OS-III Port
2017-08-16 09:48:56 -07:00
Kaleb Himes
2e4000acb4
Merge pull request #1102 from cconlon/ocsp-certs
...
Update root certs for OCSP scripts
2017-08-16 09:50:02 -06:00
David Garske
1f80fb952f
Fix issue with using wrong asyncDev in ConfirmSignature. Fix un-initialized Hmac in API unit tests.
2017-08-15 21:20:32 -07:00
David Garske
ccc226eae4
Fixes for refactor to initialize the asyncDev.event prior to call for ParseCertRelative, ConfirmSignature and ECC shared secret (return code). Scan-build and G++ fixes.
2017-08-15 21:20:32 -07:00
David Garske
b32be20110
Refactored async event intialization so its done prior to making possible async calls. Added threadId and removed volatile attribs in WOLF_EVENT. Fixed possible unitialized value in benchmark ret.
2017-08-15 21:19:28 -07:00
David Garske
a9c943d5bd
Fix jenkins warning with possible uninitialized 'ret'.
2017-08-15 21:19:28 -07:00
David Garske
b4aaeb5768
Fix for possible leak with multi-threading and curve cache. Note memory leak still possible with --enable-fpecc and async multithreading. Add voltaile on event state and ret to resolve possible multi-thread timing issue. Use define for --enable-stacksize init value.
2017-08-15 21:19:28 -07:00
David Garske
44a3622248
Fixes to better handle threading with async. Fix wc_CamelliaCbcEncrypt return code checking. Fix to ensure cycles per byte shows on same line. Refactor of async event state. Refactor to initalize event prior to operation (in case it finishes before adding to queue). Add HAVE_AES_DECRYPT to --enable-all option. Cleanup benchmark error display.
2017-08-15 21:19:28 -07:00
jrblixt
dd5430d188
Code review changes, Chris.
2017-08-14 16:09:35 -06:00
Chris Conlon
af00787f80
update root certs for ocsp scripts
2017-08-14 12:58:36 -06:00
Jacob Barthelmeh
a6db5fc882
add ECDH-RSA server for interop tests
2017-08-11 16:41:27 -06:00
Chris Conlon
2f92998529
update test.c for Micrium port and XSTRNCPY
2017-08-11 14:30:25 -06:00
Chris Conlon
f6d0b2898d
update Micrium uC/OS-III port
2017-08-11 14:30:15 -06:00
Chris Conlon
2740d313a7
fix unused variable warning in load_verify_locations with NO_WOLFSSL_DIR
2017-08-11 11:37:30 -06:00
Chris Conlon
7736125156
Merge pull request #1095 from jrblixt/unitTest_hashReorder
...
Re-order hash functions in unit test.
2017-08-11 10:15:37 -06:00
Sean Parkinson
21a8662948
Merge pull request #1093 from toddouska/polyold
...
have poly asm detect older compilers w/o avx2 like chacha does
2017-08-11 08:27:34 +10:00
toddouska
963746fb3e
Merge pull request #1094 from JacobBarthelmeh/Testing
...
Testing
2017-08-10 13:01:46 -07:00
dgarske
294a13f9a2
Merge pull request #1097 from cconlon/validate_ecc_import
...
WOLFSSL_VALIDATE_ECC_IMPORT fixes
2017-08-10 12:45:26 -07:00
Chris Conlon
5865816198
fix wc_ecc_import_private_key_ex() with WOLFSSL_VALIDATE_ECC_IMPORT with private only, wolfcrypt test
2017-08-10 10:04:14 -06:00
jrblixt
3c1140d90e
Re-order hash functions in unit test.
2017-08-09 15:23:01 -06:00
Jacob Barthelmeh
8b41fc841b
remove setting variable that is currently not used after being set
2017-08-09 13:43:28 -06:00
Jacob Barthelmeh
219fcde773
fix shadow declaration warning
2017-08-09 11:58:29 -06:00
toddouska
36b1a666d0
have poly asm detect older compilers w/o avx2 like chacha does
2017-08-09 09:52:06 -07:00
toddouska
df1e5f2e1a
Merge pull request #1091 from dgarske/fix_async_aes
...
Fix async issue with AES set key trying to use a NULL IV.
2017-08-09 09:44:46 -07:00
toddouska
04c16ca843
Merge pull request #1086 from SparkiDev/sha256_sha512_gcc44
...
GCC 4.4 on Linux doesn't like empty clobber list
2017-08-09 09:41:58 -07:00
toddouska
af4158d231
Merge pull request #1084 from SparkiDev/aesni_avx2_fix
...
Fix for AVX2 unrolled code
2017-08-09 09:39:38 -07:00
toddouska
d12e98eea3
Merge pull request #1079 from SparkiDev/poly1305_asm
...
Poly1305 Intel Assembly code - AVX and AVX2
2017-08-09 09:37:09 -07:00
David Garske
f27b3a83aa
Fix async issue with AES set key trying to use a NULL IV.
2017-08-07 17:47:59 -07:00
toddouska
d195009dcb
Merge pull request #1090 from JacobBarthelmeh/Release
...
update readme for known issue
2017-08-07 13:36:53 -07:00
Jacob Barthelmeh
6717035563
update readme for known issue
2017-08-07 13:13:43 -06:00
toddouska
d949832059
Merge pull request #1088 from JacobBarthelmeh/Release
...
prepare for release v3.12.0
2017-08-07 11:49:27 -07:00
toddouska
e9c6fa5f22
Merge pull request #1089 from JacobBarthelmeh/StaticAnalysisTests
...
fix potential memory leaks
2017-08-07 11:47:33 -07:00
Jacob Barthelmeh
1dc2889388
fix potential memory leaks
2017-08-04 16:49:31 -06:00
Jacob Barthelmeh
b55f981d5b
prepare for release v3.12.0
2017-08-04 15:32:27 -06:00
Sean Parkinson
032d606f99
GCC 4.4 on Linux doesn't like empty clobber list
2017-08-04 14:07:55 +10:00
Sean Parkinson
32cedb2b12
Fix for AVX2 unrolled code
2017-08-04 12:40:10 +10:00
Sean Parkinson
d0ff6067a6
Chacha asm fix - can't use buffer in old compiler
2017-08-04 12:17:41 +10:00
toddouska
df4387cff4
Merge pull request #1083 from dgarske/chacha_noasm
...
Option to disable Intel speedups for ChaCha using `--enable-chacha=noasm`
2017-08-03 15:45:47 -07:00
Sean Parkinson
ea6b719ec2
Fix register issue
2017-08-04 08:39:09 +10:00
David Garske
3be4e0823e
Adds option --enable-chacha=noasm to allow disabling the Intel AVX/AVX2 speedups when used with --enable-intelasm.
2017-08-03 13:39:46 -07:00
toddouska
4d6cb66bc1
Merge pull request #1082 from dgarske/fix_intelasm_aesgcm
...
Fixes for `intelasm` and AES GCM with AVX2
2017-08-03 12:35:00 -07:00
toddouska
3f2de7154f
Merge pull request #1080 from abrahamsonn/vcxproj_update
...
added files to wolfssl.vcxproj includes list for windows config testing
2017-08-03 12:15:23 -07:00
toddouska
977e909f60
Merge pull request #1081 from dgarske/chacha20_asm
...
Fix for `intelasm` and ChaCha20
2017-08-03 12:11:59 -07:00
David Garske
4a5ecb8a15
Fix typo with xmm5 (was xxm5). Workaround for Clang issues with AVX2 and using register __m128i tmp3 asm("xmm6"); syntax by using NO_UNROLL option.
2017-08-03 10:47:21 -07:00
abrahamsonn
089a050d7a
added files to wolfssl.vcxproj includes list for windows config testing
2017-08-03 11:00:30 -06:00
David Garske
b0eeed364b
Fix for intelasm and ChaCha20 with causing "error: unknown type name '__m256i'" on some compilers. Fix is to change the __m128i and __m256i to arrays of word64 (source Sean PR #1079 ).
2017-08-03 10:00:20 -07:00
dgarske
80bc089cb5
Merge pull request #1078 from SparkiDev/intel_asm_fixup
...
Stop using positional parameters in inline asm. Fixes issue with `--enable-intelasm --enable-debug` for AES GCM.
2017-08-03 09:32:50 -07:00
Sean Parkinson
5c2736f1a9
Poly1305 Intel Assembly code - AVX and AVX2
2017-08-03 14:35:09 +10:00
Sean Parkinson
31854c1566
Stop using positional parameters in inline asm
2017-08-03 13:55:30 +10:00
dgarske
108f6a4958
Merge pull request #1077 from JacobBarthelmeh/StaticAnalysisTests
...
Static analysis tests
2017-08-02 15:08:32 -07:00
toddouska
635bacef28
Merge pull request #357 from kojo1/PIC32
...
Fixes for PIC32MZ
2017-08-02 13:14:06 -07:00
Jacob Barthelmeh
433ca50292
remove unneeded XMEMSETs
2017-08-02 14:04:41 -06:00
toddouska
e77e93ef2e
Merge pull request #1065 from JacobBarthelmeh/Testing
...
update DTLS export session version and tests
2017-08-02 11:40:38 -07:00
Jacob Barthelmeh
edce23b563
use memset when initializing DecodedCert structure
2017-08-02 10:50:34 -06:00
Jacob Barthelmeh
43b04af388
adjust sanity check in integer.c to avoid reading uninitialized values
2017-08-02 10:39:05 -06:00
Jacob Barthelmeh
062f3efa6d
adjust integer.c for loop range
2017-08-02 10:29:34 -06:00
David Garske
65b8389af0
Fix for handling hash copies to make sure copied buffer is not free’d. Resolves issues when testing TLS connection with wolfssl_tcp_client and openurl https://www.google.com/ .
2017-08-02 08:42:04 -07:00
dgarske
9f1b17effc
Merge pull request #1076 from JacobBarthelmeh/UnitTests
...
place macro guard on test of RSA-OAEP with SHA1 dependency
2017-08-01 14:05:58 -07:00
dgarske
2d94a3954a
Merge pull request #1075 from JacobBarthelmeh/fast-rsa
...
add sanity check in fast-rsa and change loop behavior when generating…
2017-08-01 14:05:03 -07:00
dgarske
bd20729fba
Merge pull request #1069 from ejohnstown/dtls-mac
...
DTLS Bad MAC Checks
2017-08-01 13:45:19 -07:00
Jacob Barthelmeh
c93d348ecd
fix sesion export buffer to be not dependent on macros defined
2017-08-01 14:19:06 -06:00
David Garske
be432d8d3a
Fix for building in Harmony with crypto.h path.
2017-08-01 12:48:44 -07:00
David Garske
4e735631e7
Fixes for PIC32MZ:
...
* Adds crypto HW support for AES Direct and AES CCM.
* Fixes to enable PIC32MZ hardware hashing where updates are cached via heap buffer and final performs single operations against hardware.
* Fix for benchmark with 1024-bit certs passing in wrong size for `wc_RsaPrivateDecrypt` when using `USE_CERT_BUFFERS_1024`.
* Fix to resolve missing `strncasecmp` for the Microchip XC32. Workaround to use case sensitive version instead. This error occurred when building with HAVE_ECC defined in Harmony with XC32.
* Cleanup of the PIC32MZ crypto and hashing hardware code. Replace `pic32mz-hash.c` with `pic32mz-crypt.c`
* Add user_settings.h for mplabx and mcapi examples.
* Sync up with Harmony changes for MCAPI.
2017-08-01 12:42:09 -07:00
Jacob Barthelmeh
af0514704f
place macro guard on test of RSA-OAEP with SHA1 dependency
2017-08-01 11:46:49 -06:00
Jacob Barthelmeh
c20859e67d
add sanity check in fast-rsa and change loop behavior when generating fast-rsa key
2017-08-01 11:29:16 -06:00
JacobBarthelmeh
b553d36548
Merge pull request #1074 from SparkiDev/tls13_cr
...
Add NULL check after signature alg extension search
2017-08-01 09:01:42 -06:00
Sean Parkinson
24e9f7c43d
Add NULL check after signature alg extension search
2017-08-01 13:55:06 +10:00
dgarske
7cee1c5e8a
Merge pull request #1072 from toddouska/alert
...
add AlertCount to detect dos attempt
2017-07-31 18:29:23 -07:00
toddouska
2296f4806c
Merge pull request #1073 from JacobBarthelmeh/StaticAnalysisTests
...
Static analysis tests
2017-07-31 18:24:17 -07:00
toddouska
0c753718bd
Merge pull request #1042 from SparkiDev/chacha_asm
...
Intel Assembly optimizations for ChaCha20 - AVX and AVX2
2017-07-31 16:27:17 -07:00
toddouska
a27738b5f9
Merge pull request #1071 from dgarske/cleanup_tests
...
Cleanup AES GCM large test
2017-07-31 16:13:06 -07:00
toddouska
a55e42c14f
Merge pull request #1070 from dgarske/fix_qat_normal_math
...
Fix normal math issue with async and `mp_read_unsigned_bin`
2017-07-31 16:12:08 -07:00
Jacob Barthelmeh
01099fd97e
cast for when compiling with g++-7
2017-07-31 16:58:53 -06:00
Jacob Barthelmeh
08da8df455
sanity check on peer sequence for static analysis report
2017-07-31 16:37:34 -06:00
toddouska
66852a9252
add AlertCount to detect dos attempt
2017-07-31 15:17:54 -07:00
David Garske
2051a05139
Cleanup AES GCM large test. Move test into stack and disable if using BENCH_EMBEDDED.
2017-07-31 14:09:30 -07:00
David Garske
8a11b78960
Fix for normal math mp_read_unsigned_bin where mp_zero was also resetting the raw source. This caused failures with QAT when using normal math.
2017-07-31 14:09:15 -07:00
John Safranek
36a539760a
DTLS Bad MAC Checks
...
1. Make the decrypt and verify MAC failure cases behave the same with
respect to DTLS messages. It should pretend the message never happened.
2. Allow the echoclient to survive the echoserver sending a message with
a bad MAC.
3. Allow the server to survive the client sending a message with a bad MAC.
2017-07-31 13:54:53 -07:00
toddouska
fb53fac1c1
Merge pull request #1067 from JacobBarthelmeh/Memory
...
sanity check on index when adding cipher suites
2017-07-31 12:03:49 -07:00
toddouska
62ce8c8b81
Merge pull request #1066 from dgarske/no_certs
...
Fix for building with `NO_CERTS` or `NO_WOLFSSL_SERVER` defined.
2017-07-31 12:01:39 -07:00
toddouska
87611fdb5d
Merge pull request #1064 from SparkiDev/cpuid_fix
...
Fix cpuid to work with different configs
2017-07-31 11:59:17 -07:00
Jacob Barthelmeh
5564be6113
sanity check on index when adding cipher suites
2017-07-28 17:42:52 -06:00
David Garske
3387b12a9a
Fix for building with NO_CERTS or NO_WOLFSSL_SERVER defined.
2017-07-28 15:24:53 -07:00
Jacob Barthelmeh
e1ccc5acad
update DTLS export session version and tests
2017-07-28 14:27:24 -06:00
Sean Parkinson
d452f97e99
Fix cpuid to work with different configs
...
Fix 'may be uninitialized' warning in aes.c
Fix memory overwrite in AES-CBC when using AESNI.
2017-07-28 08:41:49 +10:00
dgarske
bc72d0c2d5
Merge pull request #1063 from JacobBarthelmeh/Testing
...
C89 compliance with variable declaration
2017-07-26 16:19:25 -07:00
dgarske
d5cf5f9887
Merge pull request #1062 from JacobBarthelmeh/UnitTests
...
update sanity checks with ARMv8 port
2017-07-26 16:18:37 -07:00
Jacob Barthelmeh
0978dd4285
C89 compliance with variable declaration
2017-07-26 15:29:00 -06:00
JacobBarthelmeh
dc7acc0400
Merge pull request #1059 from dgarske/fix_leaks
...
Fix for PKCS12 dynamic type names
2017-07-26 11:52:42 -06:00
Jacob Barthelmeh
637ca44e6a
update sanity checks with ARMv8 port
2017-07-26 11:05:20 -06:00
jrblixt
3560eed52b
Add Dsa unit test functions.
2017-07-26 09:01:36 -06:00
dgarske
05ed5cafc2
Merge pull request #1061 from SparkiDev/tls13_leantls
...
Fixes for LEANTLS and TLS13 builds
2017-07-25 21:01:00 -07:00
dgarske
41e2b236aa
Merge pull request #1051 from kaleb-himes/fsanitize-fixes
...
Fsanitize fixes
2017-07-25 20:57:43 -07:00
dgarske
fbf4e94bcf
Merge pull request #1060 from SparkiDev/tls13_memleak
...
Fix memory leak when not using fast math and TLS13.
2017-07-25 20:55:42 -07:00
Sean Parkinson
038d16212f
Fixes for LEANTLS and TLS13 builds
2017-07-26 10:43:36 +10:00
Sean Parkinson
59450e83fa
Fix memory leak when not using fast math.
2017-07-26 09:48:34 +10:00
Chris Conlon
e1830772de
Merge pull request #1056 from JacobBarthelmeh/UnitTests
...
check return values with new unit tests
2017-07-25 16:34:41 -06:00
David Garske
55b07019a0
Fix for PKCS12 dynamic type names (also fix to use manual realloc since its NUMA type and that behaves different).
2017-07-25 15:19:34 -07:00
David Garske
c03487d463
Fix for dynamic type of ED25519 key and PK_CALLBACK buffer not being free’d. Fix for portNumber stack var being used out of scope.
2017-07-25 15:07:58 -07:00
Jacob Barthelmeh
4fead493e7
add to return values checked
2017-07-25 14:44:40 -06:00
Jacob Barthelmeh
4438b8e92d
update unit test case with DES3 and FIPS
2017-07-25 14:42:17 -06:00
Jacob Barthelmeh
5b0022fba0
HMAC key size when testing with FIPS
2017-07-25 14:42:17 -06:00
Jacob Barthelmeh
1b80e5a75f
check return values with new unit tests
2017-07-25 14:42:17 -06:00
toddouska
ef98e96767
Merge pull request #1058 from jrblixt/fix-AesFipsSanityCheck
...
Unit test GCM sanity check Fips change.
2017-07-25 13:30:35 -07:00
toddouska
a076a2f0d8
Merge pull request #1055 from JacobBarthelmeh/Memory
...
fix memory management with --enable-fast-rsa make key and free RSA ke…
2017-07-25 11:03:16 -07:00
toddouska
69d4bcbfd5
Merge pull request #1048 from dgarske/fix_custcurve
...
Fixes for using custom curves with `wc_ecc_set_custom_curve`
2017-07-25 10:59:58 -07:00
toddouska
f9dee9adcc
Merge pull request #1057 from kaleb-himes/TIRTOS-UPDATE
...
Add dependancy file to tirtos package.bld
2017-07-25 10:25:52 -07:00
toddouska
4939c3eeef
Merge pull request #1030 from SparkiDev/aesni_sha384
...
Assembly optimization for AES-NI, and AVX1 and AVX2
2017-07-25 09:35:43 -07:00
Chris Conlon
874144be73
Merge pull request #1046 from kojo1/zendesk-3052
...
io.h for VxWorks
2017-07-25 09:53:15 -06:00
jrblixt
f8e2f596d6
Unit test GCM sanity check Fips change.
2017-07-25 09:23:19 -06:00
Chris Conlon
e9f87b9f33
Merge pull request #1054 from jrblixt/fix-RsaSetRng
...
Fix rsa set rng
2017-07-25 09:16:14 -06:00
Sean Parkinson
e8e1504d9f
Alignment fix
2017-07-25 15:41:33 +10:00
David Garske
08488b52b7
Fix for wolfCrypt test custom curve test not setting wc_ecc_set_custom_curvebefore calling wc_ecc_import_x963_ex. Fix for using ECC_CACHE_CURVE option and wc_ecc_set_custom_curve. Added error checking for wc_ecc_set_custom_curve calls. Reverted ASN header change in test.c.
2017-07-24 21:04:18 -07:00
David Garske
33e214ffc1
Fix to allow ECC set curve size with curve_id == 0. Added wolfCrypt tests / example for using wc_ecc_set_custom_curve for BRAINPOOLP256R1.
2017-07-24 17:24:23 -07:00
David Garske
5180cf4cce
Fix ECC sign with custom curves so the custom params (dp) are passed to public key used for sign.
2017-07-24 17:21:51 -07:00
David Garske
f147b01674
Fixes for using WOLFSSL_CUSTOM_CURVES and wc_ecc_set_custom_curve. Fixes resolves issue with ->dp and ->idx getting reset which caused curve parameters to not be set correctly. Proper sequence for using custom curves is ‘wc_ecc_init, wc_ecc_set_custom_curve then wc_ecc_make_key_ex(…, ECC_CUSTOM_IDX)’ or wc_ecc_import_x963_ex(…, ECC_CUSTOM_IDX). Test case and example to follow shortly.
2017-07-24 17:21:51 -07:00
Sean Parkinson
b23f983604
Intel Assembly optimizations for ChaCha20 - AVX and AVX2
2017-07-25 10:19:02 +10:00
Takashi Kojo
2329e37d97
Remove options outside VxWorks
2017-07-25 09:07:30 +09:00
Sean Parkinson
8e38dcc347
Tidy code up - use local static for cpuid flags
2017-07-25 08:50:39 +10:00
Sean Parkinson
bde6a35ac4
Assembly optimization for AES-NI, and AVX1 and AVX2
...
Unroll the loop for 8.
Use new optimized maths.
Fix SHA-384 to use SHA-512 assembly code.
Only perform CPU id check in one place.
2017-07-25 08:50:39 +10:00
toddouska
36c2ee92dc
Merge pull request #1050 from JacobBarthelmeh/ARMv8
...
Xilinx port
2017-07-24 15:37:05 -07:00
Jacob Barthelmeh
1040bbde16
fix memory management with --enable-fast-rsa make key and free RSA key before calling make key function
2017-07-24 16:20:27 -06:00
toddouska
be61d7fca3
Merge pull request #1044 from ejohnstown/dtls-multicast
...
DTLS Multicast
2017-07-24 14:20:26 -07:00
jrblixt
6df9bc07a4
RSA Fips harness fix.
2017-07-24 13:21:06 -06:00
jrblixt
e68ceb3d2c
Guard against WC_RSA_BLINDING in api.c unit test.
2017-07-24 09:51:50 -06:00
toddouska
95664fdd05
Merge pull request #1041 from dgarske/armc0
...
Fixes for building with custom options
2017-07-24 08:40:51 -07:00
toddouska
9d919ca947
Merge pull request #1049 from dgarske/fix_asynchmac
...
Fixes for building with Async
2017-07-24 08:36:20 -07:00
kaleb-himes
0fed9c1dc5
Add dependancy file to tirtos package.bld
2017-07-24 08:32:01 -06:00
Jacob Barthelmeh
59a46d08d9
Xilinx port
2017-07-21 17:39:47 -06:00
David Garske
26ac5e1ab7
Fix for error: array subscript is below array bounds warning with GCC 7. Added check to prevent negative value from being used against array.
2017-07-21 12:00:28 -07:00
David Garske
b7dac4911b
Fix for using Async and HMAC when its not Intel QuickAssist.
2017-07-21 11:43:01 -07:00
dgarske
9e3497b3d5
Merge pull request #1047 from JacobBarthelmeh/Testing
...
macro guard to check if ECC is enabled
2017-07-21 10:34:13 -07:00
David Garske
f0d6299581
Fix issue with benchmark_init refactor where malloc failure could use null pointer. Added error checking on the wolfCrypt_Init().
2017-07-21 09:31:12 -07:00
Takashi Kojo
173283208b
add WOLFSSL_HAVE_MAX in settings.h
2017-07-21 12:42:24 +09:00
Takashi Kojo
bd6633a31c
#elif defined(WOLFSSL_VXWORKS) in io.h
2017-07-21 12:37:32 +09:00
Jacob Barthelmeh
e3ffd7d539
macro guard to check if ECC is enabled
2017-07-20 16:38:53 -06:00
David Garske
7a972d9611
Fix warning for signed/unsigned comparison.
2017-07-20 11:35:52 -07:00
toddouska
cf9dfac877
Merge pull request #1043 from SparkiDev/sha3_be
...
Big endian fix for SHA-3
2017-07-20 09:14:00 -07:00
Sean Parkinson
d6190507ac
Big endian fix for SHA-3
2017-07-20 16:53:36 +10:00
dgarske
8bfbabd147
Merge pull request #1040 from jrblixt/fix-FreeToHash
...
Added Free functions to hash unit test.
2017-07-19 18:19:28 -07:00
David Garske
0a63221220
Fix for SHA3 benchmark digest size for 224. Fix for building track and debug memory together. Fix for hash test order of SHA256 wrong. Fix for asn SkipObjectId missing, when RSA and ECC disabled. Enhancement to allow individual bench calls with bench init/free.
2017-07-19 18:14:57 -07:00
dgarske
7d82d7235a
Merge pull request #1038 from JacobBarthelmeh/Testing
...
fix warnings found building on a PPC
2017-07-19 16:54:50 -07:00
John Safranek
0fee243b75
Multicast DTLS
...
Restored the multicast key setting code that was lost during rebase.
2017-07-19 14:01:29 -07:00
John Safranek
935bf9028d
DTLS Multicast
...
1. Keep track of the number of records a session drops for having a
bad MAC or detected as replayed.
2. Add function to access the drop statistics.
2017-07-19 13:38:31 -07:00
John Safranek
3329aa7bef
DTLS Multicast
...
Added an API so a session may be queried to see if it has seen any messages
from a specified peerId.
2017-07-19 13:38:31 -07:00
John Safranek
6223f4cd8e
fix a couple rebase merge errors
2017-07-19 13:38:31 -07:00
John Safranek
43f3e304e6
DTLS Multicast
...
Added a parameter check to wolfSSL_mcast_read().
2017-07-19 13:36:42 -07:00
John Safranek
1d32409651
DTLS Multicast
...
1. Allow the MTU size to be changed at compile time for memory
contrained environments using static memory.
2. Add compile time option to disable the check for DTLS messages
in the current epoch with an outside-the-window sequence number.
2017-07-19 13:36:42 -07:00
John Safranek
3b5e537f08
DTLS Multicast
...
wolfSSL_set_secret() was checking the preMasterSz against the sizeof
the preMasterSecret member of the Arrays structure. That member
was changed to a pointer and allocated dynamically for the session
write-duping. The comparison between the passed in size and the size
of the parameter started failing. The check now uses the constant
that is used for allocating the preMasterSecret member.
2017-07-19 13:36:42 -07:00
John Safranek
4c5ddc8482
Multicast DTLS
...
Handshake resources are required for Multicast DTLS to calculate the
session keys. When the session key is set, free the handshake resources.
2017-07-19 13:36:42 -07:00
John Safranek
6509faa78d
Several parameters stored with DTLS session export have moved into
...
a wrapper structure. Updated the references.
2017-07-19 13:36:42 -07:00
John Safranek
1d5c6cce00
Fix some small things compiling with a different compiler, and some
...
other options.
1. Missing prototype for the Mcast receive I/O callback.
2. When disabling SHA-1, the old DTLS cookie callback wouldn't work.
Allow for SHA-256.
2017-07-19 13:36:42 -07:00
John Safranek
fbd7f7972b
Multicast
...
1. Used quotes rather than angle-brackets when including
user_settings.h.
2. Used angle-brackets rather than quotes when including
the ThreadX and NetX headers.
3. Added a define flag to include types.h with NetX or ThreadX.
4. Added a void typecast to hush a warning about an unused variable
in the I/O callbacks for NetX.
5. Clean up static analysis warning in the peer sequence
number selection for DTLS.
2017-07-19 13:36:41 -07:00
David Garske
b40aad3f9e
Added new “wolfSSL_mcast_get_max_peers” API. Minor cleanup with examples/client failure case. Fix possible unused var in wolfSSL_set_secret with DTLS disabled.
2017-07-19 13:35:59 -07:00
John Safranek
6097d29045
DTLS Multicast
...
1. Restore original EmbedRecvFrom callback.
2. Add new EmbedRecvFromMcast callback. (EmbedSendTo still the same.)
3. Set new receive from callback when setting the member ID.
4. Fixed bad rebase change.
2017-07-19 13:34:32 -07:00
John Safranek
af1a9ca908
Multicast
...
1. Squash a couple unused variable warnings.
2017-07-19 13:34:32 -07:00
John Safranek
1657569605
DTLS Multicast
...
1. Adding the prototypes for the sequence number high water callback.
2. Added the accessors to set the highwater callback function,
trigger levels, and application context.
3. Calls the highwater callback at specified sequence number thresholds
per peer.
2017-07-19 13:34:32 -07:00
John Safranek
96c25b2caa
DTLS Multicast
...
1. Separated the peer ID from the array index into the peer sequence
list. This allows peer IDs to range from 0..255, and to have an
arbitrary size for the sequence list.
2. Add API to add and remove peer IDs from the sequence number list.
2017-07-19 13:33:58 -07:00
John Safranek
3f330a2b21
Multicast
...
1. Move the function `wolfSSL_mcast_read()` to
follow `wolfSSL_read_internal()`.
2. Implemented `wolfSSL_mcast_read()`.
2017-07-19 13:33:58 -07:00
John Safranek
60c6c32ad3
Multicast DTLS
...
Tweak the size of the Peer Sequence list.
2017-07-19 13:33:58 -07:00
John Safranek
fa4a8fee8c
DTLS Multicast
...
1. Temporary change to io.c to recieve datagrams from any peer.
2. Uses an array of Peer Sequence structures to track the current
sequence number of all the peers.
2017-07-19 13:33:57 -07:00
John Safranek
0457df83d4
Multicast
...
1. When setting the key data, use same keys for server and client
sides of the different keys. This feels a little kludgey, and
won't work when using separate senders and listeners who may
use unicast messages. But this works for the all peers are
multicast senders case.
2017-07-19 13:33:57 -07:00
John Safranek
30a54a4860
Multicast
...
1. Add haveMcast as an exception case for needing a signing key along
with havePSK and haveAnon.
2017-07-19 13:31:39 -07:00
John Safranek
41638b437b
DTLS Multicast
...
1. Add configured group ID to outbound DTLS datagrams.
2. Parse the group ID from inbound DTLS datagrams.
2017-07-19 13:31:39 -07:00
John Safranek
dd9800856d
Multicast DTLS
...
When setting the new secret, in DTLS mode, update the sequence
numbers, message windows, and epoch.
2017-07-19 13:31:39 -07:00
John Safranek
431a0cbea9
Multicast
...
1. Since multicast's only cipher suite uses null cipher
automatically enable it.
2. Add options to example client and server to start
testing multicast API. (Uses TLS over TCP.)
3. Updates to use the forced secrets set by API.
2017-07-19 13:31:39 -07:00
jrblixt
f83a593f27
Added Free functions to hash unit test.
2017-07-19 14:28:41 -06:00
John Safranek
b616b8df02
Multicast DTLS
...
1. Update API
2. Update unit test
3. Partially implemented wolfSSL_set_secret().
2017-07-19 13:26:23 -07:00
John Safranek
0838a3828b
Multicast DTLS
...
1. Added new cipher suite for use with Multicast DTLS,
WDM_WITH_NULL_SHA256. (It should be a private suite.)
2. Update the API test to use the new suite.
2017-07-19 13:26:23 -07:00
John Safranek
5154584576
Multicast DTLS
...
1. Add DTLS-multicast to the enable options.
2. Reorg DTLS related enable options together.
3. Update a couple enable option texts to use the AS_HELP_STRING() macro.
4. Add three new APIs for managing a DTLS Multicast session.
5. Add test code for new APIs.
6. Add stub code for the new APIs.
2017-07-19 13:26:23 -07:00
Chris Conlon
b3a20470fd
Merge pull request #1036 from jrblixt/unitTest_api_addHc128-PR07182017
...
Unit test functions for HC128.
2017-07-19 13:29:18 -06:00
jrblixt
5c19b7bfe0
Changes per Chris.
2017-07-19 11:24:56 -06:00
Chris Conlon
667b8431cc
Merge pull request #683 from moisesguimaraes/wolfssl-py
...
wolfssl python wrapper
2017-07-19 09:22:02 -07:00
Jacob Barthelmeh
81f09e575e
fix warnings found building on a PPC
2017-07-19 09:24:45 -06:00
jrblixt
d2245b9614
Unit test functions for HC128.
2017-07-19 09:18:48 -06:00
Chris Conlon
5f17598d47
Merge pull request #1035 from jrblixt/Api_c-Fix
...
api.c fix.
2017-07-18 15:46:12 -07:00
Chris Conlon
0e6b0a6156
Merge pull request #1033 from jrblixt/unitTest_api_addAesCcm-PR07172017
...
Unit test functions for AES-CCM.
2017-07-18 15:44:12 -07:00
jrblixt
e68f1b2cec
api.c fix.
2017-07-18 11:02:19 -06:00
Moisés Guimarães
c93a903cae
atualiza lista de arquivos incluídos na versão de distribuição.
2017-07-18 11:36:07 -03:00
dgarske
47fd21dc63
Merge pull request #1032 from JacobBarthelmeh/SGX
...
fix macro check with SGX settings
2017-07-17 19:07:28 -07:00
jrblixt
5671a4cb49
Added unit test functions for AES-CCM.
2017-07-17 15:58:11 -06:00
Chris Conlon
808f4692c7
Merge pull request #993 from jrblixt/unitTest_api_addRsa-PR06222017
...
Add RSA to unit test.
2017-07-17 13:42:42 -07:00
jrblixt
fdb371e82e
Changes per Chris.
2017-07-17 10:43:36 -06:00
Jacob Barthelmeh
c4f0bd6172
fix macro check with SGX settings
2017-07-17 09:36:45 -06:00
dgarske
cc4ca6a44a
Merge pull request #1029 from kaleb-himes/RIOT_OS_PORTABILITY
...
Riot os portability and minor design modifications
2017-07-17 05:16:56 -07:00
kaleb-himes
a7390e32ec
Identified two more old-style definitions in test app
2017-07-16 16:01:52 -06:00
kaleb-himes
e51225aca6
Address typo in RIOT_OS settings and removed ECC as a default feature
2017-07-16 14:22:15 -06:00
kaleb-himes
8acf709b59
Address some old-style function definitions found in RIOT testing
2017-07-16 14:18:58 -06:00
dgarske
f7cd8a0f15
Merge pull request #1028 from JacobBarthelmeh/SGX
...
update SGX macros for harden
2017-07-14 19:42:29 -07:00
Jacob Barthelmeh
12795e9a40
update SGX macros for harden
2017-07-14 16:59:11 -06:00
toddouska
9e9dbc5e97
Merge pull request #1026 from dgarske/curve_128bit
...
Fix for ARMv8 and Curve25519 with debug enabled
2017-07-14 13:27:22 -07:00
David Garske
8612d52844
Fix issue with ARMv8 not performing 128-bit math against constants correctly in debug builds. Fix was to use the __int128_t as const for integers. Also added ./configure --enable-curve25519=no128bit option to force FE to not use the int128_t math.
2017-07-14 10:39:30 -07:00
dgarske
8b55122ba0
Merge pull request #1024 from JacobBarthelmeh/UnitTests
...
adjust size of test buffer
2017-07-13 16:48:00 -07:00
dgarske
a0e918c350
Merge pull request #1022 from JacobBarthelmeh/curve25519
...
build for ed25519 only
2017-07-13 12:30:26 -07:00
Jacob Barthelmeh
ba48221c41
adjust size of test buffer
2017-07-13 13:21:09 -06:00
dgarske
af8b96e277
Merge pull request #1021 from toddouska/zeroret
...
don't treat peer closed / zero return as hard error in example servers
2017-07-13 09:11:31 -07:00
toddouska
4491102eed
Merge pull request #1018 from dgarske/fix_tfm_rusb_max
...
Fix for fast math `fp_read_unsigned_bin` function to check max size
2017-07-13 09:27:02 -06:00
David Garske
d559eb0f4f
Fix for fast math fp_read_unsigned_bin function to check max and correctly set a->used (is handled in fp_mul_2d).
2017-07-12 16:39:26 -07:00
Chris Conlon
43260f02f4
Merge pull request #1020 from toddouska/null
...
add NULL checks to check_domain_name()
2017-07-12 14:58:07 -07:00
toddouska
b12e3c6579
Merge pull request #1019 from JacobBarthelmeh/Testing
...
update AES CTR API with ARMv8 port
2017-07-12 15:57:25 -06:00
Jacob Barthelmeh
c4fe67b633
build for ed25519 only
2017-07-12 15:53:11 -06:00
JacobBarthelmeh
b4f9c46069
Merge pull request #1011 from dgarske/fixes_armv8
...
Fixes for building ARMv8 (--enable-armasm)
2017-07-12 15:44:31 -06:00
toddouska
19787e6d4f
don't treat peer closed / zero return as hard error in example servers
2017-07-12 14:15:16 -06:00
David Garske
c777097e54
Fix wc_AesGcmDecrypt arg check for authIn.
2017-07-12 09:49:27 -07:00
toddouska
b02c995fff
add NULL checks to check_domain_name()
2017-07-12 10:16:31 -06:00
David Garske
5bb8de627e
Fixes based on peer review (thanks).
2017-07-12 09:04:10 -07:00
toddouska
43ad30d364
Merge pull request #1016 from dgarske/fix_harden
...
Warn if hardening options are not defined and not disabled using `WC_NO_HARDEN`
2017-07-12 09:27:32 -06:00
toddouska
dc5e6f789d
Merge pull request #1017 from dgarske/bigend
...
Fix for big endian seg fault in `SendCertificateVerify`
2017-07-12 09:25:25 -06:00
Jacob Barthelmeh
9d7e8a83c9
update AES CTR API with ARMv8 port
2017-07-11 17:13:32 -06:00
toddouska
7853440d89
Merge pull request #1015 from dgarske/config_ignore_cleanup
...
Improve the Git ignore formula for `config`
2017-07-11 15:42:08 -07:00
toddouska
3ff088b92f
Merge pull request #1014 from dgarske/atecc508a
...
Fixes for building with ATECC508A
2017-07-11 15:41:05 -07:00
jrblixt
00724c95a9
Add RSA to unit test.
2017-07-11 09:57:33 -06:00
Chris Conlon
f8c0a52170
Merge pull request #996 from jrblixt/unitTest_api_addAes-PR06152017
...
Unit test api add AES.
2017-07-11 08:36:13 -07:00
David Garske
69e9aa29f2
Fix for big endian platform in SendCertificateVerify where seg fault occurred due to passing a int pointer to a word16 pointer, which caused wrong bits to get set. Fix to replace int with word16. Tests pass now. Also searched for other (word16*)& scenarios and only other place was in ntru code, which was also fixed.
2017-07-10 20:00:37 -07:00
David Garske
a5cdbb18cb
Reworked the AES Key Wrap to use existing code in aes.c (instead of duplicating code in armv8-aes.c). Cleanup for GE/FE math on 32-bit to remove duplicate #ifdef check. Fixed AES GCM arg check for authIn to allows NULL.
2017-07-10 19:12:41 -07:00
David Garske
792fcefbb7
Fix to not warn about WC_RSA_BLINDING in FIPS mode. Add WC_RSA_BLINDING to Windows user_settings.h.
2017-07-10 18:41:22 -07:00
David Garske
171796e8e2
Fix up for building without ./configure to warn if hardening options are not enabled. Currently ./configure defaults to --enable-harden, but if building sources directly and using settings.h or user_settings.h the hardening defines will not be set by default. If a user wants to use without hardening they can suppress the warning by defining WC_NO_HARDEN.
2017-07-10 14:40:07 -07:00
David Garske
cebcee34dd
Improve the Git ignore formula for config. Fixes issue #1012 .
2017-07-10 14:21:19 -07:00
dgarske
f9c949e7e5
Merge pull request #871 from danielinux/rm-wolfssl.pc
...
Remove automatically generated file wolfssl.pc
2017-07-10 14:16:48 -07:00
David Garske
58c05123da
Fixes for building with ATECC508A. Allow ECC check key to pass if slot numb is valid.
2017-07-10 11:07:24 -07:00
David Garske
205da48416
Fixes for building ARMv8. Adds missing SHA224 and AES KeyWrap. Fixes for FE/GE warning with Aarch32. Fix possible build error with ed25519_test with ret not defined.
2017-07-07 15:12:51 -07:00
toddouska
b6854d620f
Merge pull request #1009 from dgarske/fix_tls13_async_aes
...
Fix problem with async TLS 1.3 and raw AES encryption key change
2017-07-06 15:39:22 -07:00
toddouska
626eeaa63d
Merge pull request #1005 from SparkiDev/nginx-1.13.2
...
Changes for Nginx
2017-07-06 14:33:46 -07:00
jrblixt
ced45ced41
Changes requested by Chris.
2017-07-06 13:42:54 -06:00
Sean Parkinson
31ac379c4f
Code review fixes
...
Change verify depth and set curve to be compiled in whe using:
OPENSSL_EXTRA
Fix comparison of curve name strings to use ecc function.
Fix verify depth check when compiling with both OPENSSL_EXTRA and
WOLFSSL_TRUST_PEER_CERT.
2017-07-06 15:32:34 +10:00
toddouska
4b9069f786
Merge pull request #1008 from dgarske/fix_async_frag
...
Fixes for using async with max fragment
2017-07-05 11:00:26 -07:00
toddouska
e767d40656
Merge pull request #1006 from cconlon/mqx
...
Update MQX Classic, mmCAU Ports
2017-07-05 10:30:20 -07:00
David Garske
df119692d1
Fixes for using async with HAVE_MAX_FRAGMENT or --enable-maxfragment which affected TLS 1.2/1.3. Added TLS 1.2 test for using max fragment.
2017-07-03 19:57:37 -07:00
Sean Parkinson
5bddb2e4ef
Changes for Nginx
...
Support TLS v1.3 clients connecting to Nginx.
Fix for PSS to not advertise hash unless the signature fits the private
key size.
Allow curves to be chosen by user.
Support maximum verification depth (maximum number of untrusted certs in
chain.)
Add support for SSL_is_server() API.
Fix number of certificates in chain when using
wolfSSL_CTX_add_extra_chain_cert().
Allow TLS v1.2 client hello parsing to call TLS v1.3 parsing when
SupportedVersions extension seen.
Minor fixes.
2017-07-04 09:37:44 +10:00
toddouska
2939fbe242
Merge pull request #1004 from dgarske/fix_qat_dh
...
Fixes for QAT with DH and HMAC
2017-07-03 12:31:48 -07:00
Moisés Guimarães
1729e0205f
reads _CADATA from file
2017-07-03 12:39:42 -03:00
Moisés Guimarães
54177c14b4
imports certs from ./certs
2017-07-03 12:31:47 -03:00
Moisés Guimarães
bba3fcf772
removes certs
2017-07-03 12:22:22 -03:00
David Garske
c9a2c4ef02
Fix problem with async TLS 1.3 with hardware where encryption key is referenced into ssl->keys and changes before it should be used. Solution is to make raw copy of key and IV for async AES.
2017-06-30 16:41:01 -07:00
David Garske
6a695b76cb
Fixed server side case for DH agree issue with QAT hardware where agreeSz is not set. Fix to allow QAT start failure to continue (this is useful since only one process can use hardware with default QAT configuration).
2017-06-30 11:48:59 -07:00
David Garske
a025417877
Fix issue with QAT and DH operations where key size is larger than block size. Fix issue with DhAgree in TLS not setting agreeSz, which caused result to not be returned. Renamed the internal.c HashType to HashAlgoToType static function because of name conflict with Cavium. Optimize the Hmac struct to replace keyRaw with ipad. Enable RNG HW for benchmark. Fixed missing AES free in AES 192/256 tests.
2017-06-30 11:35:51 -07:00
JacobBarthelmeh
a3375ef961
Merge pull request #997 from NickolasLapp/master
...
Updates to Linux-SGX README, and disable automatic include of
2017-06-30 11:48:12 -06:00
dgarske
d956181911
Merge pull request #1003 from jrblixt/asn_cMemLeak-fix
...
Fix possible memory leak in wc_SetKeyUsage.
2017-06-29 15:28:53 -07:00
jrblixt
baf6bdd6e1
asn.c memory leak fix.
2017-06-29 14:55:19 -06:00
toddouska
31e1d469c0
Merge pull request #1002 from SparkiDev/tls13_imprv
...
Improvements to TLS v1.3 code
2017-06-29 09:21:20 -07:00
Chris Conlon
bba914f92e
protect wolfSSL_BN_print_fp with NO_STDIO_FILESYSTEM
2017-06-29 08:52:45 -06:00
Sean Parkinson
d2ce95955d
Improvements to TLS v1.3 code
...
Reset list of supported sig algorithms before sending certificate
request on server.
Refactored setting of ticket for both TLS13 and earlier.
Remember the type of key for deciding which sig alg to use with TLS13
CertificateVerify.
RSA PKCS #1.5 not allowed in TLS13 for CertificateVerify.
Remove all remaining DTLS code as spec barely started.
Turn off SHA512 code where decision based on cipher suite hash.
Fix fragment handling to work with encrypted messages.
Test public APIS.
2017-06-29 09:00:44 +10:00
Chris Conlon
c099137450
add classic Kinetis mmCAU support, FREESCALE_USE_MMCAU_CLASSIC
2017-06-28 16:32:35 -06:00
Chris Conlon
15a1c9d48e
fixes for MQX classic with Codewarrior
2017-06-28 12:28:40 -06:00
Chris Conlon
a89e50b7b7
include settings.h in wc_port.h to pick up user_settings.h
2017-06-28 12:25:44 -06:00
toddouska
c748d9dae9
Merge pull request #998 from dgarske/fix_no_server_or_client
...
Fix build with either `NO_WOLFSSL_SERVER` or `NO_WOLFSSL_CLIENT` defined
2017-06-28 10:30:08 -07:00
toddouska
b29cd414ef
Merge pull request #995 from SparkiDev/tls13_cookie
...
Add TLS v1.3 Cookie extension support
2017-06-28 10:12:49 -07:00
David Garske
47cc3ffdbc
Fix build with either NO_WOLFSSL_SERVER or NO_WOLFSSL_CLIENT defined.
2017-06-26 23:05:32 -07:00
Sean Parkinson
7aee92110b
Code review fixes
...
Also put in configuration option for sending HRR Cookie extension with
state.
2017-06-27 08:52:53 +10:00
Sean Parkinson
9ca1903ac5
Change define name for sending HRR Cookie
2017-06-27 08:37:55 +10:00
Nickolas Lapp
d4e104231c
Updates to Linux-SGX README, and disable automatic include of
...
benchmark/wolfcrypt tests in static library compile
2017-06-26 14:55:13 -07:00
jrblixt
a3b21f0394
Aes unit test functions.
2017-06-26 15:16:51 -06:00
Sean Parkinson
8bd6a1e727
Add TLS v1.3 Cookie extension support
...
Experimental stateless cookie
2017-06-26 16:41:05 +10:00
JacobBarthelmeh
3bdf8b3cfd
remove fcntl.h include when custom generate seed macro is defined ( #994 )
2017-06-23 14:03:07 -07:00
Kincade Pavich
fbc4123ec0
Added -x option to allow example server to continue running when errors occur.
2017-06-22 21:19:59 -07:00
toddouska
8ef556c2a0
Merge pull request #991 from JacobBarthelmeh/Testing
...
update .am files for make dist
2017-06-22 15:02:12 -07:00
Jacob Barthelmeh
b0f87fdcf7
update .am files for make dist
2017-06-22 14:14:45 -06:00
toddouska
72da8a9a07
Merge pull request #731 from moisesguimaraes/fixes-ocsp-responder
...
adds OCSP Responder extKeyUsage validation
2017-06-22 11:43:51 -07:00
toddouska
d017274bff
Merge pull request #976 from levi-wolfssl/PemToDer-overflow-fix
...
Fix potential buffer over-read in PemToDer()
2017-06-22 10:07:11 -07:00
David Garske
3a4edf75bd
Rename the option to disable the new issuer sign check to ‘WOLFSSL_NO_OCSP_ISSUER_CHECK`.
2017-06-22 09:56:43 -07:00
dgarske
06fa3de31c
Merge pull request #980 from SparkiDev/tls13_0rtt
...
TLS v1.3 0-RTT
2017-06-22 09:44:41 -07:00
Chris Conlon
ccb8e8c976
Merge pull request #988 from jrblixt/unitTest_api_addArc4-PR06212017
...
Add Arc4 to unit test.
2017-06-22 09:15:28 -06:00
Sean Parkinson
207b275d24
Fix HelloRetryRequest for Draft 18
2017-06-22 14:40:09 +10:00
Sean Parkinson
08a0b98f52
Updates from code review
2017-06-22 12:40:41 +10:00
Levi Rak
a37808b32c
Sanity checkes added
2017-06-21 17:14:20 -06:00
jrblixt
1aee054902
Add Arc4 to unit test.
2017-06-21 17:03:27 -06:00
David Garske
a3578c6643
Adds WOLFSSL_NO_OCSP_EXTKEYUSE_OCSP_SIGN option to provide backwards compatibility option for OCSP checking.
2017-06-21 14:12:12 -07:00
David Garske
7a3769f435
Fix wolfCrypt errors test to allow -178.
2017-06-21 14:12:12 -07:00
Moisés Guimarães
4bb17205fe
adds new ocsp test
2017-06-21 14:12:12 -07:00
Moisés Guimarães
a9d5dcae58
updates ocsp tests; adds check for OCSP response signed by issuer.
2017-06-21 14:12:12 -07:00
Moisés Guimarães
42a2f5858e
adds OCSP Responder extKeyUsage validation
2017-06-21 14:12:12 -07:00
toddouska
9ead657723
Merge pull request #989 from dgarske/testing
...
Fixes for CRL handling and possible false failure in `wolfSSL_CTX_load_verify_locations`
2017-06-21 14:10:49 -07:00
toddouska
cd570a01f2
Merge pull request #975 from dgarske/ed_curve_small
...
Allow different Ed25519/Curve25519 math versions
2017-06-21 13:00:33 -07:00
Levi Rak
247388903b
Remove double cast + move min() calls
2017-06-21 13:56:34 -06:00
David Garske
fec75e445e
Fix for build error in master from QAT fixes in PR #967 . Odd that this build error didn’t show up till just now.
2017-06-21 12:52:03 -07:00
Kaleb Himes
64873489ef
Merge pull request #977 from cconlon/cms
...
add PKCS7/CMS decode support for KARI with IssuerAndSerialNumber
2017-06-21 11:54:20 -06:00
David Garske
d75a9f2436
Fix for wc_ReadDirFirst to return non-zero value if no files found. Fix for wolfSSL_CTX_load_verify_locations to not return failure due to wc_ReadDirNext “no more files” -1 response.
2017-06-21 10:36:49 -07:00
David Garske
2f9f746053
Fix for CRL serial number matching to also check length. Fix for testing the verify callback override ‘-j’ to not enable CRL since the CA’s are not loaded for this test.
2017-06-21 10:36:49 -07:00
David Garske
0fa99fcc2e
Fix for openssl script test reporting ./scripts/openssl.test: line 219: psk: command not found.
2017-06-21 10:36:49 -07:00
David Garske
3e06beac19
Additional edge case build error with 32-bit and small where int32_t not defined due to stdint.h not being included.
2017-06-21 10:13:20 -07:00
Chris Conlon
c183e03802
Merge pull request #986 from jrblixt/unitTest_api_addRabbit-PR06192017
...
Add Rabbit unit test functions.
2017-06-21 10:45:41 -06:00
Sean Parkinson
decdf7ae8b
Cleanup
2017-06-21 16:56:51 +10:00
Sean Parkinson
1549a60aa5
Put back Draft 18 code
2017-06-21 08:35:28 +10:00
Sean Parkinson
350ce5fcef
TLS v1.3 0-RTT
2017-06-21 08:35:28 +10:00
Kaleb Himes
97906bfdb2
Merge pull request #982 from JacobBarthelmeh/Testing
...
set return code to TEST_SUCCESS on successful connection
2017-06-20 16:21:50 -06:00
toddouska
8b637cbd1b
Merge pull request #967 from dgarske/fix_qat
...
Fixes and Improvements for Intel QuickAssist
2017-06-20 14:49:56 -07:00
toddouska
a555b5e54a
Merge pull request #987 from SparkiDev/nginx_fix
...
Fix for Nginx - return specific error when at end of file
2017-06-20 14:28:34 -07:00
jrblixt
c14e2d5888
Add Rabbit unit test functions.
2017-06-20 15:16:12 -06:00
Daniele Lacamera
6e6b341b46
Removed automatically generated file wolfssl.pc
2017-06-20 10:39:02 +02:00
Sean Parkinson
d5b1698c43
Fix for Nginx - return specific error when at end of file
2017-06-20 09:27:24 +10:00
David Garske
4950c644cd
Fix edge case on 32-bit with ED small only.
2017-06-19 10:15:05 -07:00
David Garske
7fdb7037d8
Fixes for building Ed/Curve for building on 32/64 bit with uint64_t. Fixes for build with Ed/Curve with ECC disabled.
2017-06-19 10:09:12 -07:00
Chris Conlon
2a688bf905
Merge pull request #972 from jrblixt/unitTest_api_addCamellia-PR06142017
...
Add Camellia unit test functions.
2017-06-19 09:33:19 -06:00
Jacob Barthelmeh
c118146803
set return code to TEST_SUCCESS on successful connection
2017-06-19 09:26:16 -06:00
David Garske
ee83710a0a
Fix for building only curve small and ed disabled. Fix for client assuming supported curves is enabled with curve.
2017-06-16 16:17:01 -07:00
jrblixt
6a2824f199
Add Camellia unit test functions..
2017-06-16 16:27:03 -06:00
Chris Conlon
e0e8d14630
Merge pull request #970 from jrblixt/unitTest_api_addChacha-PR06142017
...
Add ChaCha unit test functions.
2017-06-16 16:15:39 -06:00
Chris Conlon
816b0b058c
add PKCS7/CMS decode support for KARI with IssuerAndSerialNumber
2017-06-16 15:16:32 -06:00
jrblixt
43d6b7a145
Add ChaCha unit test functions.
2017-06-16 13:00:17 -06:00
Levi Rak
17936d65e0
please Jenkins + a bit of cleanup
2017-06-16 12:27:59 -06:00
dgarske
2f36b24796
Merge pull request #973 from JacobBarthelmeh/Testing
...
add sanity check for wolfSSL_X509_NAME_oneline function
2017-06-16 10:54:02 -07:00
Levi Rak
4389d271cc
Fixed potential buffer overflows when configured with --enable-opensslextra
2017-06-16 11:02:06 -06:00
David Garske
3c173ba366
Enhancement to support different sized Curve/Ed math library implementations for FE/GE. Remains backwards compatible with CURVED25519_SMALL define. Adds new defines CURVE25519_SMALL and ED25519_SMALL to allow individual enabling of math library choice (_low_mem or _operations). Example: ./configure --enable-ed25519=small --enable-curve25519.
2017-06-16 09:41:10 -07:00
Chris Conlon
e6f0ee84ec
Merge pull request #971 from jrblixt/unitTest_api_addIdea-PR06142017
...
Add IDEA unit test functions.
2017-06-15 13:12:52 -06:00
Jacob Barthelmeh
bb6582896d
add sanity check for wolfSSL_X509_NAME_oneline function
2017-06-15 11:55:37 -06:00
jrblixt
d5a43af751
Code review changes. Reviewer: Chris.
2017-06-15 11:12:01 -06:00
dgarske
1d303f5f61
Merge pull request #966 from cconlon/ecc_asn
...
fix wc_EccPrivateKeyDecode when pub exists
2017-06-15 08:42:09 -07:00
jrblixt
25ce52cd0c
Add IDEA unit test functions.
2017-06-14 23:43:00 -06:00
dgarske
2b085351b6
Merge pull request #968 from JacobBarthelmeh/Testing
...
silence "may be used uninitialized" warning
2017-06-14 18:05:45 -07:00
toddouska
55d421d8b6
Merge pull request #964 from SparkiDev/ecc_priv_only
...
Ecc priv only
2017-06-14 16:42:24 -07:00
Jacob Barthelmeh
e1fef39aa2
silence "may be used uninitialized" warning
2017-06-14 16:58:22 -06:00
David Garske
f008350afd
Added QAT DRBG support.
2017-06-14 15:45:34 -07:00
David Garske
73567853d3
Fix possible memory leak in DSA and ECC (mp_clear should always be called since async was implemented… even for fast math). Fix dynamic type mismatch in PKCS7.
2017-06-14 15:11:43 -07:00
David Garske
68439d4317
Completed refactor to cleanup dynamic types. Refined the tmp buffers to new types for more granularity. Fixed several places where malloc/free type was mis-matched. Cleanup of the PKCS12 code to improve cleanup handling. Fix wc_PKCS12_parse to return 0 on success else failure.
2017-06-14 15:11:43 -07:00
David Garske
88afc7a92f
Progress on dynamic type cleanup for over-use of tmp_buffer. Increases performance on NUMA memory platform having ability to be more selective about the types that are NUMA allocated for use against QuickAssist hardware.
2017-06-14 15:11:43 -07:00
David Garske
40d94724eb
Added async hardware support for p_hash (PRF). Fix BuildTls13HandshakeHmac to use async devId. Rename poor global variable names for rng with QSH/NTRU.
2017-06-14 15:11:43 -07:00
David Garske
131ccf289f
Disable large alloc scrypt test. Fix unused ret warning in DH key gen from prev change.
2017-06-14 15:11:43 -07:00
David Garske
a77f9fe3e6
Fix for DH so software math is used if prime is under 768 bits.
2017-06-14 15:11:43 -07:00
toddouska
b778ddfea2
Merge pull request #957 from SparkiDev/tls13_updates
...
Tls13 updates
2017-06-14 14:59:11 -07:00
JacobBarthelmeh
c283d4aece
Merge pull request #962 from NickolasLapp/linux-sgx
...
Add LINUX SGX Support for building of wolfSSL static library. See README
2017-06-14 15:56:30 -06:00
toddouska
70eddc4336
Merge pull request #965 from cconlon/threadx
...
ThreadX/NetX warning and optional dc_log_printf exclusion
2017-06-14 14:56:12 -07:00
Chris Conlon
ff48d19727
fix wc_EccPrivateKeyDecode when pub exists
2017-06-14 14:49:52 -06:00
Sean Parkinson
89e6ac91bf
Improve PSK timeout checks
...
Post-handshake Authentication
Fix KeyUpdate to derive keys properly
Fix supported curves (not checking ctx extensions)
2017-06-14 11:28:53 -07:00
toddouska
6d5c257010
Merge pull request #963 from dgarske/fix_tls13_options
...
Fixes for TLS 1.3 without ECC or RSA
2017-06-14 11:19:14 -07:00
Chris Conlon
ea9e4887e9
ThreadX/NetX warning and optional dc_log_printf exclusion
2017-06-14 11:12:27 -06:00
Nickolas Lapp
1e94868432
Add LINUX SGX Support for building of wolfSSL static library. See README
...
in IDE/LINUX-SGX/README.md.
2017-06-13 17:34:45 -07:00
Sean Parkinson
13c4fe6cc4
Add test
2017-06-14 09:44:26 +10:00
Sean Parkinson
62ae1d3023
Fix for private key only ECC key.
2017-06-14 09:33:27 +10:00
toddouska
19f22edd9a
Merge pull request #949 from cconlon/string_abstraction
...
Fix mystrnstr() prototype declaration
2017-06-13 16:06:31 -07:00
Chris Conlon
1ddd6fd3fe
Merge pull request #933 from jrblixt/unitTest_api_add3des
...
Add 3Des to unit test.
2017-06-13 15:35:54 -06:00
dgarske
189d579bec
Merge pull request #960 from levi-wolfssl/void
...
Add void to function prototype.
2017-06-13 13:58:34 -07:00
jrblixt
76aa1f855f
Merge branch 'masterB' of https://github.com/jrblixt/wolfssl into unitTest_api_add3des-cpy
2017-06-13 14:06:30 -06:00
jrblixt
0ef1129f18
Changes WRT small stack.
2017-06-13 13:44:06 -06:00
Chris Conlon
042ee817f3
Merge pull request #757 from moisesguimaraes/updates-wolfcrypt-py-docs
...
Removes 3DES from the wolfCrypt Python docs
2017-06-13 10:55:21 -06:00
Chris Conlon
048b074894
Merge pull request #932 from jrblixt/unitTest_api_addHmac-mergeWolfMaster
...
Add HMAC test functions to unit test.
2017-06-13 10:53:09 -06:00
David Garske
adf819458c
Fixes for TLS 1.3 without ECC or RSA. Fix for building without ECC where HAVE_SUPPORTED_CURVES was getting defined because of ENABLED_TLSX.
2017-06-13 09:44:14 -07:00
toddouska
a18e9a220f
Merge pull request #956 from dgarske/fix_tls13_async
...
Fixes for asynchronous TLS 1.3
2017-06-13 08:08:34 -07:00
David Garske
af2cbcdbab
Added new arg documentation for asyncOkay in doxygen style.
2017-06-12 11:42:48 -07:00
David Garske
ce231e0cbc
Fixes for asynchronous TLS 1.3. Fixes for PK_CALLBACKS with async. New helper API's for wolfSSL_CTX_GetDevId and wolfSSL_CTX_GetHeap. Fix for build to not include tls13.c if not enabled to suppress empty object file warning. Fix typo in fe_low_mem.c. General cleanup. Extra tls13.c debug messages.
2017-06-12 11:42:48 -07:00
toddouska
1d2b4226a4
Merge pull request #959 from SparkiDev/tls_pss_fix
...
Fix check for PSS availability in peer
2017-06-12 11:20:29 -07:00
toddouska
894f4f6fa5
Merge pull request #954 from jrblixt/asn_cSetKeyUsage-fix
...
Fix wc_SetKeyUsage() value error.
2017-06-12 10:48:56 -07:00
toddouska
0fcd1617eb
Merge pull request #952 from JacobBarthelmeh/Testing
...
sanity check on build with ECC or RSA
2017-06-12 10:47:53 -07:00
toddouska
7cc455259e
Merge pull request #941 from SparkiDev/ed25519
...
ED25519 with certificates and TLS
2017-06-12 10:47:21 -07:00
Levi Rak
267753acdd
add void to function prototype
2017-06-12 10:28:10 -06:00
Sean Parkinson
8dbd9a88ee
Fix for CCM - TLS v1.3 needs all nonce/IV bytes
2017-06-12 14:21:43 +10:00
Sean Parkinson
044417ba01
Fix for cache only SNI and TLS v1.3
2017-06-12 09:46:50 +10:00
Sean Parkinson
fdcf25b6d1
Fix check for PSS availability in peer
2017-06-12 09:05:32 +10:00
dgarske
c70fa33094
Merge pull request #958 from kaleb-himes/OPENSSL_EVP
...
Fix compile time Error with openssl extra and cryptonly
2017-06-09 11:12:36 -07:00
kaleb-himes
86809cca74
Fix compile time warning with openssl extra and cryptonly
2017-06-08 20:14:15 -06:00
dgarske
90287c8857
Merge pull request #955 from kaleb-himes/ARG-ERR
...
Fix compile error, too many args with --enable-wpas
2017-06-08 14:59:55 -07:00
kaleb-himes
a00165768c
Fix compile error, too many args with --enabl-wpas
2017-06-08 13:34:44 -06:00
Sean Parkinson
3429b5a3b5
Rework CheckPrivateKey
2017-06-08 09:26:49 +10:00
Sean Parkinson
1db52f0c04
Fix to use different PEM header for EDDSA keys
...
Include new cert and key files in distribution
Fix compile issue when only doing TLS13.
2017-06-08 09:26:49 +10:00
Sean Parkinson
a30e8eb4ad
Fix for benchmarking X25519
2017-06-08 09:26:49 +10:00
Sean Parkinson
1bc862ae24
Ed25519 testing in test.c
2017-06-08 09:26:49 +10:00
Sean Parkinson
613d30bcae
ED25519 TLS support
2017-06-08 09:26:49 +10:00
Sean Parkinson
4beda52dcd
Ed25519 Certificates
2017-06-08 09:26:49 +10:00
toddouska
1be0b2aa30
Merge pull request #953 from SparkiDev/tls13_psk
...
External PSK working in TLS13
2017-06-07 13:58:03 -07:00
John Blixt
2c84eee2df
Fix wc_SetKeyUsage() value error.
2017-06-07 13:58:13 -06:00
Sean Parkinson
5d5ff56336
External PSK working in TLS13
2017-06-07 17:20:22 +10:00
toddouska
26f106c42b
Merge pull request #948 from SparkiDev/tls13_down
...
Implement TLS v1.3 specified downgrade protection mechanism
2017-06-05 16:17:49 -07:00
Jacob Barthelmeh
63c85f72d2
sanity check on build with ECC or RSA
2017-06-05 15:21:34 -06:00
toddouska
af03b7a4ff
Merge pull request #944 from SparkiDev/tls13_20
...
Updates for Draft 20 of TLS v1.3
2017-06-05 14:06:09 -07:00
toddouska
026a95ff10
Merge pull request #950 from dgarske/fix_ocsp_crl
...
Fixes for OCSP and CRL with non-blocking sockets
2017-06-05 13:59:36 -07:00
Sean Parkinson
642795db1b
Implement TLS v1.3 specified downgrade protection mechanism
...
TLS v1.2 implementations whould implement the downgrade protection
mechanism too and so is included.
2017-06-05 09:18:46 +10:00
David Garske
c55575665f
Cleanup to use WANT_READ instead of async WC_PENDING_E for non-blocking OCSP and CRL.
2017-06-02 10:35:26 -07:00
toddouska
c3d29ddfe3
Merge pull request #946 from SparkiDev/jenkins
...
Fix NO_DH build issue
2017-06-02 09:46:55 -07:00
David Garske
b3a85bc2c7
Fixes for OCSP and CRL with non-blocking sockets. Fix for OCSP and CRL file descriptor check to allow 0.
2017-06-02 09:36:35 -07:00
Chris Conlon
3df565475a
protect mystrnstr prototype with WOLFSSL_LEANPSK instead of STRING_USER
2017-06-02 09:26:40 -06:00
Sean Parkinson
0b32d0368f
Updates for Draft 20 of TLS v1.3
2017-06-02 15:59:49 +10:00
Sean Parkinson
6b34a94589
Fix NO_DH build issue
2017-06-01 11:56:53 +10:00
Moisés Guimarães
7a52b5b394
fixes makefiles and requiremets
2017-05-29 20:44:28 -03:00
Moisés Guimarães
38c6d2e3eb
Merge pull request #737 from embray/patch-1
...
wolfcrypt Python: work around minor issue in Random.__del__
2017-05-29 20:19:21 -03:00
toddouska
320ad56139
Merge pull request #939 from dgarske/fixes_async
...
Fixes for build with async
2017-05-26 17:04:57 -07:00
toddouska
c0408aebb4
Merge pull request #938 from dgarske/fix_asn_noocspoptcert
...
Fixes for OCSP workaround for incomplete cert chain
2017-05-26 17:02:31 -07:00
jrblixt
e345471b21
Logical error fix.
2017-05-26 13:27:27 -06:00
David Garske
a0345f6ba9
Fix for building without WOLFSSL_NO_TRUSTED_CERTS_VERIFY.
2017-05-26 10:53:42 -07:00
David Garske
53021a5df7
Increased security for WOLFSSL_NO_TRUSTED_CERTS_VERIFY workaround so it only applies to OCSP. Fix for the workaround to still return date or parsing errors.
2017-05-26 10:01:42 -07:00
jrblixt
1c0006882a
Remove AssertIntEq from within function.
2017-05-26 09:44:12 -06:00
toddouska
a44df73151
Merge pull request #937 from SparkiDev/sha3
...
Initial revision of SHA-3
2017-05-25 10:48:28 -07:00
Sean Parkinson
7ef5aeaf13
Fixes from review and tidy up code.
2017-05-25 09:09:50 +10:00
Sean Parkinson
4134073c8d
Initial revision of SHA-3
2017-05-25 09:09:50 +10:00
jrblixt
0e22752af4
Jenkins fixes.
2017-05-24 16:32:21 -06:00
jrblixt
47b0a62c88
Hmac unit test functions ready for PR.
2017-05-24 16:32:17 -06:00
jrblixt
edddd05226
Changes per Chris.
2017-05-24 11:50:18 -06:00
jrblixt
4d458831b7
Jenkins fixes.
2017-05-24 11:50:18 -06:00
jrblixt
b47fca5760
Patched and Clean up for PR.
2017-05-24 11:50:13 -06:00
Chris Conlon
60c51db831
Merge pull request #928 from jrblixt/unitTest_api_sha224-RipeMd
...
Add sha224 RipeMd to unit test
2017-05-24 09:00:35 -06:00
David Garske
c1664bd1a0
Fixes for async with benchmark tool.
2017-05-23 15:41:42 -07:00
David Garske
64de29f277
Fix for wolfCrypt test with enable-all and asynccrypt.
2017-05-23 15:23:58 -07:00
toddouska
77dbf539c8
Merge pull request #934 from JacobBarthelmeh/mysql
...
some MYSQL updates for cmake and with sun 64 bit
2017-05-23 15:01:39 -07:00
David Garske
720f3fdad2
Fixed a few minor build errors with async enabled.
2017-05-23 15:00:55 -07:00
toddouska
d2b6ab0796
Merge pull request #935 from JacobBarthelmeh/Testing
...
remove size_t dependency with default build
2017-05-23 14:58:50 -07:00
toddouska
6b09a7c6e1
Merge pull request #922 from SparkiDev/tls_pss
...
TLS v1.2 and v1.3 RSA PSS
2017-05-23 14:57:10 -07:00
David Garske
1880677232
Disable wc_scrypt tests that use high memory for BENCH_EMBEDDED.
2017-05-23 14:42:19 -07:00
jrblixt
fc5a37ac02
Changes per Chris.
2017-05-23 10:01:31 -06:00
toddouska
9f5f1dd00f
Merge pull request #936 from SparkiDev/cplusplus
...
Compiling with g++ when configured with --enable-distro
2017-05-22 16:02:56 -07:00
toddouska
19edd47018
Merge pull request #917 from SparkiDev/tls_curve25519
...
Enable X25519 for Key Exchange in TLS
2017-05-22 16:00:00 -07:00
Sean Parkinson
47d04ebaff
Fix from review.
2017-05-23 08:54:25 +10:00
toddouska
c85d07a49d
Merge pull request #929 from dgarske/fix_asn_perm_dirname
...
Fix for parsing permitted name constraint for subject directory name
2017-05-22 09:55:49 -07:00
toddouska
a8f08d1d70
Merge pull request #807 from kojo1/AES-GCM-stm32f4
...
Fixes for STM32F4 AES GCM
2017-05-22 09:53:53 -07:00
toddouska
0e860b0d55
Merge pull request #925 from dgarske/enable_all
...
Added new `./configure --enable-all` option to enable all features
2017-05-22 09:22:50 -07:00
Sean Parkinson
15a2323c09
Compiling with g++ when configured with --enable-distro
2017-05-22 10:14:02 +10:00
Sean Parkinson
6c6069bed8
Fixes from review
2017-05-22 09:47:45 +10:00
Sean Parkinson
8920cd89e4
Fixes from review
2017-05-22 09:09:31 +10:00
dgarske
570c3f02b8
Merge pull request #931 from JacobBarthelmeh/Memory
...
add trackmemory enable option
2017-05-19 17:21:56 -07:00
Jacob Barthelmeh
398c27d848
remove size_t dependency with default build
2017-05-19 16:16:08 -06:00
Jacob Barthelmeh
b6c2e2acf9
require using wolfSSL memory when enabling trackmemory
2017-05-19 15:24:38 -06:00
David Garske
184e9c4090
Fix typo from intermediate change for unaligned CBC fixes. Thanks Nick.
2017-05-19 14:10:50 -07:00
David Garske
a616513860
Added support for AES GCM with STM32F2/STM32F4 using Standard Peripheral Library and CubeMX. Added AES ECB Decrypt for Standard Peripheral Library. Fixes for wolfCrypt test with STM32 crypto hardware for unsupported tests (AES CTR plus 9 and AES GCM with IV != 12). Improve AES CBC for STM32 to handle block aligned only. Added IDE example for SystemWorkbench for STM32 (Open STM32 tools) IDE.
2017-05-19 11:15:46 -07:00
David Garske
0a28b76e8b
Refactor of the ./configure help to use AS_HELP_STRING.
2017-05-19 10:54:13 -07:00
David Garske
1cf3530124
Fix for building with WOLFSSL_NO_OCSP_OPTIONAL_CERTS defined.
2017-05-19 09:59:03 -07:00
toddouska
bdaa827114
Merge pull request #927 from dgarske/fix_nxp_ltc
...
Build fixes for NXP KSDK with MMCAU / LTC after Hexiwear changes
2017-05-19 08:49:54 -07:00
toddouska
7f01aa917a
Merge pull request #930 from dgarske/fix_win
...
Fixes for building AES key wrap and PKCS7 on Windows
2017-05-19 08:16:21 -07:00
Sean Parkinson
4390f4c711
TLS v1.2 and PSS
...
Cleanup the TLS v1.3 PSS code as well.
Added RSA API wc_RsaPSS_CheckPadding() to check the padding - no longer
a simple memcmp with the digest.
2017-05-19 11:49:43 +10:00
Sean Parkinson
5ef977aa3d
Put X25519 behind P256
...
Option to have X25519 prioritized.
Show curve name and DH key size in TLS v1.3.
2017-05-19 10:58:43 +10:00
toddouska
7f350a726b
Merge pull request #926 from dgarske/bench_block_size
...
Added argument for benchmark block size
2017-05-18 16:45:00 -07:00
toddouska
452e057dbf
Merge pull request #919 from dgarske/bshg
...
Add `WOLFSSL_NO_TRUSTED_CERTS_VERIFY` option
2017-05-18 16:44:14 -07:00
toddouska
c3a7497562
Merge pull request #923 from JacobBarthelmeh/staticmemory
...
updated static memory feature with pkcs7
2017-05-18 16:42:21 -07:00
Jacob Barthelmeh
4737b97503
add trackmemory enable option
2017-05-18 16:46:56 -06:00
David Garske
cbb2c73828
Improve NXP MMCAU/LTC AES CBC handling for unaligned sizes. Cleanup formatting in a few places.
2017-05-18 15:04:01 -07:00
David Garske
d61e0243a3
Fixes for building AES key wrap and PKCS7 on Windows. Cleanup snprintf to use XSNPRINTF and changed so define is always setup.
2017-05-18 14:44:19 -07:00
David Garske
36e1fb5e5b
Fix for parsing permitted name constraint for subject directory name. Cleanup to use switch in ConfirmNameConstraints.
2017-05-18 14:06:56 -07:00
Jacob Barthelmeh
09ca962d66
use LP64 for CPU arch type when sun or __sun is defined
2017-05-18 14:39:26 -06:00
Jacob Barthelmeh
2086394a35
compatibility of get cipher list function and update cmake files
2017-05-18 14:36:34 -06:00
jrblixt
77ac61c0f4
Prepare for PR Add Sha224 and RipeMd to unit test.
2017-05-18 13:08:25 -06:00
David Garske
30db8e95a7
Build fixes for KSDK NXP MMCAU / LTC after Hexiwear changes.
2017-05-18 11:52:20 -07:00
David Garske
48895cf03b
Added argument for benchmark block size. Usage: ./wolfcrypt/benchmark/benchmark 128. Automatic calculation for showing as bytes, KB or MB.
2017-05-18 11:24:32 -07:00
David Garske
7bd1e0b80a
Added new ./configure --enable-all option to enable all features. Allows building all features without using the --enable-distro option, which only allows shared build and does not generate an options.h file.
2017-05-18 10:57:28 -07:00
David Garske
c5cc9f5392
Patch from customer that adds new WOLFSSL_NO_TRUSTED_CERTS_VERIFY option to load CA using subject and match using publicKey. This is a workaround for situation where entire cert chain is not loaded/available. This is not a secure solution because it does not perform PKI validation.
2017-05-18 09:55:39 -07:00
toddouska
4370a01778
Merge pull request #921 from dgarske/fix_crl
...
Fix for CRL issue with XFREE using invalid arg for heap.
2017-05-18 09:40:40 -07:00
jrblixt
b5e74878b3
Merge with wolfSSL master for PR includes RipeMd and Sha224 unit test
...
functions.
2017-05-18 10:05:22 -06:00
David Garske
4edcbc79c1
RipeMd and Sha224 added to unit test.
2017-05-18 09:32:11 -06:00
Jacob Barthelmeh
548c01ce54
updated static memory feature with pkcs7
2017-05-18 09:31:09 -06:00
Sean Parkinson
9fb6373cfb
Get PSS going on server side
2017-05-18 15:36:01 +10:00
David Garske
c1f82ece7a
Fix for CRL issue with XFREE using invalid arg for heap.
2017-05-17 16:39:35 -07:00
toddouska
2f15d57a6f
Merge pull request #640 from jrblixt/unitTest_api_dev
...
unit test md5, sha, sha256, sha384, sha512
2017-05-17 09:17:32 -07:00
Sean Parkinson
63a6618feb
Enable X25519 for Key Exchange in TLS
2017-05-17 08:58:12 +10:00
toddouska
4c451a6c61
Merge pull request #920 from dgarske/fix_sb_tls
...
Fix for scan-build warning for possible use of uninitialized `eccKey`
2017-05-16 12:56:50 -07:00
dgarske
5621fad02b
Merge pull request #918 from cconlon/vxworksreadme
...
fix VxWorks README formatting
2017-05-16 12:46:26 -07:00
jrblixt
cb3b10054d
unwanted removal added back.
2017-05-16 13:13:53 -06:00
jrblixt
270d6cbae3
Merge branch 'unitTest_api_dev' of https://github.com/jrblixt/wolfssl into unitTest_api_dev
2017-05-16 13:05:26 -06:00
jrblixt
6acd5dafa7
Changes from Todd's code review.
2017-05-16 12:58:07 -06:00
toddouska
81b6894f6f
Merge pull request #841 from SparkiDev/nginx2
...
Fix loading of CRLs and certs from a file.
2017-05-16 09:13:29 -07:00
jrblixt
289f60e2c9
Changes from Todd's code review.
2017-05-16 10:04:30 -06:00
David Garske
79b0311952
Fix for scan-build warning src/tls.c:4898:20: warning: The left operand of '!=' is a garbage value.
2017-05-16 08:50:06 -07:00
Chris Conlon
c960faffeb
fix VxWorks README formatting
2017-05-16 09:21:54 -06:00
Sean Parkinson
e5fe1a3750
Unlock on memory allocation failure.
2017-05-16 09:41:17 +10:00
toddouska
da15b54529
Merge pull request #915 from SparkiDev/blake2b_init
...
Blake2b fix for GCC 5.4
2017-05-15 08:59:54 -07:00
toddouska
bb60f7a4a4
Merge pull request #914 from JacobBarthelmeh/Testing
...
check return value of test case
2017-05-15 08:58:31 -07:00
dgarske
d53a77a589
Merge pull request #916 from SparkiDev/ecc_unused
...
Fix for scan_build_known_configs warning
2017-05-14 21:51:02 -07:00
Sean Parkinson
1a08143946
Fixup for async on master
2017-05-15 10:10:28 +10:00
Sean Parkinson
1e2a6412d7
Find the CRL entry again after lock
2017-05-15 10:10:28 +10:00
Sean Parkinson
ff4fcf21d6
Add test for private key only ecc key
2017-05-15 10:04:42 +10:00
Sean Parkinson
c6ce1fe330
Allow private key only ECC key to be loaded
2017-05-15 10:04:42 +10:00
Sean Parkinson
c7e57e9c6c
Late CRL check - copy data before use
2017-05-15 10:04:42 +10:00
Sean Parkinson
c8e6c64e51
Fix warning when building for Windows
2017-05-15 10:04:42 +10:00
Sean Parkinson
4723b8470a
Allow a CRL's signature to be verified on use
2017-05-15 10:04:42 +10:00
Sean Parkinson
4d77e80d04
Fix loading of CRLs and certs.
...
Change function wolfSSL_X509_LOOKUP_load_file to load multiple CRLs and
certificates from a file.
Change CRL loading to have a flag to not verify CRL signature - only do
this when using wolfSSL_X509_LOOKUP_load_file() as the certificate is
not always available.
Add test case for loading multiple CRLs in one file without certificate.
2017-05-15 10:04:42 +10:00
Sean Parkinson
224c1b2645
Fix for scan_build_known_configs warning
2017-05-15 09:59:34 +10:00
Sean Parkinson
f8023b808f
Blake2b fix for GCC 5.4
...
Memsetting P and then setting non-zero fields works with GCC 5.4.
2017-05-15 09:47:11 +10:00
toddouska
3297280e62
Merge pull request #913 from JacobBarthelmeh/Compatibility-Layer
...
allow re-using WOLFSSL structure after calling shutdown
2017-05-12 16:50:14 -07:00
toddouska
dcd3a6a478
Merge pull request #907 from dgarske/fix_verifycb
...
Fixes for verify callback override
2017-05-12 16:45:55 -07:00
Jacob Barthelmeh
66e086a0bf
check return value of test case
2017-05-12 16:40:37 -06:00
Jacob Barthelmeh
0374907acc
allow re-using WOLFSSL structure after calling shutdown
2017-05-12 13:54:20 -06:00
toddouska
d03f97dafc
Merge pull request #911 from dgarske/gcc_7
...
Fixes to work with gcc 7.1
2017-05-12 12:08:08 -07:00
jrblixt
606aca9916
Merge branch 'master' of https://github.com/jrblixt/wolfssl into unitTest_api_dev
2017-05-12 02:04:58 -06:00
toddouska
01a5f901d0
Merge pull request #909 from dgarske/fix_no_harden
...
Fix issue with --disable-harden
2017-05-11 16:42:19 -07:00
David Garske
53a837b230
Fix to only use FALL_THROUGH macro for GCC 7.1 or later.
2017-05-11 15:52:32 -07:00
David Garske
7c7503449f
Removed the -Wimplicit-fallthrough=5 from autogen.sh, since older GCC throws “error: unknown warning option”.
2017-05-11 15:28:49 -07:00
David Garske
562db08c3d
Implemented strict switch fall-through handling using new macro FALL_THROUGH.
2017-05-11 15:15:19 -07:00
David Garske
c0c98c8f64
Fixes to address build warnings for GCC 7. Used -Wimplicit-fallthrough=0 to suppress all switch fall-through warnings.
2017-05-11 15:12:16 -07:00
David Garske
f1e6f7d01d
Attempt to fix Visual Studio 2012 compiler issue with test.h myVerify callback.
2017-05-11 13:53:04 -07:00
toddouska
ce42738198
Merge pull request #900 from dgarske/coverity_part3
...
Coverity fixes for TLS 1.3, async, small stack and normal math.
2017-05-11 13:05:53 -07:00
toddouska
5c652e398f
Merge pull request #896 from dgarske/async_cleanups
...
Fixes for async and smallstack
2017-05-11 13:05:25 -07:00
toddouska
e12545ac38
Merge pull request #846 from SparkiDev/renum
...
Renumbered return values in test.c
2017-05-11 13:05:08 -07:00
David Garske
05d2032661
Fix for useVerifyCb variable not used warning with NO_CERTS defined.
2017-05-11 12:57:12 -07:00
David Garske
1b21df9b2b
Fix issue with --disable-harden build due to wc_off_on_addr defined but not used. Cleanup of the wc_off_on_addr code to combine duplicate definitions. Fixes issue #908 .
2017-05-11 12:49:34 -07:00
David Garske
2efa7d5b8b
Fix for verify callback override, peerVerifyRet code on success and ensuring DOMAIN_NAME_MISMATCH error gets passed down in ECDSAk case. Added unit test case to verify callback override works. Fixes issue #905 and issue #904 . Fix for async build goto label typo.
2017-05-11 12:23:17 -07:00
toddouska
a79f9c93c9
Merge pull request #906 from cconlon/tls13beta
...
wolfSSL 3.11.1 release, TLS 1.3 BETA
2017-05-11 11:46:10 -07:00
Chris Conlon
7d6597fe55
wolfSSL 3.11.1 release, TLS 1.3 BETA
2017-05-11 10:01:04 -06:00
toddouska
dcc9f9ae63
Merge pull request #903 from SparkiDev/tls13_interop3
...
Interop testing fixes
2017-05-10 23:04:56 -07:00
Sean Parkinson
22ce2f183d
Interop testing fixes
...
Fix TLS13 cipher suite name to CHACHA20
Include SignatureAlgorithm in older versions of TLS when compiling for
TLS v1.3.
BIT STRING unused bits doesn't necessarily indicate last unused bit.
Fix ecc_dsa_sa_algo value.
2017-05-11 10:42:09 +10:00
toddouska
01586b26ae
Merge pull request #902 from SparkiDev/tls13_interop2
...
TLS v1.3 Interop changes
2017-05-10 09:28:22 -07:00
Sean Parkinson
ec6d8f48b8
Add PSS for TLS v1.3
2017-05-10 17:22:53 +10:00
Sean Parkinson
df3abee72c
TLS v1.3 Interop changes
...
Added Curve25519 for TLS v1.3 only. Curve25519 won't work with older
protocol versions.
Always send signature algorithm extension in TLS v1.3 for server
certificates. If only doing PSK doesn't need to be sent though.
2017-05-10 15:16:27 +10:00
David Garske
8d4f8c6d80
Fixes for build with distro for BuildTls13HandshakeHmac arg change.
2017-05-09 10:09:43 -07:00
David Garske
c47826cc8f
Additional TLS 1.3 return code checking.
2017-05-09 09:45:40 -07:00
David Garske
e8cf4b5ff0
Coverity fixes for TLS 1.3, async, small stack and normal math.
2017-05-09 09:13:21 -07:00
toddouska
dea092fa0a
Merge pull request #901 from SparkiDev/tls13_interop
...
TLS v1.3 interop fixes
2017-05-09 09:08:31 -07:00
Sean Parkinson
46c4adcf4c
TLS v1.3 interop fixes
2017-05-09 14:49:21 +10:00
David Garske
2e016f3b25
Refactor of the rsa_test and dh_test to better handle cleanup.
2017-05-08 12:30:54 -07:00
JacobBarthelmeh
285a338054
Merge pull request #899 from kaleb-himes/release-update
...
Credit E.S. from W.A. with report of DTLS interop bug
2017-05-08 12:06:41 -06:00
kaleb-himes
7b6e2b1002
Credit E.S. from W.A. with report of DTLS interop bug
2017-05-08 10:26:08 -06:00
David Garske
5726c23d81
Fix for scan-build warning with ret not being read in DoServerHello.
2017-05-06 14:00:24 -07:00
David Garske
8cd78edac1
Fixes for building with smallstack
2017-05-06 00:39:12 -04:00
David Garske
011178994b
Fix typos with goto exit labels and heap.
2017-05-06 00:32:02 -04:00
David Garske
6cc3983894
Fix for using async with —enable-eccencrypt.
2017-05-06 00:28:01 -04:00
David Garske
17587d38f8
Fix for new AES 192/256 tests to handle async wait.
2017-05-06 00:28:01 -04:00
toddouska
d23f1e5637
Merge pull request #895 from JacobBarthelmeh/Testing
...
use type with XFREE
2017-05-05 16:27:03 -07:00
toddouska
176193a835
Merge pull request #877 from dgarske/tls13
...
Add TLS 1.3 support
2017-05-05 12:50:40 -07:00
Jacob Barthelmeh
a4ceeed462
use type with XFREE
2017-05-05 13:27:33 -06:00
David Garske
fdb46ac24c
Fix typo with blake2b_test return code.
2017-05-05 11:11:17 -07:00
David Garske
0ca2d7c137
Renumbered return values.
2017-05-04 14:53:39 -07:00
David Garske
af0103bc94
Fix for Valgrind memory leak with the “ssl->hsHashes”. The DTLS wolfSSL_connect for “IsDtlsNotSctpMode” at line 8134 calls InitHandshakeHashes, but doesn’t free existing. Best overall solution is to make sure and free an existing on InitHandshakeHashes, since WOLFSSL is memset to 0.
2017-05-04 14:51:31 -07:00
Sean Parkinson
758c2a761c
Increase timeout on ready file for tls13.test
2017-05-04 14:51:31 -07:00
Sean Parkinson
902f5cf53f
Stack size enabled config fix
2017-05-04 14:51:31 -07:00
Sean Parkinson
f0204de881
Fix for async and tls13 config
2017-05-04 14:51:31 -07:00
David Garske
570befb63f
Fixes for using async. Combine duplicate DoCertificate and DoTls13Certificate code into ProcessPeerCerts. Cleanup of the XMALLOC/XFREE to use ssl->heap.
2017-05-04 14:51:31 -07:00
David Garske
efb4b3c183
Fix for unit test with non-blocking set.
2017-05-04 14:51:31 -07:00
David Garske
253140f37e
Fixes for TLS 1.3. Fix issue with wc_AesGcmDecrypt checking for authIn arg (allowed to be NULL). Fix for preMasterSz in TLSX_KeyShare_ProcessEcc. Fix for building with --disable-asn (NO_CERTS). Fix to remove client “-t” option from help, which no longer exists. Added new WOLFSSL_DEBUG_TLS option for new messages added.
2017-05-04 14:51:31 -07:00
David Garske
77f9126edf
Rebase fixes for TLS 1.3. Getting a decrypt error with the TLS 1.3 test from the SendTls13CertificateVerify.
2017-05-04 14:51:31 -07:00
Sean Parkinson
2b1e9973ec
Add TLS v1.3 as an option
2017-05-04 14:51:30 -07:00
toddouska
edf5d6d777
Merge pull request #894 from JacobBarthelmeh/Release
...
Prepare for release 3.11.0
2017-05-04 14:49:43 -07:00
Jacob Barthelmeh
b51643c344
prepare for release version 3.11.0
2017-05-04 14:17:35 -06:00
Jacob Barthelmeh
7dd877554b
build for windows visual studio with AES GCM
2017-05-04 14:14:12 -06:00
Jacob Barthelmeh
9b5340d3af
sanity checks before copying copying peer certificate
2017-05-04 13:10:46 -06:00
toddouska
bfc43cee15
Merge pull request #893 from cconlon/pkcs7-valgrind-fix
...
fix PKCS7 signedData valgrind issue
2017-05-03 18:14:32 -07:00
Chris Conlon
5e06d59c79
fix PKCS7 signedData valgrind issue
2017-05-03 17:16:44 -06:00
toddouska
e771611c29
Merge pull request #891 from JacobBarthelmeh/Testing
...
sanity check on input buffer index
2017-05-03 12:13:43 -07:00
toddouska
86f10086bb
Merge pull request #890 from dgarske/fix_sb_sni
...
Fix for scan build warning for `TLSX_SNI_GetRequest` possible use of null ptr
2017-05-03 10:03:59 -07:00
Jacob Barthelmeh
55538b5de0
sanity check on input buffer index
2017-05-03 10:21:03 -06:00
David Garske
338194be25
Fix for scan build warning for TLSX_SNI_GetRequest possible use of null pointer.
2017-05-03 07:33:13 -07:00
toddouska
1dc5a0fba2
Merge pull request #889 from JacobBarthelmeh/master
...
add digsigku to renewcerts script and update the not after date
2017-05-02 19:59:07 -07:00
toddouska
a8a5841b7c
Merge pull request #888 from JacobBarthelmeh/Testing
...
Testing
2017-05-02 17:52:14 -07:00
Jacob Barthelmeh
4c8fdf99c5
add digsigku to renewcerts script and update the not after date
2017-05-02 18:08:10 -06:00
Jacob Barthelmeh
8146f73eff
warnings when using g++ compiler
2017-05-02 15:20:20 -06:00
Jacob Barthelmeh
aa990ed1ce
in error case close FILE
2017-05-02 14:54:27 -06:00
Jacob Barthelmeh
dbb67d8582
warnings for builds of haproxy, nginx, and leanpsk
2017-05-02 14:29:53 -06:00
toddouska
0532adf653
Merge pull request #887 from dgarske/minor_cleanups
...
Added return code checking for `wolfCrypt_Init()`
2017-05-02 12:19:12 -07:00
David Garske
ddcf11011e
Added return code checking for wolfCrypt_Init(). Added initRefCount check on wolfCrypt_Cleanup(). Fix link for tenAsys INtime RTOS readme.
2017-05-02 10:20:31 -07:00
toddouska
27aafd674a
Merge pull request #886 from dgarske/fixes_coverity2
...
Fixes for coverity scan (part 2)
2017-05-02 08:53:03 -07:00
Chris Conlon
8d032081ae
Merge pull request #767 from shihrer/hexiwear_pr
...
Hexiwear changes and KDS Project for Hexiwear platform
2017-05-02 07:31:41 -06:00
John Safranek
4135279f82
Merge pull request #843 from kaleb-himes/dtls-interop
...
DTLS update per RFC 6347 Section 4.2.3
2017-05-01 19:29:27 -07:00
toddouska
f61380da21
Merge pull request #870 from kaleb-himes/PSK-UPDATE
...
Update PSK identity length per RFC 4279 - section 5.3
2017-05-01 19:04:32 -07:00
David Garske
3647e50c17
Fixes for the GrowInputBuffer and GrowOutputBuffer changes to only use align when WOLFSSL_GENERAL_ALIGNMENT > 0.
2017-05-01 18:48:54 -07:00
David Garske
9491027c85
Fixes for coverity scan (part 2).
2017-05-01 16:34:24 -07:00
toddouska
1a0b408658
Merge pull request #883 from dgarske/fixes_coverity
...
Fixes for coverity scan
2017-05-01 16:30:04 -07:00
toddouska
9655a1e38c
Merge pull request #885 from dgarske/async_cavium
...
Fixes for Cavium Nitrox with async
2017-05-01 13:36:59 -07:00
David Garske
f19cf4cb34
Fix the client PSK callback to always null terminate after callback. Remove the +1 on the test.h examples for PSK callbacks.
2017-05-01 12:10:05 -07:00
John Safranek
7a1776e931
Merge pull request #881 from cconlon/sniffer
...
fix sniffer with AES-GCM, add scratch authTag buffer
2017-05-01 11:51:01 -07:00
toddouska
893b6f7d75
Merge pull request #884 from JacobBarthelmeh/Testing
...
fix warnings and errors with FreeBSD PowerPC
2017-05-01 11:37:04 -07:00
Michael Shihrer
9269298034
Merge branch 'hexiwear_pr' of https://github.com/shihrer/wolfssl into hexiwear_pr
2017-05-01 12:04:35 -06:00
Michael Shihrer
abe5a318f2
Added hexiwear to include.am and removed dev environment specific variable
2017-05-01 10:44:09 -06:00
Jacob Barthelmeh
2de6c88b80
correct typo when checking if variable rng is null
2017-04-30 18:53:58 -06:00
Takashi Kojo
7270134aec
Merge pull request #788 from takotakot/readme
...
Fix spacing and comma
2017-04-30 06:48:45 +09:00
Jacob Barthelmeh
450ff55d83
fix warnings and errors with FreeBSD PowerPC
2017-04-28 17:57:48 -06:00
David Garske
db63fe83d4
Initial pass at fixes for coverity scan.
2017-04-28 14:59:45 -07:00
toddouska
4387e1f08e
Merge pull request #855 from insane-adding-machines/master
...
Added support for HAproxy load balancer
2017-04-28 13:10:58 -07:00
toddouska
885b301e72
Merge pull request #882 from dgarske/fix_memleak
...
Fix memory leak with InitSSL having duplicate RNG creation code
2017-04-28 12:07:45 -07:00
David Garske
c92b497ea3
Fix async merge error which duplicated the wolfSSL_new RNG creation and caused a memory leak. Fix for build error with plainDigestSz not being initialized.
2017-04-28 10:11:17 -07:00
toddouska
ab78bd0d90
Merge pull request #880 from dgarske/intime_rtos2
...
tenAsys INtime RTOS port fixes from customer peer review
2017-04-27 21:47:53 -07:00
Chris Conlon
b8917baa6a
fix sniffer with AES-GCM, add scratch authTag buffer
2017-04-27 15:22:30 -06:00
David Garske
053594eb98
Workaround for expected failed RSA operations in test.c not failing for Cavium Nitrox V.
2017-04-27 14:21:38 -07:00
Chris Conlon
2deced22dc
Merge pull request #879 from dgarske/fix_builderrors2
...
Fix for scan-build issues with possible use of null’s
2017-04-27 15:06:37 -06:00
dgarske
b61f279b61
Merge pull request #878 from cconlon/serialfix
...
skip removal of leading zero in GetASNInt() when INTEGER is only a si…
2017-04-27 13:13:21 -07:00
David Garske
a4efaf5eaa
Fix mutex to use single count for semaphore so behavior is like mutex. Fix typo with “received”. Fix for mp_clear with fast math to do null check on arg (noticed null with ecc make key benchmark with wc_ecc_free).
2017-04-27 13:09:11 -07:00
David Garske
3e6243eb08
Fix for scan-build issues with possible use of null’s in evp.c wolfSSL_EVP_CipherFinal out arg and DoCertificate args->certs. Removed obsolete client example help arg “-t”.
2017-04-27 10:53:47 -07:00
Chris Conlon
8118762dc4
skip removal of leading zero in GetASNInt() when INTEGER is only a single zero byte
2017-04-27 11:07:59 -06:00
David Garske
fd2996bdeb
Progress with RSA fixes for Cavium Nitrox after async refactor. Improved method for RsaKey and ecc_key typedef to work with async.
2017-04-26 16:40:10 -07:00
David Garske
774ce1a47c
Fixes for build with Cavium.
2017-04-26 16:39:41 -07:00
Chris Conlon
4363cf8a5c
Merge pull request #876 from dgarske/fix_jenkins_errors
...
Fix minor build errors and warnings
2017-04-26 16:54:49 -06:00
David Garske
d612b827b7
Fixes for build warnings on Windows. Fix PKCS7 to use const for byte array declaration. Cleanup of the pkcs7 MAX_PKCS7_DIGEST_SZ. Fix for unsigned / signed comparison warning for pkcs7_load_certs_keys in test.c. Fix for cast warning from word16 to byte in asn.c. Fix for build error with io.h refactor for InTime RTOS.
2017-04-26 09:40:33 -07:00
JacobBarthelmeh
325a3ce418
Merge pull request #875 from dgarske/fix_asn_setname_len
...
Fix issue with ASN encoding SetName function header length
2017-04-26 10:03:25 -06:00
David Garske
5a77eaa579
Fix issue with XFREE in asn.c using invalid heap pointer. Fix issue with bad variable names and missing asterisk in test.c pkcs7_load_certs_keys.
2017-04-26 08:45:05 -07:00
dgarske
7db30ef550
Merge pull request #690 from embray/build/enable_aes_counter
...
Add a configure flag specifically for enabling AES CTR mode
2017-04-25 15:14:13 -07:00
Chris Conlon
1f923a11ee
Merge pull request #874 from dgarske/fix_builderrors
...
Build fixes to address Jenkins reports
2017-04-25 15:14:37 -06:00
Chris Conlon
ac2835ec2e
Merge pull request #873 from dgarske/fix_crl_smallstack
...
Fix build error with CRL and WOLFSSL_SMALL_STACK.
2017-04-25 15:02:04 -06:00
David Garske
d435c16fe8
Fix issue with ASN encoding, where the SetName function was incorrectly adding extra byte for object id tag. Refactor changed lines 7694 and 7700 to use SetObjectId which handles length (was using SetLength prior to refactor). Issue was noticed via compatibility testing using generated cert against openssl asn1parse.
2017-04-25 12:06:08 -07:00
David Garske
fb90a4e498
Fix issue with PSK max length by adding 1 for the null terminator on the strings and allowing up to 128 characters for the PSK. Improved the test.h example for PSK callbacks.
2017-04-25 11:43:45 -07:00
David Garske
be6b12a350
Build fixes to address Jenkins reports. Additionally tested with enable-distro and small-stack identified issue in ssl.c (note: we need to add this combination to Jenkins).
2017-04-25 11:10:36 -07:00
dgarske
92d3c7cd59
Merge pull request #872 from JacobBarthelmeh/Testing
...
handle redefinition warnings
2017-04-24 15:08:13 -07:00
David Garske
8b0784bdfa
Fix build error with CRL and WOLFSSL_SMALL_STACK.
2017-04-24 14:08:59 -07:00
Jacob Barthelmeh
4dad4b6962
handle redefinition warnings
2017-04-24 10:40:56 -06:00
dgarske
dd2915f4fa
Merge pull request #869 from cconlon/ecckeytoder
...
Fix leading zero in wc_BuildEccKeyDer
2017-04-24 09:02:41 -07:00
Daniele Lacamera
08787621ea
wolfssl.pc: Prefix reset to /usr/local
2017-04-24 12:45:23 +02:00
Maxime Vincent
6ada67f93f
Prefix stubs with wolfSSL_
2017-04-24 11:43:19 +02:00
Maxime Vincent
7bd7de350c
More fixes for haproxy port
2017-04-24 10:41:39 +02:00
Daniele Lacamera
7058211860
Merge from latest masterbranch
2017-04-24 06:18:44 +02:00
Daniele Lacamera
ebb32265eb
Minor fixes after PR review
2017-04-24 06:16:35 +02:00
Maxime Vincent
db835da00b
Fixes after wolfSSL feedback
2017-04-22 10:58:05 +02:00
kaleb-himes
348536af9a
Update PSK identity length per RFC 4279 - 5.3
2017-04-21 16:38:19 -06:00
JacobBarthelmeh
3600371abf
Merge pull request #848 from ghoso/des_ecb_encrypt_impl
...
openSSL compatibility API
2017-04-21 14:05:22 -06:00
Chris Conlon
af26708330
Fix leading zero in wc_BuildEccKeyDer
2017-04-21 11:40:50 -06:00
toddouska
7a3f7ad9be
Merge pull request #868 from kaleb-himes/ARDUINO-UPDATE
...
Update ARDUINO script per issue #859 from @pasko-zh
2017-04-20 17:02:49 -07:00
toddouska
a857da23c0
Merge pull request #862 from kaleb-himes/STUNNEL-FIX
...
Fix this issue: PKCS12 is defined to be WC_PKCS12, then redefined as an enumerated value of 12 in asn.h
2017-04-20 13:24:39 -07:00
kaleb-himes
1dd16e6702
Update enum name from peer review
2017-04-20 10:05:12 -06:00
toddouska
c9d53a4ca2
Merge pull request #854 from NickolasLapp/master
...
Add AES 192/256 bit wolfCrypt tests
2017-04-19 16:50:18 -07:00
toddouska
d6abd4d131
Merge pull request #867 from JacobBarthelmeh/mutex
...
fix mutex allocation sanity checks
2017-04-19 13:32:55 -07:00
Nickolas Lapp
a8eb2614f6
Update reference for aes192/256 test to remove bad url and give specific
...
NIST reference document.
2017-04-19 13:13:34 -06:00
Kaleb Himes
14e37cdc4c
Change variable name, add comment
2017-04-19 13:10:55 -06:00
toddouska
5b257d6fd8
Merge pull request #866 from JacobBarthelmeh/Testing
...
add back in haveTrustPeer variable and put macro guard on WC_RNG typedef
2017-04-19 11:57:56 -07:00
kaleb-himes
32e83cb55d
Update ARDUINO script per issue #859 from @pasko-zh
2017-04-19 11:53:58 -06:00
Nickolas Lapp
344c0ec747
Merge branch 'master' of github.com:wolfSSL/wolfssl
2017-04-19 10:10:23 -06:00
Jacob Barthelmeh
4eecaf2574
fix mutex allocation sanity checks
2017-04-18 17:18:19 -06:00
Jacob Barthelmeh
a8115d51fa
add back in haveTrustPeer variable and put macro guard on WC_RNG typedef
2017-04-18 16:53:02 -06:00
toddouska
5b82c2f6ec
Merge pull request #853 from JacobBarthelmeh/Windows
...
testsuite time check on Windows system and fix dh_test if statement
2017-04-18 14:57:53 -07:00
jrblixt
1215203c39
Update sha384 fips.
2017-04-18 12:53:54 -06:00
jrblixt
4a8259b2ad
Jenkin's Fips corrections.
2017-04-18 11:29:35 -06:00
jrblixt
5486a60326
sha512.c updates.
2017-04-18 11:18:29 -06:00
Daniele Lacamera
3279865610
Fixes after jenkins report
...
https://test.wolfssl.com/jenkins/job/windows_pull_request_builder/1453/
2017-04-18 18:47:04 +02:00
Daniele Lacamera
bf877a636f
Merge from masterbranch
2017-04-18 18:34:14 +02:00
toddouska
7df7a07a68
Merge pull request #863 from JacobBarthelmeh/Testing
...
fix old version of AEAD cipher suite
2017-04-18 09:33:00 -07:00
toddouska
8e7d0ba243
Merge pull request #860 from dgarske/fix_allow_old_tls_wsha1
...
Fix for building with NO_OLD_TLS and WOLFSSL_ALLOW_TLS_SHA1
2017-04-18 09:31:45 -07:00
toddouska
fbd5d5bfc6
Merge pull request #865 from cconlon/pkcs7-signed-ecc
...
PKCS#7 SignedData - ECDSA and hash options
2017-04-18 09:30:47 -07:00
Chris Conlon
bab3fd5925
fix clang/scan-build warnings for PKCS7
2017-04-17 14:23:37 -06:00
Chris Conlon
4f26e0341b
allow different hashes with PKCS7 SignedData, cleanup conditional builds
2017-04-17 09:46:26 -06:00
jrblixt
f7c58b0643
Updated wolfcrypt/src/sha256.c.
2017-04-14 16:42:18 -06:00
jrblixt
3749988ee2
Updated wolfcrypt/src/sha.c.
2017-04-14 16:24:25 -06:00
jrblixt
5b5c8f1e95
Updated mcapi/mcapi_test.c ; wolfcrypt/src/md5.c ; wolfcrypt/src/pwdbased.c.
2017-04-14 16:12:29 -06:00
Michael
b08e5f3b82
Merge branch 'master' into hexiwear_pr
2017-04-14 12:03:42 -06:00
Jacob Barthelmeh
53eca92cc0
change type for test instead and add RSA blinding check
2017-04-14 12:02:49 -06:00
Michael Shihrer
21d2becd6b
Modified settings.h to allow building on KSDK 1.3, modified test.c and benchmark.c to work with KSDK, added KDS project for building wolfSSL for Hexiwear
2017-04-14 12:02:28 -06:00
Jacob Barthelmeh
999328f2a0
fix old version of AEAD cipher suite
2017-04-14 10:32:15 -06:00
kaleb-himes
3f067bccf0
fix redefinition of PKCS12 version and PKCS12 struct when building w/ STUNNEL
2017-04-14 10:20:35 -06:00
Chris Conlon
74aafb1679
add PKCS7 SignedData with ECDSA
2017-04-14 09:29:22 -06:00
jrblixt
609ca3c823
Jenkin's Visual Studio status check correction.
2017-04-14 02:34:31 -06:00
jrblixt
b5d856eada
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into unitTest_api_dev
2017-04-14 02:17:57 -06:00
jrblixt
00ea508751
Param check fix in hash files.
2017-04-14 02:16:04 -06:00
David Garske
7779a64cae
Fix for building with NO_OLD_TLS and WOLFSSL_ALLOW_TLS_SHA1.
2017-04-13 21:26:20 -07:00
toddouska
f2ac410f1e
Merge pull request #858 from dgarske/fix_bench_count
...
Fix build/test error with `--enable-scrypt` and build error for ARMv8 AES init
2017-04-13 21:14:44 -07:00
jrblixt
ac6b840dc5
Merge Conflict with wolfSSL master.
2017-04-13 16:51:08 -06:00
jrblixt
85b78835a6
Merge branch 'master' into unitTest_api_dev
...
src/keys.c
wolfcrypt/src/hmac.c
wolfcrypt/src/md5.c
wolfcrypt/src/sha256.c
wolfcrypt/src/sha512.c
wolfssl/wolfcrypt/md5.h
2017-04-13 16:33:23 -06:00
Jacob Barthelmeh
ebde18af59
silence static analysis tool warning about null parameter after sanity check
2017-04-13 15:32:31 -06:00
Jacob Barthelmeh
620d21c850
fix scrypt test with no password
2017-04-13 15:06:26 -06:00
David Garske
3df47d57ab
Fix error with armv8-aes wc_AesInit function using h instead of heap variable. (moved from PR #852 ).
2017-04-13 14:50:55 -06:00
David Garske
4c6a70861b
Fix build errors with --enable-scrypt.
2017-04-13 09:37:48 -07:00
Daniele Lacamera
723ee69114
Fixed missing braces in wolfcrypt test
2017-04-13 15:31:50 +02:00
Daniele Lacamera
ef231a039d
Updated to latest masterbranch
2017-04-13 15:28:19 +02:00
Go Hosohara
fe215c4a57
Fix DES_ecb_encrypt function in terms of reviewing point.
2017-04-13 12:31:52 +09:00
Nickolas Lapp
460197a5e0
Add aes192 and aes256 tests
...
Fix bug with AES decrypt for non-128 bit sizes on STM32F4 hardware
crypto
2017-04-12 20:09:47 -06:00
JacobBarthelmeh
3ac35ce3b3
Merge pull request #838 from SparkiDev/curve25519_51-bit
...
Curve25519 51-bit Implementation
2017-04-12 16:06:37 -06:00
Jacob Barthelmeh
26c8958d1e
testsuite time check on Windows system and fix dh_test if statement
2017-04-12 15:56:45 -06:00
dgarske
8ee9e4ff8b
Merge pull request #851 from toddouska/nosessid
...
don't send session ID on server side if session cache is off unless w…
2017-04-12 14:50:43 -07:00
toddouska
3abcff4db5
Merge pull request #850 from JacobBarthelmeh/Testing
...
fix invalid check on unsigned type
2017-04-12 13:56:44 -07:00
toddouska
27d009475c
Merge pull request #847 from dgarske/distro_options
...
Fixes for --enable-distro to include more features by default
2017-04-12 13:56:24 -07:00
toddouska
e1a53a6c36
Merge pull request #845 from SparkiDev/cert_file
...
Rename caCertFile
2017-04-12 13:55:56 -07:00
toddouska
4f7b27fc88
Merge pull request #844 from SparkiDev/size_t-printf
...
32-bit size_t and printf fix
2017-04-12 13:54:52 -07:00
toddouska
3810571e0d
Merge pull request #715 from dgarske/async_intelqa
...
Intel QuickAssist (QAT) support and async enhancements/fixes
2017-04-12 13:54:19 -07:00
toddouska
b1d59a2334
don't send session ID on server side if session cache is off unless we're echoing session ID as part of session tickets
2017-04-12 10:54:19 -07:00
David Garske
11133e578d
Fixes and cleanups based on feedback from Sean. Added ifdef checks around WC_PENDING_E code to reduce code size for non-async builds. Cleanup accumulative result code checking in SSL_hmac. Cleanup of the RSA async state advancement.
2017-04-12 10:07:38 -07:00
Jacob Barthelmeh
b510c8199e
fix invalid check on unsigned type
2017-04-12 10:41:35 -06:00
Daniele Lacamera
df70b3c859
Removed empty ifdef
2017-04-12 12:50:17 +02:00
Daniele Lacamera
3e9a5fd433
Updated to latest masterbranch
2017-04-12 12:48:38 +02:00
Maxime Vincent
9ca49e7f56
Add more stubs for haproxy
2017-04-12 11:59:17 +02:00
Maxime Vincent
02513792b6
Make new function stubs public
2017-04-12 10:37:17 +02:00
David Garske
d0f31d4a30
Fix issue with wc_ecc_make_key where state failure can occur if the wc_ecc_init hasn’t been called on key prior. Now wc_ecc_make_key and wc_ecc_import_private_key (and _ex versions) can be called without having to call wc_ecc_init first. This keeps backwards compatibility. If async or static memory is desired then wc_ecc_init_ex must be called first.
2017-04-11 15:57:09 -07:00
David Garske
85bef98331
Fix wc_ecc_alloc_rs memset logic. Fix error handling in hmac.c for SHA224. Cleanup of the wc_DhGenerateKeyPair_Async function. Added comment about the “BuildTlsFinished” allocation for hash buffer. Fixed issue with example server that caused the benchmark script to fail in throughput mode.
2017-04-11 14:13:08 -07:00
Go Hosohara
0cebc2172c
Fix WolfSSL_DES_ecb_encrypt().
2017-04-12 00:03:35 +09:00
Go Hosohara
d399b51ba8
Fix WolfSSL_DES_ecb_encrypt().
2017-04-11 23:49:10 +09:00
Daniele Lacamera
de017b0028
Added stubs required to compile HAPROXY
2017-04-11 16:03:08 +02:00
Daniele Lacamera
8f300515bd
Grouped HAPROXY compatibility into WOLFSSL_HAPROXY flag
...
now haproxy compatible wolfssl builds with:
./configure --prefix=/usr --sysconfdir=/etc --disable-fastmath \
iam * ] 2:18 PM
--disable-fasthugemath --disable-bump \
--enable-opensslextra \
--enable-keygen --enable-certgen \
--disable-ntru --disable-examples \
--enable-tlsx --enable-haproxy \
--enable-savecert --enable-savesession --enable-sessioncerts \
--enable-webserver --enable-sslv3 --enable-stunnel
2017-04-11 14:18:41 +02:00
dgarske
213afe18c3
Merge pull request #842 from JacobBarthelmeh/Testing
...
fix c32toa needed with --enable-session-ticket
2017-04-10 19:10:35 -07:00
David Garske
eb1a191fd2
Refactor to add the wc_HmacInit and wc_HmacFree calls.
2017-04-10 14:47:08 -07:00
David Garske
e419a6f899
Fixes and cleanups based on feedback from Sean.
2017-04-10 14:47:07 -07:00
David Garske
62e7dc87c3
Fix merge error with verify callback and totalCerts.
2017-04-10 14:45:05 -07:00
David Garske
56a1618ba0
Fixes to a few things based on peer review.
2017-04-10 14:45:05 -07:00
David Garske
c1640e8a3d
Intel QuickAssist (QAT) support and async enhancements/fixes:
...
* Adds ./configure "--with-intelqa=../QAT1.6”, port files, memory management and README.md (see wolfcrypt/src/port/intel/).
* Added Intel QAT support for RSA public/private (CRT/non-CRT), AES CBC/GCM, ECDH/ECDSA, DH, DES3, SHA, SHA224, SHA256, SHA384, SHA512, MD5 and HMAC.
* wolfSSL async enabled all client and server: PKI, Encrypt/Decrypt, Hashing/HMAC and Certificate Sign/Verify.
* wolfSSL async support in functions: Encrypt, Decrypt, VerifyMAC, BuildMessage, ConfirmSignature, DoCertificate, ParseCertRelative, and MakeSignature.
* wolfCrypt test and benchmark async support added for all HW acceleration.
* wolfCrypt benchmark multi-threading support.
* Added QuickAssist memory overrides for XMALLOC, XFREE and XREALLOC. XREALLOC determines if existing pointer needs reallocated for NUMA.
* Refactor to make sure “heap” is available for async dev init.
* Added async support for all examples for connect, accept, read and write.
* Added new WC_BIGINT (in wolfmath.c) for async hardware support.
* Added async simulator tests for DES3 CBC, AES CBC/GCM.
* Added QAT standalone build for unit testing.
* Added int return code to SHA and MD5 functions.
* Refactor of the async stack variable handling, so async operations have generic args buffer area and cleanup function pointer.
* Combined duplicate code for async push/pop handling.
* Refactor internal.c to add AllocKey / FreeKey.
* Refactor of hash init/free in TLS to use InitHashes and FreeHashes.
* Refactor of the async event->context to use WOLF_EVENT_TYPE_ASYNC_WOLFSSL for WOLFSSL* and WOLF_EVENT_TYPE_ASYNC_WOLFCRYPT for WC_ASYNC_DEV*.
* Suppress error message for WC_PENDING_E.
* Implemented "wolfSSL_EVP_MD_CTX_init" to do memset.
* Cleanup of the openssl compat CTX sizes when async is enabled.
* Cleanup of AES, DES3, DH, SHA, MD5, DES3, DH, HMAC, MD5 for consistency and readability.
* Cleanup of the OPAQUE_LEN.
* Cleanup to use ENCRYPT_LEN instead of sizeof(ssl->arrays.preMasterSecret).
* Changed ssl->arrays.preMasterSecret to use XMALLOC (accelerates HW operations)
* Reduce verbosity with debug enabled for "GetMyVersion", "wolfSSL Using RSA OAEP padding" and "wolfSSL Using RSA PKCSV15 padding".
* Updated RSA un-padding error message so its different than one above it for better debugging.
* Added QAT async enables for each algorithm.
* Refactor of the async init to use _ex.
* Added WC_ASYNC_THRESH_NONE to allow bypass of the async thresholds for testing.
* Reformatted the benchmark results:
PKI: "RSA 2048 private HW 18522 ops took 1.003 sec, avg 0.054 ms, 18467.763 ops/sec"
Crypto/Hashing: SHA-256 SW 350 megs took 1.009 seconds, 346.946 MB/s Cycles per byte = 9.87
* Added min execution time for all benchmarks.
* Moved wc_*GetHash and wc_*RestorePos to appropriate files so use of isCopy flag is local.
* Fix for ECC sign status sometimes being invalid due to uninitialized ECC digest in benchmark.
* Added new DECLARE_VAR/FREE_VAR and DECLARE_ARRAY/FREE_ARRAY macros for helping setup test/benchmark variables to accelerate async.
* Added NO_SW_BENCH option to only run HW bench.
* Added support for PRNG to use hardware SHA256 if _wc devId provided.
* Fix to prevent curve tests from running against wrong curve sizes. Changed wc_ecc_set_curve to match on exact size.
* Added the wc_*GetHash calls to the wolfCrypt tests.
* Added async hardware start/stop to wolfSSL init/cleanup.
* Refactor to add wc_*Copy for hashing context (for async), which replaces wc_*RestorePos.
* Fixes for building with TI hashing (including: SHA224, missing new API’s and building with dummy build for non hw testing). Note: We need to add build test for this `./configure CFLAGS="-DWOLFSSL_TI_HASH -DTI_DUMMY_BUILD”`.
* Added arg checks on wc_*GetHash and wc_*Copy.
* Cleanup of the BuildMD5, BuildSHA, BuildMD5_CertVerify and BuildSHA_CertVerify functions.
* Added new ./configure --enable-asyncthreads, to allow enable/disable of the async threading support. If --enable-asynccrypt set this will be enabled by default if pthread is supported. Allows multi-threaded benchmarks with async simulator.
* Added checks for all hashing to verify valid ->buffLen.
* Fix for SHA512 scan-build warning about un-initialized “W_X”.
* Fix for valgrind un-initialized use of buffer in AllocDer (der->buffer) and BuildTlsFinished handshake_hash.
* Refactor of the benchmarking to use common function for start, check and finish of the stats.
* Fixed issue with ECC cache loading in multi-threading.
* Fix bug with AESNI not aligned code that assumes XMALLOC is 16-byte aligned.
* Added new WC_ASYNC_NO_… options to allow disabling of individual async algorithms. New defines are: WC_ASYNC_NO_CRYPT, WC_ASYNC_NO_PKI and WC_ASYNC_NO_HASH. Additionally each algorithm has a WC_ASYNC_NO_[ALGO] define.
* Added “wolfSSL_GetAllocators” API and fixed the wolfCrypt memcb_test so it restores callback pointers after test is complete (fixes issue with using custom allocators and test breaking it).
2017-04-10 14:45:05 -07:00
David Garske
dc65a9a277
Distro fix to enable SHA224 by default. Was causing Debian build error since SHA224 is enabled by default only for the x86_64 architecture. Updated --enable-distro option to include new features for aeskeywrap, x963kdf and scrypt. Changed the ECC custom curve option to enable all curve types when used with distro.
2017-04-10 11:45:26 -07:00
Go Hosohara
dccff615d5
Add wolfSSL_DES_ecb_encrypt() encrypt/decrypt parameter check.
2017-04-10 16:19:44 +09:00
Go Hosohara
97c22c88d8
Add test result message for test_wolfSSL_DES_ecb_encrypt().
2017-04-10 15:37:47 +09:00
Go Hosohara
27c6625bfe
Fix #ifdef in WolfSSL_DES_ecb_encrypt and test_WolfSSL_DES_ecb_encrypt.
2017-04-10 14:44:48 +09:00
Sean Parkinson
5edcf685ca
Rename caCertFile
2017-04-10 10:38:16 +10:00
Sean Parkinson
335b6d41c1
32-bit size_t and printf fix
2017-04-10 10:26:36 +10:00
Sean Parkinson
cbe46f8d74
Include new file in dist
2017-04-10 08:30:44 +10:00
Go Hosohara
b19cf2cfb8
Add test_wolfSSL_DES_ecb_encrypt()
2017-04-08 17:03:58 +09:00
toddouska
e8971c361a
Merge pull request #830 from kaleb-himes/suite-typo
...
Fixes for using default ciphers
2017-04-07 17:20:54 -07:00
kaleb-himes
8953ed9f30
DTLS update per RFC 6347 Section 4.2.3
2017-04-07 14:26:33 -06:00
jrblixt
3478c9b937
Added return checks to src/keys.c.
2017-04-07 14:15:53 -06:00
Jacob Barthelmeh
80d88b9421
fix c32toa needed with --enable-session-ticket
2017-04-07 11:46:27 -06:00
David Garske
4ff2903b55
Fix to allow anonymous ciphers to work with the new default suite testing.
2017-04-07 10:20:41 -07:00
David Garske
eb40175cc6
Fix to calc BuildSHA_CertVerify if WOLFSSL_ALLOW_TLS_SHA1. Fix to add check for DTLS to not allow stream ciphers. Removed the RC4 tests from the test-dtls.conf. Added support for using default suites on client side. Switched the arg to “-H”. Cleanup of the example server/client args list. Fixes for build with “--disable-sha”.
2017-04-07 10:20:41 -07:00
David Garske
6a1ae7ee5b
Fix on server side to make sure SHA hash is setup even with NO_OLD_TLS. Fix to initialize hsHashes to zero. Fix in PickHashSigAlgo to not default to SHA if NO_OLD_TLS is defined (unless WOLFSSL_ALLOW_TLS_SHA1 is set). Fix to allow pre TLS 1.2 for “AES128-SHA256” and “AES256-SHA256”.
2017-04-07 10:20:18 -07:00
David Garske
b14da2622e
Fix InitSuites to allow old TLS for DHE_RSA with AES 128/256 for SHA256. Reverted changes to test.conf and test-dtls.conf.
2017-04-07 10:20:18 -07:00
David Garske
4dcad96f97
Added test for server to use the default cipher suite list using new “-U” option. This allows the InitSuites logic to be used for determining cipher suites instead of always overriding using the “-l” option. Now both versions are used, so tests are done with wolfSSL_CTX_set_cipher_list and InitSuites. Removed a few cipher suite tests from test.conf that are not valid with old TLS. These were not picked up as failures before because wolfSSL_CTX_set_cipher_list matched on name only, allowing older versions to use the suite.
2017-04-07 10:20:18 -07:00
kaleb-himes
b827380baf
Typo in cipher suite pre-processor macro
2017-04-07 10:19:24 -07:00
toddouska
4e703b6805
Merge pull request #839 from JacobBarthelmeh/Testing
...
build with session tickets and without client
2017-04-07 09:39:47 -07:00
toddouska
2b443a79f2
Merge pull request #836 from dgarske/stack_check_free
...
Fix leak in StackSizeCheck and build error with debug enabled
2017-04-07 09:35:01 -07:00
toddouska
ecaaf19ebf
Merge pull request #835 from dgarske/fix_name_conflict
...
Fix name conflicts in wolfCrypt test with --enable-stacksize
2017-04-07 09:33:00 -07:00
Go Hosohara
c466e3c078
Implements wolfSSL_DES_ecb_encrypt function.
2017-04-07 11:21:32 +09:00
David Garske
2c13ea9a67
Cleanup name conflicts with test.h cert files (by adding “File” to end). Fix memory leak in ecc_test_buffers function.
2017-04-06 15:54:59 -07:00
Jacob Barthelmeh
b49a2561bc
build with session tickets and without client
2017-04-06 16:19:21 -06:00
jrblixt
6e16410e25
Modifications per Todd's requests.
2017-04-06 15:47:53 -06:00
jrblixt
d62d0aaa26
Changes made per Todd's instruction.
2017-04-06 14:42:42 -06:00
dgarske
9ef26679df
Merge pull request #833 from SparkiDev/asn_func
...
ASN Code Rework
2017-04-06 12:47:40 -07:00
JacobBarthelmeh
bb8e67b79c
Merge pull request #837 from cconlon/release-3.10.4
...
3.10.4 release
2017-04-06 11:39:31 -06:00
jrblixt
706c02deed
Changes Chris requested.
2017-04-06 10:53:14 -06:00
toddouska
c8400e9ff1
Merge pull request #824 from dgarske/fix_asn_confirm_sig
...
Fix for return code checking on ConfirmSignature
2017-04-05 16:58:47 -07:00
Sean Parkinson
b11bb5325a
Implementation of 51-bit curve25519
2017-04-06 09:48:01 +10:00
Chris Conlon
c9bb75c0f3
3.10.4 release
2017-04-05 16:37:35 -06:00
David Garske
d648d4f6c7
Fix leak in StackSizeCheck. Fix build error with debug enabled and stack size check.
2017-04-05 14:24:55 -07:00
dgarske
338c70a1ab
Merge pull request #834 from cconlon/ecc_name_from_params
...
add wc_ecc_get_curve_id_from_params()
2017-04-05 14:09:41 -07:00
David Garske
3328b4d38b
Cleanup the unit test naming for new signature failure tests.
2017-04-05 11:24:22 -07:00
Chris Conlon
0c61a5b1fd
add invalid test case for wc_ecc_get_curve_id_from_params()
2017-04-05 11:18:47 -06:00
JacobBarthelmeh
4eefa22629
Merge pull request #810 from toddouska/write-dup
...
add wolfSSL_write_dup(), creates write_only WOLFSSL to allow concurre…
2017-04-05 10:06:20 -06:00
David Garske
15091675fe
Fix VS warning about long to size_t conversion in load_buffer.
2017-04-05 07:23:53 -07:00
Chris Conlon
e101dfa26e
add wc_ecc_get_curve_id_from_params()
2017-04-04 14:49:46 -06:00
David Garske
deb80e5ddb
Fix load_file/load_buffer enables. Fix error in load_buffer with “ret”.
2017-04-04 11:45:55 -07:00
David Garske
e0a4758c0f
Fixes with load_file helper to make sure return code is set correctly and args are initialized.
2017-04-04 11:40:54 -07:00
David Garske
2aa523e0ea
Added API unit test for certificate validation failure using corrupted signature in cert.
2017-04-04 11:15:32 -07:00
David Garske
26f3924c93
Fix for return code checking on ConfirmSignature, so it returns actual error codes or 0 on success.
2017-04-04 10:55:22 -07:00
dgarske
e740756706
Merge pull request #832 from toddouska/rdrand64
...
allow rdrand to use full 64bit output
2017-04-04 08:58:06 -07:00
Sean Parkinson
36e81b650e
Fix missing symbol for specific configs
2017-04-04 14:33:14 +10:00
Sean Parkinson
683a655908
Starting 128-bit FE implementation
2017-04-04 14:17:54 +10:00
Sean Parkinson
b02a75510e
Fix Windows warnings
2017-04-04 11:19:06 +10:00
Sean Parkinson
abaf820537
Improvements and comments
2017-04-04 10:42:04 +10:00
toddouska
cd358bd2ab
protect against multiple write dups
2017-04-03 15:58:33 -07:00
toddouska
2d323dee42
Merge pull request #829 from cconlon/ecc_import
...
fix curve selection on ecc private only import
2017-04-03 15:44:42 -07:00
toddouska
59dc839341
Merge pull request #819 from dgarske/test_static_fixes
...
Fixes for wolfCrypt test/benchmark with static memory
2017-04-03 15:25:45 -07:00
toddouska
1d48fba032
allow rdrand to use full 64bit output
2017-04-03 15:08:35 -07:00
toddouska
68076dee45
Merge pull request #805 from dgarske/rng_cleanup
...
Fix RNG issue with Intel RD and cleanup to remove old ARC4 support
2017-04-03 14:57:09 -07:00
David Garske
29eabe5535
Better stack size check return code handling.
2017-04-03 09:41:12 -07:00
Chris Conlon
8cde26a6c5
fix curve selection on ecc private only import
2017-04-03 09:50:46 -06:00
toddouska
e168d4db09
Merge pull request #821 from SparkiDev/wpas_fips
...
FIPS changes and fixups for wpa_supplicant
2017-04-03 08:27:25 -07:00
Sean Parkinson
fd9e41dd99
ASN functions added to simplify code
...
Functions to get and set different ASN.1 tags have been added.
The functions are used in the asn.c file to simplify the code and ensure
all checks are done.
2017-04-03 16:56:21 +10:00
jrblixt
d626c917dd
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into unitTest_api_dev
2017-03-31 14:18:27 -06:00
David Garske
d69c860ab8
Fix bad #elif logic cleanup for using “USE_TEST_GENSEED”.
2017-03-31 13:16:21 -07:00
David Garske
c532819659
Fixes for building with “CUSTOM_RAND_GENERATE_BLOCK”. Removed seed as backup RNG source. Fixed building on embedded system with time_t not defined (test.c should use long for asn_test).
2017-03-31 13:16:21 -07:00
David Garske
69535198ca
Fix RNG to only allow disabling HASHDRBG if CUSTOM_RAND_GENERATE_BLOCK is defined. Added support for CUSTOM_RAND_GENERATE_BLOCK with Intel RDRAND.
2017-03-31 13:16:21 -07:00
David Garske
1251607b04
Retain existing HAVE_HASHDRBG functionality and only disable if ./configure --disable-hashdrbg or WC_NO_HASHDRBG defined. Fix use of warning with VS. Fix to only use rng seed as source if no DRBG.
2017-03-31 13:16:21 -07:00
David Garske
5e3d8e705e
Fix RNG issue with Intel RDRAND and RDSEED accelerations not being used because HAVE_HASHDRBG was always being defined if !WOLFSSL_FORCE_RC4_DRBG. Added new --enable-intelrand option to indicate use of RDRAND preference for RNG source (if RDRAND not supported by CPU then HASHDRBG will be used). The --enable-intelasm option enables the RDSEED support for seeding HASHDRBG if CPU supports it. Allow use of seed as RNG source if --disable-hashdbrg (shows build warning). Cleanup to remove old ARC4 RNG support. Fixed random_test return code with !HAVE_HASHDRBG. Cleanup of ./configure --help alignment.
2017-03-31 13:16:21 -07:00
David Garske
34a4f1fae0
Move wolfCrypt test/benchmark to move static memory pool to global (not in stack). Fix wolfCrypt test wc_InitRng to use _ex with HEAP_HINT (when not FIPS). Added ability to use HAVE_STACK_SIZE with wolfCrypt test and benchmark. Cleanup of the benchmark_test function main wrapper.
2017-03-31 13:11:23 -07:00
toddouska
ccad9f5575
Merge pull request #818 from dgarske/tkernel_port
...
TKernel port
2017-03-31 10:10:26 -07:00
dgarske
9455c3b469
Merge pull request #826 from cconlon/ecc_adds
...
add XSTRLEN cast in ecc helper
2017-03-31 10:08:05 -07:00
toddouska
6a4b71de05
Merge pull request #822 from JacobBarthelmeh/Testing
...
testing buffer size with const DH and remove redeclaration of WOLFSSL…
2017-03-31 08:53:49 -07:00
Chris Conlon
e1f6dbe74e
add XSTRLEN cast in ecc helper
2017-03-31 09:17:42 -06:00
dgarske
cc4cc41ccf
Merge pull request #825 from cconlon/ecc_der
...
add EccPrivateKeyToDer()
2017-03-30 20:07:26 -07:00
dgarske
5d840751c0
Merge pull request #823 from cconlon/ecc_adds
...
add ECC helpers to get size and id from curve name
2017-03-30 17:28:29 -07:00
David Garske
4e829bc0a5
Fix to assign default OID for TLS supported curves based on loaded extension order.
2017-03-30 13:54:24 -07:00
Chris Conlon
507f052b3f
ECC helper cleanup
2017-03-30 14:34:12 -06:00
Chris Conlon
6735dd7031
add EccPrivateKeyToDer()
2017-03-30 13:56:48 -06:00
Chris Conlon
347f4e3e4d
Merge pull request #820 from JacobBarthelmeh/PKCS8
...
PKCS8 create function
2017-03-30 13:54:30 -06:00
Chris Conlon
61d82790e4
add ECC helpers to get size and id from curve name
2017-03-30 11:32:56 -06:00
Jacob Barthelmeh
5c2b5f86b9
testing buffer size with const DH and remove redeclaration of WOLFSSL_CRL
2017-03-30 10:53:13 -06:00
Jacob Barthelmeh
71b75efd63
move PKCS8 create function and remove PWDBASED requirement
2017-03-30 10:46:58 -06:00
Sean Parkinson
c74c2ce00c
FIPS changes and fixups
...
Enable ex data explicitly.
Keep the peer cert for verification callback.
External session cache for hostapd.
Enable DES_ECB when not FIPS.
Don't send the peer cert if it is not received from peer.
Initialize the peer cert after free as will be freed on tear down of
SSL.
Allow a server to become a client.
2017-03-30 11:53:35 +10:00
Jacob Barthelmeh
9ebfb0e953
make the function wc_CreatePKCS8Key public
2017-03-29 16:42:51 -06:00
Jacob Barthelmeh
5663fbf41a
adjust placement of ECC curve OID in PKCS8 and add parameter notes
2017-03-29 16:17:54 -06:00
Jacob Barthelmeh
219fb584e2
fix for lenght of PKCS8 with ECC and for ECC get key algo ID
2017-03-29 16:17:26 -06:00
Jacob Barthelmeh
72d11e19cd
add create PKCS8 key
2017-03-29 16:14:34 -06:00
David Garske
36d9504bc3
Added NO_WRITE_TEMP_FILES option to prevent writing temp files during wolfCrypt test.
2017-03-28 19:37:55 -07:00
David Garske
75abeaecfc
Updates for TKernel port (WOLFSSL_uTKERNEL2). Added support for InterNiche prconnect_pro using WOLFSSL_PRCONNECT_PRO. Cleanup the min/max functions. Add NO_STDIO_FGETS_REMAP to not include the fgets remap for WOLFSSL_uTKERNEL2. Fix TFM build warning. Added HAVE_POCO_LIB. Added wolfCrypt test temp cert path for WOLFSSL_uTKERNEL2 = /uda/. Added WOLFSSL_CURRTIME_REMAP for benchmark to allow different function name to be used for system which have a conflicting name. Add ability to use normal malloc/free with WOLFSSL_uTKERNEL2 using NO_TKERNEL_MEM_POOL. Added new XMALLOC_OVERRIDE to allow custom XMALLOC/XFREE/XREALLOC macros. Move CUSTOM_RAND_GENERATE up in RNG choices. Rename tls.c STK macros due to conflict.
2017-03-28 19:10:19 -07:00
Maxime Vincent
25779dfb4f
Introduce HAPROXY config flag + get/set app_data
2017-03-28 13:28:36 +02:00
Maxime Vincent
d94fcd8b69
Implemented wolfSSL_EVP_PKEY_base_id, wolfSSL_BIO_read_filename. Added wolfSSL_EVP_PKEY_type stub
2017-03-28 11:42:30 +02:00
dgarske
14efd9735d
Merge pull request #816 from kaleb-himes/eccCaKeyFile-undefined
...
Fix for: 'Fix for build error with unused eccCaKeyFile'
2017-03-27 21:18:46 -07:00
kaleb-himes
2bcb8e53fc
Address case from review
2017-03-27 16:53:13 -06:00
kaleb-himes
5cffae2e3f
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into eccCaKeyFile-undefined
2017-03-27 16:52:51 -06:00
dgarske
10bf955b70
Merge pull request #817 from kaleb-himes/ocsp-cert-update
...
add 'Class 3 Public Primary Certification Authority' to ocspstapling …
2017-03-27 15:21:55 -07:00
JacobBarthelmeh
9c8574111e
Merge pull request #815 from toddouska/switchcerts
...
better handling of TLS layer switching out CTX layer keys/certs
2017-03-27 15:57:58 -06:00
kaleb-himes
bddf0c52a6
add 'Class 3 Public Primary Certification Authority' to ocspstapling test certificate
2017-03-27 14:13:22 -06:00
kaleb-himes
00ca1dcbb7
Fix for: 'Fix for build error with unused eccCaKeyFile'
2017-03-24 14:01:06 -06:00
toddouska
a7c131c0a1
fix vs warning
2017-03-24 11:19:01 -07:00
toddouska
86efbbbb1d
simplify reset suites on cert/key changes to end of function
2017-03-24 10:40:42 -07:00
toddouska
4783fbfc4f
better handling of TLS layer switching out CTX layer keys/certs
2017-03-24 10:19:01 -07:00
toddouska
d8261796a6
Merge pull request #813 from cconlon/addcert
...
add server-keyPkcs8.der to include.am
2017-03-22 14:58:22 -07:00
JacobBarthelmeh
a216da38d2
Merge pull request #798 from toddouska/trackmem
...
add deallocs to memory tracker
2017-03-22 13:59:29 -06:00
toddouska
0983536c98
Merge pull request #814 from dgarske/fix_crl_redef
...
Fix build warning with redefinition of typedef 'WOLFSSL_CRL’
2017-03-22 08:59:02 -07:00
jrblixt
5f7e77f131
Merge branch 'master' of https://github.com/jrblixt/wolfssl into unitTest_api_dev
2017-03-21 16:48:55 -06:00
toddouska
4e6f70e15e
Merge pull request #784 from JacobBarthelmeh/Cert-Report2
...
error out with duplicate policy OID in a certificate policies extension
2017-03-21 15:21:46 -07:00
toddouska
a6ecf793ba
Merge pull request #806 from dgarske/tfm_heap_reduce
...
Reduce heap usage with fast math when not using ALT_ECC_SIZE
2017-03-21 15:21:09 -07:00
dgarske
360fb2db0a
Merge pull request #808 from kojo1/TrialProj
...
eccCaKeyFile in RSA/ECC test
2017-03-21 15:21:00 -07:00
toddouska
3e2fe536ad
Merge pull request #809 from JacobBarthelmeh/Testing
...
test case when not using RSA blinding
2017-03-21 15:18:53 -07:00
toddouska
30024b7e7f
Merge pull request #812 from SparkiDev/valgrind_ecc
...
Fix leak in test
2017-03-21 15:18:09 -07:00
jrblixt
88679a6a0c
Merge wolfSSL master.
2017-03-21 15:33:40 -06:00
jrblixt
739436d7a8
Merge with wolfSSL master.
2017-03-21 15:23:47 -06:00
David Garske
d829e5ba5a
Fix build warning with redefinition of typedef 'WOLFSSL_CRL’.
2017-03-21 09:13:50 -07:00
Chris Conlon
c46eb36b4e
add server-keyPkcs8.der to include.am
2017-03-21 09:53:24 -06:00
David Garske
7be1077216
Fix for build error with unused “eccCaKeyFile”.
2017-03-21 08:31:07 -07:00
Sean Parkinson
8bf22b253a
Fix leak in test
...
Use new points for compressed point testing.
2017-03-21 23:34:48 +10:00
toddouska
15423428ed
add wolfSSL_write_dup(), creates write_only WOLFSSL to allow concurrent access
2017-03-20 15:08:34 -07:00
Jacob Barthelmeh
f26d584cec
test case when not using RSA blinding
2017-03-20 14:15:34 -06:00
JacobBarthelmeh
4cb891334d
Merge pull request #801 from toddouska/fipscheck
...
add keep option to fips-check.sh to keep FIPS temp folder around
2017-03-20 13:44:01 -06:00
David Garske
15e442637d
Fix “#error old TLS requires MD5 and SHA” to only occur if !WOLFCRYPT_ONLY.
2017-03-20 10:42:08 -07:00
Takashi Kojo
e35489fd75
eccCaKeyFile in RSA/ECC test
2017-03-20 13:46:26 +09:00
JacobBarthelmeh
52215b3ecf
Merge pull request #734 from kaleb-himes/csharp-addition
...
Adds wrapper for CTX_load_verify_locations to C# wrapper
2017-03-17 18:18:17 -06:00
toddouska
10bf3c4d1d
Merge pull request #804 from SparkiDev/wpas_shared
...
Wpas shared
2017-03-17 16:15:51 -07:00
David Garske
6cc42dcacb
Reduce TFM fp_int size by only adding the “int size” if ALT_ECC_SIZE or WOLFSSL_ASYNC_CRYPT is defined. Fix couple of async build errors in wolfCrypt test.
2017-03-17 15:01:18 -07:00
toddouska
3bb1723476
Merge pull request #768 from dgarske/crl_lookup
...
Added support for inline CRL lookup when HAVE_CRL_IO is defined
2017-03-17 12:18:45 -07:00
toddouska
b9d3db8b47
Merge pull request #800 from SparkiDev/no_fs
...
If there is no filesystem then still compile and run
2017-03-17 12:08:49 -07:00
toddouska
ad57738cc6
Merge pull request #795 from JacobBarthelmeh/Testing
...
bounds checking with adding string terminating character
2017-03-17 12:07:55 -07:00
toddouska
db526999c3
Merge pull request #803 from dgarske/fix_int_cast_warn
...
Fix warning with "implicit conversion loses integer precision”.
2017-03-17 12:05:29 -07:00
toddouska
c69dea624c
Merge pull request #802 from cconlon/rsa_decode
...
add wc_GetPkcs8TraditionalOffset()
2017-03-17 12:04:44 -07:00
Sean Parkinson
461f051ef1
Only expose ECC APIs on config define
2017-03-17 10:52:38 +10:00
Sean Parkinson
37a52414cc
Make MP and ECC APIs public
...
These APIs are needed by wpa_supplicant.
2017-03-17 10:23:37 +10:00
David Garske
141210dcc0
Fix warning with "implicit conversion loses integer precision”.
2017-03-16 14:56:03 -07:00
Jacob Barthelmeh
3f33f2b995
add duplicate policy OID cert to dist
2017-03-16 15:49:40 -06:00
Jacob Barthelmeh
92587651c9
variable i is not used when WOLFSSL_SEP is enabled
2017-03-16 15:48:15 -06:00
Jacob Barthelmeh
faf2bacd56
error out with duplicate policy OID in a certificate policies extension
2017-03-16 15:48:15 -06:00
Chris Conlon
efc2bb43d2
add wc_GetPkcs8TraditionalOffset()
2017-03-16 15:14:20 -06:00
toddouska
ce6e3ce8d0
Merge pull request #799 from cconlon/ecc_decode
...
remove EccPublicKeyDecode() from WOLFSSL_CERT_EXT guard
2017-03-16 12:47:19 -07:00
toddouska
c62b4e8ed5
Merge pull request #797 from cconlon/ecc_private
...
allow ECC private key only import
2017-03-16 12:45:49 -07:00
toddouska
7651afbd38
Merge pull request #794 from dgarske/fix_rsa_e_overflow_w32bit
...
Fix issue with TFM mp_set_int, which should handle unsigned long.
2017-03-16 11:49:07 -07:00
toddouska
2b1b7632fc
add keep option to fips-check.sh to keep FIPS temp folder around
2017-03-16 11:10:12 -07:00
Sean Parkinson
d22dcdb78d
If there is no filesystem then still compile and run
...
Defaults to 2048-bit FF and 256-bit EC keys.
2017-03-16 16:00:31 +10:00
Sean Parkinson
94d56fda59
Merge pull request #796 from toddouska/noasntime
...
fix NO_ASN_TIME build with --enable-wpas
2017-03-16 14:46:10 +10:00
Chris Conlon
a7f8bdb387
remove EccPublicKeyDecode() from WOLFSSL_CERT_EXT guard
2017-03-15 17:28:52 -06:00
toddouska
5839bd0177
add deallocs to memory tracker
2017-03-15 15:36:12 -07:00
Chris Conlon
a13cce9213
allow ECC private key only import
2017-03-15 16:04:17 -06:00
toddouska
36ecbfb1a8
fix NO_ASN_TIME build with --enable-wpas
2017-03-15 14:57:38 -07:00
Jacob Barthelmeh
0ef1b5d298
bounds checking with adding string terminating character
2017-03-15 13:40:41 -06:00
David Garske
2c890e6827
Fix mp_set_int to use calc for 32 const. Changed it to sizeof(b) instead of sizeof(long).
2017-03-15 12:34:55 -07:00
David Garske
4eb76e1d71
Fixes for building with IPV6. Added new WOLFSSL_IPV6 define to indicate IPV6 support. Fix to not include connect() and socket() calls unless HAVE_HTTP_CLIENT, HAVE_OCSP or HAVE_CRL_IO defined. Typo fixes.
2017-03-15 12:27:02 -07:00
David Garske
cf73a2244f
Fix for stray brace in wolfIO_TcpConnect. Fix to typedef sockaddr_in6 only when TEST_IPV6 is defined. Moved XSOCKLENT into io.h. Added useful WOLFSSL_NO_SOCK, which can be used with WOLFSSL_USER_IO.
2017-03-15 12:26:40 -07:00
David Garske
d3a07858c0
Fixes based on peer review feedback. Fix to only include the non-blocking / select timeout functions when HAVE_IO_TIMEOUT is defined. Fix to only include TCP connect if HAVE_GETADDRINFO or HAVE_SOCKADDR defined. Cleanup of the “struct sockaddr*” to use typedef with HAVE_SOCKADDR. Moved helpful XINET_* and XHTONS/XNTOHS macros to io.h.
2017-03-15 12:26:18 -07:00
David Garske
628f740363
Added support for inline CRL lookup when HAVE_CRL_IO is defined (shares code with OCSP lookup in io.c). Added http chunk transfer encoding support. Added default connection timeout value (DEFAULT_TIMEOUT_SEC) and new wolfIO_SetTimeout() API with HAVE_IO_TIMEOUT. Added generic wolfIO_ API’s for connect, select, non-blocking, read and write. Added new define USE_WOLFSSL_IO to enable access to new wolfIO_* socket wrappers even when WOLFSSL_USER_IO is defined. Moved all API declarations for io.c into new io.h header. Added HAVE_HTTP_CLIENT to expose HTTP API’s. Moved SOCKET_T and SOCKET_ defines into io.h. Added WOLFIO_DEBUG define to display request/responses.
2017-03-15 12:26:18 -07:00
David Garske
5a24fd9237
Fix TFM mp_set_int to handle long. Enhance mp_set_int to use mp_set if less than max mp_digit. Added new MP_SET_CHUNK_BITS to eliminate hard coded const’s and allow build time adjustment.
2017-03-15 12:23:50 -07:00
JacobBarthelmeh
4725a8aea6
Merge pull request #775 from SparkiDev/wpas
...
Changes for WPA Supplicant
2017-03-15 11:19:46 -06:00
toddouska
f38d23a315
Merge pull request #791 from dgarske/fix_ecc_test_curve_idx
...
Fix wc_ecc_export_point_der to use curve_id
2017-03-14 19:22:53 -07:00
toddouska
916a5c97ce
Merge pull request #793 from SparkiDev/scan_build
...
Fixes for scan-build
2017-03-14 19:19:09 -07:00
Sean Parkinson
003e18ecbc
Fixes for scan-build
2017-03-15 09:38:53 +10:00
Sean Parkinson
97b98c5c44
Changes from review
...
Add a free handshake resources API.
Rename to wolfSSL_KeepHandshakeResources().
Add APIs to indicate the client's preference order is to be used when
matching cipher suites.
2017-03-15 09:09:25 +10:00
Sean Parkinson
ac713e62c5
Code review fixes
...
Put back check for server end when setting DH.
Add option to keep resources rather than free after handshake.
2017-03-15 09:09:25 +10:00
Sean Parkinson
122f648fd8
Only support client preference order as default for WPAS.
2017-03-15 09:09:02 +10:00
Sean Parkinson
7897d04145
Need GetHMACSize and GetIVSize for wpas 2.0
2017-03-15 09:09:02 +10:00
Sean Parkinson
fd3093f937
Protect code with #ifdefs
2017-03-15 09:09:02 +10:00
Sean Parkinson
e2930b0a43
Changes for WPA Supplicant
2017-03-15 09:09:02 +10:00
toddouska
7bef7aaa81
Merge pull request #792 from SparkiDev/valgrind
...
Fix valgrind issues
2017-03-14 13:50:26 -07:00
toddouska
4210ce0f67
Merge pull request #789 from SparkiDev/jenkins
...
Fixes for extended configuration testing
2017-03-14 10:00:39 -07:00
toddouska
cccaa8671e
Merge pull request #778 from dgarske/intime_rtos
...
INtime RTOS port
2017-03-14 09:55:50 -07:00
David Garske
2fbce65975
Revert change in types.h for INTIME_RTOS. HAVE_THREAD_LS is not supported here, so don’t define out. Added note in INtime RTOS user_settings.h to indicate this.
2017-03-13 20:03:09 -07:00
David Garske
0eb01698f4
Fix for wolfCrypt ECC import/export point test to not use const idx and instead lookup using the “ecc_curve_id” enum value. Added new “wc_ecc_get_curve_idx” and “wc_ecc_get_curve_id” API’s. Redirected duplicate ECC function “wc_ecc_get_curve_name_from_id” to “wc_ecc_get_name”. Added “ECC_CURVE_INVALID” to indicate invalid curve_id.
2017-03-13 19:58:15 -07:00
Sean Parkinson
72728b21af
Undo as mp_digit is not allowed to get as large as tested
2017-03-14 10:23:13 +10:00
Sean Parkinson
81731df72f
Fix valgrind issues
...
Test program was re-using RSA and ECC key with multiple imports ops.
wc_RsaPublicKeyDecode() leaked if n parseable but not e.
2017-03-14 09:47:34 +10:00
David Garske
8a562c817c
Fix build issues with DEBUG_WOLFSSL defined. Fix typo in user_settings.h for DEBUG_WOLFSSL. Fix issue with example client waiting on local server (shouldn’t be). Updated README.md with example output.
2017-03-13 12:22:44 -07:00
David Garske
e98a0465ae
tenAsys INtime RTOS port. Porting complete for mutex semaphores, threading, file, socket and RNG. Added projects for libwolfssl and wolfExamples. The wolfExamples project includes examples for wolfCrypt Test/Benchmark and wolfSSL TLS client/server. Provided reference user_settings.h with comments and enable/disable gates. Added README.md with overview and instructions. Fixed issue building master with NO_WOLFSSL_DIR defined. Added check if old TLS is enabled that SHA and MD5 are enabled. Cleanup of the wolfCrypt test use of USE_CERT_BUFFERS with file system enabled.
2017-03-13 09:48:55 -07:00
Sean Parkinson
610ac07cd8
Add MP_MASK
2017-03-13 16:28:36 +10:00
Sean Parkinson
8ac2f5cb9c
Windows warning about negating unsigned fix
2017-03-13 12:29:58 +10:00
Sean Parkinson
d4f0c79272
Cast for Windows
2017-03-13 12:18:45 +10:00
Sean Parkinson
614231f71c
Fixes for extended configuration testing
2017-03-13 11:33:39 +10:00
Takuho Nakano
9780f1faef
Fix spacing and comma
2017-03-12 23:01:32 +09:00
toddouska
a6cbfe6f93
Merge pull request #787 from SparkiDev/def_p256
...
Fix elliptic curve selection.
2017-03-11 08:35:11 -08:00
toddouska
91737ceb3f
Merge pull request #786 from JacobBarthelmeh/Testing
...
Testing
2017-03-10 17:03:24 -08:00
Sean Parkinson
80fe2a3524
Fix elliptic curve selection.
...
Preference by:
1. the default for the curve strength (eccTempKeySz),
2. a curve at the curve strength (eccTempKeySz),
3. the default for next higher curve strength,
4. the first curve (client order) with the next highest curve strength
2017-03-11 10:17:15 +10:00
Jacob Barthelmeh
93f1e7cf2e
remove magic number in test case
2017-03-10 13:16:22 -07:00
Jacob Barthelmeh
bb81ea804c
add AES get key to ARMv8 port and add check for BASE 64 encode to tests
2017-03-10 09:55:27 -07:00
Jacob Barthelmeh
dee3159f0f
update byte size conversion
2017-03-10 09:39:18 -07:00
Jacob Barthelmeh
e8d97c9b1e
make test buffers large enough for results
2017-03-10 09:36:29 -07:00
toddouska
5a803730b8
Merge pull request #785 from SparkiDev/fixes
...
Fixes from merge of test coverage changes
2017-03-09 17:58:15 -08:00
toddouska
2b5dba798f
Merge pull request #783 from JacobBarthelmeh/Cert-Report1
...
Add error case for critical Subject Key ID extension
2017-03-09 15:39:23 -08:00
Sean Parkinson
5c9eedbf69
Fixes from merge of test coverage changes
...
Include new certificates in distribution.
Casting changes for clang.
Extra error code - recognize in test.
2017-03-10 09:15:18 +10:00
toddouska
2444a55afe
Merge pull request #708 from SparkiDev/test_cov
...
Extend testing for coverage
2017-03-09 12:52:17 -08:00
toddouska
2bb14903f9
Merge pull request #698 from SparkiDev/nginx
...
Get Nginx working with wolfSSL
2017-03-09 10:23:20 -08:00
toddouska
0e64c7708f
Merge pull request #769 from JacobBarthelmeh/Testing
...
Testing
2017-03-09 10:17:48 -08:00
Jacob Barthelmeh
fd50fd8a3e
Add error case for critical Subject Key ID extension
2017-03-08 16:40:07 -07:00
toddouska
df32c6fb0b
Merge pull request #782 from dgarske/ecc_mem
...
Fix to reduce ECC memory usage when async crypt is not enabled
2017-03-08 15:35:47 -08:00
toddouska
2b0963c42a
Merge pull request #780 from dgarske/crl_win
...
Fixes for building CRL with Windows
2017-03-08 15:31:02 -08:00
David Garske
a55ebb4c18
Fixes for building CRL with Windows. Refactor load_verify_buffer and LoadCRL to use new wc_ReadDir* functions. Added new directory/file API's: wc_ReadDirFirst(), wc_ReadDirNext(), wc_ReadDirClose(). Moved MAX_PATH and MAX_FILENAME_SZ to wc_port.h. Moved BAD_PATH_ERROR into error-crypt.h. The wc_ReadDir is only supported when NO_WOLFSSL_DIR and NO_FILESYSTEM are not defined. Add map to __FUNCTION__ macro in Windows with debug enabled (to resolve build error with VS and __func__ missing). Fix cast warning on response from EncodeOcspRequestExtensions. Fix for cast to call to BuildCertificateStatus.
2017-03-08 11:21:11 -08:00
Jacob Barthelmeh
a0effa6329
call mp_clear to match call to mp_init
2017-03-08 11:26:16 -07:00
David Garske
e115205d18
Fix to reduce ECC memory usage when async crypt is not enabled. Fix uses local for r and s instead of key->r and key->s.
2017-03-07 13:45:02 -08:00
toddouska
e7445b8e49
Merge pull request #781 from dgarske/fix_sb_int_dp
...
Fix integer.c scan-build warning for possible use of NULL dp
2017-03-07 12:03:20 -08:00
David Garske
be42a575da
Fix additional integer.c report of possible use of NULL dp (after normal math performance improvement to defer dp pointer alloc commit bdbb98ed20
2017-03-06 13:19:52 -08:00
JacobBarthelmeh
ebef5083ca
Merge pull request #777 from toddouska/dhpub
...
add check dh public key to agree()
2017-03-06 10:16:57 -07:00
JacobBarthelmeh
bb3bea3d4c
Merge pull request #773 from toddouska/authtag
...
add defined for default AES AUTH_TAG_MIN_SZ
2017-03-06 09:53:01 -07:00
Sean Parkinson
ae6fbb220f
Pass the context to statusCb (needed in Nginx 1.10.3)
2017-03-06 10:58:25 +10:00
toddouska
ba1a8d7681
Merge pull request #765 from dgarske/scanbuild_fixes
...
Fixes for scan-build warnings
2017-03-03 15:58:10 -08:00
toddouska
0d3ef0b399
Merge pull request #776 from dgarske/fix_iis_signature_algorithms
...
Fix issue with IIS servers and NO_OLD_TLS
2017-03-03 12:51:22 -08:00
toddouska
a348898e96
add AUTH_SZ size check to ti and armv8 ports
2017-03-03 11:42:24 -08:00
toddouska
7bcd26e321
add check dh public key to agree()
2017-03-03 11:30:38 -08:00
JacobBarthelmeh
6800ffe8fa
Merge pull request #772 from toddouska/sr3-fix
...
fix signer memory takeover on malformed data
2017-03-03 10:21:01 -07:00
toddouska
eef3ec4a87
Merge pull request #763 from NickolasLapp/master
...
Changes to bring wolfssl up to date with stunnel 5.40
2017-03-03 09:00:11 -08:00
JacobBarthelmeh
ace417b087
Merge pull request #774 from ejohnstown/psk-staticmemory
...
Static Memory Handshake Fix
2017-03-03 09:38:19 -07:00
toddouska
2b937e2f23
Merge pull request #771 from JacobBarthelmeh/master
...
account for static memory IO_POOL free when general memory was used
2017-03-03 08:31:55 -08:00
David Garske
431f363520
Better fixes for suppressing scan-build warning with normal math enabled.
2017-03-03 07:35:26 -08:00
Sean Parkinson
0182d99efb
Updates for nginx 1.10.3
...
Don't return global error when: SOCKET_PEER_CLOSED_E or SOCKET_ERROR_E
Increase max ex_data items to 5
2017-03-03 16:38:29 +10:00
David Garske
b5fe3ddbfa
Fix to allow connection to IIS server which requires SHA1 hash algo to be present in signature_algos extension. Issue only exists when NO_OLD_TLS is defined. To enable SHA1 with TLS 1.2 define "WOLFSSL_ALLOW_TLS_SHA1”.
2017-03-02 18:18:05 -08:00
David Garske
67a8626430
Fix for scan-build warning with “->dp == NULL”. Scenario can’t happen, but adding sanity check to suppress warning.
2017-03-02 15:56:31 -08:00
John Safranek
ec1d8c7090
Fixed where the client was using NULL instead of ssl->heap when allocating memory during SendClientKeyExchange(). Failing on an embedded static build.
2017-03-02 10:05:24 -08:00
David Garske
d903059e05
Fixes to allow signature_algorithms extension to send SHA1 (if enabled) and NO_OLD_TLS is defined. This resolves an issue connected to ISS servers.
2017-03-01 19:07:13 -08:00
toddouska
c1c7c90345
add defined for default AES AUTH_TAG_MIN_SZ
2017-03-01 11:17:24 -08:00
Jacob Barthelmeh
9ab28f9756
account for static memory IO_POOL free when general memory was used
2017-03-01 11:39:00 -07:00
toddouska
2d612da9f4
fix signer memory takeover on malformed data
2017-03-01 10:25:54 -08:00
Sean Parkinson
7ca19f9fff
Protect other call to wc_EccPublicKeyDecode
2017-03-01 09:37:18 +10:00
Sean Parkinson
292a17fff8
wc_EccPublicKeyDecode changes from review
2017-03-01 09:37:18 +10:00
Sean Parkinson
455fb96faa
Extend testing for coverage
2017-03-01 09:37:18 +10:00
dgarske
0608cd0dd3
Merge pull request #770 from JacobBarthelmeh/master
...
adjust return value of hash update and address warning with NO_SHA
2017-02-28 14:56:43 -08:00
Sean Parkinson
13e6217fd5
Changes from code review
2017-03-01 08:38:54 +10:00
Sean Parkinson
d4abeb56db
Fixes required after logging changes to master.
2017-03-01 08:38:54 +10:00
Sean Parkinson
e6434f380b
Get Nginx working with wolfSSL
2017-03-01 08:38:54 +10:00
jrblixt
d5d7a4ae7b
Report failure but continue to run.
2017-02-28 14:44:11 -07:00
Jacob Barthelmeh
f77458992e
resolve windows warnings and add sanity check with PKCS12 parse
2017-02-28 14:33:07 -07:00
Jacob Barthelmeh
0ed8024bcf
adjust return value of hash update and address warning with NO_SHA
2017-02-28 13:40:03 -07:00
toddouska
b86dfd582f
Merge pull request #766 from JacobBarthelmeh/Testing
...
debug message fix
2017-02-27 12:09:43 -08:00
jrblixt
b2fc525a1d
update MD5, SHA, SHA256, SHA384, SHA512 Update functions.
2017-02-24 15:58:47 -07:00
jrblixt
c467bbd776
Reasses return values on all Init, Update, Final functions.
2017-02-24 15:16:54 -07:00
Jacob Barthelmeh
26bd19bbd8
debug message fix
2017-02-23 17:15:44 -07:00
David Garske
9db6a27921
Fixes for scan-build warnings. Fix possible memory leak in wolfSSL_DH_new on failure. Add null checks in integer.c for destination to make sure “dp” grows when NULL (even though never happens in real-use). Added suppression of wc_port.c warning “Value stored to 'ret' is never read”.
2017-02-23 14:47:36 -08:00
jrblixt
6ca16b06d2
MergeConflicts
2017-02-23 11:13:32 -07:00
toddouska
6425a654be
Merge pull request #761 from dgarske/stm32_fixes
...
Fix for AES-GCM with STM32 and CubeMX HAL
2017-02-22 14:31:36 -08:00
toddouska
302db35b2f
Merge pull request #752 from dgarske/fix_ecc_import_wstaticmem
...
Fix issue with wc_ecc_import_x963_ex() loosing heap pointer
2017-02-22 14:30:57 -08:00
toddouska
bdbb98ed20
Merge pull request #735 from dgarske/norm_math_speedup
...
Normal math speed-up to not allocate on mp_int and defer until mp_grow
2017-02-22 14:29:51 -08:00
John Safranek
d52f44108c
Merge pull request #762 from moisesguimaraes/fix-ocsp-request
...
Adds missing free(request) in CheckOcspRequest()
2017-02-22 14:19:51 -08:00
Moisés Guimarães
8bbcdf977d
adds missing free(request) in CheckOcspRequest()
2017-02-22 10:43:07 -08:00
Nickolas Lapp
2ef4525d4d
Changes to bring wolfssl up to date with stunnel 5.40
2017-02-22 11:15:59 -07:00
David Garske
5a539751a2
Fixes for AES with STM32 and CubeMX. The key size was not being set and causing issues with AES GCM.
2017-02-21 15:12:40 -08:00
dgarske
aeea24a5e3
Merge pull request #760 from toddouska/mcheck
...
fix small stack malloc checks
2017-02-21 14:33:44 -08:00
David Garske
e01da5c44c
Fix mp_set to return int after rebase.
2017-02-21 14:12:27 -08:00
David Garske
b05cfec057
Fix build warning with missing “mp_to_unsigned_bin_at_pos” declaration.
2017-02-21 14:03:21 -08:00
David Garske
4cbfec1c7d
Implemented ksdk_port fixes to handle mp_ response codes. Added KSDK support for normal math. Regression testing against K82 hardware (MMCAU/LTC) and software with normal and fast math.
2017-02-21 14:03:21 -08:00
David Garske
3008c888bf
Fix mp_cmp_d logic to handle a->used == 0. Revert mp_copy and mp_set 0 size workarounds.
2017-02-21 14:03:21 -08:00
David Garske
9c7407d18c
Added return codes to wc_InitDhKey, wc_InitDsaKey and mp_set. Added missing return code checks on mp_copy in ecc.c. Fixed build with DSA and no ECC where mp_set function def would be missing.
2017-02-21 14:03:21 -08:00
David Garske
d14be65315
Improve handling of mp_clear for RSA after speed-up.
2017-02-21 13:59:38 -08:00
David Garske
bced81d234
Improve handling of mp_init / mp_clear for DH and DSA after speed-up.
2017-02-21 13:59:38 -08:00
David Garske
da5825b94d
Normal math speed-up to not allocate on mp_int and defer until mp_grow. Added memory tracker support to ./tests/unit.test. Fix memory leak with curve cache enabled, by adding to wolfSSL_Cleanup.
2017-02-21 13:59:38 -08:00
toddouska
e9c806a639
Merge pull request #743 from JacobBarthelmeh/master
...
change pem_password_cb typedef for compatibility
2017-02-21 13:23:05 -08:00
toddouska
ce94243a20
Merge pull request #746 from cconlon/pkcs7ukm
...
PKCS7: fix optional UserKeyingMaterial encoding
2017-02-21 13:22:31 -08:00
toddouska
f4f5d2d569
Merge pull request #747 from dgarske/integer_min_max
...
Fix naming for integer.c min/max local variables
2017-02-21 13:21:52 -08:00
toddouska
988f7fa983
Merge pull request #759 from dgarske/fix_smallstack_procuserhcain
...
Fix for ProcessUserChain with WOLFSSL_SMALL_STACK defined causing stack corruption
2017-02-21 13:20:43 -08:00
dgarske
c01fb8f655
Merge pull request #758 from kaleb-himes/mp_set
...
Fix for building with ECC disabled and DSA enabled with mp_set API.
2017-02-21 12:59:53 -08:00
David Garske
7125d16f3e
Fix issue with wc_ecc_import_x963_ex() and wc_ecc_import_raw_private() loosing heap pointer. Fixes issue #750 .
2017-02-21 12:19:48 -08:00
toddouska
fc85b8189c
fix small stack malloc checks
2017-02-21 11:18:09 -08:00
David Garske
f0112c2f7d
Fix for ProcessUserChain with WOLFSSL_SMALL_STACK defined causing stack corruption.
2017-02-21 10:38:44 -08:00
kaleb-himes
fddf3bc664
pre-processor-macro update for mp_set API
2017-02-20 16:31:19 -07:00
JacobBarthelmeh
db1f205522
Merge pull request #756 from toddouska/release3-10-3
...
3.10.3 rel
2017-02-20 10:08:14 -07:00
toddouska
ebb21fc284
update rpm spec
2017-02-17 15:02:04 -08:00
toddouska
e3503b8f9b
3.10.3 rel
2017-02-17 14:49:18 -08:00
David Garske
4f53761faf
Fix naming for integer.c min/max local variables to resolve reported “error: declaration of 'min' shadows a global declaration”.
2017-02-09 15:52:25 -08:00
Chris Conlon
93642cfcb9
PKCS7: fix optional UserKeyingMaterial encoding
2017-02-09 12:04:19 -07:00
Jacob Barthelmeh
c02f35c128
change pem_password_cb typedef for compatibility
2017-02-08 11:48:50 -07:00
Moisés Guimarães
daafb2c5ac
changes docs to single page
2017-02-05 18:56:19 -03:00
Moisés Guimarães
e33d4c0172
adds full docs
2017-02-05 18:51:13 -03:00
Moisés Guimarães
00a74d0da4
adds initial doc files
2017-02-05 16:43:43 -03:00
Erik Bray
bf12e4ecca
wolfcrypt Python: work around minor issue in Random.__del__
...
During interpreter shutdown, depending on the order in which things happen, a module can be unloaded before all instances of classes defined in that module are garbage collected.
In particular, this means that any global variables (including imported modules) become `None` by the time the instances `__del__` is called, resulting in
```
AttributeError: 'NoneType' object has no attribute 'wc_FreeRng'
```
being displayed while the process exits. This can be avoided simply by catching and ignoring the `AttributeError` in this case, since the process is shutting down anyways.
2017-02-02 16:51:41 +01:00
kaleb-himes
d1f323ca58
Adds wrapper for CTX_load_verify_locations to C# wrapper
2017-01-31 14:45:33 -07:00
jrblixt
b11265dbf5
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into unitTest_api_dev
2017-01-31 14:34:58 -07:00
jrblixt
de9f05f3c5
Update sha256.c function punctuation.
2017-01-31 14:33:21 -07:00
jrblixt
e4942eaa3d
Reorder restore statement.
2017-01-26 17:03:05 -07:00
jrblixt
74f72b5c6b
Jenkins fix.
2017-01-26 13:15:11 -07:00
jrblixt
3ca087e850
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into unitTest_api_dev
2017-01-26 12:48:03 -07:00
jrblixt
79e8bd2f2b
Restore the ssl->hsHashes->hashSha384 before returning on failure.
2017-01-26 12:44:20 -07:00
jrblixt
be768f5395
Made changes in api.c to reflect Update() changes.
2017-01-26 12:34:09 -07:00
Moisés Guimarães
d3d7446a24
removes 3DES from docs
2017-01-21 15:31:26 -02:00
jrblixt
3918cdef03
Wrapped functions.
2017-01-19 13:35:23 -07:00
Moisés Guimarães
a761a7fc64
updates provisioners
2017-01-18 19:19:03 -02:00
Moisés Guimarães
feb6617dc9
updates centos provisioner
2017-01-18 18:41:15 -02:00
Moisés Guimarães
51bf46288b
adds client example
2017-01-18 18:18:19 -02:00
Moisés Guimarães
5c8e69eb5e
updates vagrant configs; updates server example, updates copyright year.
2017-01-18 17:59:48 -02:00
jrblixt
c5bd24c1b7
Added changes Chris requested.
...
Moved error-crypt.h location and corrected FIPS return code.
Made requested changes to printf where 0 == 0.
2017-01-17 13:51:17 -07:00
Moisés Guimarães
bb97e03a44
initial server tests
2017-01-16 19:40:46 -02:00
Moisés Guimarães
089387906e
updates tests
2017-01-16 18:52:34 -02:00
Moisés Guimarães
715d6afeda
updates tox config
2017-01-16 18:48:01 -02:00
Moisés Guimarães
0a9f66338c
adds coverity tests
2017-01-15 12:51:09 -02:00
Moisés Guimarães
2d56f09320
adds accept() behavior to SSLSocket; Migrates tests to pytest.
2017-01-15 12:26:22 -02:00
Moisés Guimarães
56091e267f
moving source code into src
2017-01-12 19:27:36 -02:00
jrblixt
08f188ab44
Merge branch 'master' of https://github.com/wolfSSL/wolfssl into unitTest_api_dev
2017-01-06 11:26:06 -07:00
jrblixt
2c87f8d33c
merge with wolfSSL master.
2017-01-06 11:06:01 -07:00
David Garske
050ba9d6e0
unit test md5, sha, sha256, sha384, sha512
...
Memory leak fix.
2017-01-06 10:57:50 -07:00
David Garske
cb0cc92ff2
Fixes for building with CRL monitor when not linux, OS X or FreeBSD and --enable-distro set. Cleanup of the crl.c HAVE_CRL_MONITOR checks for OS and make sure if StopMonitor preprocessor is defined the function will also be defined.
2017-01-04 15:27:15 -07:00
David Garske
2f3ec778bd
For distro build don't install options.h (conflicts with multi-arch). Fix for BUILD_DISTRO excludes with indent.
2017-01-04 15:27:15 -07:00
David Garske
d3195d0b75
Pulled in patches from Debian package.
2017-01-04 15:27:15 -07:00
Erik M. Bray
e3ec769107
Adds an --enable-aesctr flag to the configure script to explicitly compile with -DWOLFSSL_AES_COUNTER and -DWOLFSSL_AES_DIRECT
...
If --enable-fortress or --enable-mcapi are used they effectively force --enable-aesctr
2016-12-29 21:26:34 +01:00
Moisés Guimarães
53d4c171c8
adds more client tests
2016-12-22 17:58:13 -02:00
Moisés Guimarães
35f03eb00a
fixes docs.
2016-12-22 16:59:50 -02:00
Moisés Guimarães
1c9147a41e
adds supported curves to context; fixes compatibility issues with py27
2016-12-22 15:01:58 -02:00
Moisés Guimarães
9b58ab0211
renames exceptions file
2016-12-22 15:01:58 -02:00
Moisés Guimarães
4b75d11164
fixes socket calls
2016-12-22 15:01:58 -02:00
Moisés Guimarães
f3c1522608
always treat native_object as a pointer
2016-12-22 15:01:58 -02:00
Moisés Guimarães
b9934695fb
pretest version of SSLSocket
2016-12-22 15:01:58 -02:00
Moisés Guimarães
567dfd76b3
adds initial code for SSLSocket
2016-12-22 15:01:58 -02:00
Moisés Guimarães
2cbdd45e8f
adds negotiate() to ssl interface
2016-12-22 15:01:58 -02:00
Moisés Guimarães
07072ef266
moving SSLContext and SSLSocket to __init__ to avoid ciclic includes
2016-12-22 15:01:58 -02:00
Moisés Guimarães
baeba53527
adds wrap_socket to the context
2016-12-22 15:01:58 -02:00
Moisés Guimarães
445e375daa
adds ssl interface to ffi
2016-12-22 15:01:58 -02:00
Moisés Guimarães
52eb0becf0
adds set_ciphers to context
2016-12-22 15:01:58 -02:00
Moisés Guimarães
368f2baf88
adds verify_mode to context
2016-12-22 15:01:58 -02:00
Moisés Guimarães
8eec3cb874
adds initial code for SSLSocket
2016-12-22 15:01:58 -02:00
Moisés Guimarães
0ed0672b16
fixes pylint warnings
2016-12-22 15:01:58 -02:00
Moisés Guimarães
c0b59a585b
adds support for buffered ca certificates
2016-12-22 15:01:58 -02:00
Moisés Guimarães
015ffecbab
fixes unicode quotes and adds load_cert_chain test.
2016-12-22 15:01:58 -02:00
Moisés Guimarães
760ddd14f5
fixes pylint warnings;
...
adds more tests to load_verify_locations;
fixes data type when calling C functions;
fixes result verification when calling C functions.
2016-12-22 15:01:58 -02:00
Moisés Guimarães
7201435f2d
adds initial context tests.
2016-12-22 15:01:58 -02:00
Moisés Guimarães
bd14611879
adds load_verify_locations and load_cert_chain implementations.
2016-12-22 15:01:58 -02:00
Moisés Guimarães
c8ae6abb43
adds context functions.
2016-12-22 15:01:58 -02:00
Moisés Guimarães
e1c01378c7
fixes ssl version in test to maintain backward compatibility.
2016-12-22 15:01:58 -02:00
Moisés Guimarães
20cfbe399c
fixes integer comparison and adds virtual env to ignored files.
2016-12-22 15:01:58 -02:00
Moisés Guimarães
e06b17e170
adds methods and client tests;
...
adds context creation;
adds memory module;
removes init and cleanup functions.
2016-12-22 15:01:58 -02:00
Moisés Guimarães
0df897d4b9
adds methods
2016-12-22 15:01:58 -02:00
Moisés Guimarães
7b884ad72a
removes non-ASCII chars from docs.
2016-12-22 15:01:58 -02:00
Moisés Guimarães
8b0edafef3
adds build_ffI.py
2016-12-22 15:01:58 -02:00
Moisés Guimarães
f4d6890b51
adds basic files and exception classes.
2016-12-22 15:01:58 -02:00