<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openssl.org/index.php?action=history&amp;feed=atom&amp;title=HP-UX_Itanium_FIPS_and_OpenSSL_build</id>
	<title>HP-UX Itanium FIPS and OpenSSL build - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openssl.org/index.php?action=history&amp;feed=atom&amp;title=HP-UX_Itanium_FIPS_and_OpenSSL_build"/>
	<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=HP-UX_Itanium_FIPS_and_OpenSSL_build&amp;action=history"/>
	<updated>2026-04-09T09:41:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=HP-UX_Itanium_FIPS_and_OpenSSL_build&amp;diff=1604&amp;oldid=prev</id>
		<title>Prasad.sg: HP-UX OpenSSL build (FIPS capable)</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=HP-UX_Itanium_FIPS_and_OpenSSL_build&amp;diff=1604&amp;oldid=prev"/>
		<updated>2014-04-21T08:45:17Z</updated>

		<summary type="html">&lt;p&gt;HP-UX OpenSSL build (FIPS capable)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The [http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf OpenSSL FIPS 140-2 Security Policy] details the way to build the fipscanister.o object module in a FIPS capable way.&lt;br /&gt;
&lt;br /&gt;
Below are the steps with sample instruction to build fipscanister.o and a FIPS Capable version of OpenSSL on HP-UX on Itanium 2 based platform.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use HP-UX Itanium 2 based system ==&lt;br /&gt;
Ensure that you are building on a HP-UX Itanium 2 based system (HP-UX 11i v2 and HP-UX 11i v3 supports this hardware)&lt;br /&gt;
&lt;br /&gt;
$ uname -a&lt;br /&gt;
 HP-UX systemname B.11.31 U ia64 0647852721 unlimited-user license&lt;br /&gt;
$ machinfo&lt;br /&gt;
 CPU info:&lt;br /&gt;
  2 Intel(R) Itanium 2 processors (1.5 GHz, 6 MB)&lt;br /&gt;
          400 MT/s bus, CPU version B1&lt;br /&gt;
 -&lt;br /&gt;
 -&lt;br /&gt;
&lt;br /&gt;
== Use correct compiler ==&lt;br /&gt;
Ensure that you have the ac++ compiler and acc linker. The “Appendix C” of [http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf OpenSSL FIPS 140-2 Security Policy] mentions that “HP C/aC++ B3910B” was used to generate the FIPS module fipscanister.o. The use of the specific version is not mandatory.&lt;br /&gt;
&lt;br /&gt;
$ swlist | grep -e ACC -e aC++ -e PHSS_43743&lt;br /&gt;
  B9007AA                               C.11.31.08     HP C/aC++ Developer's Bundle&lt;br /&gt;
  HP-ACC-Link                           C.11.31.03     HP aCC_link Bundle&lt;br /&gt;
  PHSS_43743                            1.0            linker + fdp cumulative patch       &amp;gt;&amp;gt;&amp;gt; This patch might get superseded in future&lt;br /&gt;
&lt;br /&gt;
$ cc -V&lt;br /&gt;
 cc: HP C/aC++ B3910B A.06.28 [Nov 21 2013]&lt;br /&gt;
&lt;br /&gt;
$ which ld&lt;br /&gt;
 /usr/bin/ld&lt;br /&gt;
$ ll /usr/bin/ld&lt;br /&gt;
 lr-xr-xr-x   1 bin        bin             15 Dec  3  2010 /usr/bin/ld -&amp;gt; /usr/ccs/bin/ld&lt;br /&gt;
$ what /usr/ccs/bin/ld&lt;br /&gt;
 /usr/ccs/bin/ld:&lt;br /&gt;
        ld_msgs.cat: $Revision: 1.85 $&lt;br /&gt;
        92453-07 linker ld HP Itanium(R) B.12.61  IPF/IPF&lt;br /&gt;
        REL Tue Feb 25 05:59:30 2014 PST&lt;br /&gt;
        HP aC++ for Integrity Servers B3910B A.06.28 [Nov 21 2013] C++ Standard Library (RogueWave Version 2.02.01)&lt;br /&gt;
        HP aC++ for Integrity Servers B3910B A.06.28 [Nov 21 2013] Language Support Library&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Verify HMAC-SHA-1 ==&lt;br /&gt;
