Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

loadPrivateKey invokes log.Fatalln with a nil error if pem.Decode fails #268

Open
odeke-em opened this issue Mar 5, 2022 · 0 comments
Open

Comments

@odeke-em
Copy link

odeke-em commented Mar 5, 2022

If we examine in this section

block, _ := pem.Decode(key)
if block == nil {
log.Fatalln("PrivateKey is not PEM format:", err)
}
we can see this image

But that's because that code incorrectly assumed that err would be returned after pem.Decode.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant