New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

devcert-sanscache

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devcert-sanscache - npm Package Compare versions

Comparing version 0.4.3 to 0.4.5

1

lib/index.d.ts
export default function generateDevCert(commonName: string): Promise<{
key: string;
cert: string;
ca: string;
}>;

5

lib/index.js

@@ -16,6 +16,7 @@ "use strict";

await install_authority_1.default(commonName, rootCertPath);
const { keyPath, certPath } = openssl_1.generateSignedCertificate(commonName, opensslConfPath, rootKeyPath, rootCertPath);
const { keyPath, certPath, caPath } = openssl_1.generateSignedCertificate(commonName, opensslConfPath, rootKeyPath, rootCertPath);
const key = fs.readFileSync(keyPath).toString();
const cert = fs.readFileSync(certPath).toString();
return { key, cert };
const ca = fs.readFileSync(caPath).toString();
return { key, cert, ca };
}

@@ -22,0 +23,0 @@ finally {

@@ -9,5 +9,6 @@ export declare function tmpFile(name: string): string;

};
export declare function generateSignedCertificate(commonName: string, opensslConfPath: string, rootKeyPath: string, rootCertPath: string): {
export declare function generateSignedCertificate(commonName: string, opensslConfPath: string, rootKeyPath: string, caPath: string): {
keyPath: string;
certPath: string;
caPath: string;
};

@@ -139,3 +139,3 @@ "use strict";

exports.generateRootCertificate = generateRootCertificate;
function generateSignedCertificate(commonName, opensslConfPath, rootKeyPath, rootCertPath) {
function generateSignedCertificate(commonName, opensslConfPath, rootKeyPath, caPath) {
const keyPath = generateKey();

@@ -149,7 +149,7 @@ process.env.SAN = commonName;

mkdirp.sync(caCertsDir);
openssl(`ca -config ${opensslConfPath} -in ${csrFile} -out ${certPath} -outdir ${caCertsDir} -keyfile ${rootKeyPath} -cert ${rootCertPath} -notext -md sha256 -days 7000 -batch -extensions server_cert`);
openssl(`ca -config ${opensslConfPath} -in ${csrFile} -out ${certPath} -outdir ${caCertsDir} -keyfile ${rootKeyPath} -cert ${caPath} -notext -md sha256 -days 7000 -batch -extensions server_cert`);
rimraf.sync(caCertsDir);
return { keyPath, certPath };
return { keyPath, certPath, caPath };
}
exports.generateSignedCertificate = generateSignedCertificate;
//# sourceMappingURL=openssl.js.map
{
"name": "devcert-sanscache",
"version": "0.4.3",
"version": "0.4.5",
"description": "Generate trusted local SSL/TLS certificates for local SSL development",

@@ -5,0 +5,0 @@ "main": "index.js",

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