mirror of
https://github.com/chatmail/core.git
synced 2026-04-05 23:22:11 +03:00
Add API for passphrase-protected accounts
To create encrypted account with account manager, call dc_accounts_add_closed_account(). Open this account with dc_context_open() using the passphrase you want to use for encryption. When application is loaded next time and account manager is created, it will open all accounts that have no passphrase set. For encrypted accounts dc_context_is_open() will return 0. To open them, call dc_context_open() with the correct passphrase. After opening, call dc_context_start_io() on this account or just dc_accounts_start_io() to start all accounts that are not started yet. Support for legacy SQLite-based backup format is removed in this commit.
This commit is contained in:
@@ -36,7 +36,8 @@ def test_wrong_db(tmpdir):
|
||||
# write an invalid database file
|
||||
p.write("x123" * 10)
|
||||
|
||||
assert ffi.NULL == lib.dc_context_new(ffi.NULL, p.strpath.encode("ascii"), ffi.NULL)
|
||||
context = lib.dc_context_new(ffi.NULL, p.strpath.encode("ascii"), ffi.NULL)
|
||||
assert not lib.dc_context_is_open(context)
|
||||
|
||||
|
||||
def test_empty_blobdir(tmpdir):
|
||||
|
||||
Reference in New Issue
Block a user