A while ago I received a PDF file that was digitally signed.
The Document Viewer (Evince) shows me that the digital signature was not validated.
How do I add the file's digital signature to evince so that the warning disappears?
This is indeed the main point; you would need to patch
However, there is a interesting project in progress to provide just the functionality you want; the details are explained on this github page entitled 'evince signatures', where all the patches are available.
As well as on the github page, there is more information on the project on this site; it is clear they hope to integrate it upstream in the future. The developers note that
So, you can experiment with the github development code if you wish, but it may not be a good idea to patch