<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openssl.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johnjs</id>
	<title>OpenSSLWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openssl.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johnjs"/>
	<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php/Special:Contributions/Johnjs"/>
	<updated>2026-04-10T07:59:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=FIPS_Library_and_Apache&amp;diff=2381</id>
		<title>FIPS Library and Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=FIPS_Library_and_Apache&amp;diff=2381"/>
		<updated>2016-04-04T15:25:09Z</updated>

		<summary type="html">&lt;p&gt;Johnjs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Category:FIPS 140]]&lt;br /&gt;
&lt;br /&gt;
Compiling a Static OpenSSL FIPS Capable Apache2 httpd-2.4.18 &lt;br /&gt;
&lt;br /&gt;
Install the latest FIPS OpenSSL (below steps) &lt;br /&gt;
&lt;br /&gt;
In your working directory /home/username &lt;br /&gt;
&lt;br /&gt;
Download openssl-fips-2.0.12.tar.gz &lt;br /&gt;
&lt;br /&gt;
gunzip openssl-fips-2.0.12.tar.gz &lt;br /&gt;
&lt;br /&gt;
tar -xvf openssl-fips-2.0.12.tar &lt;br /&gt;
&lt;br /&gt;
cd openssl-fips-2.0.12 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
./config &lt;br /&gt;
&lt;br /&gt;
make &lt;br /&gt;
&lt;br /&gt;
make install &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download openssl-1.0.2g.tar.gz &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
gunzip openssl-1.0.2g.tar.gz &lt;br /&gt;
&lt;br /&gt;
tar -xvf openssl-1.0.2g.tar &lt;br /&gt;
&lt;br /&gt;
cd openssl-1.0.2.g &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
./config shared fips --with-fipslibdir=/usr/local/ssl/fips-2.0/lib/ &lt;br /&gt;
&lt;br /&gt;
make &lt;br /&gt;
&lt;br /&gt;
make install &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in /usr/local/ssl/lib there will be two &amp;quot;linked&amp;quot; files &lt;br /&gt;
&lt;br /&gt;
libcrypto.so.1.0.0 -&amp;gt; libcrypto.so &lt;br /&gt;
&lt;br /&gt;
libssl.so.1.0.0 -&amp;gt; libssl.so &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
copy the files (not linked libcrypto.so libssl.so) to a new shared directory /usr/local/ssl/lib/shared recreate the links in shared to libcrypto.so and libssl.so &lt;br /&gt;
&lt;br /&gt;
ln -s /usr/local/ssl/lib/shared/libcrypto.so.1.0.0 /usr/local/ssl/lib/shared/libcrypto.so &lt;br /&gt;
&lt;br /&gt;
ln -s /usr/local/ssl/lib/shared/libssl.so.1.0.0 /usr/local/ssl/lib/shared/libssl.so &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remove the links in /usr/local/ssl/lib &lt;br /&gt;
&lt;br /&gt;
rm libcrypto.so &lt;br /&gt;
&lt;br /&gt;
rm libssl.so &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The shared directory is used for application linking A direct compile for a FIPS application using: -L/usr/local/ssl/lib Will fail if the links are still in /usr/local/ssl/lib &lt;br /&gt;
&lt;br /&gt;
in /home/username (your working directory) &lt;br /&gt;
&lt;br /&gt;
Download httpd.2.4.18.tar.gz &lt;br /&gt;
&lt;br /&gt;
Download pcre-8.38.tar.gz &lt;br /&gt;
&lt;br /&gt;
Download apr-1.5.2.tar.gz &lt;br /&gt;
&lt;br /&gt;
Download apr-util-1.5.4.tar.gz &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
gunzip httpd.2.4.18.tar.gz &lt;br /&gt;
&lt;br /&gt;
gunzip pcre-8.38.tar.gz &lt;br /&gt;
&lt;br /&gt;
gunzip apr-1.5.2.tar.gz &lt;br /&gt;
&lt;br /&gt;
gunzip apr-util-1.5.4.gz &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install PCRE &lt;br /&gt;
&lt;br /&gt;
tar -xvf pcre-8.38.tar &lt;br /&gt;
&lt;br /&gt;
cd /home/username/pcre-8.38 &lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/usr/local/pcre &lt;br /&gt;
&lt;br /&gt;
make &lt;br /&gt;
&lt;br /&gt;
make install &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install Apache2(httpd) with apr &lt;br /&gt;
&lt;br /&gt;
tar -xvf httpd.2.4.18.tar &lt;br /&gt;
&lt;br /&gt;
cd httpd.2.4.18 &lt;br /&gt;
&lt;br /&gt;
cd srclib (subdirectory) &lt;br /&gt;
&lt;br /&gt;
cp /home/username/apr-1.5.2.tar . &lt;br /&gt;
&lt;br /&gt;
cp /home/username/apr-util-1.5.4.tar . &lt;br /&gt;
&lt;br /&gt;
tar -xvf apr-1.5.2.tar &lt;br /&gt;
&lt;br /&gt;
tar -xvf apr-util-1.5.4.tar &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
create two links - they are needed when apache compiles &lt;br /&gt;
&lt;br /&gt;
ln -s apr-1.5.2 apr &lt;br /&gt;
&lt;br /&gt;
ln -s apr-util-1.5.4 apr-util &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 cd .. (back to /home/username/httpd.2.4.18) &lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
&lt;br /&gt;
the --enable-ssl-staticlib-deps and --enable-mods-static=ssl are to compile the Openssl module STATIC not shared. If you leave them out, it will properly create a working apache2 server EXCEPT when you enable the SSLFIPS on in httpd.conf, then apache2 will not start and you will get a FIPS fingerprint error in the logs/error_log file. &lt;br /&gt;
&lt;br /&gt;
Procedure below is to compile OpenSSL as a static module in apache2 &lt;br /&gt;
&lt;br /&gt;
The two export(s) below sets the proper FIPS fingerprint variables. &lt;br /&gt;
&lt;br /&gt;
The configure compiles a STATIC Openssl (mod_ssl.so) into Apache2. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
export CC=/usr/local/ssl/fips-2.0/bin/fipsld &lt;br /&gt;
&lt;br /&gt;
export FIPSLD_CC=/usr/bin/gcc &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ./configure --prefix=/usr/local/apache2 --with-mpm=prefork --enable-ssl --with-ssl=/usr/local/ssl --enable-ssl-staticlib-dep --enable-mods-static=ssl --with-pcre=/usr/local/pcre --with-included-apr &lt;br /&gt;
&lt;br /&gt;
make &lt;br /&gt;
&lt;br /&gt;
make install &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I need PHP(with mysql) - so I built the share module libphp5.so and placed a copy in /usr/local/apache2/modules/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the httpd.conf file &amp;quot;Loadmodule ssl_module modules/mod_ssl.so&amp;quot; has to be commented out. In a shared version it must be active. The --with-mpm=prefork option allows me to use the system provided PHP5 module, the &amp;quot;event&amp;quot;(threaded) version didn't load PHP properly. There are some other changes needed in the httpd.conf file (on internet) on allowing Apache2 to recognize the .php extension. &lt;br /&gt;
&lt;br /&gt;
to start: /usr/local/apache2/bin/apachectl start &lt;br /&gt;
&lt;br /&gt;
to stop: /usr/local/apache2/bin/apachectl stop &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start apache and confirm it is running.&lt;br /&gt;
&lt;br /&gt;
By Wiki OpenSSL User johnjs 04-04-2016&lt;/div&gt;</summary>
		<author><name>Johnjs</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=User:Johnjs&amp;diff=2380</id>
		<title>User:Johnjs</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=User:Johnjs&amp;diff=2380"/>
		<updated>2016-04-04T15:17:33Z</updated>

		<summary type="html">&lt;p&gt;Johnjs: Compiling a Static OpenSSL FIPS Capable Apache2 httpd-2.4.18&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Compiling a Static OpenSSL FIPS Capable Apache2 httpd-2.4.18  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install the latest FIPS OpenSSL (below steps)&lt;br /&gt;
