{error,enoent} when private key is in system ca-certificates #9565
Labels
bug
Issue is reported as a bug
priority:medium
team:PS
Assigned to OTP team PS
team:VM
Assigned to OTP team VM
Describe the bug
From an experiment with mitmproxy I had a private key in my
/etc/ssl/certs/ca-certificates.crt
. Up until now it worked well, but with Elixir >= 1.17 I get a nasty crash inmix
, see elixir-lang/elixir#14322 for that. It took a while to debug because despite a parse error OTP returns:This is misleading, better would be
{error,wrong_format}
or something like that. This is due to a "catchall" in the implementation.To Reproduce
Copy
broken-ca-certificates-minimal.crt.txt
to e.g./etc/ssl/certs/ca-certificates.crt
, and execute function above.Expected behavior
An error message that does not say "file not found". Or just skip over the private key, like all other libraries seem to do.
Affected versions
OTP >= 25
The text was updated successfully, but these errors were encountered: