(key ssh.PublicKey, subject string)
| 549 | } |
| 550 | |
| 551 | func marshalPublicKey(key ssh.PublicKey, subject string) []byte { |
| 552 | b := ssh.MarshalAuthorizedKey(key) |
| 553 | if i := bytes.LastIndex(b, []byte("\n")); i >= 0 { |
| 554 | return append(b[:i], []byte(" "+subject+"\n")...) |
| 555 | } |
| 556 | return append(b, []byte(" "+subject+"\n")...) |
| 557 | } |
| 558 | |
| 559 | func deriveMachineID() (uuid.UUID, error) { |
| 560 | // use /etc/machine-id |
no outgoing calls
no test coverage detected
searching dependent graphs…