Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add tls_peer_cert_notbefore and tls_peer_cert_notafter to expose peer ↵ | beck | 2015-10-07 | 6 | -9/+98 |
| | | | | | | | certificate validity times for tls connections. ok jsing@ | ||||
* | Allow us to get cipher and version even if there is not a peer certificate. | beck | 2015-10-07 | 2 | -15/+21 |
| | | | | ok doug@ | ||||
* | include <sys/types.h> for ssize_t | bcook | 2015-10-01 | 1 | -1/+3 |
| | | | | ok jsing@, deraadt@ | ||||
* | Instead of declaring a union in multiple places, move it to tls_internal.h. | jsing | 2015-09-29 | 3 | -15/+14 |
| | | | | ok deraadt@ | ||||
* | clean some ugly intendation warts | deraadt | 2015-09-29 | 5 | -12/+21 |
| | |||||
* | Explicit NULL checks and style(9) tweaks. | jsing | 2015-09-28 | 1 | -7/+7 |
| | |||||
* | tweak previous; | jmc | 2015-09-14 | 1 | -2/+2 |
| | |||||
* | Provide tls_config_insecure_noverifytime() in order to be able to disable | jsing | 2015-09-14 | 6 | -6/+29 |
| | | | | | | certificate validity checking. ok beck@ | ||||
* | Remove useless quoting from .Fo and .Fn function names, to prevent | schwarze | 2015-09-14 | 1 | -4/+4 |
| | | | | | | development of a cargo cult in case people look at existing files for examples. This achieves a consistent .Fo and .Fn quoting style across the whole tree. | ||||
* | some conn_version and conn_cipher bits; | jmc | 2015-09-14 | 2 | -9/+10 |
| | |||||
* | Expose EOF without close-notify via tls_close(). | jsing | 2015-09-14 | 2 | -6/+14 |
| | | | | | | | | | | | Make tls_read(3)/tls_write(3) follow read(2)/write(2) like semantics and return 0 on EOF with and without close-notify. However, if we saw an EOF from the underlying file descriptors without getting a close-notify, save this and make it visible when tls_close(3) is called. This keeps the semantics we want, but makes it possible to detect truncation at higher layers, if necessary. ok beck@ guenther@ | ||||
* | Return an error if tls_handshake() or tls_close() is called on a context | jsing | 2015-09-14 | 1 | -2/+13 |
| | | | | | | for which they are not valid operations. ok beck@ | ||||
* | add missing function return types | schwarze | 2015-09-14 | 1 | -2/+3 |
| | |||||
* | Crank major version due to removal of SHA-0 and MD4 from libcrypto. | doug | 2015-09-13 | 1 | -2/+2 |
| | |||||
* | work around the stupid semantics of SSL_read and SSL_write to make sure | beck | 2015-09-13 | 1 | -3/+3 |
| | | | | | we can indicate an EOF properly on tls_read and tls_write ok jsing@ | ||||
* | Don't leak conninfo - spotted by marko kreen. | beck | 2015-09-13 | 1 | -2/+3 |
| | | | | ok jsing@ | ||||
* | Mechanical minor bump to follow libcrypto. | miod | 2015-09-13 | 1 | -1/+1 |
| | |||||
* | add visibility of ciper and connection version strings | beck | 2015-09-13 | 4 | -6/+56 |
| | | | | ok jsing@ | ||||
* | Move connection info into it's own private structure allocated and filled in | beck | 2015-09-12 | 7 | -120/+208 |
| | | | | | | at handshake time. change accessors to return const char * to remove need for caller to free memory. ok jsing@ | ||||
* | Ensure that we clear the libssl error stack before we make a function call | jsing | 2015-09-12 | 3 | -5/+12 |
| | | | | | | | | | | 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@ | ||||
* | Put tls_peer_cert* functions in the same place. | jsing | 2015-09-12 | 1 | -6/+6 |
| | |||||
* | typo | deraadt | 2015-09-11 | 1 | -2/+2 |
| | |||||
* | more for NAME; | jmc | 2015-09-11 | 1 | -1/+4 |
| | |||||
* | more cleanup; | jmc | 2015-09-11 | 1 | -16/+15 |
| | |||||
* | update NAME; various cleanup | jmc | 2015-09-11 | 1 | -20/+20 |
| | |||||
* | document tls_get_peer_subject, tls_get_peer_issuer, and tls_get_peer_hash | beck | 2015-09-11 | 2 | -3/+58 |
| | | | | ok jsing@ | ||||
* | != -> == that I broke while bikeshedding | beck | 2015-09-11 | 1 | -2/+2 |
| | |||||
* | Do not match a wildcard against a name with no host part. | beck | 2015-09-11 | 1 | -1/+4 |
| | | | | ok jsing@ | ||||
* | add tls_peer functions for checking names and issuers of peer certificates. | beck | 2015-09-11 | 7 | -13/+95 |
| | | | | ok jsing@ | ||||
* | Provide tls_peer_cert_hash() which returns a hash of the raw certificate | jsing | 2015-09-11 | 3 | -2/+92 |
| | | | | | | | | | | | | | 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@ | ||||
* | Store a reference to the peer certificate (if any) upon completion of the | jsing | 2015-09-11 | 2 | -2/+8 |
| | | | | | | handshake. Free the reference when we reset the TLS context. ok beck@ | ||||
* | specify what is permitted as an argument to tls_config_set_ciphers() | beck | 2015-09-11 | 1 | -1/+11 |
| | |||||
* | actually set return value to 0 on success. | beck | 2015-09-11 | 1 | -1/+2 |
| | | | | ok jsing@ who wears the cone of shame. | ||||
* | - add some missing NAME entries | jmc | 2015-09-11 | 1 | -6/+8 |
| | | | | | - zap trailing whitespace - avoid "can not" | ||||
* | sort MLINKS into the same order as the man page; | jmc | 2015-09-11 | 1 | -4/+4 |
| | |||||
* | Call tls_set_errorx() instead of tls_set_error() in | jsing | 2015-09-10 | 1 | -5/+5 |
| | | | | tls_configure_ssl_verify(). Also tweak an error message and unwrap a line. | ||||
* | improve examples, | deraadt | 2015-09-10 | 1 | -8/+11 |
| | | | | | | | 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 | ||||
* | document client side certificate verification functionality. | beck | 2015-09-10 | 2 | -3/+19 |
| | | | | ok jsing@ | ||||
* | document changed tls_read and tls_write semantics. | beck | 2015-09-10 | 1 | -15/+58 |
| | | | | | | | document functions that clear errno. change examples to provide demonstration of both the blocking and non-blocking cases. ok jsing@, bluhm@ | ||||
* | mlink tls_handshake; | jmc | 2015-09-10 | 1 | -1/+2 |
| | |||||
* | tweak previous; | jmc | 2015-09-10 | 1 | -3/+3 |
| | |||||
* | Correctly document the behaviour of tls_close() - the caller is responsible | jsing | 2015-09-10 | 1 | -5/+6 |
| | | | | | | for closing the file descriptors unless libtls allocated them. ok beck@ | ||||
* | Replace TLS_{READ,WRITE}_AGAIN with TLS_WANT_POLL{IN,OUT} and correctly | jsing | 2015-09-10 | 1 | -20/+13 |
| | | | | | | document the calling requirements. ok beck@ | ||||
* | Update libtls man page to reflect tls_handshake() related changes. | jsing | 2015-09-10 | 1 | -35/+37 |
| | | | | ok beck@ | ||||
* | revert accidental commit | beck | 2015-09-10 | 1 | -4/+4 |
| | |||||
* | comment for errno clobbering, to indicate why we do this. | beck | 2015-09-10 | 2 | -5/+9 |
| | | | | ok deraadt@ jsing@ | ||||
* | bump major | beck | 2015-09-10 | 1 | -1/+1 |
| | | | | ok jsing@ | ||||
* | change TLS_READ_AGAIN to TLS_WANT_POLLIN and TLS_WRITE_AGAIN to TLS_WANT_POLLOUT | beck | 2015-09-10 | 2 | -7/+7 |
| | | | | | | | 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@ | ||||
* | Change tls_read and tls_write semantics to return an ssize_t to better | beck | 2015-09-10 | 2 | -21/+14 |
| | | | | | | | | 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@ | ||||
* | Split tls_handshake() out from tls_accept/tls_connect. By doing this the | jsing | 2015-09-10 | 5 | -59/+120 |
| | | | | | | | | | | | | | | | 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@ |