title: Use case of increased https security in JAVA
body: <p>I am writing an application that should ensure secured connection between two parties (call them Client and Server).</p>
  
  <p>Server should restrict which clients can connect using https. For this purpose, server will issue a certain number of certificates that will be checked when a client tries to connect. If the certificate that the client is using is not in trusted list, connection would not be established. </p>
  
  <p>This certificate should be distributed using some kind of usb device. So when Client using my application tries to get something from server using https, application should read that certificate from usb device and USE IT to establish https connection. Private key should be kept secret on the device at all times.</p>
  
  <p>So far I managed to create local keystores on client and server (JKS), add them to each other trusted list and use them to achieve proper connection.</p>
  
  <p>My question is:  can client certificates be issued by a server and transported to clients, all together with private key required for https connection? I dont want any data or keystore to be created on the client machine, everything required for establishing https connection should be on that device. Device could have some procedures and api to help this process and ensure secrecy of private key.</p>
  
  <p>Any help will be greatly appreciated :)</p>