When using third-party certificates, you need a private and a public key to enable integration of the certificates with RabbitMQ.
Procedure
To install the certificates on the local machine:
-
Open the Windows Console:
-
In the Windows search box, type
Run
. -
In the Run dialog box, type
mmc.exe
and click OK.The Console window opens.
-
In the Windows search box, type
- In the left pane of the Console window, expand Personal and click Certificates.
-
In the right pane of the window, right-click the certificate you created and click All Tasks Export.
The Certificate Export Wizard opens.
-
Select the following options:
- On the Export Private Key page, select Yes, export the private key and click Next.
- On the Export File Format page, select Personal Information Exchange, clear Enable certificate privacy and click Next.
- On the Security page, select Password, type your password choice, and click Next. Note your password as you need it to import the certificate.
- Name your certificate export file (.pfx) and click Finish.
To convert the PFX file to a pem file:
- Check if OpenSSL is installed in C:\Program Files (x86)\OpenSSL-Win32 or install it from Downloads | OpenSSL Library.
-
Open the command prompt as an administrator:
-
In the Windows search box, type
cmd
. - Right-click Command prompt and select Run as administrator.
-
In the Windows search box, type
-
Generate the key.pem file:
-
Change the directory using the following command:
c:\OpenSSL-Win32\bin
NOTE: Copy your PFX file to this location. -
Run
Openssl.exe pkcs12 -in yourpfxfile.pfx -nocerts -out key.pem -nodes
- When prompted for a password, enter the password you set up when exporting the certificates from mmc.exe.
The key.pem file is generated in c:\OpenSSL-Win32\bin. -
Change the directory using the following command:
- Move the Key.pem file to C:\Program Files (x86)\Genetec\RabbitMQ.
To export the .Cert files
-
Open the Windows Console:
-
In the Windows search box, type
Run
. -
In the Run dialog box, type
mmc.exe
and click OK.The Console window opens.
-
In the Windows search box, type
- In the left pane of the Console window, expand Personal and click Certificates.
-
In the right pane of the window, right-click the certificate you created and click All Tasks Export.
The Certificate Export Wizard opens.
-
Select the following options:
- On the Export Private Key page, select No, do not export the private key and click Next.
-
On the Export File Format page, select DER encoded
binary X.509 (.CER) and click Next.
The name of this export file is CACert.cer.
- On the Export Private Key page, select No, do not export the private key and click Next.
-
On the Export File Format page, select Base-64
encoded X.509 (.CER) and click Next.
The name of this export file is Cert.cer.
To complete the certificate integration
- Back up your RabbitMQ self-signed certificate files in C:\Program Files (x86)\Genetec\RabbitMQ.
-
Replace the RabbitMQ self-signed certificates:
- Go to C:\Program Files (x86)\Genetec\RabbitMQ.
-
Replace Cert.cer with Cert.pem.
NOTE: You can change the extension by renaming it.
- Replace CACert.cer with CACert.pem.
- Open the RabbitMQ Command Prompt (sbin dir) application.
-
Reinstall the RabbitMQ service by running the following commands:
-
rabbitmq-service.bat remove
-
rabbitmq-service.bat install
-
rabbitmq-service.bat start
-
- Reboot your machine for the changes to take effect.
Parent topic: Certificates for RabbitMQ