summaryrefslogtreecommitdiffstats
path: root/crypto/evp
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2004-05-15 13:29:55 +0200
committerAndy Polyakov <appro@openssl.org>2004-05-15 13:29:55 +0200
commit9e0aad9fd60635e240f7742fa1497eced6f1cd0b (patch)
tree3bcdb1f59b421e626a2c94ea743ccc4d18628c1c /crypto/evp
parentReimplement old functions, so older software that link to libcrypto (diff)
downloadopenssl-9e0aad9fd60635e240f7742fa1497eced6f1cd0b.tar.xz
openssl-9e0aad9fd60635e240f7742fa1497eced6f1cd0b.zip
size_t-fication of message digest APIs. We should size_t-fy more APIs...
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/digest.c6
-rw-r--r--crypto/evp/evp.h6
-rw-r--r--crypto/evp/m_dss.c2
-rw-r--r--crypto/evp/m_dss1.c2
-rw-r--r--crypto/evp/m_ecdsa.c2
-rw-r--r--crypto/evp/m_md2.c2
-rw-r--r--crypto/evp/m_md4.c2
-rw-r--r--crypto/evp/m_md5.c2
-rw-r--r--crypto/evp/m_mdc2.c2
-rw-r--r--crypto/evp/m_null.c2
-rw-r--r--crypto/evp/m_ripemd.c2
-rw-r--r--crypto/evp/m_sha.c2
-rw-r--r--crypto/evp/m_sha1.c2
13 files changed, 17 insertions, 17 deletions
diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c
index bd014ac81d..7d8421079b 100644
--- a/crypto/evp/digest.c
+++ b/crypto/evp/digest.c
@@ -208,9 +208,9 @@ skip_to_init:
}
int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data,
- unsigned int count)
+ size_t count)
{
- return ctx->digest->update(ctx,data,(unsigned long)count);
+ return ctx->digest->update(ctx,data,count);
}
/* The caller can assume that this removes any secret data from the context */
@@ -285,7 +285,7 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in)
return 1;
}
-int EVP_Digest(const void *data, unsigned int count,
+int EVP_Digest(const void *data, size_t count,
unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl)
{
EVP_MD_CTX ctx;
diff --git a/crypto/evp/evp.h b/crypto/evp/evp.h
index 6adbe891a0..47c8fc72a0 100644
--- a/crypto/evp/evp.h
+++ b/crypto/evp/evp.h
@@ -227,7 +227,7 @@ struct env_md_st
int md_size;
unsigned long flags;
int (*init)(EVP_MD_CTX *ctx);
- int (*update)(EVP_MD_CTX *ctx,const void *data,unsigned long count);
+ int (*update)(EVP_MD_CTX *ctx,const void *data,size_t count);
int (*final)(EVP_MD_CTX *ctx,unsigned char *md);
int (*copy)(EVP_MD_CTX *to,const EVP_MD_CTX *from);
int (*cleanup)(EVP_MD_CTX *ctx);
@@ -490,9 +490,9 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out,const EVP_MD_CTX *in);
#define EVP_MD_CTX_test_flags(ctx,flgs) ((ctx)->flags&(flgs))
int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
int EVP_DigestUpdate(EVP_MD_CTX *ctx,const void *d,
- unsigned int cnt);
+ size_t cnt);
int EVP_DigestFinal_ex(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s);
-int EVP_Digest(const void *data, unsigned int count,
+int EVP_Digest(const void *data, size_t count,
unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl);
int EVP_MD_CTX_copy(EVP_MD_CTX *out,const EVP_MD_CTX *in);
diff --git a/crypto/evp/m_dss.c b/crypto/evp/m_dss.c
index c4c5f0bbe6..020f19c44b 100644
--- a/crypto/evp/m_dss.c
+++ b/crypto/evp/m_dss.c
@@ -67,7 +67,7 @@
static int init(EVP_MD_CTX *ctx)
{ return SHA1_Init(ctx->md_data); }
-static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
+static int update(EVP_MD_CTX *ctx,const void *data,size_t count)
{ return SHA1_Update(ctx->md_data,data,count); }
static int final(EVP_MD_CTX *ctx,unsigned char *md)
diff --git a/crypto/evp/m_dss1.c b/crypto/evp/m_dss1.c
index 6b65bfd54b..a20056f04b 100644
--- a/crypto/evp/m_dss1.c
+++ b/crypto/evp/m_dss1.c
@@ -69,7 +69,7 @@
static int init(EVP_MD_CTX *ctx)
{ return SHA1_Init(ctx->md_data); }
-static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
+static int update(EVP_MD_CTX *ctx,const void *data,size_t count)
{ return SHA1_Update(ctx->md_data,data,count); }
static int final(EVP_MD_CTX *ctx,unsigned char *md)
diff --git a/crypto/evp/m_ecdsa.c b/crypto/evp/m_ecdsa.c
index 26e4206e5a..fad270faca 100644
--- a/crypto/evp/m_ecdsa.c
+++ b/crypto/evp/m_ecdsa.c
@@ -119,7 +119,7 @@
static int init(EVP_MD_CTX *ctx)
{ return SHA1_Init(ctx->md_data); }
-static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
+static int update(EVP_MD_CTX *ctx,const void *data,size_t count)
{ return SHA1_Update(ctx->md_data,data,count); }
static int final(EVP_MD_CTX *ctx,unsigned char *md)
diff --git a/crypto/evp/m_md2.c b/crypto/evp/m_md2.c
index e577d26411..1eae4ed38c 100644
--- a/crypto/evp/m_md2.c
+++ b/crypto/evp/m_md2.c
@@ -70,7 +70,7 @@
static int init(EVP_MD_CTX *ctx)
{ return MD2_Init(ctx->md_data); }
-static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
+static int update(EVP_MD_CTX *ctx,const void *data,size_t count)
{ return MD2_Update(ctx->md_data,data,count); }
static int final(EVP_MD_CTX *ctx,unsigned char *md)
diff --git a/crypto/evp/m_md4.c b/crypto/evp/m_md4.c
index 787d6554c1..0fb84b6d1e 100644
--- a/crypto/evp/m_md4.c
+++ b/crypto/evp/m_md4.c
@@ -70,7 +70,7 @@
static int init(EVP_MD_CTX *ctx)
{ return MD4_Init(ctx->md_data); }
-static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
+static int update(EVP_MD_CTX *ctx,const void *data,size_t count)
{ return MD4_Update(ctx->md_data,data,count); }
static int final(EVP_MD_CTX *ctx,unsigned char *md)
diff --git a/crypto/evp/m_md5.c b/crypto/evp/m_md5.c
index a214315abe..21288ee636 100644
--- a/crypto/evp/m_md5.c
+++ b/crypto/evp/m_md5.c
@@ -70,7 +70,7 @@
static int init(EVP_MD_CTX *ctx)
{ return MD5_Init(ctx->md_data); }
-static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
+static int update(EVP_MD_CTX *ctx,const void *data,size_t count)
{ return MD5_Update(ctx->md_data,data,count); }
static int final(EVP_MD_CTX *ctx,unsigned char *md)
diff --git a/crypto/evp/m_mdc2.c b/crypto/evp/m_mdc2.c
index 14e8175790..36c4e9b134 100644
--- a/crypto/evp/m_mdc2.c
+++ b/crypto/evp/m_mdc2.c
@@ -70,7 +70,7 @@
static int init(EVP_MD_CTX *ctx)
{ return MDC2_Init(ctx->md_data); }
-static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
+static int update(EVP_MD_CTX *ctx,const void *data,size_t count)
{ return MDC2_Update(ctx->md_data,data,count); }
static int final(EVP_MD_CTX *ctx,unsigned char *md)
diff --git a/crypto/evp/m_null.c b/crypto/evp/m_null.c
index f6f0a1d2c0..cb0721699d 100644
--- a/crypto/evp/m_null.c
+++ b/crypto/evp/m_null.c
@@ -65,7 +65,7 @@
static int init(EVP_MD_CTX *ctx)
{ return 1; }
-static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
+static int update(EVP_MD_CTX *ctx,const void *data,size_t count)
{ return 1; }
static int final(EVP_MD_CTX *ctx,unsigned char *md)
diff --git a/crypto/evp/m_ripemd.c b/crypto/evp/m_ripemd.c
index 93910a44ab..087ad2d30a 100644
--- a/crypto/evp/m_ripemd.c
+++ b/crypto/evp/m_ripemd.c
@@ -70,7 +70,7 @@
static int init(EVP_MD_CTX *ctx)
{ return RIPEMD160_Init(ctx->md_data); }
-static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
+static int update(EVP_MD_CTX *ctx,const void *data,size_t count)
{ return RIPEMD160_Update(ctx->md_data,data,count); }
static int final(EVP_MD_CTX *ctx,unsigned char *md)
diff --git a/crypto/evp/m_sha.c b/crypto/evp/m_sha.c
index f3b9610757..64b397fa03 100644
--- a/crypto/evp/m_sha.c
+++ b/crypto/evp/m_sha.c
@@ -69,7 +69,7 @@
static int init(EVP_MD_CTX *ctx)
{ return SHA_Init(ctx->md_data); }
-static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
+static int update(EVP_MD_CTX *ctx,const void *data,size_t count)
{ return SHA_Update(ctx->md_data,data,count); }
static int final(EVP_MD_CTX *ctx,unsigned char *md)
diff --git a/crypto/evp/m_sha1.c b/crypto/evp/m_sha1.c
index 364b368877..7a791a6f71 100644
--- a/crypto/evp/m_sha1.c
+++ b/crypto/evp/m_sha1.c
@@ -69,7 +69,7 @@
static int init(EVP_MD_CTX *ctx)
{ return SHA1_Init(ctx->md_data); }
-static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
+static int update(EVP_MD_CTX *ctx,const void *data,size_t count)
{ return SHA1_Update(ctx->md_data,data,count); }
static int final(EVP_MD_CTX *ctx,unsigned char *md)