View Single Post
Old 03-28-2003, 12:20 AM  
darkone
Disabled
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

SSL_shutdown is called before FD_CLOSE occurs. If client is sending data (uploading), it should call SSL_shutdown() once all data has been sent (EOF). Server does SSL_read() until SSL_ERROR_ZERO_RETURN is returned. At this point server calls, SSL_shutdown(). Both ends wait until SSL_shutdown returns with 1/error, or timeout elapses. Socket is to be closed at this point.


C> SSL_connect()
S> SSL_accept()
C> SSL_write()
S> SSL_read()
C> SSL_shutdown()
S> SSL_read(), SSL_ERROR_ZERO_RETURN
S> SSL_shutdown()
C> SSL_shutdown(), return 1
S> SSL_shutdown(), return 1
C> closesocket() (FD_CLOSE)
S> closesocket() (FD_CLOSE)
darkone is offline