• 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

SSL, https and post

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have got some code which posts a file to a servlet.
i took some time to find it out and now i have got to port it to work also with https.... any tips? im in real need of this i dont have a clue yet....
thanks a lot
guilherme
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
technobug
Welcome to the Java Ranch, we hope you�ll enjoy visiting as a regular however,
your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!
 
Guilherme Silveira
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
better now
 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can get your exisiting code to work with https/SSL without changing a single line. However you would need the JSSE package. You can get Sun's JSSE implementation from here. Also note that JSSE is now an integral part of jdk1.4
Also you would need to do 2 additional things:
1)Specify the https protocol handler, via the the system property,
java.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol
2)Register the SunJSSE cryptographic provider. You can do this by adding the following line in your java.security file:
security.provider.n=com.sun.net.ssl.internal.ssl.Provider
where 'n' would be the next available integer.
Or you can even do this programmatically as:
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider())
Have a look at the JSSE API User's guide. It explains everything very clearly.
 
Guilherme Silveira
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks a lot
ill try to read it once again
but please dont say it explains very clear cause i couldnt understand it
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic