MCPcopy Index your code
hub / github.com/smallstep/cli / marshalPublicKey

Function marshalPublicKey

command/ssh/certificate.go:551–557  ·  view source on GitHub ↗
(key ssh.PublicKey, subject string)

Source from the content-addressed store, hash-verified

549}
550
551func 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
559func deriveMachineID() (uuid.UUID, error) {
560 // use /etc/machine-id

Callers 3

certificateActionFunction · 0.85
rekeyActionFunction · 0.85
renewActionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…