diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-03-19 06:32:35 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-03-19 06:32:35 +0000 |
commit | 7e6634d512b4da954cf5bd9d4540550ac778c3fd (patch) | |
tree | 1fe5b87ca5b6f6d5f362fb6464b73da41a667040 | |
parent | ee3a9f7f4adbcad1b9b1bf5da1b92cfc5064a0fa (diff) | |
download | ATCD-7e6634d512b4da954cf5bd9d4540550ac778c3fd.tar.gz |
ChangeLogTag:Sun Mar 18 22:12:16 2001 Ossama Othman <ossama@uci.edu>
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 12 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 12 | ||||
-rw-r--r-- | ace/SSL/SSL_SOCK_Stream.i | 30 |
4 files changed, 61 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog index 5d11846dcb3..2853f708877 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Sun Mar 18 22:12:16 2001 Ossama Othman <ossama@uci.edu> + + * ace/SSL/SSL_SOCK_Stream.i (close): + + Commented out debugging output that was inadvertently committed + to the repository. + + Don't bother invalidating the handle. Doing so can potentially + cause some side-effects in the underlying OpenSSL + implementation since setting the handle in the SSL_SOCK_Stream + also causes the OpenSSL SSL_set_fd() function to be called. + Sun Mar 18 09:46:47 2001 Balachandran Natarajan <bala@cs.wustl.edu> * tests/New_Fail_Test.cpp: Fixed warnings in g++. diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 5d11846dcb3..2853f708877 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,15 @@ +Sun Mar 18 22:12:16 2001 Ossama Othman <ossama@uci.edu> + + * ace/SSL/SSL_SOCK_Stream.i (close): + + Commented out debugging output that was inadvertently committed + to the repository. + + Don't bother invalidating the handle. Doing so can potentially + cause some side-effects in the underlying OpenSSL + implementation since setting the handle in the SSL_SOCK_Stream + also causes the OpenSSL SSL_set_fd() function to be called. + Sun Mar 18 09:46:47 2001 Balachandran Natarajan <bala@cs.wustl.edu> * tests/New_Fail_Test.cpp: Fixed warnings in g++. diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 5d11846dcb3..2853f708877 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,15 @@ +Sun Mar 18 22:12:16 2001 Ossama Othman <ossama@uci.edu> + + * ace/SSL/SSL_SOCK_Stream.i (close): + + Commented out debugging output that was inadvertently committed + to the repository. + + Don't bother invalidating the handle. Doing so can potentially + cause some side-effects in the underlying OpenSSL + implementation since setting the handle in the SSL_SOCK_Stream + also causes the OpenSSL SSL_set_fd() function to be called. + Sun Mar 18 09:46:47 2001 Balachandran Natarajan <bala@cs.wustl.edu> * tests/New_Fail_Test.cpp: Fixed warnings in g++. diff --git a/ace/SSL/SSL_SOCK_Stream.i b/ace/SSL/SSL_SOCK_Stream.i index 81a6a2c9941..ce48d5a9bce 100644 --- a/ace/SSL/SSL_SOCK_Stream.i +++ b/ace/SSL/SSL_SOCK_Stream.i @@ -266,10 +266,12 @@ ACE_SSL_SOCK_Stream::close (void) // connection, not 0. int status = ::SSL_shutdown (this->ssl_); + if (status <= 0) { switch (::SSL_get_error (this->ssl_, status)) { +#if 0 case SSL_ERROR_WANT_WRITE: ACE_DEBUG ((LM_DEBUG, "SSL_ERROR_WANT_WRITE\n")); break; @@ -282,15 +284,29 @@ ACE_SSL_SOCK_Stream::close (void) case SSL_ERROR_NONE: ACE_DEBUG ((LM_DEBUG, "SSL_ERROR_NONE\n")); break; +#endif /* 0 */ case SSL_ERROR_SYSCALL: - ACE_DEBUG ((LM_DEBUG, "SSL_ERROR_SYSCALL\n")); - break; + // ACE_DEBUG ((LM_DEBUG, "SSL_ERROR_SYSCALL\n")); + + // Ignore this error condition. + + // Don't set the handle in OpenSSL; only in the + // SSL_SOCK_Stream. We do this to avoid any potential side + // effects. Invoking ACE_SSL_SOCK::set_handle() bypasses the + // OpenSSL SSL_set_fd() call ACE_SSL_SOCK_Stream::set_handle() + // does. + this->ACE_SSL_SOCK::set_handle (ACE_INVALID_HANDLE); + + return this->stream_.close (); + // break; +#if 0 case SSL_ERROR_ZERO_RETURN: ACE_DEBUG ((LM_DEBUG, "SSL_ERROR_ZERO_RETURN\n")); break; +#endif /* 0 */ default: #ifndef ACE_NDEBUG - ACE_DEBUG ((LM_DEBUG, "STATUS = %d\n", status)); + // ACE_DEBUG ((LM_DEBUG, "STATUS = %d\n", status)); #endif /* ACE_NDEBUG */ break; } @@ -298,12 +314,16 @@ ACE_SSL_SOCK_Stream::close (void) // Save/restore errno ACE_Errno_Guard error (errno); (void) this->stream_.close (); - this->set_handle (ACE_INVALID_HANDLE); return -1; } - this->set_handle (ACE_INVALID_HANDLE); + // Don't set the handle in OpenSSL; only in the SSL_SOCK_Stream. We + // do this to avoid any potential side effects. + // Invoking ACE_SSL_SOCK::set_handle() bypasses the OpenSSL + // SSL_set_fd() call ACE_SSL_SOCK_Stream::set_handle() does. + this->ACE_SSL_SOCK::set_handle (ACE_INVALID_HANDLE); + return this->stream_.close (); } |