Search in sources :

Example 1 with XKMSConfigurationException

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()]);
}
Also used : XKMSConfigurationException(org.apache.cxf.xkms.exception.XKMSConfigurationException) ArrayList(java.util.ArrayList) File(java.io.File)

Aggregations

File (java.io.File)1 ArrayList (java.util.ArrayList)1 XKMSConfigurationException (org.apache.cxf.xkms.exception.XKMSConfigurationException)1