diff options
author | jsing <> | 2021-01-13 18:20:54 +0000 |
---|---|---|
committer | jsing <> | 2021-01-13 18:20:54 +0000 |
commit | 9a0dba9f6be22dea02c323e4d3a7d4a5dde36ea4 (patch) | |
tree | 65b71b1e9d3928028351a0aee3a2d427b47d8dff /src/lib/libssl/d1_pkt.c | |
parent | 4f375cd7c6652350830e386787ddf80aedd74b45 (diff) | |
download | openbsd-9a0dba9f6be22dea02c323e4d3a7d4a5dde36ea4.tar.gz openbsd-9a0dba9f6be22dea02c323e4d3a7d4a5dde36ea4.tar.bz2 openbsd-9a0dba9f6be22dea02c323e4d3a7d4a5dde36ea4.zip |
Clean up sequence number handing in the new TLSv1.2 record layer.
Handle protocol specific (DTLS vs TLS) sequence number differences in the
open/seal record functions and propagate the sequence number through to
the called functions. This means that DTLS specific knowledge is limited
to two functions and also avoids building sequence numbers multiple times
over. As a result, the DTLS explicit sequence number is now extracted from
the record header and passed through for processing, which makes the read
epoch handling redundant.
ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/d1_pkt.c')
-rw-r--r-- | src/lib/libssl/d1_pkt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index 30ce78414d..4c450d2cb9 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_pkt.c,v 1.85 2020/10/03 17:35:16 jsing Exp $ */ | 1 | /* $OpenBSD: d1_pkt.c,v 1.86 2021/01/13 18:20:54 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -316,7 +316,6 @@ dtls1_process_record(SSL *s) | |||
316 | size_t out_len; | 316 | size_t out_len; |
317 | 317 | ||
318 | tls12_record_layer_set_version(s->internal->rl, s->version); | 318 | tls12_record_layer_set_version(s->internal->rl, s->version); |
319 | tls12_record_layer_set_read_epoch(s->internal->rl, rr->epoch); | ||
320 | 319 | ||
321 | if (!tls12_record_layer_open_record(s->internal->rl, s->internal->packet, | 320 | if (!tls12_record_layer_open_record(s->internal->rl, s->internal->packet, |
322 | s->internal->packet_length, &out, &out_len)) { | 321 | s->internal->packet_length, &out, &out_len)) { |