A core requirement of any non-trivial P2P application is secure communication between peers. While the details of the security depend on how the application will be used and on what it will protect, it's often possible to implement strong, general-purpose security using off-the-shelf technology such as SSL. This article demonstrates how to use SSL (via JSSE) in P2P security.