QueryData genTLSCertificate(QueryContext& context) { QueryData results; auto hostnames = context.constraints["hostname"].getAll(EQUALS); for (const auto& hostname : hostnames) { auto s = getTLSCertificate(hostname, results); if (!s.ok()) { LOG(INFO) << "Cannot get certificate for " << hostname << ": " << s.getMessage(); } } return results; }
void BOSHSessionStream::open() { connectionPool->setTLSCertificate(getTLSCertificate()); connectionPool->open(); }