diff options
Diffstat (limited to 'contrib/apr-util/include')
-rw-r--r-- | contrib/apr-util/include/apr_base64.h | 9 | ||||
-rw-r--r-- | contrib/apr-util/include/apr_buckets.h | 11 | ||||
-rw-r--r-- | contrib/apr-util/include/apr_md5.h | 18 | ||||
-rw-r--r-- | contrib/apr-util/include/apr_queue.h | 2 | ||||
-rw-r--r-- | contrib/apr-util/include/apu.h.in | 14 | ||||
-rw-r--r-- | contrib/apr-util/include/apu_version.h | 4 | ||||
-rw-r--r-- | contrib/apr-util/include/private/apr_crypto_internal.h | 3 |
7 files changed, 46 insertions, 15 deletions
diff --git a/contrib/apr-util/include/apr_base64.h b/contrib/apr-util/include/apr_base64.h index b4b2b88..17de1c5 100644 --- a/contrib/apr-util/include/apr_base64.h +++ b/contrib/apr-util/include/apr_base64.h @@ -51,10 +51,11 @@ extern "C" { */ /** - * Given the length of an un-encrypted string, get the length of the - * encrypted string. - * @param len the length of an unencrypted string. - * @return the length of the string after it is encrypted + * Given the length of an un-encoded string, get the length of the + * encoded string. + * @param len the length of an unencoded string. + * @return the length of the string after it is encoded, including the + * trailing \0 */ APU_DECLARE(int) apr_base64_encode_len(int len); diff --git a/contrib/apr-util/include/apr_buckets.h b/contrib/apr-util/include/apr_buckets.h index b1d1861..4838ab2 100644 --- a/contrib/apr-util/include/apr_buckets.h +++ b/contrib/apr-util/include/apr_buckets.h @@ -687,9 +687,10 @@ APU_DECLARE(apr_status_t) apr_brigade_cleanup(void *data); * @param b The brigade to split * @param e The first bucket to move * @param a The brigade which should be used for the result or NULL if - * a new brigade should be created. - * @return The brigade supplied in @param a or a new one if @param a was NULL. - * @warning Note that this function allocates a new brigade if @param a is + * a new brigade should be created. The brigade @a a will be + * cleared if it is not empty. + * @return The brigade supplied in @a a or a new one if @a a was NULL. + * @warning Note that this function allocates a new brigade if @a a is * NULL so memory consumption should be carefully considered. */ APU_DECLARE(apr_bucket_brigade *) apr_brigade_split_ex(apr_bucket_brigade *b, @@ -699,8 +700,8 @@ APU_DECLARE(apr_bucket_brigade *) apr_brigade_split_ex(apr_bucket_brigade *b, /** * Create a new bucket brigade and move the buckets from the tail end * of an existing brigade into the new brigade. Buckets from - * @param e to the last bucket (inclusively) of brigade @param b - * are moved from @param b to the returned brigade. + * @a e to the last bucket (inclusively) of brigade @a b + * are moved from @a b to the returned brigade. * @param b The brigade to split * @param e The first bucket to move * @return The new brigade diff --git a/contrib/apr-util/include/apr_md5.h b/contrib/apr-util/include/apr_md5.h index 367324a..e0202df 100644 --- a/contrib/apr-util/include/apr_md5.h +++ b/contrib/apr-util/include/apr_md5.h @@ -132,16 +132,30 @@ APU_DECLARE(apr_status_t) apr_md5(unsigned char digest[APR_MD5_DIGESTSIZE], /** * Encode a password using an MD5 algorithm * @param password The password to encode - * @param salt The salt to use for the encoding + * @param salt The salt string to use for the encoding * @param result The string to store the encoded password in * @param nbytes The size of the result buffer */ APU_DECLARE(apr_status_t) apr_md5_encode(const char *password, const char *salt, char *result, apr_size_t nbytes); +/** + * Encode a password using the bcrypt algorithm + * @param password The password to encode + * @param count The cost of the encoding, possible values are 4 to 31 + * @param salt Pointer to binary data to be used as salt for the encoding + * @param salt_len The size of the salt data (must be >= 16) + * @param out The string to store the encoded password in + * @param out_len The size of the result buffer (must be >= 61) + */ +APU_DECLARE(apr_status_t) apr_bcrypt_encode(const char *pw, + unsigned int count, + const unsigned char *salt, + apr_size_t salt_len, + char *out, apr_size_t out_len); /** - * Validate hashes created by APR-supported algorithms: md5 and sha1. + * Validate hashes created by APR-supported algorithms: md5, bcrypt, and sha1. * hashes created by crypt are supported only on platforms that provide * crypt(3), so don't rely on that function unless you know that your * application will be run only on platforms that support it. On platforms diff --git a/contrib/apr-util/include/apr_queue.h b/contrib/apr-util/include/apr_queue.h index bf5df74..20c425d 100644 --- a/contrib/apr-util/include/apr_queue.h +++ b/contrib/apr-util/include/apr_queue.h @@ -98,7 +98,7 @@ APU_DECLARE(apr_status_t) apr_queue_trypush(apr_queue_t *queue, void *data); * @returns APR_EINTR the blocking operation was interrupted (try again) * @returns APR_EAGAIN the queue is empty * @returns APR_EOF the queue has been terminated - * @returns APR_SUCCESS on a successful push + * @returns APR_SUCCESS on a successful pop */ APU_DECLARE(apr_status_t) apr_queue_trypop(apr_queue_t *queue, void **data); diff --git a/contrib/apr-util/include/apu.h.in b/contrib/apr-util/include/apu.h.in index 4037094..82380cc 100644 --- a/contrib/apr-util/include/apu.h.in +++ b/contrib/apr-util/include/apu.h.in @@ -42,6 +42,7 @@ * conventions at compile time. */ +#if defined(DOXYGEN) || !defined(WIN32) /** * The public APR-UTIL functions are declared with APU_DECLARE(), so they may * use the most appropriate calling convention. Public APR functions with @@ -66,6 +67,19 @@ * declarations within headers to properly import the variable. */ #define APU_DECLARE_DATA +#elif defined(APU_DECLARE_STATIC) +#define APU_DECLARE(type) type __stdcall +#define APU_DECLARE_NONSTD(type) type __cdecl +#define APU_DECLARE_DATA +#elif defined(APU_DECLARE_EXPORT) +#define APU_DECLARE(type) __declspec(dllexport) type __stdcall +#define APU_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl +#define APU_DECLARE_DATA __declspec(dllexport) +#else +#define APU_DECLARE(type) __declspec(dllimport) type __stdcall +#define APU_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl +#define APU_DECLARE_DATA __declspec(dllimport) +#endif #if !defined(WIN32) || defined(APU_MODULE_DECLARE_STATIC) /** diff --git a/contrib/apr-util/include/apu_version.h b/contrib/apr-util/include/apu_version.h index 3f263fe..7435084 100644 --- a/contrib/apr-util/include/apu_version.h +++ b/contrib/apr-util/include/apu_version.h @@ -53,13 +53,13 @@ * Minor API changes that do not cause binary compatibility problems. * Reset to 0 when upgrading APU_MAJOR_VERSION */ -#define APU_MINOR_VERSION 4 +#define APU_MINOR_VERSION 5 /** patch level * The Patch Level never includes API changes, simply bug fixes. * Reset to 0 when upgrading APR_MINOR_VERSION */ -#define APU_PATCH_VERSION 1 +#define APU_PATCH_VERSION 2 /** * The symbol APU_IS_DEV_VERSION is only defined for internal, diff --git a/contrib/apr-util/include/private/apr_crypto_internal.h b/contrib/apr-util/include/private/apr_crypto_internal.h index b571451..5da92e55 100644 --- a/contrib/apr-util/include/private/apr_crypto_internal.h +++ b/contrib/apr-util/include/private/apr_crypto_internal.h @@ -39,7 +39,8 @@ struct apr_crypto_driver_t { * @param params Optional init parameter string. * @param rc Driver-specific additional error code */ - apr_status_t (*init)(apr_pool_t *pool, const char *params, int *rc); + apr_status_t (*init)(apr_pool_t *pool, const char *params, + const apu_err_t **result); /** * @brief Create a context for supporting encryption. Keys, certificates, |