Extensions
gmusjha opened this issue · 0 comments
Greetings,
First of all, what I am asking is not an issue, but seeking suggestions and advice.
I am a student and currently working on a project to extend TLS to use the raw public key or different types of certificates (implicit certificate) following RFC 7250. The first step is to extend client_hello and server_hello messages.
I started to look at code starting from "main" in cli.c and reached send_client_hello. I do see several PTLS_EXTENSION_TYPE. I have two questions:
- To implement a new extension, I probably need to write an extension on the client end, and server-end i.e., send_client_hello and server_hello. Am I right in my conclusion?
I see several variations of this code. Any explanation will be appreciated.
buffer_push_extension(sendbuf, PTLS_EXTENSION_TYPE_PRE_SHARED_KEY, {
ptls_buffer_push_block(sendbuf, 2, {
ptls_buffer_push_block(sendbuf, 2,
{ ptls_buffer_pushv(sendbuf, resumption_ticket.base, resumption_ticket.len); });
ptls_buffer_push32(sendbuf, obfuscated_ticket_age);
});