summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2017-03-04 16:32:01 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2017-03-04 16:32:01 +0000
commit72a219812a34423799fc5486fb88d0c7e6a775d0 (patch)
tree0f68f25566f042ed439be58fa69b883a153482fd
parentdea28b70502ec754d33a7cf8e3229a7efba8b2b6 (diff)
Drop the second argument of dtls1_set_message_header() and make it a void
function. Nothing makes use of the return value and the second argument was only used to produce the return value...
-rw-r--r--lib/libssl/d1_both.c10
-rw-r--r--lib/libssl/s3_lib.c6
-rw-r--r--lib/libssl/ssl_locl.h7
3 files changed, 10 insertions, 13 deletions
diff --git a/lib/libssl/d1_both.c b/lib/libssl/d1_both.c
index 9aba4b85f81..0b8999b7820 100644
--- a/lib/libssl/d1_both.c
+++ b/lib/libssl/d1_both.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: d1_both.c,v 1.49 2017/02/07 02:08:38 beck Exp $ */
+/* $OpenBSD: d1_both.c,v 1.50 2017/03/04 16:32:00 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -1167,9 +1167,9 @@ dtls1_clear_record_buffer(SSL *s)
}
}
-unsigned char *
-dtls1_set_message_header(SSL *s, unsigned char *p, unsigned char mt,
- unsigned long len, unsigned long frag_off, unsigned long frag_len)
+void
+dtls1_set_message_header(SSL *s, unsigned char mt, unsigned long len,
+ unsigned long frag_off, unsigned long frag_len)
{
/* Don't change sequence numbers while listening */
if (frag_off == 0 && !D1I(s)->listen) {
@@ -1179,8 +1179,6 @@ dtls1_set_message_header(SSL *s, unsigned char *p, unsigned char mt,
dtls1_set_message_header_int(s, mt, len, D1I(s)->handshake_write_seq,
frag_off, frag_len);
-
- return p += DTLS1_HM_HEADER_LENGTH;
}
/* don't actually do the writing, wait till the MTU has been retrieved */
diff --git a/lib/libssl/s3_lib.c b/lib/libssl/s3_lib.c
index d18a2388c34..3f09834ab11 100644
--- a/lib/libssl/s3_lib.c
+++ b/lib/libssl/s3_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_lib.c,v 1.135 2017/02/07 02:08:38 beck Exp $ */
+/* $OpenBSD: s3_lib.c,v 1.136 2017/03/04 16:32:00 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1722,7 +1722,7 @@ ssl3_handshake_msg_finish(SSL *s, unsigned int len)
s->internal->init_off = 0;
if (SSL_IS_DTLS(s)) {
- dtls1_set_message_header(s, d, msg_type, len, 0, len);
+ dtls1_set_message_header(s, msg_type, len, 0, len);
dtls1_buffer_message(s, 0);
}
}
@@ -1785,7 +1785,7 @@ ssl3_handshake_msg_finish_cbb(SSL *s, CBB *handshake)
len = outlen - ssl3_handshake_msg_hdr_len(s);
- dtls1_set_message_header(s, data, msg_type, len, 0, len);
+ dtls1_set_message_header(s, msg_type, len, 0, len);
dtls1_buffer_message(s, 0);
}
diff --git a/lib/libssl/ssl_locl.h b/lib/libssl/ssl_locl.h
index 59f6104391a..deabb58894d 100644
--- a/lib/libssl/ssl_locl.h
+++ b/lib/libssl/ssl_locl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_locl.h,v 1.175 2017/02/28 14:08:49 jsing Exp $ */
+/* $OpenBSD: ssl_locl.h,v 1.176 2017/03/04 16:32:00 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1186,9 +1186,8 @@ int ssl_server_legacy_first_packet(SSL *s);
int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek);
int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
unsigned int len);
-unsigned char *dtls1_set_message_header(SSL *s, unsigned char *p,
- unsigned char mt, unsigned long len, unsigned long frag_off,
- unsigned long frag_len);
+void dtls1_set_message_header(SSL *s, unsigned char mt, unsigned long len,
+ unsigned long frag_off, unsigned long frag_len);
int dtls1_write_app_data_bytes(SSL *s, int type, const void *buf, int len);
int dtls1_write_bytes(SSL *s, int type, const void *buf, int len);