dnssec-checkds.py.in revision 153dce262a0532b45cd08592f367e153ac92ef36
#!@PYTHON@
############################################################################
# Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
#
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
############################################################################
############################################################################
# DSRR class:
# Delegation Signer (DS) resource record
############################################################################
rrname=''
rrclass='IN'
rrtype='DS'
digest=''
ttl=0
return
return
else:
self.rrtype = 'DS'
self.keyid = int(fields[1])
self.keyalg = int(fields[2])
self.hashalg = int(fields[3])
return('%s %s %s %d %d %d %s' %
############################################################################
# DLVRR class:
# DNSSEC Lookaside Validation (DLV) resource record
############################################################################
parent=''
dlvname=''
rrname='IN'
rrclass='IN'
rrtype='DLV'
digest=''
ttl=0
return
return
else:
self.rrtype = 'DLV'
self.keyid = int(fields[1])
self.keyalg = int(fields[2])
self.hashalg = int(fields[3])
return('%s %s %s %d %d %d %s' %
############################################################################
# checkds:
# Fetch DS RRset for the given zone from the DNS; fetch DNSKEY
# RRset from the masterfile if specified, or from DNS if not.
# Generate a set of expected DS records from the DNSKEY RRset,
# and report on congruency.
############################################################################
dslist=[]
fp.close()
dsklist=[]
if masterfile:
else:
fp.close()
print ("DS for KSK %s/%03d/%05d (%s) found in parent" %
else:
print ("No DS records found for KSK %s/%03d/%05d" %
return found
############################################################################
# checkdlv:
# Fetch DLV RRset for the given zone from the DNS; fetch DNSKEY
# RRset from the masterfile if specified, or from DNS if not.
# Generate a set of expected DLV records from the DNSKEY RRset,
# and report on congruency.
############################################################################
dlvlist=[]
fp.close()
#
# Fetch DNSKEY records from DNS and generate DLV records from them
#
dlvklist=[]
if masterfile:
else:
fp.close()
print ("DLV for KSK %s/%03d/%05d (%s) found in %s" %
else:
print ("No DLV records found for KSK %s/%03d/%05d in %s" %
return found
############################################################################
# parse_args:
# Read command line arguments, set global 'args' structure
############################################################################
if args.lookaside:
############################################################################
# Main
############################################################################
if args.lookaside:
else:
exit(0 if found else 1)
if __name__ == "__main__":
main()