LoraIlieva has asked for the wisdom of the Perl Monks concerning the following question:

I am looking for a perl module to create attached and detached signatures of files.

For text signing I am using Crypt::OpenSSL::RSA, but I am not sure if there is a way to sign whole file. I thought to read the file and to sign the file content but I am not sure if this is the right way for file signing.

I want to replace the openssl's "openssl rsautl -sign " and "openssl dgst -sha256 -sign" commands with perl modules and functions.

Could someone give me an advice?

  • Comment on Create attached and detached signatures on files

Replies are listed 'Best First'.
Re: Create attached and detached signatures on files
by GotToBTru (Prior) on Nov 04, 2016 at 12:01 UTC

    Did our previous advice not work?

    But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)

      I understood that there are three kinds of signatures:

      -attached signature - where the result is usually .p7m file, which contains the signed file and the signature;

      -detached signature - where the result is usually .p7s file, which contains only the signature;

      -and talking about .pdf files, there is third way to sign - including the signature inside the .pdf's dictionaries.

      My previous question received as answer the third kind of signing. Now I need to sign whatever kind of files - .pdf, .jpg, etc.