summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s3_clnt.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename s3_{both,clnt,pkt_srvr}.c to have an ssl_ prefix since they are nojsing2017-01-261-2795/+0
| | | | | | longer SSLv3 code. ok beck@
* Merge the client/server version negotiation into the existing (currentlyjsing2017-01-261-3/+33
| | | | | | fixed version) client/server code. ok beck@
* BUF_MEM_free(), X509_STORE_free() and X509_VERIFY_PARAM_free() all checkjsing2017-01-241-5/+3
| | | | for NULL, as does lh_free() - do not do the same from the caller.
* sk_free() checks for NULL so do not bother doing it from the callers.jsing2017-01-241-1/+2
|
* sk_pop_free() checks for NULL so do not bother doing it from the callers.jsing2017-01-241-5/+3
|
* ssl_sess_cert_free() checks for NULL, so do not bother doing it at thejsing2017-01-241-3/+2
| | | | call sites.
* Split most of SSL_METHOD out into an internal variant, which is opaque.jsing2017-01-231-20/+20
| | | | Discussed with beck@
* send state and rstate from ssl_st into internal. There are accessorsbeck2017-01-231-53/+53
| | | | | so these should not be diddled with directly ok jsing@
* Move a large part of ssl_st into internal, so we can see what squeals.beck2017-01-231-58/+58
| | | | ok jsing@
* Move most of the fields in SSL_CTX to internal - the ones that remain arejsing2017-01-231-7/+7
| | | | | | known to be in use. ok beck@
* move the callbacks from ssl_st to internalbeck2017-01-231-9/+9
| | | | ok jsing@
* Move callback function pointers and argument pointers from SSL_CTX tojsing2017-01-231-7/+8
| | | | | | internal. ok beck@
* Move not_resumable and sess_cert from SSL_SESSION to internal.jsing2017-01-231-19/+19
| | | | ok beck@
* Move the stats struct from SSL_CTX to internal.jsing2017-01-231-5/+5
| | | | ok beck@
* Move most of the SSL3_STATE fields to internal - the ones that remain arejsing2017-01-221-56/+56
| | | | | | known to be used by ports. ok beck@
* Move most of DTLS1_STATE to internal.beck2017-01-221-7/+7
| | | | ok jsing@
* Move ALPN and NPN fields from SSL/SSL_CTX to internal.jsing2017-01-221-3/+3
| | | | ok beck@
* Restore two frees that were unintentionally lost during recent refactoring.jsing2016-12-261-1/+4
|
* Pacify compiler warning about an unitialized variable which is obviouslyderaadt2016-12-211-3/+3
| | | | | not really being used. ok beck.
* Add support for ECDHE with X25519.jsing2016-12-211-80/+180
| | | | | | Testing of an earlier revision by naddy@. ok beck@
* Convert ssl3_get_server_hello() to CBS.jsing2016-12-181-53/+61
| | | | ok doug@
* Complete the CBB conversion and cleanup of send_client_key_exchange().jsing2016-12-131-42/+12
| | | | ok doug@
* Convert ssl3_send_client_kex_gost() to CBB.jsing2016-12-131-17/+19
| | | | ok doug@
* Convert ssl3_send_client_kex_ecdhe() to CBB. Also check the return value ofjsing2016-12-131-34/+35
| | | | | | the EC_POINT_point2oct() calls. Feedback from and ok doug@
* Convert ssl3_send_client_kex_dhe() to CBB.jsing2016-12-071-14/+23
| | | | ok doug@
* Convert ssl3_send_client_kex_rsa() to CBB.jsing2016-12-061-14/+36
| | | | ok doug@
* Convert certificate handshake message generation to CBB, with some cleanjsing2016-12-061-9/+22
| | | | | | | | | | up and restructure. This also adds CBB based variants of the ssl3_handshake_msg_{start,finish} functions - for the time being these use a CBB to build the messages, then copy back into the init_buf. ok doug@
* Convert ssl_cipher_list_to_bytes() to CBB, changing the function to returnjsing2016-12-041-7/+10
| | | | | | | the number of bytes written via an explicit *outlen argument and retaining the return value to indicate success or failure. ok doug@
* Cleanup some of ssl3_send_client_kex_rsa() - tmp_buf is really thejsing2016-12-041-10/+12
| | | | | | | | premaster secret, so name it accordingly. Also, remove bogus assignment of master_key_length - the correct value is assigned when the master_key is set. ok beck@ doug@
* Address a potential leak in ssl3_get_server_kex_ecdhe() - if we allocatejsing2016-12-031-3/+4
| | | | | | | ngroup and the following EC_KEY_set_group() fails, ngroup will not be freed. Avoid this by freeing on return. ok millert@
* Avoid signed vs unsigned warnings from clang by adding two casts,jsing2016-12-031-2/+2
| | | | | | slightly rewriting some code and changing the type of an array. ok bcook@ doug@
* remove unused variablebcook2016-11-061-6/+3
|
* Convert ssl3_get_server_kex_ecdhe() to CBS, simplifying tls1_check_curve()jsing2016-11-051-42/+33
| | | | | | | 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@
* Rename ssl3_get_key_exchange() to ssl3_get_server_key_exchange(), sincejsing2016-11-041-3/+3
| | | | | | that's what it really is. ok miod@
* Tidy up the usage of peer_ecdh_tmp, following the fixed ECDH removal.jsing2016-11-041-13/+5
| | | | ok beck@
* Convert ssl3_get_server_kex_dhe() to CBS.jsing2016-11-041-42/+19
| | | | ok beck@
* Split ssl3_get_key_exchange() into separate functions for DHE/ECDHE.jsing2016-11-031-205/+256
| | | | ok beck@ (who was struggling to keep lunch down while reviewing the diff)
* Remove support for fixed ECDH cipher suites - these is not widely supportedjsing2016-10-191-14/+5
| | | | | | | | | and more importantly they do not provide PFS (if you want to use ECDH, use ECDHE instead). With input from guenther@. ok deraadt@ guenther@
* Merge a memleak fix from BoringSSL 6b6e0b2:mmcc2016-03-271-1/+3
| | | | | | https://boringssl.googlesource.com/boringssl/+/6b6e0b20893e2be0e68af605a60ffa2cbb0ffa64%5E!/#F0 ok millert@, beck@
* X509_free(3) is NULL-safe, so remove NULL checks before its calls.mmcc2016-03-111-7/+4
| | | | ok doug@
* s/ssl3_client_kex/ssl3_send_client_kex/ for consistency with the caller.jsing2015-10-021-9/+11
|
* Stop generating private keys in a network buffer.jsing2015-09-131-29/+29
| | | | | | | | | | The current client key exchange code generates DH and ECDH keys into the same buffer that we use to send data to the network - stop doing this and malloc() a new buffer, which we explicit_bzero() and free() on return. This also benefits from ASLR and means that the keys are no longer generated in a well known location. ok beck@
* Use ECDH_size() instead of rolling our own.jsing2015-09-131-6/+5
| | | | ok beck@
* Split ssl3_send_client_key_exchange() (387 lines of code) into fivejsing2015-09-121-327/+351
| | | | | | | | | functions. The original was written as a huge if/else if chain - split out the handling for each key exchange type. This allows us to reduce two levels of indentation, make the code far more readable and have single return paths so that we can simplify clean up. ok beck@
* explicit_bzero() the GOST premaster secret.jsing2015-09-121-2/+7
| | | | ok miod@
* Remove most of the SSLv3 version checks and a few TLS v1.0.doug2015-09-121-39/+21
| | | | | | | We can now assume >= TLS v1.0 since SSL2_VERSION, SSL3_VERSION and DTLS1_BAD_VER support was removed. "reads ok" miod@
* Use explicit_bzero() instead of memset() when clearing private keys.jsing2015-09-121-3/+4
| | | | ok bcook@ beck@ miod@
* Pull variable assignment out from function call, fix indentation and setjsing2015-09-121-8/+7
| | | | state after calling ssl3_handshake_msg_finish().
* style(9) and whitespace cleanups.jsing2015-09-121-29/+25
|
* Rename functions that moved to t1_enc.c, with a tls1_ prefix instead of ajsing2015-09-111-7/+7
| | | | | | ssl3_ prefix. ok beck@