Daniel Gultsch
e217551a82
migrate to OkHttp instead of HttpUrlConnection
...
OkHttp gives us more fine grained control over the HTTP library and frees us from any platform bugs
2021-03-19 14:57:20 +01:00
Daniel Gultsch
24f2f52512
limit http upload / download to 4 parallel connections
2021-02-22 09:24:41 +01:00
Daniel Gultsch
00191e2b60
explicitly use BouncyCastle for file crypto
2020-03-09 19:12:30 +01:00
Daniel Gultsch
257de4b51e
fixed typo
2020-03-09 15:06:21 +01:00
Daniel Gultsch
aecb771ab5
use 16 byte IVs for http upload files larger than 768KiB
...
Ever since Android 9+ switched to Conscrypt we can no longer efficiently
encrypt (and decrypt) large files with AES-GCM. We did’t notice this before
because when using 16 byte IVs even modern Androids will fall back to bouncy
castle. However the 'bug'/'feature' in Conscrypt surfaced when we switched over
to 12 byte IVs (which uses Conscrypt on Android 9+)
Switching back entirely to 16 byte IVs is undesirable as this would break
compatibility with Monal. So we end up with a weird compromise where we use
12 byte for normale plain text OMEMO messages and 'small' files where the
inefficiencies aren’t a problem.
The result of this commit is that Monal won’t be able to receive our files
larger than 768KiB. However the alternative is that Conversations would always
OOM when attempting to send larger files (where large depends on the available
RAM.)
fixes #3653
2020-03-08 13:13:19 +01:00
Daniel Gultsch
80e83f77a7
pulled translations from transifex
2020-01-08 19:05:12 +01:00
Daniel Gultsch
953307ca30
use socks instead of http proxy for http upload
...
http proxy doesn’t seem to work with onion v3
2019-06-16 15:06:34 +02:00
Daniel Gultsch
b2ea91909b
introduced type private_file_message to handle attachments in PMs. fixes #3372
2019-04-27 11:46:43 +02:00
Daniel Gultsch
b30fb46c85
make sure that http upload/download is not startetd multiple times
2019-01-28 10:39:01 +01:00
Daniel Gultsch
52ecd9347c
added dialogs for rate limiting and out of date version
2018-10-31 13:33:55 +01:00
Daniel Gultsch
4f12cf06ed
revert back to 16 byte IVs for omemo since ChatSecure doesn’t support 12 byte
2018-10-17 20:46:57 +02:00
Daniel Gultsch
de0741bdf7
show cancelled instead of delivery failed if user requested to abort transfer
2018-10-07 14:59:08 +02:00
Daniel Gultsch
f608fb349a
refactored file encryption to give access to inner stream
...
Conscrypt on some plattforms doesn’t like when we close the CipherInputStream. Therefor we refactor the api to give us access to the inner stream so we can close that independently.
2018-10-03 18:14:45 +02:00
Daniel Gultsch
4c08ba8d03
use 12 byte IV for omemo and http upload
2018-10-03 17:44:48 +02:00
Daniel Gultsch
9ca636589c
remove more legacy otr decryption code
2018-10-03 12:50:54 +02:00
Daniel Gultsch
ae35593f65
catch all exceptions when checking file size
2018-07-16 20:42:40 +02:00
Daniel Gultsch
b9bdb3df55
use Tor on http upload is account uses onion domain. fixes #3075
2018-06-16 18:31:55 +02:00
Daniel Gultsch
4626bdf8d8
show p1s3 attchments with download button
2018-05-25 13:18:25 +02:00
Daniel Gultsch
70d95c7903
upload files using p1s3 - sending part
2018-05-25 12:24:23 +02:00
Daniel Gultsch
d5a187bafb
use Tor to download map tiles if configured to do so
2018-05-11 12:42:39 +02:00
Daniel Gultsch
4a706aad03
catch dead object exceptions when acquiring wake locks
2018-04-15 18:31:58 +02:00
Daniel Gultsch
25a49a28ce
disable caches in HttpUrlConnections
2018-03-13 11:59:32 +01:00
Daniel Gultsch
1accf9d961
migrate to xmpp-addr
2018-03-07 22:30:36 +01:00
Daniel Gultsch
a3f3cfa0bb
only allow a number of white listed headers according to http upload v0.5
2018-02-16 11:14:16 +01:00
Daniel Gultsch
64928d0ff1
http upload: do not crash on invalid slot responses
2018-02-11 17:54:59 +01:00
Daniel Gultsch
e48788e821
support new http upload namespace
2018-01-28 14:17:42 +01:00
moparisthebest
197352b669
Read support for 12-byte IVs in addition to 16-byte IVs
2017-08-09 23:42:35 -04:00
Daniel Gultsch
b925f436fd
add more logging to http download connection and reset file params after setting expected size
2017-08-04 11:58:12 +02:00
Daniel Gultsch
f67baab983
revised strategy for http upload read timeout
2017-06-18 16:32:01 +02:00
Daniel Gultsch
a1fe8f1c87
make http upload read timeout depend on file size
2017-06-14 16:27:38 +02:00
Daniel Gultsch
3889c0eb01
use application/pgp-encrypted mime type when necessary for http upload
2017-06-01 07:35:18 +02:00
cijo-saju
3467a67e75
Removed unused imports from entire project.
2017-04-12 20:24:36 +05:30
Daniel Gultsch
26badb7f4c
send urls pointing to pgp encrypted files directly in body+oob
2017-04-05 21:01:29 +02:00
Daniel Gultsch
401329caaa
use aesgcm:// uri scheme for omemo encrypted http upload
2017-04-05 18:46:56 +02:00
Daniel Gultsch
c740386297
rename the Xmlns class to Namespace
2017-03-01 13:01:46 +01:00
Daniel Gultsch
b050ff2576
only call UI thread from downloading thread every 250ms
2017-01-12 16:02:09 +01:00
Daniel Gultsch
8557120ef8
add error message to failed messages. accessible via context menu
2016-10-26 12:26:04 +02:00
Daniel Gultsch
61f58b3dbd
add timeouts to HTTPUrlConnections and allow cancelation of all sending files
2016-09-20 20:02:25 +02:00
Daniel Gultsch
e0575642b5
log all fail reasons
2016-06-15 12:33:59 +02:00
Daniel Gultsch
1838023c88
log failure reason in http upload on wrong response code
2016-05-31 17:19:56 +02:00
Daniel Gultsch
a9b66e3ea5
allow to delete attachments. fixes #1539
2016-03-23 19:23:22 +01:00
Daniel Gultsch
281cb65046
only add image files to media scanner
2016-03-23 12:20:09 +01:00
Daniel Gultsch
f0b1761ec3
initial tor support
2015-12-01 12:00:50 +01:00
Daniel Gultsch
5a5e0e7121
use Conversations 1.x.y as user agent string in http upload and download
2015-09-23 18:05:51 +02:00
Daniel Gultsch
b5719fd747
work around a NPE caused by arace condition in the http upload
2015-09-15 22:49:43 +02:00
Daniel Gultsch
dad90762b4
do not touch pictures that are already in the right format
...
fixed #522
2015-08-11 16:50:00 +02:00
Daniel Gultsch
fd81491b05
put wake locks on out of band file transfers
2015-08-10 19:48:36 +02:00
Daniel Gultsch
5529337da3
use content-type in http slot request and stick with during upload
2015-08-01 22:37:17 +02:00
Daniel Gultsch
f9dec7cf86
fixed calculated file size in http slot request
2015-08-01 22:23:58 +02:00
Daniel Gultsch
60cd307f73
enable axolotl encryption for jingle supported file transfers
2015-08-01 01:19:16 +02:00