Giter Club home page Giter Club logo

Comments (5)

 avatar commented on September 28, 2024

This is not a feature that I personally need, so really you need to let me know what behavior would work best for you.

from keychain.

cbutterfield avatar cbutterfield commented on September 28, 2024

I tried several approaches to locating the pub file which were easy in bash, but which I wasn't too sure how to convert to "lowest common denominator" Borne shell syntax. Eventually I realized it might be simpler and more robust to add the full filename to the list of fingerprints, while suppressing the warning about "can't find pub file".

I noticed existing code that used basenames, but that seemed more subject to error if keys from different directories shared the same basename. I did NOT attempt to change the existing basename-centric code. Perhaps that should be done too, if this approach seems suitable for inclusion in the repo.

So here are diffs for your consideration:

$ diff -c keychain ORIG/
*** keychain 2010-08-19 15:58:34.062500000 -0400
--- ORIG//keychain 2006-11-08 23:58:06.001000000 -0500


*** 926,938 ****
# md5 1024 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 /home/barney/.ssh/id_dsa(DSA)
# 2048 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 /home/barney/.ssh/id_rsa.pub
echo "$ef_line" | cut -f3 -d' '

  •             echo "$ef_line" | cut -f4 -d' ' # include filename as backoff
              ;;
          _\ [0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:_)
              # The more consistent OpenSSH format, we hope
              #   1024 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 /home/barney/.ssh/id_dsa (DSA)
              echo "$ef_line" | cut -f2 -d' '
    
  •             echo "$ef_line" | cut -f3 -d' ' # include filename as backoff
              ;;
          _)
              # Fall back to filename.  Note that commercial ssh is handled
    
    --- 926,936 ----
    _************
    *** 1012,1020 ****
    sf_filename="$1"
    if $openssh || $sunssh; then
    if [ ! -f "$sf_filename.pub" ]; then
    ! #warn "$sf_filename.pub missing; can't tell if $sf_filename is loaded"
    ! echo $sf_filename
    ! return 0
    fi
    sf_fing=ssh-keygen -l -f "$sf_filename.pub" || return 1
    echo "$sf_fing" | extract_fingerprints
    --- 1010,1017 ----
    sf_filename="$1"
    if $openssh || $sunssh; then
    if [ ! -f "$sf_filename.pub" ]; then
    ! warn "$sf_filename.pub missing; can't tell if $sf_filename is loaded"
    ! return 1
    fi
    sf_fing=ssh-keygen -l -f "$sf_filename.pub" || return 1
    echo "$sf_fing" | extract_fingerprints

from keychain.

cbutterfield avatar cbutterfield commented on September 28, 2024

OOPS, clearly I screwed the editor pooch. Funny, I can't seem to see any description of the syntax (surely its right in front of me). So I stuck the diffs in pastebin: http://pastebin.com/jy8cCY3G

from keychain.

danielrobbins avatar danielrobbins commented on September 28, 2024

This issue has been imported into the Funtoo Linux bug tracker! :) Follow the action here: https://bugs.funtoo.org/browse/FL-1998

from keychain.

danielrobbins avatar danielrobbins commented on September 28, 2024

This issue has been resolved in the Funtoo Linux bug tracker. Closing on GitHub.

from keychain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.