• 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Want to access a secure site data with the use of URL class.

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

I want to access data from a secure site(HTTPS) .so my client program will access data securely(with free certificate).can any body please tell me how can i get free certificate and how will i access(through java client programme) the content of that site securely.

Is there any alternate way to retrieve data from a secure site securely without using certificate?

Regards,
Lokesh Kumar Pattajoshi
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The client almost never needs a certificate to use SSL. Did you actually encounter a problem while doing this?
 
lokesh pattajoshi
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dittmer sir thanks for your replay.
No i have not faced any problem while accessing data from https site by disabling SSL(i am using below code for disabling SSL).

TrustManager[] trustAllCerts = new TrustManager[] {

new X509TrustManager(){

public java.security.cert.X509Certificate[] getAcceptedIssuers(){

return null;

}

public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }

public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }

}

};

but i want to access data securely so i need SSL.
 
author
Posts: 23926
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The code you posted doesn't disable SSL -- the only thing it does is disable the check to see if the certificate is valid. And the only way to make sure it is valid, if you don't want to disable the check, is to register it with a certificate authority.

Other than bypassing the check, everything else related to SSL, ie. encryption, is still in use.

Henry
 
lokesh pattajoshi
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Henry,
Thanks for your replay . I want to share my requirement with you people actually i am giving my request(all the account related details)to PayPal site so after validation they are returning some reference id about transaction(Whether transaction succeed or failed ) so right now i am getting response from PayPal site by disabling certificate(i think by insecure way) but i want to get the response in secure way so is there any way to implement this..? Kindly suggest your response will be highly appreciated.

Thanks and Regards
Lokesh Kumar Pattajoshi
 
lokesh pattajoshi
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dittmer sir Kindly help me.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic