use new sha512 functions in keyfile_auth.c

Thu, 29 May 2025 15:18:48 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 29 May 2025 15:18:48 +0200
changeset 590
33ca0f9f276f
parent 589
70ad04769cbf
child 591
d703055a1af7

use new sha512 functions in keyfile_auth.c

src/server/daemon/keyfile_auth.c file | annotate | diff | comparison | revisions
--- a/src/server/daemon/keyfile_auth.c	Thu May 29 15:17:01 2025 +0200
+++ b/src/server/daemon/keyfile_auth.c	Thu May 29 15:18:48 2025 +0200
@@ -164,11 +164,11 @@
             break;
         }
         case KEYFILE_SSHA512: {
-            SHA512_CTX ctx;
-            SHA512_Init(&ctx);
-            SHA512_Update(&ctx, password, pwlen);
-            SHA512_Update(&ctx, salt, saltlen);
-            SHA512_Final(pwhash, &ctx);
+            WS_SHA512_CTX ctx;
+            ws_sha512_init(&ctx);
+            ws_sha512_update(&ctx, password, pwlen);
+            ws_sha512_update(&ctx, salt, saltlen);
+            ws_sha512_final(&ctx, pwhash);
             break;
         }
     }

mercurial