Before actually building, one of the requirements is to verify the HMAC-SHA-1 digest of the FIPS source code “.tar.gz” file. This digest should match the HMAC-SHA-1 digest given in Appendix B section of the [http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp1747.pdf OpenSSL FIPS 140-2 Security Policy]. Care should be taken to use a SHA-1 FIPs validated implementation to generate the HMAC-SHA-1 digest. A CD containing this source code can also be requested from OpenSSL Foundation (see [http://opensslfoundation.org/fips/verify.html http://opensslfoundation.org/fips/verify.html]).&lt;br /&gt;
&lt;br /&gt;
== Sample Build ==&lt;br /&gt;
&lt;br /&gt;
Copy the FIPS and the latest OpenSSL sources in a specific folder. Say in /openssl_fips&lt;br /&gt;
&lt;br /&gt;
$ ls -1 /openssl_fips&lt;br /&gt;
 openssl-1.0.1g.tar.gz&lt;br /&gt;
 openssl-fips-2.0.5.tar.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A sample set of instruction for building FIPS 2.0.5 code with OpenSSL 1.0.1g is given below. The FIPS code install into /usr/local/ssl/fips-2.0 directory. The OpenSSL code builds into /opt/my_openssl/64bits and  /opt/my_openssl/32bits for 64 and 32 bit build respectively. We move the 64 and 32 bit installed FIPS module to /opt/my_openssl/64_bits/fips-2.0 and /opt/my_openssl/32_bits/fips-2.0 later after the build.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 #=====================================================================&lt;br /&gt;
 # Initial setup&lt;br /&gt;
 #=====================================================================&lt;br /&gt;
 #&lt;br /&gt;
 # cd to the source directory where all .tar.gz files are located.&lt;br /&gt;
 #&lt;br /&gt;
 cd /openssl_fips&lt;br /&gt;
 #&lt;br /&gt;
 # Remove the destination directories where FIPS module and OpenSSL&lt;br /&gt;
 # gets installed&lt;br /&gt;
 #&lt;br /&gt;
 if &amp;lt;nowiki&amp;gt;[[ -d /usr/local/ssl ]]&amp;lt;/nowiki&amp;gt; ; then mv /usr/local/ssl /usr/local/ssl_bkp;  fi&lt;br /&gt;
 if &amp;lt;nowiki&amp;gt;[[ -d /opt/my_openssl ]]&amp;lt;/nowiki&amp;gt; ; then mv /opt/my_openssl /opt/my_openssl_bkp; fi&lt;br /&gt;
 #&lt;br /&gt;
 #=====================================================================&lt;br /&gt;
 # 64 bit build&lt;br /&gt;
 #=====================================================================&lt;br /&gt;
 #&lt;br /&gt;
 # copy and extract code&lt;br /&gt;
 #&lt;br /&gt;
 mkdir 64_bits&lt;br /&gt;
 cp openssl-fips-2.0.5.tar.gz 64_bits&lt;br /&gt;
 cp openssl-1.0.1g.tar.gz  64_bits&lt;br /&gt;
 cd 64_bits&lt;br /&gt;
 gunzip openssl-fips-2.0.5.tar.gz&lt;br /&gt;
 tar xvf openssl-fips-2.0.5.tar&lt;br /&gt;
 gunzip openssl-1.0.1g.tar.gz&lt;br /&gt;
 tar xvf openssl-1.0.1g.tar&lt;br /&gt;
 #&lt;br /&gt;
 # Start the 64 bit FIPS build.&lt;br /&gt;
 #&lt;br /&gt;
 cd openssl-fips-2.0.5&lt;br /&gt;
 ./config no-asm&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 #&lt;br /&gt;
 # Start the 64 bit OpenSSL build&lt;br /&gt;
 #&lt;br /&gt;
 cd openssl-1.0.1g&lt;br /&gt;
 ./config fips threads shared --openssldir=/opt/my_openssl/64_bits&lt;br /&gt;
 make depend&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 #&lt;br /&gt;
 # move the 64 bit FIPS built modules into /opt/my_openssl/64_bits&lt;br /&gt;
 #&lt;br /&gt;
 mv /usr/local/ssl/fips-2.0 /opt/my_openssl/64_bits/fips-2.0&lt;br /&gt;
 #&lt;br /&gt;
 # change to /openssl_fips directory&lt;br /&gt;
 #&lt;br /&gt;
 cd /openssl_fips&lt;br /&gt;
 #&lt;br /&gt;
 #=====================================================================&lt;br /&gt;
 # 32 bit build&lt;br /&gt;
 #=====================================================================&lt;br /&gt;
 #&lt;br /&gt;
 # KERNEL_BITS variable is used by OpenSSL to build 32/64 bits code on HP-UX.&lt;br /&gt;
 # default is 64 bits. Hence, we need to explicitly set the variable for 32 bit build.&lt;br /&gt;
 #&lt;br /&gt;
 export KERNEL_BITS=32&lt;br /&gt;
 #&lt;br /&gt;
 # copy and extract code&lt;br /&gt;
 #&lt;br /&gt;
 mkdir 32_bits&lt;br /&gt;
 cp openssl-fips-2.0.5.tar.gz 32_bits&lt;br /&gt;
 cp openssl-1.0.1g.tar.gz  32_bits&lt;br /&gt;
 cd 32_bits&lt;br /&gt;
 gunzip openssl-fips-2.0.5.tar.gz&lt;br /&gt;
 tar xvf openssl-fips-2.0.5.tar&lt;br /&gt;
 gunzip openssl-1.0.1g.tar.gz&lt;br /&gt;
 tar xvf openssl-1.0.1g.tar&lt;br /&gt;
 #&lt;br /&gt;
 # Start the 32 bit FIPS build.&lt;br /&gt;
 #&lt;br /&gt;
 cd openssl-fips-2.0.5&lt;br /&gt;
 ./config no-asm&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 #&lt;br /&gt;
 # Start the 32 bit OpenSSL build&lt;br /&gt;
 #&lt;br /&gt;
 cd openssl-1.0.1g&lt;br /&gt;
 ./config fips threads shared --openssldir=/opt/my_openssl/32_bits&lt;br /&gt;
 make depend&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 #&lt;br /&gt;
 # move the 32 bit FIPS built modules into /opt/my_openssl/32_bits&lt;br /&gt;
 #&lt;br /&gt;
 mv /usr/local/ssl/fips-2.0 /opt/my_openssl/32_bits/fips-2.0&lt;br /&gt;
 #&lt;br /&gt;
 # Unset the KERNEL_BITS variables which we had used for 32 bits build&lt;br /&gt;
 #&lt;br /&gt;
 unset KERNEL_BITS&lt;br /&gt;
 #&lt;br /&gt;
 # Done&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Check if FIPS generated build works ==&lt;br /&gt;
Check if the FIPS really works. You will see that md5 algorithm do not work in FIPS mode and will throw an error “digital envelope routines:FIPS_DIGESTINIT:disabled for fips:fips_md.c”.&lt;br /&gt;
&lt;br /&gt;
 echo helloworld &amp;gt; /tmp/test.txt&lt;br /&gt;
 /opt/my_openssl/64_bits/bin/openssl sha1 &amp;lt; /tmp/test.txt&lt;br /&gt;
 /opt/my_openssl/64_bits/bin/openssl md5 &amp;lt; /tmp/test.txt&lt;br /&gt;
 export OPENSSL_FIPS=1&lt;br /&gt;
 /opt/my_openssl/64_bits/bin/openssl sha1 &amp;lt; /tmp/test.txt&lt;br /&gt;
 /opt/my_openssl/64_bits/bin/openssl md5 &amp;lt; /tmp/test.txt&lt;br /&gt;
 unset OPENSSL_FIPS&lt;br /&gt;
 rm /tmp/test.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Additional Tests ==&lt;br /&gt;
Additional testing can be performed by using “make test” on the OpenSSL build and following the “CMVP Test Procedure” provided in the [http://www.openssl.org/docs/fips/UserGuide-2.0.pdf User Guide for the OpenSSL FIPS Object Module]&lt;br /&gt;
&lt;br /&gt;
--[[User:Prasad.sg|Prasad.sg]] 08:45, 21 April 2014 (UTC)&lt;/div&gt;</summary>
		<author><name>Prasad.sg</name></author>
	</entry>
</feed>