mace-opensaml-users - Re: [OpenSAML] How to Best Validate Signature in Redirect Profile
Subject: OpenSAML user discussion
List archive
- From: Deena Gurajala <>
- To:
- Subject: Re: [OpenSAML] How to Best Validate Signature in Redirect Profile
- Date: Tue, 25 Aug 2009 11:21:01 -0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=fQ80pvQ6Mbsh1LCofGS3RblulyFC42frnh4aUnANCNq/aiHlXs9W+uVFcnZAYiZE+T 0l87dyOsYipWWywwbobogslrnCpAzM0QM8DshLlkRpciU35HFTvLbCXH1T/5zqk4+nCW UNU7K4zH1GwHy+DLGkaioTcPuMiZTP7ZKQvN8=
You can use the following method to decompress the incoming request.
public static byte[] getinflatedString(byte[] byteArray) throws Exception {
byte[] unCompBytes = null;
ByteArrayOutputStream byteArrOtptStr = null;
try {
Inflater inflater = new Inflater(true);
inflater.setInput(byteArray);
byteArrOtptStr = new ByteArrayOutputStream(byteArray.length);
byte[] buf = new byte[1024];
while (!inflater.finished()) {
int count = inflater.inflate(buf);
byteArrOtptStr.write(buf, 0, count);
}
unCompBytes = byteArrOtptStr.toByteArray();
} finally {
byteArrOtptStr.close();
}
return unCompBytes;
}
after you deflate the incoming request, convert it to XML element.
Then use the Unmarshaller to parse the element into corresponding openSAML object (like AuthneticationReqest object etc).
Hope it helps.
On Sat, Aug 22, 2009 at 3:20 PM, Robert Winch <> wrote:
I am wondering if anyone can tell me how to best validate the signature when using the HTTPRedirectDeflateDecoder? I have searched around and looked in the opensaml tests and am unable to figure it out.
Thanks in advance,
Rob
- How to Best Validate Signature in Redirect Profile, Robert Winch, 08/22/2009
- Re: [OpenSAML] How to Best Validate Signature in Redirect Profile, Deena Gurajala, 08/25/2009
- RE: [OpenSAML] How to Best Validate Signature in Redirect Profile, Scott Cantor, 08/25/2009
- Re: [OpenSAML] How to Best Validate Signature in Redirect Profile, Brent Putman, 08/25/2009
- RE: [OpenSAML] How to Best Validate Signature in Redirect Profile, Scott Cantor, 08/25/2009
- Re: [OpenSAML] How to Best Validate Signature in Redirect Profile, Deena Gurajala, 08/25/2009
Archive powered by MHonArc 2.6.16.