[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Mod-Perl, Apache-SSL and Cryptix
From:       Stefan Rompf <srompf () telemation ! de>
Date:       1998-07-29 11:24:55
[Download RAW message or body]

Hi,

recently I've been trying to use the Cryptix-1.16 module from Systemics
within the following configuration:

Apache 1.2.6+ssl_1.16
Perl 5.004_04
SSLeay-0.8.0
mod_perl-1.11 with a file upload patch Doug wrote for me.

Cryptix 1.16 implements the Crypt::DES interface which I wanted to use to
encrypt data transferred on a web site. The browser then uses a Java applet
to display the contents if the matching password is entered. Everything
worked fine in CGI environment, within modperl the encryption produced
wrong results.

After some debugging I realized that both SSLeay and Cryptix implement
routines named des_crypt and variables like des_SPtrans, so they started
interfering. I changed some names in Cryptix' des.c, DES.xs and DES.pm,
made some variables static to limit their scope and now it works fine. I
have attached a patch to this mail.

So what do we learn from it? When writing libraries, make every global
variable or subroutine static if possible. When writing expansion modules
for open products like Apache or Perl, do the same and use descriptive
names to avoid interference with other modules and libraries. You never now
with what module the user will link your program.

cu.. Stefan

["patch.tar.gz" (application/octet-stream)]

  +-----------------------------------------------------------------------+ 
  | Customer: I have a PC with Windows '95. Hotline: Yes, ok got that.    |
  | Customer: It's not working.          Hotline: You already said that ! |
  +-----------------------------------------------------------------------+


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic