Verify keystore returning the message Unable to load key for alias - Unable to find alias
search cancel

Verify keystore returning the message Unable to load key for alias - Unable to find alias

book

Article ID: 135938

calendar_today

Updated On:

Products

CA Application Test Service Virtualization

Issue/Introduction

Using a keystore with a VSM in the HTTP/S Listener step. 

When the Verify button is selected, get the message: Unable to load key for alias: aliasName using keystore password.

When using the keystore in a Web Service Execution step get the message Unable to find alias.

Environment

All supported DevTest releases.

Cause

The keystore can contain trusted certificates and keys.

When you select the Verify button, DevTest will try to open the keystore with the password provided and list its content.


If the verification fails with the message 'Unable to load key for alias: aliasName using keystore password' happens but you are still able to see the content of that alias, it means that alias is for a certificate and no password is needed for it.


If the message 'Unable to load key for alias: aliasName using keystore password' or 'Unable to find alias' happen and you are not able to see the content of that alias, it means that alias is for a key entry and its password is not the same used for the keystore.



 


Resolution

If you are using one of the options below, you can provide the password for keystore and the password for key/alias entry with no issues.

  • Web Service Execution step
  • HTTP/HTML Request step 
  • the ssl.client.* properties in local.properties file 

 

However, in the HTTPS Listener step used in virtual services, we do not have the key/alias password. 

If you are using a keystore in this step, the password for the keystore and key entry needs to be the same.

 

You can change the key/alias password using Keytool with the command below:

          keytool.exe -keypasswd -alias <aliasName> -keystore <\path\to\the\keystore.file>

 

or using Portecle and the Set Password option:

 

You need to know the keystore and the key pair password to change it.

Portecle is available for download in the link https://sourceforge.net/projects/portecle/