MCPcopy Create free account
hub / github.com/belak/gitdir / validatePublicKey

Method validatePublicKey

config_validate.go:29–35  ·  view source on GitHub ↗
(pk *models.PublicKey)

Source from the content-addressed store, hash-verified

27}
28
29func (c *Config) validatePublicKey(pk *models.PublicKey) error {
30 if _, ok := c.publicKeys[pk.RawMarshalAuthorizedKey()]; !ok {
31 return fmt.Errorf("cannot remove current private key: %s", pk.MarshalAuthorizedKey())
32 }
33
34 return nil
35}
36
37func (c *Config) validateAdmins() error {
38 for _, user := range c.Users {

Callers 1

ValidateMethod · 0.95

Calls 2

MarshalAuthorizedKeyMethod · 0.80

Tested by

no test coverage detected