Forum Discussion
Gurpreet_40964
Mar 06, 2012Nimbostratus
Hi Joe,
Thanks for the reply. Sorry i was not able to reply for some time. So i used your Xtrust install class. But it seems that i already have provider : 'XTrustJSSE version 1.0'.
I used this code:
public static void install()
{
java.security.Provider name = Security.getProvider(NAME);
int flag = 0;
if(Security.getProvider(NAME) == null)
{
flag=1;
Security.insertProviderAt(new XTrustProvider(), 2);
Security.setProperty("ssl.TrustManagerFactory.algorithm",
TrustManagerFactoryImpl.getAlgorithm());
}
if(flag==0){
System.out.println("Not installed");
System.out.println("Security Provider is : "+name);
}
}
Output is :
Not installed
Security Provider is : XTrustJSSE version 1.0