745{
748 if (!pkey)
750
752
753
754
756 {
758 {
759 mutt_error(
_(
"This key can't be used: expired/disabled/revoked"));
761 }
762 }
763
765 {
766 const char *warn_s = NULL;
767 char buf2[1024] = { 0 };
768
770 {
771 warn_s =
_(
"ID is expired/disabled/revoked. Do you really want to use the key?");
772 }
773 else
774 {
775 warn_s = "??";
777 {
778 case GPGME_VALIDITY_NEVER:
779 warn_s =
_(
"ID is not valid. Do you really want to use the key?");
780 break;
781 case GPGME_VALIDITY_MARGINAL:
782 warn_s =
_(
"ID is only marginally valid. Do you really want to use the key?");
783 break;
784 case GPGME_VALIDITY_FULL:
785 case GPGME_VALIDITY_ULTIMATE:
786 break;
787 case GPGME_VALIDITY_UNKNOWN:
788 case GPGME_VALIDITY_UNDEFINED:
789 warn_s =
_(
"ID has undefined validity. Do you really want to use the key?");
790 break;
791 }
792 }
793
794 snprintf(buf2, sizeof(buf2), "%s", warn_s);
795
797 {
800 }
801 }
802
806}
#define ARRAY_GET(head, idx)
Return the element at index.
struct CryptKeyInfo * crypt_copy_key(struct CryptKeyInfo *key)
Return a copy of KEY.
int crypt_id_is_valid(struct CryptKeyInfo *key)
Is key ID valid.
bool crypt_id_is_strong(struct CryptKeyInfo *key)
Is the key strong.
@ FR_ERROR
Valid function - error occurred.
@ FR_NO_ACTION
Valid function - no action performed.
bool OptPgpCheckTrust
(pseudo) used by dlg_pgp()
static bool crypt_key_is_valid(struct CryptKeyInfo *k)
Is the key valid.
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
@ MUTT_NO
User answered 'No', or assume 'No'.
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
enum QuadOption query_yesorno(const char *prompt, enum QuadOption def)
Ask the user a Yes/No question.
gpgme_validity_t validity
uid validity (cached for convenience)
KeyFlags flags
global and per uid flags (for convenience)
struct CryptKeyInfoArray * key_table
Array of Keys.
struct CryptKeyInfo * key
Selected Key.
struct Menu * menu
Gpgme Menu.