aboutsummaryrefslogtreecommitdiff
path: root/sys/netsmb
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2019-08-26 17:25:07 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2019-08-26 17:25:07 +0000
commit87210a0c6d998c355f0fa159cc54875f875db388 (patch)
treed610c4dc9af1536692283ebaef74b79b967028a5 /sys/netsmb
parent15ddc5e43ffa893e0a9076294f1369bac43086c1 (diff)
downloadsrc-87210a0c6d998c355f0fa159cc54875f875db388.tar.gz
src-87210a0c6d998c355f0fa159cc54875f875db388.zip
Stop using des_cblock * for arguments to DES functions.
This amounts to a char ** since it is a char[8] *. Evil casts mostly resolved the fact that what was actually passed in were plain char *. Instead, change the DES functions to use 'unsigned char *' for keys and for input and output buffers. Reviewed by: cem, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D21389
Notes
Notes: svn path=/head/; revision=351513
Diffstat (limited to 'sys/netsmb')
-rw-r--r--sys/netsmb/smb_crypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netsmb/smb_crypt.c b/sys/netsmb/smb_crypt.c
index 27f824cf88bf..46c841cba3df 100644
--- a/sys/netsmb/smb_crypt.c
+++ b/sys/netsmb/smb_crypt.c
@@ -83,8 +83,8 @@ smb_E(const u_char *key, u_char *data, u_char *dest)
kk[6] = key[5] << 2 | (key[6] >> 6 & 0xfe);
kk[7] = key[6] << 1;
ksp = malloc(sizeof(des_key_schedule), M_SMBTEMP, M_WAITOK);
- des_set_key((des_cblock *)kk, *ksp);
- des_ecb_encrypt((des_cblock *)data, (des_cblock *)dest, *ksp, 1);
+ des_set_key(kk, *ksp);
+ des_ecb_encrypt(data, dest, *ksp, 1);
free(ksp, M_SMBTEMP);
}