summaryrefslogtreecommitdiff
path: root/ssh-ecdsa-sk.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-ecdsa-sk.c')
-rw-r--r--ssh-ecdsa-sk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ssh-ecdsa-sk.c b/ssh-ecdsa-sk.c
index 355924657..7bdecd584 100644
--- a/ssh-ecdsa-sk.c
+++ b/ssh-ecdsa-sk.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-ecdsa-sk.c,v 1.1 2019/10/31 21:15:14 djm Exp $ */ 1/* $OpenBSD: ssh-ecdsa-sk.c,v 1.2 2019/11/19 22:23:19 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2010 Damien Miller. All rights reserved. 4 * Copyright (c) 2010 Damien Miller. All rights reserved.
@@ -77,7 +77,9 @@ ssh_ecdsa_sk_verify(const struct sshkey *key,
77 if ((b = sshbuf_from(signature, signaturelen)) == NULL) 77 if ((b = sshbuf_from(signature, signaturelen)) == NULL)
78 return SSH_ERR_ALLOC_FAIL; 78 return SSH_ERR_ALLOC_FAIL;
79 if (sshbuf_get_cstring(b, &ktype, NULL) != 0 || 79 if (sshbuf_get_cstring(b, &ktype, NULL) != 0 ||
80 sshbuf_froms(b, &sigbuf) != 0) { 80 sshbuf_froms(b, &sigbuf) != 0 ||
81 sshbuf_get_u8(b, &sig_flags) != 0 ||
82 sshbuf_get_u32(b, &sig_counter) != 0) {
81 ret = SSH_ERR_INVALID_FORMAT; 83 ret = SSH_ERR_INVALID_FORMAT;
82 goto out; 84 goto out;
83 } 85 }
@@ -92,9 +94,7 @@ ssh_ecdsa_sk_verify(const struct sshkey *key,
92 94
93 /* parse signature */ 95 /* parse signature */
94 if (sshbuf_get_bignum2(sigbuf, &sig_r) != 0 || 96 if (sshbuf_get_bignum2(sigbuf, &sig_r) != 0 ||
95 sshbuf_get_bignum2(sigbuf, &sig_s) != 0 || 97 sshbuf_get_bignum2(sigbuf, &sig_s) != 0) {
96 sshbuf_get_u8(sigbuf, &sig_flags) != 0 ||
97 sshbuf_get_u32(sigbuf, &sig_counter) != 0) {
98 ret = SSH_ERR_INVALID_FORMAT; 98 ret = SSH_ERR_INVALID_FORMAT;
99 goto out; 99 goto out;
100 } 100 }