title: Making an SSL happy for localhost
body: <p>I have a java application that runs on client machines that receives ajax requests from web applications.  Some of these web applications that would like to use the service are served only under https.  </p>
  
  <p>I have the java app now accepting and handling SSL requests just fine, but I must first navigate to the server in a browser and accept the cert.  </p>
  
  <p>What is the best method of having a 'real cert' installed as part of this java app that listens on <code>https://localhost:my_port</code>?  </p>
  
  <p>On windows, it seems I can have an installer add a self signed cert to the machines accepted list. I had also thought about getting a verified cert for <code>thisApp.myDomain.com</code> and then changing host files to point that address to <code>127.0.0.1</code>, but changing host files seems malicious and I worry about that being picked up by anti-virus.</p>
  
  <p>The 'main' application is a web based system. Some users of this web based system would like to be able to print to special printers on designated computers. The java app is to be installed on those computers, the web application then sends ajax requests to the java app, which interacts with the printers. End users need to be able to install this java service with an easy, one-click type of installer. The web app is run from a browser on the machines doing the printing, hence localhost.</p>
  
  <p>As stated earlier, the web apps need to connect to the web server (currently residing with amazon) via https.  The connection to the localhost print server does not need to be https for any reason other than Chrome complains about insecure content, and chrome is currently the most widely used browser by our users.</p>
  
  <p>Any thoughts or suggestions?</p>