--- XXRemoteVNC.m.orig 2008-11-03 10:02:51.000000000 +0100 +++ XXRemoteVNC.m 2008-11-03 10:12:24.000000000 +0100 @@ -56,12 +56,12 @@ #import // XXX: This is a hack as the 10.2 SDK seems to have the wrong header files -#undef des_ecb_encrypt -#undef des_set_key_unchecked +#undef DES_ecb_encrypt +#undef DES_set_key_unchecked -//void des_ecb_encrypt(const_des_cblock *input,des_cblock *output, -// des_key_schedule *ks,int enc); -//void des_set_key_unchecked(const_des_cblock *key, des_key_schedule *schedule); +//void DES_ecb_encrypt(const_DES_cblock *input,DES_cblock *output, +// DES_key_schedule *ks,int enc); +//void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule); #import "keymap.h" @@ -247,7 +247,7 @@ [self recv:challenge length:16]; // vnc has a weird hacked DES which reverses bit ordering in the key - des_cblock key; + DES_cblock key; memset(key, 0, 8); int i, bit; for(i = 0; i < 8; ++i) { @@ -260,11 +260,11 @@ key[i] |= (0x80>>bit); } - des_key_schedule sched; - des_set_key_unchecked(&key, &sched); - des_cblock *c; - c = (des_cblock*)(challenge); des_ecb_encrypt(c, c, &sched, DES_ENCRYPT); - c = (des_cblock*)(challenge+8); des_ecb_encrypt(c, c, &sched, DES_ENCRYPT); + DES_key_schedule sched; + DES_set_key_unchecked(&key, &sched); + DES_cblock *c; + c = (DES_cblock*)(challenge); DES_ecb_encrypt(c, c, &sched, DES_ENCRYPT); + c = (DES_cblock*)(challenge+8); DES_ecb_encrypt(c, c, &sched, DES_ENCRYPT); [self send:challenge length:16];