| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
for which they are not valid operations.
ok beck@
|
| |
|
| |
|
|
|
|
|
| |
we can indicate an EOF properly on tls_read and tls_write
ok jsing@
|
|
|
|
| |
ok jsing@
|
| |
|
|
|
|
| |
ok jsing@
|
|
|
|
|
|
| |
at handshake time. change accessors to return const char * to remove need
for caller to free memory.
ok jsing@
|
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
| |
ok jsing@
|
|
|
|
| |
ok jsing@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that was presented by the peer. The hash used is currently SHA256, however
since we prefix the result with the hash name, we can change this in the
future as the need arises.
The same output can be generated by using:
h=$(openssl x509 -outform der -in mycert.crt | sha256)
printf "SHA256:${h}\n"
ok beck@
|
|
|
|
|
|
| |
handshake. Free the reference when we reset the TLS context.
ok beck@
|
| |
|
|
|
|
| |
ok jsing@ who wears the cone of shame.
|
|
|
|
|
| |
- zap trailing whitespace
- avoid "can not"
|
| |
|
|
|
|
| |
tls_configure_ssl_verify(). Also tweak an error message and unwrap a line.
|
|
|
|
|
|
|
| |
1. hoist pollfd fields which don't change upwards
2. show ret as ssize_t, it MUST BE, or there will be lots of crying
3. on first pass, must check for either POLLIN|POLLOUT
ok millert beck
|
|
|
|
| |
ok jsing@
|
|
|
|
|
|
|
| |
document functions that clear errno.
change examples to provide demonstration of both the blocking and
non-blocking cases.
ok jsing@, bluhm@
|
| |
|
| |
|
|
|
|
|
|
| |
for closing the file descriptors unless libtls allocated them.
ok beck@
|
|
|
|
|
|
| |
document the calling requirements.
ok beck@
|
|
|
|
| |
ok beck@
|
| |
|
|
|
|
| |
ok deraadt@ jsing@
|
|
|
|
| |
ok jsing@
|
|
|
|
|
|
|
| |
to make it more clear to users of this api what needs to be done in these error
cases.
Discussed extensively with bluhm@ and jsing@ and others.
ok jsing@
|
|
|
|
|
|
|
|
| |
match read() and write() semantics to make porting existing code using
read/write easier.. requested by bluhm@ who convinced jsing and I to break
the api
ok jsing@ bluhm@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
|
|
|
|
| |
list. Prefer the server's cipher list by default.
Based on a diff from Kyle Thompson <jmp at giga dot moe>.
ok beck@ bcook@
|
|
|
|
| |
Requested by bluhm@
|
|
|
|
|
| |
ride upcoming minor bump
ok jsing@
|
|
|
|
|
|
|
| |
this avoids the problem of people checking for return values < 0
and then checking for errno before checking for TLS_READ_AGAIN
TLS_WRITE_AGAIN - since we can not guarantee what errno will be
set to from the underlying library calls
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
Spotted by Marko Kreen.
Rides libtls major bump.
|