This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| how_to:create_an_ssl_certificate [2010/02/03 10:19] – created paul | how_to:create_an_ssl_certificate [2026/03/23 10:18] (current) – [Using OpenSSL] paul | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======How to create an SSL Certificate====== | ======How to create an SSL Certificate====== | ||
| + | VPOP3 Enterprise supports SSL certificates for encrypted sessions. | ||
| + | |||
| The basic mechanism to create an SSL certificate is that you have to generate a **CSR** (Certificate Signing Request) then send that to a **CA** (Certificate Authority) who will sign your certificate and give you the certificate back. | The basic mechanism to create an SSL certificate is that you have to generate a **CSR** (Certificate Signing Request) then send that to a **CA** (Certificate Authority) who will sign your certificate and give you the certificate back. | ||
| - | When you generate the CSR, you will also generate a **Private Key** file. This isn't sent anywhere, but is needed, so keep it safe. | + | When you generate the CSR, you will also generate a **Private Key** file. This isn't sent anywhere, but is needed, so keep it safe. For VPOP3' |
| VPOP3 requires certificates & private keys to be in .PEM (Privacy Enhanced Mail) format which is a common format used by most people other than Microsoft. There are ways to convert .P12 .PFX and .CER files to PEM format, but those are outside the scope of this article. | VPOP3 requires certificates & private keys to be in .PEM (Privacy Enhanced Mail) format which is a common format used by most people other than Microsoft. There are ways to convert .P12 .PFX and .CER files to PEM format, but those are outside the scope of this article. | ||
| - | There are many ways to generate a CSR, so if you have a favourite program to do that, which can produce the files in .PEM format, feel free to use that. Otherwise, you can use the [[http://www.pscs.co.uk/downloads/vpop3/vpop3gencert.zip|GenCert]] program from our website. | + | There are many ways to generate a CSR, so if you have a favourite program to do that, which can produce the files in .PEM format, feel free to use that. Otherwise, you can use OpenSSL - see below. |
| + | |||
| + | Once you have generated | ||
| + | |||
| + | You can also generate self-signed certificates. The Windows Server Certificate Server can do this for you, or you can use OpenSSL - see below. This is free, but when you access a service using a self-signed certificate , the email client or web browser may warn you that the certificate is not validated properly, and you will need to accept the warning. The data will still be encrypted just as with a £400 Sectigo certificate, | ||
| + | |||
| + | Note that the ' | ||
| + | |||
| + | =====Obtaining a certificate===== | ||
| + | You can self-sign certificates or get them from a Certificate Authority. | ||
| + | |||
| + | We can obtain basic GeoTrust certificates for you for £29.95 (+VAT if applicable) per year. Please | ||
| + | |||
| + | Please note that if you get a certificate from another source there is a limited amount we can do if there is a problem since you may have requested the wrong type of certificate or have the wrong settings. If we supply a certificate it will work with VPOP3 Enterprise, if someone else supplies it we cannot guarantee that. | ||
| + | |||
| + | =====Intermediate Certificates===== | ||
| + | A lot of certificates nowadays need to have an ' | ||
| + | |||
| + | < | ||
| + | -----BEGIN CERTIFICATE----- | ||
| + | <site certificate> | ||
| + | -----END CERTIFICATE----- | ||
| + | -----BEGIN CERTIFICATE----- | ||
| + | < | ||
| + | -----END CERTIFICATE----- | ||
| + | </code> | ||
| + | If the issuing certificate authority requires an intermediate certificate you will have to get that certificate' | ||
| + | |||
| + | =====Using OpenSSL===== | ||
| + | OpenSSL is free software to handle encryption, certificates, | ||
| + | |||
| + | For Windows, the best place to download it from is https://slproweb.com/ | ||
| + | Download the ' | ||
| + | |||
| + | If you are using Linux, then OpenSSL is usually installed as standard | ||
| + | |||
| + | OpenSSL has to be used from a command prompt. The following sections give examples of how to perform some common tasks using OpenSSL | ||
| + | |||
| + | ====Generating a CSR using OpenSSL==== | ||
| + | |||
| + | See the 'Using OpenSSL' | ||
| + | |||
| + | Then run: | ||
| + | openssl req -newkey rsa:2048 -nodes -keyout key.pem -out csr.pem | ||
| + | |||
| + | - This will first display some ' | ||
| + | - Then it will prompt for information about your organisation. Most of this may just be encoded in the certificate for someone accessing your server to be able to see. The **Common Name** is important though, as that has to match the DNS host name of the server, as the software accessing the server will verify that this is the same as the server name that it has connected to | ||
| + | - Country Name - use a two letter country code, eg GB (for United Kingdom), US (for USA), FR (for France) etc (See [[https:// | ||
| + | - State or Province Name - eg " | ||
| + | - Locality Name - eg " | ||
| + | - Organisation Name - eg ACME Inc. | ||
| + | - Organisational Unit Name - IT or Software | ||
| + | - Common Name - this is the DNS host name of your VPOP3 computer, eg mail.example.com | ||
| + | - Email Address - a contact email address (or blank) | ||
| + | - Then it will ask for two extra bits of information which can be left blank: challenge password, and optional company name | ||
| + | |||
| + | This will generate two files: | ||
| + | * key.pem. This is the private key. Keep this file very safe. If that gets lost, then you will need to regenerate the CSR, and send the new one to the Certificate Authority. Do not give key.pem to anyone you do not trust, as it will allow them to spoof your server certificate. Note that the Certificate Authority do NOT need access to the private key. | ||
| + | * csr.pem. This is the certificate request. You will need to send this to the Certificate Authority for them to generate the certificate for you. It is a text file, so you will be able to open it in something like Notepad and copy/paste the contents if necessary | ||
| + | |||
| + | ====Generating a self-signed certificate using OpenSSL==== | ||
| + | |||
| + | See the 'Using OpenSSL' | ||
| + | |||
| + | Then, run: | ||
| + | |||
| + | openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -sha256 -days 365 | ||
| - | Once you have generated the CSR you need to send it to a Certificate Authority. | + | This will generate a private key and self-signed |
| - | You can also set up as your own CA. The GenCert program above will let you do this, other programs are available to do this. This is free, but when you access a service using a certificate signed by your own CA, the email client or web browser may warn you that the certificate is not validated properly, and you will need to accept the warning. The data will still be encrypted just as with a £800 Verisign certificate, | + | You will be prompted |
| + | It will produce two files key.pem and cert.pem which you can copy/paste into VPOP3' | ||