Federation :: SmKeyDataBase : invalid pad byte

Document ID : KB000049139
Last Modified Date : 14/02/2018
Show Technical Document Details


Trying to import my certificate in the SmKeyDatabase I get the following error:


smkeytool -addprivkey -alias myalias -keycertfile "c:\myalias.p12" -password "password"

return message:

"An error occured while processing the contents of PKCS12 store. Message: com.rsa.jsafe.JSAFE_PaddingException: Could not perform the unpadding : invalid pad byte. "

How can I fix it ?


Check if you have a defaultenterpriseprivatekey defined in the SmKeyDatabase by running:

smkeytool.bat -listcerts

If there is none, then run the following command to add your certificate with the defaultenterpriseprivatekey:

smkeytool.bat -addprivkey -alias defaultenterpriseprivatekey -keycertfile "c:\myalias.p12" -password "password"