• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to communicate over https to a self certfied page

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
i spend xx hours on solving this problem,
perhaps someone of you knows the solution, it would be really great!
i have a application which tries to send an XML-Report via https to a cgi page on a apache web server over https.
the apace webserver has a self certifed certificate, which was created with openssl
i stored succesfully the selfmade certificate with keytool to %java_home%\jre\lib\security\cacerts (on win2000)
in my application i have sth. like this

when i try to get Streams of urlcon1 an Exception is thrown:
javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Couldn't find trusted certificate

why is this? doesn't my application find the cacerts file?
or is this because the certficate is selfmade?
if anyone has experience in ssl,https etc. please reply!
Greetings
Marek
[ November 24, 2003: Message edited by: marek duda ]
 
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure if I have the right answer, but I think you might be trying to do too much. I at least used to think I had to worry about posting to stuff like that over HTTPS, but apparently I didn't have to mess with any authentication. Or maybe it's just taken care of with the HttpClient at Apache's Jakarta site. I'd suggest using that--it will probably make your life easier in the end.
 
marek duda
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Thanks, for your suggestion, I tried the Jakarta HttpClient, but
it seems I messed up sth. with my SSL Configuration,
I tried the Test class which does some "https" to verisign...
it should work but:
...CertificateException: CA certificate does not include basic constraints extension
so the problem is propablysth.different!
Greetings
Marek
 
marek duda
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I solved the problem,
it was mainly due to a bad set up tomcat (my client), and perhaps some failures ni my certificates!
the most help for me (and perhaps for some of you in future) was an post how to set up tomcat as a ssl client
and of course it was much easier to work witk apache's httpclient package, because java produced some version conflicths with itself
OK thank you for your Help, that's all!
 
reply
    Bookmark Topic Watch Topic
  • New Topic