Topic
  • No replies
padala_rao
padala_rao
1 Post

Pinned topic unable to use IBMJCE securityty provider If the jvm is loaded from a proces

‏2010-09-17T13:33:18Z |
Hi,

I am using "J2RE 1.5.0 IBM AIX build pap32devifx-20090327 (SR9-SSU )" on my AIX machine.
Following are the list of security providers available

#
  1. List of providers and their preference orders :
#
security.provider.1=com.ibm.jsse2.IBMJSSEProvider2
security.provider.2=com.ibm.crypto.provider.IBMJCE
security.provider.3=com.ibm.security.jgss.IBMJGSSProvider
security.provider.4=com.ibm.security.cert.IBMCertPath
security.provider.5=com.ibm.security.sasl.IBMSASL

When I am using the follwoing piece of code to get all the security providers details

import java.security.Provider;
import java.security.Security;
import java.util.Enumeration;

public class sample
{

public static void main(String[] args) throws Exception
{
try
{
Provider p[] = Security.getProviders();

for (int i = 0; i < p.length; i++)
System.out.println(p[i]);
}
catch (Exception e)
{
System.out.println(e);
}
}
}

This code works fine and displaying the list as

IBMJSSE2 version 1.5
IBMJCE version 1.2
IBMJGSSProvider version 1.5
IBMCertPath version 1.1
IBMSASL version 1.5
Now the problem is ---

If I am loading "jvm" from a cpp program and using the above piece of code in a jni program then only few of the security providers are displayed i.e

Jni program displays only

IBMJSSE2 version 1.5
IBMJGSSProvider version 1.5
IBMCertPath version 1.1

Why the remaining two security providers are not displayed.when I am trying to use "IBMJCE version 1.2" providers I got excception as it is not finding the provider.

Please let me know whether I need to use any specifi options while loading "JVM" from a process.

Regards,
Rao.