Skip to content
This repository was archived by the owner on Mar 26, 2023. It is now read-only.
This repository was 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

@odeke-em

Description

@odeke-em

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions