[openssh-commits] [openssh] 03/15: upstream: some clarifying comments

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Jun 26 15:26:06 AEST 2020


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

djm pushed a commit to branch master
in repository openssh.

commit 37f2da069c0619f2947fb92785051d82882876d7
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Mon Jun 22 23:44:27 2020 +0000

    upstream: some clarifying comments
    
    OpenBSD-Commit-ID: 5268479000fd97bfa30ab819f3517139daa054a2
---
 ssh-ecdsa-sk.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/ssh-ecdsa-sk.c b/ssh-ecdsa-sk.c
index 0004a73c..c6927ecb 100644
--- a/ssh-ecdsa-sk.c
+++ b/ssh-ecdsa-sk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-ecdsa-sk.c,v 1.7 2020/06/22 05:58:35 djm Exp $ */
+/* $OpenBSD: ssh-ecdsa-sk.c,v 1.8 2020/06/22 23:44:27 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2010 Damien Miller.  All rights reserved.
@@ -97,6 +97,13 @@ webauthn_check_prepare_hash(const u_char *data, size_t datalen,
 		r = SSH_ERR_INVALID_FORMAT;
 		goto out;
 	}
+
+	/*
+	 * Prepare the preamble to clientData that we expect, poking the
+	 * challenge and origin into their canonical positions in the
+	 * structure. The crossOrigin flag and any additional extension
+	 * fields present are ignored.
+	 */
 #define WEBAUTHN_0	"{\"type\":\"webauthn.get\",\"challenge\":\""
 #define WEBAUTHN_1	"\",\"origin\":\""
 #define WEBAUTHN_2	"\""
@@ -113,7 +120,7 @@ webauthn_check_prepare_hash(const u_char *data, size_t datalen,
 	fprintf(stderr, "%s: expected clientData premable:\n", __func__);
 	sshbuf_dump(m, stderr);
 #endif
-	/* Check that the supplied clientData matches what we expect */
+	/* Check that the supplied clientData has the preamble we expect */
 	if ((r = sshbuf_cmp(wrapper, 0, sshbuf_ptr(m), sshbuf_len(m))) != 0)
 		goto out;
 

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


More information about the openssh-commits mailing list