<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>I read about FIPS kernel support. It is necessary? My system doesn't have the /proc/sys/crypto/fips_enabled file.<br><br><div><hr id="stopSpelling">From: marcosbontempo@hotmail.com<br>To: openssl-users@openssl.org<br>Date: Sun, 3 Jan 2016 14:24:45 -0200<br>Subject: Re: [openssl-users] FIPS_mode_set(1) error:00000000:lib(0):func(0):reason(0)<br><br>

<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

--></style>
<div dir="ltr"><div style="line-height:21.3px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);"><div style="line-height:21.3px;">I'm getting the code 0 but the FIPS mode still is disabled.</div><div style="line-height:21.3px;"><br style="line-height:21.3px;"></div><div style="line-height:21.3px;">#include <openssl/crypto.h></div><div style="line-height:21.3px;">#include <openssl/err.h></div><div style="line-height:21.3px;">#include <stdio.h></div><div style="line-height:21.3px;"><br style="line-height:21.3px;"></div><div style="line-height:21.3px;">int main ( int argc, char *argv[] )</div><div style="line-height:21.3px;">{</div><div style="line-height:21.3px;">    int rc, mode;</div><div style="line-height:21.3px;"><br style="line-height:21.3px;"></div><div style="line-height:21.3px;">    mode = FIPS_mode();</div><div style="line-height:21.3px;">    if(mode == 0)</div><div style="line-height:21.3px;">    {</div><div style="line-height:21.3px;">        rc = FIPS_mode_set(1);</div><div style="line-height:21.3px;">        ERR_load_crypto_strings();</div><div style="line-height:21.3px;">        printf("%s\n", ERR_error_string(ERR_get_error(), NULL));</div><div style="line-height:21.3px;">    }</div><div style="line-height:21.3px;">    else</div><div style="line-height:21.3px;">    {</div><div style="line-height:21.3px;">        printf("Already in FIPS mode\n");</div><div style="line-height:21.3px;">    }</div><div style="line-height:21.3px;"><br style="line-height:21.3px;"></div><div style="line-height:21.3px;">    return 0;</div><div style="line-height:21.3px;">}   </div><div style="line-height:21.3px;"><br style="line-height:21.3px;"></div><div style="line-height:21.3px;">Every time I run it I get error:00000000:lib(0):func(0):reason(0).</div><div><br></div></div><br><div>> Date: Sun, 3 Jan 2016 10:54:19 -0500<br>> Subject: Re: [openssl-users] FIPS_mode_set(1) error:00000000:lib(0):func(0):reason(0)<br>> From: noloader@gmail.com<br>> To: marcosbontempo@hotmail.com<br>> <br>> On Sun, Jan 3, 2016 at 10:48 AM, Marcos Bontempo<br>> <marcosbontempo@hotmail.com> wrote:<br>> > Thanks for the answer! The function ERR_get_error() is returning 0x00000000.<br>> > Do you know what it means?<br>> <br>> I believe it means success.<br>> <br>> > I used the command you suggested:<br>> ><br>> > arm:~/nitere/new$ openssl errstr 0x00000000<br>> > error:00000000:lib(0):func(0):reason(0)<br>> <br>> You should run the command on the error code you receive immediately<br>> after calling FIPS_mode_set.<br>> <br>> Or, use ERR_print_errors() to print the entire error stack.<br>> <br>> You should probably reduce your testing to something simpler until you<br>> figure out what's going on. Maybe somethin glike<br>> https://wiki.openssl.org/index.php/Fipsld_and_C%2B%2B#The_C.2B.2B_Program<br>> .<br>> <br>> Jeff<br></div>                                      </div>
<br>_______________________________________________
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users</div>                                        </div></body>
</html>