summaryrefslogtreecommitdiff
path: root/lang/ruby18-base/patches
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2016-03-24 16:28:59 +0000
committertaca <taca@pkgsrc.org>2016-03-24 16:28:59 +0000
commite9b7536642204d1b6f5ed42c3b774a2fad4faa1a (patch)
tree68989155abea15d8af857377f43d0bfbf6519eb3 /lang/ruby18-base/patches
parent502b5d0f2fab047dd09724e68364b9ed6203b56c (diff)
downloadpkgsrc-e9b7536642204d1b6f5ed42c3b774a2fad4faa1a.tar.gz
Try to fix build error by recent OpenSSL change on NetBSD,
reported as PR pkg/50971.
Diffstat (limited to 'lang/ruby18-base/patches')
-rw-r--r--lang/ruby18-base/patches/patch-dq41
1 files changed, 23 insertions, 18 deletions
diff --git a/lang/ruby18-base/patches/patch-dq b/lang/ruby18-base/patches/patch-dq
index 4210a0763fa..36d7094f97f 100644
--- a/lang/ruby18-base/patches/patch-dq
+++ b/lang/ruby18-base/patches/patch-dq
@@ -1,4 +1,4 @@
-$NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
+$NetBSD: patch-dq,v 1.4 2016/03/24 16:30:11 taca Exp $
* r18172: suppress warnings.
* r20494: (ossl_ssl_read_nonblock): OpenSSL::SSL::SSLSocket should implement
@@ -11,7 +11,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
* Constify (some cases are depends on OpenSSL's version).
* Only enable SSLv3 methods if library provides support.
---- ext/openssl/ossl_ssl.c.orig Wed Feb 8 06:09:40 2012
+--- ext/openssl/ossl_ssl.c.orig 2012-02-08 06:09:40.000000000 +0000
+++ ext/openssl/ossl_ssl.c
@@ -26,6 +26,12 @@
# define TO_SOCKET(s) s
@@ -26,7 +26,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
VALUE mSSL;
VALUE eSSLError;
VALUE cSSLContext;
-@@ -69,6 +75,9 @@ static const char *ossl_sslctx_attrs[] = {
+@@ -69,6 +75,9 @@ static const char *ossl_sslctx_attrs[] =
"verify_callback", "options", "cert_store", "extra_chain_cert",
"client_cert_cb", "tmp_dh_callback", "session_id_context",
"session_get_cb", "session_new_cb", "session_remove_cb",
@@ -36,7 +36,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
};
#define ossl_ssl_get_io(o) rb_iv_get((o),"@io")
-@@ -86,7 +95,12 @@ static const char *ossl_sslctx_attrs[] = {
+@@ -86,7 +95,12 @@ static const char *ossl_sslctx_attrs[] =
#define ossl_ssl_set_tmp_dh(o,v) rb_iv_set((o),"@tmp_dh",(v))
static const char *ossl_ssl_attr_readers[] = { "io", "context", };
@@ -50,7 +50,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
ID ID_callback_state;
-@@ -95,7 +109,7 @@ ID ID_callback_state;
+@@ -95,21 +109,24 @@ ID ID_callback_state;
*/
struct {
const char *name;
@@ -59,7 +59,12 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
} ossl_ssl_method_tab[] = {
#define OSSL_SSL_METHOD_ENTRY(name) { #name, name##_method }
OSSL_SSL_METHOD_ENTRY(TLSv1),
-@@ -107,9 +121,12 @@ struct {
+ OSSL_SSL_METHOD_ENTRY(TLSv1_server),
+ OSSL_SSL_METHOD_ENTRY(TLSv1_client),
+-#if defined(HAVE_SSLV2_METHOD) && defined(HAVE_SSLV2_SERVER_METHOD) && \
++#if !defined(OPENSSL_NO_SSL2) && defined(HAVE_SSLV2_METHOD) && defined(HAVE_SSLV2_SERVER_METHOD) && \
+ defined(HAVE_SSLV2_CLIENT_METHOD)
+ OSSL_SSL_METHOD_ENTRY(SSLv2),
OSSL_SSL_METHOD_ENTRY(SSLv2_server),
OSSL_SSL_METHOD_ENTRY(SSLv2_client),
#endif
@@ -81,7 +86,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
const char *s;
int i;
-@@ -299,7 +316,7 @@ ossl_ssl_verify_callback(int preverify_ok, X509_STORE_
+@@ -299,7 +316,7 @@ ossl_ssl_verify_callback(int preverify_o
static VALUE
ossl_call_session_get_cb(VALUE ary)
{
@@ -90,7 +95,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
Check_Type(ary, T_ARRAY);
ssl_obj = rb_ary_entry(ary, 0);
-@@ -327,7 +344,7 @@ ossl_sslctx_session_get_cb(SSL *ssl, unsigned char *bu
+@@ -327,7 +344,7 @@ ossl_sslctx_session_get_cb(SSL *ssl, uns
ssl_obj = (VALUE)ptr;
ary = rb_ary_new2(2);
rb_ary_push(ary, ssl_obj);
@@ -99,7 +104,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
ret_obj = rb_protect((VALUE(*)_((VALUE)))ossl_call_session_get_cb, ary, &state);
if (state) {
-@@ -346,7 +363,7 @@ ossl_sslctx_session_get_cb(SSL *ssl, unsigned char *bu
+@@ -346,7 +363,7 @@ ossl_sslctx_session_get_cb(SSL *ssl, uns
static VALUE
ossl_call_session_new_cb(VALUE ary)
{
@@ -108,7 +113,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
Check_Type(ary, T_ARRAY);
ssl_obj = rb_ary_entry(ary, 0);
-@@ -389,10 +406,11 @@ ossl_sslctx_session_new_cb(SSL *ssl, SSL_SESSION *sess
+@@ -389,10 +406,11 @@ ossl_sslctx_session_new_cb(SSL *ssl, SSL
return RTEST(ret_obj) ? 1 : 0;
}
@@ -129,7 +134,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
static void
ossl_sslctx_session_remove_cb(SSL_CTX *ctx, SSL_SESSION *sess)
-@@ -448,6 +467,66 @@ ossl_sslctx_add_extra_chain_cert_i(VALUE i, VALUE arg)
+@@ -448,6 +467,66 @@ ossl_sslctx_add_extra_chain_cert_i(VALUE
return i;
}
@@ -249,7 +254,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
rb_ary_push(ary, ossl_ssl_cipher_to_ary(cipher));
}
return ary;
-@@ -821,7 +909,6 @@ ossl_sslctx_flush_sessions(int argc, VALUE *argv, VALU
+@@ -821,7 +909,6 @@ ossl_sslctx_flush_sessions(int argc, VAL
VALUE arg1;
SSL_CTX *ctx;
time_t tm = 0;
@@ -257,7 +262,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
rb_scan_args(argc, argv, "01", &arg1);
-@@ -895,6 +982,8 @@ ossl_ssl_initialize(int argc, VALUE *argv, VALUE self)
+@@ -895,6 +982,8 @@ ossl_ssl_initialize(int argc, VALUE *arg
ossl_sslctx_setup(ctx);
rb_call_super(0, 0);
@@ -290,7 +295,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
io = ossl_ssl_get_io(self);
GetOpenFile(io, fptr);
rb_io_check_readable(fptr);
-@@ -953,7 +1052,15 @@ ossl_start_ssl(VALUE self, int (*func)(), const char *
+@@ -953,7 +1052,15 @@ ossl_start_ssl(VALUE self, int (*func)()
Data_Get_Struct(self, SSL, ssl);
GetOpenFile(ossl_ssl_get_io(self), fptr);
for(;;){
@@ -307,7 +312,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
switch((ret2 = ssl_get_error(ssl, ret))){
case SSL_ERROR_WANT_WRITE:
rb_io_wait_writable(FPTR_TO_FD(fptr));
-@@ -969,10 +1076,6 @@ ossl_start_ssl(VALUE self, int (*func)(), const char *
+@@ -969,10 +1076,6 @@ ossl_start_ssl(VALUE self, int (*func)()
}
}
@@ -391,7 +396,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
SSL *ssl;
int ilen, nread = 0;
VALUE len, str;
-@@ -1027,12 +1196,11 @@ ossl_ssl_read(int argc, VALUE *argv, VALUE self)
+@@ -1027,12 +1196,11 @@ ossl_ssl_read(int argc, VALUE *argv, VAL
Data_Get_Struct(self, SSL, ssl);
GetOpenFile(ossl_ssl_get_io(self), fptr);
@@ -406,7 +411,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
case SSL_ERROR_NONE:
goto end;
case SSL_ERROR_ZERO_RETURN:
-@@ -1041,7 +1209,7 @@ ossl_ssl_read(int argc, VALUE *argv, VALUE self)
+@@ -1041,7 +1209,7 @@ ossl_ssl_read(int argc, VALUE *argv, VAL
rb_io_wait_writable(FPTR_TO_FD(fptr));
continue;
case SSL_ERROR_WANT_READ:
@@ -415,7 +420,7 @@ $NetBSD: patch-dq,v 1.3 2015/10/14 18:33:08 sevan Exp $
continue;
case SSL_ERROR_SYSCALL:
if(ERR_peek_error() == 0 && nread == 0) rb_eof_error();
-@@ -1052,9 +1220,8 @@ ossl_ssl_read(int argc, VALUE *argv, VALUE self)
+@@ -1052,9 +1220,8 @@ ossl_ssl_read(int argc, VALUE *argv, VAL
}
}
else {