Commits
- Commit:
b400ca1d900bb955d47442147287a7f0112ed698- From:
- tb <tb@openbsd.org>
- Date:
relayd: remove X509_dup() call that leaks memory
While there, add error checks for X509_set_{pubkey,issuer_name}().
From Marc Jorge
- Commit:
cc2ec1f7a082a95f019ba80d9be7f628ebafcc6a- From:
- rsadowski <rsadowski@openbsd.org>
- Date:
relayd: use explicit_bzero in ssl_password_cb
This replaces bzero with explicit_bzero in the SSL password callback. Since
ssl_password_cb handles sensitive data a standard bzero could be optimized
away by the compiler.
Additionally, this ensures the buffer is cleared if strlcpy fails due to
truncation, preventing password fragments from lingering in memory.
OK renaud@, kirill@
- Commit:
6b5c4000434cc5dc67e202d8aede2f543b5b2bf3- From:
- rsadowski <rsadowski@openbsd.org>
- Date:
Standardize logging with bgpd
OK claudio@
- Commit:
cb6a69b94e073f2305fbf62c884f1ad6edbf643d- From:
- op <op@openbsd.org>
- Date:
remove ssl_init()
it's a noop; nowadays both LibreSSL and OpenSSL libcrypto and libssl
initialize themselves automatically before doing anything.
ok tb
- Commit:
7d80bd882415f31f9af2a0c4bf2b71fcc179c319- From:
- tb <tb@openbsd.org>
- Date:
relayd/ssl.c: Remove a workaround that uses a copy of the old
certificate instead of using it directly because BIO_new_mem_buf()
used to take an non-const buffer. This was changed in 2018, so we
can now remove an XXX and simplify the code.
ok bluhm
- Commit:
3b62aaee4b06a87ed1fc75c4b43ec6454620986c- From:
- eric <eric@openbsd.org>
- Date:
remove bogus key hack now that it's handled by libtls
no objection claudio@
ok tb@ jsing@
- Commit:
bd00d3d86c59dc67cbe2602bd83b6db9689bf1ee- From:
- bluhm <bluhm@openbsd.org>
- Date:
Always calculate the hash value of the x509 cert in ssl_load_pkey().
Check whether TLS server object is available before using it. With
these fixes the ssl inspect regress test just fails and does not
crash relayd.
OK claudio@
- Commit:
09e53feeaa2a7c28a81c8bac20bab18c68d83883- From:
- benno <benno@openbsd.org>
- Date:
use __func__ in log messages. fix some whitespace while here.
From Hiltjo Posthuma hiltjo -AT codemadness -DOT- org, thanks!
ok florian, claudio
- Commit:
f4a6eef32d65cd21b8ae3ff004c9e6df1da60025- From:
- claudio <claudio@openbsd.org>
- Date:
Migrate relayd to use libtls for TLS. Still does the TLS privsep via the
engine but at least we can use a sane API for new features.
Going in now so it is possible to work with this in tree.
General agreement at d2k17.
- Commit:
afbe8d84fc7bbb7c2893503880772d964533ea1a- From:
- reyk <reyk@openbsd.org>
- Date:
Stop accessing verbose and debug variables from log.c directly.
This replaces log_verbose() and "extern int verbose" with the two functions
log_setverbose() and log_getverbose().
Pointed out by benno@
OK krw@ eric@ gilles@ (OK gilles@ for the snmpd bits as well)
- Commit:
d3d5a1545be0e96b02cf1202aa524997dcb7129f- From:
- benno <benno@openbsd.org>
- Date:
now that ibuf_free() checks for null, we can remove the check here.
ok mmcc@ millert@
- Commit:
d8b12d2f7b3aa156fd612525c2e9c63f96c3e25a- From:
- giovanni <giovanni@openbsd.org>
- Date:
Missing free(3) in error path
ok benno@
- Commit:
d93c36af2b8111f07ff7645770d4714a2e5aef96- From:
- reyk <reyk@openbsd.org>
- Date:
Clean up the relayd headers with help of include-what-you-use and some
manual review. Based on common practice, relayd.h now includes the
necessary headers for itself.
OK benno@
- Commit:
2f6ec04dcc8d2ec0050455263b94308f36252825- From:
- deraadt <deraadt@openbsd.org>
- Date:
Adapt to <limits.h> universe.
ok millert
- Commit:
096ff28be0ad3eece8fa3b49f2ffed59e89f73fa- From:
- reyk <reyk@openbsd.org>
- Date:
Change the keyword "ssl" to "tls" to reflect reality since we
effectively disabled support for the SSL protocols. SSL remains a
common term describing SSL/TLS, there is some controvery about this
change, and the name really doesn't matter, but I feel confident about
it now.
(btw., sthen@ pointed out some historical context:
http://tim.dierks.org/2014/05/security-standards-and-name-changes-in.html)
OK benno@, with input from tedu@
- Commit:
4ad1721b88ad2d8bbd78e91ee7f29ee09b71f6ba- From:
- jsg <jsg@openbsd.org>
- Date:
add additional includes required to build with -DOPENSSL_NO_DEPRECATED
ok reyk@
- Commit:
9aeacd9a6392b2c0a01d84c3258edf5aea1844f3- From:
- reyk <reyk@openbsd.org>
- Date:
Unify the SSL privsep key loading functions.
ok eric@
- Commit:
fae9e89bafdd127f5de797a01fdd6e9c3da9d0c0- From:
- reyk <reyk@openbsd.org>
- Date:
Fix two memory leaks: EVP_PKEY_get1_RSA() returns a referenced key
that requires to call RSA_free() to dereference it after use. Also
free a temporary key that was read by PEM_read_PrivateKey() and
immediately written into a bio.
ok markus@
- Commit:
fae05986993b4ae5a3c06b3ccaf298f5bb91ee2b- From:
- reyk <reyk@openbsd.org>
- Date:
Support the CA key for SSL inspection in the ca process. Instead of
looking up the keys by relay id, add all keys to a list and look them
up by key id.
ok benno@
- Commit:
effc3dea2456cb0826c121b25bc5c5cbe787cf96- From:
- reyk <reyk@openbsd.org>
- Date:
Use RSA_set_ex_data()/RSA_get_ex_data() directly instead of
the undocumented RSA_set_app_data()/RSA_get_app_data() wrappers.
- Commit:
c525adb9b45b1c6214842c3b0432e8c72890f5f5- From:
- reyk <reyk@openbsd.org>
- Date:
Introduce privsep for private keys:
- Move RSA private keys to a new separate process instead of copying
them to the relays. A custom RSA engine is used by the SSL/TLS code
of the relay processes to send RSA private key encryption/decryption
(also used for sign/verify) requests to the new "ca" processes instead
of operating on the private key directly.
- Each relay process gets its own related ca process. Setting
"prefork 5" in the config file will spawn 10 processes (5 relay, 5
ca). This diff also reduces the default number of relay processes
from 5 to 3 which should be suitable in most installations without a
very heavy load.
- Don't keep text versions of the keys in memory, parse them once and
keep the binary representation. This might still be the case in
OpenSSL's internals but will be fixed in the library.
This diff doesn't prevent something like "heartbleed" but adds an
additional mitigation to prevent leakage of the private keys from the
processes doing SSL/TLS.
With feedback from many
ok benno@
- Commit:
420fc5f68a79097ea0a791d6e8d4b901ebd13230- From:
- benno <benno@openbsd.org>
- Date:
unset cte->buf after free, fix double free via tcp_close().
ok reyk@
- Commit:
03668b6bbe42f625becd3824bedbda2d4239d466- From:
- reyk <reyk@openbsd.org>
- Date:
Support SSL inspection, the ability to transparently filter in SSL/TLS
connections (eg. HTTPS) by using a local CA that is accepted by the
clients. See the "SSL RELAYS" and "EXAMPLES" sections in the
relayd.conf(5) manpage for more details.
ok benno@, manpage bits jmc@
- Commit:
353b97f98ebc6a29a8156539231f59b0ba2e9475- From:
- reyk <reyk@openbsd.org>
- Date:
reorder the variables a bit, no functionaly change.
- Commit:
fb0e4fa0298b81eae438d853297f38cfb61ade0d- From:
- nicm <nicm@openbsd.org>
- Date:
Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.
ok henning gilles claudio jacekm deraadt
