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

Load CA bundle as bytes, not text #671

Merged
merged 1 commit into from
Dec 24, 2024

Conversation

yrro
Copy link

@yrro yrro commented Nov 1, 2024

A CA bundle may contain non-ASCII characters (e.g., CA distinguished names may include accents). When we try to encode these into bytes, the choise of the "ascii" codec causes a UnicodeError to be thrown.

Since we don't actaully want to do anythign with the CA bundle other than pass it to cryptograhpy, just load it as bytes in the first place.

Fixes: #670

A CA bundle may contain non-ASCII characters (e.g., CA distinguished
names may include accents). When we try to encode these into bytes, the
choise of the "ascii" codec causes a UnicodeError to be thrown.

Since we don't actaully want to do anythign with the CA bundle other
than pass it to cryptograhpy, just load it as bytes in the first place.

Fixes: nabla-c0d3#670
@yrro yrro marked this pull request as ready for review November 4, 2024 16:12
@nabla-c0d3 nabla-c0d3 changed the base branch from release to dev December 24, 2024 17:28
@nabla-c0d3 nabla-c0d3 merged commit 5a2e0fd into nabla-c0d3:dev Dec 24, 2024
@nabla-c0d3
Copy link
Owner

Short and sweet - thank you!

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.

UnicodeError thrown when --certinfo_ca_file is encoded with UTF-8
2 participants