summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_clnt.c
diff options
context:
space:
mode:
authortb <>2022-06-07 17:45:13 +0000
committertb <>2022-06-07 17:45:13 +0000
commit347d0c878cbedc3cac51abde823c8d2af386febd (patch)
tree290d1e3ce35abdeea2f4a92199cf1ca57bfa40ca /src/lib/libssl/ssl_clnt.c
parent83952f0892e547823508daa0dd480b99895b9fc8 (diff)
downloadopenbsd-347d0c878cbedc3cac51abde823c8d2af386febd.tar.gz
openbsd-347d0c878cbedc3cac51abde823c8d2af386febd.tar.bz2
openbsd-347d0c878cbedc3cac51abde823c8d2af386febd.zip
Simplify various CBS_write_bytes() calls
Now that session_id_length is a size_t, we can pass it directly to CBS_write_bytes() instead of using a temporary variable. ok jsing
Diffstat (limited to 'src/lib/libssl/ssl_clnt.c')
-rw-r--r--src/lib/libssl/ssl_clnt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libssl/ssl_clnt.c b/src/lib/libssl/ssl_clnt.c
index f8a80eea2e..c509771cc3 100644
--- a/src/lib/libssl/ssl_clnt.c
+++ b/src/lib/libssl/ssl_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_clnt.c,v 1.145 2022/06/07 17:39:16 tb Exp $ */ 1/* $OpenBSD: ssl_clnt.c,v 1.146 2022/06/07 17:45:13 tb 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 *
@@ -815,7 +815,6 @@ ssl3_get_server_hello(SSL *s)
815 const SSL_CIPHER *cipher; 815 const SSL_CIPHER *cipher;
816 const SSL_METHOD *method; 816 const SSL_METHOD *method;
817 unsigned long alg_k; 817 unsigned long alg_k;
818 size_t outlen;
819 int al, ret; 818 int al, ret;
820 819
821 s->internal->first_packet = 1; 820 s->internal->first_packet = 1;
@@ -975,9 +974,9 @@ ssl3_get_server_hello(SSL *s)
975 * zero length session identifier. 974 * zero length session identifier.
976 */ 975 */
977 if (!CBS_write_bytes(&session_id, s->session->session_id, 976 if (!CBS_write_bytes(&session_id, s->session->session_id,
978 sizeof(s->session->session_id), &outlen)) 977 sizeof(s->session->session_id),
978 &s->session->session_id_length))
979 goto err; 979 goto err;
980 s->session->session_id_length = outlen;
981 980
982 s->session->ssl_version = s->version; 981 s->session->ssl_version = s->version;
983 } 982 }