FabianTerhorst / openid4java

openid4java
Apache License 2.0
1 stars 0 forks source link

Work around bug in the IBM JRE #117

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There's a bug in the IBM JRE that causes it to return invalid (truncated) 
values from SecretKey.getAlgorithm(), which subsequently causes 
Mac.getInstance() to blow up in Association#sign(). The result is that the 
openid4java library becomes unusable on IBM's WebSphere Application 
Server, among others.

I'm attaching one possible patch, although there are probably more elegant 
ways of going about it. Link to further details:

https://www-304.ibm.com/support/entdocview.wss?uid=swg1IZ67739

Original issue reported on code.google.com by mbeer...@gmail.com on 26 Apr 2010 at 2:39

Attachments:

GoogleCodeExporter commented 9 years ago
Er, fixed patch.

Original comment by mbeer...@gmail.com on 26 Apr 2010 at 2:47

Attachments:

GoogleCodeExporter commented 9 years ago
IBM restricted access to the bug for whatever reason, but here's the text:

Problem:
A getAlgorithm() call on a SecretKey object will return an
abbreviated short name and the
same call on KeyGenerator will return the full name.

Environment:
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build
pap64dev-20091106a (SR11 ))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc64-64
j9vmap6423-20091104 (JIT enabled)
J9VM - 20091103_45935_BHdSMr
JIT  - 20091016_1845_r8
GC   - 20091026_AA)
JCL  - 20091106

Original comment by mbeer...@gmail.com on 4 Jun 2010 at 8:53