From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Petit-Bianco To: Subject: Re: bouncycastle JCE Date: Fri, 05 Oct 2001 21:21:00 -0000 Message-id: <15294.34486.581237.51727@fencer.cygnus.com> References: <000201c14448$5d56fac0$0300a8c0@green> X-SW-Source: 2001-10/msg00000.html Anthony Green writes: > Also, Alex, if you look at the Makefile - I've special cased two > "gcj -C" builds because the compiler goes into a seemingly endless > loop. I filed a PR for that (java/4489) and there's a simple workaround. ./A 2001-10-05 Alexandre Petit-Bianco * Makefile.am: Removed workaround java/4489. * Makefile.in: Regenerate. * upstream/src/org/bouncycastle/crypto/engines/RijndaelEngine.java (generateWorkingKey): Installed workaround java/4489. Index: Makefile.am =================================================================== RCS file: /cvs/rhug/rhug/BouncyCastle/Makefile.am,v retrieving revision 1.1 diff -u -p -r1.1 Makefile.am --- Makefile.am 2001/09/23 00:12:18 1.1 +++ Makefile.am 2001/10/06 04:17:41 @@ -420,10 +420,10 @@ SUFFIXES = .java .lo .o .obj .class .jar # "gcj -C" current goes into a seemingly never ending loop. Here's a # work-around. -upstream/src/org/bouncycastle/crypto/engines/RijndaelEngine.class: upstream/src/org/bouncycastle/crypto/engines/RijndaelEngine.java - cp -f $(srcdir)/upstream/classes/org/bouncycastle/crypto/engines/RijndaelEngine.class $@ -upstream/src/org/bouncycastle/crypto/test/RijndaelTest.class: upstream/src/org/bouncycastle/crypto/test/RijndaelTest.java - cp -f $(srcdir)/upstream/classes/org/bouncycastle/crypto/test/RijndaelTest.class $@ +# upstream/src/org/bouncycastle/crypto/engines/RijndaelEngine.class: upstream/src/org/bouncycastle/crypto/engines/RijndaelEngine.java +# cp -f $(srcdir)/upstream/classes/org/bouncycastle/crypto/engines/RijndaelEngine.class $@ +# upstream/src/org/bouncycastle/crypto/test/RijndaelTest.class: upstream/src/org/bouncycastle/crypto/test/RijndaelTest.java +# cp -f $(srcdir)/upstream/classes/org/bouncycastle/crypto/test/RijndaelTest.class $@ JAVAX_CLASSFILES = $(lib_javax_crypto_la_SOURCES:.java=.class) --- ./upstream/src/org/bouncycastle/crypto/engines/RijndaelEngine.java~ Thu Jun 14 22:15:30 2001 +++ ./upstream/src/org/bouncycastle/crypto/engines/RijndaelEngine.java Fri Oct 5 19:57:12 2001 @@ -297,7 +297,11 @@ public class RijndaelEngine throw new IllegalArgumentException("Key length not 182/192/256 bits."); } - switch (keyBits >= blockBits ? keyBits : blockBits) + // This is a work-around for java/4489 + // http://gcc.gnu.org/ml/java-prs/2001-q4/msg00005.html + int temp_switch_expr = keyBits >= blockBits ? keyBits : blockBits; + + switch (temp_switch_expr) { case 128: ROUNDS = 10;