1 /* Copyright (c) 2015, Google Inc. 2 * 3 * Permission to use, copy, modify, and/or distribute this software for any 4 * purpose with or without fee is hereby granted, provided that the above 5 * copyright notice and this permission notice appear in all copies. 6 * 7 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 10 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 12 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 13 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ 14 15 #ifndef OPENSSL_HEADER_CRYPTO_CONF_INTERNAL_H 16 #define OPENSSL_HEADER_CRYPTO_CONF_INTERNAL_H 17 18 #include <openssl/base.h> 19 20 #if defined(__cplusplus) 21 extern "C" { 22 #endif 23 24 25 // CONF_VALUE_new returns a freshly allocated and zeroed |CONF_VALUE|. 26 CONF_VALUE *CONF_VALUE_new(void); 27 28 // CONF_parse_list takes a list separated by 'sep' and calls |list_cb| giving 29 // the start and length of each member, optionally stripping leading and 30 // trailing whitespace. This can be used to parse comma separated lists for 31 // example. If |list_cb| returns <= 0, then the iteration is halted and that 32 // value is returned immediately. Otherwise it returns one. Note that |list_cb| 33 // may be called on an empty member. 34 OPENSSL_EXPORT int CONF_parse_list( 35 const char *list, char sep, int remove_whitespace, 36 int (*list_cb)(const char *elem, size_t len, void *usr), void *arg); 37 38 39 #if defined(__cplusplus) 40 } // extern C 41 #endif 42 43 #endif // OPENSSL_HEADER_CRYPTO_CONF_INTERNAL_H 44