Changeset 2276:74a34d30c67c for compose.c
Legend:
- Unmodified
- Added
- Removed
-
compose.c
r2250 r2276 122 122 clrtoeol (); 123 123 if (pgp & PGPSIGN) 124 {125 124 printw ("%s%s", _(" sign as: "), PgpSignAs ? PgpSignAs : _("<default>")); 126 mvprintw (HDR_PGPSIGINFO, 40, "%s%s", _("MIC algorithm: "),127 NONULL(PgpSignMicalg));128 }129 125 } 130 126 … … 133 129 pgp_key_t *p; 134 130 char input_signas[SHORT_STRING]; 135 char input_micalg[SHORT_STRING]; 136 137 switch (mutt_multi_choice (_("(e)ncrypt, (s)ign, sign (a)s, (b)oth, select (m)ic algorithm, or (f)orget it? "), 138 _("esabmf"))) 131 132 switch (mutt_multi_choice (_("(e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "), 133 _("esabf"))) 139 134 { 140 135 case 1: /* (e)ncrypt */ … … 154 149 snprintf (input_signas, sizeof (input_signas), "0x%s", pgp_keyid (p)); 155 150 mutt_str_replace (&PgpSignAs, input_signas); 156 mutt_str_replace (&PgpSignMicalg, pgp_pkalg_to_mic (p->algorithm));157 151 pgp_free_key (&p); 158 152 … … 173 167 break; 174 168 175 case 5: /* select (m)ic algorithm */ 176 if (!(bits & PGPSIGN)) 177 mutt_error _("This doesn't make sense if you don't want to sign the message."); 178 else 179 { 180 /* Copy the existing MIC algorithm into place */ 181 strfcpy(input_micalg, NONULL (PgpSignMicalg), sizeof (input_micalg)); 182 183 if (mutt_get_field (_("MIC algorithm: "), input_micalg, sizeof (input_micalg), 0) == 0) 184 { 185 if (mutt_strcasecmp (input_micalg, "pgp-md5") && mutt_strcasecmp (input_micalg, "pgp-sha1") 186 && mutt_strcasecmp (input_micalg, "pgp-rmd160")) 187 { 188 mutt_error _("Unknown MIC algorithm, valid ones are: pgp-md5, pgp-sha1, pgp-rmd160"); 189 } 190 else 191 mutt_str_replace (&PgpSignMicalg, input_micalg); 192 } 193 } 194 break; 195 196 case 6: /* (f)orget it */ 169 case 5: /* (f)orget it */ 197 170 bits = 0; 198 171 break;
