5 * (c) 1999 Straylight/Edgeware
8 /*----- Licensing notice --------------------------------------------------*
10 * This file is part of Catacomb.
12 * Catacomb is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU Library General Public License as
14 * published by the Free Software Foundation; either version 2 of the
15 * License, or (at your option) any later version.
17 * Catacomb is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Library General Public License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with Catacomb; if not, write to the Free
24 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
28 #ifndef CATACOMB_PASSPHRASE_H
29 #define CATACOMB_PASSPHRASE_H
35 /*----- Header files ------------------------------------------------------*/
39 /*----- Data structures ---------------------------------------------------*/
41 /* --- Passphrase modes --- *
43 * @PMODE_VERIFY@ requests that the passphrase be repeated to make sure it's
52 /*----- Functions provided ------------------------------------------------*/
54 /* --- @passphrase_connect@ ---
56 * Arguments: @const char *sock@ = socket name to connect to, or null for
59 * Returns: Zero if OK, nonzero if it failed
61 * Use: Attempts to connect to the passphrase pixie.
64 extern int passphrase_connect(const char */*sock*/);
66 /* --- @passphrase_read@ --- *
68 * Arguments: @const char *tag@ = pointer to passphrase tag string
69 * @unsigned mode@ = reading mode
70 * @char *buf@ = pointer to destination buffer
71 * @size_t sz@ = size of destination buffer
73 * Returns: Zero if successful, nonzero on failure.
75 * Use: Reads a passphrase from the user, using some system-specific
76 * secure mechanism. The mechanism may keep a cache of
77 * passphrases, so the user may not necessarily be prompted.
80 extern int passphrase_read(const char */*tag*/, unsigned /*mode*/,
81 char */*buf*/, size_t /*sz*/);
83 /* --- @passphrase_cancel@ --- *
85 * Arguments: @const char *tag@ = pointer to passphrase tag string
89 * Use: Attempts to make the passphrase cache forget about a
90 * particular passphrase. This may be useful if the passphrase
91 * turns out to be wrong, or if the user is attempting to change
95 extern void passphrase_cancel(const char */*tag*/);
97 /*----- That's all, folks -------------------------------------------------*/