diff options
author | Colin Watson <cjwatson@debian.org> | 2019-06-05 06:41:44 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-06-05 06:41:44 +0100 |
commit | 102062f825fb26a74295a1c089c00c4c4c76b68a (patch) | |
tree | 3db66bc8c8483cce66516dff36f6ef56065143d9 /ssh-ecdsa.c | |
parent | 3d246f10429fc9a37b98eabef94fe8dc7c61002b (diff) | |
parent | fd0fa130ecf06d7d092932adcd5d77f1549bfc8d (diff) |
Import openssh_8.0p1.orig.tar.gz
Diffstat (limited to 'ssh-ecdsa.c')
-rw-r--r-- | ssh-ecdsa.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ssh-ecdsa.c b/ssh-ecdsa.c index 2f5531752..599c7199d 100644 --- a/ssh-ecdsa.c +++ b/ssh-ecdsa.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-ecdsa.c,v 1.14 2018/02/07 02:06:51 jsing Exp $ */ | 1 | /* $OpenBSD: ssh-ecdsa.c,v 1.16 2019/01/21 09:54:11 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. |
@@ -151,15 +151,13 @@ ssh_ecdsa_verify(const struct sshkey *key, | |||
151 | } | 151 | } |
152 | 152 | ||
153 | /* parse signature */ | 153 | /* parse signature */ |
154 | if ((sig = ECDSA_SIG_new()) == NULL || | 154 | if (sshbuf_get_bignum2(sigbuf, &sig_r) != 0 || |
155 | (sig_r = BN_new()) == NULL || | 155 | sshbuf_get_bignum2(sigbuf, &sig_s) != 0) { |
156 | (sig_s = BN_new()) == NULL) { | 156 | ret = SSH_ERR_INVALID_FORMAT; |
157 | ret = SSH_ERR_ALLOC_FAIL; | ||
158 | goto out; | 157 | goto out; |
159 | } | 158 | } |
160 | if (sshbuf_get_bignum2(sigbuf, sig_r) != 0 || | 159 | if ((sig = ECDSA_SIG_new()) == NULL) { |
161 | sshbuf_get_bignum2(sigbuf, sig_s) != 0) { | 160 | ret = SSH_ERR_ALLOC_FAIL; |
162 | ret = SSH_ERR_INVALID_FORMAT; | ||
163 | goto out; | 161 | goto out; |
164 | } | 162 | } |
165 | if (!ECDSA_SIG_set0(sig, sig_r, sig_s)) { | 163 | if (!ECDSA_SIG_set0(sig, sig_r, sig_s)) { |