Thanks LM,
I wasn't explicitly including fipscanister.o. According to my interpretation of the documentation, it should be included in libeay32.dll: Section 2.4.2 Note that except in the most unusual circumstances the FIPS Object Module itself (fipscanister.o) is not linked directly with application code. Section 4.3.3 The resulting FIPS capable OpenSSL can be used for shared or static linking. The shared library built (when ms\ntdll.mak is used as the Makefile) links fipscanister.lib into libeay32.dll using fipslink.pl I did try to link fipscanister.lib directly and got a set of errors like this: MSVCRT.lib(MSVCRT.DLL) : error LNK2005: _fopen already defined in LIBC.lib(fopen.obj) I think that is usually caused by a mismatch of static and dymnamic libraries. I tried /NODEAULTLIB: on both MSVCRT.lib and LIBC.lib, but both gave linker errors about similar c library calls. I also tried to link the static libs, libeayfips.lib with and without fipscanister.lib, but either got my previous link errors or these new ones. As a side question, do I need to link ssley32.lib? It's in some examples, but doesn't seem to make a difference whether I link it in or not, at least, regarding my current issues. Thanks, -Jon ________________________________ From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] On Behalf Of Memmott, Lester Sent: Friday, February 01, 2013 3:59 PM To: openssl-users@openssl.org Subject: RE: Compiling openssl fips in Windows Regarding: C:\temp\nma0452: setargv.obj d:\work\ssl\ved\Debug\VED.obj d:\work\ssl\ved\Debug\stdafx.obj d:\work\ssl\ved\Debug\fips_premain.obj d:\Work\SSL\openssl-1.0.1c\out32dll\libeay32.lib ws2_32.lib gdi32.lib advapi32.lib crytp32.bli user32.lib I'm not sure but did you link in fipscanister.lib? It's required too. Thanks, LM From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] On Behalf Of Jon Evers Sent: Friday, February 01, 2013 3:45 PM To: openssl-users@openssl.org Subject: Compiling openssl fips in Windows I'm trying to link an application that will use openssl and fips. (sorry about any typos and shortcuts. I have to hand type this because my development is on a closed system and I can't cut and paste to here) I'm getting linker errors: Error LNK2001: unresolved external symbol _FIPS_hmac_ctx_cleanup Error LNK2001: unresolved external symbol _FIPS_hmac_final Error LNK2001: unresolved external symbol _FIPS_hmac_update Plus a few other "unresolved _FIPS_xxx" linkings. My project is basically the fips_hmac example from Appendix C in the User Guide with some minor changes to build on MS Visual Studio 2008. I'm trying to link the DLL, lib32eay.dll. If I look at the libeay32.map file that gets created, I see those symbols: 0002:00000e80 _FIPS_hmac_final 0fbbde80 f fipscanister:hmac.obj I'm using fipslink.pl to do the linking and set the FIPS variables. I also build a .mak file using nt.mak as an example. When I run nmake, my compiler command looks like this: cl /Fod:\work\ssl\ved\Debug\fips_premain.obj -ID:\Work\SSL\openssl-fips-2.0.0\inc32 -IO /MD /Ox /O2 /Ob2 -DOPENSSL_THREADS -DDSO_WIN32 -W3 -GX -GS0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -I\usr\local\ssl\fips-2.0\include -DOPENSSL_USER_APPLINK -I. -DOPENSSL_NO_RRC5 -DOPENSLL_NO_MD2 -DOPENSSL_NO_KRB5 -DOPENSSL_FIPS -DOPENSSL_NO_JPAKE -DOPENSSL_NO_STATIC_ENGINE /Zl /Zi /Fd/lib -c \usr\local\ssl\fips-2.0\lib/fips_premain.c ...which compiles with no errors or warnings. I have 2 other files that also compile clean (stdafx.cpp and VED.cpp). My link command (which is inside fipslink.pl) looks like this: link /nologo /subsystem:console /opt:ref /debug /map /out:Debug\VED.exe @C:\temp\nma0452 C:\temp\nma0452: setargv.obj d:\work\ssl\ved\Debug\VED.obj d:\work\ssl\ved\Debug\stdafx.obj d:\work\ssl\ved\Debug\fips_premain.obj d:\Work\SSL\openssl-1.0.1c\out32dll\libeay32.lib ws2_32.lib gdi32.lib advapi32.lib crytp32.bli user32.lib "openssl version -a" returns OpenSSL 1.0.1c-fips 10 May 2012 ...which I think indicates that I build the fips and openssl correctly. But, the linker warnings don't make sense to me because it looks like the symbols are in the linked .lib. Any ideas why this might not link? Thanks, -Jon Evers Live customer support is available 24/7/365 from the U.S. for all customers worldwide and locally in other countries. Find out more at www.go2vanguard.com <http://www.go2vanguard.com/> . Enable Yourself(tm) Learn more about Vanguard zSecurity University training classes offered online, on-demand by request, or in a traditional classroom setting in cities worldwide. www.go2vanguard.com <http://www.go2vanguard.com/> This e-mail and any attachments are intended solely for the use of the addressee and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination of this e-mail or any attachments is strictly prohibited. If you have received this e-mail in error, please do not read this email, please delete all copies of this e-mail and any attachments and notify the sender immediately. Thank you. Live customer support is available 24/7/365 from the U.S. for all customers worldwide and locally in other countries. Find out more at www.go2vanguard.com. Enable Yourself Learn more about Vanguard zSecurity University training classes offered online, on-demand by request, or in a traditional classroom setting in cities worldwide. www.go2vanguard.com This e-mail and any attachments are intended solely for the use of the addressee and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination of this e-mail or any attachments is strictly prohibited. If you have received this e-mail in error, please do not read this email, please delete all copies of this e-mail and any attachments and notify the sender immediately. Thank you.