&lt;br /&gt;
In your working directory /home/username&lt;br /&gt;
&lt;br /&gt;
Download openssl-fips-2.0.12.tar.gz &lt;br /&gt;
			&lt;br /&gt;
gunzip openssl-fips-2.0.12.tar.gz&lt;br /&gt;
&lt;br /&gt;
tar -xvf openssl-fips-2.0.12.tar&lt;br /&gt;
&lt;br /&gt;
cd openssl-fips-2.0.12&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
./config&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
Download openssl-1.0.2g.tar.gz&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
gunzip openssl-1.0.2g.tar.gz&lt;br /&gt;
&lt;br /&gt;
tar -xvf openssl-1.0.2g.tar&lt;br /&gt;
&lt;br /&gt;
cd openssl-1.0.2.g&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
./config shared fips --with-fipslibdir=/usr/local/ssl/fips-2.0/lib/&lt;br /&gt;
&lt;br /&gt;
make &lt;br /&gt;
&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
in /usr/local/ssl/lib there will be two &amp;quot;linked&amp;quot; files&lt;br /&gt;
&lt;br /&gt;
libcrypto.so.1.0.0 -&amp;gt; libcrypto.so&lt;br /&gt;
&lt;br /&gt;
libssl.so.1.0.0 -&amp;gt; libssl.so&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
copy the files (not linked libcrypto.so libssl.so) to&lt;br /&gt;
a new shared directory /usr/local/ssl/lib/shared&lt;br /&gt;
recreate the links in shared to libcrypto.so and libssl.so&lt;br /&gt;
			&lt;br /&gt;
