• 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

Issue cnnecting to https using self-signed certificate

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a java program trying to connect to a secure url using a self-signed certificate generated by the server. The .pfx file has been installed and am able to access the site using the IE browser. The certificate file has been imported into the keystore file using the keytool command and has also been referenced in the java program using the "javax.net.ssl.trustStore" system property. But for some reason, the client program is not able to connect to the secure url even though I am able to connect using the browser after the certificate is accepted. Please let me know any thoughts.

Thanks.
 
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you let us know what error are you getting and post stack trace here?
 
Chidananda Sulur
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I was able to get around this issue by referencing the .pfx file in the java program using the Keystore apis. The .cer file did not work because it does not contain the private key. So importing the .cer file wasn't enough.

Thanks.
 
reply
    Bookmark Topic Watch Topic
  • New Topic