Dmitry Bogatov
0beadde758
Remove _safe suffix from dc_decode_header function
...
There is no longer unsafe version of this function, so suffix is
useless now.
2019-09-28 23:18:41 +02:00
Dmitry Bogatov
618abd63cf
Drop unsafe version of dc_decode_header_words
...
Replace all call sites with safe version and adjust tests as apporiate.
2019-09-28 23:18:41 +02:00
Friedel Ziegelmayer
34b3ddf63b
refactor(e2ee): reduce unsafe spread
2019-09-28 13:20:33 -06:00
holger krekel
f28a971b96
several fixes and streamlinings, probably verified-group encryption is fixed, or at least we should see better errors
2019-09-27 23:24:57 +02:00
holger krekel
18808d0a61
majorly rustify and simplify the incoming decryption pipeline
2019-09-27 23:24:57 +02:00
Alexander Krotov
3933353b5f
Pass slice to dc_receive_imf
...
instead of pointer and length
2019-09-27 17:53:41 +03:00
dignifiedquire
452bce07e1
refactor(mmime): split up into modules
2019-09-26 12:36:23 +02:00
holger krekel
5cbcb76039
introduce safety and a particular EncryptHelper
2019-09-23 17:10:21 +02:00
dignifiedquire
05f9f454c3
refactor: remove x module and delete deadcode
2019-09-21 17:56:49 +02:00
dignifiedquire
e80345a05b
refactor(chat): remove c types and unsafe
2019-09-21 16:59:59 +02:00
dignifiedquire
0bdcc3d616
refactor(message): remove remaining unsafe and c types
2019-09-21 16:37:19 +02:00
dignifiedquire
1265016a55
refactor(message): rustiy api
2019-09-21 16:37:19 +02:00
dignifiedquire
266b205c75
refactor: rustify interface of maimlime_transfer_decode
2019-09-21 00:51:36 +02:00
dignifiedquire
0bdcc4269f
refactor(mimeparser): split and cleanup parse_mime_recursive
2019-09-20 21:42:23 +02:00
holger krekel
7263c9490d
refactor rfc724_mid parsing and creation to avoid char*, add tests
2019-09-19 20:03:16 +02:00
holger krekel
0c88bc6ac7
more rfc724_mid cleanup
2019-09-19 20:03:16 +02:00
holger krekel
dc8a2f54e5
use utf8 lossy strings for saved mime headers (as discussed on PR and IRC with @r10s)
2019-09-18 16:47:04 +02:00
dignifiedquire
b3bc5b2520
fix(receive_imf): do not attempt to convert raw body to utf8
2019-09-18 16:47:04 +02:00
holger krekel
2b038a34c9
Merge branch 'master' into refactor/remove-mprintf
2019-09-17 15:46:05 +02:00
dignifiedquire
6be3c9a48a
refactor: improve mime field lookup
2019-09-16 22:58:10 +02:00
dignifiedquire
c0747bf68d
refactor: use enum for system messages
2019-09-16 22:58:10 +02:00
dignifiedquire
0346dd15d9
refactor(mimeparser): some more sanity
2019-09-16 22:58:10 +02:00
dignifiedquire
72a9ca0aa5
refactor(receive_imf): remove dc_mprintf
2019-09-16 07:58:08 +02:00
dignifiedquire
0bf3d20e07
fix and implement ffi tranlation
2019-09-15 23:40:08 +02:00
dignifiedquire
5486ac5b9f
refacor: use an enum for events
2019-09-15 23:40:08 +02:00
dignifiedquire
16c281a9b7
refactor(context): safe interface
2019-09-15 16:36:31 +02:00
dignifiedquire
f31f341a50
feat: enforce Debug implementations and remove mod types
2019-09-15 16:36:31 +02:00
björn petersen
79d23909b5
fix 'this message is not encrypted' error in verified groups ( #522 )
2019-09-14 18:55:19 +02:00
Alexander Krotov
50a812ea5e
Return bool from mailmime_transfer_decode
2019-09-14 12:03:10 +03:00
Dmitry Bogatov
bb4081e503
Rename query_row_col to query_get_value
...
Since function `query_row_col` no longer accept column number argument,
it is misleading to mention column in its name.
2019-09-12 18:42:12 +00:00
Dmitry Bogatov
cdfc7281d0
Simplify Sql.query_row_col function
...
Function `query_row` executes query and calls callback function to process
row returned. Function query_row_col() is special case, that provides
callback function, which returns value of one particular column of row,
ignoring others.
In all cases, that particular column was 0 (first and only column of
query result), since there is no point to select more than one column
with this function -- they are discarded anyway.
This commit removes that redundancy, removing column number argument of
query_row_col() function and adjusting call sites accordingly.
2019-09-12 05:01:06 +00:00
Floris Bruynooghe
aefddf7f5e
Remove context refrence from Contact struct
...
This will allow the Rust Context API to be refactored without breaking
the C API. Full details in #476 aka
a0b5e32f98
2019-09-11 23:53:48 +02:00
Floris Bruynooghe
8302d6833d
Remove context ref from Chat struct
...
Leaving the C API untouched. See #476 aka
a0b5e32f98 for more extensive rationale.
2019-09-11 23:53:48 +02:00
Dmitry Bogatov
57daa0f7f0
Remove useless argument of logging macros
...
Previously, logging macros (info! warn! error!) accepted integer
argument (data1), that was passed to callback function verbatim. In all
call sites this argument was 0.
With this change, that data1 argument is no longer part of macro
interface, 0 is always passed to callback in internals of these macros.
2019-09-10 22:26:47 +00:00
B. Petersen
e9da21a02e
cargo fmt
2019-09-10 19:14:51 +02:00
B. Petersen
bf1d9b6d06
fix crash when msg_raw is None
2019-09-10 15:20:38 +02:00
holger krekel
650d8c45ec
fix test, and cleanup according profile-image API
2019-09-09 18:07:32 +02:00
holger krekel
383d8980d6
add profile image API to python, tests, Rust fixes/cleanups
2019-09-09 18:07:32 +02:00
B. Petersen
1367873949
check bounds before accessing Vec
2019-09-09 01:47:50 +02:00
B. Petersen
d933183e0a
mark safe functions as such
2019-09-09 01:47:50 +02:00
B. Petersen
7e11def527
make code more readable
2019-09-09 00:01:15 +02:00
Dmitry Bogatov
a4e4b0fc17
Rustify type of dc_mimeparser_t.subject
2019-09-06 23:15:31 +00:00
Dmitry Bogatov
1d75f8478c
Rustify type of dc_mimepart_t.msg_raw
2019-09-06 23:15:27 +00:00
Dmitry Bogatov
e0df78c5f7
Change type of dc_mimepart_t.is_meta to bool
2019-09-06 03:41:18 +00:00
holger krekel
0a6e540394
rename dc_securejoin to securejoin.rs
2019-09-05 22:55:25 +02:00
holger krekel
79510a83de
- remove many *libc::char usages, and c-pointer from fingerprint
...
- rustify get_chat_id_by_grpid and streamline returned chat id handling (thereby apprently fixing the test, don't ask)
2019-09-05 22:55:25 +02:00
dignifiedquire
3944592c09
refactor(e2ee): restructure types a and method slightly
2019-09-03 19:05:21 +02:00
Dmitry Bogatov
6288909481
Refactor is_known_rfc724_mid() to use Iterator interface
2019-09-03 16:08:52 +02:00
Dmitry Bogatov
c95f134963
Change return type of is_known_rfc724_mid_in_list() to bool
2019-09-03 16:08:52 +02:00
Alexander Krotov
aeb1a88e7a
Remove dc_move.rs
...
and move dc_do_heuristics_moves to context.rs
2019-09-03 13:39:14 +02:00