title: How to sign X509 token using WCF
body: <p>I am working on a WCF client which must talk to an Oracle WebLogic service. The service enforces mutual certificate authentication.</p>
  
  <p>We are not, however, able to satisfy the policy and the server logs an error stating:</p>
  
  <blockquote>
    <p>"WSM-00081: The X.509 certificate is not signed."</p>
  </blockquote>
  
  <p>I have been wondering what the exact meaning of this is. The Oracle documentation states:</p>
  
  <blockquote>
    <p>WSM-00081: The X.509 certificate is not signed.</p>
    
    <p>Cause: The X509 token used was not signed according to requirements of certificate authentication scenario.</p>
    
    <p>Action: Sign the X509 token (depending upon the reference mechanism used) for certificate authentication.</p>
    
    <p>Level: 1</p>
    
    <p>Type: ERROR</p>
    
    <p>Impact: Security</p>
  </blockquote>
  
  <p>(<a href="http://docs.oracle.com/cd/E25054_01/core.1111/e10113/chapter_wsm_messages.htm" rel="noreferrer">http://docs.oracle.com/cd/E25054_01/core.1111/e10113/chapter_wsm_messages.htm</a>)</p>
  
  <p>After some research, we found out that we can disable the check in the service policy configuration file by setting <code>is-signed="false</code>:</p>
  
  <pre><code>&lt;orasp:x509-token orasp:enc-key-ref-mech="direct" orasp:is-encrypted="false"
                orasp:is-signed="false"
                orasp:rcpt-enc-key-ref-mech="direct"
                orasp:rcpt-sign-key-ref-mech="direct"
                orasp:sign-key-ref-mech="direct"/&gt;
  </code></pre>
  
  <p>My two theories:</p>
  
  <ul>
  <li>The certificate needs to be signed by a CA
  
  <ul>
  <li>We checked using an a certificate signed by a CA, but this made no difference</li>
  <li>However, we might have made som errors when configurating this. Should we try it over?</li>
  </ul></li>
  <li>We somehow need to sign the included BinarySecurityToken's, which are included in the request.
  
  <ul>
  <li>However, I have no idea how I can do this</li>
  </ul></li>
  </ul>
  
  <p>Have I completely misunderstood the subject or can any of you give some pointers to what the problem might be and how it can be solved?</p>