JSPM

simple-open-ssl

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q34038F
  • License Apache-2.0

OpenSSL Interop so you can run commands from Javascript

Package Exports

  • simple-open-ssl
  • simple-open-ssl/open-ssl.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (simple-open-ssl) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Simple OpenSSL for Javascript

Executes an OpenSSL command synchronously

import { runCommandSync } from 'simple-open-ssl';

const standardOutput = runCommandSync(`x509 -in certificate.pem -enddate -noout`);

runCommandSync

/**
 * Executes an `OpenSSL` command synchronously.
 * 
 * @remark
 * `Windows` - Will use the packaged version of `OpenSSL`, which should always work
 * 
 * @remark
 * `Linux` - Will use the local version of `OpenSSL`, which should be installed but can be installed with a package manager `... install openssl`
 *
 * @param {string} opensslCommand - The OpenSSL command to be executed, including any arguments.
 * @returns {string|undefined} The standard output from the executed command, or `undefined` if the command execution fails.
 */
export function runCommandSync(opensslCommand)