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

support native tls for some configurations (proxies, custom roots, self-signed certificates etc.) #30

Open
markmehere opened this issue Jul 4, 2024 · 0 comments

Comments

@markmehere
Copy link

markmehere commented Jul 4, 2024

🐛 Bug description

Using WASM Rust from behind a corporate firewall with self-signed certificates does not work. binary-install chokes on the self-signed certificate.

The solution to the problem is spelled out here:

When you use native-tls, ureq will use your OS' certificate verifier and root store.

Cargo works without issue and nothing has been done on our side to support this.

🤔 Expected Behavior

Hoping to be able to use WASM Rust from my corporate PC without issue - just like I can use cargo.

Setting environment variables to achieve this is pretty standard for people in my position, so the following would be fine:

export USE_NATIVE_TLS=1 && wasm-pack build

👟 Steps to reproduce

  1. In an environment with a self-signed certificate without WebAssembly run wasm-pack build
  2. Observe the defect:
[INFO]: 🎯  Checking for the Wasm target...
[INFO]: 🌀  Compiling to Wasm...
    Finished `release` profile [optimized] target(s) in 0.04s
Error: failed to download from https://github.com/WebAssembly/binaryen/releases/download/version_117/binaryen-version_xxx_xxx.tar.gz
To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.
Caused by: failed to download from https://github.com/WebAssembly/binaryen/releases/download/version_117/binaryen-version_117-xxx-xxx.tar.gz
To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.

🌍 Your environment

  • Self-signed certificate only trusted by my corporation's custom root
  • This software that I would definitely not recommend
@markmehere markmehere mentioned this issue Jul 4, 2024
3 tasks
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