diff options
author | jsing <> | 2020-03-13 16:40:42 +0000 |
---|---|---|
committer | jsing <> | 2020-03-13 16:40:42 +0000 |
commit | 392ee6d491e597c1f18e21334e3cb7998133074e (patch) | |
tree | 58f87656681e6786b7b16935eb8b009442a64c49 /src/lib/libssl/d1_pkt.c | |
parent | e4aa84e84fe680f7d36c8937f3d398c2e44b9d6e (diff) | |
download | openbsd-392ee6d491e597c1f18e21334e3cb7998133074e.tar.gz openbsd-392ee6d491e597c1f18e21334e3cb7998133074e.tar.bz2 openbsd-392ee6d491e597c1f18e21334e3cb7998133074e.zip |
Remove dtls1_enc().
Like much of the original DTLS code, dtls1_enc() is effectively a renamed
copy of tls1_enc(). Since then tls1_enc() has been modified, however the
non-AEAD code remains largely the same. As such, remove dtls1_enc() and
instead call tls1_enc() from the DTLS code.
The tls1_enc() AEAD code does not currently work correctly with DTLS,
however this is a non-issue since we do not support AEAD cipher suites with
DTLS currently.
ok tb@
Diffstat (limited to 'src/lib/libssl/d1_pkt.c')
-rw-r--r-- | src/lib/libssl/d1_pkt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index 524cfc3351..36090533aa 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.72 2020/03/12 17:09:02 jsing Exp $ */ | 1 | /* $OpenBSD: d1_pkt.c,v 1.73 2020/03/13 16:40:42 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. |
@@ -364,7 +364,7 @@ dtls1_process_record(SSL *s) | |||
364 | * 0: (in non-constant time) if the record is publically invalid. | 364 | * 0: (in non-constant time) if the record is publically invalid. |
365 | * 1: if the padding is valid | 365 | * 1: if the padding is valid |
366 | * -1: if the padding is invalid */ | 366 | * -1: if the padding is invalid */ |
367 | if ((enc_err = dtls1_enc(s, 0)) == 0) { | 367 | if ((enc_err = tls1_enc(s, 0)) == 0) { |
368 | /* For DTLS we simply ignore bad packets. */ | 368 | /* For DTLS we simply ignore bad packets. */ |
369 | rr->length = 0; | 369 | rr->length = 0; |
370 | s->internal->packet_length = 0; | 370 | s->internal->packet_length = 0; |
@@ -1282,8 +1282,8 @@ do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len) | |||
1282 | wr->length += bs; | 1282 | wr->length += bs; |
1283 | } | 1283 | } |
1284 | 1284 | ||
1285 | /* dtls1_enc can only have an error on read */ | 1285 | /* tls1_enc can only have an error on read */ |
1286 | dtls1_enc(s, 1); | 1286 | tls1_enc(s, 1); |
1287 | 1287 | ||
1288 | if (!CBB_add_u16(&cbb, wr->length)) | 1288 | if (!CBB_add_u16(&cbb, wr->length)) |
1289 | goto err; | 1289 | goto err; |