Apache Server
Apache Server
The benefits of using an nShield Hardware Security Module (HSM) with the
Apache HTTP Server include:
Throughout this guide, the term HSM refers to nShield Solo and
nShield Connect units. (nShield Solo products were formerly
known as nShield).
This guide describes how to use the nShield Cryptographic Hardware Interface
Library (CHIL) interface to integrate the HSM and Apache HTTP Server.
1.3. Requirements
Ensure that you have supported versions of the nShield, Apache, and third-party
products. See Product configurations.
Consult the security team in your organization for a suitable setting of the SE
Linux policy to allow the web server read access to the files in /opt/nfast.
• The number and quorum of Administrator Cards in the Administrator Card Set
(ACS), and the policy for managing these cards.
For more information, refer to the User Guide and Installation Guide for the HSM.
Chapter 2. Procedures
Integration procedures include:
We recommend that you install the HSM before configuring the Security World
Software with your Apache HTTP Server.
1. On the computer that you want to make the Apache HTTP Server, install the
latest version of the Security World Software as described in the Installation
Guide for the HSM.
2. Create the security world as described in the User Guide, creating the ACS
and OCS that you require.
# export LD_LIBRARY_PATH=/opt/nfast/toolkits/hwcrhk/
# openssl engine -t chil
(chil) CHIL hardware engine support
[ available ]
export PATH=$PATH:/opt/nfast/bin
LD_LIBRARY_PATH=/opt/nfast/toolkits/hwcrhk
# generatekey embed
protect: Protected by? (token, module) [token] > module
size: Key size? (bits, minimum 1024) [2048] >
OPTIONAL: pubexp: Public exponent for RSA key (hex)? []
> embedsavefile: Filename to write key to? []
> testkey
plainname: Key name? [] > testkey
x509country: Country code? [] > [...]
x509province: State or province? [] > [...]
In the same folder as the self-cert there will also be a file called testkey.
Copy the files into the Apache installation using the following commands (adjust
to the values you get):
cp <CURRENTFOLDER>/testkey /etc/pki/tls/private/testkey
cp <CURRENTFOLDER>/embed_6d5706..._selfcert /etc/pki/tls/certs/testkey_selfcert
In /etc/httpd/conf.d/ssl.conf, set
SSLCertificateFile /etc/pki/tls/certs/testkey_selfcert
SSLCertificateKeyFile /etc/pki/tls/private/testkey
SSLCryptoDevice chil
setenforce 0
• CONNECTED(00000003)
• depth
• Certificate chain information
• Server certificate information
• Session-ID
• Master-Key
• TLS session ticket:
• Verify return code: 0 (ok)
Example output:
Leave the OCS in the card reader and generate an embed key as in Set up Apache
to use the CHIL library, but choose the protection to be token.
The steps to copy certificates about is the same as for module-protected keys.
When you are starting Apache, you will have to preload the OCS so that the key
can be used without the web server having to load it:
ppmk -n apachesoft
Generate an embed key as in Set up Apache to use the CHIL library, but choose
the protection to be softcard.
The steps to copy certificates about is the same as for module protected keys.
When you are starting Apache, you will have to preload the softcard so that the
key can be used without the web server having to load it:
Chapter 3. Troubleshooting
If the logs produced by Apache do not lead to useful information, starting Apache
with the following might lead to more information.
or
/usr/sbin/httpd -e debug -X