소스 검색

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;
 	}
 
-	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) {
 		int trust_ret = refresh_trust(conn);
 		if (!trust_ret) {