<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1510675177316_4174">FYI, I came up with following manual solution to correctly build 1.0.2l static library with FIPS - 2.0.16 on Windows, using Visual Studio 2015. This seems to
work, and I no longer need to carry run time DLLs along with the application. I feel this should be an acceptable solution. Does anyone see any problems with editing the switch from /MD to /MT in the generated Makefiles?</div><div id="yui_3_16_0_ym19_1_1510675177316_3959"><o:p id="yui_3_16_0_ym19_1_1510675177316_3960"></o:p></div><div id="yui_3_16_0_ym19_1_1510675177316_3961"><o:p id="yui_3_16_0_ym19_1_1510675177316_3962"> </o:p></div><div style="mso-list:l0 level1 lfo1" id="yui_3_16_0_ym19_1_1510675177316_3963"><!--[if !supportLists]-->-<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_3964">         
</span><!--[endif]-->FIPS module:<o:p id="yui_3_16_0_ym19_1_1510675177316_3965"></o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_3966" dir="ltr"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_3967">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_3968">   </span></span>Set VS environment on the Windows terminal, and change directory to  to unarchived FIPS module directory.<o:p id="yui_3_16_0_ym19_1_1510675177316_3969"></o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_3970"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_3971">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_3972">   </span></span><!--[endif]-->SET
MFILE=nt.mak<o:p id="yui_3_16_0_ym19_1_1510675177316_3973"></o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_3974"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_3975">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_3976">   </span></span><!--[endif]-->SET
TARGET=VC-WIN64A<o:p id="yui_3_16_0_ym19_1_1510675177316_3977"></o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_3978"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_3979">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_3980">   </span></span><!--[endif]-->SET
ASM=nasm<o:p id="yui_3_16_0_ym19_1_1510675177316_3981"></o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_3982"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_3983">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_3984">   </span></span><!--[endif]-->perl
Configure %TARGET% fipscheck<o:p id="yui_3_16_0_ym19_1_1510675177316_3985"></o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_3986"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_3987">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_3988">   </span></span><!--[endif]-->perl
util\mkfiles.pl >MINFO<o:p id="yui_3_16_0_ym19_1_1510675177316_3989"></o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_3990"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_3991">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_3992">   </span></span><!--[endif]-->perl
util\mk1mf.pl %ASM% %TARGET% >ms\%MFILE%<o:p id="yui_3_16_0_ym19_1_1510675177316_3993"></o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_3994"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_3995">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_3996">   </span></span><!--[endif]-->edit
nt.mak to link static runtime library libcmt.lib to the executables that it
generates. <o:p id="yui_3_16_0_ym19_1_1510675177316_3997"></o:p></div><div style="margin-left:1.0in" id="yui_3_16_0_ym19_1_1510675177316_3998"><o:p id="yui_3_16_0_ym19_1_1510675177316_3999"> </o:p></div><div style="margin-left:1.0in" id="yui_3_16_0_ym19_1_1510675177316_4000">-EX_LIBS=ws2_32.lib
gdi32.lib advapi32.lib crypt32.lib user32.lib<o:p id="yui_3_16_0_ym19_1_1510675177316_4001"></o:p></div><div style="margin-left:1.0in" id="yui_3_16_0_ym19_1_1510675177316_4002">+EX_LIBS=ws2_32.lib
gdi32.lib advapi32.lib crypt32.lib user32.lib <span style="background:lime;mso-highlight:lime" id="yui_3_16_0_ym19_1_1510675177316_4003">libcmt.lib</span><o:p id="yui_3_16_0_ym19_1_1510675177316_4004"></o:p></div><div id="yui_3_16_0_ym19_1_1510675177316_4005"><o:p id="yui_3_16_0_ym19_1_1510675177316_4006"> </o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_4007"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_4008">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_4009">   </span></span><!--[endif]-->nmake
-f ms\%MFILE% clean<o:p id="yui_3_16_0_ym19_1_1510675177316_4010"></o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_4011"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_4012">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_4013">   </span></span><!--[endif]-->nmake
-f ms\%MFILE%<o:p id="yui_3_16_0_ym19_1_1510675177316_4014"></o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_4015"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_4016">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_4017">   </span></span><!--[endif]-->nmake
-f ms\%MFILE% install<o:p id="yui_3_16_0_ym19_1_1510675177316_4018"></o:p></div><div id="yui_3_16_0_ym19_1_1510675177316_4019"><o:p id="yui_3_16_0_ym19_1_1510675177316_4020"> </o:p></div><div style="mso-list:l0 level1 lfo1" id="yui_3_16_0_ym19_1_1510675177316_4021"><!--[if !supportLists]-->-<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_4022">         
</span><!--[endif]-->OpenSSL<o:p id="yui_3_16_0_ym19_1_1510675177316_4023"></o:p></div><div id="yui_3_16_0_ym19_1_1510675177316_4024"><o:p id="yui_3_16_0_ym19_1_1510675177316_4025"> </o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_4026"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_4027">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_4028">   </span></span><!--[endif]-->perl
Configure       VC-WIN64A no-shared zlib no-idea
no-mdc2 no-rc5 no-ssl2 no-ssl3<o:p id="yui_3_16_0_ym19_1_1510675177316_4029"></o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_4030"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_4031">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_4032">   </span></span><!--[endif]-->edit
ms\nt.mak<o:p id="yui_3_16_0_ym19_1_1510675177316_4033"></o:p></div><div style="margin-left:1.0in" id="yui_3_16_0_ym19_1_1510675177316_4034"><o:p id="yui_3_16_0_ym19_1_1510675177316_4035"> </o:p></div><div style="margin-left:.5in;text-indent:.5in" id="yui_3_16_0_ym19_1_1510675177316_4036">-CFLAG= <span style="background:yellow;mso-highlight:yellow" id="yui_3_16_0_ym19_1_1510675177316_4037">/MD</span> /Ox /O2 /Ob2 -DZLIB
-DOPENSSL_THREADS  -DDSO_WIN32 -W3 -Gs0 ……………….<o:p id="yui_3_16_0_ym19_1_1510675177316_4038"></o:p></div><div style="margin-left:.5in;text-indent:.5in" id="yui_3_16_0_ym19_1_1510675177316_4039">+CFLAG= <span style="background:lime;mso-highlight:lime" id="yui_3_16_0_ym19_1_1510675177316_4040">/MT</span> /Ox /O2 /Ob2 -DZLIB
-DOPENSSL_THREADS  -DDSO_WIN32 -W3 -Gs0 ……………….<o:p id="yui_3_16_0_ym19_1_1510675177316_4041"></o:p></div><div style="margin-left:1.0in;mso-list:l0 level2 lfo1" id="yui_3_16_0_ym19_1_1510675177316_4042"><!--[if !supportLists]--><span style="font-family:"Courier New";mso-fareast-font-family:"Courier New"" id="yui_3_16_0_ym19_1_1510675177316_4043">o<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_4044">   </span></span><!--[endif]-->  nmake
-f ms\nt.mak all<o:p id="yui_3_16_0_ym19_1_1510675177316_4045"></o:p></div><div id="yui_3_16_0_ym19_1_1510675177316_4046"><o:p id="yui_3_16_0_ym19_1_1510675177316_4047"> </o:p></div><div>























































