mirror of
https://github.com/FiloSottile/age.git
synced 2026-03-11 08:55:41 +00:00
parent
38dd222823
commit
ca8a69b1b6
2 changed files with 8 additions and 1 deletions
5
cmd/age/testdata/x25519.txt
vendored
5
cmd/age/testdata/x25519.txt
vendored
|
|
@ -15,6 +15,11 @@ age -r age12phkzssndd5axajas2h74vtge62c86xjhd6u9anyanqhzvdg6sps0xthgl -o test.ag
|
|||
! age -d -i key.txt test.age
|
||||
stderr 'no identity matched any of the recipients'
|
||||
|
||||
# decrypt an empty file
|
||||
! age -d -i key.txt empty
|
||||
stderr empty
|
||||
|
||||
-- empty --
|
||||
-- input --
|
||||
test
|
||||
-- key.txt --
|
||||
|
|
|
|||
|
|
@ -239,7 +239,9 @@ func Parse(input io.Reader) (*Header, io.Reader, error) {
|
|||
rr := bufio.NewReader(input)
|
||||
|
||||
line, err := rr.ReadString('\n')
|
||||
if err != nil {
|
||||
if err == io.EOF {
|
||||
return nil, nil, errorf("file is empty")
|
||||
} else if err != nil {
|
||||
return nil, nil, errorf("failed to read intro: %w", err)
|
||||
}
|
||||
if line != intro {
|
||||
|
|
|
|||
Loading…
Reference in a new issue