mace-opensaml-users - Re: bug with artifact builder
Subject: OpenSAML user discussion
List archive
- From: Chad La Joie <>
- To:
- Subject: Re: bug with artifact builder
- Date: Tue, 15 May 2007 20:37:33 -0500
- Organization: University Information Systems
Ah yep, I think you're right. Fixed in rev 935
Jeff Brewer wrote:
> Given the code to build an artifact:
>
> SAML2ArtifactType0004Builder artifactBuilder = new
> SAML2ArtifactType0004Builder();
> SAML2ArtifactType0004 artifactObject =
> artifactBuilder.buildArtifact("PAYCYCLEPAYCYCLEPAYC");
> artifactObject.setEndpointIndex(new byte[] {0,0});
> artifactObject.setMessageHandle("00000000000000000001".getBytes());
> String encode = artifactObject.base64Encode();
>
> I get an exception (ArrayIndexOutOfBoundsException) in
> AbstractSAML2Artifact.getArtifactBytes (line 64)
>
> public byte[] getArtifactBytes() {
> byte[] remainingArtifact = getRemainingArtifact();
> byte[] artifact = new byte[4 + remainingArtifact.length];
>
> System.arraycopy(getTypeCode(), 0, artifact, 0, 2);
> System.arraycopy(getEndpointIndex(), 0, artifact, 2, 2);
> System.arraycopy(remainingArtifact, 0, artifact, 4,
> artifact.length);
>
> return artifact;
> }
>
> I think line 64 should be:
>
> System.arraycopy(remainingArtifact, 0, artifact, 4,
> remainingArtifact.length);
>
> Jeff Brewer
>
--
Chad La Joie 2052-C Harris Bldg
OIS-Middleware 202.687.0124
- bug with artifact builder, Jeff Brewer, 05/15/2007
- Re: bug with artifact builder, Chad La Joie, 05/15/2007
- RE: bug with artifact builder, Jeff Brewer, 05/16/2007
- Re: bug with artifact builder, Chad La Joie, 05/15/2007
Archive powered by MHonArc 2.6.16.