|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| | ok deraadt@ | 
| | |  | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | that we will pass the result through tls_ssl_error() on failure. Otherwise
we can end up reporting spurious errors due to their being unrelated errors
already on the error stack.
Spotted by Marko Kreen.
ok beck@ | 
| | 
| 
| 
| | ok jsing@ | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | tls_accept/tls_connect functions can be guaranteed to succeed or fail and
will no longer return TLS_READ_AGAIN/TLS_WRITE_AGAIN. This also resolves
the semantics of tls_accept_*.
The tls_handshake() function now does I/O and can return
TLS_READ_AGAIN/TLS_WRITE_AGAIN. Calls to tls_read() and tls_write() will
trigger the handshake if it has not already completed, meaning that in many
cases existing code will continue to work.
Discussed over many coffees at l2k15.
ok beck@ bluhm@ | 
| | 
| 
| 
| | Requested by bluhm@ | 
| | 
| 
| 
| 
| | ride upcoming minor bump
ok jsing@ | 
| | 
| 
| 
| 
| 
| | passed a socket then the caller is responsible for closing it.
ok bcook@ | 
| | 
| 
| 
| 
| 
| | not a HTTPS library.
ok beck@ | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | The tls_set_error() function previously stored the errno but did nothing
with it. Change tls_set_error() to append the strerror(3) of the stored
errno so that we include useful information regarding failures.
Provide a tls_set_errorx() function that does not store the errno or
include strerror(3) in the error message. Call this function instead of
tls_set_error() for errors where the errno value has no useful meaning.
With feedback from and ok doug@ | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | ensure that the temporary state flags get cleared in tls_reset(). Fixes a
bug spotted by Marko Kreen whereby TLS_CONNECTING could remain on reset.
While here, also move the TLS_STATE_CONNECTING check to after the
TLS_CLIENT check - if TLS_STATE_CONNECTING was ever set on any other
context type it would allow a bypass.
ok bluhm@ | 
| | 
| 
| 
| 
| | around CRYPTO_set_ex_data(), which can fail. Since this is the case, check
the return value of CRYPTO_set_ex_data^WSSL_set_ex_data^WSSL_set_app_data. | 
| | 
| 
| 
| 
| 
| | data (as is already done for server connections).
From Marko Kreen. | 
| | 
| 
| 
| 
| 
| 
| | for the server, rather than on the context for the connection. This makes
more sense than the current behaviour does.
Issue reported by Tim van der Molen. | 
| | 
| 
| 
| | repeated use of tls_connect.  ok jsing | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | as tls_connect(), however allows the name to use for verification to be
explicitly provided, rather than being inferred from the host value.
Requested by reyk@
ok reyk@ tedu@ | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | to an actual host and use "servername" when referring to the name of the
TLS server that we expect to be indentified in the server certificate.
Likewise, rename verify_host to verify_name and use the term "name"
throughout the verification code (rather than host or hostname).
Requested by and ok tedu@ | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | IPv4 or IPv6 address before trying to resolve the address with the
AI_ADDRCONFIG flag set.  This makes sure that attempts to connect to
numeric IPs or loopback addresses are always possible and not
prevented by AI_ADDRCONFIG.
OK jsing@ tedu@ | 
| | 
| 
| 
| 
| 
| 
| | to ignore unsupported address families - eg. don't resolv IPv6 on
IPv4-only hosts.
OK jsing@ | 
| | 
| 
| 
| 
| 
| 
| | dance handling code. This means that we get slightly useful messages when
a TLS connection or accept fails.
Requested by reyk@ | 
| | 
| 
| 
| | OK jsing@ | 
| | 
| 
| 
| 
| 
| 
| 
| | specifying a file.  This enables CA verification in privsep'ed
processes that are running chroot'ed without direct access to the
certificate files.
With feedback, tests, and OK from bluhm@ | 
| | 
| 
| 
| 
| 
| 
| 
| | Use the same logic from the read, write, accept functions to inform
the caller wether a readable or writable socket is needed.  After
that event, the connect function must be called again.  All the
checks before connecting are done only once.
OK tedu@ | 
| | 
| 
| 
| 
| | a compiler warning about shadowing a global declaration.
OK jsing@ | 
| | 
| 
| 
| | Noticed while testing libtls on FreeBSD. | 
| | 
| 
| 
| 
| 
| 
| 
| | Remove direct calls to printf from the tls_check_hostname() path. This allows
NUL byte error messages to bubble up to the caller, to be logged in a
program-appropriate way. It also removes non-portable calls to getprogname().
ok jsing@ | 
| | |  | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Remove direct calls to printf from the tls_check_hostname() path. This allows
NUL byte error messages to bubble up to the caller, to be logged in a
program-appropriate way. It also removes non-portable calls to getprogname().
The semantics of tls_error() are changed slightly: the last error message is
not necessarily preserved between subsequent calls into the library.
When the previous call to libtls succeeds, client programs should treat the
return value of tls_error() as undefined.
ok tedu@ | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | established using a pair of existing file descriptors.
Based on a diff/request from Jan Klemkow.
Rides previous libtls rename/library bump.
Discussed with tedu@. | 
|  | distinguish between LibreSSL (the project) and libressl (the library).
Discussed with many. |