</div><div style="mso-list:l0 level1 lfo1" dir="ltr" id="yui_3_16_0_ym19_1_1510675177316_4048"><!--[if !supportLists]-->-<span style="font-variant-numeric: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";" id="yui_3_16_0_ym19_1_1510675177316_4049">          </span>Follow additional linking step 5.3.2 described
in the document <a href="https://www.openssl.org/docs/fips/UserGuide-2.0.pdf" style="font-family: Calibri, sans-serif; font-size: 11pt; background-color: rgb(255, 255, 255);" id="yui_3_16_0_ym19_1_1510675177316_4115">https://www.openssl.org/docs/fips/UserGuide-2.0.pdf</a>, page #74 in the final executable.  </div><div style="mso-list:l0 level1 lfo1" dir="ltr" id="yui_3_16_0_ym19_1_1510675177316_4048"><br></div><div style="mso-list:l0 level1 lfo1" dir="ltr" id="yui_3_16_0_ym19_1_1510675177316_4048"><br></div><div style="mso-list:l0 level1 lfo1" dir="ltr" id="yui_3_16_0_ym19_1_1510675177316_4048">Thanks,</div><div style="mso-list:l0 level1 lfo1" dir="ltr" id="yui_3_16_0_ym19_1_1510675177316_4048">Naveen</div><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: verdana, helvetica, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Monday, October 30, 2017 3:37 PM, naveen gupta via openssl-users <openssl-users@openssl.org> wrote:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv4269634234"><div><div style="color:#000;background-color:#fff;font-family:verdana, helvetica, sans-serif;font-size:13px;"><div id="yiv4269634234"><div id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_26807"><div style="color:#000;background-color:#fff;font-family:verdana, helvetica, sans-serif;font-size:13px;" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_26806"><div id="yiv4269634234"><div id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_23218"><div style="color:#000;background-color:#fff;font-family:verdana, helvetica, sans-serif;font-size:13px;" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_23217"><div id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21716">Hi,</div><div id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21717"><br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21718"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21719">I have am trying to compile OpenSSL 1.0.2l static library using FIPS - 2.0.16 on Windows 2012 R2, Visual Studio 2015,  using reference from <a rel="nofollow" target="_blank" href="https://www.openssl.org/docs/fips/UserGuide-2.0.pdf" style="color:rgb(25, 106, 212);" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21720">https://www.openssl.org/docs/fips/UserGuide-2.0.pdf</a> , page #68.</div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21721"><br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21722"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21723">Step 1:</div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21724"><br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21725"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21726">- cd openssl-fips-2.0.16<br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21727"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21728">- ms\do_fips</div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21729"><br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21730"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21731">Step 2:</div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21732"><br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21733"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21734">- cd openssl-1.0.2l<br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21735"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21736">- set FIPSDIR=C:\usr\local\ssl\fips-2.0<br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21737"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21738">- perl Configure       VC-WIN64A fips --with-fipsdir=%FIPSDIR% no-shared zlib no-idea no-mdc2 no-rc5 no-ssl2 no-ssl3<br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21739"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21740">- nmake -f ms\nt.mak all<br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21741"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21742"><br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21743"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21744">I see that ms\do_fips compile the code with /MD, and somehow step 2 (nmake -f ms\nt.mak all) also ends up compiling with /MD switch. The application now requires the dynamic runt time libraries and compile and run time. OpenSSL static libraries builds fine with /MT switch without FIPS module, so there's something with FIPS module that ends up setting /MD switch.</div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21745"><br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21746"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21747">Has anyone else faced this problem? As per user guide, the FIPS module should build fine with static libraries, but looks like there is some issue with it. Is there any option that can be supplied to do_fips.bat, or a different build script that needs to be run?</div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21748"><br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21749"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21750">Appreciate any help on this.</div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21751"><br id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21752"></div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21753">Thanks,</div><div dir="ltr" id="yiv4269634234yui_3_16_0_ym19_1_1509393345599_21754">NG  </div></div></div></div></div></div></div></div></div></div>-- <br>openssl-users mailing list<br>To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank">https://mta.openssl.org/mailman/listinfo/openssl-users</a><br><br><br></div>  </div> </div>  </div></div></body></html>