Skip to content

Crash: rust-webpki-roots causes crash on Android  #2968

@0xWildhare

Description

@0xWildhare

Problem

When using the rustls, by default rustls-platform-verifier is used, this causes a crash if rustls_platform_verifier::android::init_hosted() has not been called before. Version 0.12 worked fine via the feature flag rustls-tls-webpki-roots-no-provider which skipped any native TLS certificate initialization and used webpki certs.

Proposed Solution

Add a new feature flag like rustls-webpki-roots (or rustls-tls-webpki-roots) that uses webpki-roots for certificate verification instead of rustls-platform-verifier, similar to 0.12's behavior.

Use Case

Android apps using Rust for networking that want to upgrade to reqwest 0.13 without adding JNI initialization code.

Workaround

Stay on reqwest 0.12 or implement Android-specific JNI initialization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tlsArea: Transport Layer Security

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions