Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenSSL with FIPS cross compiling for iOS armv7

I cross compiled the FIPS for armv7 using the instructions from http://opensslfoundation.com/testing/validation-2.0/platforms/ios/

I am having difficulties cross compiling openssl dependency on fips.

I am getting following error in terminal.

/usr/local/ssl/fips-2.0/bin/fipsld: line 185: ./openssl: Bad CPU type in executable
make[2]: *** [link_app.] Error 1
make[1]: *** [openssl] Error 2
make: *** [build_apps] Error 1

This is because the openssl executable under the "/apps" folder is of architecture armv7. Since I am cross compiling openssl, I need only the libssl and libcrypto with architecture armv7, other intermediate executables should build with i386 architecture.

Any help with setting up the environment variables is appreciated.

like image 613
Vinay Avatar asked Sep 14 '12 21:09

Vinay


1 Answers

The OpenSSL FIPS User Guide 2.0 has a comprehensive example of building the FIPS Object Module and FIPS Capable Library. It also offers a sample iOS program to test your build against. See Appendix E on p. 122.

From the looks of it (due to link_app error), you did not set your environment properly with setenv-ios-11.sh. That caused your build attempt to build the executables (which should not be built in this configuration).

like image 177
jww Avatar answered Oct 02 '22 12:10

jww