On Wed, Mar 16, 2016 at 6:11 PM, Jeffrey Walton <noloa...@gmail.com> wrote: > On Wed, Mar 16, 2016 at 10:02 AM, Matt Caswell <m...@openssl.org> wrote: >> What happens if you run the afalgtest directly? >> >> $ cd test >> $ ./afalgtest >> > > ./afalgtest > ALG_PERR: afalg_create_sk: Failed to open socket : Address family not > supported by protocol > test_afalg_aes_128_cbc() failed encryption
It appears I missed the following kernel configuration parameters when building the kernel: * CONFIG_CRYPTO_USER_API=m * CONFIG_CRYPTO_USER_API_HASH=m * CONFIG_CRYPTO_USER_API_SKCIPHER=m Maybe what should be done for the engine is to determine if the kernel supports AF_ALG, and latch the result at startup. Perhaps something like the following in afalg_chk_platform(): $ git diff engines/afalg/e_afalg.c diff --git a/engines/afalg/e_afalg.c b/engines/afalg/e_afalg.c index 90d7602..e2b5896 100644 --- a/engines/afalg/e_afalg.c +++ b/engines/afalg/e_afalg.c @@ -799,7 +799,11 @@ static int afalg_chk_platform(void) return 0; } - return 1; + ret = socket(AF_ALG, SOCK_SEQPACKET, 0); + if(ret != -1) + close(ret); + + return !!(ret != -1); } # ifdef OPENSSL_NO_DYNAMIC_ENGINE When runtime testing for AF_ALG is added to afalg_chk_platform(), then the test fails with: $ ./test/afalgtest AFALG Test: Failed to load AFALG Engine Jeff -- Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4434 Please log in as guest with password guest if prompted -- openssl-dev mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev