Explorar el Código

Fix SSL_connect/SSL_accept "retry loop" in sslize

see https://groups.google.com/forum/#!topic/civetweb/CTu5uBLCPlU
bel hace 8 años
padre
commit
8e1eabd1bc
Se han modificado 2 ficheros con 2 adiciones y 1 borrados
  1. 1 0
      CREDITS.md
  2. 1 1
      src/civetweb.c

+ 1 - 0
CREDITS.md

@@ -16,6 +16,7 @@
 * Daniel Oaks
 * Daniel Rempel
 * Danny Al-Gaaf
+* Dave Brower
 * David Arnold
 * David Loffredo
 * Dialga

+ 1 - 1
src/civetweb.c

@@ -11403,7 +11403,7 @@ sslize(struct mg_connection *conn, SSL_CTX *s, int (*func)(SSL *))
 	/* SSL functions may fail and require to be called again:
 	 * see https://www.openssl.org/docs/manmaster/ssl/SSL_get_error.html
 	 * Here "func" could be SSL_connect or SSL_accept. */
-	for (i = 0; i <= 16; i *= 2) {
+	for (i = 1; i <= 16; i *= 2) {
 		ret = func(conn->ssl);
 		if (ret != 1) {
 			err = SSL_get_error(conn->ssl, ret);