ln -s /usr/local/ssl/lib/shared/libcrypto.so.1.0.0 /usr/local/ssl/lib/shared/libcrypto.so&lt;br /&gt;
&lt;br /&gt;
ln -s /usr/local/ssl/lib/shared/libssl.so.1.0.0 /usr/local/ssl/lib/shared/libssl.so&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
Remove the links in /usr/local/ssl/lib&lt;br /&gt;
&lt;br /&gt;
rm libcrypto.so&lt;br /&gt;
&lt;br /&gt;
rm libssl.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The shared directory is used for application linking&lt;br /&gt;
A direct compile for a FIPS application using: -L/usr/local/ssl/lib&lt;br /&gt;
Will fail if the links are still in /usr/local/ssl/lib&lt;br /&gt;
&lt;br /&gt;
in /home/username (your working directory)&lt;br /&gt;
&lt;br /&gt;
Download httpd.2.4.18.tar.gz&lt;br /&gt;
&lt;br /&gt;
Download pcre-8.38.tar.gz&lt;br /&gt;
&lt;br /&gt;
Download apr-1.5.2.tar.gz&lt;br /&gt;
&lt;br /&gt;
Download apr-util-1.5.4.tar.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
gunzip httpd.2.4.18.tar.gz&lt;br /&gt;
&lt;br /&gt;
gunzip pcre-8.38.tar.gz&lt;br /&gt;
&lt;br /&gt;
gunzip apr-1.5.2.tar.gz&lt;br /&gt;
&lt;br /&gt;
gunzip apr-util-1.5.4.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install PCRE&lt;br /&gt;
&lt;br /&gt;
tar -xvf pcre-8.38.tar&lt;br /&gt;
&lt;br /&gt;
cd /home/username/pcre-8.38&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/usr/local/pcre&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install Apache2(httpd) with apr&lt;br /&gt;
&lt;br /&gt;
tar -xvf httpd.2.4.18.tar&lt;br /&gt;
&lt;br /&gt;
cd httpd.2.4.18&lt;br /&gt;
&lt;br /&gt;
cd srclib (subdirectory)&lt;br /&gt;
&lt;br /&gt;
cp /home/username/apr-1.5.2.tar .&lt;br /&gt;
&lt;br /&gt;
cp /home/username/apr-util-1.5.4.tar .&lt;br /&gt;
&lt;br /&gt;
tar -xvf apr-1.5.2.tar&lt;br /&gt;
&lt;br /&gt;
tar -xvf apr-util-1.5.4.tar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
create two links - they are needed when apache compiles&lt;br /&gt;
&lt;br /&gt;
ln -s apr-1.5.2 apr&lt;br /&gt;
&lt;br /&gt;
ln -s apr-util-1.5.4 apr-util&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd .. (back to /home/username/httpd.2.4.18)&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
&lt;br /&gt;
the --enable-ssl-staticlib-deps and --enable-mods-static=ssl&lt;br /&gt;
are to compile the Openssl module STATIC not shared. &lt;br /&gt;
If you leave them out, it will properly create a working apache2&lt;br /&gt;
server EXCEPT when you enable the SSLFIPS on in httpd.conf, then&lt;br /&gt;
apache2 will not start and you will get a FIPS fingerprint error&lt;br /&gt;
in the logs/error_log file.&lt;br /&gt;
&lt;br /&gt;
Procedure below is to compile OpenSSL as a static module in apache2&lt;br /&gt;
&lt;br /&gt;
The two export(s) below sets the proper FIPS fingerprint variables.&lt;br /&gt;
&lt;br /&gt;
The configure compiles a STATIC Openssl (mod_ssl.so) into Apache2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
export CC=/usr/local/ssl/fips-2.0/bin/fipsld&lt;br /&gt;
&lt;br /&gt;
export FIPSLD_CC=/usr/bin/gcc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/usr/local/apache2 --with-mpm=prefork --enable-ssl --with-ssl=/usr/local/ssl --enable-ssl-staticlib-dep --enable-mods-static=ssl --with-pcre=/usr/local/pcre --with-included-apr&lt;br /&gt;
						&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I need PHP(with mysql) - so I built the share module libphp5.so&lt;br /&gt;
and placed a copy in /usr/local/apache2/modules/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the httpd.conf file &amp;quot;Loadmodule ssl_module modules/mod_ssl.so&amp;quot; &lt;br /&gt;
has to be commented out. In a shared version it must be active.&lt;br /&gt;
The --with-mpm=prefork option allows me to use the system provided &lt;br /&gt;
PHP5 module, the &amp;quot;event&amp;quot;(threaded) version didn't load PHP properly.&lt;br /&gt;
There are some other changes needed in the httpd.conf file (on internet)&lt;br /&gt;
on allowing Apache2 to recognize the .php extension.&lt;br /&gt;
&lt;br /&gt;
to start: /usr/local/apache2/bin/apachectl start&lt;br /&gt;
&lt;br /&gt;
to stop:  /usr/local/apache2/bin/apachectl stop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start apache and confirm it is running.&lt;/div&gt;</summary>
		<author><name>Johnjs</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Main_Page&amp;diff=2377</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Main_Page&amp;diff=2377"/>
		<updated>2016-04-04T14:42:25Z</updated>

		<summary type="html">&lt;p&gt;Johnjs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;nowiki&amp;gt;Insert non-formatted text here&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
== Compiling a Static OpenSSL Fips Capable Apache2 httpd-2.4.18 ==&lt;br /&gt;
&lt;br /&gt;
Below is a step by step instructions on how to compile a Fips Capable Apache2&lt;br /&gt;
from source. Fips is compiled into Apache statically. This includes the steps&lt;br /&gt;
to compile the FIPS module and Openssl. I build a prefork Apache2 because I use&lt;br /&gt;
a shared PHP5 module.&lt;br /&gt;
&lt;br /&gt;
Install the latest FIPS OpenSSL (below steps)&lt;br /&gt;
&lt;br /&gt;
Download openssl-fips-2.0.12.tar.gz &lt;br /&gt;
			&lt;br /&gt;
gunzip openssl-fips-2.0.12.tar.gz&lt;br /&gt;
&lt;br /&gt;
tar -xvf openssl-fips-2.0.12.tar&lt;br /&gt;
&lt;br /&gt;
cd openssl-fips-2.0.12&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
./config&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
			&lt;br /&gt;
Download openssl-1.0.2g.tar.gz&lt;br /&gt;
			&lt;br /&gt;
gunzip openssl-1.0.2g.tar.gz&lt;br /&gt;
&lt;br /&gt;
tar -xvf openssl-1.0.2g.tar&lt;br /&gt;
&lt;br /&gt;
cd openssl-1.0.2.g&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
./config shared fips --with-fipslibdir=/usr/local/ssl/fips-2.0/lib/&lt;br /&gt;
&lt;br /&gt;
make &lt;br /&gt;
&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
in /usr/local/ssl/lib there will be two &amp;quot;linked&amp;quot; files&lt;br /&gt;
&lt;br /&gt;
libcrypto.so.1.0.0 -&amp;gt; libcrypto.so&lt;br /&gt;
&lt;br /&gt;
libssl.so.1.0.0 -&amp;gt; libssl.so&lt;br /&gt;
	&lt;br /&gt;
Some applications need those link references so I 		&lt;br /&gt;
copy all the files (not linked libcrypto.so libssl.so) to&lt;br /&gt;
a new shared directory /usr/local/ssl/lib/shared&lt;br /&gt;
recreate the links in shared to libcrypto.so and libssl.so&lt;br /&gt;
			&lt;br /&gt;
ln -s /usr/local/ssl/lib/shared/libcrypto.so.1.0.0 /usr/local/ssl/lib/shared/libcrypto.so&lt;br /&gt;
&lt;br /&gt;
ln -s /usr/local/ssl/lib/shared/libssl.so.1.0.0 /usr/local/ssl/lib/shared/libssl.so&lt;br /&gt;
			&lt;br /&gt;
Remove the links in /usr/local/ssl/lib&lt;br /&gt;
&lt;br /&gt;
rm libcrypto.so&lt;br /&gt;
&lt;br /&gt;
rm libssl.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The shared directory is used for application linking.&lt;br /&gt;
A direct compile for a FIPS application using: -L/usr/local/ssl/lib&lt;br /&gt;
Will fail if libcrypto.so and libssl.so links are still in /usr/local/ssl/lib&lt;br /&gt;
&lt;br /&gt;
in /home/username (your working directory)&lt;br /&gt;
&lt;br /&gt;
Download httpd.2.4.18.tar.gz&lt;br /&gt;
&lt;br /&gt;
Download pcre-8.38.tar.gz&lt;br /&gt;
&lt;br /&gt;
Download apr-1.5.2.tar.gz&lt;br /&gt;
&lt;br /&gt;
Download apr-util-1.5.4.tar.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
gunzip httpd.2.4.18.tar.gz&lt;br /&gt;
&lt;br /&gt;
gunzip pcre-8.38.tar.gz&lt;br /&gt;
&lt;br /&gt;
gunzip apr-1.5.2.tar.gz&lt;br /&gt;
&lt;br /&gt;
gunzip apr-util-1.5.4.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install PCRE&lt;br /&gt;
&lt;br /&gt;
tar -xvf pcre-8.38.tar&lt;br /&gt;
&lt;br /&gt;
cd /home/username/pcre-8.38&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/usr/local/pcre&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install Apache2(httpd) with apr&lt;br /&gt;
&lt;br /&gt;
tar -xvf httpd.2.4.18.tar&lt;br /&gt;
&lt;br /&gt;
cd httpd.2.4.18&lt;br /&gt;
&lt;br /&gt;
cd srclib (subdirectory)&lt;br /&gt;
&lt;br /&gt;
cp /home/username/apr-1.5.2.tar&lt;br /&gt;
&lt;br /&gt;
cp /home/username/apr-util-1.5.4.tar&lt;br /&gt;
&lt;br /&gt;
tar -xvf apr-1.5.2.tar&lt;br /&gt;
&lt;br /&gt;
tar -xvf apr-util-1.5.4.tar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
create two links - they are needed when apache compiles&lt;br /&gt;
&lt;br /&gt;
ln -s apr-1.5.2 apr&lt;br /&gt;
&lt;br /&gt;
ln -s apr-util-1.5.4 apr-util&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd .. (back to /home/username/httpd.2.4.18)&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
&lt;br /&gt;
the --enable-ssl-staticlib-deps and --enable-mods-static=ssl&lt;br /&gt;
are to compile the Openssl module STATIC not shared. &lt;br /&gt;
If you leave them out, it will properly create a working apache2&lt;br /&gt;
server EXCEPT when you enable the &amp;quot;SSLFIPS on&amp;quot; in httpd.conf, then&lt;br /&gt;
apache2 will not start and you will get a FIPS fingerprint error&lt;br /&gt;
in the logs/error_log file.&lt;br /&gt;
&lt;br /&gt;
Procedure below is to compile OpenSSL as a static module in apache2&lt;br /&gt;
&lt;br /&gt;
The two export(s) below sets the proper FIPS fingerprint variables.&lt;br /&gt;
The configure compiles a STATIC Openssl (mod_ssl.so) into Apache2.&lt;br /&gt;
&lt;br /&gt;
export CC=/usr/local/ssl/fips-2.0/bin/fipsld&lt;br /&gt;
&lt;br /&gt;
export FIPSLD_CC=/usr/bin/gcc&lt;br /&gt;
&lt;br /&gt;
execute configure with switches a space between each switch&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/usr/local/apache2 &lt;br /&gt;
	    --with-mpm=prefork &lt;br /&gt;
	    --enable-ssl &lt;br /&gt;
	    --with-ssl=/usr/local/ssl&lt;br /&gt;
	    --enable-ssl-staticlib-deps&lt;br /&gt;
	    --enable-mods-static=ssl&lt;br /&gt;
	    --with-pcre=/usr/local/pcre&lt;br /&gt;
	    --with-included-apr&lt;br /&gt;
						&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I need PHP(with mysql) - so I built the share module libphp5.so&lt;br /&gt;
and placed a copy in /usr/local/apache2/modules/&lt;br /&gt;
&lt;br /&gt;
In the httpd.conf file &amp;quot;Loadmodule ssl_module modules/mod_ssl.so&amp;quot; &lt;br /&gt;
has to be commented out. In a shared version it must be active.&lt;br /&gt;
The --with-mpm=prefork option allows me to use a compiled shared &lt;br /&gt;
PHP5 module, the &amp;quot;event&amp;quot;(threaded) version didn't load PHP properly.&lt;br /&gt;
There are some other changes needed in the httpd.conf file (on internet)&lt;br /&gt;
on allowing Apache2 to recognize the .php extension.&lt;br /&gt;
&lt;br /&gt;
to start: 	/usr/local/apache2/bin/apachectl start&lt;br /&gt;
&lt;br /&gt;
to stop:	/usr/local/apache2/bin/apachectl stop&lt;br /&gt;
&lt;br /&gt;
Start apache and confirm it is running.&lt;br /&gt;
&lt;br /&gt;
johnjs 04-04-2016 9:40 CST(DST)&lt;/div&gt;</summary>
		<author><name>Johnjs</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Main_Page&amp;diff=2376</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Main_Page&amp;diff=2376"/>
		<updated>2016-04-04T14:39:55Z</updated>

		<summary type="html">&lt;p&gt;Johnjs: Compile a Static OpenSSL Fips Capable Apache2 httpd-2.4.18&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;nowiki&amp;gt;Insert non-formatted text here&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
