1

I want to "load" a xml source from a self-signed https server.

scala.xml.XML.load("https://....")

returns some exception ("untrusted certificate" etc.)

How can I get around that?

Even worse, I need to authenticate with username and password ...

(it's a subversion server ...)

TIA, Sebastian.

Bastl
  • 2,686
  • 5
  • 21
  • 43
  • 1
    Import the certificate in your trust store. – Bruno May 17 '12 at 21:43
  • Maybe you can try downloading that xml source using standard methods (SSL-capable HTTP libs, try Dispatch for that), and then calling scala.xml.XML.loadString. – Rogach May 18 '12 at 03:25
  • @Bruno: Thanks! For reference I link to a howto: http://stackoverflow.com/questions/2893819/telling-java-to-accept-self-signed-ssl-certificate – Bastl May 18 '12 at 06:06

1 Answers1

0

Finally, google revealed answers (If you only knew the right keywords in advance ...)

This shows howto setup authentication:

http://wiki.sdn.sap.com/wiki/display/events/ScnTwitterBlog.scala

And this discusses self-signed certificates:

telling java to accept self-signed ssl certificate

Cheers!

Community
  • 1
  • 1
Bastl
  • 2,686
  • 5
  • 21
  • 43
  • 1
    Remember that the options that rely on writing a trust manager that doesn't do anything (Option 2 in the answer you link to) introduce a vulnerability to MITM attacks. – Bruno May 18 '12 at 08:05