rpms/ruby/devel ruby-openssl-1.0.patch, NONE, 1.1 ruby.spec, 1.138, 1.139

Tomáš Mráz tmraz at fedoraproject.org
Wed Aug 26 10:11:58 UTC 2009


Author: tmraz

Update of /cvs/pkgs/rpms/ruby/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29886

Modified Files:
	ruby.spec 
Added Files:
	ruby-openssl-1.0.patch 
Log Message:
- fix openssl-1.0 API incompatibility


ruby-openssl-1.0.patch:
 ossl.c     |    4 ++++
 ossl_ssl.c |   14 ++++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

--- NEW FILE ruby-openssl-1.0.patch ---
diff -up ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c.ossl10 ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c
--- ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c.ossl10	2007-02-13 00:01:19.000000000 +0100
+++ ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c	2009-08-26 12:00:27.000000000 +0200
@@ -90,6 +90,10 @@ ossl_x509_ary2sk(VALUE ary)
     return sk;
 }
 
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+#define STACK _STACK
+#endif
+
 #define OSSL_IMPL_SK2ARY(name, type)	        \
 VALUE						\
 ossl_##name##_sk2ary(STACK *sk)			\
diff -up ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c.ossl10 ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c
--- ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c.ossl10	2007-03-12 05:12:32.000000000 +0100
+++ ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c	2009-08-26 12:08:48.000000000 +0200
@@ -89,12 +89,18 @@ static char *ossl_sslctx_attrs[] = {
 static char *ossl_ssl_attr_readers[] = { "io", "context", };
 static char *ossl_ssl_attrs[] = { "sync_close", };
 
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+#define OSSL_MORE_CONST const
+#define STACK _STACK
+#else
+#define OSSL_MORE_CONST
+#endif
 /*
  * SSLContext class
  */
 struct {
     const char *name;
-    SSL_METHOD *(*func)(void);
+    OSSL_MORE_CONST SSL_METHOD *(*func)(void);
 } ossl_ssl_method_tab[] = {
 #define OSSL_SSL_METHOD_ENTRY(name) { #name, name##_method }
     OSSL_SSL_METHOD_ENTRY(TLSv1),
@@ -144,7 +150,7 @@ static VALUE
 ossl_sslctx_initialize(int argc, VALUE *argv, VALUE self)
 {
     VALUE ssl_method;
-    SSL_METHOD *method = NULL;
+    OSSL_MORE_CONST SSL_METHOD *method = NULL;
     SSL_CTX *ctx;
     int i;
     char *s;
@@ -407,7 +413,7 @@ ossl_sslctx_setup(VALUE self)
 }
 
 static VALUE
-ossl_ssl_cipher_to_ary(SSL_CIPHER *cipher)
+ossl_ssl_cipher_to_ary(OSSL_MORE_CONST SSL_CIPHER *cipher)
 {
     VALUE ary;
     int bits, alg_bits;
@@ -805,7 +811,7 @@ static VALUE
 ossl_ssl_get_cipher(VALUE self)
 {
     SSL *ssl;
-    SSL_CIPHER *cipher;
+    OSSL_MORE_CONST SSL_CIPHER *cipher;
 
     Data_Get_Struct(self, SSL, ssl);
     if (!ssl) {


Index: ruby.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ruby/devel/ruby.spec,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -p -r1.138 -r1.139
--- ruby.spec	26 Aug 2009 09:49:47 -0000	1.138
+++ ruby.spec	26 Aug 2009 10:11:58 -0000	1.139
@@ -49,6 +49,7 @@ Patch26:        ruby-1.8.6-rexml-CVE-200
 Patch27:        ruby-1.8.6-p287-CVE-2008-5189.patch
 Patch28:        ruby-1.8.6-p287-remove-ssl-rand-range.patch
 Patch29:	ruby-always-use-i386.patch
+Patch30:	ruby-openssl-1.0.patch
 
 Summary:	An interpreter of object-oriented scripting language
 Group:		Development/Languages
@@ -178,6 +179,7 @@ pushd %{name}-%{arcver}
 %patch27 -p0
 %patch28 -p1
 %patch29 -p1
+%patch30 -p2
 popd
 
 %build




More information about the fedora-extras-commits mailing list