United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6500133 : REGRESSION: CertificateParsingException for CRL Distribution Point with blank

Details
Type:
Bug
Submit Date:
2006-12-04
Status:
Closed
Updated Date:
2014-01-22
Project Name:
JDK
Resolved Date:
2014-01-22
Component:
security-libs
OS:
linux,solaris
Sub-Component:
java.security
CPU:
x86,sparc
Priority:
P4
Resolution:
Won't Fix
Affected Versions:
5.0,6u17
Fixed Versions:
8

Related Reports
Backport:
Backport:
Backport:
Duplicate:
Relates:
Relates:

Sub Tasks

Description
FULL PRODUCT VERSION :
1.5.0_06-b05
1.5.0_09-b03

ADDITIONAL OS VERSION INFORMATION :
Linux CentOs

A DESCRIPTION OF THE PROBLEM :
When I try to parse a X509Certificate with CRL Distribution Point with a blank char (ex: "ldap://mysite.it/CN=Servizio Test") with jdk 1.5, I have always this kind of exception: "java.security.cert.CertificateParsingException: java.io.IOException: java.net.URISyntaxException: Illegal character in path at index ...". With jdk 1.4.2_06-b03 it works fine.


ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.security.cert.CertificateParsingException: java.io.IOException: java.net.URISyntaxException: Illegal character in path at index 44: ldap://ldap.cgi.crs.lombardia.it/CN=Servizio di Test


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
String certBase64 = "MIIEljCCA36gAw..................0WULFMm9fu3XUdYdg=";

try {

InputStream inStream = new ByteArrayInputStream(
Base64.decode(certBase64 )
);

java.security.cert.CertificateFactory cf = java.security.cert.CertificateFactory.getInstance("X.509");

X509Certificate caCert = (X509Certificate) cf.generateCertificate(inStream);
System.out.println("ok: " + caCert.toString());

}
catch (Exception e) {
System.out.println("setCainfo - error" + e.toString());
}
---------- END SOURCE ----------

                                    

Comments
As the fix has been backed out JDK-8005414.
                                     
2014-01-22
Fix backed out in JDK-8005414
Hence not verified
                                     
2013-04-12
EVALUATION

sun.security.x509.URIName constructor made more flexible by first re-encoding URIs with illegal characters.
                                     
2012-08-17



Hardware and Software, Engineered to Work Together