xref: /freebsd/crypto/openssl/include/internal/o_dir.h (revision e71b70530d95c4f34d8bdbd78d1242df1ba4a945)
1*e71b7053SJung-uk Kim /*
2*e71b7053SJung-uk Kim  * Copyright 2004-2018 The OpenSSL Project Authors. All Rights Reserved.
3*e71b7053SJung-uk Kim  *
4*e71b7053SJung-uk Kim  * Licensed under the OpenSSL license (the "License").  You may not use
5*e71b7053SJung-uk Kim  * this file except in compliance with the License.  You can obtain a copy
6*e71b7053SJung-uk Kim  * in the file LICENSE in the source distribution or at
7*e71b7053SJung-uk Kim  * https://www.openssl.org/source/license.html
8*e71b7053SJung-uk Kim  */
9*e71b7053SJung-uk Kim 
10*e71b7053SJung-uk Kim /*
11*e71b7053SJung-uk Kim  * This file is dual-licensed and is also available under the following
12*e71b7053SJung-uk Kim  * terms:
13*e71b7053SJung-uk Kim  *
14*e71b7053SJung-uk Kim  * Copyright (c) 2004, Richard Levitte <richard@levitte.org>
15*e71b7053SJung-uk Kim  * All rights reserved.
16*e71b7053SJung-uk Kim  *
17*e71b7053SJung-uk Kim  * Redistribution and use in source and binary forms, with or without
18*e71b7053SJung-uk Kim  * modification, are permitted provided that the following conditions
19*e71b7053SJung-uk Kim  * are met:
20*e71b7053SJung-uk Kim  * 1. Redistributions of source code must retain the above copyright
21*e71b7053SJung-uk Kim  *    notice, this list of conditions and the following disclaimer.
22*e71b7053SJung-uk Kim  * 2. Redistributions in binary form must reproduce the above copyright
23*e71b7053SJung-uk Kim  *    notice, this list of conditions and the following disclaimer in the
24*e71b7053SJung-uk Kim  *    documentation and/or other materials provided with the distribution.
25*e71b7053SJung-uk Kim  *
26*e71b7053SJung-uk Kim  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27*e71b7053SJung-uk Kim  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28*e71b7053SJung-uk Kim  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29*e71b7053SJung-uk Kim  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30*e71b7053SJung-uk Kim  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31*e71b7053SJung-uk Kim  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32*e71b7053SJung-uk Kim  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33*e71b7053SJung-uk Kim  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34*e71b7053SJung-uk Kim  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35*e71b7053SJung-uk Kim  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36*e71b7053SJung-uk Kim  * SUCH DAMAGE.
37*e71b7053SJung-uk Kim  */
38*e71b7053SJung-uk Kim 
39*e71b7053SJung-uk Kim #ifndef O_DIR_H
40*e71b7053SJung-uk Kim # define O_DIR_H
41*e71b7053SJung-uk Kim 
42*e71b7053SJung-uk Kim typedef struct OPENSSL_dir_context_st OPENSSL_DIR_CTX;
43*e71b7053SJung-uk Kim 
44*e71b7053SJung-uk Kim /*
45*e71b7053SJung-uk Kim  * returns NULL on error or end-of-directory. If it is end-of-directory,
46*e71b7053SJung-uk Kim  * errno will be zero
47*e71b7053SJung-uk Kim  */
48*e71b7053SJung-uk Kim const char *OPENSSL_DIR_read(OPENSSL_DIR_CTX **ctx, const char *directory);
49*e71b7053SJung-uk Kim /* returns 1 on success, 0 on error */
50*e71b7053SJung-uk Kim int OPENSSL_DIR_end(OPENSSL_DIR_CTX **ctx);
51*e71b7053SJung-uk Kim 
52*e71b7053SJung-uk Kim #endif                          /* LPDIR_H */
53