== Compiling a Static OpenSSL Fips Capable Apache2 httpd-2.4.18 ==&lt;br /&gt;
&lt;br /&gt;
Below is a step by step instructions on how to compile a Fips Capable Apache2&lt;br /&gt;
from source. Fips is compiled into Apache statically. This includes the steps&lt;br /&gt;
to compile the FIPS module and Openssl. I build a prefork Apache2 because I use&lt;br /&gt;
a shared PHP5 module.&lt;br /&gt;
&lt;br /&gt;
Install the latest FIPS OpenSSL (below steps)&lt;br /&gt;
&lt;br /&gt;
Download openssl-fips-2.0.12.tar.gz &lt;br /&gt;
			&lt;br /&gt;
gunzip openssl-fips-2.0.12.tar.gz&lt;br /&gt;
&lt;br /&gt;
tar -xvf openssl-fips-2.0.12.tar&lt;br /&gt;
&lt;br /&gt;
cd openssl-fips-2.0.12&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
./config&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
			&lt;br /&gt;
Download openssl-1.0.2g.tar.gz&lt;br /&gt;
			&lt;br /&gt;
gunzip openssl-1.0.2g.tar.gz&lt;br /&gt;
&lt;br /&gt;
tar -xvf openssl-1.0.2g.tar&lt;br /&gt;
&lt;br /&gt;
cd openssl-1.0.2.g&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
./config shared fips --with-fipslibdir=/usr/local/ssl/fips-2.0/lib/&lt;br /&gt;
&lt;br /&gt;
make &lt;br /&gt;
&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
			&lt;br /&gt;
in /usr/local/ssl/lib there will be two &amp;quot;linked&amp;quot; files&lt;br /&gt;
&lt;br /&gt;
libcrypto.so.1.0.0 -&amp;gt; libcrypto.so&lt;br /&gt;
&lt;br /&gt;
libssl.so.1.0.0 -&amp;gt; libssl.so&lt;br /&gt;
	&lt;br /&gt;
Some applications need those link references so I 		&lt;br /&gt;
copy all the files (not linked libcrypto.so libssl.so) to&lt;br /&gt;
a new shared directory /usr/local/ssl/lib/shared&lt;br /&gt;
recreate the links in shared to libcrypto.so and libssl.so&lt;br /&gt;
			&lt;br /&gt;
ln -s /usr/local/ssl/lib/shared/libcrypto.so.1.0.0 /usr/local/ssl/lib/shared/libcrypto.so&lt;br /&gt;
&lt;br /&gt;
ln -s /usr/local/ssl/lib/shared/libssl.so.1.0.0 /usr/local/ssl/lib/shared/libssl.so&lt;br /&gt;
			&lt;br /&gt;
