Project

General

Profile

Actions

Feature #6133

open

SSLSocketをshutdownできない

Added by kik (Masashi Kikuchi) over 12 years ago. Updated almost 2 years ago.

Status:
Assigned
Target version:
-
[ruby-dev:45350]

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

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

長々ほったらかしてすいませんでした。もう少し教えてください。

送信の終わりを送れません。

ここで言う「送信の終わりを送る」についてもう少し教えてください。

  1. ドキュメント等にある(はずの)、通常のRubyのSSLSocketの使い方における送信の終わり方
  2. 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で実装しているために、
クライアントを書いてる僕が困っているのです。

  1. ドキュメント等にある(はずの)、通常のRubyのSSLSocketの使い方における送信の終わり方
    たぶん、乱暴にcloseして送信と受信が同時に終了する方法しかないはずです
  1. kikさんが想定されている送信の終わり方
    FAQに書いてあるような丁寧な閉じ方です。

たぶん単純なTLSのechoサーバでも、丁寧に実装しようとするとクライアントにはshutdownがいると思います。

Updated by mame (Yusuke Endoh) about 12 years ago

  • Target version changed from 2.0.0 to 2.6
Actions #8

Updated by zzak (zzak _) about 9 years ago

  • Assignee changed from nahi (Hiroshi Nakamura) to 7150

Updated by hsbt (Hiroshi SHIBATA) almost 2 years ago

  • Assignee set to rhenium (Kazuki Yamaguchi)
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0