about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPaul Fariello <paul@fariello.eu>2019-07-11 07:43:11 +0320
committerPaul Fariello <paul@fariello.eu>2019-07-11 11:01:07 +0200
commitb7144d82febae18c235772bf8abae3c7684f3109 (patch)
tree8907297bc5b247de533705e9582cb286104d78d1
parentb110da9a923c64be7ba33cac3212596c118ccd0d (diff)
downloadprofani-tty-b7144d82febae18c235772bf8abae3c7684f3109.tar.gz
Enable secure memory in gcrypt initialisation
-rw-r--r--src/omemo/crypto.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/omemo/crypto.c b/src/omemo/crypto.c
index 49be2003..81d7c922 100644
--- a/src/omemo/crypto.c
+++ b/src/omemo/crypto.c
@@ -47,6 +47,12 @@ omemo_crypto_init(void)
         return -1;
     }
 
+    gcry_control(GCRYCTL_SUSPEND_SECMEM_WARN);
+
+    gcry_control(GCRYCTL_INIT_SECMEM, 16384, 0);
+
+    gcry_control(GCRYCTL_RESUME_SECMEM_WARN);
+
     gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
 
     return 0;