Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Client Certification Credential - EWS JAVA API 1.5 - Help needed

 
Kumarjit Chakraborty
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JWebServices for Exchange
 
Kumarjit Chakraborty
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic