1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
usa 2012-07-11 03:46:37 +00:00
parent 412c5a96be
commit 04051396fd
2 changed files with 14 additions and 7 deletions

View file

@ -1,3 +1,11 @@
Wed Jul 11 12:38:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* 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.
Mon Jul 9 16:11:30 2012 Yuki Yugui Sonoda <yugui@google.com>
* vm_eval.c (rb_eval_string_from_file,

View file

@ -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;