mirror of
				https://github.com/therootcompany/greenlock.js.git
				synced 2024-11-16 17:29:00 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			772dd22516
			...
			59f896ac62
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					59f896ac62 | ||
| 
						 | 
					825001bfb8 | 
@ -4,8 +4,7 @@ var path = require('path');
 | 
				
			|||||||
var homeRe = new RegExp("^~(\\/|\\\\|\\" + path.sep + ")");
 | 
					var homeRe = new RegExp("^~(\\/|\\\\|\\" + path.sep + ")");
 | 
				
			||||||
var re = /^[a-zA-Z0-9\.\-]+$/;
 | 
					var re = /^[a-zA-Z0-9\.\-]+$/;
 | 
				
			||||||
var punycode = require('punycode');
 | 
					var punycode = require('punycode');
 | 
				
			||||||
var PromiseA = require('bluebird');
 | 
					var dnsResolveMxAsync = require('util').promisify(require('dns').resolveMx);
 | 
				
			||||||
var dns = PromiseA.promisifyAll(require('dns'));
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports.attachCertInfo = function (results) {
 | 
					module.exports.attachCertInfo = function (results) {
 | 
				
			||||||
  // XXX Note: Parsing the certificate info comes at a great cost (~500kb)
 | 
					  // XXX Note: Parsing the certificate info comes at a great cost (~500kb)
 | 
				
			||||||
@ -107,10 +106,10 @@ module.exports.testEmail = function (email) {
 | 
				
			|||||||
  if (2 !== parts.length || !parts[0] || !parts[1]) {
 | 
					  if (2 !== parts.length || !parts[0] || !parts[1]) {
 | 
				
			||||||
    err = new Error("malformed email address '" + email + "'");
 | 
					    err = new Error("malformed email address '" + email + "'");
 | 
				
			||||||
    err.code = 'E_EMAIL';
 | 
					    err.code = 'E_EMAIL';
 | 
				
			||||||
    return PromiseA.reject(err);
 | 
					    return Promise.reject(err);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return dns.resolveMxAsync(parts[1]).then(function (records) {
 | 
					  return dnsResolveMxAsync(parts[1]).then(function (records) {
 | 
				
			||||||
    // records only returns when there is data
 | 
					    // records only returns when there is data
 | 
				
			||||||
    if (!records.length) {
 | 
					    if (!records.length) {
 | 
				
			||||||
      throw new Error("sanity check fail: success, but no MX records returned");
 | 
					      throw new Error("sanity check fail: success, but no MX records returned");
 | 
				
			||||||
@ -120,7 +119,7 @@ module.exports.testEmail = function (email) {
 | 
				
			|||||||
    if ('ENODATA' === err.code) {
 | 
					    if ('ENODATA' === err.code) {
 | 
				
			||||||
      err = new Error("no MX records found for '" + parts[1] + "'");
 | 
					      err = new Error("no MX records found for '" + parts[1] + "'");
 | 
				
			||||||
      err.code = 'E_EMAIL';
 | 
					      err.code = 'E_EMAIL';
 | 
				
			||||||
      return PromiseA.reject(err);
 | 
					      return Promise.reject(err);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "greenlock",
 | 
					  "name": "greenlock",
 | 
				
			||||||
  "version": "2.2.3",
 | 
					  "version": "2.2.4",
 | 
				
			||||||
  "description": "Let's Encrypt for node.js on npm",
 | 
					  "description": "Let's Encrypt for node.js on npm",
 | 
				
			||||||
  "main": "index.js",
 | 
					  "main": "index.js",
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user