title: Keycloak Certificate Authentication
body: <p>I want a authentication flow for certificate authentication in keycloak and followed this <a href="https://www.keycloak.org/docs/latest/server_admin/#_x509" rel="nofollow noreferrer">docs from keycloak</a>.</p>
  <p>i generated the keystore and truststore with these commands</p>
  <pre><code>keytool.exe -genkey -keyalg RSA -alias localhost -keystore keystore.jks -storepass password123 -validity 360
  keytool.exe -export -alias localhost -file localhost.cer -keystore keystore.jks
  keytool.exe -import -v -trustcacerts -alias localhost -file localhost.cer -keystore truststore.jks
  </code></pre>
  <p>and also made the changes in xml file, now in the <a href="https://www.keycloak.org/docs/latest/server_admin/#troubleshooting-2" rel="nofollow noreferrer">troubleshooting part</a> I'm not getting how to generate <em>client_cert.crt</em> and <em>client_cert.key</em>. also it is mentioned they need to be in .pem format.</p>
  <p>Can somebody help how i move forward with this ?</p>