Skip to content

Commit

Permalink
feat: Use same nssdb path for roKeyStore and Chromium OS-17053
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bashir-bs committed Jun 12, 2024
1 parent 8394ebb commit 2d12c0d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions patches/chromium/.patches
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,4 @@ brightsign_add_support_for_brightsign_video_player.patch
video_player_reuse_os-14887.patch
os-16623_add_setopacity_to_wayland_toplevel_window.patch
os-17230_fix_ozone_image_gl_texture_holder_memory_leak.patch
os-17053_use_same_nssdb_path_for_rokeystore_and_chromium.patch
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;

0 comments on commit 2d12c0d

Please sign in to comment.