Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Issue cnnecting to https using self-signed certificate

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
My favorite is a chocolate cupcake with white frosting and tiny ad sprinkles.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic