1*72fb407fStb /* $OpenBSD: conf_local.h,v 1.9 2024/10/18 11:12:10 tb Exp $ */ 2a681313fStb /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3a681313fStb * All rights reserved. 4a681313fStb * 5a681313fStb * This package is an SSL implementation written 6a681313fStb * by Eric Young (eay@cryptsoft.com). 7a681313fStb * The implementation was written so as to conform with Netscapes SSL. 8a681313fStb * 9a681313fStb * This library is free for commercial and non-commercial use as long as 10a681313fStb * the following conditions are aheared to. The following conditions 11a681313fStb * apply to all code found in this distribution, be it the RC4, RSA, 12a681313fStb * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13a681313fStb * included with this distribution is covered by the same copyright terms 14a681313fStb * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15a681313fStb * 16a681313fStb * Copyright remains Eric Young's, and as such any Copyright notices in 17a681313fStb * the code are not to be removed. 18a681313fStb * If this package is used in a product, Eric Young should be given attribution 19a681313fStb * as the author of the parts of the library used. 20a681313fStb * This can be in the form of a textual message at program startup or 21a681313fStb * in documentation (online or textual) provided with the package. 22a681313fStb * 23a681313fStb * Redistribution and use in source and binary forms, with or without 24a681313fStb * modification, are permitted provided that the following conditions 25a681313fStb * are met: 26a681313fStb * 1. Redistributions of source code must retain the copyright 27a681313fStb * notice, this list of conditions and the following disclaimer. 28a681313fStb * 2. Redistributions in binary form must reproduce the above copyright 29a681313fStb * notice, this list of conditions and the following disclaimer in the 30a681313fStb * documentation and/or other materials provided with the distribution. 31a681313fStb * 3. All advertising materials mentioning features or use of this software 32a681313fStb * must display the following acknowledgement: 33a681313fStb * "This product includes cryptographic software written by 34a681313fStb * Eric Young (eay@cryptsoft.com)" 35a681313fStb * The word 'cryptographic' can be left out if the rouines from the library 36a681313fStb * being used are not cryptographic related :-). 37a681313fStb * 4. If you include any Windows specific code (or a derivative thereof) from 38a681313fStb * the apps directory (application code) you must include an acknowledgement: 39a681313fStb * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40a681313fStb * 41a681313fStb * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42a681313fStb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43a681313fStb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44a681313fStb * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45a681313fStb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46a681313fStb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47a681313fStb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48a681313fStb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49a681313fStb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50a681313fStb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51a681313fStb * SUCH DAMAGE. 52a681313fStb * 53a681313fStb * The licence and distribution terms for any publically available version or 54a681313fStb * derivative of this code cannot be changed. i.e. this code cannot simply be 55a681313fStb * copied and put under another distribution licence 56a681313fStb * [including the GNU Public Licence.] 57a681313fStb */ 58a681313fStb 59a681313fStb #ifndef HEADER_CONF_LOCAL_H 60a681313fStb #define HEADER_CONF_LOCAL_H 61a681313fStb 62a681313fStb __BEGIN_HIDDEN_DECLS 63a681313fStb 64c61ca276Stb const CONF_METHOD *NCONF_default(void); 65c61ca276Stb 66a681313fStb struct conf_method_st { 67a681313fStb const char *name; 689cc23e66Stb CONF *(*create)(const CONF_METHOD *meth); 69a681313fStb int (*init)(CONF *conf); 70a681313fStb int (*destroy)(CONF *conf); 71a681313fStb int (*destroy_data)(CONF *conf); 72a681313fStb int (*load_bio)(CONF *conf, BIO *bp, long *eline); 73a681313fStb int (*dump)(const CONF *conf, BIO *bp); 74a681313fStb int (*is_number)(const CONF *conf, char c); 75a681313fStb int (*to_int)(const CONF *conf, char c); 76a681313fStb int (*load)(CONF *conf, const char *name, long *eline); 77a681313fStb }; 78a681313fStb 7970ecd160Stb int CONF_module_add(const char *name, conf_init_func *ifunc, 8070ecd160Stb conf_finish_func *ffunc); 8170ecd160Stb 8270ecd160Stb const char *CONF_imodule_get_value(const CONF_IMODULE *md); 8370ecd160Stb 8470ecd160Stb int CONF_parse_list(const char *list, int sep, int nospc, 8570ecd160Stb int (*list_cb)(const char *elem, int len, void *usr), void *arg); 8670ecd160Stb 87579f4735Stb void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash); 88579f4735Stb 89f102b974Stb CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); 90f102b974Stb CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); 91f102b974Stb STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, 92f102b974Stb const char *section); 93f102b974Stb 94f102b974Stb int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); 95f102b974Stb char *_CONF_get_string(const CONF *conf, const char *section, 96f102b974Stb const char *name); 97f102b974Stb 98f102b974Stb int _CONF_new_data(CONF *conf); 99f102b974Stb void _CONF_free_data(CONF *conf); 100f102b974Stb 101a681313fStb __END_HIDDEN_DECLS 102a681313fStb 103a681313fStb #endif /* HEADER_CONF_LOCAL_H */ 104