title: How to use truststore.jks & keystore.jks files to build a producer application in .NET using Confluent Kafka
body: <p>I have received <code>truststore.jks</code> &amp; <code>keystore.jks</code> file from a team who manages kafka. We are required to build a producer application in .NET using these .jks files. I have used below commands to convert .jks files to required format as .jks is not compatible with .net applications.</p>
  <pre><code>keytool -importkeystore -srckeystore truststore.jks -destkeystore truststore.p12 -deststoretype PKCS12
  
  openssl pkcs12 -in truststore.p12 -nokeys -out truststore.cer.pem
  
  keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore.p12 -srcstoretype jks -deststoretype pkcs12
  
  openssl pkcs12 -in keystore.p12 -out keystore.pem
  
  openssl rsa -in keystore.pem -out newrsakeystore.pem
  </code></pre>
  <p>Output of above commands are assinged to producer config properties below:</p>
  <p><a href="https://i.stack.imgur.com/iLudN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iLudN.png" alt=".net code" /></a></p>
  <p>After running getting error:</p>
  <blockquote>
  <p>SSL Handshake failed. client SSL Authentication might be required (see ssl.key.location and ssl.certificate.location)</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/rdN8D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rdN8D.png" alt="SSL Error" /></a></p>
  <p>Need help to identify what is wrong here which is making SSL handshake failing.</p>