|
2 | 2 | title: Connecting from Linux or macOS |
3 | 3 | description: Learn how to create a connection to a database from Linux or macOS using the Microsoft ODBC Driver for SQL Server. |
4 | 4 | ms.custom: "" |
5 | | -ms.date: 02/15/2022 |
| 5 | +ms.date: 08/08/2022 |
6 | 6 | ms.prod: sql |
7 | 7 | ms.prod_service: connectivity |
8 | 8 | ms.reviewer: "" |
@@ -111,28 +111,30 @@ Regardless of the settings for **Encrypt** and **TrustServerCertificate**, the s |
111 | 111 | | Yes | No | Yes | Server certificate is checked.<br/>Data sent between client and server is encrypted. | |
112 | 112 | | Yes | Yes | Yes | Server certificate isn't checked.<br/>Data sent between client and server is encrypted. | |
113 | 113 |
|
114 | | -When using connection encryption, the name (or IP address) in a Subject Common Name (CN) or Subject Alternative Name (SAN) in a SQL Server TLS/SSL certificate should exactly match the server name (or IP address) specified in the connection string. |
| 114 | +When using connection encryption, the name (or IP address) in a Subject Common Name (CN) or Subject Alternative Name (SAN) in a SQL Server TLS/SSL certificate should exactly match the server name (or IP address) specified in the connection string. The `HostnameInCertificate` keyword (v18.0+) can be used to specify an alternate name used to match against the names in the TLS/SSL certificate. When the keyword is specified, the SQL Server TLS/SSL certificate must match either one of the server name, or the `HostnameInCertificate`. |
115 | 115 |
|
116 | 116 | By default, encrypted connections always verify the server's certificate. However, if you connect to a server that has a self-signed certificate, and aren't using strict encryption mode, you can add the `TrustServerCertificate` option to bypass checking the certificate against the list of trusted certificate authorities: |
117 | 117 |
|
118 | 118 | ```ini |
119 | 119 | Driver={ODBC Driver 17 for SQL Server};Server=ServerNameHere;Encrypt=YES;TrustServerCertificate=YES |
120 | 120 | ``` |
121 | 121 |
|
122 | | -In strict encryption mode, the certificate is always verified. <br/><br/> |
| 122 | +In strict encryption mode, the certificate is always verified. As an optional alternative to standard certificate verification, the `ServerCertificate` keyword (v18.1+) can be used to specify the path to a certificate file to match against the SQL Server certificate. This option is only available when using strict encryption. The accepted certificate formats are PEM, DER, and CER. If specified, the SQL Server certificate is checked by seeing if the `ServerCertificate` provided is an exact match.<br/><br/> |
123 | 123 | TLS on Linux and macOS uses the OpenSSL library. The following table shows the minimum supported versions of OpenSSL and the default Certificate Trust Store locations for each platform: |
124 | 124 |
|
125 | 125 | |Platform|Minimum OpenSSL Version|Default Certificate Trust Store Location| |
126 | 126 | |------------|---------------------------|--------------------------------------------| |
127 | | -|Debian 10|1.1.1|/etc/ssl/certs| |
| 127 | +|Debian 10, 11|1.1.1|/etc/ssl/certs| |
128 | 128 | |Debian 9|1.1.0|/etc/ssl/certs| |
129 | 129 | |Debian 8.71|1.0.1|/etc/ssl/certs| |
130 | 130 | |OS X 10.11, macOS|1.0.2|/usr/local/etc/openssl/certs| |
| 131 | +|Red Hat Enterprise Linux 9|3.0.1|/etc/pki/tls/cert.pem| |
131 | 132 | |Red Hat Enterprise Linux 8|1.1.1|/etc/pki/tls/cert.pem| |
132 | 133 | |Red Hat Enterprise Linux 7|1.0.1|/etc/pki/tls/cert.pem| |
133 | 134 | |Red Hat Enterprise Linux 6|1.0.0-10|/etc/pki/tls/cert.pem| |
134 | 135 | |SUSE Linux Enterprise 15|1.1.0|/etc/ssl/certs| |
135 | 136 | |SUSE Linux Enterprise 11, 12|1.0.1|/etc/ssl/certs| |
| 137 | +|Ubuntu 22.04|3.0.2|/etc/ssl/certs| |
136 | 138 | |Ubuntu 20.04, 21.04, 21.10 |1.1.1|/etc/ssl/certs| |
137 | 139 | |Ubuntu 18.04|1.1.0|/etc/ssl/certs| |
138 | 140 | |Ubuntu 16.04, 16.10, 17.10|1.0.2|/etc/ssl/certs| |
|
0 commit comments