Appendix C
Creating a Self-Signed Certificate
C.1
HTTPS/SSL Certificate
This appendix discusses a method of generating a PEM file for use with HTTPS. As is the case with any
web server, in order to provide a secure connection via HTTPS, the NTP/PTP option must be configured
with an SSL Certificate. The NTP/PTP option uses a single PEM File which includes the private key and
the certificate. This guide illustrates a method of creating a PEM File using the free and publicly available
OpenSSL package. OpenSSL is merely one of many possible solutions – please see your toolkit documentation
for exact instructions. This guide assumes you have already downloaded and installed the OpenSSL tools
on a Linux system. It also works on Mac OS X systems.
Note:
In the following examples, the symbol ‘
B
’ denotes the command prompt.
C.1.1
Step 1 - Generate a Private Key
The following command will generate a 1024 bit RSA private key. Please keep this file safe, secure, and not
accessible to the public.
B
openssl genrsa -out private.key 1024
The generated file (private.key) might look like the following:
-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQDPoNigXmq2JAlw9DrD0P5Og5c5xsEnt9bPjfuE7MGkDEGN09sC
...more data...
8Xxzzgu4xizBdLmONkHu7b/h7GL6u5smkWVOCesCCR0mKw==
-----END RSA PRIVATE KEY-----
C.1.2
Step 2 - Generate a Certificate Signing Request (CSR)
The following command will generate a CSR (certificate signing request) file using the private key generated
in Step 1. OpenSSL will prompt for several pieces of information, our example responses are in BOLD text.
If you are purchasing a certificate from a commercial vendor, the information provided during this step must
match exactly the information you will be providing to the vendor.
B
openssl req -new -key private.key -out my.csr