forked from electron/electron
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Use same nssdb path for roKeyStore and Chromium OS-17053
- Loading branch information
1 parent
8394ebb
commit 2d12c0d
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
patches/chromium/os-17053_use_same_nssdb_path_for_rokeystore_and_chromium.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Tariq Bashir <120014322+t-bashir-bs@users.noreply.github.com> | ||
Date: Tue, 28 May 2024 15:34:10 +0100 | ||
Subject: OS-17053: Use same nssdb path for roKeyStore and Chromium | ||
|
||
This change has been cherry picked from the QtWebEngine patch | ||
I94eb625e805f9b2fe19c85f8f574f5725f0dbd46. | ||
|
||
roKeyStore creates/uses a nssdb store in /var/run/.pki/nssdb, whereas | ||
Chromium expects it to be in user home directory, which is not writable | ||
for us. | ||
|
||
Modified Chromium source code to use the same nssdb as roKeyStore. | ||
|
||
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc | ||
index 08c98c6518dccacd006108992ba6a27412451f4f..e4b6d41c8b43cfe66065b3da887c3014f9800571 100644 | ||
--- a/crypto/nss_util.cc | ||
+++ b/crypto/nss_util.cc | ||
@@ -44,8 +44,7 @@ static const base::FilePath::CharType kReadOnlyCertDB[] = | ||
#else | ||
|
||
base::FilePath GetDefaultConfigDirectory() { | ||
- base::FilePath dir; | ||
- base::PathService::Get(base::DIR_HOME, &dir); | ||
+ base::FilePath dir("/var/run"); | ||
if (dir.empty()) { | ||
LOG(ERROR) << "Failed to get home directory."; | ||
return dir; |