]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#34] Addressed almost all comments
authorFrancis Dupont <fdupont@isc.org>
Mon, 20 Dec 2021 15:30:39 +0000 (16:30 +0100)
committerFrancis Dupont <fdupont@isc.org>
Thu, 6 Jan 2022 12:12:40 +0000 (13:12 +0100)
14 files changed:
ChangeLog
doc/devel/unit-tests.dox
doc/examples/kea4/all-keys.json
doc/examples/kea6/all-keys.json
doc/sphinx/arm/admin.rst
doc/sphinx/arm/database-connectivity.rst
src/lib/database/testutils/schema.cc
src/lib/database/testutils/schema.h
src/lib/dhcpsrv/benchmarks/Makefile.am
src/lib/dhcpsrv/dhcpsrv_messages.mes
src/lib/mysql/mysql_connection.h
src/lib/mysql/tests/mysql_connection_unittest.cc
src/lib/pgsql/pgsql_connection.h
src/lib/util/file_utilities.h

index 93111f335726f627420621175e4c5730f9e1f749..0c6a6071021bae6dd95901970410ccabac4577b2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,8 +4,8 @@
        database parameters are "cert-file", "key-file",
        "trust-anchor" and "cipher-list". The negotiated cipher
        name is logged so the MySQL service configuration can
-       be checked... PostgreSQL accepts the same parameters
-       but they only trigger on a call to the OpenSSL generic
+       be checked. PostgreSQL accepts the same parameters
+       but they only trigger the call to the OpenSSL generic
        initialization in the Pq C-API.
        (Gitlab #34)
 
index e843c8c69fb0492fb13f7e630207e63f35acd13c..7bb6032138e08d2869ae2df70e0a10b6c752a12a 100644 (file)
@@ -201,7 +201,7 @@ anything e.g. `DEBUG=true`. `unset DEBUG` to remove this behavior.
   section in the <a href="https://kea.readthedocs.io/">Kea Administrator
   Reference Manual</a>).
 
- @subsection mysqlUnitTestsILS MySQL Database with SSL/TLS
+ @subsection mysqlUnitTestsTLS MySQL Database with SSL/TLS
 
   Usually MySQL is compiled with SSL/TLS support using OpenSSL.
   This is easy to verify using the:
index ef624eb6131c4aeb5deb844f2c56a879579ed7e7..cff480b595eafa1068a0a9d44fc049f9b3bf2336 100644 (file)
                 "cert-file": "my-cert",
 
                 // Private key file name.
-                "key-file": "my key",
+                "key-file": "my-key",
 
-                // Cipher list (see the OpenSSL ciohers command manual).
+                // Cipher list (see the OpenSSL ciphers command manual).
                 "cipher-list": "AES"
             },
             {
index 02ecb3f242c5b13374af50c0b09fab39c10a1ba5..8d45fbc07030088e8d7303502240ca90951116b4 100644 (file)
                 "cert-file": "my-cert",
 
                 // Private key file name.
-                "key-file": "my key",
+                "key-file": "my-key",
 
-                // Cipher list (see the OpenSSL ciohers command manual).
+                // Cipher list (see the OpenSSL ciphers command manual).
                 "cipher-list": "AES"
             },
             {
index 0ed60e90d1e79682ea048de7073b3eae7fb98d69..82d454d49618b375921d9420999840915acaa8e1 100644 (file)
@@ -589,12 +589,12 @@ PostgreSQL without OpenSSL support
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Usually the PostgreSQL database client library is built with the OpenSSL
-support but in the case it was not Kea can be configured to handle this
-case:
+support but Kea can be configured to handle the case where it is not
+supported:
 
 .. code-block:: console
 
-   $ ./configure [other-options] --disable-pgsql-ssl 
+   $ ./configure [other-options] --disable-pgsql-ssl
 
 .. _cql-database:
 
index 5a4cdd5df7466859f037d481a119b4986c0113cb..186b55e8a7373338b4365693fe0f619b8a4e3b03 100644 (file)
@@ -75,7 +75,7 @@ Currently the support for each database is:
 
 -  MySQL supports the whole set, additional configuration must be done
    in the MySQL local setup, for instance certificate revocation list,
-   choice of a specific TLS version, mutual authentication, ...
+   choice of a specific TLS version, mutual authentication, etc.
    When a TLS connection was required but the actual connection is in
    clear text an error log is emitted.
 
index 951c8a861a9b77cd04c145396f804b8282e099ea..1edc48209c7df131d4fcfa39b186ecf7e4afcab6 100644 (file)
@@ -43,9 +43,9 @@ const char* VALID_CIPHER = "cipher-list=AES";
 
 string connectionString(const char* type, const char* name, const char* host,
                         const char* user, const char* password,
-                       const char* timeout, const char* readonly_db,
-                       const char* cert_file, const char* key_file,
-                       const char* trust_anchor, const char* cipher) {
+                        const char* timeout, const char* readonly_db,
+                        const char* cert_file, const char* key_file,
+                        const char* trust_anchor, const char* cipher) {
     const string space = " ";
     string result = "";
 
@@ -136,6 +136,6 @@ softWipeEnabled() {
     return (true);
 }
 
-};
-};
-};
+}
+}
+}
index 7dce7cbb72514e56f4cc99af8cb16402bfe58d05..41139ea38fd331f66614a95194b4955e367d4bcf 100644 (file)
@@ -55,10 +55,10 @@ std::string connectionString(const char* type, const char* name = 0,
                              const char* host = 0, const char* user = 0,
                              const char* password = 0, const char* timeout = 0,
                              const char* readonly_db = 0,
-                            const char* cert_file = 0,
-                            const char* key_file = 0,
-                            const char* trust_anchor = 0,
-                            const char* cipher = 0);
+                             const char* cert_file = 0,
+                             const char* key_file = 0,
+                             const char* trust_anchor = 0,
+                             const char* cipher = 0);
 
 /// @brief Determines if  wiping only the data between tests is enabled
 ///
