Tools
How to import a Personal Exchange Format (PFX) certificate on a Linux server in the Web Help Desk.
This is how to import a Personal Exchange Format (PFX) certificate on a Linux server in the Web Help Desk.
First published date
Last published date
Overview
Product section
Resolution
1) Go to /usr/local/webhelpdesk/conf
2) Delete the existing keypair
# Disclaimer: Scripts are not supported under any SolarWinds support program or service. # Scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. # The risk arising out of the use or performance of the scripts and documentation stays with you. # In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation. ../bin/jre/bin/keytool -delete -alias tomcat -keystore keystore.jks
3) Import the PFX, you will need to provide the PFX password used to export it
# Disclaimer: Scripts are not supported under any SolarWinds support program or service. # Scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. # The risk arising out of the use or performance of the scripts and documentation stays with you. # In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation. ../bin/jre/bin/keytool -importkeystore -srckeystore yourpfxfile.pfx -srcstoretype PKCS12 -destkeystore keystore.jks -deststoretype JKSNote: It is now recommended to migrate to PKCS12 which is an industry-standard format. Please see step 8 to convert the keystore type to PKCS12
4) Set the password of the keypair, you will provide the same password as the keystore
# Disclaimer: Scripts are not supported under any SolarWinds support program or service. # Scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. # The risk arising out of the use or performance of the scripts and documentation stays with you. # In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation. ../bin/jre/bin/keytool -keypasswd -alias tomcat -keystore keystore.jks
5) Get the keypair alias
# Disclaimer: Scripts are not supported under any SolarWinds support program or service. # Scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. # The risk arising out of the use or performance of the scripts and documentation stays with you. # In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation. ../bin/jre/bin/keytool -v -list -keystore keystore.jks
6) Change the keypair alias to tomcat
# Disclaimer: Scripts are not supported under any SolarWinds support program or service. # Scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. # The risk arising out of the use or performance of the scripts and documentation stays with you. # In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation. ../bin/jre/bin/keytool -v -keystore keystore.jks -changealias -alias aliasnamefromtheabovecommand -destalias tomcat7) Inspect the keypair again, making sure all are correct, alias is now tomcat
# Disclaimer: Scripts are not supported under any SolarWinds support program or service. # Scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. # The risk arising out of the use or performance of the scripts and documentation stays with you. # In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation. ../bin/jre/bin/keytool -v -list -keystore keystore.jks
Note: For 12.6 and newer versions of Web Help Desk, you may opt to convert the keystore type to PKCS12.
# Disclaimer: Scripts are not supported under any SolarWinds support program or service. # Scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. # The risk arising out of the use or performance of the scripts and documentation stays with you. # In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation. ../bin/jre/bin/keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore.jks -deststoretype pkcs12
8) You may want to convert the keystore type from JKS format to PKCS12. You may use the following command
# Disclaimer: Scripts are not supported under any SolarWinds support program or service. # Scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. # The risk arising out of the use or performance of the scripts and documentation stays with you. # In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation. ../bin/jre/bin/keytool -v -importkeystore -srckeystore keystore.jks -destkeystore /usr/local/webhelpdesk/conf/keystore.jks -deststoretype pkcs12
9) Edit the whd.conf file and find the line that says KEYSTORE_TYPE=JKS and change it to KEYSTORE_TYPE=PKCS12
10) Restart Web Help Desk
# Disclaimer: Scripts are not supported under any SolarWinds support program or service. # Scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. # The risk arising out of the use or performance of the scripts and documentation stays with you. # In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation. /usr/local/webhelpdesk/whd restart
11) Verify if Web Help Desk is able to start and the certificate is loaded
Scripts are not supported under any SolarWinds support program or service. Scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.