about summary refs log tree commit diff stats
path: root/tests/unittests
diff options
context:
space:
mode:
authorWilliam Wennerström <william@wstrm.dev>2020-06-28 15:16:03 +0200
committerWilliam Wennerström <william@wstrm.dev>2020-11-16 21:58:08 +0100
commitf4ab1ca9e75bbc635781c795089bf669ee08942d (patch)
treeb928a6dfcf9c093b6aee7bcecf0dfd139c1298e2 /tests/unittests
parente98644f631b516e38dd4142103356ceb31628aab (diff)
downloadprofani-tty-f4ab1ca9e75bbc635781c795089bf669ee08942d.tar.gz
Move file encryption function to public header
Diffstat (limited to 'tests/unittests')
-rw-r--r--tests/unittests/omemo/stub_omemo.c40
-rw-r--r--tests/unittests/test_omemo.c10
-rw-r--r--tests/unittests/test_omemo.h2
3 files changed, 12 insertions, 40 deletions
diff --git a/tests/unittests/omemo/stub_omemo.c b/tests/unittests/omemo/stub_omemo.c
index 448d5a0d..7cca34d5 100644
--- a/tests/unittests/omemo/stub_omemo.c
+++ b/tests/unittests/omemo/stub_omemo.c
@@ -79,31 +79,15 @@ omemo_own_fingerprint(gboolean formatted)
     return NULL;
 }
 
-void
-omemo_start_muc_sessions(const char* const roomjid)
-{
-}
-void
-omemo_start_session(const char* const barejid)
-{
-}
-void
-omemo_trust(const char* const jid, const char* const fingerprint_formatted)
-{
-}
-void
-omemo_untrust(const char* const jid, const char* const fingerprint_formatted)
-{
-}
-void
-omemo_devicelist_publish(GList* device_list)
-{
-}
-void
-omemo_publish_crypto_materials(void)
-{
-}
-void
-omemo_start_sessions(void)
-{
-}
+void omemo_start_muc_sessions(const char *const roomjid) {}
+void omemo_start_session(const char *const barejid) {}
+void omemo_trust(const char *const jid, const char *const fingerprint_formatted) {}
+void omemo_untrust(const char *const jid, const char *const fingerprint_formatted) {}
+void omemo_devicelist_publish(GList *device_list) {}
+void omemo_publish_crypto_materials(void) {}
+void omemo_start_sessions(void) {}
+
+char *omemo_encrypt_file(FILE *in, FILE *out, off_t file_size, int *gcry_res) {
+    return NULL;
+};
+void omemo_free(void *a) {};
diff --git a/tests/unittests/test_omemo.c b/tests/unittests/test_omemo.c
deleted file mode 100644
index 4c239e6c..00000000
--- a/tests/unittests/test_omemo.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <cmocka.h>
-#include <setjmp.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdlib.h>
-
-#include "omemo/crypto.h"
-
-void test_omemo_aesgcm256_encrypt_file(void **state) {}
-void test_omemo_aesgcm256_encrypt_file(void **state) {}
diff --git a/tests/unittests/test_omemo.h b/tests/unittests/test_omemo.h
deleted file mode 100644
index b945121c..00000000
--- a/tests/unittests/test_omemo.h
+++ /dev/null
@@ -1,2 +0,0 @@
-void test_omemo_aesgcm256_encrypt_file(void **state);
-void test_omemo_aesgcm256_decrypt_file(void **state);