mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 14:24:09 +01:00
pyln: Sets remote_pubkey for LightningConnection if node is not the initiator
Currently ``LightningConnection.remote_pubkey`` is set to ``None`` if the node is not the handshake initiator. This sets it to ``rs`` in act three from the receiver side
This commit is contained in:
parent
26c10ffefe
commit
f1d5fdf323
1 changed files with 2 additions and 1 deletions
|
@ -267,8 +267,9 @@ class LightningConnection(object):
|
|||
raise ValueError("Unsupported handshake version {}, only version "
|
||||
"0 is supported.".format(v))
|
||||
rs = decryptWithAD(self.temp_k2, self.nonce(1), h.digest(), c)
|
||||
self.remote_pubkey = PublicKey(rs)
|
||||
h.update(c)
|
||||
se = ecdh(self.handshake['e'], PublicKey(rs))
|
||||
se = ecdh(self.handshake['e'], self.remote_pubkey)
|
||||
|
||||
self.chaining_key, self.temp_k3 = hkdf_two_keys(
|
||||
se.raw, self.chaining_key
|
||||
|
|
Loading…
Add table
Reference in a new issue