tillitis / tkey-ssh-agent

SSH Agent for TKey, the flexible open hardware/software USB security key 🔑
https://www.tillitis.se
BSD 2-Clause "Simplified" License
131 stars 15 forks source link

Include information about embedded device app in version flag #114

Closed dehanj closed 7 months ago

dehanj commented 7 months ago

Considered two options for implementing this:

  1. Simply add a string variable underneath go:embed, to manually input the name/version of the embedded signer.
  2. Instead use embed.FS, which has a method of getting the name of embedded files.

Since we are only embedding one file, and not multiple files in a file system I thought option one is good enough, to keep it simple.
The confidence in knowing it is the right app lies in the sha512 digest which is included as well, which is calculated by hashing the embedded binary.

mchack-work commented 7 months ago

I agree with the simple solution. embed.FS is just too much for something like this. Very nice idea to compute the digest.

mchack-work commented 7 months ago

Added explanation on how to add a new signer with consideration taken for new appName.

Please have a look.

Otherwise it looks great. I'm ready to merge.

dehanj commented 7 months ago

I think it looks good, I'm also OK to merge - but we need an approve.