Configure TLS versions and cipher suites
By default, new clients connecting to new servers use TLSv1.2.
Clients and servers negotiate the highest TLS version supported by both ends of the connection.
If the client-side configurables are not explicitly set, the server-side ssl.tls.version.min and ssl.tls.version.max configurables also apply to outbound client connections for backward compatibility.
On this page:
Configure TLS versions on the server
If the client-side configurables are not set, you can force the use of TLS with the following commands.
The following configurables control which TLS versions a server accepts:
-
ssl.tls.version.minspecifies the minimum TLS version. -
ssl.tls.version.maxspecifies the maximum TLS version.
For security, set the minimum version to at least 12
To allow only TLS 1.3
ssl.tls.version.min=13 ssl.tls.version.max=13
To allow only TLS 1.2
ssl.tls.version.min=12 ssl.tls.version.max=12
To allow TLS 1.2 and TLS 1.3
ssl.tls.version.min=12 ssl.tls.version.max=13
This configuration excludes TLS 1.0 and TLS 1.1.
TLS 1.3 and TLS 1.2
TLS 1.3 can provide faster file transfers than TLS 1.2, but establishing a TLS 1.3 connection requires additional overhead.
The higher the network latency, the less significant the connection overhead becomes.
Applications that create many short-lived connections might run better with TLS 1.2, while TLS 1.3 provides stronger protection against modern attacks.
Configure TLS versions on clients
Release 2021.1 introduced the following client-side configurables:
The valid range of client-side values can differ from the valid range of server-side values.
Clients and servers always negotiate the highest TLS version supported by both sides of the connection.
Client and server connections
The client-side and server-side TLS configurables apply to more than end-user client applications.
Servers, proxies, and brokers can establish both upstream (client-side) and downstream (server-side) connections.
Examples include:
-
Edge-to-edge server chaining.
-
Authorization servers (P4AUTH).
-
Changelist servers (P4CHANGE).
-
Remote depot access.
-
Brokers and proxies connecting to upstream servers.
In these situations, a server can act as a client when connecting to another service.
Apply TLS configuration changes
After changing any TLS version configurable, completely stop and restart the server.
p4 admin restartA complete stop and start is required before the changes take effect.
For restart procedures, see:
-
For UNIX, see Stop the P4 Server and Start the P4 Server.
-
For Windows, see Start and stop the P4 Server Windows service.
Test TLS version settings
You can use client-side configurables for testing.
On a client, to verify that TLSv1.0 does not connect run:
p4 -v ssl.tls.version.min=10 -v ssl.tls.version.max=10 info
Values outside the supported range are automatically adjusted to the nearest supported value:
-
Values less than 10 are treated as 10.
-
Values greater than 13 are treated as 13.
Avoid invalid version ranges
Do not set ssl.tls.version.min to a higher value than the value of ssl.tls.version.max .
If you do, clients cannot connect and can receive an error similar to:
Perforce client error: SSL protocol: error:14077102:SSL routines: SSL23_GET_SERVER_HELLO:unsupported protocol
To restore valid settings, update the configurables from the command-line interface and restart the server:
p4d -r /p4/1/root -c "set ssl.tls.version.min=11" p4d -r /p4/1/root -c "set ssl.tls.version.max=13"
Configure TLS for brokers and proxies
You can configure TLS for brokers and proxies in several ways.
Use command-line options
Broker example:
p4broker -v ssl.client.tls.version.min=11 -v ssl.tls.version.min=12 -c p4broker.config
Proxy example:
p4p -v ssl.client.tls.version.min=11 -v ssl.tls.version.min=12 -r /var/proxycacheroot -t ssl:serverhost:1666 -p ssl:proxyhost:1667
Use the broker configuration file
The broker configuration file supports TLS configurables through the debug-level option:
debug-level = ssl.tls.version.min=12, ssl.tls.version.max=12;
Use Windows service configuration
For Broker services:
p4 set -S "P4Broker" P4BROKEROPTIONS="-c C:\p4broker\p4broker.conf -v ssl.client.tls.version.min=12 -v ssl.client.tls.version.max=12"
For Proxy services:
p4 set -S "Perforce Proxy" P4POPTIONS="-v ssl.client.tls.version.min=12 -v ssl.client.tls.version.max=12"
Configure a secondary cipher suite
By default, P4 Server SSL/TLS support uses the AES256-SHA cipher suite.
To enable CAMELLIA256-SHA as a secondary cipher suite, set:
ssl.secondary.suite=1
TLS version mismatch errors
A proxy or broker cannot connect if the TLS versions supported by each endpoint do not overlap.
For example:
Perforce client error:
Broker connection error: failed to connect to ssl::1666.
SSL connect to ssl::1666 failed (SSL protocol error).
Remove SSL protocol prefix from P4PORT or fix the TLS settings.
SSL protocol: error:1409442E:SSL routines:
ssl3_read_bytes:tlsv1 alert protocol version