Transport Layer Security (TLS) is a security protocol for accessing remote machines over untrusted networks. A primary use case of TLS is encrypting the communication between web applications and servers. It runs on top of TCP/IP to secure client-server communications and allows a TLS-enabled client to authenticate itself to a TLS-enabled server and vice versa. TLS evolved from a previous encryption protocol called Secure Sockets Layer (SSL), and the terms TLS and SSL are sometimes used interchangeably.
During server authentication, the client application uses public-key cryptography (PKI) algorithms to verify the server's identity by checking that the server's certificate is issued by a trusted certificate authority (CA) and proves the ownership of the public key. Similarly, TLS client authentication allows the server to validate the client's identity. The client and server can also authenticate each other using self-signed certificates. However, you will only want to use a self-signed certificate for an internal network or a development server.
After establishing a TLS connection, the client and server can exchange symmetrically encrypted messages with a shared secret key. TLS is the recommended method for establishing a secure connection to ASE due to its more straightforward configuration and higher performance than SSH.
For more information about securing TCP/IP connections with TLS, see Enabling SSL in the ASE documentation.
import devart.ase
connect()
module method and obtain a connection
object.
my_connection = devart.ase.connect(
Server="your_server",
Database="your_database",
UserId="your_username",
Password="your_password",
UseSSL="True",
SSLCACert="path_to_ca_cert",
SSLCert="path_to_client_cert",
SSLKey="path_to_client_key"
)
The following table describes the TLS connection parameters.
Parameter |
Description |
---|---|
|
Enables TLS connections. |
|
The CA certificate |
|
The client certificate |
|
The client private key |
|
Specifies whether to verify the server certificate validity period during a TLS handshake. The possible values are |
|
Specifies whether to verify the server certificate for compliance with constraints during a TLS handshake. The possible values are |
|
Specifies whether to verify the server certificate chain during a TLS handshake. By default, the connector verifies the entire certificate chain. The possible values are |
|
Specifes whether to verify the server certificate signature security during a TLS handshake. The possible values are |