linux Undefined reference to cryptographic function Function test_cipher() depends on crypto_alloc_ablkcipher(), which is only available when CRYPTO_BLKCIPHER is enabled.

Bug fixed by commit 242f1a34377
Type UndefinedSymbol
Config "CRYPTO_TEST && !CRYPTO_BLKCIPHER" (2nd degree)
Fix-in model
Location crypto/
#ifdef CONFIG_CRYPTO_BLKCIPHER
void *crypto_alloc_ablkcipher()
{
  return (void*)0;
}
#endif

#ifdef CONFIG_CRYPTO_TEST
static void test_cipher()
{
  crypto_alloc_ablkcipher();
}
#endif

int main(int argc, char** argv)
{
#ifdef CONFIG_CRYPTO_TEST
  test_cipher();
#endif
}

diff --git a/simple/242f1a3.c b/simple/242f1a3.c
--- a/simple/242f1a3.c
+++ b/simple/242f1a3.c
@@ -1,3 +1,6 @@
+#ifdef CONFIG_CRYPTO_TEST
+#define CONFIG_CRYPTO_BLKCIPHER
+#endif
 
 #ifdef CONFIG_CRYPTO_BLKCIPHER
 void *crypto_alloc_ablkcipher()