2016-05-18 02:24:17 +08:00
|
|
|
/*
|
2021-02-18 22:57:13 +08:00
|
|
|
* Copyright 2004-2021 The OpenSSL Project Authors. All Rights Reserved.
|
2016-05-18 02:24:17 +08:00
|
|
|
*
|
2018-12-06 20:12:35 +08:00
|
|
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
2016-05-18 02:24:17 +08:00
|
|
|
* this file except in compliance with the License. You can obtain a copy
|
|
|
|
* in the file LICENSE in the source distribution or at
|
|
|
|
* https://www.openssl.org/source/license.html
|
|
|
|
*/
|
|
|
|
|
2015-01-22 11:40:55 +08:00
|
|
|
/*
|
2017-06-20 10:48:25 +08:00
|
|
|
* This file is dual-licensed and is also available under the following
|
2017-06-16 01:15:26 +08:00
|
|
|
* terms:
|
|
|
|
*
|
2004-07-10 21:16:02 +08:00
|
|
|
* Copyright (c) 2004, Richard Levitte <richard@levitte.org>
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
2019-09-28 06:45:57 +08:00
|
|
|
#ifndef OSSL_INTERNAL_O_DIR_H
|
|
|
|
# define OSSL_INTERNAL_O_DIR_H
|
2021-02-07 05:14:03 +08:00
|
|
|
# pragma once
|
2004-07-10 21:16:02 +08:00
|
|
|
|
2015-01-22 11:40:55 +08:00
|
|
|
typedef struct OPENSSL_dir_context_st OPENSSL_DIR_CTX;
|
2004-07-10 21:16:02 +08:00
|
|
|
|
2017-08-11 22:15:22 +08:00
|
|
|
/*
|
|
|
|
* returns NULL on error or end-of-directory. If it is end-of-directory,
|
|
|
|
* errno will be zero
|
|
|
|
*/
|
2015-01-22 11:40:55 +08:00
|
|
|
const char *OPENSSL_DIR_read(OPENSSL_DIR_CTX **ctx, const char *directory);
|
2017-08-11 22:15:22 +08:00
|
|
|
/* returns 1 on success, 0 on error */
|
2015-01-22 11:40:55 +08:00
|
|
|
int OPENSSL_DIR_end(OPENSSL_DIR_CTX **ctx);
|
2004-07-10 21:16:02 +08:00
|
|
|
|
2015-01-22 11:40:55 +08:00
|
|
|
#endif /* LPDIR_H */
|