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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.