final HashMap<String, CertificateProfile> myName = new HashMap<String, CertificateProfile>();
final HashMap<Integer, CertificateProfile> myId = new HashMap<Integer, CertificateProfile>();
- for (File f : new File("config/profiles").listFiles()) {
+ File profiledir = new File("config/profiles");
+ File[] profilelist = profiledir.listFiles();
+ if (null == profilelist) {
+ throw new Error("Unable to list available profiles from " + profiledir.getName());
+ }
+
+ for (File f : profilelist) {
Properties p = new Properties();
try (FileInputStream inStream = new FileInputStream(f)) {
p.load(inStream);
if ( !actor.isInGroup(Group.CODESIGNING)) {
return false;
}
+ } else if (s.equals("ocsp")) {
+ if ( !(owner instanceof Organisation)) {
+ return false;
+ }
+ Organisation o = (Organisation) owner;
+ if ( !o.isSelfOrganisation()) {
+ return false;
+ }
} else {
return false;
}