]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
2 years agoglobal: Replace most master_service_settings_get_others() calls with master_service_s...
Timo Sirainen [Sat, 26 Feb 2022 21:44:37 +0000 (22:44 +0100)] 
global: Replace most master_service_settings_get_others() calls with master_service_settings_get_root_set()

2 years agolib-master: Add master_service_settings_get_root_set()
Timo Sirainen [Sat, 26 Feb 2022 21:37:17 +0000 (22:37 +0100)] 
lib-master: Add master_service_settings_get_root_set()

2 years agoglobal: Replace most master_service_settings_parser_get_others() calls with settings_...
Timo Sirainen [Sat, 26 Feb 2022 21:34:51 +0000 (22:34 +0100)] 
global: Replace most master_service_settings_parser_get_others() calls with settings_parser_get_root_set()

2 years agolib-storage: Remove unused mail_storage_service_get_settings()
Timo Sirainen [Sat, 26 Feb 2022 21:27:35 +0000 (22:27 +0100)] 
lib-storage: Remove unused mail_storage_service_get_settings()

2 years agolib-settings: Add settings_parser_get_root_set()
Timo Sirainen [Sat, 26 Feb 2022 21:16:33 +0000 (22:16 +0100)] 
lib-settings: Add settings_parser_get_root_set()

To make this work, for now we need to have a pointer to the original
struct setting_parser_info before dynamic parsers reallocate it. After
removing dynamic parsers this orig_info can be removed as well.

2 years agolib-settings: Remove unused settings_vars_have_key()
Timo Sirainen [Sat, 26 Feb 2022 20:21:50 +0000 (21:21 +0100)] 
lib-settings: Remove unused settings_vars_have_key()

2 years agolib-storage: mail_user_init() - Assert that function is called only once
Timo Sirainen [Thu, 17 Nov 2022 13:56:31 +0000 (15:56 +0200)] 
lib-storage: mail_user_init() - Assert that function is called only once

2 years agolib-storage: Change %home variable into function
Timo Sirainen [Sat, 26 Feb 2022 20:20:23 +0000 (21:20 +0100)] 
lib-storage: Change %home variable into function

This way home directory can be looked up on-demand rather than having to
go through all settings to find out if it's needed.

2 years agolib-storage: Fix calling mail_user_get_mail_home() during user initialization
Timo Sirainen [Thu, 17 Nov 2022 17:04:54 +0000 (19:04 +0200)] 
lib-storage: Fix calling mail_user_get_mail_home() during user initialization

When it's not already known that settings have been expanded, access
mail_home via unexpanded settings. This guarantees that the setting
hasn't been expanded yet. There's no guarantee whether user->set has
been expanded or not during mail_user_init().

2 years agolib: var-expand - Support single character variable functions
Timo Sirainen [Sat, 26 Feb 2022 20:07:17 +0000 (21:07 +0100)] 
lib: var-expand - Support single character variable functions

If the function name is "f", it's possible to use both %f and %{f} to
access the function.

2 years agolib-dns: Test that background cache refresh works when lookup starts failing
Aki Tuomi [Fri, 25 Nov 2022 13:28:22 +0000 (15:28 +0200)] 
lib-dns: Test that background cache refresh works when lookup starts failing

2 years agolib-dns: Assign client to context
Aki Tuomi [Fri, 25 Nov 2022 13:06:27 +0000 (15:06 +0200)] 
lib-dns: Assign client to context

Fixes signal 11 crash when background cache refresh fails, forgotten in
47f44374201e83ade6204bb237b163fbd066134a

2 years agodoveadm: Remove oldstats leftovers
Marco Bettini [Thu, 24 Nov 2022 09:12:39 +0000 (09:12 +0000)] 
doveadm: Remove oldstats leftovers

2 years agolib-smtp: Free client_transport on destroy
Aki Tuomi [Mon, 28 Nov 2022 18:35:33 +0000 (20:35 +0200)] 
lib-smtp: Free client_transport on destroy

Plug a memory leak introduced by
a995ca1185afe80dd6819a856ca079ca4aae5126

2 years agolib-fts: fts_filter_stemmer_snowball_filter() - Handle cases where the stemmer return...
Marco Bettini [Tue, 22 Nov 2022 14:28:53 +0000 (14:28 +0000)] 
lib-fts: fts_filter_stemmer_snowball_filter() - Handle cases where the stemmer returns no tokens

Fixes an issue raised originally against flatcurve in GitHub Issue #37,
where in some combination of languages and filters, the indexing crashes.
The ultimate cause was the improper assumption that snowball ALWAYS returns
a token, which happens to not be true.

2 years agofts-flatcurve: fts_flatcurve_xapian_index_body() - Explicit sign conversion between...
Marco Bettini [Wed, 23 Nov 2022 10:40:57 +0000 (10:40 +0000)] 
fts-flatcurve: fts_flatcurve_xapian_index_body() - Explicit sign conversion between char and unsigned char

2 years agologin-common: Fix for infinite recursion on invalid var expansion in login_log_format...
Marco Bettini [Wed, 23 Nov 2022 09:51:39 +0000 (09:51 +0000)] 
login-common: Fix for infinite recursion on invalid var expansion in login_log_format_elements and/or login_log_format

Broken by 0a3997e1c64f48529338a9f93d7c39381dfe4f72

2 years agofts-flatcurve: Fix queries with non character-based searches
Marco Bettini [Thu, 17 Nov 2022 15:59:02 +0000 (15:59 +0000)] 
fts-flatcurve: Fix queries with non character-based searches

Xapian::QueryParser tries to tokenize phrases with non-letters (at least
in certain situations), so this was leading to strange behavior when
searching for e-mail addresses.

Solution: manually create queries using low-level Xapian::Query commands
to precisely define the query. Has the added benefit of making the code
more compact and easier to read.

Fixes GitHub Issue #35

2 years agofts-flatcurve: Simplify handling of phrase queries
Marco Bettini [Thu, 17 Nov 2022 15:10:56 +0000 (15:10 +0000)] 
fts-flatcurve: Simplify handling of phrase queries

Dovecot FTS drivers can't properly support phrase searching (as of
v2.3.19), so simply ignore these queries in flatcurve. Both IMAP
searches and doveadm searches will pass both the phrase and the
component terms as part of the query, so no need to split the phrases
in the plugin.

2 years agofts: fts_expunge_log_read_end() - Always unlink corrupted log files
Marco Bettini [Fri, 18 Nov 2022 15:31:03 +0000 (15:31 +0000)] 
fts: fts_expunge_log_read_end() - Always unlink corrupted log files

Broken by 87b5c1fc03945708726c175d540fd307f7f78480

2 years agofts: fts_expunge_log_flatten() - Fix event and memory leak
Marco Bettini [Fri, 18 Nov 2022 16:11:53 +0000 (16:11 +0000)] 
fts: fts_expunge_log_flatten() - Fix event and memory leak

2 years agoauth: Add support for ARGON2 scheme
Marco Bettini [Tue, 22 Nov 2022 09:47:06 +0000 (09:47 +0000)] 
auth: Add support for ARGON2 scheme

2 years agodsync: Add assert to make scan-build happy again
Timo Sirainen [Wed, 23 Nov 2022 14:00:39 +0000 (16:00 +0200)] 
dsync: Add assert to make scan-build happy again

Broken by 0f67c79e48fa783b658606a99cf18db8daf7884e

2 years agoglobal: Use mail_user_var_expand() where possible
Timo Sirainen [Sun, 27 Feb 2022 19:26:16 +0000 (20:26 +0100)] 
global: Use mail_user_var_expand() where possible

This makes it possible to use %variable functions (e.g. %{userdb:*}) for
these settings.

