aboutsummaryrefslogtreecommitdiff
path: root/pem.go
diff options
context:
space:
mode:
Diffstat (limited to 'pem.go')
-rw-r--r--pem.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pem.go b/pem.go
index bbe2a47..2fdf3cc 100644
--- a/pem.go
+++ b/pem.go
@@ -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)
}