Modify fipsld such that it uses gcc to compile the .c file (which you're not 
allowed to modify), and links your application with g++.  The changes are 
pretty straight-forward, and don't affect what you can say about your 
application and FIPS 140.

You could also leave fipsld alone and modify your call to fipsld to include all 
the libraries you need for C++, but I find that to be rather onerous.

TOM

On Feb 1, 2013, at 3:19 AM, Santhosh Kokala wrote:

> Linking the FIPS capable libraries to our code is proving to be a real pain
> in the butt. The problem stems from the fact that long before I arrived it
> was decided that everything is to be linked statically. So that means that
> fipsld is needed. To compound things our code is c++ and compiled using g++,
> but the fipspre_main.c has that wonderful little char array initialization
> bug that g++ complains about. As a result I have had to run fipsld with gcc
> and include all the c++ libraries to successfully compile and link the FIPS
> libraries to our code. So far I have been successful only on my Mac using
> "-lstdc++ " as gcc flags. On Linux I just can't seem to figure
> out what libraries I am missing or if something else is at play.
> 
> So...
> 
> 1) Has anyone else had experience needing to use gcc to link FIPS to c++
> code and been successful and have insight into the issue.
> 
> 2) Does fipsld have to be used or could I, within the spirit of the security
> policy, make my own fipsld of sorts that compiles fipspre_main.c with gcc
> and links with g++?
> 
> 3) Am I better off compiling the FIPS capable libraries as shared and
> re-working our code to work with those?
> 
> Here is a snippet of the errors I get. I have tried combinations of -lstdc++
> -lm -lc -shared-libgcc. None of these fix the problem.
> 
> xxx.cpp:138: undefined reference to `__dynamic_cast'
> xxx.cpp:172: undefined reference to `__dynamic_cast'
> xxx.cpp:1282: undefined reference to `std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >::basic_string()'
> xxx.cpp:1286: undefined reference to `std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >::operator+=(char const*)'
> xxx.cpp:763: undefined reference to `operator delete(void*)'
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to