Fix #2685 - squash warnings in tls_builtin

This commit is contained in:
Sergey Lyubka committed 2024-04-17 07:32:51 +01:00
1 parent 9cccb9839b
commit e6bf658271
2 files changed
+6 -6

No files matched your search

+3 -3
View File
@@ -10326,7 +10326,7 @@ static int mg_tls_client_recv_cert(struct mg_connection *c) {
return -1;
}
if (mg_der_to_tlv(oid.value + oid.len,
(size_t) (cert + certsz - oid.value - oid.len),
(size_t) (cert + certsz - (oid.value + oid.len)),
&pubkey) < 0) {
mg_error(c, "certificate secp256r1 public key not found");
return -1;
@@ -10348,7 +10348,7 @@ static int mg_tls_client_recv_cert(struct mg_connection *c) {
return -1;
}
if (mg_der_to_tlv(oid.value + oid.len,
(size_t) (cert + certsz - oid.value - oid.len),
(size_t) (cert + certsz - (oid.value + oid.len)),
&seq) < 0) {
mg_error(c, "certificate subject alternative names not found");
return -1;
@@ -10371,7 +10371,7 @@ static int mg_tls_client_recv_cert(struct mg_connection *c) {
subj_match = 1;
break;
}
seq.len = (uint32_t) (seq.len - (subj.value + subj.len - seq.value));
seq.len = (uint32_t) (seq.value + seq.len - (subj.value + subj.len));
seq.value = subj.value + subj.len;
}
if (!subj_match) {
+3 -3
View File
@@ -1005,7 +1005,7 @@ static int mg_tls_client_recv_cert(struct mg_connection *c) {
return -1;
}
if (mg_der_to_tlv(oid.value + oid.len,
(size_t) (cert + certsz - oid.value - oid.len),
(size_t) (cert + certsz - (oid.value + oid.len)),
&pubkey) < 0) {
mg_error(c, "certificate secp256r1 public key not found");
return -1;
@@ -1027,7 +1027,7 @@ static int mg_tls_client_recv_cert(struct mg_connection *c) {
return -1;
}
if (mg_der_to_tlv(oid.value + oid.len,
(size_t) (cert + certsz - oid.value - oid.len),
(size_t) (cert + certsz - (oid.value + oid.len)),
&seq) < 0) {
mg_error(c, "certificate subject alternative names not found");
return -1;
@@ -1050,7 +1050,7 @@ static int mg_tls_client_recv_cert(struct mg_connection *c) {
subj_match = 1;
break;
}
seq.len = (uint32_t) (seq.len - (subj.value + subj.len - seq.value));
seq.len = (uint32_t) (seq.value + seq.len - (subj.value + subj.len));
seq.value = subj.value + subj.len;
}
if (!subj_match) {