assaabloy-ppi / salt-channel

The specification and the reference implementation of Salt Channel - a simple, light-weight secure channel protocol based on TweetNaCl by Bernstein.
MIT License
14 stars 11 forks source link

When serializing M2 (NoSuchServer case), LastFlag is NOT set #13

Closed ppmag closed 6 years ago

ppmag commented 6 years ago

Hello, if I understand correctly the draft8 section related to M2:

1b LastFlag. Set to 1 when this is the last message of the session. That is, when the NoSuchServer bit is set

when serializing M2 with NoSuchServer property set to True should generate M2 bytes with LastFlag bit set,

however I can't find the code block which do this, and now when updating unittests for checking package/message format compatibility in python, I discovered next function: https://github.com/assaabloy-ppi/salt-channel/blob/master/src/saltchannel/v2/SaltServerSession.java#L380

doesn't set LastFlag, but it should according to specs.

Sorry if I misunderstood something.

Alex.

franslundberg commented 6 years ago

Thanks Alex. It is now fixed.