d3ce8bae67c6a73c4d068fbb3d59a5a990c9acd9 |
|
07-Feb-2018 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Assert-crash if input stream has IO already set |
df12456ea9a15e9bebd692207b551800521310c5 |
|
30-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-ssl-iostream: openssl: Make verbose logging robust against i_debug() writing to stream itself.
In dsync, i_debug() is overridden to write to the SSL stream itself through a
multiplexed data stream. So, during the i_debug() call all kinds of things can
happen to the persisted error string in the stream, which caused problems. |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
33631b9b711b95ee47bd4ddbdb419f46a12cebe4 |
|
28-Dec-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-ssl-iostream: Add accessors for additional SSL protocol details
This is needed in order to send these details as fields to auth process |
bcb65da2bec56ee1baadc9f0233f12dce5d06ddd |
|
15-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: If allow_invalid_cert=TRUE, skip verifying hostname |
804bca734d3bdf930f1678ee24885965a6aa756c |
|
11-Dec-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-ssl-iostream: Use SSL_CTX_set_min_proto_version if available |
976dee5384c4827dc648c9bc53825390521c388e |
|
11-Dec-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
Replace ssl_protocols config option with ssl_min_protocol
Default to TLSv1. |
15aa67e8a9dd7fc631d58ce13c54fe004bb4d0c1 |
|
07-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Add io_stream_ssl_global_init() |
14a07d2bb34f1d52fce3e3218799f271f118d501 |
|
07-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Add TLS SNI callback and a way to change SSL context |
6315f87da1b28578d2deb4d51aa624dc178efb0a |
|
07-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: ssl_iostream_cert_match_name() - add reason_r parameter
The callers were also changed to add the reason to error messages. |
bbafd34da224c399700956db6819643e1d3b3ce7 |
|
07-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: openssl_cert_match_name() - add reason_r parameter
The returned string explains what exactly matched or why nothing matched. |
18344a653fb063e599e24d1e9f7d5db4d8fd7b45 |
|
07-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: ssl_iostream_cert_match_name() - Change to return bool
The return value makes much more sense as a boolean TRUE/FALSE than 0/-1. |
3c376d8f5e41c5decd6379a1068a95c3f0738770 |
|
07-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Keep ssl_iostream_context referenced while it has streams |
96359599bbd4a2d704c3f343ff4c2fcd03f0dd02 |
|
07-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Add refcounting to ssl_iostream_context |
319bc5ff46e9c941efb573b1e00f85fdeb08942d |
|
07-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Change ssl_iostream_context.set to not be a pointer
It's just unnecessary memory usage. |
8bcf6fd065a71ae0ca6dc76989250e819d08d7f6 |
|
07-Nov-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
iostream-openssl: Refactor stream sync code
When doing input or stream sync, specify
the type of operation that we are doing
to make sure we do IO correctly. |
b4c64e78f02025103718091bea1898c5eb7e4faf |
|
07-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Set error on clean connection closing during handshake.
Set the error to "SSL connection closed during handshake". |
497cdac280b75dd6a94d9642991e50ac73640c95 |
|
07-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Cleanup disconnection handling
Avoid code duplication. Set error to "Connection closed" if there's no
other error. |
4584a00276941db3f64c4db1a1bed91fe107af81 |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Verify SSL server's hostname against cert if it's non-NULL
The hostname verification was skipped when handshake-callback wasn't used.
All of the existing code used the callback though, so this doesn't fix
any bugs. |
4cc68747aa932fb9a98f1504b9d874f5cfbf0dec |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Fix checking cert validity when handshake callback isn't used |
d185226aa3dc88a9ee9f16b4c8b2e38000ac8b96 |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Split host to connected_host and sni_host
Using the same variable for both was causing confusion. |
98c2cac72e2032f223050a4edd229993c1d5c1f0 |
|
31-Oct-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-ssl-iostream: Seed OpenSSL RNG earlier
Make sure we give the RNG a chance to
seed before we chroot. |
c141f3682c0ec1d171f89a7a0ff95152c31ea450 |
|
31-Oct-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-ssl-iostream: Use named initializers |
ca55f7e83f7646060748cfe14fed8ff0e565561b |
|
31-Oct-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-ssl-iostream: Remove input_handler flag
It is no longer needed after 87da941c |
48e243933060ae3e77abbdc9c0fd0bc2143be26e |
|
31-Oct-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-ssl-iostream: Add get_compression accessor
This is needed by login-common |
1fea3af0bb1cb4daab44ae4e1a06ce2e42bbf714 |
|
31-Oct-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-ssl-iostream: Close ostream before istream
If i_stream is autoclose, then o_stream
close will fail if done after i_stream
close. |
0577701d04beea222fc49a7318851ddcea3b99d3 |
|
31-Oct-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-ssl-iostream: Add alternate certificate support |
9f7ba3807f77209a65e0faa56cac8545b06cd116 |
|
31-Oct-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
global: Splice cert into separate struct from iostream_ssl_settings |
c4d66e8ccbb8440622f1a70791ed2a8f99659af1 |
|
19-Jan-2017 |
Juha Koho <juha.koho@trineco.fi> |
ssl: add ssl_curve_list setting for selecting ECHDE curves |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
e823661ef75e798ed18dc2bf0a46ed66ffc27c24 |
|
09-Dec-2016 |
manuel <manuel@mausz.at> |
openssl: Clear error queue after an incomplete SSL_shutdown
If the SSL_shutdown-call fails (e.g. because the underlaying socket has
already been closed) OpenSSL puts the corresponding error into the
queue. We don't care about details so we need to clear the queue.
Otherwise the error will be pulled while error checking the next OpenSSL
call of an unrelated connection. |
0793a1dbdfc369b60ad8aa16f4ee58cc1c238f5c |
|
18-Nov-2016 |
Paul Howarth <paul@city-fan.org> |
configure: Fix build with old OpenSSL without SSL_clear_options
SSL_clear_options was introduced in OpenSSL 0.9.8m but may be
backported to older versions in "enterprise" OS releases, so a version
check is insufficient here.
It was originally implemented as a macro but is a function in more
recent OpenSSL versions, so a test that works for both cases is needed. |
ecc2fb34641f1bd39e10c774192ca18527ecb953 |
|
18-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Fixed OpenSSL module to be actually initialized. |
fe4058e6f01bf0e104c44815b6df7cfefb80634c |
|
16-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Use more standard _init() & _deinit() to initialize SSL plugin
This is mainly to make it easier for test programs to link to the plugin
directly. |
c281d6630970d51a0e017366be9d86a061303d4b |
|
10-Aug-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
openssl: Fix v1.1 compability |
00b722cca0601adadfbc653711b405b03e017e09 |
|
10-Aug-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
dovecot: Remove ssl-params |
095481fee84040436ce2dccca472c9bb1df4d5bb |
|
16-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Changed require_valid_cert -> allow_invalid_cert
We should default to being safe. |
23bdbb7b1831785c6ba6df190f6369da882d2b9d |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Require comparisons to be strict boolean expressions
* No implicit integer -> boolean or pointer -> boolean conversions
* !expr can be used only if expr is boolean type
These were checked with a patched clang. It found various actual bugs,
which were fixed by the previous commits. |
11f02cda5a67ba09167ef001e5600833c5803a7b |
|
30-May-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
Replace some t_malloc_no0 calls with t_malloc0
This might increase safety. |
0175d37a5ae5a4d146ca41b684bd38d9b03683cb |
|
30-May-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
Remove t_malloc in favour of t_malloc_no0
Using either t_malloc_no0 or t_malloc0 makes it clear whether the
allocated memory is zeroed or not. |
3858a7a5da361c35f1e6e50c8e3214dc0cf379d6 |
|
16-May-2016 |
Phil Carmody <phil@dovecot.fi> |
lib: istream - migrate to i_stream_read_more()
Scripted to find all the low-hanging-fruit (single line calls), but hand-checked:
git grep i_stream_read_data.*,\ 0\) | sed s/:.*// | \
xargs sed -i -e 's/i_stream_read_data(\(.*\), \(.*\), \(.*\), 0)/i_stream_read_more(\1, \2, \3)/'
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
cb999a76f51081a4c5d7f7ac411de3fe6cff6c15 |
|
28-Feb-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: If verbose=TRUE, internally log all errors. |
20905b89a05e27f0d1c6606a6b49b33dc23a1323 |
|
28-Feb-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-ssl-iostream: Log all SSL info lines with debug-level.
They're not logged at all if verbose=FALSE, so they're really debug messages. |
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3 |
|
12-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: freshen copyright
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/' |
8b5d186ec2f8b56ded72a7f45a70b7542caad9d0 |
|
02-Dec-2015 |
Timo Sirainen <tss@iki.fi> |
login, lib-ssl-iostream: Deduplicate code with shared openssl_iostream_use_certificate_error() |
eefcf71c762ef4614f5bb423dd3bd8e5c44981c5 |
|
29-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Don't set EPIPE/ECONNRESET error to istream when connection is closed.
Several istream users verify at EOF that stream_errno=0 and fail if it
isn't. |
7cb128dc4cae2a03a742f63ba7afee23c78e3af0 |
|
05-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
global: freshen copyright
Robomatically:
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/'
Happy 2015 everyone!
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
40ba79bfba7c2331fb8e1a2a694da748a6ebaec0 |
|
14-Nov-2014 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Close the plain iostreams when ssl-iostream is destroyed. |
531b963539cd4c68bdb7cd6d087cd4a06e1983ad |
|
29-Jul-2014 |
Timo Sirainen <tss@iki.fi> |
libressl fix: Fixed compiling with SSL compression disabled.
Patch by Pascal Stumpf |
87da941c0b0a0671997f592a52ee2c0b35d0e41e |
|
03-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Make sure I/O input event is triggered after ostream-ssl has read some data to buffer. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
f974134f495e47ba7173f5b0f75fbd5cbacf1fe2 |
|
22-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
Added ssl_prefer_server_ciphers setting. |
1c6f6f5bef70f16546b3bc8f4cd5f93f373e82a2 |
|
19-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
iostreams: Set stream error string when it provides extra information. |
b4f4552697bdc8e467955e262ae446dbe2914c14 |
|
06-Aug-2013 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Deinitialization fixes. |
af4cf954021adac7e021262bf6ae3cc3cec3ba54 |
|
01-Aug-2013 |
Timo Sirainen <tss@iki.fi> |
ssl: Log SSL "close notify" alerts as debug messages, not warnings.
They are clean shutdown messages after all. |
71b60849a773dd68bdc015cb6a8ea1664d16b359 |
|
08-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Added ssl_iostream_has_handshake_failed() |
b4d850a0ffd519c1c745557568daf7d48e18c820 |
|
04-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Simplified certificate validation. Also give better error messages. |
3b4bd183cc469f70eb91d82a7f01f60ffc24ca5b |
|
04-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Added support for TLS SNI, which caused some API changes. |
9709107819ba60d41f737279dd070b40d46b4120 |
|
04-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: If handshake callback fails, close the iostreams immediately.
This way the callback itself doesn't have to do it. Also fixes errors caused
by it, since they didn't close the ostream. |
ac645fe16c0619771c0a961db91df16485513c52 |
|
04-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: ssl_iostream_set_handshake_callback() API changed.
The callback can now return the error message to caller instead of having to
log it itself. |
ba1c847d0af4afe4787ed470d0c818e948e184e2 |
|
04-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: API changes to return error strings if init() functions fail.
This also fixed a couple of broken error handlings. |
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294 |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Oops :) Update copyrights to 2013 without breaking all .c files. |
cca4ba2a504d70a9fe9fee37f8433997359de52c |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2013. |
3faa1040e5a3f9f35ffad29110216094ab2f5880 |
|
06-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream now dynamically loads openssl library instead of linking to it.
This allowed removing the separate libdovecot-ssl library. In future if
GnuTLS/NSS support is added it would also allow switching between them
dynamically. |
19ebf930ec4a3f120840fce9afdc6f4083843f83 |
|
05-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: [io]streams were added an unnecessary reference, causing memory leaks. |
942dc911789875d8f0bda347f4efc31d2b4f938b |
|
05-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: [io]streams were added an unnecessary reference, causing memory leaks. |
739125f23e3312045e620014812fe2249a309cc4 |
|
12-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Make the input buffering behave the same as in file-istream
Previously i_stream_read(ssl_input) could have still left some data buffered
into the underlying file-istream, which meant that I/O loop didn't detect
any new input from the fd and the connection got stuck. |
689d163c6bc35383f6142c439065575f0bfc6e10 |
|
12-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Avoid assert-crash when reading a closed stream. |
c09d07e85ae22aa620945648a4430ca2a5a676f4 |
|
28-Jul-2012 |
Timo Sirainen <tss@iki.fi> |
verbose_ssl=yes: Log debug messages with debug level instead of as warnings. |
6a4212e6d7c41de83bcac63edec3118e6a7a0f68 |
|
28-Jul-2012 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Added protocols setting. |
2244ec1fda50f777b0b5c2c780f058eb31268a28 |
|
28-Jul-2012 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Name SSL iostreams based on parent streams. |
130fadd21e01ea380170b3bda859f6a27ff8e1a8 |
|
28-Jul-2012 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Inherit output stream's error handling from parent. |
38f1423a23f6c9a37c01152595ce3ca8a0a65121 |
|
28-Jul-2012 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Added ssl_iostream_destroy() to do a clean SSL shutdown. |
4b794181a01c04d1dd33c9a8339ddbc826106408 |
|
22-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Memory leak fixes |
6e9eb28a08f219a64e1e8719941b4c4034ef17d8 |
|
18-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Don't assert-crash if underlying connection suddenly disconnects. |
20bd39d194e53d07c68b176b5bdf3f0604241a68 |
|
25-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Fixed a memory leak when verifying certificate name.
This mainly mattered when proxying with SSL to remote server. |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
831f3bcdde51fa388462eda1daa555e90651ca2e |
|
08-Nov-2011 |
Timo Sirainen <tss@iki.fi> |
login proxy: Verify that remote hostname matches SSL cert, unless ssl=any-cert |
ed41ec8aa0efaa50954fd16cb44c86c8350dadcc |
|
20-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Don't require SSL ostream to always have unlimited buffer size.
It's important when reading/handshaking wants to write to output buffer, but
writing itself can safely have zero sized buffer (e.g. while sending a
large input stream). |
c2c0c1e5d2e97ae114ad83d8cb486b0aab23ac38 |
|
07-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: If plain stream disconnects, disconnect SSL stream also. |
6c6b1e9fd9ab19249e73f5269931d01d831e4346 |
|
07-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Some tweaks to BIO handling. |
e21a2c0821c559080550ead6a901f613e59af10e |
|
07-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: When plain_output's buffer is full, set it flush-pending.
This fixes hangs when the output buffer got full. |
1c4f8e4c4e5f3a5f05692a2d5c57f96a5b612f3d |
|
06-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Added ssl_iostream_cert_match_name() |
21fed972adb354b92771eefad27f8ac8cbd5dd45 |
|
06-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Code cleanups, fixes, asserts and comments. |
148a8396be2c1cf7d2aaa55566f7f7dea05388dd |
|
05-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Avoid assert-crashing when remote disconnects during write. |
8f2444f788368b08edb4ac037d5f7e5919cdee0a |
|
10-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: ssl_iostream_get_security_string() didn't return compression. |
68a8f0794a1c2c2267ae4015ef3ccc00604e9175 |
|
04-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
Compiler warning fix for newer OpenSSL library. |
9ab0786966c0afa8fa09a2faff7c067bc388e694 |
|
31-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
lib-ssl-iostream: Don't hang if given output stream is in corked state. |
e98de01b5644c88b6053e2921eb5e9a506fe263f |
|
31-Jan-2011 |
Timo Sirainen <tss@iki.fi> |
Added lib-ssl-iostream for handling SSL connections more easily. |