Skip to content

Commit

Permalink
[ZT] Update GDrive cert procedure (#19374)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxvp authored Jan 23, 2025
1 parent e52cc45 commit 2f4522a
Showing 1 changed file with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -715,20 +715,22 @@ To trust a Cloudflare root certificate in the Google Drive desktop application,
<Tabs>
<TabItem label="macOS" icon="apple">

1. In the Finder menu bar, go to **Go** > **Go to Folder**. Enter `/Applications/Google Drive.app/Contents/Resources`.
1. In a terminal, copy the contents of the Google Drive certificate file to a new certificate file in a permanent location, such as your Documents folder. For example:

2. Find `roots.pem` and copy it to a permanent location, such as your Documents folder.
```sh
cat /Applications/"Google Drive.app"/Contents/Resources/roots.pem > ~/Documents/gdrivecerts.pem
```

3. Append the contents of `cloudflare.pem` to the end of `roots.pem`.
2. Append the contents of the downloaded certificate to the end of the new file. For example:

```sh
cat ~/Downloads/certificate.pem >> path/to/roots.pem
cat ~/Downloads/certificate.pem >> ~/Documents/gdrivecerts.pem
```

4. Apply the newly created root certificate to your Google Drive application.
3. Apply the newly created root certificate to your Google Drive application. For example:

```sh
sudo defaults write /Library/Preferences/com.google.drivefs.settings TrustedRootCertsFile -string "path/to/roots.pem"
sudo defaults write /Library/Preferences/com.google.drivefs.settings TrustedRootCertsFile "/Users/$(whoami)/Documents/gdrivecerts.pem"
```

You can verify the update with the following command.
Expand All @@ -741,26 +743,28 @@ defaults read /Library/Preferences/com.google.drivefs.settings

<TabItem label="Windows" icon="seti:windows">

1. In File Explorer, go to `\Program Files\Google\Drive File Stream\<version>\config\`.
1. In an administrator PowerShell terminal, copy the contents of the Google Drive certificate file to a new certificate file in a permanent location, such as your Documents folder. For example:

2. Find `roots.pem` and copy it to a permanent location, such as your Documents folder.
```powershell
Get-Content "C:\Program Files\Google\Drive File Stream\roots.pem" | Set-Content "$HOME\Documents\gdrivecerts.pem"
```

3. Append the contents of `cloudflare.pem` to the end of `roots.pem`.
2. Append the contents of the downloaded certificate to the end of the new file. For example:

```powershell
cat ~\Downloads\certificate.pem >> path\to\roots.pem
Get-Content "$HOME\Downloads\certificate.pem" | Add-Content "$HOME\Documents\gdrivecerts.pem"
```

4. Update the Google Drive registry key.
3. Apply the newly created root certificate to your Google Drive application. For example:

```powershell
reg ADD "HKEY_LOCAL_MACHINE\Software\Google\DriveFS" /v TrustedRootCertsFile /t REG_SZ /d "path\to\roots.pem"
Set-ItemProperty -Path "HKLM:\SOFTWARE\Google\DriveFS" -Name "TrustedRootCertsFile" -Value "$HOME\Documents\gdrivecerts.pem"
```

You can verify the update with the following command.

```powershell
reg QUERY "HKEY_LOCAL_MACHINE\Software\Google\DriveFS" /v TrustedRootCertsFile"
Get-ItemProperty -Path "HKLM:\SOFTWARE\Google\DriveFS" | Select-Object TrustedRootCertsFile
```

</TabItem>
Expand Down

0 comments on commit 2f4522a

Please sign in to comment.