<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>While I was looking into strongswan's openssl plugin implementation, I noticed a couple inconsistencies as follows:<br><br></div>1. Call to ENGINE_load_builtin_engine seems redundant as this function is called by OPENSSL_config which is invoked earlier in the openssl plugin. <br><br></div>2. As per openssl's fips policy <a href="http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1758.pdf">http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1758.pdf</a> , calls to ENGINE_register_* are prohibited in fips mode. But strongswan's openssl plugin calls ENGINE_register_* irrespective of fips mode set.<br><br></div>I have created the following patch to address these issues:<br><br>diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c<br>index e48efe3..a56e128 100644<br>--- a/src/libstrongswan/plugins/openssl/openssl_plugin.c<br>+++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c<br>@@ -567,8 +567,10 @@ plugin_t *openssl_plugin_create()<br> <br> #ifndef OPENSSL_NO_ENGINE<br>        /* activate support for hardware accelerators */<br>-       ENGINE_load_builtin_engines();<br>-       ENGINE_register_all_complete();<br>+       if (!fips_mode)<br>+       {<br>+               ENGINE_register_all_complete();<br>+       }<br> #endif /* OPENSSL_NO_ENGINE */<br> <br>        if (!seed_rng())<br><br><br></div>Thanks<br>Avesh<br></div>