Merge pull request #27 from n0mjs710/socket_address

Fixed hmac calculation typo
This commit is contained in:
Cort Buffington 2018-10-12 16:03:26 -05:00 committed by GitHub
commit f5284f8cfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,7 +219,7 @@ class OPENBRIDGE(DatagramProtocol):
if _packet[:4] == 'DMRD': # DMRData -- encapsulated DMR data frame
_data = _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']:
_peer_id = _data[11:15]