Remove the links in /usr/local/ssl/lib&lt;br /&gt;
&lt;br /&gt;
rm libcrypto.so&lt;br /&gt;
&lt;br /&gt;
rm libssl.so&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The shared directory is used for application linking.&lt;br /&gt;
A direct compile for a FIPS application using: -L/usr/local/ssl/lib&lt;br /&gt;
Will fail if libcrypto.so and libssl.so links are still in /usr/local/ssl/lib&lt;br /&gt;
&lt;br /&gt;
in /home/username (your working directory)&lt;br /&gt;
&lt;br /&gt;
Download httpd.2.4.18.tar.gz&lt;br /&gt;
&lt;br /&gt;
Download pcre-8.38.tar.gz&lt;br /&gt;
&lt;br /&gt;
Download apr-1.5.2.tar.gz&lt;br /&gt;
&lt;br /&gt;
Download apr-util-1.5.4.tar.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
gunzip httpd.2.4.18.tar.gz&lt;br /&gt;
&lt;br /&gt;
gunzip pcre-8.38.tar.gz&lt;br /&gt;
&lt;br /&gt;
gunzip apr-1.5.2.tar.gz&lt;br /&gt;
&lt;br /&gt;
gunzip apr-util-1.5.4.gz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install PCRE&lt;br /&gt;
&lt;br /&gt;
tar -xvf pcre-8.38.tar&lt;br /&gt;
&lt;br /&gt;
cd /home/username/pcre-8.38&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/usr/local/pcre&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install Apache2(httpd) with apr&lt;br /&gt;
&lt;br /&gt;
tar -xvf httpd.2.4.18.tar&lt;br /&gt;
&lt;br /&gt;
cd httpd.2.4.18&lt;br /&gt;
&lt;br /&gt;
cd srclib (subdirectory)&lt;br /&gt;
&lt;br /&gt;
cp /home/username/apr-1.5.2.tar&lt;br /&gt;
&lt;br /&gt;
cp /home/username/apr-util-1.5.4.tar&lt;br /&gt;
&lt;br /&gt;
tar -xvf apr-1.5.2.tar&lt;br /&gt;
&lt;br /&gt;
tar -xvf apr-util-1.5.4.tar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
create two links - they are needed when apache compiles&lt;br /&gt;
&lt;br /&gt;
ln -s apr-1.5.2 apr&lt;br /&gt;
&lt;br /&gt;
ln -s apr-util-1.5.4 apr-util&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd .. (back to /home/username/httpd.2.4.18)&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
&lt;br /&gt;
the --enable-ssl-staticlib-deps and --enable-mods-static=ssl&lt;br /&gt;
are to compile the Openssl module STATIC not shared. &lt;br /&gt;
If you leave them out, it will properly create a working apache2&lt;br /&gt;
server EXCEPT when you enable the &amp;quot;SSLFIPS on&amp;quot; in httpd.conf, then&lt;br /&gt;
apache2 will not start and you will get a FIPS fingerprint error&lt;br /&gt;
in the logs/error_log file.&lt;br /&gt;
&lt;br /&gt;
Procedure below is to compile OpenSSL as a static module in apache2&lt;br /&gt;
&lt;br /&gt;
The two export(s) below sets the proper FIPS fingerprint variables.&lt;br /&gt;
The configure compiles a STATIC Openssl (mod_ssl.so) into Apache2.&lt;br /&gt;
&lt;br /&gt;
export CC=/usr/local/ssl/fips-2.0/bin/fipsld&lt;br /&gt;
&lt;br /&gt;
export FIPSLD_CC=/usr/bin/gcc&lt;br /&gt;
&lt;br /&gt;
execute configure with switches a space between each switch&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/usr/local/apache2 &lt;br /&gt;
	    --with-mpm=prefork &lt;br /&gt;
	    --enable-ssl &lt;br /&gt;
	    --with-ssl=/usr/local/ssl&lt;br /&gt;
	    --enable-ssl-staticlib-deps&lt;br /&gt;
	    --enable-mods-static=ssl&lt;br /&gt;
	    --with-pcre=/usr/local/pcre&lt;br /&gt;
	    --with-included-apr&lt;br /&gt;
						&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I need PHP(with mysql) - so I built the share module libphp5.so&lt;br /&gt;
and placed a copy in /usr/local/apache2/modules/&lt;br /&gt;
&lt;br /&gt;
In the httpd.conf file &amp;quot;Loadmodule ssl_module modules/mod_ssl.so&amp;quot; &lt;br /&gt;
has to be commented out. In a shared version it must be active.&lt;br /&gt;
The --with-mpm=prefork option allows me to use a compiled shared &lt;br /&gt;
PHP5 module, the &amp;quot;event&amp;quot;(threaded) version didn't load PHP properly.&lt;br /&gt;
There are some other changes needed in the httpd.conf file (on internet)&lt;br /&gt;
on allowing Apache2 to recognize the .php extension.&lt;br /&gt;
&lt;br /&gt;
to start: 	/usr/local/apache2/bin/apachectl start&lt;br /&gt;
&lt;br /&gt;
to stop:	/usr/local/apache2/bin/apachectl stop&lt;br /&gt;
&lt;br /&gt;
Start apache and confirm it is running.&lt;br /&gt;
&lt;br /&gt;
johjs 04-04-2016 9:40 CST(DST)&lt;/div&gt;</summary>
		<author><name>Johnjs</name></author>
	</entry>
</feed>