From 392ee6d491e597c1f18e21334e3cb7998133074e Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 13 Mar 2020 16:40:42 +0000 Subject: 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@ --- src/lib/libssl/d1_pkt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/libssl/d1_pkt.c') 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 @@ -/* $OpenBSD: d1_pkt.c,v 1.72 2020/03/12 17:09:02 jsing Exp $ */ +/* $OpenBSD: d1_pkt.c,v 1.73 2020/03/13 16:40:42 jsing Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -364,7 +364,7 @@ dtls1_process_record(SSL *s) * 0: (in non-constant time) if the record is publically invalid. * 1: if the padding is valid * -1: if the padding is invalid */ - if ((enc_err = dtls1_enc(s, 0)) == 0) { + if ((enc_err = tls1_enc(s, 0)) == 0) { /* For DTLS we simply ignore bad packets. */ rr->length = 0; s->internal->packet_length = 0; @@ -1282,8 +1282,8 @@ do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len) wr->length += bs; } - /* dtls1_enc can only have an error on read */ - dtls1_enc(s, 1); + /* tls1_enc can only have an error on read */ + tls1_enc(s, 1); if (!CBB_add_u16(&cbb, wr->length)) goto err; -- cgit v1.2.3-55-g6feb