Update Java Security Certificates

Learn how to update Java security certificates for HyperMesh using the keytool utility that comes bundled with HyperMesh's Java Runtime Environment (JRE).

Before you begin, you must have the following:
  • Administrator privileges on the system where HyperMesh is installed.
  • Access to the required certificate file (certificate_name.pem).
  • Knowledge of the file paths for the HyperMesh installation and the certificate file.
  1. Locate the Keytool utility.
    The keytool utility is bundled with the HyperMesh Java Runtime Environment (JRE). It is located within the bin directory of your HyperMesh installation.
    1. Navigate to the following directory in HyperMesh:
      HyperMesh 2019 and before: C:\Program Files\Altair\<HM_Version>\hw\jre\win64\jre\bin\keytool.exe

      HyperMesh 2020 and after: C:\Altair_Development\<HM_Version>\common\jre\jre11.0.21\win64\jre\bin\keytool.exe`

    2. Verify the keytool.exe file is present.
      This is the tool you will use to import the certificate.
  2. Verify you have the required certificate file (commonly in .pem or .der format) that you want to import into the Java Keystore.
    Example file path for your certificate: \\server_path\folder\certificate_name.pem.
  3. Back up the existing Java Keystone.
    Before making any changes, it’s important to back up the existing Java Keystore file in case something goes wrong during the process.
    1. Navigate to the location of the keystone.
      This locate is either C:\Program Files\Altair\<HM_Version>\hw\jre\win64\jre\lib\security\cacerts or C:\Altair_Development\<HM_Version>\common\jre\jre11.0.21\win64\jre\lib\security\cacerts.
    2. Make a copy of the cacerts file and save it to a safe location.
  4. Open a command prompt as an administrator.
    To import the certificate, you need to run the command prompt with administrator privileges.
    1. From your computer Start menu, search for Command Prompt.
    2. Right-click and select Run as Administrator from the context menu.
  5. Use the keytool command to import the certificate into the HyperMesh Java Keystore.
    1. Run one of the following commands in the command prompt:
      • C:\Program Files\Altair\<HM_Version>\hw\jre\win64\jre\bin\keytool.exe" -importcert -alias your_alias_name -keystore "C:\Program Files\Altair\<HM_Version>\hw\jre\win64\jre\lib\security\cacerts" -storepass changeit -file \\server_path\folder\certificate_name.pem -noprompt
      • C:\Altair_Development\<HM_Version>\common\jre\jre11.0.21\win64\jre\ bin\keytool.exe" -importcert -alias your_alias_name -keystore "C:\Program Files\Altair\<HM_Version>\hw\jre\win64\jre\lib\security\cacerts" -storepass changeit -file \\server_path\folder\certificate_name.pem -noprompt
      In the command, replace <HM_Version>, your_alias_name, and certificate_name.pem as appropriate.
  6. Verify the certificate.
    1. To ensure the certificate was imported successfully, use one of the following commands:
      • C:\Program Files\Altair\<HM_Version>\hw\jre\win64\jre\bin\keytool.exe" -list -keystore "C:\Program Files\Altair\<HM_Version>\hw\jre\win64\jre\lib\security\cacerts" -storepass changeit
      • C:\Altair_Development\<HM_Version>\common\jre\jre11.0.21\win64 jre\bin\keytool.exe" -list - keystore "C:\Program Files\Altair\<HM_Version>\hw\jre\win64\jre\lib\security\cacerts" -storepass changeit
    2. Look for the alias you used in the list of certificates.
  7. Once the certificate is successfully imported, restart HyperMesh or any dependent services to apply changes.
  8. Conduct any necessary troubleshooting.
    Incorrect password: ensure that you are using the correct password for the keystore. The default password is usually changeit.

    File path issues: double-check the certificate file path and confirm that you have the necessary read permissions.