summaryrefslogtreecommitdiff
path: root/ext/digest
diff options
context:
space:
mode:
Diffstat (limited to 'ext/digest')
-rw-r--r--ext/digest/digest.c4
-rw-r--r--ext/digest/rmd160/rmd160ossl.c2
-rw-r--r--ext/digest/sha1/sha1ossl.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index c4a58cf3f6..07484f897f 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -519,7 +519,7 @@ rb_digest_base_update(VALUE self, VALUE str)
Data_Get_Struct(self, void, pctx);
StringValue(str);
- algo->update_func(pctx, RSTRING_PTR(str), RSTRING_LEN(str));
+ algo->update_func(pctx, (unsigned char *)RSTRING_PTR(str), RSTRING_LEN(str));
return self;
}
@@ -537,7 +537,7 @@ rb_digest_base_finish(VALUE self)
Data_Get_Struct(self, void, pctx);
str = rb_str_new(0, algo->digest_len);
- algo->finish_func(pctx, RSTRING_PTR(str));
+ algo->finish_func(pctx, (unsigned char *)RSTRING_PTR(str));
/* avoid potential coredump caused by use of a finished context */
algo->init_func(pctx);
diff --git a/ext/digest/rmd160/rmd160ossl.c b/ext/digest/rmd160/rmd160ossl.c
index 5d8c5ba470..f24e63e3d8 100644
--- a/ext/digest/rmd160/rmd160ossl.c
+++ b/ext/digest/rmd160/rmd160ossl.c
@@ -4,5 +4,5 @@
#include "rmd160ossl.h"
void RMD160_Finish(RMD160_CTX *ctx, char *buf) {
- RIPEMD160_Final(buf, ctx);
+ RIPEMD160_Final((unsigned char *)buf, ctx);
}
diff --git a/ext/digest/sha1/sha1ossl.c b/ext/digest/sha1/sha1ossl.c
index adf5cf267c..452cf35084 100644
--- a/ext/digest/sha1/sha1ossl.c
+++ b/ext/digest/sha1/sha1ossl.c
@@ -6,5 +6,5 @@
void
SHA1_Finish(SHA1_CTX *ctx, char *buf)
{
- SHA1_Final(buf, ctx);
+ SHA1_Final((unsigned char *)buf, ctx);
}