]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/dbObjects/CertificateProfile.java
Highlight expired nucleus bonus verifications in points overview
[gigi.git] / src / org / cacert / gigi / dbObjects / CertificateProfile.java
index c31f6cbfa3449dbaebb4ceb2e7f2564765da2640..afcc019c417b172308d5092921df3e020e7879c5 100644 (file)
@@ -180,7 +180,13 @@ public class CertificateProfile implements IdCachable {
         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);
@@ -263,6 +269,14 @@ public class CertificateProfile implements IdCachable {
                 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;
             }