| Author |
Client Certification Credential - EWS JAVA API 1.5 - Help needed
|
Kumarjit Chakraborty
Greenhorn
Joined: Aug 08, 2009
Posts: 8
|
|
1 down vote favorite
share [g+] share [fb] share [tw]
I am very new to JAVA and Exchange Web Services. I need to use client certificate for authentication in exchange server using ClientCertificateCredentials class. But I am not able to understand how to implement it. I have tried with the following code:
public static TrustManager getTrustManager () {
try {
File f = new File("ctest.pfx");
FileInputStream is = new FileInputStream(f);
KeyStore ks = KeyStore.getInstance("PKCS12");
String p = "password";
ks.load(is, p.toCharArray());
TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX");
tmf.init(ks);
TrustManager tms[] = tmf.getTrustManagers();
return tms[0];
} catch (Exception ex) {
ex.printStackTrace();
return null;
}
}
And then initializing it like:
ClientCertificateCredentials credentials = new ClientCertificateCredentials(TMImpl.getTrustManager());
But everytime it throws an error:
NTLM authentication scheme selected
No credentials available for NTLM @MyIP:MyPort
Can you please help me understanding what I am doing wrong here.
Thanks in Advance,
Kumarjit
|
 |
Ora Quw
Greenhorn
Joined: Jun 23, 2012
Posts: 1
|
|
|
JWebServices for Exchange
|
 |
Kumarjit Chakraborty
Greenhorn
Joined: Aug 08, 2009
Posts: 8
|
|
Hi Ora Quw,
Thanks for the reply.
I have gone through those apis earlier, however they do not mention about using client certificates. Please let me know if I am missing something here.
Thanks,
Kumarjit
|
 |
 |
|
|
subject: Client Certification Credential - EWS JAVA API 1.5 - Help needed
|
|
|