Re: CRYPT::DES (found a pure PERL CRYPT::DES !)

From: Todd V. Clark (tvclark@denalitek.com)
Date: Sat Jan 22 2000 - 02:25:28 EST


No, sorry...

I'm still struggling with:

Checking for Digest::MD5... OK
Checking for Crypt::DES... OK
Checking for Crypt::CBC... OK
Logging in to OpenSRS server... ERROR: Unable to login to server:

I'd have to guess that the opensrs server wasn't responding when you were
testing?

I'm hoping someone will take a look at the DES.pm that I hacked together and
tell me what's wrong with it.

Todd

>Hello Todd,
>
> Thats great!.. I installed this on my server .. but for some reason had
>some problems.. I only get the following:
>
>Checking for Digest::MD5... OK
>Checking for Crypt::DES... OK
>Checking for Crypt::CBC... OK
>Logging in to OpenSRS server...
>
>and with any of the other scripts I don't even get an output just an empty
>string... Which give me a no data error in Netscape. Have you run into this
>problem or do you know what the problem might be? I do see how ever that my
>internet connection is busy while the "login in to OPENSRS server" is
>displayed.. but then after that I don't get anything.
>
>Thanks,
>Nitin Agarwal
>----- Original Message -----
>From: Todd Clark <tvclark@denalitek.com>
>To: <nitin@nitin.com>; <dev-list@opensrs.org>
>Sent: Thursday, January 20, 2000 1:07 PM
>Subject: RE: CRYPT::DES (found a pure PERL CRYPT::DES !)
>
>
>> Hello Nitin,
>>
>> I too have been working along the same logic. I commented out the part
of
>> the MAKEFILE that generates DES.C and made my own modifications to DES.c.
>> I've discovered that ActiveState's perl does not create a valid DES.XS.
>It
>> leaves out much of the original des.c file and does not include some
>> critical declarations. i.e.:
>>
>> typedef unsigned char u_int8_t;
>> typedef unsigned long u_int32_t;
>>
>> #define XS_Crypt__DES_expand_key des_expand_key
>> #define XS_Crypt__DES_crypt des_crypt
>>
>> The last two declarations above get you past the linker LNK2001 errors
>about
>> undefined externals (des_expand_key and des_crypt), but then you get the
>> following:
>>
>> warning C4113: 'void (__cdecl *)(unsigned char *,unsigned long *)'
differs
>> in parameter lists from 'void (__cdecl *)(struct cv *)'
>> warning C4113: 'void (__cdecl *)(unsigned long *,unsigned long *,unsigned
>> long *,int )' differs in parameter lists from 'void (__cdecl *)(struct cv
>> *)'
>> error LNK2001: unresolved external symbol __imp__PL_stack_sp
>> error LNK2001: unresolved external symbol __imp__PL_sv_yes
>> error LNK2001: unresolved external symbol __imp__PL_stack_base
>> error LNK2001: unresolved external symbol __imp__PL_markstack_ptr
>>
>> Also, the DES.c that you forwarded was not compiled for Win32 so it does
>not
>> include the function: boot_Crypt__DES necessary for the .DLL. I've had
no
>> real luck creating that function.
>>
>> I've given up on compiling the DES.c file.
>>
>> However, I found a pure PERL implementation of Crypt::DES. In fact it
was
>> written by the same guy (Eric Young) who wrote the version we are trying
>to
>> compile. The pure PERL version is Crypt::PPDES. Unfortunatly the
>PPDES.PM
>> file does not have the same prototypes as DES.PM.
>>
>> So, I've been creating a custom DES.PM that calls encrypt/decript
>functions
>> from PPDES.PM rather than the DES.DLL file we've been trying to compile.
>>
>> I haven't got it right yet so I've attached the work I've done so far.
>They
>> can be installed by copying these files to C:\PERL\SITE\LIB\CRYPT. The
>> CBC.pm file is just a copy of the original, PPDES.pm is unmodified and
>> DES.pm is my modifed version to call PPDES.pm instead of DES.dll.
>>
>> ANY HELP FROM THE PERL EXPERTS WOULD BE APPRECIATED!!!! :-)
>>
>> It runs without PERL errors when I execute VERIFY_INSTALL.CGI, but the
>> OpenSRS server returns:
>>
>> Checking for Digest::MD5... OK
>> Checking for Crypt::DES... OK
>> Checking for Crypt::CBC... OK
>> Logging in to OpenSRS server... ERROR: Unable to login to server:
>>
>> I'm not a PERL programmer so I've probably done something wrong.
>>
>> Let me know what you think,
>>
>> Todd
>>
>> >Hello Todd,
>> >
>> > I've been working on trying to get this crypt-des module to work
>> >forever!.. I finally ran across a version that had the entire des.c in
>it.
>> >It seems if you run nmake while the des.xs file is in the same directory
>> the
>> >des.xs file overwrites the des.c file and you loose that entire file. I
>> have
>> >applied the patches to the des.h file. Please take a look and tell me if
>> you
>> >get any farther than where I am.
>> >
>> >Thanks,
>> >Nitin Agarwal
>> >
>>
>>



This archive was generated by hypermail 2.1.3 : Tue Oct 19 2004 - 23:35:14 EDT