Stefan Bodewig wrote: > On 2013-10-23, Emmanuel Bourg wrote: > >> The test coverage is much better, thank you Stefan. > > Thank you for making me find a serious bug by pointing out the low > coverage :-) > >> test7zDecryptUnarchive failed on Linux using the Java 6 JDK (not >> OpenJDK6) due to the lack of the strong crypto policy. That's easily >> fixed by installing the missing files [1], but as a convenience I would >> suggest skipping this test when the strong crypto is not installed. > > Right. I'm so used to having strong crypto installed on all my machines > I just forget about it. I'll look into skipping the test (in trunk, for > 1.7 :-) if I cannot get AES256.
=============== %< =============== void testMe() { if(supportedKeyLength(256)) { // ... } } boolean supportedKeyLength(int keyLen) throws NoSuchAlgorithmException { if (Cipher.getMaxAllowedKeyLength("AES/ECB/PKCS5Padding") < keyLen) { System.err.println("WARNING: " + getName() + " not executed, environment does not support " + keyLen + "-bit keys for AES"); return false; } return true; } =============== %< =============== We use this helper method in our unit tests. Cheers, Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org