+ std::size_t pos = name.find("_");
+ if (pos == std::string::npos) {
+ throw new std::invalid_argument("ca name: " + name + " is malformed.");
+ }
+ std::size_t pos2 = name.find("_", pos + 1);
+ if (pos2 == std::string::npos) {
+ throw new std::invalid_argument("ca name: " + name + " is malformed.");
+ }
+ crlURL = crlPrefix + "/g2/" + name.substr(pos+1, pos2-pos - 1) + "/" + name.substr(0,pos) + "-" + name.substr(pos2+1) + ".crl";
+ crtURL = crtPrefix + "/g2/" + name.substr(pos+1, pos2-pos - 1) + "/" + name.substr(0,pos) + "-" + name.substr(pos2+1) + ".crt";