Feature #12085
closed[PATCH] openssl: document `exception: false' for *_nonblock
Description
- ext/openssl/lib/openssl/buffering.rb
(read_nonblock, write_nonblock): document `exception: false'
Updated v2 patch since [Bug #12126] is split out.
Also updated for read_nonblock.
Files
Updated by normalperson (Eric Wong) almost 9 years ago
normalperson@yhbt.net wrote:
I do not plan to commit the test change since OpenSSL behavior
may be improved in the future.
I just discovered SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER
,
which might've saved me plenty of headaches earlier this month:
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -145,7 +145,8 @@ static VALUE
ossl_sslctx_s_alloc(VALUE klass)
{
SSL_CTX *ctx;
- long mode = SSL_MODE_ENABLE_PARTIAL_WRITE;
+ long mode = SSL_MODE_ENABLE_PARTIAL_WRITE |
+ SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER;
VALUE obj;
#ifdef SSL_MODE_RELEASE_BUFFERS
This flag is documented in SSL_CTX_set_mode(3SSL) and has been around
since SSL_MODE_ENABLE_PARTIAL_WRITE
was introduced.
I haven't tested the effects of this flag, yet, as I've already worked
around the lack of this flag in a project which uses the OpenSSL
extension.
Updated by nobu (Nobuyoshi Nakada) almost 9 years ago
- Description updated (diff)
Updated by normalperson (Eric Wong) almost 9 years ago
- File 0001-openssl-document-exception-false-for-_nonblock.patch 0001-openssl-document-exception-false-for-_nonblock.patch added
- Subject changed from [PATCH] OpenSSL::SSL::SSLSocket#write_nonblock: expand documentation to [PATCH] openssl: document `exception: false' for *_nonblock
- Description updated (diff)
Updated by hsbt (Hiroshi SHIBATA) over 8 years ago
- Status changed from Open to Assigned
- Assignee changed from zzak (zzak _) to rhenium (Kazuki Yamaguchi)
rhenium
Can you review (and apply) this?
Updated by naruse (Yui NARUSE) over 8 years ago
- Related to Bug #12126: [PATCH] openssl: accept moving write buffer for write_nonblock added
Updated by rhenium (Kazuki Yamaguchi) about 8 years ago
- Status changed from Assigned to Closed
Applied as 5c31e7233476 at the new repository:
https://github.com/ruby/openssl/commit/5c31e7233476bec184cac239b5d36de68dbd997e
and is already imported to trunk as a part of openssl v2.0.0.