summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/recallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-05-07Add a (currently failing) call to tls_handshake() on a client context thatjsing1-1/+8
has not yet been connected. We expect this to fail, but it should fail gracefully.
2017-05-07Also test calling tls_handshake() on a server connection context that hasjsing1-1/+7
already completed a TLS handshake.
2017-05-07Return an error if tls_handshake() is called on a TLS context that hasjsing1-1/+6
already completed a TLS handshake.
2017-05-07Add a test that calls tls_handshake() on a connection that has alreadyjsing1-1/+7
completed a TLS handshake. This should return a failure, but currently succeeds (hence the regress currently fails).
2017-05-07An an initial sequencing/ordering test for libtls.jsing1-1/+61
2017-05-06Split TLS client/server handshake and close code into separate functionsjsing1-4/+27
so that it can be reused.
2017-05-06Bring in an SSL_HANDSHAKE structure and commence the great shovellingbeck12-115/+121
ok jsing@, gcc@, regress@
2017-05-06Move TLS test code into a function that is called from main, making itjsing2-17/+33
easier for new tests to be added.
2017-05-06Free tls_configs earlier now that we have refcounting.jsing1-4/+4
2017-05-06Use freezero() for the tls_load_file() failure case, since we'rejsing1-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.
2017-05-06BIO_free_all() and EVP_PKEY_free() can be called with NULL.jsing1-5/+3
2017-05-06Add more functions.jsing1-1/+5
2017-05-06Sort/group functions.jsing1-5/+10
2017-05-06Not much point using a failed variable here.jsing1-3/+4
2017-05-06Be explicit about when it is safe to call tls_config_free().jsing1-3/+8
Discussed with beck@
2017-05-06Document tls_unload_file().jsing1-3/+14
2017-05-06Perform reference counting for tls_config. This allows tls_config_free() tojsing4-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@
2017-05-06Provide a tls_unload_file() function, that frees the memory returned fromjsing3-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@
2017-05-06Bring in HKDF, from BoringSSL, with regress tests modified to bebeck6-2/+496
in C. Ride previous minor bump ok tom@ inoguchi@ jsing@
2017-05-06Add regress coverage for SSL{,_CTX}_set_{min,max}_proto_version().jsing1-12/+304
2017-05-06Provide SSL{,_CTX}_set_{min,max}_proto_version() functions.jsing6-5/+115
Rides minor bump. ok beck@
2017-05-06space needed between macro arg and punctuation;jmc1-2/+2
2017-05-06Bump minors for symbol addition in libcryptobeck3-3/+3
ok jsing@
2017-05-06Add ASN1_TIME_set_to to exported symbolsbeck1-0/+4
ok jsing@
2017-05-06Add ASN1_TIME_set_tm to set an asn1 from a struct tm *beck3-5/+44
ok jsing@
2017-05-06Add missing $OpenBSD$ tags.jsing4-2/+4
2017-05-04Fix the ca command so that certs it generates have RFC5280 conformant time.beck1-16/+56
Problem noticed by Harald Dunkel <harald.dunkel@aixigo.de>
2017-05-04Move tls_config_skip_private_key_check() out from under HIDDEN_DECLS.claudio1-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@
2017-05-03make the description strings match the codederaadt1-10/+10
2017-05-02the XXXfree functions being called accept NULL, so don't check first.deraadt3-26/+14
ok beck
2017-05-02Add regress for free functions that should be safe with NULLbeck2-0/+63
2017-05-02use freezero() instead of memset/explicit_bzero + free. Substantiallyderaadt38-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
2017-04-30No original OpenSSL code remains in this file. Relicensebeck1-54/+13
2017-04-30whitespacebeck1-3/+3
2017-04-30Make BIO_get_host_ip just yet another getaddrinfo wrapperbeck1-27/+20
2017-04-30Rework BIO_accept to be more like modern code.beck1-54/+19
ok jsing@
2017-04-30Only enable -Werror on libcrypto/libssl/libtls if we are building withjsing3-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@
2017-04-30Switch back to freezero() and explicitly initialise data_len to zero. Thejsing1-6/+3
previous code was safe since data would always be NULL if data_len was uninitialised, however compilers cannot know this.
2017-04-30Microsoft Windows hates BIO_get_accept_socket in portable. Fix it tobeck1-115/+35
not be awful or have any claims on supporting ipv6 when it does so very badly ok jsing@
2017-04-30Add missing tls_init() and tls_free() calls.jsing1-1/+4
2017-04-30Add a tls_keypair_clear_key() function that uses freezero() to make keyjsing1-5/+11
material inaccessible, then call it from the appropriate places. ok beck@
2017-04-29Fix a bug caused by the return value being set early to signal successfuljsing1-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@
2017-04-29Revert previous - we still want to do this, but I forgot about the installerbeck2-14/+6
and want to avoid the wrath of theo when he arrives home in a couple of hours :)
2017-04-29We now require you to have a working libpthreadbeck1-1/+2
2017-04-29Make it safe to call SSL_library_init more than once.beck1-5/+12
We are basically admitting that pthread is everywhere, and we will be using it for other things too. ok jsing@
2017-04-29Stop calling OPENSSL_init() internally, since it is a no-op. Also placejsing3-9/+4
it under #ifndef LIBRESSL_INTERNAL. ok beck@
2017-04-29Switch Linux getrandom() usage to non-blocking mode, continuing tobeck1-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@
2017-04-28Revert previous change that forced consistency between return value andbeck1-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)
2017-04-28revert previous accidental commitbeck5-25/+46
2017-04-28*** empty log message ***beck5-46/+25