]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
6 years agolib-storage: Add mailbox_keywords_merge()
Timo Sirainen [Thu, 14 Mar 2019 16:58:14 +0000 (18:58 +0200)] 
lib-storage: Add mailbox_keywords_merge()

6 years agolib-storage: Add mailbox_search_mail_detach()
Timo Sirainen [Thu, 28 Feb 2019 13:10:59 +0000 (15:10 +0200)] 
lib-storage: Add mailbox_search_mail_detach()

This allows keeping the struct mail open even after the mail_search_context
that created it is freed.

6 years agolib-storage: Move tracking mails to mail_search_context from index-specific code
Timo Sirainen [Thu, 28 Feb 2019 13:03:22 +0000 (15:03 +0200)] 
lib-storage: Move tracking mails to mail_search_context from index-specific code

This makes the next commit much easier to implement.

6 years agolib-storage: Move index_mail.search_mail to mail_private struct
Timo Sirainen [Thu, 28 Feb 2019 13:08:38 +0000 (15:08 +0200)] 
lib-storage: Move index_mail.search_mail to mail_private struct

6 years agolib-mail: istream-header-filter: Fix HEADER_FILTER_ADD_MISSING_EOH with callback
Timo Sirainen [Mon, 18 Mar 2019 13:34:10 +0000 (15:34 +0200)] 
lib-mail: istream-header-filter: Fix HEADER_FILTER_ADD_MISSING_EOH with callback

If mail already had EOH and callback returned matched=TRUE in the EOH
callback (e.g. adding more headers), the callback was called a second
time for the EOH.

Currently there doesn't seem to be any existing code that was affected by
this bug.

6 years agoindex: Pass index sync flags to index view sync for pvt
Aki Tuomi [Tue, 2 Jul 2019 16:33:59 +0000 (19:33 +0300)] 
index: Pass index sync flags to index view sync for pvt

When recovering from inconsistent view, this needs to
passed for pvt indexes too. Fixes

Error: dovecot.index.pvt reset, view is now inconsistent

6 years agolib-index: Add index alloc cache timeout to root ioloop
Timo Sirainen [Tue, 17 Sep 2019 16:52:25 +0000 (19:52 +0300)] 
lib-index: Add index alloc cache timeout to root ioloop

The cache is a global one and the timeout shouldn't trigger until the global
root ioloop is reached.

This fixes a timeout leak / crash when index was opened in an inner ioloop.

6 years agolib: Add io_loop_get_root()
Timo Sirainen [Tue, 17 Sep 2019 16:52:14 +0000 (19:52 +0300)] 
lib: Add io_loop_get_root()

6 years agolib-auth: Fix auth_client_is_connected() to work after disconnection
Timo Sirainen [Wed, 4 Sep 2019 14:13:15 +0000 (17:13 +0300)] 
lib-auth: Fix auth_client_is_connected() to work after disconnection

6 years agolib-dcrypt: Add static keyword to ECDSA_SIG_get0
Aki Tuomi [Tue, 3 Sep 2019 08:58:18 +0000 (11:58 +0300)] 
lib-dcrypt: Add static keyword to ECDSA_SIG_get0

Otherwise compilers complain as it's not declared anywhere.

6 years agolib-dcrypt: Free EVP_MD_CTX in dcrypt_openssl_digest
Aki Tuomi [Tue, 3 Sep 2019 08:57:51 +0000 (11:57 +0300)] 
lib-dcrypt: Free EVP_MD_CTX in dcrypt_openssl_digest

6 years agolib-dcrypt: Free existing BIGNUMs in setters
Aki Tuomi [Tue, 3 Sep 2019 08:57:17 +0000 (11:57 +0300)] 
lib-dcrypt: Free existing BIGNUMs in setters

6 years agolib-dcrypt: Add ECDSA_SIG_set0 and ECDSA_SIG_get0 when missing
Aki Tuomi [Tue, 3 Sep 2019 06:10:13 +0000 (09:10 +0300)] 
lib-dcrypt: Add ECDSA_SIG_set0 and ECDSA_SIG_get0 when missing

