Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

haraka-net-utils

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

haraka-net-utils - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

CHANGES.md

23

index.js

@@ -12,4 +12,6 @@ 'use strict';

var tlds = require('haraka-tld');
var config = require('haraka-config');
// export config, so config base path can be overloaded by tests
exports.config = require('haraka-config');
exports.long_to_ip = function (n) {

@@ -205,3 +207,3 @@ var d = n%256;

// manual config override, for the cases where we can't figure it out
var smtpIni = config.get('smtp.ini').main;
var smtpIni = exports.config.get('smtp.ini').main;
if (smtpIni.public_ip) {

@@ -364,1 +366,18 @@ nu.public_ip = smtpIni.public_ip;

}
exports.load_tls_ini = function (cb) {
var cfg = exports.config.get('tls.ini', {
booleans: [
'+main.requestCert',
'-main.rejectUnauthorized',
'-main.honorCipherOrder',
'-redis.disable_for_failed_hosts',
]
}, cb);
if (!cfg.no_tls_hosts) {
cfg.no_tls_hosts = {};
}
return cfg;
}

6

package.json
{
"name": "haraka-net-utils",
"version": "1.0.2",
"version": "1.0.3",
"description": "haraka network utilities",

@@ -9,3 +9,3 @@ "main": "index.js",

"lint": "./node_modules/.bin/eslint *.js test",
"coverage": "./node_modules/.bin/istanbul cover ./run_tests"
"cover": "./node_modules/.bin/istanbul cover ./run_tests"
},

@@ -35,3 +35,3 @@ "repository": {

"haraka-config": "^1.0.3",
"haraka-tld": "^1.0.9",
"haraka-tld": "*",
"ipaddr.js": "^1.2.0",

@@ -38,0 +38,0 @@ "sprintf-js": "^1.0.3"

var net = require('net');
var path = require('path');

@@ -956,1 +957,42 @@ require('haraka-config').watch_files = false;

exports.load_tls_ini = {
'loads a tls.ini config file (defaults)': function (test) {
test.expect(1);
test.deepEqual(net_utils.load_tls_ini(),
{ main:
{ requestCert: true,
rejectUnauthorized: false,
honorCipherOrder: false
},
redis: { disable_for_failed_hosts: false },
no_tls_hosts: {}
});
test.done();
},
'loads a tls.ini config file from test dir': function (test) {
test.expect(1);
net_utils.config = net_utils.config.module_config(path.resolve('test'));
test.deepEqual(net_utils.load_tls_ini(),
{ main:
{ requestCert: true,
rejectUnauthorized: true,
honorCipherOrder: true,
key: 'tls_key.pem',
cert: 'tls_cert.pem',
dhparam: 'dhparams.pem',
ciphers: 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384' },
redis: { disable_for_failed_hosts: false },
no_tls_hosts: {},
outbound:
{ key: 'tls_key.pem',
cert: 'tls_cert.pem',
dhparam: 'dhparams.pem',
ciphers: 'ECDHE-RSA-AES256-GCM-SHA384',
rejectUnauthorized: 'false',
requestCert: 'false',
honorCipherOrder: 'false' }
}
);
test.done();
},
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc