title: Connect https, I can not define ssl context, Google App Engine, Java
body: <p>I'm working on a Google App Engine application that needs to read PDF files from a HTTPS connection that requires accepting the root certificate.</p>
  
  <p>I managed to read from a main class, accessing the keystore with the certificate included. </p>
  
  <p>Unfortunately when using the code on App Engine, it tells me I can not use HttpsURLConnection class to create the SSL context that allows me to create the HTTPS connection to the server.</p>
  
  <pre><code>URL url = new URL("https://sede.dgt.gob.es/WEB_TTRA_CONSULTA/ServletVisualizacion?params=nNo5ZWovvSC5yTu9s4kDdX4GzPZvWMyYo3P%2FsuhoF4DJImPyqstz8tHRwBQcTuZk%0D%0A&amp;formato=PDF");
  
  URLConnection conexion = url.openConnection();
  ((HttpsURLConnection) conexion).setSSLSocketFactory(sslSocketFactory);
  conexion.connect();
  
  InputStream is = conexion.getInputStream();
  </code></pre>
  
  <p>What kind I use for it?</p>
  
  <p>How do I access the keystore on the server? work with the binary file on disk?</p>