Alexander Krotov
541710147a
Copy correct dc_contact_is_verified documentation from C core
...
instead of dc_contact_is_verified_ex documentation.
2019-12-11 17:54:28 +01:00
Alexander Krotov
4ad9166b5a
Move one chat test from stress.rs to chat module
2019-12-10 13:54:05 +01:00
Alexander Krotov
2792d4ea1e
Stop using create::error in login_param.rs
2019-12-10 12:39:58 +01:00
Alexander Krotov
301852fd87
Add test for kebab_case serialization of From header
2019-12-09 15:43:06 +03:00
Alexander Krotov
a99b96e36e
Use bool for from_id_blocked flag
2019-12-09 09:54:46 +01:00
Alexander Krotov
0889467c7b
Use bool for hidden flag
2019-12-09 09:54:46 +01:00
Alexander Krotov
d141e228de
Use bool for incoming flag
2019-12-09 09:54:46 +01:00
Alexander Krotov
9b15c42801
Use bool for allow_creation flag
2019-12-09 09:54:46 +01:00
Alexander Krotov
a781b631e1
Return bool from is_reply_to_{known_message,messenger_message}
2019-12-09 09:54:46 +01:00
Alexander Krotov
08af5c8e09
Replace some integers with bools in dc_receive_imf.rs
2019-12-09 09:54:46 +01:00
Alexander Krotov
a8e9a1fbe5
Make Smtp.send async
2019-12-08 21:00:03 +01:00
Alexander Krotov
54eb30f3db
Switch from lettre to async-smtp
2019-12-08 21:00:03 +01:00
Alexander Krotov
c08a1adc9b
Deprecate AcceptInvalidHostnames option
...
Rustls does not offer a documented way to accept valid certificates with
invalid hostnames. Implementation of certificate verification in Rustls
does not have a public API and reimplementing it is error-prone.
2019-12-08 20:54:04 +01:00
Alexander Krotov
cd951ad396
Improve IMAP idle timeout error handling
...
Return proper cause and avoid matching on nested Result
2019-12-08 20:50:27 +01:00
Alexander Krotov
a7af4685f1
Log IMAP certificate checks configuration
2019-12-08 00:31:22 +01:00
Alexander Krotov
2cebed4f77
Move dc_array.rs to deltachat-ffi package
2019-12-08 00:30:43 +01:00
Alexander Krotov
f32876708a
Update outdated comment
...
MIME wrapping is now done by the email crate, which implements RFC5322
2019-12-07 21:35:42 +01:00
Alexander Krotov
84e0e7e020
aheader.rs: do not generate lines longer than 78 characters
2019-12-07 21:35:42 +01:00
Alexander Krotov
38cddff6e9
Move keydata= wrapping from key.rs to aheader.rs
2019-12-07 21:35:42 +01:00
Alexander Krotov
f1aba8115b
Use Option<EncryptPreference>.unwrap_or_default in aheader.rs
2019-12-07 07:58:53 +01:00
Alexander Krotov
6c275c30a7
Do not include "prefer-encrypt=nopreference;" in Autocrypt header
...
Specification
https://autocrypt.org/level1.html#the-autocrypt-header
says that prefer-encrypt attribute can only occur with the value `mutual`.
2019-12-06 20:01:34 +03:00
Alexander Krotov
91f1d793e9
Test that internal "prefer-encrypt=reset" value is not parsed from header
...
This is a test for bugfix e8f2f7b24e
2019-12-06 14:23:45 +01:00
Alexander Krotov
cddfd04a7f
Turn rawkey from function into a constant
2019-12-06 14:23:45 +01:00
Alexander Krotov
7fa94c33bf
cargo fmt
2019-12-06 10:35:02 +01:00
Alexander Krotov
30dd20dc7b
Make Imap.fetch() async
2019-12-06 10:35:02 +01:00
Alexander Krotov
339c0d3dc7
Remove unnecessary use of failure::Fail
2019-12-06 10:34:34 +01:00
Alexander Krotov
2304d63bb3
Simplify dc_get_filesuffix_lc
2019-12-06 09:45:24 +01:00
Alexander Krotov
351383dfa4
Split IMAP idle functions into imap::idle submodule
...
Also introduce Imap.can_idle() to avoid having to match on IdleAbilityMissing error
2019-12-06 08:59:22 +01:00
Alexander Krotov
d950a58613
Improve documentation
2019-12-04 10:15:40 +01:00
Alexander Krotov
069541f374
Create select_folder::Error
2019-12-04 06:13:24 +01:00
Alexander Krotov
49b9b28c99
Move select_folder to a separate submodule
2019-12-04 06:13:24 +01:00
Alexander Krotov
ad87b7c4a5
Fix clippy warnings
2019-12-03 20:20:52 +03:00
Alexander Krotov
e22b4e8430
Use map_err in Smtp.connect() instead of match
2019-12-03 13:35:55 +03:00
Alexander Krotov
acef386403
Remove useless comment from the configure module
2019-12-03 06:22:05 +00:00
Alexander Krotov
15ba9b6295
Resultify outlk_autodiscover
2019-12-03 06:22:05 +00:00
Alexander Krotov
2f47cf0be5
Resultify moz_autoconfigure
2019-12-03 06:22:05 +00:00
Alexander Krotov
774106fc26
Move read_autoconf_file to its own module
2019-12-03 06:22:05 +00:00
Alexander Krotov
1b0ff9f5be
Make parse_xml in auto_mozilla.rs private
2019-12-03 06:22:05 +00:00
Alexander Krotov
dfaa6895ae
Add an error type to configure::auto_outlook module
2019-12-03 06:22:05 +00:00
Alexander Krotov
cb52a299cc
Add an error type to configure::auto_mozilla module
2019-12-03 06:22:05 +00:00
Alexander Krotov
ee18d60644
cargo fmt
2019-12-01 21:01:03 +01:00
Alexander Krotov
612600278a
Move SQL errors into their own module
2019-12-01 21:01:03 +01:00
Alexander Krotov
a7bb249070
Move another OAuth2 test from stress.rs to oauth2.rs
2019-12-01 20:46:35 +01:00
Alexander Krotov
7223a36a71
SMTP error refactoring
2019-12-01 18:24:26 +01:00
Alexander Krotov
3a08c92433
Replace u32 with a PeerstateKeyType enum
2019-12-01 17:07:33 +01:00
Alexander Krotov
694d8fd6fb
Move dc_dehtml to dehtml and remove unnecessary is_empty check
2019-12-01 13:37:37 +01:00
Alexander Krotov
d5359fb9ba
Ensure that Peerstate has an address set on the type level
2019-12-01 01:52:54 +01:00
Alexander Krotov
17cb1226c6
Move OAuth 2 stress tests to oauth2 module
2019-11-30 19:19:05 +01:00
Alexander Krotov
02e281e465
Resultify dc_write_file and related functions
2019-11-30 01:54:42 +01:00
Alexander Krotov
e8f2f7b24e
Do not accept prefer-encrypt=reset value from emails
...
Reset is an internal value that received messages should not be able to set.
Also return an error on any value other than "mutual" and "nopreference", errors are converted to NoPreference by the caller.
2019-11-30 01:40:33 +01:00
Alexander Krotov
b7f7e607c1
Use map_err
2019-11-30 01:37:56 +01:00
Alexander Krotov
ac4108b05b
Mark error cause as such
...
See failure crate documentation.
2019-11-30 01:37:56 +01:00
Alexander Krotov
14287b12ae
Resultify Smtp::send
2019-11-30 01:37:56 +01:00
Alexander Krotov
20ce5f6967
Ignore .rsynclist
2019-11-30 01:32:51 +01:00
Alexander Krotov
dacde72456
Respect CertificateChecks in IMAP Client::secure
2019-11-29 00:40:50 +01:00
Alexander Krotov
7e66af05ff
Calculate job backoff relative to the current time
...
Otherwise it is possible that desired_timestamp is in the past.
2019-11-29 00:26:25 +01:00
Alexander Krotov
e06ac87c0d
Convert the number of retries to u32
2019-11-28 21:44:16 +01:00
Alexander Krotov
0c19fcd79f
Use Rust for instead of while
2019-11-28 21:44:16 +01:00
Alexander Krotov
02fe3d1b99
Process PerformJobsNeeded::AvoidDos case explicitly
2019-11-28 21:44:16 +01:00
Alexander Krotov
95b90a59dc
Add PerformJobsNeeded enum (DC_JOBS_NEEDED_* in core)
2019-11-28 21:44:16 +01:00
Alexander Krotov
fe7852b64e
Restore JOB_RETRIES constant
2019-11-28 21:44:16 +01:00
Alexander Krotov
430d4e5f6e
Replace DC_CREATE_MVBOX with boolean
2019-11-28 18:24:29 +01:00
Alexander Krotov
d0795f5770
Automatically fix some clippy warnings with "cargo fix"
2019-11-27 21:43:18 +01:00
Alexander Krotov
59700cb477
Restore peerstate constants from C core
2019-11-27 05:41:54 +01:00
Alexander Krotov
22a0e3fe9c
job: try_again refactoring
...
Introduce TryAgain type with C core constants
Make try_again field and method private.
Remove try_again == 2 processing, it was never used.
2019-11-26 22:14:34 +01:00
Alexander Krotov
6412adcfa7
Use forked version of async-imap and imap-proto
...
This attempts to fix fetching when the inbox contains mail with non-utf8 subjects.
2019-11-24 12:05:30 +01:00
Alexander Krotov
8d81c8c1e0
Do not crash on messages without message-id
2019-11-23 22:52:16 +01:00
Alexander Krotov
1e173524b5
Upgrade to hex 0.4
...
rpgp depends on hex 0.4. This prevents building two versions of the same library.
2019-11-23 22:51:27 +01:00
Alexander Krotov
4b8252e001
Implement public key selection
...
First, try to use subkeys, because they are usually
short-term encryption keys. If none of the subkeys
are encryption keys, try to use the primary key.
rPGP is updated to the master branch because the
latest release does not have .is_encryption_key() yet.
2019-11-22 10:20:40 +01:00
Alexander Krotov
4732085421
Fix some clippy warnings
2019-11-19 19:52:13 +01:00
Alexander Krotov
69e14dcb2d
Replace some magic numbers with constants
2019-11-16 16:08:08 +00:00
Alexander Krotov
f778957caf
Improve documentation and comments
2019-11-16 13:53:47 +01:00
Alexander Krotov
47f8da6532
Expand tabs into spaces
2019-11-16 12:32:32 +01:00
Alexander Krotov
0b3f2a55df
Do not use wildcard match in msgtype_has_file
...
This way there will be a compiler error notifying that the function needs to be updated when a new message type is added.
2019-11-16 12:31:13 +01:00
Alexander Krotov
c6369b1c5a
Implement TryFrom instead of TryInto
...
TryInto is derived automatically and its documentation recommends implementing TryFrom.
2019-11-10 15:38:58 +00:00
Alexander Krotov
bfa0f9d911
Use the first subkey for encryption instead of the primary key
2019-11-10 16:32:09 +01:00
Alexander Krotov
cf023ea557
sql: remove unnecessary ? in prepare() and prepare2()
2019-11-06 13:26:03 +01:00
Alexander Krotov
51a804a80f
location: use "bool" for "independent" argument
2019-11-06 14:17:59 +03:00
Alexander Krotov
0aa1d1caa0
Merge pull request #749 from deltachat/fix-get-chat-id
...
let dc_get_chat_id_by_contact_id() returns 0 if no chat is found
2019-10-27 12:42:22 +00:00
Alexander Krotov
7916a7fa07
Fix spelling of Param::GuaranteeE2ee
2019-10-27 11:51:59 +01:00
Alexander Krotov
ee81895e1e
Use DC_CONTACT_ID_SELF in do_initiate_key_transfer
2019-10-27 11:51:47 +01:00
Alexander Krotov
6ac4384769
location.rs cleanup
...
Use constants where possible, move "let" closer to assignments.
2019-10-27 11:51:35 +01:00
Alexander Krotov
99fababf0b
to_base64: operate on characters instead of bytes to avoid unsafe code
2019-10-27 11:51:25 +01:00
Alexander Krotov
c85f1b20ca
Add constants for certificate checks configuration
2019-10-27 11:51:14 +01:00
Alexander Krotov
cfa69cf35a
Add Params::set_cmd and use SystemMessage constants
2019-10-26 14:04:08 +02:00
Alexander Krotov
bed14d5c02
Initialize continue_streaming with false
...
Otherwise this variable is constant.
2019-10-22 13:24:23 +03:00
Alexander Krotov
d3c831a0a2
Replace continue_streaming int with bool
2019-10-22 13:24:23 +03:00
Alexander Krotov
0007c12dea
Replace FORCE_SCHEDULE #define from C core with bool
2019-10-22 13:24:23 +03:00
Alexander Krotov
dfc453c1d1
Merge pull request #727 from deltachat/strndup
...
Remove unused strndup
2019-10-17 12:33:51 +03:00
Alexander Krotov
9fa6289093
Remove unused strndup
2019-10-17 03:18:08 +03:00
Alexander Krotov
9bf8bed0c3
Merge pull request #685 from deltachat/outlook_unit_test
...
Unit test Outlook autodiscovery
2019-10-14 21:34:43 +00:00
Alexander Krotov
c4d55f6ba4
auto_outlook: convert <Protocol> type to lowercase before comparison
2019-10-14 19:21:29 +03:00
Alexander Krotov
8e0e1bd58d
Add test for Outlook autodiscovery without redirect
2019-10-14 13:42:35 +03:00
Alexander Krotov
a471ccc95a
Test Outlook autoconfigure redirect parsing
2019-10-14 01:24:20 +03:00
Alexander Krotov
daac8c4824
rustfmt
2019-10-14 01:24:20 +03:00
Alexander Krotov
59c22a5626
Move Outlook autodiscovery into separate function
2019-10-14 01:24:19 +03:00
Alexander Krotov
5154f27f72
Merge pull request #712 from deltachat/moz_autoconfigure_unit
...
auto_mozilla: split XML parsing into separate function
2019-10-13 16:34:05 +00:00
Alexander Krotov
5f7279eb85
auto_mozilla: server is only configured if the type matches
...
This fixes the testcase introduced in previous commit
2019-10-12 17:07:20 +03:00
Alexander Krotov
ce67f593f6
Add XML parsing test for Mozilla autoconfig
2019-10-12 17:07:20 +03:00
Alexander Krotov
556ea57f37
auto_mozilla: split XML parsing into separate function
2019-10-12 17:07:20 +03:00