retitle -1 "Please inform users of malformed public key"
tags -1 + patch
thanks

Hi,

I figured out what was going on: the public key file was malformed. I
was able to load the private key directly into ssh-add, but keychain
uses the fingerprint to figure out if it needed to load it. But if the
public key file was malformed, the 'ssh_l' function couldn't determine
the fingerprint. This means that keychain silently skipped the key,
without informing the user. Please see the attached patch warning the
user of this, instead of silently skipping the key.

Best wishes,
Ryan
Description: Inform user when unable to extract fingerprint from public key
Author: Ryan Kavanagh <r...@debian.org>
Origin: vendor
Bug-Debian: http://bugs.debian.org/673019
Forwarded: no
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: keychain-2.7.1/keychain.sh
===================================================================
--- keychain-2.7.1.orig/keychain.sh	2012-10-20 15:54:09.853440457 +0100
+++ keychain-2.7.1/keychain.sh	2012-10-20 15:58:15.635822430 +0100
@@ -816,7 +816,8 @@
 
     for slm_k in "$@"; do
         # Fingerprint current user-specified key
-        slm_finger=`ssh_f "$slm_k"` || continue
+        slm_finger=`ssh_f "$slm_k"` || \
+            warn "Unable to extract fingerprint from keyfile ${slm_k}.pub, skipping" && continue
 
         # Check if it needs to be added
         case " $sshavail " in

Attachment: signature.asc
Description: Digital signature

Reply via email to