[id='hotrod_client_truststores-{context}']
= Configuring Hot Rod Client Truststores
To trust server certificates, and connect to {brandname} servers over Hot Rod,
clients need trust stores that contain the public key for servers or the CA
that signed the server certificate.

You can configure truststores for Hot Rod Java clients programmatically using
the `ConfigurationBuilder` or by specifying properties in
`hotrod-client.properties` on the classpath.

.Procedure

. Enable SSL with the `ssl()` method. This implicitly enables SSL if you specify a truststore.
. Specify the name of the truststore with the `trustStoreFileName()` method.
. Specify the truststore secret with the `trustStorePassword()` method.

[source,java]
----
include::code_examples/HotRodTrustStore.java[]
----

* link:{javadocroot}/org/infinispan/client/hotrod/configuration/package-summary.html[Hot Rod client configuration properties]
* link:{javadocroot}/org/infinispan/client/hotrod/configuration/ConfigurationBuilder.html[org.infinispan.client.hotrod.configuration.ConfigurationBuilder]
