ssl3_read_bytes() - Need to reset the "rwstate" of session on receipt of alert (completion of async crypto op).
Came across a minor issue with handling of alert messages with an async crypto engine.
Would like to get feedback if this has already been resolved or if the attached fix will work ?
The client sends an encrypted "Close_Notify" and we use async processing for decryption. On resubmission of the decrypted data to the SSL_read(), the function returns with "0" and on invoking SSL_get_error() we see the previous error code "SSL_ERROR_WANT_ASYNC" being returned.
In ssl3_read_bytes(), the "rwstate" variable is not reset when the alert has been processed. The following did ensure the return code now returned changed to "SSL_ERROR_ZERO_RETURN" on invoking SSL_get_error().