1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/openssl/ossl_ssl.c (ossl_ssl_setup): need to pass the real

socket to SSL_get_fd on native win32 platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2003-07-25 16:40:26 +00:00
parent ec75bfe364
commit 2b15bd05d3
2 changed files with 13 additions and 2 deletions

View file

@ -1,4 +1,9 @@
Fri Jul 25 15:04:25 2003 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
Sat Jul 26 01:33:51 2003 NAKAMURA Usaku <usa@ruby-lang.org>
* ext/openssl/ossl_ssl.c (ossl_ssl_setup): need to pass the real
socket to SSL_get_fd on native win32 platforms.
Fri Jul 26 00:04:25 2003 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
* ext/openssl/sample: Add samples.
- cert2text.rb: Dump certificate file as text.

View file

@ -19,6 +19,12 @@
#define numberof(ary) (sizeof(ary)/sizeof(ary[0]))
#ifdef OPENSSL_SYS_WINDOWS
# define TO_SOCKET(s) _get_osfhandle(s)
#else
# define TO_SOCKET(s) s
#endif
VALUE mSSL;
VALUE eSSLError;
VALUE cSSLContext;
@ -392,7 +398,7 @@ ossl_ssl_setup(VALUE self)
GetOpenFile(io, fptr);
rb_io_check_readable(fptr);
rb_io_check_writable(fptr);
SSL_set_fd(ssl, fileno(fptr->f));
SSL_set_fd(ssl, TO_SOCKET(fileno(fptr->f)));
}
return Qtrue;