xref: /titanic_41/usr/src/cmd/ssh/include/readpassphrase.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1 /*	$OpenBSD: readpassphrase.h,v 1.3 2002/06/28 12:32:22 millert Exp $	*/
2 
3 #ifndef	_READPASSPHRASE_H
4 #define	_READPASSPHRASE_H
5 
6 #pragma ident	"%Z%%M%	%I%	%E% SMI"
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 
13 /*
14  * Copyright (c) 2000 Todd C. Miller <Todd.Miller@courtesan.com>
15  * All rights reserved.
16  *
17  * Redistribution and use in source and binary forms, with or without
18  * modification, are permitted provided that the following conditions
19  * are met:
20  * 1. Redistributions of source code must retain the above copyright
21  *    notice, this list of conditions and the following disclaimer.
22  * 2. Redistributions in binary form must reproduce the above copyright
23  *    notice, this list of conditions and the following disclaimer in the
24  *    documentation and/or other materials provided with the distribution.
25  * 3. The name of the author may not be used to endorse or promote products
26  *    derived from this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
29  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
30  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
31  * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
33  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
34  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
35  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
36  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
37  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38  */
39 
40 #include "includes.h"
41 
42 #ifndef HAVE_READPASSPHRASE
43 
44 #define RPP_ECHO_OFF    0x00		/* Turn off echo (default). */
45 #define RPP_ECHO_ON     0x01		/* Leave echo on. */
46 #define RPP_REQUIRE_TTY 0x02		/* Fail if there is no tty. */
47 #define RPP_FORCELOWER  0x04		/* Force input to lower case. */
48 #define RPP_FORCEUPPER  0x08		/* Force input to upper case. */
49 #define RPP_SEVENBIT    0x10		/* Strip the high bit from input. */
50 #define RPP_STDIN       0x20		/* Read from stdin, not /dev/tty */
51 
52 char * readpassphrase(const char *, char *, size_t, int);
53 
54 #endif /* HAVE_READPASSPHRASE */
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
60 #endif /* _READPASSPHRASE_H */
61