~ubuntu-branches/ubuntu/hardy/gnupg/hardy-updates

« back to all changes in this revision

Viewing changes to g10/keydb.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-12-16 16:57:39 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20051216165739-v0m2d1you6hd8jho
Tags: upstream-1.4.2
ImportĀ upstreamĀ versionĀ 1.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* keydb.h - Key database
2
 
 * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
3
 
 *               2004 Free Software Foundation, Inc.
 
2
 * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
3
 *               2005 Free Software Foundation, Inc.
4
4
 *
5
5
 * This file is part of GnuPG.
6
6
 *
16
16
 *
17
17
 * You should have received a copy of the GNU General Public License
18
18
 * along with this program; if not, write to the Free Software
19
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 
20
 * USA.
20
21
 */
21
22
 
22
23
#ifndef G10_KEYDB_H
26
27
#include "global.h"
27
28
#include "packet.h"
28
29
#include "cipher.h"
 
30
#ifdef ENABLE_AGENT_SUPPORT
 
31
#include "assuan.h"
 
32
#endif
29
33
 
30
34
/* What qualifies as a certification (rather than a signature?) */
31
35
#define IS_CERT(s)       (IS_KEY_SIG(s) || IS_UID_SIG(s) || IS_SUBKEY_SIG(s) \
184
188
                                            int unlock, unsigned use );
185
189
 
186
190
/*-- passphrase.h --*/
 
191
#ifdef ENABLE_AGENT_SUPPORT
 
192
assuan_context_t agent_open (int try, const char *orig_codeset);
 
193
void agent_close (assuan_context_t ctx);
 
194
#else
 
195
/* If we build w/o agent support, assuan.h won't get included and thus
 
196
   we need to define a replacement for some Assuan types. */
 
197
typedef int assuan_error_t;
 
198
typedef void *assuan_context_t;
 
199
#endif
187
200
int  have_static_passphrase(void);
188
201
void read_passphrase_from_fd( int fd );
189
 
void passphrase_clear_cache ( u32 *keyid, int algo );
 
202
void passphrase_clear_cache ( u32 *keyid, const char *cacheid, int algo );
190
203
char *ask_passphrase (const char *description,
191
204
                      const char *tryagain_text,
192
205
                      const char *promptid,
193
 
                      const char *prompt, int *canceled);
 
206
                      const char *prompt, 
 
207
                      const char *cacheid, int *canceled);
194
208
DEK *passphrase_to_dek( u32 *keyid, int pubkey_algo,
195
209
                        int cipher_algo, STRING2KEY *s2k, int mode,
196
210
                        const char *tryagain_text, int *canceled);