diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-10-02 08:07:13 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-10-02 18:08:17 +1000 |
commit | b5a89eec410967d6b712665f8cf0cb632928d74b (patch) | |
tree | 26eff33aafb372bc0d891f635c0dc8b76fefe761 /sshsig.c | |
parent | dc6f81ee94995deb11bbf7e19801022c5f6fd90a (diff) |
upstream: make signature format match PROTOCO
=?UTF-8?q?=20as=20a=20string,=20not=20raw=20bytes.=20Spotted=20by=20Manta?=
=?UTF-8?q?s=20Mikul=C4=97nas?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
OpenBSD-Commit-ID: 80fcc6d52893f80c6de2bedd65353cebfebcfa8f
Diffstat (limited to 'sshsig.c')
-rw-r--r-- | sshsig.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -172,7 +172,7 @@ sshsig_wrap_sign(struct sshkey *key, const char *hashalg, | |||
172 | (r = sshbuf_put_cstring(tosign, sig_namespace)) != 0 || | 172 | (r = sshbuf_put_cstring(tosign, sig_namespace)) != 0 || |
173 | (r = sshbuf_put_string(tosign, NULL, 0)) != 0 || /* reserved */ | 173 | (r = sshbuf_put_string(tosign, NULL, 0)) != 0 || /* reserved */ |
174 | (r = sshbuf_put_cstring(tosign, hashalg)) != 0 || | 174 | (r = sshbuf_put_cstring(tosign, hashalg)) != 0 || |
175 | (r = sshbuf_putb(tosign, h_message)) != 0) { | 175 | (r = sshbuf_put_stringb(tosign, h_message)) != 0) { |
176 | error("Couldn't construct message to sign: %s", ssh_err(r)); | 176 | error("Couldn't construct message to sign: %s", ssh_err(r)); |
177 | goto done; | 177 | goto done; |
178 | } | 178 | } |
@@ -308,7 +308,7 @@ sshsig_wrap_verify(struct sshbuf *signature, const char *hashalg, | |||
308 | (r = sshbuf_put_cstring(toverify, expect_namespace)) != 0 || | 308 | (r = sshbuf_put_cstring(toverify, expect_namespace)) != 0 || |
309 | (r = sshbuf_put_string(toverify, NULL, 0)) != 0 || /* reserved */ | 309 | (r = sshbuf_put_string(toverify, NULL, 0)) != 0 || /* reserved */ |
310 | (r = sshbuf_put_cstring(toverify, hashalg)) != 0 || | 310 | (r = sshbuf_put_cstring(toverify, hashalg)) != 0 || |
311 | (r = sshbuf_putb(toverify, h_message)) != 0) { | 311 | (r = sshbuf_put_stringb(toverify, h_message)) != 0) { |
312 | error("Couldn't construct message to verify: %s", ssh_err(r)); | 312 | error("Couldn't construct message to verify: %s", ssh_err(r)); |
313 | goto done; | 313 | goto done; |
314 | } | 314 | } |