mirror of
https://github.com/FiloSottile/age.git
synced 2026-01-04 19:33:55 +00:00
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 {
|
||||
|
||||
Reference in New Issue
Block a user