X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/75b1b62430734fba729675f563138817bc853a60..95959d1099b58690f2d490d22bfbbfc678380964:/pixie.h diff --git a/pixie.h b/pixie.h index 2ae9e43..e66a8ba 100644 --- a/pixie.h +++ b/pixie.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: pixie.h,v 1.1 1999/12/22 15:58:41 mdw Exp $ + * $Id: pixie.h,v 1.2 2000/06/17 11:49:49 mdw Exp $ * * Passphrase pixie definitions (Unix-specific) * @@ -30,6 +30,10 @@ /*----- Revision history --------------------------------------------------* * * $Log: pixie.h,v $ + * Revision 1.2 2000/06/17 11:49:49 mdw + * New pixie protocol allowing application to request passphrases and send + * them to the pixie. + * * Revision 1.1 1999/12/22 15:58:41 mdw * Passphrase pixie support. * @@ -78,6 +82,10 @@ * VERIFY tag [expire] * Request a new passphrase, which therefore requires verification. * + * SET tag [expire] -- phrase + * Set the value of passphrase `tag'. This will usually be a follow-up + * to a MISSING response. + * * FLUSH [tag] * Flush the passphrase named `tag', or all passphrases, from memory. * @@ -90,6 +98,11 @@ * Request completed successfully. If a passphrase was requested, it is * returned by the pixie. This is the final response to a request. * + * MISSING + * The passphrase requested is not known, and no requester mechanism is + * present. The client should request the passphrase itself and pass it + * back to the pixie. This is the final response to a request. + * * FAIL error * Reports an error. The message given is intended to be * human-readable. This is the final response to a request. @@ -129,7 +142,8 @@ extern int pixie_open(const char */*sock*/); * @char *buf@ = pointer to destination buffer * @size_t sz@ = size of the buffer * - * Returns: Zero if all went well, nonzero if the read fails. + * Returns: Zero if all went well, @-1@ if the read fails, @+1@ to + * request the passphrase from the user. * * Use: Reads a passphrase from the pixie. */ @@ -137,6 +151,20 @@ extern int pixie_open(const char */*sock*/); extern int pixie_read(int /*fd*/, const char */*tag*/, unsigned /*mode*/, char */*buf*/, size_t /*sz*/); +/* --- @pixie_set@ --- * + * + * Arguments: @int fd@ = pixie file descriptor + * @const char *tag@ = pointer to tag string + * @const char *phrase@ = pointer to passphrase string + * + * Returns: --- + * + * Use: Sends a passphrase to the passphrase pixie. + */ + +extern void pixie_set(int /*fd*/, const char */*tag*/, + const char */*phrase*/); + /* --- @pixie_cancel@ --- * * * Arguments: @int fd@ = pixie file descriptor