<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">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_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>