How the Secure Socket Layer works

The Secure Socket Layer (SSL) is a special form of the standard socket API that does encrypted communications. The advantage of using SSL as opposed to the cryptography routines in Java Cryptography Extension (JCE) is that SSL is almost seamless. You can take an existing socket-based network program, change just a few lines, and you have a secure network program. You have probably used SSL frequently without even knowing it. Whenever you see a URL that starts with https, it's using SSL.

There are several third-party SSL libraries for Java, and Sun has recently released its own SSL library called JSSE—the Java Secure Sockets Extension. The two core classes in JSSE are SSLSocket and SSLServerSocket. These classes ...

Get Special Edition Using Java™ 2 Enterprise Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.