String name = crl.getIssuerX500Principal().getName();
try {
String path = convertIdForFileSystem(name) + ".cer";
Pattern p = Pattern.compile("[a-zA-Z_0-9-_]");
if (!p.matcher(path).find()) {
throw new URISyntaxException(path, "Input did not match [a-zA-Z_0-9-_].");
}
File certFile = new File(storageDir + "/" + CRLS_PATH, path);
certFile.getParentFile().mkdirs();
FileOutputStream fos = new FileOutputStream(certFile);