2 Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
3 Ben Kibbey <bjk@luxsci.net>
5 This file is part of pwmd.
7 Pwmd is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 2 of the License, or
10 (at your option) any later version.
12 Pwmd is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Pwmd. If not, see <http://www.gnu.org/licenses/>.
24 #include <gpg-error.h>
25 #include <sys/types.h>
32 #elif defined (HAVE_INTTYPES_H)
40 char **pubkey
; /* SAVE --keyid */
41 char **sigkey
; /* SAVE --sign-keyid */
46 assuan_context_t client_ctx
;
48 unsigned char *plaintext
;
49 size_t plaintext_size
;
53 char *filename
; /* the currently opened data file */
55 gpg_error_t progress_rc
;
56 time_t status_timeout
;
59 gpgme_error_t
crypto_init (struct crypto_s
**, void *, const char *, int);
60 gpgme_error_t
crypto_init_ctx (struct crypto_s
*, int);
61 gpgme_error_t
crypto_genkey (struct client_s
*, struct crypto_s
*,
62 const unsigned char *);
63 gpgme_error_t
crypto_encrypt (struct client_s
*, struct crypto_s
*);
64 gpgme_error_t
crypto_decrypt (struct client_s
*, struct crypto_s
*);
65 gpgme_error_t
crypto_passwd (struct client_s
*, struct crypto_s
*);
66 void crypto_cleanup (struct crypto_s
*);
67 void crypto_cleanup_save (struct save_s
*);
68 void crypto_cleanup_non_keys (struct crypto_s
*);
69 gpgme_error_t
crypto_data_to_buf (const gpgme_data_t
, unsigned char **,
71 char *crypto_default_key_params ();
72 gpg_error_t
crypto_write_file (struct crypto_s
*);
73 gpgme_error_t
crypto_list_keys (struct crypto_s
*, char **, int secret
,
75 char *crypto_key_info (const gpgme_key_t
);
76 void crypto_free_key_list (gpgme_key_t
*);
77 gpg_error_t
crypto_try_decrypt (struct client_s
*, int);