1

I am now, writing some android code to access the WebDav server using Slide API. I can successfully access "http://webdav.host.com" to put and get. But I can't access the secured WebDav server, i.e. "https://webdav.host.com".

My code is as follows:

HttpsURL homeUrl = new HttpsURL(webDavHost, 443, webDavPath);

//set user name and password 
homeUrl.setUserinfo(webDavUser,webDavPassword);         
Credentials cred = new UsernamePasswordCredentials("user", "pwd"); 

res = new WebdavResource(homeurl,cred);

I get the following error message: "Certificate not Trusted".

How should I do to modify the attribute of HttpsURL object therefore to trust all certication?

Charles Wu
  • 904
  • 1
  • 9
  • 19
  • It seems that your server is asking you to authenticate with a certificate, while you are only supplying a user/password authentication. You need to somehow authenticate with the cert (I'm too bad at this to know the details ...) – Samuel Lampa Sep 15 '11 at 11:57
  • You can get certificates that will be trusted for free from some providers. I've used a few from http://www.startssl.com recently (I'm not affiliated with them in anyway). – Flexo Nov 22 '11 at 18:02

0 Answers0