Update
This commit is contained in:
1 parent
3530afb854
commit
6903fcff27
2146 files changed
+112256
-190703
No files matched your search
+3
-3
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build !ts_omit_tailnetlock
|
||||
@@ -67,11 +67,11 @@ func (b *UpdateBuilder) AddKey(key Key) error {
|
||||
}
|
||||
|
||||
if _, err := b.state.GetKey(keyID); err == nil {
|
||||
return fmt.Errorf("cannot add key %v: already exists", key)
|
||||
return fmt.Errorf("cannot add key tlpub:%x: already exists", key.Public)
|
||||
}
|
||||
|
||||
if len(b.state.Keys) >= maxKeys {
|
||||
return fmt.Errorf("cannot add key %v: maximum number of keys reached", key)
|
||||
return fmt.Errorf("cannot add key tlpub:%x: maximum number of keys reached", key.Public)
|
||||
}
|
||||
|
||||
return b.mkUpdate(AUM{MessageKind: AUMAddKey, Key: &key})
|
||||
|
||||
Reference in new issue
Block a user