Problems with certificates form HTTPS connections

Volker Berlin <[email protected]> Tue, 7 Feb 2017 11:55:48 +0100
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <[email protected]>
--===============1345901856002062067==
Content-Type: multipart/alternative;
	boundary="------------CF758222E24BD6004129EA65"

--------------CF758222E24BD6004129EA65
Content-Type: text/plain; charset="windows-1252"
Content-Transfer-Encoding: quoted-printable

Hi Jeroen,

We have problems with HTTPS connections from a docker installation. The
certificate can't validate. For validating the Java VM use the root
certificates saved in <java.home>\lib\security\cacerts. In IKVM this is
a virtual file. We receive different files if we read it directly inside
IKVM on different systems.

That the core Questions:

* From where read IKVM the cacerts file?
* Any idea how we can fix this?

Volker


How we have read the file:

File cert =3D new File(java.lang.System.getProperty("java.home") +
File.separator + "lib" + File.separator + "security" + File.separator +
"cacerts");

FileInputStream input =3D new FileInputStream(cert);

FileOutputStream output =3D new FileOutputStream("c:\\temp\\cert_export.t=
xt");

int data =3D input.read();

while(data !=3D -1)

{

   output.write(data);

   data =3D input.read();

}

input.close();

output.close();

=20

=20


--------------CF758222E24BD6004129EA65
Content-Type: text/html; charset="windows-1252"
Content-Transfer-Encoding: 8bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Jeroen,</p>
    <p>We have problems with HTTPS connections from a docker
      installation. The certificate can't validate. For validating the
      Java VM use the root certificates saved in
      &lt;java.home&gt;\lib\security\cacerts. In IKVM this is a virtual
      file. We receive different files if we read it directly inside
      IKVM on different systems.<br>
    </p>
    <div class="moz-forward-container">That the core Questions: <br>
      <br>
      * From where read IKVM the cacerts file?<br>
      * Any idea how we can fix this?<br>
      <br>
      Volker<br>
      <br>
      <br>
      How we have read the file:<o:p> <br>
      </o:p>
      <div class="WordSection1">
        <p class="MsoNormal">File cert = new
          File(java.lang.System.getProperty("java.home") +
          File.separator + "lib" + File.separator + "security" +
          File.separator + "cacerts");<o:p></o:p></p>
        <p class="MsoNormal">FileInputStream input = new
          FileInputStream(cert);<o:p></o:p></p>
        <p class="MsoNormal">FileOutputStream output = new
          FileOutputStream("c:\\temp\\cert_export.txt");<o:p></o:p></p>
        <p class="MsoNormal">int data = input.read();<o:p></o:p></p>
        <p class="MsoNormal">while(data != -1)<o:p></o:p></p>
        <p class="MsoNormal">{<o:p></o:p></p>
        <p class="MsoNormal">   output.write(data);<o:p></o:p></p>
        <p class="MsoNormal">   data = input.read();<o:p></o:p></p>
        <p class="MsoNormal">}<o:p></o:p></p>
        <p class="MsoNormal">input.close();<o:p></o:p></p>
        <p class="MsoNormal">output.close();<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
    </div>
  </body>
</html>

--------------CF758222E24BD6004129EA65--


--===============1345901856002062067==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
--===============1345901856002062067==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ikvm-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ikvm-developers

--===============1345901856002062067==--