summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_pkey_ec.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-11 03:46:37 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-11 03:46:37 +0000
commit04051396fd738abb97ebf2396c088520dd096da3 (patch)
treee7647fd9e0bd6a2e5ffe6771f3b22f06c90177fd /ext/openssl/ossl_pkey_ec.c
parent412c5a96be804d33b322ffe6f55283b85c94b67e (diff)
* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): nonstatic initializer
of an aggregate type is a C99ism. * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): get rid of VC++ warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_pkey_ec.c')
-rw-r--r--ext/openssl/ossl_pkey_ec.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
index 08b875f603..8e6d88f606 100644
--- a/ext/openssl/ossl_pkey_ec.c
+++ b/ext/openssl/ossl_pkey_ec.c
@@ -1482,7 +1482,6 @@ static VALUE ossl_ec_point_mul(int argc, VALUE *argv, VALUE self)
EC_POINT *point1, *point2;
const EC_GROUP *group;
VALUE group_v = rb_iv_get(self, "@group");
- VALUE args[1] = {group_v};
VALUE bn_v1, bn_v2, r, points_v;
BIGNUM *bn1 = NULL, *bn2 = NULL;
@@ -1490,7 +1489,7 @@ static VALUE ossl_ec_point_mul(int argc, VALUE *argv, VALUE self)
SafeRequire_EC_GROUP(group_v, group);
r = rb_obj_alloc(cEC_POINT);
- ossl_ec_point_initialize(1, args, r);
+ ossl_ec_point_initialize(1, &group_v, r);
Require_EC_POINT(r, point2);
argc = rb_scan_args(argc, argv, "12", &bn_v1, &points_v, &bn_v2);
@@ -1516,7 +1515,7 @@ static VALUE ossl_ec_point_mul(int argc, VALUE *argv, VALUE self)
}
if (!rb_obj_is_kind_of(points_v, rb_cArray)) {
- OPENSSL_free(bignums);
+ OPENSSL_free((void *)bignums);
rb_raise(rb_eTypeError, "Argument2 must be an array");
}
@@ -1532,12 +1531,12 @@ static VALUE ossl_ec_point_mul(int argc, VALUE *argv, VALUE self)
bn2 = GetBNPtr(bn_v2);
}
if (EC_POINTs_mul(group, point2, bn2, points_len, points, bignums, ossl_bn_ctx) != 1) {
- OPENSSL_free(bignums);
- OPENSSL_free(points);
+ OPENSSL_free((void *)bignums);
+ OPENSSL_free((void *)points);
ossl_raise(eEC_POINT, "Multiplication failed");
}
- OPENSSL_free(bignums);
- OPENSSL_free(points);
+ OPENSSL_free((void *)bignums);
+ OPENSSL_free((void *)points);
}
return r;