Skip to Content.
Sympa Menu

mace-opensaml-users - RE: [OpenSAML] SAMLResponse signature verification

Subject: OpenSAML user discussion

List archive

RE: [OpenSAML] SAMLResponse signature verification


Chronological Thread 
  • From: "Scott Cantor" <>
  • To: <>
  • Subject: RE: [OpenSAML] SAMLResponse signature verification
  • Date: Wed, 10 Mar 2010 19:50:42 -0500
  • Organization: The Ohio State University

> Chad might be able to comment further, but it's possible we might need
> to look at changing that behavior, or at least provide some option for
> not doing that, like an overloaded marshall(XMLObject target, boolean
> newDocumentIfAlreadyMarshalled) or something similar. At the very least,
> unnecessarily adopting into a new Document is somewhat expensive.

FWIW, my code doesn't give you the option, it just reuses the DOM tree if
it's cached, or uses a new document if none is supplied in the call. If I
needed it to do what you're describing, I'd just create my own document to
give it, or release the DOM first.

> In any case, you probably realize that you don't really need to
> re-marshall there, since you just unmarshalled the object, and so it
> already has a DOM. Although this perhaps highlights a similar issue
> with the API - it nominally wasn't intended that people call getDOM() to
> get the XMLObject's Element, but instead call marshall(XMLObject) - but
> if marshall() always has potentially unwanted side-effects as it does,
> then that's a problem too. For now I suppose the only option is just
> use getDOM(), if you need a sub-Element from an already marshalled (or
> unmarshalled) tree.

In my case, I definitely count on the fact that XMLObject::marshall()
returns the existing DOM if I need it, because getDOM() would return NULL if
it didn't have one, pushing extra checks into my code.

-- Scott

<<attachment: winmail.dat>>




Archive powered by MHonArc 2.6.16.

Top of Page