4242 Commits

Author SHA1 Message Date
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
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
toddouska
cf8459e518
Merge pull request #2892 from SparkiDev/cppcheck_fixes_4
Fixes from cppcheck
2020-04-09 16:01:11 -07: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
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
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
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
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
c0dc3091e1 GNU TLS server sends empty CSR extension 2020-04-03 16:03:41 +10: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
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
3f7ce61dbd Updates from review 2020-04-01 11:14:25 -05: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
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
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
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
Tesfa Mael
452b4c03a6 Fix memory leak 2020-03-12 23:24:44 -07: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 2db62f744ab72df4e00c89093c034616b53b4184.
2020-03-09 17:45:15 +01:00
toddouska
ab8bfc241d
Merge pull request #2833 from JacobBarthelmeh/Compatibility-Layer
compile for NO_WOLFSSL_STUB
2020-03-06 11:04:36 -08: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
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