[Commits] (heikki) Shutdown improvements.

commits at osafoundation.org commits at osafoundation.org
Wed Mar 31 17:23:26 PST 2004


Commit by: heikki
Modified files:
osaf/chandler/m2crypto/M2Crypto/SSL/Connection.py 1.1.1.1 1.2
osaf/chandler/m2crypto/SWIG/_ssl.i 1.2 1.3

Log message:
Shutdown improvements.


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/osaf/chandler/m2crypto/M2Crypto/SSL/Connection.py.diff?r1=text&tr1=1.1.1.1&r2=text&tr2=1.2
http://cvs.osafoundation.org/index.cgi/osaf/chandler/m2crypto/SWIG/_ssl.i.diff?r1=text&tr1=1.2&r2=text&tr2=1.3

Index: osaf/chandler/m2crypto/SWIG/_ssl.i
diff -u osaf/chandler/m2crypto/SWIG/_ssl.i:1.2 osaf/chandler/m2crypto/SWIG/_ssl.i:1.3
--- osaf/chandler/m2crypto/SWIG/_ssl.i:1.2	Tue Mar 16 13:46:42 2004
+++ osaf/chandler/m2crypto/SWIG/_ssl.i	Wed Mar 31 17:22:55 2004
@@ -3,7 +3,7 @@
 ** Portions created by Open Source Applications Foundation (OSAF) are
 ** Copyright (C) 2004 OSAF. All Rights Reserved.
 */
-/* $Id: _ssl.i,v 1.2 2004/03/16 21:46:42 heikki Exp $ */
+/* $Id: _ssl.i,v 1.3 2004/04/01 01:22:55 heikki Exp $ */
 
 %{
 #include <pythread.h>
@@ -55,7 +55,9 @@
 %name(ssl_set_accept_state) extern void SSL_set_accept_state(SSL *);
 %name(ssl_set_connect_state) extern void SSL_set_connect_state(SSL *);
 %name(ssl_set_shutdown) extern void SSL_set_shutdown(SSL *, int);
+%name(ssl_get_shutdown) extern int SSL_get_shutdown(SSL *);
 %name(ssl_shutdown) extern int SSL_shutdown(SSL *);
+%name(ssl_clear) extern int SSL_clear(SSL *);
 %name(ssl_do_handshake) extern int SSL_do_handshake(SSL *);
 %name(ssl_renegotiate) extern int SSL_renegotiate(SSL *);
 %name(ssl_pending) extern int SSL_pending(SSL *);

Index: osaf/chandler/m2crypto/M2Crypto/SSL/Connection.py
diff -u osaf/chandler/m2crypto/M2Crypto/SSL/Connection.py:1.1.1.1 osaf/chandler/m2crypto/M2Crypto/SSL/Connection.py:1.2
--- osaf/chandler/m2crypto/M2Crypto/SSL/Connection.py:1.1.1.1	Mon Mar  1 11:43:40 2004
+++ osaf/chandler/m2crypto/M2Crypto/SSL/Connection.py	Wed Mar 31 17:22:54 2004
@@ -1,8 +1,12 @@
 """M2Crypto.SSL.Connection
 
-Copyright (c) 1999-2002 Ng Pheng Siong. All rights reserved."""
+Copyright (c) 1999-2002 Ng Pheng Siong. All rights reserved.
 
-RCS_id='$Id: Connection.py,v 1.1.1.1 2004/03/01 19:43:40 heikki Exp $'
+Portions created by Open Source Applications Foundation (OSAF) are
+Copyright (C) 2004 OSAF. All Rights Reserved.
+"""
+
+RCS_id='$Id: Connection.py,v 1.2 2004/04/01 01:22:54 heikki Exp $'
 
 # Python
 import socket, sys
@@ -41,8 +45,19 @@
     def close(self):
         m2.ssl_shutdown(self.ssl)
 
+    def clear(self):
+        """
+        If there were errors in this connection, call clear() rather
+        than close() to end it, so that bad sessions will be cleared
+        from cache.
+        """
+        return m2.ssl_clear(self.ssl)
+
     def set_shutdown(self, mode):
         m2.ssl_set_shutdown1(self.ssl, mode)
+
+    def get_shutdown(self):
+        return m2.ssl_get_shutdown(self.ssl)
 
     def bind(self, addr):
         self.socket.bind(addr)



More information about the Commits mailing list