floater
Java Jedi
总版主
发贴: 3233
积分: 421
|
于 2003-04-21 23:53
With JSSE, you can do this:
URL url = new URL("https://....");
for https. The hook is:
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol"); Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
This should work under "normal condition", namely you use commercial server side certs. Otherwise, if you use your own certs(nobody CA), you need to work on the key store a little bit.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." - Martin Fowler, Refactoring - Improving the Design of Existing Code
|