summaryrefslogtreecommitdiff
path: root/lib/libssl/ssl_locl.h
AgeCommit message (Collapse)Author
2016-11-06Remove unused SSLv3 from ssl3_cbc_record_digest_supported().Joel Sing
From Markus Uhlin <markus.uhlin at bredband dot net> ok beck@ bcooK@
2016-11-05Convert ssl3_get_server_kex_ecdhe() to CBS, simplifying tls1_check_curve()Joel Sing
in the process. This also fixes a long standing bug where tls1_ec_curve_id2nid() is called with only one byte of the curve ID. ok beck@ miod@
2016-11-04Rename ssl3_get_key_exchange() to ssl3_get_server_key_exchange(), sinceJoel Sing
that's what it really is. ok miod@
2016-11-04Add an explict list of exported symbols with just the functionsPhilip Guenther
declared in the public headers, and use __{BEGIN,END}_HIDDEN_DECLS in the internal headers to optimize internal functions ok jsing@
2016-11-04Make do_dtls1_write() static to d1_pkt.c and delete declarations forPhilip Guenther
three functions that were removed a while ago ok jsing@
2016-11-03Clean up the TLS handshake digest handling - this refactors some of theJoel Sing
code for improved readability, however it also address two issues. The first of these is a hard-to-hit double free that will occur if EVP_DigestInit_ex() fails. To avoid this and to be more robust, ensure that tls1_digest_cached_records() either completes successfully and sets up all of the necessary digests, or it cleans up and frees everything that was allocated. The second issue is that EVP_DigestUpdate() can fail - detect and handle this in tls1_finish_mac() and change the return type to an int so that a failure can be propagated to the caller (the callers still need to be fixed to handle this, in a later diff). The double-free was reported by Matthew Dillon. ok beck@ doug@ miod@
2016-10-19Remove support for fixed ECDH cipher suites - these is not widely supportedJoel Sing
and more importantly they do not provide PFS (if you want to use ECDH, use ECDHE instead). With input from guenther@. ok deraadt@ guenther@
2016-04-28Implement the IETF ChaCha20-Poly1305 cipher suites.Joel Sing
Rename the existing ChaCha20-Poly1305 cipher suites with an "-OLD" suffix, effectively replaces the original Google implementation. We continue to support both the IETF and Google versions, however the existing names now refer to the ciphers from draft-ietf-tls-chacha20-poly1305-04. Feedback from doug@
2015-09-12Uncopy and unpaste dtls1_send_newsession_ticket() - another 111 lines ofJoel Sing
code deduped.
2015-09-12Move handshake message header length determination into a separateJoel Sing
ssl3_handshake_msg_hdr_len() function. Use this to correct several places that have magic numbers with header lengths hardcoded as '4'. ok beck@
2015-09-12Uncopy and unpaste dtls1_send_certificate_request() - removes another 80Joel Sing
lines of code, while gaining SIGALGs support.
2015-09-12Uncopy and unpaste dtls1_send_server_key_exchange(). Removes another 329Joel Sing
lines of code, while gaining bug fixes and SIGALGs support.
2015-09-12Uncopy and unpaste dtls1_send_server_done().Joel Sing
2015-09-12Uncopy and unpaste dtls1_send_server_hello().Joel Sing
2015-09-12Uncopy and unpaste dtls1_send_hello_request().Joel Sing
2015-09-12Uncopy and unpaste dtls1_send_client_verify() - theJoel Sing
ssl3_send_client_verify() is different, but it correctly supports things like SIGALGS. Another 74 lines of code bites the dust.
2015-09-12Uncopy and unpaste dtls1_send_client_key_exchange() - theJoel Sing
ssl3_send_client_key_exchange() is effectively identical, in fact it has a number of bug fixes and improvements that never got merged into the DTLS copy of the code. Flenses another 264 lines of code. ok beck@
2015-09-11Rename functions that moved to t1_enc.c, with a tls1_ prefix instead of aJoel Sing
ssl3_ prefix. ok beck@
2015-09-11Nuke ssl_set_peer_cert_type().Joel Sing
ok "flensing knife"
2015-09-11Nuke ssl_bad_method().Joel Sing
ok "flensing knife"
2015-09-11Nuke ssl3_default_timeout().Joel Sing
ok "flensing knife"
2015-09-11Nuke ssl_replace_hash().Joel Sing
ok "flensing knife"
2015-09-11Nuke ssl3_cbc_remove_padding().Joel Sing
ok "flensing knife"
2015-09-11Nuke ssl3_alert_code().Joel Sing
ok "flensing knife"
2015-09-11Nuke ssl3_cert_verify_mac() and ssl3_handshake_mac().Joel Sing
We also no longer need the ssl3_pad_1 and ssl3_pad_2 arrays... ok "flensing knife"
2015-09-11Nuke ssl3_final_finish_mac().Joel Sing
ok "flensing knife"
2015-09-11Nuke ssl3_change_cipher_state().Joel Sing
ok "flensing knife"
2015-09-11Nuke ssl3_generate_master_secret().Joel Sing
ok "flensing knife"
2015-09-11Nuke ssl3_setup_key_block() and ssl3_generate_key_block().Joel Sing
ok "flensing knife"
2015-09-11Nuke n_ssl3_mac().Joel Sing
ok "flensing knife"
2015-09-11Nuke ssl3_enc().Joel Sing
ok "flensing knife"
2015-09-11Nuke SSLv3_enc_data.Joel Sing
ok "flensing knife"
2015-09-11Replace dtls1_send_finished() with ssl3_send_finished() - they're nowJoel Sing
both essentially the same (in fact DTLS benefits from improvements previously made to the ssl3_send_finished() function). ok beck@
2015-09-02Replace dtls1_client_hello() with ssl3_client_hello() - both are basicallyJoel Sing
the same code, with two slight differences for DTLS handling. Also, make use of send_cookie to determine if the client random needs to be preserved, rather than testing if it is zeroed (hopefully your random number generator never returned all zeros, since the existing code would break). Inspired by BoringSSL. ok doug@
2015-09-01Remove the ssl_prepare_{client,server}hello_tlsext() functions, which areJoel Sing
now nothing more than noops. ok bcook@ doug@
2015-08-29Now that SSLv3 is going away, TLS_* and SSLv23 are equivalent.Doug Hogan
Remove the TLS method data and tls_any_* functions. Point to SSLv23. ok jsing@
2015-07-24Convert tls1_process_ticket to CBS.Doug Hogan
ok miod@ jsing@
2015-07-19Fix symbol collision with libtls.Doug Hogan
Pointed out by guenther. ok guenther@
2015-07-19Add TLS_method, TLS_client_method and TLS_server_method.Doug Hogan
Use these instead of SSLv23_*method when you want to make sure TLS is used. By default, we disable SSLv3 but it's still possible for the user to re-enable it. TLS_*method does not allow SSLv3. Both BoringSSL and (next version of) OpenSSL have these methods. However, they have changed the implementation significantly. We will as well, but not right now. Riding the libssl major bump. ok miod@ bcook@
2015-07-18Convert dtls1_get_message_header to CBS and change to int.Doug Hogan
Changed return value from void to int. It should never return an error given that the input length is not checked yet. ok miod@
2015-07-17Convert ssl_parse_serverhello_use_srtp_ext to CBS.Doug Hogan
ok miod@ jsing@
2015-07-14Convert ssl_parse_clienthello_use_srtp_ext to CBS.Doug Hogan
ok miod@ jsing@
2015-06-28Convert ssl_bytes_to_cipher_list to CBS.Doug Hogan
Link in the new 'unit' regress and expand the invalid tests to include some that would fail before the CBS conversion. input + ok miod@ jsing@
2015-06-20Convert ssl_parse_serverhello_renegotiate_ext to CBS.Doug Hogan
ok miod@ jsing@
2015-06-20Convert ssl_parse_clienthello_renegotiate_ext to CBS.Doug Hogan
ok miod@, tweak + ok jsing@
2015-06-18Remove Microsoft Server Gated Crypto.Doug Hogan
Another relic due to the old US crypto policy. From OpenSSL commit 63eab8a620944a990ab3985620966ccd9f48d681 and 95275599399e277e71d064790a1f828a99fc661a. ok jsing@ miod@
2015-04-15Clean up the ssl_bytes_to_cipher_list() API - rather than having theJoel Sing
ability to pass or not pass a STACK_OF(SSL_CIPHER) *, which is then either zeroed or if NULL a new one is allocated, always allocate one and return it directly. Inspired by simliar changes in BoringSSL. ok beck@ doug@
2015-03-27Factor out the init_buf initialisation code, rather than duplicating itJoel Sing
in four different places. ok doug@ guenther@
2015-02-22Reluctantly add server-side support for TLS_FALLBACK_SCSV.Joel Sing
This allows for clients that willingly choose to perform a downgrade and attempt to establish a second connection at a lower protocol after the previous attempt unexpectedly failed, to be notified and have the second connection aborted, if the server does in fact support a higher protocol. TLS has perfectly good version negotiation and client-side fallback is dangerous. Despite this, in order to maintain maximum compatability with broken web servers, most mainstream browsers implement this. Furthermore, TLS_FALLBACK_SCSV only works if both the client and server support it and there is effectively no way to tell if this is the case, unless you control both ends. Unfortunately, various auditors and vulnerability scanners (including certain online assessment websites) consider the presence of a not yet standardised feature to be important for security, even if the clients do not perform client-side downgrade or the server only supports current TLS protocols. Diff is loosely based on OpenSSL with some inspiration from BoringSSL. Discussed with beck@ and miod@. ok bcook@
2015-02-12unifdef -m -UOPENSSL_NO_NEXTPROTONEG - NPN is being replaced with ALPN,Joel Sing
however it is not likely to be removed any time soon. ok beck@ miod@