Error - "The value specified for the argument is not correct"
843811Jan 21 2004 — edited Mar 30 2005The program below is attempted with an iSeries(V5R2M0) via QShell. All of the proper installation procedures have been done for JSSE. The program worked prior to an upgrade (V5R1)... but now has stopped working. The error message really gives us no clue:
"The value specified for the argument is not correct"
But we know it is exactly when the connection is attempted to the SSL URL.
************Beginning of data**************
import java.io.*;
import javax.net.ssl.*;
public class ssltest
{
public static void main(String[] argv) throws Exception
{
System.setProperty("javax.net.ssl.debug","all");
System.err.println("Attempting to contact host " + host);
SSLSocketFactory sslFact = (SSLSocketFactory) SSLSocketFactory.getDef
SSLSocket s = (SSLSocket) sslFact.createSocket("www.verisign.com", 443);
OutputStream out = s.getOutputStream();
//Fails on the line above - (when trying to connect.)
byte[] outdata = "GET / HTTP/1.1".getBytes();
out.write(outdata);
out.close();
}
}
************End of Data********************