<div dir="ltr">Thanks Steve.<div><br></div><div>If we use Apache and Python as examples, does that mean both of them need to invoke <span style="color:rgb(0,0,0);white-space:pre-wrap">OPENSSL_Config() in order to enable the FIPS mode?</span></div><div><font color="#000000"><span style="white-space:pre-wrap">And if that's the case, how do we make them invoke </span></font><span style="color:rgb(0,0,0);white-space:pre-wrap">OPENSSL_Config() API?</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Also regarding the openssl.cfg changes mentioned in the User Guide, what do I need to replace the XXXX string?</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Below are the config changes I made, does it look right to you?</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Thanks.</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">HOME                    = .</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">RANDFILE                = $ENV::HOME/.rnd</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0);min-height:16px"><br></p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)"># Extra OBJECT IDENTIFIER info:</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)">#oid_file               = $ENV::HOME/.oid</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">oid_section             = new_oids</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0);min-height:16px"><br></p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)"># To use this configuration file with the "-extfile" option of the</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)"># "openssl x509" utility, name here the section containing the</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)"># X.509v3 extensions to use:</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)"># extensions            = </p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)"># (Alternatively, use a configuration file that has only</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)"># X.509v3 extensions in its main [= default] section.)</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0);min-height:16px"><br></p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">XXXX_conf = XXXX_options</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0);min-height:16px"><br></p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">[ new_oids ]</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0);min-height:16px"><br></p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)"># We can add new OIDs in here for use by 'ca', 'req' and 'ts'.</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)"># Add a simple OID like this:</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)"># testoid1=1.2.3.4</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)"># Or use config file substitution like this:</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)"># testoid2=${testoid1}.5.6</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0);min-height:16px"><br></p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)"># Policies used by the TSA examples.</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">tsa_policy1 = 1.2.3.4.1</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">tsa_policy2 = 1.2.3.4.5.6</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">tsa_policy3 = 1.2.3.4.5.7</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0);min-height:16px"><br></p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0);min-height:16px"><br></p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">[ XXXX_options ]</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">alg_section = algs</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0);min-height:16px"><br></p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">[ algs ]</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">fips_mode = yes</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0);min-height:16px"><br></p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(83,48,225);background-color:rgb(0,0,0)">####################################################################</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">[ ca ]</p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0)">default_ca      = CA_default            <span style="color:rgb(83,48,225)"># The default ca section</span></p>
<p style="margin:0px;font-size:12px;font-family:Monaco;color:rgb(245,245,245);background-color:rgb(0,0,0);min-height:16px"><br></p></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><div><br></div><div><br></div><div><hr style="color:rgb(0,0,0);font-family:Times"><pre style="white-space:pre-wrap;color:rgb(0,0,0)">On 09/14/2015 05:21 PM, security veteran wrote:
><i> I asked this question from a different thread, but thought it may be the
</i>><i> best to start a new thread to discuss this question since it sounds like
</i>><i> a big deal to me.
</i>><i> 
</i>><i> I've built an openssl library with the FIPS objects modules, and I was
</i>><i> testing the new lib files by replacing the original library files such
</i>><i> as libcrypto.so with the new ones.
</i>><i> 
</i>><i> From the FIPS user guide I understand that any applications which need
</i>><i> to use the OpenSSL FIPS modules will need to run the API FIPS_mode_set
</i>><i> to enable the FIPS mode.
</i>><i> 
</i>><i> This sounds like a big issue to me: there are may other libraries/ services which depends on OpenSSL. For example, Python, Apache, PostgreSQL, etc.
</i>><i> 
</i>><i> If the /FIPS_mode_set /API needs to be invoked in order to enable the
</i>><i> FIPS mode, how can we make third party library/ services like Python and
</i>><i> Apache to invoke this API?
</i>><i> 
</i>><i> Is there any other way to make the FIPS mode always enabled?
</i>
Well ... yes and no. It depends.

The OpenSSL FIPS module User Guide
(<a href="https://openssl.org/docs/fips/UserGuide-2.0.pdf">https://openssl.org/docs/fips/UserGuide-2.0.pdf</a>) discusses use of the
OPENSSL_Config() call and the global openssl.conf configuration file. In
theory you could toggle FIPS mode for all the applications on a system
with in one swell foop.

In practice it's not that easy, because when you enable FIPS mode you
also automatically disable use of all "non-allowed" cryptography. Many
applications not specifically written to accommodate the restrictions of
FIPS module may not behave gracefully. Some (OpenSSH for instance)
require extensive hacks for FIPS mode.

Apache httpd does have native FIPS support, but you'll need to invoke
the right buildtime and runtime options; the typical httpd binary
install won't have FIPS support.

-Steve M.</pre></div></div></div>