Compare commits

..

No commits in common. "59f896ac62959cb696d3e3e93b1955f4e338c934" and "772dd225162a08a8f3199762d383c771ddb89b64" have entirely different histories.

2 changed files with 6 additions and 5 deletions

View File

@ -4,7 +4,8 @@ var path = require('path');
var homeRe = new RegExp("^~(\\/|\\\\|\\" + path.sep + ")");
var re = /^[a-zA-Z0-9\.\-]+$/;
var punycode = require('punycode');
var dnsResolveMxAsync = require('util').promisify(require('dns').resolveMx);
var PromiseA = require('bluebird');
var dns = PromiseA.promisifyAll(require('dns'));
module.exports.attachCertInfo = function (results) {
// XXX Note: Parsing the certificate info comes at a great cost (~500kb)
@ -106,10 +107,10 @@ module.exports.testEmail = function (email) {
if (2 !== parts.length || !parts[0] || !parts[1]) {
err = new Error("malformed email address '" + email + "'");
err.code = 'E_EMAIL';
return Promise.reject(err);
return PromiseA.reject(err);
}
return dnsResolveMxAsync(parts[1]).then(function (records) {
return dns.resolveMxAsync(parts[1]).then(function (records) {
// records only returns when there is data
if (!records.length) {
throw new Error("sanity check fail: success, but no MX records returned");
@ -119,7 +120,7 @@ module.exports.testEmail = function (email) {
if ('ENODATA' === err.code) {
err = new Error("no MX records found for '" + parts[1] + "'");
err.code = 'E_EMAIL';
return Promise.reject(err);
return PromiseA.reject(err);
}
});
};

View File

@ -1,6 +1,6 @@
{
"name": "greenlock",
"version": "2.2.4",
"version": "2.2.3",
"description": "Let's Encrypt for node.js on npm",
"main": "index.js",
"scripts": {