[#4654] signleton_methods / methods / public_methods - weirdness? — Johan Holmberg <holmberg@...>
[#4666] Getting a hex representation for a Numeric — "Zev Blut" <rubyzbibd@...>
Hello,
[#4670] ruby 1.8.3 preview1 plan — Yukihiro Matsumoto <matz@...>
Hi,
[#4690] test failures for stable-snapshot 09/04/2005 — noreply@...
Bugs item #1762, was opened at 10-04-2005 20:46
Hello.
[#4709] BNF-like grammar specified DIRECTLY in Ruby — Eric Mahurin <eric_mahurin@...>
Hello everybody,
[#4712] Segfault in zlib? — Nathaniel Talbott <ntalbott@...>
I'm using rubyzip (latest gem version) and zlib (1.2.2) to do a bunch
[#4736] Trivial speedup in Array#zip — Mauricio Fern疣dez <batsman.geo@...>
[#4745] Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Erik Huelsmann <ehuels@...>
Having taken upon me the task to provide a Windows build for
On 4/20/05, Erik Huelsmann <ehuels@gmail.com> wrote:
Hi Austin,
Hi,
On 4/24/05, nobu.nokada@softhome.net <nobu.nokada@softhome.net> wrote:
Hi,
> > > Ruby is just using AC_TYPE_UID_T. So, using typedef for them,
Hi,
On 4/26/05, nobu.nokada@softhome.net <nobu.nokada@softhome.net> wrote:
As promised, I attached a patch to eliminate the compile problems
Hi,
Thanks for the quick response!
Hi,
On 5/14/05, nobu.nokada@softhome.net <nobu.nokada@softhome.net> wrote:
[#4751] Illegal regexp causes segfault — Andrew Walrond <andrew@...>
irb(main):058:0> a = /\[([^]]*)\]/
Andrew Walrond, April 22:
In article <200504221210.38231.andrew@walrond.org>,
>>>>> "T" == Tanaka Akira <akr@m17n.org> writes:
[#4774] enhanced $0 modification — Evan Webb <evanwebb@...>
The attached patch allows for ruby to use more of the available stack
Hi,
[#4775] profiler.rb Schroedinbug — C Erler <erlercw@...>
A ruby program with the single instruction "require 'profile'"
>A ruby program with the single instruction "require 'profile'"
[#4807] Re: -Wall — Vincent Isambart <vincent.isambart@...>
> Why does ruby build without -Wall in CFLAGS by default? -Wall can help to
[#4815] Re: -Wall — nobu.nokada@...
Hi,
[PATCH] openssl session id support
The following patch adds support for setting the session id within an SSL::Context object. Setting the context is necessary for any client using peer certificates that wish to reuse session ids from previous connections. Without this patch, any client that connects again and attempts to reuse the session id will recieve 'session id context uninitialized' as an SSL Error and the connection is terminated immediately. -- Evan M. Webb <evan@fallingsnow.net>
Attachments (1)
--- ruby-1.8.2/ext/openssl/ossl_ssl.c.orig 2005-04-04 12:07:26.000000000 -0700
+++ ruby-1.8.2/ext/openssl/ossl_ssl.c 2005-04-04 12:13:33.000000000 -0700
@@ -349,6 +349,30 @@
return Qnil;
}
+VALUE
+ossl_sslctx_set_session_id(VALUE self, VALUE sid) {
+ SSL_CTX *ctx;
+ int i;
+ VALUE str;
+
+ rb_check_frozen(self);
+ str = sid;
+ StringValue(str);
+
+ Data_Get_Struct(self, SSL_CTX, ctx);
+
+ if(!ctx) {
+ ossl_raise(eSSLError, "SSL_CTX is not initialized.");
+ return Qnil;
+ }
+ if(!SSL_CTX_set_session_id_context(ctx,RSTRING(str)->ptr,
+ RSTRING(str)->len)) {
+ ossl_raise(eSSLError, "SSL_CTX_set_session_id_context");
+ }
+
+ return Qnil;
+}
+
/*
* SSLSocket class
*/
@@ -728,6 +752,7 @@
rb_define_method(cSSLContext, "initialize", ossl_sslctx_initialize, -1);
rb_define_method(cSSLContext, "ciphers", ossl_sslctx_get_ciphers, 0);
rb_define_method(cSSLContext, "ciphers=", ossl_sslctx_set_ciphers, 1);
+ rb_define_method(cSSLContext, "session_id=", ossl_sslctx_set_session_id, 1);
/* class SSLSocket */
cSSLSocket = rb_define_class_under(mSSL, "SSLSocket", rb_cObject);
--- ruby-1.8.2/ext/openssl/lib/openssl/ssl.rb.orig 2005-04-04 13:03:18.000000000 -0700
+++ ruby-1.8.2/ext/openssl/lib/openssl/ssl.rb 2005-04-04 12:33:41.000000000 -0700
@@ -58,9 +58,19 @@
include SocketForwarder
attr_accessor :start_immediately
- def initialize(svr, ctx)
+ def initialize(svr, ctx, session_id=nil)
@svr = svr
@ctx = ctx
+ if session_id
+ @session_id = session_id
+ else
+ @session_id = ('a' .. 'z').to_a.sort_by { rand } [0,24].join("")
+ end
+
+ if @ctx.respond_to? :session_id=
+ @ctx.session_id = @session_id
+ end
+
@start_immediately = true
end