ptupitsyn commented on code in PR #6102:
URL: https://github.com/apache/ignite-3/pull/6102#discussion_r2163302843


##########
modules/platforms/cpp/ignite/odbc/config/configuration.h:
##########
@@ -104,7 +108,7 @@ class configuration {
     void set_schema(std::string schema) { m_schema = {std::move(schema), 
true}; }
 
     /**
-     * Get authentication type.
+     * Get an authentication type.

Review Comment:
   ```suggestion
        * Get the authentication type.
   ```



##########
modules/platforms/cpp/ignite/odbc/config/configuration.h:
##########
@@ -145,6 +149,34 @@ class configuration {
      */
     [[nodiscard]] const value_with_default<std::string> &get_timezone() const 
{ return m_timezone; };
 
+    /**
+     * Get SSL Mode.

Review Comment:
   ```suggestion
        * Get the SSL Mode.
   ```



##########
modules/platforms/cpp/ignite/odbc/sql_connection.cpp:
##########
@@ -119,9 +119,37 @@ void sql_connection::establish(const configuration &cfg) {
     IGNITE_ODBC_API_CALL(internal_establish(cfg));
 }
 
-void sql_connection::init_socket() {
-    if (!m_socket)
+sql_result sql_connection::init_socket() {
+    if (m_socket)
+        return sql_result::AI_SUCCESS;
+
+    if (m_config.get_ssl_mode().get_value() == ssl_mode_t::DISABLE) {
         m_socket = network::make_tcp_socket_client();
+
+        return sql_result::AI_SUCCESS;
+    }
+
+    try
+    {
+        network::ensure_ssl_loaded();
+    }
+    catch (const ignite_error &err)
+    {
+        LOG_MSG("Can not load OpenSSL library: " << err.what());
+
+        add_status_record("Can not load OpenSSL library (did you set 
OPENSSL_HOME environment variable?)");

Review Comment:
   Should we check the actual value of `OPENSSL_HOME` env var and include it in 
the message?
   
   E.g. `Failed to load OpenSSL library [OPENSSL_HOME='foobar']`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to