1.2.0 • Published 6 years ago

dns-caa v1.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

DNS CAA

This npm-packages checks for the existance of the security-feature DNS CAA.

Installation

npm install dns-caa --save

Usage

  • when the term issue is being used, it's a single domain certificates.
  • when the term issuewild is being used, it's for wildcard certficates

DNSCAA.getDnsCaa = async function (domain, dnsServer = '8.8.8.8')

const DNSCAA = require('dns-caa');

let _getGoogleDnsCaa = async function () {
	let checkResult = await DNSCAA.getDnsCaa('google.com');
	console.log(checkResult);
};

let _getGoogleDnsCaaDnsServer = async function () {
	let checkResult = await DNSCAA.getDnsCaa('google.com', 8.8.4.4);
	console.log(checkResult);
};

// retrieve DNS-CAA for google.com via the default DNS-Server 8.8.8.8
_getGoogleDnsCaa();

// retrieve DNS-CAA for google.com from DNS-Server 8.8.4.4
_getGoogleDnsCaa();

output:

{
	issue: [ 'pki.goog' ],
	issuewild: []
}

DNSCAA.validate = async function (domain, expectedCAAs, dnsServer = '8.8.8.8')

const DNSCAA = require('dns-caa');

let _getGoogleValidation = async function () {
	let checkResult = await DNSCAA.validate('google.com', {issue: ['google.de', 'pki.goog']});
	console.log(checkResult);
};

// check fi google.com has the entries google.de and pki.goog as valid CAA-records
_getGoogleValidation();

output:

{
	hasDnsCaa: true,
	issue: [
		{ caa: 'google.de', exists: false },
		{ caa: 'pki.goog', exists: true }
	],
	issuewild: []
}
1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago