def load_soas(input_file, output_file)
signed_soa = get_soa_from_file(output_file)
unsigned_soa = get_soa_from_file(input_file)
@zone_name = unsigned_soa.name.to_s.downcase
if (signed_soa.name != unsigned_soa.name)
log(LOG_ERR, "Different SOA name in signed zone! (was #{unsigned_soa.name} in unsigned zone, but is #{signed_soa.name} in signed zone")
end
if (signed_soa.serial != unsigned_soa.serial)
if (@config.soa.serial == Config::SOA::KEEP)
log(LOG_ERR, "Policy configuration is to keep SOA serial the same, " +
"but has changed from #{unsigned_soa.serial} to " +
"#{signed_soa.serial}")
else
log(LOG_INFO, "SOA differs : from #{unsigned_soa.serial} to #{signed_soa.serial}")
end
end
if (@config.soa.ttl)
if (signed_soa.ttl != @config.soa.ttl)
log(LOG_ERR, "SOA TTL should be #{@config.soa.ttl} as defined in zone policy. Was #{signed_soa.ttl}")
end
else
if (signed_soa.ttl != unsigned_soa.ttl)
log(LOG_ERR, "SOA TTL differs : from #{unsigned_soa.ttl} to #{signed_soa.ttl}")
end
end
@soa = signed_soa
end