summaryrefslogtreecommitdiff
path: root/include/private
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing whitespaces.Ivan Zhakov2022-11-193-10/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905407 13f79535-47bb-0310-9956-ffa450edef68
* encoding: Better check inputs of apr_{encode,decode}_* functions.Yann Ylavic2022-06-271-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check that the given sources can be encoded without overflowing. Return APR_EINVAL if the given "slen" is negative, APR_NOTFOUND if "dest" is not NULL and "src" is NULL, or APR_ENOSPC if "dest" is NULL and the source length (based on "slen" or APR_ENCODE_STRING) is too big to encode. * include/private/apr_encode_private.h(): Rename ENCODE_TO_ASCII() and ENCODE_TO_NATIVE() to respectively TO_ASCII() and TO_ENCODE(), and make them return an unsigned char. * encoding/apr_escape.c(): Use the new TO_ASCII() and TO_NATIVE(). * encoding/apr_encode.c(apr_encode_*, apr_decode_*): Forbid negative "slen" but APR_ENCODE_STRING, and use apr_size_t arithmetics to check for overflows when encoding. When "dest" is NULL, "src" can be NULL too. Better check for trailing '='s or base16's APR_ENCODE_COLON ':' separators. Rename ENCODE_TO_ASCII and ENCODE_TO_NATIVE to their new names, and remove casts to (unsigned char) now unnecessary. * include/apr_encode.h(): Update dox about acceptable inputs and returned errors. * test/testencode.c(): Tests for error conditions. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902281 13f79535-47bb-0310-9956-ffa450edef68
* apr_dbm: Add dedicated apr_dbm_get_driver() function that returnsGraham Leggett2021-06-211-7/+7
| | | | | | | | details of the driver selected and any error encountered. Add the apr_dbm_open2() function that references the driver. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1890952 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1833421 et al:Graham Leggett2019-06-231-26/+0
| | | | | | | | Move OpenSSL initialisation back to apr_crypto_openssl, reinstate DSO support. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1861951 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1833421 et al:Graham Leggett2019-06-221-8/+0
| | | | | | | | Move NSS initialisation back to apr_crypto_nss, reinstate DSO support. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1861894 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1833421 et al:Graham Leggett2019-06-221-24/+0
| | | | | | | | | | Move commoncrypto initialisation back to apr_crypto_commoncrypto module, reinstate DSO support. Remove noop references to mscapi and mscng. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1861892 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto_prng: Move openssl specific code into apr_crypto_openssl.Graham Leggett2019-06-101-0/+37
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860984 13f79535-47bb-0310-9956-ffa450edef68
* s/APR_NOKEY/APR_ENOKEY/Christophe Jaillet2018-08-261-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1839191 13f79535-47bb-0310-9956-ffa450edef68
* crypto: move APR_USE_OPENSSL_PRE* definitions to apr_crypto_internal.h.Yann Ylavic2018-08-041-0/+18
| | | | | | | | | | They can (and will) be used by other openssl related code, so share them. s/#ifndef APR_USE_OPENSSL_PRE_1_1_1_API/#if !APR_USE_OPENSSL_PRE_1_1_1_API/ and fix revealed compilation error. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1837429 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto: Add support for digest functions, with hashing, signingGraham Leggett2018-07-221-0/+77
| | | | | | | and verifying. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1836439 13f79535-47bb-0310-9956-ffa450edef68
* Add the apr_encode_* API that implements RFC4648 and RFC7515Graham Leggett2018-06-251-0/+84
| | | | | | | | compliant BASE64, BASE64URL, BASE32, BASE32HEX and BASE16 encode/decode functions. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1834371 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto: follow up to r1833359: helper to get crypto lib version.Yann Ylavic2018-06-131-4/+9
| | | | | | | | | While at it, also fix bad copy/paste function names for MSCNG/MSCAPI. (BTW, those libs are totally ENOTIMPL/unplugged for now). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1833456 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto: follow up to r1833359.Yann Ylavic2018-06-121-0/+35
| | | | | | | | | | | | | | | | | | | | | Link underlying crypto libraries (openssl, nss, and commoncrypto) with libapr when the corresponding --with is configured. This allows to initialize, terminate or check whether initialized respectively with apr_crypto_lib_init(), apr_crypto_lib_term() or apr_crypto_lib_is_initialized(). Users can now control the (un)initialization of those libraries, notably when they also use them independently and that doing this multiple times can cause leaks or unexpected behaviour. The initialization code is moved from "apr_crypto_{openssl,nss,commoncrypto}.c" where previously loaded dynamically (DSO) to "apr_crypto_internal.c" which is linked with libapr. Also apr_crypto_prng_init() can make sure the underlying crypto lib is ready. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1833421 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto: Add apr_crypto_key() function which supports keysGraham Leggett2016-07-091-2/+21
| | | | | | | | generated from a passphrase or a raw secret provided by the caller. Deprecate apr_crypto_passphrase(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1752008 13f79535-47bb-0310-9956-ffa450edef68
* trigger the generation of apr_escape_test_char.h duringJeff Trawick2013-10-291-23/+0
| | | | | | | | | | | the build clean the most critical gen_test_char artifacts (.libs still not removed) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1536744 13f79535-47bb-0310-9956-ffa450edef68
* Check in stable copy of test_char.h.Graham Leggett2013-06-041-0/+23
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1489520 13f79535-47bb-0310-9956-ffa450edef68
* Add valgrind supportStefan Fritsch2013-01-261-0/+20
| | | | | | | | | | | | | | | | | Teach valgrind about apr pools, allocators, and bucket allocators if --with-valgrind is passed to configure. This has less impact on program behavior and performance than compiling with complete pool-debugging. Even with valgrind support compiled in, the performance impact if not running under valgrind should be minimal. It may make sense to use pool-debugging together with valgrind support because pool-debugging does not help with allocators and bucket allocators. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1438957 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto: Move the static initialisation of DRIVER_LOAD fromGraham Leggett2011-12-081-1/+2
| | | | | | | | apr_crypto_init() to apr_crypto_get_driver(), so that we don't lose the parameters. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1211987 13f79535-47bb-0310-9956-ffa450edef68
* Formatting, no functional change.Graham Leggett2011-10-231-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1187932 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto: Replace the LDAP inspired constant-based parameter passing withGraham Leggett2011-10-231-3/+3
| | | | | | | the apr_dbd inspired string passing, and simplify configuration. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1187914 13f79535-47bb-0310-9956-ffa450edef68
* Drop the incomplete LDAP abstraction layer from APR 2.0 as decided on-list.William A. Rowe Jr2011-05-311-26/+3
| | | | | | | | It was not possible to use this interface without ldap provider internals. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1129809 13f79535-47bb-0310-9956-ffa450edef68
* apr_crypto: Add apr_crypto_get_block_key_types() andGraham Leggett2011-05-301-0/+22
| | | | | | | | | apr_crypto_get_block_key_modes() to provide a way to programmatically query what key types and modes are supported by a provider, either per mode/type, or by iterating through a hashtable. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1129433 13f79535-47bb-0310-9956-ffa450edef68
* Fix compilation with C90Stefan Fritsch2011-05-291-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1128838 13f79535-47bb-0310-9956-ffa450edef68
* Remove the apr_crypto_t context from calls where the apr_crypto_block_t isGraham Leggett2011-05-151-4/+2
| | | | | | | passed. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1103382 13f79535-47bb-0310-9956-ffa450edef68
* Remove the pool from the apr_crypto shutdown call.Graham Leggett2011-05-151-2/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1103367 13f79535-47bb-0310-9956-ffa450edef68
* Reorder parameters. No functional change.Graham Leggett2011-05-151-40/+40
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1103258 13f79535-47bb-0310-9956-ffa450edef68
* access the def'n of APR_HAS_LDAP, used later in the fileJeff Trawick2011-03-291-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1086679 13f79535-47bb-0310-9956-ffa450edef68
* Axed C++ comments and tabs.Guenter Knauf2011-02-261-25/+25
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1074817 13f79535-47bb-0310-9956-ffa450edef68
* Axed C++ comments.Guenter Knauf2011-02-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1068870 13f79535-47bb-0310-9956-ffa450edef68
* Fix APR crypto doxygen docs (function params).Rainer Jung2010-07-251-6/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@979075 13f79535-47bb-0310-9956-ffa450edef68
* Hide apr_wait_for_io_or_timeout() from public view and add insteadBrian Havard2010-04-121-0/+57
| | | | | | | apr_socket_wait() and apr_file_pipe_wait(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@933338 13f79535-47bb-0310-9956-ffa450edef68
* When adding members to an existing struct, add them to the end(!!!)William A. Rowe Jr2010-01-171-8/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@900089 13f79535-47bb-0310-9956-ffa450edef68
* Add the APR_TYPEDEF_STRUCT macro to provide an implementation ofGraham Leggett2010-01-161-2/+2
| | | | | | | | | complete types where only an incomplete type is available. Remove the driver parameter from the apr_crypto API, the driver is now wrapped inside the apr_crypto_t. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@899910 13f79535-47bb-0310-9956-ffa450edef68
* Finish removing apu_config.h[n]w templates, these need synchronization w/unixWilliam A. Rowe Jr2009-12-182-111/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@892148 13f79535-47bb-0310-9956-ffa450edef68
* The expat-way of doing things to the expat lib, rather than our own xml.libWilliam A. Rowe Jr2009-12-171-1/+7
| | | | | | | The other whitespace and functional win32 changes are going away altogether as apu_config.h is dropped. The apu.hnw change was immediately reverted. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@891846 13f79535-47bb-0310-9956-ffa450edef68
* Catch up to APU_MODULE_DECLARE_DATA renameWilliam A. Rowe Jr2009-12-171-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@891838 13f79535-47bb-0310-9956-ffa450edef68
* This is a generated artifact, not to be checked in!William A. Rowe Jr2009-12-171-2/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@891507 13f79535-47bb-0310-9956-ffa450edef68
* Refactor the apr_crypto.h interface so that the apr_crypto_t structureGraham Leggett2009-12-151-8/+16
| | | | | | | | remains private. Correctly reference the apr_crypto_t context as a context and not a factory. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@890579 13f79535-47bb-0310-9956-ffa450edef68
* Reorder the config into sanity, prefer include/mysql/ structureWilliam A. Rowe Jr2009-08-031-0/+6
| | | | | | | | | | | | | | | if found, and *be consistent*. Includes rpluem's patch to maintain load order of these cleaned up includes. It appears my_sys.h is actually not required for my_init(), and it certainly won't compile under Visual C/Win32. So carefully omit it only on platforms where my_sys.h is not found/not usable, and retain the existing unix compilation. Forward ports: 799780, 800402, 800431 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@800505 13f79535-47bb-0310-9956-ffa450edef68
* Convert various APU_DECLARE into APR_DECLARE.Bojan Smojver2009-07-163-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@794523 13f79535-47bb-0310-9956-ffa450edef68
* APR->APU conversion of DSO buildfoo; rename --disable-util-dso toJoe Orton2009-03-241-2/+2
| | | | | | | | | | | | | | | | | | | | | --disable-modular-dso: * configure.in, Makefile.in: Use APR_DSO_MODULES for set of DSOs to build. * util-misc/apu_dso.c, include/private/apu_internal.h: Use macro APR_HAVE_MODULAR_DSO to determine whether modular DSO build is used. * build/dso.m4 (APR_MODULAR_DSO): Renamed from APU_CHECK_UTIL_DSO. Define APR_HAVE_MODULAR_DSO if modular DSO biuld is used. Add to LIBS not APRUTIL_LIBS. Rename configure flag to --disable-modular-dso to disable modular DSO build. * ldap/*.c, dbm/*.c, dbd/*.c, crypto/*.c: Adjust to use APR_HAVE_MODULAR_DSO. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@757884 13f79535-47bb-0310-9956-ffa450edef68
* * include/private/apu_config.h: Move from include/, since usage is Joe Orton2009-03-241-0/+2
| | | | | | | private to APR-util code. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@757816 13f79535-47bb-0310-9956-ffa450edef68
* Merge APR-Util trunk into APR.Paul Querna2009-03-249-0/+1086
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@757704 13f79535-47bb-0310-9956-ffa450edef68