g_noLuaSideEffect = boost::logic::indeterminate;
}
-typedef std::unordered_map<std::string, boost::variant<bool, int, std::string, std::vector<std::pair<int,int> >, std::map<std::string,std::string>, std::vector<std::pair<int, std::string> > > > localbind_t;
+typedef std::unordered_map<std::string, boost::variant<bool, int, std::string, std::vector<std::pair<int,int> >, std::vector<std::pair<int, std::string> >, std::map<std::string,std::string> > > localbind_t;
static void parseLocalBindVars(boost::optional<localbind_t> vars, bool& reusePort, int& tcpFastOpenQueueSize, std::string& interface, std::set<int>& cpus)
{
throw std::runtime_error("Failed to setup SSL/TLS for DoH listener, the key from '" + pair.second + "' does not match the certificate from '" + pair.first + "'");
}
/* store the type of the new key, we might need it later to select the right OCSP stapling response */
- keyTypes.push_back(libssl_get_last_key_type(ctx));
+ auto keyType = libssl_get_last_key_type(ctx);
+ if (keyType < 0) {
+ throw std::runtime_error("Failed to setup SSL/TLS for DoH listener, the key from '" + pair.second + "' has an unknown type");
+ }
+ keyTypes.push_back(keyType);
}
if (!ocspFiles.empty()) {
}
/* store the type of the new key, we might need it later to select the right OCSP stapling response */
- keyTypes.push_back(libssl_get_last_key_type(d_tlsCtx));
+ auto keyType = libssl_get_last_key_type(d_tlsCtx);
+ if (keyType < 0) {
+ throw std::runtime_error("Key from '" + pair.second + "' has an unknown type");
+ }
+ keyTypes.push_back(keyType);
}
if (!fe.d_ocspFiles.empty()) {