title: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption
body: <p>I used this code to create a connection to SQL Server.</p>
  
  <pre><code>String connectionUrl = "jdbc:sqlserver://IP:1433;" +
          "databaseName=db;user=db;password=pwd";
      Connection con = null;
    try {
       // Establish the connection.
       Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
       con = DriverManager.getConnection(connectionUrl);
          return "true";
    }
  
    // Handle any errors that may have occurred.
    catch (Exception e) {
       e.printStackTrace();
    }
  </code></pre>
  
  <p>but i got this error:</p>
  
  <blockquote>
    <p>com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Socket closed". ClientConnectionId:5975fad5-8f8d-496a-a2bb-bff3a8d1a755</p>
  </blockquote>
  
  <p>Can anybody help me?
  Thanks in advance</p>