These are needed for low-level operations

6 years agom4: Check for ECDSA_SIG_set0 and ECDSA_SIG_get0
Aki Tuomi [Tue, 3 Sep 2019 06:06:29 +0000 (09:06 +0300)] 
m4: Check for ECDSA_SIG_set0 and ECDSA_SIG_get0

These are not present in older libssl

6 years agolib-dcrypt: Ignore padding when decoding base64url
Aki Tuomi [Mon, 2 Sep 2019 11:17:50 +0000 (14:17 +0300)] 
lib-dcrypt: Ignore padding when decoding base64url

6 years agodcrypt: Add signature format
Aki Tuomi [Mon, 2 Sep 2019 09:54:12 +0000 (12:54 +0300)] 
dcrypt: Add signature format

Needed to implement RFC7515

6 years agolib-dcrypt: Only use compressed points with dovecot internal formats
Aki Tuomi [Thu, 29 Aug 2019 14:09:55 +0000 (17:09 +0300)] 
lib-dcrypt: Only use compressed points with dovecot internal formats

6 years agolib-dcrypt: Implement dcrypt_ecdh_derive_secret for OpenSSL
Aki Tuomi [Thu, 29 Aug 2019 13:54:27 +0000 (16:54 +0300)] 
lib-dcrypt: Implement dcrypt_ecdh_derive_secret for OpenSSL

6 years agolib-dcrypt: Move shared secret derivation to dcrypt_openssl_echd_derive_secret
Aki Tuomi [Thu, 29 Aug 2019 13:43:45 +0000 (16:43 +0300)] 
lib-dcrypt: Move shared secret derivation to dcrypt_openssl_echd_derive_secret

Makes it possible to expose it on next commit.

6 years agolib-dcrypt: Add API for dcrypt_ecdh_derive_secret
Aki Tuomi [Thu, 29 Aug 2019 13:52:51 +0000 (16:52 +0300)] 
lib-dcrypt: Add API for dcrypt_ecdh_derive_secret

6 years agolib-dcrypt: Return value from RSA_set0_crt_params
Aki Tuomi [Thu, 29 Aug 2019 09:56:21 +0000 (12:56 +0300)] 
lib-dcrypt: Return value from RSA_set0_crt_params

6 years agolib-dcrypt: Fix key format in raw & jwk keys
Aki Tuomi [Thu, 29 Aug 2019 09:52:46 +0000 (12:52 +0300)] 
lib-dcrypt: Fix key format in raw & jwk keys

It needs to be point compressed with named curve

6 years agolib-dcrypt: Use correct variables names in RSA_set0_key
Aki Tuomi [Thu, 29 Aug 2019 09:25:07 +0000 (12:25 +0300)] 
lib-dcrypt: Use correct variables names in RSA_set0_key

Broken in 79e9ccdc4a536f3881ec2b9304020514d1f92590

6 years agolib-dcrypt: Use ERR_R_PASSED_NULL_PARAMETER
Aki Tuomi [Thu, 29 Aug 2019 09:24:42 +0000 (12:24 +0300)] 
lib-dcrypt: Use ERR_R_PASSED_NULL_PARAMETER

It's the correct error and exists for older OpenSSL

Added in 79e9ccdc4a536f3881ec2b9304020514d1f92590

6 years agolib-dcrypt: Fix memory leak in raw key test
Aki Tuomi [Tue, 27 Aug 2019 07:09:30 +0000 (10:09 +0300)] 
lib-dcrypt: Fix memory leak in raw key test

6 years agolib-dcrypt: Add unit tests for changes
Aki Tuomi [Mon, 23 Jan 2017 12:56:54 +0000 (14:56 +0200)] 
lib-dcrypt: Add unit tests for changes

6 years agodcrypt-openssl: Implement signature API for OpenSSL
Aki Tuomi [Mon, 23 Jan 2017 12:56:38 +0000 (14:56 +0200)] 
dcrypt-openssl: Implement signature API for OpenSSL

