Explorar o código

Fix coverity warning in function refresh_trust

bel2125 %!s(int64=8) %!d(string=hai) anos
pai
achega
f6a8c2f092
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      src/civetweb.c

+ 3 - 2
src/civetweb.c

@@ -11361,8 +11361,9 @@ refresh_trust(struct mg_connection *conn)
 	char *pem;
 	int should_verify_peer;
 
-	if ((pem = conn->ctx->config[SSL_CERTIFICATE]) == NULL
-	    && conn->ctx->callbacks.init_ssl == NULL) {
+	if ((pem = conn->ctx->config[SSL_CERTIFICATE]) == NULL) {
+		/* If peem is NULL and conn->ctx->callbacks.init_ssl is not,
+		 * refresh_trust still can not work. */
 		return 0;
 	}