mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 22:59:56 -05:00
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2020-06-23 (e9db32a0)
This commit is contained in:
@@ -48,13 +48,13 @@ static const unsigned char hmac_opad = 0x5C;
|
||||
|
||||
|
||||
|
||||
HMAC_context *
|
||||
Curl_HMAC_init(const HMAC_params * hashparams,
|
||||
struct HMAC_context *
|
||||
Curl_HMAC_init(const struct HMAC_params *hashparams,
|
||||
const unsigned char *key,
|
||||
unsigned int keylen)
|
||||
{
|
||||
size_t i;
|
||||
HMAC_context *ctxt;
|
||||
struct HMAC_context *ctxt;
|
||||
unsigned char *hkey;
|
||||
unsigned char b;
|
||||
|
||||
@@ -101,7 +101,7 @@ Curl_HMAC_init(const HMAC_params * hashparams,
|
||||
return ctxt;
|
||||
}
|
||||
|
||||
int Curl_HMAC_update(HMAC_context * ctxt,
|
||||
int Curl_HMAC_update(struct HMAC_context *ctxt,
|
||||
const unsigned char *data,
|
||||
unsigned int len)
|
||||
{
|
||||
@@ -111,9 +111,9 @@ int Curl_HMAC_update(HMAC_context * ctxt,
|
||||
}
|
||||
|
||||
|
||||
int Curl_HMAC_final(HMAC_context *ctxt, unsigned char *result)
|
||||
int Curl_HMAC_final(struct HMAC_context *ctxt, unsigned char *result)
|
||||
{
|
||||
const HMAC_params * hashparams = ctxt->hmac_hash;
|
||||
const struct HMAC_params *hashparams = ctxt->hmac_hash;
|
||||
|
||||
/* Do not get result if called with a null parameter: only release
|
||||
storage. */
|
||||
@@ -147,12 +147,13 @@ int Curl_HMAC_final(HMAC_context *ctxt, unsigned char *result)
|
||||
*
|
||||
* Returns CURLE_OK on success.
|
||||
*/
|
||||
CURLcode Curl_hmacit(const HMAC_params *hashparams,
|
||||
CURLcode Curl_hmacit(const struct HMAC_params *hashparams,
|
||||
const unsigned char *key, const size_t keylen,
|
||||
const unsigned char *data, const size_t datalen,
|
||||
unsigned char *output)
|
||||
{
|
||||
HMAC_context *ctxt = Curl_HMAC_init(hashparams, key, curlx_uztoui(keylen));
|
||||
struct HMAC_context *ctxt =
|
||||
Curl_HMAC_init(hashparams, key, curlx_uztoui(keylen));
|
||||
|
||||
if(!ctxt)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
Reference in New Issue
Block a user