Setting up transport layer security with X.509 certificates