Changing your Java code to use transport layer security
If your code already uses socket factories to create its sockets, then you can add transport layer security (TLS) support to your program.
If your code does not already use socket factories, see Change your Java™ code to use socket factories.
To change your code to use TLS, perform the following steps:
Your code now uses TLS support. You do not need to make any other changes to your code.