Bug 2247 - [visual host key] fix upper border display
Summary: [visual host key] fix upper border display
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 6.6p1
Hardware: All All
: P5 minor
Assignee: Damien Miller
URL:
Keywords:
: 2215 (view as bug list)
Depends on:
Blocks: V_6_7
  Show dependency treegraph
 
Reported: 2014-06-19 06:13 AEST by Christian Hesse
Modified: 2014-10-08 08:00 AEDT (History)
2 users (show)

See Also:


Attachments
rework printing for visual host key upper border (2.00 KB, application/x-download)
2014-06-19 06:13 AEST, Christian Hesse
no flags Details
rework printing for visual host key upper border (2.03 KB, patch)
2014-06-23 18:14 AEST, Christian Hesse
no flags Details | Diff
rework printing for visual host key upper border (2.11 KB, patch)
2014-07-02 16:24 AEST, Christian Hesse
no flags Details | Diff
committed patch (1.36 KB, patch)
2014-07-03 11:46 AEST, Damien Miller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Hesse 2014-06-19 06:13:01 AEST
Created attachment 2442 [details]
rework printing for visual host key upper border

I've sent this patch to mailing list twice, without getting any feedback.

Key types are getting longer and the current implementation of visual
host key breaks with ED25519, resulting in (note the missing bracket):

+--[ED25519  256--+

This reworks the calculation of visual host key upper border. Please be
aware that this slightly modifies the output for other key types as well:

+--[ DSA 1024]----+
+---[DSA 1024]----+

+--[ RSA 2048]----+
+---[RSA 2048]----+

+--[ECDSA  256]---+
+---[ECDSA 256]---+

+--[ED25519  256--+
+--[ED25519 256]--+
Comment 1 Christian Hesse 2014-06-23 18:14:50 AEST
Created attachment 2443 [details]
rework printing for visual host key upper border

updated patch to avoid useless sprinf, use simple loop instead.
Comment 2 Damien Miller 2014-06-24 11:19:58 AEST
Put this on the list for openssh-6.7
Comment 3 Christian Hesse 2014-07-02 16:24:57 AEST
Created attachment 2444 [details]
rework printing for visual host key upper border

Update to latest git master.
Comment 4 Damien Miller 2014-07-03 11:46:44 AEST
Created attachment 2445 [details]
committed patch

That patch doesn't quite fit ED25519-CERT. This one drops the length when it can't fit.
Comment 5 Damien Miller 2014-07-03 11:47:05 AEST
patch committed. This will be in openssh-6.7
Comment 6 Damien Miller 2014-07-03 13:31:17 AEST
*** Bug 2215 has been marked as a duplicate of this bug. ***
Comment 7 Damien Miller 2014-10-08 08:00:44 AEDT
Close all bugs left open from 6.6 and 6.7 releases.