6 years agolib-dcrypt: Add padding parameter for RSA encrypt/decrypt
Aki Tuomi [Mon, 23 Jan 2017 15:40:01 +0000 (17:40 +0200)] 
lib-dcrypt: Add padding parameter for RSA encrypt/decrypt

6 years agolib-dcrypt: Add signature API
Aki Tuomi [Mon, 23 Jan 2017 12:56:27 +0000 (14:56 +0200)] 
lib-dcrypt: Add signature API

6 years agolib-dcrypt: Unit test for JWK keys
Aki Tuomi [Fri, 23 Aug 2019 09:34:54 +0000 (12:34 +0300)] 
lib-dcrypt: Unit test for JWK keys

6 years agolib-dcrypt: Add JWK key format support
Aki Tuomi [Wed, 21 Aug 2019 13:16:22 +0000 (16:16 +0300)] 
lib-dcrypt: Add JWK key format support

6 years agolib-dcrypt: Implement usage and key ID accessors for openssl
Aki Tuomi [Fri, 23 Aug 2019 08:51:45 +0000 (11:51 +0300)] 
lib-dcrypt: Implement usage and key ID accessors for openssl

6 years agolib-dcrypt: Add key usage and id
Aki Tuomi [Fri, 23 Aug 2019 07:42:09 +0000 (10:42 +0300)] 
lib-dcrypt: Add key usage and id

These can be used for e.g. JWK keys.

6 years agolib-dcrypt: Add key id and usage fields to dcrypt keys
Aki Tuomi [Fri, 23 Aug 2019 08:51:21 +0000 (11:51 +0300)] 
lib-dcrypt: Add key id and usage fields to dcrypt keys

Simplifies next change

6 years agolib-dcrypt: Make key unref with NULL no-op
Aki Tuomi [Fri, 23 Aug 2019 09:27:23 +0000 (12:27 +0300)] 
lib-dcrypt: Make key unref with NULL no-op

6 years agodoveadm: Do not call dcrypt_deinitialize
Aki Tuomi [Thu, 22 Aug 2019 11:28:17 +0000 (14:28 +0300)] 
doveadm: Do not call dcrypt_deinitialize

It can break openssl

6 years agolib-dcrypt: Clarify when dcrypt_deinitialize is to be used
Aki Tuomi [Thu, 22 Aug 2019 10:58:52 +0000 (13:58 +0300)] 
lib-dcrypt: Clarify when dcrypt_deinitialize is to be used

It should never be called if it's going to be used later on.

6 years agom4: Check if some RSA key manipulators are present
Aki Tuomi [Wed, 21 Aug 2019 13:15:57 +0000 (16:15 +0300)] 
m4: Check if some RSA key manipulators are present

Needed for JWK

6 years agolib: hmac - Add hkdf for key derivation
Aki Tuomi [Thu, 22 Aug 2019 15:43:11 +0000 (18:43 +0300)] 
lib: hmac - Add hkdf for key derivation

6 years agolib-dcrypt: Use BN_secure_new when available for secrets
Aki Tuomi [Sun, 25 Aug 2019 17:55:24 +0000 (20:55 +0300)] 
lib-dcrypt: Use BN_secure_new when available for secrets

6 years agom4: Check for BN_secure_new
Aki Tuomi [Sun, 25 Aug 2019 17:54:12 +0000 (20:54 +0300)] 
m4: Check for BN_secure_new

6 years agolib-dcrypt: Implement dcrypt_key_get_curve_public using openssl
Aki Tuomi [Wed, 21 Aug 2019 10:26:29 +0000 (13:26 +0300)] 
lib-dcrypt: Implement dcrypt_key_get_curve_public using openssl

6 years agolib-dcrypt: Add dcrypt_key_get_curve_public
Aki Tuomi [Wed, 21 Aug 2019 10:25:33 +0000 (13:25 +0300)] 
lib-dcrypt: Add dcrypt_key_get_curve_public

Returns name of the curve of public key

6 years agolib-dcrypt: Add tests for raw keys
Aki Tuomi [Mon, 19 Aug 2019 19:40:02 +0000 (22:40 +0300)] 
lib-dcrypt: Add tests for raw keys

