summaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add a test that calls tls_handshake() on a connection that has alreadyjsing2017-05-071-1/+7
| | | | | completed a TLS handshake. This should return a failure, but currently succeeds (hence the regress currently fails).
* An an initial sequencing/ordering test for libtls.jsing2017-05-071-1/+61
|
* Split TLS client/server handshake and close code into separate functionsjsing2017-05-061-4/+27
| | | | so that it can be reused.
* Bring in an SSL_HANDSHAKE structure and commence the great shovellingbeck2017-05-0612-115/+121
| | | | ok jsing@, gcc@, regress@
* Move TLS test code into a function that is called from main, making itjsing2017-05-062-17/+33
| | | | easier for new tests to be added.
* Free tls_configs earlier now that we have refcounting.jsing2017-05-061-4/+4
|
* Use freezero() for the tls_load_file() failure case, since we'rejsing2017-05-061-4/+4
| | | | | | potentially dealing with key material. Also switch a calloc to malloc, since we immediately copy the same amount of data to the newly allocated buffer.
* BIO_free_all() and EVP_PKEY_free() can be called with NULL.jsing2017-05-061-5/+3
|
* Add more functions.jsing2017-05-061-1/+5
|
* Sort/group functions.jsing2017-05-061-5/+10
|
* Not much point using a failed variable here.jsing2017-05-061-3/+4
|
* Be explicit about when it is safe to call tls_config_free().jsing2017-05-061-3/+8
| | | | Discussed with beck@
* Document tls_unload_file().jsing2017-05-061-3/+14
|
* Perform reference counting for tls_config. This allows tls_config_free() tojsing2017-05-064-6/+22
| | | | | | | | | be called as soon as it has been passed to the final tls_configure() call, simplifying lifetime tracking for the application. Requested some time ago by tedu@. ok beck@
* Provide a tls_unload_file() function, that frees the memory returned fromjsing2017-05-063-2/+10
| | | | | | | | a tls_load_file() call, ensuring that it the contents become inaccessible. This is specifically needed on platforms where the library allocators may be different from the application allocator. ok beck@
* Bring in HKDF, from BoringSSL, with regress tests modified to bebeck2017-05-066-2/+496
| | | | | in C. Ride previous minor bump ok tom@ inoguchi@ jsing@
* Add regress coverage for SSL{,_CTX}_set_{min,max}_proto_version().jsing2017-05-061-12/+304
|
* Provide SSL{,_CTX}_set_{min,max}_proto_version() functions.jsing2017-05-066-5/+115
| | | | | | Rides minor bump. ok beck@
* space needed between macro arg and punctuation;jmc2017-05-061-2/+2
|
* Bump minors for symbol addition in libcryptobeck2017-05-063-3/+3
| | | | ok jsing@
* Add ASN1_TIME_set_to to exported symbolsbeck2017-05-061-0/+4
| | | | ok jsing@
* Add ASN1_TIME_set_tm to set an asn1 from a struct tm *beck2017-05-063-5/+44
| | | | ok jsing@
* Add missing $OpenBSD$ tags.jsing2017-05-064-2/+4
|
* Fix the ca command so that certs it generates have RFC5280 conformant time.beck2017-05-041-16/+56
| | | | Problem noticed by Harald Dunkel <harald.dunkel@aixigo.de>
* Move tls_config_skip_private_key_check() out from under HIDDEN_DECLS.claudio2017-05-041-2/+4
| | | | | | Even though this is not a real public interface we need the symbol in the shared library so that relayd can use it (needed for TLS key privsep) OK beck@
* make the description strings match the codederaadt2017-05-031-10/+10
|
* the XXXfree functions being called accept NULL, so don't check first.deraadt2017-05-023-26/+14
| | | | ok beck
* Add regress for free functions that should be safe with NULLbeck2017-05-022-0/+63
|
* use freezero() instead of memset/explicit_bzero + free. Substantiallyderaadt2017-05-0238-238/+109
| | | | | | | | | | reduces conditional logic (-218, +82). MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH cache alignment calculation bn/bn_exp.c wasn'tt quite right. Two other tricky bits with ASN1_STRING_FLAG_NDEF and BN_FLG_STATIC_DATA where the condition cannot be collapsed completely. Passes regress. ok beck
* No original OpenSSL code remains in this file. Relicensebeck2017-04-301-54/+13
|
* whitespacebeck2017-04-301-3/+3
|
* Make BIO_get_host_ip just yet another getaddrinfo wrapperbeck2017-04-301-27/+20
|
* Rework BIO_accept to be more like modern code.beck2017-04-301-54/+19
| | | | ok jsing@
* Only enable -Werror on libcrypto/libssl/libtls if we are building withjsing2017-04-303-7/+14
| | | | | | | gcc4. This should avoid failed builds while transitioning compilers. While here also make the CFLAGS blocks consistent across makefiles. Discussed with deraadt@, ok beck@
* Switch back to freezero() and explicitly initialise data_len to zero. Thejsing2017-04-301-6/+3
| | | | | previous code was safe since data would always be NULL if data_len was uninitialised, however compilers cannot know this.
* Microsoft Windows hates BIO_get_accept_socket in portable. Fix it tobeck2017-04-301-115/+35
| | | | | | not be awful or have any claims on supporting ipv6 when it does so very badly ok jsing@
* Add missing tls_init() and tls_free() calls.jsing2017-04-301-1/+4
|
* Add a tls_keypair_clear_key() function that uses freezero() to make keyjsing2017-04-301-5/+11
| | | | | | material inaccessible, then call it from the appropriate places. ok beck@
* Fix a bug caused by the return value being set early to signal successfuljsing2017-04-291-5/+5
| | | | | | | | | | | | | | | DTLS cookie validation. This can mask a later failure and result in a positive return value being returned from ssl3_get_client_hello(), when it should return a negative value to propagate the error. Ironically this was introduced in OpenSSL 2e9802b7a7b with the commit message "Fix DTLS cookie management bugs". Fix based on OpenSSL. Issue reported by Nicolas Bouliane <nbouliane at jive dot com>. ok beck@
* Revert previous - we still want to do this, but I forgot about the installerbeck2017-04-292-14/+6
| | | | | and want to avoid the wrath of theo when he arrives home in a couple of hours :)
* We now require you to have a working libpthreadbeck2017-04-291-1/+2
|
* Make it safe to call SSL_library_init more than once.beck2017-04-291-5/+12
| | | | | | We are basically admitting that pthread is everywhere, and we will be using it for other things too. ok jsing@
* Stop calling OPENSSL_init() internally, since it is a no-op. Also placejsing2017-04-293-9/+4
| | | | | | it under #ifndef LIBRESSL_INTERNAL. ok beck@
* Switch Linux getrandom() usage to non-blocking mode, continuing tobeck2017-04-291-6/+9
| | | | | | | | | | use fallback mechanims if unsuccessful. The design of Linux getrandom is broken. It has an uninitialized phase coupled with blocking behaviour, which is unacceptable from within a library at boot time without possible recovery. ok deraadt@ jsing@
* Revert previous change that forced consistency between return value andbeck2017-04-281-10/+2
| | | | | | | error code, since this breaks the documented API. Under certain circumstances this will result in incorrect successful certiticate verification (where a user supplied callback always returns 1, and later code checks the error code to potentially abort post verification)
* revert previous accidental commitbeck2017-04-285-25/+46
|
* *** empty log message ***beck2017-04-285-46/+25
|
* Remove "len < 0" check; len is socklen_t (uint32_t) so can't bemillert2017-04-271-2/+2
| | | | negative. Quiets a warning from clang. OK bluhm@
* tls_free(3) and tls_config_free(3) accept NULL;schwarze2017-04-272-4/+14
| | | | | patch from Matthew Martin <phy1729 at gmail dot com>, slightly tweaked by me
* Rearrange text a bit to make it clear what "discarded" means; ok jmc@ deraadt@otto2017-04-231-8/+13
|