From 10990a7dbe232a2965f8ede23851b8fe67233b77 Mon Sep 17 00:00:00 2001 From: jsing Date: Thu, 21 Jan 2021 18:48:56 +0000 Subject: [PATCH] Mop up unused dtls1_build_sequence_number() function. --- lib/libssl/d1_lib.c | 23 +---------------------- lib/libssl/ssl_locl.h | 4 +--- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/lib/libssl/d1_lib.c b/lib/libssl/d1_lib.c index b4ce2c0722d..4d406271af4 100644 --- a/lib/libssl/d1_lib.c +++ b/lib/libssl/d1_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_lib.c,v 1.51 2020/10/03 17:54:27 jsing Exp $ */ +/* $OpenBSD: d1_lib.c,v 1.52 2021/01/21 18:48:56 jsing Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -423,24 +423,3 @@ dtls1_listen(SSL *s, struct sockaddr *client) (void)BIO_dgram_get_peer(SSL_get_rbio(s), client); return 1; } - -void -dtls1_build_sequence_number(unsigned char *dst, unsigned char *seq, - unsigned short epoch) -{ - CBB cbb; - - if (!CBB_init_fixed(&cbb, dst, SSL3_SEQUENCE_SIZE)) - goto err; - if (!CBB_add_u16(&cbb, epoch)) - goto err; - if (!CBB_add_bytes(&cbb, &seq[2], SSL3_SEQUENCE_SIZE - 2)) - goto err; - if (!CBB_finish(&cbb, NULL, NULL)) - goto err; - - return; - - err: - CBB_cleanup(&cbb); -} diff --git a/lib/libssl/ssl_locl.h b/lib/libssl/ssl_locl.h index 5a3e3ff7260..01f2ebbab1c 100644 --- a/lib/libssl/ssl_locl.h +++ b/lib/libssl/ssl_locl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_locl.h,v 1.315 2021/01/19 19:07:39 jsing Exp $ */ +/* $OpenBSD: ssl_locl.h,v 1.316 2021/01/21 18:48:57 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1276,8 +1276,6 @@ int dtls1_get_message_header(unsigned char *data, struct hm_header_st *msg_hdr); void dtls1_get_ccs_header(unsigned char *data, struct ccs_header_st *ccs_hdr); void dtls1_reset_seq_numbers(SSL *s, int rw); -void dtls1_build_sequence_number(unsigned char *dst, unsigned char *seq, - unsigned short epoch); struct timeval* dtls1_get_timeout(SSL *s, struct timeval* timeleft); int dtls1_check_timeout_num(SSL *s); int dtls1_handle_timeout(SSL *s); -- 2.20.1