]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: make signature format match PROTOCO
authordjm@openbsd.org <djm@openbsd.org>
Wed, 2 Oct 2019 08:07:13 +0000 (08:07 +0000)
committerDamien Miller <djm@mindrot.org>
Wed, 2 Oct 2019 08:08:17 +0000 (18:08 +1000)
=?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

sshsig.c

index b993b7c1ead48c11c5c43e429c553325e71cd266..b19cd077db39925b293ccc8053887483363d9a0e 100644 (file)
--- a/sshsig.c
+++ b/sshsig.c
@@ -172,7 +172,7 @@ sshsig_wrap_sign(struct sshkey *key, const char *hashalg,
            (r = sshbuf_put_cstring(tosign, sig_namespace)) != 0 ||
            (r = sshbuf_put_string(tosign, NULL, 0)) != 0 || /* reserved */
            (r = sshbuf_put_cstring(tosign, hashalg)) != 0 ||
-           (r = sshbuf_putb(tosign, h_message)) != 0) {
+           (r = sshbuf_put_stringb(tosign, h_message)) != 0) {
                error("Couldn't construct message to sign: %s", ssh_err(r));
                goto done;
        }
@@ -308,7 +308,7 @@ sshsig_wrap_verify(struct sshbuf *signature, const char *hashalg,
            (r = sshbuf_put_cstring(toverify, expect_namespace)) != 0 ||
            (r = sshbuf_put_string(toverify, NULL, 0)) != 0 || /* reserved */
            (r = sshbuf_put_cstring(toverify, hashalg)) != 0 ||
-           (r = sshbuf_putb(toverify, h_message)) != 0) {
+           (r = sshbuf_put_stringb(toverify, h_message)) != 0) {
                error("Couldn't construct message to verify: %s", ssh_err(r));
                goto done;
        }