Add basic DTLSv1.3 support

DTLSv1.3 changes the DTLS record format, introducing a completely new
header - which is a first for DTLS.

We don't currently completely parse this header, as this requires a bit
more statekeeping. This will be added in a future revision. This also
also has little practical implications.
This commit is contained in:
Johanna Amann 2023-05-03 16:15:47 +01:00
parent e7c9fa1f6e
commit d6c4c510ea
7 changed files with 88 additions and 5 deletions

View file

@ -11,6 +11,7 @@ export {
const DTLSv10 = 0xFEFF;
# DTLSv11 does not exist
const DTLSv12 = 0xFEFD;
const DTLSv13 = 0xFEFC;
## Mapping between the constants and string values for SSL/TLS versions.
const version_strings: table[count] of string = {
@ -21,7 +22,8 @@ export {
[TLSv12] = "TLSv12",
[TLSv13] = "TLSv13",
[DTLSv10] = "DTLSv10",
[DTLSv12] = "DTLSv12"
[DTLSv12] = "DTLSv12",
[DTLSv13] = "DTLSv13"
} &default=function(i: count):string
{
if ( i/0xFF == 0x7F ) # TLS 1.3 draft