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