use of sun.security.x509.CRLDistributionPointsExtension in project jdk8u_jdk by JetBrains.
the class Parse method main.
public static void main(String[] args) throws Exception {
/* Try to parse a CRLDistributionPointsExtension URI with a space. */
try {
CRLDistributionPointsExtensionTest(certWithSpaceInCDPStr);
throw new RuntimeException("Illegally parsed a " + "CRLDistributionPointsExtension uri with a space.");
} catch (IOException e) {
System.out.println("Caught the correct exception.");
}
/* Try to parse a CRLDistributionPointsExtension URI with backslashes. */
try {
CRLDistributionPointsExtensionTest(certWithBackslashesInCDPStr);
throw new RuntimeException("Illegally parsed a " + "CRLDistributionPointsExtension uri with a backslashes.");
} catch (IOException e) {
System.out.println("Caught the correct exception.");
}
/* Try to construct a URIName from a uri with a space. */
String uriWithSpace = "file://crl file.crl";
URIName name;
try {
name = new URIName(uriWithSpace);
throw new RuntimeException("Illegally created a URIName " + "from a uri with a space.");
} catch (IOException e) {
System.out.println("Caught the correct exception.");
}
/* Try to construct a URIName from a uri with backslashes. */
String uriWithBackslashes = "file://\\\\CRL\\crl_file.crl";
try {
name = new URIName(uriWithBackslashes);
throw new RuntimeException("Illegally created a URIName " + "from a uri with backslashes.");
} catch (IOException e) {
System.out.println("Caught the correct exception.");
}
System.out.println("Tests passed.");
}
Aggregations