-/* $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.
(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);
-}
-/* $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.
*
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);