Преглед на файлове

fixed ssl_short_trust bug in sslize (see #280)

Martin Gaida преди 9 години
родител
ревизия
7105998eb8
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      src/civetweb.c

+ 4 - 1
src/civetweb.c

@@ -10601,7 +10601,10 @@ sslize(struct mg_connection *conn, SSL_CTX *s, int (*func)(SSL *))
 		return 0;
 		return 0;
 	}
 	}
 
 
-	int short_trust = !strcmp(conn->ctx->config[SSL_SHORT_TRUST], "yes");
+	int short_trust =
+			(conn->ctx->config[SSL_SHORT_TRUST] != NULL)
+			&& (mg_strcasecmp(conn->ctx->config[SSL_SHORT_TRUST], "yes") == 0);
+
 	if (short_trust) {
 	if (short_trust) {
 		int trust_ret = refresh_trust(conn);
 		int trust_ret = refresh_trust(conn);
 		if (!trust_ret) {
 		if (!trust_ret) {