Skip to content

Commit 91f38f6

Browse files
maxvpharshil1712
authored andcommitted
[ZT] Update RubyGems cert procedure (#17983)
1 parent 06739ec commit 91f38f6

File tree

1 file changed

+62
-38
lines changed
  • src/content/docs/cloudflare-one/connections/connect-devices/warp/user-side-certificates

1 file changed

+62
-38
lines changed

src/content/docs/cloudflare-one/connections/connect-devices/warp/user-side-certificates/manual-deployment.mdx

Lines changed: 62 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ To verify your download, use a terminal to check that the downloaded certificate
4040
#### SHA1
4141

4242
```sh title="SHA1 .crt example"
43-
openssl x509 -noout -fingerprint -sha1 -inform der -in <Cloudflare_CA.crt>
43+
openssl x509 -noout -fingerprint -sha1 -inform der -in <certificate.crt>
4444
```
4545

4646
```sh output
4747
SHA1 Fingerprint=BB:2D:B6:3D:6B:DE:DA:06:4E:CA:CB:40:F6:F2:61:40:B7:10:F0:6C
4848
```
4949

5050
```sh title="SHA1 .pem example"
51-
openssl x509 -noout -fingerprint -sha1 -inform pem -in <Cloudflare_CA.pem>
51+
openssl x509 -noout -fingerprint -sha1 -inform pem -in <certificate.pem>
5252
```
5353

5454
```sh output
@@ -58,15 +58,15 @@ SHA1 Fingerprint=BB:2D:B6:3D:6B:DE:DA:06:4E:CA:CB:40:F6:F2:61:40:B7:10:F0:6C
5858
#### SHA256
5959

6060
```sh title="SHA256 .crt example"
61-
openssl x509 -noout -fingerprint -sha256 -inform der -in <Cloudflare_CA.crt>
61+
openssl x509 -noout -fingerprint -sha256 -inform der -in <certificate.crt>
6262
```
6363

6464
```sh output
6565
sha256 Fingerprint=F5:E1:56:C4:89:78:77:AD:79:3A:1E:83:FA:77:83:F1:9C:B0:C6:1B:58:2C:2F:50:11:B3:37:72:7C:62:3D:EF
6666
```
6767

6868
```sh title="SHA256 .pem example"
69-
openssl x509 -noout -fingerprint -sha256 -inform pem -in <Cloudflare_CA.pem>
69+
openssl x509 -noout -fingerprint -sha256 -inform pem -in <certificate.pem>
7070
```
7171

7272
```sh output
@@ -108,15 +108,15 @@ The root certificate is now installed and ready to be used.
108108
3. Add the certificate to your keychain:
109109

110110
```sh
111-
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain <path-to-Cloudflare_CA.crt>
111+
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain <path-to-certificate.crt>
112112
```
113113

114114
This keychain will allow all users on the system access to the certificate. If you want to install the certificate to a different keychain, replace `System.keychain` with the name of that keychain.
115115

116116
4. Update the OpenSSL CA Store to include the Cloudflare certificate:
117117

118118
```sh
119-
echo | sudo tee -a /etc/ssl/cert.pem < Cloudflare_CA.pem
119+
echo | sudo tee -a /etc/ssl/cert.pem < certificate.pem
120120
```
121121

122122
The root certificate is now installed and ready to be used.
@@ -167,7 +167,7 @@ The following procedure applies to Debian-based systems, such as Debian, Ubuntu,
167167
3. Copy the certificate to the system, changing the file extension to `.crt`.
168168

169169
```sh
170-
sudo cp Cloudflare_CA.pem /usr/share/ca-certificates/Cloudflare_CA.crt
170+
sudo cp certificate.pem /usr/share/ca-certificates/certificate.crt
171171
```
172172

173173
4. Import the certificate.
@@ -190,7 +190,7 @@ The following procedure applies to Red Hat-based systems, such as CentOS and Red
190190
3. Copy both certificates to the trust store.
191191

192192
```sh
193-
sudo cp Cloudflare_CA.crt Cloudflare_CA.pem /etc/pki/ca-trust/source/anchors
193+
sudo cp certificate.crt certificate.pem /etc/pki/ca-trust/source/anchors
194194
```
195195

196196
4. Import the certificate.
@@ -240,7 +240,7 @@ ChromeOS devices use different methods to store and deploy root certificates. Ce
240240
params={{ one: "Install from SD card" }}
241241
/>
242242

243-
5. In the file open dialog, choose the `Cloudflare_CA.crt` file you downloaded. Select **Open**.
243+
5. In the file open dialog, choose the `certificate.crt` file you downloaded. Select **Open**.
244244
6. Enter a name to identify the certificate. Ensure **Credential use** is set to _VPN and apps_.
245245
7. Select **OK**.
246246

@@ -254,7 +254,7 @@ ChromeOS devices use different methods to store and deploy root certificates. Ce
254254
/>
255255

256256
5. When prompted with a privacy warning, select **Install anyway**.
257-
6. In the file open dialog, choose the `Cloudflare_CA.crt` file you downloaded. Select **Open**.
257+
6. In the file open dialog, choose the `certificate.crt` file you downloaded. Select **Open**.
258258
7. To verify the certificate is installed and trusted, go to **Settings** > **Apps** > **Google Play Store** > **Manage Android Preferences** > **Security** > **Credentials** > **Trusted credentials** > **User**.
259259

260260
</TabItem> </Tabs>
@@ -283,7 +283,7 @@ To install a Cloudflare certificate to Chrome manually:
283283
2. In Chrome, go to **Settings** > **Privacy and security** > **Security**.
284284
3. Select **Manage certificates**.
285285
4. Go to **Authorities**. Select **Import**.
286-
5. In the file open dialog, choose the `Cloudflare_CA.pem` file you downloaded.
286+
5. In the file open dialog, choose the `certificate.pem` file you downloaded.
287287
6. In the dialog box, turn on _Trust this certificate for identifying websites_, _Trust this certificate for identifying email users_, and _Trust this certificate for identifying software makers_. Select **OK**.
288288
7. To verify the certificate was installed and trusted, locate it in **Authorities**.
289289

@@ -297,7 +297,7 @@ To install a Cloudflare certificate to Firefox manually:
297297
2. In Firefox, go to **Settings** > **Privacy & Security**.
298298
3. In **Security**, select **Certificates** > **View Certificates**.
299299
4. In **Authorities**, select **Import**.
300-
5. In the file open dialog, choose the `Cloudflare_CA.pem` file you downloaded.
300+
5. In the file open dialog, choose the `certificate.pem` file you downloaded.
301301
6. In the dialog box, turn on _Trust this CA to identify websites_ and _Trust this CA to identify email users_. Select **OK**.
302302
7. To verify the certificate was installed and trusted, locate it in the table under **Cloudflare**.
303303

@@ -312,7 +312,7 @@ The command to install the certificate with Python on Windows automatically incl
312312
1. [Download a Cloudflare certificate](#download-the-cloudflare-root-certificate) in `.crt` format.
313313
2. Update the bundle to include the Cloudflare certificate:
314314
```powershell
315-
gc "$env:USERPROFILE\Downloads\Cloudflare_CA.crt" | ac C:\Python37\Lib\site-packages\pip\_vendor\certifi\cacert.pem
315+
gc "$env:USERPROFILE\Downloads\certificate.crt" | ac C:\Python37\Lib\site-packages\pip\_vendor\certifi\cacert.pem
316316
```
317317

318318
#### Python on Mac and Linux
@@ -338,7 +338,7 @@ The command to install the certificate with Python on Windows automatically incl
338338
4. Append the Cloudflare certificate to this CA store by running:
339339

340340
```sh
341-
echo | cat - Cloudflare_CA.pem >> $(python -m certifi)
341+
echo | cat - certificate.pem >> $(python -m certifi)
342342
```
343343

344344
5. If needed, configure system variables to point to this CA store:
@@ -386,7 +386,7 @@ The command to install the certificate with Python on Windows automatically incl
386386
3. The `http.sslcainfo` defines the CA Certificate store. To append the Cloudflare certificate to the CA bundle, update `http.sslcainfo`.
387387

388388
```powershell
389-
gc .\Cloudflare_CA.pem | ac $(git config --get http.sslcainfo)
389+
gc .\certificate.pem | ac $(git config --get http.sslcainfo)
390390
```
391391

392392
#### Git on Mac and Linux
@@ -427,7 +427,7 @@ The commands below will set the Google Cloud SDK to use a Cloudflare certificate
427427
3. Combine the certs into a single `.pem` file.
428428

429429
```sh
430-
cat cacert.pem Cloudflare_CA.pem > ~/ca.pem
430+
cat cacert.pem certificate.pem > ~/ca.pem
431431
```
432432

433433
4. Configure Google Cloud to use the combined `.pem`.
@@ -447,7 +447,7 @@ If you use Kaniko with Google Cloud SDK, you must install a Cloudflare certifica
447447

448448
#### Google Drive for desktop
449449

450-
To trust the Cloudflare root certificate in the Google Drive desktop application, follow the procedure for your operating system. These steps require you to [download the .pem certificate](#download-the-cloudflare-root-certificate).
450+
To trust a Cloudflare root certificate in the Google Drive desktop application, follow the procedure for your operating system. These steps require you to [download the .pem certificate](#download-the-cloudflare-root-certificate).
451451

452452
<Details header="macOS">
453453

@@ -458,7 +458,7 @@ To trust the Cloudflare root certificate in the Google Drive desktop application
458458
3. Append the contents of `cloudflare.pem` to the end of `roots.pem`.
459459

460460
```sh
461-
cat ~/Downloads/Cloudflare_CA.pem >> path/to/roots.pem
461+
cat ~/Downloads/certificate.pem >> path/to/roots.pem
462462
```
463463

464464
4. Apply the newly created root certificate to your Google Drive application.
@@ -484,7 +484,7 @@ defaults read /Library/Preferences/com.google.drivefs.settings
484484
3. Append the contents of `cloudflare.pem` to the end of `roots.pem`.
485485

486486
```powershell
487-
cat ~\Downloads\Cloudflare_CA.pem >> path\to\roots.pem
487+
cat ~\Downloads\certificate.pem >> path\to\roots.pem
488488
```
489489

490490
4. Update the Google Drive registry key.
@@ -509,11 +509,11 @@ Google Apps Manager (GAM) uses its own certificate store. To add a Cloudflare ce
509509

510510
### AWS CLI
511511

512-
If you're using the AWS CLI, you need to set the `AWS_CA_BUNDLE` environment variable to use the Cloudflare root certificate. Commands are available for different operating systems in the [AWS instructions](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html).
512+
If you're using the AWS CLI, you need to set the `AWS_CA_BUNDLE` environment variable to use a Cloudflare root certificate. Commands are available for different operating systems in the [AWS instructions](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html).
513513

514514
### PHP Composer
515515

516-
The command below will set the [`cafile`](https://getcomposer.org/doc/06-config.md#cafile) configuration inside of `composer.json` to use the Cloudflare root certificate. Make sure to use the certificate in the [`.pem`](/cloudflare-one/static/Cloudflare_CA.pem) file type.
516+
The command below will set the [`cafile`](https://getcomposer.org/doc/06-config.md#cafile) configuration inside of `composer.json` to use the Cloudflare root certificate. Make sure to [download the certificate](#download-the-cloudflare-root-certificate) in the `.pem` file type.
517517

518518
```sh
519519
composer config cafile [PATH_TO_CLOUDFLARE_CERT.pem]
@@ -523,7 +523,7 @@ Alternatively, you can add this manually to your `composer.json` file under the
523523

524524
### JetBrains
525525

526-
To install the Cloudflare root certificate on JetBrains products, refer to the links below:
526+
To install a Cloudflare root certificate on JetBrains products, refer to the links below:
527527

528528
- [AppCode](https://www.jetbrains.com/help/objc/settings-tools-server-certificates.html)
529529
- [CLion](https://www.jetbrains.com/help/clion/settings-tools-server-certificates.html)
@@ -538,7 +538,7 @@ To install the Cloudflare root certificate on JetBrains products, refer to the l
538538

539539
### Eclipse
540540

541-
To install the Cloudflare root certificate on Eclipse IDE for Java Developers, you must add the certificate to the Java virtual machine (JVM) used by Eclipse.
541+
To install a Cloudflare root certificate on Eclipse IDE for Java Developers, you must add the certificate to the Java virtual machine (JVM) used by Eclipse.
542542

543543
1. [Download a Cloudflare certificate](#download-the-cloudflare-root-certificate).
544544

@@ -568,7 +568,7 @@ To install the Cloudflare root certificate on Eclipse IDE for Java Developers, y
568568
2. Run `keytool` to install and trust the Cloudflare certificate.
569569

570570
```sh
571-
"$JAVA_HOME/bin/keytool" -import -file ~/Downloads/Cloudflare_CA.crt -alias CloudflareRootCA -keystore "$JAVA_HOME/lib/security/cacerts" -storepass changeit -trustcacerts -noprompt
571+
"$JAVA_HOME/bin/keytool" -import -file ~/Downloads/certificate.crt -alias CloudflareRootCA -keystore "$JAVA_HOME/lib/security/cacerts" -storepass changeit -trustcacerts -noprompt
572572
```
573573

574574
3. Restart Eclipse.
@@ -586,7 +586,7 @@ set JAVA_HOME="\path\to\java.home"
586586
2. Run `keytool` to install and trust the Cloudflare certificate.
587587

588588
```powershell
589-
"%JAVA_HOME%\bin\keytool.exe" -import -file "%UserProfile%\Downloads\Cloudflare_CA.crt" -alias CloudflareRootCA -keystore "%JAVA_HOME%\lib\security\cacerts" -storepass changeit -trustcacerts -noprompt
589+
"%JAVA_HOME%\bin\keytool.exe" -import -file "%UserProfile%\Downloads\certificate.crt" -alias CloudflareRootCA -keystore "%JAVA_HOME%\lib\security\cacerts" -storepass changeit -trustcacerts -noprompt
590590
```
591591

592592
3. Restart Eclipse.
@@ -597,7 +597,7 @@ For more information on adding certificates to Eclipse with `keytool`, refer to
597597

598598
### RubyGems
599599

600-
To trust the Cloudflare root certificate in RubyGems, follow the procedure for your operating system. These steps require you to [download a `.pem` certificate](#download-the-cloudflare-root-certificate).
600+
To trust a Cloudflare root certificate in RubyGems, follow the procedure for your operating system. These steps require you to [download a `.pem` certificate](#download-the-cloudflare-root-certificate).
601601

602602
<Details header="macOS and Linux">
603603

@@ -606,51 +606,75 @@ To trust the Cloudflare root certificate in RubyGems, follow the procedure for y
606606
2. In a terminal, format the Cloudflare certificate for Ruby.
607607

608608
```sh
609-
openssl x509 -inform DER -in ~/Downloads/Cloudflare_CA.pem -out ruby-root-ca.crt
609+
openssl x509 -in ~/Downloads/certificate.pem -out ~/Downloads/ruby-root-ca.crt
610610
```
611611

612-
3. Add your RubyGems directory as an environment variable.
612+
3. Create a RubyGems certificate directory in your home folder.
613613

614614
```sh
615-
export RUBY_DIR=$(gem which rubygems)
615+
mkdir -p ~/.gem/ssl
616616
```
617617

618618
4. Copy the Cloudflare certificate to your RubyGems certificate store.
619619

620620
```sh
621-
cp ~/Downloads/ruby-root-ca.crt $RUBY_DIR/ssl_cert/rubygems.org
621+
cp ~/Downloads/ruby-root-ca.crt ~/.gem/ssl/rubygems.org.pem
622622
```
623623

624-
5. Restart RubyGems.
624+
5. Configure RubyGems to use the certificate.
625+
626+
```sh
627+
gem sources --add-trusted-cert ~/.gem/ssl/rubygems.org.pem
628+
```
629+
630+
Alternatively, add the following line to your RubyGems configuration file located in `~/.gemrc` file to globally trust the certificate:
631+
632+
```yaml
633+
:ssl_cert: ~/.gem/ssl/rubygems.org.pem
634+
```
635+
636+
6. Restart any terminal sessions.
625637
626638
</Details>
627639
628640
<Details header="Windows">
629641
630642
1. Install [OpenSSL for Windows](https://slproweb.com/products/Win32OpenSSL.html).
631643
632-
2. In a terminal, format the Cloudflare certificate for Ruby.
644+
2. In a PowerShell terminal, format the Cloudflare certificate for Ruby.
633645
634646
```powershell
635-
openssl x509 -inform DER -in %UserProfile%\Downloads\Cloudflare_CA.pem -out ruby-root-ca.crt
647+
openssl x509 -in %UserProfile%\Downloads\certificate.pem -out %UserProfile%\Downloads\ruby-root-ca.crt
636648
```
637649

638-
3. Add your RubyGems directory as an environment variable.
650+
3. Create a RubyGems certificate directory in your home folder.
639651

640652
```powershell
641-
set RUBY_DIR=gem which rubygems
653+
mkdir -Force "$env:USERPROFILE\.gem\ssl"
642654
```
643655

644656
4. Copy the Cloudflare certificate to your RubyGems certificate store.
645657

646658
```powershell
647-
copy %UserProfile%\Downloads\ruby-root-ca.crt %RUBY_DIR%\ssl_cert\rubygems.org
659+
Copy-Item "$env:USERPROFILE\Downloads\ruby-root-ca.crt" "$env:USERPROFILE\.gem\ssl\rubygems.org.pem"
660+
```
661+
662+
5. Configure RubyGems to use the certificate.
663+
664+
```powershell
665+
gem sources --add-trusted-cert "$env:USERPROFILE\.gem\ssl\rubygems.org.pem"
666+
```
667+
668+
Alternatively, add the following line to your RubyGems configuration file located in `$HOME\.gemrc` to globally trust the certificate:
669+
670+
```yaml
671+
:ssl_cert: C:/Users/<username>/.gem/ssl/rubygems.org.pem
648672
```
649673
650-
5. Restart RubyGems.
674+
6. Restart any terminal sessions.
651675
652676
</Details>
653677
654678
### Minikube
655679
656-
To trust the Cloudflare root certificate in Minikube, refer to [x509: certificate signed by unknown authority](https://minikube.sigs.k8s.io/docs/handbook/vpn_and_proxy/#x509-certificate-signed-by-unknown-authority).
680+
To trust a Cloudflare root certificate in Minikube, refer to [x509: certificate signed by unknown authority](https://minikube.sigs.k8s.io/docs/handbook/vpn_and_proxy/#x509-certificate-signed-by-unknown-authority).

0 commit comments

Comments
 (0)