diff options
author | Thorsten Kukuk <kukuk@suse.de> | 2015-05-06 09:21:52 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2015-05-06 10:03:25 -0400 |
commit | 58cd17f99974dcb6ae4654a4fc0de525585d2470 (patch) | |
tree | a24b2367723b9049895ef630963b6969ef8226ad /src/des_crypt.c | |
parent | cf29aa829f80840f13d1d09a08cf96a2731aa96d (diff) | |
download | ti-rpc-58cd17f99974dcb6ae4654a4fc0de525585d2470.tar.gz |
Fix: unresolved _crypt() symbols
auth_des.c is using the finctions from des_crypt.c.
So we should add this file, if we compile
auth_des.c, too. Solves the problem with unresolved
functions cbc_crypt() and ebc_crypt().
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'src/des_crypt.c')
-rw-r--r-- | src/des_crypt.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/des_crypt.c b/src/des_crypt.c index 980a6cb..1d1badd 100644 --- a/src/des_crypt.c +++ b/src/des_crypt.c @@ -41,8 +41,6 @@ static char sccsid[] = "@(#)des_crypt.c 2.2 88/08/10 4.0 RPCSRC; from 1.13 88/02 #endif static int common_crypt( char *, char *, unsigned, unsigned, struct desparams * ); -int (*__des_crypt_LOCAL)() = 0; -extern int _des_crypt_call(char *, int, struct desparams *); /* * Copy 8 bytes */ @@ -52,7 +50,7 @@ extern int _des_crypt_call(char *, int, struct desparams *); *a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \ *a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \ } - + /* * Copy multiple of 8 bytes */ @@ -75,7 +73,7 @@ cbc_crypt(key, buf, len, mode, ivec) char *buf; unsigned len; unsigned mode; - char *ivec; + char *ivec; { int err; struct desparams dp; @@ -120,8 +118,8 @@ ecb_crypt(key, buf, len, mode) * Common code to cbc_crypt() & ecb_crypt() */ static int -common_crypt(key, buf, len, mode, desp) - char *key; +common_crypt(key, buf, len, mode, desp) + char *key; char *buf; unsigned len; unsigned mode; @@ -137,17 +135,12 @@ common_crypt(key, buf, len, mode, desp) desdev = mode & DES_DEVMASK; COPY8(key, desp->des_key); - /* + /* * software */ - if (__des_crypt_LOCAL != NULL) { - if (!__des_crypt_LOCAL(buf, len, desp)) { - return (DESERR_HWERROR); - } - } else { - if (!_des_crypt_call(buf, len, desp)) { - return (DESERR_HWERROR); - } + if (!_des_crypt(buf, len, desp)) { + return (DESERR_HWERROR); } + return(desdev == DES_SW ? DESERR_NONE : DESERR_NOHWDEVICE); } |