Comparing version 0.2.2 to 0.2.3
@@ -569,2 +569,5 @@ /*! | ||
if (util.hasType(section, types.NSEC)) | ||
set.add(types.NSEC); | ||
if (util.hasType(section, types.NSEC3)) | ||
@@ -571,0 +574,0 @@ set.add(types.NSEC3); |
@@ -25,2 +25,7 @@ /*! | ||
const { | ||
hasType, | ||
extractSet | ||
} = util; | ||
const { | ||
Question, | ||
@@ -144,6 +149,39 @@ Message, | ||
if (msg.code !== codes.NOERROR | ||
&& msg.code !== codes.NXDOMAIN) { | ||
return false; | ||
} | ||
if (this.isStale()) | ||
await this.refreshKeys(); | ||
return dnssec.verifyMessage(msg, this.keyMap); | ||
if (!dnssec.verifyMessage(msg, this.keyMap)) | ||
return false; | ||
if (msg.code === codes.NXDOMAIN) | ||
return true; | ||
if (!hasType(msg.authority, types.NS)) | ||
return false; | ||
if (hasType(msg.authority, types.DS)) | ||
return true; | ||
const set = extractSet(msg.authority, '', types.NSEC); | ||
if (set.length !== 1) | ||
return false; | ||
const nsec = set[0].data; | ||
if (!nsec.hasType(types.NS)) | ||
return false; | ||
if (nsec.hasType(types.DS)) | ||
return false; | ||
if (nsec.hasType(types.SOA)) | ||
return false; | ||
return true; | ||
} | ||
@@ -150,0 +188,0 @@ |
{ | ||
"name": "bns", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "DNS bike-shed", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
644250
24829