Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Can't install "Cloudflare_CA.pem" using the "add-trusted-certificate" command. #20405

Closed
ghost opened this issue Jun 2, 2024 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 2, 2024

I think that the problem can be solved by installing the Cloudflare certificate on Termux.
https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/user-side-certificates/install-cloudflare-cert/
#1546

For some reason I can't install the certificate.

~ $ wget https://developers.cloudflare.com/cloudflare-one/static/Cloudflare_CA.pem
--2024-06-02 20:45:38--  https://developers.cloudflare.com/cloudflare-one/static/Cloudflare_CA.pem
Resolving developers.cloudflare.com (developers.cloudflare.com)... 104.16.6.189, 104.16.4.189, 104.16.5.189, ...
Connecting to developers.cloudflare.com (developers.cloudflare.com)|104.16.6.189|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1073 (1.0K) [application/x-x509-ca-cert]
Saving to: ‘Cloudflare_CA.pem’

Cloudflare_C 100%   1.05K  --.-KB/s    in 0s

2024-06-02 20:45:39 (41.4 MB/s) - ‘Cloudflare_CA.pem’ saved [1073/1073]

~ $ add-trusted-certificate Cloudflare_CA.pem
Copying Cloudflare_CA.pem to /data/data/com.termux/files/usr/etc/tls/certs/
Doing /data/data/com.termux/files/usr/etc/tls/certs/
rehash: warning: skipping Cloudflare_CA.crt,it does not contain exactly one certificate or CRL
link Cloudflare_CA.pem -> c38b367a.0

bepass-org/warp-plus#146 (comment)

I appreciate your help in advance.

PS: I hope that I am not breaking any rules or something.

@ghost ghost changed the title Can't install "Cloudflare_CA.pem" using the "add-trusted-certificate" command. [Bug]: Can't install "Cloudflare_CA.pem" using the "add-trusted-certificate" command. Jun 2, 2024
@sylirre
Copy link
Member

sylirre commented Jun 2, 2024

I don't see an error in your commands output.

@sylirre
Copy link
Member

sylirre commented Jun 2, 2024

rehash doesn't throw a warning for me.

Make sure your pem file is sane, e.g. not twice-wtitten.

Screenshot_20240602-203258_Termux

Note that certificate installed this way would have effect only in Termux. For Android OS apps you will need to install certificate through device settings.

Update: third party binaries may not be able to retrieve certificate from Termux. See https://wiki.termux.com/wiki/Differences_from_Linux for explanation about standard paths in Termux environment.

@ghost
Copy link
Author

ghost commented Jun 2, 2024

rehash doesn't throw a warning for me.

Make sure your pem file is sane, e.g. not twice-wtitten.

Screenshot_20240602-203258_Termux

Note that certificate installed this way would have effect only in Termux. For Android OS apps you will need to install certificate through device settings.

Update: third party binaries may not be able to retrieve certificate from Termux. See https://wiki.termux.com/wiki/Differences_from_Linux for explanation about standard paths in Termux environment.

Hello. Checked my /tls folder, there was the .crt version of the certificate and it was causing the warning when installing the .pem version. Also thanks for the heads up about the differences between Termux and Linux.
Thank you and please accept my apology for wasting your time.

@ghost ghost closed this as completed Jun 2, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant