Professional Documents
Culture Documents
Generating a keyring file with a self-signed SHA-2 cert using OpenSSL and
kyrtool.................................................................................................................... 3
Generating a keyring file with a third party CA SHA-2 cert using OpenSSL
and KYRTool on a Windows workstation..........................................................6
| Generating a keyring file with a self-signed SHA-2 cert using OpenSSL and kyrtool | 3
The resulting keypair should not be password protected. This isn't a good security practice, so only perform these
steps for production systems on a restricted access system believed to be secure. The resulting keypair should look
like the following:
[~]$ openssl x509 -req -days 3650 -sha256 -in server.csr -signkey
server.key -out server.pem
Signature ok
subject=/CN=www.example.com
Getting Private key
Directory of C:\HCL\Notes\Data
5. Import the RSA keypair and self-signed certificate into the new keyring file.
a. Concatenate server.key and server.pem into a single file:
The simplest approach to concatenate two files into a third file will vary based on your operating system, but
you should end up with a single file that appears similar to the following:
rrqjj3tAybdkNEFcwQLY/eIZcEowHmhH0b9Ut5EOsMMxkB4vUHg6gWmse64wr2qx
[Many lines removed]
7Rw9zpLxTJmbd3iWW3+ZVHhpudYZrDE8NbaaiGMbfyfQBnSH1XbDHSveTxLOY3fo
+d9lePMThdnmme6b1v8X4sCuDKrFjoV5Veo4Qq8I+099hu3tTRq2zGpNPsg=
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIEyjCCArICCQDa3d9OQUIsWzANBgkqhkiG9w0BAQsFADAnMSUwIwYDVQQDDBx1
bHRyYXZpb2xldC5zd2cudXNtYS5pYm0uY29tMB4XDTE0MTAwODE4MzQ0NloXDTI0
[Many lines removed]
qddsfWubEwoMYKevnV8u9EFp7f0RONGqp93iU9O5jYPdrcB+RryT7bwErDTQKjua
ZAcuoKnUrnXiGIiq/dkXg2Umaf9Quewz0ow7BrCW
-----END CERTIFICATE-----
b. Verify the input file:
KyrTool v1.0
Server certificate #0
Subject: CN=www.example.com
Issuer: CN=www.example.com
Not Before: 10/08/2014 02:34:46 PM
Not After: 10/05/2024 02:34:46 PM
Key length: 4096 bits
Signature Alg: sha256WithRSAEncryption
-----BEGIN CERTIFICATE-----
MIIEyjCCArICCQDa3d9OQUIsWzANBgkqhkiG9w0BAQsFADAnMSUwIwYDVQQDDBx1
bHRyYXZpb2xldC5zd2cudXNtYS5pYm0uY29tMB4XDTE0MTAwODE4MzQ0NloXDTI0
[Many lines removed]
qddsfWubEwoMYKevnV8u9EFp7f0RONGqp93iU9O5jYPdrcB+RryT7bwErDTQKjua
ZAcuoKnUrnXiGIiq/dkXg2Umaf9Quewz0ow7BrCW
-----END CERTIFICATE-----
7. Copy over your new keyring file and start the Domino server.
Back up your old .kyr and .sth files, shut down the server, copy over your new keyring and stash files, restart the
server, and check out the results!
1. KYR Tool
• KRYTool comes installed in the Domino program directory starting with Domino 10. If you use an earlier
version of Domino, you can download it from here.
• Place the KYRTool in the Notes program directory, as it relies on .DLLs installed by Notes.
• If you have the Notes/Domino program directory in your system's PATH environment variable, this can be
installed to any directory.
| Generating a keyring file with a third party CA SHA-2 cert using OpenSSL and KYRTool on a Windows workstation | 7
2. Open SSL.
• Download links for the Windows versions of OpenSSL are available at https://slproweb.com/products/
Win32OpenSSL.html
• The light version of OpenSSL is sufficient for the tasks required for creating a SHA-2 certificate. v1.0.1j is the
latest recommended release as of December 2014. Either the 32-bit or 64-bit version can be used if you are on
Windows 7.
• OpenSSL may need updates to Windows Visual C++ libraries. If the libraries are not up to date, a prompt
will display during the OpenSSL install noting that updated Visual C++ libraries are needed. Links for
downloading these libraries are also on the download page for OpenSSL.
• A configuration file "openssl.cfg" will be extracted by the installer to the bin directory. In order for OpenSSL
to read this configuration file, you must set an environment variable by running the following command from a
DOS prompt:
LmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK/bmWGdQa62sVtQ
HTNXnHsYg9rmj8TSo0tqdqfacoFHP71Nna66o497QMm3ZDRBXMEC2P3iGXBKMB5o
[Many lines removed]
nbXBaWgJqMk71f2vU1LnNQQresCBJpzNWgjyLaTszUR6eL8JD9WxddMK/82h9QVx
uFO005u3Fa2uC+8axiMKO3sSuVsgXHQpCuSnw2jDCQoeW/C/GSswsdWVyEzHMMjD
KQTH5iQLVPWArBoE1SV/RzG8tvLqH6JxHmSG7cnrgH0=
-----END CERTIFICATE REQUEST-----
You may also receive some of the CA's intermediate root certificates. Also note that the file received may be a .crt
instead of .pem. The .crt file will act the same as a .pem when you display it.
5. Create a new keyring file.
At this point in the example, the Administrator switched from the Linux box where OpenSSL was run to a
Windows box to use kyrtool.exe.
Directory of C:\Lotus\Notes\Data
6. Import the server's private key, root certificates, and server certificate into the new keyring file.
a. There are two options for this step. You can perform either 6b - Option 1(concatenate server.key and
server.pem into a single file) OR 6c - Option 2(issue a series of four import commands...).
b. Option 1: Concatenate the server's private key (server.key) and the certificates into a single file:.
This step varies from the self-signed case. You will have more than one certificate in your ".pem" file, and will
want to place them in order with your server's SSL "leaf" certificate first and the root certificate last. Verify
| Generating a keyring file with a third party CA SHA-2 cert using OpenSSL and KYRTool on a Windows workstation | 9
step 6b will check to ensure that the ordering is correct. If it returns any warnings or errors, edit the PEM file
and verify it again.
Note the following:
• Certificate Authorities will frequently return a signed certificate in a .crt file. If they also provide the root
certificates when returning the CSR file, then you can concatenate all of the .crt files to the private key by
using the "type" command from a DOS prompt.
• The files should be concatenated with the server key first, the server's cert next, the intermediate cert next,
and the root cert last. Concatenation can be done from a DOS prompt using the TYPE command. The type
command takes a list of files, and appends them together into an output file designated with a greater-
than symbol. For example, type server.key server.crt intermediate.crt root.crt > server.txt In this example
"server.txt" is the file provided to the kyrtool for import into a Domino keyring. You can display this output
file in Notepad.
• If the root and intermediate certs are not provided with the signed certificate, export the intermediate and
root certificates by opening the server certificate with Windows Crypto Extensions. This will display
the server in a three-tabbed user interface. On the third tab, select each of the signing certificates, select
display, and then export that certificate using the "save to file" command on the second tab. Save each cert
file using Base 64 format.
c. Option 2: Issue the following series of four import commands to merge the root certificate, the
intermediate certificate, and the server key into the keyring file.
IMPORTANT NOTE: If you perform this option, then you would not need to perform steps 6b and 6c. You
could instead proceed straight to Step 7 - "Examine the resulting keyring file."
#1 - Issue the 'import roots' command to import the kyrtool import roots -i C:\root.crt
root certificate -k "C:\Program Files\hcl\notes\data
\keyring.kyr"
#2 - Issue the 'import roots' command to import the kyrtool import roots -i C:
intermediate certificate \intermediate.crt -k "C:\Program
Files\hcl\notes\data\keyring.kyr"
#3 - Issue the 'import keys' command to import the kyrtool import keys -i C:
server key file \server.key -k "C:\Program Files
\hcl\notes\data\keyring.kyr"
#4 - Issue the 'import certs' command to import the kyrtool import certs -i C:
signed server certificate \sitecert.crt -k "C:\Program Files
\hcl\notes\data\keyring.kyr"
d. Verify the Input file. This is an example of a complete and correctly ordered PEM file:
KyrTool v1.0
If you receive any ERROR: lines, you should resolve those errors before moving on to step 6e.
e. Import the keypair and self-signed certificate:
8. Copy over your new keyring file and start the Domino server
Back up your old .kyr and .sth files, shut down the server, copy over your new keyring and stash files, restart the
server, and check out the results!