X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_crypt.h;h=6b57382ec03433b8ca5116b6bec1b3ffbc337ff4;hp=bd3c8c5e5db37d5baff904fe06eb183f60001a5c;hb=8518fe25efade712e3590e5b13537fb0021d4073;hpb=6833ce8bdca2d64e14485118f2a4417b7e1cb1b1 diff --git a/mutt_crypt.h b/mutt_crypt.h index bd3c8c5..6b57382 100644 --- a/mutt_crypt.h +++ b/mutt_crypt.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2003 Werner Koch + * Copyright (C) 2004 g10code GmbH * * 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 @@ -36,15 +37,19 @@ #define BADSIGN (1 << 3) #define PARTSIGN (1 << 4) #define SIGNOPAQUE (1 << 5) -/* (1 << 6) is used by PGPKEY below. */ +#define KEYBLOCK (1 << 6) /* KEY too generic? */ +#define INLINE (1 << 7) -#define APPLICATION_PGP (1 << 7) -#define APPLICATION_SMIME (1 << 8) +#define APPLICATION_PGP (1 << 8) +#define APPLICATION_SMIME (1 << 9) + +#define PGP_TRADITIONAL_CHECKED (1 << 10) #define PGPENCRYPT (APPLICATION_PGP | ENCRYPT) #define PGPSIGN (APPLICATION_PGP | SIGN) #define PGPGOODSIGN (APPLICATION_PGP | GOODSIGN) -#define PGPKEY (APPLICATION_PGP | (1 << 6)) +#define PGPKEY (APPLICATION_PGP | KEYBLOCK) +#define PGPINLINE (APPLICATION_PGP | INLINE) #define SMIMEENCRYPT (APPLICATION_SMIME | ENCRYPT) #define SMIMESIGN (APPLICATION_SMIME | SIGN) @@ -59,14 +64,12 @@ effectively as a conditional compile directive. It is set to false if no crypto backend is configures or to a bit vector denoting the configured backends. */ -#if defined(CRYPT_BACKEND_CLASSIC_PGP) && defined(CRYPT_BACKEND_CLASSIC_SMIME) +#if (defined(CRYPT_BACKEND_CLASSIC_PGP) && defined(CRYPT_BACKEND_CLASSIC_SMIME)) || defined (CRYPT_BACKEND_GPGME) # define WithCrypto (APPLICATION_PGP | APPLICATION_SMIME) #elif defined(CRYPT_BACKEND_CLASSIC_PGP) # define WithCrypto APPLICATION_PGP #elif defined(CRYPT_BACKEND_CLASSIC_SMIME) # define WithCrypto APPLICATION_SMIME -#elif defined(CRYPT_BACKEND_GPGME) -# define WithCrypto (APPLICATION_PGP | APPLICATION_SMIME) #else # define WithCrypto 0 #endif @@ -74,6 +77,7 @@ #define KEYFLAG_CANSIGN (1 << 0) #define KEYFLAG_CANENCRYPT (1 << 1) +#define KEYFLAG_ISX509 (1 << 2) #define KEYFLAG_SECRET (1 << 7) #define KEYFLAG_EXPIRED (1 << 8) #define KEYFLAG_REVOKED (1 << 9) @@ -103,7 +107,7 @@ typedef struct pgp_keyinfo *pgp_key_t; /* Some prototypes -- old crypt.h. */ -int mutt_protect (HEADER *, HEADER *, char *); +int mutt_protect (HEADER *, char *); int mutt_is_multipart_encrypted (BODY *); @@ -160,6 +164,9 @@ void crypt_invoke_message (int type); /* Silently forget about a passphrase. */ void crypt_pgp_void_passphrase (void); +int crypt_pgp_valid_passphrase (void); + + /* Decrypt a PGP/MIME message. */ int crypt_pgp_decrypt_mime (FILE *a, FILE **b, BODY *c, BODY **d); @@ -202,6 +209,8 @@ BODY *crypt_pgp_encrypt_message (BODY *a, char *keylist, int sign); /* Invoke the PGP command to import a key. */ void crypt_pgp_invoke_import (const char *fname); +int crypt_pgp_send_menu (HEADER *msg, int *redraw); + /* fixme: needs documentation */ int crypt_pgp_verify_one (BODY *sigbdy, STATE *s, const char *tempf); @@ -218,6 +227,8 @@ void crypt_pgp_extract_keys_from_attachment_list (FILE *fp, int tag,BODY *top); /* Silently forget about a passphrase. */ void crypt_smime_void_passphrase (void); +int crypt_smime_valid_passphrase (void); + /* Decrypt an S/MIME message. */ int crypt_smime_decrypt_mime (FILE *a, FILE **b, BODY *c, BODY **d); @@ -246,8 +257,11 @@ BODY *crypt_smime_build_smime_entity (BODY *a, char *certlist); /* Add a certificate and update index file (externally). */ void crypt_smime_invoke_import (char *infile, char *mailbox); +int crypt_smime_send_menu (HEADER *msg, int *redraw); + /* fixme: needs documentation */ int crypt_smime_verify_one (BODY *sigbdy, STATE *s, const char *tempf); +void crypt_init (void); #endif /*MUTT_CRYPT_H*/