6 years agolib-dcrypt: Implement raw key API using OpenSSL
Aki Tuomi [Mon, 19 Aug 2019 11:39:05 +0000 (14:39 +0300)] 
lib-dcrypt: Implement raw key API using OpenSSL

6 years agolib-dcrypt: Add API for dealing with raw keys
Aki Tuomi [Mon, 19 Aug 2019 11:20:47 +0000 (14:20 +0300)] 
lib-dcrypt: Add API for dealing with raw keys

6 years agolib-dcrypt: Fix i2d_ASN1_OBJECT usage
Aki Tuomi [Fri, 23 Aug 2019 16:39:16 +0000 (19:39 +0300)] 
lib-dcrypt: Fix i2d_ASN1_OBJECT usage

i2d_ASN1_OBJECT tells how much memory we need.

6 years agolib-dcrypt: Symbolize maximum OID length
Aki Tuomi [Fri, 23 Aug 2019 10:48:03 +0000 (13:48 +0300)] 
lib-dcrypt: Symbolize maximum OID length

6 years agolib-dcrypt: Use len instead of ln
Aki Tuomi [Fri, 23 Aug 2019 10:46:33 +0000 (13:46 +0300)] 
lib-dcrypt: Use len instead of ln

6 years agolib-http: Make http_client_request_delay_from_response() public
Timo Sirainen [Mon, 19 Aug 2019 09:11:59 +0000 (12:11 +0300)] 
lib-http: Make http_client_request_delay_from_response() public

6 years agopush-notification: Allow easy access to Message-ID header
Timo Sirainen [Fri, 16 Aug 2019 19:07:51 +0000 (22:07 +0300)] 
push-notification: Allow easy access to Message-ID header

6 years agolib-lda: mail-deliver - Emit events at start and finish of delivery.
Stephan Bosch [Tue, 12 Mar 2019 22:23:35 +0000 (23:23 +0100)] 
lib-lda: mail-deliver - Emit events at start and finish of delivery.

6 years agolib-lda: Replace i_warning() with e_warning().
Stephan Bosch [Sun, 10 Mar 2019 12:08:34 +0000 (13:08 +0100)] 
lib-lda: Replace i_warning() with e_warning().

6 years agolib-lda: Replace i_info() with e_info().
Stephan Bosch [Sun, 10 Mar 2019 12:01:08 +0000 (13:01 +0100)] 
lib-lda: Replace i_info() with e_info().

6 years agolib-lda: Replace i_error() with e_error().
Stephan Bosch [Sun, 10 Mar 2019 11:58:03 +0000 (12:58 +0100)] 
lib-lda: Replace i_error() with e_error().

6 years agolib-lda: mail-deliver - Add message fields to the deliver event.
Stephan Bosch [Sun, 10 Mar 2019 09:53:51 +0000 (10:53 +0100)] 
lib-lda: mail-deliver - Add message fields to the deliver event.

6 years agolib-lda: mail-deliver - Rename mail_deliver_cache to mail_deliver_fields.
Stephan Bosch [Sun, 10 Mar 2019 11:13:10 +0000 (12:13 +0100)] 
lib-lda: mail-deliver - Rename mail_deliver_cache to mail_deliver_fields.

Also make the fields public.

6 years agolda: Use LDA event as mail_*user's parent event.
Stephan Bosch [Mon, 4 Mar 2019 00:15:47 +0000 (01:15 +0100)] 
lda: Use LDA event as mail_*user's parent event.

6 years agolda: Add support for event API.
Stephan Bosch [Mon, 4 Mar 2019 00:12:55 +0000 (01:12 +0100)] 
lda: Add support for event API.

6 years agolda: Assign envelope fields in mail deliver context right away.
Stephan Bosch [Mon, 4 Mar 2019 00:08:21 +0000 (01:08 +0100)] 
lda: Assign envelope fields in mail deliver context right away.

6 years agolmtp: lmtp-local - Use recipient event for mail delivery.
Stephan Bosch [Sun, 3 Mar 2019 23:30:27 +0000 (00:30 +0100)] 
lmtp: lmtp-local - Use recipient event for mail delivery.

