Feature #6133
openSSLSocketをshutdownできない
Added by kik (Masashi Kikuchi) over 12 years ago. Updated over 1 year ago.
Description
http://www.openssl.org/docs/ssl/SSL_shutdown.html
に対応するメソッドがないので、送信の終わりを送れません。ただし微妙にshutdown(2)とインターフェースが違ってます。
Updated by mame (Yusuke Endoh) over 12 years ago
- Status changed from Open to Assigned
- Assignee set to MartinBosslet (Martin Bosslet)
- Target version set to 2.0.0
Hello, emboss-san
This is a feature request for openssl.
OP wants a method to call SSL_shutdown to send the termination of a
transmission.
http://www.openssl.org/docs/ssl/SSL_shutdown.html
What do you think?
Note that there is a subtle difference between the API and shutdown(2).
As you may know.
Thanks,
--
Yusuke Endoh mame@tsg.ne.jp
Updated by MartinBosslet (Martin Bosslet) over 12 years ago
mame (Yusuke Endoh) wrote:
Hello, emboss-san
This is a feature request for openssl.
OP wants a method to call SSL_shutdown to send the termination of a
transmission.http://www.openssl.org/docs/ssl/SSL_shutdown.html
What do you think?
Hello Yusuke,
thank you for the effort of translating this for me! So the problem
is that we don't explicitly expose shutdown in Ruby's OpenSSL API
and the OP would like to have that facility, did I understand
this correctly?
Note that there is a subtle difference between the API and shutdown(2).
As you may know.
Thanks for pointing this out - indeed, OpenSSL's shutdown behaves
differently than Socket's. But I think we can leave this complexity on
the side of the caller, shall they deal with it appropriately. I need
to investigate whether this would conflict with our internal handling
in sysclose, but if not, I tend to think nothing seems to prevent an
additional shutdown method.
-Martin
Updated by nahi (Hiroshi Nakamura) over 12 years ago
- Assignee changed from MartinBosslet (Martin Bosslet) to nahi (Hiroshi Nakamura)
Oops. Sorry for confusing(?) you. It's me who was asked this question on Twitter. I didn't understand the question so I asked to file an issue, but I keep it opening because I still couldn't understand the point.
Martin, I'll ask OP for detail in Japanese and update you.
Updated by nahi (Hiroshi Nakamura) over 12 years ago
長々ほったらかしてすいませんでした。もう少し教えてください。
送信の終わりを送れません。
ここで言う「送信の終わりを送る」についてもう少し教えてください。
- ドキュメント等にある(はずの)、通常のRubyのSSLSocketの使い方における送信の終わり方
- kikさんが想定されている送信の終わり方
を、教えてください。
Updated by MartinBosslet (Martin Bosslet) over 12 years ago
nahi (Hiroshi Nakamura) wrote:
Martin, I'll ask OP for detail in Japanese and update you.
Thanks a lot!
Updated by kik (Masashi Kikuchi) over 12 years ago
http://www.faqs.org/faqs/unix-faq/socket/
http://www.kt.rim.or.jp/~ksk/sock-faq/unix-socket-faq-ja-2.html#ss2.6
2.6 When should I use shutdown()?
のようなソケットプログラミングのイディオムをサーバがTLSで実装しているために、
クライアントを書いてる僕が困っているのです。
- ドキュメント等にある(はずの)、通常のRubyのSSLSocketの使い方における送信の終わり方
たぶん、乱暴にcloseして送信と受信が同時に終了する方法しかないはずです
- kikさんが想定されている送信の終わり方
FAQに書いてあるような丁寧な閉じ方です。
たぶん単純なTLSのechoサーバでも、丁寧に実装しようとするとクライアントにはshutdownがいると思います。
Updated by mame (Yusuke Endoh) over 11 years ago
- Target version changed from 2.0.0 to 2.6
Updated by zzak (zzak _) almost 9 years ago
- Assignee changed from nahi (Hiroshi Nakamura) to 7150
Updated by hsbt (Hiroshi SHIBATA) over 1 year ago
- Assignee set to rhenium (Kazuki Yamaguchi)