[Swan] KLIPS build failure on linux 4.6.2

Robert Hawkins post at hawkins.cx
Wed Jul 13 12:48:42 UTC 2016


Hi,

I'm trying to build klips against Linux 4.6.2.  However the crypto_hash 
API was recently removed from the stable Linux kernel series, hence 
KLIPS doesn't build.  (See the build log below.)  Is there a workaround 
or fix for this?

Thanks,

Robert


   CC [M] /usr/src/redhat/BUILD/libreswan-3.17/modobj/des/cbc_enc.o
   CC [M] /usr/src/redhat/BUILD/libreswan-3.17/modobj/des/ecb_enc.o
   CC [M] /usr/src/redhat/BUILD/libreswan-3.17/modobj/des/set_key.o
   CC [M] /usr/src/redhat/BUILD/libreswan-3.17/modobj/des/des_enc.o
   CC [M] /usr/src/redhat/BUILD/libreswan-3.17/modobj/aes/ipsec_alg_aes.o
   CC [M] /usr/src/redhat/BUILD/libreswan-3.17/modobj/aes/aes_xcbc_mac.o
   CC [M] /usr/src/redhat/BUILD/libreswan-3.17/modobj/aes/aes_cbc.o
   CC [M]  /usr/src/redhat/BUILD/libreswan-3.17/modobj/aes/aes.o
ln -s -f 
/usr/src/redhat/BUILD/libreswan-3.17/linux/net/ipsec/ipsec_alg_cryptoapi.c 
/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.c
   CC [M] /usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.o
/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.c: In 
function 'setup_digest':
/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.c:564:5: 
error: implicit declaration of function 'crypto_has_hash' 
[-Werror=implicit-function-declaration]
      return crypto_has_hash(digestname, 0, 0);
      ^
/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.c: In 
function '_capi_hmac_new_key':
/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.c:655:2: 
error: implicit declaration of function 'crypto_alloc_hash' 
[-Werror=implicit-function-declaration]
   tfm = crypto_alloc_hash(dptr->digestname, 0, CRYPTO_ALG_ASYNC);
   ^
/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.c:655:6: 
warning: assignment makes pointer from integer without a cast
   tfm = crypto_alloc_hash(dptr->digestname, 0, CRYPTO_ALG_ASYNC);
       ^
/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.c:662:2: 
error: implicit declaration of function 'crypto_hash_setkey' 
[-Werror=implicit-function-declaration]
   if (crypto_hash_setkey(tfm, key, keylen)<0)
   ^
/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.c:667:3: 
error: implicit declaration of function 'crypto_free_hash' 
[-Werror=implicit-function-declaration]
    crypto_free_hash(tfm);
    ^
/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.c: In 
function '_capi_hmac_hash':
/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.c:687:19: 
error: storage size of 'desc' isn't known
   struct hash_desc desc;
                    ^
/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.c:710:2: 
error: implicit declaration of function 'crypto_hash_digest' 
[-Werror=implicit-function-declaration]
   ret = crypto_hash_digest(&desc, &sg, len, hash_buf);
   ^
/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.c:687:19: 
warning: unused variable 'desc' [-Wunused-variable]
   struct hash_desc desc;
                    ^
cc1: some warnings being treated as errors
scripts/Makefile.build:291: recipe for target 
'/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.o' failed
make[4]: *** 
[/usr/src/redhat/BUILD/libreswan-3.17/modobj/ipsec_alg_cryptoapi.o] Error 1
Makefile:1429: recipe for target 
'_module_/usr/src/redhat/BUILD/libreswan-3.17/modobj' failed
make[3]: *** [_module_/usr/src/redhat/BUILD/libreswan-3.17/modobj] Error 2
make[3]: Leaving directory '/usr/src/linux-4.6.2'
Makefile:420: recipe for target 'module26' failed
make[2]: *** [module26] Error 2
make[2]: Leaving directory '/usr/src/redhat/BUILD/libreswan-3.17'
Makefile:308: recipe for target 'module' failed
make[1]: *** [module] Error 2
make[1]: Leaving directory '/usr/src/redhat/BUILD/libreswan-3.17'



More information about the Swan mailing list