Commit Graph

1009 Commits (a6851a44af2e6cde31e90f84d236f25e5c944e9b)

Author SHA1 Message Date
JacobBarthelmeh 8b7f588aaf
Merge pull request #3108 from SparkiDev/openssl_interop
Update OpenSSL interopability testing
2020-08-11 09:42:43 -06: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 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
David Garske b25eccb07e
Merge pull request #3203 from tmael/libwebsockets
Enable HAVE_EX_DATA for libwebsockets
2020-08-08 14:34:18 -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
Tesfa Mael 6379ca8e10 libwebsockets requires *CRYPTO_EX_DATA* APIs 2020-08-06 16:29:39 -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
Juliusz Sosinowicz 139a192185 Implement wolfSSL_d2i_X509_NAME 2020-08-06 15:52:11 +02: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
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
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
Chris Conlon c6b4fa3be3 add selftest version for newer 4.1.0 validation 2020-07-29 15:10:47 -06:00
toddouska e84defb268
Merge pull request #3044 from dgarske/sniffer_tls13
TLS v1.3 sniffer support
2020-07-24 11:46:38 -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 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
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
kaleb-himes 308562e853 configure.ac change == to = when not C code 2020-06-24 13:41:03 -06:00
toddouska 48cd6f36ff
Merge pull request #2967 from dgarske/ecc_null
Fixes for ECC key import
2020-06-18 10:10:49 -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
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 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 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 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 23d1550439
Merge pull request #2989 from julek-wolfssl/openvpn
Additional OpenSSL compat layer stuff
2020-06-04 11:57:55 -07:00
Chris Conlon cafcaa4181 enable SNI by default for JNI/JSSE build 2020-06-03 14:24:10 -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
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
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
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
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
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
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
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 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 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 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 ee0289bea6
Merge pull request #2825 from julek-wolfssl/self-include-options
OpenVPN changes
2020-04-13 13:11:18 -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
John Safranek 7a6de91296 Omit -fomit-frame-pointer from CFLAGS. 2020-04-08 14:06:11 -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
Sean Parkinson e17e064ce2 Allow setting of MTU in DTLS 2020-03-18 12:36:11 +10:00
Sean Parkinson 2c6eb7cb39 Add Curve448, X448, Ed448 implementations 2020-02-28 09:30:45 +10: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 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
David Garske 0f188be892
Merge pull request #2805 from ejohnstown/update-config
configure
2020-02-21 09:35:52 -08:00
Jacob Barthelmeh e837894578 add AES-OFB mode 2020-02-20 17:28:32 -06: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
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
Juliusz Sosinowicz ab56d078a4 keygen-moduli passed
Handle trailing newlines in wolfSSL_BN_hex2bn
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
Sean Parkinson 8972bf6278 Add support for P384 curve into SP 2020-02-17 15:46:34 +10:00
Juliusz Sosinowicz 044ad957e5 Add --enable-openvpn build option 2020-01-28 15:29:24 +01: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
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
Carie Pointer 28cf563c76 Fixes from PR review: styling and formatting, remove duplicate code 2020-01-07 17:01:53 -07:00
Chris Conlon 45c5a2d39c update copyright to 2020 2020-01-03 15:06:03 -08:00
Eric Blankenhorn 8580bd9937 CertManager verify callback
Execute verify callback from wolfSSL_CertManagerLoadCA
2019-12-26 09:29:03 -06:00
Jacob Barthelmeh 5675a2b3c5 prepare for release v4.3.0 2019-12-20 08:43:34 -07:00
toddouska f81ce71c25
Merge pull request #2660 from JacobBarthelmeh/Compatibility-Layer
add --disable-errorqueue option
2019-12-17 16:37:02 -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
Jacob Barthelmeh 2e5258fe15 add --disable-errorqueue option 2019-12-11 11:19:58 -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
toddouska e6292eca9c
Merge pull request #2597 from ejohnstown/octeon-global
Sync OCTEON Sniffer
2019-11-18 17:06:30 -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
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
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
Sean Parkinson 5221c082f1 SP now has support for RSA/DH 4096-bit operations 2019-11-12 12:04:06 +10: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
toddouska fca0705a0b
Merge pull request #2526 from aaronjense/libwebsockets-build-fix
libwebsockets build fixes
2019-10-31 13:05:46 -07:00
Tesfa Mael 0b93109b3a throw error when opensslcoexist configured with opensslall or opensslextra 2019-10-23 15:51:19 -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
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 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
Jacob Barthelmeh 1cbc2536cc prepare for release version 4.2.0 2019-10-21 16:32:41 -06: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
Jacob Barthelmeh f2a3da94b6 refactor some openssl extra functions for cryptonly use 2019-10-11 16:40:08 -06: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
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 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
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
Kaleb Himes caa5ba7551
Merge pull request #2411 from ejohnstown/wolfrand
wolfRand
2019-09-30 11:11:18 -06: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
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
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
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
Jacob Barthelmeh 9fd38dc340 build fix for aesccm + devcrypto=cbc + wpas and afalg 2019-08-30 16:15:48 -06: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
David Garske 4ec90be4d6 Added `--enable-hashflags` option. 2019-08-27 13:28:33 -07:00
Juliusz Sosinowicz 37f1522825 Changes to update stunnel support 2019-08-21 16:18:04 -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
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
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 14316f8e24 wolfRand
Refactor the configure.ac script to make adding additional FIPS options
easier.
2019-08-15 16:22:16 -07:00
Jacob Barthelmeh e8e1d35744 build with devcrypto and aesccm 2019-08-13 14:12:45 -06: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
Jacob Barthelmeh 77fda069a8 prepare for release version 4.1.0 2019-07-23 09:27:39 -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
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
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
Sean Parkinson a3e4a2fd6e Fallback SCSV (Signaling Cipher Suite Value) support on Server only 2019-06-28 15:35:56 +10:00
Sean Parkinson 5f9a851adb Add detection of oversized encrypted data and plaintext 2019-06-28 12:01:35 +10: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
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
David Garske 5ea13a09f6 Adds Blake2s support (--enable-blake2s), which provides 32-bit Blake2 support. 2019-05-28 10:30:19 -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
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
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
toddouska 5e343b8e7e
Merge pull request #2201 from dgarske/siglen
Improvements to the maximum ECC signature calculations
2019-05-01 15:42:12 -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
Jacob Barthelmeh 7da46501cc add certgen and certext to jni, add get timeout function 2019-04-18 09:31:01 -06: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
Sean Parkinson 4f75d4eea2 Cortex-M code changed to support IAR compiler 2019-04-08 09:03:50 +10:00
David Garske b0d65d2a3e Remove remnant debug `-Map` from `--with-intelqa` build option. 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
David Garske 50a854c4cf Added `--enable-ecccustcurves=all` option. 2019-03-21 13:01:04 -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 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 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
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 696fe47de2
Merge pull request #2125 from embhorn/zd4297
Decoded cert cache feature
2019-03-12 14:02:47 -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
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
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
Eric Blankenhorn e8c3e8dd63 Decoded cert cache feature 2019-02-28 16:59:19 -06: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
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
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
Sean Parkinson 7822cef1ac Pull out x86_64 ASM into separate files 2019-01-29 13:08:24 +10:00
Jacob Barthelmeh 253915866d make build more modular 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
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
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
David Garske f67b8fa6a3 Experimental SP Cortex M support for Single Precision math. 2019-01-11 14:38:34 -08:00
toddouska 5677e71cba
Merge pull request #1987 from dgarske/32bit
Fixes for `--enable-32bit` option
2019-01-02 11:38:31 -08:00
Jacob Barthelmeh b6d61f2987 prepare for release 3.15.7 2018-12-23 22:18:48 -07: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 986b5d3951
Merge pull request #1988 from JacobBarthelmeh/ARMv8
add -mstrict-align flag with armasm
2018-12-18 15:51:32 -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 f1c62f191d
Merge pull request #1941 from ejohnstown/rekey
Server Side Secure Renegotiation
2018-12-18 15:38:16 -08:00
Jacob Barthelmeh 412966ed80 add -mstrict-align flag with armasm 2018-12-17 17:36:48 -07: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 c23489e6ed Added support for QAT RSA Key Generation. 2018-12-17 12:54:33 -08: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
John Safranek eef48cd8a2 touch version for interstitial release 2018-12-12 11:49:32 -08:00
Sean Parkinson c122f6082f Allow a very small build based on SHA-256 and RSA verify 2018-12-10 08:48:01 +10: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
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
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
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 0452594cf7
Merge pull request #1905 from SparkiDev/sp_thumb
Single Precision: ARM Thumb assembly implementation
2018-11-12 13:16:11 -08:00
Jacob Barthelmeh cd37e3967c prepare for release 3.15.5 2018-11-07 16:08:29 -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 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
David Garske d7249068db Fix for Lighttpd 1.4.49, which requires `HAVE_EX_DATA`. 2018-09-25 15:14:57 -07: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 8a5a03ea35 Support for PKCS#11
Support for RSA, ECDSA and AES-GCM operations.
2018-09-24 08:41:25 +10: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
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
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
Sean Parkinson 4b208f4fe5 Make grouping EarlyData and ClientHello a configuration option 2018-09-03 08:48:28 +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
toddouska 31e37ea5df
Merge pull request #1797 from SparkiDev/stack_size
Small stack usage fixes
2018-08-29 16:19:46 -07:00
Sean Parkinson 4dbe86f1fd Small stack usage fixes
Stack pointer logging added.
2018-08-29 10:16:51 +10: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
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
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 3cdeccc36e Use final TLS 1.3 version value by default. 2018-08-20 14:17:38 +10: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
Eric Blankenhorn 2420af3cf2
Merge pull request #1758 from dgarske/certext
Fix for building certext without certgen
2018-08-14 17:00:51 -05: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 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
toddouska d4f908c372
Merge pull request #1728 from JacobBarthelmeh/HardwareAcc
Add build for AF_ALG
2018-08-13 16:27:51 -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
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
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
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
MJSPollard 543cac65d8 Added boost define and openssl bug fix with WOLFSSL_KEY_GEN 2018-07-27 12:42:09 -06: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 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
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
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
Sean Parkinson 9433fcb820 Allow SHA384 to be compiled in without SHA512 2018-07-20 09:42:01 +10: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 f693c9cc8b
Merge pull request #1692 from SparkiDev/stack_hashalgs
Stack hashalgs
2018-07-17 12:20:02 -07:00
Sean Parkinson befe15ddb9 Add configure option to cache when using small stack 2018-07-17 09:36:49 +10: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