| 1 |
// Copyright (c) 2015, Google Inc. |
| 2 |
// SPDX-License-Identifier: ISC |
| 3 |
|
| 4 |
#ifndef OPENSSL_HEADER_CRYPTO_CONF_INTERNAL_H |
| 5 |
#define OPENSSL_HEADER_CRYPTO_CONF_INTERNAL_H |
| 6 |
|
| 7 |
#include <openssl/base.h> |
| 8 |
|
| 9 |
#include "../lhash/internal.h" |
| 10 |
|
| 11 |
#if defined(__cplusplus) |
| 12 |
extern "C" { |
| 13 |
#endif |
| 14 |
|
| 15 |
|
| 16 |
DEFINE_LHASH_OF(CONF_VALUE) |
| 17 |
|
| 18 |
// CONF_VALUE_new returns a freshly allocated and zeroed |CONF_VALUE|. |
| 19 |
CONF_VALUE *CONF_VALUE_new(void); |
| 20 |
|
| 21 |
// CONF_parse_list takes a list separated by 'sep' and calls |list_cb| giving |
| 22 |
// the start and length of each member, optionally stripping leading and |
| 23 |
// trailing whitespace. This can be used to parse comma separated lists for |
| 24 |
// example. If |list_cb| returns <= 0, then the iteration is halted and that |
| 25 |
// value is returned immediately. Otherwise it returns one. Note that |list_cb| |
| 26 |
// may be called on an empty member. |
| 27 |
OPENSSL_EXPORT int CONF_parse_list( |
| 28 |
const char *list, char sep, int remove_whitespace, |
| 29 |
int (*list_cb)(const char *elem, size_t len, void *usr), void *arg); |
| 30 |
|
| 31 |
|
| 32 |
#if defined(__cplusplus) |
| 33 |
} // extern C |
| 34 |
#endif |
| 35 |
|
| 36 |
#endif // OPENSSL_HEADER_CRYPTO_CONF_INTERNAL_H |