summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/x509/callback.c
diff options
context:
space:
mode:
authorjsing <>2021-08-31 13:34:55 +0000
committerjsing <>2021-08-31 13:34:55 +0000
commitf55a628b1a5faa0be72079bd24a247266121aa8b (patch)
treebc775bda4a2e85eae7ab9c598739564c29bfa447 /src/regress/lib/libcrypto/x509/callback.c
parente6a921b7782b387c57ef5fd5205ee66276665998 (diff)
downloadopenbsd-f55a628b1a5faa0be72079bd24a247266121aa8b.tar.gz
openbsd-f55a628b1a5faa0be72079bd24a247266121aa8b.tar.bz2
openbsd-f55a628b1a5faa0be72079bd24a247266121aa8b.zip
Defragment DTLS.
In normal TLS, it is possible for record fragments to be sent that contain one byte of alert or handshake message payload. In this case we have to read and collate multiple message fragments before we can decide what to do with the record. However, in the case of DTLS, one record is effectively one packet and while it is possible to send handshake messages across multiple records/packets, the minimum payload is the DTLS handshake message header (plus one byte of data if the handshake message has a payload) - without this, there is insufficient information available to be able to reassemble the handshake message. Likewise, splitting an alert across multiple DTLS records simply does not work, as we have no way of knowing if we're collating the same alert or two different alerts that we lost half of each from (unfortunately, these details are not really specified in the DTLS RFC). This means that for DTLS we can expect to receive a full alert message (a whole two bytes) or a handshake record with at least the handshake message header (12 bytes). If we receive messages with less than these lengths we discard them and carry on (which is what the DTLS code already does). Remove all of the pointless fragment handling code from DTLS, while also fixing an issue where one case used rr->data instead of the handshake fragment. ok inoguchi@ tb@
Diffstat (limited to 'src/regress/lib/libcrypto/x509/callback.c')
0 files changed, 0 insertions, 0 deletions