|
From: Tomas G. <to...@pr...> - 2012-08-28 05:30:19
|
Hi, If you are not using the protection, i.e. the columns are empty you can safely shortcut usage of b64Protection. This does not exist anymore in recent releases of EJBCA, so there is nothing for the project to do. Cheers, Tomas ----- PrimeKey Solutions offers commercial EJBCA and SignServer support subscriptions and training courses. Please see www.primekey.se or contact in...@pr... for more information. http://www.primekey.se/Services/Support/ http://www.primekey.se/Services/Training/ On 08/27/2012 09:47 PM, MacDonald, Nick (Nick) wrote: > I have finally tracked down the problem I have been chasing, and while I > understand the problem, I still don’t really understand the root cause. > > I’m working with an old version of the code… it appears to be a > non-release version, i.e. a checkout of a pre 3.6.0 release. > > It has been working fine for some time, but something seems to have > changed to force the code to call the getProtection() method in > ProtectedLogDataBean. In my database there is never any data in the > b64Protection field, and the version of the method that I have doesn’t > check for this, and passes the empty string to Base64.decode() which > causes an array index exception (-4). > > I’m wondering if someone can explain to me what sort of a change might > cause the behavior change. It doesn’t seem to hurt anything if I update > the method to check for the empty string (as shown below), but I wanted > a second opinion on whether this might be having consequences I am not > aware of. > > public byte[] getProtection() > > { > > String b64Protection = getB64Protection(); > > if (b64Protection != null) > > { > > if (b64Protection.equals("")) > > { > > return new byte[0]; > > } > > return Base64.decode(b64Protection.getBytes()); > > } > > return null; > > } > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > > _______________________________________________ > Ejbca-develop mailing list > Ejb...@li... > https://lists.sourceforge.net/lists/listinfo/ejbca-develop > |