Forum: Ruby-dev [ruby-trunk - Feature #6133][Open] SSLSocketをshutdownできない

Posted by Masashi Kikuchi (Guest)
on 2012-03-12 16:17
(Received via mailing list)
Issue #6133 has been reported by Masashi Kikuchi.

----------------------------------------
Feature #6133: SSLSocketをshutdownできない
https://bugs.ruby-lang.org/issues/6133

Author: Masashi Kikuchi
Status: Open
Priority: Normal
Assignee:
Category: ext
Target version:


http://www.openssl.org/docs/ssl/SSL_shutdown.html
に対応するメソッドがないので、送信の終わりを送れません。ただし微妙にshutdown(2)とインターフェースが違ってます。
Posted by mame (Yusuke Endoh) (Guest)
on 2012-03-29 19:07
(Received via mailing list)
Issue #6133 has been updated by mame (Yusuke Endoh).

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>
----------------------------------------
Feature #6133: SSLSocketをshutdownできない
https://bugs.ruby-lang.org/issues/6133#change-25402

Author: kik (Masashi Kikuchi)
Status: Assigned
Priority: Normal
Assignee: MartinBosslet (Martin Bosslet)
Category: ext
Target version: 2.0.0


http://www.openssl.org/docs/ssl/SSL_shutdown.html
に対応するメソッドがないので、送信の終わりを送れません。ただし微妙にshutdown(2)とインターフェースが違ってます。
Posted by Martin Bosslet (martin_b)
on 2012-03-30 00:43
(Received via mailing list)
Issue #6133 has been updated by MartinBosslet (Martin Bosslet).


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
----------------------------------------
Feature #6133: SSLSocketをshutdownできない
https://bugs.ruby-lang.org/issues/6133#change-25414

Author: kik (Masashi Kikuchi)
Status: Assigned
Priority: Normal
Assignee: MartinBosslet (Martin Bosslet)
Category: ext
Target version: 2.0.0


http://www.openssl.org/docs/ssl/SSL_shutdown.html
に対応するメソッドがないので、送信の終わりを送れません。ただし微妙にshutdown(2)とインターフェースが違ってます。
Posted by nahi (Hiroshi Nakamura) (Guest)
on 2012-03-30 00:51
(Received via mailing list)
Issue #6133 has been updated by nahi (Hiroshi Nakamura).

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.
----------------------------------------
Feature #6133: SSLSocketをshutdownできない
https://bugs.ruby-lang.org/issues/6133#change-25416

Author: kik (Masashi Kikuchi)
Status: Assigned
Priority: Normal
Assignee: nahi (Hiroshi Nakamura)
Category: ext
Target version: 2.0.0


http://www.openssl.org/docs/ssl/SSL_shutdown.html
に対応するメソッドがないので、送信の終わりを送れません。ただし微妙にshutdown(2)とインターフェースが違ってます。
Posted by nahi (Hiroshi Nakamura) (Guest)
on 2012-03-30 00:54
(Received via mailing list)
Issue #6133 has been updated by nahi (Hiroshi Nakamura).


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

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

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

1) ドキュメント等にある(はずの)、通常のRubyのSSLSocketの使い方における送信の終わり方
2) kikさんが想定されている送信の終わり方

を、教えてください。
----------------------------------------
Feature #6133: SSLSocketをshutdownできない
https://bugs.ruby-lang.org/issues/6133#change-25417

Author: kik (Masashi Kikuchi)
Status: Assigned
Priority: Normal
Assignee: nahi (Hiroshi Nakamura)
Category: ext
Target version: 2.0.0


http://www.openssl.org/docs/ssl/SSL_shutdown.html
に対応するメソッドがないので、送信の終わりを送れません。ただし微妙にshutdown(2)とインターフェースが違ってます。
Posted by Martin Bosslet (martin_b)
on 2012-03-31 04:36
(Received via mailing list)
Issue #6133 has been updated by MartinBosslet (Martin Bosslet).


nahi (Hiroshi Nakamura) wrote:
> Martin, I'll ask OP for detail in Japanese and update you.

Thanks a lot!

----------------------------------------
Feature #6133: SSLSocketをshutdownできない
https://bugs.ruby-lang.org/issues/6133#change-25511

Author: kik (Masashi Kikuchi)
Status: Assigned
Priority: Normal
Assignee: nahi (Hiroshi Nakamura)
Category: ext
Target version: 2.0.0


http://www.openssl.org/docs/ssl/SSL_shutdown.html
に対応するメソッドがないので、送信の終わりを送れません。ただし微妙にshutdown(2)とインターフェースが違ってます。
Posted by kik (Masashi Kikuchi) (Guest)
on 2012-03-31 16:51
(Received via mailing list)
Issue #6133 has been updated by kik (Masashi Kikuchi).


http://www.faqs.org/faqs/unix-faq/socket/
http://www.kt.rim.or.jp/~ksk/sock-faq/unix-socket-...

2.6 When should I use shutdown()?

のようなソケットプログラミングのイディオムをサーバがTLSで実装しているために、
クライアントを書いてる僕が困っているのです。

>1) ドキュメント等にある(はずの)、通常のRubyのSSLSocketの使い方における送信の終わり方
たぶん、乱暴にcloseして送信と受信が同時に終了する方法しかないはずです

>2) kikさんが想定されている送信の終わり方
FAQに書いてあるような丁寧な閉じ方です。

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

----------------------------------------
Feature #6133: SSLSocketをshutdownできない
https://bugs.ruby-lang.org/issues/6133#change-25532

Author: kik (Masashi Kikuchi)
Status: Assigned
Priority: Normal
Assignee: nahi (Hiroshi Nakamura)
Category: ext
Target version: 2.0.0


http://www.openssl.org/docs/ssl/SSL_shutdown.html
に対応するメソッドがないので、送信の終わりを送れません。ただし微妙にshutdown(2)とインターフェースが違ってます。
Posted by mame (Yusuke Endoh) (Guest)
on 2012-11-20 14:25
(Received via mailing list)
Issue #6133 has been updated by mame (Yusuke Endoh).

Target version changed from 2.0.0 to next minor


----------------------------------------
Feature #6133: SSLSocketをshutdownできない
https://bugs.ruby-lang.org/issues/6133#change-33280

Author: kik (Masashi Kikuchi)
Status: Assigned
Priority: Normal
Assignee: nahi (Hiroshi Nakamura)
Category: ext
Target version: next minor


http://www.openssl.org/docs/ssl/SSL_shutdown.html
に対応するメソッドがないので、送信の終わりを送れません。ただし微妙にshutdown(2)とインターフェースが違ってます。
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.