Skip to content

Commit af76024

Browse files
committed
Squash warning
1 parent 0f83c2a commit af76024

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mongoose.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12415,7 +12415,7 @@ static int mg_tls_recv_cert(struct mg_connection *c, bool is_client) {
1241512415
if (ci == certs) {
1241612416
// First certificate in the chain is peer cert, check SAN if requested,
1241712417
// and store public key for further CertVerify step
12418-
if (tls->hostname != NULL && *tls->hostname != '\0' &&
12418+
if (tls->hostname[0] != '\0' &&
1241912419
mg_tls_verify_cert_san(cert, certsz, tls->hostname) <= 0 &&
1242012420
mg_tls_verify_cert_cn(&ci->subj, tls->hostname) <= 0) {
1242112421
mg_error(c, "failed to verify hostname");

src/tls_builtin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ static int mg_tls_recv_cert(struct mg_connection *c, bool is_client) {
13431343
if (ci == certs) {
13441344
// First certificate in the chain is peer cert, check SAN if requested,
13451345
// and store public key for further CertVerify step
1346-
if (tls->hostname != NULL && *tls->hostname != '\0' &&
1346+
if (tls->hostname[0] != '\0' &&
13471347
mg_tls_verify_cert_san(cert, certsz, tls->hostname) <= 0 &&
13481348
mg_tls_verify_cert_cn(&ci->subj, tls->hostname) <= 0) {
13491349
mg_error(c, "failed to verify hostname");

0 commit comments

Comments
 (0)