Author: kgiusti
Date: Wed Oct 17 18:46:25 2012
New Revision: 1399387

URL: http://svn.apache.org/viewvc?rev=1399387&view=rev
Log:
NO-JIRA: force both input and output to close if SSL hard failure detected.

Modified:
    qpid/proton/trunk/proton-c/src/ssl/openssl.c

Modified: qpid/proton/trunk/proton-c/src/ssl/openssl.c
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/ssl/openssl.c?rev=1399387&r1=1399386&r2=1399387&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/ssl/openssl.c (original)
+++ qpid/proton/trunk/proton-c/src/ssl/openssl.c Wed Oct 17 18:46:25 2012
@@ -153,12 +153,15 @@ static void _log_clear_data(pn_ssl_t *ss
 // unrecoverable SSL failure occured, notify transport and generate error code.
 static int ssl_failed(pn_ssl_t *ssl)
 {
+  ssl->ssl_closed = true;
+  ssl->app_input_closed = ssl->app_output_closed = PN_ERR;
   // try to grab the first SSL error to add to the failure log
   char buf[128] = "Unknown error.";
   unsigned long ssl_err = ERR_get_error();
   if (ssl_err) {
     ERR_error_string_n( ssl_err, buf, sizeof(buf) );
   }
+  _log_ssl_error(ssl, NULL);    // spit out any remaining errors to the log 
file
   return pn_error_format( ssl->transport->error, PN_ERR, "SSL Failure: %s", 
buf );
 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to