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

Warn instead of fail when certificates can't be loaded #325

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

ulyssa
Copy link
Contributor

@ulyssa ulyssa commented Oct 18, 2023

A user running Viceroy on Windows hit this unwrap() call when trying out the rust compute starter kit:

c:\dev\source\fastly-from-scratch>fastly compute serve
✓ Verifying fastly.toml
✓ Identifying package name
✓ Identifying toolchain
✓ Running [scripts.build]
✓ Creating package archive

SUCCESS: Built package (pkg\fastly-from-scratch.tar.gz)

✓ Running local server

INFO: Listening on http://127.0.0.1:7676/

INFO: Command output:
--------------------------------------------------------------------------------
thread 'main' panicked at lib\src\upstream.rs:50:61:
called `Result::unwrap()` on an `Err` value: InvalidCertificate(BadEncoding)
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
--------------------------------------------------------------------------------

ERROR: error during execution process (see 'command output' above): exit status 101.

If you believe this error is the result of a bug, please file an issue: https://github.com/fastly/cli/issues/new?labels=bug&template=bug_report.md

It seems that their system has a locally-installed certificate that rustls doesn't like. Viceroy should probably just warn in these cases and continue loading certificates, since it's only a problem if that specific cert ends up being needed to talk to an origin.

@ulyssa ulyssa requested review from acw and JakeChampion October 18, 2023 16:25
Copy link
Contributor

@JakeChampion JakeChampion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely agree that this should be a warn
Thank you for this patch 🙏

@JakeChampion JakeChampion merged commit d61b8a0 into main Oct 19, 2023
7 checks passed
@JakeChampion JakeChampion deleted the ulyssa/rustls-load-certs-failure branch October 19, 2023 10:44
cmckendry pushed a commit to 1stdibs/Viceroy that referenced this pull request Feb 8, 2024
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

Successfully merging this pull request may close these issues.

2 participants