2 years agolib-storage: Add mail_user_var_expand()
Timo Sirainen [Sun, 27 Feb 2022 19:21:30 +0000 (20:21 +0100)] 
lib-storage: Add mail_user_var_expand()

2 years agoglobal: Drop berkley db support leftovers
Marco Bettini [Mon, 21 Nov 2022 11:39:16 +0000 (11:39 +0000)] 
global: Drop berkley db support leftovers

Berkeley DB support was already removed in d5acb577,
but these changes had been left behind at that time.

2 years agolib: Add unit tests for new interval-parsing in event-filter-parser
Karl Fleischmann [Mon, 14 Nov 2022 13:47:15 +0000 (14:47 +0100)] 
lib: Add unit tests for new interval-parsing in event-filter-parser

2 years agolib: Try to interpret filter values as intervals when parsing integer event values
Karl Fleischmann [Fri, 11 Nov 2022 14:42:01 +0000 (15:42 +0100)] 
lib: Try to interpret filter values as intervals when parsing integer event values

This allows event filter values to be given as "1days" or "1week". This
is only done after parsing sizes and thus sizes takes precedences. Thus
for ambiguous units like "M" sizes are used before intervals (e.g. "1M"
= "1024 * 1024" and not "1M" = "60 * 60 * 1000 * 1000").

2 years agologin-common: Report proxy-idle value as microseconds
Karl Fleischmann [Tue, 15 Nov 2022 15:25:56 +0000 (16:25 +0100)] 
login-common: Report proxy-idle value as microseconds

To be consistent with other event attributes this value should be
reported as microseconds instead of seconds.

2 years agologin-common: Refactor proxy_last_io to use the full timeval struct
Karl Fleischmann [Tue, 15 Nov 2022 15:20:08 +0000 (16:20 +0100)] 
login-common: Refactor proxy_last_io to use the full timeval struct

Instead of getting the last proxy io by second-value alone this commit
uses the microseconds as well. The existing API is not altered.

2 years agolib: Add unit tests for new size-parsing in event-filter-parser
Karl Fleischmann [Fri, 28 Oct 2022 09:10:26 +0000 (11:10 +0200)] 
lib: Add unit tests for new size-parsing in event-filter-parser

2 years agolib: Try to interpret filter values as sizes when parsing integer event values
Karl Fleischmann [Thu, 10 Nov 2022 12:28:54 +0000 (13:28 +0100)] 
lib: Try to interpret filter values as sizes when parsing integer event values

This allows event filter values to be given as "16M" or "1G".

2 years agolib: Outfactor numeric event comparison
Karl Fleischmann [Thu, 10 Nov 2022 12:27:35 +0000 (13:27 +0100)] 
lib: Outfactor numeric event comparison

This function is later reused for size comparisons.

2 years agoglobal: Replace settings_get_time*() with str_parse_get_interval*() in project
Karl Fleischmann [Wed, 26 Oct 2022 15:12:27 +0000 (17:12 +0200)] 
global: Replace settings_get_time*() with str_parse_get_interval*() in project

2 years agoglobal: Replace settings_get_bool() with str_parse_get_bool() in project
Karl Fleischmann [Wed, 26 Oct 2022 15:06:02 +0000 (17:06 +0200)] 
global: Replace settings_get_bool() with str_parse_get_bool() in project

2 years agoglobal: Replace settings_get_size() with str_parse_get_size() in project
Karl Fleischmann [Wed, 26 Oct 2022 15:03:08 +0000 (17:03 +0200)] 
global: Replace settings_get_size() with str_parse_get_size() in project

2 years agolib, lib-settings: Move string-parse functions for bool/size/interval into lib
Karl Fleischmann [Wed, 26 Oct 2022 14:57:08 +0000 (16:57 +0200)] 
lib, lib-settings: Move string-parse functions for bool/size/interval into lib

Including the tests. Call the new functions from the existing
settings-functions. These will be removed in a later commit.

