diff options
Diffstat (limited to 'contrib/telnet/libtelnet/enc_des.c')
-rw-r--r-- | contrib/telnet/libtelnet/enc_des.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/telnet/libtelnet/enc_des.c b/contrib/telnet/libtelnet/enc_des.c index 2f7fe6e74402..72ad44c7fde0 100644 --- a/contrib/telnet/libtelnet/enc_des.c +++ b/contrib/telnet/libtelnet/enc_des.c @@ -207,9 +207,9 @@ fb64_start(struct fb *fbp, int dir, int server __unused) /* * Create a random feed and send it over. */ - des_random_key((Block *)fbp->temp_feed); - des_ecb_encrypt((Block *)fbp->temp_feed, (Block *)fbp->temp_feed, - fbp->krbdes_sched, 1); + DES_random_key((Block *)fbp->temp_feed); + DES_ecb_encrypt((Block *)fbp->temp_feed, (Block *)fbp->temp_feed, + &fbp->krbdes_sched, 1); p = fbp->fb_feed + 3; *p++ = ENCRYPT_IS; p++; @@ -393,7 +393,7 @@ fb64_session(Session_Key *key, int server, struct fb *fbp) fb64_stream_key(fbp->krbdes_key, &fbp->streams[DIR_ENCRYPT-1]); fb64_stream_key(fbp->krbdes_key, &fbp->streams[DIR_DECRYPT-1]); - des_key_sched((Block *)fbp->krbdes_key, fbp->krbdes_sched); + DES_key_sched((Block *)fbp->krbdes_key, &fbp->krbdes_sched); /* * Now look to see if krbdes_start() was was waiting for * the key to show up. If so, go ahead an call it now @@ -499,7 +499,7 @@ fb64_stream_iv(Block seed, struct stinfo *stp) memmove((void *)stp->str_iv, (void *)seed, sizeof(Block)); memmove((void *)stp->str_output, (void *)seed, sizeof(Block)); - des_key_sched((Block *)stp->str_ikey, stp->str_sched); + DES_key_sched((Block *)stp->str_ikey, &stp->str_sched); stp->str_index = sizeof(Block); } @@ -508,7 +508,7 @@ void fb64_stream_key(Block key, struct stinfo *stp) { memmove((void *)stp->str_ikey, (void *)key, sizeof(Block)); - des_key_sched((Block *)key, stp->str_sched); + DES_key_sched((Block *)key, &stp->str_sched); memmove((void *)stp->str_output, (void *)stp->str_iv, sizeof(Block)); @@ -547,7 +547,7 @@ cfb64_encrypt(unsigned char *s, int c) while (c-- > 0) { if (idx == sizeof(Block)) { Block b; - des_ecb_encrypt((Block *)stp->str_output, (Block *)b, stp->str_sched, 1); + DES_ecb_encrypt((Block *)stp->str_output, (Block *)b, &stp->str_sched, 1); memmove((void *)stp->str_feed, (void *)b, sizeof(Block)); idx = 0; } @@ -580,7 +580,7 @@ cfb64_decrypt(int data) idx = stp->str_index++; if (idx == sizeof(Block)) { Block b; - des_ecb_encrypt((Block *)stp->str_output, (Block *)b, stp->str_sched, 1); + DES_ecb_encrypt((Block *)stp->str_output, (Block *)b, &stp->str_sched, 1); memmove((void *)stp->str_feed, (void *)b, sizeof(Block)); stp->str_index = 1; /* Next time will be 1 */ idx = 0; /* But now use 0 */ @@ -620,7 +620,7 @@ ofb64_encrypt(unsigned char *s, int c) while (c-- > 0) { if (idx == sizeof(Block)) { Block b; - des_ecb_encrypt((Block *)stp->str_feed, (Block *)b, stp->str_sched, 1); + DES_ecb_encrypt((Block *)stp->str_feed, (Block *)b, &stp->str_sched, 1); memmove((void *)stp->str_feed, (void *)b, sizeof(Block)); idx = 0; } @@ -650,7 +650,7 @@ ofb64_decrypt(int data) idx = stp->str_index++; if (idx == sizeof(Block)) { Block b; - des_ecb_encrypt((Block *)stp->str_feed, (Block *)b, stp->str_sched, 1); + DES_ecb_encrypt((Block *)stp->str_feed, (Block *)b, &stp->str_sched, 1); memmove((void *)stp->str_feed, (void *)b, sizeof(Block)); stp->str_index = 1; /* Next time will be 1 */ idx = 0; /* But now use 0 */ |