summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2022-03-17 17:22:16 +0000
committerjsing <>2022-03-17 17:22:16 +0000
commitb05e2fdda8cb3d474091e2b6308d2a5f65f4fd26 (patch)
treec760e60ce7c2c61c561119021d231f42af71229c
parentea581e0232e3466c6e3f461f4c999d8c6cac5a85 (diff)
downloadopenbsd-b05e2fdda8cb3d474091e2b6308d2a5f65f4fd26.tar.gz
openbsd-b05e2fdda8cb3d474091e2b6308d2a5f65f4fd26.tar.bz2
openbsd-b05e2fdda8cb3d474091e2b6308d2a5f65f4fd26.zip
Remove const from tls1_transcript_hash_value()
This function populates the passed *out argument, hence it should not be marked const. ok tb@
-rw-r--r--src/lib/libssl/ssl_locl.h4
-rw-r--r--src/lib/libssl/ssl_transcript.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 8a2f69f840..f0c261b488 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.387 2022/03/12 12:53:03 jsing Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.388 2022/03/17 17:22:16 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 *
@@ -1434,7 +1434,7 @@ void ssl_free_wbio_buffer(SSL *s);
1434 1434
1435int tls1_transcript_hash_init(SSL *s); 1435int tls1_transcript_hash_init(SSL *s);
1436int tls1_transcript_hash_update(SSL *s, const unsigned char *buf, size_t len); 1436int tls1_transcript_hash_update(SSL *s, const unsigned char *buf, size_t len);
1437int tls1_transcript_hash_value(SSL *s, const unsigned char *out, size_t len, 1437int tls1_transcript_hash_value(SSL *s, unsigned char *out, size_t len,
1438 size_t *outlen); 1438 size_t *outlen);
1439void tls1_transcript_hash_free(SSL *s); 1439void tls1_transcript_hash_free(SSL *s);
1440 1440
diff --git a/src/lib/libssl/ssl_transcript.c b/src/lib/libssl/ssl_transcript.c
index c54cdb22cb..d0af8e6942 100644
--- a/src/lib/libssl/ssl_transcript.c
+++ b/src/lib/libssl/ssl_transcript.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_transcript.c,v 1.6 2022/02/05 14:54:10 jsing Exp $ */ 1/* $OpenBSD: ssl_transcript.c,v 1.7 2022/03/17 17:22:16 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2017 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -69,7 +69,7 @@ tls1_transcript_hash_update(SSL *s, const unsigned char *buf, size_t len)
69} 69}
70 70
71int 71int
72tls1_transcript_hash_value(SSL *s, const unsigned char *out, size_t len, 72tls1_transcript_hash_value(SSL *s, unsigned char *out, size_t len,
73 size_t *outlen) 73 size_t *outlen)
74{ 74{
75 EVP_MD_CTX *mdctx = NULL; 75 EVP_MD_CTX *mdctx = NULL;
@@ -90,7 +90,7 @@ tls1_transcript_hash_value(SSL *s, const unsigned char *out, size_t len,
90 SSLerror(s, ERR_R_EVP_LIB); 90 SSLerror(s, ERR_R_EVP_LIB);
91 goto err; 91 goto err;
92 } 92 }
93 if (!EVP_DigestFinal_ex(mdctx, (unsigned char *)out, &mdlen)) { 93 if (!EVP_DigestFinal_ex(mdctx, out, &mdlen)) {
94 SSLerror(s, ERR_R_EVP_LIB); 94 SSLerror(s, ERR_R_EVP_LIB);
95 goto err; 95 goto err;
96 } 96 }