6 years agolib-lda: mail-deliver - Add support for event API.
Stephan Bosch [Sun, 3 Mar 2019 23:28:42 +0000 (00:28 +0100)] 
lib-lda: mail-deliver - Add support for event API.

6 years agolib-lda: Initialize/deinitialize mail_deliver_context in separate functions.
Stephan Bosch [Wed, 27 Mar 2019 00:25:57 +0000 (01:25 +0100)] 
lib-lda: Initialize/deinitialize mail_deliver_context in separate functions.

This changes the allocation of parsed SMTP addresses to initially use a
datastack pool rather than the mail_deliver context pool. This is necessary
because the context is created a bit later. Upon mail_deliver_init(), the
addresses are moved to the context pool.

6 years agolda: Move mail_deliver() invocation to a separate function.
Stephan Bosch [Sun, 31 Mar 2019 14:14:06 +0000 (16:14 +0200)] 
lda: Move mail_deliver() invocation to a separate function.

6 years agolib-lda: mail-deliver - Split the mail_deliver() function to perform post-delivery...
Stephan Bosch [Mon, 4 Mar 2019 00:19:05 +0000 (01:19 +0100)] 
lib-lda: mail-deliver - Split the mail_deliver() function to perform post-delivery cleanup in one place.

6 years agolib: str - Add str_replace().
Stephan Bosch [Thu, 14 Mar 2019 23:14:05 +0000 (00:14 +0100)] 
lib: str - Add str_replace().

6 years agolib: buffer - Add buffer_replace().
Stephan Bosch [Thu, 14 Mar 2019 22:55:00 +0000 (23:55 +0100)] 
lib: buffer - Add buffer_replace().

6 years agolib: buffer - Improve header comment for buffer_insert() and buffer_delete().
Stephan Bosch [Sun, 17 Mar 2019 23:52:37 +0000 (00:52 +0100)] 
lib: buffer - Improve header comment for buffer_insert() and buffer_delete().

6 years agolib: test-istream-base64-decoder - Make random test also test CRLF vs LF line endings...
Stephan Bosch [Thu, 5 Sep 2019 11:06:28 +0000 (13:06 +0200)] 
lib: test-istream-base64-decoder - Make random test also test CRLF vs LF line endings at random.

6 years agolib: test-istream-base64-decoder - Add explicit test cases for decoding the empty...
Stephan Bosch [Thu, 5 Sep 2019 09:50:04 +0000 (11:50 +0200)] 
lib: test-istream-base64-decoder - Add explicit test cases for decoding the empty string.

6 years agolib: test-base64 - Add explicit test cases for encoding/decoding the empty string.
Stephan Bosch [Thu, 5 Sep 2019 09:45:02 +0000 (11:45 +0200)] 
lib: test-base64 - Add explicit test cases for encoding/decoding the empty string.

6 years agolib: base64 - Add assertion preventing calling base64_encode_more() after base64_enco...
Stephan Bosch [Thu, 5 Sep 2019 00:31:58 +0000 (02:31 +0200)] 
lib: base64 - Add assertion preventing calling base64_encode_more() after base64_encode_finish().

6 years agolib: test-istream-base64-decoder - Reduce minimum random stream buffer size to 1.
Stephan Bosch [Wed, 4 Sep 2019 23:13:46 +0000 (01:13 +0200)] 
lib: test-istream-base64-decoder - Reduce minimum random stream buffer size to 1.

6 years agolib: test-istream-base64-decoder - Abort random test at first error and print parameters.
Stephan Bosch [Wed, 4 Sep 2019 23:11:53 +0000 (01:11 +0200)] 
lib: test-istream-base64-decoder - Abort random test at first error and print parameters.

6 years agolib: test-istream-base64-encoder - Fix test names.
Stephan Bosch [Wed, 4 Sep 2019 21:40:25 +0000 (23:40 +0200)] 
lib: test-istream-base64-encoder - Fix test names.

