mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 02:59:01 +08:00
Fix #2685 - squash warnings in tls_builtin
This commit is contained in:
parent
9cccb9839b
commit
e6bf658271
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user