summaryrefslogtreecommitdiff
path: root/lib/libssl/d1_srvr.c
AgeCommit message (Collapse)Author
2018-11-05Consolidate all of the SSL method structs/functions into a single file.Joel Sing
Discussed with tb@
2018-08-30Nuke ssl_pending/ssl_shutdown function pointers.Joel Sing
ssl3_pending() is used for all protocols and dtls1_shutdown() just calls ssl3_shutdown(), so just call the appropriate function directly instead. ok beck@ inoguchi@ tb@
2018-08-24Clean up handshake message start/finish functions.Joel Sing
Now that all handshake messages are created using CBB, remove the non-CBB ssl3_handshake_msg_start()/ssl3_handshake_msg_finish() functions. Rename the CBB variants by dropping the _cbb suffix. ok bcook@ inoguchi@ tb@
2018-04-07Remove function pointers for ssl_{read,write,peek}.Joel Sing
Now that everything goes through the same code path, we can remove a layer of indirection and just call ssl3_{read,write,peek} directly. ok beck@ inoguchi@
2017-10-12Fold dtls1_accept() into ssl_accept(), removing a lot of duplicated code.Joel Sing
With review/feedback from inoguchi@
2017-10-08Reduce non-functional differences between dtls1_accept() andJoel Sing
ssl3_accept() - synchronise comments, whitespace, line wrapping, etc.
2017-10-08Convert ssl3_send_change_cipher_spec() to use CBB and make it handle DTLS,Joel Sing
which allows us to drop dtls1_send_change_cipher_spec() entirely. ok inoguchi@
2017-05-07Move state from ssl->internal to the handshake structure.Bob Beck
while we are at it, convert SSLerror to use a function internally, so that we may later allocate the handshake structure and check for it ok jsing@
2017-05-06Bring in an SSL_HANDSHAKE structure and commence the great shovellingBob Beck
ok jsing@, gcc@, regress@
2017-03-10Remove the handshake digests and related code, replacing remaining usesJoel Sing
with the handshake hash. For now tls1_digest_cached_records() is retained to release the handshake buffer. ok beck@ inoguchi@
2017-03-05Convert various handshake message generation functions to CBB.Joel Sing
ok beck@ inoguchi@
2017-02-07Change SSLerror() back to taking two args, with the first one being an SSL *.Bob Beck
Make a table of "function codes" which maps the internal state of the SSL * to something like a useful name so in a typical error in the connection you know in what sort of place in the handshake things happened. (instead of by arcane function name). Add SSLerrorx() for when we don't have an SSL * ok jsing@ after us both being prodded by bluhm@ to make it not terrible
2017-01-26Finish the fallout of the SSLerr->SSLerror cleanup to get rid of the uglyBob Beck
line wraps that resulted
2017-01-26Send the error function codes to rot in the depths of hell where they belongBob Beck
We leave a single funciton code (0xFFF) to say "SSL_internal" so the public API will not break, and we replace all internal use of the two argument SSL_err() with the internal only SSL_error() that only takes a reason code. ok jsing@
2017-01-26Remove most of SSL3_ENC_METHOD - we can just inline the function callsJoel Sing
and defines since they are the same everywhere. ok beck@
2017-01-26Merge the client/server version negotiation into the existing (currentlyJoel Sing
fixed version) client/server code. ok beck@
2017-01-23Split most of SSL_METHOD out into an internal variant, which is opaque.Joel Sing
Discussed with beck@
2017-01-23Remove ssl_ctrl, ssl_ctx_ctrl, ssl_callback_ctrl and ssl_ctx_callback_ctrlJoel Sing
from SSL_METHOD, replacing usage with direct calls to the appropriate functions. ok beck@
2017-01-23send state and rstate from ssl_st into internal. There are accessorsBob Beck
so these should not be diddled with directly ok jsing@
2017-01-23Move a large part of ssl_st into internal, so we can see what squeals.Bob Beck
ok jsing@
2017-01-23move the callbacks from ssl_st to internalBob Beck
ok jsing@
2017-01-23Move callback function pointers and argument pointers from SSL_CTX toJoel Sing
internal. ok beck@
2017-01-23Move the stats struct from SSL_CTX to internal.Joel Sing
ok beck@
2017-01-22Move most of the SSL3_STATE fields to internal - the ones that remain areJoel Sing
known to be used by ports. ok beck@
2017-01-22Move most of DTLS1_STATE to internal.Bob Beck
ok jsing@
2017-01-21Specify minimum and maximum protocol version for each method. This isJoel Sing
currently unused, but will be in the near future. ok beck@
2016-12-06Now that ssl3_send_{client,server}_certificate() are using the commonJoel Sing
handshake functions, we can remove more copied code from DTLS.
2016-11-04The *_method_data structures can be staticPhilip Guenther
ok jsing@
2015-09-13The *_accept() functions increment in_handshake at the start of the function,Joel Sing
then decrement it and call a callback on exit from the function. As such, these functions should not return in the middle, otherwise in_handshake is never decremented and the callback never called. ok beck@ "with many sighs" miod@
2015-09-12Fix function name.Joel Sing
2015-09-12Sync handling of cached record digests with s3_srvr.c.Joel Sing
2015-09-12Uncopy and unpaste dtls1_send_newsession_ticket() - another 111 lines ofJoel Sing
code deduped.
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-11Rename functions that moved to t1_enc.c, with a tls1_ prefix instead of aJoel Sing
ssl3_ prefix. ok beck@
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-10Remove support for DTLS_BAD_VER. We do not support non-standard andJoel Sing
incomplete implementations just so that we can interoperate with products from vendors who have not bothered to fix things in the last ~10 years. ok bcook@ miod@
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-06-18Change DTLS client cert request code to match TLS.Doug Hogan
DTLS currently doesn't check whether a client cert is expected. This change makes the logic in dtls1_accept() match that from ssl3_accept(). From OpenSSL commit c8d710dc5f83d69d802f941a4cc5895eb5fe3d65 input + ok jsing@ miod@
2015-06-15Remove ancient SSL_OP_NETSCAPE_CA_DN_BUG from SSLeay days.Doug Hogan
This commit matches the OpenSSL removal in commit 3c33c6f6b10864355553961e638514a6d1bb00f6. ok deraadt@
2015-06-13Fix bad indenting in LibreSSL.Doug Hogan
jsg@ noticed that some of the lines in libssl and libcrypto are not indented properly. At a quick glance, it looks like it has a different control flow than it really does. I checked the history in our tree and in OpenSSL to make sure these were simple mistakes. ok miod@ jsing@
2015-05-15Fix return paths with missing EVP_CIPHER_CTX_cleanup() calls.Jonathan Gray
ok doug@
2015-03-27Factor out the init_buf initialisation code, rather than duplicating itJoel Sing
in four different places. ok doug@ guenther@
2015-02-09Jettison DTLS over SCTP.Joel Sing
OpenBSD does not have SCTP support and it sees little use in the wild. OPENSSL_NO_SCTP is already specified via opensslfeatures.h, hence this is a code removal only and symbols should remain unchanged. ok beck@ miod@ tedu@
2015-02-07Convert several of the server side handshake functions to the new handshakeJoel Sing
message handling routines. ok miod@
2015-02-06Bring back the horrible API that is get_cipher_by_char/put_cipher_by_char.Joel Sing
This API was intended to be an internal only, however like many things in OpenSSL, it is exposed externally and parts of the software ecosystem are now using it since there is no real alternative within the public API. ok doug@, tedu@ and reluctantly miod@
2014-12-15Add error handling for EVP_DigestInit_ex().Doug Hogan
A few EVP_DigestInit_ex() calls were left alone since reporting an error would change the public API. Changed internal ssl3_cbc_digest_record() to return a value due to the above change. It will also now set md_out_size=0 on failure. This is based on part of BoringSSL's commit to fix malloc crashes: https://boringssl.googlesource.com/boringssl/+/69a01608f33ab6fe2c3485d94aef1fe9eacf5364 ok miod@