[jboss-cvs] Picketbox SVN: r468 - in branches/eap62: security-jboss-sx/jbosssx/src/main/java/org/jboss/crypto and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 23 10:22:16 EDT 2013
Author: pskopek at redhat.com
Date: 2013-10-23 10:22:16 -0400 (Wed, 23 Oct 2013)
New Revision: 468
Modified:
branches/eap62/
branches/eap62/security-jboss-sx/jbosssx/src/main/java/org/jboss/crypto/CryptoUtil.java
Log:
[BZ#901312] CryptoUtil.hasUnlimitedCrypto() returns true even if the unlimited JCE cryptography is not installed
Property changes on: branches/eap62
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/embargo/4.0.14.Final-JBPAPP6-1704:377
/branches/embargo/4.0.16.Final-vault:408-436
/tags/4.0.16.Final:393-407
+ /branches/embargo/4.0.14.Final-JBPAPP6-1704:377
/branches/embargo/4.0.16.Final-vault:408-436
/tags/4.0.16.Final:393-407
/trunk:451
Modified: branches/eap62/security-jboss-sx/jbosssx/src/main/java/org/jboss/crypto/CryptoUtil.java
===================================================================
--- branches/eap62/security-jboss-sx/jbosssx/src/main/java/org/jboss/crypto/CryptoUtil.java 2013-10-23 13:40:48 UTC (rev 467)
+++ branches/eap62/security-jboss-sx/jbosssx/src/main/java/org/jboss/crypto/CryptoUtil.java 2013-10-23 14:22:16 UTC (rev 468)
@@ -476,17 +476,7 @@
boolean hasUnlimitedCrypto = false;
try
{
- Class<?> keyGenClass = KeyGenerator.class;
- Class<?>[] sig = {String.class};
- Object[] args = {"Blowfish"};
- Method kgenInstance = keyGenClass.getDeclaredMethod("getInstance", sig);
- Object kgen = kgenInstance.invoke(null, args);
-
- Class<?>[] sig2 = {int.class};
- Object[] args2 = {Integer.valueOf(256)};
- Method init = keyGenClass.getDeclaredMethod("init", sig2);
- init.invoke(kgen, args2);
- hasUnlimitedCrypto = true;
+ hasUnlimitedCrypto = javax.crypto.Cipher.getMaxAllowedKeyLength("Blowfish") > 128;
}
catch(Throwable e)
{
More information about the jboss-cvs-commits
mailing list