You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Alexey Savartsov (JIRA)" <ji...@apache.org> on 2011/02/12 00:40:57 UTC

[jira] Issue Comment Edited: (THRIFT-151) TSSLServerSocket and TSSLSocket implementation

    [ https://issues.apache.org/jira/browse/THRIFT-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993762#comment-12993762 ] 

Alexey Savartsov edited comment on THRIFT-151 at 2/11/11 11:40 PM:
-------------------------------------------------------------------

Hi Ping, 

I had a problem with that patch only when I used it to connect to Evernote. Test server/client based on this patches only was ok.
The problem was reproducible, but I had no time to explore it so I just deleted second call to SSL_shutdown (just thinking that first SSL_shutdown notify other side that we're closing connection so the socket may be closed as far as connection will not be used again)

--
{code}
void TSSLSocket::close() {
  if (ssl_ != NULL) {
    int rc = SSL_shutdown(ssl_);
    if (rc == 0) {
      rc = SSL_shutdown(ssl_); // <-- when I closed a transport my app hung here 
    }
    if (rc < 0) {
{code}
--

But now I can't reproduce it. Maybe Evernote guys fixed something... or whatever, it works good as for now.

      was (Author: asavartsov):
    Hi Ping, 

I had a problem with that patch only when I used it to connect to Evernote. Test server/client based on this patches only was ok.
The problem was reproducible, but I had no time to explore it so I just deleted second call to SSL_shutdown (just thinking that first SSL_shutdown notify other side that we're closing connection so the socket may be closed as far as connection will not be used again)

--

void TSSLSocket::close() {
  if (ssl_ != NULL) {
    int rc = SSL_shutdown(ssl_);
    if (rc == 0) {
      rc = SSL_shutdown(ssl_); // <-- when I closed a transport my app hung here 
    }
    if (rc < 0) {

--

But now I can't reproduce it. Maybe Evernote guys fixed something... or whatever, it works good as for now.
  
> TSSLServerSocket and TSSLSocket implementation
> ----------------------------------------------
>
>                 Key: THRIFT-151
>                 URL: https://issues.apache.org/jira/browse/THRIFT-151
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>            Reporter: Ian Pye
>         Attachments: TSSLSocket.cpp.diff, TSSLSocket.h.diff, Thrift.zip, ssl-pingli.patch, ssl-redesigned.patch, ssl-test-pingli.patch, ssl.patch
>
>   Original Estimate: 6h
>  Remaining Estimate: 6h
>
> SSL Connections w/ autogenerated self signed x509 certs seem to be the state of the art for rpc layers.
> It would be good if there was a C++ implementation of TSocket and TServerSocket classes.
> This is similar to the Java issue Thrift 106.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira