xref: /onnv-gate/usr/src/common/openssl/crypto/o_dir.h (revision 2139:6243c3338933)
1*2139Sjp161948 /* crypto/o_dir.h -*- mode:C; c-file-style: "eay" -*- */
2*2139Sjp161948 /* Copied from Richard Levitte's (richard@levitte.org) LP library.  All
3*2139Sjp161948  * symbol names have been changed, with permission from the author.
4*2139Sjp161948  */
5*2139Sjp161948 
6*2139Sjp161948 /* $LP: LPlib/source/LPdir.h,v 1.1 2004/06/14 08:56:04 _cvs_levitte Exp $ */
7*2139Sjp161948 /*
8*2139Sjp161948  * Copyright (c) 2004, Richard Levitte <richard@levitte.org>
9*2139Sjp161948  * All rights reserved.
10*2139Sjp161948  *
11*2139Sjp161948  * Redistribution and use in source and binary forms, with or without
12*2139Sjp161948  * modification, are permitted provided that the following conditions
13*2139Sjp161948  * are met:
14*2139Sjp161948  * 1. Redistributions of source code must retain the above copyright
15*2139Sjp161948  *    notice, this list of conditions and the following disclaimer.
16*2139Sjp161948  * 2. Redistributions in binary form must reproduce the above copyright
17*2139Sjp161948  *    notice, this list of conditions and the following disclaimer in the
18*2139Sjp161948  *    documentation and/or other materials provided with the distribution.
19*2139Sjp161948  *
20*2139Sjp161948  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21*2139Sjp161948  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22*2139Sjp161948  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23*2139Sjp161948  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24*2139Sjp161948  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25*2139Sjp161948  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26*2139Sjp161948  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27*2139Sjp161948  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28*2139Sjp161948  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29*2139Sjp161948  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30*2139Sjp161948  * SUCH DAMAGE.
31*2139Sjp161948  */
32*2139Sjp161948 
33*2139Sjp161948 
34*2139Sjp161948 #ifndef O_DIR_H
35*2139Sjp161948 #define O_DIR_H
36*2139Sjp161948 
37*2139Sjp161948 #ifdef __cplusplus
38*2139Sjp161948 extern "C" {
39*2139Sjp161948 #endif
40*2139Sjp161948 
41*2139Sjp161948   typedef struct OPENSSL_dir_context_st OPENSSL_DIR_CTX;
42*2139Sjp161948 
43*2139Sjp161948   /* returns NULL on error or end-of-directory.
44*2139Sjp161948      If it is end-of-directory, errno will be zero */
45*2139Sjp161948   const char *OPENSSL_DIR_read(OPENSSL_DIR_CTX **ctx, const char *directory);
46*2139Sjp161948   /* returns 1 on success, 0 on error */
47*2139Sjp161948   int OPENSSL_DIR_end(OPENSSL_DIR_CTX **ctx);
48*2139Sjp161948 
49*2139Sjp161948 #ifdef __cplusplus
50*2139Sjp161948 }
51*2139Sjp161948 #endif
52*2139Sjp161948 
53*2139Sjp161948 #endif /* LPDIR_H */
54