6 years agolib: test-base64 - Abort random test at first error and print parameters.
Stephan Bosch [Wed, 4 Sep 2019 21:37:11 +0000 (23:37 +0200)] 
lib: test-base64 - Abort random test at first error and print parameters.

6 years agolib: test-base64 - Test Base64 encoding with maximum line length of 1.
Stephan Bosch [Wed, 4 Sep 2019 21:16:24 +0000 (23:16 +0200)] 
lib: test-base64 - Test Base64 encoding with maximum line length of 1.

This corner case is a useful test for problems in the line encoding.

6 years agolib: test-base64 - Better check output of incrementally encoded random Base64.
Stephan Bosch [Wed, 4 Sep 2019 20:52:00 +0000 (22:52 +0200)] 
lib: test-base64 - Better check output of incrementally encoded random Base64.

Check whether it is equal to the same data encoded as a single block and whether
the length matches the base64_get_full_encoded_size() output.

6 years agolib: base64 - Fix incremental/streaming Base64 encoding with CRLF line endings.
Stephan Bosch [Wed, 4 Sep 2019 20:44:03 +0000 (22:44 +0200)] 
lib: base64 - Fix incremental/streaming Base64 encoding with CRLF line endings.

Line lengths became inconsistent due to a design error. The encoding itself
remained valid. The linefeed is no longer appended to the write buffer when the
destination buffer is full. Rather, a flag is set that makes the encoder emit
the linefeed immediately next time the encoder is called with more buffer
space. Appending it to the write buffer was wrong; it in fact needs to be
prepended and in that case a flag is more efficient.

6 years agolib: base64 - Restructure base64_encode_get_size().
Stephan Bosch [Wed, 4 Sep 2019 23:17:55 +0000 (01:17 +0200)] 
lib: base64 - Restructure base64_encode_get_size().

6 years agolib: base64 - Use unsigned size type for base64_get_full_encoded_size().
Stephan Bosch [Wed, 4 Sep 2019 20:23:25 +0000 (22:23 +0200)] 
lib: base64 - Use unsigned size type for base64_get_full_encoded_size().

Makes more sense.

6 years agolib: base64 - Truly fix dest buffer assertion in base64_decode_more().
Stephan Bosch [Wed, 4 Sep 2019 16:34:30 +0000 (18:34 +0200)] 
lib: base64 - Truly fix dest buffer assertion in base64_decode_more().

Previous fix was inadequate in the presence of padding at the end of input.

6 years agolib: test-istream-base64-decoder - Use unsigned int for bit field in random test.
Stephan Bosch [Thu, 5 Sep 2019 12:21:53 +0000 (14:21 +0200)] 
lib: test-istream-base64-decoder - Use unsigned int for bit field in random test.

6 years agolib: base64 - Fix dest buffer assertion in base64_decode_more().
Stephan Bosch [Wed, 4 Sep 2019 10:33:08 +0000 (12:33 +0200)] 
lib: base64 - Fix dest buffer assertion in base64_decode_more().

The assertion is supposed to trigger when the encoder hits the buffer size limit
unexpectedly (src_pos_r==NULL means that all should be encoded at once). It
triggered erroneously when the destination buffer had the exact size needed
for the encoded data.

6 years agolib: test-istream-base64-decoder - Add extensive random base64 stream I/O unit test.
Stephan Bosch [Tue, 3 Sep 2019 19:45:35 +0000 (21:45 +0200)] 
lib: test-istream-base64-decoder - Add extensive random base64 stream I/O unit test.

6 years agolib: istream-base64-encoder - Fix handling of error, EOF and stream buffer overflow...
Stephan Bosch [Tue, 3 Sep 2019 19:44:55 +0000 (21:44 +0200)] 
lib: istream-base64-encoder - Fix handling of error, EOF and stream buffer overflow conditions.

6 years agolib: istream-base64-decoder - Fix handling of error, EOF and stream buffer overflow...
Stephan Bosch [Tue, 3 Sep 2019 19:43:31 +0000 (21:43 +0200)] 
lib: istream-base64-decoder - Fix handling of error, EOF and stream buffer overflow conditions.

