Commit Graph

1547 Commits (dc7ae37f7a39cde7b38467148ce5a3788adc2e11)

Author SHA1 Message Date
Hayden Roche dc7ae37f7a Make changes to support port of NTP from OpenSSL to wolfSSL. 2021-08-02 13:33:18 -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
TakayukiMatsuo 0dc98b8299 Add support for EVP_shake128/256 2021-08-02 13:00:31 +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 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 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
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
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
David Garske a92f03a11e Fixes for building with Microchip XC32 and ATECC. 2021-07-27 08:20:20 -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
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
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
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
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 10168e093a Rebase fixes 2021-07-23 18:14:54 +02:00
Juliusz Sosinowicz 142ff6d885 Bind 9.11.22 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
Sean Parkinson 94373781b2 C++ fix: cast from void* to X509_OBJECT* 2021-07-23 14:56:38 +10:00
Hayden Roche ec180f3901 Use correct DES IV size when using FIPS v2. 2021-07-22 18:17:41 -07: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 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
Hideki Miyazaki b76d44dad9
add ERR_lib_error_string 2021-07-21 10:31:00 +09: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
David Garske 762b384be2 Fixes for `-pedantic` errors. 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
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
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 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 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
Lealem Amedie 73323e694f Addressing possible leaks in ssl.c and api.c 2021-07-16 09:48:06 -06: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 18399091ce
Merge pull request #4012 from julek-wolfssl/haproxy
HaProxy 2.4-dev18 support
2021-07-14 15:46:04 +07:00
Jacob Barthelmeh 2592a04d8a fix for build with wpas and disable tls13 2021-07-13 15:49:40 +07:00
JacobBarthelmeh c01a63508a account for testing on big endian system 2021-07-09 08:18:39 -06: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
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
Juliusz Sosinowicz 1acf906612 Code review changes 2021-07-06 15:39:23 +02:00