Project

General

Profile

Actions

Feature #12085

closed

[PATCH] openssl: document `exception: false' for *_nonblock

Added by normalperson (Eric Wong) almost 9 years ago. Updated almost 8 years ago.

Status:
Closed
Target version:
-
[ruby-core:73882]

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


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #12126: [PATCH] openssl: accept moving write buffer for write_nonblockClosedActions

Updated by normalperson (Eric Wong) over 8 years ago

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) over 8 years ago

  • Description updated (diff)

Updated by normalperson (Eric Wong) over 8 years ago

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?

Actions #5

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) almost 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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0