Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error - "The value specified for the argument is not correct"

843811Jan 21 2004 — edited Mar 30 2005
The 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********************
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 27 2005
Added on Jan 21 2004
13 comments
326 views