David Schwartz wrote:
I'm happy to use the fipscansister, but it seems that both
openssl-fips-1.1.1 and openssl-0.9.7m both fail building if configured
using "./config fips shared".

Why are you trying to build the FIPS canister with anything other than
"./config fips"?

Without the "shared" option only static
libraries are built by default, but I wish to link against a dynamic
library. I was able to do this fine with the fips snapshot
(snmp-openssl-0.9.7-stable-SNAP-20050818), but it seems upgrading to a
recent version is not easy.

So build the FIPS canister with "./config fips" and build the OpenSSL
library with "./config fips shared".

Static libraries can be used to build dynamic libraries. The reverse is, of
course, not true.

Yep, that was what I was trying to do, but building openssl with "./config fips shared --with-fipslibdir=<path>" fails (errors below). I wanted to know if this was legitimate use, and I think it is considering your comments and after reading the user guide. So I suspect now that it is a bug in the openssl build system.

It looks like -lcrypto isn't being passed to gcc, presuming that fipscanister.o is linked into libcrypto. FIPS_BUILD_CMD calls STANDALONE_BUILD_CMD but only -ldl is passed to the linker. Is this correct?? Should there be other libraries or should fipscanister.o be explicitly linked ???

   + LD_LIBRARY_PATH=..:
   + gcc -o fips_desmovs -I.. -I../include -fPIC -DOPENSSL_PIC
   -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
   -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -DB_ENDIAN -DTERMIO -O3
   -fomit-frame-pointer -Wall fips_desmovs.o -ldl
   fips_desmovs.o(.text+0x2b0): In function `DES_Cipher':
   : undefined reference to `DES_ecb_encrypt'
   fips_desmovs.o(.text+0x2d0): In function `DES_Cipher':
   : undefined reference to `DES_ecb3_encrypt'
   fips_desmovs.o(.text+0x30c): In function `DES_Cipher':
   : undefined reference to `DES_ncbc_encrypt'
   fips_desmovs.o(.text+0x334): In function `DES_Cipher':
   : undefined reference to `DES_ede3_cbc_encrypt'
   fips_desmovs.o(.text+0x370): In function `DES_Cipher':
   : undefined reference to `DES_cfb_encrypt'
   fips_desmovs.o(.text+0x3a0): In function `DES_Cipher':
   : undefined reference to `DES_ede3_cfb_encrypt'
   fips_desmovs.o(.text+0x3d8): In function `DES_Cipher':
   : undefined reference to `DES_cfb64_encrypt'
   fips_desmovs.o(.text+0x408): In function `DES_Cipher':
   : undefined reference to `DES_ede3_cfb64_encrypt'
   fips_desmovs.o(.text+0x434): In function `DES_Cipher':
   : undefined reference to `DES_ofb64_encrypt'
   fips_desmovs.o(.text+0x45c): In function `DES_Cipher':
   : undefined reference to `DES_ede3_ofb64_encrypt'
   fips_desmovs.o(.text+0xb94): In function `do_mct':
   : undefined reference to `DES_set_key_unchecked'
   fips_desmovs.o(.text+0xbac): In function `do_mct':
   : undefined reference to `DES_set_key_unchecked'
   fips_desmovs.o(.text+0xbb8): In function `do_mct':
   : undefined reference to `DES_set_key_unchecked'
   fips_desmovs.o(.text+0xed4): In function `do_mct':
   : undefined reference to `DES_set_odd_parity'
   fips_desmovs.o(.text+0xedc): In function `do_mct':
   : undefined reference to `DES_set_odd_parity'
   fips_desmovs.o(.text+0xee4): In function `do_mct':
   : undefined reference to `DES_set_odd_parity'
   fips_desmovs.o(.text+0x1930): In function `proc_file':
   : undefined reference to `DES_set_key_unchecked'
   fips_desmovs.o(.text+0x1948): In function `proc_file':
   : undefined reference to `DES_set_key_unchecked'
   fips_desmovs.o(.text+0x1954): In function `proc_file':
   : undefined reference to `DES_set_key_unchecked'
   fips_desmovs.o(.text+0x1cf0): In function `proc_file':
   : undefined reference to `DES_set_key_unchecked'
   fips_desmovs.o(.text+0x1d08): In function `proc_file':
   : undefined reference to `DES_set_key_unchecked'
   fips_desmovs.o(.text+0x1d14): more undefined references to
   `DES_set_key_unchecked' follow
   fips_desmovs.o(.text+0x1fc0): In function `main':
   : undefined reference to `FIPS_mode_set'
   fips_desmovs.o(.text+0x1fd8): In function `main':
   : undefined reference to `BIO_new_fp'
   fips_desmovs.o(.text+0x1fdc): In function `main':
   : undefined reference to `ERR_print_errors'
   fips_desmovs.o(.text+0x22f0): In function `DESTest':
   : undefined reference to `DES_set_key_unchecked'
   fips_desmovs.o(.text+0x2308): In function `DESTest':
   : undefined reference to `DES_set_key_unchecked'
   fips_desmovs.o(.text+0x2314): In function `DESTest':
   : undefined reference to `DES_set_key_unchecked'
   collect2: ld returned 1 exit status
   make[2]: *** [fips_desmovs] Error 1
   make[2]: Leaving directory
   
`/home/brendan.simon/Aegis/Development/openssl.0.9.7.13.1.C101/cyphernet/glibc/build/test'
   make[1]: *** [sub_all] Error 1
   make[1]: Leaving directory
   
`/home/brendan.simon/Aegis/Development/openssl.0.9.7.13.1.C101/cyphernet/glibc/build'
   make: *** [cyphernet-build] Error 2


Cheers, Brendan.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to