2013-09-26 17:14:40 +02:00

39 lines
1.2 KiB
Plaintext

$NetBSD: patch-ed,v 1.1 2010/09/10 03:29:01 taca Exp $
* r18172: suppress warnings.
* r26835: backport fixes in 1.9.
--- ext/openssl/ossl_bn.c.orig 2010-05-24 23:58:49.000000000 +0000
+++ ext/openssl/ossl_bn.c
@@ -131,12 +131,12 @@ ossl_bn_initialize(int argc, VALUE *argv
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, VALU
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: