A
A
agorlov2015-04-30 19:39:45
linux
agorlov, 2015-04-30 19:39:45

How to sign a pdf document with an electronic signature in Linux?

We have automated the process of generating reporting documents in the form of pdf-files.
I would like to automatically sign them with an electronic signature;
(PKCS#7) which comes as an additional file to the electronic document.
I met GUI-software for solving this problem. I would like something with a
command line interface, or with a software interface.
Preferably inexpensive, even better free.
Thank you.
UPD: a qualified electronic signature is needed, based on GOST-a (63-FZ) adopted in the Russian Federation

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
agorlov, 2015-05-05
@agorlov

Thanks Dimitri for the links. The second link to the article helped: Signing, encryption accepted by CryptoARM/Cr...
I would like to add that the command for signing the document from the article (moved into a separate file, CMS/pkcs7) did not work for me with the message:

$ openssl smime -sign -signer priv.pem -engine gost -binary -noattr -outform DER -in report.pdf -out report.pdf.sig
engine "gost" set.
unable to load
certificate
working option :
$ openssl smime -sign -signer pub.crt -inkey priv.pem -engine gost -binary -noattr \
-outform DER  -in report.pdf -out report.pdf.sig

where files:
pub.crt - certificate (containing the public key)
priv.pem - private key
report.pdf - pdf document
report.pdf.sig - document signature

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question