I'm trying to use linux GPG on a Perl script but i can't get it working via Apache/CGI.

Iv'e tried:

1 - simple command line with `` it gives a fatal error if no --homedir is specified and permission error if --homedir is specified (/home/<user>/.gnupg).

2 - Crypt::GPG , seemed like the perfect solution but it does not work and it seems there is no way to read errors to figure it out.

3 - GnuPg module does not work. I try to encrypt and i get "Can't call method "encrypt" on an undefined value", anyway according to the documentation import function does not return key id of the imported pub key, i do need the key id on importing.


In reply to CGI and GPG, how are you people doing it? by aboboras

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.