summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2017-03-04 16:32:00 +0000
committerjsing <>2017-03-04 16:32:00 +0000
commitf577988189e230bde2109492b5e88f68be9e70aa (patch)
treec02fc89f7110067633e42d3d712773bce31ccaed
parent1f1afc6cbcd63106aed19c1803381ba73c23a55f (diff)
downloadopenbsd-f577988189e230bde2109492b5e88f68be9e70aa.tar.gz
openbsd-f577988189e230bde2109492b5e88f68be9e70aa.tar.bz2
openbsd-f577988189e230bde2109492b5e88f68be9e70aa.zip
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--src/lib/libssl/d1_both.c10
-rw-r--r--src/lib/libssl/s3_lib.c6
-rw-r--r--src/lib/libssl/ssl_locl.h7
3 files changed, 10 insertions, 13 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c
index 9aba4b85f8..0b8999b782 100644
--- a/src/lib/libssl/d1_both.c
+++ b/src/lib/libssl/d1_both.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_both.c,v 1.49 2017/02/07 02:08:38 beck Exp $ */ 1/* $OpenBSD: d1_both.c,v 1.50 2017/03/04 16:32:00 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.
@@ -1167,9 +1167,9 @@ dtls1_clear_record_buffer(SSL *s)
1167 } 1167 }
1168} 1168}
1169 1169
1170unsigned char * 1170void
1171dtls1_set_message_header(SSL *s, unsigned char *p, unsigned char mt, 1171dtls1_set_message_header(SSL *s, unsigned char mt, unsigned long len,
1172 unsigned long len, unsigned long frag_off, unsigned long frag_len) 1172 unsigned long frag_off, unsigned long frag_len)
1173{ 1173{
1174 /* Don't change sequence numbers while listening */ 1174 /* Don't change sequence numbers while listening */
1175 if (frag_off == 0 && !D1I(s)->listen) { 1175 if (frag_off == 0 && !D1I(s)->listen) {
@@ -1179,8 +1179,6 @@ dtls1_set_message_header(SSL *s, unsigned char *p, unsigned char mt,
1179 1179
1180 dtls1_set_message_header_int(s, mt, len, D1I(s)->handshake_write_seq, 1180 dtls1_set_message_header_int(s, mt, len, D1I(s)->handshake_write_seq,
1181 frag_off, frag_len); 1181 frag_off, frag_len);
1182
1183 return p += DTLS1_HM_HEADER_LENGTH;
1184} 1182}
1185 1183
1186/* don't actually do the writing, wait till the MTU has been retrieved */ 1184/* don't actually do the writing, wait till the MTU has been retrieved */
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c
index d18a2388c3..3f09834ab1 100644
--- a/src/lib/libssl/s3_lib.c
+++ b/src/lib/libssl/s3_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_lib.c,v 1.135 2017/02/07 02:08:38 beck Exp $ */ 1/* $OpenBSD: s3_lib.c,v 1.136 2017/03/04 16:32:00 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1722,7 +1722,7 @@ ssl3_handshake_msg_finish(SSL *s, unsigned int len)
1722 s->internal->init_off = 0; 1722 s->internal->init_off = 0;
1723 1723
1724 if (SSL_IS_DTLS(s)) { 1724 if (SSL_IS_DTLS(s)) {
1725 dtls1_set_message_header(s, d, msg_type, len, 0, len); 1725 dtls1_set_message_header(s, msg_type, len, 0, len);
1726 dtls1_buffer_message(s, 0); 1726 dtls1_buffer_message(s, 0);
1727 } 1727 }
1728} 1728}
@@ -1785,7 +1785,7 @@ ssl3_handshake_msg_finish_cbb(SSL *s, CBB *handshake)
1785 1785
1786 len = outlen - ssl3_handshake_msg_hdr_len(s); 1786 len = outlen - ssl3_handshake_msg_hdr_len(s);
1787 1787
1788 dtls1_set_message_header(s, data, msg_type, len, 0, len); 1788 dtls1_set_message_header(s, msg_type, len, 0, len);
1789 dtls1_buffer_message(s, 0); 1789 dtls1_buffer_message(s, 0);
1790 } 1790 }
1791 1791
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 59f6104391..deabb58894 100644
--- a/src/lib/libssl/ssl_locl.h
+++ b/src/lib/libssl/ssl_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_locl.h,v 1.175 2017/02/28 14:08:49 jsing Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.176 2017/03/04 16:32:00 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1186,9 +1186,8 @@ int ssl_server_legacy_first_packet(SSL *s);
1186int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek); 1186int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek);
1187int ssl3_write_pending(SSL *s, int type, const unsigned char *buf, 1187int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
1188 unsigned int len); 1188 unsigned int len);
1189unsigned char *dtls1_set_message_header(SSL *s, unsigned char *p, 1189void dtls1_set_message_header(SSL *s, unsigned char mt, unsigned long len,
1190 unsigned char mt, unsigned long len, unsigned long frag_off, 1190 unsigned long frag_off, unsigned long frag_len);
1191 unsigned long frag_len);
1192 1191
1193int dtls1_write_app_data_bytes(SSL *s, int type, const void *buf, int len); 1192int dtls1_write_app_data_bytes(SSL *s, int type, const void *buf, int len);
1194int dtls1_write_bytes(SSL *s, int type, const void *buf, int len); 1193int dtls1_write_bytes(SSL *s, int type, const void *buf, int len);