fix openssl < 3.0 hash init functions

Sun, 01 Jun 2025 21:53:40 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 01 Jun 2025 21:53:40 +0200
changeset 606
a6db0f83fa15
parent 605
07074daff678
child 607
e8ff9036462e

fix openssl < 3.0 hash init functions

src/server/util/hashing.c file | annotate | diff | comparison | revisions
--- a/src/server/util/hashing.c	Sun Jun 01 21:52:14 2025 +0200
+++ b/src/server/util/hashing.c	Sun Jun 01 21:53:40 2025 +0200
@@ -70,7 +70,7 @@
 
 #if OPENSSL_VERSION_NUMBER < 0x30000000L
 
-void ws_sha1_init(WS_SHA1_CTX *ctx) {
+int ws_sha1_init(WS_SHA1_CTX *ctx) {
     SHA_Init(ctx);
     return 0;
 }
@@ -83,7 +83,7 @@
     SHA_Final(md, ctx);
 }
 
-void ws_sha256_init(WS_SHA256_CTX *ctx) {
+int ws_sha256_init(WS_SHA256_CTX *ctx) {
     SHA_Init(ctx);
     return 0;
 }
@@ -96,7 +96,7 @@
     SHA_Final(md, ctx);
 }
 
-void ws_sha512_init(WS_SHA512_CTX *ctx) {
+int ws_sha512_init(WS_SHA512_CTX *ctx) {
     SHA512_Init(ctx);
     return 0;
 }

mercurial