]> WPIA git - cassiopeia.git/blobdiff - src/config.cpp
add: signing of OCSP certificates
[cassiopeia.git] / src / config.cpp
index d078179cee5c8c47c6e0aba45bbe62987f9a9a60..a58cc82878acabf16190dcc212bb27e2a617b8f3 100644 (file)
@@ -93,16 +93,20 @@ int parseProfiles() {
         prof.ku = map->at( "ku" );
         prof.maxValidity = std::stoi( map->at( "days" ) ) * /* DAYS */24 * 60 * 60;
 
-        std::string cas = map->at( "ca" );
 
         DIR *dir;
         struct dirent *ent;
 
-        if( ( dir = opendir( "ca" ) ) != NULL ) {
+        if( profileName == "0100-ocsp" ) {
+            //This profile does not have a specific CA. The concrete CA has to be set in each request.
+        } else if( ( dir = opendir( "ca" ) ) != NULL ) {
+            std::string cas = map->at( "ca" );
+            std::string toFind = cas + "_";
+
             while( ( ent = readdir( dir ) ) != NULL ) {
                 std::string caName = std::string( ent->d_name );
 
-                if( caName.find( cas ) != 0 ) {
+                if( caName.find( toFind ) != 0 ) {
                     continue;
                 }