mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Add logs about crypto generation
This commit is contained in:
parent
197e098f4b
commit
6bb7deeb9c
@ -212,6 +212,7 @@ omemo_generate_crypto_materials(ProfAccount *account)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log_info("Generate long term OMEMO cryptography metarials");
|
||||||
gcry_randomize(&omemo_ctx.device_id, 4, GCRY_VERY_STRONG_RANDOM);
|
gcry_randomize(&omemo_ctx.device_id, 4, GCRY_VERY_STRONG_RANDOM);
|
||||||
omemo_ctx.device_id &= 0x7fffffff;
|
omemo_ctx.device_id &= 0x7fffffff;
|
||||||
log_info("OMEMO: device id: %d", omemo_ctx.device_id);
|
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;
|
unsigned int start;
|
||||||
|
|
||||||
|
log_info("Generate short term OMEMO cryptography metarials");
|
||||||
|
|
||||||
gcry_randomize(&start, sizeof(unsigned int), GCRY_VERY_STRONG_RANDOM);
|
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_pre_key_list_node *pre_keys_head;
|
||||||
signal_protocol_key_helper_generate_pre_keys(&pre_keys_head, start, 100, omemo_ctx.signal);
|
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
|
static void
|
||||||
load_identity(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);
|
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);
|
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);
|
omemo_ctx.registration_id = g_key_file_get_uint64(omemo_ctx.identity_keyfile, OMEMO_STORE_GROUP_IDENTITY, OMEMO_STORE_KEY_REGISTRATION_ID, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user