diff options
author | Paul Fariello <paul@fariello.eu> | 2019-03-14 06:42:59 +0140 |
---|---|---|
committer | Paul Fariello <paul@fariello.eu> | 2019-04-10 17:12:31 +0200 |
commit | 6bb7deeb9c33c61a1bb880dd15d45185e27a48d5 (patch) | |
tree | 721efd4745f2a89ed5f750e6eb8c62f1ead095b5 /src | |
parent | 197e098f4b336945d0e76f31a74fc671589afcd1 (diff) | |
download | profani-tty-6bb7deeb9c33c61a1bb880dd15d45185e27a48d5.tar.gz |
Add logs about crypto generation
Diffstat (limited to 'src')
-rw-r--r-- | src/omemo/omemo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/omemo/omemo.c b/src/omemo/omemo.c index 4937c4e6..5916ee8f 100644 --- a/src/omemo/omemo.c +++ b/src/omemo/omemo.c @@ -212,6 +212,7 @@ omemo_generate_crypto_materials(ProfAccount *account) return; } + log_info("Generate long term OMEMO cryptography metarials"); gcry_randomize(&omemo_ctx.device_id, 4, GCRY_VERY_STRONG_RANDOM); omemo_ctx.device_id &= 0x7fffffff; log_info("OMEMO: device id: %d", omemo_ctx.device_id); @@ -241,6 +242,8 @@ omemo_generate_short_term_crypto_materials(ProfAccount *account) { unsigned int start; + log_info("Generate short term OMEMO cryptography metarials"); + gcry_randomize(&start, sizeof(unsigned int), GCRY_VERY_STRONG_RANDOM); signal_protocol_key_helper_pre_key_list_node *pre_keys_head; signal_protocol_key_helper_generate_pre_keys(&pre_keys_head, start, 100, omemo_ctx.signal); @@ -959,6 +962,7 @@ free_omemo_key(omemo_key_t *key) static void load_identity(void) { + log_info("Loading OMEMO identity"); omemo_ctx.device_id = g_key_file_get_uint64(omemo_ctx.identity_keyfile, OMEMO_STORE_GROUP_IDENTITY, OMEMO_STORE_KEY_DEVICE_ID, NULL); log_info("OMEMO: device id: %d", omemo_ctx.device_id); omemo_ctx.registration_id = g_key_file_get_uint64(omemo_ctx.identity_keyfile, OMEMO_STORE_GROUP_IDENTITY, OMEMO_STORE_KEY_REGISTRATION_ID, NULL); |