| | 850 | |
| | 851 | |
| | 852 | #ifdef HAVE_PGP |
| | 853 | |
| | 854 | static int _mutt_check_traditional_pgp (HEADER *h, int *redraw) |
| | 855 | { |
| | 856 | MESSAGE *msg; |
| | 857 | int rv = 0; |
| | 858 | |
| | 859 | mutt_parse_mime_message (Context, h); |
| | 860 | if ((msg = mx_open_message (Context, h->msgno)) == NULL) |
| | 861 | return 0; |
| | 862 | if (pgp_check_traditional (msg->fp, h->content, 0)) |
| | 863 | { |
| | 864 | h->pgp = pgp_query (h->content); |
| | 865 | *redraw |= REDRAW_FULL; |
| | 866 | rv = 1; |
| | 867 | } |
| | 868 | |
| | 869 | mx_close_message (&msg); |
| | 870 | return rv; |
| | 871 | } |
| | 872 | |
| | 873 | int mutt_check_traditional_pgp (HEADER *h, int *redraw) |
| | 874 | { |
| | 875 | int i; |
| | 876 | int rv = 0; |
| | 877 | if (h) |
| | 878 | rv = _mutt_check_traditional_pgp (h, redraw); |
| | 879 | else |
| | 880 | { |
| | 881 | for (i = 0; i < Context->vcount; i++) |
| | 882 | if (Context->hdrs[Context->v2r[i]]->tagged) |
| | 883 | rv = _mutt_check_traditional_pgp (Context->hdrs[Context->v2r[i]], redraw) |
| | 884 | || rv; |
| | 885 | } |
| | 886 | return rv; |
| | 887 | } |
| | 888 | |
| | 889 | #endif |