smime.h 1.82 KB
Newer Older
1
/*
2
 * Copyright (C) 2001-2002 Oliver Ehli <elmy@acm.org>
3
 * Copyright (C) 2004 g10 Code GmbH
4 5 6 7 8
 *
 *     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.
9
 *
10 11 12 13
 *     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.
14
 *
15 16
 *     You should have received a copy of the GNU General Public License
 *     along with this program; if not, write to the Free Software
17
 *     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18 19 20
 */


21
#ifdef CRYPT_BACKEND_CLASSIC_SMIME
22

23
#include "mutt_crypt.h"
24

25 26 27 28 29 30 31 32 33
typedef struct smime_key {
  char *email;
  char *hash;
  char *label;
  char *issuer;
  char trust; /* i=Invalid r=revoked e=expired u=unverified v=verified t=trusted */
  int flags;
  struct smime_key *next;
} smime_key_t;
34 35


36
void smime_free_key (smime_key_t **);
37 38

void smime_void_passphrase (void);
39
int smime_valid_passphrase (void);
40

Thomas Roessler's avatar
Thomas Roessler committed
41
int   smime_decrypt_mime (FILE *, FILE **, BODY *, BODY **);
42

43
int  smime_application_smime_handler (BODY *, STATE *);
44 45


Thomas Roessler's avatar
Thomas Roessler committed
46
BODY* smime_sign_message (BODY *);
47

Thomas Roessler's avatar
Thomas Roessler committed
48
BODY* smime_build_smime_entity (BODY *, char *);
49

Thomas Roessler's avatar
Thomas Roessler committed
50
int   smime_verify_one(BODY *, STATE *, const char *);
51 52


Thomas Roessler's avatar
Thomas Roessler committed
53
int   smime_verify_sender(HEADER *);
54 55


Thomas Roessler's avatar
Thomas Roessler committed
56
char* smime_get_field_from_db (char *, char *, short, short);
57

Thomas Roessler's avatar
Thomas Roessler committed
58
void  smime_getkeys (ENVELOPE *);
59

60
smime_key_t *smime_ask_for_key(char *, short, short);
61

62
char *smime_findKeys (ADDRESS *adrlist, int oppenc_mode);
63

Thomas Roessler's avatar
Thomas Roessler committed
64
void  smime_invoke_import (char *, char *);
65

66
int smime_send_menu (HEADER *msg);
67

68
#endif