]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
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: base64 - Add high-level data and string encode functions with data stack buffer...
Stephan Bosch [Wed, 28 Aug 2019 21:21:31 +0000 (23:21 +0200)] 
lib: base64 - Add high-level data and string encode functions with data stack buffer output.

6 years agolib: base64 - Add flags and max_line_size parameters to the new high-level encode...
Stephan Bosch [Wed, 28 Aug 2019 22:42:14 +0000 (00:42 +0200)] 
lib: base64 - Add flags and max_line_size parameters to the new high-level encode functions.

Cannot change the API of existing functions.

6 years agolib: base64 - Add high-level data decode functions with data stack buffer output.
Stephan Bosch [Wed, 28 Aug 2019 22:04:54 +0000 (00:04 +0200)] 
lib: base64 - Add high-level data decode functions with data stack buffer output.

Similar functions accepting C string input already exist.

6 years agolib: base64 - Add flags parameters to the new high-level decode functions.
Stephan Bosch [Wed, 28 Aug 2019 21:34:54 +0000 (23:34 +0200)] 
lib: base64 - Add flags parameters to the new high-level decode functions.

Cannot change the API of existing functions.

6 years agolib: base64 - Add BASE64_DECODE_FLAG_IGNORE_PADDING.
Stephan Bosch [Tue, 27 Aug 2019 23:21:01 +0000 (01:21 +0200)] 
lib: base64 - Add BASE64_DECODE_FLAG_IGNORE_PADDING.

Makes padding optional rather than either disallowed or required.

6 years agolib: base64 - Reformat flag handling in base64_decode_more().
Stephan Bosch [Tue, 27 Aug 2019 18:46:42 +0000 (20:46 +0200)] 
lib: base64 - Reformat flag handling in base64_decode_more().

6 years agolib: base64 - Remove unused assignment.
Stephan Bosch [Tue, 27 Aug 2019 18:37:40 +0000 (20:37 +0200)] 
lib: base64 - Remove unused assignment.

Found by Clang scan-build.

6 years agolib-imap: Make sure str_unescape() won't be writing past allocated memory
Timo Sirainen [Fri, 17 May 2019 07:33:53 +0000 (10:33 +0300)] 
lib-imap: Make sure str_unescape() won't be writing past allocated memory

The previous commit should already prevent this, but this makes sure it
can't become broken in the future either. It makes the performance a tiny
bit worse, but that's not practically noticeable.

6 years agolib-imap: Don't accept strings with NULs
Timo Sirainen [Fri, 10 May 2019 16:24:51 +0000 (19:24 +0300)] 
lib-imap: Don't accept strings with NULs

IMAP doesn't allow NULs except in binary literals. We'll still allow them
in regular literals as well, but just not in strings.

This fixes a bug with unescaping a string with NULs: str_unescape() could
have been called for memory that points outside the allocated string,
causing heap corruption. This could cause crashes or theoretically even
result in remote code execution exploit.

Found by Nick Roessler and Rafi Rubin

6 years agolib: base64 - Add support for decoding without padding.
Stephan Bosch [Fri, 17 May 2019 08:17:19 +0000 (10:17 +0200)] 
lib: base64 - Add support for decoding without padding.

6 years agolib: base64 - Add support for encoding without padding.
Stephan Bosch [Wed, 15 May 2019 13:36:18 +0000 (15:36 +0200)] 
lib: base64 - Add support for encoding without padding.

6 years agolib: istream-base64-encoder - Use the new low-level incremental Base64 encoding API.
Stephan Bosch [Tue, 2 Apr 2019 18:45:54 +0000 (20:45 +0200)] 
lib: istream-base64-encoder - Use the new low-level incremental Base64 encoding API.

6 years agolib: base64 - Add support for adding line breaks to encoded output.
Stephan Bosch [Mon, 1 Apr 2019 23:49:57 +0000 (01:49 +0200)] 
lib: base64 - Add support for adding line breaks to encoded output.

6 years agolib: base64 - Add base64_get_full_encoded_size().
Stephan Bosch [Wed, 15 May 2019 08:09:01 +0000 (10:09 +0200)] 
lib: base64 - Add base64_get_full_encoded_size().

6 years agolib: base64 - Add decode flag for prohibiting whitespace.
Stephan Bosch [Sat, 30 Mar 2019 17:57:34 +0000 (18:57 +0100)] 
lib: base64 - Add decode flag for prohibiting whitespace.

6 years agolib: base64 - Deprecate src_pos_r parameter of base64_decode().
Stephan Bosch [Mon, 26 Aug 2019 11:09:30 +0000 (13:09 +0200)] 
lib: base64 - Deprecate src_pos_r parameter of base64_decode().

Only NULL pointer is allowed. This allows using the new incremental API
internally, thereby dropping the old decoder implementation.

6 years agolib: istream-base64-decoder - Use the new low-level incremental Base64 decoding API.
Stephan Bosch [Sat, 30 Mar 2019 18:12:39 +0000 (19:12 +0100)] 
lib: istream-base64-decoder - Use the new low-level incremental Base64 decoding API.

6 years agolib: base64 - Properly implemenent incremental decoding.
Stephan Bosch [Sat, 30 Mar 2019 18:08:10 +0000 (19:08 +0100)] 
lib: base64 - Properly implemenent incremental decoding.

6 years agolib: base64 - Properly implemenent incremental encoding.
Stephan Bosch [Sat, 16 Mar 2019 20:19:49 +0000 (21:19 +0100)] 
lib: base64 - Properly implemenent incremental encoding.

6 years agolib: buffer - Add buffer_get_avail_size().
Stephan Bosch [Sun, 31 Mar 2019 11:18:04 +0000 (13:18 +0200)] 
lib: buffer - Add buffer_get_avail_size().

This determines how much data can be added to buffer.

6 years agolib: istream-base64 - Add support for base64url encoding.
Stephan Bosch [Wed, 13 Feb 2019 18:36:52 +0000 (19:36 +0100)] 
lib: istream-base64 - Add support for base64url encoding.

6 years agolib: base64 - Add support for base64url encoding.
Stephan Bosch [Wed, 13 Feb 2019 16:55:31 +0000 (17:55 +0100)] 
lib: base64 - Add support for base64url encoding.

6 years agolib: base64 - Make code suitable for encoding/decoding different Base64 variants.
Stephan Bosch [Wed, 13 Feb 2019 18:00:11 +0000 (19:00 +0100)] 
lib: base64 - Make code suitable for encoding/decoding different Base64 variants.

6 years agolib: base64 - Add structural comments.
Stephan Bosch [Fri, 17 May 2019 08:09:11 +0000 (10:09 +0200)] 
lib: base64 - Add structural comments.

6 years agolib: base64.h - Move size macros.
Stephan Bosch [Wed, 13 Feb 2019 18:09:43 +0000 (19:09 +0100)] 
lib: base64.h - Move size macros.

6 years agolib: base64 - Make encoding table an explicit array.
Stephan Bosch [Wed, 13 Feb 2019 18:05:38 +0000 (19:05 +0100)] 
lib: base64 - Make encoding table an explicit array.

Before, it was a string constant.

6 years agolib: base64.c - Move mapping tables.
Stephan Bosch [Wed, 13 Feb 2019 18:03:02 +0000 (19:03 +0100)] 
lib: base64.c - Move mapping tables.

6 years agolib: test-base64 - Make sure base64_decode() won't allocate any extra space
Timo Sirainen [Tue, 28 May 2019 19:44:43 +0000 (22:44 +0300)] 
lib: test-base64 - Make sure base64_decode() won't allocate any extra space

I was just considering an optimization where it would, until I realized it
could break some existing code.

6 years agolib: test-base64 - Cleanup: Use more exact test_asserts
Timo Sirainen [Tue, 28 May 2019 09:57:24 +0000 (12:57 +0300)] 
lib: test-base64 - Cleanup: Use more exact test_asserts

This way it's easier to see why tests are failing.

6 years agolib: test-base64 - Cleanup: Use the same struct for test input and output
Timo Sirainen [Tue, 28 May 2019 09:51:09 +0000 (12:51 +0300)] 
lib: test-base64 - Cleanup: Use the same struct for test input and output

6 years agolib: test-base64 - Test MAX_BASE64_{EN,DE}CODED_SIZE() with existing tests
Josef 'Jeff' Sipek [Fri, 29 Mar 2019 07:59:09 +0000 (09:59 +0200)] 
lib: test-base64 - Test MAX_BASE64_{EN,DE}CODED_SIZE() with existing tests

6 years agolib: base64 - Change MAX_BASE64_DECODED_SIZE() to be more exact
Timo Sirainen [Tue, 28 May 2019 10:35:11 +0000 (13:35 +0300)] 
lib: base64 - Change MAX_BASE64_DECODED_SIZE() to be more exact

If the input has only full base64 blocks (is divisible by 4), there's no
need to add the extra +3.

6 years agolib: base64 - Simplify MAX_BASE64_ENCODED_SIZE() calculation
Josef 'Jeff' Sipek [Thu, 28 Mar 2019 09:25:41 +0000 (11:25 +0200)] 
lib: base64 - Simplify MAX_BASE64_ENCODED_SIZE() calculation

Rely on (X + (Y - 1)) / Y being the same as ceil(X / Y) when operating on
integers.

This has a couple of benefits over the previous expression:

 1) the size argument is evaluated only once
 2) the generated code is simpler (no conditional instructions)
 3) the generated code is smaller

The generated code shrinks in terms of both bytes and instruction count.
The following table lists the number of bytes (B) and instructions (I) used
by the code before and after this change on an assortment of architectures
when the input is not known at compile time.  Unless otherwise noted, the
results are based clang 6.0.1 output.

         | before  | after  |    delta
---------+---------+--------+-------------
aarch64  | 32B  8I | 24B 6I | -25%B -25%I
amd64    | 38B 10I | 25B 5I | -34%B -50%I
amd64 [1]| 43B 10I | 31B 6I | -28%B -40%I
armv7    | 36B  9I | 24B 6I | -33%B -33%I
i386     | 32B 12I | 20B 6I | -38%B -50%I
i386 [1] | 35B 11I | 25B 7I | -29%B -36%I
ppc32    | 44B 11I | 20B 5I | -55%B -55%I
ppc64    | 52B 13I | 32B 8I | -38%B -38%I
s390x    | 74B 16I | 26B 5I | -65%B -69%I
sparcv9  | 36B  9I | 12B 3I | -66%B -66%I

[1] gcc 8.2.0

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 agolib: Fix updating timeouts after time moves backwards
Timo Sirainen [Sat, 17 Aug 2019 10:44:53 +0000 (13:44 +0300)] 
lib: Fix updating timeouts after time moves backwards

Broken by b258137d0e0618ae792e3606071a1715d26f107b

Fixes:
Panic: file ioloop.c: line 479 (timeout_get_wait_time): assertion failed: (ret > 0 && tv_r->tv_sec >= 0 && tv_r->tv_usec >= 0)

6 years agolib: timeval_add/sub_usecs() - Add assert to make sure negative values aren't used
Timo Sirainen [Sat, 17 Aug 2019 10:43:21 +0000 (13:43 +0300)] 
lib: timeval_add/sub_usecs() - Add assert to make sure negative values aren't used

The current code doesn't work correctly if negative values are used.
The code could of course be changed to handle them, but maybe assert is
better to catch bugs.

6 years agolib, lib-dcrypt: Fix unit tests to check i_stream_read() return value
Timo Sirainen [Sun, 18 Aug 2019 14:44:33 +0000 (17:44 +0300)] 
lib, lib-dcrypt: Fix unit tests to check i_stream_read() return value

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 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 agocassandra: Fix crash due to race condition with threads
Timo Sirainen [Fri, 9 Aug 2019 09:19:17 +0000 (12:19 +0300)] 
cassandra: Fix crash due to race condition with threads

Broken by changes in 0a5a2b81c266c11c34ab36b20816909dc3e715ac

The crash could happen because driver_cassandra_future_callback() can be
called any time, even before returning from driver_cassandra_set_callback().
This could result in both cb->id and cb->to being set and using the cb
after it's already freed.

6 years agocassandra: Cleanup - Move code to cassandra_callback_detach()
Timo Sirainen [Fri, 9 Aug 2019 09:18:04 +0000 (12:18 +0300)] 
cassandra: Cleanup - Move code to cassandra_callback_detach()

6 years agoauth: Drop postfix socketmap support
Aki Tuomi [Mon, 19 Nov 2018 11:22:05 +0000 (13:22 +0200)] 
auth: Drop postfix socketmap support

It no longer works with recent postfix versions, and it's too much work to fix
it.

6 years agolib-storage: Add mailbox_attribute_internal.iter()
Timo Sirainen [Wed, 14 Aug 2019 16:18:20 +0000 (19:18 +0300)] 
lib-storage: Add mailbox_attribute_internal.iter()

