IOException BadPaddingException When Creating a Developer Certificate

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



This article applies to the following:


  • BlackBerry® Tablet SDK for Adobe® AIR®






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


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





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





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