From cda6b703aeead5e09b252d341d066f8442d3ab0c Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Thu, 17 Mar 2022 17:22:17 +0000 Subject: Remove const from tls1_transcript_hash_value() This function populates the passed *out argument, hence it should not be marked const. ok tb@ --- lib/libssl/ssl_locl.h | 4 ++-- lib/libssl/ssl_transcript.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/libssl/ssl_locl.h b/lib/libssl/ssl_locl.h index 8a2f69f8406..f0c261b488c 100644 --- a/lib/libssl/ssl_locl.h +++ b/lib/libssl/ssl_locl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_locl.h,v 1.387 2022/03/12 12:53:03 jsing Exp $ */ +/* $OpenBSD: ssl_locl.h,v 1.388 2022/03/17 17:22:16 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1434,7 +1434,7 @@ void ssl_free_wbio_buffer(SSL *s); int tls1_transcript_hash_init(SSL *s); int tls1_transcript_hash_update(SSL *s, const unsigned char *buf, size_t len); -int tls1_transcript_hash_value(SSL *s, const unsigned char *out, size_t len, +int tls1_transcript_hash_value(SSL *s, unsigned char *out, size_t len, size_t *outlen); void tls1_transcript_hash_free(SSL *s); diff --git a/lib/libssl/ssl_transcript.c b/lib/libssl/ssl_transcript.c index c54cdb22cb2..d0af8e6942e 100644 --- a/lib/libssl/ssl_transcript.c +++ b/lib/libssl/ssl_transcript.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_transcript.c,v 1.6 2022/02/05 14:54:10 jsing Exp $ */ +/* $OpenBSD: ssl_transcript.c,v 1.7 2022/03/17 17:22:16 jsing Exp $ */ /* * Copyright (c) 2017 Joel Sing * @@ -69,7 +69,7 @@ tls1_transcript_hash_update(SSL *s, const unsigned char *buf, size_t len) } int -tls1_transcript_hash_value(SSL *s, const unsigned char *out, size_t len, +tls1_transcript_hash_value(SSL *s, unsigned char *out, size_t len, size_t *outlen) { EVP_MD_CTX *mdctx = NULL; @@ -90,7 +90,7 @@ tls1_transcript_hash_value(SSL *s, const unsigned char *out, size_t len, SSLerror(s, ERR_R_EVP_LIB); goto err; } - if (!EVP_DigestFinal_ex(mdctx, (unsigned char *)out, &mdlen)) { + if (!EVP_DigestFinal_ex(mdctx, out, &mdlen)) { SSLerror(s, ERR_R_EVP_LIB); goto err; } -- cgit v1.2.3