chiark / gitweb /
gnupg2 (2.1.17-3) unstable; urgency=medium
[gnupg2.git] / common / get-passphrase.h
1 /* get-passphrase.h - Definitions to ask for a passphrase via the agent.
2  * Copyright (C) 2009 Free Software Foundation, Inc.
3  *
4  * This file is part of GnuPG.
5  *
6  * This file is free software; you can redistribute it and/or modify
7  * it under the terms of either
8  *
9  *   - the GNU Lesser General Public License as published by the Free
10  *     Software Foundation; either version 3 of the License, or (at
11  *     your option) any later version.
12  *
13  * or
14  *
15  *   - the GNU General Public License as published by the Free
16  *     Software Foundation; either version 2 of the License, or (at
17  *     your option) any later version.
18  *
19  * or both in parallel, as here.
20  *
21  * This file is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24  * GNU General Public License for more details.
25  *
26  * You should have received a copy of the GNU General Public License
27  * along with this program; if not, see <https://www.gnu.org/licenses/>.
28  */
29
30 #ifndef GNUPG_COMMON_GET_PASSPHRASE_H
31 #define GNUPG_COMMON_GET_PASSPHRASE_H
32
33 #include "session-env.h"
34
35 void gnupg_prepare_get_passphrase (gpg_err_source_t errsource,
36                                    int verbosity,
37                                    const char *agent_program,
38                                    const char *opt_lc_ctype,
39                                    const char *opt_lc_messages,
40                                    session_env_t session_env);
41
42 gpg_error_t gnupg_get_passphrase (const char *cache_id,
43                                   const char *err_msg,
44                                   const char *prompt,
45                                   const char *desc_msg,
46                                   int repeat,
47                                   int check_quality,
48                                   int use_secmem,
49                                   char **r_passphrase);
50
51 gpg_error_t gnupg_clear_passphrase (const char *cache_id);
52
53
54 #endif /*GNUPG_COMMON_GET_PASSPHRASE_H*/