[openssh-commits] [openssh] 01/01: upstream: unbreak FIDO sk-ed25519 key enrollment for OPENSSL=no builds;

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Oct 1 14:53:33 AEST 2021


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit bb754b470c360e787a99fb4e88e2668198e97b41
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri Oct 1 04:50:36 2021 +0000

    upstream: unbreak FIDO sk-ed25519 key enrollment for OPENSSL=no builds;
    
    ok dtucker@
    
    OpenBSD-Commit-ID: 6323a5241728626cbb2bf0452cf6a5bcbd7ff709
---
 sk-usbhid.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sk-usbhid.c b/sk-usbhid.c
index 43898088..2fdf3d94 100644
--- a/sk-usbhid.c
+++ b/sk-usbhid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sk-usbhid.c,v 1.30 2021/05/31 06:48:42 djm Exp $ */
+/* $OpenBSD: sk-usbhid.c,v 1.31 2021/10/01 04:50:36 djm Exp $ */
 /*
  * Copyright (c) 2019 Markus Friedl
  * Copyright (c) 2020 Pedro Martelletto
@@ -306,6 +306,8 @@ sha256_mem(const void *m, size_t mlen, u_char *d, size_t dlen)
 {
 #ifdef WITH_OPENSSL
 	u_int mdlen;
+#else
+	SHA2_CTX ctx;
 #endif
 
 	if (dlen != 32)
@@ -315,7 +317,9 @@ sha256_mem(const void *m, size_t mlen, u_char *d, size_t dlen)
 	if (!EVP_Digest(m, mlen, d, &mdlen, EVP_sha256(), NULL))
 		return -1;
 #else
-	SHA256Data(m, mlen, d);
+	SHA256Init(&ctx);
+	SHA256Update(&ctx, (const uint8_t *)m, mlen);
+	SHA256Final(d, &ctx);
 #endif
 	return 0;
 }

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list