Check for valid PGP key on start

This commit is contained in:
James Booth
2015-08-23 22:54:41 +01:00
parent c07638746a
commit 57ca441f02
3 changed files with 32 additions and 2 deletions

View File

@@ -4337,8 +4337,8 @@ cmd_pgp(ProfWin *window, const char * const command, gchar **args)
}
ProfAccount *account = accounts_get_account(jabber_get_account_name());
if (!account->pgp_keyid) {
ui_current_print_formatted_line('!', 0, "You must specify a PGP key ID for this account to start PGP encryption.");
if (!p_gpg_valid_key(account->pgp_keyid)) {
ui_current_print_formatted_line('!', 0, "You must specify a valid PGP key ID for this account to start PGP encryption.");
account_free(account);
return TRUE;
}