mirror of
https://github.com/postmannen/ctrl.git
synced 2025-03-31 01:24:31 +00:00
sending public keys to both ack'ed and not ack'ed nodes
This commit is contained in:
parent
1303be2e9e
commit
13feea1bfe
1 changed files with 3 additions and 10 deletions
|
@ -358,24 +358,17 @@ func pushKeys(proc process, message Message, nodes []Node) error {
|
|||
msg := Message{
|
||||
ToNode: n,
|
||||
Method: KeysUpdateReceive,
|
||||
Data: knh,
|
||||
ReplyMethod: None,
|
||||
ACKTimeout: 0,
|
||||
}
|
||||
|
||||
proc.newMessagesCh <- msg
|
||||
|
||||
er = fmt.Errorf("----> methodKeysAllow: SENDING KEYS TO NODE=%v", message.FromNode)
|
||||
er = fmt.Errorf("----> pushKeys: SENDING KEYS TO NODE=%v", message.FromNode)
|
||||
proc.errorKernel.logDebug(er)
|
||||
}
|
||||
|
||||
// Create the data payload of the current allowed keys.
|
||||
b, err := json.Marshal(proc.centralAuth.pki.nodesAcked.keysAndHash)
|
||||
|
||||
if err != nil {
|
||||
er := fmt.Errorf("error: methodKeysAllow, failed to marshal keys map: %v", err)
|
||||
proc.errorKernel.errSend(proc, message, er, logWarning)
|
||||
}
|
||||
|
||||
proc.centralAuth.pki.nodesAcked.mu.Lock()
|
||||
defer proc.centralAuth.pki.nodesAcked.mu.Unlock()
|
||||
|
||||
|
@ -397,7 +390,7 @@ func pushKeys(proc process, message Message, nodes []Node) error {
|
|||
msg := Message{
|
||||
ToNode: n,
|
||||
Method: KeysUpdateReceive,
|
||||
Data: b,
|
||||
Data: knh,
|
||||
ReplyMethod: None,
|
||||
ACKTimeout: 0,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue