diff options
author | William Wennerström <william@wstrm.dev> | 2020-06-28 12:20:52 +0200 |
---|---|---|
committer | William Wennerström <william@wstrm.dev> | 2020-11-16 21:58:08 +0100 |
commit | fc6136ddf005553960257ae2b4a625116cf3513a (patch) | |
tree | f09df0f2d0e4122b51034747735356c3d20ae91a /src | |
parent | d5b1dc0eb6ee9c4caee6c73b9cf26133c875a1c8 (diff) | |
download | profani-tty-fc6136ddf005553960257ae2b4a625116cf3513a.tar.gz |
Remove unused #define's and move URL scheme define to omemo/crypto.h
Diffstat (limited to 'src')
-rw-r--r-- | src/command/cmd_funcs.c | 8 | ||||
-rw-r--r-- | src/omemo/crypto.h | 1 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 74a21a09..0f74ff7c 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -95,12 +95,6 @@ #ifdef HAVE_OMEMO #include "omemo/omemo.h" #include "xmpp/omemo.h" - -#define AESGCM_URL_SCHEME "aesgcm" -#define AESGCM_URL_NONCE_LEN 24 -#define AESGCM_URL_KEY_LEN 64 -#define AESGCM_URL_FRAGMENT_LEN \ - (size_t)(AESGCM_URL_NONCE_LEN + AESGCM_URL_KEY_LEN) #endif #ifdef HAVE_GTK @@ -4878,7 +4872,7 @@ cmd_sendfile(ProfWin* window, const char* const command, gchar** args) FILE *tmpfh = fdopen(tmpfd, "wb"); int crypt_res = GPG_ERR_NO_ERROR; - alt_scheme = AESGCM_URL_SCHEME; + alt_scheme = AES256_GCM_URL_SCHEME; alt_fragment = aes256gcm_encrypt_file(fh, tmpfh, file_size(fd), &crypt_res); if (crypt_res != 0) { char *msg = "Failed to encrypt file."; diff --git a/src/omemo/crypto.h b/src/omemo/crypto.h index 34cbb82c..f24fa163 100644 --- a/src/omemo/crypto.h +++ b/src/omemo/crypto.h @@ -39,6 +39,7 @@ #define AES128_GCM_IV_LENGTH 12 #define AES128_GCM_TAG_LENGTH 16 +#define AES256_GCM_URL_SCHEME "aesgcm" #define AES256_GCM_KEY_LENGTH 32 #define AES256_GCM_NONCE_LENGTH 12 |