746{
749
750
752 {
754 {
755 mutt_error(
_(
"This key can't be used: expired/disabled/revoked"));
757 }
758 }
759
761 {
762 const char *warn_s = NULL;
763 char buf2[1024] = { 0 };
764
766 {
767 warn_s =
_(
"ID is expired/disabled/revoked. Do you really want to use the key?");
768 }
769 else
770 {
771 warn_s = "??";
773 {
774 case GPGME_VALIDITY_NEVER:
775 warn_s =
_(
"ID is not valid. Do you really want to use the key?");
776 break;
777 case GPGME_VALIDITY_MARGINAL:
778 warn_s =
_(
"ID is only marginally valid. Do you really want to use the key?");
779 break;
780 case GPGME_VALIDITY_FULL:
781 case GPGME_VALIDITY_ULTIMATE:
782 break;
783 case GPGME_VALIDITY_UNKNOWN:
784 case GPGME_VALIDITY_UNDEFINED:
785 warn_s =
_(
"ID has undefined validity. Do you really want to use the key?");
786 break;
787 }
788 }
789
790 snprintf(buf2, sizeof(buf2), "%s", warn_s);
791
793 {
796 }
797 }
798
802}
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 CryptKeyInfo * key
Selected Key.
struct CryptKeyInfo ** key_table
Array of Keys.
struct Menu * menu
Gpgme Menu.