Static registration of SunJCE provider
Add the "SunJCE" provider to your list of approved providers. This
is done statically by editing the security properties file
<java-home>\lib\security\java.security [Win32]
<java-home>/lib/security/java.security [Solaris]
Here, as in the previous step,
<java-home> refers to the directory where the JRE
was installed. For example, if you have Java® 2 SDK v.1.2 installed on Solaris, you
need to edit the following file:
jdk1.2/jre/lib/security/java.security
Similarly, if you have Java® 2 Runtime Environment v.1.2 installed on Solaris, you need to edit
this file:
jre1.2/lib/security/java.security
One of the types of properties you can set in java.security
is of the following form:
security.provider.n=providerClassName
This declares a provider, and specifies its preference order
n. The preference order is the order in which providers are
searched for requested algorithms (when no specific provider is
requested). The order is 1-based; 1 is the most preferred, followed
by 2, and so on.
Add the above line to java.security
, replacing
providerClassName with com.sun.crypto.provider.SunJCE
,
and substituting n with the priority that you would like to
assign to the "SunJCE" provider.
For example, if you would like to configure "SunJCE" as
your second preferred provider, you add the following line to the
java.security
file:
security.provider.2=com.sun.crypto.provider.SunJCE