This mainly allows internal attributes with children to actually be able to
list the childrens' keys.

6 years agosubmission: Deny anonymous access to significant commands by default.
Stephan Bosch [Mon, 13 May 2019 22:33:28 +0000 (00:33 +0200)] 
submission: Deny anonymous access to significant commands by default.

The transaction and individual recipients can be opened for allowed anonymous
access by flagging these as such.

6 years agosubmission: submission-client - Immediately terminate connection when it is an anonym...
Stephan Bosch [Fri, 9 Aug 2019 21:13:43 +0000 (23:13 +0200)] 
submission: submission-client - Immediately terminate connection when it is an anonymous login.

Unless a plugin flags the client for allowed anonymous login.

6 years agolib-smtp: smtp-server-connection: Add smtp_server_connection_abort().
Stephan Bosch [Fri, 9 Aug 2019 21:10:59 +0000 (23:10 +0200)] 
lib-smtp: smtp-server-connection: Add smtp_server_connection_abort().

Provides a clean method to abort the connection before it is even started.

6 years agologin-common: Deny anonymous login by default.
Stephan Bosch [Mon, 12 Aug 2019 20:10:24 +0000 (22:10 +0200)] 
login-common: Deny anonymous login by default.

Only services that explicitly enable anonymous logins will permit them. Plugins
can also mask anonymous logins by dropping the anonymous reply flag in the
sasl_check_login() client vfunc.

6 years agologin-common: sasl-server - Make sasl_server_auth_cancel() suitable for cancelling...
Stephan Bosch [Mon, 12 Aug 2019 23:18:57 +0000 (01:18 +0200)] 
login-common: sasl-server - Make sasl_server_auth_cancel() suitable for cancelling requests in login phase.

6 years agologin-common: client-common - Add sasl_check_login() vfunc.
Stephan Bosch [Mon, 12 Aug 2019 21:33:11 +0000 (23:33 +0200)] 
login-common: client-common - Add sasl_check_login() vfunc.

This allows checking the auth service success reply before commencing the actual
login.

6 years agologin-common: sasl-server - Make private authentication mechanisms unavailable for...
Stephan Bosch [Fri, 9 Aug 2019 21:44:39 +0000 (23:44 +0200)] 
login-common: sasl-server - Make private authentication mechanisms unavailable for normal authentication.

These mechanisms can only be used when the authentication is explicitly marked
as private.

6 years agologin-common: sasl-server - Add means to filter the available SASL mechanisms.
Stephan Bosch [Wed, 7 Aug 2019 23:56:17 +0000 (01:56 +0200)] 
login-common: sasl-server - Add means to filter the available SASL mechanisms.

This is accessible as a new client vfunc, so it can be used by protocol login
services and their plugins.

6 years agopop3-login: client - Use sasl_server_find_available_mech() instead of auth_client_fin...
Stephan Bosch [Fri, 9 Aug 2019 21:27:21 +0000 (23:27 +0200)] 
pop3-login: client - Use sasl_server_find_available_mech() instead of auth_client_find_mech().

6 years agoimap-login: imap-login-client - Use sasl_server_find_available_mech() instead of...
Stephan Bosch [Fri, 9 Aug 2019 21:26:54 +0000 (23:26 +0200)] 
imap-login: imap-login-client - Use sasl_server_find_available_mech() instead of auth_client_find_mech().

6 years agologin-common: sasl-server - Add sasl_server_find_available_mech().
Stephan Bosch [Fri, 9 Aug 2019 21:22:01 +0000 (23:22 +0200)] 
login-common: sasl-server - Add sasl_server_find_available_mech().

This is a wrapper for auth_client_find_mech(). This will be extended with
filtering in next commits.

6 years agosubmission-login: client.c - Use designated initializer for struct client_vfuncs.
Stephan Bosch [Wed, 7 Aug 2019 23:55:26 +0000 (01:55 +0200)] 
submission-login: client.c - Use designated initializer for struct client_vfuncs.

6 years agopop3-login: client.c - Use designated initializer for struct client_vfuncs.
Stephan Bosch [Wed, 7 Aug 2019 23:55:09 +0000 (01:55 +0200)] 
pop3-login: client.c - Use designated initializer for struct client_vfuncs.

6 years agoimap-urlauth: imap-urlauth-login.c - Use designated initializer for struct client_vfuncs.
Stephan Bosch [Wed, 7 Aug 2019 23:54:26 +0000 (01:54 +0200)] 
imap-urlauth: imap-urlauth-login.c - Use designated initializer for struct client_vfuncs.

6 years agoimap-login: imap-login-client.c - Use designated initializer for struct client_vfuncs.
Stephan Bosch [Wed, 7 Aug 2019 23:53:52 +0000 (01:53 +0200)] 
imap-login: imap-login-client.c - Use designated initializer for struct client_vfuncs.

6 years agolib-storage: mail-user - Add auth_mech field to struct mail_user.
Stephan Bosch [Tue, 6 Aug 2019 20:09:53 +0000 (22:09 +0200)] 
lib-storage: mail-user - Add auth_mech field to struct mail_user.

6 years agolib-storage: mail-storage-service - Parse "auth_mech" field from userdb extra fields.
Stephan Bosch [Tue, 6 Aug 2019 20:08:54 +0000 (22:08 +0200)] 
lib-storage: mail-storage-service - Parse "auth_mech" field from userdb extra fields.

6 years agologin-common: sasl-server - Parse "anonymous" field in AUTH reply.
Stephan Bosch [Mon, 12 Aug 2019 21:12:01 +0000 (23:12 +0200)] 
login-common: sasl-server - Parse "anonymous" field in AUTH reply.

6 years agoauth: auth-request-handler - Return "auth_mech" field in master REQUEST reply.
Stephan Bosch [Tue, 6 Aug 2019 19:52:23 +0000 (21:52 +0200)] 
auth: auth-request-handler - Return "auth_mech" field in master REQUEST reply.

It contains the name of the mechanism used in the authentication.

6 years agoauth: auth-request-handler - Return "anonymous" field for AUTH command that yields...
Stephan Bosch [Mon, 12 Aug 2019 19:06:51 +0000 (21:06 +0200)] 
auth: auth-request-handler - Return "anonymous" field for AUTH command that yields anonymous user.

6 years agologin-common: Fix sending locally-generated authentication error reason to client.
Stephan Bosch [Fri, 9 Aug 2019 22:33:21 +0000 (00:33 +0200)] 
login-common: Fix sending locally-generated authentication error reason to client.

This is about authentication errors that emerge at the login service rather than
the auth service. The error reason was always substituted with an unhelpful
"Authentication failed", while e.g. an error like "Unsupported authentication
mechanism" was supposed to be sent instead.

6 years agoimap: Only send NIL on GETMETADATA when query depth is 0
Martti Rannanjärvi [Fri, 9 Aug 2019 11:07:58 +0000 (14:07 +0300)] 
imap: Only send NIL on GETMETADATA when query depth is 0

6 years agoimap: GETMETADATA: Ignore MAIL_ERROR_NOTPOSSIBLE errors when using DEPTH parameter
Timo Sirainen [Wed, 7 Aug 2019 12:46:39 +0000 (15:46 +0300)] 
imap: GETMETADATA: Ignore MAIL_ERROR_NOTPOSSIBLE errors when using DEPTH parameter

This most likely means that imap_metadata=no, but the client still wants to
fetch recursively validated metadata entries. This should return in OK
instead of NO reply.

6 years agoauth: Do not unref policy payload too early
Aki Tuomi [Tue, 6 Aug 2019 05:44:18 +0000 (08:44 +0300)] 
auth: Do not unref policy payload too early

This can cause the context to be free'd too early leading
to crashes.

6 years agolib-imap-metadata: setting metadata literal value does not delete it
Markus Valentin [Fri, 2 Aug 2019 13:57:09 +0000 (15:57 +0200)] 
lib-imap-metadata: setting metadata literal value does not delete it

Only if value and value_stream are NULL the metadata can be unset.

6 years agorun-test-valgrind.supp: Add libunwind supression
Timo Sirainen [Wed, 17 Jul 2019 08:53:39 +0000 (11:53 +0300)] 
run-test-valgrind.supp: Add libunwind supression

6 years agolib-smtp: Fix encoding quoted localparts that end with "."
Timo Sirainen [Tue, 30 Jul 2019 11:15:11 +0000 (14:15 +0300)] 
lib-smtp: Fix encoding quoted localparts that end with "."

For example "user..@example.com" or "user..test.@example.com" resulted
in an extra '"' prefix.