Hi, I'm trying to get to grips with the SSL protocol, in particular shutting down conenctions gracefully. I've done some tests where I simply close down the socket. If I call SSL_shutdown after the socket has been closed then it allows the session to be reused, otherwise it is marked as bad and removed.
This is sufficient but I'm guessing it is better practice to call SSL_shutdown before I close the socket. I've tried to do this though and the SSL server that I'm connected to sends a TCP reset packet after recieving the TLS alert (which I'm guessing is a close_notify). This is what I immagine should happen: --> Send TLS allert: close notify <-- Receive an ACK and maybe something else? --> Send FIN, ACK <-- Recieve ACK <-- Recieve FIN, ACK --> Send ACK And what I'm getting is: --> Send TLS alert: close notify (I assume) <-- Recieve RST Am I doing the right thing or should I only call SSL_shutdown once the socket has shutdown? If I am doing the right thing then why might the socket be being reset? Thanks for any advice, Matthew ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]