If the SSL_accept call fails, I just want to help out.
I am currently calling SSL_shutdown and then SSL_free, but after implementing this, two clients crashed in OpenSSL (when calling SSL_accept at a later time), so I guess this is not the best way to clean up.
The docs say that SSL_shutdown is used for the proper cleanup, and it might have to be called twice (although if SSL_accept failed, I would not have thought it would be so). SSL_clear is another option, but it is more like a reset connection.
SSL_free decreases the link count and removes the connection if the number of links reaches 0. I know that my code has no links, but maybe? session?
Is there a final way to completely close / close / free an SSL object using OpenSSL?
Dougn source
share