can't do SSL to https://gatewaybeta.fedex.com:443/GatewayDC
I am trying to connect to an https site and get
java.net.UnknownHostException SIte name
Is there some environment setup with Trust/Certificates that need to be done first ?
I've tried using IP but then got error when adding startHandshake();
Thanks!
Charlie
===================
Here's the code:
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
public
class testc {
public
static
void
main(String[] arstring) {
try {
SSLSocketFactory sslsocketfactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
SSLSocket sslsocket = (SSLSocket) sslsocketfactory.createSocket("https://gatewaybeta.fedex.com:443/GatewayDC", 443);
} catch (Exception exception) {
exception.printStackTrace();
}
}
}
Here's the last of the trace ran with java -Djavax.net.debug=ssl testc:
.
.
.
init context
trigger seeding of SecureRandom
done seeding SecureRandom
instantiated an instance of class com.sun.net.ssl.internal.ssl.SSLSocketFactoryI
mpl
export control - checking the cipher suites
export control - no cached value available...
export control - storing legal entry into cache...
java.net.UnknownHostException: https://gatewaybeta.fedex.com/GatewayDC
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknow
n Source)
at testc.main(testc.java:14)

