mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 17:06:28 +03:00
Safe load_or_generate_self_public_key
The function is made safe and now returns Result. Functionally it now fails when it can not write the newly generated key to the database whereas before it still returned the key but logged a warning. There is no reason this shouldn't be able to store the key and silently not storing the key may result in later operations assuming the key is available, so failing seems like a better choice. The function now also uses a proper mutex to guard against multiple threads generating keys. And this mutex is Context-scoped rather than fully global (static).
This commit is contained in:
committed by
holger krekel
parent
139c9f37b1
commit
dfd58961f7
@@ -89,6 +89,14 @@ $ cargo test --all
|
||||
$ cargo build -p deltachat_ffi --release
|
||||
```
|
||||
|
||||
### Expensive tests
|
||||
|
||||
Some tests are expensive and marked with `#[ignore]`, to run these
|
||||
use the `--ignored` argument to the test binary (not to cargo itself):
|
||||
```sh
|
||||
$ cargo test -- --ignored
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- `vendored`: When using Openssl for TLS, this bundles a vendored version.
|
||||
|
||||
Reference in New Issue
Block a user