746{
749 if (!pkey)
751
753
754
755
757 {
759 {
760 mutt_error(
_(
"This key can't be used: expired/disabled/revoked"));
762 }
763 }
764
766 {
767 const char *warn_s = NULL;
768 char buf2[1024] = { 0 };
769
771 {
772 warn_s =
_(
"ID is expired/disabled/revoked. Do you really want to use the key?");
773 }
774 else
775 {
776 warn_s = "??";
778 {
779 case GPGME_VALIDITY_NEVER:
780 warn_s =
_(
"ID is not valid. Do you really want to use the key?");
781 break;
782 case GPGME_VALIDITY_MARGINAL:
783 warn_s =
_(
"ID is only marginally valid. Do you really want to use the key?");
784 break;
785 case GPGME_VALIDITY_FULL:
786 case GPGME_VALIDITY_ULTIMATE:
787 break;
788 case GPGME_VALIDITY_UNKNOWN:
789 case GPGME_VALIDITY_UNDEFINED:
790 warn_s =
_(
"ID has undefined validity. Do you really want to use the key?");
791 break;
792 }
793 }
794
795 snprintf(buf2, sizeof(buf2), "%s", warn_s);
796
798 {
801 }
802 }
803
807}
#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.