Merge pull request #27 from n0mjs710/socket_address
Fixed hmac calculation typo
This commit is contained in:
commit
f5284f8cfb
@ -219,7 +219,7 @@ class OPENBRIDGE(DatagramProtocol):
|
|||||||
if _packet[:4] == 'DMRD': # DMRData -- encapsulated DMR data frame
|
if _packet[:4] == 'DMRD': # DMRData -- encapsulated DMR data frame
|
||||||
_data = _packet[:53]
|
_data = _packet[:53]
|
||||||
_hash = _packet[53:]
|
_hash = _packet[53:]
|
||||||
_ckhs = hmac_new(self._config['PASSPHRASE'],_data[53:],sha1).digest()
|
_ckhs = hmac_new(self._config['PASSPHRASE'],_data,sha1).digest()
|
||||||
|
|
||||||
if compare_digest(_hash, _ckhs) and _sockaddr == self._config['TARGET_SOCK']:
|
if compare_digest(_hash, _ckhs) and _sockaddr == self._config['TARGET_SOCK']:
|
||||||
_peer_id = _data[11:15]
|
_peer_id = _data[11:15]
|
||||||
|
Loading…
Reference in New Issue
Block a user