rustls-platform-verifier doesn't work on termux

Open
#219 13 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust
Domain
security

Research direction

Start with verification/others.rs in the linked rustls-platform-verifier source and read the Android platform-verifier documentation. Investigate the certificate lookup behavior for Termux and the reported /data/data/com.termux/files/usr/etc/tls/ location. Done means certificate verification succeeds in Termux without requiring Android Java-runtime initialization or an unavailable fallback.

Written by the indexing model from the issue text.

Description

bug O-Android

cargo-bins/cargo-binstall#2473

Binaries built for aarch64-unkown-linux-* failed to get the openssl certs stored in /data/data/com.termux/files/usr/etc/tls/ and then failed in termux without getting any fallback

https://docs.rs/rustls-platform-verifier/0.6.2/src/rustls_platform_verifier/verification/others.rs.html#106

This line fails on UNIX, except for apple, android and wasm32, if rustls-native-cert cannot find any certificate , and obviously it isn't smart enough to find native certa in termux

It only uses hardcoded certificates for wasm32

For android, rusts-platform-verifier assumes you are building an android app requires extra initialization to get the java runtime, otherwise straight failure without even trying to find native certa

https://docs.rs/rustls-platform-verifier/0.6.2/rustls_platform_verifier/android/index.html

Dominant language
Rust
Stars
162
Forks
67
Avg merge
5d 14h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rustls/rustls-platform-verifier

All issues in rustls/rustls-platform-verifier

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.