Comparing version 1.0.0-beta.6 to 1.0.0-beta.7
@@ -71,6 +71,7 @@ "use strict"; | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
debug(`Fetching devcert's certificate authority credentials from the system keychain`); | ||
let rootKeyPath = tmp_1.fileSync().name; | ||
let rootCertPath = tmp_1.fileSync().name; | ||
let key = yield keychain.getPassword('devcert', 'certificate-authority-key'); | ||
let cert = yield keychain.getPassword('devcert', 'certificate-authority-cert'); | ||
let cert = yield keychain.getPassword('devcert', 'certificate-authority-certificate'); | ||
fs_1.writeFileSync(rootKeyPath, key); | ||
@@ -84,2 +85,3 @@ fs_1.writeFileSync(rootCertPath, cert); | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
debug(`Adding devcert's certificate authority credentials to the system keychain`); | ||
let key = fs_1.readFileSync(keypath, 'utf-8'); | ||
@@ -91,2 +93,2 @@ let cert = fs_1.readFileSync(certpath, 'utf-8'); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VydGlmaWNhdGUtYXV0aG9yaXR5LmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9kYXcvb3NzL2RldmNlcnQvIiwic291cmNlcyI6WyJjZXJ0aWZpY2F0ZS1hdXRob3JpdHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkJBQTRGO0FBQzVGLHFDQUFxQztBQUNyQywyQkFBMkI7QUFDM0IsNkJBQXNDO0FBQ3RDLG1DQUFtQztBQUVuQywyQ0FPcUI7QUFDckIsNkNBQW9EO0FBQ3BELDZDQUFzRDtBQUN0RCxpREFBMEQ7QUFDMUQsbUNBQWtDO0FBQ2xDLGlEQUE2QztBQUc3QyxNQUFNLEtBQUssR0FBRyxXQUFXLENBQUMsK0JBQStCLENBQUMsQ0FBQztBQUUzRDs7O0dBR0c7QUFDSCxxQ0FBMEQsVUFBbUIsRUFBRTs7UUFDN0UsS0FBSyxDQUFDLHl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YXN5bmMgZnVuY3Rpb24gYWRkQ2VydGlmaWNhdGVBdXRob3JpdHlUb1N5c3RlbUtleWNoYWluKGtleXBhdGg6IHN0cmluZywgY2VydHBhdGg6IHN0cmluZykge1xuICBkZWJ1ZyhgQWRkaW5nIGRldmNlcnQncyBjZXJ0aWZpY2F0ZSBhdXRob3JpdHkgY3JlZGVudGlhbHMgdG8gdGhlIHN5c3RlbSBrZXljaGFpbmApO1xuICBsZXQga2V5ID0gcmVhZEZpbGUoa2V5cGF0aCwgJ3V0Zi04Jyk7XG4gIGxldCBjZXJ0ID0gcmVhZEZpbGUoY2VydHBhdGgsICd1dGYtOCcpO1xuICBhd2FpdCBrZXljaGFpbi5zZXRQYXNzd29yZCgnZGV2Y2VydCcsICdjZXJ0aWZpY2F0ZS1hdXRob3JpdHkta2V5Jywga2V5KTtcbiAgYXdhaXQga2V5Y2hhaW4uc2V0UGFzc3dvcmQoJ2RldmNlcnQnLCAnY2VydGlmaWNhdGUtYXV0aG9yaXR5LWNlcnRpZmljYXRlJywgY2VydCk7XG59Il19 |
{ | ||
"name": "devcert", | ||
"version": "1.0.0-beta.6", | ||
"version": "1.0.0-beta.7", | ||
"description": "Generate trusted local SSL/TLS certificates for local SSL development", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -82,6 +82,7 @@ import { unlinkSync as rm, readFileSync as readFile, writeFileSync as writeFile } from 'fs'; | ||
export async function fetchCertificateAuthorityCredentials() { | ||
debug(`Fetching devcert's certificate authority credentials from the system keychain`); | ||
let rootKeyPath = tmp().name; | ||
let rootCertPath = tmp().name; | ||
let key = await keychain.getPassword('devcert', 'certificate-authority-key'); | ||
let cert = await keychain.getPassword('devcert', 'certificate-authority-cert'); | ||
let cert = await keychain.getPassword('devcert', 'certificate-authority-certificate'); | ||
writeFile(rootKeyPath, key); | ||
@@ -93,2 +94,3 @@ writeFile(rootCertPath, cert); | ||
async function addCertificateAuthorityToSystemKeychain(keypath: string, certpath: string) { | ||
debug(`Adding devcert's certificate authority credentials to the system keychain`); | ||
let key = readFile(keypath, 'utf-8'); | ||
@@ -95,0 +97,0 @@ let cert = readFile(certpath, 'utf-8'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
204784
1392