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