I mentioned my issues with CyberCash yesterday, and I've been trying to work
some of the bugs out of the implementation.  But I seem to be having
problems
with their using IPC::open2.

Basically, they use separate binaries to encrypt data and decrypt data that
is
to be sent to their server.  The chunk of encrypted data is then sent over a
basic,
unencrypted http request.  They're essentially doing this:

IPC::Open2::open2(\*CIPHER, \*PLAINTEXT, '/foo/bar/encryption_binary') or
die....

print PLAINTEXT "A Bunch Of Text To Be Encoded";

close(PLAINTEXT);

my $EncryptedData = <CIPHER>;

&SomethingWithEncryptedData($EncryptedData);

close(CIPHER);

And they do the reverse when they get a response.  Sometimes it works, but
most of the
time, it warns that $EncryptedData is uninitialized and CyberCash pukes.
I'm assuming
that something weird is going on and the open2 is failing.

Is this something that can reasonably be done under mod_perl?  Any
workarounds?

Also, in the documentation for IPC it mentions that it won't return failure,
but throws
an exception.  It doesn't look like CyberCash took this into account.  What
is the best
way to fix it and catch the error?  (I know this is more Perl than
mod_perl...)

Ideas are very welcome.

Details:
Apache 1.3.12
Linux 2.2.14-6.1.1smp
mod_perl 1.24
mod_ssl 2.6.6-1.3.12
perl 5.6.0

Thanks in advance...

RYAN


----------------------------------------------
Ryan Adams                  [EMAIL PROTECTED]
Vitessi Motorsports, Inc.      www.vitessi.com
Voice: 740/362-9254          Fax: 740/362-0354
----------------------------------------------

Reply via email to