summaryrefslogtreecommitdiff
path: root/lang/ruby18-base/patches/patch-eh
blob: 04d61125382c53e014b5f89e2bfb9fd556758ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-eh,v 1.1 2010/09/10 03:29:01 taca Exp $

* r18172: suppress warnings.
* r26835: backport fixes in 1.9.

--- ext/openssl/ossl_pkey_dh.c.orig	2010-05-24 23:58:49.000000000 +0000
+++ ext/openssl/ossl_pkey_dh.c
@@ -169,7 +169,7 @@ ossl_dh_initialize(int argc, VALUE *argv
 	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 pu
     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);