Show
Ignore:
Timestamp:
2003-04-15 02:52:06 (6 years ago)
Author:
Dale Woolridge <dale-flea-mutt-bug@…>
Branch:
HEAD
Message:

The "sign (a)s" code strips the pgp application bit causing drawing
issues in redraw_crypt_lines(). Other bits (well bit = encrypt) are
ignored as a result. I've only tested with pgp, but the same
problem exists in the smime code too. This inline patch (against
cvs head revision) fixes the problem.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • compose.c

    r3311 r3391  
    167167  { 
    168168  case 1: /* (e)ncrypt */ 
    169     msg->security |= PGPENCRYPT; 
     169    msg->security |= ENCRYPT; 
    170170    break; 
    171171 
    172172  case 2: /* (s)ign */ 
    173     msg->security |= PGPSIGN; 
     173    msg->security |= SIGN; 
    174174    break; 
    175175 
     
    185185      crypt_pgp_free_key (&p); 
    186186       
    187       msg->security |= PGPSIGN; 
     187      msg->security |= SIGN; 
    188188         
    189189      crypt_pgp_void_passphrase ();  /* probably need a different passphrase */ 
     
    191191    else 
    192192    { 
    193       msg->security &= ~PGPSIGN; 
     193      msg->security &= ~SIGN; 
    194194    } 
    195195 
     
    198198 
    199199  case 4: /* (b)oth */ 
    200     msg->security = PGPENCRYPT | PGPSIGN; 
     200    msg->security = ENCRYPT | SIGN; 
    201201    break; 
    202202 
     
    205205    break; 
    206206  } 
     207 
     208  if (msg->security && msg->security != APPLICATION_PGP) 
     209    msg->security |= APPLICATION_PGP; 
     210  else 
     211    msg->security = 0; 
    207212 
    208213  if(*redraw) 
     
    224229  { 
    225230  case 1: /* (e)ncrypt */ 
    226     msg->security |= SMIMEENCRYPT; 
     231    msg->security |= ENCRYPT; 
    227232    break; 
    228233 
    229234  case 3: /* encrypt (w)ith */ 
    230     msg->security |= SMIMEENCRYPT; 
     235    msg->security |= ENCRYPT; 
    231236    switch (mutt_multi_choice (_("1: DES, 2: Triple-DES, 3: RC2-40," 
    232237                                 " 4: RC2-64, 5: RC2-128, or (f)orget it? "), 
     
    257262        mutt_message("Can\'t sign: No key specified. use sign(as)."); 
    258263    else 
    259         msg->security |= SMIMESIGN; 
     264        msg->security |= SIGN; 
    260265    break; 
    261266 
     
    266271      mutt_str_replace (&SmimeDefaultKey, p); 
    267272         
    268       msg->security |= SMIMESIGN; 
     273      msg->security |= SIGN; 
    269274 
    270275      /* probably need a different passphrase */ 
     
    272277    } 
    273278    else 
    274       msg->security &= ~SMIMESIGN; 
     279      msg->security &= ~SIGN; 
    275280 
    276281    *redraw = REDRAW_FULL; 
     
    278283 
    279284  case 5: /* (b)oth */ 
    280     msg->security = SMIMEENCRYPT | SMIMESIGN; 
     285    msg->security = ENCRYPT | SIGN; 
    281286    break; 
    282287 
     
    285290    break; 
    286291  } 
     292 
     293  if (msg->security && msg->security != APPLICATION_SMIME) 
     294    msg->security |= APPLICATION_SMIME; 
     295  else 
     296    msg->security = 0; 
    287297 
    288298  if(*redraw)