/*
* Copyright (C) 1996,1997 Michael R. Elkins <me@cs.hmc.edu>
* Copyright (c) 1998,1999 Thomas Roessler <roessler@guug.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* This file contains all of the PGP routines necessary to sign, encrypt,
* verify and decrypt PGP messages in either the new PGP/MIME format, or
* in the older Application/Pgp format. It also contains some code to
* cache the user's passphrase for repeat use when decrypting or signing
* a message.
*/
#include "mutt.h"
#include "mutt_curses.h"
#include "pgp.h"
#include "mime.h"
#include "parse.h"
#include <sys/wait.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <errno.h>
#include <ctype.h>
#ifdef _PGPPATH
char PgpPass[STRING];
static time_t PgpExptime = 0; /* when does the cached passphrase expire? */
static struct pgp_vinfo pgp_vinfo[] =
{
{ PGP_V2,
"pgp2",
&PgpV2, &PgpV2Pubring, &PgpV2Secring, &PgpV2Language,
pgp_get_candidates,
pgp_v2_invoke_decode, pgp_v2_invoke_verify, pgp_v2_invoke_decrypt,
pgp_v2_invoke_sign, pgp_v2_invoke_encrypt, pgp_v2_invoke_import,
pgp_v2_invoke_export, pgp_v2_invoke_verify_key
},
{<