summaryrefslogtreecommitdiffstats
path: root/crypto/hmac
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2008-11-01 16:40:37 +0000
committerBen Laurie <ben@openssl.org>2008-11-01 16:40:37 +0000
commit5e4430e70df0020f5f1517249851696cb9ac4ad2 (patch)
tree95dcbc73bcd99b725664324db882b4a388d0d4cb /crypto/hmac
parent4d6e1e4f29de455b5e644ea9cae5d5f5a2dbef33 (diff)
More size_tification.
Diffstat (limited to 'crypto/hmac')
-rw-r--r--crypto/hmac/hm_ameth.c2
-rw-r--r--crypto/hmac/hmac.c7
-rw-r--r--crypto/hmac/hmac.h6
3 files changed, 7 insertions, 8 deletions
diff --git a/crypto/hmac/hm_ameth.c b/crypto/hmac/hm_ameth.c
index 0b05923ba1..38ae0f9c4c 100644
--- a/crypto/hmac/hm_ameth.c
+++ b/crypto/hmac/hm_ameth.c
@@ -104,7 +104,7 @@ static int hmac_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2)
*/
static int old_hmac_decode(EVP_PKEY *pkey,
- const unsigned char **pder, int derlen)
+ const unsigned char **pder, size_t derlen)
{
ASN1_OCTET_STRING *os;
os = ASN1_OCTET_STRING_new();
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c
index 5c99f03e26..f673640946 100644
--- a/crypto/hmac/hmac.c
+++ b/crypto/hmac/hmac.c
@@ -61,7 +61,7 @@
#include "cryptlib.h"
#include <openssl/hmac.h>
-void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
+void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, size_t len,
const EVP_MD *md, ENGINE *impl)
{
int i,j,reset=0;
@@ -113,8 +113,7 @@ void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
EVP_MD_CTX_copy_ex(&ctx->md_ctx,&ctx->i_ctx);
}
-void HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
- const EVP_MD *md)
+void HMAC_Init(HMAC_CTX *ctx, const void *key, size_t len, const EVP_MD *md)
{
if(key && md)
HMAC_CTX_init(ctx);
@@ -165,7 +164,7 @@ void HMAC_CTX_cleanup(HMAC_CTX *ctx)
memset(ctx,0,sizeof *ctx);
}
-unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
+unsigned char *HMAC(const EVP_MD *evp_md, const void *key, size_t key_len,
const unsigned char *d, size_t n, unsigned char *md,
unsigned int *md_len)
{
diff --git a/crypto/hmac/hmac.h b/crypto/hmac/hmac.h
index bdacf4d6d8..9773919586 100644
--- a/crypto/hmac/hmac.h
+++ b/crypto/hmac/hmac.h
@@ -90,13 +90,13 @@ void HMAC_CTX_cleanup(HMAC_CTX *ctx);
#define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) /* deprecated */
-void HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
+void HMAC_Init(HMAC_CTX *ctx, const void *key, size_t len,
const EVP_MD *md); /* deprecated */
-void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
+void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, size_t len,
const EVP_MD *md, ENGINE *impl);
void HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len);
void HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
-unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
+unsigned char *HMAC(const EVP_MD *evp_md, const void *key, size_t key_len,
const unsigned char *d, size_t n, unsigned char *md,
unsigned int *md_len);
void HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);