6 years agolib: base64 - Restructure encoder to always fill the output buffer as much as possible.
Stephan Bosch [Tue, 3 Sep 2019 16:37:57 +0000 (18:37 +0200)] 
lib: base64 - Restructure encoder to always fill the output buffer as much as possible.

This is not strictly required, but makes the encoder easier to use in streams
and less bug-prone in incremental encoding applications in general.

6 years agolib: base64 - Allow encoding line endings one octet at a time.
Stephan Bosch [Tue, 3 Sep 2019 16:15:57 +0000 (18:15 +0200)] 
lib: base64 - Allow encoding line endings one octet at a time.

6 years agolib: base64 - Add more w_buf_len assertions to encoder.
Stephan Bosch [Tue, 3 Sep 2019 19:10:55 +0000 (21:10 +0200)] 
lib: base64 - Add more w_buf_len assertions to encoder.

6 years agolib: base64 - Use sizeof() for determining the size of the encoder w_buf.
Stephan Bosch [Tue, 3 Sep 2019 19:04:20 +0000 (21:04 +0200)] 
lib: base64 - Use sizeof() for determining the size of the encoder w_buf.

6 years agolib: base64 - Fix base64_get_full_encoded_size() for size 0.
Stephan Bosch [Tue, 3 Sep 2019 10:22:16 +0000 (12:22 +0200)] 
lib: base64 - Fix base64_get_full_encoded_size() for size 0.

6 years agolib: istream-base64-decoder - Use i_stream_try_alloc() properly.
Stephan Bosch [Mon, 2 Sep 2019 20:48:30 +0000 (22:48 +0200)] 
lib: istream-base64-decoder - Use i_stream_try_alloc() properly.

6 years agolib: istream-base64-encoder - Use i_stream_try_alloc() properly.
Stephan Bosch [Mon, 2 Sep 2019 19:56:37 +0000 (21:56 +0200)] 
lib: istream-base64-encoder - Use i_stream_try_alloc() properly.

6 years agoimap: previews/snippets requested with lazy update the caching decision
Markus Valentin [Tue, 3 Sep 2019 12:38:17 +0000 (14:38 +0200)] 
imap: previews/snippets requested with lazy update the caching decision

If lazy is true set the lookup_abort to NOT_IN_CACHE_START_CACHING
which results in the snippet field becoming wanted for caching.

6 years agolib-storage: change caching decision for lazy requests in cache lookup
Markus Valentin [Tue, 3 Sep 2019 12:33:03 +0000 (14:33 +0200)] 
lib-storage: change caching decision for lazy requests in cache lookup

In case  lookup_abort is set to NOT_IN_CACHE_START_CACHING update the
cacheing decision for the requested field.

6 years agolib-storage: introduce MAIL_LOOKUP_ABORT_NOT_IN_CACHE_START_CACHING
Markus Valentin [Tue, 3 Sep 2019 12:30:15 +0000 (14:30 +0200)] 
lib-storage: introduce MAIL_LOOKUP_ABORT_NOT_IN_CACHE_START_CACHING

In some cases we would like to mark an field as to be cached but still
don't fetch it now. For this occasions this change introduces a new enum
value for mail_lookup_abort which allows to implement such a behaviour.

6 years agolib-index: move mail_cache_decision_add to public header
Markus Valentin [Tue, 3 Sep 2019 12:16:41 +0000 (14:16 +0200)] 
lib-index: move mail_cache_decision_add to public header

To allow other components to mark fields as to be cached move the
declaration from mail-cache-private.h to mail-cache.h.

6 years agolib-ssl-iostream: Remove problematic unit tests
Aki Tuomi [Mon, 2 Sep 2019 11:09:04 +0000 (14:09 +0300)] 
lib-ssl-iostream: Remove problematic unit tests

These unit tests are unreliable with new versions of openssl
present in ubuntu 18 and debian buster.

6 years agoauth: winbind - Make static analyzer happier
Timo Sirainen [Sun, 1 Sep 2019 17:50:05 +0000 (20:50 +0300)] 
auth: winbind - Make static analyzer happier