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