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