Update TLS 1.3 handshake

Working on HelloRetryRequest, NewSessionTicket
This commit is contained in:
Zhi Guan
2026-03-21 18:41:46 +08:00
parent ead4caecb7
commit 0d1acec6df
7 changed files with 2106 additions and 1163 deletions

View File

@@ -1594,6 +1594,36 @@ int x509_cert_get_exts(const uint8_t *a, size_t alen, const uint8_t **d, size_t
return 1;
}
int x509_cert_get_signature_algor(const uint8_t *a, size_t alen, int *oid)
{
int inner_alg;
int outer_alg;
if (x509_cert_get_details(a, alen,
NULL, // version
NULL, NULL, // serial
&inner_alg, // signature_algor
NULL, NULL, // issuer
NULL, NULL, // validity
NULL, NULL, // subject
NULL, // subject_public_key
NULL, NULL, // issuer_unique_id
NULL, NULL, // subject_unique_id
NULL, NULL, // extensions
&outer_alg, // signature_algor
NULL, NULL // signature
) != 1) {
error_print();
return -1;
}
if (inner_alg != outer_alg) {
error_print();
return -1;
}
*oid = inner_alg;
return 1;
}
int x509_certs_to_pem(const uint8_t *d, size_t dlen, FILE *fp)
{
const uint8_t *a;