diff -r 63b81d807542 -r 1f0034e370aa javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java --- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java Thu Sep 02 13:22:59 2010 +0300 +++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java Fri Sep 17 16:44:34 2010 +0300 @@ -740,9 +740,12 @@ if (data.getRootHashValue() != null && data.getRootHashValue().length() > 0) { + int rootHashLength = (data.getRootHashValue().length() > 8 + ? 8 : data.getRootHashValue().length()); entry.addAttribute(new StorageAttribute( StorageNames.CERT_HASH, - data.getRootHashValue())); + data.getRootHashValue().substring(0, + rootHashLength))); } String validCerts = encodeValidatedChainIndexes( data.getValidatedChainIndexes());