]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordjm@openbsd.org <djm@openbsd.org>
Fri, 11 Dec 2015 02:20:28 +0000 (02:20 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 11 Dec 2015 02:23:14 +0000 (13:23 +1100)
correct error messages; from Tomas Kuthan bz#2507

Upstream-ID: 7454a0affeab772398052954c79300aa82077093

ssh-agent.c
sshconnect2.c

index ed5dc571d8a6ba76119d2fbd9027e73d2d472999..d384cfbd049942ed0b4fcd714083cb8faea1774d 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.208 2015/12/04 16:41:28 markus Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.209 2015/12/11 02:20:28 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -401,7 +401,7 @@ process_sign_request2(SocketEntry *e)
        if (flags & SSH_AGENT_OLD_SIGNATURE)
                compat = SSH_BUG_SIGBLOB;
        if ((r = sshkey_from_blob(blob, blen, &key)) != 0) {
-               error("%s: cannot parse key blob: %s", __func__, ssh_err(ok));
+               error("%s: cannot parse key blob: %s", __func__, ssh_err(r));
                goto send;
        }
        if ((id = lookup_identity(key, 2)) == NULL) {
@@ -414,7 +414,7 @@ process_sign_request2(SocketEntry *e)
        }
        if ((r = sshkey_sign(id->key, &signature, &slen,
            data, dlen, agent_decode_alg(key, flags), compat)) != 0) {
-               error("%s: sshkey_sign: %s", __func__, ssh_err(ok));
+               error("%s: sshkey_sign: %s", __func__, ssh_err(r));
                goto send;
        }
        /* Success */
index 98b67e73ea14682037c2282acce0e26d0266f83d..250278ffebfc412bbbe701fb633444c69f77490e 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.233 2015/12/11 00:20:04 mmcc Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.234 2015/12/11 02:20:28 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Damien Miller.  All rights reserved.
@@ -1129,6 +1129,7 @@ sign_and_send_pubkey(Authctxt *authctxt, Identity *id)
        ret = identity_sign(id, &signature, &slen,
            buffer_ptr(&b), buffer_len(&b), datafellows);
        if (ret != 0) {
+               error("%s: signing failed: %s", __func__, ssh_err(ret));
                free(blob);
                buffer_free(&b);
                return 0;