What I am passing into the valida() is a Signature, and there is only one signature under SPSSODescriptor, so that cannot be wrong, is it?<br><br>Another question, can you take a look at the metadata that I just sent again? The structure is like:<br>

<br>&lt;md:EntityDescriptor xmlns:md=&quot;urn:oasis:names:tc:SAML:2.0:metadata&quot; entityID=&quot;<a href="http://www.localhost.com">www.localhost.com</a>&quot;&gt;<br>    &lt;md:SPSSODescriptor AuthnRequestsSigned=&quot;false&quot; WantAssertionsSigned=&quot;false&quot; errorURL=&quot;<a href="http://www.localhost.com/SAML/ERROR">www.localhost.com/SAML/ERROR</a>&quot; protocolSupportEnumeration=&quot;urn:oasis:names:tc:SAML:2.0:protocol&quot;&gt;<br>

        &lt;ds:Signature xmlns:ds=&quot;<a href="http://www.w3.org/2000/09/xmldsig#">http://www.w3.org/2000/09/xmldsig#</a>&quot;&gt;<br>            ........<br>            <span style="color:rgb(0,102,0)">&lt;ds:KeyInfo&gt;</span><br>

                &lt;ds:X509Data&gt;<br>                    &lt;ds:X509Certificate&gt;.......&lt;/ds:X509Certificate&gt;<br>                &lt;/ds:X509Data&gt;<br>            &lt;/ds:KeyInfo&gt;<br>        &lt;/ds:Signature&gt;<br>

        &lt;md:KeyDescriptor&gt;<br>            <span style="color:rgb(0,102,0)">&lt;ds:KeyInfo</span> xmlns:ds=&quot;<a href="http://www.w3.org/2000/09/xmldsig#">http://www.w3.org/2000/09/xmldsig#</a>&quot;&gt;<br>                &lt;ds:X509Data&gt;<br>

                    &lt;ds:X509Certificate&gt;........&lt;/ds:X509Certificate&gt;<br>                &lt;/ds:X509Data&gt;<br>            &lt;/ds:KeyInfo&gt;<br>        &lt;/md:KeyDescriptor&gt;<br>     &lt;/md:SPSSODescriptor&gt;<br>

&lt;/md:EntityDescriptor&gt;<br><br>There are two &lt;KeyInfo&gt;, I am using the same public key and private key to generate it, so does is matter to use which one to verify the signature? I think no, but I just want to rule out this case.<br>

<br clear="all">Yaowen<br>
<br><br><div class="gmail_quote">On Wed, Oct 31, 2012 at 4:30 PM, Brent Putman <span dir="ltr">&lt;<a href="mailto:putmanb@georgetown.edu" target="_blank">putmanb@georgetown.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div class="im">
    <br>
    <div>On 10/31/12 7:23 PM, Yaowen Tu wrote:<br>
    </div>
    <blockquote type="cite">1. I am not sure how to check if I am passing
      EntityDescriptor or SPSSODescriptor. In the code sample of the
      wiki:<br>
                  <br clear="all">
      <div><font size="4"><code>       Credential verificationCredential
            = getVerificationCredential(response);</code></font></div>
      <div><font size="4"><code>       SignatureValidator sigValidator =
          </code><code>new</code> <code>SignatureValidator(verificationCredential);<br>
            <font size="4"> <font size="4"> The SignatureValidator only
                <font size="4">need a credential. I think as long as I
                  get the <font size="4">credential</font> under </font></font></font></code></font><font size="4"><code><font size="4"><font size="4"><font size="4">SPSSODescriptor, that should be
                  fine.<font size="4"><font size="4"><font size="4"> </font></font>Is
                    that correct? <br>
                  </font></font></font></font></code></font></div>
    </blockquote>
    <br>
    <br></div>
    I meant what you are passing to the validate(...) method.  Although
    I forgot that your error is actually on the
    SAMLSignatureProfileValidator, so it&#39;s whatever you are passing to
    the validate(...) method of that.<br>
    <br>
    You error is odd though, b/c you have a non-null Signature which is
    saying it doesn&#39;t contain the Apache XMLSignature object.  So
    something that you are doing is off.<br>
    <br>
    <br>
  </div>

<br>--<br>
To unsubscribe from this list send an email to <a href="mailto:dev-unsubscribe@shibboleth.net">dev-unsubscribe@shibboleth.net</a><br></blockquote></div><br>