Hi All,
I'm trying to construct a dns.zone.from_xfr() call, but seem to be hitting a BadSignature exception I can't quite understand why.
For example's sake, the 'private' file generated for an hmac-sha256 key named 'formannet'
Private-key-format: v1.3
Algorithm: 163 (HMAC_SHA256)
Key: yHA3pIIxqsM+MF2qE4DgCJibY+0=
Bits: AAA=
Created: 20190313234430
Publish: 20190313234430
Activate: 20190313234430
My code is here, which generates the BadSignature Exception from the dns.zone.from_xfr(xfr) call:
#!/usr/local/bin/python3
import dns.exception
import dns.query
import dns.tsig
import dns.tsigkeyring
import dns.zone
# jforman@desktop1 ~ $ echo yHA3pIIxqsM+MF2qE4DgCJibY+0= | base64
# eUhBM3BJSXhxc00rTUYycUU0RGdDSmliWSswPQo=
mykeyring = dns.tsigkeyring.from_text({
'formannet': 'eUhBM3BJSXhxc00rTUYycUU0RGdDSmliWSswPQo='})
xfr = dns.query.xfr(
'10.30.20.1',
'20.30.10.in-addr.arpa',
port=53,
keyring=mykeyring,
keyalgorithm='hmac-sha256')
zone = dns.zone.from_xfr(xfr)
print("zone: %s" % zone)
What am I missing here that my TSIG signature failures to verify? Any help is greatly appreciated.
Thanks,
Jeff