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;
}
Example #2
0
void BOSHSessionStream::open() {
    connectionPool->setTLSCertificate(getTLSCertificate());
    connectionPool->open();
}