@@ -66,8 +66,8 @@ std::string connectionString(const char* type, const char* name = 0,
 /// defined as "true" or if it is not present.
 bool softWipeEnabled();
 
-};
-};
-};
+}
+}
+}
 
 #endif
index 362c923b11e8ee29c26744f1086052591da8141d..b2b15bf4fb97282e3e6a2d995a7c226828ffbbaf 100644 (file)
@@ -83,6 +83,7 @@ run_benchmarks_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
 
 if HAVE_MYSQL
 run_benchmarks_LDADD += $(top_builddir)/src/lib/mysql/testutils/libmysqltest.la
+run_benchmarks_LDADD += $(top_builddir)/src/lib/mysql/libkea-mysql.la
 endif
 
 if HAVE_PGSQL
index daa0b9e8d4a733e7a668fd4ccb8ee373b1d50e01..5eb64944a4ec860df3b0b3206826fe20f389c74c 100644 (file)
@@ -1218,7 +1218,7 @@ This message is issued only once.
 
 % DHCPSRV_PGSQL_NO_TLS_SUPPORT Attempt to configure TLS (unsupported for PostgreSQL): %1
 This error message is printed when TLS support was required in the Kea
-configuration: Kea was built with this feature was disabled for PostgreSQL.
+configuration: Kea was built with this feature disabled for PostgreSQL.
 The parameters of the connection are logged.
 
 % DHCPSRV_PGSQL_ROLLBACK rolling back PostgreSQL database
index bac72205302c7494b202fa59798a686dee8a0c60..2328fbf3fb28164aa242f31da4edb63476957040 100644 (file)
@@ -704,7 +704,7 @@ public:
         return (tls_);
     }
 
-    /// @brief Get the TLS cipher
+    /// @brief Get the TLS cipher.
     ///
     /// This method is used to check if required TLS was setup.
     std::string getTlsCipher() {
index eb83ed2f1312a4926a294e4837a6190189430246..c8106fe5ff05982226a34a5daea365776d797ebd 100644 (file)
@@ -658,7 +658,7 @@ TEST_F(MySqlSchemaTest, checkVersion) {
     EXPECT_EQ(MYSQL_SCHEMA_VERSION_MINOR, version.second);
 }
 
-/// @brief  Test fixture class for secure connection.
+/// @brief Test fixture class for secure connection.
 class MySqlSecureConnectionTest : public ::testing::Test {
 public:
 
@@ -666,7 +666,7 @@ public:
     bool hasMySQLTls() {
         std::string tls = getMySQLTlsEnv();
         if (tls.empty()) {
-            tls = getMySQLTlsEnv();
+            tls = getMySQLTlsServer();
         }
         return (tls == "YES");
     }
@@ -687,7 +687,7 @@ TEST_F(MySqlSecureConnectionTest, getMySQLTls) {
     try {
         std::cout << "getMySQLTlsServer returns '" << getMySQLTlsServer() << "'\n";
     } catch (const isc::Exception& ex) {
-        std::cerr << "getMySQLTlsServer fails with " <<      ex.what() << "\n";
+        std::cerr << "getMySQLTlsServer fails with " << ex.what() << "\n";
     }
 }
 
index 4135d2951ed7ae6e6ccf7a901573d8b865c94619..8cc7c212fa1119d886a41adb31b7183b73e5f8db 100644 (file)
@@ -203,7 +203,7 @@ public:
     /// @brief Function invoked to process fetched row.
     typedef std::function<void(PgSqlResult&, int)> ConsumeResultRowFun;
 
-    /// @brief Emit once the TLS support warning.
+    /// @brief Emit the TLS support warning only once.
     static bool warned_about_tls;
 
     /// @brief Constructor
index dc925a1400422f6cc6cd6ecb5f914f4fc5ed2bac..f1b6275c6df1518309961cbb7022a5e51c0eb777 100644 (file)
@@ -23,7 +23,7 @@ std::string getContent(const std::string& file_name);
 /// @brief Is a directory predicate.
 ///
 /// @param name The file or directory name.
-/// @return True if the name points to a directory, false if not including
+/// @return True if the name points to a directory, false otherwise including
 /// if the pointed location does not exist.
 bool isDir(const std::string& name);