summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_bn.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/ossl_bn.c')
-rw-r--r--ext/openssl/ossl_bn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/openssl/ossl_bn.c b/ext/openssl/ossl_bn.c
index 8f0e2edcfd..794c97774f 100644
--- a/ext/openssl/ossl_bn.c
+++ b/ext/openssl/ossl_bn.c
@@ -131,12 +131,12 @@ ossl_bn_initialize(int argc, VALUE *argv, VALUE self)
switch (base) {
case 0:
- if (!BN_mpi2bn(RSTRING_PTR(str), RSTRING_LEN(str), bn)) {
+ if (!BN_mpi2bn((unsigned char *)RSTRING_PTR(str), RSTRING_LEN(str), bn)) {
ossl_raise(eBNError, NULL);
}
break;
case 2:
- if (!BN_bin2bn(RSTRING_PTR(str), RSTRING_LEN(str), bn)) {
+ if (!BN_bin2bn((unsigned char *)RSTRING_PTR(str), RSTRING_LEN(str), bn)) {
ossl_raise(eBNError, NULL);
}
break;
@@ -185,13 +185,13 @@ ossl_bn_to_s(int argc, VALUE *argv, VALUE self)
case 0:
len = BN_bn2mpi(bn, NULL);
str = rb_str_new(0, len);
- if (BN_bn2mpi(bn, RSTRING_PTR(str)) != len)
+ if (BN_bn2mpi(bn, (unsigned char *)RSTRING_PTR(str)) != len)
ossl_raise(eBNError, NULL);
break;
case 2:
len = BN_num_bytes(bn);
str = rb_str_new(0, len);
- if (BN_bn2bin(bn, RSTRING_PTR(str)) != len)
+ if (BN_bn2bin(bn, (unsigned char *)RSTRING_PTR(str)) != len)
ossl_raise(eBNError, NULL);
break;
case 10: