mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Removed unused barejid argument from PGP decryption
This commit is contained in:
parent
b8b54f91a5
commit
525876770a
@ -210,7 +210,7 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *enc_m
|
|||||||
if (enc_mode == PROF_ENC_OTR) {
|
if (enc_mode == PROF_ENC_OTR) {
|
||||||
win_println((ProfWin*)chatwin, 0, "PGP encrypted message received whilst in OTR session.");
|
win_println((ProfWin*)chatwin, 0, "PGP encrypted message received whilst in OTR session.");
|
||||||
} else { // PROF_ENC_NONE, PROF_ENC_PGP
|
} else { // PROF_ENC_NONE, PROF_ENC_PGP
|
||||||
char *decrypted = p_gpg_decrypt(barejid, enc_message);
|
char *decrypted = p_gpg_decrypt(enc_message);
|
||||||
if (decrypted) {
|
if (decrypted) {
|
||||||
if (enc_mode == PROF_ENC_NONE) {
|
if (enc_mode == PROF_ENC_NONE) {
|
||||||
win_println((ProfWin*)chatwin, 0, "PGP encryption enabled.");
|
win_println((ProfWin*)chatwin, 0, "PGP encryption enabled.");
|
||||||
@ -263,7 +263,7 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *enc_m
|
|||||||
#ifndef HAVE_LIBOTR
|
#ifndef HAVE_LIBOTR
|
||||||
#ifdef HAVE_LIBGPGME
|
#ifdef HAVE_LIBGPGME
|
||||||
if (enc_message) {
|
if (enc_message) {
|
||||||
char *decrypted = p_gpg_decrypt(barejid, enc_message);
|
char *decrypted = p_gpg_decrypt(enc_message);
|
||||||
if (decrypted) {
|
if (decrypted) {
|
||||||
ui_incoming_msg(chatwin, resource, decrypted, NULL, new_win);
|
ui_incoming_msg(chatwin, resource, decrypted, NULL, new_win);
|
||||||
chat_log_pgp_msg_in(barejid, decrypted);
|
chat_log_pgp_msg_in(barejid, decrypted);
|
||||||
|
@ -493,7 +493,7 @@ p_gpg_encrypt(const char * const barejid, const char * const message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
p_gpg_decrypt(const char * const barejid, const char * const cipher)
|
p_gpg_decrypt(const char * const cipher)
|
||||||
{
|
{
|
||||||
gpgme_ctx_t ctx;
|
gpgme_ctx_t ctx;
|
||||||
gpgme_error_t error = gpgme_new(&ctx);
|
gpgme_error_t error = gpgme_new(&ctx);
|
||||||
|
@ -55,7 +55,7 @@ void p_gpg_free_key(ProfPGPKey *key);
|
|||||||
char* p_gpg_sign(const char * const str, const char * const fp);
|
char* p_gpg_sign(const char * const str, const char * const fp);
|
||||||
void p_gpg_verify(const char * const barejid, const char *const sign);
|
void p_gpg_verify(const char * const barejid, const char *const sign);
|
||||||
char* p_gpg_encrypt(const char * const barejid, const char * const message);
|
char* p_gpg_encrypt(const char * const barejid, const char * const message);
|
||||||
char* p_gpg_decrypt(const char * const barejid, const char * const cipher);
|
char* p_gpg_decrypt(const char * const cipher);
|
||||||
void p_gpg_free_decrypted(char *decrypted);
|
void p_gpg_free_decrypted(char *decrypted);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -39,7 +39,7 @@ gboolean p_gpg_available(const char * const barejid)
|
|||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
char * p_gpg_decrypt(const char * const barejid, const char * const cipher)
|
char * p_gpg_decrypt(const char * const cipher)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user