silcclient: check packet type as responder before starting AKE
authorPekka Riikonen <priikone@silcnet.org>
Mon, 5 May 2014 10:53:08 +0000 (13:53 +0300)
committerPekka Riikonen <priikone@silcnet.org>
Mon, 5 May 2014 10:53:08 +0000 (13:53 +0300)
commitbd463a75d37dd2ec164dc14dee4bb2550d6a778a
tree64177590e65c52aed7c930f5a23de71bf2d2b020
parentf2deb55ad9290c1d13fa33b3a3cb3dac9318b28e
silcclient: check packet type as responder before starting AKE

Do not immediately start the private message key autonegotiation as
responder when a packet comes in but wait until it is decoded from the
private message payload so that responder can properly set up the SKE
properties and start the SKE in proper state.  Initiator is allowed to
start SKE with SILC_PACKET_KEY_EXCHANGE at any time, including when a key
already exists and it would be error to expect that initiator should have
sent SILC_PACKET_KEY_EXCHANGE_1 just because key exists in responder side.
lib/silcclient/client_prvmsg.c