npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

roman-openssl-nodejs

v1.0.5

Published

is a package which gives you a possibility to run every [OpenSSL](https://www.openssl.org/) command in [Node.js](https://nodejs.org/en/) in a handy way. Moreover, parameters like -in, -keyin, -config and etc can be replaced by a raw data ([Buffor](https:/

Downloads

9

Readme

openssl-nodejs

is a package which gives you a possibility to run every OpenSSL command in Node.js in a handy way. Moreover, parameters like -in, -keyin, -config and etc can be replaced by a raw data (Buffor).

Installation & Usage

npm install openssl-nodejs

Import openssl module:

const openssl = require('openssl-nodejs')

Next, invoke openssl function and put command with parameters inside a function like presented in the example below.

openssl('openssl req -config csr.cnf -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout key.key -out certificate.crt')

To get access to the result of execution specify callback function as the last parameter of openssl function (with arguments err and buffer).

openssl function can be invoked with a single parameter like OpenSSL command (see example above) or within an array with command name and parameters itself.

openssl(['req', '-config', 'csr.conf', '-out', 'CSR.csr', '-new', '-newkey', 'rsa:2048', '-nodes', '-keyout', 'privateKey.key', function (err, buffer) {
console.log(err.toString(), buffer.toString());
});

If you want to specify Buffer text instead of the file as an input/output or whatever you need, use the version with an array as a function parameter. And put an object with keys: name: (specify a name of file which will be created to handle this command), and buffer: (your buffer variable) Example of object:

{ name:'csr.conf', buffer: BufferVariable }

Command example:

openssl(['req', '-config', { name:'csr.conf', buffer: BufferVariable }, '-out', 'CSR.csr', '-new', '-newkey', 'rsa:2048', '-nodes', '-keyout', 'privateKey.key'], function (err, buffer) {
console.log(err.toString(), buffer.toString());
});

When you used a command which generates additional output in file format this package will create a folder openssl/ in the directory where the command was invoked. All output files will appear in this folder (openssl).

Note:

If u want to use a command which needs additional interaction use parameter -config and specify pass to file with configuration.


That's all that you need to start using it.

For any information, improvements or bug fixes please contact me. If it's package was useful for you please give a star in GitHub. (really inspiring me to new ones)