Skip to content

Commit 35aea9c

Browse files
authored
docs: small updates for the cert instructions (#327)
* Update the cert instructions - Use docs style to use bold for UI elements now that we have markdown support - Tighten up the CLI line breaks a bit - Minor wording updates * Fix tests I broke
1 parent 2eb9579 commit 35aea9c

File tree

7 files changed

+31
-38
lines changed

7 files changed

+31
-38
lines changed
+5-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
1. Install the `certutil` tool using the appropriate command for your distribution:
2-
- **Ubuntu/Debian**: `sudo apt install libnss3-tools`
1+
1. Install the `certutil` tool using the appropriate command for your distribution:
2+
- **Ubuntu/Debian**: `sudo apt install libnss3-tools`
33
- **RHEL/Fedora**: `sudo dnf install nss-tools`
4-
2. Run the following command to install the certificate for your account:
4+
2. Add the certificate to your account's NSS shared database:
55
```shell
66
certutil -d sql:$HOME/.pki/nssdb \
7-
-A \
8-
-t "C,," \
9-
-n CodeGate-CA \
10-
-i ~/Downloads/codegate.crt
7+
-A -t "C,," -n CodeGate-CA \
8+
-i ~/Downloads/codegate.crt
119
```
1210
3. Restart VS Code.

src/markdown/certificates/linux-remove.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1. Run the following command to uninstall the certificate from your account:
1+
1. Remove the certificate from your account:
22
```shell
33
certutil -d sql:$HOME/.pki/nssdb -D -n CodeGate-CA
44
```
+8-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
### CLI method
22

3-
After downloading the certificate, open a terminal and run the following command:
3+
After downloading the certificate, open a terminal and run:
44

55
```shell
6-
security add-trusted-cert \
7-
-d \
8-
-r trustRoot \
9-
-p ssl \
10-
-p basic \
11-
-k ~/Library/Keychains/login.keychain \
12-
~/Downloads/codegate.crt
6+
security add-trusted-cert -d -r trustRoot -p ssl -p basic \
7+
-k ~/Library/Keychains/login.keychain \
8+
~/Downloads/codegate.crt
139
```
1410

1511
### GUI method
1612

1713
1. Open the downloaded certificate file; Keychain Access will open.
18-
2. Depending on your macOS version, you may see the Add Certificates dialog. If so, select the `login` keychain, and click Add.
19-
3. In Keychain Access, select the `login` keychain from the Default Keychains list on the left.
20-
4. Search for "CodeGate" (it may not appear until you search), then in the search results, double-click the "CodeGate CA" certificate.
21-
5. Expand the Trust section and set the "Secure Sockets Layer" and "X.509 Basic Policy" options to "Always Trust".
14+
2. Depending on your macOS version, you may see the **Add Certificates** dialog. If so, select the `login` keychain and click **Add**.
15+
3. In Keychain Access, select the **login** keychain from the list on the left.
16+
4. Search for "CodeGate" (it may not appear until you search), then double-click the "CodeGate CA" certificate in the search results.
17+
5. Expand the **Trust** section and set the "Secure Sockets Layer" and "X.509 Basic Policy" options to **Always Trust**.
+7-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
### CLI method
22

3-
Open a terminal and run the following command:
4-
3+
Open a terminal and run:
4+
55
```shell
6-
security delete-certificate \
7-
-c "CodeGate CA" \
8-
-t ~/Library/Keychains/login.keychain
6+
security delete-certificate -c "CodeGate CA" \
7+
-t ~/Library/Keychains/login.keychain
98
```
109

1110
### GUI method
1211

13-
1. Launch the Keychain Access app (Note: on newer macOS versions, Keychain Access is hidden from Launcher, but can be run from Spotlight Search).
14-
2. Select the login keychain and search for "CodeGate".
15-
3. Right-click the "CodeGate CA" certificate and Delete the certificate.
12+
1. Launch the **Keychain Access** app. Note: on newer macOS versions, Keychain Access is hidden from Launcher but can be opened from Spotlight Search.
13+
2. Select the **login** keychain and search for "CodeGate".
14+
3. Right-click the "CodeGate CA" certificate and select **Delete "CodeGate CA"**.
1615
4. Confirm the deletion when prompted.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
1. Double-click the downloaded certificate file.
2-
2. Click "Install Certificate".
3-
3. Select "Current User" and click Next.
2+
2. Click **Install Certificate**.
3+
3. Select "Current User" and click **Next**.
44
4. Choose "Place all certificates in the following store".
5-
5. Click Browse and select "Trusted Root Certification Authorities".
6-
6. Click Next and Finish.
5+
5. Click **Browse** and select "Trusted Root Certification Authorities".
6+
6. Click **Next** and then **Finish**.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
1. Open "Run" (Win + R) and enter `certmgr.msc`.
22
2. Navigate to "Trusted Root Certification Authorities" → "Certificates".
33
3. Find the "CodeGate CA" certificate.
4-
4. Right-click and Delete the certificate.
4+
4. Right-click the certificate and select **Delete**.
55
5. Confirm the deletion when prompted.

src/routes/__tests__/route-certificates.test.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ describe('Certificates', () => {
6060
).toBeVisible()
6161
expect(screen.getByRole('heading', { name: 'GUI method' })).toBeVisible()
6262
expect(
63-
screen.getByText('Launch the Keychain Access app', { exact: false })
63+
screen.getByText('Right-click the "CodeGate CA" certificate', {
64+
exact: false,
65+
})
6466
).toBeVisible()
6567
})
6668

@@ -86,17 +88,15 @@ describe('Certificates', () => {
8688

8789
expect(
8890
screen.getByText(
89-
'Run the following command to install the certificate for your account:'
91+
"Add the certificate to your account's NSS shared database:"
9092
)
9193
).toBeVisible()
9294

9395
await userEvent.click(
9496
screen.getByRole('button', { name: 'Remove certificate' })
9597
)
9698
expect(
97-
screen.getByText(
98-
'Run the following command to uninstall the certificate from your account:'
99-
)
99+
screen.getByText('Remove the certificate from your account:')
100100
).toBeVisible()
101101
})
102102
})

0 commit comments

Comments
 (0)