I have signed file 1.txt
, result file is 1.txt.asc
. I changed content in file 1.txt.asc
(signed content, not signature). Then I verify signature in 1.txt.asc
and I get information that signature is not correct and that's ok. Then I encrypt tht modified 1.txt.asc
, result file is 1.txt.asc.gpg
. Then I decrypt that file and I should get information that signature is not correct, but there is no such information. From documentation:
--decrypt [=file=] Decrypt file ... If the decrypted file is signed, the signature is also verified.
I have also saved decrypted data to another file, then I verified signature and I get information that signature is not correct. So it seems that decrypt operation did not verify signature. Why is that?
gpg --output es.gpg -e -s 1.txt
, thengpg -d es.gpg
and content is decrypted and signature is verified. So I think that moral of that story is that documentation is misleading, because for me it clearly looks like it means that after decrypting file, the decrypted file is checked for signature it there is a siganture the it is verified.