use of org.apache.cxf.xkms.exception.XKMSConfigurationException in project cxf by apache.
the class FileCertificateRepo method getX509Files.
private File[] getX509Files() {
List<File> certificateFiles = new ArrayList<>();
try {
certificateFiles.addAll(Arrays.asList(storageDir.listFiles()));
certificateFiles.addAll(Arrays.asList(new File(storageDir + "/" + TRUSTED_CAS_PATH).listFiles()));
certificateFiles.addAll(Arrays.asList(new File(storageDir + "/" + CAS_PATH).listFiles()));
certificateFiles.addAll(Arrays.asList(new File(storageDir + "/" + CRLS_PATH).listFiles()));
} catch (NullPointerException e) {
//
}
if (certificateFiles.isEmpty()) {
throw new XKMSConfigurationException(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER, ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE, "File base persistence storage is not found: " + storageDir.getPath());
}
return certificateFiles.toArray(new File[certificateFiles.size()]);
}
Aggregations