projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
pgp.c
diff --git
a/pgp.c
b/pgp.c
index
73f39e8
..
929f489
100644
(file)
--- a/
pgp.c
+++ b/
pgp.c
@@
-1,6
+1,6
@@
/*
* Copyright (C) 1996,1997 Michael R. Elkins <me@mutt.org>
/*
* Copyright (C) 1996,1997 Michael R. Elkins <me@mutt.org>
- * Copyright (
c
) 1998,1999 Thomas Roessler <roessler@does-not-exist.org>
+ * Copyright (
C
) 1998,1999 Thomas Roessler <roessler@does-not-exist.org>
* Copyright (C) 2004 g10 Code GmbH
*
* This program is free software; you can redistribute it and/or modify
* Copyright (C) 2004 g10 Code GmbH
*
* This program is free software; you can redistribute it and/or modify
@@
-26,6
+26,10
@@
* a message.
*/
* a message.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "mutt.h"
#include "mutt_curses.h"
#include "pgp.h"
#include "mutt.h"
#include "mutt_curses.h"
#include "pgp.h"
@@
-209,7
+213,7
@@
static void pgp_copy_clearsigned (FILE *fpin, STATE *s, char *charset)
if (armor_header)
{
char *p = mutt_skip_whitespace (buf);
if (armor_header)
{
char *p = mutt_skip_whitespace (buf);
- if (*p == '\
n
')
+ if (*p == '\
0
')
armor_header = 0;
continue;
}
armor_header = 0;
continue;
}
@@
-797,8
+801,10
@@
BODY *pgp_decrypt_part (BODY *a, STATE *s, FILE *fpout, BODY *p)
fflush (fpout);
rewind (fpout);
fflush (fpout);
rewind (fpout);
- if (f
eof (fpout)
)
+ if (f
getc (fpout) == EOF
)
return NULL;
return NULL;
+
+ rewind (fpout);
if ((tattach = mutt_read_mime_header (fpout, 0)) != NULL)
{
if ((tattach = mutt_read_mime_header (fpout, 0)) != NULL)
{
@@
-1484,6
+1490,11
@@
int pgp_send_menu (HEADER *msg, int *redraw)
if (!(WithCrypto & APPLICATION_PGP))
return msg->security;
if (!(WithCrypto & APPLICATION_PGP))
return msg->security;
+
+ /* If autoinline and no crypto options set, then set inline. */
+ if (option (OPTPGPAUTOINLINE) &&
+ !((msg->security & APPLICATION_PGP) && (msg->security & (SIGN|ENCRYPT))))
+ msg->security |= INLINE;
snprintf (prompt, sizeof (prompt),
_("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, %s, or (c)lear? "),
snprintf (prompt, sizeof (prompt),
_("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, %s, or (c)lear? "),