mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Remove unused #define's and move URL scheme define to omemo/crypto.h
This commit is contained in:
parent
d5b1dc0eb6
commit
fc6136ddf0
@ -95,12 +95,6 @@
|
|||||||
#ifdef HAVE_OMEMO
|
#ifdef HAVE_OMEMO
|
||||||
#include "omemo/omemo.h"
|
#include "omemo/omemo.h"
|
||||||
#include "xmpp/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
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_GTK
|
#ifdef HAVE_GTK
|
||||||
@ -4878,7 +4872,7 @@ cmd_sendfile(ProfWin* window, const char* const command, gchar** args)
|
|||||||
FILE *tmpfh = fdopen(tmpfd, "wb");
|
FILE *tmpfh = fdopen(tmpfd, "wb");
|
||||||
|
|
||||||
int crypt_res = GPG_ERR_NO_ERROR;
|
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);
|
alt_fragment = aes256gcm_encrypt_file(fh, tmpfh, file_size(fd), &crypt_res);
|
||||||
if (crypt_res != 0) {
|
if (crypt_res != 0) {
|
||||||
char *msg = "Failed to encrypt file.";
|
char *msg = "Failed to encrypt file.";
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#define AES128_GCM_IV_LENGTH 12
|
#define AES128_GCM_IV_LENGTH 12
|
||||||
#define AES128_GCM_TAG_LENGTH 16
|
#define AES128_GCM_TAG_LENGTH 16
|
||||||
|
|
||||||
|
#define AES256_GCM_URL_SCHEME "aesgcm"
|
||||||
#define AES256_GCM_KEY_LENGTH 32
|
#define AES256_GCM_KEY_LENGTH 32
|
||||||
#define AES256_GCM_NONCE_LENGTH 12
|
#define AES256_GCM_NONCE_LENGTH 12
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user