<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">Thank you so much for your patience. I am getting close. I marshal the Timestamp and Signature then I was able to sign it. I am trying to get the signature value and digest value from the signature but I think I'm in the wrong place. </div><div class="gmail_default" style="font-family:georgia,serif">After calling signObject(signature), I marshal the signature object. However, the signature value and digest value are empty. I also marshal the Timestamp after signing but nothing there. (I expect this since it's a detach signature)</div><div class="gmail_default" style="font-family:georgia,serif">I added the signature to Security before calling signObject and tried to marshal the Security but the signature value is still empty.</div><div class="gmail_default" style="font-family:georgia,serif">Please let me know where I can retrieve the signature.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 30, 2018 at 9:11 PM Binh Pham <<a href="mailto:btpham@gmail.com">btpham@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">It throws the exception "Unable to compute signature, Signature XMLObject does not have the XMLSignature created during marshalling." when I call Signer.signObject(signature);</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">So the Timestamp will be a child of Security. The Security is not a SignableXMLObject. I am wondering if I have to create a SignableXMLObject class and add Timestamp as a child and try to sign from there. Please let me know if me know if that would be the path to head down. Thanks again for your help.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif"><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 30, 2018 at 5:36 PM Brent Putman <<a href="mailto:putmanb@georgetown.edu" target="_blank">putmanb@georgetown.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<br>
<div class="m_2130550466983860654m_5220714613770372805moz-cite-prefix">On 10/30/18 1:41 PM, Binh Pham wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div class="gmail_default" style="font-family:georgia,serif">Thank
you so much for helping thus far. I still have some more
questions.</div>
<div class="gmail_default" style="font-family:georgia,serif"><br>
</div>
<div class="gmail_default" style="font-family:georgia,serif">I
would add the timestamp id to
DocumentInternalIDContentReference like so:<br>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">DocumentInternalIDContentReference
reference = new
DocumentInternalIDContentReference(timestamp.getWSUId());</div>
<div class="gmail_default">reference.getTransforms().add(SignatureConstants.TRANSFORM_C14N_EXCL_OMIT_COMMENTS);</div>
<div class="gmail_default">reference.setDigestAlgorithm(SignatureConstants.ALGO_ID_DIGEST_SHA1);</div>
<div class="gmail_default">Signature signature =
getSignature(credential);</div>
<div class="gmail_default">signature.getContentReferences().add(reference);</div>
</div>
</div>
</div>
</blockquote>
<br>
Offhand, structurally speaking that looks correct to me. <br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div class="gmail_default" style="font-family:georgia,serif">
<div class="gmail_default"><br>
</div>
<div class="gmail_default">Then call
Signer.signObject(signature);?</div>
</div>
</div>
</div>
<br>
</blockquote>
<br>
Yes. Other than manually creating and adding the ContentReference,
everything else should be conceptually the same as other XML
signatures, such as the enveloped signature on Assertion.<br>
<br>
</div>
</blockquote></div>
</blockquote></div>