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

openssl-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openssl-wrapper - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

18

lib/index.js

@@ -45,5 +45,6 @@ 'use strict';

});
var lastParams = [];
Object.keys(options).forEach(function (key) {
if (options[key] === false) {
params.push(key);
lastParams.push(key);
} else if (options[key] === true) {

@@ -62,2 +63,4 @@ params.push('-' + key);

params.concat(lastParams);
// Actually spawn openssl command

@@ -83,12 +86,11 @@ var openssl = (0, _child_process.spawn)('openssl', params);

var stderr = Buffer.concat(errResult, errLength).toString('utf8');
var expectedStderr = expectedStderrForAction[action];
var err = null;
var err = new Error(stderr);
err.code = code;
var expectedStderr = expectedStderrForAction[action];
if (!code && expectedStderr && stderr.match(expectedStderrForAction)) {
err = null;
if (code || stderr && expectedStderr && !stderr.match(expectedStderr)) {
err = new Error(stderr);
err.code = code;
}
if (typeof callback === 'function') {
if (isFunction(callback)) {
callback.apply(null, [err, stdout]);

@@ -95,0 +97,0 @@ }

{
"name": "openssl-wrapper",
"version": "0.3.2",
"version": "0.3.3",
"description": "NodeJS OpenSSL wrapper",

@@ -21,17 +21,17 @@ "main": "lib/index.js",

"devDependencies": {
"babel-cli": "^6.7.7",
"babel-cli": "^6.9.0",
"babel-eslint": "^6.0.4",
"babel-plugin-transform-class-properties": "^6.6.0",
"babel-plugin-transform-function-bind": "^6.5.2",
"babel-plugin-transform-object-rest-spread": "^6.6.5",
"babel-preset-es2015": "^6.6.0",
"babel-register": "^6.7.2",
"babel-plugin-transform-class-properties": "^6.9.1",
"babel-plugin-transform-function-bind": "^6.8.0",
"babel-plugin-transform-object-rest-spread": "^6.8.0",
"babel-preset-es2015": "^6.9.0",
"babel-register": "^6.9.0",
"codeclimate-test-reporter": "^0.3.1",
"eslint": "^2.8.0",
"eslint-config-airbnb": "^8.0.0",
"eslint-plugin-import": "^1.5.0",
"eslint-plugin-jsx-a11y": "^1.0.2",
"expect": "^1.18.0",
"mocha": "^2.4.5",
"nyc": "^6.4.0",
"eslint": "^2.11.1",
"eslint-config-airbnb": "^9.0.1",
"eslint-plugin-import": "^1.8.1",
"eslint-plugin-jsx-a11y": "^1.2.2",
"expect": "^1.20.1",
"mocha": "^2.5.3",
"nyc": "^6.4.4",
"rimraf": "^2.5.2"

@@ -38,0 +38,0 @@ },

@@ -34,5 +34,6 @@

const params = action.split('.').map((value, key) => (!key ? value : `-${value}`));
const lastParams = [];
Object.keys(options).forEach(key => {
if (options[key] === false) {
params.push(key);
lastParams.push(key);
} else if (options[key] === true) {

@@ -51,2 +52,4 @@ params.push(`-${key}`);

params.concat(lastParams);
// Actually spawn openssl command

@@ -72,12 +75,11 @@ const openssl = spawn('openssl', params);

const stderr = Buffer.concat(errResult, errLength).toString('utf8');
const expectedStderr = expectedStderrForAction[action];
let err = null;
let err = new Error(stderr);
err.code = code;
const expectedStderr = expectedStderrForAction[action];
if (!code && expectedStderr && stderr.match(expectedStderrForAction)) {
err = null;
if (code || (stderr && expectedStderr && !stderr.match(expectedStderr))) {
err = new Error(stderr);
err.code = code;
}
if (typeof callback === 'function') {
if (isFunction(callback)) {
callback.apply(null, [err, stdout]);

@@ -84,0 +86,0 @@ }

Sorry, the diff of this file is not supported yet

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