Re: GnuPG with Perl 5.8 (or best replacement)?
[email protected] (Wiggins d'Anconia) Sun, 19 Jan 2003 12:37:21 -0500
| Newsgroups | perl.crypto |
|---|---|
| Organization | http://danconia.org |
| Message-ID | <[email protected]> |
Randall J. Parr wrote: > > > > [email protected] had the solution to the POSIX error > > Bareword "POSIX::_SC_OPEN_MAX" not allowed while "strict subs" in use > at blib/lib/GnuPG.pm line 267. > > To get around the error: > in the source directory run the normal "perl Makefile.PL" and make. > After the make has completed edit the GnuPG.pm file in the root of the > source > directory and add double quotes around the barword in question, i.e.: > > line 267: > my $max_fd = POSIX::sysconf( POSIX::_SC_OPEN_MAX ) || 256; > > becomes: > my $max_fd = POSIX::sysconf("POSIX::_SC_OPEN_MAX") || 256; > Yeh I wasn't sure on the "best" way to handle the problem. > NOW the make test fails with message that, I *think*, are related to > the deprecation of the shared-memory IPC mode of gpg (as you indicated). > > I am using gpg 1.0.7 as delivered with Red Hat 8.0. > > Any suggestions as to how to get around this? > Not really, it would basically mean rewriting a substantial portion of the module from what I have seen, and would essentially make it end up being just like the GnuPG::Interface module which I mentioned, as it uses the new style of handling this. GnuPG scrapped the shared memory switch, and now includes 4 switches for using regular file descriptors to handle the same thing, logger-fd, passphrase-fd, status-fd, and input-fd (I think). So essentially within perl you can just create 'pipe's and then pass the file descriptor on the command line. There are details in the source distro about how to handle the output/input, or you can check the Interface module to see how it handles this. > One of the reasons I keep trying to get this to work is the scripts I'm > converting make use of GnuPG::Tie:Encrypt and GnuPG is the only package > I've found which includes this kind of TIE'd interface. > What features of Tieing do you need? This may end up being very similar to the way GnuPG::Interface 'handles' works and may not require changing that much code. > We have to encyrpt emails which are from 2K to maybe 20K. > I'm assuming these don't qualify as the "large" files you mentioned above? > Yeh I am required to *support* up to 500-800 MB files (though most end up being less than 500K) on a server with 2GB of memory with multiple files en/decrypting at once. > gpg: shared memory coprocessing is not available I think this is what has been removed, and I believe 1.0.7 is the first version not to have it, as we are at 1.0.6 where I work and it is still available. I remember reading somewhere that it had been deprecated a while (year maybe?) and I do remember confirming that it would be removed soon though I can't seem to remember where I read that :-). http://danconia.org