2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-02 06:55:16 +00:00

[#34] Checkpoint: code done, tests and hook to do

This commit is contained in:
Francis Dupont
2021-11-30 16:35:10 +01:00
parent 7f80b854d2
commit 75dfab12f6
4 changed files with 110 additions and 2 deletions

View File

@@ -1887,6 +1887,18 @@ MySqlLeaseMgr::createContext() const {
// Open the database.
ctx->conn_.openDatabase();
// Check if we have TLS when we required it.
if (ctx->conn_.getTls()) {
std::string cipher = ctx->conn_.getTlsCipher();
if (cipher.empty()) {
LOG_ERROR(dhcpsrv_logger, DHCPSRV_MYSQL_NO_TLS);
} else {
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE,
DHCPSRV_MYSQL_TLS_CIPHER)
.arg(cipher);
}
}
// Prepare all statements likely to be used.
ctx->conn_.prepareStatements(tagged_statements.begin(),
tagged_statements.end());