IOException BadPaddingException When Creating a Developer Certificate

by BlackBerry Development Advisor on ‎09-15-2011 01:22 PM (3,101 Views)

Summary

 

This article applies to the following:

 

  • BlackBerry® Tablet SDK for Adobe® AIR®

 


 

 

Problem

 

When trying to create a Developer Certificate (.p12 file), it fails with the following error message:

 

Result: keytool error: java.io.IOException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded

 

 

Cause

 

You have attempted to overwrite an existing Developer Certificate (.p12 file).

 

 

Resolution

 

Delete the existing Developer Certificate before creating a new one.  You may choose the file name and location of the yourkeyname.p12 file when creating your Developer Certificate.  If a path is not specified, it will be called sigtool.p12 and located directories listed below.

 

  • Windows® XP:  %HOMEPATH%\Local Settings\Application Data\Research In Motion
  • Windows Vista® and Windows 7®:  %HOMEPATH%\AppData\Local\Research In Motion
  • Mac OS:  ~/Library/Research In Motion
  • Unix / Linux:  ~/.rim