<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>I’ve successfully built and installed openssl 3.0 and the fips.so module in my yocto build environment. My goal is to make the FIPs module the default provider for all applications so I modified my openssl.cnf file  to match the docs like the following.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>    config_diagnostics = 1<o:p></o:p></p><p class=MsoNormal>    openssl_conf = openssl_init<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>    .include /usr/lib/ssl-3/fipsmodule.cnf<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>    [openssl_init]<o:p></o:p></p><p class=MsoNormal>    providers = provider_sect<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>    [provider_sect]<o:p></o:p></p><p class=MsoNormal>    fips = fips_sect<o:p></o:p></p><p class=MsoNormal>    base = base_sect<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>    [base_sect]<o:p></o:p></p><p class=MsoNormal>    activate = 1<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>After boot, I check the installed providers with “openssl list –providers” and see only the base provider. I then try to install the FIPS module with the following.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>openssl fipsinstall –module /usr/lib/ossl-modules/fips.so –out /usr/lib/ssl-3/fipsmodule.cnf <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>and I get the error output:<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>Unable to get MAC of type HMAC<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>INSTALL FAILED<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>1020F876:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:../openssl-3.0.0/crypto/evp/evp_fetch.c:346:Global default library context, Algorithm (HMAC : 0), Properties (<null>)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>When I replace the base provider with the default provider, leaving the fips module like the following<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>    config_diagnostics = 1<o:p></o:p></p><p class=MsoNormal>    openssl_conf = openssl_init<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>    .include /usr/lib/ssl-3/fipsmodule.cnf<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>    [openssl_init]<o:p></o:p></p><p class=MsoNormal>    providers = provider_sect<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>    [provider_sect]<o:p></o:p></p><p class=MsoNormal>    default = default_sect<o:p></o:p></p><p class=MsoNormal>    fips = fips_sect<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>    [default_sect]<o:p></o:p></p><p class=MsoNormal>    activate = 1<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I see only the default provider installed after I boot and when I try to manually install the FIPS module with the above command I get the following.<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>Failed to load FIPS module<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>INSTALL FAILED<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>1080F176:error:1C8000D4:Provider routines:SELF_TEST_post:invalid state:../openssl-3.0.0/providers/fips/self_test.c:261:<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>1080F176:error:1C8000D8:Provider routines:OSSL_provider_init_int:self test post failure:../openssl-3.0.0/providers/fips/fipsprov.c:706:<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>1080F176:error:078C0105:common libcrypto routines:provider_init:init fail:../openssl-3.0.0/crypto/provider_core.c:903:name=fips<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>From this state, if I copy the ossl-modules directory to a different location like /usr/lib/ssl-3/ and try to manually install the FIPS module with<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>openssl fipsinstall –module /usr/lib/ssl-3/ossl-modules/fips.so –out /usr/lib/ssl-3/fipsmodule.cnf <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>it successful installs with the following output and I see both the fips and default providers installed.<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>HMAC : (Module_Integrity) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>SHA1 : (KAT_Digest) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>SHA2 : (KAT_Digest) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>SHA3 : (KAT_Digest) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>TDES : (KAT_Cipher) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>AES_GCM : (KAT_Cipher) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>AES_ECB_Decrypt : (KAT_Cipher) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>RSA : (KAT_Signature) : RNG : (Continuous_RNG_Test) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>ECDSA : (PCT_Signature) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>ECDSA : (PCT_Signature) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>DSA : (PCT_Signature) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>TLS13_KDF_EXTRACT : (KAT_KDF) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>TLS13_KDF_EXPAND : (KAT_KDF) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>TLS12_PRF : (KAT_KDF) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>PBKDF2 : (KAT_KDF) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>SSHKDF : (KAT_KDF) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>KBKDF : (KAT_KDF) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>HKDF : (KAT_KDF) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>SSKDF : (KAT_KDF) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>X963KDF : (KAT_KDF) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>X942KDF : (KAT_KDF) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>HASH : (DRBG) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>CTR : (DRBG) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>HMAC : (DRBG) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>DH : (KAT_KA) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>ECDH : (KAT_KA) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>RSA_Encrypt : (KAT_AsymmetricCipher) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>RSA_Decrypt : (KAT_AsymmetricCipher) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>RSA_Decrypt : (KAT_AsymmetricCipher) : Pass<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>INSTALL PASSED<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I need to get the FIPS module to install without needing the default provider. It seems like the FIPS module is trying to install and getting stuck in a bad state, but I could use some help debugging this.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks for any help you can provide.<o:p></o:p></p><p class=MsoNormal>Susan<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>