Skip to Content.
Sympa Menu

mace-opensaml-users - Very minor problem with SAML2ArtifactType0004

Subject: OpenSAML user discussion

List archive

Very minor problem with SAML2ArtifactType0004


Chronological Thread 
  • From: Jeff Brewer <>
  • To: "" <>
  • Subject: Very minor problem with SAML2ArtifactType0004
  • Date: Tue, 20 Mar 2007 16:44:44 -0700
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Z-usanet-msgid: XID610LcTXSW0401X28

Here is the top of the parseArtifact method of SAML2ArtifactType0004. It seems to always throw an exception “Illegal artifact type code” when the type code is correct (0004 for this artifact type). The Arrays.equals(typeCode, TYPE_CODE) should be !Arrays.equals(typeCode, TYPE_CODE) then throw the exception. It would be nice if this made it into svn. I think all the SAML1ArtifactTypes have the same problem.

 

    public static SAML2ArtifactType0004 parseArtifact(byte[] artifact) throws IllegalArgumentException {

        if (artifact.length != 44) {

            throw new IllegalArgumentException("Artifact length must be 44 bytes it was " + artifact.length + "bytes");

        }

 

        byte[] typeCode = { artifact[0], artifact[1] };

 

        // This code should be !Arrays.equals(typeCode, TYPE_CODE)

        if (Arrays.equals(typeCode, TYPE_CODE)) {

            throw new IllegalArgumentException("Illegal artifact type code");

        }

 

Jeff Brewer

PayCycle, Inc.




Archive powered by MHonArc 2.6.16.

Top of Page