mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/openssl: suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
163e5155ce
commit
e934121534
30 changed files with 194 additions and 192 deletions
|
@ -169,7 +169,7 @@ ossl_dh_initialize(int argc, VALUE *argv, VALUE self)
|
|||
in = ossl_obj2bio(arg);
|
||||
dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL);
|
||||
if (!dh){
|
||||
BIO_reset(in);
|
||||
(void)BIO_reset(in);
|
||||
dh = d2i_DHparams_bio(in, NULL);
|
||||
}
|
||||
BIO_free(in);
|
||||
|
@ -254,7 +254,7 @@ ossl_dh_to_der(VALUE self)
|
|||
if((len = i2d_DHparams(pkey->pkey.dh, NULL)) <= 0)
|
||||
ossl_raise(eDHError, NULL);
|
||||
str = rb_str_new(0, len);
|
||||
p = RSTRING_PTR(str);
|
||||
p = (unsigned char *)RSTRING_PTR(str);
|
||||
if(i2d_DHparams(pkey->pkey.dh, &p) < 0)
|
||||
ossl_raise(eDHError, NULL);
|
||||
ossl_str_adjust(str, p);
|
||||
|
@ -407,7 +407,7 @@ ossl_dh_compute_key(VALUE self, VALUE pub)
|
|||
pub_key = GetBNPtr(pub);
|
||||
len = DH_size(dh);
|
||||
str = rb_str_new(0, len);
|
||||
if ((len = DH_compute_key(RSTRING_PTR(str), pub_key, dh)) < 0) {
|
||||
if ((len = DH_compute_key((unsigned char *)RSTRING_PTR(str), pub_key, dh)) < 0) {
|
||||
ossl_raise(eDHError, NULL);
|
||||
}
|
||||
rb_str_set_len(str, len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue