While working with TLS, keep the following in mind:
Permit enough time for setting up encryption. Strong encryption takes a long time to set up.
Ensure that the time is properly synchronized between all entities. X.509 certificates are time sensitive. Ensure that all entities interacting with each other match each other’s UTC times as closely as possible.
Ensure that the certificates that you use are valid. One of the most common TLS failures is an expired or not yet valid certificate. Ensure that the selected certificates are valid for the time period for which they are being used.
For information about extracting a certificate and Private Key from a keystore, see Extracting a certificate and key from a PFX or PKCS#12 keystore.