Here is the patch that we came up with to fix the
endian problem with the DES module on our Solaris boxes.
I hope this helps.
*** ../Crypt-DES-1.01/des.h Sat May 22 15:30:39 1999
--- des.h Tue Jan 11 11:13:53 2000
***************
*** 1,7 ****
#include <sys/types.h>
typedef u_int8_t des_user_key[8];
! typedef u_int32_t des_cblock[2];
typedef u_int32_t des_ks[32];
void des_crypt(des_cblock in, des_cblock out, des_ks key, int encrypt);
--- 1,10 ----
#include <sys/types.h>
+ typedef unsigned char u_int8_t;
+ typedef unsigned long u_int32_t;
+
typedef u_int8_t des_user_key[8];
! typedef u_int8_t des_cblock[8];
typedef u_int32_t des_ks[32];
void des_crypt(des_cblock in, des_cblock out, des_ks key, int encrypt);
*** ../Crypt-DES-1.01/des.c Sat May 22 15:30:39 1999
--- des.c Tue Jan 11 11:12:04 2000
***************
*** 443,450 ****
static int i;
static unsigned long * s;
! l=input[0];
! r=input[1];
/* do IP */
PERM_OP(r,l,t, 4,0x0f0f0f0f);
--- 443,450 ----
static int i;
static unsigned long * s;
! c2l( input, l );
! c2l( input, r );
/* do IP */
PERM_OP(r,l,t, 4,0x0f0f0f0f);
***************
*** 505,512 ****
PERM_OP(l,r,t,16,0x0000ffff);
PERM_OP(r,l,t, 4,0x0f0f0f0f);
! output[0]=l;
! output[1]=r;
}
void
--- 505,512 ----
PERM_OP(l,r,t,16,0x0000ffff);
PERM_OP(r,l,t, 4,0x0f0f0f0f);
! l2c( l, output );
! l2c( r, output );
}
void
On Mon, Jan 17, 2000 at 11:58:40AM -0900, Todd Clark wrote:
> I'm having the same problem compiling the Crypt::DES module. I've checked
> the list archive on opensrs.org but they are only updated through 12/20 and
> do not include this "patch for the CPAN DES module". Could someone please
> forward this patch or post it in a message?
>
> TIA,
>
> Todd Clark
> tvclark@denalitek.com
> Denalitek
>
> >This is an endian problem that we ran into.
> >
[SNIP]
--
+---------------------------------+--------------------------------+
| Michael Smith | TECHNICAL SUPPORT |
| Engineer (Austin) | San Antonio: (210) 357-9202 |
| msmith@texas.net | Austin : (512) 427-1652 |
| Texas Networking, Inc. | Houston : (713) 222-2260 |
| Hours Of Phone Support | Boerne : (830) 249-7058 |
| Monday - Friday :8am to 12am | Dripping Sp: (512) 858-5092 |
| Saturday - Sunday :10am to 7pm | Georgetown : (512) 869-5947 |
| http://lonestar.texas.net | Dallas : (214) 953-1005 |
+---------------------------------+--------------------------------+
This archive was generated by hypermail 2.1.3 : Tue Oct 19 2004 - 23:35:14 EDT