diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2022-03-17 17:22:17 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2022-03-17 17:22:17 +0000 |
commit | cda6b703aeead5e09b252d341d066f8442d3ab0c (patch) | |
tree | 52def443a434d836270ca7c415bd8c1cc85b5b2d /lib | |
parent | 4f9777e801098daf681b338d7d96740b4b059333 (diff) |
Remove const from tls1_transcript_hash_value()
This function populates the passed *out argument, hence it should not be
marked const.
ok tb@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/ssl_locl.h | 4 | ||||
-rw-r--r-- | lib/libssl/ssl_transcript.c | 6 |
2 files changed, 5 insertions, 5 deletions
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 <jsing@openbsd.org> * @@ -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; } |