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

BUG: Unable to load EC private key with rustls #142

Closed
Firstyear opened this issue Aug 18, 2024 · 0 comments · Fixed by #143
Closed

BUG: Unable to load EC private key with rustls #142

Firstyear opened this issue Aug 18, 2024 · 0 comments · Fixed by #143

Comments

@Firstyear
Copy link
Contributor

When loading an EC private key the following error is raised:

Custom { kind: Other, error: "invalid certificate format, received: Sec1Key(PrivateSec1KeyDer(\"[secret key elided]\"))" }

This appears to be raised from https://docs.rs/axum-server/latest/src/axum_server/tls_rustls/mod.rs.html#345

The match statement here may need to be extended, since https://docs.rs/rustls/latest/rustls/struct.ConfigBuilder.html#method.with_single_cert can accept a Sec1 Private key.

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 a pull request may close this issue.

1 participant