diff options
Diffstat (limited to 'pem.go')
-rw-r--r-- | pem.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -35,6 +35,9 @@ func parseFile(file io.Reader) (pemMap, error) { if err != nil { return nil, err } + if len(raw) == 0 { + return nil, fmt.Errorf("file is empty") + } return parsePem(raw) } |