Skip to content

Commit 9ad2171

Browse files
committed
simple-open-ssl
1 parent 624da4c commit 9ad2171

File tree

4 files changed

+30
-14
lines changed

4 files changed

+30
-14
lines changed

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,31 @@
22

33
# Simple OpenSSL for Javascript
44

5-
Execute `OpenSSL` commands directly from JavaScript. Provides a simple, cross-platform interface for cryptographic operations, certificate management, and security tasks.
5+
Execute `OpenSSL` commands directly from `JavaScript`.
6+
7+
Provides a simple, cross-platform interface for cryptographic operations, certificate management, and security tasks.
8+
9+
#### Usage:
610

711
```javascript
812
import { runCommandSync } from 'simple-open-ssl';
913

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

13-
Windows:
17+
#### Windows:
18+
19+
Uses the included packaged version
1420

1521
```
16-
Uses included packaged version
1722
OpenSSL 3.2.3 3 Sep 2024 (Library: OpenSSL 3.2.3 3 Sep 2024)
1823
```
1924

20-
Linux/Other:
25+
#### Linux/Other:
26+
27+
Uses the local version of `OpenSSl` that is already installed
28+
2129
```
22-
Uses local version which should be preinstalled
2330
manual install required if its not
2431
Debian: sudo apt install openssl
2532
RHEL: sudo yum install openssl
@@ -28,11 +35,18 @@ MacOS: brew install openssl
2835

2936
---------------------
3037

31-
### runCommandSync
38+
# Exports
3239

33-
```
40+
### `runCommandSync`
41+
42+
Executes an OpenSSL command synchronously.
43+
44+
<details>
45+
<summary><b>Show jsdoc</b></summary>
46+
47+
```javascript
3448
/**
35-
* Executes an OpenSSL command synchronously across different platforms.
49+
* Executes an OpenSSL command synchronously.
3650
*
3751
* @description
3852
* This function runs OpenSSL commands with platform-specific handling:
@@ -48,4 +62,6 @@ MacOS: brew install openssl
4862
* @returns {string|undefined} The standard output from the executed command, or `undefined` if the command execution fails.
4963
*/
5064
export function runCommandSync(opensslCommand, execOptions = { encoding: 'utf-8' }) { /* */ }
51-
```
65+
```
66+
67+
</details>

open-ssl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const __plaformWindows = platform() === 'win32';
88
const __opensslPath = join(dirname(fileURLToPath(import.meta.url)), "openssl", "bin", "openssl.exe");
99

1010
/**
11-
* Executes an OpenSSL command synchronously across different platforms.
11+
* Executes an OpenSSL command synchronously.
1212
*
1313
* @description
1414
* This function runs OpenSSL commands with platform-specific handling:

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "simple-open-ssl",
33
"author": "FirstTimeEZ",
4-
"version": "1.0.6",
4+
"version": "1.0.7",
55
"description": "Execute OpenSSL commands directly from JavaScript. Provides a simple, cross-platform interface for cryptographic operations, certificate management, and security tasks.",
66
"main": "open-ssl.js",
77
"type": "module",
@@ -61,5 +61,5 @@
6161
"type": "git",
6262
"url": "git+https://github.com/FirstTimeEZ/simple-open-ssl.git"
6363
},
64-
"homepage": "https://github.com/FirstTimeEZ/simple-open-ssl"
64+
"homepage": "https://github.com/FirstTimeEZ/server-ssl"
6565
}

0 commit comments

Comments
 (0)