Skip to content

Commit

Permalink
more work on public ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
adamar committed Apr 8, 2015
1 parent b49a936 commit 74f4a2c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rafiki/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ func NewRafikiKey(buf []byte) *Key {
ParsedKey: ecpkey,
}

case validPublicKey(block):
publickey, _ := ssh.ParsePublicKey(block)
return &Key{
Identifier: "public", // Require proper identifier here
Type: "publickey",
FileContents: block,
ParsedKey: publickey,
}

case validPGPKey(block):
keyReader := bytes.NewReader(block)
keyRing, _ := openpgp.ReadArmoredKeyRing(keyReader)
Expand Down

0 comments on commit 74f4a2c

Please sign in to comment.