JacobBarthelmeh
fb9b96d498
fix for index increment and change test case expected return values
2022-05-13 14:07:29 -07: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
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
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
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
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
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
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
kaleb-himes
ef89e2e637
Rename utc_str[_buf] -> time_str[_buf] (semantic change)
2022-05-06 08:18:14 -06: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
kaleb-himes
ecf449dfe0
Refactor wolfSSL_ASN1_TIME_adj to use GetUnformattedTimeString (new API)
2022-05-05 16:25:25 -06:00
David Garske
5f539b3921
Improve the sniffer asynchronous test case to support multiple concurrent streams.
2022-05-03 16:43:15 -07: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
Jacob Barthelmeh
38c01b9d9f
fix for infer diff report
2022-04-29 10:34:38 -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
David Garske
277d6dc5dd
Fix minor clang-tidy warnings for async.
2022-04-27 10:22:19 -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
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
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
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
Daniel Pouzzner
e6d267ef16
src/ssl.c wolSSL_DH_new_by_nid(): fix cppcheck nullPointer report.
2022-04-26 09:58:07 -05: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
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
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
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
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
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
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
Hayden Roche
cfab451328
Merge pull request #5024 from dgarske/zd13538
2022-04-20 13:08:13 -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
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
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