-
Enhancement
-
Resolution: Fixed
-
P3
-
1.0.1, 1.0.2
-
beta2
-
generic, x86
-
generic, windows_2000
The following came in via the java-security alias. In looking over
the AVA code, I note we currently do not parse the AVA hex representations.
/*
* Now parse the value. "#hex", a quoted string, or a string
* terminated by "+", ",", ";", ">". Whitespace before or after
* the value is stripped away.
*/
temp = new StringBuffer();
for (c = (char) in.read();
c == ' ' || c == '\n';
c = (char) in.read())
continue;
if (c == '#') {
throw new IOException("AVA parse, hex values NYI");
This should probably be looked at.
>Hi,
>
>While trying to use HttpsURLConnection to access a secure page,
>I encountered the above exception.
>(java.io.IOException: AVA parse, hex values NYI).
>
>Below is extract of my code.
>1. Do all necessary to create a SSLSocketFactory
>2. Open a HttpsURLConnection
>3. Set SSLSocketFactory in HttpsURLConnection to the created SSLSocketFactory
>4. Open an input stream
>
>However, if I used socket approach, instead of URL to access the page
>with the same SSLSocketFactory created, it is ok.
>
>Pls Advise.
>Thanks.
>
>SSLSocketFactory sf = sslCtx.getSocketFactory();
>URL verisign = new URL("https://wsdev2/a.html");
>HttpsURLConnection conn = (HttpsURLConnection) verisign.openConnection();
>conn.setSSLSocketFactory(sf);
>
>BufferedReader in = new BufferedReader(
>new InputStreamReader(
>conn.getInputStream()));
>
>
>-------------
>Exception in thread "main" java.io.IOException: AVA parse, hex values NYI
> at com.sun.net.ssl.internal.ssl.X500Name.a(Compiled Code)
> at com.sun.net.ssl.internal.ssl.X500Name.<init>([DashoPro-V1.2-120198])
> at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V
>1.2-120198])
> at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V
>1.2-120198])
> at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V
>1.2-120198])
> at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connec
>t([DashoPro-V1.2-120198])
> at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getInp
>utStream(Compiled Code)
> at o.main(Compiled Code)
bradford.wetmore@eng 2000-04-13
Name: krC82822 Date: 04/08/2001
java version "1.2.2"
Classic VM <build JDK-1.2.2_007, native threads, symcjit>
1.
I have a root certificate in jssecacerts from wellington.
Running the program.
2.
import java.io.*;
import java.net.*;
import java.util.*;
import javax.net.ssl.*;
import org.xml.sax.*;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import cjs.utils.log.Log;
import javax.security.cert.*; //test;
import com.sun.net.ssl.*; //test;
class Test {
public static void main (String[] args)
{
Test t=new Test();
Properties sysProp = System.getProperties();
sysProp.put
("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
try{
URL url = new URL
("https://wellington.radio.ausys.se/External/External_interfaces/MailInterface.a
sp");
t.k(url);
}
catch (Exception e)
{
System.out.println(e.toString());
//System.out.println(e.getMessage());
}
}
public void k(URL url)
{
System.out.println("\n"+url.getHost());
try{
System.out.println("Skapar con");
HttpsURLConnection con = (HttpsURLConnection)url.openConnection();
System.out.println("connect");
con.connect();
System.out.println("hamtar cert");
X509Certificate[] certs = con.getServerCertificateChain();
System.out.println("certs="+certs.toString());
}
catch (Exception e)
{
System.out.println(e.toString());
//System.out.println(e.getMessage());
}
}
}
3.
wellington.radio.ausys.se
Skapar con
connect
java.io.IOException: AVA parse, hex values NYI
(Review ID: 120119)
======================================================================
the AVA code, I note we currently do not parse the AVA hex representations.
/*
* Now parse the value. "#hex", a quoted string, or a string
* terminated by "+", ",", ";", ">". Whitespace before or after
* the value is stripped away.
*/
temp = new StringBuffer();
for (c = (char) in.read();
c == ' ' || c == '\n';
c = (char) in.read())
continue;
if (c == '#') {
throw new IOException("AVA parse, hex values NYI");
This should probably be looked at.
>Hi,
>
>While trying to use HttpsURLConnection to access a secure page,
>I encountered the above exception.
>(java.io.IOException: AVA parse, hex values NYI).
>
>Below is extract of my code.
>1. Do all necessary to create a SSLSocketFactory
>2. Open a HttpsURLConnection
>3. Set SSLSocketFactory in HttpsURLConnection to the created SSLSocketFactory
>4. Open an input stream
>
>However, if I used socket approach, instead of URL to access the page
>with the same SSLSocketFactory created, it is ok.
>
>Pls Advise.
>Thanks.
>
>SSLSocketFactory sf = sslCtx.getSocketFactory();
>URL verisign = new URL("https://wsdev2/a.html");
>HttpsURLConnection conn = (HttpsURLConnection) verisign.openConnection();
>conn.setSSLSocketFactory(sf);
>
>BufferedReader in = new BufferedReader(
>new InputStreamReader(
>conn.getInputStream()));
>
>
>-------------
>Exception in thread "main" java.io.IOException: AVA parse, hex values NYI
> at com.sun.net.ssl.internal.ssl.X500Name.a(Compiled Code)
> at com.sun.net.ssl.internal.ssl.X500Name.<init>([DashoPro-V1.2-120198])
> at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V
>1.2-120198])
> at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V
>1.2-120198])
> at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V
>1.2-120198])
> at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connec
>t([DashoPro-V1.2-120198])
> at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getInp
>utStream(Compiled Code)
> at o.main(Compiled Code)
bradford.wetmore@eng 2000-04-13
Name: krC82822 Date: 04/08/2001
java version "1.2.2"
Classic VM <build JDK-1.2.2_007, native threads, symcjit>
1.
I have a root certificate in jssecacerts from wellington.
Running the program.
2.
import java.io.*;
import java.net.*;
import java.util.*;
import javax.net.ssl.*;
import org.xml.sax.*;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import cjs.utils.log.Log;
import javax.security.cert.*; //test;
import com.sun.net.ssl.*; //test;
class Test {
public static void main (String[] args)
{
Test t=new Test();
Properties sysProp = System.getProperties();
sysProp.put
("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
try{
URL url = new URL
("https://wellington.radio.ausys.se/External/External_interfaces/MailInterface.a
sp");
t.k(url);
}
catch (Exception e)
{
System.out.println(e.toString());
//System.out.println(e.getMessage());
}
}
public void k(URL url)
{
System.out.println("\n"+url.getHost());
try{
System.out.println("Skapar con");
HttpsURLConnection con = (HttpsURLConnection)url.openConnection();
System.out.println("connect");
con.connect();
System.out.println("hamtar cert");
X509Certificate[] certs = con.getServerCertificateChain();
System.out.println("certs="+certs.toString());
}
catch (Exception e)
{
System.out.println(e.toString());
//System.out.println(e.getMessage());
}
}
}
3.
wellington.radio.ausys.se
Skapar con
connect
java.io.IOException: AVA parse, hex values NYI
(Review ID: 120119)
======================================================================