From 7c24ca9e7f459300ae2b49a59dbd5dbd1ab79a36 Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 7 Jun 2022 17:31:36 +0000 Subject: [PATCH] Add a cast to SSL_SESSION_get_id() to indicate that session_id_length is deliberately reduced to an unsigned int. Since the session_id is at most 32 bytes, this is not a concern. ok jsing --- lib/libssl/ssl_sess.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libssl/ssl_sess.c b/lib/libssl/ssl_sess.c index 92dc6d4abf6..af1fd3c8bfa 100644 --- a/lib/libssl/ssl_sess.c +++ b/lib/libssl/ssl_sess.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_sess.c,v 1.112 2022/06/07 17:28:05 tb Exp $ */ +/* $OpenBSD: ssl_sess.c,v 1.113 2022/06/07 17:31:36 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -244,7 +244,7 @@ const unsigned char * SSL_SESSION_get_id(const SSL_SESSION *ss, unsigned int *len) { if (len != NULL) - *len = ss->session_id_length; + *len = (unsigned int)ss->session_id_length; return ss->session_id; } -- 2.20.1