Commit Graph

1761 Commits (d30e4ac74fbda54c77ecae678e9cd247a80762ce)

Author SHA1 Message Date
toddouska d30e4ac74f
Merge pull request #2499 from ejohnstown/sniffer-features
Sniffer Features
2019-10-14 15:35:55 -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
Jacob Barthelmeh f2a3da94b6 refactor some openssl extra functions for cryptonly use 2019-10-11 16:40:08 -06:00
kaleb-himes 9c5fd165d0 addressing non RFC compliance in handling of pathLen constraint 2019-10-10 16:45:29 -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 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
Carie Pointer d89f9ddc42 Update X509V3_EXT_print for different extension types 2019-10-09 11:10:27 -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
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 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
toddouska dd9635d8ff
Merge pull request #2469 from embhorn/sk_types
Sk types
2019-10-04 14:44:25 -07: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
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
Aaron Jense 91222bc887 Fix defines that aren't in configure.ac 2019-10-02 09:14:47 -06:00
John Safranek 43476e80d4
Merge pull request #2462 from dgarske/webrtc
Support for Google WebRTC
2019-09-27 14:24:11 -07: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
Aaron Jense bfa20c53b0 Fix defines for HAProxy build 2019-09-27 09:18:27 -06: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
Eric Blankenhorn a1b324f7f8 Adding sk_free support for CONF_VALUE 2019-09-26 11:28:59 -05: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 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
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
David Garske 9d05e9c0b7 Fixes for minor nightly build tests. 2019-09-25 11:07:32 -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
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
Chris Conlon 33a83cdba0
Merge pull request #2436 from miyazakh/Renesas_TSIP_Port
Support renesas tsip
2019-09-19 14:44:33 -06:00
toddouska fd1d65c4f9
Merge pull request #2470 from SparkiDev/build-fixes
Fixes from overnight build failures
2019-09-19 13:38:25 -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 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
Jacob Barthelmeh 3b7b81fea7 add local CheckASNTag function 2019-09-15 23:06:11 -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 a2d3da2831
Merge pull request #2463 from ejohnstown/maintenance-dtls
Maintenance DTLS
2019-09-13 11:53:20 -07:00
John Safranek c27a4b3865 TLS Maintenance
When serializing the WOLFSSL_SESSION, serialize everything.
2019-09-11 16:44:54 -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
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