Skip to Content.
Sympa Menu

mace-opensaml-users - Re: Problems signing response...XMLObject does not have the XMLSignature created during marshalling

Subject: OpenSAML user discussion

List archive

Re: Problems signing response...XMLObject does not have the XMLSignature created during marshalling


Chronological Thread 
  • From: Mike Klein <>
  • To:
  • Subject: Re: Problems signing response...XMLObject does not have the XMLSignature created during marshalling
  • Date: Sat, 12 May 2007 21:38:27 -0700
  • Organization: Virtual Appliance, Inc.

Doing marshalling first yields error regarding null signature algorithm.
Am I perhaps creating signature incorrectly?

I am on an older main/latest...from like 3 mos back.

Caused by: org.apache.xml.security.signature.XMLSignatureException: The
requested algorithm null does not exist. Original Message was: null
Original Exception was java.lang.NullPointerException
at
org.apache.xml.security.algorithms.SignatureAlgorithm.<init>(Unknown Source)
at org.apache.xml.security.signature.SignedInfo.<init>(Unknown Source)
at org.apache.xml.security.signature.XMLSignature.<init>(Unknown Source)
at org.apache.xml.security.signature.XMLSignature.<init>(Unknown Source)
at
org.opensaml.xml.signature.impl.SignatureMarshaller.createSignatureElement(SignatureMarshaller.java:113)
... 57 more


mike

Brent Putman wrote:
> That's an "expected" error. You need to marshall the object to be
> signed before you call Signer.signObject(sig). So in your case your
> need to first marshall the response, after you call
> response.setSignature(sig).
>
> That process is documented here:
>
> https://spaces.internet2.edu/display/SHIB/OSTwoUserManJavaDSIG
>
> --Brent
>
>
>
> Mike Klein wrote:
>
>> public static Response signResponse(Response response)
>> {
>> try
>> {
>> SignatureBuilder builder = new SignatureBuilder();
>> SignatureImpl sig = builder.buildObject();
>> SAMLObjectContentReference socr = new
>> SAMLObjectContentReference(response);
>> sig.getContentReferences().add(socr);
>> sig.setSigningKey(signingKey);
>> response.setSignature(sig);
>> Signer.signObject(sig);
>> ...
>>
>> However on last statement I am getting following:
>>
>> 2007-05-12 18:18:32,693 WARN [Signer] Unable to compute signature,
>> Signature XMLObject does not have the XMLSignature created during
>> marshalling.
>> 1225078 [http-0.0.0.0-8080-Processor2] WARN
>> org.opensaml.xml.signature.Signer - Unable to compute signature,
>> Signature XMLObject does not have the XMLSignature created during
>> marshalling.
>> 2007-05-12 18:18:32,850 ERROR [SignatureMarshaller] Unable to construct
>> signature Element {http://www.w3.org/2000/09/xmldsig#}Signature
>> org.apache.xml.security.signature.XMLSignatureException: The requested
>> algorithm null does not exist. Original Message was: null
>> Original Exception was java.lang.NullPointerException
>> at
>> org.apache.xml.security.algorithms.SignatureAlgorithm.<init>(Unknown
>> Source)
>>
>>



Archive powered by MHonArc 2.6.16.

Top of Page