2 years agolib-storage: mail_search_args_simplify_drop_redundant_args() - Apply Absorptive law...
Marco Bettini [Wed, 9 Nov 2022 15:29:39 +0000 (15:29 +0000)] 
lib-storage: mail_search_args_simplify_drop_redundant_args() - Apply Absorptive law versus all terms, not just the 1st

2 years agodoc: Use html and man pages from doc.dovecot.org
Aki Tuomi [Thu, 17 Nov 2022 19:53:01 +0000 (21:53 +0200)] 
doc: Use html and man pages from doc.dovecot.org

2 years agolmtp: Fix restoring global log prefix after session is finished
Timo Sirainen [Mon, 14 Nov 2022 21:27:33 +0000 (23:27 +0200)] 
lmtp: Fix restoring global log prefix after session is finished

Broken by 069dfd657fd91a0e2a3a9307a0cf499d795f27f2

This change also slightly changes the lmtp log prefixes in some places.
It removes "conn $ip:$port [$idx]: rcpt $user:" from some of the log
messages (but that wasn't in all of the log messages anyway), but it now
always includes mail_log_prefix in these log messages, which previously
wasn't always set at that point yet.

2 years agolmtp: Add support for haproxy SSL flag
Timo Sirainen [Mon, 14 Nov 2022 14:33:33 +0000 (16:33 +0200)] 
lmtp: Add support for haproxy SSL flag

2 years agologin-common: Check that ssl=required is not used with auth_allow_cleartext=yes
Aki Tuomi [Thu, 20 Oct 2022 11:02:09 +0000 (14:02 +0300)] 
login-common: Check that ssl=required is not used with auth_allow_cleartext=yes

2 years agologin-common: Clarify client error when login attempted without TLS
Aki Tuomi [Tue, 4 Oct 2022 09:37:44 +0000 (12:37 +0300)] 
login-common: Clarify client error when login attempted without TLS

2 years agologin-common: ssl=required now requires TLS also for non-TLS/localhost haproxy connec...
Timo Sirainen [Mon, 14 Nov 2022 15:07:52 +0000 (17:07 +0200)] 
login-common: ssl=required now requires TLS also for non-TLS/localhost haproxy connections

2 years agologin-common: ssl=required now requires TLS also for trusted connections
Timo Sirainen [Fri, 4 Nov 2022 23:10:57 +0000 (01:10 +0200)] 
login-common: ssl=required now requires TLS also for trusted connections

2 years agolib-storage: Rename mail_user_connection_data.ssl_secured to end_client_tls_secured
Timo Sirainen [Fri, 4 Nov 2022 20:47:56 +0000 (22:47 +0200)] 
lib-storage: Rename mail_user_connection_data.ssl_secured to end_client_tls_secured

2 years agolib-login: Rename LOGIN_REQUEST_FLAG_CONN_SSL_SECURED to ..._FLAG_END_CLIENT_SECURED_TLS
Timo Sirainen [Fri, 4 Nov 2022 20:43:34 +0000 (22:43 +0200)] 
lib-login: Rename LOGIN_REQUEST_FLAG_CONN_SSL_SECURED to ..._FLAG_END_CLIENT_SECURED_TLS

2 years agolmtp: Forward end_client_tls_secured state through proxies
Timo Sirainen [Fri, 4 Nov 2022 21:00:58 +0000 (23:00 +0200)] 
lmtp: Forward end_client_tls_secured state through proxies

2 years ago*-login: Forward end_client_tls_secured state through proxies
Timo Sirainen [Fri, 4 Nov 2022 20:37:43 +0000 (22:37 +0200)] 
*-login: Forward end_client_tls_secured state through proxies

2 years agolib-smtp: Add XCLIENT CLIENT-TRANSPORT field
Timo Sirainen [Fri, 4 Nov 2022 20:33:37 +0000 (22:33 +0200)] 
lib-smtp: Add XCLIENT CLIENT-TRANSPORT field

2 years agolib-login: Remove LOGIN_REQUEST_FLAG_CONN_SECURED
Timo Sirainen [Fri, 4 Nov 2022 20:39:34 +0000 (22:39 +0200)] 
lib-login: Remove LOGIN_REQUEST_FLAG_CONN_SECURED

2 years agolib-storage: Remove unused mail_user_connection_data.secured
Timo Sirainen [Fri, 4 Nov 2022 20:47:17 +0000 (22:47 +0200)] 
lib-storage: Remove unused mail_user_connection_data.secured

2 years agolib-storage: Remove mail_storage_service_input.conn_secured
Timo Sirainen [Fri, 4 Nov 2022 20:15:22 +0000 (22:15 +0200)] 
lib-storage: Remove mail_storage_service_input.conn_secured

This isn't actually used by anything, and it's rather ambiguous how it's
supposed to work through proxies.

2 years agologin-common: Handle haproxy's TLS terminated connections same as if Dovecot did...
Timo Sirainen [Fri, 4 Nov 2022 19:58:30 +0000 (21:58 +0200)] 
login-common: Handle haproxy's TLS terminated connections same as if Dovecot did TLS termination

If haproxy is running on localhost, this is clearly the case. If haproxy
is not running on localhost, it's a bit more ambiguous. It is possible to
configure haproxy to do TLS termination and then use another TLS connection
towards Dovecot, but this is likely a not so common configuration. More
likely the intention is that if haproxy has done TLS termination, it should
be handle the same as if Dovecot had done it.

This commit doesn't actually change any behavior. It just makes the tls
variables work in a more consistent way.

2 years agologin-common: Connections from haproxy are always considered secured
Timo Sirainen [Fri, 4 Nov 2022 21:50:49 +0000 (23:50 +0200)] 
login-common: Connections from haproxy are always considered secured

Similarly to non-haproxy connections from login_trusted_networks are
considered secured, connections from haproxy_trusted_networks should also be
considered secured.

2 years agolb-auth, auth: Change transport=trusted to transport=secured in event fields
Timo Sirainen [Fri, 4 Nov 2022 19:36:52 +0000 (21:36 +0200)] 
lb-auth, auth: Change transport=trusted to transport=secured in event fields

Using "trusted" word here is wrong/confusing. Login process uses both
"trusted" and "secured" words in connections to mean different things.

2 years agologin-common: Fix logging %{secured} and %{ssl_security} for haproxy TLS connections
Timo Sirainen [Fri, 4 Nov 2022 19:22:15 +0000 (21:22 +0200)] 
login-common: Fix logging %{secured} and %{ssl_security} for haproxy TLS connections

It should have been logged as TLS (proxied), but this had never worked.
Instead, it was logged simply as "secured".

2 years ago*-login: Don't advertise/allow STARTTLS if haproxy already terminated TLS
Timo Sirainen [Thu, 3 Nov 2022 17:12:46 +0000 (19:12 +0200)] 
*-login: Don't advertise/allow STARTTLS if haproxy already terminated TLS

2 years agoauth: Rename "secured" variable/enum to "conn_secured"
Timo Sirainen [Fri, 4 Nov 2022 20:08:21 +0000 (22:08 +0200)] 
auth: Rename "secured" variable/enum to "conn_secured"

2 years agolib-auth: Rename AUTH_REQUEST_FLAG_TRANSPORT_SECURITY_TLS to AUTH_REQUEST_FLAG_CONN_S...
Timo Sirainen [Fri, 4 Nov 2022 19:52:53 +0000 (21:52 +0200)] 
lib-auth: Rename AUTH_REQUEST_FLAG_TRANSPORT_SECURITY_TLS to AUTH_REQUEST_FLAG_CONN_SECURED_TLS

2 years agolib-auth: Rename AUTH_REQUEST_FLAG_SECURED to AUTH_REQUEST_FLAG_CONN_SECURED
Timo Sirainen [Fri, 4 Nov 2022 19:45:54 +0000 (21:45 +0200)] 
lib-auth: Rename AUTH_REQUEST_FLAG_SECURED to AUTH_REQUEST_FLAG_CONN_SECURED

2 years agologin-common: Rename client.trusted to connection_trusted
Timo Sirainen [Thu, 3 Nov 2022 17:18:03 +0000 (19:18 +0200)] 
login-common: Rename client.trusted to connection_trusted

2 years agologin-common: Rename client.starttls to connection_used_starttls
Timo Sirainen [Thu, 3 Nov 2022 17:15:13 +0000 (19:15 +0200)] 
login-common: Rename client.starttls to connection_used_starttls

2 years agologin-common: Rename client.proxied_ssl to haproxy_terminated_tls
Timo Sirainen [Thu, 3 Nov 2022 17:11:11 +0000 (19:11 +0200)] 
login-common: Rename client.proxied_ssl to haproxy_terminated_tls

2 years agologin-common: Rename client.tls to connection_tls_secured
Timo Sirainen [Thu, 3 Nov 2022 17:08:10 +0000 (19:08 +0200)] 
login-common: Rename client.tls to connection_tls_secured

2 years agologin-common: Rename client.ssl_secured to end_client_tls_secured
Timo Sirainen [Thu, 3 Nov 2022 16:57:22 +0000 (18:57 +0200)] 
login-common: Rename client.ssl_secured to end_client_tls_secured

Also note in the comment that this behavior is currently broken on a
proxying setup.

2 years agolib-master: Rename "proxy" connections to "haproxy"
Timo Sirainen [Thu, 3 Nov 2022 17:22:07 +0000 (19:22 +0200)] 
lib-master: Rename "proxy" connections to "haproxy"

We already have a Dovecot proxy, and naming haproxy connections simply as
"proxy" just causes confusion. If we end up supporting other types of
proxy protocols later on, we can try to figure out a better name.

2 years agologin-common: Rename client.secured to connection_secured
Timo Sirainen [Thu, 3 Nov 2022 16:49:18 +0000 (18:49 +0200)] 
login-common: Rename client.secured to connection_secured

2 years agolib: event-filter - Ensure 0 can be matched correctly in filters
Aki Tuomi [Tue, 15 Nov 2022 11:44:46 +0000 (13:44 +0200)] 
lib: event-filter - Ensure 0 can be matched correctly in filters

Allow matching fields with > 0, priorly this would have always been
treated as string equality / wildcard match, instead we now want
to match it as number. Forgotten in 61cb32860f5237c5d928a7fed8a89f783c2f9b30

This fixes a signal 11 crash with equality comparison with a
non-wildcard value. Broken in aefe4941c14c6001a9d09fbc3122aca1417d00a8

2 years agolib: event-filter - Fix matching duration field
Aki Tuomi [Tue, 15 Nov 2022 11:22:16 +0000 (13:22 +0200)] 
lib: event-filter - Fix matching duration field

If duration field is used in event filter, it cannot be matched
here as no such field exists. We need to actually synthesize the
field here for matching.

2 years agolib-http: http-url - Make sure url->have_ssl is properly initialized in http_url_requ...
Stephan Bosch [Thu, 10 Nov 2022 01:50:02 +0000 (02:50 +0100)] 
lib-http: http-url - Make sure url->have_ssl is properly initialized in http_url_request_target_parse().

This fixes the problem that the HTTP server does not yield proper HTTPS urls for
incoming requests.

2 years agolib-oauth2: jwt - Allow missing 'typ' field
Aki Tuomi [Wed, 2 Nov 2022 13:56:54 +0000 (15:56 +0200)] 
lib-oauth2: jwt - Allow missing 'typ' field

2 years agolib-oauth2: test-oauth2-jwt - Ensure we ignore 'none' algorithm
Aki Tuomi [Thu, 28 May 2020 12:05:08 +0000 (15:05 +0300)] 
lib-oauth2: test-oauth2-jwt - Ensure we ignore 'none' algorithm

2 years agolib-storage: Tolerate but warn about unknown special_use labels
Karl Fleischmann [Fri, 21 Oct 2022 15:32:29 +0000 (17:32 +0200)] 
lib-storage: Tolerate but warn about unknown special_use labels

2 years agolib-ssl-iostream: Do not unref DH parameters too soon
Aki Tuomi [Fri, 4 Nov 2022 10:27:11 +0000 (12:27 +0200)] 
lib-ssl-iostream: Do not unref DH parameters too soon

SSL_CTX_set0_tmp_dh_pkey moves references to SSL_CTX which
frees the DH parameters itself.

Broken by 124c491aa688eec146c21718f0d98aec9ae03294

2 years agodsync: Skip autocreated mailboxes that haven't been created yet
Timo Sirainen [Thu, 3 Nov 2022 15:40:28 +0000 (17:40 +0200)] 
dsync: Skip autocreated mailboxes that haven't been created yet

2 years agoimapc: Fix listing INBOX when INBOX is already the namespace prefix
Timo Sirainen [Fri, 4 Nov 2022 12:01:14 +0000 (14:01 +0200)] 
imapc: Fix listing INBOX when INBOX is already the namespace prefix

This especially caused problems when using dsync with imapc, resulting in
"Remote lost mailbox GUID" errors.

2 years agolib-index/test-mail-index-transaction-update.c: Cleanup timezone instances
Dimitry Andric [Wed, 14 Sep 2022 10:26:50 +0000 (12:26 +0200)] 
lib-index/test-mail-index-transaction-update.c: Cleanup timezone instances

In 1a7b1f66fe the non-standard extern timezone was partially removed,
but some instances were left. Since the test is supposed to run with
TZ=UTC, and timezone would have been zero anyway, remove them all.

2 years agolib-dcrypt: Remove pointless else-if
Aki Tuomi [Thu, 3 Nov 2022 11:46:11 +0000 (13:46 +0200)] 
lib-dcrypt: Remove pointless else-if

2 years agolib-dcrypt: Initialize EVP_PKEY when loading JWK key
Aki Tuomi [Thu, 3 Nov 2022 11:44:48 +0000 (13:44 +0200)] 
lib-dcrypt: Initialize EVP_PKEY when loading JWK key

Satisfies static analysers

2 years agoTODO: Remove mention on GnuTLS
Aki Tuomi [Wed, 26 Oct 2022 16:42:17 +0000 (19:42 +0300)] 
TODO: Remove mention on GnuTLS

2 years agom4: ssl.m4 - Drop unused checks
Aki Tuomi [Wed, 26 Oct 2022 12:38:56 +0000 (15:38 +0300)] 
m4: ssl.m4 - Drop unused checks

2 years agolib-crypto: Slightly reformat test-crypto.c
Aki Tuomi [Wed, 26 Oct 2022 11:53:25 +0000 (14:53 +0300)] 
lib-crypto: Slightly reformat test-crypto.c

2 years agolib-dcrypt: Add OpenSSLv3 support
Aki Tuomi [Wed, 26 Oct 2022 09:21:59 +0000 (12:21 +0300)] 
lib-dcrypt: Add OpenSSLv3 support

2 years agolib-dcrypt: test-crypto - Allow newline at end of PEM output
Aki Tuomi [Wed, 26 Oct 2022 09:20:58 +0000 (12:20 +0300)] 
lib-dcrypt: test-crypto - Allow newline at end of PEM output

2 years agolib-dcrypt: test-crypto - Add missing x9.62 roundtrip test
Aki Tuomi [Wed, 26 Oct 2022 09:18:52 +0000 (12:18 +0300)] 
lib-dcrypt: test-crypto - Add missing x9.62 roundtrip test

2 years agolib-dcrypt: Rename dcrypt-openssl.c to dcrypt-openssl1.c
Aki Tuomi [Wed, 26 Oct 2022 09:15:47 +0000 (12:15 +0300)] 
lib-dcrypt: Rename dcrypt-openssl.c to dcrypt-openssl1.c

2 years agolib-dcrypt: Add asserts to key ID and Usage accessors
Aki Tuomi [Tue, 1 Nov 2022 11:11:28 +0000 (13:11 +0200)] 
lib-dcrypt: Add asserts to key ID and Usage accessors

2 years agolib-dcrypt: Make error_r required
Aki Tuomi [Tue, 1 Nov 2022 10:55:36 +0000 (12:55 +0200)] 
lib-dcrypt: Make error_r required

2 years agoglobal: Call dcrypt always with error_r
Aki Tuomi [Tue, 1 Nov 2022 10:54:11 +0000 (12:54 +0200)] 
global: Call dcrypt always with error_r

2 years agolib-dcrytp: istream-decrypt - Report DER decoding issues
Aki Tuomi [Tue, 1 Nov 2022 11:02:22 +0000 (13:02 +0200)] 
lib-dcrytp: istream-decrypt - Report DER decoding issues

Fixes possibility of DER object decode error being reported
as truncation.

2 years agolib-dcrypt: Improve OpenSSL error handling
Aki Tuomi [Tue, 1 Nov 2022 10:29:40 +0000 (12:29 +0200)] 
lib-dcrypt: Improve OpenSSL error handling

Will now try to get the error more thoroughly and handles out of memory
correctly.

2 years agolib-ssl-iostream: Fix compability with OpenSSL 3.0
Aki Tuomi [Mon, 24 Oct 2022 11:05:46 +0000 (14:05 +0300)] 
lib-ssl-iostream: Fix compability with OpenSSL 3.0

2 years agolib-ssl-iostream: Do not attempt to load empty DH parameters
Aki Tuomi [Mon, 31 Oct 2022 09:08:49 +0000 (11:08 +0200)] 
lib-ssl-iostream: Do not attempt to load empty DH parameters

OpenSSL3 complains about empty DH parameters.

2 years agolib-ssl-iostream: Use EVP_PKEY to wrap DH parameters
Aki Tuomi [Mon, 31 Oct 2022 09:00:43 +0000 (11:00 +0200)] 
lib-ssl-iostream: Use EVP_PKEY to wrap DH parameters

Simplifies OpenSSL 3.0 compability

2 years agolib-ssl-iostream: Remove support for pre-1.0.2 OpenSSL
Aki Tuomi [Mon, 31 Oct 2022 08:59:29 +0000 (10:59 +0200)] 
lib-ssl-iostream: Remove support for pre-1.0.2 OpenSSL

2 years agom4: Update ssl.m4
Aki Tuomi [Mon, 24 Oct 2022 11:05:16 +0000 (14:05 +0300)] 
m4: Update ssl.m4

2 years agolib-ssl-iostream: Add test DH parameters
Aki Tuomi [Wed, 26 Oct 2022 16:25:37 +0000 (19:25 +0300)] 
lib-ssl-iostream: Add test DH parameters

2 years agoreplicator: Fix crash when removing user from queue and debug logging is enabled
Timo Sirainen [Tue, 1 Nov 2022 09:23:44 +0000 (11:23 +0200)] 
replicator: Fix crash when removing user from queue and debug logging is enabled

Broken by 4b5337667cea6dea3d684540ee79f26292f9b42d

2 years agoreplicator: Fix crash when importing user not listed by userdb iteration
Timo Sirainen [Tue, 1 Nov 2022 09:21:34 +0000 (11:21 +0200)] 
replicator: Fix crash when importing user not listed by userdb iteration

Broken by 31545b4f38ea85615f0111a33d630a03d92d22ab