title: JKS not found - No such algorithm: JKS for provider BC - [Linux, Tomcat]
body: <p>I'm having trouble setting up SSL authentication with Hermes(corvus)/Tomcat, when initialising the server's "ssl-key-manager" inside one of the corvus config files i'm getting the following error </p>
  
  <p>'no such algorithm: JKS for provider BC'</p>
  
  <p>I have looked everywhere for a solution! Here are a few of the things i've already tried, any help would be greatly appreciated.</p>
  
  <ul>
  <li>I have copied the 'bcprov-jdk15.jar' to the /jre/lib/ext/ folder</li>
  <li>I have registered the bouncyCastle provider in the java.security file
  with '
  security.provider.9=org.bouncycastle.jce.provider.BouncyCastleProvider'</li>
  <li>I have tried changing the store type from JKS to PKCS12 and using my
  private key directly (this just gives me a certificate chain error)</li>
  </ul>
  
  <p>My setup looks like this</p>
  
  <pre><code>&lt;component id="ssl-key-manager" name="SSL Key Manager"&gt;
          &lt;class&gt;hk.hku.cecid.piazza.commons.security.KeyStoreKeyManager&lt;/class&gt;
          &lt;parameter name="keystore-location" value="/usr/lib/jvm/jre/lib/security/cacert" /&gt;
          &lt;parameter name="keystore-password" value="password" /&gt;
          &lt;parameter name="key-alias" value="{58e98c0f-d08b-48ca-925a-316e6fef24d9}" /&gt;
          &lt;parameter name="key-password" value="password" /&gt;
          &lt;parameter name="keystore-type" value="JKS"/&gt;
          &lt;parameter name="keystore-provider" value="org.bouncycastle.jce.provider.BouncyCastleProvider" /&gt;
  &lt;/component&gt;
  </code></pre>
  
  <p>I'm running on Ubuntu 14.04 with a Java version of</p>
  
  <pre><code>java version "1.6.0_45"
  Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
  Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
  </code></pre>
  
  <p>Here is a 'keytool -list' of the 'cacert' file</p>
  
  <pre><code>Keystore type: JKS
  Keystore provider: SUN
  
  Your keystore contains 3 entries
  
  onrampserver_cert, 14-Oct-2015, trustedCertEntry,
  Certificate fingerprint (MD5): 2D:92:7C:26:29:BB:F5:2E:07:AC:58:C2:31:6F:B1:BB
  
  {58e98c0f-d08b-48ca-925a-316e6fef24d9}, 14-Oct-2015, PrivateKeyEntry, 
  Certificate fingerprint (MD5): 62:C4:C8:CC:38:57:FB:8D:EC:21:AF:46:9E:C7:6E:3F
  
  northsideg2ca, 14-Oct-2015, trustedCertEntry,
  Certificate fingerprint (MD5): F2:65:1D:C7:0D:54:55:54:F1:16:6F:DD:45:47:5B:60
  </code></pre>