Installation of certificate for Java Runtime: הבדלים בין גרסאות בדף

מתוך ויקי נטפרי
קפיצה לניווט קפיצה לחיפוש
שורה 4: שורה 4:
 
{{Navigation|Security certificate}}
 
{{Navigation|Security certificate}}
  
'''Update: as of 3 May 2019, a [[Standard certificate installer|new certificate installation software]] was released, the new software automatically installs the certificate also in Java.'''
+
'''Update: as of 3 May 2019, a [[Standard certificate installer|new certificate installation software]] was released, the new software automatically installs the certificate also in JAVA running environment.'''
 
+
===JAVA running environment===
The Java Runtime does not use the OS certificate store, but instead maintains it's own trusted certificate store. In order for Java based programs (e. g. Eclipse IDE) to be able to access secure sites, it is necessary to separately install a certificate into the Java certificate store<ref>The installation of the certificate for Java is supposed to be dealt with in the [[Standard certificate installer|automatic installer]]. However, due to a bug, for the time being this doesn't work with 64 bit installations of the Java Runtime. See [http://forum.netfree.link/topic/5126/האם-certinstaller-exe-אמור-להתקין-תעודה-גם-עבור-java here].</ref>.
+
The Java Runtime does not use the OS certificate store, but instead maintains it's own trusted certificate store. In order for Java based programs (e. g. Eclipse IDE) to be able to access secure sites, it is necessary to separately install a certificate into the Java certificate store.
  
 
Download the NetFree Security certificate from. http://netfree.link/netfree-ca.crt
 
Download the NetFree Security certificate from. http://netfree.link/netfree-ca.crt
שורה 25: שורה 25:
 
</pre>
 
</pre>
  
<br />Some Java based programs install their own Java runtime in the programs directory, rather than relying on the system-wide JRE. In this case, the path to <code>cacerts</code> in the above command must be replaced to point to the <code>cacerts</code> file contained in the applications private JRE.
+
===JAVA-based software===
 +
Sometimes JAVA-based software installs a JAVA private run environment within the program files in Program Files instead of using an already installed environment (for example, all intelij software (which includes android studio)). In this case it is necessary to import the NetFree certificate for each software separately.
 +
 
 +
To import the certificate, you must first the file that stores the certificates files. Usually the JAVA environment is installed in the program files folder in a subfolder named java or jre. Inside the subfolder there will be a path named:  <code>lib\security\</code> and inside it a file named <code>cacerts</code>.
 +
 
 +
====Solution 1====
 +
Find the path to the cacerts file in the specific software installation, and use this path with the command mentioned above.
 +
====Solution 2====
 +
 
 +
The security certificate can be imported using graphical software called KeyStore Explorer, the software is downloadable from [https://keystore-explorer.org/downloads.html here].
 +
 
 +
==Instructions for use:==
 +
The software usually needs to be run as a administrater.
 +
 
 +
In the welcome window, click on the highlighted area:
 +
 
 +
[[קובץ:KeyStore_1.png|לא ממוסגר]]
 +
 
 +
In the window that opens, choose the cacerts file, which is in the location described above.
 +
 
 +
[[קובץ:KeyStore 2.png|לא ממוסגר]]
 +
 
 +
A password request will now appear:
 +
 
 +
[[קובץ:KeyStore 3.png|לא ממוסגר]]
 +
 
 +
The default password is <code>changeit</code> (I have not yet found anyone who hears instructions and actually changes it by default...)
 +
 
 +
Now the file is open and we will see a list of existing certificates . Click "Import Trusted Certificates":
 +
 
 +
[[קובץ:KeyStore 4.png|לא ממוסגר]]
 +
 
 +
And select the NetFree certificate file. [http://netfree.link/netfree-ca.crt (can be downloaded from here)].
 +
 
 +
In the next window, click "OK".
 +
 
 +
[[קובץ:KeyStore 5.png|לא ממוסגר]]
 +
 
 +
ctrl+s Or Clicking "Save" to save the changes<br />[[קובץ:KeyStore 4.1.png|לא ממוסגר]]
 +
 
 +
And thats it !
  
[http://forum.netfree.link/topic/6023 See also here]
 
  
 
<references />
 
<references />

גרסה מ־05:51, 6 בנובמבר 2019

לעברית לחצו כאן

To switch from edit view to read view

To search in the Wiki

Home page > Security certificate > Installation of certificate for Java Runtime ‎‎


Update: as of 3 May 2019, a new certificate installation software was released, the new software automatically installs the certificate also in JAVA running environment.

JAVA running environment

The Java Runtime does not use the OS certificate store, but instead maintains it's own trusted certificate store. In order for Java based programs (e. g. Eclipse IDE) to be able to access secure sites, it is necessary to separately install a certificate into the Java certificate store.

Download the NetFree Security certificate from. http://netfree.link/netfree-ca.crt

Then run the following command in an elevated command prompt[1]:

keytool -import -trustcacerts -alias netfree-ca -file netfree-ca.crt -keystore "%JAVA_HOME%"/jre/lib/security/cacerts -storepass changeit

"keytool" is located in the next location:

%JAVA_HOME%\bin

Or:

C:\Program Files\Java\jdk<Your JDK version>\bin

JAVA-based software

Sometimes JAVA-based software installs a JAVA private run environment within the program files in Program Files instead of using an already installed environment (for example, all intelij software (which includes android studio)). In this case it is necessary to import the NetFree certificate for each software separately.

To import the certificate, you must first the file that stores the certificates files. Usually the JAVA environment is installed in the program files folder in a subfolder named java or jre. Inside the subfolder there will be a path named: lib\security\ and inside it a file named cacerts.

Solution 1

Find the path to the cacerts file in the specific software installation, and use this path with the command mentioned above.

Solution 2

The security certificate can be imported using graphical software called KeyStore Explorer, the software is downloadable from here.

Instructions for use:

The software usually needs to be run as a administrater.

In the welcome window, click on the highlighted area:

KeyStore 1.png

In the window that opens, choose the cacerts file, which is in the location described above.

KeyStore 2.png

A password request will now appear:

KeyStore 3.png

The default password is changeit (I have not yet found anyone who hears instructions and actually changes it by default...)

Now the file is open and we will see a list of existing certificates . Click "Import Trusted Certificates":

KeyStore 4.png

And select the NetFree certificate file. (can be downloaded from here).

In the next window, click "OK".

KeyStore 5.png

ctrl+s Or Clicking "Save" to save the changes
KeyStore 4.1.png

And thats it !


  1. The Security certificate must be stored in the same folder as keytool, otherwise in the command you must change the parameter "netfree-ca.crt" to the full path of the certificate.