-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
devcert is using debian specific commands for linux #51
Comments
This may be a helpful reference for arch and other distros using Edit: Got it working on manjaro using diff --git a/node_modules/devcert/dist/platforms/linux.js b/node_modules/devcert/dist/platforms/linux.js
index f378686..c1ada00 100644
--- a/node_modules/devcert/dist/platforms/linux.js
+++ b/node_modules/devcert/dist/platforms/linux.js
@@ -14,7 +14,7 @@ class LinuxPlatform {
this.FIREFOX_NSS_DIR = path_1.default.join(process.env.HOME, '.mozilla/firefox/*');
this.CHROME_NSS_DIR = path_1.default.join(process.env.HOME, '.pki/nssdb');
this.FIREFOX_BIN_PATH = '/usr/bin/firefox';
- this.CHROME_BIN_PATH = '/usr/bin/google-chrome';
+ this.CHROME_BIN_PATH = '/usr/bin/google-chrome-stable';
this.HOST_FILE_PATH = '/etc/hosts';
}
/**
@@ -30,9 +30,9 @@ class LinuxPlatform {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
debug('Adding devcert root CA to Linux system-wide trust stores');
// run(`sudo cp ${ certificatePath } /etc/ssl/certs/devcert.crt`);
- utils_1.run('sudo', ['cp', certificatePath, '/usr/local/share/ca-certificates/devcert.crt']);
+ utils_1.run('sudo', ['cp', certificatePath, '/etc/ca-certificates/trust-source/anchors/devcert.crt']);
// run(`sudo bash -c "cat ${ certificatePath } >> /etc/ssl/certs/ca-certificates.crt"`);
- utils_1.run('sudo', ['update-ca-certificates']);
+ utils_1.run('sudo', ['trust', 'extract-compat']);
if (this.isFirefoxInstalled()) {
// Firefox
debug('Firefox install detected: adding devcert root CA to Firefox-specific trust stores ...');
@@ -70,11 +70,11 @@ class LinuxPlatform {
}
removeFromTrustStores(certificatePath) {
try {
- utils_1.run('sudo', ['rm', '/usr/local/share/ca-certificates/devcert.crt']);
- utils_1.run('sudo', ['update-ca-certificates']);
+ utils_1.run('sudo', ['rm', '/etc/ca-certificates/trust-source/anchors/devcert.crt']);
+ utils_1.run('sudo', ['trust', 'extract-compat']);
}
catch (e) {
- debug(`failed to remove ${certificatePath} from /usr/local/share/ca-certificates, continuing. ${e.toString()}`);
+ debug(`failed to remove ${certificatePath} from /etc/ca-certificates/trust-source/anchors, continuing. ${e.toString()}`);
}
if (command_exists_1.sync('certutil')) {
if (this.isFirefoxInstalled()) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The package
update-ca-certificates
used here is specific to debian, while most linux distributions use thetrust
package, which is also included in debian. The relevant flag beingtrust --extract-compat
. We should switch, but a simple replacement of the commands didn't work, so not sure when I'll have time to learn about what's going on, meantime posting here.The text was updated successfully, but these errors were encountered: