mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-24 20:21:49 +00:00
Squash warning
This commit is contained in:
1 parent
0f83c2a6e5
commit
af7602497d
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -12415,7 +12415,7 @@ static int mg_tls_recv_cert(struct mg_connection *c, bool is_client) {
|
|||||||
if (ci == certs) {
|
if (ci == certs) {
|
||||||
// First certificate in the chain is peer cert, check SAN if requested,
|
// First certificate in the chain is peer cert, check SAN if requested,
|
||||||
// and store public key for further CertVerify step
|
// and store public key for further CertVerify step
|
||||||
if (tls->hostname != NULL && *tls->hostname != '\0' &&
|
if (tls->hostname[0] != '\0' &&
|
||||||
mg_tls_verify_cert_san(cert, certsz, tls->hostname) <= 0 &&
|
mg_tls_verify_cert_san(cert, certsz, tls->hostname) <= 0 &&
|
||||||
mg_tls_verify_cert_cn(&ci->subj, tls->hostname) <= 0) {
|
mg_tls_verify_cert_cn(&ci->subj, tls->hostname) <= 0) {
|
||||||
mg_error(c, "failed to verify hostname");
|
mg_error(c, "failed to verify hostname");
|
||||||
|
|||||||
+1
-1
@@ -1343,7 +1343,7 @@ static int mg_tls_recv_cert(struct mg_connection *c, bool is_client) {
|
|||||||
if (ci == certs) {
|
if (ci == certs) {
|
||||||
// First certificate in the chain is peer cert, check SAN if requested,
|
// First certificate in the chain is peer cert, check SAN if requested,
|
||||||
// and store public key for further CertVerify step
|
// and store public key for further CertVerify step
|
||||||
if (tls->hostname != NULL && *tls->hostname != '\0' &&
|
if (tls->hostname[0] != '\0' &&
|
||||||
mg_tls_verify_cert_san(cert, certsz, tls->hostname) <= 0 &&
|
mg_tls_verify_cert_san(cert, certsz, tls->hostname) <= 0 &&
|
||||||
mg_tls_verify_cert_cn(&ci->subj, tls->hostname) <= 0) {
|
mg_tls_verify_cert_cn(&ci->subj, tls->hostname) <= 0) {
|
||||||
mg_error(c, "failed to verify hostname");
|
mg_error(c, "failed to verify hostname");
|
||||||
|
|||||||
Reference in new issue
Block a user