OpenSSL: clear any leftover errors from the stack after SSL_accept succeeds
[exim.git] / src / src / tls-openssl.c
index 8a1fec6a9be7f5284f065c1cdb64a4f6a5e395b0..8f4cf4d82fbd937502918de05501b883fbd866c3 100644 (file)
@@ -2281,6 +2281,8 @@ if (rc <= 0)
   }
 
 DEBUG(D_tls) debug_printf("SSL_accept was successful\n");
+ERR_clear_error();     /* Even success can leave errors in the stack. Seen with
+                       anon-authentication ciphersuite negociated. */
 
 /* TLS has been set up. Adjust the input functions to read via TLS,
 and initialize things. */